
sqlite3_value * __regparm3 sqlite3VdbeGetBoundValue(Vdbe *v,int iVar,u8 aff)

{
  Mem *pMVar1;
  sqlite3 *db;
  undefined4 unaff_EBX;
  Mem *pTo;
  undefined4 unaff_ESI;
  
  if (v == (Vdbe *)0x0) {
    return (sqlite3_value *)0x0;
  }
  pMVar1 = v->aVar;
  pTo = (sqlite3_value *)0x0;
  if ((pMVar1[iVar + -1].flags & 1) == 0) {
    db = v->db;
    pTo = (Mem *)sqlite3DbMallocZero(db,CONCAT44(unaff_ESI,unaff_EBX));
    if (pTo != (Mem *)0x0) {
      pTo->db = db;
      pTo->flags = 1;
      sqlite3VdbeMemCopy(pTo,pMVar1 + iVar + -1);
      applyAffinity(pTo,'A','\x01');
      return pTo;
    }
  }
  return pTo;
}



int __regparm3 FUN_00051600(undefined4 *param_1,int param_2)

{
  undefined4 uVar1;
  int iVar2;
  
  if (param_1 == (undefined4 *)0x0) {
    return 0;
  }
  iVar2 = 0;
  if ((*(byte *)(param_1[0x18] + param_2 * 0x28 + -0x20) & 1) == 0) {
    uVar1 = *param_1;
    iVar2 = FUN_00028410();
    if (iVar2 != 0) {
      *(undefined4 *)(iVar2 + 0x20) = uVar1;
      *(undefined2 *)(iVar2 + 8) = 1;
      FUN_000491f0();
      FUN_00051490();
      return iVar2;
    }
  }
  return iVar2;
}


