
int saveAllCursors(BtShared *pBt,Pgno iRoot,BtCursor *pExcept)

{
  int iVar1;
  BtCursor *p;
  
  if (pBt != (BtShared *)0x0) {
    do {
      if ((pExcept != (BtCursor *)pBt) && ((iRoot == 0 || (iRoot == ((BtCursor *)pBt)->pgnoRoot))))
      {
        iVar1 = saveCursorsOnList((BtCursor *)pBt,iRoot,pExcept);
        return iVar1;
      }
      pBt = (BtShared *)((BtCursor *)pBt)->pNext;
    } while ((BtCursor *)pBt != (BtCursor *)0x0);
  }
  if (pExcept != (BtCursor *)0x0) {
    pExcept->curFlags = pExcept->curFlags & 0xdf;
  }
  return 0;
}



undefined4 FUN_000ce3b8(int param_1,int param_2,int param_3)

{
  undefined4 uVar1;
  
  if (param_1 != 0) {
    do {
      if ((param_3 != param_1) && ((param_2 == 0 || (param_2 == *(int *)(param_1 + 0x40))))) {
        uVar1 = FUN_000ce2bc();
        return uVar1;
      }
      param_1 = *(int *)(param_1 + 0x18);
    } while (param_1 != 0);
  }
  if (param_3 != 0) {
    *(byte *)(param_3 + 1) = *(byte *)(param_3 + 1) & 0xdf;
  }
  return 0;
}


