
void bb_daemonize_or_rexec(int flags)

{
  undefined *puVar1;
  uint uVar2;
  int iVar3;
  
  if ((flags & 1U) != 0) {
    (*(code *)PTR_xchdir_0012a290)(PTR_s_<_W_q_v1_HxLJ_&uD_sa_____P)9__f_l_0012a1a8 + -0x13c8);
  }
  if ((flags & 2U) != 0) {
    (*(code *)PTR_close_0012ac8c)(0);
    (*(code *)PTR_close_0012ac8c)(1);
    (*(code *)PTR_close_0012ac8c)(2);
  }
  uVar2 = (*(code *)PTR_open64_0012af00)(PTR_UINT_0012a18c + -0x7b8,2);
  if ((int)uVar2 < 0) {
    uVar2 = (*(code *)PTR_xopen_0012a318)
                      (PTR_s_<_W_q_v1_HxLJ_&uD_sa_____P)9__f_l_0012a1a8 + -0x13c8,0);
  }
  for (; puVar1 = PTR_xfork_0012a694, uVar2 < 2; uVar2 = (*(code *)PTR_dup_0012b188)(uVar2)) {
  }
  if ((flags & 8U) == 0) {
    iVar3 = (*(code *)PTR_xfork_0012a694)();
    if (iVar3 != 0) {
      (*(code *)PTR__exit_0012b180)(0);
      return;
    }
    (*(code *)PTR_setsid_0012af78)();
    (*(code *)PTR_dup2_0012b1e8)(uVar2,0);
    (*(code *)PTR_dup2_0012b1e8)(uVar2,1);
    (*(code *)PTR_dup2_0012b1e8)(uVar2,2);
    if ((flags & 0x10U) != 0) {
      iVar3 = (*(code *)puVar1)();
      if (iVar3 != 0) {
        (*(code *)PTR__exit_0012b180)(0);
        return;
      }
    }
  }
  if (2 < (int)uVar2) {
    while( true ) {
      (*(code *)PTR_close_0012ac8c)(uVar2);
      if ((flags & 4U) == 0) break;
      uVar2 = uVar2 - 1;
      if (uVar2 == 2) {
        return;
      }
    }
  }
  return;
}



void FUN_000fa9c0(uint param_1)

{
  undefined *puVar1;
  uint uVar2;
  int iVar3;
  
  if ((param_1 & 1) != 0) {
    (*(code *)PTR_FUN_0012a290)(PTR_FUN_0012a1a8 + -0x13c8);
  }
  if ((param_1 & 2) != 0) {
    (*(code *)PTR_close_0012ac8c)(0);
    (*(code *)PTR_close_0012ac8c)(1);
    (*(code *)PTR_close_0012ac8c)(2);
  }
  uVar2 = (*(code *)PTR_open64_0012af00)(PTR_UINT_0012a18c + -0x7b8,2);
  if ((int)uVar2 < 0) {
    uVar2 = (*(code *)PTR_FUN_0012a318)(PTR_FUN_0012a1a8 + -0x13c8,0);
  }
  for (; puVar1 = PTR_FUN_0012a694, uVar2 < 2; uVar2 = (*(code *)PTR_dup_0012b188)(uVar2)) {
  }
  if ((param_1 & 8) == 0) {
    iVar3 = (*(code *)PTR_FUN_0012a694)();
    if (iVar3 != 0) {
      (*(code *)PTR__exit_0012b180)(0);
      return;
    }
    (*(code *)PTR_setsid_0012af78)();
    (*(code *)PTR_dup2_0012b1e8)(uVar2,0);
    (*(code *)PTR_dup2_0012b1e8)(uVar2,1);
    (*(code *)PTR_dup2_0012b1e8)(uVar2,2);
    if ((param_1 & 0x10) != 0) {
      iVar3 = (*(code *)puVar1)();
      if (iVar3 != 0) {
        (*(code *)PTR__exit_0012b180)(0);
        return;
      }
    }
  }
  if (2 < (int)uVar2) {
    while( true ) {
      (*(code *)PTR_close_0012ac8c)(uVar2);
      if ((param_1 & 4) == 0) break;
      uVar2 = uVar2 - 1;
      if (uVar2 == 2) {
        return;
      }
    }
  }
  return;
}


