
int walBusyLock(Wal *pWal,_func_int_void_ptr *xBusy,void *pBusyArg,int lockIdx,int n)

{
  int iVar1;
  Wal *pWal_1;
  
  pWal_1 = (Wal *)lockIdx;
  do {
    if (pWal->exclusiveMode != '\0') {
      return 0;
    }
    iVar1 = walLockExclusive((Wal *)pWal->pDbFd,lockIdx,n,pWal_1);
    if (xBusy == (_func_int_void_ptr *)0x0) {
      return iVar1;
    }
    if (iVar1 != 5) {
      return iVar1;
    }
    iVar1 = (*xBusy)(pBusyArg);
  } while (iVar1 != 0);
  return 5;
}



int FUN_00056570(int param_1,code *param_2,undefined4 param_3,undefined4 param_4,undefined4 param_5)

{
  int iVar1;
  
  do {
    if (*(char *)(param_1 + 0x2b) != '\0') {
      return 0;
    }
    iVar1 = FUN_00056560(*(undefined4 *)(param_1 + 4),param_4,param_5);
    if (param_2 == (code *)0x0) {
      return iVar1;
    }
    if (iVar1 != 5) {
      return iVar1;
    }
    iVar1 = (*param_2)(param_3);
  } while (iVar1 != 0);
  return 5;
}