lui gp,0xd
addiu gp,gp,-0x5a98
addu gp,gp,t9
beq a0,zero,0x000ce3f4
_nop
beq a2,a0,0x000ce3e8
_nop
beq a1,zero,0x000ce410
_lw t9,-0x7d64(gp)
lw v0,0x40(a0)
beq a1,v0,0x000ce414
_addiu t9,t9,-0x1d44
lw a0,0x18(a0)
bne a0,zero,0x000ce3cc
_nop
beq a2,zero,0x000ce408
_nop
lbu v0,0x1(a2)
andi v0,v0,0xdf
sb v0,0x1(a2)
jr ra
_or v0,zero,zero
addiu t9,t9,-0x1d44
b 0x000ce2bc
_nop
(translation_unit "undefined4 FUN_000ce3b8(int param_1,int param_2,int param_3)\n\n{\n  undefined4 uVar1;\n  \n  if (param_1 != 0) {\n    do {\n      if ((param_3 != param_1) && ((param_2 == 0 || (param_2 == *(int *)(param_1 + 0x40))))) {\n        uVar1 = FUN_000ce2bc();\n        return uVar1;\n      }\n      param_1 = *(int *)(param_1 + 0x18);\n    } while (param_1 != 0);\n  }\n  if (param_3 != 0) {\n    *(byte *)(param_3 + 1) = *(byte *)(param_3 + 1) & 0xdf;\n  }\n  return 0;\n}\n\n" (function_definition "undefined4 FUN_000ce3b8(int param_1,int param_2,int param_3)\n\n{\n  undefined4 uVar1;\n  \n  if (param_1 != 0) {\n    do {\n      if ((param_3 != param_1) && ((param_2 == 0 || (param_2 == *(int *)(param_1 + 0x40))))) {\n        uVar1 = FUN_000ce2bc();\n        return uVar1;\n      }\n      param_1 = *(int *)(param_1 + 0x18);\n    } while (param_1 != 0);\n  }\n  if (param_3 != 0) {\n    *(byte *)(param_3 + 1) = *(byte *)(param_3 + 1) & 0xdf;\n  }\n  return 0;\n}" type_identifier (function_declarator "FUN_000ce3b8(int param_1,int param_2,int param_3)" identifier (parameter_list "(int param_1,int param_2,int param_3)" ( (parameter_declaration "int param_1" primitive_type identifier) , (parameter_declaration "int param_2" primitive_type identifier) , (parameter_declaration "int param_3" primitive_type identifier) ))) (compound_statement "{\n  undefined4 uVar1;\n  \n  if (param_1 != 0) {\n    do {\n      if ((param_3 != param_1) && ((param_2 == 0 || (param_2 == *(int *)(param_1 + 0x40))))) {\n        uVar1 = FUN_000ce2bc();\n        return uVar1;\n      }\n      param_1 = *(int *)(param_1 + 0x18);\n    } while (param_1 != 0);\n  }\n  if (param_3 != 0) {\n    *(byte *)(param_3 + 1) = *(byte *)(param_3 + 1) & 0xdf;\n  }\n  return 0;\n}" { (declaration "undefined4 uVar1;" type_identifier identifier ;) (if_statement "if (param_1 != 0) {\n    do {\n      if ((param_3 != param_1) && ((param_2 == 0 || (param_2 == *(int *)(param_1 + 0x40))))) {\n        uVar1 = FUN_000ce2bc();\n        return uVar1;\n      }\n      param_1 = *(int *)(param_1 + 0x18);\n    } while (param_1 != 0);\n  }" if (parenthesized_expression "(param_1 != 0)" ( (binary_expression "param_1 != 0" identifier != number_literal) )) (compound_statement "{\n    do {\n      if ((param_3 != param_1) && ((param_2 == 0 || (param_2 == *(int *)(param_1 + 0x40))))) {\n        uVar1 = FUN_000ce2bc();\n        return uVar1;\n      }\n      param_1 = *(int *)(param_1 + 0x18);\n    } while (param_1 != 0);\n  }" { (do_statement "do {\n      if ((param_3 != param_1) && ((param_2 == 0 || (param_2 == *(int *)(param_1 + 0x40))))) {\n        uVar1 = FUN_000ce2bc();\n        return uVar1;\n      }\n      param_1 = *(int *)(param_1 + 0x18);\n    } while (param_1 != 0);" do (compound_statement "{\n      if ((param_3 != param_1) && ((param_2 == 0 || (param_2 == *(int *)(param_1 + 0x40))))) {\n        uVar1 = FUN_000ce2bc();\n        return uVar1;\n      }\n      param_1 = *(int *)(param_1 + 0x18);\n    }" { (if_statement "if ((param_3 != param_1) && ((param_2 == 0 || (param_2 == *(int *)(param_1 + 0x40))))) {\n        uVar1 = FUN_000ce2bc();\n        return uVar1;\n      }" if (parenthesized_expression "((param_3 != param_1) && ((param_2 == 0 || (param_2 == *(int *)(param_1 + 0x40)))))" ( (binary_expression "(param_3 != param_1) && ((param_2 == 0 || (param_2 == *(int *)(param_1 + 0x40))))" (parenthesized_expression "(param_3 != param_1)" ( (binary_expression "param_3 != param_1" identifier != identifier) )) && (parenthesized_expression "((param_2 == 0 || (param_2 == *(int *)(param_1 + 0x40))))" ( (parenthesized_expression "(param_2 == 0 || (param_2 == *(int *)(param_1 + 0x40)))" ( (binary_expression "param_2 == 0 || (param_2 == *(int *)(param_1 + 0x40))" (binary_expression "param_2 == 0" identifier == number_literal) || (parenthesized_expression "(param_2 == *(int *)(param_1 + 0x40))" ( (binary_expression "param_2 == *(int *)(param_1 + 0x40)" identifier == (pointer_expression "*(int *)(param_1 + 0x40)" * (cast_expression "(int *)(param_1 + 0x40)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x40)" ( (binary_expression "param_1 + 0x40" identifier + number_literal) ))))) ))) )) ))) )) (compound_statement "{\n        uVar1 = FUN_000ce2bc();\n        return uVar1;\n      }" { (expression_statement "uVar1 = FUN_000ce2bc();" (assignment_expression "uVar1 = FUN_000ce2bc()" identifier = (call_expression "FUN_000ce2bc()" identifier (argument_list "()" ( )))) ;) (return_statement "return uVar1;" return identifier ;) })) (expression_statement "param_1 = *(int *)(param_1 + 0x18);" (assignment_expression "param_1 = *(int *)(param_1 + 0x18)" identifier = (pointer_expression "*(int *)(param_1 + 0x18)" * (cast_expression "(int *)(param_1 + 0x18)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x18)" ( (binary_expression "param_1 + 0x18" identifier + number_literal) ))))) ;) }) while (parenthesized_expression "(param_1 != 0)" ( (binary_expression "param_1 != 0" identifier != number_literal) )) ;) })) (if_statement "if (param_3 != 0) {\n    *(byte *)(param_3 + 1) = *(byte *)(param_3 + 1) & 0xdf;\n  }" if (parenthesized_expression "(param_3 != 0)" ( (binary_expression "param_3 != 0" identifier != number_literal) )) (compound_statement "{\n    *(byte *)(param_3 + 1) = *(byte *)(param_3 + 1) & 0xdf;\n  }" { (expression_statement "*(byte *)(param_3 + 1) = *(byte *)(param_3 + 1) & 0xdf;" (assignment_expression "*(byte *)(param_3 + 1) = *(byte *)(param_3 + 1) & 0xdf" (pointer_expression "*(byte *)(param_3 + 1)" * (cast_expression "(byte *)(param_3 + 1)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_3 + 1)" ( (binary_expression "param_3 + 1" identifier + number_literal) )))) = (binary_expression "*(byte *)(param_3 + 1) & 0xdf" (pointer_expression "*(byte *)(param_3 + 1)" * (cast_expression "(byte *)(param_3 + 1)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_3 + 1)" ( (binary_expression "param_3 + 1" identifier + number_literal) )))) & number_literal)) ;) })) (return_statement "return 0;" return number_literal ;) })))
(translation_unit "int saveAllCursors(BtShared *pBt,Pgno iRoot,BtCursor *pExcept)\n\n{\n  int iVar1;\n  BtCursor *p;\n  \n  if (pBt != (BtShared *)0x0) {\n    do {\n      if ((pExcept != (BtCursor *)pBt) && ((iRoot == 0 || (iRoot == ((BtCursor *)pBt)->pgnoRoot))))\n      {\n        iVar1 = saveCursorsOnList((BtCursor *)pBt,iRoot,pExcept);\n        return iVar1;\n      }\n      pBt = (BtShared *)((BtCursor *)pBt)->pNext;\n    } while ((BtCursor *)pBt != (BtCursor *)0x0);\n  }\n  if (pExcept != (BtCursor *)0x0) {\n    pExcept->curFlags = pExcept->curFlags & 0xdf;\n  }\n  return 0;\n}\n\n" (function_definition "int saveAllCursors(BtShared *pBt,Pgno iRoot,BtCursor *pExcept)\n\n{\n  int iVar1;\n  BtCursor *p;\n  \n  if (pBt != (BtShared *)0x0) {\n    do {\n      if ((pExcept != (BtCursor *)pBt) && ((iRoot == 0 || (iRoot == ((BtCursor *)pBt)->pgnoRoot))))\n      {\n        iVar1 = saveCursorsOnList((BtCursor *)pBt,iRoot,pExcept);\n        return iVar1;\n      }\n      pBt = (BtShared *)((BtCursor *)pBt)->pNext;\n    } while ((BtCursor *)pBt != (BtCursor *)0x0);\n  }\n  if (pExcept != (BtCursor *)0x0) {\n    pExcept->curFlags = pExcept->curFlags & 0xdf;\n  }\n  return 0;\n}" primitive_type (function_declarator "saveAllCursors(BtShared *pBt,Pgno iRoot,BtCursor *pExcept)" identifier (parameter_list "(BtShared *pBt,Pgno iRoot,BtCursor *pExcept)" ( (parameter_declaration "BtShared *pBt" type_identifier (pointer_declarator "*pBt" * identifier)) , (parameter_declaration "Pgno iRoot" type_identifier identifier) , (parameter_declaration "BtCursor *pExcept" type_identifier (pointer_declarator "*pExcept" * identifier)) ))) (compound_statement "{\n  int iVar1;\n  BtCursor *p;\n  \n  if (pBt != (BtShared *)0x0) {\n    do {\n      if ((pExcept != (BtCursor *)pBt) && ((iRoot == 0 || (iRoot == ((BtCursor *)pBt)->pgnoRoot))))\n      {\n        iVar1 = saveCursorsOnList((BtCursor *)pBt,iRoot,pExcept);\n        return iVar1;\n      }\n      pBt = (BtShared *)((BtCursor *)pBt)->pNext;\n    } while ((BtCursor *)pBt != (BtCursor *)0x0);\n  }\n  if (pExcept != (BtCursor *)0x0) {\n    pExcept->curFlags = pExcept->curFlags & 0xdf;\n  }\n  return 0;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "BtCursor *p;" type_identifier (pointer_declarator "*p" * identifier) ;) (if_statement "if (pBt != (BtShared *)0x0) {\n    do {\n      if ((pExcept != (BtCursor *)pBt) && ((iRoot == 0 || (iRoot == ((BtCursor *)pBt)->pgnoRoot))))\n      {\n        iVar1 = saveCursorsOnList((BtCursor *)pBt,iRoot,pExcept);\n        return iVar1;\n      }\n      pBt = (BtShared *)((BtCursor *)pBt)->pNext;\n    } while ((BtCursor *)pBt != (BtCursor *)0x0);\n  }" if (parenthesized_expression "(pBt != (BtShared *)0x0)" ( (binary_expression "pBt != (BtShared *)0x0" identifier != (cast_expression "(BtShared *)0x0" ( (type_descriptor "BtShared *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    do {\n      if ((pExcept != (BtCursor *)pBt) && ((iRoot == 0 || (iRoot == ((BtCursor *)pBt)->pgnoRoot))))\n      {\n        iVar1 = saveCursorsOnList((BtCursor *)pBt,iRoot,pExcept);\n        return iVar1;\n      }\n      pBt = (BtShared *)((BtCursor *)pBt)->pNext;\n    } while ((BtCursor *)pBt != (BtCursor *)0x0);\n  }" { (do_statement "do {\n      if ((pExcept != (BtCursor *)pBt) && ((iRoot == 0 || (iRoot == ((BtCursor *)pBt)->pgnoRoot))))\n      {\n        iVar1 = saveCursorsOnList((BtCursor *)pBt,iRoot,pExcept);\n        return iVar1;\n      }\n      pBt = (BtShared *)((BtCursor *)pBt)->pNext;\n    } while ((BtCursor *)pBt != (BtCursor *)0x0);" do (compound_statement "{\n      if ((pExcept != (BtCursor *)pBt) && ((iRoot == 0 || (iRoot == ((BtCursor *)pBt)->pgnoRoot))))\n      {\n        iVar1 = saveCursorsOnList((BtCursor *)pBt,iRoot,pExcept);\n        return iVar1;\n      }\n      pBt = (BtShared *)((BtCursor *)pBt)->pNext;\n    }" { (if_statement "if ((pExcept != (BtCursor *)pBt) && ((iRoot == 0 || (iRoot == ((BtCursor *)pBt)->pgnoRoot))))\n      {\n        iVar1 = saveCursorsOnList((BtCursor *)pBt,iRoot,pExcept);\n        return iVar1;\n      }" if (parenthesized_expression "((pExcept != (BtCursor *)pBt) && ((iRoot == 0 || (iRoot == ((BtCursor *)pBt)->pgnoRoot))))" ( (binary_expression "(pExcept != (BtCursor *)pBt) && ((iRoot == 0 || (iRoot == ((BtCursor *)pBt)->pgnoRoot)))" (parenthesized_expression "(pExcept != (BtCursor *)pBt)" ( (binary_expression "pExcept != (BtCursor *)pBt" identifier != (cast_expression "(BtCursor *)pBt" ( (type_descriptor "BtCursor *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) && (parenthesized_expression "((iRoot == 0 || (iRoot == ((BtCursor *)pBt)->pgnoRoot)))" ( (parenthesized_expression "(iRoot == 0 || (iRoot == ((BtCursor *)pBt)->pgnoRoot))" ( (binary_expression "iRoot == 0 || (iRoot == ((BtCursor *)pBt)->pgnoRoot)" (binary_expression "iRoot == 0" identifier == number_literal) || (parenthesized_expression "(iRoot == ((BtCursor *)pBt)->pgnoRoot)" ( (binary_expression "iRoot == ((BtCursor *)pBt)->pgnoRoot" identifier == (field_expression "((BtCursor *)pBt)->pgnoRoot" (parenthesized_expression "((BtCursor *)pBt)" ( (cast_expression "(BtCursor *)pBt" ( (type_descriptor "BtCursor *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier) )) -> field_identifier)) ))) )) ))) )) (compound_statement "{\n        iVar1 = saveCursorsOnList((BtCursor *)pBt,iRoot,pExcept);\n        return iVar1;\n      }" { (expression_statement "iVar1 = saveCursorsOnList((BtCursor *)pBt,iRoot,pExcept);" (assignment_expression "iVar1 = saveCursorsOnList((BtCursor *)pBt,iRoot,pExcept)" identifier = (call_expression "saveCursorsOnList((BtCursor *)pBt,iRoot,pExcept)" identifier (argument_list "((BtCursor *)pBt,iRoot,pExcept)" ( (cast_expression "(BtCursor *)pBt" ( (type_descriptor "BtCursor *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier) , identifier , identifier )))) ;) (return_statement "return iVar1;" return identifier ;) })) (expression_statement "pBt = (BtShared *)((BtCursor *)pBt)->pNext;" (assignment_expression "pBt = (BtShared *)((BtCursor *)pBt)->pNext" identifier = (cast_expression "(BtShared *)((BtCursor *)pBt)->pNext" ( (type_descriptor "BtShared *" type_identifier (abstract_pointer_declarator "*" *)) ) (field_expression "((BtCursor *)pBt)->pNext" (parenthesized_expression "((BtCursor *)pBt)" ( (cast_expression "(BtCursor *)pBt" ( (type_descriptor "BtCursor *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier) )) -> field_identifier))) ;) }) while (parenthesized_expression "((BtCursor *)pBt != (BtCursor *)0x0)" ( (binary_expression "(BtCursor *)pBt != (BtCursor *)0x0" (cast_expression "(BtCursor *)pBt" ( (type_descriptor "BtCursor *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier) != (cast_expression "(BtCursor *)0x0" ( (type_descriptor "BtCursor *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) ;) })) (if_statement "if (pExcept != (BtCursor *)0x0) {\n    pExcept->curFlags = pExcept->curFlags & 0xdf;\n  }" if (parenthesized_expression "(pExcept != (BtCursor *)0x0)" ( (binary_expression "pExcept != (BtCursor *)0x0" identifier != (cast_expression "(BtCursor *)0x0" ( (type_descriptor "BtCursor *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    pExcept->curFlags = pExcept->curFlags & 0xdf;\n  }" { (expression_statement "pExcept->curFlags = pExcept->curFlags & 0xdf;" (assignment_expression "pExcept->curFlags = pExcept->curFlags & 0xdf" (field_expression "pExcept->curFlags" identifier -> field_identifier) = (binary_expression "pExcept->curFlags & 0xdf" (field_expression "pExcept->curFlags" identifier -> field_identifier) & number_literal)) ;) })) (return_statement "return 0;" return number_literal ;) })))
(translation_unit "undefined4 FUN_000ce3b8(int param_1,int param_2,int param_3)\n\n{\n  undefined4 uVar1;\n  \n  if (param_1 != 0) {\n    do {\n      if ((param_3 != param_1) && ((param_2 == 0 || (param_2 == *(int *)(param_1 + 0x40))))) {\n        uVar1 = FUN_000ce2bc();\n        return uVar1;\n      }\n      param_1 = *(int *)(param_1 + 0x18);\n    } while (param_1 != 0);\n  }\n  if (param_3 != 0) {\n    *(byte *)(param_3 + 1) = *(byte *)(param_3 + 1) & 0xdf;\n  }\n  return 0;\n}\n\n" (function_definition "undefined4 FUN_000ce3b8(int param_1,int param_2,int param_3)\n\n{\n  undefined4 uVar1;\n  \n  if (param_1 != 0) {\n    do {\n      if ((param_3 != param_1) && ((param_2 == 0 || (param_2 == *(int *)(param_1 + 0x40))))) {\n        uVar1 = FUN_000ce2bc();\n        return uVar1;\n      }\n      param_1 = *(int *)(param_1 + 0x18);\n    } while (param_1 != 0);\n  }\n  if (param_3 != 0) {\n    *(byte *)(param_3 + 1) = *(byte *)(param_3 + 1) & 0xdf;\n  }\n  return 0;\n}" type_identifier (function_declarator "FUN_000ce3b8(int param_1,int param_2,int param_3)" identifier (parameter_list "(int param_1,int param_2,int param_3)" ( (parameter_declaration "int param_1" primitive_type identifier) , (parameter_declaration "int param_2" primitive_type identifier) , (parameter_declaration "int param_3" primitive_type identifier) ))) (compound_statement "{\n  undefined4 uVar1;\n  \n  if (param_1 != 0) {\n    do {\n      if ((param_3 != param_1) && ((param_2 == 0 || (param_2 == *(int *)(param_1 + 0x40))))) {\n        uVar1 = FUN_000ce2bc();\n        return uVar1;\n      }\n      param_1 = *(int *)(param_1 + 0x18);\n    } while (param_1 != 0);\n  }\n  if (param_3 != 0) {\n    *(byte *)(param_3 + 1) = *(byte *)(param_3 + 1) & 0xdf;\n  }\n  return 0;\n}" { (declaration "undefined4 uVar1;" type_identifier identifier ;) (if_statement "if (param_1 != 0) {\n    do {\n      if ((param_3 != param_1) && ((param_2 == 0 || (param_2 == *(int *)(param_1 + 0x40))))) {\n        uVar1 = FUN_000ce2bc();\n        return uVar1;\n      }\n      param_1 = *(int *)(param_1 + 0x18);\n    } while (param_1 != 0);\n  }" if (parenthesized_expression "(param_1 != 0)" ( (binary_expression "param_1 != 0" identifier != number_literal) )) (compound_statement "{\n    do {\n      if ((param_3 != param_1) && ((param_2 == 0 || (param_2 == *(int *)(param_1 + 0x40))))) {\n        uVar1 = FUN_000ce2bc();\n        return uVar1;\n      }\n      param_1 = *(int *)(param_1 + 0x18);\n    } while (param_1 != 0);\n  }" { (do_statement "do {\n      if ((param_3 != param_1) && ((param_2 == 0 || (param_2 == *(int *)(param_1 + 0x40))))) {\n        uVar1 = FUN_000ce2bc();\n        return uVar1;\n      }\n      param_1 = *(int *)(param_1 + 0x18);\n    } while (param_1 != 0);" do (compound_statement "{\n      if ((param_3 != param_1) && ((param_2 == 0 || (param_2 == *(int *)(param_1 + 0x40))))) {\n        uVar1 = FUN_000ce2bc();\n        return uVar1;\n      }\n      param_1 = *(int *)(param_1 + 0x18);\n    }" { (if_statement "if ((param_3 != param_1) && ((param_2 == 0 || (param_2 == *(int *)(param_1 + 0x40))))) {\n        uVar1 = FUN_000ce2bc();\n        return uVar1;\n      }" if (parenthesized_expression "((param_3 != param_1) && ((param_2 == 0 || (param_2 == *(int *)(param_1 + 0x40)))))" ( (binary_expression "(param_3 != param_1) && ((param_2 == 0 || (param_2 == *(int *)(param_1 + 0x40))))" (parenthesized_expression "(param_3 != param_1)" ( (binary_expression "param_3 != param_1" identifier != identifier) )) && (parenthesized_expression "((param_2 == 0 || (param_2 == *(int *)(param_1 + 0x40))))" ( (parenthesized_expression "(param_2 == 0 || (param_2 == *(int *)(param_1 + 0x40)))" ( (binary_expression "param_2 == 0 || (param_2 == *(int *)(param_1 + 0x40))" (binary_expression "param_2 == 0" identifier == number_literal) || (parenthesized_expression "(param_2 == *(int *)(param_1 + 0x40))" ( (binary_expression "param_2 == *(int *)(param_1 + 0x40)" identifier == (pointer_expression "*(int *)(param_1 + 0x40)" * (cast_expression "(int *)(param_1 + 0x40)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x40)" ( (binary_expression "param_1 + 0x40" identifier + number_literal) ))))) ))) )) ))) )) (compound_statement "{\n        uVar1 = FUN_000ce2bc();\n        return uVar1;\n      }" { (expression_statement "uVar1 = FUN_000ce2bc();" (assignment_expression "uVar1 = FUN_000ce2bc()" identifier = (call_expression "FUN_000ce2bc()" identifier (argument_list "()" ( )))) ;) (return_statement "return uVar1;" return identifier ;) })) (expression_statement "param_1 = *(int *)(param_1 + 0x18);" (assignment_expression "param_1 = *(int *)(param_1 + 0x18)" identifier = (pointer_expression "*(int *)(param_1 + 0x18)" * (cast_expression "(int *)(param_1 + 0x18)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x18)" ( (binary_expression "param_1 + 0x18" identifier + number_literal) ))))) ;) }) while (parenthesized_expression "(param_1 != 0)" ( (binary_expression "param_1 != 0" identifier != number_literal) )) ;) })) (if_statement "if (param_3 != 0) {\n    *(byte *)(param_3 + 1) = *(byte *)(param_3 + 1) & 0xdf;\n  }" if (parenthesized_expression "(param_3 != 0)" ( (binary_expression "param_3 != 0" identifier != number_literal) )) (compound_statement "{\n    *(byte *)(param_3 + 1) = *(byte *)(param_3 + 1) & 0xdf;\n  }" { (expression_statement "*(byte *)(param_3 + 1) = *(byte *)(param_3 + 1) & 0xdf;" (assignment_expression "*(byte *)(param_3 + 1) = *(byte *)(param_3 + 1) & 0xdf" (pointer_expression "*(byte *)(param_3 + 1)" * (cast_expression "(byte *)(param_3 + 1)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_3 + 1)" ( (binary_expression "param_3 + 1" identifier + number_literal) )))) = (binary_expression "*(byte *)(param_3 + 1) & 0xdf" (pointer_expression "*(byte *)(param_3 + 1)" * (cast_expression "(byte *)(param_3 + 1)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_3 + 1)" ( (binary_expression "param_3 + 1" identifier + number_literal) )))) & number_literal)) ;) })) (return_statement "return 0;" return number_literal ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE IDENT ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (do_statement do (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT != IDENT) )) && (parenthesized_expression ( (parenthesized_expression ( (binary_expression (binary_expression IDENT == LIT) || (parenthesized_expression ( (binary_expression IDENT == (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ))) )) ))) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( )))) ;) (return_statement return IDENT ;) })) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) }) while (parenthesized_expression ( (binary_expression IDENT != LIT) )) ;) })) (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) )))) = (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) & LIT)) ;) })) (return_statement return LIT ;) })))
(function_definition "undefined4 FUN_000ce3b8(int param_1,int param_2,int param_3)\n\n{\n  undefined4 uVar1;\n  \n  if (param_1 != 0) {\n    do {\n      if ((param_3 != param_1) && ((param_2 == 0 || (param_2 == *(int *)(param_1 + 0x40))))) {\n        uVar1 = FUN_000ce2bc();\n        return uVar1;\n      }\n      param_1 = *(int *)(param_1 + 0x18);\n    } while (param_1 != 0);\n  }\n  if (param_3 != 0) {\n    *(byte *)(param_3 + 1) = *(byte *)(param_3 + 1) & 0xdf;\n  }\n  return 0;\n}" (type_identifier "undefined4") (function_declarator "FUN_000ce3b8(int param_1,int param_2,int param_3)" (identifier "FUN_000ce3b8") (parameter_list "(int param_1,int param_2,int param_3)" (( "(") (parameter_declaration "int param_1" (primitive_type "int") (identifier "param_1")) (, ",") (parameter_declaration "int param_2" (primitive_type "int") (identifier "param_2")) (, ",") (parameter_declaration "int param_3" (primitive_type "int") (identifier "param_3")) () ")"))) (compound_statement "{\n  undefined4 uVar1;\n  \n  if (param_1 != 0) {\n    do {\n      if ((param_3 != param_1) && ((param_2 == 0 || (param_2 == *(int *)(param_1 + 0x40))))) {\n        uVar1 = FUN_000ce2bc();\n        return uVar1;\n      }\n      param_1 = *(int *)(param_1 + 0x18);\n    } while (param_1 != 0);\n  }\n  if (param_3 != 0) {\n    *(byte *)(param_3 + 1) = *(byte *)(param_3 + 1) & 0xdf;\n  }\n  return 0;\n}" ({ "{") (declaration "undefined4 uVar1;" (type_identifier "undefined4") (identifier "uVar1") (; ";")) (if_statement "if (param_1 != 0) {\n    do {\n      if ((param_3 != param_1) && ((param_2 == 0 || (param_2 == *(int *)(param_1 + 0x40))))) {\n        uVar1 = FUN_000ce2bc();\n        return uVar1;\n      }\n      param_1 = *(int *)(param_1 + 0x18);\n    } while (param_1 != 0);\n  }" (if "if") (parenthesized_expression "(param_1 != 0)" (( "(") (binary_expression "param_1 != 0" (identifier "param_1") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n    do {\n      if ((param_3 != param_1) && ((param_2 == 0 || (param_2 == *(int *)(param_1 + 0x40))))) {\n        uVar1 = FUN_000ce2bc();\n        return uVar1;\n      }\n      param_1 = *(int *)(param_1 + 0x18);\n    } while (param_1 != 0);\n  }" ({ "{") (do_statement "do {\n      if ((param_3 != param_1) && ((param_2 == 0 || (param_2 == *(int *)(param_1 + 0x40))))) {\n        uVar1 = FUN_000ce2bc();\n        return uVar1;\n      }\n      param_1 = *(int *)(param_1 + 0x18);\n    } while (param_1 != 0);" (do "do") (compound_statement "{\n      if ((param_3 != param_1) && ((param_2 == 0 || (param_2 == *(int *)(param_1 + 0x40))))) {\n        uVar1 = FUN_000ce2bc();\n        return uVar1;\n      }\n      param_1 = *(int *)(param_1 + 0x18);\n    }" ({ "{") (if_statement "if ((param_3 != param_1) && ((param_2 == 0 || (param_2 == *(int *)(param_1 + 0x40))))) {\n        uVar1 = FUN_000ce2bc();\n        return uVar1;\n      }" (if "if") (parenthesized_expression "((param_3 != param_1) && ((param_2 == 0 || (param_2 == *(int *)(param_1 + 0x40)))))" (( "(") (binary_expression "(param_3 != param_1) && ((param_2 == 0 || (param_2 == *(int *)(param_1 + 0x40))))" (parenthesized_expression "(param_3 != param_1)" (( "(") (binary_expression "param_3 != param_1" (identifier "param_3") (!= "!=") (identifier "param_1")) () ")")) (&& "&&") (parenthesized_expression "((param_2 == 0 || (param_2 == *(int *)(param_1 + 0x40))))" (( "(") (parenthesized_expression "(param_2 == 0 || (param_2 == *(int *)(param_1 + 0x40)))" (( "(") (binary_expression "param_2 == 0 || (param_2 == *(int *)(param_1 + 0x40))" (binary_expression "param_2 == 0" (identifier "param_2") (== "==") (number_literal "0")) (|| "||") (parenthesized_expression "(param_2 == *(int *)(param_1 + 0x40))" (( "(") (binary_expression "param_2 == *(int *)(param_1 + 0x40)" (identifier "param_2") (== "==") (pointer_expression "*(int *)(param_1 + 0x40)" (* "*") (cast_expression "(int *)(param_1 + 0x40)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x40)" (( "(") (binary_expression "param_1 + 0x40" (identifier "param_1") (+ "+") (number_literal "0x40")) () ")"))))) () ")"))) () ")")) () ")"))) () ")")) (compound_statement "{\n        uVar1 = FUN_000ce2bc();\n        return uVar1;\n      }" ({ "{") (expression_statement "uVar1 = FUN_000ce2bc();" (assignment_expression "uVar1 = FUN_000ce2bc()" (identifier "uVar1") (= "=") (call_expression "FUN_000ce2bc()" (identifier "FUN_000ce2bc") (argument_list "()" (( "(") () ")")))) (; ";")) (return_statement "return uVar1;" (return "return") (identifier "uVar1") (; ";")) (} "}"))) (expression_statement "param_1 = *(int *)(param_1 + 0x18);" (assignment_expression "param_1 = *(int *)(param_1 + 0x18)" (identifier "param_1") (= "=") (pointer_expression "*(int *)(param_1 + 0x18)" (* "*") (cast_expression "(int *)(param_1 + 0x18)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x18)" (( "(") (binary_expression "param_1 + 0x18" (identifier "param_1") (+ "+") (number_literal "0x18")) () ")"))))) (; ";")) (} "}")) (while "while") (parenthesized_expression "(param_1 != 0)" (( "(") (binary_expression "param_1 != 0" (identifier "param_1") (!= "!=") (number_literal "0")) () ")")) (; ";")) (} "}"))) (if_statement "if (param_3 != 0) {\n    *(byte *)(param_3 + 1) = *(byte *)(param_3 + 1) & 0xdf;\n  }" (if "if") (parenthesized_expression "(param_3 != 0)" (( "(") (binary_expression "param_3 != 0" (identifier "param_3") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n    *(byte *)(param_3 + 1) = *(byte *)(param_3 + 1) & 0xdf;\n  }" ({ "{") (expression_statement "*(byte *)(param_3 + 1) = *(byte *)(param_3 + 1) & 0xdf;" (assignment_expression "*(byte *)(param_3 + 1) = *(byte *)(param_3 + 1) & 0xdf" (pointer_expression "*(byte *)(param_3 + 1)" (* "*") (cast_expression "(byte *)(param_3 + 1)" (( "(") (type_descriptor "byte *" (type_identifier "byte") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_3 + 1)" (( "(") (binary_expression "param_3 + 1" (identifier "param_3") (+ "+") (number_literal "1")) () ")")))) (= "=") (binary_expression "*(byte *)(param_3 + 1) & 0xdf" (pointer_expression "*(byte *)(param_3 + 1)" (* "*") (cast_expression "(byte *)(param_3 + 1)" (( "(") (type_descriptor "byte *" (type_identifier "byte") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_3 + 1)" (( "(") (binary_expression "param_3 + 1" (identifier "param_3") (+ "+") (number_literal "1")) () ")")))) (& "&") (number_literal "0xdf"))) (; ";")) (} "}"))) (return_statement "return 0;" (return "return") (number_literal "0") (; ";")) (} "}")))

