
int cdb_advance_fd(cd_buf *cdb,char *dir)

{
  int iVar1;
  int iVar2;
  
  iVar1 = (*(code *)PTR_openat64_00032340)(cdb->fd,dir,0x10880);
  if (iVar1 < 0) {
    iVar2 = -1;
  }
  else {
    cdb_free((cd_buf *)cdb->fd);
    iVar2 = 0;
    cdb->fd = iVar1;
  }
  return iVar2;
}



undefined4 FUN_0001de4c(int *param_1,undefined4 param_2)

{
  int iVar1;
  undefined4 uVar2;
  
  iVar1 = (*(code *)PTR_openat64_00032340)(*param_1,param_2,0x10880);
  if (iVar1 < 0) {
    uVar2 = 0xffffffff;
  }
  else {
    FUN_0001dde0(*param_1);
    uVar2 = 0;
    *param_1 = iVar1;
  }
  return uVar2;
}


lui gp,0x2
addiu gp,gp,-0x3d7c
addu gp,gp,t9
addiu sp,sp,-0x28
lw t9,-0x7d90(gp)
lui a2,0x1
sw s0,0x1c(sp)
or s0,a0,zero
sw gp,0x10(sp)
addiu a2,a2,0x880
sw ra,0x24(sp)
sw s1,0x20(sp)
jalr t9
_lw a0,0x0(a0)
bltz v0,0x0001debc
_lw gp,0x10(sp)
lw t9,-0x7fc8(gp)
or s1,v0,zero
addiu t9,t9,-0x2220
bal 0x0001dde0
_lw a0,0x0(s0)
or v0,zero,zero
sw s1,0x0(s0)
lw ra,0x24(sp)
lw s1,0x20(sp)
lw s0,0x1c(sp)
jr ra
_addiu sp,sp,0x28
b 0x0001dea8
_li v0,-0x1
(translation_unit "undefined4 FUN_0001de4c(int *param_1,undefined4 param_2)\n\n{\n  int iVar1;\n  undefined4 uVar2;\n  \n  iVar1 = (*(code *)PTR_openat64_00032340)(*param_1,param_2,0x10880);\n  if (iVar1 < 0) {\n    uVar2 = 0xffffffff;\n  }\n  else {\n    FUN_0001dde0(*param_1);\n    uVar2 = 0;\n    *param_1 = iVar1;\n  }\n  return uVar2;\n}\n\n" (function_definition "undefined4 FUN_0001de4c(int *param_1,undefined4 param_2)\n\n{\n  int iVar1;\n  undefined4 uVar2;\n  \n  iVar1 = (*(code *)PTR_openat64_00032340)(*param_1,param_2,0x10880);\n  if (iVar1 < 0) {\n    uVar2 = 0xffffffff;\n  }\n  else {\n    FUN_0001dde0(*param_1);\n    uVar2 = 0;\n    *param_1 = iVar1;\n  }\n  return uVar2;\n}" type_identifier (function_declarator "FUN_0001de4c(int *param_1,undefined4 param_2)" identifier (parameter_list "(int *param_1,undefined4 param_2)" ( (parameter_declaration "int *param_1" primitive_type (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "undefined4 param_2" type_identifier identifier) ))) (compound_statement "{\n  int iVar1;\n  undefined4 uVar2;\n  \n  iVar1 = (*(code *)PTR_openat64_00032340)(*param_1,param_2,0x10880);\n  if (iVar1 < 0) {\n    uVar2 = 0xffffffff;\n  }\n  else {\n    FUN_0001dde0(*param_1);\n    uVar2 = 0;\n    *param_1 = iVar1;\n  }\n  return uVar2;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "undefined4 uVar2;" type_identifier identifier ;) (expression_statement "iVar1 = (*(code *)PTR_openat64_00032340)(*param_1,param_2,0x10880);" (assignment_expression "iVar1 = (*(code *)PTR_openat64_00032340)(*param_1,param_2,0x10880)" identifier = (call_expression "(*(code *)PTR_openat64_00032340)(*param_1,param_2,0x10880)" (parenthesized_expression "(*(code *)PTR_openat64_00032340)" ( (pointer_expression "*(code *)PTR_openat64_00032340" * (cast_expression "(code *)PTR_openat64_00032340" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(*param_1,param_2,0x10880)" ( (pointer_expression "*param_1" * identifier) , identifier , number_literal )))) ;) (if_statement "if (iVar1 < 0) {\n    uVar2 = 0xffffffff;\n  }\n  else {\n    FUN_0001dde0(*param_1);\n    uVar2 = 0;\n    *param_1 = iVar1;\n  }" if (parenthesized_expression "(iVar1 < 0)" ( (binary_expression "iVar1 < 0" identifier < number_literal) )) (compound_statement "{\n    uVar2 = 0xffffffff;\n  }" { (expression_statement "uVar2 = 0xffffffff;" (assignment_expression "uVar2 = 0xffffffff" identifier = number_literal) ;) }) (else_clause "else {\n    FUN_0001dde0(*param_1);\n    uVar2 = 0;\n    *param_1 = iVar1;\n  }" else (compound_statement "{\n    FUN_0001dde0(*param_1);\n    uVar2 = 0;\n    *param_1 = iVar1;\n  }" { (expression_statement "FUN_0001dde0(*param_1);" (call_expression "FUN_0001dde0(*param_1)" identifier (argument_list "(*param_1)" ( (pointer_expression "*param_1" * identifier) ))) ;) (expression_statement "uVar2 = 0;" (assignment_expression "uVar2 = 0" identifier = number_literal) ;) (expression_statement "*param_1 = iVar1;" (assignment_expression "*param_1 = iVar1" (pointer_expression "*param_1" * identifier) = identifier) ;) }))) (return_statement "return uVar2;" return identifier ;) })))
(translation_unit "int cdb_advance_fd(cd_buf *cdb,char *dir)\n\n{\n  int iVar1;\n  int iVar2;\n  \n  iVar1 = (*(code *)PTR_openat64_00032340)(cdb->fd,dir,0x10880);\n  if (iVar1 < 0) {\n    iVar2 = -1;\n  }\n  else {\n    cdb_free((cd_buf *)cdb->fd);\n    iVar2 = 0;\n    cdb->fd = iVar1;\n  }\n  return iVar2;\n}\n\n" (function_definition "int cdb_advance_fd(cd_buf *cdb,char *dir)\n\n{\n  int iVar1;\n  int iVar2;\n  \n  iVar1 = (*(code *)PTR_openat64_00032340)(cdb->fd,dir,0x10880);\n  if (iVar1 < 0) {\n    iVar2 = -1;\n  }\n  else {\n    cdb_free((cd_buf *)cdb->fd);\n    iVar2 = 0;\n    cdb->fd = iVar1;\n  }\n  return iVar2;\n}" primitive_type (function_declarator "cdb_advance_fd(cd_buf *cdb,char *dir)" identifier (parameter_list "(cd_buf *cdb,char *dir)" ( (parameter_declaration "cd_buf *cdb" type_identifier (pointer_declarator "*cdb" * identifier)) , (parameter_declaration "char *dir" primitive_type (pointer_declarator "*dir" * identifier)) ))) (compound_statement "{\n  int iVar1;\n  int iVar2;\n  \n  iVar1 = (*(code *)PTR_openat64_00032340)(cdb->fd,dir,0x10880);\n  if (iVar1 < 0) {\n    iVar2 = -1;\n  }\n  else {\n    cdb_free((cd_buf *)cdb->fd);\n    iVar2 = 0;\n    cdb->fd = iVar1;\n  }\n  return iVar2;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (expression_statement "iVar1 = (*(code *)PTR_openat64_00032340)(cdb->fd,dir,0x10880);" (assignment_expression "iVar1 = (*(code *)PTR_openat64_00032340)(cdb->fd,dir,0x10880)" identifier = (call_expression "(*(code *)PTR_openat64_00032340)(cdb->fd,dir,0x10880)" (parenthesized_expression "(*(code *)PTR_openat64_00032340)" ( (pointer_expression "*(code *)PTR_openat64_00032340" * (cast_expression "(code *)PTR_openat64_00032340" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(cdb->fd,dir,0x10880)" ( (field_expression "cdb->fd" identifier -> field_identifier) , identifier , number_literal )))) ;) (if_statement "if (iVar1 < 0) {\n    iVar2 = -1;\n  }\n  else {\n    cdb_free((cd_buf *)cdb->fd);\n    iVar2 = 0;\n    cdb->fd = iVar1;\n  }" if (parenthesized_expression "(iVar1 < 0)" ( (binary_expression "iVar1 < 0" identifier < number_literal) )) (compound_statement "{\n    iVar2 = -1;\n  }" { (expression_statement "iVar2 = -1;" (assignment_expression "iVar2 = -1" identifier = number_literal) ;) }) (else_clause "else {\n    cdb_free((cd_buf *)cdb->fd);\n    iVar2 = 0;\n    cdb->fd = iVar1;\n  }" else (compound_statement "{\n    cdb_free((cd_buf *)cdb->fd);\n    iVar2 = 0;\n    cdb->fd = iVar1;\n  }" { (expression_statement "cdb_free((cd_buf *)cdb->fd);" (call_expression "cdb_free((cd_buf *)cdb->fd)" identifier (argument_list "((cd_buf *)cdb->fd)" ( (cast_expression "(cd_buf *)cdb->fd" ( (type_descriptor "cd_buf *" type_identifier (abstract_pointer_declarator "*" *)) ) (field_expression "cdb->fd" identifier -> field_identifier)) ))) ;) (expression_statement "iVar2 = 0;" (assignment_expression "iVar2 = 0" identifier = number_literal) ;) (expression_statement "cdb->fd = iVar1;" (assignment_expression "cdb->fd = iVar1" (field_expression "cdb->fd" identifier -> field_identifier) = identifier) ;) }))) (return_statement "return iVar2;" return identifier ;) })))
(translation_unit "undefined4 FUN_0001de4c(int *param_1,undefined4 param_2)\n\n{\n  int iVar1;\n  undefined4 uVar2;\n  \n  iVar1 = (*(code *)PTR_openat64_00032340)(*param_1,param_2,0x10880);\n  if (iVar1 < 0) {\n    uVar2 = 0xffffffff;\n  }\n  else {\n    FUN_0001dde0(*param_1);\n    uVar2 = 0;\n    *param_1 = iVar1;\n  }\n  return uVar2;\n}\n\n" (function_definition "undefined4 FUN_0001de4c(int *param_1,undefined4 param_2)\n\n{\n  int iVar1;\n  undefined4 uVar2;\n  \n  iVar1 = (*(code *)PTR_openat64_00032340)(*param_1,param_2,0x10880);\n  if (iVar1 < 0) {\n    uVar2 = 0xffffffff;\n  }\n  else {\n    FUN_0001dde0(*param_1);\n    uVar2 = 0;\n    *param_1 = iVar1;\n  }\n  return uVar2;\n}" type_identifier (function_declarator "FUN_0001de4c(int *param_1,undefined4 param_2)" identifier (parameter_list "(int *param_1,undefined4 param_2)" ( (parameter_declaration "int *param_1" primitive_type (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "undefined4 param_2" type_identifier identifier) ))) (compound_statement "{\n  int iVar1;\n  undefined4 uVar2;\n  \n  iVar1 = (*(code *)PTR_openat64_00032340)(*param_1,param_2,0x10880);\n  if (iVar1 < 0) {\n    uVar2 = 0xffffffff;\n  }\n  else {\n    FUN_0001dde0(*param_1);\n    uVar2 = 0;\n    *param_1 = iVar1;\n  }\n  return uVar2;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "undefined4 uVar2;" type_identifier identifier ;) (expression_statement "iVar1 = (*(code *)PTR_openat64_00032340)(*param_1,param_2,0x10880);" (assignment_expression "iVar1 = (*(code *)PTR_openat64_00032340)(*param_1,param_2,0x10880)" identifier = (call_expression "(*(code *)PTR_openat64_00032340)(*param_1,param_2,0x10880)" (parenthesized_expression "(*(code *)PTR_openat64_00032340)" ( (pointer_expression "*(code *)PTR_openat64_00032340" * (cast_expression "(code *)PTR_openat64_00032340" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(*param_1,param_2,0x10880)" ( (pointer_expression "*param_1" * identifier) , identifier , number_literal )))) ;) (if_statement "if (iVar1 < 0) {\n    uVar2 = 0xffffffff;\n  }\n  else {\n    FUN_0001dde0(*param_1);\n    uVar2 = 0;\n    *param_1 = iVar1;\n  }" if (parenthesized_expression "(iVar1 < 0)" ( (binary_expression "iVar1 < 0" identifier < number_literal) )) (compound_statement "{\n    uVar2 = 0xffffffff;\n  }" { (expression_statement "uVar2 = 0xffffffff;" (assignment_expression "uVar2 = 0xffffffff" identifier = number_literal) ;) }) (else_clause "else {\n    FUN_0001dde0(*param_1);\n    uVar2 = 0;\n    *param_1 = iVar1;\n  }" else (compound_statement "{\n    FUN_0001dde0(*param_1);\n    uVar2 = 0;\n    *param_1 = iVar1;\n  }" { (expression_statement "FUN_0001dde0(*param_1);" (call_expression "FUN_0001dde0(*param_1)" identifier (argument_list "(*param_1)" ( (pointer_expression "*param_1" * identifier) ))) ;) (expression_statement "uVar2 = 0;" (assignment_expression "uVar2 = 0" identifier = number_literal) ;) (expression_statement "*param_1 = iVar1;" (assignment_expression "*param_1 = iVar1" (pointer_expression "*param_1" * identifier) = identifier) ;) }))) (return_statement "return uVar2;" return identifier ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE (pointer_declarator * IDENT)) , (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( (pointer_expression * IDENT) , IDENT , LIT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT < LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) }) (else_clause else (compound_statement { (expression_statement (call_expression IDENT (argument_list ( (pointer_expression * IDENT) ))) ;) (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = IDENT) ;) }))) (return_statement return IDENT ;) })))
(function_definition "undefined4 FUN_0001de4c(int *param_1,undefined4 param_2)\n\n{\n  int iVar1;\n  undefined4 uVar2;\n  \n  iVar1 = (*(code *)PTR_openat64_00032340)(*param_1,param_2,0x10880);\n  if (iVar1 < 0) {\n    uVar2 = 0xffffffff;\n  }\n  else {\n    FUN_0001dde0(*param_1);\n    uVar2 = 0;\n    *param_1 = iVar1;\n  }\n  return uVar2;\n}" (type_identifier "undefined4") (function_declarator "FUN_0001de4c(int *param_1,undefined4 param_2)" (identifier "FUN_0001de4c") (parameter_list "(int *param_1,undefined4 param_2)" (( "(") (parameter_declaration "int *param_1" (primitive_type "int") (pointer_declarator "*param_1" (* "*") (identifier "param_1"))) (, ",") (parameter_declaration "undefined4 param_2" (type_identifier "undefined4") (identifier "param_2")) () ")"))) (compound_statement "{\n  int iVar1;\n  undefined4 uVar2;\n  \n  iVar1 = (*(code *)PTR_openat64_00032340)(*param_1,param_2,0x10880);\n  if (iVar1 < 0) {\n    uVar2 = 0xffffffff;\n  }\n  else {\n    FUN_0001dde0(*param_1);\n    uVar2 = 0;\n    *param_1 = iVar1;\n  }\n  return uVar2;\n}" ({ "{") (declaration "int iVar1;" (primitive_type "int") (identifier "iVar1") (; ";")) (declaration "undefined4 uVar2;" (type_identifier "undefined4") (identifier "uVar2") (; ";")) (expression_statement "iVar1 = (*(code *)PTR_openat64_00032340)(*param_1,param_2,0x10880);" (assignment_expression "iVar1 = (*(code *)PTR_openat64_00032340)(*param_1,param_2,0x10880)" (identifier "iVar1") (= "=") (call_expression "(*(code *)PTR_openat64_00032340)(*param_1,param_2,0x10880)" (parenthesized_expression "(*(code *)PTR_openat64_00032340)" (( "(") (pointer_expression "*(code *)PTR_openat64_00032340" (* "*") (cast_expression "(code *)PTR_openat64_00032340" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_openat64_00032340"))) () ")")) (argument_list "(*param_1,param_2,0x10880)" (( "(") (pointer_expression "*param_1" (* "*") (identifier "param_1")) (, ",") (identifier "param_2") (, ",") (number_literal "0x10880") () ")")))) (; ";")) (if_statement "if (iVar1 < 0) {\n    uVar2 = 0xffffffff;\n  }\n  else {\n    FUN_0001dde0(*param_1);\n    uVar2 = 0;\n    *param_1 = iVar1;\n  }" (if "if") (parenthesized_expression "(iVar1 < 0)" (( "(") (binary_expression "iVar1 < 0" (identifier "iVar1") (< "<") (number_literal "0")) () ")")) (compound_statement "{\n    uVar2 = 0xffffffff;\n  }" ({ "{") (expression_statement "uVar2 = 0xffffffff;" (assignment_expression "uVar2 = 0xffffffff" (identifier "uVar2") (= "=") (number_literal "0xffffffff")) (; ";")) (} "}")) (else_clause "else {\n    FUN_0001dde0(*param_1);\n    uVar2 = 0;\n    *param_1 = iVar1;\n  }" (else "else") (compound_statement "{\n    FUN_0001dde0(*param_1);\n    uVar2 = 0;\n    *param_1 = iVar1;\n  }" ({ "{") (expression_statement "FUN_0001dde0(*param_1);" (call_expression "FUN_0001dde0(*param_1)" (identifier "FUN_0001dde0") (argument_list "(*param_1)" (( "(") (pointer_expression "*param_1" (* "*") (identifier "param_1")) () ")"))) (; ";")) (expression_statement "uVar2 = 0;" (assignment_expression "uVar2 = 0" (identifier "uVar2") (= "=") (number_literal "0")) (; ";")) (expression_statement "*param_1 = iVar1;" (assignment_expression "*param_1 = iVar1" (pointer_expression "*param_1" (* "*") (identifier "param_1")) (= "=") (identifier "iVar1")) (; ";")) (} "}")))) (return_statement "return uVar2;" (return "return") (identifier "uVar2") (; ";")) (} "}")))
(translation_unit (function_definition type: (type_identifier) declarator: (function_declarator declarator: (identifier) parameters: (parameter_list (parameter_declaration type: (primitive_type) declarator: (pointer_declarator declarator: (identifier))) (parameter_declaration type: (type_identifier) declarator: (identifier)))) body: (compound_statement (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (type_identifier) declarator: (identifier)) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (parenthesized_expression (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (identifier)))) arguments: (argument_list (pointer_expression argument: (identifier)) (identifier) (number_literal))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (number_literal)))) alternative: (else_clause (compound_statement (expression_statement (call_expression function: (identifier) arguments: (argument_list (pointer_expression argument: (identifier))))) (expression_statement (assignment_expression left: (identifier) right: (number_literal))) (expression_statement (assignment_expression left: (pointer_expression argument: (identifier)) right: (identifier)))))) (return_statement (identifier)))))

undefined4 MASKED(int *param_1,undefined4 param_2)

{
  int iVar1;
  undefined4 uVar2;
  
  iVar1 = (*(code *)PTR_openat64_00032340)(*param_1,param_2,0x10880);
  if (iVar1 < 0) {
    uVar2 = 0xffffffff;
  }
  else {
    FUN_0001dde0(*param_1);
    uVar2 = 0;
    *param_1 = iVar1;
  }
  return uVar2;
}