lui gp,0x14
addiu gp,gp,0x23b0
addu gp,gp,t9
addiu sp,sp,-0x40
sw s5,0x30(sp)
sw gp,0x10(sp)
sw s7,0x38(sp)
or s7,a2,zero
sw s6,0x34(sp)
li s6,0x5
sw s4,0x2c(sp)
sw s3,0x28(sp)
or s3,a3,zero
sw s2,0x24(sp)
or s2,a1,zero
sw s0,0x1c(sp)
or s0,a0,zero
sw ra,0x3c(sp)
sw s1,0x20(sp)
lw s5,-0x7d78(gp)
lw s4,0x50(sp)
b 0x000565fc
_addiu s5,s5,0x6560
or t9,s5,zero
bal 0x00056560
_lw a0,0x4(s0)
or a0,s7,zero
beq s2,zero,0x00056610
_or s1,v0,zero
bne v0,s6,0x00056610
_or t9,s2,zero
jalr t9
_nop
beq v0,zero,0x00056614
_lw ra,0x3c(sp)
lbu v0,0x2b(s0)
or a2,s4,zero
beq v0,zero,0x000565cc
_or a1,s3,zero
or s1,zero,zero
lw ra,0x3c(sp)
or v0,s1,zero
lw s7,0x38(sp)
lw s6,0x34(sp)
lw s5,0x30(sp)
lw s4,0x2c(sp)
lw s3,0x28(sp)
lw s2,0x24(sp)
lw s1,0x20(sp)
lw s0,0x1c(sp)
jr ra
_addiu sp,sp,0x40
(translation_unit "int FUN_00056570(int param_1,code *param_2,undefined4 param_3,undefined4 param_4,undefined4 param_5)\n\n{\n  int iVar1;\n  \n  do {\n    if (*(char *)(param_1 + 0x2b) != '\0') {\n      return 0;\n    }\n    iVar1 = FUN_00056560(*(undefined4 *)(param_1 + 4),param_4,param_5);\n    if (param_2 == (code *)0x0) {\n      return iVar1;\n    }\n    if (iVar1 != 5) {\n      return iVar1;\n    }\n    iVar1 = (*param_2)(param_3);\n  } while (iVar1 != 0);\n  return 5;\n}\n\n" (function_definition "int FUN_00056570(int param_1,code *param_2,undefined4 param_3,undefined4 param_4,undefined4 param_5)\n\n{\n  int iVar1;\n  \n  do {\n    if (*(char *)(param_1 + 0x2b) != '\0') {\n      return 0;\n    }\n    iVar1 = FUN_00056560(*(undefined4 *)(param_1 + 4),param_4,param_5);\n    if (param_2 == (code *)0x0) {\n      return iVar1;\n    }\n    if (iVar1 != 5) {\n      return iVar1;\n    }\n    iVar1 = (*param_2)(param_3);\n  } while (iVar1 != 0);\n  return 5;\n}" primitive_type (function_declarator "FUN_00056570(int param_1,code *param_2,undefined4 param_3,undefined4 param_4,undefined4 param_5)" identifier (parameter_list "(int param_1,code *param_2,undefined4 param_3,undefined4 param_4,undefined4 param_5)" ( (parameter_declaration "int param_1" primitive_type identifier) , (parameter_declaration "code *param_2" type_identifier (pointer_declarator "*param_2" * identifier)) , (parameter_declaration "undefined4 param_3" type_identifier identifier) , (parameter_declaration "undefined4 param_4" type_identifier identifier) , (parameter_declaration "undefined4 param_5" type_identifier identifier) ))) (compound_statement "{\n  int iVar1;\n  \n  do {\n    if (*(char *)(param_1 + 0x2b) != '\0') {\n      return 0;\n    }\n    iVar1 = FUN_00056560(*(undefined4 *)(param_1 + 4),param_4,param_5);\n    if (param_2 == (code *)0x0) {\n      return iVar1;\n    }\n    if (iVar1 != 5) {\n      return iVar1;\n    }\n    iVar1 = (*param_2)(param_3);\n  } while (iVar1 != 0);\n  return 5;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (do_statement "do {\n    if (*(char *)(param_1 + 0x2b) != '\0') {\n      return 0;\n    }\n    iVar1 = FUN_00056560(*(undefined4 *)(param_1 + 4),param_4,param_5);\n    if (param_2 == (code *)0x0) {\n      return iVar1;\n    }\n    if (iVar1 != 5) {\n      return iVar1;\n    }\n    iVar1 = (*param_2)(param_3);\n  } while (iVar1 != 0);" do (compound_statement "{\n    if (*(char *)(param_1 + 0x2b) != '\0') {\n      return 0;\n    }\n    iVar1 = FUN_00056560(*(undefined4 *)(param_1 + 4),param_4,param_5);\n    if (param_2 == (code *)0x0) {\n      return iVar1;\n    }\n    if (iVar1 != 5) {\n      return iVar1;\n    }\n    iVar1 = (*param_2)(param_3);\n  }" { (if_statement "if (*(char *)(param_1 + 0x2b) != '\0') {\n      return 0;\n    }" if (parenthesized_expression "(*(char *)(param_1 + 0x2b) != '\0')" ( (binary_expression "*(char *)(param_1 + 0x2b) != '\0'" (pointer_expression "*(char *)(param_1 + 0x2b)" * (cast_expression "(char *)(param_1 + 0x2b)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x2b)" ( (binary_expression "param_1 + 0x2b" identifier + number_literal) )))) != (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\n      return 0;\n    }" { (return_statement "return 0;" return number_literal ;) })) (expression_statement "iVar1 = FUN_00056560(*(undefined4 *)(param_1 + 4),param_4,param_5);" (assignment_expression "iVar1 = FUN_00056560(*(undefined4 *)(param_1 + 4),param_4,param_5)" identifier = (call_expression "FUN_00056560(*(undefined4 *)(param_1 + 4),param_4,param_5)" identifier (argument_list "(*(undefined4 *)(param_1 + 4),param_4,param_5)" ( (pointer_expression "*(undefined4 *)(param_1 + 4)" * (cast_expression "(undefined4 *)(param_1 + 4)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 4)" ( (binary_expression "param_1 + 4" identifier + number_literal) )))) , identifier , identifier )))) ;) (if_statement "if (param_2 == (code *)0x0) {\n      return iVar1;\n    }" if (parenthesized_expression "(param_2 == (code *)0x0)" ( (binary_expression "param_2 == (code *)0x0" identifier == (cast_expression "(code *)0x0" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n      return iVar1;\n    }" { (return_statement "return iVar1;" return identifier ;) })) (if_statement "if (iVar1 != 5) {\n      return iVar1;\n    }" if (parenthesized_expression "(iVar1 != 5)" ( (binary_expression "iVar1 != 5" identifier != number_literal) )) (compound_statement "{\n      return iVar1;\n    }" { (return_statement "return iVar1;" return identifier ;) })) (expression_statement "iVar1 = (*param_2)(param_3);" (assignment_expression "iVar1 = (*param_2)(param_3)" identifier = (call_expression "(*param_2)(param_3)" (parenthesized_expression "(*param_2)" ( (pointer_expression "*param_2" * identifier) )) (argument_list "(param_3)" ( identifier )))) ;) }) while (parenthesized_expression "(iVar1 != 0)" ( (binary_expression "iVar1 != 0" identifier != number_literal) )) ;) (return_statement "return 5;" return number_literal ;) })))
(translation_unit "int walBusyLock(Wal *pWal,_func_int_void_ptr *xBusy,void *pBusyArg,int lockIdx,int n)\n\n{\n  int iVar1;\n  Wal *pWal_1;\n  \n  pWal_1 = (Wal *)lockIdx;\n  do {\n    if (pWal->exclusiveMode != '\0') {\n      return 0;\n    }\n    iVar1 = walLockExclusive((Wal *)pWal->pDbFd,lockIdx,n,pWal_1);\n    if (xBusy == (_func_int_void_ptr *)0x0) {\n      return iVar1;\n    }\n    if (iVar1 != 5) {\n      return iVar1;\n    }\n    iVar1 = (*xBusy)(pBusyArg);\n  } while (iVar1 != 0);\n  return 5;\n}\n\n" (function_definition "int walBusyLock(Wal *pWal,_func_int_void_ptr *xBusy,void *pBusyArg,int lockIdx,int n)\n\n{\n  int iVar1;\n  Wal *pWal_1;\n  \n  pWal_1 = (Wal *)lockIdx;\n  do {\n    if (pWal->exclusiveMode != '\0') {\n      return 0;\n    }\n    iVar1 = walLockExclusive((Wal *)pWal->pDbFd,lockIdx,n,pWal_1);\n    if (xBusy == (_func_int_void_ptr *)0x0) {\n      return iVar1;\n    }\n    if (iVar1 != 5) {\n      return iVar1;\n    }\n    iVar1 = (*xBusy)(pBusyArg);\n  } while (iVar1 != 0);\n  return 5;\n}" primitive_type (function_declarator "walBusyLock(Wal *pWal,_func_int_void_ptr *xBusy,void *pBusyArg,int lockIdx,int n)" identifier (parameter_list "(Wal *pWal,_func_int_void_ptr *xBusy,void *pBusyArg,int lockIdx,int n)" ( (parameter_declaration "Wal *pWal" type_identifier (pointer_declarator "*pWal" * identifier)) , (parameter_declaration "_func_int_void_ptr *xBusy" type_identifier (pointer_declarator "*xBusy" * identifier)) , (parameter_declaration "void *pBusyArg" primitive_type (pointer_declarator "*pBusyArg" * identifier)) , (parameter_declaration "int lockIdx" primitive_type identifier) , (parameter_declaration "int n" primitive_type identifier) ))) (compound_statement "{\n  int iVar1;\n  Wal *pWal_1;\n  \n  pWal_1 = (Wal *)lockIdx;\n  do {\n    if (pWal->exclusiveMode != '\0') {\n      return 0;\n    }\n    iVar1 = walLockExclusive((Wal *)pWal->pDbFd,lockIdx,n,pWal_1);\n    if (xBusy == (_func_int_void_ptr *)0x0) {\n      return iVar1;\n    }\n    if (iVar1 != 5) {\n      return iVar1;\n    }\n    iVar1 = (*xBusy)(pBusyArg);\n  } while (iVar1 != 0);\n  return 5;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "Wal *pWal_1;" type_identifier (pointer_declarator "*pWal_1" * identifier) ;) (expression_statement "pWal_1 = (Wal *)lockIdx;" (assignment_expression "pWal_1 = (Wal *)lockIdx" identifier = (cast_expression "(Wal *)lockIdx" ( (type_descriptor "Wal *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) ;) (do_statement "do {\n    if (pWal->exclusiveMode != '\0') {\n      return 0;\n    }\n    iVar1 = walLockExclusive((Wal *)pWal->pDbFd,lockIdx,n,pWal_1);\n    if (xBusy == (_func_int_void_ptr *)0x0) {\n      return iVar1;\n    }\n    if (iVar1 != 5) {\n      return iVar1;\n    }\n    iVar1 = (*xBusy)(pBusyArg);\n  } while (iVar1 != 0);" do (compound_statement "{\n    if (pWal->exclusiveMode != '\0') {\n      return 0;\n    }\n    iVar1 = walLockExclusive((Wal *)pWal->pDbFd,lockIdx,n,pWal_1);\n    if (xBusy == (_func_int_void_ptr *)0x0) {\n      return iVar1;\n    }\n    if (iVar1 != 5) {\n      return iVar1;\n    }\n    iVar1 = (*xBusy)(pBusyArg);\n  }" { (if_statement "if (pWal->exclusiveMode != '\0') {\n      return 0;\n    }" if (parenthesized_expression "(pWal->exclusiveMode != '\0')" ( (binary_expression "pWal->exclusiveMode != '\0'" (field_expression "pWal->exclusiveMode" identifier -> field_identifier) != (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\n      return 0;\n    }" { (return_statement "return 0;" return number_literal ;) })) (expression_statement "iVar1 = walLockExclusive((Wal *)pWal->pDbFd,lockIdx,n,pWal_1);" (assignment_expression "iVar1 = walLockExclusive((Wal *)pWal->pDbFd,lockIdx,n,pWal_1)" identifier = (call_expression "walLockExclusive((Wal *)pWal->pDbFd,lockIdx,n,pWal_1)" identifier (argument_list "((Wal *)pWal->pDbFd,lockIdx,n,pWal_1)" ( (cast_expression "(Wal *)pWal->pDbFd" ( (type_descriptor "Wal *" type_identifier (abstract_pointer_declarator "*" *)) ) (field_expression "pWal->pDbFd" identifier -> field_identifier)) , identifier , identifier , identifier )))) ;) (if_statement "if (xBusy == (_func_int_void_ptr *)0x0) {\n      return iVar1;\n    }" if (parenthesized_expression "(xBusy == (_func_int_void_ptr *)0x0)" ( (binary_expression "xBusy == (_func_int_void_ptr *)0x0" identifier == (cast_expression "(_func_int_void_ptr *)0x0" ( (type_descriptor "_func_int_void_ptr *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n      return iVar1;\n    }" { (return_statement "return iVar1;" return identifier ;) })) (if_statement "if (iVar1 != 5) {\n      return iVar1;\n    }" if (parenthesized_expression "(iVar1 != 5)" ( (binary_expression "iVar1 != 5" identifier != number_literal) )) (compound_statement "{\n      return iVar1;\n    }" { (return_statement "return iVar1;" return identifier ;) })) (expression_statement "iVar1 = (*xBusy)(pBusyArg);" (assignment_expression "iVar1 = (*xBusy)(pBusyArg)" identifier = (call_expression "(*xBusy)(pBusyArg)" (parenthesized_expression "(*xBusy)" ( (pointer_expression "*xBusy" * identifier) )) (argument_list "(pBusyArg)" ( identifier )))) ;) }) while (parenthesized_expression "(iVar1 != 0)" ( (binary_expression "iVar1 != 0" identifier != number_literal) )) ;) (return_statement "return 5;" return number_literal ;) })))
(translation_unit "int FUN_00056570(int param_1,code *param_2,undefined4 param_3,undefined4 param_4,undefined4 param_5)\n\n{\n  int iVar1;\n  \n  do {\n    if (*(char *)(param_1 + 0x2b) != '\0') {\n      return 0;\n    }\n    iVar1 = FUN_00056560(*(undefined4 *)(param_1 + 4),param_4,param_5);\n    if (param_2 == (code *)0x0) {\n      return iVar1;\n    }\n    if (iVar1 != 5) {\n      return iVar1;\n    }\n    iVar1 = (*param_2)(param_3);\n  } while (iVar1 != 0);\n  return 5;\n}\n\n" (function_definition "int FUN_00056570(int param_1,code *param_2,undefined4 param_3,undefined4 param_4,undefined4 param_5)\n\n{\n  int iVar1;\n  \n  do {\n    if (*(char *)(param_1 + 0x2b) != '\0') {\n      return 0;\n    }\n    iVar1 = FUN_00056560(*(undefined4 *)(param_1 + 4),param_4,param_5);\n    if (param_2 == (code *)0x0) {\n      return iVar1;\n    }\n    if (iVar1 != 5) {\n      return iVar1;\n    }\n    iVar1 = (*param_2)(param_3);\n  } while (iVar1 != 0);\n  return 5;\n}" primitive_type (function_declarator "FUN_00056570(int param_1,code *param_2,undefined4 param_3,undefined4 param_4,undefined4 param_5)" identifier (parameter_list "(int param_1,code *param_2,undefined4 param_3,undefined4 param_4,undefined4 param_5)" ( (parameter_declaration "int param_1" primitive_type identifier) , (parameter_declaration "code *param_2" type_identifier (pointer_declarator "*param_2" * identifier)) , (parameter_declaration "undefined4 param_3" type_identifier identifier) , (parameter_declaration "undefined4 param_4" type_identifier identifier) , (parameter_declaration "undefined4 param_5" type_identifier identifier) ))) (compound_statement "{\n  int iVar1;\n  \n  do {\n    if (*(char *)(param_1 + 0x2b) != '\0') {\n      return 0;\n    }\n    iVar1 = FUN_00056560(*(undefined4 *)(param_1 + 4),param_4,param_5);\n    if (param_2 == (code *)0x0) {\n      return iVar1;\n    }\n    if (iVar1 != 5) {\n      return iVar1;\n    }\n    iVar1 = (*param_2)(param_3);\n  } while (iVar1 != 0);\n  return 5;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (do_statement "do {\n    if (*(char *)(param_1 + 0x2b) != '\0') {\n      return 0;\n    }\n    iVar1 = FUN_00056560(*(undefined4 *)(param_1 + 4),param_4,param_5);\n    if (param_2 == (code *)0x0) {\n      return iVar1;\n    }\n    if (iVar1 != 5) {\n      return iVar1;\n    }\n    iVar1 = (*param_2)(param_3);\n  } while (iVar1 != 0);" do (compound_statement "{\n    if (*(char *)(param_1 + 0x2b) != '\0') {\n      return 0;\n    }\n    iVar1 = FUN_00056560(*(undefined4 *)(param_1 + 4),param_4,param_5);\n    if (param_2 == (code *)0x0) {\n      return iVar1;\n    }\n    if (iVar1 != 5) {\n      return iVar1;\n    }\n    iVar1 = (*param_2)(param_3);\n  }" { (if_statement "if (*(char *)(param_1 + 0x2b) != '\0') {\n      return 0;\n    }" if (parenthesized_expression "(*(char *)(param_1 + 0x2b) != '\0')" ( (binary_expression "*(char *)(param_1 + 0x2b) != '\0'" (pointer_expression "*(char *)(param_1 + 0x2b)" * (cast_expression "(char *)(param_1 + 0x2b)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x2b)" ( (binary_expression "param_1 + 0x2b" identifier + number_literal) )))) != (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\n      return 0;\n    }" { (return_statement "return 0;" return number_literal ;) })) (expression_statement "iVar1 = FUN_00056560(*(undefined4 *)(param_1 + 4),param_4,param_5);" (assignment_expression "iVar1 = FUN_00056560(*(undefined4 *)(param_1 + 4),param_4,param_5)" identifier = (call_expression "FUN_00056560(*(undefined4 *)(param_1 + 4),param_4,param_5)" identifier (argument_list "(*(undefined4 *)(param_1 + 4),param_4,param_5)" ( (pointer_expression "*(undefined4 *)(param_1 + 4)" * (cast_expression "(undefined4 *)(param_1 + 4)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 4)" ( (binary_expression "param_1 + 4" identifier + number_literal) )))) , identifier , identifier )))) ;) (if_statement "if (param_2 == (code *)0x0) {\n      return iVar1;\n    }" if (parenthesized_expression "(param_2 == (code *)0x0)" ( (binary_expression "param_2 == (code *)0x0" identifier == (cast_expression "(code *)0x0" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n      return iVar1;\n    }" { (return_statement "return iVar1;" return identifier ;) })) (if_statement "if (iVar1 != 5) {\n      return iVar1;\n    }" if (parenthesized_expression "(iVar1 != 5)" ( (binary_expression "iVar1 != 5" identifier != number_literal) )) (compound_statement "{\n      return iVar1;\n    }" { (return_statement "return iVar1;" return identifier ;) })) (expression_statement "iVar1 = (*param_2)(param_3);" (assignment_expression "iVar1 = (*param_2)(param_3)" identifier = (call_expression "(*param_2)(param_3)" (parenthesized_expression "(*param_2)" ( (pointer_expression "*param_2" * identifier) )) (argument_list "(param_3)" ( identifier )))) ;) }) while (parenthesized_expression "(iVar1 != 0)" ( (binary_expression "iVar1 != 0" identifier != number_literal) )) ;) (return_statement "return 5;" return number_literal ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE (pointer_declarator * IDENT)) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE IDENT ;) (do_statement do (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) != (char_literal ' escape_sequence ')) )) (compound_statement { (return_statement return LIT ;) })) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) , IDENT , IDENT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) (compound_statement { (return_statement return IDENT ;) })) (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (return_statement return IDENT ;) })) (expression_statement (assignment_expression IDENT = (call_expression (parenthesized_expression ( (pointer_expression * IDENT) )) (argument_list ( IDENT )))) ;) }) while (parenthesized_expression ( (binary_expression IDENT != LIT) )) ;) (return_statement return LIT ;) })))
(function_definition "int FUN_00056570(int param_1,code *param_2,undefined4 param_3,undefined4 param_4,undefined4 param_5)\n\n{\n  int iVar1;\n  \n  do {\n    if (*(char *)(param_1 + 0x2b) != '\0') {\n      return 0;\n    }\n    iVar1 = FUN_00056560(*(undefined4 *)(param_1 + 4),param_4,param_5);\n    if (param_2 == (code *)0x0) {\n      return iVar1;\n    }\n    if (iVar1 != 5) {\n      return iVar1;\n    }\n    iVar1 = (*param_2)(param_3);\n  } while (iVar1 != 0);\n  return 5;\n}" (primitive_type "int") (function_declarator "FUN_00056570(int param_1,code *param_2,undefined4 param_3,undefined4 param_4,undefined4 param_5)" (identifier "FUN_00056570") (parameter_list "(int param_1,code *param_2,undefined4 param_3,undefined4 param_4,undefined4 param_5)" (( "(") (parameter_declaration "int param_1" (primitive_type "int") (identifier "param_1")) (, ",") (parameter_declaration "code *param_2" (type_identifier "code") (pointer_declarator "*param_2" (* "*") (identifier "param_2"))) (, ",") (parameter_declaration "undefined4 param_3" (type_identifier "undefined4") (identifier "param_3")) (, ",") (parameter_declaration "undefined4 param_4" (type_identifier "undefined4") (identifier "param_4")) (, ",") (parameter_declaration "undefined4 param_5" (type_identifier "undefined4") (identifier "param_5")) () ")"))) (compound_statement "{\n  int iVar1;\n  \n  do {\n    if (*(char *)(param_1 + 0x2b) != '\0') {\n      return 0;\n    }\n    iVar1 = FUN_00056560(*(undefined4 *)(param_1 + 4),param_4,param_5);\n    if (param_2 == (code *)0x0) {\n      return iVar1;\n    }\n    if (iVar1 != 5) {\n      return iVar1;\n    }\n    iVar1 = (*param_2)(param_3);\n  } while (iVar1 != 0);\n  return 5;\n}" ({ "{") (declaration "int iVar1;" (primitive_type "int") (identifier "iVar1") (; ";")) (do_statement "do {\n    if (*(char *)(param_1 + 0x2b) != '\0') {\n      return 0;\n    }\n    iVar1 = FUN_00056560(*(undefined4 *)(param_1 + 4),param_4,param_5);\n    if (param_2 == (code *)0x0) {\n      return iVar1;\n    }\n    if (iVar1 != 5) {\n      return iVar1;\n    }\n    iVar1 = (*param_2)(param_3);\n  } while (iVar1 != 0);" (do "do") (compound_statement "{\n    if (*(char *)(param_1 + 0x2b) != '\0') {\n      return 0;\n    }\n    iVar1 = FUN_00056560(*(undefined4 *)(param_1 + 4),param_4,param_5);\n    if (param_2 == (code *)0x0) {\n      return iVar1;\n    }\n    if (iVar1 != 5) {\n      return iVar1;\n    }\n    iVar1 = (*param_2)(param_3);\n  }" ({ "{") (if_statement "if (*(char *)(param_1 + 0x2b) != '\0') {\n      return 0;\n    }" (if "if") (parenthesized_expression "(*(char *)(param_1 + 0x2b) != '\0')" (( "(") (binary_expression "*(char *)(param_1 + 0x2b) != '\0'" (pointer_expression "*(char *)(param_1 + 0x2b)" (* "*") (cast_expression "(char *)(param_1 + 0x2b)" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x2b)" (( "(") (binary_expression "param_1 + 0x2b" (identifier "param_1") (+ "+") (number_literal "0x2b")) () ")")))) (!= "!=") (char_literal "'\0'" (' "'") (escape_sequence "\0") (' "'"))) () ")")) (compound_statement "{\n      return 0;\n    }" ({ "{") (return_statement "return 0;" (return "return") (number_literal "0") (; ";")) (} "}"))) (expression_statement "iVar1 = FUN_00056560(*(undefined4 *)(param_1 + 4),param_4,param_5);" (assignment_expression "iVar1 = FUN_00056560(*(undefined4 *)(param_1 + 4),param_4,param_5)" (identifier "iVar1") (= "=") (call_expression "FUN_00056560(*(undefined4 *)(param_1 + 4),param_4,param_5)" (identifier "FUN_00056560") (argument_list "(*(undefined4 *)(param_1 + 4),param_4,param_5)" (( "(") (pointer_expression "*(undefined4 *)(param_1 + 4)" (* "*") (cast_expression "(undefined4 *)(param_1 + 4)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 4)" (( "(") (binary_expression "param_1 + 4" (identifier "param_1") (+ "+") (number_literal "4")) () ")")))) (, ",") (identifier "param_4") (, ",") (identifier "param_5") () ")")))) (; ";")) (if_statement "if (param_2 == (code *)0x0) {\n      return iVar1;\n    }" (if "if") (parenthesized_expression "(param_2 == (code *)0x0)" (( "(") (binary_expression "param_2 == (code *)0x0" (identifier "param_2") (== "==") (cast_expression "(code *)0x0" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\n      return iVar1;\n    }" ({ "{") (return_statement "return iVar1;" (return "return") (identifier "iVar1") (; ";")) (} "}"))) (if_statement "if (iVar1 != 5) {\n      return iVar1;\n    }" (if "if") (parenthesized_expression "(iVar1 != 5)" (( "(") (binary_expression "iVar1 != 5" (identifier "iVar1") (!= "!=") (number_literal "5")) () ")")) (compound_statement "{\n      return iVar1;\n    }" ({ "{") (return_statement "return iVar1;" (return "return") (identifier "iVar1") (; ";")) (} "}"))) (expression_statement "iVar1 = (*param_2)(param_3);" (assignment_expression "iVar1 = (*param_2)(param_3)" (identifier "iVar1") (= "=") (call_expression "(*param_2)(param_3)" (parenthesized_expression "(*param_2)" (( "(") (pointer_expression "*param_2" (* "*") (identifier "param_2")) () ")")) (argument_list "(param_3)" (( "(") (identifier "param_3") () ")")))) (; ";")) (} "}")) (while "while") (parenthesized_expression "(iVar1 != 0)" (( "(") (binary_expression "iVar1 != 0" (identifier "iVar1") (!= "!=") (number_literal "0")) () ")")) (; ";")) (return_statement "return 5;" (return "return") (number_literal "5") (; ";")) (} "}")))

int function_1(type_1 *pWal,type_2 *var_2,void *pBusyArg,int lockIdx,int n)

{
  int var_3;
  type_1 *pWal_1;
  
  pWal_1 = (type_1 *)lockIdx;
  do {
    if (pWal->exclusiveMode != '\0') {
      return 0;
    }
    var_3 = var_1((type_1 *)pWal->pDbFd,lockIdx,n,pWal_1);
    if (var_2 == (type_2 *)0x0) {
      return var_3;
    }
    if (var_3 != 5) {
      return var_3;
    }
    var_3 = (*var_2)(pBusyArg);
  } while (var_3 != 0);
  return 5;
}


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

int MASKED(int param_1,code *param_2,undefined4 param_3,undefined4 param_4,undefined4 param_5)

{
  int iVar1;
  
  do {
    if (*(char *)(param_1 + 0x2b) != '\0') {
      return 0;
    }
    iVar1 = FUN_00056560(*(undefined4 *)(param_1 + 4),param_4,param_5);
    if (param_2 == (code *)0x0) {
      return iVar1;
    }
    if (iVar1 != 5) {
      return iVar1;
    }
    iVar1 = (*param_2)(param_3);
  } while (iVar1 != 0);
  return 5;
}