int function_1(type_1 *var_1,type_2 var_3,type_3 *var_2)

{
  int iVar1;
  type_3 *p;
  
  if (var_1 != (type_1 *)0x0) {
    do {
      if ((var_2 != (type_3 *)var_1) && ((var_3 == 0 || (var_3 == ((type_3 *)var_1)->pgnoRoot))))
      {
        iVar1 = var_4((type_3 *)var_1,var_3,var_2);
        return iVar1;
      }
      var_1 = (type_1 *)((type_3 *)var_1)->pNext;
    } while ((type_3 *)var_1 != (type_3 *)0x0);
  }
  if (var_2 != (type_3 *)0x0) {
    var_2->curFlags = var_2->curFlags & 0xdf;
  }
  return 0;
}


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

undefined4 MASKED(int param_1,int param_2,int param_3)

{
  undefined4 uVar1;
  
  if (param_1 != 0) {
    do {
      if ((param_3 != param_1) && ((param_2 == 0 || (param_2 == *(int *)(param_1 + 0x40))))) {
        uVar1 = FUN_000ce2bc();
        return uVar1;
      }
      param_1 = *(int *)(param_1 + 0x18);
    } while (param_1 != 0);
  }
  if (param_3 != 0) {
    *(byte *)(param_3 + 1) = *(byte *)(param_3 + 1) & 0xdf;
  }
  return 0;
}

