
/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */
/* DWARF original prototype: int fts3SegReaderCursorAppend(Fts3MultiSegReader * pCsr, Fts3SegReader
   * pNew, Fts3MultiSegReader * pCsr) */

int __regparm3
fts3SegReaderCursorAppend(Fts3MultiSegReader *pCsr,Fts3SegReader *pNew,Fts3MultiSegReader *pCsr_1)

{
  Fts3SegReader **pOld;
  uint uVar1;
  
  uVar1 = pNew->iIdx;
  pOld = pCsr->apSegment;
  if ((uVar1 & 0xf) == 0) {
    pOld = (Fts3SegReader **)sqlite3_realloc64(pOld,(ulonglong)(uVar1 * 4 + 0x40));
    if (pOld == (Fts3SegReader **)0x0) {
      sqlite3Fts3SegReaderFree((Fts3SegReader *)pCsr_1);
      return 7;
    }
    pCsr->apSegment = pOld;
    uVar1 = pNew->iIdx;
  }
  pNew->iIdx = uVar1 + 1;
  pOld[uVar1] = (Fts3SegReader *)pCsr_1;
  return 0;
}



/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */

undefined4 __regparm3 FUN_0008d0e0(int *param_1,uint *param_2,undefined4 param_3)

{
  int iVar1;
  uint uVar2;
  
  uVar2 = *param_2;
  iVar1 = *param_1;
  if ((uVar2 & 0xf) == 0) {
    iVar1 = FUN_00045d10(iVar1,uVar2 * 4 + 0x40,0);
    if (iVar1 == 0) {
      FUN_0008d080();
      return 7;
    }
    *param_1 = iVar1;
    uVar2 = *param_2;
  }
  *param_2 = uVar2 + 1;
  *(undefined4 *)(iVar1 + uVar2 * 4) = param_3;
  return 0;
}