lui gp,0x3
addiu gp,gp,0x7790
addu gp,gp,t9
addiu sp,sp,-0x28
andi v0,a0,0x1
sw gp,0x10(sp)
sw s1,0x1c(sp)
or s1,a0,zero
sw ra,0x24(sp)
sw s2,0x20(sp)
beq v0,zero,0x000faa04
_sw s0,0x18(sp)
lw a0,-0x7fa8(gp)
lw t9,-0x7ec0(gp)
jalr t9
_addiu a0,a0,-0x13c8
lw gp,0x10(sp)
andi v0,s1,0x2
beq v0,zero,0x000faa3c
_lw t9,-0x74c4(gp)
jalr t9
_or a0,zero,zero
lw gp,0x10(sp)
lw t9,-0x74c4(gp)
jalr t9
_li a0,0x1
lw gp,0x10(sp)
lw t9,-0x74c4(gp)
jalr t9
_li a0,0x2
lw gp,0x10(sp)
lw a0,-0x7fc4(gp)
li a1,0x2
lw t9,-0x7250(gp)
jalr t9
_addiu a0,a0,-0x7b8
lw gp,0x10(sp)
bgez v0,0x000faa78
_or s0,v0,zero
lw a0,-0x7fa8(gp)
or a1,zero,zero
lw t9,-0x7e38(gp)
jalr t9
_addiu a0,a0,-0x13c8
lw gp,0x10(sp)
or s0,v0,zero
sltiu v0,s0,0x2
beq v0,zero,0x000faa98
_lw t9,-0x6fc8(gp)
jalr t9
_or a0,s0,zero
lw gp,0x10(sp)
b 0x000faa78
_or s0,v0,zero
andi v0,s1,0x8
bne v0,zero,0x000fab18
_lw s2,-0x7abc(gp)
or t9,s2,zero
jalr t9
_nop
beq v0,zero,0x000faac4
_lw gp,0x10(sp)
lw t9,-0x6fd0(gp)
jalr t9
_or a0,zero,zero
lw t9,-0x71d8(gp)
jalr t9
_nop
or a1,zero,zero
lw gp,0x10(sp)
lw t9,-0x6f68(gp)
jalr t9
_or a0,s0,zero
li a1,0x1
lw gp,0x10(sp)
lw t9,-0x6f68(gp)
jalr t9
_or a0,s0,zero
li a1,0x2
lw gp,0x10(sp)
lw t9,-0x6f68(gp)
jalr t9
_or a0,s0,zero
andi v0,s1,0x10
bne v0,zero,0x000fab74
_lw gp,0x10(sp)
slti v0,s0,0x3
bne v0,zero,0x000fab3c
_li s2,0x2
andi s1,s1,0x4
lw t9,-0x74c4(gp)
jalr t9
_or a0,s0,zero
bne s1,zero,0x000fab54
_lw gp,0x10(sp)
lw ra,0x24(sp)
lw s2,0x20(sp)
lw s1,0x1c(sp)
lw s0,0x18(sp)
jr ra
_addiu sp,sp,0x28
addiu s0,s0,-0x1
bne s0,s2,0x000fab28
_lw ra,0x24(sp)
lw s2,0x20(sp)
lw s1,0x1c(sp)
lw s0,0x18(sp)
jr ra
_addiu sp,sp,0x28
or t9,s2,zero
jalr t9
_nop
beq v0,zero,0x000fab18
_lw gp,0x10(sp)
lw t9,-0x6fd0(gp)
jalr t9
_or a0,zero,zero
(translation_unit "void FUN_000fa9c0(uint param_1)\n\n{\n  undefined *puVar1;\n  uint uVar2;\n  int iVar3;\n  \n  if ((param_1 & 1) != 0) {\n    (*(code *)PTR_FUN_0012a290)(PTR_FUN_0012a1a8 + -0x13c8);\n  }\n  if ((param_1 & 2) != 0) {\n    (*(code *)PTR_close_0012ac8c)(0);\n    (*(code *)PTR_close_0012ac8c)(1);\n    (*(code *)PTR_close_0012ac8c)(2);\n  }\n  uVar2 = (*(code *)PTR_open64_0012af00)(PTR_UINT_0012a18c + -0x7b8,2);\n  if ((int)uVar2 < 0) {\n    uVar2 = (*(code *)PTR_FUN_0012a318)(PTR_FUN_0012a1a8 + -0x13c8,0);\n  }\n  for (; puVar1 = PTR_FUN_0012a694, uVar2 < 2; uVar2 = (*(code *)PTR_dup_0012b188)(uVar2)) {\n  }\n  if ((param_1 & 8) == 0) {\n    iVar3 = (*(code *)PTR_FUN_0012a694)();\n    if (iVar3 != 0) {\n      (*(code *)PTR__exit_0012b180)(0);\n      return;\n    }\n    (*(code *)PTR_setsid_0012af78)();\n    (*(code *)PTR_dup2_0012b1e8)(uVar2,0);\n    (*(code *)PTR_dup2_0012b1e8)(uVar2,1);\n    (*(code *)PTR_dup2_0012b1e8)(uVar2,2);\n    if ((param_1 & 0x10) != 0) {\n      iVar3 = (*(code *)puVar1)();\n      if (iVar3 != 0) {\n        (*(code *)PTR__exit_0012b180)(0);\n        return;\n      }\n    }\n  }\n  if (2 < (int)uVar2) {\n    while( true ) {\n      (*(code *)PTR_close_0012ac8c)(uVar2);\n      if ((param_1 & 4) == 0) break;\n      uVar2 = uVar2 - 1;\n      if (uVar2 == 2) {\n        return;\n      }\n    }\n  }\n  return;\n}\n\n" (function_definition "void FUN_000fa9c0(uint param_1)\n\n{\n  undefined *puVar1;\n  uint uVar2;\n  int iVar3;\n  \n  if ((param_1 & 1) != 0) {\n    (*(code *)PTR_FUN_0012a290)(PTR_FUN_0012a1a8 + -0x13c8);\n  }\n  if ((param_1 & 2) != 0) {\n    (*(code *)PTR_close_0012ac8c)(0);\n    (*(code *)PTR_close_0012ac8c)(1);\n    (*(code *)PTR_close_0012ac8c)(2);\n  }\n  uVar2 = (*(code *)PTR_open64_0012af00)(PTR_UINT_0012a18c + -0x7b8,2);\n  if ((int)uVar2 < 0) {\n    uVar2 = (*(code *)PTR_FUN_0012a318)(PTR_FUN_0012a1a8 + -0x13c8,0);\n  }\n  for (; puVar1 = PTR_FUN_0012a694, uVar2 < 2; uVar2 = (*(code *)PTR_dup_0012b188)(uVar2)) {\n  }\n  if ((param_1 & 8) == 0) {\n    iVar3 = (*(code *)PTR_FUN_0012a694)();\n    if (iVar3 != 0) {\n      (*(code *)PTR__exit_0012b180)(0);\n      return;\n    }\n    (*(code *)PTR_setsid_0012af78)();\n    (*(code *)PTR_dup2_0012b1e8)(uVar2,0);\n    (*(code *)PTR_dup2_0012b1e8)(uVar2,1);\n    (*(code *)PTR_dup2_0012b1e8)(uVar2,2);\n    if ((param_1 & 0x10) != 0) {\n      iVar3 = (*(code *)puVar1)();\n      if (iVar3 != 0) {\n        (*(code *)PTR__exit_0012b180)(0);\n        return;\n      }\n    }\n  }\n  if (2 < (int)uVar2) {\n    while( true ) {\n      (*(code *)PTR_close_0012ac8c)(uVar2);\n      if ((param_1 & 4) == 0) break;\n      uVar2 = uVar2 - 1;\n      if (uVar2 == 2) {\n        return;\n      }\n    }\n  }\n  return;\n}" primitive_type (function_declarator "FUN_000fa9c0(uint param_1)" identifier (parameter_list "(uint param_1)" ( (parameter_declaration "uint param_1" type_identifier identifier) ))) (compound_statement "{\n  undefined *puVar1;\n  uint uVar2;\n  int iVar3;\n  \n  if ((param_1 & 1) != 0) {\n    (*(code *)PTR_FUN_0012a290)(PTR_FUN_0012a1a8 + -0x13c8);\n  }\n  if ((param_1 & 2) != 0) {\n    (*(code *)PTR_close_0012ac8c)(0);\n    (*(code *)PTR_close_0012ac8c)(1);\n    (*(code *)PTR_close_0012ac8c)(2);\n  }\n  uVar2 = (*(code *)PTR_open64_0012af00)(PTR_UINT_0012a18c + -0x7b8,2);\n  if ((int)uVar2 < 0) {\n    uVar2 = (*(code *)PTR_FUN_0012a318)(PTR_FUN_0012a1a8 + -0x13c8,0);\n  }\n  for (; puVar1 = PTR_FUN_0012a694, uVar2 < 2; uVar2 = (*(code *)PTR_dup_0012b188)(uVar2)) {\n  }\n  if ((param_1 & 8) == 0) {\n    iVar3 = (*(code *)PTR_FUN_0012a694)();\n    if (iVar3 != 0) {\n      (*(code *)PTR__exit_0012b180)(0);\n      return;\n    }\n    (*(code *)PTR_setsid_0012af78)();\n    (*(code *)PTR_dup2_0012b1e8)(uVar2,0);\n    (*(code *)PTR_dup2_0012b1e8)(uVar2,1);\n    (*(code *)PTR_dup2_0012b1e8)(uVar2,2);\n    if ((param_1 & 0x10) != 0) {\n      iVar3 = (*(code *)puVar1)();\n      if (iVar3 != 0) {\n        (*(code *)PTR__exit_0012b180)(0);\n        return;\n      }\n    }\n  }\n  if (2 < (int)uVar2) {\n    while( true ) {\n      (*(code *)PTR_close_0012ac8c)(uVar2);\n      if ((param_1 & 4) == 0) break;\n      uVar2 = uVar2 - 1;\n      if (uVar2 == 2) {\n        return;\n      }\n    }\n  }\n  return;\n}" { (declaration "undefined *puVar1;" type_identifier (pointer_declarator "*puVar1" * identifier) ;) (declaration "uint uVar2;" type_identifier identifier ;) (declaration "int iVar3;" primitive_type identifier ;) (if_statement "if ((param_1 & 1) != 0) {\n    (*(code *)PTR_FUN_0012a290)(PTR_FUN_0012a1a8 + -0x13c8);\n  }" if (parenthesized_expression "((param_1 & 1) != 0)" ( (binary_expression "(param_1 & 1) != 0" (parenthesized_expression "(param_1 & 1)" ( (binary_expression "param_1 & 1" identifier & number_literal) )) != number_literal) )) (compound_statement "{\n    (*(code *)PTR_FUN_0012a290)(PTR_FUN_0012a1a8 + -0x13c8);\n  }" { (expression_statement "(*(code *)PTR_FUN_0012a290)(PTR_FUN_0012a1a8 + -0x13c8);" (call_expression "(*(code *)PTR_FUN_0012a290)(PTR_FUN_0012a1a8 + -0x13c8)" (parenthesized_expression "(*(code *)PTR_FUN_0012a290)" ( (pointer_expression "*(code *)PTR_FUN_0012a290" * (cast_expression "(code *)PTR_FUN_0012a290" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(PTR_FUN_0012a1a8 + -0x13c8)" ( (binary_expression "PTR_FUN_0012a1a8 + -0x13c8" identifier + number_literal) ))) ;) })) (if_statement "if ((param_1 & 2) != 0) {\n    (*(code *)PTR_close_0012ac8c)(0);\n    (*(code *)PTR_close_0012ac8c)(1);\n    (*(code *)PTR_close_0012ac8c)(2);\n  }" if (parenthesized_expression "((param_1 & 2) != 0)" ( (binary_expression "(param_1 & 2) != 0" (parenthesized_expression "(param_1 & 2)" ( (binary_expression "param_1 & 2" identifier & number_literal) )) != number_literal) )) (compound_statement "{\n    (*(code *)PTR_close_0012ac8c)(0);\n    (*(code *)PTR_close_0012ac8c)(1);\n    (*(code *)PTR_close_0012ac8c)(2);\n  }" { (expression_statement "(*(code *)PTR_close_0012ac8c)(0);" (call_expression "(*(code *)PTR_close_0012ac8c)(0)" (parenthesized_expression "(*(code *)PTR_close_0012ac8c)" ( (pointer_expression "*(code *)PTR_close_0012ac8c" * (cast_expression "(code *)PTR_close_0012ac8c" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(0)" ( number_literal ))) ;) (expression_statement "(*(code *)PTR_close_0012ac8c)(1);" (call_expression "(*(code *)PTR_close_0012ac8c)(1)" (parenthesized_expression "(*(code *)PTR_close_0012ac8c)" ( (pointer_expression "*(code *)PTR_close_0012ac8c" * (cast_expression "(code *)PTR_close_0012ac8c" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(1)" ( number_literal ))) ;) (expression_statement "(*(code *)PTR_close_0012ac8c)(2);" (call_expression "(*(code *)PTR_close_0012ac8c)(2)" (parenthesized_expression "(*(code *)PTR_close_0012ac8c)" ( (pointer_expression "*(code *)PTR_close_0012ac8c" * (cast_expression "(code *)PTR_close_0012ac8c" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(2)" ( number_literal ))) ;) })) (expression_statement "uVar2 = (*(code *)PTR_open64_0012af00)(PTR_UINT_0012a18c + -0x7b8,2);" (assignment_expression "uVar2 = (*(code *)PTR_open64_0012af00)(PTR_UINT_0012a18c + -0x7b8,2)" identifier = (call_expression "(*(code *)PTR_open64_0012af00)(PTR_UINT_0012a18c + -0x7b8,2)" (parenthesized_expression "(*(code *)PTR_open64_0012af00)" ( (pointer_expression "*(code *)PTR_open64_0012af00" * (cast_expression "(code *)PTR_open64_0012af00" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(PTR_UINT_0012a18c + -0x7b8,2)" ( (binary_expression "PTR_UINT_0012a18c + -0x7b8" identifier + number_literal) , number_literal )))) ;) (if_statement "if ((int)uVar2 < 0) {\n    uVar2 = (*(code *)PTR_FUN_0012a318)(PTR_FUN_0012a1a8 + -0x13c8,0);\n  }" if (parenthesized_expression "((int)uVar2 < 0)" ( (binary_expression "(int)uVar2 < 0" (cast_expression "(int)uVar2" ( (type_descriptor "int" primitive_type) ) identifier) < number_literal) )) (compound_statement "{\n    uVar2 = (*(code *)PTR_FUN_0012a318)(PTR_FUN_0012a1a8 + -0x13c8,0);\n  }" { (expression_statement "uVar2 = (*(code *)PTR_FUN_0012a318)(PTR_FUN_0012a1a8 + -0x13c8,0);" (assignment_expression "uVar2 = (*(code *)PTR_FUN_0012a318)(PTR_FUN_0012a1a8 + -0x13c8,0)" identifier = (call_expression "(*(code *)PTR_FUN_0012a318)(PTR_FUN_0012a1a8 + -0x13c8,0)" (parenthesized_expression "(*(code *)PTR_FUN_0012a318)" ( (pointer_expression "*(code *)PTR_FUN_0012a318" * (cast_expression "(code *)PTR_FUN_0012a318" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(PTR_FUN_0012a1a8 + -0x13c8,0)" ( (binary_expression "PTR_FUN_0012a1a8 + -0x13c8" identifier + number_literal) , number_literal )))) ;) })) (for_statement "for (; puVar1 = PTR_FUN_0012a694, uVar2 < 2; uVar2 = (*(code *)PTR_dup_0012b188)(uVar2)) {\n  }" for ( ; (comma_expression "puVar1 = PTR_FUN_0012a694, uVar2 < 2" (assignment_expression "puVar1 = PTR_FUN_0012a694" identifier = identifier) , (binary_expression "uVar2 < 2" identifier < number_literal)) ; (assignment_expression "uVar2 = (*(code *)PTR_dup_0012b188)(uVar2)" identifier = (call_expression "(*(code *)PTR_dup_0012b188)(uVar2)" (parenthesized_expression "(*(code *)PTR_dup_0012b188)" ( (pointer_expression "*(code *)PTR_dup_0012b188" * (cast_expression "(code *)PTR_dup_0012b188" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(uVar2)" ( identifier )))) ) (compound_statement "{\n  }" { })) (if_statement "if ((param_1 & 8) == 0) {\n    iVar3 = (*(code *)PTR_FUN_0012a694)();\n    if (iVar3 != 0) {\n      (*(code *)PTR__exit_0012b180)(0);\n      return;\n    }\n    (*(code *)PTR_setsid_0012af78)();\n    (*(code *)PTR_dup2_0012b1e8)(uVar2,0);\n    (*(code *)PTR_dup2_0012b1e8)(uVar2,1);\n    (*(code *)PTR_dup2_0012b1e8)(uVar2,2);\n    if ((param_1 & 0x10) != 0) {\n      iVar3 = (*(code *)puVar1)();\n      if (iVar3 != 0) {\n        (*(code *)PTR__exit_0012b180)(0);\n        return;\n      }\n    }\n  }" if (parenthesized_expression "((param_1 & 8) == 0)" ( (binary_expression "(param_1 & 8) == 0" (parenthesized_expression "(param_1 & 8)" ( (binary_expression "param_1 & 8" identifier & number_literal) )) == number_literal) )) (compound_statement "{\n    iVar3 = (*(code *)PTR_FUN_0012a694)();\n    if (iVar3 != 0) {\n      (*(code *)PTR__exit_0012b180)(0);\n      return;\n    }\n    (*(code *)PTR_setsid_0012af78)();\n    (*(code *)PTR_dup2_0012b1e8)(uVar2,0);\n    (*(code *)PTR_dup2_0012b1e8)(uVar2,1);\n    (*(code *)PTR_dup2_0012b1e8)(uVar2,2);\n    if ((param_1 & 0x10) != 0) {\n      iVar3 = (*(code *)puVar1)();\n      if (iVar3 != 0) {\n        (*(code *)PTR__exit_0012b180)(0);\n        return;\n      }\n    }\n  }" { (expression_statement "iVar3 = (*(code *)PTR_FUN_0012a694)();" (assignment_expression "iVar3 = (*(code *)PTR_FUN_0012a694)()" identifier = (call_expression "(*(code *)PTR_FUN_0012a694)()" (parenthesized_expression "(*(code *)PTR_FUN_0012a694)" ( (pointer_expression "*(code *)PTR_FUN_0012a694" * (cast_expression "(code *)PTR_FUN_0012a694" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "()" ( )))) ;) (if_statement "if (iVar3 != 0) {\n      (*(code *)PTR__exit_0012b180)(0);\n      return;\n    }" if (parenthesized_expression "(iVar3 != 0)" ( (binary_expression "iVar3 != 0" identifier != number_literal) )) (compound_statement "{\n      (*(code *)PTR__exit_0012b180)(0);\n      return;\n    }" { (expression_statement "(*(code *)PTR__exit_0012b180)(0);" (call_expression "(*(code *)PTR__exit_0012b180)(0)" (parenthesized_expression "(*(code *)PTR__exit_0012b180)" ( (pointer_expression "*(code *)PTR__exit_0012b180" * (cast_expression "(code *)PTR__exit_0012b180" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(0)" ( number_literal ))) ;) (return_statement "return;" return ;) })) (expression_statement "(*(code *)PTR_setsid_0012af78)();" (call_expression "(*(code *)PTR_setsid_0012af78)()" (parenthesized_expression "(*(code *)PTR_setsid_0012af78)" ( (pointer_expression "*(code *)PTR_setsid_0012af78" * (cast_expression "(code *)PTR_setsid_0012af78" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "()" ( ))) ;) (expression_statement "(*(code *)PTR_dup2_0012b1e8)(uVar2,0);" (call_expression "(*(code *)PTR_dup2_0012b1e8)(uVar2,0)" (parenthesized_expression "(*(code *)PTR_dup2_0012b1e8)" ( (pointer_expression "*(code *)PTR_dup2_0012b1e8" * (cast_expression "(code *)PTR_dup2_0012b1e8" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(uVar2,0)" ( identifier , number_literal ))) ;) (expression_statement "(*(code *)PTR_dup2_0012b1e8)(uVar2,1);" (call_expression "(*(code *)PTR_dup2_0012b1e8)(uVar2,1)" (parenthesized_expression "(*(code *)PTR_dup2_0012b1e8)" ( (pointer_expression "*(code *)PTR_dup2_0012b1e8" * (cast_expression "(code *)PTR_dup2_0012b1e8" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(uVar2,1)" ( identifier , number_literal ))) ;) (expression_statement "(*(code *)PTR_dup2_0012b1e8)(uVar2,2);" (call_expression "(*(code *)PTR_dup2_0012b1e8)(uVar2,2)" (parenthesized_expression "(*(code *)PTR_dup2_0012b1e8)" ( (pointer_expression "*(code *)PTR_dup2_0012b1e8" * (cast_expression "(code *)PTR_dup2_0012b1e8" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(uVar2,2)" ( identifier , number_literal ))) ;) (if_statement "if ((param_1 & 0x10) != 0) {\n      iVar3 = (*(code *)puVar1)();\n      if (iVar3 != 0) {\n        (*(code *)PTR__exit_0012b180)(0);\n        return;\n      }\n    }" if (parenthesized_expression "((param_1 & 0x10) != 0)" ( (binary_expression "(param_1 & 0x10) != 0" (parenthesized_expression "(param_1 & 0x10)" ( (binary_expression "param_1 & 0x10" identifier & number_literal) )) != number_literal) )) (compound_statement "{\n      iVar3 = (*(code *)puVar1)();\n      if (iVar3 != 0) {\n        (*(code *)PTR__exit_0012b180)(0);\n        return;\n      }\n    }" { (expression_statement "iVar3 = (*(code *)puVar1)();" (assignment_expression "iVar3 = (*(code *)puVar1)()" identifier = (call_expression "(*(code *)puVar1)()" (parenthesized_expression "(*(code *)puVar1)" ( (pointer_expression "*(code *)puVar1" * (cast_expression "(code *)puVar1" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "()" ( )))) ;) (if_statement "if (iVar3 != 0) {\n        (*(code *)PTR__exit_0012b180)(0);\n        return;\n      }" if (parenthesized_expression "(iVar3 != 0)" ( (binary_expression "iVar3 != 0" identifier != number_literal) )) (compound_statement "{\n        (*(code *)PTR__exit_0012b180)(0);\n        return;\n      }" { (expression_statement "(*(code *)PTR__exit_0012b180)(0);" (call_expression "(*(code *)PTR__exit_0012b180)(0)" (parenthesized_expression "(*(code *)PTR__exit_0012b180)" ( (pointer_expression "*(code *)PTR__exit_0012b180" * (cast_expression "(code *)PTR__exit_0012b180" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(0)" ( number_literal ))) ;) (return_statement "return;" return ;) })) })) })) (if_statement "if (2 < (int)uVar2) {\n    while( true ) {\n      (*(code *)PTR_close_0012ac8c)(uVar2);\n      if ((param_1 & 4) == 0) break;\n      uVar2 = uVar2 - 1;\n      if (uVar2 == 2) {\n        return;\n      }\n    }\n  }" if (parenthesized_expression "(2 < (int)uVar2)" ( (binary_expression "2 < (int)uVar2" number_literal < (cast_expression "(int)uVar2" ( (type_descriptor "int" primitive_type) ) identifier)) )) (compound_statement "{\n    while( true ) {\n      (*(code *)PTR_close_0012ac8c)(uVar2);\n      if ((param_1 & 4) == 0) break;\n      uVar2 = uVar2 - 1;\n      if (uVar2 == 2) {\n        return;\n      }\n    }\n  }" { (while_statement "while( true ) {\n      (*(code *)PTR_close_0012ac8c)(uVar2);\n      if ((param_1 & 4) == 0) break;\n      uVar2 = uVar2 - 1;\n      if (uVar2 == 2) {\n        return;\n      }\n    }" while (parenthesized_expression "( true )" ( true )) (compound_statement "{\n      (*(code *)PTR_close_0012ac8c)(uVar2);\n      if ((param_1 & 4) == 0) break;\n      uVar2 = uVar2 - 1;\n      if (uVar2 == 2) {\n        return;\n      }\n    }" { (expression_statement "(*(code *)PTR_close_0012ac8c)(uVar2);" (call_expression "(*(code *)PTR_close_0012ac8c)(uVar2)" (parenthesized_expression "(*(code *)PTR_close_0012ac8c)" ( (pointer_expression "*(code *)PTR_close_0012ac8c" * (cast_expression "(code *)PTR_close_0012ac8c" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(uVar2)" ( identifier ))) ;) (if_statement "if ((param_1 & 4) == 0) break;" if (parenthesized_expression "((param_1 & 4) == 0)" ( (binary_expression "(param_1 & 4) == 0" (parenthesized_expression "(param_1 & 4)" ( (binary_expression "param_1 & 4" identifier & number_literal) )) == number_literal) )) (break_statement "break;" break ;)) (expression_statement "uVar2 = uVar2 - 1;" (assignment_expression "uVar2 = uVar2 - 1" identifier = (binary_expression "uVar2 - 1" identifier - number_literal)) ;) (if_statement "if (uVar2 == 2) {\n        return;\n      }" if (parenthesized_expression "(uVar2 == 2)" ( (binary_expression "uVar2 == 2" identifier == number_literal) )) (compound_statement "{\n        return;\n      }" { (return_statement "return;" return ;) })) })) })) (return_statement "return;" return ;) })))
(translation_unit "void bb_daemonize_or_rexec(int flags)\n\n{\n  undefined *puVar1;\n  uint uVar2;\n  int iVar3;\n  \n  if ((flags & 1U) != 0) {\n    (*(code *)PTR_xchdir_0012a290)(PTR_s_<_W_q_v1_HxLJ_&uD_sa_____P)9__f_l_0012a1a8 + -0x13c8);\n  }\n  if ((flags & 2U) != 0) {\n    (*(code *)PTR_close_0012ac8c)(0);\n    (*(code *)PTR_close_0012ac8c)(1);\n    (*(code *)PTR_close_0012ac8c)(2);\n  }\n  uVar2 = (*(code *)PTR_open64_0012af00)(PTR_UINT_0012a18c + -0x7b8,2);\n  if ((int)uVar2 < 0) {\n    uVar2 = (*(code *)PTR_xopen_0012a318)\n                      (PTR_s_<_W_q_v1_HxLJ_&uD_sa_____P)9__f_l_0012a1a8 + -0x13c8,0);\n  }\n  for (; puVar1 = PTR_xfork_0012a694, uVar2 < 2; uVar2 = (*(code *)PTR_dup_0012b188)(uVar2)) {\n  }\n  if ((flags & 8U) == 0) {\n    iVar3 = (*(code *)PTR_xfork_0012a694)();\n    if (iVar3 != 0) {\n      (*(code *)PTR__exit_0012b180)(0);\n      return;\n    }\n    (*(code *)PTR_setsid_0012af78)();\n    (*(code *)PTR_dup2_0012b1e8)(uVar2,0);\n    (*(code *)PTR_dup2_0012b1e8)(uVar2,1);\n    (*(code *)PTR_dup2_0012b1e8)(uVar2,2);\n    if ((flags & 0x10U) != 0) {\n      iVar3 = (*(code *)puVar1)();\n      if (iVar3 != 0) {\n        (*(code *)PTR__exit_0012b180)(0);\n        return;\n      }\n    }\n  }\n  if (2 < (int)uVar2) {\n    while( true ) {\n      (*(code *)PTR_close_0012ac8c)(uVar2);\n      if ((flags & 4U) == 0) break;\n      uVar2 = uVar2 - 1;\n      if (uVar2 == 2) {\n        return;\n      }\n    }\n  }\n  return;\n}\n\n" (function_definition "void bb_daemonize_or_rexec(int flags)\n\n{\n  undefined *puVar1;\n  uint uVar2;\n  int iVar3;\n  \n  if ((flags & 1U) != 0) {\n    (*(code *)PTR_xchdir_0012a290)(PTR_s_<_W_q_v1_HxLJ_&uD_sa_____P)9__f_l_0012a1a8 + -0x13c8);\n  }\n  if ((flags & 2U) != 0) {\n    (*(code *)PTR_close_0012ac8c)(0);\n    (*(code *)PTR_close_0012ac8c)(1);\n    (*(code *)PTR_close_0012ac8c)(2);\n  }\n  uVar2 = (*(code *)PTR_open64_0012af00)(PTR_UINT_0012a18c + -0x7b8,2);\n  if ((int)uVar2 < 0) {\n    uVar2 = (*(code *)PTR_xopen_0012a318)\n                      (PTR_s_<_W_q_v1_HxLJ_&uD_sa_____P)9__f_l_0012a1a8 + -0x13c8,0);\n  }\n  for (; puVar1 = PTR_xfork_0012a694, uVar2 < 2; uVar2 = (*(code *)PTR_dup_0012b188)(uVar2)) {\n  }\n  if ((flags & 8U) == 0) {\n    iVar3 = (*(code *)PTR_xfork_0012a694)();\n    if (iVar3 != 0) {\n      (*(code *)PTR__exit_0012b180)(0);\n      return;\n    }\n    (*(code *)PTR_setsid_0012af78)();\n    (*(code *)PTR_dup2_0012b1e8)(uVar2,0);\n    (*(code *)PTR_dup2_0012b1e8)(uVar2,1);\n    (*(code *)PTR_dup2_0012b1e8)(uVar2,2);\n    if ((flags & 0x10U) != 0) {\n      iVar3 = (*(code *)puVar1)();\n      if (iVar3 != 0) {\n        (*(code *)PTR__exit_0012b180)(0);\n        return;\n      }\n    }\n  }\n  if (2 < (int)uVar2) {\n    while( true ) {\n      (*(code *)PTR_close_0012ac8c)(uVar2);\n      if ((flags & 4U) == 0) break;\n      uVar2 = uVar2 - 1;\n      if (uVar2 == 2) {\n        return;\n      }\n    }\n  }\n  return;\n}" primitive_type (function_declarator "bb_daemonize_or_rexec(int flags)" identifier (parameter_list "(int flags)" ( (parameter_declaration "int flags" primitive_type identifier) ))) (compound_statement "{\n  undefined *puVar1;\n  uint uVar2;\n  int iVar3;\n  \n  if ((flags & 1U) != 0) {\n    (*(code *)PTR_xchdir_0012a290)(PTR_s_<_W_q_v1_HxLJ_&uD_sa_____P)9__f_l_0012a1a8 + -0x13c8);\n  }\n  if ((flags & 2U) != 0) {\n    (*(code *)PTR_close_0012ac8c)(0);\n    (*(code *)PTR_close_0012ac8c)(1);\n    (*(code *)PTR_close_0012ac8c)(2);\n  }\n  uVar2 = (*(code *)PTR_open64_0012af00)(PTR_UINT_0012a18c + -0x7b8,2);\n  if ((int)uVar2 < 0) {\n    uVar2 = (*(code *)PTR_xopen_0012a318)\n                      (PTR_s_<_W_q_v1_HxLJ_&uD_sa_____P)9__f_l_0012a1a8 + -0x13c8,0);\n  }\n  for (; puVar1 = PTR_xfork_0012a694, uVar2 < 2; uVar2 = (*(code *)PTR_dup_0012b188)(uVar2)) {\n  }\n  if ((flags & 8U) == 0) {\n    iVar3 = (*(code *)PTR_xfork_0012a694)();\n    if (iVar3 != 0) {\n      (*(code *)PTR__exit_0012b180)(0);\n      return;\n    }\n    (*(code *)PTR_setsid_0012af78)();\n    (*(code *)PTR_dup2_0012b1e8)(uVar2,0);\n    (*(code *)PTR_dup2_0012b1e8)(uVar2,1);\n    (*(code *)PTR_dup2_0012b1e8)(uVar2,2);\n    if ((flags & 0x10U) != 0) {\n      iVar3 = (*(code *)puVar1)();\n      if (iVar3 != 0) {\n        (*(code *)PTR__exit_0012b180)(0);\n        return;\n      }\n    }\n  }\n  if (2 < (int)uVar2) {\n    while( true ) {\n      (*(code *)PTR_close_0012ac8c)(uVar2);\n      if ((flags & 4U) == 0) break;\n      uVar2 = uVar2 - 1;\n      if (uVar2 == 2) {\n        return;\n      }\n    }\n  }\n  return;\n}" { (declaration "undefined *puVar1;" type_identifier (pointer_declarator "*puVar1" * identifier) ;) (declaration "uint uVar2;" type_identifier identifier ;) (declaration "int iVar3;" primitive_type identifier ;) (if_statement "if ((flags & 1U) != 0) {\n    (*(code *)PTR_xchdir_0012a290)(PTR_s_<_W_q_v1_HxLJ_&uD_sa_____P)9__f_l_0012a1a8 + -0x13c8);\n  }" if (parenthesized_expression "((flags & 1U) != 0)" ( (binary_expression "(flags & 1U) != 0" (parenthesized_expression "(flags & 1U)" ( (binary_expression "flags & 1U" identifier & number_literal) )) != number_literal) )) (compound_statement "{\n    (*(code *)PTR_xchdir_0012a290)(PTR_s_<_W_q_v1_HxLJ_&uD_sa_____P)9__f_l_0012a1a8 + -0x13c8);\n  }" { (expression_statement "(*(code *)PTR_xchdir_0012a290)(PTR_s_<_W_q_v1_HxLJ_&uD_sa_____P)9__f_l_0012a1a8 + -0x13c8);" (binary_expression "(*(code *)PTR_xchdir_0012a290)(PTR_s_<_W_q_v1_HxLJ_&uD_sa_____P)9__f_l_0012a1a8 + -0x13c8" (call_expression "(*(code *)PTR_xchdir_0012a290)(PTR_s_<_W_q_v1_HxLJ_&uD_sa_____P)" (parenthesized_expression "(*(code *)PTR_xchdir_0012a290)" ( (pointer_expression "*(code *)PTR_xchdir_0012a290" * (cast_expression "(code *)PTR_xchdir_0012a290" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(PTR_s_<_W_q_v1_HxLJ_&uD_sa_____P)" ( (binary_expression "PTR_s_<_W_q_v1_HxLJ_&uD_sa_____P" (binary_expression "PTR_s_<_W_q_v1_HxLJ_" identifier < identifier) & identifier) ))) (ERROR "9__f_l_0012a1a8" number_literal identifier) + number_literal) (ERROR ")" )) ;) })) (if_statement "if ((flags & 2U) != 0) {\n    (*(code *)PTR_close_0012ac8c)(0);\n    (*(code *)PTR_close_0012ac8c)(1);\n    (*(code *)PTR_close_0012ac8c)(2);\n  }" if (parenthesized_expression "((flags & 2U) != 0)" ( (binary_expression "(flags & 2U) != 0" (parenthesized_expression "(flags & 2U)" ( (binary_expression "flags & 2U" identifier & number_literal) )) != number_literal) )) (compound_statement "{\n    (*(code *)PTR_close_0012ac8c)(0);\n    (*(code *)PTR_close_0012ac8c)(1);\n    (*(code *)PTR_close_0012ac8c)(2);\n  }" { (expression_statement "(*(code *)PTR_close_0012ac8c)(0);" (call_expression "(*(code *)PTR_close_0012ac8c)(0)" (parenthesized_expression "(*(code *)PTR_close_0012ac8c)" ( (pointer_expression "*(code *)PTR_close_0012ac8c" * (cast_expression "(code *)PTR_close_0012ac8c" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(0)" ( number_literal ))) ;) (expression_statement "(*(code *)PTR_close_0012ac8c)(1);" (call_expression "(*(code *)PTR_close_0012ac8c)(1)" (parenthesized_expression "(*(code *)PTR_close_0012ac8c)" ( (pointer_expression "*(code *)PTR_close_0012ac8c" * (cast_expression "(code *)PTR_close_0012ac8c" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(1)" ( number_literal ))) ;) (expression_statement "(*(code *)PTR_close_0012ac8c)(2);" (call_expression "(*(code *)PTR_close_0012ac8c)(2)" (parenthesized_expression "(*(code *)PTR_close_0012ac8c)" ( (pointer_expression "*(code *)PTR_close_0012ac8c" * (cast_expression "(code *)PTR_close_0012ac8c" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(2)" ( number_literal ))) ;) })) (expression_statement "uVar2 = (*(code *)PTR_open64_0012af00)(PTR_UINT_0012a18c + -0x7b8,2);" (assignment_expression "uVar2 = (*(code *)PTR_open64_0012af00)(PTR_UINT_0012a18c + -0x7b8,2)" identifier = (call_expression "(*(code *)PTR_open64_0012af00)(PTR_UINT_0012a18c + -0x7b8,2)" (parenthesized_expression "(*(code *)PTR_open64_0012af00)" ( (pointer_expression "*(code *)PTR_open64_0012af00" * (cast_expression "(code *)PTR_open64_0012af00" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(PTR_UINT_0012a18c + -0x7b8,2)" ( (binary_expression "PTR_UINT_0012a18c + -0x7b8" identifier + number_literal) , number_literal )))) ;) (if_statement "if ((int)uVar2 < 0) {\n    uVar2 = (*(code *)PTR_xopen_0012a318)\n                      (PTR_s_<_W_q_v1_HxLJ_&uD_sa_____P)9__f_l_0012a1a8 + -0x13c8,0);\n  }" if (parenthesized_expression "((int)uVar2 < 0)" ( (binary_expression "(int)uVar2 < 0" (cast_expression "(int)uVar2" ( (type_descriptor "int" primitive_type) ) identifier) < number_literal) )) (compound_statement "{\n    uVar2 = (*(code *)PTR_xopen_0012a318)\n                      (PTR_s_<_W_q_v1_HxLJ_&uD_sa_____P)9__f_l_0012a1a8 + -0x13c8,0);\n  }" { (expression_statement "uVar2 = (*(code *)PTR_xopen_0012a318)\n                      (PTR_s_<_W_q_v1_HxLJ_&uD_sa_____P)9__f_l_0012a1a8 + -0x13c8,0);" (comma_expression "uVar2 = (*(code *)PTR_xopen_0012a318)\n                      (PTR_s_<_W_q_v1_HxLJ_&uD_sa_____P)9__f_l_0012a1a8 + -0x13c8,0" (assignment_expression "uVar2 = (*(code *)PTR_xopen_0012a318)\n                      (PTR_s_<_W_q_v1_HxLJ_&uD_sa_____P)9__f_l_0012a1a8 + -0x13c8" identifier = (binary_expression "(*(code *)PTR_xopen_0012a318)\n                      (PTR_s_<_W_q_v1_HxLJ_&uD_sa_____P)9__f_l_0012a1a8 + -0x13c8" (call_expression "(*(code *)PTR_xopen_0012a318)\n                      (PTR_s_<_W_q_v1_HxLJ_&uD_sa_____P)" (parenthesized_expression "(*(code *)PTR_xopen_0012a318)" ( (pointer_expression "*(code *)PTR_xopen_0012a318" * (cast_expression "(code *)PTR_xopen_0012a318" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(PTR_s_<_W_q_v1_HxLJ_&uD_sa_____P)" ( (binary_expression "PTR_s_<_W_q_v1_HxLJ_&uD_sa_____P" (binary_expression "PTR_s_<_W_q_v1_HxLJ_" identifier < identifier) & identifier) ))) (ERROR "9__f_l_0012a1a8" number_literal identifier) + number_literal)) , number_literal) (ERROR ")" )) ;) })) (for_statement "for (; puVar1 = PTR_xfork_0012a694, uVar2 < 2; uVar2 = (*(code *)PTR_dup_0012b188)(uVar2)) {\n  }" for ( ; (comma_expression "puVar1 = PTR_xfork_0012a694, uVar2 < 2" (assignment_expression "puVar1 = PTR_xfork_0012a694" identifier = identifier) , (binary_expression "uVar2 < 2" identifier < number_literal)) ; (assignment_expression "uVar2 = (*(code *)PTR_dup_0012b188)(uVar2)" identifier = (call_expression "(*(code *)PTR_dup_0012b188)(uVar2)" (parenthesized_expression "(*(code *)PTR_dup_0012b188)" ( (pointer_expression "*(code *)PTR_dup_0012b188" * (cast_expression "(code *)PTR_dup_0012b188" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(uVar2)" ( identifier )))) ) (compound_statement "{\n  }" { })) (if_statement "if ((flags & 8U) == 0) {\n    iVar3 = (*(code *)PTR_xfork_0012a694)();\n    if (iVar3 != 0) {\n      (*(code *)PTR__exit_0012b180)(0);\n      return;\n    }\n    (*(code *)PTR_setsid_0012af78)();\n    (*(code *)PTR_dup2_0012b1e8)(uVar2,0);\n    (*(code *)PTR_dup2_0012b1e8)(uVar2,1);\n    (*(code *)PTR_dup2_0012b1e8)(uVar2,2);\n    if ((flags & 0x10U) != 0) {\n      iVar3 = (*(code *)puVar1)();\n      if (iVar3 != 0) {\n        (*(code *)PTR__exit_0012b180)(0);\n        return;\n      }\n    }\n  }" if (parenthesized_expression "((flags & 8U) == 0)" ( (binary_expression "(flags & 8U) == 0" (parenthesized_expression "(flags & 8U)" ( (binary_expression "flags & 8U" identifier & number_literal) )) == number_literal) )) (compound_statement "{\n    iVar3 = (*(code *)PTR_xfork_0012a694)();\n    if (iVar3 != 0) {\n      (*(code *)PTR__exit_0012b180)(0);\n      return;\n    }\n    (*(code *)PTR_setsid_0012af78)();\n    (*(code *)PTR_dup2_0012b1e8)(uVar2,0);\n    (*(code *)PTR_dup2_0012b1e8)(uVar2,1);\n    (*(code *)PTR_dup2_0012b1e8)(uVar2,2);\n    if ((flags & 0x10U) != 0) {\n      iVar3 = (*(code *)puVar1)();\n      if (iVar3 != 0) {\n        (*(code *)PTR__exit_0012b180)(0);\n        return;\n      }\n    }\n  }" { (expression_statement "iVar3 = (*(code *)PTR_xfork_0012a694)();" (assignment_expression "iVar3 = (*(code *)PTR_xfork_0012a694)()" identifier = (call_expression "(*(code *)PTR_xfork_0012a694)()" (parenthesized_expression "(*(code *)PTR_xfork_0012a694)" ( (pointer_expression "*(code *)PTR_xfork_0012a694" * (cast_expression "(code *)PTR_xfork_0012a694" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "()" ( )))) ;) (if_statement "if (iVar3 != 0) {\n      (*(code *)PTR__exit_0012b180)(0);\n      return;\n    }" if (parenthesized_expression "(iVar3 != 0)" ( (binary_expression "iVar3 != 0" identifier != number_literal) )) (compound_statement "{\n      (*(code *)PTR__exit_0012b180)(0);\n      return;\n    }" { (expression_statement "(*(code *)PTR__exit_0012b180)(0);" (call_expression "(*(code *)PTR__exit_0012b180)(0)" (parenthesized_expression "(*(code *)PTR__exit_0012b180)" ( (pointer_expression "*(code *)PTR__exit_0012b180" * (cast_expression "(code *)PTR__exit_0012b180" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(0)" ( number_literal ))) ;) (return_statement "return;" return ;) })) (expression_statement "(*(code *)PTR_setsid_0012af78)();" (call_expression "(*(code *)PTR_setsid_0012af78)()" (parenthesized_expression "(*(code *)PTR_setsid_0012af78)" ( (pointer_expression "*(code *)PTR_setsid_0012af78" * (cast_expression "(code *)PTR_setsid_0012af78" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "()" ( ))) ;) (expression_statement "(*(code *)PTR_dup2_0012b1e8)(uVar2,0);" (call_expression "(*(code *)PTR_dup2_0012b1e8)(uVar2,0)" (parenthesized_expression "(*(code *)PTR_dup2_0012b1e8)" ( (pointer_expression "*(code *)PTR_dup2_0012b1e8" * (cast_expression "(code *)PTR_dup2_0012b1e8" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(uVar2,0)" ( identifier , number_literal ))) ;) (expression_statement "(*(code *)PTR_dup2_0012b1e8)(uVar2,1);" (call_expression "(*(code *)PTR_dup2_0012b1e8)(uVar2,1)" (parenthesized_expression "(*(code *)PTR_dup2_0012b1e8)" ( (pointer_expression "*(code *)PTR_dup2_0012b1e8" * (cast_expression "(code *)PTR_dup2_0012b1e8" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(uVar2,1)" ( identifier , number_literal ))) ;) (expression_statement "(*(code *)PTR_dup2_0012b1e8)(uVar2,2);" (call_expression "(*(code *)PTR_dup2_0012b1e8)(uVar2,2)" (parenthesized_expression "(*(code *)PTR_dup2_0012b1e8)" ( (pointer_expression "*(code *)PTR_dup2_0012b1e8" * (cast_expression "(code *)PTR_dup2_0012b1e8" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(uVar2,2)" ( identifier , number_literal ))) ;) (if_statement "if ((flags & 0x10U) != 0) {\n      iVar3 = (*(code *)puVar1)();\n      if (iVar3 != 0) {\n        (*(code *)PTR__exit_0012b180)(0);\n        return;\n      }\n    }" if (parenthesized_expression "((flags & 0x10U) != 0)" ( (binary_expression "(flags & 0x10U) != 0" (parenthesized_expression "(flags & 0x10U)" ( (binary_expression "flags & 0x10U" identifier & number_literal) )) != number_literal) )) (compound_statement "{\n      iVar3 = (*(code *)puVar1)();\n      if (iVar3 != 0) {\n        (*(code *)PTR__exit_0012b180)(0);\n        return;\n      }\n    }" { (expression_statement "iVar3 = (*(code *)puVar1)();" (assignment_expression "iVar3 = (*(code *)puVar1)()" identifier = (call_expression "(*(code *)puVar1)()" (parenthesized_expression "(*(code *)puVar1)" ( (pointer_expression "*(code *)puVar1" * (cast_expression "(code *)puVar1" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "()" ( )))) ;) (if_statement "if (iVar3 != 0) {\n        (*(code *)PTR__exit_0012b180)(0);\n        return;\n      }" if (parenthesized_expression "(iVar3 != 0)" ( (binary_expression "iVar3 != 0" identifier != number_literal) )) (compound_statement "{\n        (*(code *)PTR__exit_0012b180)(0);\n        return;\n      }" { (expression_statement "(*(code *)PTR__exit_0012b180)(0);" (call_expression "(*(code *)PTR__exit_0012b180)(0)" (parenthesized_expression "(*(code *)PTR__exit_0012b180)" ( (pointer_expression "*(code *)PTR__exit_0012b180" * (cast_expression "(code *)PTR__exit_0012b180" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(0)" ( number_literal ))) ;) (return_statement "return;" return ;) })) })) })) (if_statement "if (2 < (int)uVar2) {\n    while( true ) {\n      (*(code *)PTR_close_0012ac8c)(uVar2);\n      if ((flags & 4U) == 0) break;\n      uVar2 = uVar2 - 1;\n      if (uVar2 == 2) {\n        return;\n      }\n    }\n  }" if (parenthesized_expression "(2 < (int)uVar2)" ( (binary_expression "2 < (int)uVar2" number_literal < (cast_expression "(int)uVar2" ( (type_descriptor "int" primitive_type) ) identifier)) )) (compound_statement "{\n    while( true ) {\n      (*(code *)PTR_close_0012ac8c)(uVar2);\n      if ((flags & 4U) == 0) break;\n      uVar2 = uVar2 - 1;\n      if (uVar2 == 2) {\n        return;\n      }\n    }\n  }" { (while_statement "while( true ) {\n      (*(code *)PTR_close_0012ac8c)(uVar2);\n      if ((flags & 4U) == 0) break;\n      uVar2 = uVar2 - 1;\n      if (uVar2 == 2) {\n        return;\n      }\n    }" while (parenthesized_expression "( true )" ( true )) (compound_statement "{\n      (*(code *)PTR_close_0012ac8c)(uVar2);\n      if ((flags & 4U) == 0) break;\n      uVar2 = uVar2 - 1;\n      if (uVar2 == 2) {\n        return;\n      }\n    }" { (expression_statement "(*(code *)PTR_close_0012ac8c)(uVar2);" (call_expression "(*(code *)PTR_close_0012ac8c)(uVar2)" (parenthesized_expression "(*(code *)PTR_close_0012ac8c)" ( (pointer_expression "*(code *)PTR_close_0012ac8c" * (cast_expression "(code *)PTR_close_0012ac8c" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(uVar2)" ( identifier ))) ;) (if_statement "if ((flags & 4U) == 0) break;" if (parenthesized_expression "((flags & 4U) == 0)" ( (binary_expression "(flags & 4U) == 0" (parenthesized_expression "(flags & 4U)" ( (binary_expression "flags & 4U" identifier & number_literal) )) == number_literal) )) (break_statement "break;" break ;)) (expression_statement "uVar2 = uVar2 - 1;" (assignment_expression "uVar2 = uVar2 - 1" identifier = (binary_expression "uVar2 - 1" identifier - number_literal)) ;) (if_statement "if (uVar2 == 2) {\n        return;\n      }" if (parenthesized_expression "(uVar2 == 2)" ( (binary_expression "uVar2 == 2" identifier == number_literal) )) (compound_statement "{\n        return;\n      }" { (return_statement "return;" return ;) })) })) })) (return_statement "return;" return ;) })))
(translation_unit "void FUN_000fa9c0(uint param_1)\n\n{\n  undefined *puVar1;\n  uint uVar2;\n  int iVar3;\n  \n  if ((param_1 & 1) != 0) {\n    (*(code *)PTR_FUN_0012a290)(PTR_FUN_0012a1a8 + -0x13c8);\n  }\n  if ((param_1 & 2) != 0) {\n    (*(code *)PTR_close_0012ac8c)(0);\n    (*(code *)PTR_close_0012ac8c)(1);\n    (*(code *)PTR_close_0012ac8c)(2);\n  }\n  uVar2 = (*(code *)PTR_open64_0012af00)(PTR_UINT_0012a18c + -0x7b8,2);\n  if ((int)uVar2 < 0) {\n    uVar2 = (*(code *)PTR_FUN_0012a318)(PTR_FUN_0012a1a8 + -0x13c8,0);\n  }\n  for (; puVar1 = PTR_FUN_0012a694, uVar2 < 2; uVar2 = (*(code *)PTR_dup_0012b188)(uVar2)) {\n  }\n  if ((param_1 & 8) == 0) {\n    iVar3 = (*(code *)PTR_FUN_0012a694)();\n    if (iVar3 != 0) {\n      (*(code *)PTR__exit_0012b180)(0);\n      return;\n    }\n    (*(code *)PTR_setsid_0012af78)();\n    (*(code *)PTR_dup2_0012b1e8)(uVar2,0);\n    (*(code *)PTR_dup2_0012b1e8)(uVar2,1);\n    (*(code *)PTR_dup2_0012b1e8)(uVar2,2);\n    if ((param_1 & 0x10) != 0) {\n      iVar3 = (*(code *)puVar1)();\n      if (iVar3 != 0) {\n        (*(code *)PTR__exit_0012b180)(0);\n        return;\n      }\n    }\n  }\n  if (2 < (int)uVar2) {\n    while( true ) {\n      (*(code *)PTR_close_0012ac8c)(uVar2);\n      if ((param_1 & 4) == 0) break;\n      uVar2 = uVar2 - 1;\n      if (uVar2 == 2) {\n        return;\n      }\n    }\n  }\n  return;\n}\n\n" (function_definition "void FUN_000fa9c0(uint param_1)\n\n{\n  undefined *puVar1;\n  uint uVar2;\n  int iVar3;\n  \n  if ((param_1 & 1) != 0) {\n    (*(code *)PTR_FUN_0012a290)(PTR_FUN_0012a1a8 + -0x13c8);\n  }\n  if ((param_1 & 2) != 0) {\n    (*(code *)PTR_close_0012ac8c)(0);\n    (*(code *)PTR_close_0012ac8c)(1);\n    (*(code *)PTR_close_0012ac8c)(2);\n  }\n  uVar2 = (*(code *)PTR_open64_0012af00)(PTR_UINT_0012a18c + -0x7b8,2);\n  if ((int)uVar2 < 0) {\n    uVar2 = (*(code *)PTR_FUN_0012a318)(PTR_FUN_0012a1a8 + -0x13c8,0);\n  }\n  for (; puVar1 = PTR_FUN_0012a694, uVar2 < 2; uVar2 = (*(code *)PTR_dup_0012b188)(uVar2)) {\n  }\n  if ((param_1 & 8) == 0) {\n    iVar3 = (*(code *)PTR_FUN_0012a694)();\n    if (iVar3 != 0) {\n      (*(code *)PTR__exit_0012b180)(0);\n      return;\n    }\n    (*(code *)PTR_setsid_0012af78)();\n    (*(code *)PTR_dup2_0012b1e8)(uVar2,0);\n    (*(code *)PTR_dup2_0012b1e8)(uVar2,1);\n    (*(code *)PTR_dup2_0012b1e8)(uVar2,2);\n    if ((param_1 & 0x10) != 0) {\n      iVar3 = (*(code *)puVar1)();\n      if (iVar3 != 0) {\n        (*(code *)PTR__exit_0012b180)(0);\n        return;\n      }\n    }\n  }\n  if (2 < (int)uVar2) {\n    while( true ) {\n      (*(code *)PTR_close_0012ac8c)(uVar2);\n      if ((param_1 & 4) == 0) break;\n      uVar2 = uVar2 - 1;\n      if (uVar2 == 2) {\n        return;\n      }\n    }\n  }\n  return;\n}" primitive_type (function_declarator "FUN_000fa9c0(uint param_1)" identifier (parameter_list "(uint param_1)" ( (parameter_declaration "uint param_1" type_identifier identifier) ))) (compound_statement "{\n  undefined *puVar1;\n  uint uVar2;\n  int iVar3;\n  \n  if ((param_1 & 1) != 0) {\n    (*(code *)PTR_FUN_0012a290)(PTR_FUN_0012a1a8 + -0x13c8);\n  }\n  if ((param_1 & 2) != 0) {\n    (*(code *)PTR_close_0012ac8c)(0);\n    (*(code *)PTR_close_0012ac8c)(1);\n    (*(code *)PTR_close_0012ac8c)(2);\n  }\n  uVar2 = (*(code *)PTR_open64_0012af00)(PTR_UINT_0012a18c + -0x7b8,2);\n  if ((int)uVar2 < 0) {\n    uVar2 = (*(code *)PTR_FUN_0012a318)(PTR_FUN_0012a1a8 + -0x13c8,0);\n  }\n  for (; puVar1 = PTR_FUN_0012a694, uVar2 < 2; uVar2 = (*(code *)PTR_dup_0012b188)(uVar2)) {\n  }\n  if ((param_1 & 8) == 0) {\n    iVar3 = (*(code *)PTR_FUN_0012a694)();\n    if (iVar3 != 0) {\n      (*(code *)PTR__exit_0012b180)(0);\n      return;\n    }\n    (*(code *)PTR_setsid_0012af78)();\n    (*(code *)PTR_dup2_0012b1e8)(uVar2,0);\n    (*(code *)PTR_dup2_0012b1e8)(uVar2,1);\n    (*(code *)PTR_dup2_0012b1e8)(uVar2,2);\n    if ((param_1 & 0x10) != 0) {\n      iVar3 = (*(code *)puVar1)();\n      if (iVar3 != 0) {\n        (*(code *)PTR__exit_0012b180)(0);\n        return;\n      }\n    }\n  }\n  if (2 < (int)uVar2) {\n    while( true ) {\n      (*(code *)PTR_close_0012ac8c)(uVar2);\n      if ((param_1 & 4) == 0) break;\n      uVar2 = uVar2 - 1;\n      if (uVar2 == 2) {\n        return;\n      }\n    }\n  }\n  return;\n}" { (declaration "undefined *puVar1;" type_identifier (pointer_declarator "*puVar1" * identifier) ;) (declaration "uint uVar2;" type_identifier identifier ;) (declaration "int iVar3;" primitive_type identifier ;) (if_statement "if ((param_1 & 1) != 0) {\n    (*(code *)PTR_FUN_0012a290)(PTR_FUN_0012a1a8 + -0x13c8);\n  }" if (parenthesized_expression "((param_1 & 1) != 0)" ( (binary_expression "(param_1 & 1) != 0" (parenthesized_expression "(param_1 & 1)" ( (binary_expression "param_1 & 1" identifier & number_literal) )) != number_literal) )) (compound_statement "{\n    (*(code *)PTR_FUN_0012a290)(PTR_FUN_0012a1a8 + -0x13c8);\n  }" { (expression_statement "(*(code *)PTR_FUN_0012a290)(PTR_FUN_0012a1a8 + -0x13c8);" (call_expression "(*(code *)PTR_FUN_0012a290)(PTR_FUN_0012a1a8 + -0x13c8)" (parenthesized_expression "(*(code *)PTR_FUN_0012a290)" ( (pointer_expression "*(code *)PTR_FUN_0012a290" * (cast_expression "(code *)PTR_FUN_0012a290" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(PTR_FUN_0012a1a8 + -0x13c8)" ( (binary_expression "PTR_FUN_0012a1a8 + -0x13c8" identifier + number_literal) ))) ;) })) (if_statement "if ((param_1 & 2) != 0) {\n    (*(code *)PTR_close_0012ac8c)(0);\n    (*(code *)PTR_close_0012ac8c)(1);\n    (*(code *)PTR_close_0012ac8c)(2);\n  }" if (parenthesized_expression "((param_1 & 2) != 0)" ( (binary_expression "(param_1 & 2) != 0" (parenthesized_expression "(param_1 & 2)" ( (binary_expression "param_1 & 2" identifier & number_literal) )) != number_literal) )) (compound_statement "{\n    (*(code *)PTR_close_0012ac8c)(0);\n    (*(code *)PTR_close_0012ac8c)(1);\n    (*(code *)PTR_close_0012ac8c)(2);\n  }" { (expression_statement "(*(code *)PTR_close_0012ac8c)(0);" (call_expression "(*(code *)PTR_close_0012ac8c)(0)" (parenthesized_expression "(*(code *)PTR_close_0012ac8c)" ( (pointer_expression "*(code *)PTR_close_0012ac8c" * (cast_expression "(code *)PTR_close_0012ac8c" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(0)" ( number_literal ))) ;) (expression_statement "(*(code *)PTR_close_0012ac8c)(1);" (call_expression "(*(code *)PTR_close_0012ac8c)(1)" (parenthesized_expression "(*(code *)PTR_close_0012ac8c)" ( (pointer_expression "*(code *)PTR_close_0012ac8c" * (cast_expression "(code *)PTR_close_0012ac8c" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(1)" ( number_literal ))) ;) (expression_statement "(*(code *)PTR_close_0012ac8c)(2);" (call_expression "(*(code *)PTR_close_0012ac8c)(2)" (parenthesized_expression "(*(code *)PTR_close_0012ac8c)" ( (pointer_expression "*(code *)PTR_close_0012ac8c" * (cast_expression "(code *)PTR_close_0012ac8c" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(2)" ( number_literal ))) ;) })) (expression_statement "uVar2 = (*(code *)PTR_open64_0012af00)(PTR_UINT_0012a18c + -0x7b8,2);" (assignment_expression "uVar2 = (*(code *)PTR_open64_0012af00)(PTR_UINT_0012a18c + -0x7b8,2)" identifier = (call_expression "(*(code *)PTR_open64_0012af00)(PTR_UINT_0012a18c + -0x7b8,2)" (parenthesized_expression "(*(code *)PTR_open64_0012af00)" ( (pointer_expression "*(code *)PTR_open64_0012af00" * (cast_expression "(code *)PTR_open64_0012af00" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(PTR_UINT_0012a18c + -0x7b8,2)" ( (binary_expression "PTR_UINT_0012a18c + -0x7b8" identifier + number_literal) , number_literal )))) ;) (if_statement "if ((int)uVar2 < 0) {\n    uVar2 = (*(code *)PTR_FUN_0012a318)(PTR_FUN_0012a1a8 + -0x13c8,0);\n  }" if (parenthesized_expression "((int)uVar2 < 0)" ( (binary_expression "(int)uVar2 < 0" (cast_expression "(int)uVar2" ( (type_descriptor "int" primitive_type) ) identifier) < number_literal) )) (compound_statement "{\n    uVar2 = (*(code *)PTR_FUN_0012a318)(PTR_FUN_0012a1a8 + -0x13c8,0);\n  }" { (expression_statement "uVar2 = (*(code *)PTR_FUN_0012a318)(PTR_FUN_0012a1a8 + -0x13c8,0);" (assignment_expression "uVar2 = (*(code *)PTR_FUN_0012a318)(PTR_FUN_0012a1a8 + -0x13c8,0)" identifier = (call_expression "(*(code *)PTR_FUN_0012a318)(PTR_FUN_0012a1a8 + -0x13c8,0)" (parenthesized_expression "(*(code *)PTR_FUN_0012a318)" ( (pointer_expression "*(code *)PTR_FUN_0012a318" * (cast_expression "(code *)PTR_FUN_0012a318" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(PTR_FUN_0012a1a8 + -0x13c8,0)" ( (binary_expression "PTR_FUN_0012a1a8 + -0x13c8" identifier + number_literal) , number_literal )))) ;) })) (for_statement "for (; puVar1 = PTR_FUN_0012a694, uVar2 < 2; uVar2 = (*(code *)PTR_dup_0012b188)(uVar2)) {\n  }" for ( ; (comma_expression "puVar1 = PTR_FUN_0012a694, uVar2 < 2" (assignment_expression "puVar1 = PTR_FUN_0012a694" identifier = identifier) , (binary_expression "uVar2 < 2" identifier < number_literal)) ; (assignment_expression "uVar2 = (*(code *)PTR_dup_0012b188)(uVar2)" identifier = (call_expression "(*(code *)PTR_dup_0012b188)(uVar2)" (parenthesized_expression "(*(code *)PTR_dup_0012b188)" ( (pointer_expression "*(code *)PTR_dup_0012b188" * (cast_expression "(code *)PTR_dup_0012b188" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(uVar2)" ( identifier )))) ) (compound_statement "{\n  }" { })) (if_statement "if ((param_1 & 8) == 0) {\n    iVar3 = (*(code *)PTR_FUN_0012a694)();\n    if (iVar3 != 0) {\n      (*(code *)PTR__exit_0012b180)(0);\n      return;\n    }\n    (*(code *)PTR_setsid_0012af78)();\n    (*(code *)PTR_dup2_0012b1e8)(uVar2,0);\n    (*(code *)PTR_dup2_0012b1e8)(uVar2,1);\n    (*(code *)PTR_dup2_0012b1e8)(uVar2,2);\n    if ((param_1 & 0x10) != 0) {\n      iVar3 = (*(code *)puVar1)();\n      if (iVar3 != 0) {\n        (*(code *)PTR__exit_0012b180)(0);\n        return;\n      }\n    }\n  }" if (parenthesized_expression "((param_1 & 8) == 0)" ( (binary_expression "(param_1 & 8) == 0" (parenthesized_expression "(param_1 & 8)" ( (binary_expression "param_1 & 8" identifier & number_literal) )) == number_literal) )) (compound_statement "{\n    iVar3 = (*(code *)PTR_FUN_0012a694)();\n    if (iVar3 != 0) {\n      (*(code *)PTR__exit_0012b180)(0);\n      return;\n    }\n    (*(code *)PTR_setsid_0012af78)();\n    (*(code *)PTR_dup2_0012b1e8)(uVar2,0);\n    (*(code *)PTR_dup2_0012b1e8)(uVar2,1);\n    (*(code *)PTR_dup2_0012b1e8)(uVar2,2);\n    if ((param_1 & 0x10) != 0) {\n      iVar3 = (*(code *)puVar1)();\n      if (iVar3 != 0) {\n        (*(code *)PTR__exit_0012b180)(0);\n        return;\n      }\n    }\n  }" { (expression_statement "iVar3 = (*(code *)PTR_FUN_0012a694)();" (assignment_expression "iVar3 = (*(code *)PTR_FUN_0012a694)()" identifier = (call_expression "(*(code *)PTR_FUN_0012a694)()" (parenthesized_expression "(*(code *)PTR_FUN_0012a694)" ( (pointer_expression "*(code *)PTR_FUN_0012a694" * (cast_expression "(code *)PTR_FUN_0012a694" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "()" ( )))) ;) (if_statement "if (iVar3 != 0) {\n      (*(code *)PTR__exit_0012b180)(0);\n      return;\n    }" if (parenthesized_expression "(iVar3 != 0)" ( (binary_expression "iVar3 != 0" identifier != number_literal) )) (compound_statement "{\n      (*(code *)PTR__exit_0012b180)(0);\n      return;\n    }" { (expression_statement "(*(code *)PTR__exit_0012b180)(0);" (call_expression "(*(code *)PTR__exit_0012b180)(0)" (parenthesized_expression "(*(code *)PTR__exit_0012b180)" ( (pointer_expression "*(code *)PTR__exit_0012b180" * (cast_expression "(code *)PTR__exit_0012b180" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(0)" ( number_literal ))) ;) (return_statement "return;" return ;) })) (expression_statement "(*(code *)PTR_setsid_0012af78)();" (call_expression "(*(code *)PTR_setsid_0012af78)()" (parenthesized_expression "(*(code *)PTR_setsid_0012af78)" ( (pointer_expression "*(code *)PTR_setsid_0012af78" * (cast_expression "(code *)PTR_setsid_0012af78" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "()" ( ))) ;) (expression_statement "(*(code *)PTR_dup2_0012b1e8)(uVar2,0);" (call_expression "(*(code *)PTR_dup2_0012b1e8)(uVar2,0)" (parenthesized_expression "(*(code *)PTR_dup2_0012b1e8)" ( (pointer_expression "*(code *)PTR_dup2_0012b1e8" * (cast_expression "(code *)PTR_dup2_0012b1e8" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(uVar2,0)" ( identifier , number_literal ))) ;) (expression_statement "(*(code *)PTR_dup2_0012b1e8)(uVar2,1);" (call_expression "(*(code *)PTR_dup2_0012b1e8)(uVar2,1)" (parenthesized_expression "(*(code *)PTR_dup2_0012b1e8)" ( (pointer_expression "*(code *)PTR_dup2_0012b1e8" * (cast_expression "(code *)PTR_dup2_0012b1e8" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(uVar2,1)" ( identifier , number_literal ))) ;) (expression_statement "(*(code *)PTR_dup2_0012b1e8)(uVar2,2);" (call_expression "(*(code *)PTR_dup2_0012b1e8)(uVar2,2)" (parenthesized_expression "(*(code *)PTR_dup2_0012b1e8)" ( (pointer_expression "*(code *)PTR_dup2_0012b1e8" * (cast_expression "(code *)PTR_dup2_0012b1e8" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(uVar2,2)" ( identifier , number_literal ))) ;) (if_statement "if ((param_1 & 0x10) != 0) {\n      iVar3 = (*(code *)puVar1)();\n      if (iVar3 != 0) {\n        (*(code *)PTR__exit_0012b180)(0);\n        return;\n      }\n    }" if (parenthesized_expression "((param_1 & 0x10) != 0)" ( (binary_expression "(param_1 & 0x10) != 0" (parenthesized_expression "(param_1 & 0x10)" ( (binary_expression "param_1 & 0x10" identifier & number_literal) )) != number_literal) )) (compound_statement "{\n      iVar3 = (*(code *)puVar1)();\n      if (iVar3 != 0) {\n        (*(code *)PTR__exit_0012b180)(0);\n        return;\n      }\n    }" { (expression_statement "iVar3 = (*(code *)puVar1)();" (assignment_expression "iVar3 = (*(code *)puVar1)()" identifier = (call_expression "(*(code *)puVar1)()" (parenthesized_expression "(*(code *)puVar1)" ( (pointer_expression "*(code *)puVar1" * (cast_expression "(code *)puVar1" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "()" ( )))) ;) (if_statement "if (iVar3 != 0) {\n        (*(code *)PTR__exit_0012b180)(0);\n        return;\n      }" if (parenthesized_expression "(iVar3 != 0)" ( (binary_expression "iVar3 != 0" identifier != number_literal) )) (compound_statement "{\n        (*(code *)PTR__exit_0012b180)(0);\n        return;\n      }" { (expression_statement "(*(code *)PTR__exit_0012b180)(0);" (call_expression "(*(code *)PTR__exit_0012b180)(0)" (parenthesized_expression "(*(code *)PTR__exit_0012b180)" ( (pointer_expression "*(code *)PTR__exit_0012b180" * (cast_expression "(code *)PTR__exit_0012b180" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(0)" ( number_literal ))) ;) (return_statement "return;" return ;) })) })) })) (if_statement "if (2 < (int)uVar2) {\n    while( true ) {\n      (*(code *)PTR_close_0012ac8c)(uVar2);\n      if ((param_1 & 4) == 0) break;\n      uVar2 = uVar2 - 1;\n      if (uVar2 == 2) {\n        return;\n      }\n    }\n  }" if (parenthesized_expression "(2 < (int)uVar2)" ( (binary_expression "2 < (int)uVar2" number_literal < (cast_expression "(int)uVar2" ( (type_descriptor "int" primitive_type) ) identifier)) )) (compound_statement "{\n    while( true ) {\n      (*(code *)PTR_close_0012ac8c)(uVar2);\n      if ((param_1 & 4) == 0) break;\n      uVar2 = uVar2 - 1;\n      if (uVar2 == 2) {\n        return;\n      }\n    }\n  }" { (while_statement "while( true ) {\n      (*(code *)PTR_close_0012ac8c)(uVar2);\n      if ((param_1 & 4) == 0) break;\n      uVar2 = uVar2 - 1;\n      if (uVar2 == 2) {\n        return;\n      }\n    }" while (parenthesized_expression "( true )" ( true )) (compound_statement "{\n      (*(code *)PTR_close_0012ac8c)(uVar2);\n      if ((param_1 & 4) == 0) break;\n      uVar2 = uVar2 - 1;\n      if (uVar2 == 2) {\n        return;\n      }\n    }" { (expression_statement "(*(code *)PTR_close_0012ac8c)(uVar2);" (call_expression "(*(code *)PTR_close_0012ac8c)(uVar2)" (parenthesized_expression "(*(code *)PTR_close_0012ac8c)" ( (pointer_expression "*(code *)PTR_close_0012ac8c" * (cast_expression "(code *)PTR_close_0012ac8c" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(uVar2)" ( identifier ))) ;) (if_statement "if ((param_1 & 4) == 0) break;" if (parenthesized_expression "((param_1 & 4) == 0)" ( (binary_expression "(param_1 & 4) == 0" (parenthesized_expression "(param_1 & 4)" ( (binary_expression "param_1 & 4" identifier & number_literal) )) == number_literal) )) (break_statement "break;" break ;)) (expression_statement "uVar2 = uVar2 - 1;" (assignment_expression "uVar2 = uVar2 - 1" identifier = (binary_expression "uVar2 - 1" identifier - number_literal)) ;) (if_statement "if (uVar2 == 2) {\n        return;\n      }" if (parenthesized_expression "(uVar2 == 2)" ( (binary_expression "uVar2 == 2" identifier == number_literal) )) (compound_statement "{\n        return;\n      }" { (return_statement "return;" return ;) })) })) })) (return_statement "return;" return ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT & LIT) )) != LIT) )) (compound_statement { (expression_statement (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( (binary_expression IDENT + LIT) ))) ;) })) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT & LIT) )) != LIT) )) (compound_statement { (expression_statement (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( LIT ))) ;) (expression_statement (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( LIT ))) ;) (expression_statement (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( LIT ))) ;) })) (expression_statement (assignment_expression IDENT = (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( (binary_expression IDENT + LIT) , LIT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) < 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 ( (binary_expression IDENT + LIT) , LIT )))) ;) })) (for_statement for ( ; (comma_expression (assignment_expression IDENT = IDENT) , (binary_expression IDENT < LIT)) ; (assignment_expression IDENT = (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( IDENT )))) ) (compound_statement { })) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT & 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 ( )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (expression_statement (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( LIT ))) ;) (return_statement return ;) })) (expression_statement (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( ))) ;) (expression_statement (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( IDENT , LIT ))) ;) (expression_statement (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( IDENT , LIT ))) ;) (expression_statement (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( IDENT , LIT ))) ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT & 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 ( )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (expression_statement (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( LIT ))) ;) (return_statement return ;) })) })) })) (if_statement if (parenthesized_expression ( (binary_expression LIT < (cast_expression ( (type_descriptor TYPE) ) IDENT)) )) (compound_statement { (while_statement while (parenthesized_expression ( BOOL )) (compound_statement { (expression_statement (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( IDENT ))) ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT & LIT) )) == LIT) )) (break_statement break ;)) (expression_statement (assignment_expression IDENT = (binary_expression IDENT - LIT)) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (return_statement return ;) })) })) })) (return_statement return ;) })))
(function_definition "void FUN_000fa9c0(uint param_1)\n\n{\n  undefined *puVar1;\n  uint uVar2;\n  int iVar3;\n  \n  if ((param_1 & 1) != 0) {\n    (*(code *)PTR_FUN_0012a290)(PTR_FUN_0012a1a8 + -0x13c8);\n  }\n  if ((param_1 & 2) != 0) {\n    (*(code *)PTR_close_0012ac8c)(0);\n    (*(code *)PTR_close_0012ac8c)(1);\n    (*(code *)PTR_close_0012ac8c)(2);\n  }\n  uVar2 = (*(code *)PTR_open64_0012af00)(PTR_UINT_0012a18c + -0x7b8,2);\n  if ((int)uVar2 < 0) {\n    uVar2 = (*(code *)PTR_FUN_0012a318)(PTR_FUN_0012a1a8 + -0x13c8,0);\n  }\n  for (; puVar1 = PTR_FUN_0012a694, uVar2 < 2; uVar2 = (*(code *)PTR_dup_0012b188)(uVar2)) {\n  }\n  if ((param_1 & 8) == 0) {\n    iVar3 = (*(code *)PTR_FUN_0012a694)();\n    if (iVar3 != 0) {\n      (*(code *)PTR__exit_0012b180)(0);\n      return;\n    }\n    (*(code *)PTR_setsid_0012af78)();\n    (*(code *)PTR_dup2_0012b1e8)(uVar2,0);\n    (*(code *)PTR_dup2_0012b1e8)(uVar2,1);\n    (*(code *)PTR_dup2_0012b1e8)(uVar2,2);\n    if ((param_1 & 0x10) != 0) {\n      iVar3 = (*(code *)puVar1)();\n      if (iVar3 != 0) {\n        (*(code *)PTR__exit_0012b180)(0);\n        return;\n      }\n    }\n  }\n  if (2 < (int)uVar2) {\n    while( true ) {\n      (*(code *)PTR_close_0012ac8c)(uVar2);\n      if ((param_1 & 4) == 0) break;\n      uVar2 = uVar2 - 1;\n      if (uVar2 == 2) {\n        return;\n      }\n    }\n  }\n  return;\n}" (primitive_type "void") (function_declarator "FUN_000fa9c0(uint param_1)" (identifier "FUN_000fa9c0") (parameter_list "(uint param_1)" (( "(") (parameter_declaration "uint param_1" (type_identifier "uint") (identifier "param_1")) () ")"))) (compound_statement "{\n  undefined *puVar1;\n  uint uVar2;\n  int iVar3;\n  \n  if ((param_1 & 1) != 0) {\n    (*(code *)PTR_FUN_0012a290)(PTR_FUN_0012a1a8 + -0x13c8);\n  }\n  if ((param_1 & 2) != 0) {\n    (*(code *)PTR_close_0012ac8c)(0);\n    (*(code *)PTR_close_0012ac8c)(1);\n    (*(code *)PTR_close_0012ac8c)(2);\n  }\n  uVar2 = (*(code *)PTR_open64_0012af00)(PTR_UINT_0012a18c + -0x7b8,2);\n  if ((int)uVar2 < 0) {\n    uVar2 = (*(code *)PTR_FUN_0012a318)(PTR_FUN_0012a1a8 + -0x13c8,0);\n  }\n  for (; puVar1 = PTR_FUN_0012a694, uVar2 < 2; uVar2 = (*(code *)PTR_dup_0012b188)(uVar2)) {\n  }\n  if ((param_1 & 8) == 0) {\n    iVar3 = (*(code *)PTR_FUN_0012a694)();\n    if (iVar3 != 0) {\n      (*(code *)PTR__exit_0012b180)(0);\n      return;\n    }\n    (*(code *)PTR_setsid_0012af78)();\n    (*(code *)PTR_dup2_0012b1e8)(uVar2,0);\n    (*(code *)PTR_dup2_0012b1e8)(uVar2,1);\n    (*(code *)PTR_dup2_0012b1e8)(uVar2,2);\n    if ((param_1 & 0x10) != 0) {\n      iVar3 = (*(code *)puVar1)();\n      if (iVar3 != 0) {\n        (*(code *)PTR__exit_0012b180)(0);\n        return;\n      }\n    }\n  }\n  if (2 < (int)uVar2) {\n    while( true ) {\n      (*(code *)PTR_close_0012ac8c)(uVar2);\n      if ((param_1 & 4) == 0) break;\n      uVar2 = uVar2 - 1;\n      if (uVar2 == 2) {\n        return;\n      }\n    }\n  }\n  return;\n}" ({ "{") (declaration "undefined *puVar1;" (type_identifier "undefined") (pointer_declarator "*puVar1" (* "*") (identifier "puVar1")) (; ";")) (declaration "uint uVar2;" (type_identifier "uint") (identifier "uVar2") (; ";")) (declaration "int iVar3;" (primitive_type "int") (identifier "iVar3") (; ";")) (if_statement "if ((param_1 & 1) != 0) {\n    (*(code *)PTR_FUN_0012a290)(PTR_FUN_0012a1a8 + -0x13c8);\n  }" (if "if") (parenthesized_expression "((param_1 & 1) != 0)" (( "(") (binary_expression "(param_1 & 1) != 0" (parenthesized_expression "(param_1 & 1)" (( "(") (binary_expression "param_1 & 1" (identifier "param_1") (& "&") (number_literal "1")) () ")")) (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n    (*(code *)PTR_FUN_0012a290)(PTR_FUN_0012a1a8 + -0x13c8);\n  }" ({ "{") (expression_statement "(*(code *)PTR_FUN_0012a290)(PTR_FUN_0012a1a8 + -0x13c8);" (call_expression "(*(code *)PTR_FUN_0012a290)(PTR_FUN_0012a1a8 + -0x13c8)" (parenthesized_expression "(*(code *)PTR_FUN_0012a290)" (( "(") (pointer_expression "*(code *)PTR_FUN_0012a290" (* "*") (cast_expression "(code *)PTR_FUN_0012a290" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_FUN_0012a290"))) () ")")) (argument_list "(PTR_FUN_0012a1a8 + -0x13c8)" (( "(") (binary_expression "PTR_FUN_0012a1a8 + -0x13c8" (identifier "PTR_FUN_0012a1a8") (+ "+") (number_literal "-0x13c8")) () ")"))) (; ";")) (} "}"))) (if_statement "if ((param_1 & 2) != 0) {\n    (*(code *)PTR_close_0012ac8c)(0);\n    (*(code *)PTR_close_0012ac8c)(1);\n    (*(code *)PTR_close_0012ac8c)(2);\n  }" (if "if") (parenthesized_expression "((param_1 & 2) != 0)" (( "(") (binary_expression "(param_1 & 2) != 0" (parenthesized_expression "(param_1 & 2)" (( "(") (binary_expression "param_1 & 2" (identifier "param_1") (& "&") (number_literal "2")) () ")")) (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n    (*(code *)PTR_close_0012ac8c)(0);\n    (*(code *)PTR_close_0012ac8c)(1);\n    (*(code *)PTR_close_0012ac8c)(2);\n  }" ({ "{") (expression_statement "(*(code *)PTR_close_0012ac8c)(0);" (call_expression "(*(code *)PTR_close_0012ac8c)(0)" (parenthesized_expression "(*(code *)PTR_close_0012ac8c)" (( "(") (pointer_expression "*(code *)PTR_close_0012ac8c" (* "*") (cast_expression "(code *)PTR_close_0012ac8c" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_close_0012ac8c"))) () ")")) (argument_list "(0)" (( "(") (number_literal "0") () ")"))) (; ";")) (expression_statement "(*(code *)PTR_close_0012ac8c)(1);" (call_expression "(*(code *)PTR_close_0012ac8c)(1)" (parenthesized_expression "(*(code *)PTR_close_0012ac8c)" (( "(") (pointer_expression "*(code *)PTR_close_0012ac8c" (* "*") (cast_expression "(code *)PTR_close_0012ac8c" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_close_0012ac8c"))) () ")")) (argument_list "(1)" (( "(") (number_literal "1") () ")"))) (; ";")) (expression_statement "(*(code *)PTR_close_0012ac8c)(2);" (call_expression "(*(code *)PTR_close_0012ac8c)(2)" (parenthesized_expression "(*(code *)PTR_close_0012ac8c)" (( "(") (pointer_expression "*(code *)PTR_close_0012ac8c" (* "*") (cast_expression "(code *)PTR_close_0012ac8c" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_close_0012ac8c"))) () ")")) (argument_list "(2)" (( "(") (number_literal "2") () ")"))) (; ";")) (} "}"))) (expression_statement "uVar2 = (*(code *)PTR_open64_0012af00)(PTR_UINT_0012a18c + -0x7b8,2);" (assignment_expression "uVar2 = (*(code *)PTR_open64_0012af00)(PTR_UINT_0012a18c + -0x7b8,2)" (identifier "uVar2") (= "=") (call_expression "(*(code *)PTR_open64_0012af00)(PTR_UINT_0012a18c + -0x7b8,2)" (parenthesized_expression "(*(code *)PTR_open64_0012af00)" (( "(") (pointer_expression "*(code *)PTR_open64_0012af00" (* "*") (cast_expression "(code *)PTR_open64_0012af00" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_open64_0012af00"))) () ")")) (argument_list "(PTR_UINT_0012a18c + -0x7b8,2)" (( "(") (binary_expression "PTR_UINT_0012a18c + -0x7b8" (identifier "PTR_UINT_0012a18c") (+ "+") (number_literal "-0x7b8")) (, ",") (number_literal "2") () ")")))) (; ";")) (if_statement "if ((int)uVar2 < 0) {\n    uVar2 = (*(code *)PTR_FUN_0012a318)(PTR_FUN_0012a1a8 + -0x13c8,0);\n  }" (if "if") (parenthesized_expression "((int)uVar2 < 0)" (( "(") (binary_expression "(int)uVar2 < 0" (cast_expression "(int)uVar2" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "uVar2")) (< "<") (number_literal "0")) () ")")) (compound_statement "{\n    uVar2 = (*(code *)PTR_FUN_0012a318)(PTR_FUN_0012a1a8 + -0x13c8,0);\n  }" ({ "{") (expression_statement "uVar2 = (*(code *)PTR_FUN_0012a318)(PTR_FUN_0012a1a8 + -0x13c8,0);" (assignment_expression "uVar2 = (*(code *)PTR_FUN_0012a318)(PTR_FUN_0012a1a8 + -0x13c8,0)" (identifier "uVar2") (= "=") (call_expression "(*(code *)PTR_FUN_0012a318)(PTR_FUN_0012a1a8 + -0x13c8,0)" (parenthesized_expression "(*(code *)PTR_FUN_0012a318)" (( "(") (pointer_expression "*(code *)PTR_FUN_0012a318" (* "*") (cast_expression "(code *)PTR_FUN_0012a318" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_FUN_0012a318"))) () ")")) (argument_list "(PTR_FUN_0012a1a8 + -0x13c8,0)" (( "(") (binary_expression "PTR_FUN_0012a1a8 + -0x13c8" (identifier "PTR_FUN_0012a1a8") (+ "+") (number_literal "-0x13c8")) (, ",") (number_literal "0") () ")")))) (; ";")) (} "}"))) (for_statement "for (; puVar1 = PTR_FUN_0012a694, uVar2 < 2; uVar2 = (*(code *)PTR_dup_0012b188)(uVar2)) {\n  }" (for "for") (( "(") (; ";") (comma_expression "puVar1 = PTR_FUN_0012a694, uVar2 < 2" (assignment_expression "puVar1 = PTR_FUN_0012a694" (identifier "puVar1") (= "=") (identifier "PTR_FUN_0012a694")) (, ",") (binary_expression "uVar2 < 2" (identifier "uVar2") (< "<") (number_literal "2"))) (; ";") (assignment_expression "uVar2 = (*(code *)PTR_dup_0012b188)(uVar2)" (identifier "uVar2") (= "=") (call_expression "(*(code *)PTR_dup_0012b188)(uVar2)" (parenthesized_expression "(*(code *)PTR_dup_0012b188)" (( "(") (pointer_expression "*(code *)PTR_dup_0012b188" (* "*") (cast_expression "(code *)PTR_dup_0012b188" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_dup_0012b188"))) () ")")) (argument_list "(uVar2)" (( "(") (identifier "uVar2") () ")")))) () ")") (compound_statement "{\n  }" ({ "{") (} "}"))) (if_statement "if ((param_1 & 8) == 0) {\n    iVar3 = (*(code *)PTR_FUN_0012a694)();\n    if (iVar3 != 0) {\n      (*(code *)PTR__exit_0012b180)(0);\n      return;\n    }\n    (*(code *)PTR_setsid_0012af78)();\n    (*(code *)PTR_dup2_0012b1e8)(uVar2,0);\n    (*(code *)PTR_dup2_0012b1e8)(uVar2,1);\n    (*(code *)PTR_dup2_0012b1e8)(uVar2,2);\n    if ((param_1 & 0x10) != 0) {\n      iVar3 = (*(code *)puVar1)();\n      if (iVar3 != 0) {\n        (*(code *)PTR__exit_0012b180)(0);\n        return;\n      }\n    }\n  }" (if "if") (parenthesized_expression "((param_1 & 8) == 0)" (( "(") (binary_expression "(param_1 & 8) == 0" (parenthesized_expression "(param_1 & 8)" (( "(") (binary_expression "param_1 & 8" (identifier "param_1") (& "&") (number_literal "8")) () ")")) (== "==") (number_literal "0")) () ")")) (compound_statement "{\n    iVar3 = (*(code *)PTR_FUN_0012a694)();\n    if (iVar3 != 0) {\n      (*(code *)PTR__exit_0012b180)(0);\n      return;\n    }\n    (*(code *)PTR_setsid_0012af78)();\n    (*(code *)PTR_dup2_0012b1e8)(uVar2,0);\n    (*(code *)PTR_dup2_0012b1e8)(uVar2,1);\n    (*(code *)PTR_dup2_0012b1e8)(uVar2,2);\n    if ((param_1 & 0x10) != 0) {\n      iVar3 = (*(code *)puVar1)();\n      if (iVar3 != 0) {\n        (*(code *)PTR__exit_0012b180)(0);\n        return;\n      }\n    }\n  }" ({ "{") (expression_statement "iVar3 = (*(code *)PTR_FUN_0012a694)();" (assignment_expression "iVar3 = (*(code *)PTR_FUN_0012a694)()" (identifier "iVar3") (= "=") (call_expression "(*(code *)PTR_FUN_0012a694)()" (parenthesized_expression "(*(code *)PTR_FUN_0012a694)" (( "(") (pointer_expression "*(code *)PTR_FUN_0012a694" (* "*") (cast_expression "(code *)PTR_FUN_0012a694" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_FUN_0012a694"))) () ")")) (argument_list "()" (( "(") () ")")))) (; ";")) (if_statement "if (iVar3 != 0) {\n      (*(code *)PTR__exit_0012b180)(0);\n      return;\n    }" (if "if") (parenthesized_expression "(iVar3 != 0)" (( "(") (binary_expression "iVar3 != 0" (identifier "iVar3") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n      (*(code *)PTR__exit_0012b180)(0);\n      return;\n    }" ({ "{") (expression_statement "(*(code *)PTR__exit_0012b180)(0);" (call_expression "(*(code *)PTR__exit_0012b180)(0)" (parenthesized_expression "(*(code *)PTR__exit_0012b180)" (( "(") (pointer_expression "*(code *)PTR__exit_0012b180" (* "*") (cast_expression "(code *)PTR__exit_0012b180" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR__exit_0012b180"))) () ")")) (argument_list "(0)" (( "(") (number_literal "0") () ")"))) (; ";")) (return_statement "return;" (return "return") (; ";")) (} "}"))) (expression_statement "(*(code *)PTR_setsid_0012af78)();" (call_expression "(*(code *)PTR_setsid_0012af78)()" (parenthesized_expression "(*(code *)PTR_setsid_0012af78)" (( "(") (pointer_expression "*(code *)PTR_setsid_0012af78" (* "*") (cast_expression "(code *)PTR_setsid_0012af78" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_setsid_0012af78"))) () ")")) (argument_list "()" (( "(") () ")"))) (; ";")) (expression_statement "(*(code *)PTR_dup2_0012b1e8)(uVar2,0);" (call_expression "(*(code *)PTR_dup2_0012b1e8)(uVar2,0)" (parenthesized_expression "(*(code *)PTR_dup2_0012b1e8)" (( "(") (pointer_expression "*(code *)PTR_dup2_0012b1e8" (* "*") (cast_expression "(code *)PTR_dup2_0012b1e8" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_dup2_0012b1e8"))) () ")")) (argument_list "(uVar2,0)" (( "(") (identifier "uVar2") (, ",") (number_literal "0") () ")"))) (; ";")) (expression_statement "(*(code *)PTR_dup2_0012b1e8)(uVar2,1);" (call_expression "(*(code *)PTR_dup2_0012b1e8)(uVar2,1)" (parenthesized_expression "(*(code *)PTR_dup2_0012b1e8)" (( "(") (pointer_expression "*(code *)PTR_dup2_0012b1e8" (* "*") (cast_expression "(code *)PTR_dup2_0012b1e8" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_dup2_0012b1e8"))) () ")")) (argument_list "(uVar2,1)" (( "(") (identifier "uVar2") (, ",") (number_literal "1") () ")"))) (; ";")) (expression_statement "(*(code *)PTR_dup2_0012b1e8)(uVar2,2);" (call_expression "(*(code *)PTR_dup2_0012b1e8)(uVar2,2)" (parenthesized_expression "(*(code *)PTR_dup2_0012b1e8)" (( "(") (pointer_expression "*(code *)PTR_dup2_0012b1e8" (* "*") (cast_expression "(code *)PTR_dup2_0012b1e8" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_dup2_0012b1e8"))) () ")")) (argument_list "(uVar2,2)" (( "(") (identifier "uVar2") (, ",") (number_literal "2") () ")"))) (; ";")) (if_statement "if ((param_1 & 0x10) != 0) {\n      iVar3 = (*(code *)puVar1)();\n      if (iVar3 != 0) {\n        (*(code *)PTR__exit_0012b180)(0);\n        return;\n      }\n    }" (if "if") (parenthesized_expression "((param_1 & 0x10) != 0)" (( "(") (binary_expression "(param_1 & 0x10) != 0" (parenthesized_expression "(param_1 & 0x10)" (( "(") (binary_expression "param_1 & 0x10" (identifier "param_1") (& "&") (number_literal "0x10")) () ")")) (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n      iVar3 = (*(code *)puVar1)();\n      if (iVar3 != 0) {\n        (*(code *)PTR__exit_0012b180)(0);\n        return;\n      }\n    }" ({ "{") (expression_statement "iVar3 = (*(code *)puVar1)();" (assignment_expression "iVar3 = (*(code *)puVar1)()" (identifier "iVar3") (= "=") (call_expression "(*(code *)puVar1)()" (parenthesized_expression "(*(code *)puVar1)" (( "(") (pointer_expression "*(code *)puVar1" (* "*") (cast_expression "(code *)puVar1" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "puVar1"))) () ")")) (argument_list "()" (( "(") () ")")))) (; ";")) (if_statement "if (iVar3 != 0) {\n        (*(code *)PTR__exit_0012b180)(0);\n        return;\n      }" (if "if") (parenthesized_expression "(iVar3 != 0)" (( "(") (binary_expression "iVar3 != 0" (identifier "iVar3") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n        (*(code *)PTR__exit_0012b180)(0);\n        return;\n      }" ({ "{") (expression_statement "(*(code *)PTR__exit_0012b180)(0);" (call_expression "(*(code *)PTR__exit_0012b180)(0)" (parenthesized_expression "(*(code *)PTR__exit_0012b180)" (( "(") (pointer_expression "*(code *)PTR__exit_0012b180" (* "*") (cast_expression "(code *)PTR__exit_0012b180" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR__exit_0012b180"))) () ")")) (argument_list "(0)" (( "(") (number_literal "0") () ")"))) (; ";")) (return_statement "return;" (return "return") (; ";")) (} "}"))) (} "}"))) (} "}"))) (if_statement "if (2 < (int)uVar2) {\n    while( true ) {\n      (*(code *)PTR_close_0012ac8c)(uVar2);\n      if ((param_1 & 4) == 0) break;\n      uVar2 = uVar2 - 1;\n      if (uVar2 == 2) {\n        return;\n      }\n    }\n  }" (if "if") (parenthesized_expression "(2 < (int)uVar2)" (( "(") (binary_expression "2 < (int)uVar2" (number_literal "2") (< "<") (cast_expression "(int)uVar2" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "uVar2"))) () ")")) (compound_statement "{\n    while( true ) {\n      (*(code *)PTR_close_0012ac8c)(uVar2);\n      if ((param_1 & 4) == 0) break;\n      uVar2 = uVar2 - 1;\n      if (uVar2 == 2) {\n        return;\n      }\n    }\n  }" ({ "{") (while_statement "while( true ) {\n      (*(code *)PTR_close_0012ac8c)(uVar2);\n      if ((param_1 & 4) == 0) break;\n      uVar2 = uVar2 - 1;\n      if (uVar2 == 2) {\n        return;\n      }\n    }" (while "while") (parenthesized_expression "( true )" (( "(") (true "true") () ")")) (compound_statement "{\n      (*(code *)PTR_close_0012ac8c)(uVar2);\n      if ((param_1 & 4) == 0) break;\n      uVar2 = uVar2 - 1;\n      if (uVar2 == 2) {\n        return;\n      }\n    }" ({ "{") (expression_statement "(*(code *)PTR_close_0012ac8c)(uVar2);" (call_expression "(*(code *)PTR_close_0012ac8c)(uVar2)" (parenthesized_expression "(*(code *)PTR_close_0012ac8c)" (( "(") (pointer_expression "*(code *)PTR_close_0012ac8c" (* "*") (cast_expression "(code *)PTR_close_0012ac8c" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_close_0012ac8c"))) () ")")) (argument_list "(uVar2)" (( "(") (identifier "uVar2") () ")"))) (; ";")) (if_statement "if ((param_1 & 4) == 0) break;" (if "if") (parenthesized_expression "((param_1 & 4) == 0)" (( "(") (binary_expression "(param_1 & 4) == 0" (parenthesized_expression "(param_1 & 4)" (( "(") (binary_expression "param_1 & 4" (identifier "param_1") (& "&") (number_literal "4")) () ")")) (== "==") (number_literal "0")) () ")")) (break_statement "break;" (break "break") (; ";"))) (expression_statement "uVar2 = uVar2 - 1;" (assignment_expression "uVar2 = uVar2 - 1" (identifier "uVar2") (= "=") (binary_expression "uVar2 - 1" (identifier "uVar2") (- "-") (number_literal "1"))) (; ";")) (if_statement "if (uVar2 == 2) {\n        return;\n      }" (if "if") (parenthesized_expression "(uVar2 == 2)" (( "(") (binary_expression "uVar2 == 2" (identifier "uVar2") (== "==") (number_literal "2")) () ")")) (compound_statement "{\n        return;\n      }" ({ "{") (return_statement "return;" (return "return") (; ";")) (} "}"))) (} "}"))) (} "}"))) (return_statement "return;" (return "return") (; ";")) (} "}")))

void function_1(int var_1)

{
  type_1 *puVar1;
  type_2 var_6;
  int var_7;
  
  if ((var_1 & 1U) != 0) {
    (*(type_3 *)PTR_xchdir_0012a290)(var_2<var_3&var_4)9__f_l_0012a1a8 + -0x13c8);
  }
  if ((var_1 & 2U) != 0) {
    (*(type_3 *)PTR_close_0012ac8c)(0);
    (*(type_3 *)PTR_close_0012ac8c)(1);
    (*(type_3 *)PTR_close_0012ac8c)(2);
  }
  var_6 = (*(type_3 *)PTR_open64_0012af00)(var_5 + -0x7b8,2);
  if ((int)var_6 < 0) {
    var_6 = (*(type_3 *)PTR_xopen_0012a318)
                      (var_2<var_3&var_4)9__f_l_0012a1a8 + -0x13c8,0);
  }
  for (; puVar1 = PTR_xfork_0012a694, var_6 < 2; var_6 = (*(type_3 *)PTR_dup_0012b188)(var_6)) {
  }
  if ((var_1 & 8U) == 0) {
    var_7 = (*(type_3 *)PTR_xfork_0012a694)();
    if (var_7 != 0) {
      (*(type_3 *)PTR__exit_0012b180)(0);
      return;
    }
    (*(type_3 *)PTR_setsid_0012af78)();
    (*(type_3 *)PTR_dup2_0012b1e8)(var_6,0);
    (*(type_3 *)PTR_dup2_0012b1e8)(var_6,1);
    (*(type_3 *)PTR_dup2_0012b1e8)(var_6,2);
    if ((var_1 & 0x10U) != 0) {
      var_7 = (*(type_3 *)puVar1)();
      if (var_7 != 0) {
        (*(type_3 *)PTR__exit_0012b180)(0);
        return;
      }
    }
  }
  if (2 < (int)var_6) {
    while( true ) {
      (*(type_3 *)PTR_close_0012ac8c)(var_6);
      if ((var_1 & 4U) == 0) break;
      var_6 = var_6 - 1;
      if (var_6 == 2) {
        return;
      }
    }
  }
  return;
}


(translation_unit (function_definition type: (primitive_type) declarator: (function_declarator declarator: (identifier) parameters: (parameter_list (parameter_declaration type: (type_identifier) declarator: (identifier)))) body: (compound_statement (declaration type: (type_identifier) declarator: (pointer_declarator declarator: (identifier))) (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (primitive_type) declarator: (identifier)) (if_statement condition: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) right: (number_literal))) 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 (binary_expression left: (identifier) right: (number_literal))))))) (if_statement condition: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) right: (number_literal))) 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 (number_literal)))) (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 (number_literal)))) (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 (number_literal)))))) (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 (binary_expression left: (identifier) right: (number_literal)) (number_literal))))) (if_statement condition: (parenthesized_expression (binary_expression left: (cast_expression type: (type_descriptor type: (primitive_type)) value: (identifier)) 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 (binary_expression left: (identifier) right: (number_literal)) (number_literal))))))) (for_statement condition: (comma_expression left: (assignment_expression left: (identifier) right: (identifier)) right: (binary_expression left: (identifier) right: (number_literal))) update: (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 (identifier)))) body: (compound_statement)) (if_statement condition: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_expression left: (identifier) 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)))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) 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 (number_literal)))) (return_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))) (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) (number_literal)))) (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) (number_literal)))) (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) (number_literal)))) (if_statement condition: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_expression left: (identifier) 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)))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) 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 (number_literal)))) (return_statement))))))) (if_statement condition: (parenthesized_expression (binary_expression left: (number_literal) right: (cast_expression type: (type_descriptor type: (primitive_type)) value: (identifier)))) consequence: (compound_statement (while_statement condition: (parenthesized_expression (true)) body: (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)))) (if_statement condition: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) right: (number_literal))) consequence: (break_statement)) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal)))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (return_statement))))))) (return_statement))))

