
int restore_initial_cwd(FTS *sp)

{
  undefined3 extraout_var;
  undefined3 extraout_var_00;
  int iVar1;
  _Bool _Var2;
  uint uVar3;
  I_ring *ir;
  
  ir = &sp->fts_fd_ring;
  if ((sp->fts_options & 4U) != 0) {
    uVar3 = 0;
    goto LAB_0003920c;
  }
  if ((sp->fts_options & 0x200U) != 0) {
    iVar1 = i_ring_push(ir,sp->fts_cwd_fd);
    if (iVar1 < 0) {
      sp->fts_cwd_fd = -100;
    }
    else {
      (*(code *)PTR_close_0005633c)(iVar1);
      sp->fts_cwd_fd = -100;
    }
    _Var2 = i_ring_empty(ir);
    uVar3 = 0;
    if (CONCAT31(extraout_var,_Var2) == 0) {
      iVar1 = i_ring_pop(ir);
      while( true ) {
        if (-1 < iVar1) {
          (*(code *)PTR_close_0005633c)(iVar1);
        }
LAB_0003920c:
        _Var2 = i_ring_empty(ir);
        if (CONCAT31(extraout_var_00,_Var2) != 0) break;
        iVar1 = i_ring_pop(ir);
      }
    }
    return uVar3;
  }
  iVar1 = (*(code *)PTR_fchdir_00056390)(sp->fts_rfd);
  uVar3 = (uint)(iVar1 != 0);
  goto LAB_0003920c;
}



bool FUN_0003915c(int param_1)

{
  int iVar1;
  bool bVar2;
  int iVar3;
  
  iVar3 = param_1 + 0x3c;
  if ((*(uint *)(param_1 + 0x30) & 4) != 0) {
    bVar2 = false;
    goto LAB_0003920c;
  }
  if ((*(uint *)(param_1 + 0x30) & 0x200) != 0) {
    iVar1 = i_ring_push(iVar3,*(undefined4 *)(param_1 + 0x20));
    if (iVar1 < 0) {
      *(undefined4 *)(param_1 + 0x20) = 0xffffff9c;
    }
    else {
      (*(code *)PTR_close_0005633c)(iVar1);
      *(undefined4 *)(param_1 + 0x20) = 0xffffff9c;
    }
    iVar1 = i_ring_empty(iVar3);
    bVar2 = false;
    if (iVar1 == 0) {
      iVar1 = i_ring_pop(iVar3);
      while( true ) {
        if (-1 < iVar1) {
          (*(code *)PTR_close_0005633c)(iVar1);
        }
LAB_0003920c:
        iVar1 = i_ring_empty(iVar3);
        if (iVar1 != 0) break;
        iVar1 = i_ring_pop(iVar3);
      }
    }
    return bVar2;
  }
  iVar1 = (*(code *)PTR_fchdir_00056390)(*(undefined4 *)(param_1 + 0x1c));
  bVar2 = iVar1 != 0;
  goto LAB_0003920c;
}


