
int __regparm3 sqlite3BtreeLast(BtCursor *pCur,int *pRes)

{
  int iVar1;
  
  if ((pCur->eState == '\0') && ((pCur->curFlags & 8) != 0)) {
    *pRes = 0;
    return 0;
  }
  iVar1 = moveToRoot(pCur);
  if (iVar1 != 0) {
    if (iVar1 == 0x10) {
      *pRes = 1;
      iVar1 = 0;
    }
    return iVar1;
  }
  *pRes = 0;
  iVar1 = moveToRightmost(pCur);
  if (iVar1 == 0) {
    pCur->curFlags = pCur->curFlags | 8;
    return 0;
  }
  pCur->curFlags = pCur->curFlags & 0xf7;
  return iVar1;
}



int __regparm3 FUN_0003a100(char *param_1,undefined4 *param_2)

{
  int iVar1;
  
  if ((*param_1 == '\0') && ((param_1[1] & 8U) != 0)) {
    *param_2 = 0;
    return 0;
  }
  iVar1 = FUN_00039f90();
  if (iVar1 != 0) {
    if (iVar1 == 0x10) {
      *param_2 = 1;
      iVar1 = 0;
    }
    return iVar1;
  }
  *param_2 = 0;
  iVar1 = FUN_00039c00();
  if (iVar1 == 0) {
    param_1[1] = param_1[1] | 8;
    return 0;
  }
  param_1[1] = param_1[1] & 0xf7;
  return iVar1;
}


