
/* WARNING: Unknown calling convention */

void vfsUnlink(sqlite3_vfs *pVfs)

{
  sqlite3_vfs *psVar1;
  sqlite3_vfs *psVar2;
  
  if (pVfs != (sqlite3_vfs *)0x0) {
    psVar1 = *(sqlite3_vfs **)(PTR_sBegin_ru_stime_tv_sec_0018f948 + 0x460);
    if (psVar1 == pVfs) {
      *(sqlite3_vfs **)(PTR_sBegin_ru_stime_tv_sec_0018f948 + 0x460) = pVfs->pNext;
      return;
    }
    if (psVar1 != (sqlite3_vfs *)0x0) {
      do {
        psVar2 = psVar1;
        psVar1 = psVar2->pNext;
        if (psVar1 == (sqlite3_vfs *)0x0) {
          return;
        }
      } while (psVar1 != pVfs);
      psVar2->pNext = pVfs->pNext;
      return;
    }
  }
  return;
}



void FUN_00040cf4(int param_1)

{
  int iVar1;
  int iVar2;
  
  if (param_1 != 0) {
    iVar1 = *(int *)(PTR_DAT_0018f948 + 0x460);
    if (iVar1 == param_1) {
      *(undefined4 *)(PTR_DAT_0018f948 + 0x460) = *(undefined4 *)(param_1 + 0xc);
      return;
    }
    if (iVar1 != 0) {
      do {
        iVar2 = iVar1;
        iVar1 = *(int *)(iVar2 + 0xc);
        if (iVar1 == 0) {
          return;
        }
      } while (iVar1 != param_1);
      *(undefined4 *)(iVar2 + 0xc) = *(undefined4 *)(param_1 + 0xc);
      return;
    }
  }
  return;
}