lui gp,0x2
addiu gp,gp,0x4f84
addu gp,gp,t9
addiu sp,sp,-0x28
lw v0,0x30(a0)
sw s0,0x18(sp)
andi s0,v0,0x4
sw gp,0x10(sp)
sw s2,0x20(sp)
addiu s2,a0,0x3c
sw ra,0x24(sp)
bne s0,zero,0x000391f4
_sw s1,0x1c(sp)
andi v0,v0,0x200
beq v0,zero,0x0003924c
_or s1,a0,zero
lw t9,-0x7e08(gp)
or a0,s2,zero
bal 0x0003ec80
_lw a1,0x20(s1)
bgez v0,0x00039264
_lw gp,0x10(sp)
li v0,-0x64
sw v0,0x20(s1)
lw t9,-0x7e04(gp)
bal 0x0003ec78
_or a0,s2,zero
or a0,s2,zero
lw gp,0x10(sp)
beq v0,zero,0x000391fc
_lw t9,-0x7e00(gp)
lw ra,0x24(sp)
or v0,s0,zero
lw s2,0x20(sp)
lw s1,0x1c(sp)
lw s0,0x18(sp)
jr ra
_addiu sp,sp,0x28
b 0x0003920c
_or s0,zero,zero
bal 0x0003ecc4
_nop
bgez v0,0x00039238
_lw gp,0x10(sp)
lw t9,-0x7e04(gp)
bal 0x0003ec78
_or a0,s2,zero
or a0,s2,zero
lw gp,0x10(sp)
bne v0,zero,0x000391d8
_lw t9,-0x7e00(gp)
bal 0x0003ecc4
_nop
bltz v0,0x0003920c
_lw gp,0x10(sp)
lw t9,-0x7da4(gp)
jalr t9
_or a0,v0,zero
b 0x0003920c
_lw gp,0x10(sp)
lw t9,-0x7d50(gp)
jalr t9
_lw a0,0x1c(a0)
lw gp,0x10(sp)
b 0x0003920c
_sltu s0,zero,v0
lw t9,-0x7da4(gp)
jalr t9
_or a0,v0,zero
li v0,-0x64
lw gp,0x10(sp)
b 0x000391bc
_sw v0,0x20(s1)
(translation_unit "bool FUN_0003915c(int param_1)\n\n{\n  int iVar1;\n  bool bVar2;\n  int iVar3;\n  \n  iVar3 = param_1 + 0x3c;\n  if ((*(uint *)(param_1 + 0x30) & 4) != 0) {\n    bVar2 = false;\n    goto LAB_0003920c;\n  }\n  if ((*(uint *)(param_1 + 0x30) & 0x200) != 0) {\n    iVar1 = i_ring_push(iVar3,*(undefined4 *)(param_1 + 0x20));\n    if (iVar1 < 0) {\n      *(undefined4 *)(param_1 + 0x20) = 0xffffff9c;\n    }\n    else {\n      (*(code *)PTR_close_0005633c)(iVar1);\n      *(undefined4 *)(param_1 + 0x20) = 0xffffff9c;\n    }\n    iVar1 = i_ring_empty(iVar3);\n    bVar2 = false;\n    if (iVar1 == 0) {\n      iVar1 = i_ring_pop(iVar3);\n      while( true ) {\n        if (-1 < iVar1) {\n          (*(code *)PTR_close_0005633c)(iVar1);\n        }\nLAB_0003920c:\n        iVar1 = i_ring_empty(iVar3);\n        if (iVar1 != 0) break;\n        iVar1 = i_ring_pop(iVar3);\n      }\n    }\n    return bVar2;\n  }\n  iVar1 = (*(code *)PTR_fchdir_00056390)(*(undefined4 *)(param_1 + 0x1c));\n  bVar2 = iVar1 != 0;\n  goto LAB_0003920c;\n}\n\n" (function_definition "bool FUN_0003915c(int param_1)\n\n{\n  int iVar1;\n  bool bVar2;\n  int iVar3;\n  \n  iVar3 = param_1 + 0x3c;\n  if ((*(uint *)(param_1 + 0x30) & 4) != 0) {\n    bVar2 = false;\n    goto LAB_0003920c;\n  }\n  if ((*(uint *)(param_1 + 0x30) & 0x200) != 0) {\n    iVar1 = i_ring_push(iVar3,*(undefined4 *)(param_1 + 0x20));\n    if (iVar1 < 0) {\n      *(undefined4 *)(param_1 + 0x20) = 0xffffff9c;\n    }\n    else {\n      (*(code *)PTR_close_0005633c)(iVar1);\n      *(undefined4 *)(param_1 + 0x20) = 0xffffff9c;\n    }\n    iVar1 = i_ring_empty(iVar3);\n    bVar2 = false;\n    if (iVar1 == 0) {\n      iVar1 = i_ring_pop(iVar3);\n      while( true ) {\n        if (-1 < iVar1) {\n          (*(code *)PTR_close_0005633c)(iVar1);\n        }\nLAB_0003920c:\n        iVar1 = i_ring_empty(iVar3);\n        if (iVar1 != 0) break;\n        iVar1 = i_ring_pop(iVar3);\n      }\n    }\n    return bVar2;\n  }\n  iVar1 = (*(code *)PTR_fchdir_00056390)(*(undefined4 *)(param_1 + 0x1c));\n  bVar2 = iVar1 != 0;\n  goto LAB_0003920c;\n}" primitive_type (function_declarator "FUN_0003915c(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  int iVar3;\n  \n  iVar3 = param_1 + 0x3c;\n  if ((*(uint *)(param_1 + 0x30) & 4) != 0) {\n    bVar2 = false;\n    goto LAB_0003920c;\n  }\n  if ((*(uint *)(param_1 + 0x30) & 0x200) != 0) {\n    iVar1 = i_ring_push(iVar3,*(undefined4 *)(param_1 + 0x20));\n    if (iVar1 < 0) {\n      *(undefined4 *)(param_1 + 0x20) = 0xffffff9c;\n    }\n    else {\n      (*(code *)PTR_close_0005633c)(iVar1);\n      *(undefined4 *)(param_1 + 0x20) = 0xffffff9c;\n    }\n    iVar1 = i_ring_empty(iVar3);\n    bVar2 = false;\n    if (iVar1 == 0) {\n      iVar1 = i_ring_pop(iVar3);\n      while( true ) {\n        if (-1 < iVar1) {\n          (*(code *)PTR_close_0005633c)(iVar1);\n        }\nLAB_0003920c:\n        iVar1 = i_ring_empty(iVar3);\n        if (iVar1 != 0) break;\n        iVar1 = i_ring_pop(iVar3);\n      }\n    }\n    return bVar2;\n  }\n  iVar1 = (*(code *)PTR_fchdir_00056390)(*(undefined4 *)(param_1 + 0x1c));\n  bVar2 = iVar1 != 0;\n  goto LAB_0003920c;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "bool bVar2;" primitive_type identifier ;) (declaration "int iVar3;" primitive_type identifier ;) (expression_statement "iVar3 = param_1 + 0x3c;" (assignment_expression "iVar3 = param_1 + 0x3c" identifier = (binary_expression "param_1 + 0x3c" identifier + number_literal)) ;) (if_statement "if ((*(uint *)(param_1 + 0x30) & 4) != 0) {\n    bVar2 = false;\n    goto LAB_0003920c;\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    bVar2 = false;\n    goto LAB_0003920c;\n  }" { (expression_statement "bVar2 = false;" (assignment_expression "bVar2 = false" identifier = false) ;) (goto_statement "goto LAB_0003920c;" goto statement_identifier ;) })) (if_statement "if ((*(uint *)(param_1 + 0x30) & 0x200) != 0) {\n    iVar1 = i_ring_push(iVar3,*(undefined4 *)(param_1 + 0x20));\n    if (iVar1 < 0) {\n      *(undefined4 *)(param_1 + 0x20) = 0xffffff9c;\n    }\n    else {\n      (*(code *)PTR_close_0005633c)(iVar1);\n      *(undefined4 *)(param_1 + 0x20) = 0xffffff9c;\n    }\n    iVar1 = i_ring_empty(iVar3);\n    bVar2 = false;\n    if (iVar1 == 0) {\n      iVar1 = i_ring_pop(iVar3);\n      while( true ) {\n        if (-1 < iVar1) {\n          (*(code *)PTR_close_0005633c)(iVar1);\n        }\nLAB_0003920c:\n        iVar1 = i_ring_empty(iVar3);\n        if (iVar1 != 0) break;\n        iVar1 = i_ring_pop(iVar3);\n      }\n    }\n    return bVar2;\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 = i_ring_push(iVar3,*(undefined4 *)(param_1 + 0x20));\n    if (iVar1 < 0) {\n      *(undefined4 *)(param_1 + 0x20) = 0xffffff9c;\n    }\n    else {\n      (*(code *)PTR_close_0005633c)(iVar1);\n      *(undefined4 *)(param_1 + 0x20) = 0xffffff9c;\n    }\n    iVar1 = i_ring_empty(iVar3);\n    bVar2 = false;\n    if (iVar1 == 0) {\n      iVar1 = i_ring_pop(iVar3);\n      while( true ) {\n        if (-1 < iVar1) {\n          (*(code *)PTR_close_0005633c)(iVar1);\n        }\nLAB_0003920c:\n        iVar1 = i_ring_empty(iVar3);\n        if (iVar1 != 0) break;\n        iVar1 = i_ring_pop(iVar3);\n      }\n    }\n    return bVar2;\n  }" { (expression_statement "iVar1 = i_ring_push(iVar3,*(undefined4 *)(param_1 + 0x20));" (assignment_expression "iVar1 = i_ring_push(iVar3,*(undefined4 *)(param_1 + 0x20))" identifier = (call_expression "i_ring_push(iVar3,*(undefined4 *)(param_1 + 0x20))" identifier (argument_list "(iVar3,*(undefined4 *)(param_1 + 0x20))" ( identifier , (pointer_expression "*(undefined4 *)(param_1 + 0x20)" * (cast_expression "(undefined4 *)(param_1 + 0x20)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x20)" ( (binary_expression "param_1 + 0x20" identifier + number_literal) )))) )))) ;) (if_statement "if (iVar1 < 0) {\n      *(undefined4 *)(param_1 + 0x20) = 0xffffff9c;\n    }\n    else {\n      (*(code *)PTR_close_0005633c)(iVar1);\n      *(undefined4 *)(param_1 + 0x20) = 0xffffff9c;\n    }" if (parenthesized_expression "(iVar1 < 0)" ( (binary_expression "iVar1 < 0" identifier < number_literal) )) (compound_statement "{\n      *(undefined4 *)(param_1 + 0x20) = 0xffffff9c;\n    }" { (expression_statement "*(undefined4 *)(param_1 + 0x20) = 0xffffff9c;" (assignment_expression "*(undefined4 *)(param_1 + 0x20) = 0xffffff9c" (pointer_expression "*(undefined4 *)(param_1 + 0x20)" * (cast_expression "(undefined4 *)(param_1 + 0x20)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x20)" ( (binary_expression "param_1 + 0x20" identifier + number_literal) )))) = number_literal) ;) }) (else_clause "else {\n      (*(code *)PTR_close_0005633c)(iVar1);\n      *(undefined4 *)(param_1 + 0x20) = 0xffffff9c;\n    }" else (compound_statement "{\n      (*(code *)PTR_close_0005633c)(iVar1);\n      *(undefined4 *)(param_1 + 0x20) = 0xffffff9c;\n    }" { (expression_statement "(*(code *)PTR_close_0005633c)(iVar1);" (call_expression "(*(code *)PTR_close_0005633c)(iVar1)" (parenthesized_expression "(*(code *)PTR_close_0005633c)" ( (pointer_expression "*(code *)PTR_close_0005633c" * (cast_expression "(code *)PTR_close_0005633c" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(iVar1)" ( identifier ))) ;) (expression_statement "*(undefined4 *)(param_1 + 0x20) = 0xffffff9c;" (assignment_expression "*(undefined4 *)(param_1 + 0x20) = 0xffffff9c" (pointer_expression "*(undefined4 *)(param_1 + 0x20)" * (cast_expression "(undefined4 *)(param_1 + 0x20)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x20)" ( (binary_expression "param_1 + 0x20" identifier + number_literal) )))) = number_literal) ;) }))) (expression_statement "iVar1 = i_ring_empty(iVar3);" (assignment_expression "iVar1 = i_ring_empty(iVar3)" identifier = (call_expression "i_ring_empty(iVar3)" identifier (argument_list "(iVar3)" ( identifier )))) ;) (expression_statement "bVar2 = false;" (assignment_expression "bVar2 = false" identifier = false) ;) (if_statement "if (iVar1 == 0) {\n      iVar1 = i_ring_pop(iVar3);\n      while( true ) {\n        if (-1 < iVar1) {\n          (*(code *)PTR_close_0005633c)(iVar1);\n        }\nLAB_0003920c:\n        iVar1 = i_ring_empty(iVar3);\n        if (iVar1 != 0) break;\n        iVar1 = i_ring_pop(iVar3);\n      }\n    }" if (parenthesized_expression "(iVar1 == 0)" ( (binary_expression "iVar1 == 0" identifier == number_literal) )) (compound_statement "{\n      iVar1 = i_ring_pop(iVar3);\n      while( true ) {\n        if (-1 < iVar1) {\n          (*(code *)PTR_close_0005633c)(iVar1);\n        }\nLAB_0003920c:\n        iVar1 = i_ring_empty(iVar3);\n        if (iVar1 != 0) break;\n        iVar1 = i_ring_pop(iVar3);\n      }\n    }" { (expression_statement "iVar1 = i_ring_pop(iVar3);" (assignment_expression "iVar1 = i_ring_pop(iVar3)" identifier = (call_expression "i_ring_pop(iVar3)" identifier (argument_list "(iVar3)" ( identifier )))) ;) (while_statement "while( true ) {\n        if (-1 < iVar1) {\n          (*(code *)PTR_close_0005633c)(iVar1);\n        }\nLAB_0003920c:\n        iVar1 = i_ring_empty(iVar3);\n        if (iVar1 != 0) break;\n        iVar1 = i_ring_pop(iVar3);\n      }" while (parenthesized_expression "( true )" ( true )) (compound_statement "{\n        if (-1 < iVar1) {\n          (*(code *)PTR_close_0005633c)(iVar1);\n        }\nLAB_0003920c:\n        iVar1 = i_ring_empty(iVar3);\n        if (iVar1 != 0) break;\n        iVar1 = i_ring_pop(iVar3);\n      }" { (if_statement "if (-1 < iVar1) {\n          (*(code *)PTR_close_0005633c)(iVar1);\n        }" if (parenthesized_expression "(-1 < iVar1)" ( (binary_expression "-1 < iVar1" number_literal < identifier) )) (compound_statement "{\n          (*(code *)PTR_close_0005633c)(iVar1);\n        }" { (expression_statement "(*(code *)PTR_close_0005633c)(iVar1);" (call_expression "(*(code *)PTR_close_0005633c)(iVar1)" (parenthesized_expression "(*(code *)PTR_close_0005633c)" ( (pointer_expression "*(code *)PTR_close_0005633c" * (cast_expression "(code *)PTR_close_0005633c" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(iVar1)" ( identifier ))) ;) })) (labeled_statement "LAB_0003920c:\n        iVar1 = i_ring_empty(iVar3);" statement_identifier : (expression_statement "iVar1 = i_ring_empty(iVar3);" (assignment_expression "iVar1 = i_ring_empty(iVar3)" identifier = (call_expression "i_ring_empty(iVar3)" identifier (argument_list "(iVar3)" ( identifier )))) ;)) (if_statement "if (iVar1 != 0) break;" if (parenthesized_expression "(iVar1 != 0)" ( (binary_expression "iVar1 != 0" identifier != number_literal) )) (break_statement "break;" break ;)) (expression_statement "iVar1 = i_ring_pop(iVar3);" (assignment_expression "iVar1 = i_ring_pop(iVar3)" identifier = (call_expression "i_ring_pop(iVar3)" identifier (argument_list "(iVar3)" ( identifier )))) ;) })) })) (return_statement "return bVar2;" return identifier ;) })) (expression_statement "iVar1 = (*(code *)PTR_fchdir_00056390)(*(undefined4 *)(param_1 + 0x1c));" (assignment_expression "iVar1 = (*(code *)PTR_fchdir_00056390)(*(undefined4 *)(param_1 + 0x1c))" identifier = (call_expression "(*(code *)PTR_fchdir_00056390)(*(undefined4 *)(param_1 + 0x1c))" (parenthesized_expression "(*(code *)PTR_fchdir_00056390)" ( (pointer_expression "*(code *)PTR_fchdir_00056390" * (cast_expression "(code *)PTR_fchdir_00056390" ( (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)) ;) (goto_statement "goto LAB_0003920c;" goto statement_identifier ;) })))
(translation_unit "int restore_initial_cwd(FTS *sp)\n\n{\n  undefined3 extraout_var;\n  undefined3 extraout_var_00;\n  int iVar1;\n  _Bool _Var2;\n  uint uVar3;\n  I_ring *ir;\n  \n  ir = &sp->fts_fd_ring;\n  if ((sp->fts_options & 4U) != 0) {\n    uVar3 = 0;\n    goto LAB_0003920c;\n  }\n  if ((sp->fts_options & 0x200U) != 0) {\n    iVar1 = i_ring_push(ir,sp->fts_cwd_fd);\n    if (iVar1 < 0) {\n      sp->fts_cwd_fd = -100;\n    }\n    else {\n      (*(code *)PTR_close_0005633c)(iVar1);\n      sp->fts_cwd_fd = -100;\n    }\n    _Var2 = i_ring_empty(ir);\n    uVar3 = 0;\n    if (CONCAT31(extraout_var,_Var2) == 0) {\n      iVar1 = i_ring_pop(ir);\n      while( true ) {\n        if (-1 < iVar1) {\n          (*(code *)PTR_close_0005633c)(iVar1);\n        }\nLAB_0003920c:\n        _Var2 = i_ring_empty(ir);\n        if (CONCAT31(extraout_var_00,_Var2) != 0) break;\n        iVar1 = i_ring_pop(ir);\n      }\n    }\n    return uVar3;\n  }\n  iVar1 = (*(code *)PTR_fchdir_00056390)(sp->fts_rfd);\n  uVar3 = (uint)(iVar1 != 0);\n  goto LAB_0003920c;\n}\n\n" (function_definition "int restore_initial_cwd(FTS *sp)\n\n{\n  undefined3 extraout_var;\n  undefined3 extraout_var_00;\n  int iVar1;\n  _Bool _Var2;\n  uint uVar3;\n  I_ring *ir;\n  \n  ir = &sp->fts_fd_ring;\n  if ((sp->fts_options & 4U) != 0) {\n    uVar3 = 0;\n    goto LAB_0003920c;\n  }\n  if ((sp->fts_options & 0x200U) != 0) {\n    iVar1 = i_ring_push(ir,sp->fts_cwd_fd);\n    if (iVar1 < 0) {\n      sp->fts_cwd_fd = -100;\n    }\n    else {\n      (*(code *)PTR_close_0005633c)(iVar1);\n      sp->fts_cwd_fd = -100;\n    }\n    _Var2 = i_ring_empty(ir);\n    uVar3 = 0;\n    if (CONCAT31(extraout_var,_Var2) == 0) {\n      iVar1 = i_ring_pop(ir);\n      while( true ) {\n        if (-1 < iVar1) {\n          (*(code *)PTR_close_0005633c)(iVar1);\n        }\nLAB_0003920c:\n        _Var2 = i_ring_empty(ir);\n        if (CONCAT31(extraout_var_00,_Var2) != 0) break;\n        iVar1 = i_ring_pop(ir);\n      }\n    }\n    return uVar3;\n  }\n  iVar1 = (*(code *)PTR_fchdir_00056390)(sp->fts_rfd);\n  uVar3 = (uint)(iVar1 != 0);\n  goto LAB_0003920c;\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  undefined3 extraout_var;\n  undefined3 extraout_var_00;\n  int iVar1;\n  _Bool _Var2;\n  uint uVar3;\n  I_ring *ir;\n  \n  ir = &sp->fts_fd_ring;\n  if ((sp->fts_options & 4U) != 0) {\n    uVar3 = 0;\n    goto LAB_0003920c;\n  }\n  if ((sp->fts_options & 0x200U) != 0) {\n    iVar1 = i_ring_push(ir,sp->fts_cwd_fd);\n    if (iVar1 < 0) {\n      sp->fts_cwd_fd = -100;\n    }\n    else {\n      (*(code *)PTR_close_0005633c)(iVar1);\n      sp->fts_cwd_fd = -100;\n    }\n    _Var2 = i_ring_empty(ir);\n    uVar3 = 0;\n    if (CONCAT31(extraout_var,_Var2) == 0) {\n      iVar1 = i_ring_pop(ir);\n      while( true ) {\n        if (-1 < iVar1) {\n          (*(code *)PTR_close_0005633c)(iVar1);\n        }\nLAB_0003920c:\n        _Var2 = i_ring_empty(ir);\n        if (CONCAT31(extraout_var_00,_Var2) != 0) break;\n        iVar1 = i_ring_pop(ir);\n      }\n    }\n    return uVar3;\n  }\n  iVar1 = (*(code *)PTR_fchdir_00056390)(sp->fts_rfd);\n  uVar3 = (uint)(iVar1 != 0);\n  goto LAB_0003920c;\n}" { (declaration "undefined3 extraout_var;" type_identifier identifier ;) (declaration "undefined3 extraout_var_00;" type_identifier identifier ;) (declaration "int iVar1;" primitive_type identifier ;) (declaration "_Bool _Var2;" type_identifier identifier ;) (declaration "uint uVar3;" type_identifier identifier ;) (declaration "I_ring *ir;" type_identifier (pointer_declarator "*ir" * identifier) ;) (expression_statement "ir = &sp->fts_fd_ring;" (assignment_expression "ir = &sp->fts_fd_ring" identifier = (pointer_expression "&sp->fts_fd_ring" & (field_expression "sp->fts_fd_ring" identifier -> field_identifier))) ;) (if_statement "if ((sp->fts_options & 4U) != 0) {\n    uVar3 = 0;\n    goto LAB_0003920c;\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    uVar3 = 0;\n    goto LAB_0003920c;\n  }" { (expression_statement "uVar3 = 0;" (assignment_expression "uVar3 = 0" identifier = number_literal) ;) (goto_statement "goto LAB_0003920c;" goto statement_identifier ;) })) (if_statement "if ((sp->fts_options & 0x200U) != 0) {\n    iVar1 = i_ring_push(ir,sp->fts_cwd_fd);\n    if (iVar1 < 0) {\n      sp->fts_cwd_fd = -100;\n    }\n    else {\n      (*(code *)PTR_close_0005633c)(iVar1);\n      sp->fts_cwd_fd = -100;\n    }\n    _Var2 = i_ring_empty(ir);\n    uVar3 = 0;\n    if (CONCAT31(extraout_var,_Var2) == 0) {\n      iVar1 = i_ring_pop(ir);\n      while( true ) {\n        if (-1 < iVar1) {\n          (*(code *)PTR_close_0005633c)(iVar1);\n        }\nLAB_0003920c:\n        _Var2 = i_ring_empty(ir);\n        if (CONCAT31(extraout_var_00,_Var2) != 0) break;\n        iVar1 = i_ring_pop(ir);\n      }\n    }\n    return uVar3;\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 = i_ring_push(ir,sp->fts_cwd_fd);\n    if (iVar1 < 0) {\n      sp->fts_cwd_fd = -100;\n    }\n    else {\n      (*(code *)PTR_close_0005633c)(iVar1);\n      sp->fts_cwd_fd = -100;\n    }\n    _Var2 = i_ring_empty(ir);\n    uVar3 = 0;\n    if (CONCAT31(extraout_var,_Var2) == 0) {\n      iVar1 = i_ring_pop(ir);\n      while( true ) {\n        if (-1 < iVar1) {\n          (*(code *)PTR_close_0005633c)(iVar1);\n        }\nLAB_0003920c:\n        _Var2 = i_ring_empty(ir);\n        if (CONCAT31(extraout_var_00,_Var2) != 0) break;\n        iVar1 = i_ring_pop(ir);\n      }\n    }\n    return uVar3;\n  }" { (expression_statement "iVar1 = i_ring_push(ir,sp->fts_cwd_fd);" (assignment_expression "iVar1 = i_ring_push(ir,sp->fts_cwd_fd)" identifier = (call_expression "i_ring_push(ir,sp->fts_cwd_fd)" identifier (argument_list "(ir,sp->fts_cwd_fd)" ( identifier , (field_expression "sp->fts_cwd_fd" identifier -> field_identifier) )))) ;) (if_statement "if (iVar1 < 0) {\n      sp->fts_cwd_fd = -100;\n    }\n    else {\n      (*(code *)PTR_close_0005633c)(iVar1);\n      sp->fts_cwd_fd = -100;\n    }" if (parenthesized_expression "(iVar1 < 0)" ( (binary_expression "iVar1 < 0" identifier < number_literal) )) (compound_statement "{\n      sp->fts_cwd_fd = -100;\n    }" { (expression_statement "sp->fts_cwd_fd = -100;" (assignment_expression "sp->fts_cwd_fd = -100" (field_expression "sp->fts_cwd_fd" identifier -> field_identifier) = number_literal) ;) }) (else_clause "else {\n      (*(code *)PTR_close_0005633c)(iVar1);\n      sp->fts_cwd_fd = -100;\n    }" else (compound_statement "{\n      (*(code *)PTR_close_0005633c)(iVar1);\n      sp->fts_cwd_fd = -100;\n    }" { (expression_statement "(*(code *)PTR_close_0005633c)(iVar1);" (call_expression "(*(code *)PTR_close_0005633c)(iVar1)" (parenthesized_expression "(*(code *)PTR_close_0005633c)" ( (pointer_expression "*(code *)PTR_close_0005633c" * (cast_expression "(code *)PTR_close_0005633c" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(iVar1)" ( identifier ))) ;) (expression_statement "sp->fts_cwd_fd = -100;" (assignment_expression "sp->fts_cwd_fd = -100" (field_expression "sp->fts_cwd_fd" identifier -> field_identifier) = number_literal) ;) }))) (expression_statement "_Var2 = i_ring_empty(ir);" (assignment_expression "_Var2 = i_ring_empty(ir)" identifier = (call_expression "i_ring_empty(ir)" identifier (argument_list "(ir)" ( identifier )))) ;) (expression_statement "uVar3 = 0;" (assignment_expression "uVar3 = 0" identifier = number_literal) ;) (if_statement "if (CONCAT31(extraout_var,_Var2) == 0) {\n      iVar1 = i_ring_pop(ir);\n      while( true ) {\n        if (-1 < iVar1) {\n          (*(code *)PTR_close_0005633c)(iVar1);\n        }\nLAB_0003920c:\n        _Var2 = i_ring_empty(ir);\n        if (CONCAT31(extraout_var_00,_Var2) != 0) break;\n        iVar1 = i_ring_pop(ir);\n      }\n    }" if (parenthesized_expression "(CONCAT31(extraout_var,_Var2) == 0)" ( (binary_expression "CONCAT31(extraout_var,_Var2) == 0" (call_expression "CONCAT31(extraout_var,_Var2)" identifier (argument_list "(extraout_var,_Var2)" ( identifier , identifier ))) == number_literal) )) (compound_statement "{\n      iVar1 = i_ring_pop(ir);\n      while( true ) {\n        if (-1 < iVar1) {\n          (*(code *)PTR_close_0005633c)(iVar1);\n        }\nLAB_0003920c:\n        _Var2 = i_ring_empty(ir);\n        if (CONCAT31(extraout_var_00,_Var2) != 0) break;\n        iVar1 = i_ring_pop(ir);\n      }\n    }" { (expression_statement "iVar1 = i_ring_pop(ir);" (assignment_expression "iVar1 = i_ring_pop(ir)" identifier = (call_expression "i_ring_pop(ir)" identifier (argument_list "(ir)" ( identifier )))) ;) (while_statement "while( true ) {\n        if (-1 < iVar1) {\n          (*(code *)PTR_close_0005633c)(iVar1);\n        }\nLAB_0003920c:\n        _Var2 = i_ring_empty(ir);\n        if (CONCAT31(extraout_var_00,_Var2) != 0) break;\n        iVar1 = i_ring_pop(ir);\n      }" while (parenthesized_expression "( true )" ( true )) (compound_statement "{\n        if (-1 < iVar1) {\n          (*(code *)PTR_close_0005633c)(iVar1);\n        }\nLAB_0003920c:\n        _Var2 = i_ring_empty(ir);\n        if (CONCAT31(extraout_var_00,_Var2) != 0) break;\n        iVar1 = i_ring_pop(ir);\n      }" { (if_statement "if (-1 < iVar1) {\n          (*(code *)PTR_close_0005633c)(iVar1);\n        }" if (parenthesized_expression "(-1 < iVar1)" ( (binary_expression "-1 < iVar1" number_literal < identifier) )) (compound_statement "{\n          (*(code *)PTR_close_0005633c)(iVar1);\n        }" { (expression_statement "(*(code *)PTR_close_0005633c)(iVar1);" (call_expression "(*(code *)PTR_close_0005633c)(iVar1)" (parenthesized_expression "(*(code *)PTR_close_0005633c)" ( (pointer_expression "*(code *)PTR_close_0005633c" * (cast_expression "(code *)PTR_close_0005633c" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(iVar1)" ( identifier ))) ;) })) (labeled_statement "LAB_0003920c:\n        _Var2 = i_ring_empty(ir);" statement_identifier : (expression_statement "_Var2 = i_ring_empty(ir);" (assignment_expression "_Var2 = i_ring_empty(ir)" identifier = (call_expression "i_ring_empty(ir)" identifier (argument_list "(ir)" ( identifier )))) ;)) (if_statement "if (CONCAT31(extraout_var_00,_Var2) != 0) break;" if (parenthesized_expression "(CONCAT31(extraout_var_00,_Var2) != 0)" ( (binary_expression "CONCAT31(extraout_var_00,_Var2) != 0" (call_expression "CONCAT31(extraout_var_00,_Var2)" identifier (argument_list "(extraout_var_00,_Var2)" ( identifier , identifier ))) != number_literal) )) (break_statement "break;" break ;)) (expression_statement "iVar1 = i_ring_pop(ir);" (assignment_expression "iVar1 = i_ring_pop(ir)" identifier = (call_expression "i_ring_pop(ir)" identifier (argument_list "(ir)" ( identifier )))) ;) })) })) (return_statement "return uVar3;" return identifier ;) })) (expression_statement "iVar1 = (*(code *)PTR_fchdir_00056390)(sp->fts_rfd);" (assignment_expression "iVar1 = (*(code *)PTR_fchdir_00056390)(sp->fts_rfd)" identifier = (call_expression "(*(code *)PTR_fchdir_00056390)(sp->fts_rfd)" (parenthesized_expression "(*(code *)PTR_fchdir_00056390)" ( (pointer_expression "*(code *)PTR_fchdir_00056390" * (cast_expression "(code *)PTR_fchdir_00056390" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(sp->fts_rfd)" ( (field_expression "sp->fts_rfd" identifier -> field_identifier) )))) ;) (expression_statement "uVar3 = (uint)(iVar1 != 0);" (assignment_expression "uVar3 = (uint)(iVar1 != 0)" identifier = (call_expression "(uint)(iVar1 != 0)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(iVar1 != 0)" ( (binary_expression "iVar1 != 0" identifier != number_literal) )))) ;) (goto_statement "goto LAB_0003920c;" goto statement_identifier ;) })))
(translation_unit "bool FUN_0003915c(int param_1)\n\n{\n  int iVar1;\n  bool bVar2;\n  int iVar3;\n  \n  iVar3 = param_1 + 0x3c;\n  if ((*(uint *)(param_1 + 0x30) & 4) != 0) {\n    bVar2 = false;\n    goto LAB_0003920c;\n  }\n  if ((*(uint *)(param_1 + 0x30) & 0x200) != 0) {\n    iVar1 = i_ring_push(iVar3,*(undefined4 *)(param_1 + 0x20));\n    if (iVar1 < 0) {\n      *(undefined4 *)(param_1 + 0x20) = 0xffffff9c;\n    }\n    else {\n      (*(code *)PTR_close_0005633c)(iVar1);\n      *(undefined4 *)(param_1 + 0x20) = 0xffffff9c;\n    }\n    iVar1 = i_ring_empty(iVar3);\n    bVar2 = false;\n    if (iVar1 == 0) {\n      iVar1 = i_ring_pop(iVar3);\n      while( true ) {\n        if (-1 < iVar1) {\n          (*(code *)PTR_close_0005633c)(iVar1);\n        }\nLAB_0003920c:\n        iVar1 = i_ring_empty(iVar3);\n        if (iVar1 != 0) break;\n        iVar1 = i_ring_pop(iVar3);\n      }\n    }\n    return bVar2;\n  }\n  iVar1 = (*(code *)PTR_fchdir_00056390)(*(undefined4 *)(param_1 + 0x1c));\n  bVar2 = iVar1 != 0;\n  goto LAB_0003920c;\n}\n\n" (function_definition "bool FUN_0003915c(int param_1)\n\n{\n  int iVar1;\n  bool bVar2;\n  int iVar3;\n  \n  iVar3 = param_1 + 0x3c;\n  if ((*(uint *)(param_1 + 0x30) & 4) != 0) {\n    bVar2 = false;\n    goto LAB_0003920c;\n  }\n  if ((*(uint *)(param_1 + 0x30) & 0x200) != 0) {\n    iVar1 = i_ring_push(iVar3,*(undefined4 *)(param_1 + 0x20));\n    if (iVar1 < 0) {\n      *(undefined4 *)(param_1 + 0x20) = 0xffffff9c;\n    }\n    else {\n      (*(code *)PTR_close_0005633c)(iVar1);\n      *(undefined4 *)(param_1 + 0x20) = 0xffffff9c;\n    }\n    iVar1 = i_ring_empty(iVar3);\n    bVar2 = false;\n    if (iVar1 == 0) {\n      iVar1 = i_ring_pop(iVar3);\n      while( true ) {\n        if (-1 < iVar1) {\n          (*(code *)PTR_close_0005633c)(iVar1);\n        }\nLAB_0003920c:\n        iVar1 = i_ring_empty(iVar3);\n        if (iVar1 != 0) break;\n        iVar1 = i_ring_pop(iVar3);\n      }\n    }\n    return bVar2;\n  }\n  iVar1 = (*(code *)PTR_fchdir_00056390)(*(undefined4 *)(param_1 + 0x1c));\n  bVar2 = iVar1 != 0;\n  goto LAB_0003920c;\n}" primitive_type (function_declarator "FUN_0003915c(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  int iVar3;\n  \n  iVar3 = param_1 + 0x3c;\n  if ((*(uint *)(param_1 + 0x30) & 4) != 0) {\n    bVar2 = false;\n    goto LAB_0003920c;\n  }\n  if ((*(uint *)(param_1 + 0x30) & 0x200) != 0) {\n    iVar1 = i_ring_push(iVar3,*(undefined4 *)(param_1 + 0x20));\n    if (iVar1 < 0) {\n      *(undefined4 *)(param_1 + 0x20) = 0xffffff9c;\n    }\n    else {\n      (*(code *)PTR_close_0005633c)(iVar1);\n      *(undefined4 *)(param_1 + 0x20) = 0xffffff9c;\n    }\n    iVar1 = i_ring_empty(iVar3);\n    bVar2 = false;\n    if (iVar1 == 0) {\n      iVar1 = i_ring_pop(iVar3);\n      while( true ) {\n        if (-1 < iVar1) {\n          (*(code *)PTR_close_0005633c)(iVar1);\n        }\nLAB_0003920c:\n        iVar1 = i_ring_empty(iVar3);\n        if (iVar1 != 0) break;\n        iVar1 = i_ring_pop(iVar3);\n      }\n    }\n    return bVar2;\n  }\n  iVar1 = (*(code *)PTR_fchdir_00056390)(*(undefined4 *)(param_1 + 0x1c));\n  bVar2 = iVar1 != 0;\n  goto LAB_0003920c;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "bool bVar2;" primitive_type identifier ;) (declaration "int iVar3;" primitive_type identifier ;) (expression_statement "iVar3 = param_1 + 0x3c;" (assignment_expression "iVar3 = param_1 + 0x3c" identifier = (binary_expression "param_1 + 0x3c" identifier + number_literal)) ;) (if_statement "if ((*(uint *)(param_1 + 0x30) & 4) != 0) {\n    bVar2 = false;\n    goto LAB_0003920c;\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    bVar2 = false;\n    goto LAB_0003920c;\n  }" { (expression_statement "bVar2 = false;" (assignment_expression "bVar2 = false" identifier = false) ;) (goto_statement "goto LAB_0003920c;" goto statement_identifier ;) })) (if_statement "if ((*(uint *)(param_1 + 0x30) & 0x200) != 0) {\n    iVar1 = i_ring_push(iVar3,*(undefined4 *)(param_1 + 0x20));\n    if (iVar1 < 0) {\n      *(undefined4 *)(param_1 + 0x20) = 0xffffff9c;\n    }\n    else {\n      (*(code *)PTR_close_0005633c)(iVar1);\n      *(undefined4 *)(param_1 + 0x20) = 0xffffff9c;\n    }\n    iVar1 = i_ring_empty(iVar3);\n    bVar2 = false;\n    if (iVar1 == 0) {\n      iVar1 = i_ring_pop(iVar3);\n      while( true ) {\n        if (-1 < iVar1) {\n          (*(code *)PTR_close_0005633c)(iVar1);\n        }\nLAB_0003920c:\n        iVar1 = i_ring_empty(iVar3);\n        if (iVar1 != 0) break;\n        iVar1 = i_ring_pop(iVar3);\n      }\n    }\n    return bVar2;\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 = i_ring_push(iVar3,*(undefined4 *)(param_1 + 0x20));\n    if (iVar1 < 0) {\n      *(undefined4 *)(param_1 + 0x20) = 0xffffff9c;\n    }\n    else {\n      (*(code *)PTR_close_0005633c)(iVar1);\n      *(undefined4 *)(param_1 + 0x20) = 0xffffff9c;\n    }\n    iVar1 = i_ring_empty(iVar3);\n    bVar2 = false;\n    if (iVar1 == 0) {\n      iVar1 = i_ring_pop(iVar3);\n      while( true ) {\n        if (-1 < iVar1) {\n          (*(code *)PTR_close_0005633c)(iVar1);\n        }\nLAB_0003920c:\n        iVar1 = i_ring_empty(iVar3);\n        if (iVar1 != 0) break;\n        iVar1 = i_ring_pop(iVar3);\n      }\n    }\n    return bVar2;\n  }" { (expression_statement "iVar1 = i_ring_push(iVar3,*(undefined4 *)(param_1 + 0x20));" (assignment_expression "iVar1 = i_ring_push(iVar3,*(undefined4 *)(param_1 + 0x20))" identifier = (call_expression "i_ring_push(iVar3,*(undefined4 *)(param_1 + 0x20))" identifier (argument_list "(iVar3,*(undefined4 *)(param_1 + 0x20))" ( identifier , (pointer_expression "*(undefined4 *)(param_1 + 0x20)" * (cast_expression "(undefined4 *)(param_1 + 0x20)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x20)" ( (binary_expression "param_1 + 0x20" identifier + number_literal) )))) )))) ;) (if_statement "if (iVar1 < 0) {\n      *(undefined4 *)(param_1 + 0x20) = 0xffffff9c;\n    }\n    else {\n      (*(code *)PTR_close_0005633c)(iVar1);\n      *(undefined4 *)(param_1 + 0x20) = 0xffffff9c;\n    }" if (parenthesized_expression "(iVar1 < 0)" ( (binary_expression "iVar1 < 0" identifier < number_literal) )) (compound_statement "{\n      *(undefined4 *)(param_1 + 0x20) = 0xffffff9c;\n    }" { (expression_statement "*(undefined4 *)(param_1 + 0x20) = 0xffffff9c;" (assignment_expression "*(undefined4 *)(param_1 + 0x20) = 0xffffff9c" (pointer_expression "*(undefined4 *)(param_1 + 0x20)" * (cast_expression "(undefined4 *)(param_1 + 0x20)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x20)" ( (binary_expression "param_1 + 0x20" identifier + number_literal) )))) = number_literal) ;) }) (else_clause "else {\n      (*(code *)PTR_close_0005633c)(iVar1);\n      *(undefined4 *)(param_1 + 0x20) = 0xffffff9c;\n    }" else (compound_statement "{\n      (*(code *)PTR_close_0005633c)(iVar1);\n      *(undefined4 *)(param_1 + 0x20) = 0xffffff9c;\n    }" { (expression_statement "(*(code *)PTR_close_0005633c)(iVar1);" (call_expression "(*(code *)PTR_close_0005633c)(iVar1)" (parenthesized_expression "(*(code *)PTR_close_0005633c)" ( (pointer_expression "*(code *)PTR_close_0005633c" * (cast_expression "(code *)PTR_close_0005633c" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(iVar1)" ( identifier ))) ;) (expression_statement "*(undefined4 *)(param_1 + 0x20) = 0xffffff9c;" (assignment_expression "*(undefined4 *)(param_1 + 0x20) = 0xffffff9c" (pointer_expression "*(undefined4 *)(param_1 + 0x20)" * (cast_expression "(undefined4 *)(param_1 + 0x20)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x20)" ( (binary_expression "param_1 + 0x20" identifier + number_literal) )))) = number_literal) ;) }))) (expression_statement "iVar1 = i_ring_empty(iVar3);" (assignment_expression "iVar1 = i_ring_empty(iVar3)" identifier = (call_expression "i_ring_empty(iVar3)" identifier (argument_list "(iVar3)" ( identifier )))) ;) (expression_statement "bVar2 = false;" (assignment_expression "bVar2 = false" identifier = false) ;) (if_statement "if (iVar1 == 0) {\n      iVar1 = i_ring_pop(iVar3);\n      while( true ) {\n        if (-1 < iVar1) {\n          (*(code *)PTR_close_0005633c)(iVar1);\n        }\nLAB_0003920c:\n        iVar1 = i_ring_empty(iVar3);\n        if (iVar1 != 0) break;\n        iVar1 = i_ring_pop(iVar3);\n      }\n    }" if (parenthesized_expression "(iVar1 == 0)" ( (binary_expression "iVar1 == 0" identifier == number_literal) )) (compound_statement "{\n      iVar1 = i_ring_pop(iVar3);\n      while( true ) {\n        if (-1 < iVar1) {\n          (*(code *)PTR_close_0005633c)(iVar1);\n        }\nLAB_0003920c:\n        iVar1 = i_ring_empty(iVar3);\n        if (iVar1 != 0) break;\n        iVar1 = i_ring_pop(iVar3);\n      }\n    }" { (expression_statement "iVar1 = i_ring_pop(iVar3);" (assignment_expression "iVar1 = i_ring_pop(iVar3)" identifier = (call_expression "i_ring_pop(iVar3)" identifier (argument_list "(iVar3)" ( identifier )))) ;) (while_statement "while( true ) {\n        if (-1 < iVar1) {\n          (*(code *)PTR_close_0005633c)(iVar1);\n        }\nLAB_0003920c:\n        iVar1 = i_ring_empty(iVar3);\n        if (iVar1 != 0) break;\n        iVar1 = i_ring_pop(iVar3);\n      }" while (parenthesized_expression "( true )" ( true )) (compound_statement "{\n        if (-1 < iVar1) {\n          (*(code *)PTR_close_0005633c)(iVar1);\n        }\nLAB_0003920c:\n        iVar1 = i_ring_empty(iVar3);\n        if (iVar1 != 0) break;\n        iVar1 = i_ring_pop(iVar3);\n      }" { (if_statement "if (-1 < iVar1) {\n          (*(code *)PTR_close_0005633c)(iVar1);\n        }" if (parenthesized_expression "(-1 < iVar1)" ( (binary_expression "-1 < iVar1" number_literal < identifier) )) (compound_statement "{\n          (*(code *)PTR_close_0005633c)(iVar1);\n        }" { (expression_statement "(*(code *)PTR_close_0005633c)(iVar1);" (call_expression "(*(code *)PTR_close_0005633c)(iVar1)" (parenthesized_expression "(*(code *)PTR_close_0005633c)" ( (pointer_expression "*(code *)PTR_close_0005633c" * (cast_expression "(code *)PTR_close_0005633c" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(iVar1)" ( identifier ))) ;) })) (labeled_statement "LAB_0003920c:\n        iVar1 = i_ring_empty(iVar3);" statement_identifier : (expression_statement "iVar1 = i_ring_empty(iVar3);" (assignment_expression "iVar1 = i_ring_empty(iVar3)" identifier = (call_expression "i_ring_empty(iVar3)" identifier (argument_list "(iVar3)" ( identifier )))) ;)) (if_statement "if (iVar1 != 0) break;" if (parenthesized_expression "(iVar1 != 0)" ( (binary_expression "iVar1 != 0" identifier != number_literal) )) (break_statement "break;" break ;)) (expression_statement "iVar1 = i_ring_pop(iVar3);" (assignment_expression "iVar1 = i_ring_pop(iVar3)" identifier = (call_expression "i_ring_pop(iVar3)" identifier (argument_list "(iVar3)" ( identifier )))) ;) })) })) (return_statement "return bVar2;" return identifier ;) })) (expression_statement "iVar1 = (*(code *)PTR_fchdir_00056390)(*(undefined4 *)(param_1 + 0x1c));" (assignment_expression "iVar1 = (*(code *)PTR_fchdir_00056390)(*(undefined4 *)(param_1 + 0x1c))" identifier = (call_expression "(*(code *)PTR_fchdir_00056390)(*(undefined4 *)(param_1 + 0x1c))" (parenthesized_expression "(*(code *)PTR_fchdir_00056390)" ( (pointer_expression "*(code *)PTR_fchdir_00056390" * (cast_expression "(code *)PTR_fchdir_00056390" ( (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)) ;) (goto_statement "goto LAB_0003920c;" goto statement_identifier ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (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 = BOOL) ;) (goto_statement goto statement_identifier ;) })) (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 IDENT (argument_list ( 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 { (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = LIT) ;) }) (else_clause else (compound_statement { (expression_statement (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( IDENT ))) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = LIT) ;) }))) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT )))) ;) (expression_statement (assignment_expression IDENT = BOOL) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT )))) ;) (while_statement while (parenthesized_expression ( BOOL )) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression LIT < IDENT) )) (compound_statement { (expression_statement (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( IDENT ))) ;) })) (labeled_statement statement_identifier : (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT )))) ;)) (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (break_statement break ;)) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT )))) ;) })) })) (return_statement return 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 * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) )))) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT != LIT)) ;) (goto_statement goto statement_identifier ;) })))
(function_definition "bool FUN_0003915c(int param_1)\n\n{\n  int iVar1;\n  bool bVar2;\n  int iVar3;\n  \n  iVar3 = param_1 + 0x3c;\n  if ((*(uint *)(param_1 + 0x30) & 4) != 0) {\n    bVar2 = false;\n    goto LAB_0003920c;\n  }\n  if ((*(uint *)(param_1 + 0x30) & 0x200) != 0) {\n    iVar1 = i_ring_push(iVar3,*(undefined4 *)(param_1 + 0x20));\n    if (iVar1 < 0) {\n      *(undefined4 *)(param_1 + 0x20) = 0xffffff9c;\n    }\n    else {\n      (*(code *)PTR_close_0005633c)(iVar1);\n      *(undefined4 *)(param_1 + 0x20) = 0xffffff9c;\n    }\n    iVar1 = i_ring_empty(iVar3);\n    bVar2 = false;\n    if (iVar1 == 0) {\n      iVar1 = i_ring_pop(iVar3);\n      while( true ) {\n        if (-1 < iVar1) {\n          (*(code *)PTR_close_0005633c)(iVar1);\n        }\nLAB_0003920c:\n        iVar1 = i_ring_empty(iVar3);\n        if (iVar1 != 0) break;\n        iVar1 = i_ring_pop(iVar3);\n      }\n    }\n    return bVar2;\n  }\n  iVar1 = (*(code *)PTR_fchdir_00056390)(*(undefined4 *)(param_1 + 0x1c));\n  bVar2 = iVar1 != 0;\n  goto LAB_0003920c;\n}" (primitive_type "bool") (function_declarator "FUN_0003915c(int param_1)" (identifier "FUN_0003915c") (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  int iVar3;\n  \n  iVar3 = param_1 + 0x3c;\n  if ((*(uint *)(param_1 + 0x30) & 4) != 0) {\n    bVar2 = false;\n    goto LAB_0003920c;\n  }\n  if ((*(uint *)(param_1 + 0x30) & 0x200) != 0) {\n    iVar1 = i_ring_push(iVar3,*(undefined4 *)(param_1 + 0x20));\n    if (iVar1 < 0) {\n      *(undefined4 *)(param_1 + 0x20) = 0xffffff9c;\n    }\n    else {\n      (*(code *)PTR_close_0005633c)(iVar1);\n      *(undefined4 *)(param_1 + 0x20) = 0xffffff9c;\n    }\n    iVar1 = i_ring_empty(iVar3);\n    bVar2 = false;\n    if (iVar1 == 0) {\n      iVar1 = i_ring_pop(iVar3);\n      while( true ) {\n        if (-1 < iVar1) {\n          (*(code *)PTR_close_0005633c)(iVar1);\n        }\nLAB_0003920c:\n        iVar1 = i_ring_empty(iVar3);\n        if (iVar1 != 0) break;\n        iVar1 = i_ring_pop(iVar3);\n      }\n    }\n    return bVar2;\n  }\n  iVar1 = (*(code *)PTR_fchdir_00056390)(*(undefined4 *)(param_1 + 0x1c));\n  bVar2 = iVar1 != 0;\n  goto LAB_0003920c;\n}" ({ "{") (declaration "int iVar1;" (primitive_type "int") (identifier "iVar1") (; ";")) (declaration "bool bVar2;" (primitive_type "bool") (identifier "bVar2") (; ";")) (declaration "int iVar3;" (primitive_type "int") (identifier "iVar3") (; ";")) (expression_statement "iVar3 = param_1 + 0x3c;" (assignment_expression "iVar3 = param_1 + 0x3c" (identifier "iVar3") (= "=") (binary_expression "param_1 + 0x3c" (identifier "param_1") (+ "+") (number_literal "0x3c"))) (; ";")) (if_statement "if ((*(uint *)(param_1 + 0x30) & 4) != 0) {\n    bVar2 = false;\n    goto LAB_0003920c;\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    bVar2 = false;\n    goto LAB_0003920c;\n  }" ({ "{") (expression_statement "bVar2 = false;" (assignment_expression "bVar2 = false" (identifier "bVar2") (= "=") (false "false")) (; ";")) (goto_statement "goto LAB_0003920c;" (goto "goto") (statement_identifier "LAB_0003920c") (; ";")) (} "}"))) (if_statement "if ((*(uint *)(param_1 + 0x30) & 0x200) != 0) {\n    iVar1 = i_ring_push(iVar3,*(undefined4 *)(param_1 + 0x20));\n    if (iVar1 < 0) {\n      *(undefined4 *)(param_1 + 0x20) = 0xffffff9c;\n    }\n    else {\n      (*(code *)PTR_close_0005633c)(iVar1);\n      *(undefined4 *)(param_1 + 0x20) = 0xffffff9c;\n    }\n    iVar1 = i_ring_empty(iVar3);\n    bVar2 = false;\n    if (iVar1 == 0) {\n      iVar1 = i_ring_pop(iVar3);\n      while( true ) {\n        if (-1 < iVar1) {\n          (*(code *)PTR_close_0005633c)(iVar1);\n        }\nLAB_0003920c:\n        iVar1 = i_ring_empty(iVar3);\n        if (iVar1 != 0) break;\n        iVar1 = i_ring_pop(iVar3);\n      }\n    }\n    return bVar2;\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 = i_ring_push(iVar3,*(undefined4 *)(param_1 + 0x20));\n    if (iVar1 < 0) {\n      *(undefined4 *)(param_1 + 0x20) = 0xffffff9c;\n    }\n    else {\n      (*(code *)PTR_close_0005633c)(iVar1);\n      *(undefined4 *)(param_1 + 0x20) = 0xffffff9c;\n    }\n    iVar1 = i_ring_empty(iVar3);\n    bVar2 = false;\n    if (iVar1 == 0) {\n      iVar1 = i_ring_pop(iVar3);\n      while( true ) {\n        if (-1 < iVar1) {\n          (*(code *)PTR_close_0005633c)(iVar1);\n        }\nLAB_0003920c:\n        iVar1 = i_ring_empty(iVar3);\n        if (iVar1 != 0) break;\n        iVar1 = i_ring_pop(iVar3);\n      }\n    }\n    return bVar2;\n  }" ({ "{") (expression_statement "iVar1 = i_ring_push(iVar3,*(undefined4 *)(param_1 + 0x20));" (assignment_expression "iVar1 = i_ring_push(iVar3,*(undefined4 *)(param_1 + 0x20))" (identifier "iVar1") (= "=") (call_expression "i_ring_push(iVar3,*(undefined4 *)(param_1 + 0x20))" (identifier "i_ring_push") (argument_list "(iVar3,*(undefined4 *)(param_1 + 0x20))" (( "(") (identifier "iVar3") (, ",") (pointer_expression "*(undefined4 *)(param_1 + 0x20)" (* "*") (cast_expression "(undefined4 *)(param_1 + 0x20)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x20)" (( "(") (binary_expression "param_1 + 0x20" (identifier "param_1") (+ "+") (number_literal "0x20")) () ")")))) () ")")))) (; ";")) (if_statement "if (iVar1 < 0) {\n      *(undefined4 *)(param_1 + 0x20) = 0xffffff9c;\n    }\n    else {\n      (*(code *)PTR_close_0005633c)(iVar1);\n      *(undefined4 *)(param_1 + 0x20) = 0xffffff9c;\n    }" (if "if") (parenthesized_expression "(iVar1 < 0)" (( "(") (binary_expression "iVar1 < 0" (identifier "iVar1") (< "<") (number_literal "0")) () ")")) (compound_statement "{\n      *(undefined4 *)(param_1 + 0x20) = 0xffffff9c;\n    }" ({ "{") (expression_statement "*(undefined4 *)(param_1 + 0x20) = 0xffffff9c;" (assignment_expression "*(undefined4 *)(param_1 + 0x20) = 0xffffff9c" (pointer_expression "*(undefined4 *)(param_1 + 0x20)" (* "*") (cast_expression "(undefined4 *)(param_1 + 0x20)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x20)" (( "(") (binary_expression "param_1 + 0x20" (identifier "param_1") (+ "+") (number_literal "0x20")) () ")")))) (= "=") (number_literal "0xffffff9c")) (; ";")) (} "}")) (else_clause "else {\n      (*(code *)PTR_close_0005633c)(iVar1);\n      *(undefined4 *)(param_1 + 0x20) = 0xffffff9c;\n    }" (else "else") (compound_statement "{\n      (*(code *)PTR_close_0005633c)(iVar1);\n      *(undefined4 *)(param_1 + 0x20) = 0xffffff9c;\n    }" ({ "{") (expression_statement "(*(code *)PTR_close_0005633c)(iVar1);" (call_expression "(*(code *)PTR_close_0005633c)(iVar1)" (parenthesized_expression "(*(code *)PTR_close_0005633c)" (( "(") (pointer_expression "*(code *)PTR_close_0005633c" (* "*") (cast_expression "(code *)PTR_close_0005633c" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_close_0005633c"))) () ")")) (argument_list "(iVar1)" (( "(") (identifier "iVar1") () ")"))) (; ";")) (expression_statement "*(undefined4 *)(param_1 + 0x20) = 0xffffff9c;" (assignment_expression "*(undefined4 *)(param_1 + 0x20) = 0xffffff9c" (pointer_expression "*(undefined4 *)(param_1 + 0x20)" (* "*") (cast_expression "(undefined4 *)(param_1 + 0x20)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x20)" (( "(") (binary_expression "param_1 + 0x20" (identifier "param_1") (+ "+") (number_literal "0x20")) () ")")))) (= "=") (number_literal "0xffffff9c")) (; ";")) (} "}")))) (expression_statement "iVar1 = i_ring_empty(iVar3);" (assignment_expression "iVar1 = i_ring_empty(iVar3)" (identifier "iVar1") (= "=") (call_expression "i_ring_empty(iVar3)" (identifier "i_ring_empty") (argument_list "(iVar3)" (( "(") (identifier "iVar3") () ")")))) (; ";")) (expression_statement "bVar2 = false;" (assignment_expression "bVar2 = false" (identifier "bVar2") (= "=") (false "false")) (; ";")) (if_statement "if (iVar1 == 0) {\n      iVar1 = i_ring_pop(iVar3);\n      while( true ) {\n        if (-1 < iVar1) {\n          (*(code *)PTR_close_0005633c)(iVar1);\n        }\nLAB_0003920c:\n        iVar1 = i_ring_empty(iVar3);\n        if (iVar1 != 0) break;\n        iVar1 = i_ring_pop(iVar3);\n      }\n    }" (if "if") (parenthesized_expression "(iVar1 == 0)" (( "(") (binary_expression "iVar1 == 0" (identifier "iVar1") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n      iVar1 = i_ring_pop(iVar3);\n      while( true ) {\n        if (-1 < iVar1) {\n          (*(code *)PTR_close_0005633c)(iVar1);\n        }\nLAB_0003920c:\n        iVar1 = i_ring_empty(iVar3);\n        if (iVar1 != 0) break;\n        iVar1 = i_ring_pop(iVar3);\n      }\n    }" ({ "{") (expression_statement "iVar1 = i_ring_pop(iVar3);" (assignment_expression "iVar1 = i_ring_pop(iVar3)" (identifier "iVar1") (= "=") (call_expression "i_ring_pop(iVar3)" (identifier "i_ring_pop") (argument_list "(iVar3)" (( "(") (identifier "iVar3") () ")")))) (; ";")) (while_statement "while( true ) {\n        if (-1 < iVar1) {\n          (*(code *)PTR_close_0005633c)(iVar1);\n        }\nLAB_0003920c:\n        iVar1 = i_ring_empty(iVar3);\n        if (iVar1 != 0) break;\n        iVar1 = i_ring_pop(iVar3);\n      }" (while "while") (parenthesized_expression "( true )" (( "(") (true "true") () ")")) (compound_statement "{\n        if (-1 < iVar1) {\n          (*(code *)PTR_close_0005633c)(iVar1);\n        }\nLAB_0003920c:\n        iVar1 = i_ring_empty(iVar3);\n        if (iVar1 != 0) break;\n        iVar1 = i_ring_pop(iVar3);\n      }" ({ "{") (if_statement "if (-1 < iVar1) {\n          (*(code *)PTR_close_0005633c)(iVar1);\n        }" (if "if") (parenthesized_expression "(-1 < iVar1)" (( "(") (binary_expression "-1 < iVar1" (number_literal "-1") (< "<") (identifier "iVar1")) () ")")) (compound_statement "{\n          (*(code *)PTR_close_0005633c)(iVar1);\n        }" ({ "{") (expression_statement "(*(code *)PTR_close_0005633c)(iVar1);" (call_expression "(*(code *)PTR_close_0005633c)(iVar1)" (parenthesized_expression "(*(code *)PTR_close_0005633c)" (( "(") (pointer_expression "*(code *)PTR_close_0005633c" (* "*") (cast_expression "(code *)PTR_close_0005633c" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_close_0005633c"))) () ")")) (argument_list "(iVar1)" (( "(") (identifier "iVar1") () ")"))) (; ";")) (} "}"))) (labeled_statement "LAB_0003920c:\n        iVar1 = i_ring_empty(iVar3);" (statement_identifier "LAB_0003920c") (: ":") (expression_statement "iVar1 = i_ring_empty(iVar3);" (assignment_expression "iVar1 = i_ring_empty(iVar3)" (identifier "iVar1") (= "=") (call_expression "i_ring_empty(iVar3)" (identifier "i_ring_empty") (argument_list "(iVar3)" (( "(") (identifier "iVar3") () ")")))) (; ";"))) (if_statement "if (iVar1 != 0) break;" (if "if") (parenthesized_expression "(iVar1 != 0)" (( "(") (binary_expression "iVar1 != 0" (identifier "iVar1") (!= "!=") (number_literal "0")) () ")")) (break_statement "break;" (break "break") (; ";"))) (expression_statement "iVar1 = i_ring_pop(iVar3);" (assignment_expression "iVar1 = i_ring_pop(iVar3)" (identifier "iVar1") (= "=") (call_expression "i_ring_pop(iVar3)" (identifier "i_ring_pop") (argument_list "(iVar3)" (( "(") (identifier "iVar3") () ")")))) (; ";")) (} "}"))) (} "}"))) (return_statement "return bVar2;" (return "return") (identifier "bVar2") (; ";")) (} "}"))) (expression_statement "iVar1 = (*(code *)PTR_fchdir_00056390)(*(undefined4 *)(param_1 + 0x1c));" (assignment_expression "iVar1 = (*(code *)PTR_fchdir_00056390)(*(undefined4 *)(param_1 + 0x1c))" (identifier "iVar1") (= "=") (call_expression "(*(code *)PTR_fchdir_00056390)(*(undefined4 *)(param_1 + 0x1c))" (parenthesized_expression "(*(code *)PTR_fchdir_00056390)" (( "(") (pointer_expression "*(code *)PTR_fchdir_00056390" (* "*") (cast_expression "(code *)PTR_fchdir_00056390" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_fchdir_00056390"))) () ")")) (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"))) (; ";")) (goto_statement "goto LAB_0003920c;" (goto "goto") (statement_identifier "LAB_0003920c") (; ";")) (} "}")))

int function_1(type_1 *sp)

{
  type_2 extraout_var;
  type_2 extraout_var_00;
  int var_2;
  type_3 _Var2;
  type_4 uVar3;
  type_5 *ir;
  
  ir = &sp->fts_fd_ring;
  if ((sp->fts_options & 4U) != 0) {
    uVar3 = 0;
    goto LAB_0003920c;
  }
  if ((sp->fts_options & 0x200U) != 0) {
    var_2 = var_1(ir,sp->fts_cwd_fd);
    if (var_2 < 0) {
      sp->fts_cwd_fd = -100;
    }
    else {
      (*(type_6 *)PTR_close_0005633c)(var_2);
      sp->fts_cwd_fd = -100;
    }
    _Var2 = var_3(ir);
    uVar3 = 0;
    if (var_4(extraout_var,_Var2) == 0) {
      var_2 = var_5(ir);
      while( true ) {
        if (-1 < var_2) {
          (*(type_6 *)PTR_close_0005633c)(var_2);
        }
LAB_0003920c:
        _Var2 = var_3(ir);
        if (var_4(extraout_var_00,_Var2) != 0) break;
        var_2 = var_5(ir);
      }
    }
    return uVar3;
  }
  var_2 = (*(type_6 *)PTR_fchdir_00056390)(sp->fts_rfd);
  uVar3 = (type_4)(var_2 != 0);
  goto LAB_0003920c;
}


(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)) (declaration type: (primitive_type) declarator: (identifier)) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal)))) (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: (false))) (goto_statement label: (statement_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 (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (identifier) (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))))))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (expression_statement (assignment_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) right: (number_literal)))) alternative: (else_clause (compound_statement (expression_statement (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 (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: (number_literal)))))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (identifier))))) (expression_statement (assignment_expression left: (identifier) right: (false))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (identifier))))) (while_statement condition: (parenthesized_expression (true)) body: (compound_statement (if_statement condition: (parenthesized_expression (binary_expression left: (number_literal) right: (identifier))) consequence: (compound_statement (expression_statement (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 (identifier)))))) (labeled_statement label: (statement_identifier) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (identifier)))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (break_statement)) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (identifier))))))))) (return_statement (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: (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)))) (goto_statement label: (statement_identifier)))))