CMP byte ptr [EAX],0x0
JNZ 0x0003a10b
TEST byte ptr [EAX + 0x1],0x8
JNZ 0x0003a130
PUSH ESI
PUSH EBX
MOV ESI,EDX
MOV EBX,EAX
SUB ESP,0x4
CALL 0x00039f90
TEST EAX,EAX
JZ 0x0003a140
CMP EAX,0x10
JNZ 0x0003a12a
MOV dword ptr [ESI],0x1
XOR EAX,EAX
ADD ESP,0x4
POP EBX
POP ESI
RET
MOV dword ptr [EDX],0x0
XOR EAX,EAX
RET
MOV dword ptr [ESI],0x0
MOV EAX,EBX
CALL 0x00039c00
TEST EAX,EAX
JNZ 0x0003a160
OR byte ptr [EBX + 0x1],0x8
ADD ESP,0x4
POP EBX
POP ESI
RET
AND byte ptr [EBX + 0x1],0xf7
ADD ESP,0x4
POP EBX
POP ESI
RET
(translation_unit "int __regparm3 FUN_0003a100(char *param_1,undefined4 *param_2)\n\n{\n  int iVar1;\n  \n  if ((*param_1 == '\0') && ((param_1[1] & 8U) != 0)) {\n    *param_2 = 0;\n    return 0;\n  }\n  iVar1 = FUN_00039f90();\n  if (iVar1 != 0) {\n    if (iVar1 == 0x10) {\n      *param_2 = 1;\n      iVar1 = 0;\n    }\n    return iVar1;\n  }\n  *param_2 = 0;\n  iVar1 = FUN_00039c00();\n  if (iVar1 == 0) {\n    param_1[1] = param_1[1] | 8;\n    return 0;\n  }\n  param_1[1] = param_1[1] & 0xf7;\n  return iVar1;\n}\n\n" (function_definition "int __regparm3 FUN_0003a100(char *param_1,undefined4 *param_2)\n\n{\n  int iVar1;\n  \n  if ((*param_1 == '\0') && ((param_1[1] & 8U) != 0)) {\n    *param_2 = 0;\n    return 0;\n  }\n  iVar1 = FUN_00039f90();\n  if (iVar1 != 0) {\n    if (iVar1 == 0x10) {\n      *param_2 = 1;\n      iVar1 = 0;\n    }\n    return iVar1;\n  }\n  *param_2 = 0;\n  iVar1 = FUN_00039c00();\n  if (iVar1 == 0) {\n    param_1[1] = param_1[1] | 8;\n    return 0;\n  }\n  param_1[1] = param_1[1] & 0xf7;\n  return iVar1;\n}" primitive_type (ERROR "__regparm3" identifier) (function_declarator "FUN_0003a100(char *param_1,undefined4 *param_2)" identifier (parameter_list "(char *param_1,undefined4 *param_2)" ( (parameter_declaration "char *param_1" primitive_type (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "undefined4 *param_2" type_identifier (pointer_declarator "*param_2" * identifier)) ))) (compound_statement "{\n  int iVar1;\n  \n  if ((*param_1 == '\0') && ((param_1[1] & 8U) != 0)) {\n    *param_2 = 0;\n    return 0;\n  }\n  iVar1 = FUN_00039f90();\n  if (iVar1 != 0) {\n    if (iVar1 == 0x10) {\n      *param_2 = 1;\n      iVar1 = 0;\n    }\n    return iVar1;\n  }\n  *param_2 = 0;\n  iVar1 = FUN_00039c00();\n  if (iVar1 == 0) {\n    param_1[1] = param_1[1] | 8;\n    return 0;\n  }\n  param_1[1] = param_1[1] & 0xf7;\n  return iVar1;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (if_statement "if ((*param_1 == '\0') && ((param_1[1] & 8U) != 0)) {\n    *param_2 = 0;\n    return 0;\n  }" if (parenthesized_expression "((*param_1 == '\0') && ((param_1[1] & 8U) != 0))" ( (binary_expression "(*param_1 == '\0') && ((param_1[1] & 8U) != 0)" (parenthesized_expression "(*param_1 == '\0')" ( (binary_expression "*param_1 == '\0'" (pointer_expression "*param_1" * identifier) == (char_literal "'\0'" ' escape_sequence ')) )) && (parenthesized_expression "((param_1[1] & 8U) != 0)" ( (binary_expression "(param_1[1] & 8U) != 0" (parenthesized_expression "(param_1[1] & 8U)" ( (binary_expression "param_1[1] & 8U" (subscript_expression "param_1[1]" identifier [ number_literal ]) & number_literal) )) != number_literal) ))) )) (compound_statement "{\n    *param_2 = 0;\n    return 0;\n  }" { (expression_statement "*param_2 = 0;" (assignment_expression "*param_2 = 0" (pointer_expression "*param_2" * identifier) = number_literal) ;) (return_statement "return 0;" return number_literal ;) })) (expression_statement "iVar1 = FUN_00039f90();" (assignment_expression "iVar1 = FUN_00039f90()" identifier = (call_expression "FUN_00039f90()" identifier (argument_list "()" ( )))) ;) (if_statement "if (iVar1 != 0) {\n    if (iVar1 == 0x10) {\n      *param_2 = 1;\n      iVar1 = 0;\n    }\n    return iVar1;\n  }" if (parenthesized_expression "(iVar1 != 0)" ( (binary_expression "iVar1 != 0" identifier != number_literal) )) (compound_statement "{\n    if (iVar1 == 0x10) {\n      *param_2 = 1;\n      iVar1 = 0;\n    }\n    return iVar1;\n  }" { (if_statement "if (iVar1 == 0x10) {\n      *param_2 = 1;\n      iVar1 = 0;\n    }" if (parenthesized_expression "(iVar1 == 0x10)" ( (binary_expression "iVar1 == 0x10" identifier == number_literal) )) (compound_statement "{\n      *param_2 = 1;\n      iVar1 = 0;\n    }" { (expression_statement "*param_2 = 1;" (assignment_expression "*param_2 = 1" (pointer_expression "*param_2" * identifier) = number_literal) ;) (expression_statement "iVar1 = 0;" (assignment_expression "iVar1 = 0" identifier = number_literal) ;) })) (return_statement "return iVar1;" return identifier ;) })) (expression_statement "*param_2 = 0;" (assignment_expression "*param_2 = 0" (pointer_expression "*param_2" * identifier) = number_literal) ;) (expression_statement "iVar1 = FUN_00039c00();" (assignment_expression "iVar1 = FUN_00039c00()" identifier = (call_expression "FUN_00039c00()" identifier (argument_list "()" ( )))) ;) (if_statement "if (iVar1 == 0) {\n    param_1[1] = param_1[1] | 8;\n    return 0;\n  }" if (parenthesized_expression "(iVar1 == 0)" ( (binary_expression "iVar1 == 0" identifier == number_literal) )) (compound_statement "{\n    param_1[1] = param_1[1] | 8;\n    return 0;\n  }" { (expression_statement "param_1[1] = param_1[1] | 8;" (assignment_expression "param_1[1] = param_1[1] | 8" (subscript_expression "param_1[1]" identifier [ number_literal ]) = (binary_expression "param_1[1] | 8" (subscript_expression "param_1[1]" identifier [ number_literal ]) | number_literal)) ;) (return_statement "return 0;" return number_literal ;) })) (expression_statement "param_1[1] = param_1[1] & 0xf7;" (assignment_expression "param_1[1] = param_1[1] & 0xf7" (subscript_expression "param_1[1]" identifier [ number_literal ]) = (binary_expression "param_1[1] & 0xf7" (subscript_expression "param_1[1]" identifier [ number_literal ]) & number_literal)) ;) (return_statement "return iVar1;" return identifier ;) })))
(translation_unit "int __regparm3 sqlite3BtreeLast(BtCursor *pCur,int *pRes)\n\n{\n  int iVar1;\n  \n  if ((pCur->eState == '\0') && ((pCur->curFlags & 8) != 0)) {\n    *pRes = 0;\n    return 0;\n  }\n  iVar1 = moveToRoot(pCur);\n  if (iVar1 != 0) {\n    if (iVar1 == 0x10) {\n      *pRes = 1;\n      iVar1 = 0;\n    }\n    return iVar1;\n  }\n  *pRes = 0;\n  iVar1 = moveToRightmost(pCur);\n  if (iVar1 == 0) {\n    pCur->curFlags = pCur->curFlags | 8;\n    return 0;\n  }\n  pCur->curFlags = pCur->curFlags & 0xf7;\n  return iVar1;\n}\n\n" (function_definition "int __regparm3 sqlite3BtreeLast(BtCursor *pCur,int *pRes)\n\n{\n  int iVar1;\n  \n  if ((pCur->eState == '\0') && ((pCur->curFlags & 8) != 0)) {\n    *pRes = 0;\n    return 0;\n  }\n  iVar1 = moveToRoot(pCur);\n  if (iVar1 != 0) {\n    if (iVar1 == 0x10) {\n      *pRes = 1;\n      iVar1 = 0;\n    }\n    return iVar1;\n  }\n  *pRes = 0;\n  iVar1 = moveToRightmost(pCur);\n  if (iVar1 == 0) {\n    pCur->curFlags = pCur->curFlags | 8;\n    return 0;\n  }\n  pCur->curFlags = pCur->curFlags & 0xf7;\n  return iVar1;\n}" primitive_type (ERROR "__regparm3" identifier) (function_declarator "sqlite3BtreeLast(BtCursor *pCur,int *pRes)" identifier (parameter_list "(BtCursor *pCur,int *pRes)" ( (parameter_declaration "BtCursor *pCur" type_identifier (pointer_declarator "*pCur" * identifier)) , (parameter_declaration "int *pRes" primitive_type (pointer_declarator "*pRes" * identifier)) ))) (compound_statement "{\n  int iVar1;\n  \n  if ((pCur->eState == '\0') && ((pCur->curFlags & 8) != 0)) {\n    *pRes = 0;\n    return 0;\n  }\n  iVar1 = moveToRoot(pCur);\n  if (iVar1 != 0) {\n    if (iVar1 == 0x10) {\n      *pRes = 1;\n      iVar1 = 0;\n    }\n    return iVar1;\n  }\n  *pRes = 0;\n  iVar1 = moveToRightmost(pCur);\n  if (iVar1 == 0) {\n    pCur->curFlags = pCur->curFlags | 8;\n    return 0;\n  }\n  pCur->curFlags = pCur->curFlags & 0xf7;\n  return iVar1;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (if_statement "if ((pCur->eState == '\0') && ((pCur->curFlags & 8) != 0)) {\n    *pRes = 0;\n    return 0;\n  }" if (parenthesized_expression "((pCur->eState == '\0') && ((pCur->curFlags & 8) != 0))" ( (binary_expression "(pCur->eState == '\0') && ((pCur->curFlags & 8) != 0)" (parenthesized_expression "(pCur->eState == '\0')" ( (binary_expression "pCur->eState == '\0'" (field_expression "pCur->eState" identifier -> field_identifier) == (char_literal "'\0'" ' escape_sequence ')) )) && (parenthesized_expression "((pCur->curFlags & 8) != 0)" ( (binary_expression "(pCur->curFlags & 8) != 0" (parenthesized_expression "(pCur->curFlags & 8)" ( (binary_expression "pCur->curFlags & 8" (field_expression "pCur->curFlags" identifier -> field_identifier) & number_literal) )) != number_literal) ))) )) (compound_statement "{\n    *pRes = 0;\n    return 0;\n  }" { (expression_statement "*pRes = 0;" (assignment_expression "*pRes = 0" (pointer_expression "*pRes" * identifier) = number_literal) ;) (return_statement "return 0;" return number_literal ;) })) (expression_statement "iVar1 = moveToRoot(pCur);" (assignment_expression "iVar1 = moveToRoot(pCur)" identifier = (call_expression "moveToRoot(pCur)" identifier (argument_list "(pCur)" ( identifier )))) ;) (if_statement "if (iVar1 != 0) {\n    if (iVar1 == 0x10) {\n      *pRes = 1;\n      iVar1 = 0;\n    }\n    return iVar1;\n  }" if (parenthesized_expression "(iVar1 != 0)" ( (binary_expression "iVar1 != 0" identifier != number_literal) )) (compound_statement "{\n    if (iVar1 == 0x10) {\n      *pRes = 1;\n      iVar1 = 0;\n    }\n    return iVar1;\n  }" { (if_statement "if (iVar1 == 0x10) {\n      *pRes = 1;\n      iVar1 = 0;\n    }" if (parenthesized_expression "(iVar1 == 0x10)" ( (binary_expression "iVar1 == 0x10" identifier == number_literal) )) (compound_statement "{\n      *pRes = 1;\n      iVar1 = 0;\n    }" { (expression_statement "*pRes = 1;" (assignment_expression "*pRes = 1" (pointer_expression "*pRes" * identifier) = number_literal) ;) (expression_statement "iVar1 = 0;" (assignment_expression "iVar1 = 0" identifier = number_literal) ;) })) (return_statement "return iVar1;" return identifier ;) })) (expression_statement "*pRes = 0;" (assignment_expression "*pRes = 0" (pointer_expression "*pRes" * identifier) = number_literal) ;) (expression_statement "iVar1 = moveToRightmost(pCur);" (assignment_expression "iVar1 = moveToRightmost(pCur)" identifier = (call_expression "moveToRightmost(pCur)" identifier (argument_list "(pCur)" ( identifier )))) ;) (if_statement "if (iVar1 == 0) {\n    pCur->curFlags = pCur->curFlags | 8;\n    return 0;\n  }" if (parenthesized_expression "(iVar1 == 0)" ( (binary_expression "iVar1 == 0" identifier == number_literal) )) (compound_statement "{\n    pCur->curFlags = pCur->curFlags | 8;\n    return 0;\n  }" { (expression_statement "pCur->curFlags = pCur->curFlags | 8;" (assignment_expression "pCur->curFlags = pCur->curFlags | 8" (field_expression "pCur->curFlags" identifier -> field_identifier) = (binary_expression "pCur->curFlags | 8" (field_expression "pCur->curFlags" identifier -> field_identifier) | number_literal)) ;) (return_statement "return 0;" return number_literal ;) })) (expression_statement "pCur->curFlags = pCur->curFlags & 0xf7;" (assignment_expression "pCur->curFlags = pCur->curFlags & 0xf7" (field_expression "pCur->curFlags" identifier -> field_identifier) = (binary_expression "pCur->curFlags & 0xf7" (field_expression "pCur->curFlags" identifier -> field_identifier) & number_literal)) ;) (return_statement "return iVar1;" return identifier ;) })))
(translation_unit "int __regparm3 FUN_0003a100(char *param_1,undefined4 *param_2)\n\n{\n  int iVar1;\n  \n  if ((*param_1 == '\0') && ((param_1[1] & 8U) != 0)) {\n    *param_2 = 0;\n    return 0;\n  }\n  iVar1 = FUN_00039f90();\n  if (iVar1 != 0) {\n    if (iVar1 == 0x10) {\n      *param_2 = 1;\n      iVar1 = 0;\n    }\n    return iVar1;\n  }\n  *param_2 = 0;\n  iVar1 = FUN_00039c00();\n  if (iVar1 == 0) {\n    param_1[1] = param_1[1] | 8;\n    return 0;\n  }\n  param_1[1] = param_1[1] & 0xf7;\n  return iVar1;\n}\n\n" (function_definition "int __regparm3 FUN_0003a100(char *param_1,undefined4 *param_2)\n\n{\n  int iVar1;\n  \n  if ((*param_1 == '\0') && ((param_1[1] & 8U) != 0)) {\n    *param_2 = 0;\n    return 0;\n  }\n  iVar1 = FUN_00039f90();\n  if (iVar1 != 0) {\n    if (iVar1 == 0x10) {\n      *param_2 = 1;\n      iVar1 = 0;\n    }\n    return iVar1;\n  }\n  *param_2 = 0;\n  iVar1 = FUN_00039c00();\n  if (iVar1 == 0) {\n    param_1[1] = param_1[1] | 8;\n    return 0;\n  }\n  param_1[1] = param_1[1] & 0xf7;\n  return iVar1;\n}" primitive_type (ERROR "__regparm3" identifier) (function_declarator "FUN_0003a100(char *param_1,undefined4 *param_2)" identifier (parameter_list "(char *param_1,undefined4 *param_2)" ( (parameter_declaration "char *param_1" primitive_type (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "undefined4 *param_2" type_identifier (pointer_declarator "*param_2" * identifier)) ))) (compound_statement "{\n  int iVar1;\n  \n  if ((*param_1 == '\0') && ((param_1[1] & 8U) != 0)) {\n    *param_2 = 0;\n    return 0;\n  }\n  iVar1 = FUN_00039f90();\n  if (iVar1 != 0) {\n    if (iVar1 == 0x10) {\n      *param_2 = 1;\n      iVar1 = 0;\n    }\n    return iVar1;\n  }\n  *param_2 = 0;\n  iVar1 = FUN_00039c00();\n  if (iVar1 == 0) {\n    param_1[1] = param_1[1] | 8;\n    return 0;\n  }\n  param_1[1] = param_1[1] & 0xf7;\n  return iVar1;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (if_statement "if ((*param_1 == '\0') && ((param_1[1] & 8U) != 0)) {\n    *param_2 = 0;\n    return 0;\n  }" if (parenthesized_expression "((*param_1 == '\0') && ((param_1[1] & 8U) != 0))" ( (binary_expression "(*param_1 == '\0') && ((param_1[1] & 8U) != 0)" (parenthesized_expression "(*param_1 == '\0')" ( (binary_expression "*param_1 == '\0'" (pointer_expression "*param_1" * identifier) == (char_literal "'\0'" ' escape_sequence ')) )) && (parenthesized_expression "((param_1[1] & 8U) != 0)" ( (binary_expression "(param_1[1] & 8U) != 0" (parenthesized_expression "(param_1[1] & 8U)" ( (binary_expression "param_1[1] & 8U" (subscript_expression "param_1[1]" identifier [ number_literal ]) & number_literal) )) != number_literal) ))) )) (compound_statement "{\n    *param_2 = 0;\n    return 0;\n  }" { (expression_statement "*param_2 = 0;" (assignment_expression "*param_2 = 0" (pointer_expression "*param_2" * identifier) = number_literal) ;) (return_statement "return 0;" return number_literal ;) })) (expression_statement "iVar1 = FUN_00039f90();" (assignment_expression "iVar1 = FUN_00039f90()" identifier = (call_expression "FUN_00039f90()" identifier (argument_list "()" ( )))) ;) (if_statement "if (iVar1 != 0) {\n    if (iVar1 == 0x10) {\n      *param_2 = 1;\n      iVar1 = 0;\n    }\n    return iVar1;\n  }" if (parenthesized_expression "(iVar1 != 0)" ( (binary_expression "iVar1 != 0" identifier != number_literal) )) (compound_statement "{\n    if (iVar1 == 0x10) {\n      *param_2 = 1;\n      iVar1 = 0;\n    }\n    return iVar1;\n  }" { (if_statement "if (iVar1 == 0x10) {\n      *param_2 = 1;\n      iVar1 = 0;\n    }" if (parenthesized_expression "(iVar1 == 0x10)" ( (binary_expression "iVar1 == 0x10" identifier == number_literal) )) (compound_statement "{\n      *param_2 = 1;\n      iVar1 = 0;\n    }" { (expression_statement "*param_2 = 1;" (assignment_expression "*param_2 = 1" (pointer_expression "*param_2" * identifier) = number_literal) ;) (expression_statement "iVar1 = 0;" (assignment_expression "iVar1 = 0" identifier = number_literal) ;) })) (return_statement "return iVar1;" return identifier ;) })) (expression_statement "*param_2 = 0;" (assignment_expression "*param_2 = 0" (pointer_expression "*param_2" * identifier) = number_literal) ;) (expression_statement "iVar1 = FUN_00039c00();" (assignment_expression "iVar1 = FUN_00039c00()" identifier = (call_expression "FUN_00039c00()" identifier (argument_list "()" ( )))) ;) (if_statement "if (iVar1 == 0) {\n    param_1[1] = param_1[1] | 8;\n    return 0;\n  }" if (parenthesized_expression "(iVar1 == 0)" ( (binary_expression "iVar1 == 0" identifier == number_literal) )) (compound_statement "{\n    param_1[1] = param_1[1] | 8;\n    return 0;\n  }" { (expression_statement "param_1[1] = param_1[1] | 8;" (assignment_expression "param_1[1] = param_1[1] | 8" (subscript_expression "param_1[1]" identifier [ number_literal ]) = (binary_expression "param_1[1] | 8" (subscript_expression "param_1[1]" identifier [ number_literal ]) | number_literal)) ;) (return_statement "return 0;" return number_literal ;) })) (expression_statement "param_1[1] = param_1[1] & 0xf7;" (assignment_expression "param_1[1] = param_1[1] & 0xf7" (subscript_expression "param_1[1]" identifier [ number_literal ]) = (binary_expression "param_1[1] & 0xf7" (subscript_expression "param_1[1]" identifier [ number_literal ]) & number_literal)) ;) (return_statement "return iVar1;" return identifier ;) })))
(translation_unit (function_definition TYPE (ERROR IDENT) (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE (pointer_declarator * IDENT)) , (parameter_declaration TYPE (pointer_declarator * IDENT)) ))) (compound_statement { (declaration TYPE IDENT ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression (pointer_expression * IDENT) == (char_literal ' escape_sequence ')) )) && (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression (subscript_expression IDENT [ LIT ]) & LIT) )) != LIT) ))) )) (compound_statement { (expression_statement (assignment_expression (pointer_expression * IDENT) = LIT) ;) (return_statement return LIT ;) })) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (assignment_expression (pointer_expression * IDENT) = LIT) ;) (expression_statement (assignment_expression IDENT = LIT) ;) })) (return_statement return IDENT ;) })) (expression_statement (assignment_expression (pointer_expression * IDENT) = LIT) ;) (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 (subscript_expression IDENT [ LIT ]) = (binary_expression (subscript_expression IDENT [ LIT ]) | LIT)) ;) (return_statement return LIT ;) })) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = (binary_expression (subscript_expression IDENT [ LIT ]) & LIT)) ;) (return_statement return IDENT ;) })))
(function_definition "int __regparm3 FUN_0003a100(char *param_1,undefined4 *param_2)\n\n{\n  int iVar1;\n  \n  if ((*param_1 == '\0') && ((param_1[1] & 8U) != 0)) {\n    *param_2 = 0;\n    return 0;\n  }\n  iVar1 = FUN_00039f90();\n  if (iVar1 != 0) {\n    if (iVar1 == 0x10) {\n      *param_2 = 1;\n      iVar1 = 0;\n    }\n    return iVar1;\n  }\n  *param_2 = 0;\n  iVar1 = FUN_00039c00();\n  if (iVar1 == 0) {\n    param_1[1] = param_1[1] | 8;\n    return 0;\n  }\n  param_1[1] = param_1[1] & 0xf7;\n  return iVar1;\n}" (primitive_type "int") (ERROR "__regparm3" (identifier "__regparm3")) (function_declarator "FUN_0003a100(char *param_1,undefined4 *param_2)" (identifier "FUN_0003a100") (parameter_list "(char *param_1,undefined4 *param_2)" (( "(") (parameter_declaration "char *param_1" (primitive_type "char") (pointer_declarator "*param_1" (* "*") (identifier "param_1"))) (, ",") (parameter_declaration "undefined4 *param_2" (type_identifier "undefined4") (pointer_declarator "*param_2" (* "*") (identifier "param_2"))) () ")"))) (compound_statement "{\n  int iVar1;\n  \n  if ((*param_1 == '\0') && ((param_1[1] & 8U) != 0)) {\n    *param_2 = 0;\n    return 0;\n  }\n  iVar1 = FUN_00039f90();\n  if (iVar1 != 0) {\n    if (iVar1 == 0x10) {\n      *param_2 = 1;\n      iVar1 = 0;\n    }\n    return iVar1;\n  }\n  *param_2 = 0;\n  iVar1 = FUN_00039c00();\n  if (iVar1 == 0) {\n    param_1[1] = param_1[1] | 8;\n    return 0;\n  }\n  param_1[1] = param_1[1] & 0xf7;\n  return iVar1;\n}" ({ "{") (declaration "int iVar1;" (primitive_type "int") (identifier "iVar1") (; ";")) (if_statement "if ((*param_1 == '\0') && ((param_1[1] & 8U) != 0)) {\n    *param_2 = 0;\n    return 0;\n  }" (if "if") (parenthesized_expression "((*param_1 == '\0') && ((param_1[1] & 8U) != 0))" (( "(") (binary_expression "(*param_1 == '\0') && ((param_1[1] & 8U) != 0)" (parenthesized_expression "(*param_1 == '\0')" (( "(") (binary_expression "*param_1 == '\0'" (pointer_expression "*param_1" (* "*") (identifier "param_1")) (== "==") (char_literal "'\0'" (' "'") (escape_sequence "\0") (' "'"))) () ")")) (&& "&&") (parenthesized_expression "((param_1[1] & 8U) != 0)" (( "(") (binary_expression "(param_1[1] & 8U) != 0" (parenthesized_expression "(param_1[1] & 8U)" (( "(") (binary_expression "param_1[1] & 8U" (subscript_expression "param_1[1]" (identifier "param_1") ([ "[") (number_literal "1") (] "]")) (& "&") (number_literal "8U")) () ")")) (!= "!=") (number_literal "0")) () ")"))) () ")")) (compound_statement "{\n    *param_2 = 0;\n    return 0;\n  }" ({ "{") (expression_statement "*param_2 = 0;" (assignment_expression "*param_2 = 0" (pointer_expression "*param_2" (* "*") (identifier "param_2")) (= "=") (number_literal "0")) (; ";")) (return_statement "return 0;" (return "return") (number_literal "0") (; ";")) (} "}"))) (expression_statement "iVar1 = FUN_00039f90();" (assignment_expression "iVar1 = FUN_00039f90()" (identifier "iVar1") (= "=") (call_expression "FUN_00039f90()" (identifier "FUN_00039f90") (argument_list "()" (( "(") () ")")))) (; ";")) (if_statement "if (iVar1 != 0) {\n    if (iVar1 == 0x10) {\n      *param_2 = 1;\n      iVar1 = 0;\n    }\n    return iVar1;\n  }" (if "if") (parenthesized_expression "(iVar1 != 0)" (( "(") (binary_expression "iVar1 != 0" (identifier "iVar1") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n    if (iVar1 == 0x10) {\n      *param_2 = 1;\n      iVar1 = 0;\n    }\n    return iVar1;\n  }" ({ "{") (if_statement "if (iVar1 == 0x10) {\n      *param_2 = 1;\n      iVar1 = 0;\n    }" (if "if") (parenthesized_expression "(iVar1 == 0x10)" (( "(") (binary_expression "iVar1 == 0x10" (identifier "iVar1") (== "==") (number_literal "0x10")) () ")")) (compound_statement "{\n      *param_2 = 1;\n      iVar1 = 0;\n    }" ({ "{") (expression_statement "*param_2 = 1;" (assignment_expression "*param_2 = 1" (pointer_expression "*param_2" (* "*") (identifier "param_2")) (= "=") (number_literal "1")) (; ";")) (expression_statement "iVar1 = 0;" (assignment_expression "iVar1 = 0" (identifier "iVar1") (= "=") (number_literal "0")) (; ";")) (} "}"))) (return_statement "return iVar1;" (return "return") (identifier "iVar1") (; ";")) (} "}"))) (expression_statement "*param_2 = 0;" (assignment_expression "*param_2 = 0" (pointer_expression "*param_2" (* "*") (identifier "param_2")) (= "=") (number_literal "0")) (; ";")) (expression_statement "iVar1 = FUN_00039c00();" (assignment_expression "iVar1 = FUN_00039c00()" (identifier "iVar1") (= "=") (call_expression "FUN_00039c00()" (identifier "FUN_00039c00") (argument_list "()" (( "(") () ")")))) (; ";")) (if_statement "if (iVar1 == 0) {\n    param_1[1] = param_1[1] | 8;\n    return 0;\n  }" (if "if") (parenthesized_expression "(iVar1 == 0)" (( "(") (binary_expression "iVar1 == 0" (identifier "iVar1") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n    param_1[1] = param_1[1] | 8;\n    return 0;\n  }" ({ "{") (expression_statement "param_1[1] = param_1[1] | 8;" (assignment_expression "param_1[1] = param_1[1] | 8" (subscript_expression "param_1[1]" (identifier "param_1") ([ "[") (number_literal "1") (] "]")) (= "=") (binary_expression "param_1[1] | 8" (subscript_expression "param_1[1]" (identifier "param_1") ([ "[") (number_literal "1") (] "]")) (| "|") (number_literal "8"))) (; ";")) (return_statement "return 0;" (return "return") (number_literal "0") (; ";")) (} "}"))) (expression_statement "param_1[1] = param_1[1] & 0xf7;" (assignment_expression "param_1[1] = param_1[1] & 0xf7" (subscript_expression "param_1[1]" (identifier "param_1") ([ "[") (number_literal "1") (] "]")) (= "=") (binary_expression "param_1[1] & 0xf7" (subscript_expression "param_1[1]" (identifier "param_1") ([ "[") (number_literal "1") (] "]")) (& "&") (number_literal "0xf7"))) (; ";")) (return_statement "return iVar1;" (return "return") (identifier "iVar1") (; ";")) (} "}")))

int __regparm3 function_1(type_1 *pCur,int *pRes)

{
  int var_2;
  
  if ((pCur->eState == '\0') && ((pCur->curFlags & 8) != 0)) {
    *pRes = 0;
    return 0;
  }
  var_2 = var_1(pCur);
  if (var_2 != 0) {
    if (var_2 == 0x10) {
      *pRes = 1;
      var_2 = 0;
    }
    return var_2;
  }
  *pRes = 0;
  var_2 = var_3(pCur);
  if (var_2 == 0) {
    pCur->curFlags = pCur->curFlags | 8;
    return 0;
  }
  pCur->curFlags = pCur->curFlags & 0xf7;
  return var_2;
}


(translation_unit (function_definition type: (primitive_type) (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))))) body: (compound_statement (declaration type: (primitive_type) declarator: (identifier)) (if_statement condition: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_expression left: (pointer_expression argument: (identifier)) right: (char_literal (escape_sequence)))) right: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_expression left: (subscript_expression argument: (identifier) index: (number_literal)) right: (number_literal))) right: (number_literal))))) consequence: (compound_statement (expression_statement (assignment_expression left: (pointer_expression argument: (identifier)) right: (number_literal))) (return_statement (number_literal)))) (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 (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (expression_statement (assignment_expression left: (pointer_expression argument: (identifier)) right: (number_literal))) (expression_statement (assignment_expression left: (identifier) right: (number_literal))))) (return_statement (identifier)))) (expression_statement (assignment_expression left: (pointer_expression argument: (identifier)) right: (number_literal))) (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: (subscript_expression argument: (identifier) index: (number_literal)) right: (binary_expression left: (subscript_expression argument: (identifier) index: (number_literal)) right: (number_literal)))) (return_statement (number_literal)))) (expression_statement (assignment_expression left: (subscript_expression argument: (identifier) index: (number_literal)) right: (binary_expression left: (subscript_expression argument: (identifier) index: (number_literal)) right: (number_literal)))) (return_statement (identifier)))))

int __regparm3 MASKED(char *param_1,undefined4 *param_2)

{
  int iVar1;
  
  if ((*param_1 == '\0') && ((param_1[1] & 8U) != 0)) {
    *param_2 = 0;
    return 0;
  }
  iVar1 = FUN_00039f90();
  if (iVar1 != 0) {
    if (iVar1 == 0x10) {
      *param_2 = 1;
      iVar1 = 0;
    }
    return iVar1;
  }
  *param_2 = 0;
  iVar1 = FUN_00039c00();
  if (iVar1 == 0) {
    param_1[1] = param_1[1] | 8;
    return 0;
  }
  param_1[1] = param_1[1] & 0xf7;
  return iVar1;
}