PUSH EDI
PUSH ESI
PUSH EBX
TEST EAX,EAX
JZ 0x00051668
LEA ECX,[EDX + EDX*0x4]
MOV EDX,dword ptr [EAX + 0x60]
XOR EBX,EBX
LEA ESI,[EDX + ECX*0x8 + -0x28]
TEST byte ptr [ESI + 0x8],0x1
JZ 0x00051620
MOV EAX,EBX
POP EBX
POP ESI
POP EDI
RET
MOV EDI,dword ptr [EAX]
MOV EDX,0x28
XOR ECX,ECX
MOV EAX,EDI
CALL 0x00028410
MOV EBX,EAX
TEST EAX,EAX
JZ 0x00051619
MOV EAX,0x1
MOV dword ptr [EBX + 0x20],EDI
MOV EDX,ESI
MOV word ptr [EBX + 0x8],AX
MOV EAX,EBX
CALL 0x000491f0
MOV EAX,EBX
MOV ECX,0x1
MOV EDX,0x41
CALL 0x00051490
MOV EAX,EBX
POP EBX
POP ESI
POP EDI
RET
XOR EBX,EBX
MOV EAX,EBX
POP EBX
POP ESI
POP EDI
RET
(translation_unit "int __regparm3 FUN_00051600(undefined4 *param_1,int param_2)\n\n{\n  undefined4 uVar1;\n  int iVar2;\n  \n  if (param_1 == (undefined4 *)0x0) {\n    return 0;\n  }\n  iVar2 = 0;\n  if ((*(byte *)(param_1[0x18] + param_2 * 0x28 + -0x20) & 1) == 0) {\n    uVar1 = *param_1;\n    iVar2 = FUN_00028410();\n    if (iVar2 != 0) {\n      *(undefined4 *)(iVar2 + 0x20) = uVar1;\n      *(undefined2 *)(iVar2 + 8) = 1;\n      FUN_000491f0();\n      FUN_00051490();\n      return iVar2;\n    }\n  }\n  return iVar2;\n}\n\n" (function_definition "int __regparm3 FUN_00051600(undefined4 *param_1,int param_2)\n\n{\n  undefined4 uVar1;\n  int iVar2;\n  \n  if (param_1 == (undefined4 *)0x0) {\n    return 0;\n  }\n  iVar2 = 0;\n  if ((*(byte *)(param_1[0x18] + param_2 * 0x28 + -0x20) & 1) == 0) {\n    uVar1 = *param_1;\n    iVar2 = FUN_00028410();\n    if (iVar2 != 0) {\n      *(undefined4 *)(iVar2 + 0x20) = uVar1;\n      *(undefined2 *)(iVar2 + 8) = 1;\n      FUN_000491f0();\n      FUN_00051490();\n      return iVar2;\n    }\n  }\n  return iVar2;\n}" primitive_type (ERROR "__regparm3" identifier) (function_declarator "FUN_00051600(undefined4 *param_1,int param_2)" identifier (parameter_list "(undefined4 *param_1,int param_2)" ( (parameter_declaration "undefined4 *param_1" type_identifier (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "int param_2" primitive_type identifier) ))) (compound_statement "{\n  undefined4 uVar1;\n  int iVar2;\n  \n  if (param_1 == (undefined4 *)0x0) {\n    return 0;\n  }\n  iVar2 = 0;\n  if ((*(byte *)(param_1[0x18] + param_2 * 0x28 + -0x20) & 1) == 0) {\n    uVar1 = *param_1;\n    iVar2 = FUN_00028410();\n    if (iVar2 != 0) {\n      *(undefined4 *)(iVar2 + 0x20) = uVar1;\n      *(undefined2 *)(iVar2 + 8) = 1;\n      FUN_000491f0();\n      FUN_00051490();\n      return iVar2;\n    }\n  }\n  return iVar2;\n}" { (declaration "undefined4 uVar1;" type_identifier identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (if_statement "if (param_1 == (undefined4 *)0x0) {\n    return 0;\n  }" if (parenthesized_expression "(param_1 == (undefined4 *)0x0)" ( (binary_expression "param_1 == (undefined4 *)0x0" identifier == (cast_expression "(undefined4 *)0x0" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    return 0;\n  }" { (return_statement "return 0;" return number_literal ;) })) (expression_statement "iVar2 = 0;" (assignment_expression "iVar2 = 0" identifier = number_literal) ;) (if_statement "if ((*(byte *)(param_1[0x18] + param_2 * 0x28 + -0x20) & 1) == 0) {\n    uVar1 = *param_1;\n    iVar2 = FUN_00028410();\n    if (iVar2 != 0) {\n      *(undefined4 *)(iVar2 + 0x20) = uVar1;\n      *(undefined2 *)(iVar2 + 8) = 1;\n      FUN_000491f0();\n      FUN_00051490();\n      return iVar2;\n    }\n  }" if (parenthesized_expression "((*(byte *)(param_1[0x18] + param_2 * 0x28 + -0x20) & 1) == 0)" ( (binary_expression "(*(byte *)(param_1[0x18] + param_2 * 0x28 + -0x20) & 1) == 0" (parenthesized_expression "(*(byte *)(param_1[0x18] + param_2 * 0x28 + -0x20) & 1)" ( (binary_expression "*(byte *)(param_1[0x18] + param_2 * 0x28 + -0x20) & 1" (pointer_expression "*(byte *)(param_1[0x18] + param_2 * 0x28 + -0x20)" * (cast_expression "(byte *)(param_1[0x18] + param_2 * 0x28 + -0x20)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1[0x18] + param_2 * 0x28 + -0x20)" ( (binary_expression "param_1[0x18] + param_2 * 0x28 + -0x20" (binary_expression "param_1[0x18] + param_2 * 0x28" (subscript_expression "param_1[0x18]" identifier [ number_literal ]) + (binary_expression "param_2 * 0x28" identifier * number_literal)) + number_literal) )))) & number_literal) )) == number_literal) )) (compound_statement "{\n    uVar1 = *param_1;\n    iVar2 = FUN_00028410();\n    if (iVar2 != 0) {\n      *(undefined4 *)(iVar2 + 0x20) = uVar1;\n      *(undefined2 *)(iVar2 + 8) = 1;\n      FUN_000491f0();\n      FUN_00051490();\n      return iVar2;\n    }\n  }" { (expression_statement "uVar1 = *param_1;" (assignment_expression "uVar1 = *param_1" identifier = (pointer_expression "*param_1" * identifier)) ;) (expression_statement "iVar2 = FUN_00028410();" (assignment_expression "iVar2 = FUN_00028410()" identifier = (call_expression "FUN_00028410()" identifier (argument_list "()" ( )))) ;) (if_statement "if (iVar2 != 0) {\n      *(undefined4 *)(iVar2 + 0x20) = uVar1;\n      *(undefined2 *)(iVar2 + 8) = 1;\n      FUN_000491f0();\n      FUN_00051490();\n      return iVar2;\n    }" if (parenthesized_expression "(iVar2 != 0)" ( (binary_expression "iVar2 != 0" identifier != number_literal) )) (compound_statement "{\n      *(undefined4 *)(iVar2 + 0x20) = uVar1;\n      *(undefined2 *)(iVar2 + 8) = 1;\n      FUN_000491f0();\n      FUN_00051490();\n      return iVar2;\n    }" { (expression_statement "*(undefined4 *)(iVar2 + 0x20) = uVar1;" (assignment_expression "*(undefined4 *)(iVar2 + 0x20) = uVar1" (pointer_expression "*(undefined4 *)(iVar2 + 0x20)" * (cast_expression "(undefined4 *)(iVar2 + 0x20)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar2 + 0x20)" ( (binary_expression "iVar2 + 0x20" identifier + number_literal) )))) = identifier) ;) (expression_statement "*(undefined2 *)(iVar2 + 8) = 1;" (assignment_expression "*(undefined2 *)(iVar2 + 8) = 1" (pointer_expression "*(undefined2 *)(iVar2 + 8)" * (cast_expression "(undefined2 *)(iVar2 + 8)" ( (type_descriptor "undefined2 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar2 + 8)" ( (binary_expression "iVar2 + 8" identifier + number_literal) )))) = number_literal) ;) (expression_statement "FUN_000491f0();" (call_expression "FUN_000491f0()" identifier (argument_list "()" ( ))) ;) (expression_statement "FUN_00051490();" (call_expression "FUN_00051490()" identifier (argument_list "()" ( ))) ;) (return_statement "return iVar2;" return identifier ;) })) })) (return_statement "return iVar2;" return identifier ;) })))
(translation_unit "sqlite3_value * __regparm3 sqlite3VdbeGetBoundValue(Vdbe *v,int iVar,u8 aff)\n\n{\n  Mem *pMVar1;\n  sqlite3 *db;\n  undefined4 unaff_EBX;\n  Mem *pTo;\n  undefined4 unaff_ESI;\n  \n  if (v == (Vdbe *)0x0) {\n    return (sqlite3_value *)0x0;\n  }\n  pMVar1 = v->aVar;\n  pTo = (sqlite3_value *)0x0;\n  if ((pMVar1[iVar + -1].flags & 1) == 0) {\n    db = v->db;\n    pTo = (Mem *)sqlite3DbMallocZero(db,CONCAT44(unaff_ESI,unaff_EBX));\n    if (pTo != (Mem *)0x0) {\n      pTo->db = db;\n      pTo->flags = 1;\n      sqlite3VdbeMemCopy(pTo,pMVar1 + iVar + -1);\n      applyAffinity(pTo,'A','\x01');\n      return pTo;\n    }\n  }\n  return pTo;\n}\n\n" (ERROR "sqlite3_value * __regparm3 sqlite3VdbeGetBoundValue(Vdbe *v,int iVar,u8 aff)" (binary_expression "sqlite3_value * __regparm3 sqlite3VdbeGetBoundValue(Vdbe *v,int iVar,u8 aff)" identifier * (ERROR "__regparm3" identifier) (call_expression "sqlite3VdbeGetBoundValue(Vdbe *v,int iVar,u8 aff)" identifier (argument_list "(Vdbe *v,int iVar,u8 aff)" ( (binary_expression "Vdbe *v" identifier * identifier) , (ERROR "int" identifier) identifier , (ERROR "u8" identifier) identifier ))))) (compound_statement "{\n  Mem *pMVar1;\n  sqlite3 *db;\n  undefined4 unaff_EBX;\n  Mem *pTo;\n  undefined4 unaff_ESI;\n  \n  if (v == (Vdbe *)0x0) {\n    return (sqlite3_value *)0x0;\n  }\n  pMVar1 = v->aVar;\n  pTo = (sqlite3_value *)0x0;\n  if ((pMVar1[iVar + -1].flags & 1) == 0) {\n    db = v->db;\n    pTo = (Mem *)sqlite3DbMallocZero(db,CONCAT44(unaff_ESI,unaff_EBX));\n    if (pTo != (Mem *)0x0) {\n      pTo->db = db;\n      pTo->flags = 1;\n      sqlite3VdbeMemCopy(pTo,pMVar1 + iVar + -1);\n      applyAffinity(pTo,'A','\x01');\n      return pTo;\n    }\n  }\n  return pTo;\n}" { (declaration "Mem *pMVar1;" type_identifier (pointer_declarator "*pMVar1" * identifier) ;) (declaration "sqlite3 *db;" type_identifier (pointer_declarator "*db" * identifier) ;) (declaration "undefined4 unaff_EBX;" type_identifier identifier ;) (declaration "Mem *pTo;" type_identifier (pointer_declarator "*pTo" * identifier) ;) (declaration "undefined4 unaff_ESI;" type_identifier identifier ;) (if_statement "if (v == (Vdbe *)0x0) {\n    return (sqlite3_value *)0x0;\n  }" if (parenthesized_expression "(v == (Vdbe *)0x0)" ( (binary_expression "v == (Vdbe *)0x0" identifier == (cast_expression "(Vdbe *)0x0" ( (type_descriptor "Vdbe *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    return (sqlite3_value *)0x0;\n  }" { (return_statement "return (sqlite3_value *)0x0;" return (cast_expression "(sqlite3_value *)0x0" ( (type_descriptor "sqlite3_value *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal) ;) })) (expression_statement "pMVar1 = v->aVar;" (assignment_expression "pMVar1 = v->aVar" identifier = (field_expression "v->aVar" identifier -> field_identifier)) ;) (expression_statement "pTo = (sqlite3_value *)0x0;" (assignment_expression "pTo = (sqlite3_value *)0x0" identifier = (cast_expression "(sqlite3_value *)0x0" ( (type_descriptor "sqlite3_value *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) ;) (if_statement "if ((pMVar1[iVar + -1].flags & 1) == 0) {\n    db = v->db;\n    pTo = (Mem *)sqlite3DbMallocZero(db,CONCAT44(unaff_ESI,unaff_EBX));\n    if (pTo != (Mem *)0x0) {\n      pTo->db = db;\n      pTo->flags = 1;\n      sqlite3VdbeMemCopy(pTo,pMVar1 + iVar + -1);\n      applyAffinity(pTo,'A','\x01');\n      return pTo;\n    }\n  }" if (parenthesized_expression "((pMVar1[iVar + -1].flags & 1) == 0)" ( (binary_expression "(pMVar1[iVar + -1].flags & 1) == 0" (parenthesized_expression "(pMVar1[iVar + -1].flags & 1)" ( (binary_expression "pMVar1[iVar + -1].flags & 1" (field_expression "pMVar1[iVar + -1].flags" (subscript_expression "pMVar1[iVar + -1]" identifier [ (binary_expression "iVar + -1" identifier + number_literal) ]) . field_identifier) & number_literal) )) == number_literal) )) (compound_statement "{\n    db = v->db;\n    pTo = (Mem *)sqlite3DbMallocZero(db,CONCAT44(unaff_ESI,unaff_EBX));\n    if (pTo != (Mem *)0x0) {\n      pTo->db = db;\n      pTo->flags = 1;\n      sqlite3VdbeMemCopy(pTo,pMVar1 + iVar + -1);\n      applyAffinity(pTo,'A','\x01');\n      return pTo;\n    }\n  }" { (expression_statement "db = v->db;" (assignment_expression "db = v->db" identifier = (field_expression "v->db" identifier -> field_identifier)) ;) (expression_statement "pTo = (Mem *)sqlite3DbMallocZero(db,CONCAT44(unaff_ESI,unaff_EBX));" (assignment_expression "pTo = (Mem *)sqlite3DbMallocZero(db,CONCAT44(unaff_ESI,unaff_EBX))" identifier = (cast_expression "(Mem *)sqlite3DbMallocZero(db,CONCAT44(unaff_ESI,unaff_EBX))" ( (type_descriptor "Mem *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "sqlite3DbMallocZero(db,CONCAT44(unaff_ESI,unaff_EBX))" identifier (argument_list "(db,CONCAT44(unaff_ESI,unaff_EBX))" ( identifier , (call_expression "CONCAT44(unaff_ESI,unaff_EBX)" identifier (argument_list "(unaff_ESI,unaff_EBX)" ( identifier , identifier ))) ))))) ;) (if_statement "if (pTo != (Mem *)0x0) {\n      pTo->db = db;\n      pTo->flags = 1;\n      sqlite3VdbeMemCopy(pTo,pMVar1 + iVar + -1);\n      applyAffinity(pTo,'A','\x01');\n      return pTo;\n    }" if (parenthesized_expression "(pTo != (Mem *)0x0)" ( (binary_expression "pTo != (Mem *)0x0" identifier != (cast_expression "(Mem *)0x0" ( (type_descriptor "Mem *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n      pTo->db = db;\n      pTo->flags = 1;\n      sqlite3VdbeMemCopy(pTo,pMVar1 + iVar + -1);\n      applyAffinity(pTo,'A','\x01');\n      return pTo;\n    }" { (expression_statement "pTo->db = db;" (assignment_expression "pTo->db = db" (field_expression "pTo->db" identifier -> field_identifier) = identifier) ;) (expression_statement "pTo->flags = 1;" (assignment_expression "pTo->flags = 1" (field_expression "pTo->flags" identifier -> field_identifier) = number_literal) ;) (expression_statement "sqlite3VdbeMemCopy(pTo,pMVar1 + iVar + -1);" (call_expression "sqlite3VdbeMemCopy(pTo,pMVar1 + iVar + -1)" identifier (argument_list "(pTo,pMVar1 + iVar + -1)" ( identifier , (binary_expression "pMVar1 + iVar + -1" (binary_expression "pMVar1 + iVar" identifier + identifier) + number_literal) ))) ;) (expression_statement "applyAffinity(pTo,'A','\x01');" (call_expression "applyAffinity(pTo,'A','\x01')" identifier (argument_list "(pTo,'A','\x01')" ( identifier , (char_literal "'A'" ' character ') , (char_literal "'\x01'" ' escape_sequence ') ))) ;) (return_statement "return pTo;" return identifier ;) })) })) (return_statement "return pTo;" return identifier ;) }))
(translation_unit "int __regparm3 FUN_00051600(undefined4 *param_1,int param_2)\n\n{\n  undefined4 uVar1;\n  int iVar2;\n  \n  if (param_1 == (undefined4 *)0x0) {\n    return 0;\n  }\n  iVar2 = 0;\n  if ((*(byte *)(param_1[0x18] + param_2 * 0x28 + -0x20) & 1) == 0) {\n    uVar1 = *param_1;\n    iVar2 = FUN_00028410();\n    if (iVar2 != 0) {\n      *(undefined4 *)(iVar2 + 0x20) = uVar1;\n      *(undefined2 *)(iVar2 + 8) = 1;\n      FUN_000491f0();\n      FUN_00051490();\n      return iVar2;\n    }\n  }\n  return iVar2;\n}\n\n" (function_definition "int __regparm3 FUN_00051600(undefined4 *param_1,int param_2)\n\n{\n  undefined4 uVar1;\n  int iVar2;\n  \n  if (param_1 == (undefined4 *)0x0) {\n    return 0;\n  }\n  iVar2 = 0;\n  if ((*(byte *)(param_1[0x18] + param_2 * 0x28 + -0x20) & 1) == 0) {\n    uVar1 = *param_1;\n    iVar2 = FUN_00028410();\n    if (iVar2 != 0) {\n      *(undefined4 *)(iVar2 + 0x20) = uVar1;\n      *(undefined2 *)(iVar2 + 8) = 1;\n      FUN_000491f0();\n      FUN_00051490();\n      return iVar2;\n    }\n  }\n  return iVar2;\n}" primitive_type (ERROR "__regparm3" identifier) (function_declarator "FUN_00051600(undefined4 *param_1,int param_2)" identifier (parameter_list "(undefined4 *param_1,int param_2)" ( (parameter_declaration "undefined4 *param_1" type_identifier (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "int param_2" primitive_type identifier) ))) (compound_statement "{\n  undefined4 uVar1;\n  int iVar2;\n  \n  if (param_1 == (undefined4 *)0x0) {\n    return 0;\n  }\n  iVar2 = 0;\n  if ((*(byte *)(param_1[0x18] + param_2 * 0x28 + -0x20) & 1) == 0) {\n    uVar1 = *param_1;\n    iVar2 = FUN_00028410();\n    if (iVar2 != 0) {\n      *(undefined4 *)(iVar2 + 0x20) = uVar1;\n      *(undefined2 *)(iVar2 + 8) = 1;\n      FUN_000491f0();\n      FUN_00051490();\n      return iVar2;\n    }\n  }\n  return iVar2;\n}" { (declaration "undefined4 uVar1;" type_identifier identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (if_statement "if (param_1 == (undefined4 *)0x0) {\n    return 0;\n  }" if (parenthesized_expression "(param_1 == (undefined4 *)0x0)" ( (binary_expression "param_1 == (undefined4 *)0x0" identifier == (cast_expression "(undefined4 *)0x0" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    return 0;\n  }" { (return_statement "return 0;" return number_literal ;) })) (expression_statement "iVar2 = 0;" (assignment_expression "iVar2 = 0" identifier = number_literal) ;) (if_statement "if ((*(byte *)(param_1[0x18] + param_2 * 0x28 + -0x20) & 1) == 0) {\n    uVar1 = *param_1;\n    iVar2 = FUN_00028410();\n    if (iVar2 != 0) {\n      *(undefined4 *)(iVar2 + 0x20) = uVar1;\n      *(undefined2 *)(iVar2 + 8) = 1;\n      FUN_000491f0();\n      FUN_00051490();\n      return iVar2;\n    }\n  }" if (parenthesized_expression "((*(byte *)(param_1[0x18] + param_2 * 0x28 + -0x20) & 1) == 0)" ( (binary_expression "(*(byte *)(param_1[0x18] + param_2 * 0x28 + -0x20) & 1) == 0" (parenthesized_expression "(*(byte *)(param_1[0x18] + param_2 * 0x28 + -0x20) & 1)" ( (binary_expression "*(byte *)(param_1[0x18] + param_2 * 0x28 + -0x20) & 1" (pointer_expression "*(byte *)(param_1[0x18] + param_2 * 0x28 + -0x20)" * (cast_expression "(byte *)(param_1[0x18] + param_2 * 0x28 + -0x20)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1[0x18] + param_2 * 0x28 + -0x20)" ( (binary_expression "param_1[0x18] + param_2 * 0x28 + -0x20" (binary_expression "param_1[0x18] + param_2 * 0x28" (subscript_expression "param_1[0x18]" identifier [ number_literal ]) + (binary_expression "param_2 * 0x28" identifier * number_literal)) + number_literal) )))) & number_literal) )) == number_literal) )) (compound_statement "{\n    uVar1 = *param_1;\n    iVar2 = FUN_00028410();\n    if (iVar2 != 0) {\n      *(undefined4 *)(iVar2 + 0x20) = uVar1;\n      *(undefined2 *)(iVar2 + 8) = 1;\n      FUN_000491f0();\n      FUN_00051490();\n      return iVar2;\n    }\n  }" { (expression_statement "uVar1 = *param_1;" (assignment_expression "uVar1 = *param_1" identifier = (pointer_expression "*param_1" * identifier)) ;) (expression_statement "iVar2 = FUN_00028410();" (assignment_expression "iVar2 = FUN_00028410()" identifier = (call_expression "FUN_00028410()" identifier (argument_list "()" ( )))) ;) (if_statement "if (iVar2 != 0) {\n      *(undefined4 *)(iVar2 + 0x20) = uVar1;\n      *(undefined2 *)(iVar2 + 8) = 1;\n      FUN_000491f0();\n      FUN_00051490();\n      return iVar2;\n    }" if (parenthesized_expression "(iVar2 != 0)" ( (binary_expression "iVar2 != 0" identifier != number_literal) )) (compound_statement "{\n      *(undefined4 *)(iVar2 + 0x20) = uVar1;\n      *(undefined2 *)(iVar2 + 8) = 1;\n      FUN_000491f0();\n      FUN_00051490();\n      return iVar2;\n    }" { (expression_statement "*(undefined4 *)(iVar2 + 0x20) = uVar1;" (assignment_expression "*(undefined4 *)(iVar2 + 0x20) = uVar1" (pointer_expression "*(undefined4 *)(iVar2 + 0x20)" * (cast_expression "(undefined4 *)(iVar2 + 0x20)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar2 + 0x20)" ( (binary_expression "iVar2 + 0x20" identifier + number_literal) )))) = identifier) ;) (expression_statement "*(undefined2 *)(iVar2 + 8) = 1;" (assignment_expression "*(undefined2 *)(iVar2 + 8) = 1" (pointer_expression "*(undefined2 *)(iVar2 + 8)" * (cast_expression "(undefined2 *)(iVar2 + 8)" ( (type_descriptor "undefined2 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar2 + 8)" ( (binary_expression "iVar2 + 8" identifier + number_literal) )))) = number_literal) ;) (expression_statement "FUN_000491f0();" (call_expression "FUN_000491f0()" identifier (argument_list "()" ( ))) ;) (expression_statement "FUN_00051490();" (call_expression "FUN_00051490()" identifier (argument_list "()" ( ))) ;) (return_statement "return iVar2;" return identifier ;) })) })) (return_statement "return iVar2;" return identifier ;) })))
(translation_unit (function_definition TYPE (ERROR IDENT) (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE (pointer_declarator * IDENT)) , (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) (compound_statement { (return_statement return LIT ;) })) (expression_statement (assignment_expression IDENT = LIT) ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (binary_expression (subscript_expression IDENT [ LIT ]) + (binary_expression IDENT * LIT)) + LIT) )))) & LIT) )) == LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (pointer_expression * IDENT)) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = IDENT) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = LIT) ;) (expression_statement (call_expression IDENT (argument_list ( ))) ;) (expression_statement (call_expression IDENT (argument_list ( ))) ;) (return_statement return IDENT ;) })) })) (return_statement return IDENT ;) })))
(function_definition "int __regparm3 FUN_00051600(undefined4 *param_1,int param_2)\n\n{\n  undefined4 uVar1;\n  int iVar2;\n  \n  if (param_1 == (undefined4 *)0x0) {\n    return 0;\n  }\n  iVar2 = 0;\n  if ((*(byte *)(param_1[0x18] + param_2 * 0x28 + -0x20) & 1) == 0) {\n    uVar1 = *param_1;\n    iVar2 = FUN_00028410();\n    if (iVar2 != 0) {\n      *(undefined4 *)(iVar2 + 0x20) = uVar1;\n      *(undefined2 *)(iVar2 + 8) = 1;\n      FUN_000491f0();\n      FUN_00051490();\n      return iVar2;\n    }\n  }\n  return iVar2;\n}" (primitive_type "int") (ERROR "__regparm3" (identifier "__regparm3")) (function_declarator "FUN_00051600(undefined4 *param_1,int param_2)" (identifier "FUN_00051600") (parameter_list "(undefined4 *param_1,int param_2)" (( "(") (parameter_declaration "undefined4 *param_1" (type_identifier "undefined4") (pointer_declarator "*param_1" (* "*") (identifier "param_1"))) (, ",") (parameter_declaration "int param_2" (primitive_type "int") (identifier "param_2")) () ")"))) (compound_statement "{\n  undefined4 uVar1;\n  int iVar2;\n  \n  if (param_1 == (undefined4 *)0x0) {\n    return 0;\n  }\n  iVar2 = 0;\n  if ((*(byte *)(param_1[0x18] + param_2 * 0x28 + -0x20) & 1) == 0) {\n    uVar1 = *param_1;\n    iVar2 = FUN_00028410();\n    if (iVar2 != 0) {\n      *(undefined4 *)(iVar2 + 0x20) = uVar1;\n      *(undefined2 *)(iVar2 + 8) = 1;\n      FUN_000491f0();\n      FUN_00051490();\n      return iVar2;\n    }\n  }\n  return iVar2;\n}" ({ "{") (declaration "undefined4 uVar1;" (type_identifier "undefined4") (identifier "uVar1") (; ";")) (declaration "int iVar2;" (primitive_type "int") (identifier "iVar2") (; ";")) (if_statement "if (param_1 == (undefined4 *)0x0) {\n    return 0;\n  }" (if "if") (parenthesized_expression "(param_1 == (undefined4 *)0x0)" (( "(") (binary_expression "param_1 == (undefined4 *)0x0" (identifier "param_1") (== "==") (cast_expression "(undefined4 *)0x0" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\n    return 0;\n  }" ({ "{") (return_statement "return 0;" (return "return") (number_literal "0") (; ";")) (} "}"))) (expression_statement "iVar2 = 0;" (assignment_expression "iVar2 = 0" (identifier "iVar2") (= "=") (number_literal "0")) (; ";")) (if_statement "if ((*(byte *)(param_1[0x18] + param_2 * 0x28 + -0x20) & 1) == 0) {\n    uVar1 = *param_1;\n    iVar2 = FUN_00028410();\n    if (iVar2 != 0) {\n      *(undefined4 *)(iVar2 + 0x20) = uVar1;\n      *(undefined2 *)(iVar2 + 8) = 1;\n      FUN_000491f0();\n      FUN_00051490();\n      return iVar2;\n    }\n  }" (if "if") (parenthesized_expression "((*(byte *)(param_1[0x18] + param_2 * 0x28 + -0x20) & 1) == 0)" (( "(") (binary_expression "(*(byte *)(param_1[0x18] + param_2 * 0x28 + -0x20) & 1) == 0" (parenthesized_expression "(*(byte *)(param_1[0x18] + param_2 * 0x28 + -0x20) & 1)" (( "(") (binary_expression "*(byte *)(param_1[0x18] + param_2 * 0x28 + -0x20) & 1" (pointer_expression "*(byte *)(param_1[0x18] + param_2 * 0x28 + -0x20)" (* "*") (cast_expression "(byte *)(param_1[0x18] + param_2 * 0x28 + -0x20)" (( "(") (type_descriptor "byte *" (type_identifier "byte") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1[0x18] + param_2 * 0x28 + -0x20)" (( "(") (binary_expression "param_1[0x18] + param_2 * 0x28 + -0x20" (binary_expression "param_1[0x18] + param_2 * 0x28" (subscript_expression "param_1[0x18]" (identifier "param_1") ([ "[") (number_literal "0x18") (] "]")) (+ "+") (binary_expression "param_2 * 0x28" (identifier "param_2") (* "*") (number_literal "0x28"))) (+ "+") (number_literal "-0x20")) () ")")))) (& "&") (number_literal "1")) () ")")) (== "==") (number_literal "0")) () ")")) (compound_statement "{\n    uVar1 = *param_1;\n    iVar2 = FUN_00028410();\n    if (iVar2 != 0) {\n      *(undefined4 *)(iVar2 + 0x20) = uVar1;\n      *(undefined2 *)(iVar2 + 8) = 1;\n      FUN_000491f0();\n      FUN_00051490();\n      return iVar2;\n    }\n  }" ({ "{") (expression_statement "uVar1 = *param_1;" (assignment_expression "uVar1 = *param_1" (identifier "uVar1") (= "=") (pointer_expression "*param_1" (* "*") (identifier "param_1"))) (; ";")) (expression_statement "iVar2 = FUN_00028410();" (assignment_expression "iVar2 = FUN_00028410()" (identifier "iVar2") (= "=") (call_expression "FUN_00028410()" (identifier "FUN_00028410") (argument_list "()" (( "(") () ")")))) (; ";")) (if_statement "if (iVar2 != 0) {\n      *(undefined4 *)(iVar2 + 0x20) = uVar1;\n      *(undefined2 *)(iVar2 + 8) = 1;\n      FUN_000491f0();\n      FUN_00051490();\n      return iVar2;\n    }" (if "if") (parenthesized_expression "(iVar2 != 0)" (( "(") (binary_expression "iVar2 != 0" (identifier "iVar2") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n      *(undefined4 *)(iVar2 + 0x20) = uVar1;\n      *(undefined2 *)(iVar2 + 8) = 1;\n      FUN_000491f0();\n      FUN_00051490();\n      return iVar2;\n    }" ({ "{") (expression_statement "*(undefined4 *)(iVar2 + 0x20) = uVar1;" (assignment_expression "*(undefined4 *)(iVar2 + 0x20) = uVar1" (pointer_expression "*(undefined4 *)(iVar2 + 0x20)" (* "*") (cast_expression "(undefined4 *)(iVar2 + 0x20)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar2 + 0x20)" (( "(") (binary_expression "iVar2 + 0x20" (identifier "iVar2") (+ "+") (number_literal "0x20")) () ")")))) (= "=") (identifier "uVar1")) (; ";")) (expression_statement "*(undefined2 *)(iVar2 + 8) = 1;" (assignment_expression "*(undefined2 *)(iVar2 + 8) = 1" (pointer_expression "*(undefined2 *)(iVar2 + 8)" (* "*") (cast_expression "(undefined2 *)(iVar2 + 8)" (( "(") (type_descriptor "undefined2 *" (type_identifier "undefined2") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar2 + 8)" (( "(") (binary_expression "iVar2 + 8" (identifier "iVar2") (+ "+") (number_literal "8")) () ")")))) (= "=") (number_literal "1")) (; ";")) (expression_statement "FUN_000491f0();" (call_expression "FUN_000491f0()" (identifier "FUN_000491f0") (argument_list "()" (( "(") () ")"))) (; ";")) (expression_statement "FUN_00051490();" (call_expression "FUN_00051490()" (identifier "FUN_00051490") (argument_list "()" (( "(") () ")"))) (; ";")) (return_statement "return iVar2;" (return "return") (identifier "iVar2") (; ";")) (} "}"))) (} "}"))) (return_statement "return iVar2;" (return "return") (identifier "iVar2") (; ";")) (} "}")))

type_5 * __regparm3 sqlite3VdbeGetBoundValue(type_4 *var_1,int var_2,u8 aff)

{
  type_1 *var_7;
  type_2 *db;
  type_3 unaff_EBX;
  type_1 *var_5;
  type_3 unaff_ESI;
  
  if (var_1 == (type_4 *)0x0) {
    return (type_5 *)0x0;
  }
  var_7 = var_1->aVar;
  var_5 = (type_5 *)0x0;
  if ((var_7[var_2 + -1].flags & 1) == 0) {
    db = var_1->db;
    var_5 = (type_1 *)var_3(db,var_4(unaff_ESI,unaff_EBX));
    if (var_5 != (type_1 *)0x0) {
      var_5->db = db;
      var_5->flags = 1;
      var_6(var_5,var_7 + var_2 + -1);
      var_8(var_5,'A','\x01');
      return var_5;
    }
  }
  return var_5;
}


(translation_unit (function_definition type: (primitive_type) (ERROR (identifier)) declarator: (function_declarator declarator: (identifier) parameters: (parameter_list (parameter_declaration type: (type_identifier) declarator: (pointer_declarator declarator: (identifier))) (parameter_declaration type: (primitive_type) declarator: (identifier)))) body: (compound_statement (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (primitive_type) declarator: (identifier)) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (number_literal)))) consequence: (compound_statement (return_statement (number_literal)))) (expression_statement (assignment_expression left: (identifier) right: (number_literal))) (if_statement condition: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (binary_expression left: (subscript_expression argument: (identifier) index: (number_literal)) right: (binary_expression left: (identifier) right: (number_literal))) right: (number_literal))))) right: (number_literal))) right: (number_literal))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (pointer_expression argument: (identifier)))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list)))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (expression_statement (assignment_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) right: (identifier))) (expression_statement (assignment_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) right: (number_literal))) (expression_statement (call_expression function: (identifier) arguments: (argument_list))) (expression_statement (call_expression function: (identifier) arguments: (argument_list))) (return_statement (identifier)))))) (return_statement (identifier)))))

int __regparm3 MASKED(undefined4 *param_1,int param_2)

{
  undefined4 uVar1;
  int iVar2;
  
  if (param_1 == (undefined4 *)0x0) {
    return 0;
  }
  iVar2 = 0;
  if ((*(byte *)(param_1[0x18] + param_2 * 0x28 + -0x20) & 1) == 0) {
    uVar1 = *param_1;
    iVar2 = FUN_00028410();
    if (iVar2 != 0) {
      *(undefined4 *)(iVar2 + 0x20) = uVar1;
      *(undefined2 *)(iVar2 + 8) = 1;
      FUN_000491f0();
      FUN_00051490();
      return iVar2;
    }
  }
  return iVar2;
}

