
int restore_initial_cwd(FTS *sp)

{
  int iVar1;
  uint uVar2;
  
  if ((sp->fts_options & 4U) == 0) {
    if ((sp->fts_options & 0x200U) == 0) {
      iVar1 = (*(code *)PTR_fchdir_000464f4)(sp->fts_rfd);
      uVar2 = (uint)(iVar1 != 0);
    }
    else {
      cwd_advance_fd(sp,-100,true);
      uVar2 = 0;
    }
  }
  else {
    uVar2 = 0;
  }
  fd_ring_clear(&sp->fts_fd_ring);
  return uVar2;
}



bool FUN_0002a018(int param_1)

{
  int iVar1;
  bool bVar2;
  
  if ((*(uint *)(param_1 + 0x30) & 4) == 0) {
    if ((*(uint *)(param_1 + 0x30) & 0x200) == 0) {
      iVar1 = (*(code *)PTR_fchdir_000464f4)(*(undefined4 *)(param_1 + 0x1c));
      bVar2 = iVar1 != 0;
    }
    else {
      FUN_00029f48(param_1,0xffffff9c,1);
      bVar2 = false;
    }
  }
  else {
    bVar2 = false;
  }
  FUN_00029c88(param_1 + 0x3c);
  return bVar2;
}


lui gp,0x2
addiu gp,gp,0x40f8
addu gp,gp,t9
addiu sp,sp,-0x28
lw v0,0x30(a0)
sw s0,0x1c(sp)
andi s0,v0,0x4
sw gp,0x10(sp)
sw s1,0x20(sp)
or s1,a0,zero
bne s0,zero,0x0002a070
_sw ra,0x24(sp)
andi v0,v0,0x200
beq v0,zero,0x0002a09c
_lw t9,-0x7c1c(gp)
lw t9,-0x7fc8(gp)
li a2,0x1
addiu t9,t9,-0x60b8
bal 0x00029f48
_li a1,-0x64
b 0x0002a074
_lw gp,0x10(sp)
or s0,zero,zero
lw t9,-0x7fc8(gp)
addiu t9,t9,-0x6378
bal 0x00029c88
_addiu a0,s1,0x3c
or v0,s0,zero
lw ra,0x24(sp)
lw s1,0x20(sp)
lw s0,0x1c(sp)
jr ra
_addiu sp,sp,0x28
jalr t9
_lw a0,0x1c(a0)
lw gp,0x10(sp)
b 0x0002a074
_sltu s0,zero,v0
(translation_unit "bool FUN_0002a018(int param_1)\n\n{\n  int iVar1;\n  bool bVar2;\n  \n  if ((*(uint *)(param_1 + 0x30) & 4) == 0) {\n    if ((*(uint *)(param_1 + 0x30) & 0x200) == 0) {\n      iVar1 = (*(code *)PTR_fchdir_000464f4)(*(undefined4 *)(param_1 + 0x1c));\n      bVar2 = iVar1 != 0;\n    }\n    else {\n      FUN_00029f48(param_1,0xffffff9c,1);\n      bVar2 = false;\n    }\n  }\n  else {\n    bVar2 = false;\n  }\n  FUN_00029c88(param_1 + 0x3c);\n  return bVar2;\n}\n\n" (function_definition "bool FUN_0002a018(int param_1)\n\n{\n  int iVar1;\n  bool bVar2;\n  \n  if ((*(uint *)(param_1 + 0x30) & 4) == 0) {\n    if ((*(uint *)(param_1 + 0x30) & 0x200) == 0) {\n      iVar1 = (*(code *)PTR_fchdir_000464f4)(*(undefined4 *)(param_1 + 0x1c));\n      bVar2 = iVar1 != 0;\n    }\n    else {\n      FUN_00029f48(param_1,0xffffff9c,1);\n      bVar2 = false;\n    }\n  }\n  else {\n    bVar2 = false;\n  }\n  FUN_00029c88(param_1 + 0x3c);\n  return bVar2;\n}" primitive_type (function_declarator "FUN_0002a018(int param_1)" identifier (parameter_list "(int param_1)" ( (parameter_declaration "int param_1" primitive_type identifier) ))) (compound_statement "{\n  int iVar1;\n  bool bVar2;\n  \n  if ((*(uint *)(param_1 + 0x30) & 4) == 0) {\n    if ((*(uint *)(param_1 + 0x30) & 0x200) == 0) {\n      iVar1 = (*(code *)PTR_fchdir_000464f4)(*(undefined4 *)(param_1 + 0x1c));\n      bVar2 = iVar1 != 0;\n    }\n    else {\n      FUN_00029f48(param_1,0xffffff9c,1);\n      bVar2 = false;\n    }\n  }\n  else {\n    bVar2 = false;\n  }\n  FUN_00029c88(param_1 + 0x3c);\n  return bVar2;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "bool bVar2;" primitive_type identifier ;) (if_statement "if ((*(uint *)(param_1 + 0x30) & 4) == 0) {\n    if ((*(uint *)(param_1 + 0x30) & 0x200) == 0) {\n      iVar1 = (*(code *)PTR_fchdir_000464f4)(*(undefined4 *)(param_1 + 0x1c));\n      bVar2 = iVar1 != 0;\n    }\n    else {\n      FUN_00029f48(param_1,0xffffff9c,1);\n      bVar2 = false;\n    }\n  }\n  else {\n    bVar2 = false;\n  }" if (parenthesized_expression "((*(uint *)(param_1 + 0x30) & 4) == 0)" ( (binary_expression "(*(uint *)(param_1 + 0x30) & 4) == 0" (parenthesized_expression "(*(uint *)(param_1 + 0x30) & 4)" ( (binary_expression "*(uint *)(param_1 + 0x30) & 4" (pointer_expression "*(uint *)(param_1 + 0x30)" * (cast_expression "(uint *)(param_1 + 0x30)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x30)" ( (binary_expression "param_1 + 0x30" identifier + number_literal) )))) & number_literal) )) == number_literal) )) (compound_statement "{\n    if ((*(uint *)(param_1 + 0x30) & 0x200) == 0) {\n      iVar1 = (*(code *)PTR_fchdir_000464f4)(*(undefined4 *)(param_1 + 0x1c));\n      bVar2 = iVar1 != 0;\n    }\n    else {\n      FUN_00029f48(param_1,0xffffff9c,1);\n      bVar2 = false;\n    }\n  }" { (if_statement "if ((*(uint *)(param_1 + 0x30) & 0x200) == 0) {\n      iVar1 = (*(code *)PTR_fchdir_000464f4)(*(undefined4 *)(param_1 + 0x1c));\n      bVar2 = iVar1 != 0;\n    }\n    else {\n      FUN_00029f48(param_1,0xffffff9c,1);\n      bVar2 = false;\n    }" if (parenthesized_expression "((*(uint *)(param_1 + 0x30) & 0x200) == 0)" ( (binary_expression "(*(uint *)(param_1 + 0x30) & 0x200) == 0" (parenthesized_expression "(*(uint *)(param_1 + 0x30) & 0x200)" ( (binary_expression "*(uint *)(param_1 + 0x30) & 0x200" (pointer_expression "*(uint *)(param_1 + 0x30)" * (cast_expression "(uint *)(param_1 + 0x30)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x30)" ( (binary_expression "param_1 + 0x30" identifier + number_literal) )))) & number_literal) )) == number_literal) )) (compound_statement "{\n      iVar1 = (*(code *)PTR_fchdir_000464f4)(*(undefined4 *)(param_1 + 0x1c));\n      bVar2 = iVar1 != 0;\n    }" { (expression_statement "iVar1 = (*(code *)PTR_fchdir_000464f4)(*(undefined4 *)(param_1 + 0x1c));" (assignment_expression "iVar1 = (*(code *)PTR_fchdir_000464f4)(*(undefined4 *)(param_1 + 0x1c))" identifier = (call_expression "(*(code *)PTR_fchdir_000464f4)(*(undefined4 *)(param_1 + 0x1c))" (parenthesized_expression "(*(code *)PTR_fchdir_000464f4)" ( (pointer_expression "*(code *)PTR_fchdir_000464f4" * (cast_expression "(code *)PTR_fchdir_000464f4" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(*(undefined4 *)(param_1 + 0x1c))" ( (pointer_expression "*(undefined4 *)(param_1 + 0x1c)" * (cast_expression "(undefined4 *)(param_1 + 0x1c)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x1c)" ( (binary_expression "param_1 + 0x1c" identifier + number_literal) )))) )))) ;) (expression_statement "bVar2 = iVar1 != 0;" (assignment_expression "bVar2 = iVar1 != 0" identifier = (binary_expression "iVar1 != 0" identifier != number_literal)) ;) }) (else_clause "else {\n      FUN_00029f48(param_1,0xffffff9c,1);\n      bVar2 = false;\n    }" else (compound_statement "{\n      FUN_00029f48(param_1,0xffffff9c,1);\n      bVar2 = false;\n    }" { (expression_statement "FUN_00029f48(param_1,0xffffff9c,1);" (call_expression "FUN_00029f48(param_1,0xffffff9c,1)" identifier (argument_list "(param_1,0xffffff9c,1)" ( identifier , number_literal , number_literal ))) ;) (expression_statement "bVar2 = false;" (assignment_expression "bVar2 = false" identifier = false) ;) }))) }) (else_clause "else {\n    bVar2 = false;\n  }" else (compound_statement "{\n    bVar2 = false;\n  }" { (expression_statement "bVar2 = false;" (assignment_expression "bVar2 = false" identifier = false) ;) }))) (expression_statement "FUN_00029c88(param_1 + 0x3c);" (call_expression "FUN_00029c88(param_1 + 0x3c)" identifier (argument_list "(param_1 + 0x3c)" ( (binary_expression "param_1 + 0x3c" identifier + number_literal) ))) ;) (return_statement "return bVar2;" return identifier ;) })))
(translation_unit "int restore_initial_cwd(FTS *sp)\n\n{\n  int iVar1;\n  uint uVar2;\n  \n  if ((sp->fts_options & 4U) == 0) {\n    if ((sp->fts_options & 0x200U) == 0) {\n      iVar1 = (*(code *)PTR_fchdir_000464f4)(sp->fts_rfd);\n      uVar2 = (uint)(iVar1 != 0);\n    }\n    else {\n      cwd_advance_fd(sp,-100,true);\n      uVar2 = 0;\n    }\n  }\n  else {\n    uVar2 = 0;\n  }\n  fd_ring_clear(&sp->fts_fd_ring);\n  return uVar2;\n}\n\n" (function_definition "int restore_initial_cwd(FTS *sp)\n\n{\n  int iVar1;\n  uint uVar2;\n  \n  if ((sp->fts_options & 4U) == 0) {\n    if ((sp->fts_options & 0x200U) == 0) {\n      iVar1 = (*(code *)PTR_fchdir_000464f4)(sp->fts_rfd);\n      uVar2 = (uint)(iVar1 != 0);\n    }\n    else {\n      cwd_advance_fd(sp,-100,true);\n      uVar2 = 0;\n    }\n  }\n  else {\n    uVar2 = 0;\n  }\n  fd_ring_clear(&sp->fts_fd_ring);\n  return uVar2;\n}" primitive_type (function_declarator "restore_initial_cwd(FTS *sp)" identifier (parameter_list "(FTS *sp)" ( (parameter_declaration "FTS *sp" type_identifier (pointer_declarator "*sp" * identifier)) ))) (compound_statement "{\n  int iVar1;\n  uint uVar2;\n  \n  if ((sp->fts_options & 4U) == 0) {\n    if ((sp->fts_options & 0x200U) == 0) {\n      iVar1 = (*(code *)PTR_fchdir_000464f4)(sp->fts_rfd);\n      uVar2 = (uint)(iVar1 != 0);\n    }\n    else {\n      cwd_advance_fd(sp,-100,true);\n      uVar2 = 0;\n    }\n  }\n  else {\n    uVar2 = 0;\n  }\n  fd_ring_clear(&sp->fts_fd_ring);\n  return uVar2;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "uint uVar2;" type_identifier identifier ;) (if_statement "if ((sp->fts_options & 4U) == 0) {\n    if ((sp->fts_options & 0x200U) == 0) {\n      iVar1 = (*(code *)PTR_fchdir_000464f4)(sp->fts_rfd);\n      uVar2 = (uint)(iVar1 != 0);\n    }\n    else {\n      cwd_advance_fd(sp,-100,true);\n      uVar2 = 0;\n    }\n  }\n  else {\n    uVar2 = 0;\n  }" if (parenthesized_expression "((sp->fts_options & 4U) == 0)" ( (binary_expression "(sp->fts_options & 4U) == 0" (parenthesized_expression "(sp->fts_options & 4U)" ( (binary_expression "sp->fts_options & 4U" (field_expression "sp->fts_options" identifier -> field_identifier) & number_literal) )) == number_literal) )) (compound_statement "{\n    if ((sp->fts_options & 0x200U) == 0) {\n      iVar1 = (*(code *)PTR_fchdir_000464f4)(sp->fts_rfd);\n      uVar2 = (uint)(iVar1 != 0);\n    }\n    else {\n      cwd_advance_fd(sp,-100,true);\n      uVar2 = 0;\n    }\n  }" { (if_statement "if ((sp->fts_options & 0x200U) == 0) {\n      iVar1 = (*(code *)PTR_fchdir_000464f4)(sp->fts_rfd);\n      uVar2 = (uint)(iVar1 != 0);\n    }\n    else {\n      cwd_advance_fd(sp,-100,true);\n      uVar2 = 0;\n    }" if (parenthesized_expression "((sp->fts_options & 0x200U) == 0)" ( (binary_expression "(sp->fts_options & 0x200U) == 0" (parenthesized_expression "(sp->fts_options & 0x200U)" ( (binary_expression "sp->fts_options & 0x200U" (field_expression "sp->fts_options" identifier -> field_identifier) & number_literal) )) == number_literal) )) (compound_statement "{\n      iVar1 = (*(code *)PTR_fchdir_000464f4)(sp->fts_rfd);\n      uVar2 = (uint)(iVar1 != 0);\n    }" { (expression_statement "iVar1 = (*(code *)PTR_fchdir_000464f4)(sp->fts_rfd);" (assignment_expression "iVar1 = (*(code *)PTR_fchdir_000464f4)(sp->fts_rfd)" identifier = (call_expression "(*(code *)PTR_fchdir_000464f4)(sp->fts_rfd)" (parenthesized_expression "(*(code *)PTR_fchdir_000464f4)" ( (pointer_expression "*(code *)PTR_fchdir_000464f4" * (cast_expression "(code *)PTR_fchdir_000464f4" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(sp->fts_rfd)" ( (field_expression "sp->fts_rfd" identifier -> field_identifier) )))) ;) (expression_statement "uVar2 = (uint)(iVar1 != 0);" (assignment_expression "uVar2 = (uint)(iVar1 != 0)" identifier = (call_expression "(uint)(iVar1 != 0)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(iVar1 != 0)" ( (binary_expression "iVar1 != 0" identifier != number_literal) )))) ;) }) (else_clause "else {\n      cwd_advance_fd(sp,-100,true);\n      uVar2 = 0;\n    }" else (compound_statement "{\n      cwd_advance_fd(sp,-100,true);\n      uVar2 = 0;\n    }" { (expression_statement "cwd_advance_fd(sp,-100,true);" (call_expression "cwd_advance_fd(sp,-100,true)" identifier (argument_list "(sp,-100,true)" ( identifier , number_literal , true ))) ;) (expression_statement "uVar2 = 0;" (assignment_expression "uVar2 = 0" identifier = number_literal) ;) }))) }) (else_clause "else {\n    uVar2 = 0;\n  }" else (compound_statement "{\n    uVar2 = 0;\n  }" { (expression_statement "uVar2 = 0;" (assignment_expression "uVar2 = 0" identifier = number_literal) ;) }))) (expression_statement "fd_ring_clear(&sp->fts_fd_ring);" (call_expression "fd_ring_clear(&sp->fts_fd_ring)" identifier (argument_list "(&sp->fts_fd_ring)" ( (pointer_expression "&sp->fts_fd_ring" & (field_expression "sp->fts_fd_ring" identifier -> field_identifier)) ))) ;) (return_statement "return uVar2;" return identifier ;) })))
(translation_unit "bool FUN_0002a018(int param_1)\n\n{\n  int iVar1;\n  bool bVar2;\n  \n  if ((*(uint *)(param_1 + 0x30) & 4) == 0) {\n    if ((*(uint *)(param_1 + 0x30) & 0x200) == 0) {\n      iVar1 = (*(code *)PTR_fchdir_000464f4)(*(undefined4 *)(param_1 + 0x1c));\n      bVar2 = iVar1 != 0;\n    }\n    else {\n      FUN_00029f48(param_1,0xffffff9c,1);\n      bVar2 = false;\n    }\n  }\n  else {\n    bVar2 = false;\n  }\n  FUN_00029c88(param_1 + 0x3c);\n  return bVar2;\n}\n\n" (function_definition "bool FUN_0002a018(int param_1)\n\n{\n  int iVar1;\n  bool bVar2;\n  \n  if ((*(uint *)(param_1 + 0x30) & 4) == 0) {\n    if ((*(uint *)(param_1 + 0x30) & 0x200) == 0) {\n      iVar1 = (*(code *)PTR_fchdir_000464f4)(*(undefined4 *)(param_1 + 0x1c));\n      bVar2 = iVar1 != 0;\n    }\n    else {\n      FUN_00029f48(param_1,0xffffff9c,1);\n      bVar2 = false;\n    }\n  }\n  else {\n    bVar2 = false;\n  }\n  FUN_00029c88(param_1 + 0x3c);\n  return bVar2;\n}" primitive_type (function_declarator "FUN_0002a018(int param_1)" identifier (parameter_list "(int param_1)" ( (parameter_declaration "int param_1" primitive_type identifier) ))) (compound_statement "{\n  int iVar1;\n  bool bVar2;\n  \n  if ((*(uint *)(param_1 + 0x30) & 4) == 0) {\n    if ((*(uint *)(param_1 + 0x30) & 0x200) == 0) {\n      iVar1 = (*(code *)PTR_fchdir_000464f4)(*(undefined4 *)(param_1 + 0x1c));\n      bVar2 = iVar1 != 0;\n    }\n    else {\n      FUN_00029f48(param_1,0xffffff9c,1);\n      bVar2 = false;\n    }\n  }\n  else {\n    bVar2 = false;\n  }\n  FUN_00029c88(param_1 + 0x3c);\n  return bVar2;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "bool bVar2;" primitive_type identifier ;) (if_statement "if ((*(uint *)(param_1 + 0x30) & 4) == 0) {\n    if ((*(uint *)(param_1 + 0x30) & 0x200) == 0) {\n      iVar1 = (*(code *)PTR_fchdir_000464f4)(*(undefined4 *)(param_1 + 0x1c));\n      bVar2 = iVar1 != 0;\n    }\n    else {\n      FUN_00029f48(param_1,0xffffff9c,1);\n      bVar2 = false;\n    }\n  }\n  else {\n    bVar2 = false;\n  }" if (parenthesized_expression "((*(uint *)(param_1 + 0x30) & 4) == 0)" ( (binary_expression "(*(uint *)(param_1 + 0x30) & 4) == 0" (parenthesized_expression "(*(uint *)(param_1 + 0x30) & 4)" ( (binary_expression "*(uint *)(param_1 + 0x30) & 4" (pointer_expression "*(uint *)(param_1 + 0x30)" * (cast_expression "(uint *)(param_1 + 0x30)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x30)" ( (binary_expression "param_1 + 0x30" identifier + number_literal) )))) & number_literal) )) == number_literal) )) (compound_statement "{\n    if ((*(uint *)(param_1 + 0x30) & 0x200) == 0) {\n      iVar1 = (*(code *)PTR_fchdir_000464f4)(*(undefined4 *)(param_1 + 0x1c));\n      bVar2 = iVar1 != 0;\n    }\n    else {\n      FUN_00029f48(param_1,0xffffff9c,1);\n      bVar2 = false;\n    }\n  }" { (if_statement "if ((*(uint *)(param_1 + 0x30) & 0x200) == 0) {\n      iVar1 = (*(code *)PTR_fchdir_000464f4)(*(undefined4 *)(param_1 + 0x1c));\n      bVar2 = iVar1 != 0;\n    }\n    else {\n      FUN_00029f48(param_1,0xffffff9c,1);\n      bVar2 = false;\n    }" if (parenthesized_expression "((*(uint *)(param_1 + 0x30) & 0x200) == 0)" ( (binary_expression "(*(uint *)(param_1 + 0x30) & 0x200) == 0" (parenthesized_expression "(*(uint *)(param_1 + 0x30) & 0x200)" ( (binary_expression "*(uint *)(param_1 + 0x30) & 0x200" (pointer_expression "*(uint *)(param_1 + 0x30)" * (cast_expression "(uint *)(param_1 + 0x30)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x30)" ( (binary_expression "param_1 + 0x30" identifier + number_literal) )))) & number_literal) )) == number_literal) )) (compound_statement "{\n      iVar1 = (*(code *)PTR_fchdir_000464f4)(*(undefined4 *)(param_1 + 0x1c));\n      bVar2 = iVar1 != 0;\n    }" { (expression_statement "iVar1 = (*(code *)PTR_fchdir_000464f4)(*(undefined4 *)(param_1 + 0x1c));" (assignment_expression "iVar1 = (*(code *)PTR_fchdir_000464f4)(*(undefined4 *)(param_1 + 0x1c))" identifier = (call_expression "(*(code *)PTR_fchdir_000464f4)(*(undefined4 *)(param_1 + 0x1c))" (parenthesized_expression "(*(code *)PTR_fchdir_000464f4)" ( (pointer_expression "*(code *)PTR_fchdir_000464f4" * (cast_expression "(code *)PTR_fchdir_000464f4" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(*(undefined4 *)(param_1 + 0x1c))" ( (pointer_expression "*(undefined4 *)(param_1 + 0x1c)" * (cast_expression "(undefined4 *)(param_1 + 0x1c)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x1c)" ( (binary_expression "param_1 + 0x1c" identifier + number_literal) )))) )))) ;) (expression_statement "bVar2 = iVar1 != 0;" (assignment_expression "bVar2 = iVar1 != 0" identifier = (binary_expression "iVar1 != 0" identifier != number_literal)) ;) }) (else_clause "else {\n      FUN_00029f48(param_1,0xffffff9c,1);\n      bVar2 = false;\n    }" else (compound_statement "{\n      FUN_00029f48(param_1,0xffffff9c,1);\n      bVar2 = false;\n    }" { (expression_statement "FUN_00029f48(param_1,0xffffff9c,1);" (call_expression "FUN_00029f48(param_1,0xffffff9c,1)" identifier (argument_list "(param_1,0xffffff9c,1)" ( identifier , number_literal , number_literal ))) ;) (expression_statement "bVar2 = false;" (assignment_expression "bVar2 = false" identifier = false) ;) }))) }) (else_clause "else {\n    bVar2 = false;\n  }" else (compound_statement "{\n    bVar2 = false;\n  }" { (expression_statement "bVar2 = false;" (assignment_expression "bVar2 = false" identifier = false) ;) }))) (expression_statement "FUN_00029c88(param_1 + 0x3c);" (call_expression "FUN_00029c88(param_1 + 0x3c)" identifier (argument_list "(param_1 + 0x3c)" ( (binary_expression "param_1 + 0x3c" identifier + number_literal) ))) ;) (return_statement "return bVar2;" return identifier ;) })))
(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 (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) & LIT) )) == LIT) )) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) & LIT) )) == LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) )))) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT != LIT)) ;) }) (else_clause else (compound_statement { (expression_statement (call_expression IDENT (argument_list ( IDENT , LIT , LIT ))) ;) (expression_statement (assignment_expression IDENT = BOOL) ;) }))) }) (else_clause else (compound_statement { (expression_statement (assignment_expression IDENT = BOOL) ;) }))) (expression_statement (call_expression IDENT (argument_list ( (binary_expression IDENT + LIT) ))) ;) (return_statement return IDENT ;) })))
(function_definition "bool FUN_0002a018(int param_1)\n\n{\n  int iVar1;\n  bool bVar2;\n  \n  if ((*(uint *)(param_1 + 0x30) & 4) == 0) {\n    if ((*(uint *)(param_1 + 0x30) & 0x200) == 0) {\n      iVar1 = (*(code *)PTR_fchdir_000464f4)(*(undefined4 *)(param_1 + 0x1c));\n      bVar2 = iVar1 != 0;\n    }\n    else {\n      FUN_00029f48(param_1,0xffffff9c,1);\n      bVar2 = false;\n    }\n  }\n  else {\n    bVar2 = false;\n  }\n  FUN_00029c88(param_1 + 0x3c);\n  return bVar2;\n}" (primitive_type "bool") (function_declarator "FUN_0002a018(int param_1)" (identifier "FUN_0002a018") (parameter_list "(int param_1)" (( "(") (parameter_declaration "int param_1" (primitive_type "int") (identifier "param_1")) () ")"))) (compound_statement "{\n  int iVar1;\n  bool bVar2;\n  \n  if ((*(uint *)(param_1 + 0x30) & 4) == 0) {\n    if ((*(uint *)(param_1 + 0x30) & 0x200) == 0) {\n      iVar1 = (*(code *)PTR_fchdir_000464f4)(*(undefined4 *)(param_1 + 0x1c));\n      bVar2 = iVar1 != 0;\n    }\n    else {\n      FUN_00029f48(param_1,0xffffff9c,1);\n      bVar2 = false;\n    }\n  }\n  else {\n    bVar2 = false;\n  }\n  FUN_00029c88(param_1 + 0x3c);\n  return bVar2;\n}" ({ "{") (declaration "int iVar1;" (primitive_type "int") (identifier "iVar1") (; ";")) (declaration "bool bVar2;" (primitive_type "bool") (identifier "bVar2") (; ";")) (if_statement "if ((*(uint *)(param_1 + 0x30) & 4) == 0) {\n    if ((*(uint *)(param_1 + 0x30) & 0x200) == 0) {\n      iVar1 = (*(code *)PTR_fchdir_000464f4)(*(undefined4 *)(param_1 + 0x1c));\n      bVar2 = iVar1 != 0;\n    }\n    else {\n      FUN_00029f48(param_1,0xffffff9c,1);\n      bVar2 = false;\n    }\n  }\n  else {\n    bVar2 = false;\n  }" (if "if") (parenthesized_expression "((*(uint *)(param_1 + 0x30) & 4) == 0)" (( "(") (binary_expression "(*(uint *)(param_1 + 0x30) & 4) == 0" (parenthesized_expression "(*(uint *)(param_1 + 0x30) & 4)" (( "(") (binary_expression "*(uint *)(param_1 + 0x30) & 4" (pointer_expression "*(uint *)(param_1 + 0x30)" (* "*") (cast_expression "(uint *)(param_1 + 0x30)" (( "(") (type_descriptor "uint *" (type_identifier "uint") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x30)" (( "(") (binary_expression "param_1 + 0x30" (identifier "param_1") (+ "+") (number_literal "0x30")) () ")")))) (& "&") (number_literal "4")) () ")")) (== "==") (number_literal "0")) () ")")) (compound_statement "{\n    if ((*(uint *)(param_1 + 0x30) & 0x200) == 0) {\n      iVar1 = (*(code *)PTR_fchdir_000464f4)(*(undefined4 *)(param_1 + 0x1c));\n      bVar2 = iVar1 != 0;\n    }\n    else {\n      FUN_00029f48(param_1,0xffffff9c,1);\n      bVar2 = false;\n    }\n  }" ({ "{") (if_statement "if ((*(uint *)(param_1 + 0x30) & 0x200) == 0) {\n      iVar1 = (*(code *)PTR_fchdir_000464f4)(*(undefined4 *)(param_1 + 0x1c));\n      bVar2 = iVar1 != 0;\n    }\n    else {\n      FUN_00029f48(param_1,0xffffff9c,1);\n      bVar2 = false;\n    }" (if "if") (parenthesized_expression "((*(uint *)(param_1 + 0x30) & 0x200) == 0)" (( "(") (binary_expression "(*(uint *)(param_1 + 0x30) & 0x200) == 0" (parenthesized_expression "(*(uint *)(param_1 + 0x30) & 0x200)" (( "(") (binary_expression "*(uint *)(param_1 + 0x30) & 0x200" (pointer_expression "*(uint *)(param_1 + 0x30)" (* "*") (cast_expression "(uint *)(param_1 + 0x30)" (( "(") (type_descriptor "uint *" (type_identifier "uint") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x30)" (( "(") (binary_expression "param_1 + 0x30" (identifier "param_1") (+ "+") (number_literal "0x30")) () ")")))) (& "&") (number_literal "0x200")) () ")")) (== "==") (number_literal "0")) () ")")) (compound_statement "{\n      iVar1 = (*(code *)PTR_fchdir_000464f4)(*(undefined4 *)(param_1 + 0x1c));\n      bVar2 = iVar1 != 0;\n    }" ({ "{") (expression_statement "iVar1 = (*(code *)PTR_fchdir_000464f4)(*(undefined4 *)(param_1 + 0x1c));" (assignment_expression "iVar1 = (*(code *)PTR_fchdir_000464f4)(*(undefined4 *)(param_1 + 0x1c))" (identifier "iVar1") (= "=") (call_expression "(*(code *)PTR_fchdir_000464f4)(*(undefined4 *)(param_1 + 0x1c))" (parenthesized_expression "(*(code *)PTR_fchdir_000464f4)" (( "(") (pointer_expression "*(code *)PTR_fchdir_000464f4" (* "*") (cast_expression "(code *)PTR_fchdir_000464f4" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_fchdir_000464f4"))) () ")")) (argument_list "(*(undefined4 *)(param_1 + 0x1c))" (( "(") (pointer_expression "*(undefined4 *)(param_1 + 0x1c)" (* "*") (cast_expression "(undefined4 *)(param_1 + 0x1c)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x1c)" (( "(") (binary_expression "param_1 + 0x1c" (identifier "param_1") (+ "+") (number_literal "0x1c")) () ")")))) () ")")))) (; ";")) (expression_statement "bVar2 = iVar1 != 0;" (assignment_expression "bVar2 = iVar1 != 0" (identifier "bVar2") (= "=") (binary_expression "iVar1 != 0" (identifier "iVar1") (!= "!=") (number_literal "0"))) (; ";")) (} "}")) (else_clause "else {\n      FUN_00029f48(param_1,0xffffff9c,1);\n      bVar2 = false;\n    }" (else "else") (compound_statement "{\n      FUN_00029f48(param_1,0xffffff9c,1);\n      bVar2 = false;\n    }" ({ "{") (expression_statement "FUN_00029f48(param_1,0xffffff9c,1);" (call_expression "FUN_00029f48(param_1,0xffffff9c,1)" (identifier "FUN_00029f48") (argument_list "(param_1,0xffffff9c,1)" (( "(") (identifier "param_1") (, ",") (number_literal "0xffffff9c") (, ",") (number_literal "1") () ")"))) (; ";")) (expression_statement "bVar2 = false;" (assignment_expression "bVar2 = false" (identifier "bVar2") (= "=") (false "false")) (; ";")) (} "}")))) (} "}")) (else_clause "else {\n    bVar2 = false;\n  }" (else "else") (compound_statement "{\n    bVar2 = false;\n  }" ({ "{") (expression_statement "bVar2 = false;" (assignment_expression "bVar2 = false" (identifier "bVar2") (= "=") (false "false")) (; ";")) (} "}")))) (expression_statement "FUN_00029c88(param_1 + 0x3c);" (call_expression "FUN_00029c88(param_1 + 0x3c)" (identifier "FUN_00029c88") (argument_list "(param_1 + 0x3c)" (( "(") (binary_expression "param_1 + 0x3c" (identifier "param_1") (+ "+") (number_literal "0x3c")) () ")"))) (; ";")) (return_statement "return bVar2;" (return "return") (identifier "bVar2") (; ";")) (} "}")))
(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: (parenthesized_expression (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))) right: (number_literal))) consequence: (compound_statement (if_statement condition: (parenthesized_expression (binary_expression left: (parenthesized_expression (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))) right: (number_literal))) consequence: (compound_statement (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: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))))))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal))))) alternative: (else_clause (compound_statement (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier) (number_literal) (number_literal)))) (expression_statement (assignment_expression left: (identifier) right: (false))))))) alternative: (else_clause (compound_statement (expression_statement (assignment_expression left: (identifier) right: (false)))))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (binary_expression left: (identifier) right: (number_literal))))) (return_statement (identifier)))))

bool MASKED(int param_1)

{
  int iVar1;
  bool bVar2;
  
  if ((*(uint *)(param_1 + 0x30) & 4) == 0) {
    if ((*(uint *)(param_1 + 0x30) & 0x200) == 0) {
      iVar1 = (*(code *)PTR_fchdir_000464f4)(*(undefined4 *)(param_1 + 0x1c));
      bVar2 = iVar1 != 0;
    }
    else {
      FUN_00029f48(param_1,0xffffff9c,1);
      bVar2 = false;
    }
  }
  else {
    bVar2 = false;
  }
  FUN_00029c88(param_1 + 0x3c);
  return bVar2;
}