PUSH EBP
MOV EBP,ECX
PUSH EDI
MOV EDI,EAX
PUSH ESI
MOV ESI,EDX
PUSH EBX
CALL 0x00014d20
ADD EBX,0xbdde5
SUB ESP,0xc
MOV EDX,dword ptr [EDX]
MOV EAX,dword ptr [EAX]
TEST DL,0xf
JZ 0x0008d118
LEA ECX,[EDX + 0x1]
MOV dword ptr [ESI],ECX
MOV dword ptr [EAX + EDX*0x4],EBP
XOR EAX,EAX
ADD ESP,0xc
POP EBX
POP ESI
POP EDI
POP EBP
RET
LEA ECX,[EDX*0x4 + 0x40]
SUB ESP,0x4
MOV EDX,ECX
XOR ECX,ECX
PUSH ECX
PUSH EDX
PUSH EAX
CALL 0x00045d10
ADD ESP,0x10
TEST EAX,EAX
JZ 0x0008d140
MOV dword ptr [EDI],EAX
MOV EDX,dword ptr [ESI]
JMP 0x0008d101
MOV EAX,EBP
CALL 0x0008d080
MOV EAX,0x7
JMP 0x0008d10b
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nundefined4 __regparm3 FUN_0008d0e0(int *param_1,uint *param_2,undefined4 param_3)\n\n{\n  int iVar1;\n  uint uVar2;\n  \n  uVar2 = *param_2;\n  iVar1 = *param_1;\n  if ((uVar2 & 0xf) == 0) {\n    iVar1 = FUN_00045d10(iVar1,uVar2 * 4 + 0x40,0);\n    if (iVar1 == 0) {\n      FUN_0008d080();\n      return 7;\n    }\n    *param_1 = iVar1;\n    uVar2 = *param_2;\n  }\n  *param_2 = uVar2 + 1;\n  *(undefined4 *)(iVar1 + uVar2 * 4) = param_3;\n  return 0;\n}\n\n" comment (function_definition "undefined4 __regparm3 FUN_0008d0e0(int *param_1,uint *param_2,undefined4 param_3)\n\n{\n  int iVar1;\n  uint uVar2;\n  \n  uVar2 = *param_2;\n  iVar1 = *param_1;\n  if ((uVar2 & 0xf) == 0) {\n    iVar1 = FUN_00045d10(iVar1,uVar2 * 4 + 0x40,0);\n    if (iVar1 == 0) {\n      FUN_0008d080();\n      return 7;\n    }\n    *param_1 = iVar1;\n    uVar2 = *param_2;\n  }\n  *param_2 = uVar2 + 1;\n  *(undefined4 *)(iVar1 + uVar2 * 4) = param_3;\n  return 0;\n}" type_identifier (ERROR "__regparm3" identifier) (function_declarator "FUN_0008d0e0(int *param_1,uint *param_2,undefined4 param_3)" identifier (parameter_list "(int *param_1,uint *param_2,undefined4 param_3)" ( (parameter_declaration "int *param_1" primitive_type (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "uint *param_2" type_identifier (pointer_declarator "*param_2" * identifier)) , (parameter_declaration "undefined4 param_3" type_identifier identifier) ))) (compound_statement "{\n  int iVar1;\n  uint uVar2;\n  \n  uVar2 = *param_2;\n  iVar1 = *param_1;\n  if ((uVar2 & 0xf) == 0) {\n    iVar1 = FUN_00045d10(iVar1,uVar2 * 4 + 0x40,0);\n    if (iVar1 == 0) {\n      FUN_0008d080();\n      return 7;\n    }\n    *param_1 = iVar1;\n    uVar2 = *param_2;\n  }\n  *param_2 = uVar2 + 1;\n  *(undefined4 *)(iVar1 + uVar2 * 4) = param_3;\n  return 0;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "uint uVar2;" type_identifier identifier ;) (expression_statement "uVar2 = *param_2;" (assignment_expression "uVar2 = *param_2" identifier = (pointer_expression "*param_2" * identifier)) ;) (expression_statement "iVar1 = *param_1;" (assignment_expression "iVar1 = *param_1" identifier = (pointer_expression "*param_1" * identifier)) ;) (if_statement "if ((uVar2 & 0xf) == 0) {\n    iVar1 = FUN_00045d10(iVar1,uVar2 * 4 + 0x40,0);\n    if (iVar1 == 0) {\n      FUN_0008d080();\n      return 7;\n    }\n    *param_1 = iVar1;\n    uVar2 = *param_2;\n  }" if (parenthesized_expression "((uVar2 & 0xf) == 0)" ( (binary_expression "(uVar2 & 0xf) == 0" (parenthesized_expression "(uVar2 & 0xf)" ( (binary_expression "uVar2 & 0xf" identifier & number_literal) )) == number_literal) )) (compound_statement "{\n    iVar1 = FUN_00045d10(iVar1,uVar2 * 4 + 0x40,0);\n    if (iVar1 == 0) {\n      FUN_0008d080();\n      return 7;\n    }\n    *param_1 = iVar1;\n    uVar2 = *param_2;\n  }" { (expression_statement "iVar1 = FUN_00045d10(iVar1,uVar2 * 4 + 0x40,0);" (assignment_expression "iVar1 = FUN_00045d10(iVar1,uVar2 * 4 + 0x40,0)" identifier = (call_expression "FUN_00045d10(iVar1,uVar2 * 4 + 0x40,0)" identifier (argument_list "(iVar1,uVar2 * 4 + 0x40,0)" ( identifier , (binary_expression "uVar2 * 4 + 0x40" (binary_expression "uVar2 * 4" identifier * number_literal) + number_literal) , number_literal )))) ;) (if_statement "if (iVar1 == 0) {\n      FUN_0008d080();\n      return 7;\n    }" if (parenthesized_expression "(iVar1 == 0)" ( (binary_expression "iVar1 == 0" identifier == number_literal) )) (compound_statement "{\n      FUN_0008d080();\n      return 7;\n    }" { (expression_statement "FUN_0008d080();" (call_expression "FUN_0008d080()" identifier (argument_list "()" ( ))) ;) (return_statement "return 7;" return number_literal ;) })) (expression_statement "*param_1 = iVar1;" (assignment_expression "*param_1 = iVar1" (pointer_expression "*param_1" * identifier) = identifier) ;) (expression_statement "uVar2 = *param_2;" (assignment_expression "uVar2 = *param_2" identifier = (pointer_expression "*param_2" * identifier)) ;) })) (expression_statement "*param_2 = uVar2 + 1;" (assignment_expression "*param_2 = uVar2 + 1" (pointer_expression "*param_2" * identifier) = (binary_expression "uVar2 + 1" identifier + number_literal)) ;) (expression_statement "*(undefined4 *)(iVar1 + uVar2 * 4) = param_3;" (assignment_expression "*(undefined4 *)(iVar1 + uVar2 * 4) = param_3" (pointer_expression "*(undefined4 *)(iVar1 + uVar2 * 4)" * (cast_expression "(undefined4 *)(iVar1 + uVar2 * 4)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + uVar2 * 4)" ( (binary_expression "iVar1 + uVar2 * 4" identifier + (binary_expression "uVar2 * 4" identifier * number_literal)) )))) = identifier) ;) (return_statement "return 0;" return number_literal ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n/* DWARF original prototype: int fts3SegReaderCursorAppend(Fts3MultiSegReader * pCsr, Fts3SegReader\n   * pNew, Fts3MultiSegReader * pCsr) */\n\nint __regparm3\nfts3SegReaderCursorAppend(Fts3MultiSegReader *pCsr,Fts3SegReader *pNew,Fts3MultiSegReader *pCsr_1)\n\n{\n  Fts3SegReader **pOld;\n  uint uVar1;\n  \n  uVar1 = pNew->iIdx;\n  pOld = pCsr->apSegment;\n  if ((uVar1 & 0xf) == 0) {\n    pOld = (Fts3SegReader **)sqlite3_realloc64(pOld,(ulonglong)(uVar1 * 4 + 0x40));\n    if (pOld == (Fts3SegReader **)0x0) {\n      sqlite3Fts3SegReaderFree((Fts3SegReader *)pCsr_1);\n      return 7;\n    }\n    pCsr->apSegment = pOld;\n    uVar1 = pNew->iIdx;\n  }\n  pNew->iIdx = uVar1 + 1;\n  pOld[uVar1] = (Fts3SegReader *)pCsr_1;\n  return 0;\n}\n\n" comment comment (function_definition "int __regparm3\nfts3SegReaderCursorAppend(Fts3MultiSegReader *pCsr,Fts3SegReader *pNew,Fts3MultiSegReader *pCsr_1)\n\n{\n  Fts3SegReader **pOld;\n  uint uVar1;\n  \n  uVar1 = pNew->iIdx;\n  pOld = pCsr->apSegment;\n  if ((uVar1 & 0xf) == 0) {\n    pOld = (Fts3SegReader **)sqlite3_realloc64(pOld,(ulonglong)(uVar1 * 4 + 0x40));\n    if (pOld == (Fts3SegReader **)0x0) {\n      sqlite3Fts3SegReaderFree((Fts3SegReader *)pCsr_1);\n      return 7;\n    }\n    pCsr->apSegment = pOld;\n    uVar1 = pNew->iIdx;\n  }\n  pNew->iIdx = uVar1 + 1;\n  pOld[uVar1] = (Fts3SegReader *)pCsr_1;\n  return 0;\n}" primitive_type (ERROR "__regparm3" identifier) (function_declarator "fts3SegReaderCursorAppend(Fts3MultiSegReader *pCsr,Fts3SegReader *pNew,Fts3MultiSegReader *pCsr_1)" identifier (parameter_list "(Fts3MultiSegReader *pCsr,Fts3SegReader *pNew,Fts3MultiSegReader *pCsr_1)" ( (parameter_declaration "Fts3MultiSegReader *pCsr" type_identifier (pointer_declarator "*pCsr" * identifier)) , (parameter_declaration "Fts3SegReader *pNew" type_identifier (pointer_declarator "*pNew" * identifier)) , (parameter_declaration "Fts3MultiSegReader *pCsr_1" type_identifier (pointer_declarator "*pCsr_1" * identifier)) ))) (compound_statement "{\n  Fts3SegReader **pOld;\n  uint uVar1;\n  \n  uVar1 = pNew->iIdx;\n  pOld = pCsr->apSegment;\n  if ((uVar1 & 0xf) == 0) {\n    pOld = (Fts3SegReader **)sqlite3_realloc64(pOld,(ulonglong)(uVar1 * 4 + 0x40));\n    if (pOld == (Fts3SegReader **)0x0) {\n      sqlite3Fts3SegReaderFree((Fts3SegReader *)pCsr_1);\n      return 7;\n    }\n    pCsr->apSegment = pOld;\n    uVar1 = pNew->iIdx;\n  }\n  pNew->iIdx = uVar1 + 1;\n  pOld[uVar1] = (Fts3SegReader *)pCsr_1;\n  return 0;\n}" { (declaration "Fts3SegReader **pOld;" type_identifier (pointer_declarator "**pOld" * (pointer_declarator "*pOld" * identifier)) ;) (declaration "uint uVar1;" type_identifier identifier ;) (expression_statement "uVar1 = pNew->iIdx;" (assignment_expression "uVar1 = pNew->iIdx" identifier = (field_expression "pNew->iIdx" identifier -> field_identifier)) ;) (expression_statement "pOld = pCsr->apSegment;" (assignment_expression "pOld = pCsr->apSegment" identifier = (field_expression "pCsr->apSegment" identifier -> field_identifier)) ;) (if_statement "if ((uVar1 & 0xf) == 0) {\n    pOld = (Fts3SegReader **)sqlite3_realloc64(pOld,(ulonglong)(uVar1 * 4 + 0x40));\n    if (pOld == (Fts3SegReader **)0x0) {\n      sqlite3Fts3SegReaderFree((Fts3SegReader *)pCsr_1);\n      return 7;\n    }\n    pCsr->apSegment = pOld;\n    uVar1 = pNew->iIdx;\n  }" if (parenthesized_expression "((uVar1 & 0xf) == 0)" ( (binary_expression "(uVar1 & 0xf) == 0" (parenthesized_expression "(uVar1 & 0xf)" ( (binary_expression "uVar1 & 0xf" identifier & number_literal) )) == number_literal) )) (compound_statement "{\n    pOld = (Fts3SegReader **)sqlite3_realloc64(pOld,(ulonglong)(uVar1 * 4 + 0x40));\n    if (pOld == (Fts3SegReader **)0x0) {\n      sqlite3Fts3SegReaderFree((Fts3SegReader *)pCsr_1);\n      return 7;\n    }\n    pCsr->apSegment = pOld;\n    uVar1 = pNew->iIdx;\n  }" { (expression_statement "pOld = (Fts3SegReader **)sqlite3_realloc64(pOld,(ulonglong)(uVar1 * 4 + 0x40));" (assignment_expression "pOld = (Fts3SegReader **)sqlite3_realloc64(pOld,(ulonglong)(uVar1 * 4 + 0x40))" identifier = (cast_expression "(Fts3SegReader **)sqlite3_realloc64(pOld,(ulonglong)(uVar1 * 4 + 0x40))" ( (type_descriptor "Fts3SegReader **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (call_expression "sqlite3_realloc64(pOld,(ulonglong)(uVar1 * 4 + 0x40))" identifier (argument_list "(pOld,(ulonglong)(uVar1 * 4 + 0x40))" ( identifier , (call_expression "(ulonglong)(uVar1 * 4 + 0x40)" (parenthesized_expression "(ulonglong)" ( identifier )) (argument_list "(uVar1 * 4 + 0x40)" ( (binary_expression "uVar1 * 4 + 0x40" (binary_expression "uVar1 * 4" identifier * number_literal) + number_literal) ))) ))))) ;) (if_statement "if (pOld == (Fts3SegReader **)0x0) {\n      sqlite3Fts3SegReaderFree((Fts3SegReader *)pCsr_1);\n      return 7;\n    }" if (parenthesized_expression "(pOld == (Fts3SegReader **)0x0)" ( (binary_expression "pOld == (Fts3SegReader **)0x0" identifier == (cast_expression "(Fts3SegReader **)0x0" ( (type_descriptor "Fts3SegReader **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) number_literal)) )) (compound_statement "{\n      sqlite3Fts3SegReaderFree((Fts3SegReader *)pCsr_1);\n      return 7;\n    }" { (expression_statement "sqlite3Fts3SegReaderFree((Fts3SegReader *)pCsr_1);" (call_expression "sqlite3Fts3SegReaderFree((Fts3SegReader *)pCsr_1)" identifier (argument_list "((Fts3SegReader *)pCsr_1)" ( (cast_expression "(Fts3SegReader *)pCsr_1" ( (type_descriptor "Fts3SegReader *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier) ))) ;) (return_statement "return 7;" return number_literal ;) })) (expression_statement "pCsr->apSegment = pOld;" (assignment_expression "pCsr->apSegment = pOld" (field_expression "pCsr->apSegment" identifier -> field_identifier) = identifier) ;) (expression_statement "uVar1 = pNew->iIdx;" (assignment_expression "uVar1 = pNew->iIdx" identifier = (field_expression "pNew->iIdx" identifier -> field_identifier)) ;) })) (expression_statement "pNew->iIdx = uVar1 + 1;" (assignment_expression "pNew->iIdx = uVar1 + 1" (field_expression "pNew->iIdx" identifier -> field_identifier) = (binary_expression "uVar1 + 1" identifier + number_literal)) ;) (expression_statement "pOld[uVar1] = (Fts3SegReader *)pCsr_1;" (assignment_expression "pOld[uVar1] = (Fts3SegReader *)pCsr_1" (subscript_expression "pOld[uVar1]" identifier [ identifier ]) = (cast_expression "(Fts3SegReader *)pCsr_1" ( (type_descriptor "Fts3SegReader *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) ;) (return_statement "return 0;" return number_literal ;) })))
(translation_unit "undefined4 __regparm3 FUN_0008d0e0(int *param_1,uint *param_2,undefined4 param_3)\n\n{\n  int iVar1;\n  uint uVar2;\n  \n  uVar2 = *param_2;\n  iVar1 = *param_1;\n  if ((uVar2 & 0xf) == 0) {\n    iVar1 = FUN_00045d10(iVar1,uVar2 * 4 + 0x40,0);\n    if (iVar1 == 0) {\n      FUN_0008d080();\n      return 7;\n    }\n    *param_1 = iVar1;\n    uVar2 = *param_2;\n  }\n  *param_2 = uVar2 + 1;\n  *(undefined4 *)(iVar1 + uVar2 * 4) = param_3;\n  return 0;\n}\n\n" (function_definition "undefined4 __regparm3 FUN_0008d0e0(int *param_1,uint *param_2,undefined4 param_3)\n\n{\n  int iVar1;\n  uint uVar2;\n  \n  uVar2 = *param_2;\n  iVar1 = *param_1;\n  if ((uVar2 & 0xf) == 0) {\n    iVar1 = FUN_00045d10(iVar1,uVar2 * 4 + 0x40,0);\n    if (iVar1 == 0) {\n      FUN_0008d080();\n      return 7;\n    }\n    *param_1 = iVar1;\n    uVar2 = *param_2;\n  }\n  *param_2 = uVar2 + 1;\n  *(undefined4 *)(iVar1 + uVar2 * 4) = param_3;\n  return 0;\n}" type_identifier (ERROR "__regparm3" identifier) (function_declarator "FUN_0008d0e0(int *param_1,uint *param_2,undefined4 param_3)" identifier (parameter_list "(int *param_1,uint *param_2,undefined4 param_3)" ( (parameter_declaration "int *param_1" primitive_type (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "uint *param_2" type_identifier (pointer_declarator "*param_2" * identifier)) , (parameter_declaration "undefined4 param_3" type_identifier identifier) ))) (compound_statement "{\n  int iVar1;\n  uint uVar2;\n  \n  uVar2 = *param_2;\n  iVar1 = *param_1;\n  if ((uVar2 & 0xf) == 0) {\n    iVar1 = FUN_00045d10(iVar1,uVar2 * 4 + 0x40,0);\n    if (iVar1 == 0) {\n      FUN_0008d080();\n      return 7;\n    }\n    *param_1 = iVar1;\n    uVar2 = *param_2;\n  }\n  *param_2 = uVar2 + 1;\n  *(undefined4 *)(iVar1 + uVar2 * 4) = param_3;\n  return 0;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "uint uVar2;" type_identifier identifier ;) (expression_statement "uVar2 = *param_2;" (assignment_expression "uVar2 = *param_2" identifier = (pointer_expression "*param_2" * identifier)) ;) (expression_statement "iVar1 = *param_1;" (assignment_expression "iVar1 = *param_1" identifier = (pointer_expression "*param_1" * identifier)) ;) (if_statement "if ((uVar2 & 0xf) == 0) {\n    iVar1 = FUN_00045d10(iVar1,uVar2 * 4 + 0x40,0);\n    if (iVar1 == 0) {\n      FUN_0008d080();\n      return 7;\n    }\n    *param_1 = iVar1;\n    uVar2 = *param_2;\n  }" if (parenthesized_expression "((uVar2 & 0xf) == 0)" ( (binary_expression "(uVar2 & 0xf) == 0" (parenthesized_expression "(uVar2 & 0xf)" ( (binary_expression "uVar2 & 0xf" identifier & number_literal) )) == number_literal) )) (compound_statement "{\n    iVar1 = FUN_00045d10(iVar1,uVar2 * 4 + 0x40,0);\n    if (iVar1 == 0) {\n      FUN_0008d080();\n      return 7;\n    }\n    *param_1 = iVar1;\n    uVar2 = *param_2;\n  }" { (expression_statement "iVar1 = FUN_00045d10(iVar1,uVar2 * 4 + 0x40,0);" (assignment_expression "iVar1 = FUN_00045d10(iVar1,uVar2 * 4 + 0x40,0)" identifier = (call_expression "FUN_00045d10(iVar1,uVar2 * 4 + 0x40,0)" identifier (argument_list "(iVar1,uVar2 * 4 + 0x40,0)" ( identifier , (binary_expression "uVar2 * 4 + 0x40" (binary_expression "uVar2 * 4" identifier * number_literal) + number_literal) , number_literal )))) ;) (if_statement "if (iVar1 == 0) {\n      FUN_0008d080();\n      return 7;\n    }" if (parenthesized_expression "(iVar1 == 0)" ( (binary_expression "iVar1 == 0" identifier == number_literal) )) (compound_statement "{\n      FUN_0008d080();\n      return 7;\n    }" { (expression_statement "FUN_0008d080();" (call_expression "FUN_0008d080()" identifier (argument_list "()" ( ))) ;) (return_statement "return 7;" return number_literal ;) })) (expression_statement "*param_1 = iVar1;" (assignment_expression "*param_1 = iVar1" (pointer_expression "*param_1" * identifier) = identifier) ;) (expression_statement "uVar2 = *param_2;" (assignment_expression "uVar2 = *param_2" identifier = (pointer_expression "*param_2" * identifier)) ;) })) (expression_statement "*param_2 = uVar2 + 1;" (assignment_expression "*param_2 = uVar2 + 1" (pointer_expression "*param_2" * identifier) = (binary_expression "uVar2 + 1" identifier + number_literal)) ;) (expression_statement "*(undefined4 *)(iVar1 + uVar2 * 4) = param_3;" (assignment_expression "*(undefined4 *)(iVar1 + uVar2 * 4) = param_3" (pointer_expression "*(undefined4 *)(iVar1 + uVar2 * 4)" * (cast_expression "(undefined4 *)(iVar1 + uVar2 * 4)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + uVar2 * 4)" ( (binary_expression "iVar1 + uVar2 * 4" identifier + (binary_expression "uVar2 * 4" identifier * number_literal)) )))) = identifier) ;) (return_statement "return 0;" return number_literal ;) })))
(translation_unit (function_definition TYPE (ERROR IDENT) (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE (pointer_declarator * IDENT)) , (parameter_declaration TYPE (pointer_declarator * IDENT)) , (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = (pointer_expression * IDENT)) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * IDENT)) ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT & LIT) )) == LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , (binary_expression (binary_expression IDENT * LIT) + LIT) , LIT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( ))) ;) (return_statement return LIT ;) })) (expression_statement (assignment_expression (pointer_expression * IDENT) = IDENT) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * IDENT)) ;) })) (expression_statement (assignment_expression (pointer_expression * IDENT) = (binary_expression IDENT + LIT)) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + (binary_expression IDENT * LIT)) )))) = IDENT) ;) (return_statement return LIT ;) })))
(function_definition "undefined4 __regparm3 FUN_0008d0e0(int *param_1,uint *param_2,undefined4 param_3)\n\n{\n  int iVar1;\n  uint uVar2;\n  \n  uVar2 = *param_2;\n  iVar1 = *param_1;\n  if ((uVar2 & 0xf) == 0) {\n    iVar1 = FUN_00045d10(iVar1,uVar2 * 4 + 0x40,0);\n    if (iVar1 == 0) {\n      FUN_0008d080();\n      return 7;\n    }\n    *param_1 = iVar1;\n    uVar2 = *param_2;\n  }\n  *param_2 = uVar2 + 1;\n  *(undefined4 *)(iVar1 + uVar2 * 4) = param_3;\n  return 0;\n}" (type_identifier "undefined4") (ERROR "__regparm3" (identifier "__regparm3")) (function_declarator "FUN_0008d0e0(int *param_1,uint *param_2,undefined4 param_3)" (identifier "FUN_0008d0e0") (parameter_list "(int *param_1,uint *param_2,undefined4 param_3)" (( "(") (parameter_declaration "int *param_1" (primitive_type "int") (pointer_declarator "*param_1" (* "*") (identifier "param_1"))) (, ",") (parameter_declaration "uint *param_2" (type_identifier "uint") (pointer_declarator "*param_2" (* "*") (identifier "param_2"))) (, ",") (parameter_declaration "undefined4 param_3" (type_identifier "undefined4") (identifier "param_3")) () ")"))) (compound_statement "{\n  int iVar1;\n  uint uVar2;\n  \n  uVar2 = *param_2;\n  iVar1 = *param_1;\n  if ((uVar2 & 0xf) == 0) {\n    iVar1 = FUN_00045d10(iVar1,uVar2 * 4 + 0x40,0);\n    if (iVar1 == 0) {\n      FUN_0008d080();\n      return 7;\n    }\n    *param_1 = iVar1;\n    uVar2 = *param_2;\n  }\n  *param_2 = uVar2 + 1;\n  *(undefined4 *)(iVar1 + uVar2 * 4) = param_3;\n  return 0;\n}" ({ "{") (declaration "int iVar1;" (primitive_type "int") (identifier "iVar1") (; ";")) (declaration "uint uVar2;" (type_identifier "uint") (identifier "uVar2") (; ";")) (expression_statement "uVar2 = *param_2;" (assignment_expression "uVar2 = *param_2" (identifier "uVar2") (= "=") (pointer_expression "*param_2" (* "*") (identifier "param_2"))) (; ";")) (expression_statement "iVar1 = *param_1;" (assignment_expression "iVar1 = *param_1" (identifier "iVar1") (= "=") (pointer_expression "*param_1" (* "*") (identifier "param_1"))) (; ";")) (if_statement "if ((uVar2 & 0xf) == 0) {\n    iVar1 = FUN_00045d10(iVar1,uVar2 * 4 + 0x40,0);\n    if (iVar1 == 0) {\n      FUN_0008d080();\n      return 7;\n    }\n    *param_1 = iVar1;\n    uVar2 = *param_2;\n  }" (if "if") (parenthesized_expression "((uVar2 & 0xf) == 0)" (( "(") (binary_expression "(uVar2 & 0xf) == 0" (parenthesized_expression "(uVar2 & 0xf)" (( "(") (binary_expression "uVar2 & 0xf" (identifier "uVar2") (& "&") (number_literal "0xf")) () ")")) (== "==") (number_literal "0")) () ")")) (compound_statement "{\n    iVar1 = FUN_00045d10(iVar1,uVar2 * 4 + 0x40,0);\n    if (iVar1 == 0) {\n      FUN_0008d080();\n      return 7;\n    }\n    *param_1 = iVar1;\n    uVar2 = *param_2;\n  }" ({ "{") (expression_statement "iVar1 = FUN_00045d10(iVar1,uVar2 * 4 + 0x40,0);" (assignment_expression "iVar1 = FUN_00045d10(iVar1,uVar2 * 4 + 0x40,0)" (identifier "iVar1") (= "=") (call_expression "FUN_00045d10(iVar1,uVar2 * 4 + 0x40,0)" (identifier "FUN_00045d10") (argument_list "(iVar1,uVar2 * 4 + 0x40,0)" (( "(") (identifier "iVar1") (, ",") (binary_expression "uVar2 * 4 + 0x40" (binary_expression "uVar2 * 4" (identifier "uVar2") (* "*") (number_literal "4")) (+ "+") (number_literal "0x40")) (, ",") (number_literal "0") () ")")))) (; ";")) (if_statement "if (iVar1 == 0) {\n      FUN_0008d080();\n      return 7;\n    }" (if "if") (parenthesized_expression "(iVar1 == 0)" (( "(") (binary_expression "iVar1 == 0" (identifier "iVar1") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n      FUN_0008d080();\n      return 7;\n    }" ({ "{") (expression_statement "FUN_0008d080();" (call_expression "FUN_0008d080()" (identifier "FUN_0008d080") (argument_list "()" (( "(") () ")"))) (; ";")) (return_statement "return 7;" (return "return") (number_literal "7") (; ";")) (} "}"))) (expression_statement "*param_1 = iVar1;" (assignment_expression "*param_1 = iVar1" (pointer_expression "*param_1" (* "*") (identifier "param_1")) (= "=") (identifier "iVar1")) (; ";")) (expression_statement "uVar2 = *param_2;" (assignment_expression "uVar2 = *param_2" (identifier "uVar2") (= "=") (pointer_expression "*param_2" (* "*") (identifier "param_2"))) (; ";")) (} "}"))) (expression_statement "*param_2 = uVar2 + 1;" (assignment_expression "*param_2 = uVar2 + 1" (pointer_expression "*param_2" (* "*") (identifier "param_2")) (= "=") (binary_expression "uVar2 + 1" (identifier "uVar2") (+ "+") (number_literal "1"))) (; ";")) (expression_statement "*(undefined4 *)(iVar1 + uVar2 * 4) = param_3;" (assignment_expression "*(undefined4 *)(iVar1 + uVar2 * 4) = param_3" (pointer_expression "*(undefined4 *)(iVar1 + uVar2 * 4)" (* "*") (cast_expression "(undefined4 *)(iVar1 + uVar2 * 4)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar1 + uVar2 * 4)" (( "(") (binary_expression "iVar1 + uVar2 * 4" (identifier "iVar1") (+ "+") (binary_expression "uVar2 * 4" (identifier "uVar2") (* "*") (number_literal "4"))) () ")")))) (= "=") (identifier "param_3")) (; ";")) (return_statement "return 0;" (return "return") (number_literal "0") (; ";")) (} "}")))

/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */
/* DWARF original prototype: int fts3SegReaderCursorAppend(Fts3MultiSegReader * pCsr, Fts3SegReader
   * pNew, Fts3MultiSegReader * pCsr) */

int __regparm3
function_1(type_1 *pCsr,type_2 *pNew,type_1 *pCsr_1)

{
  type_2 **var_3;
  type_3 var_1;
  
  var_1 = pNew->iIdx;
  var_3 = pCsr->apSegment;
  if ((var_1 & 0xf) == 0) {
    var_3 = (type_2 **)var_2(var_3,(ulonglong)(var_1 * 4 + 0x40));
    if (var_3 == (type_2 **)0x0) {
      var_4((type_2 *)pCsr_1);
      return 7;
    }
    pCsr->apSegment = var_3;
    var_1 = pNew->iIdx;
  }
  pNew->iIdx = var_1 + 1;
  var_3[var_1] = (type_2 *)pCsr_1;
  return 0;
}


(translation_unit (function_definition type: (type_identifier) (ERROR (identifier)) declarator: (function_declarator declarator: (identifier) parameters: (parameter_list (parameter_declaration type: (primitive_type) declarator: (pointer_declarator declarator: (identifier))) (parameter_declaration type: (type_identifier) declarator: (pointer_declarator declarator: (identifier))) (parameter_declaration type: (type_identifier) declarator: (identifier)))) body: (compound_statement (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (type_identifier) declarator: (identifier)) (expression_statement (assignment_expression left: (identifier) right: (pointer_expression argument: (identifier)))) (expression_statement (assignment_expression left: (identifier) right: (pointer_expression argument: (identifier)))) (if_statement condition: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) right: (number_literal))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (identifier) (binary_expression left: (binary_expression left: (identifier) right: (number_literal)) right: (number_literal)) (number_literal))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (expression_statement (call_expression function: (identifier) arguments: (argument_list))) (return_statement (number_literal)))) (expression_statement (assignment_expression left: (pointer_expression argument: (identifier)) right: (identifier))) (expression_statement (assignment_expression left: (identifier) right: (pointer_expression argument: (identifier)))))) (expression_statement (assignment_expression left: (pointer_expression argument: (identifier)) right: (binary_expression left: (identifier) right: (number_literal)))) (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: (binary_expression left: (identifier) right: (number_literal)))))) right: (identifier))) (return_statement (number_literal)))))

/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */

undefined4 __regparm3 MASKED(int *param_1,uint *param_2,undefined4 param_3)

{
  int iVar1;
  uint uVar2;
  
  uVar2 = *param_2;
  iVar1 = *param_1;
  if ((uVar2 & 0xf) == 0) {
    iVar1 = FUN_00045d10(iVar1,uVar2 * 4 + 0x40,0);
    if (iVar1 == 0) {
      FUN_0008d080();
      return 7;
    }
    *param_1 = iVar1;
    uVar2 = *param_2;
  }
  *param_2 = uVar2 + 1;
  *(undefined4 *)(iVar1 + uVar2 * 4) = param_3;
  return 0;
}