void MASKED(uint param_1)

{
  undefined *puVar1;
  uint uVar2;
  int iVar3;
  
  if ((param_1 & 1) != 0) {
    (*(code *)PTR_FUN_0012a290)(PTR_FUN_0012a1a8 + -0x13c8);
  }
  if ((param_1 & 2) != 0) {
    (*(code *)PTR_close_0012ac8c)(0);
    (*(code *)PTR_close_0012ac8c)(1);
    (*(code *)PTR_close_0012ac8c)(2);
  }
  uVar2 = (*(code *)PTR_open64_0012af00)(PTR_UINT_0012a18c + -0x7b8,2);
  if ((int)uVar2 < 0) {
    uVar2 = (*(code *)PTR_FUN_0012a318)(PTR_FUN_0012a1a8 + -0x13c8,0);
  }
  for (; puVar1 = PTR_FUN_0012a694, uVar2 < 2; uVar2 = (*(code *)PTR_dup_0012b188)(uVar2)) {
  }
  if ((param_1 & 8) == 0) {
    iVar3 = (*(code *)PTR_FUN_0012a694)();
    if (iVar3 != 0) {
      (*(code *)PTR__exit_0012b180)(0);
      return;
    }
    (*(code *)PTR_setsid_0012af78)();
    (*(code *)PTR_dup2_0012b1e8)(uVar2,0);
    (*(code *)PTR_dup2_0012b1e8)(uVar2,1);
    (*(code *)PTR_dup2_0012b1e8)(uVar2,2);
    if ((param_1 & 0x10) != 0) {
      iVar3 = (*(code *)puVar1)();
      if (iVar3 != 0) {
        (*(code *)PTR__exit_0012b180)(0);
        return;
      }
    }
  }
  if (2 < (int)uVar2) {
    while( true ) {
      (*(code *)PTR_close_0012ac8c)(uVar2);
      if ((param_1 & 4) == 0) break;
      uVar2 = uVar2 - 1;
      if (uVar2 == 2) {
        return;
      }
    }
  }
  return;
}