bool MASKED(int param_1)

{
  int iVar1;
  bool bVar2;
  int iVar3;
  
  iVar3 = param_1 + 0x3c;
  if ((*(uint *)(param_1 + 0x30) & 4) != 0) {
    bVar2 = false;
    goto LAB_0003920c;
  }
  if ((*(uint *)(param_1 + 0x30) & 0x200) != 0) {
    iVar1 = i_ring_push(iVar3,*(undefined4 *)(param_1 + 0x20));
    if (iVar1 < 0) {
      *(undefined4 *)(param_1 + 0x20) = 0xffffff9c;
    }
    else {
      (*(code *)PTR_close_0005633c)(iVar1);
      *(undefined4 *)(param_1 + 0x20) = 0xffffff9c;
    }
    iVar1 = i_ring_empty(iVar3);
    bVar2 = false;
    if (iVar1 == 0) {
      iVar1 = i_ring_pop(iVar3);
      while( true ) {
        if (-1 < iVar1) {
          (*(code *)PTR_close_0005633c)(iVar1);
        }
LAB_0003920c:
        iVar1 = i_ring_empty(iVar3);
        if (iVar1 != 0) break;
        iVar1 = i_ring_pop(iVar3);
      }
    }
    return bVar2;
  }
  iVar1 = (*(code *)PTR_fchdir_00056390)(*(undefined4 *)(param_1 + 0x1c));
  bVar2 = iVar1 != 0;
  goto LAB_0003920c;
}