lui gp,0x15
addiu gp,gp,0x6c2c
addu gp,gp,t9
beq a0,zero,0x00040d1c
_lw v0,-0x7fd8(gp)
lw v1,0x460(v0)
beq v1,a0,0x00040d24
_nop
bne v1,zero,0x00040d34
_nop
jr ra
_nop
lw v1,0xc(a0)
jr ra
_sw v1,0x460(v0)
or v1,v0,zero
lw v0,0xc(v1)
beq v0,zero,0x00040d50
_nop
bne v0,a0,0x00040d30
_nop
lw v0,0xc(a0)
sw v0,0xc(v1)
jr ra
_nop
(translation_unit "void FUN_00040cf4(int param_1)\n\n{\n  int iVar1;\n  int iVar2;\n  \n  if (param_1 != 0) {\n    iVar1 = *(int *)(PTR_DAT_0018f948 + 0x460);\n    if (iVar1 == param_1) {\n      *(undefined4 *)(PTR_DAT_0018f948 + 0x460) = *(undefined4 *)(param_1 + 0xc);\n      return;\n    }\n    if (iVar1 != 0) {\n      do {\n        iVar2 = iVar1;\n        iVar1 = *(int *)(iVar2 + 0xc);\n        if (iVar1 == 0) {\n          return;\n        }\n      } while (iVar1 != param_1);\n      *(undefined4 *)(iVar2 + 0xc) = *(undefined4 *)(param_1 + 0xc);\n      return;\n    }\n  }\n  return;\n}\n\n" (function_definition "void FUN_00040cf4(int param_1)\n\n{\n  int iVar1;\n  int iVar2;\n  \n  if (param_1 != 0) {\n    iVar1 = *(int *)(PTR_DAT_0018f948 + 0x460);\n    if (iVar1 == param_1) {\n      *(undefined4 *)(PTR_DAT_0018f948 + 0x460) = *(undefined4 *)(param_1 + 0xc);\n      return;\n    }\n    if (iVar1 != 0) {\n      do {\n        iVar2 = iVar1;\n        iVar1 = *(int *)(iVar2 + 0xc);\n        if (iVar1 == 0) {\n          return;\n        }\n      } while (iVar1 != param_1);\n      *(undefined4 *)(iVar2 + 0xc) = *(undefined4 *)(param_1 + 0xc);\n      return;\n    }\n  }\n  return;\n}" primitive_type (function_declarator "FUN_00040cf4(int param_1)" identifier (parameter_list "(int param_1)" ( (parameter_declaration "int param_1" primitive_type identifier) ))) (compound_statement "{\n  int iVar1;\n  int iVar2;\n  \n  if (param_1 != 0) {\n    iVar1 = *(int *)(PTR_DAT_0018f948 + 0x460);\n    if (iVar1 == param_1) {\n      *(undefined4 *)(PTR_DAT_0018f948 + 0x460) = *(undefined4 *)(param_1 + 0xc);\n      return;\n    }\n    if (iVar1 != 0) {\n      do {\n        iVar2 = iVar1;\n        iVar1 = *(int *)(iVar2 + 0xc);\n        if (iVar1 == 0) {\n          return;\n        }\n      } while (iVar1 != param_1);\n      *(undefined4 *)(iVar2 + 0xc) = *(undefined4 *)(param_1 + 0xc);\n      return;\n    }\n  }\n  return;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (if_statement "if (param_1 != 0) {\n    iVar1 = *(int *)(PTR_DAT_0018f948 + 0x460);\n    if (iVar1 == param_1) {\n      *(undefined4 *)(PTR_DAT_0018f948 + 0x460) = *(undefined4 *)(param_1 + 0xc);\n      return;\n    }\n    if (iVar1 != 0) {\n      do {\n        iVar2 = iVar1;\n        iVar1 = *(int *)(iVar2 + 0xc);\n        if (iVar1 == 0) {\n          return;\n        }\n      } while (iVar1 != param_1);\n      *(undefined4 *)(iVar2 + 0xc) = *(undefined4 *)(param_1 + 0xc);\n      return;\n    }\n  }" if (parenthesized_expression "(param_1 != 0)" ( (binary_expression "param_1 != 0" identifier != number_literal) )) (compound_statement "{\n    iVar1 = *(int *)(PTR_DAT_0018f948 + 0x460);\n    if (iVar1 == param_1) {\n      *(undefined4 *)(PTR_DAT_0018f948 + 0x460) = *(undefined4 *)(param_1 + 0xc);\n      return;\n    }\n    if (iVar1 != 0) {\n      do {\n        iVar2 = iVar1;\n        iVar1 = *(int *)(iVar2 + 0xc);\n        if (iVar1 == 0) {\n          return;\n        }\n      } while (iVar1 != param_1);\n      *(undefined4 *)(iVar2 + 0xc) = *(undefined4 *)(param_1 + 0xc);\n      return;\n    }\n  }" { (expression_statement "iVar1 = *(int *)(PTR_DAT_0018f948 + 0x460);" (assignment_expression "iVar1 = *(int *)(PTR_DAT_0018f948 + 0x460)" identifier = (pointer_expression "*(int *)(PTR_DAT_0018f948 + 0x460)" * (cast_expression "(int *)(PTR_DAT_0018f948 + 0x460)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(PTR_DAT_0018f948 + 0x460)" ( (binary_expression "PTR_DAT_0018f948 + 0x460" identifier + number_literal) ))))) ;) (if_statement "if (iVar1 == param_1) {\n      *(undefined4 *)(PTR_DAT_0018f948 + 0x460) = *(undefined4 *)(param_1 + 0xc);\n      return;\n    }" if (parenthesized_expression "(iVar1 == param_1)" ( (binary_expression "iVar1 == param_1" identifier == identifier) )) (compound_statement "{\n      *(undefined4 *)(PTR_DAT_0018f948 + 0x460) = *(undefined4 *)(param_1 + 0xc);\n      return;\n    }" { (expression_statement "*(undefined4 *)(PTR_DAT_0018f948 + 0x460) = *(undefined4 *)(param_1 + 0xc);" (assignment_expression "*(undefined4 *)(PTR_DAT_0018f948 + 0x460) = *(undefined4 *)(param_1 + 0xc)" (pointer_expression "*(undefined4 *)(PTR_DAT_0018f948 + 0x460)" * (cast_expression "(undefined4 *)(PTR_DAT_0018f948 + 0x460)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(PTR_DAT_0018f948 + 0x460)" ( (binary_expression "PTR_DAT_0018f948 + 0x460" identifier + number_literal) )))) = (pointer_expression "*(undefined4 *)(param_1 + 0xc)" * (cast_expression "(undefined4 *)(param_1 + 0xc)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0xc)" ( (binary_expression "param_1 + 0xc" identifier + number_literal) ))))) ;) (return_statement "return;" return ;) })) (if_statement "if (iVar1 != 0) {\n      do {\n        iVar2 = iVar1;\n        iVar1 = *(int *)(iVar2 + 0xc);\n        if (iVar1 == 0) {\n          return;\n        }\n      } while (iVar1 != param_1);\n      *(undefined4 *)(iVar2 + 0xc) = *(undefined4 *)(param_1 + 0xc);\n      return;\n    }" if (parenthesized_expression "(iVar1 != 0)" ( (binary_expression "iVar1 != 0" identifier != number_literal) )) (compound_statement "{\n      do {\n        iVar2 = iVar1;\n        iVar1 = *(int *)(iVar2 + 0xc);\n        if (iVar1 == 0) {\n          return;\n        }\n      } while (iVar1 != param_1);\n      *(undefined4 *)(iVar2 + 0xc) = *(undefined4 *)(param_1 + 0xc);\n      return;\n    }" { (do_statement "do {\n        iVar2 = iVar1;\n        iVar1 = *(int *)(iVar2 + 0xc);\n        if (iVar1 == 0) {\n          return;\n        }\n      } while (iVar1 != param_1);" do (compound_statement "{\n        iVar2 = iVar1;\n        iVar1 = *(int *)(iVar2 + 0xc);\n        if (iVar1 == 0) {\n          return;\n        }\n      }" { (expression_statement "iVar2 = iVar1;" (assignment_expression "iVar2 = iVar1" identifier = identifier) ;) (expression_statement "iVar1 = *(int *)(iVar2 + 0xc);" (assignment_expression "iVar1 = *(int *)(iVar2 + 0xc)" identifier = (pointer_expression "*(int *)(iVar2 + 0xc)" * (cast_expression "(int *)(iVar2 + 0xc)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar2 + 0xc)" ( (binary_expression "iVar2 + 0xc" identifier + number_literal) ))))) ;) (if_statement "if (iVar1 == 0) {\n          return;\n        }" if (parenthesized_expression "(iVar1 == 0)" ( (binary_expression "iVar1 == 0" identifier == number_literal) )) (compound_statement "{\n          return;\n        }" { (return_statement "return;" return ;) })) }) while (parenthesized_expression "(iVar1 != param_1)" ( (binary_expression "iVar1 != param_1" identifier != identifier) )) ;) (expression_statement "*(undefined4 *)(iVar2 + 0xc) = *(undefined4 *)(param_1 + 0xc);" (assignment_expression "*(undefined4 *)(iVar2 + 0xc) = *(undefined4 *)(param_1 + 0xc)" (pointer_expression "*(undefined4 *)(iVar2 + 0xc)" * (cast_expression "(undefined4 *)(iVar2 + 0xc)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar2 + 0xc)" ( (binary_expression "iVar2 + 0xc" identifier + number_literal) )))) = (pointer_expression "*(undefined4 *)(param_1 + 0xc)" * (cast_expression "(undefined4 *)(param_1 + 0xc)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0xc)" ( (binary_expression "param_1 + 0xc" identifier + number_literal) ))))) ;) (return_statement "return;" return ;) })) })) (return_statement "return;" return ;) })))
(translation_unit "/* WARNING: Unknown calling convention */\n\nvoid vfsUnlink(sqlite3_vfs *pVfs)\n\n{\n  sqlite3_vfs *psVar1;\n  sqlite3_vfs *psVar2;\n  \n  if (pVfs != (sqlite3_vfs *)0x0) {\n    psVar1 = *(sqlite3_vfs **)(PTR_sBegin_ru_stime_tv_sec_0018f948 + 0x460);\n    if (psVar1 == pVfs) {\n      *(sqlite3_vfs **)(PTR_sBegin_ru_stime_tv_sec_0018f948 + 0x460) = pVfs->pNext;\n      return;\n    }\n    if (psVar1 != (sqlite3_vfs *)0x0) {\n      do {\n        psVar2 = psVar1;\n        psVar1 = psVar2->pNext;\n        if (psVar1 == (sqlite3_vfs *)0x0) {\n          return;\n        }\n      } while (psVar1 != pVfs);\n      psVar2->pNext = pVfs->pNext;\n      return;\n    }\n  }\n  return;\n}\n\n" comment (function_definition "void vfsUnlink(sqlite3_vfs *pVfs)\n\n{\n  sqlite3_vfs *psVar1;\n  sqlite3_vfs *psVar2;\n  \n  if (pVfs != (sqlite3_vfs *)0x0) {\n    psVar1 = *(sqlite3_vfs **)(PTR_sBegin_ru_stime_tv_sec_0018f948 + 0x460);\n    if (psVar1 == pVfs) {\n      *(sqlite3_vfs **)(PTR_sBegin_ru_stime_tv_sec_0018f948 + 0x460) = pVfs->pNext;\n      return;\n    }\n    if (psVar1 != (sqlite3_vfs *)0x0) {\n      do {\n        psVar2 = psVar1;\n        psVar1 = psVar2->pNext;\n        if (psVar1 == (sqlite3_vfs *)0x0) {\n          return;\n        }\n      } while (psVar1 != pVfs);\n      psVar2->pNext = pVfs->pNext;\n      return;\n    }\n  }\n  return;\n}" primitive_type (function_declarator "vfsUnlink(sqlite3_vfs *pVfs)" identifier (parameter_list "(sqlite3_vfs *pVfs)" ( (parameter_declaration "sqlite3_vfs *pVfs" type_identifier (pointer_declarator "*pVfs" * identifier)) ))) (compound_statement "{\n  sqlite3_vfs *psVar1;\n  sqlite3_vfs *psVar2;\n  \n  if (pVfs != (sqlite3_vfs *)0x0) {\n    psVar1 = *(sqlite3_vfs **)(PTR_sBegin_ru_stime_tv_sec_0018f948 + 0x460);\n    if (psVar1 == pVfs) {\n      *(sqlite3_vfs **)(PTR_sBegin_ru_stime_tv_sec_0018f948 + 0x460) = pVfs->pNext;\n      return;\n    }\n    if (psVar1 != (sqlite3_vfs *)0x0) {\n      do {\n        psVar2 = psVar1;\n        psVar1 = psVar2->pNext;\n        if (psVar1 == (sqlite3_vfs *)0x0) {\n          return;\n        }\n      } while (psVar1 != pVfs);\n      psVar2->pNext = pVfs->pNext;\n      return;\n    }\n  }\n  return;\n}" { (declaration "sqlite3_vfs *psVar1;" type_identifier (pointer_declarator "*psVar1" * identifier) ;) (declaration "sqlite3_vfs *psVar2;" type_identifier (pointer_declarator "*psVar2" * identifier) ;) (if_statement "if (pVfs != (sqlite3_vfs *)0x0) {\n    psVar1 = *(sqlite3_vfs **)(PTR_sBegin_ru_stime_tv_sec_0018f948 + 0x460);\n    if (psVar1 == pVfs) {\n      *(sqlite3_vfs **)(PTR_sBegin_ru_stime_tv_sec_0018f948 + 0x460) = pVfs->pNext;\n      return;\n    }\n    if (psVar1 != (sqlite3_vfs *)0x0) {\n      do {\n        psVar2 = psVar1;\n        psVar1 = psVar2->pNext;\n        if (psVar1 == (sqlite3_vfs *)0x0) {\n          return;\n        }\n      } while (psVar1 != pVfs);\n      psVar2->pNext = pVfs->pNext;\n      return;\n    }\n  }" if (parenthesized_expression "(pVfs != (sqlite3_vfs *)0x0)" ( (binary_expression "pVfs != (sqlite3_vfs *)0x0" identifier != (cast_expression "(sqlite3_vfs *)0x0" ( (type_descriptor "sqlite3_vfs *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    psVar1 = *(sqlite3_vfs **)(PTR_sBegin_ru_stime_tv_sec_0018f948 + 0x460);\n    if (psVar1 == pVfs) {\n      *(sqlite3_vfs **)(PTR_sBegin_ru_stime_tv_sec_0018f948 + 0x460) = pVfs->pNext;\n      return;\n    }\n    if (psVar1 != (sqlite3_vfs *)0x0) {\n      do {\n        psVar2 = psVar1;\n        psVar1 = psVar2->pNext;\n        if (psVar1 == (sqlite3_vfs *)0x0) {\n          return;\n        }\n      } while (psVar1 != pVfs);\n      psVar2->pNext = pVfs->pNext;\n      return;\n    }\n  }" { (expression_statement "psVar1 = *(sqlite3_vfs **)(PTR_sBegin_ru_stime_tv_sec_0018f948 + 0x460);" (assignment_expression "psVar1 = *(sqlite3_vfs **)(PTR_sBegin_ru_stime_tv_sec_0018f948 + 0x460)" identifier = (pointer_expression "*(sqlite3_vfs **)(PTR_sBegin_ru_stime_tv_sec_0018f948 + 0x460)" * (cast_expression "(sqlite3_vfs **)(PTR_sBegin_ru_stime_tv_sec_0018f948 + 0x460)" ( (type_descriptor "sqlite3_vfs **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(PTR_sBegin_ru_stime_tv_sec_0018f948 + 0x460)" ( (binary_expression "PTR_sBegin_ru_stime_tv_sec_0018f948 + 0x460" identifier + number_literal) ))))) ;) (if_statement "if (psVar1 == pVfs) {\n      *(sqlite3_vfs **)(PTR_sBegin_ru_stime_tv_sec_0018f948 + 0x460) = pVfs->pNext;\n      return;\n    }" if (parenthesized_expression "(psVar1 == pVfs)" ( (binary_expression "psVar1 == pVfs" identifier == identifier) )) (compound_statement "{\n      *(sqlite3_vfs **)(PTR_sBegin_ru_stime_tv_sec_0018f948 + 0x460) = pVfs->pNext;\n      return;\n    }" { (expression_statement "*(sqlite3_vfs **)(PTR_sBegin_ru_stime_tv_sec_0018f948 + 0x460) = pVfs->pNext;" (assignment_expression "*(sqlite3_vfs **)(PTR_sBegin_ru_stime_tv_sec_0018f948 + 0x460) = pVfs->pNext" (pointer_expression "*(sqlite3_vfs **)(PTR_sBegin_ru_stime_tv_sec_0018f948 + 0x460)" * (cast_expression "(sqlite3_vfs **)(PTR_sBegin_ru_stime_tv_sec_0018f948 + 0x460)" ( (type_descriptor "sqlite3_vfs **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(PTR_sBegin_ru_stime_tv_sec_0018f948 + 0x460)" ( (binary_expression "PTR_sBegin_ru_stime_tv_sec_0018f948 + 0x460" identifier + number_literal) )))) = (field_expression "pVfs->pNext" identifier -> field_identifier)) ;) (return_statement "return;" return ;) })) (if_statement "if (psVar1 != (sqlite3_vfs *)0x0) {\n      do {\n        psVar2 = psVar1;\n        psVar1 = psVar2->pNext;\n        if (psVar1 == (sqlite3_vfs *)0x0) {\n          return;\n        }\n      } while (psVar1 != pVfs);\n      psVar2->pNext = pVfs->pNext;\n      return;\n    }" if (parenthesized_expression "(psVar1 != (sqlite3_vfs *)0x0)" ( (binary_expression "psVar1 != (sqlite3_vfs *)0x0" identifier != (cast_expression "(sqlite3_vfs *)0x0" ( (type_descriptor "sqlite3_vfs *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n      do {\n        psVar2 = psVar1;\n        psVar1 = psVar2->pNext;\n        if (psVar1 == (sqlite3_vfs *)0x0) {\n          return;\n        }\n      } while (psVar1 != pVfs);\n      psVar2->pNext = pVfs->pNext;\n      return;\n    }" { (do_statement "do {\n        psVar2 = psVar1;\n        psVar1 = psVar2->pNext;\n        if (psVar1 == (sqlite3_vfs *)0x0) {\n          return;\n        }\n      } while (psVar1 != pVfs);" do (compound_statement "{\n        psVar2 = psVar1;\n        psVar1 = psVar2->pNext;\n        if (psVar1 == (sqlite3_vfs *)0x0) {\n          return;\n        }\n      }" { (expression_statement "psVar2 = psVar1;" (assignment_expression "psVar2 = psVar1" identifier = identifier) ;) (expression_statement "psVar1 = psVar2->pNext;" (assignment_expression "psVar1 = psVar2->pNext" identifier = (field_expression "psVar2->pNext" identifier -> field_identifier)) ;) (if_statement "if (psVar1 == (sqlite3_vfs *)0x0) {\n          return;\n        }" if (parenthesized_expression "(psVar1 == (sqlite3_vfs *)0x0)" ( (binary_expression "psVar1 == (sqlite3_vfs *)0x0" identifier == (cast_expression "(sqlite3_vfs *)0x0" ( (type_descriptor "sqlite3_vfs *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n          return;\n        }" { (return_statement "return;" return ;) })) }) while (parenthesized_expression "(psVar1 != pVfs)" ( (binary_expression "psVar1 != pVfs" identifier != identifier) )) ;) (expression_statement "psVar2->pNext = pVfs->pNext;" (assignment_expression "psVar2->pNext = pVfs->pNext" (field_expression "psVar2->pNext" identifier -> field_identifier) = (field_expression "pVfs->pNext" identifier -> field_identifier)) ;) (return_statement "return;" return ;) })) })) (return_statement "return;" return ;) })))
(translation_unit "void FUN_00040cf4(int param_1)\n\n{\n  int iVar1;\n  int iVar2;\n  \n  if (param_1 != 0) {\n    iVar1 = *(int *)(PTR_DAT_0018f948 + 0x460);\n    if (iVar1 == param_1) {\n      *(undefined4 *)(PTR_DAT_0018f948 + 0x460) = *(undefined4 *)(param_1 + 0xc);\n      return;\n    }\n    if (iVar1 != 0) {\n      do {\n        iVar2 = iVar1;\n        iVar1 = *(int *)(iVar2 + 0xc);\n        if (iVar1 == 0) {\n          return;\n        }\n      } while (iVar1 != param_1);\n      *(undefined4 *)(iVar2 + 0xc) = *(undefined4 *)(param_1 + 0xc);\n      return;\n    }\n  }\n  return;\n}\n\n" (function_definition "void FUN_00040cf4(int param_1)\n\n{\n  int iVar1;\n  int iVar2;\n  \n  if (param_1 != 0) {\n    iVar1 = *(int *)(PTR_DAT_0018f948 + 0x460);\n    if (iVar1 == param_1) {\n      *(undefined4 *)(PTR_DAT_0018f948 + 0x460) = *(undefined4 *)(param_1 + 0xc);\n      return;\n    }\n    if (iVar1 != 0) {\n      do {\n        iVar2 = iVar1;\n        iVar1 = *(int *)(iVar2 + 0xc);\n        if (iVar1 == 0) {\n          return;\n        }\n      } while (iVar1 != param_1);\n      *(undefined4 *)(iVar2 + 0xc) = *(undefined4 *)(param_1 + 0xc);\n      return;\n    }\n  }\n  return;\n}" primitive_type (function_declarator "FUN_00040cf4(int param_1)" identifier (parameter_list "(int param_1)" ( (parameter_declaration "int param_1" primitive_type identifier) ))) (compound_statement "{\n  int iVar1;\n  int iVar2;\n  \n  if (param_1 != 0) {\n    iVar1 = *(int *)(PTR_DAT_0018f948 + 0x460);\n    if (iVar1 == param_1) {\n      *(undefined4 *)(PTR_DAT_0018f948 + 0x460) = *(undefined4 *)(param_1 + 0xc);\n      return;\n    }\n    if (iVar1 != 0) {\n      do {\n        iVar2 = iVar1;\n        iVar1 = *(int *)(iVar2 + 0xc);\n        if (iVar1 == 0) {\n          return;\n        }\n      } while (iVar1 != param_1);\n      *(undefined4 *)(iVar2 + 0xc) = *(undefined4 *)(param_1 + 0xc);\n      return;\n    }\n  }\n  return;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (if_statement "if (param_1 != 0) {\n    iVar1 = *(int *)(PTR_DAT_0018f948 + 0x460);\n    if (iVar1 == param_1) {\n      *(undefined4 *)(PTR_DAT_0018f948 + 0x460) = *(undefined4 *)(param_1 + 0xc);\n      return;\n    }\n    if (iVar1 != 0) {\n      do {\n        iVar2 = iVar1;\n        iVar1 = *(int *)(iVar2 + 0xc);\n        if (iVar1 == 0) {\n          return;\n        }\n      } while (iVar1 != param_1);\n      *(undefined4 *)(iVar2 + 0xc) = *(undefined4 *)(param_1 + 0xc);\n      return;\n    }\n  }" if (parenthesized_expression "(param_1 != 0)" ( (binary_expression "param_1 != 0" identifier != number_literal) )) (compound_statement "{\n    iVar1 = *(int *)(PTR_DAT_0018f948 + 0x460);\n    if (iVar1 == param_1) {\n      *(undefined4 *)(PTR_DAT_0018f948 + 0x460) = *(undefined4 *)(param_1 + 0xc);\n      return;\n    }\n    if (iVar1 != 0) {\n      do {\n        iVar2 = iVar1;\n        iVar1 = *(int *)(iVar2 + 0xc);\n        if (iVar1 == 0) {\n          return;\n        }\n      } while (iVar1 != param_1);\n      *(undefined4 *)(iVar2 + 0xc) = *(undefined4 *)(param_1 + 0xc);\n      return;\n    }\n  }" { (expression_statement "iVar1 = *(int *)(PTR_DAT_0018f948 + 0x460);" (assignment_expression "iVar1 = *(int *)(PTR_DAT_0018f948 + 0x460)" identifier = (pointer_expression "*(int *)(PTR_DAT_0018f948 + 0x460)" * (cast_expression "(int *)(PTR_DAT_0018f948 + 0x460)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(PTR_DAT_0018f948 + 0x460)" ( (binary_expression "PTR_DAT_0018f948 + 0x460" identifier + number_literal) ))))) ;) (if_statement "if (iVar1 == param_1) {\n      *(undefined4 *)(PTR_DAT_0018f948 + 0x460) = *(undefined4 *)(param_1 + 0xc);\n      return;\n    }" if (parenthesized_expression "(iVar1 == param_1)" ( (binary_expression "iVar1 == param_1" identifier == identifier) )) (compound_statement "{\n      *(undefined4 *)(PTR_DAT_0018f948 + 0x460) = *(undefined4 *)(param_1 + 0xc);\n      return;\n    }" { (expression_statement "*(undefined4 *)(PTR_DAT_0018f948 + 0x460) = *(undefined4 *)(param_1 + 0xc);" (assignment_expression "*(undefined4 *)(PTR_DAT_0018f948 + 0x460) = *(undefined4 *)(param_1 + 0xc)" (pointer_expression "*(undefined4 *)(PTR_DAT_0018f948 + 0x460)" * (cast_expression "(undefined4 *)(PTR_DAT_0018f948 + 0x460)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(PTR_DAT_0018f948 + 0x460)" ( (binary_expression "PTR_DAT_0018f948 + 0x460" identifier + number_literal) )))) = (pointer_expression "*(undefined4 *)(param_1 + 0xc)" * (cast_expression "(undefined4 *)(param_1 + 0xc)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0xc)" ( (binary_expression "param_1 + 0xc" identifier + number_literal) ))))) ;) (return_statement "return;" return ;) })) (if_statement "if (iVar1 != 0) {\n      do {\n        iVar2 = iVar1;\n        iVar1 = *(int *)(iVar2 + 0xc);\n        if (iVar1 == 0) {\n          return;\n        }\n      } while (iVar1 != param_1);\n      *(undefined4 *)(iVar2 + 0xc) = *(undefined4 *)(param_1 + 0xc);\n      return;\n    }" if (parenthesized_expression "(iVar1 != 0)" ( (binary_expression "iVar1 != 0" identifier != number_literal) )) (compound_statement "{\n      do {\n        iVar2 = iVar1;\n        iVar1 = *(int *)(iVar2 + 0xc);\n        if (iVar1 == 0) {\n          return;\n        }\n      } while (iVar1 != param_1);\n      *(undefined4 *)(iVar2 + 0xc) = *(undefined4 *)(param_1 + 0xc);\n      return;\n    }" { (do_statement "do {\n        iVar2 = iVar1;\n        iVar1 = *(int *)(iVar2 + 0xc);\n        if (iVar1 == 0) {\n          return;\n        }\n      } while (iVar1 != param_1);" do (compound_statement "{\n        iVar2 = iVar1;\n        iVar1 = *(int *)(iVar2 + 0xc);\n        if (iVar1 == 0) {\n          return;\n        }\n      }" { (expression_statement "iVar2 = iVar1;" (assignment_expression "iVar2 = iVar1" identifier = identifier) ;) (expression_statement "iVar1 = *(int *)(iVar2 + 0xc);" (assignment_expression "iVar1 = *(int *)(iVar2 + 0xc)" identifier = (pointer_expression "*(int *)(iVar2 + 0xc)" * (cast_expression "(int *)(iVar2 + 0xc)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar2 + 0xc)" ( (binary_expression "iVar2 + 0xc" identifier + number_literal) ))))) ;) (if_statement "if (iVar1 == 0) {\n          return;\n        }" if (parenthesized_expression "(iVar1 == 0)" ( (binary_expression "iVar1 == 0" identifier == number_literal) )) (compound_statement "{\n          return;\n        }" { (return_statement "return;" return ;) })) }) while (parenthesized_expression "(iVar1 != param_1)" ( (binary_expression "iVar1 != param_1" identifier != identifier) )) ;) (expression_statement "*(undefined4 *)(iVar2 + 0xc) = *(undefined4 *)(param_1 + 0xc);" (assignment_expression "*(undefined4 *)(iVar2 + 0xc) = *(undefined4 *)(param_1 + 0xc)" (pointer_expression "*(undefined4 *)(iVar2 + 0xc)" * (cast_expression "(undefined4 *)(iVar2 + 0xc)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar2 + 0xc)" ( (binary_expression "iVar2 + 0xc" identifier + number_literal) )))) = (pointer_expression "*(undefined4 *)(param_1 + 0xc)" * (cast_expression "(undefined4 *)(param_1 + 0xc)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0xc)" ( (binary_expression "param_1 + 0xc" identifier + number_literal) ))))) ;) (return_statement "return;" return ;) })) })) (return_statement "return;" return ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == IDENT) )) (compound_statement { (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (return_statement return ;) })) (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (do_statement do (compound_statement { (expression_statement (assignment_expression IDENT = IDENT) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (return_statement return ;) })) }) while (parenthesized_expression ( (binary_expression IDENT != IDENT) )) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (return_statement return ;) })) })) (return_statement return ;) })))
(function_definition "void FUN_00040cf4(int param_1)\n\n{\n  int iVar1;\n  int iVar2;\n  \n  if (param_1 != 0) {\n    iVar1 = *(int *)(PTR_DAT_0018f948 + 0x460);\n    if (iVar1 == param_1) {\n      *(undefined4 *)(PTR_DAT_0018f948 + 0x460) = *(undefined4 *)(param_1 + 0xc);\n      return;\n    }\n    if (iVar1 != 0) {\n      do {\n        iVar2 = iVar1;\n        iVar1 = *(int *)(iVar2 + 0xc);\n        if (iVar1 == 0) {\n          return;\n        }\n      } while (iVar1 != param_1);\n      *(undefined4 *)(iVar2 + 0xc) = *(undefined4 *)(param_1 + 0xc);\n      return;\n    }\n  }\n  return;\n}" (primitive_type "void") (function_declarator "FUN_00040cf4(int param_1)" (identifier "FUN_00040cf4") (parameter_list "(int param_1)" (( "(") (parameter_declaration "int param_1" (primitive_type "int") (identifier "param_1")) () ")"))) (compound_statement "{\n  int iVar1;\n  int iVar2;\n  \n  if (param_1 != 0) {\n    iVar1 = *(int *)(PTR_DAT_0018f948 + 0x460);\n    if (iVar1 == param_1) {\n      *(undefined4 *)(PTR_DAT_0018f948 + 0x460) = *(undefined4 *)(param_1 + 0xc);\n      return;\n    }\n    if (iVar1 != 0) {\n      do {\n        iVar2 = iVar1;\n        iVar1 = *(int *)(iVar2 + 0xc);\n        if (iVar1 == 0) {\n          return;\n        }\n      } while (iVar1 != param_1);\n      *(undefined4 *)(iVar2 + 0xc) = *(undefined4 *)(param_1 + 0xc);\n      return;\n    }\n  }\n  return;\n}" ({ "{") (declaration "int iVar1;" (primitive_type "int") (identifier "iVar1") (; ";")) (declaration "int iVar2;" (primitive_type "int") (identifier "iVar2") (; ";")) (if_statement "if (param_1 != 0) {\n    iVar1 = *(int *)(PTR_DAT_0018f948 + 0x460);\n    if (iVar1 == param_1) {\n      *(undefined4 *)(PTR_DAT_0018f948 + 0x460) = *(undefined4 *)(param_1 + 0xc);\n      return;\n    }\n    if (iVar1 != 0) {\n      do {\n        iVar2 = iVar1;\n        iVar1 = *(int *)(iVar2 + 0xc);\n        if (iVar1 == 0) {\n          return;\n        }\n      } while (iVar1 != param_1);\n      *(undefined4 *)(iVar2 + 0xc) = *(undefined4 *)(param_1 + 0xc);\n      return;\n    }\n  }" (if "if") (parenthesized_expression "(param_1 != 0)" (( "(") (binary_expression "param_1 != 0" (identifier "param_1") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n    iVar1 = *(int *)(PTR_DAT_0018f948 + 0x460);\n    if (iVar1 == param_1) {\n      *(undefined4 *)(PTR_DAT_0018f948 + 0x460) = *(undefined4 *)(param_1 + 0xc);\n      return;\n    }\n    if (iVar1 != 0) {\n      do {\n        iVar2 = iVar1;\n        iVar1 = *(int *)(iVar2 + 0xc);\n        if (iVar1 == 0) {\n          return;\n        }\n      } while (iVar1 != param_1);\n      *(undefined4 *)(iVar2 + 0xc) = *(undefined4 *)(param_1 + 0xc);\n      return;\n    }\n  }" ({ "{") (expression_statement "iVar1 = *(int *)(PTR_DAT_0018f948 + 0x460);" (assignment_expression "iVar1 = *(int *)(PTR_DAT_0018f948 + 0x460)" (identifier "iVar1") (= "=") (pointer_expression "*(int *)(PTR_DAT_0018f948 + 0x460)" (* "*") (cast_expression "(int *)(PTR_DAT_0018f948 + 0x460)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(PTR_DAT_0018f948 + 0x460)" (( "(") (binary_expression "PTR_DAT_0018f948 + 0x460" (identifier "PTR_DAT_0018f948") (+ "+") (number_literal "0x460")) () ")"))))) (; ";")) (if_statement "if (iVar1 == param_1) {\n      *(undefined4 *)(PTR_DAT_0018f948 + 0x460) = *(undefined4 *)(param_1 + 0xc);\n      return;\n    }" (if "if") (parenthesized_expression "(iVar1 == param_1)" (( "(") (binary_expression "iVar1 == param_1" (identifier "iVar1") (== "==") (identifier "param_1")) () ")")) (compound_statement "{\n      *(undefined4 *)(PTR_DAT_0018f948 + 0x460) = *(undefined4 *)(param_1 + 0xc);\n      return;\n    }" ({ "{") (expression_statement "*(undefined4 *)(PTR_DAT_0018f948 + 0x460) = *(undefined4 *)(param_1 + 0xc);" (assignment_expression "*(undefined4 *)(PTR_DAT_0018f948 + 0x460) = *(undefined4 *)(param_1 + 0xc)" (pointer_expression "*(undefined4 *)(PTR_DAT_0018f948 + 0x460)" (* "*") (cast_expression "(undefined4 *)(PTR_DAT_0018f948 + 0x460)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(PTR_DAT_0018f948 + 0x460)" (( "(") (binary_expression "PTR_DAT_0018f948 + 0x460" (identifier "PTR_DAT_0018f948") (+ "+") (number_literal "0x460")) () ")")))) (= "=") (pointer_expression "*(undefined4 *)(param_1 + 0xc)" (* "*") (cast_expression "(undefined4 *)(param_1 + 0xc)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0xc)" (( "(") (binary_expression "param_1 + 0xc" (identifier "param_1") (+ "+") (number_literal "0xc")) () ")"))))) (; ";")) (return_statement "return;" (return "return") (; ";")) (} "}"))) (if_statement "if (iVar1 != 0) {\n      do {\n        iVar2 = iVar1;\n        iVar1 = *(int *)(iVar2 + 0xc);\n        if (iVar1 == 0) {\n          return;\n        }\n      } while (iVar1 != param_1);\n      *(undefined4 *)(iVar2 + 0xc) = *(undefined4 *)(param_1 + 0xc);\n      return;\n    }" (if "if") (parenthesized_expression "(iVar1 != 0)" (( "(") (binary_expression "iVar1 != 0" (identifier "iVar1") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n      do {\n        iVar2 = iVar1;\n        iVar1 = *(int *)(iVar2 + 0xc);\n        if (iVar1 == 0) {\n          return;\n        }\n      } while (iVar1 != param_1);\n      *(undefined4 *)(iVar2 + 0xc) = *(undefined4 *)(param_1 + 0xc);\n      return;\n    }" ({ "{") (do_statement "do {\n        iVar2 = iVar1;\n        iVar1 = *(int *)(iVar2 + 0xc);\n        if (iVar1 == 0) {\n          return;\n        }\n      } while (iVar1 != param_1);" (do "do") (compound_statement "{\n        iVar2 = iVar1;\n        iVar1 = *(int *)(iVar2 + 0xc);\n        if (iVar1 == 0) {\n          return;\n        }\n      }" ({ "{") (expression_statement "iVar2 = iVar1;" (assignment_expression "iVar2 = iVar1" (identifier "iVar2") (= "=") (identifier "iVar1")) (; ";")) (expression_statement "iVar1 = *(int *)(iVar2 + 0xc);" (assignment_expression "iVar1 = *(int *)(iVar2 + 0xc)" (identifier "iVar1") (= "=") (pointer_expression "*(int *)(iVar2 + 0xc)" (* "*") (cast_expression "(int *)(iVar2 + 0xc)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar2 + 0xc)" (( "(") (binary_expression "iVar2 + 0xc" (identifier "iVar2") (+ "+") (number_literal "0xc")) () ")"))))) (; ";")) (if_statement "if (iVar1 == 0) {\n          return;\n        }" (if "if") (parenthesized_expression "(iVar1 == 0)" (( "(") (binary_expression "iVar1 == 0" (identifier "iVar1") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n          return;\n        }" ({ "{") (return_statement "return;" (return "return") (; ";")) (} "}"))) (} "}")) (while "while") (parenthesized_expression "(iVar1 != param_1)" (( "(") (binary_expression "iVar1 != param_1" (identifier "iVar1") (!= "!=") (identifier "param_1")) () ")")) (; ";")) (expression_statement "*(undefined4 *)(iVar2 + 0xc) = *(undefined4 *)(param_1 + 0xc);" (assignment_expression "*(undefined4 *)(iVar2 + 0xc) = *(undefined4 *)(param_1 + 0xc)" (pointer_expression "*(undefined4 *)(iVar2 + 0xc)" (* "*") (cast_expression "(undefined4 *)(iVar2 + 0xc)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar2 + 0xc)" (( "(") (binary_expression "iVar2 + 0xc" (identifier "iVar2") (+ "+") (number_literal "0xc")) () ")")))) (= "=") (pointer_expression "*(undefined4 *)(param_1 + 0xc)" (* "*") (cast_expression "(undefined4 *)(param_1 + 0xc)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0xc)" (( "(") (binary_expression "param_1 + 0xc" (identifier "param_1") (+ "+") (number_literal "0xc")) () ")"))))) (; ";")) (return_statement "return;" (return "return") (; ";")) (} "}"))) (} "}"))) (return_statement "return;" (return "return") (; ";")) (} "}")))

/* WARNING: Unknown calling convention */

void function_1(type_1 *var_1)

{
  type_1 *var_3;
  type_1 *psVar2;
  
  if (var_1 != (type_1 *)0x0) {
    var_3 = *(type_1 **)(var_2 + 0x460);
    if (var_3 == var_1) {
      *(type_1 **)(var_2 + 0x460) = var_1->pNext;
      return;
    }
    if (var_3 != (type_1 *)0x0) {
      do {
        psVar2 = var_3;
        var_3 = psVar2->pNext;
        if (var_3 == (type_1 *)0x0) {
          return;
        }
      } while (var_3 != var_1);
      psVar2->pNext = var_1->pNext;
      return;
    }
  }
  return;
}


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

void MASKED(int param_1)

{
  int iVar1;
  int iVar2;
  
  if (param_1 != 0) {
    iVar1 = *(int *)(PTR_DAT_0018f948 + 0x460);
    if (iVar1 == param_1) {
      *(undefined4 *)(PTR_DAT_0018f948 + 0x460) = *(undefined4 *)(param_1 + 0xc);
      return;
    }
    if (iVar1 != 0) {
      do {
        iVar2 = iVar1;
        iVar1 = *(int *)(iVar2 + 0xc);
        if (iVar1 == 0) {
          return;
        }
      } while (iVar1 != param_1);
      *(undefined4 *)(iVar2 + 0xc) = *(undefined4 *)(param_1 + 0xc);
      return;
    }
  }
  return;
}

