
/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */
/* WARNING: Unknown calling convention */

void optimize_subshell_command(COMMAND *command)

{
  command_type cVar1;
  for_com *pfVar2;
  int iVar3;
  
  while( true ) {
    cVar1 = command->type;
    if ((running_trap == 0) && (cVar1 == cm_simple)) {
      iVar3 = signal_is_trapped(0);
      if (((iVar3 == 0) &&
          (((iVar3 = signal_is_trapped(0x42), iVar3 == 0 &&
            (iVar3 = any_signals_trapped(), iVar3 < 0)) && (command->redirects == (REDIRECT *)0x0)))
          ) && ((pfVar2 = (command->value).For, pfVar2->map_list == (WORD_LIST *)0x0 &&
                ((command->flags & 0x84U) == 0)))) {
        command->flags = command->flags | 0x40;
        pfVar2->flags = pfVar2->flags | 0x40;
        return;
      }
      cVar1 = command->type;
    }
    if (cVar1 != cm_connection) {
      return;
    }
    if (1 < ((command->value).Connection)->connector - 0x120U) break;
    command = ((command->value).Connection)->second;
  }
  return;
}



/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */

void optimize_subshell_command(int *param_1)

{
  uint *puVar1;
  int iVar2;
  
  while( true ) {
    iVar2 = *param_1;
    if ((running_trap == 0) && (iVar2 == 4)) {
      iVar2 = signal_is_trapped(0);
      if (((iVar2 == 0) &&
          (((iVar2 = signal_is_trapped(0x42), iVar2 == 0 &&
            (iVar2 = any_signals_trapped(), iVar2 < 0)) && (param_1[3] == 0)))) &&
         ((puVar1 = (uint *)param_1[4], puVar1[3] == 0 && ((param_1[1] & 0x84U) == 0)))) {
        param_1[1] = param_1[1] | 0x40;
        *puVar1 = *puVar1 | 0x40;
        return;
      }
      iVar2 = *param_1;
    }
    if (iVar2 != 6) {
      return;
    }
    if (1 < *(int *)(param_1[4] + 0xc) - 0x120U) break;
    param_1 = *(int **)(param_1[4] + 8);
  }
  return;
}


PUSH EDI
PUSH ESI
PUSH EBX
MOV ESI,dword ptr [ESP + 0x10]
CALL 0x00031ed0
ADD EBX,0xa9bd4
LEA EDI,[EBX + 0xcfe0]
JMP 0x000a0458
CMP EAX,0x6
JNZ 0x000a047d
MOV EDX,dword ptr [ESI + 0x10]
MOV EAX,dword ptr [EDX + 0xc]
SUB EAX,0x120
CMP EAX,0x1
JA 0x000a047d
MOV ESI,dword ptr [EDX + 0x8]
MOV ECX,dword ptr [EDI]
MOV EAX,dword ptr [ESI]
TEST ECX,ECX
JNZ 0x000a0440
CMP EAX,0x4
JNZ 0x000a0440
SUB ESP,0xc
PUSH 0x0
CALL 0x0007c810
ADD ESP,0x10
TEST EAX,EAX
JZ 0x000a0488
MOV EAX,dword ptr [ESI]
CMP EAX,0x6
JZ 0x000a0445
POP EBX
POP ESI
POP EDI
RET
SUB ESP,0xc
PUSH 0x42
CALL 0x0007c810
ADD ESP,0x10
TEST EAX,EAX
JNZ 0x000a0476
CALL 0x0007bab0
TEST EAX,EAX
JNS 0x000a0476
MOV EDX,dword ptr [ESI + 0xc]
TEST EDX,EDX
JNZ 0x000a0476
MOV EDX,dword ptr [ESI + 0x10]
MOV EAX,dword ptr [EDX + 0xc]
TEST EAX,EAX
JNZ 0x000a0476
MOV EAX,dword ptr [ESI + 0x4]
TEST AL,0x84
JNZ 0x000a0476
OR EAX,0x40
MOV dword ptr [ESI + 0x4],EAX
OR dword ptr [EDX],0x40
JMP 0x000a047d
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nvoid optimize_subshell_command(int *param_1)\n\n{\n  uint *puVar1;\n  int iVar2;\n  \n  while( true ) {\n    iVar2 = *param_1;\n    if ((running_trap == 0) && (iVar2 == 4)) {\n      iVar2 = signal_is_trapped(0);\n      if (((iVar2 == 0) &&\n          (((iVar2 = signal_is_trapped(0x42), iVar2 == 0 &&\n            (iVar2 = any_signals_trapped(), iVar2 < 0)) && (param_1[3] == 0)))) &&\n         ((puVar1 = (uint *)param_1[4], puVar1[3] == 0 && ((param_1[1] & 0x84U) == 0)))) {\n        param_1[1] = param_1[1] | 0x40;\n        *puVar1 = *puVar1 | 0x40;\n        return;\n      }\n      iVar2 = *param_1;\n    }\n    if (iVar2 != 6) {\n      return;\n    }\n    if (1 < *(int *)(param_1[4] + 0xc) - 0x120U) break;\n    param_1 = *(int **)(param_1[4] + 8);\n  }\n  return;\n}\n\n" comment (function_definition "void optimize_subshell_command(int *param_1)\n\n{\n  uint *puVar1;\n  int iVar2;\n  \n  while( true ) {\n    iVar2 = *param_1;\n    if ((running_trap == 0) && (iVar2 == 4)) {\n      iVar2 = signal_is_trapped(0);\n      if (((iVar2 == 0) &&\n          (((iVar2 = signal_is_trapped(0x42), iVar2 == 0 &&\n            (iVar2 = any_signals_trapped(), iVar2 < 0)) && (param_1[3] == 0)))) &&\n         ((puVar1 = (uint *)param_1[4], puVar1[3] == 0 && ((param_1[1] & 0x84U) == 0)))) {\n        param_1[1] = param_1[1] | 0x40;\n        *puVar1 = *puVar1 | 0x40;\n        return;\n      }\n      iVar2 = *param_1;\n    }\n    if (iVar2 != 6) {\n      return;\n    }\n    if (1 < *(int *)(param_1[4] + 0xc) - 0x120U) break;\n    param_1 = *(int **)(param_1[4] + 8);\n  }\n  return;\n}" primitive_type (function_declarator "optimize_subshell_command(int *param_1)" identifier (parameter_list "(int *param_1)" ( (parameter_declaration "int *param_1" primitive_type (pointer_declarator "*param_1" * identifier)) ))) (compound_statement "{\n  uint *puVar1;\n  int iVar2;\n  \n  while( true ) {\n    iVar2 = *param_1;\n    if ((running_trap == 0) && (iVar2 == 4)) {\n      iVar2 = signal_is_trapped(0);\n      if (((iVar2 == 0) &&\n          (((iVar2 = signal_is_trapped(0x42), iVar2 == 0 &&\n            (iVar2 = any_signals_trapped(), iVar2 < 0)) && (param_1[3] == 0)))) &&\n         ((puVar1 = (uint *)param_1[4], puVar1[3] == 0 && ((param_1[1] & 0x84U) == 0)))) {\n        param_1[1] = param_1[1] | 0x40;\n        *puVar1 = *puVar1 | 0x40;\n        return;\n      }\n      iVar2 = *param_1;\n    }\n    if (iVar2 != 6) {\n      return;\n    }\n    if (1 < *(int *)(param_1[4] + 0xc) - 0x120U) break;\n    param_1 = *(int **)(param_1[4] + 8);\n  }\n  return;\n}" { (declaration "uint *puVar1;" type_identifier (pointer_declarator "*puVar1" * identifier) ;) (declaration "int iVar2;" primitive_type identifier ;) (while_statement "while( true ) {\n    iVar2 = *param_1;\n    if ((running_trap == 0) && (iVar2 == 4)) {\n      iVar2 = signal_is_trapped(0);\n      if (((iVar2 == 0) &&\n          (((iVar2 = signal_is_trapped(0x42), iVar2 == 0 &&\n            (iVar2 = any_signals_trapped(), iVar2 < 0)) && (param_1[3] == 0)))) &&\n         ((puVar1 = (uint *)param_1[4], puVar1[3] == 0 && ((param_1[1] & 0x84U) == 0)))) {\n        param_1[1] = param_1[1] | 0x40;\n        *puVar1 = *puVar1 | 0x40;\n        return;\n      }\n      iVar2 = *param_1;\n    }\n    if (iVar2 != 6) {\n      return;\n    }\n    if (1 < *(int *)(param_1[4] + 0xc) - 0x120U) break;\n    param_1 = *(int **)(param_1[4] + 8);\n  }" while (parenthesized_expression "( true )" ( true )) (compound_statement "{\n    iVar2 = *param_1;\n    if ((running_trap == 0) && (iVar2 == 4)) {\n      iVar2 = signal_is_trapped(0);\n      if (((iVar2 == 0) &&\n          (((iVar2 = signal_is_trapped(0x42), iVar2 == 0 &&\n            (iVar2 = any_signals_trapped(), iVar2 < 0)) && (param_1[3] == 0)))) &&\n         ((puVar1 = (uint *)param_1[4], puVar1[3] == 0 && ((param_1[1] & 0x84U) == 0)))) {\n        param_1[1] = param_1[1] | 0x40;\n        *puVar1 = *puVar1 | 0x40;\n        return;\n      }\n      iVar2 = *param_1;\n    }\n    if (iVar2 != 6) {\n      return;\n    }\n    if (1 < *(int *)(param_1[4] + 0xc) - 0x120U) break;\n    param_1 = *(int **)(param_1[4] + 8);\n  }" { (expression_statement "iVar2 = *param_1;" (assignment_expression "iVar2 = *param_1" identifier = (pointer_expression "*param_1" * identifier)) ;) (if_statement "if ((running_trap == 0) && (iVar2 == 4)) {\n      iVar2 = signal_is_trapped(0);\n      if (((iVar2 == 0) &&\n          (((iVar2 = signal_is_trapped(0x42), iVar2 == 0 &&\n            (iVar2 = any_signals_trapped(), iVar2 < 0)) && (param_1[3] == 0)))) &&\n         ((puVar1 = (uint *)param_1[4], puVar1[3] == 0 && ((param_1[1] & 0x84U) == 0)))) {\n        param_1[1] = param_1[1] | 0x40;\n        *puVar1 = *puVar1 | 0x40;\n        return;\n      }\n      iVar2 = *param_1;\n    }" if (parenthesized_expression "((running_trap == 0) && (iVar2 == 4))" ( (binary_expression "(running_trap == 0) && (iVar2 == 4)" (parenthesized_expression "(running_trap == 0)" ( (binary_expression "running_trap == 0" identifier == number_literal) )) && (parenthesized_expression "(iVar2 == 4)" ( (binary_expression "iVar2 == 4" identifier == number_literal) ))) )) (compound_statement "{\n      iVar2 = signal_is_trapped(0);\n      if (((iVar2 == 0) &&\n          (((iVar2 = signal_is_trapped(0x42), iVar2 == 0 &&\n            (iVar2 = any_signals_trapped(), iVar2 < 0)) && (param_1[3] == 0)))) &&\n         ((puVar1 = (uint *)param_1[4], puVar1[3] == 0 && ((param_1[1] & 0x84U) == 0)))) {\n        param_1[1] = param_1[1] | 0x40;\n        *puVar1 = *puVar1 | 0x40;\n        return;\n      }\n      iVar2 = *param_1;\n    }" { (expression_statement "iVar2 = signal_is_trapped(0);" (assignment_expression "iVar2 = signal_is_trapped(0)" identifier = (call_expression "signal_is_trapped(0)" identifier (argument_list "(0)" ( number_literal )))) ;) (if_statement "if (((iVar2 == 0) &&\n          (((iVar2 = signal_is_trapped(0x42), iVar2 == 0 &&\n            (iVar2 = any_signals_trapped(), iVar2 < 0)) && (param_1[3] == 0)))) &&\n         ((puVar1 = (uint *)param_1[4], puVar1[3] == 0 && ((param_1[1] & 0x84U) == 0)))) {\n        param_1[1] = param_1[1] | 0x40;\n        *puVar1 = *puVar1 | 0x40;\n        return;\n      }" if (parenthesized_expression "(((iVar2 == 0) &&\n          (((iVar2 = signal_is_trapped(0x42), iVar2 == 0 &&\n            (iVar2 = any_signals_trapped(), iVar2 < 0)) && (param_1[3] == 0)))) &&\n         ((puVar1 = (uint *)param_1[4], puVar1[3] == 0 && ((param_1[1] & 0x84U) == 0))))" ( (binary_expression "((iVar2 == 0) &&\n          (((iVar2 = signal_is_trapped(0x42), iVar2 == 0 &&\n            (iVar2 = any_signals_trapped(), iVar2 < 0)) && (param_1[3] == 0)))) &&\n         ((puVar1 = (uint *)param_1[4], puVar1[3] == 0 && ((param_1[1] & 0x84U) == 0)))" (parenthesized_expression "((iVar2 == 0) &&\n          (((iVar2 = signal_is_trapped(0x42), iVar2 == 0 &&\n            (iVar2 = any_signals_trapped(), iVar2 < 0)) && (param_1[3] == 0))))" ( (binary_expression "(iVar2 == 0) &&\n          (((iVar2 = signal_is_trapped(0x42), iVar2 == 0 &&\n            (iVar2 = any_signals_trapped(), iVar2 < 0)) && (param_1[3] == 0)))" (parenthesized_expression "(iVar2 == 0)" ( (binary_expression "iVar2 == 0" identifier == number_literal) )) && (parenthesized_expression "(((iVar2 = signal_is_trapped(0x42), iVar2 == 0 &&\n            (iVar2 = any_signals_trapped(), iVar2 < 0)) && (param_1[3] == 0)))" ( (parenthesized_expression "((iVar2 = signal_is_trapped(0x42), iVar2 == 0 &&\n            (iVar2 = any_signals_trapped(), iVar2 < 0)) && (param_1[3] == 0))" ( (binary_expression "(iVar2 = signal_is_trapped(0x42), iVar2 == 0 &&\n            (iVar2 = any_signals_trapped(), iVar2 < 0)) && (param_1[3] == 0)" (parenthesized_expression "(iVar2 = signal_is_trapped(0x42), iVar2 == 0 &&\n            (iVar2 = any_signals_trapped(), iVar2 < 0))" ( (comma_expression "iVar2 = signal_is_trapped(0x42), iVar2 == 0 &&\n            (iVar2 = any_signals_trapped(), iVar2 < 0)" (assignment_expression "iVar2 = signal_is_trapped(0x42)" identifier = (call_expression "signal_is_trapped(0x42)" identifier (argument_list "(0x42)" ( number_literal )))) , (binary_expression "iVar2 == 0 &&\n            (iVar2 = any_signals_trapped(), iVar2 < 0)" (binary_expression "iVar2 == 0" identifier == number_literal) && (parenthesized_expression "(iVar2 = any_signals_trapped(), iVar2 < 0)" ( (comma_expression "iVar2 = any_signals_trapped(), iVar2 < 0" (assignment_expression "iVar2 = any_signals_trapped()" identifier = (call_expression "any_signals_trapped()" identifier (argument_list "()" ( )))) , (binary_expression "iVar2 < 0" identifier < number_literal)) )))) )) && (parenthesized_expression "(param_1[3] == 0)" ( (binary_expression "param_1[3] == 0" (subscript_expression "param_1[3]" identifier [ number_literal ]) == number_literal) ))) )) ))) )) && (parenthesized_expression "((puVar1 = (uint *)param_1[4], puVar1[3] == 0 && ((param_1[1] & 0x84U) == 0)))" ( (parenthesized_expression "(puVar1 = (uint *)param_1[4], puVar1[3] == 0 && ((param_1[1] & 0x84U) == 0))" ( (comma_expression "puVar1 = (uint *)param_1[4], puVar1[3] == 0 && ((param_1[1] & 0x84U) == 0)" (assignment_expression "puVar1 = (uint *)param_1[4]" identifier = (cast_expression "(uint *)param_1[4]" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (subscript_expression "param_1[4]" identifier [ number_literal ]))) , (binary_expression "puVar1[3] == 0 && ((param_1[1] & 0x84U) == 0)" (binary_expression "puVar1[3] == 0" (subscript_expression "puVar1[3]" identifier [ number_literal ]) == number_literal) && (parenthesized_expression "((param_1[1] & 0x84U) == 0)" ( (binary_expression "(param_1[1] & 0x84U) == 0" (parenthesized_expression "(param_1[1] & 0x84U)" ( (binary_expression "param_1[1] & 0x84U" (subscript_expression "param_1[1]" identifier [ number_literal ]) & number_literal) )) == number_literal) )))) )) ))) )) (compound_statement "{\n        param_1[1] = param_1[1] | 0x40;\n        *puVar1 = *puVar1 | 0x40;\n        return;\n      }" { (expression_statement "param_1[1] = param_1[1] | 0x40;" (assignment_expression "param_1[1] = param_1[1] | 0x40" (subscript_expression "param_1[1]" identifier [ number_literal ]) = (binary_expression "param_1[1] | 0x40" (subscript_expression "param_1[1]" identifier [ number_literal ]) | number_literal)) ;) (expression_statement "*puVar1 = *puVar1 | 0x40;" (assignment_expression "*puVar1 = *puVar1 | 0x40" (pointer_expression "*puVar1" * identifier) = (binary_expression "*puVar1 | 0x40" (pointer_expression "*puVar1" * identifier) | number_literal)) ;) (return_statement "return;" return ;) })) (expression_statement "iVar2 = *param_1;" (assignment_expression "iVar2 = *param_1" identifier = (pointer_expression "*param_1" * identifier)) ;) })) (if_statement "if (iVar2 != 6) {\n      return;\n    }" if (parenthesized_expression "(iVar2 != 6)" ( (binary_expression "iVar2 != 6" identifier != number_literal) )) (compound_statement "{\n      return;\n    }" { (return_statement "return;" return ;) })) (if_statement "if (1 < *(int *)(param_1[4] + 0xc) - 0x120U) break;" if (parenthesized_expression "(1 < *(int *)(param_1[4] + 0xc) - 0x120U)" ( (binary_expression "1 < *(int *)(param_1[4] + 0xc) - 0x120U" number_literal < (binary_expression "*(int *)(param_1[4] + 0xc) - 0x120U" (pointer_expression "*(int *)(param_1[4] + 0xc)" * (cast_expression "(int *)(param_1[4] + 0xc)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1[4] + 0xc)" ( (binary_expression "param_1[4] + 0xc" (subscript_expression "param_1[4]" identifier [ number_literal ]) + number_literal) )))) - number_literal)) )) (break_statement "break;" break ;)) (expression_statement "param_1 = *(int **)(param_1[4] + 8);" (assignment_expression "param_1 = *(int **)(param_1[4] + 8)" identifier = (pointer_expression "*(int **)(param_1[4] + 8)" * (cast_expression "(int **)(param_1[4] + 8)" ( (type_descriptor "int **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_1[4] + 8)" ( (binary_expression "param_1[4] + 8" (subscript_expression "param_1[4]" identifier [ number_literal ]) + number_literal) ))))) ;) })) (return_statement "return;" return ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n/* WARNING: Unknown calling convention */\n\nvoid optimize_subshell_command(COMMAND *command)\n\n{\n  command_type cVar1;\n  for_com *pfVar2;\n  int iVar3;\n  \n  while( true ) {\n    cVar1 = command->type;\n    if ((running_trap == 0) && (cVar1 == cm_simple)) {\n      iVar3 = signal_is_trapped(0);\n      if (((iVar3 == 0) &&\n          (((iVar3 = signal_is_trapped(0x42), iVar3 == 0 &&\n            (iVar3 = any_signals_trapped(), iVar3 < 0)) && (command->redirects == (REDIRECT *)0x0)))\n          ) && ((pfVar2 = (command->value).For, pfVar2->map_list == (WORD_LIST *)0x0 &&\n                ((command->flags & 0x84U) == 0)))) {\n        command->flags = command->flags | 0x40;\n        pfVar2->flags = pfVar2->flags | 0x40;\n        return;\n      }\n      cVar1 = command->type;\n    }\n    if (cVar1 != cm_connection) {\n      return;\n    }\n    if (1 < ((command->value).Connection)->connector - 0x120U) break;\n    command = ((command->value).Connection)->second;\n  }\n  return;\n}\n\n" comment comment (function_definition "void optimize_subshell_command(COMMAND *command)\n\n{\n  command_type cVar1;\n  for_com *pfVar2;\n  int iVar3;\n  \n  while( true ) {\n    cVar1 = command->type;\n    if ((running_trap == 0) && (cVar1 == cm_simple)) {\n      iVar3 = signal_is_trapped(0);\n      if (((iVar3 == 0) &&\n          (((iVar3 = signal_is_trapped(0x42), iVar3 == 0 &&\n            (iVar3 = any_signals_trapped(), iVar3 < 0)) && (command->redirects == (REDIRECT *)0x0)))\n          ) && ((pfVar2 = (command->value).For, pfVar2->map_list == (WORD_LIST *)0x0 &&\n                ((command->flags & 0x84U) == 0)))) {\n        command->flags = command->flags | 0x40;\n        pfVar2->flags = pfVar2->flags | 0x40;\n        return;\n      }\n      cVar1 = command->type;\n    }\n    if (cVar1 != cm_connection) {\n      return;\n    }\n    if (1 < ((command->value).Connection)->connector - 0x120U) break;\n    command = ((command->value).Connection)->second;\n  }\n  return;\n}" primitive_type (function_declarator "optimize_subshell_command(COMMAND *command)" identifier (parameter_list "(COMMAND *command)" ( (parameter_declaration "COMMAND *command" type_identifier (pointer_declarator "*command" * identifier)) ))) (compound_statement "{\n  command_type cVar1;\n  for_com *pfVar2;\n  int iVar3;\n  \n  while( true ) {\n    cVar1 = command->type;\n    if ((running_trap == 0) && (cVar1 == cm_simple)) {\n      iVar3 = signal_is_trapped(0);\n      if (((iVar3 == 0) &&\n          (((iVar3 = signal_is_trapped(0x42), iVar3 == 0 &&\n            (iVar3 = any_signals_trapped(), iVar3 < 0)) && (command->redirects == (REDIRECT *)0x0)))\n          ) && ((pfVar2 = (command->value).For, pfVar2->map_list == (WORD_LIST *)0x0 &&\n                ((command->flags & 0x84U) == 0)))) {\n        command->flags = command->flags | 0x40;\n        pfVar2->flags = pfVar2->flags | 0x40;\n        return;\n      }\n      cVar1 = command->type;\n    }\n    if (cVar1 != cm_connection) {\n      return;\n    }\n    if (1 < ((command->value).Connection)->connector - 0x120U) break;\n    command = ((command->value).Connection)->second;\n  }\n  return;\n}" { (declaration "command_type cVar1;" type_identifier identifier ;) (declaration "for_com *pfVar2;" type_identifier (pointer_declarator "*pfVar2" * identifier) ;) (declaration "int iVar3;" primitive_type identifier ;) (while_statement "while( true ) {\n    cVar1 = command->type;\n    if ((running_trap == 0) && (cVar1 == cm_simple)) {\n      iVar3 = signal_is_trapped(0);\n      if (((iVar3 == 0) &&\n          (((iVar3 = signal_is_trapped(0x42), iVar3 == 0 &&\n            (iVar3 = any_signals_trapped(), iVar3 < 0)) && (command->redirects == (REDIRECT *)0x0)))\n          ) && ((pfVar2 = (command->value).For, pfVar2->map_list == (WORD_LIST *)0x0 &&\n                ((command->flags & 0x84U) == 0)))) {\n        command->flags = command->flags | 0x40;\n        pfVar2->flags = pfVar2->flags | 0x40;\n        return;\n      }\n      cVar1 = command->type;\n    }\n    if (cVar1 != cm_connection) {\n      return;\n    }\n    if (1 < ((command->value).Connection)->connector - 0x120U) break;\n    command = ((command->value).Connection)->second;\n  }" while (parenthesized_expression "( true )" ( true )) (compound_statement "{\n    cVar1 = command->type;\n    if ((running_trap == 0) && (cVar1 == cm_simple)) {\n      iVar3 = signal_is_trapped(0);\n      if (((iVar3 == 0) &&\n          (((iVar3 = signal_is_trapped(0x42), iVar3 == 0 &&\n            (iVar3 = any_signals_trapped(), iVar3 < 0)) && (command->redirects == (REDIRECT *)0x0)))\n          ) && ((pfVar2 = (command->value).For, pfVar2->map_list == (WORD_LIST *)0x0 &&\n                ((command->flags & 0x84U) == 0)))) {\n        command->flags = command->flags | 0x40;\n        pfVar2->flags = pfVar2->flags | 0x40;\n        return;\n      }\n      cVar1 = command->type;\n    }\n    if (cVar1 != cm_connection) {\n      return;\n    }\n    if (1 < ((command->value).Connection)->connector - 0x120U) break;\n    command = ((command->value).Connection)->second;\n  }" { (expression_statement "cVar1 = command->type;" (assignment_expression "cVar1 = command->type" identifier = (field_expression "command->type" identifier -> field_identifier)) ;) (if_statement "if ((running_trap == 0) && (cVar1 == cm_simple)) {\n      iVar3 = signal_is_trapped(0);\n      if (((iVar3 == 0) &&\n          (((iVar3 = signal_is_trapped(0x42), iVar3 == 0 &&\n            (iVar3 = any_signals_trapped(), iVar3 < 0)) && (command->redirects == (REDIRECT *)0x0)))\n          ) && ((pfVar2 = (command->value).For, pfVar2->map_list == (WORD_LIST *)0x0 &&\n                ((command->flags & 0x84U) == 0)))) {\n        command->flags = command->flags | 0x40;\n        pfVar2->flags = pfVar2->flags | 0x40;\n        return;\n      }\n      cVar1 = command->type;\n    }" if (parenthesized_expression "((running_trap == 0) && (cVar1 == cm_simple))" ( (binary_expression "(running_trap == 0) && (cVar1 == cm_simple)" (parenthesized_expression "(running_trap == 0)" ( (binary_expression "running_trap == 0" identifier == number_literal) )) && (parenthesized_expression "(cVar1 == cm_simple)" ( (binary_expression "cVar1 == cm_simple" identifier == identifier) ))) )) (compound_statement "{\n      iVar3 = signal_is_trapped(0);\n      if (((iVar3 == 0) &&\n          (((iVar3 = signal_is_trapped(0x42), iVar3 == 0 &&\n            (iVar3 = any_signals_trapped(), iVar3 < 0)) && (command->redirects == (REDIRECT *)0x0)))\n          ) && ((pfVar2 = (command->value).For, pfVar2->map_list == (WORD_LIST *)0x0 &&\n                ((command->flags & 0x84U) == 0)))) {\n        command->flags = command->flags | 0x40;\n        pfVar2->flags = pfVar2->flags | 0x40;\n        return;\n      }\n      cVar1 = command->type;\n    }" { (expression_statement "iVar3 = signal_is_trapped(0);" (assignment_expression "iVar3 = signal_is_trapped(0)" identifier = (call_expression "signal_is_trapped(0)" identifier (argument_list "(0)" ( number_literal )))) ;) (if_statement "if (((iVar3 == 0) &&\n          (((iVar3 = signal_is_trapped(0x42), iVar3 == 0 &&\n            (iVar3 = any_signals_trapped(), iVar3 < 0)) && (command->redirects == (REDIRECT *)0x0)))\n          ) && ((pfVar2 = (command->value).For, pfVar2->map_list == (WORD_LIST *)0x0 &&\n                ((command->flags & 0x84U) == 0)))) {\n        command->flags = command->flags | 0x40;\n        pfVar2->flags = pfVar2->flags | 0x40;\n        return;\n      }" if (parenthesized_expression "(((iVar3 == 0) &&\n          (((iVar3 = signal_is_trapped(0x42), iVar3 == 0 &&\n            (iVar3 = any_signals_trapped(), iVar3 < 0)) && (command->redirects == (REDIRECT *)0x0)))\n          ) && ((pfVar2 = (command->value).For, pfVar2->map_list == (WORD_LIST *)0x0 &&\n                ((command->flags & 0x84U) == 0))))" ( (binary_expression "((iVar3 == 0) &&\n          (((iVar3 = signal_is_trapped(0x42), iVar3 == 0 &&\n            (iVar3 = any_signals_trapped(), iVar3 < 0)) && (command->redirects == (REDIRECT *)0x0)))\n          ) && ((pfVar2 = (command->value).For, pfVar2->map_list == (WORD_LIST *)0x0 &&\n                ((command->flags & 0x84U) == 0)))" (parenthesized_expression "((iVar3 == 0) &&\n          (((iVar3 = signal_is_trapped(0x42), iVar3 == 0 &&\n            (iVar3 = any_signals_trapped(), iVar3 < 0)) && (command->redirects == (REDIRECT *)0x0)))\n          )" ( (binary_expression "(iVar3 == 0) &&\n          (((iVar3 = signal_is_trapped(0x42), iVar3 == 0 &&\n            (iVar3 = any_signals_trapped(), iVar3 < 0)) && (command->redirects == (REDIRECT *)0x0)))" (parenthesized_expression "(iVar3 == 0)" ( (binary_expression "iVar3 == 0" identifier == number_literal) )) && (parenthesized_expression "(((iVar3 = signal_is_trapped(0x42), iVar3 == 0 &&\n            (iVar3 = any_signals_trapped(), iVar3 < 0)) && (command->redirects == (REDIRECT *)0x0)))" ( (parenthesized_expression "((iVar3 = signal_is_trapped(0x42), iVar3 == 0 &&\n            (iVar3 = any_signals_trapped(), iVar3 < 0)) && (command->redirects == (REDIRECT *)0x0))" ( (binary_expression "(iVar3 = signal_is_trapped(0x42), iVar3 == 0 &&\n            (iVar3 = any_signals_trapped(), iVar3 < 0)) && (command->redirects == (REDIRECT *)0x0)" (parenthesized_expression "(iVar3 = signal_is_trapped(0x42), iVar3 == 0 &&\n            (iVar3 = any_signals_trapped(), iVar3 < 0))" ( (comma_expression "iVar3 = signal_is_trapped(0x42), iVar3 == 0 &&\n            (iVar3 = any_signals_trapped(), iVar3 < 0)" (assignment_expression "iVar3 = signal_is_trapped(0x42)" identifier = (call_expression "signal_is_trapped(0x42)" identifier (argument_list "(0x42)" ( number_literal )))) , (binary_expression "iVar3 == 0 &&\n            (iVar3 = any_signals_trapped(), iVar3 < 0)" (binary_expression "iVar3 == 0" identifier == number_literal) && (parenthesized_expression "(iVar3 = any_signals_trapped(), iVar3 < 0)" ( (comma_expression "iVar3 = any_signals_trapped(), iVar3 < 0" (assignment_expression "iVar3 = any_signals_trapped()" identifier = (call_expression "any_signals_trapped()" identifier (argument_list "()" ( )))) , (binary_expression "iVar3 < 0" identifier < number_literal)) )))) )) && (parenthesized_expression "(command->redirects == (REDIRECT *)0x0)" ( (binary_expression "command->redirects == (REDIRECT *)0x0" (field_expression "command->redirects" identifier -> field_identifier) == (cast_expression "(REDIRECT *)0x0" ( (type_descriptor "REDIRECT *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) ))) )) ))) )) && (parenthesized_expression "((pfVar2 = (command->value).For, pfVar2->map_list == (WORD_LIST *)0x0 &&\n                ((command->flags & 0x84U) == 0)))" ( (parenthesized_expression "(pfVar2 = (command->value).For, pfVar2->map_list == (WORD_LIST *)0x0 &&\n                ((command->flags & 0x84U) == 0))" ( (comma_expression "pfVar2 = (command->value).For, pfVar2->map_list == (WORD_LIST *)0x0 &&\n                ((command->flags & 0x84U) == 0)" (assignment_expression "pfVar2 = (command->value).For" identifier = (field_expression "(command->value).For" (parenthesized_expression "(command->value)" ( (field_expression "command->value" identifier -> field_identifier) )) . field_identifier)) , (binary_expression "pfVar2->map_list == (WORD_LIST *)0x0 &&\n                ((command->flags & 0x84U) == 0)" (binary_expression "pfVar2->map_list == (WORD_LIST *)0x0" (field_expression "pfVar2->map_list" identifier -> field_identifier) == (cast_expression "(WORD_LIST *)0x0" ( (type_descriptor "WORD_LIST *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) && (parenthesized_expression "((command->flags & 0x84U) == 0)" ( (binary_expression "(command->flags & 0x84U) == 0" (parenthesized_expression "(command->flags & 0x84U)" ( (binary_expression "command->flags & 0x84U" (field_expression "command->flags" identifier -> field_identifier) & number_literal) )) == number_literal) )))) )) ))) )) (compound_statement "{\n        command->flags = command->flags | 0x40;\n        pfVar2->flags = pfVar2->flags | 0x40;\n        return;\n      }" { (expression_statement "command->flags = command->flags | 0x40;" (assignment_expression "command->flags = command->flags | 0x40" (field_expression "command->flags" identifier -> field_identifier) = (binary_expression "command->flags | 0x40" (field_expression "command->flags" identifier -> field_identifier) | number_literal)) ;) (expression_statement "pfVar2->flags = pfVar2->flags | 0x40;" (assignment_expression "pfVar2->flags = pfVar2->flags | 0x40" (field_expression "pfVar2->flags" identifier -> field_identifier) = (binary_expression "pfVar2->flags | 0x40" (field_expression "pfVar2->flags" identifier -> field_identifier) | number_literal)) ;) (return_statement "return;" return ;) })) (expression_statement "cVar1 = command->type;" (assignment_expression "cVar1 = command->type" identifier = (field_expression "command->type" identifier -> field_identifier)) ;) })) (if_statement "if (cVar1 != cm_connection) {\n      return;\n    }" if (parenthesized_expression "(cVar1 != cm_connection)" ( (binary_expression "cVar1 != cm_connection" identifier != identifier) )) (compound_statement "{\n      return;\n    }" { (return_statement "return;" return ;) })) (if_statement "if (1 < ((command->value).Connection)->connector - 0x120U) break;" if (parenthesized_expression "(1 < ((command->value).Connection)->connector - 0x120U)" ( (binary_expression "1 < ((command->value).Connection)->connector - 0x120U" number_literal < (binary_expression "((command->value).Connection)->connector - 0x120U" (field_expression "((command->value).Connection)->connector" (parenthesized_expression "((command->value).Connection)" ( (field_expression "(command->value).Connection" (parenthesized_expression "(command->value)" ( (field_expression "command->value" identifier -> field_identifier) )) . field_identifier) )) -> field_identifier) - number_literal)) )) (break_statement "break;" break ;)) (expression_statement "command = ((command->value).Connection)->second;" (assignment_expression "command = ((command->value).Connection)->second" identifier = (field_expression "((command->value).Connection)->second" (parenthesized_expression "((command->value).Connection)" ( (field_expression "(command->value).Connection" (parenthesized_expression "(command->value)" ( (field_expression "command->value" identifier -> field_identifier) )) . field_identifier) )) -> field_identifier)) ;) })) (return_statement "return;" return ;) })))
(translation_unit "void optimize_subshell_command(int *param_1)\n\n{\n  uint *puVar1;\n  int iVar2;\n  \n  while( true ) {\n    iVar2 = *param_1;\n    if ((running_trap == 0) && (iVar2 == 4)) {\n      iVar2 = signal_is_trapped(0);\n      if (((iVar2 == 0) &&\n          (((iVar2 = signal_is_trapped(0x42), iVar2 == 0 &&\n            (iVar2 = any_signals_trapped(), iVar2 < 0)) && (param_1[3] == 0)))) &&\n         ((puVar1 = (uint *)param_1[4], puVar1[3] == 0 && ((param_1[1] & 0x84U) == 0)))) {\n        param_1[1] = param_1[1] | 0x40;\n        *puVar1 = *puVar1 | 0x40;\n        return;\n      }\n      iVar2 = *param_1;\n    }\n    if (iVar2 != 6) {\n      return;\n    }\n    if (1 < *(int *)(param_1[4] + 0xc) - 0x120U) break;\n    param_1 = *(int **)(param_1[4] + 8);\n  }\n  return;\n}\n\n" (function_definition "void optimize_subshell_command(int *param_1)\n\n{\n  uint *puVar1;\n  int iVar2;\n  \n  while( true ) {\n    iVar2 = *param_1;\n    if ((running_trap == 0) && (iVar2 == 4)) {\n      iVar2 = signal_is_trapped(0);\n      if (((iVar2 == 0) &&\n          (((iVar2 = signal_is_trapped(0x42), iVar2 == 0 &&\n            (iVar2 = any_signals_trapped(), iVar2 < 0)) && (param_1[3] == 0)))) &&\n         ((puVar1 = (uint *)param_1[4], puVar1[3] == 0 && ((param_1[1] & 0x84U) == 0)))) {\n        param_1[1] = param_1[1] | 0x40;\n        *puVar1 = *puVar1 | 0x40;\n        return;\n      }\n      iVar2 = *param_1;\n    }\n    if (iVar2 != 6) {\n      return;\n    }\n    if (1 < *(int *)(param_1[4] + 0xc) - 0x120U) break;\n    param_1 = *(int **)(param_1[4] + 8);\n  }\n  return;\n}" primitive_type (function_declarator "optimize_subshell_command(int *param_1)" identifier (parameter_list "(int *param_1)" ( (parameter_declaration "int *param_1" primitive_type (pointer_declarator "*param_1" * identifier)) ))) (compound_statement "{\n  uint *puVar1;\n  int iVar2;\n  \n  while( true ) {\n    iVar2 = *param_1;\n    if ((running_trap == 0) && (iVar2 == 4)) {\n      iVar2 = signal_is_trapped(0);\n      if (((iVar2 == 0) &&\n          (((iVar2 = signal_is_trapped(0x42), iVar2 == 0 &&\n            (iVar2 = any_signals_trapped(), iVar2 < 0)) && (param_1[3] == 0)))) &&\n         ((puVar1 = (uint *)param_1[4], puVar1[3] == 0 && ((param_1[1] & 0x84U) == 0)))) {\n        param_1[1] = param_1[1] | 0x40;\n        *puVar1 = *puVar1 | 0x40;\n        return;\n      }\n      iVar2 = *param_1;\n    }\n    if (iVar2 != 6) {\n      return;\n    }\n    if (1 < *(int *)(param_1[4] + 0xc) - 0x120U) break;\n    param_1 = *(int **)(param_1[4] + 8);\n  }\n  return;\n}" { (declaration "uint *puVar1;" type_identifier (pointer_declarator "*puVar1" * identifier) ;) (declaration "int iVar2;" primitive_type identifier ;) (while_statement "while( true ) {\n    iVar2 = *param_1;\n    if ((running_trap == 0) && (iVar2 == 4)) {\n      iVar2 = signal_is_trapped(0);\n      if (((iVar2 == 0) &&\n          (((iVar2 = signal_is_trapped(0x42), iVar2 == 0 &&\n            (iVar2 = any_signals_trapped(), iVar2 < 0)) && (param_1[3] == 0)))) &&\n         ((puVar1 = (uint *)param_1[4], puVar1[3] == 0 && ((param_1[1] & 0x84U) == 0)))) {\n        param_1[1] = param_1[1] | 0x40;\n        *puVar1 = *puVar1 | 0x40;\n        return;\n      }\n      iVar2 = *param_1;\n    }\n    if (iVar2 != 6) {\n      return;\n    }\n    if (1 < *(int *)(param_1[4] + 0xc) - 0x120U) break;\n    param_1 = *(int **)(param_1[4] + 8);\n  }" while (parenthesized_expression "( true )" ( true )) (compound_statement "{\n    iVar2 = *param_1;\n    if ((running_trap == 0) && (iVar2 == 4)) {\n      iVar2 = signal_is_trapped(0);\n      if (((iVar2 == 0) &&\n          (((iVar2 = signal_is_trapped(0x42), iVar2 == 0 &&\n            (iVar2 = any_signals_trapped(), iVar2 < 0)) && (param_1[3] == 0)))) &&\n         ((puVar1 = (uint *)param_1[4], puVar1[3] == 0 && ((param_1[1] & 0x84U) == 0)))) {\n        param_1[1] = param_1[1] | 0x40;\n        *puVar1 = *puVar1 | 0x40;\n        return;\n      }\n      iVar2 = *param_1;\n    }\n    if (iVar2 != 6) {\n      return;\n    }\n    if (1 < *(int *)(param_1[4] + 0xc) - 0x120U) break;\n    param_1 = *(int **)(param_1[4] + 8);\n  }" { (expression_statement "iVar2 = *param_1;" (assignment_expression "iVar2 = *param_1" identifier = (pointer_expression "*param_1" * identifier)) ;) (if_statement "if ((running_trap == 0) && (iVar2 == 4)) {\n      iVar2 = signal_is_trapped(0);\n      if (((iVar2 == 0) &&\n          (((iVar2 = signal_is_trapped(0x42), iVar2 == 0 &&\n            (iVar2 = any_signals_trapped(), iVar2 < 0)) && (param_1[3] == 0)))) &&\n         ((puVar1 = (uint *)param_1[4], puVar1[3] == 0 && ((param_1[1] & 0x84U) == 0)))) {\n        param_1[1] = param_1[1] | 0x40;\n        *puVar1 = *puVar1 | 0x40;\n        return;\n      }\n      iVar2 = *param_1;\n    }" if (parenthesized_expression "((running_trap == 0) && (iVar2 == 4))" ( (binary_expression "(running_trap == 0) && (iVar2 == 4)" (parenthesized_expression "(running_trap == 0)" ( (binary_expression "running_trap == 0" identifier == number_literal) )) && (parenthesized_expression "(iVar2 == 4)" ( (binary_expression "iVar2 == 4" identifier == number_literal) ))) )) (compound_statement "{\n      iVar2 = signal_is_trapped(0);\n      if (((iVar2 == 0) &&\n          (((iVar2 = signal_is_trapped(0x42), iVar2 == 0 &&\n            (iVar2 = any_signals_trapped(), iVar2 < 0)) && (param_1[3] == 0)))) &&\n         ((puVar1 = (uint *)param_1[4], puVar1[3] == 0 && ((param_1[1] & 0x84U) == 0)))) {\n        param_1[1] = param_1[1] | 0x40;\n        *puVar1 = *puVar1 | 0x40;\n        return;\n      }\n      iVar2 = *param_1;\n    }" { (expression_statement "iVar2 = signal_is_trapped(0);" (assignment_expression "iVar2 = signal_is_trapped(0)" identifier = (call_expression "signal_is_trapped(0)" identifier (argument_list "(0)" ( number_literal )))) ;) (if_statement "if (((iVar2 == 0) &&\n          (((iVar2 = signal_is_trapped(0x42), iVar2 == 0 &&\n            (iVar2 = any_signals_trapped(), iVar2 < 0)) && (param_1[3] == 0)))) &&\n         ((puVar1 = (uint *)param_1[4], puVar1[3] == 0 && ((param_1[1] & 0x84U) == 0)))) {\n        param_1[1] = param_1[1] | 0x40;\n        *puVar1 = *puVar1 | 0x40;\n        return;\n      }" if (parenthesized_expression "(((iVar2 == 0) &&\n          (((iVar2 = signal_is_trapped(0x42), iVar2 == 0 &&\n            (iVar2 = any_signals_trapped(), iVar2 < 0)) && (param_1[3] == 0)))) &&\n         ((puVar1 = (uint *)param_1[4], puVar1[3] == 0 && ((param_1[1] & 0x84U) == 0))))" ( (binary_expression "((iVar2 == 0) &&\n          (((iVar2 = signal_is_trapped(0x42), iVar2 == 0 &&\n            (iVar2 = any_signals_trapped(), iVar2 < 0)) && (param_1[3] == 0)))) &&\n         ((puVar1 = (uint *)param_1[4], puVar1[3] == 0 && ((param_1[1] & 0x84U) == 0)))" (parenthesized_expression "((iVar2 == 0) &&\n          (((iVar2 = signal_is_trapped(0x42), iVar2 == 0 &&\n            (iVar2 = any_signals_trapped(), iVar2 < 0)) && (param_1[3] == 0))))" ( (binary_expression "(iVar2 == 0) &&\n          (((iVar2 = signal_is_trapped(0x42), iVar2 == 0 &&\n            (iVar2 = any_signals_trapped(), iVar2 < 0)) && (param_1[3] == 0)))" (parenthesized_expression "(iVar2 == 0)" ( (binary_expression "iVar2 == 0" identifier == number_literal) )) && (parenthesized_expression "(((iVar2 = signal_is_trapped(0x42), iVar2 == 0 &&\n            (iVar2 = any_signals_trapped(), iVar2 < 0)) && (param_1[3] == 0)))" ( (parenthesized_expression "((iVar2 = signal_is_trapped(0x42), iVar2 == 0 &&\n            (iVar2 = any_signals_trapped(), iVar2 < 0)) && (param_1[3] == 0))" ( (binary_expression "(iVar2 = signal_is_trapped(0x42), iVar2 == 0 &&\n            (iVar2 = any_signals_trapped(), iVar2 < 0)) && (param_1[3] == 0)" (parenthesized_expression "(iVar2 = signal_is_trapped(0x42), iVar2 == 0 &&\n            (iVar2 = any_signals_trapped(), iVar2 < 0))" ( (comma_expression "iVar2 = signal_is_trapped(0x42), iVar2 == 0 &&\n            (iVar2 = any_signals_trapped(), iVar2 < 0)" (assignment_expression "iVar2 = signal_is_trapped(0x42)" identifier = (call_expression "signal_is_trapped(0x42)" identifier (argument_list "(0x42)" ( number_literal )))) , (binary_expression "iVar2 == 0 &&\n            (iVar2 = any_signals_trapped(), iVar2 < 0)" (binary_expression "iVar2 == 0" identifier == number_literal) && (parenthesized_expression "(iVar2 = any_signals_trapped(), iVar2 < 0)" ( (comma_expression "iVar2 = any_signals_trapped(), iVar2 < 0" (assignment_expression "iVar2 = any_signals_trapped()" identifier = (call_expression "any_signals_trapped()" identifier (argument_list "()" ( )))) , (binary_expression "iVar2 < 0" identifier < number_literal)) )))) )) && (parenthesized_expression "(param_1[3] == 0)" ( (binary_expression "param_1[3] == 0" (subscript_expression "param_1[3]" identifier [ number_literal ]) == number_literal) ))) )) ))) )) && (parenthesized_expression "((puVar1 = (uint *)param_1[4], puVar1[3] == 0 && ((param_1[1] & 0x84U) == 0)))" ( (parenthesized_expression "(puVar1 = (uint *)param_1[4], puVar1[3] == 0 && ((param_1[1] & 0x84U) == 0))" ( (comma_expression "puVar1 = (uint *)param_1[4], puVar1[3] == 0 && ((param_1[1] & 0x84U) == 0)" (assignment_expression "puVar1 = (uint *)param_1[4]" identifier = (cast_expression "(uint *)param_1[4]" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (subscript_expression "param_1[4]" identifier [ number_literal ]))) , (binary_expression "puVar1[3] == 0 && ((param_1[1] & 0x84U) == 0)" (binary_expression "puVar1[3] == 0" (subscript_expression "puVar1[3]" identifier [ number_literal ]) == number_literal) && (parenthesized_expression "((param_1[1] & 0x84U) == 0)" ( (binary_expression "(param_1[1] & 0x84U) == 0" (parenthesized_expression "(param_1[1] & 0x84U)" ( (binary_expression "param_1[1] & 0x84U" (subscript_expression "param_1[1]" identifier [ number_literal ]) & number_literal) )) == number_literal) )))) )) ))) )) (compound_statement "{\n        param_1[1] = param_1[1] | 0x40;\n        *puVar1 = *puVar1 | 0x40;\n        return;\n      }" { (expression_statement "param_1[1] = param_1[1] | 0x40;" (assignment_expression "param_1[1] = param_1[1] | 0x40" (subscript_expression "param_1[1]" identifier [ number_literal ]) = (binary_expression "param_1[1] | 0x40" (subscript_expression "param_1[1]" identifier [ number_literal ]) | number_literal)) ;) (expression_statement "*puVar1 = *puVar1 | 0x40;" (assignment_expression "*puVar1 = *puVar1 | 0x40" (pointer_expression "*puVar1" * identifier) = (binary_expression "*puVar1 | 0x40" (pointer_expression "*puVar1" * identifier) | number_literal)) ;) (return_statement "return;" return ;) })) (expression_statement "iVar2 = *param_1;" (assignment_expression "iVar2 = *param_1" identifier = (pointer_expression "*param_1" * identifier)) ;) })) (if_statement "if (iVar2 != 6) {\n      return;\n    }" if (parenthesized_expression "(iVar2 != 6)" ( (binary_expression "iVar2 != 6" identifier != number_literal) )) (compound_statement "{\n      return;\n    }" { (return_statement "return;" return ;) })) (if_statement "if (1 < *(int *)(param_1[4] + 0xc) - 0x120U) break;" if (parenthesized_expression "(1 < *(int *)(param_1[4] + 0xc) - 0x120U)" ( (binary_expression "1 < *(int *)(param_1[4] + 0xc) - 0x120U" number_literal < (binary_expression "*(int *)(param_1[4] + 0xc) - 0x120U" (pointer_expression "*(int *)(param_1[4] + 0xc)" * (cast_expression "(int *)(param_1[4] + 0xc)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1[4] + 0xc)" ( (binary_expression "param_1[4] + 0xc" (subscript_expression "param_1[4]" identifier [ number_literal ]) + number_literal) )))) - number_literal)) )) (break_statement "break;" break ;)) (expression_statement "param_1 = *(int **)(param_1[4] + 8);" (assignment_expression "param_1 = *(int **)(param_1[4] + 8)" identifier = (pointer_expression "*(int **)(param_1[4] + 8)" * (cast_expression "(int **)(param_1[4] + 8)" ( (type_descriptor "int **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_1[4] + 8)" ( (binary_expression "param_1[4] + 8" (subscript_expression "param_1[4]" identifier [ number_literal ]) + number_literal) ))))) ;) })) (return_statement "return;" return ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE (pointer_declarator * IDENT)) ))) (compound_statement { (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (while_statement while (parenthesized_expression ( BOOL )) (compound_statement { (expression_statement (assignment_expression IDENT = (pointer_expression * IDENT)) ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT == LIT) )) && (parenthesized_expression ( (binary_expression IDENT == LIT) ))) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( LIT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT == LIT) )) && (parenthesized_expression ( (parenthesized_expression ( (binary_expression (parenthesized_expression ( (comma_expression (assignment_expression IDENT = (call_expression IDENT (argument_list ( LIT )))) , (binary_expression (binary_expression IDENT == LIT) && (parenthesized_expression ( (comma_expression (assignment_expression IDENT = (call_expression IDENT (argument_list ( )))) , (binary_expression IDENT < LIT)) )))) )) && (parenthesized_expression ( (binary_expression (subscript_expression IDENT [ LIT ]) == LIT) ))) )) ))) )) && (parenthesized_expression ( (parenthesized_expression ( (comma_expression (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (subscript_expression IDENT [ LIT ]))) , (binary_expression (binary_expression (subscript_expression IDENT [ LIT ]) == LIT) && (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression (subscript_expression IDENT [ LIT ]) & LIT) )) == LIT) )))) )) ))) )) (compound_statement { (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = (binary_expression (subscript_expression IDENT [ LIT ]) | LIT)) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = (binary_expression (pointer_expression * IDENT) | LIT)) ;) (return_statement return ;) })) (expression_statement (assignment_expression IDENT = (pointer_expression * IDENT)) ;) })) (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (return_statement return ;) })) (if_statement if (parenthesized_expression ( (binary_expression LIT < (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (subscript_expression IDENT [ LIT ]) + LIT) )))) - LIT)) )) (break_statement break ;)) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression (subscript_expression IDENT [ LIT ]) + LIT) ))))) ;) })) (return_statement return ;) })))
(function_definition "void optimize_subshell_command(int *param_1)\n\n{\n  uint *puVar1;\n  int iVar2;\n  \n  while( true ) {\n    iVar2 = *param_1;\n    if ((running_trap == 0) && (iVar2 == 4)) {\n      iVar2 = signal_is_trapped(0);\n      if (((iVar2 == 0) &&\n          (((iVar2 = signal_is_trapped(0x42), iVar2 == 0 &&\n            (iVar2 = any_signals_trapped(), iVar2 < 0)) && (param_1[3] == 0)))) &&\n         ((puVar1 = (uint *)param_1[4], puVar1[3] == 0 && ((param_1[1] & 0x84U) == 0)))) {\n        param_1[1] = param_1[1] | 0x40;\n        *puVar1 = *puVar1 | 0x40;\n        return;\n      }\n      iVar2 = *param_1;\n    }\n    if (iVar2 != 6) {\n      return;\n    }\n    if (1 < *(int *)(param_1[4] + 0xc) - 0x120U) break;\n    param_1 = *(int **)(param_1[4] + 8);\n  }\n  return;\n}" (primitive_type "void") (function_declarator "optimize_subshell_command(int *param_1)" (identifier "optimize_subshell_command") (parameter_list "(int *param_1)" (( "(") (parameter_declaration "int *param_1" (primitive_type "int") (pointer_declarator "*param_1" (* "*") (identifier "param_1"))) () ")"))) (compound_statement "{\n  uint *puVar1;\n  int iVar2;\n  \n  while( true ) {\n    iVar2 = *param_1;\n    if ((running_trap == 0) && (iVar2 == 4)) {\n      iVar2 = signal_is_trapped(0);\n      if (((iVar2 == 0) &&\n          (((iVar2 = signal_is_trapped(0x42), iVar2 == 0 &&\n            (iVar2 = any_signals_trapped(), iVar2 < 0)) && (param_1[3] == 0)))) &&\n         ((puVar1 = (uint *)param_1[4], puVar1[3] == 0 && ((param_1[1] & 0x84U) == 0)))) {\n        param_1[1] = param_1[1] | 0x40;\n        *puVar1 = *puVar1 | 0x40;\n        return;\n      }\n      iVar2 = *param_1;\n    }\n    if (iVar2 != 6) {\n      return;\n    }\n    if (1 < *(int *)(param_1[4] + 0xc) - 0x120U) break;\n    param_1 = *(int **)(param_1[4] + 8);\n  }\n  return;\n}" ({ "{") (declaration "uint *puVar1;" (type_identifier "uint") (pointer_declarator "*puVar1" (* "*") (identifier "puVar1")) (; ";")) (declaration "int iVar2;" (primitive_type "int") (identifier "iVar2") (; ";")) (while_statement "while( true ) {\n    iVar2 = *param_1;\n    if ((running_trap == 0) && (iVar2 == 4)) {\n      iVar2 = signal_is_trapped(0);\n      if (((iVar2 == 0) &&\n          (((iVar2 = signal_is_trapped(0x42), iVar2 == 0 &&\n            (iVar2 = any_signals_trapped(), iVar2 < 0)) && (param_1[3] == 0)))) &&\n         ((puVar1 = (uint *)param_1[4], puVar1[3] == 0 && ((param_1[1] & 0x84U) == 0)))) {\n        param_1[1] = param_1[1] | 0x40;\n        *puVar1 = *puVar1 | 0x40;\n        return;\n      }\n      iVar2 = *param_1;\n    }\n    if (iVar2 != 6) {\n      return;\n    }\n    if (1 < *(int *)(param_1[4] + 0xc) - 0x120U) break;\n    param_1 = *(int **)(param_1[4] + 8);\n  }" (while "while") (parenthesized_expression "( true )" (( "(") (true "true") () ")")) (compound_statement "{\n    iVar2 = *param_1;\n    if ((running_trap == 0) && (iVar2 == 4)) {\n      iVar2 = signal_is_trapped(0);\n      if (((iVar2 == 0) &&\n          (((iVar2 = signal_is_trapped(0x42), iVar2 == 0 &&\n            (iVar2 = any_signals_trapped(), iVar2 < 0)) && (param_1[3] == 0)))) &&\n         ((puVar1 = (uint *)param_1[4], puVar1[3] == 0 && ((param_1[1] & 0x84U) == 0)))) {\n        param_1[1] = param_1[1] | 0x40;\n        *puVar1 = *puVar1 | 0x40;\n        return;\n      }\n      iVar2 = *param_1;\n    }\n    if (iVar2 != 6) {\n      return;\n    }\n    if (1 < *(int *)(param_1[4] + 0xc) - 0x120U) break;\n    param_1 = *(int **)(param_1[4] + 8);\n  }" ({ "{") (expression_statement "iVar2 = *param_1;" (assignment_expression "iVar2 = *param_1" (identifier "iVar2") (= "=") (pointer_expression "*param_1" (* "*") (identifier "param_1"))) (; ";")) (if_statement "if ((running_trap == 0) && (iVar2 == 4)) {\n      iVar2 = signal_is_trapped(0);\n      if (((iVar2 == 0) &&\n          (((iVar2 = signal_is_trapped(0x42), iVar2 == 0 &&\n            (iVar2 = any_signals_trapped(), iVar2 < 0)) && (param_1[3] == 0)))) &&\n         ((puVar1 = (uint *)param_1[4], puVar1[3] == 0 && ((param_1[1] & 0x84U) == 0)))) {\n        param_1[1] = param_1[1] | 0x40;\n        *puVar1 = *puVar1 | 0x40;\n        return;\n      }\n      iVar2 = *param_1;\n    }" (if "if") (parenthesized_expression "((running_trap == 0) && (iVar2 == 4))" (( "(") (binary_expression "(running_trap == 0) && (iVar2 == 4)" (parenthesized_expression "(running_trap == 0)" (( "(") (binary_expression "running_trap == 0" (identifier "running_trap") (== "==") (number_literal "0")) () ")")) (&& "&&") (parenthesized_expression "(iVar2 == 4)" (( "(") (binary_expression "iVar2 == 4" (identifier "iVar2") (== "==") (number_literal "4")) () ")"))) () ")")) (compound_statement "{\n      iVar2 = signal_is_trapped(0);\n      if (((iVar2 == 0) &&\n          (((iVar2 = signal_is_trapped(0x42), iVar2 == 0 &&\n            (iVar2 = any_signals_trapped(), iVar2 < 0)) && (param_1[3] == 0)))) &&\n         ((puVar1 = (uint *)param_1[4], puVar1[3] == 0 && ((param_1[1] & 0x84U) == 0)))) {\n        param_1[1] = param_1[1] | 0x40;\n        *puVar1 = *puVar1 | 0x40;\n        return;\n      }\n      iVar2 = *param_1;\n    }" ({ "{") (expression_statement "iVar2 = signal_is_trapped(0);" (assignment_expression "iVar2 = signal_is_trapped(0)" (identifier "iVar2") (= "=") (call_expression "signal_is_trapped(0)" (identifier "signal_is_trapped") (argument_list "(0)" (( "(") (number_literal "0") () ")")))) (; ";")) (if_statement "if (((iVar2 == 0) &&\n          (((iVar2 = signal_is_trapped(0x42), iVar2 == 0 &&\n            (iVar2 = any_signals_trapped(), iVar2 < 0)) && (param_1[3] == 0)))) &&\n         ((puVar1 = (uint *)param_1[4], puVar1[3] == 0 && ((param_1[1] & 0x84U) == 0)))) {\n        param_1[1] = param_1[1] | 0x40;\n        *puVar1 = *puVar1 | 0x40;\n        return;\n      }" (if "if") (parenthesized_expression "(((iVar2 == 0) &&\n          (((iVar2 = signal_is_trapped(0x42), iVar2 == 0 &&\n            (iVar2 = any_signals_trapped(), iVar2 < 0)) && (param_1[3] == 0)))) &&\n         ((puVar1 = (uint *)param_1[4], puVar1[3] == 0 && ((param_1[1] & 0x84U) == 0))))" (( "(") (binary_expression "((iVar2 == 0) &&\n          (((iVar2 = signal_is_trapped(0x42), iVar2 == 0 &&\n            (iVar2 = any_signals_trapped(), iVar2 < 0)) && (param_1[3] == 0)))) &&\n         ((puVar1 = (uint *)param_1[4], puVar1[3] == 0 && ((param_1[1] & 0x84U) == 0)))" (parenthesized_expression "((iVar2 == 0) &&\n          (((iVar2 = signal_is_trapped(0x42), iVar2 == 0 &&\n            (iVar2 = any_signals_trapped(), iVar2 < 0)) && (param_1[3] == 0))))" (( "(") (binary_expression "(iVar2 == 0) &&\n          (((iVar2 = signal_is_trapped(0x42), iVar2 == 0 &&\n            (iVar2 = any_signals_trapped(), iVar2 < 0)) && (param_1[3] == 0)))" (parenthesized_expression "(iVar2 == 0)" (( "(") (binary_expression "iVar2 == 0" (identifier "iVar2") (== "==") (number_literal "0")) () ")")) (&& "&&") (parenthesized_expression "(((iVar2 = signal_is_trapped(0x42), iVar2 == 0 &&\n            (iVar2 = any_signals_trapped(), iVar2 < 0)) && (param_1[3] == 0)))" (( "(") (parenthesized_expression "((iVar2 = signal_is_trapped(0x42), iVar2 == 0 &&\n            (iVar2 = any_signals_trapped(), iVar2 < 0)) && (param_1[3] == 0))" (( "(") (binary_expression "(iVar2 = signal_is_trapped(0x42), iVar2 == 0 &&\n            (iVar2 = any_signals_trapped(), iVar2 < 0)) && (param_1[3] == 0)" (parenthesized_expression "(iVar2 = signal_is_trapped(0x42), iVar2 == 0 &&\n            (iVar2 = any_signals_trapped(), iVar2 < 0))" (( "(") (comma_expression "iVar2 = signal_is_trapped(0x42), iVar2 == 0 &&\n            (iVar2 = any_signals_trapped(), iVar2 < 0)" (assignment_expression "iVar2 = signal_is_trapped(0x42)" (identifier "iVar2") (= "=") (call_expression "signal_is_trapped(0x42)" (identifier "signal_is_trapped") (argument_list "(0x42)" (( "(") (number_literal "0x42") () ")")))) (, ",") (binary_expression "iVar2 == 0 &&\n            (iVar2 = any_signals_trapped(), iVar2 < 0)" (binary_expression "iVar2 == 0" (identifier "iVar2") (== "==") (number_literal "0")) (&& "&&") (parenthesized_expression "(iVar2 = any_signals_trapped(), iVar2 < 0)" (( "(") (comma_expression "iVar2 = any_signals_trapped(), iVar2 < 0" (assignment_expression "iVar2 = any_signals_trapped()" (identifier "iVar2") (= "=") (call_expression "any_signals_trapped()" (identifier "any_signals_trapped") (argument_list "()" (( "(") () ")")))) (, ",") (binary_expression "iVar2 < 0" (identifier "iVar2") (< "<") (number_literal "0"))) () ")")))) () ")")) (&& "&&") (parenthesized_expression "(param_1[3] == 0)" (( "(") (binary_expression "param_1[3] == 0" (subscript_expression "param_1[3]" (identifier "param_1") ([ "[") (number_literal "3") (] "]")) (== "==") (number_literal "0")) () ")"))) () ")")) () ")"))) () ")")) (&& "&&") (parenthesized_expression "((puVar1 = (uint *)param_1[4], puVar1[3] == 0 && ((param_1[1] & 0x84U) == 0)))" (( "(") (parenthesized_expression "(puVar1 = (uint *)param_1[4], puVar1[3] == 0 && ((param_1[1] & 0x84U) == 0))" (( "(") (comma_expression "puVar1 = (uint *)param_1[4], puVar1[3] == 0 && ((param_1[1] & 0x84U) == 0)" (assignment_expression "puVar1 = (uint *)param_1[4]" (identifier "puVar1") (= "=") (cast_expression "(uint *)param_1[4]" (( "(") (type_descriptor "uint *" (type_identifier "uint") (abstract_pointer_declarator "*" (* "*"))) () ")") (subscript_expression "param_1[4]" (identifier "param_1") ([ "[") (number_literal "4") (] "]")))) (, ",") (binary_expression "puVar1[3] == 0 && ((param_1[1] & 0x84U) == 0)" (binary_expression "puVar1[3] == 0" (subscript_expression "puVar1[3]" (identifier "puVar1") ([ "[") (number_literal "3") (] "]")) (== "==") (number_literal "0")) (&& "&&") (parenthesized_expression "((param_1[1] & 0x84U) == 0)" (( "(") (binary_expression "(param_1[1] & 0x84U) == 0" (parenthesized_expression "(param_1[1] & 0x84U)" (( "(") (binary_expression "param_1[1] & 0x84U" (subscript_expression "param_1[1]" (identifier "param_1") ([ "[") (number_literal "1") (] "]")) (& "&") (number_literal "0x84U")) () ")")) (== "==") (number_literal "0")) () ")")))) () ")")) () ")"))) () ")")) (compound_statement "{\n        param_1[1] = param_1[1] | 0x40;\n        *puVar1 = *puVar1 | 0x40;\n        return;\n      }" ({ "{") (expression_statement "param_1[1] = param_1[1] | 0x40;" (assignment_expression "param_1[1] = param_1[1] | 0x40" (subscript_expression "param_1[1]" (identifier "param_1") ([ "[") (number_literal "1") (] "]")) (= "=") (binary_expression "param_1[1] | 0x40" (subscript_expression "param_1[1]" (identifier "param_1") ([ "[") (number_literal "1") (] "]")) (| "|") (number_literal "0x40"))) (; ";")) (expression_statement "*puVar1 = *puVar1 | 0x40;" (assignment_expression "*puVar1 = *puVar1 | 0x40" (pointer_expression "*puVar1" (* "*") (identifier "puVar1")) (= "=") (binary_expression "*puVar1 | 0x40" (pointer_expression "*puVar1" (* "*") (identifier "puVar1")) (| "|") (number_literal "0x40"))) (; ";")) (return_statement "return;" (return "return") (; ";")) (} "}"))) (expression_statement "iVar2 = *param_1;" (assignment_expression "iVar2 = *param_1" (identifier "iVar2") (= "=") (pointer_expression "*param_1" (* "*") (identifier "param_1"))) (; ";")) (} "}"))) (if_statement "if (iVar2 != 6) {\n      return;\n    }" (if "if") (parenthesized_expression "(iVar2 != 6)" (( "(") (binary_expression "iVar2 != 6" (identifier "iVar2") (!= "!=") (number_literal "6")) () ")")) (compound_statement "{\n      return;\n    }" ({ "{") (return_statement "return;" (return "return") (; ";")) (} "}"))) (if_statement "if (1 < *(int *)(param_1[4] + 0xc) - 0x120U) break;" (if "if") (parenthesized_expression "(1 < *(int *)(param_1[4] + 0xc) - 0x120U)" (( "(") (binary_expression "1 < *(int *)(param_1[4] + 0xc) - 0x120U" (number_literal "1") (< "<") (binary_expression "*(int *)(param_1[4] + 0xc) - 0x120U" (pointer_expression "*(int *)(param_1[4] + 0xc)" (* "*") (cast_expression "(int *)(param_1[4] + 0xc)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1[4] + 0xc)" (( "(") (binary_expression "param_1[4] + 0xc" (subscript_expression "param_1[4]" (identifier "param_1") ([ "[") (number_literal "4") (] "]")) (+ "+") (number_literal "0xc")) () ")")))) (- "-") (number_literal "0x120U"))) () ")")) (break_statement "break;" (break "break") (; ";"))) (expression_statement "param_1 = *(int **)(param_1[4] + 8);" (assignment_expression "param_1 = *(int **)(param_1[4] + 8)" (identifier "param_1") (= "=") (pointer_expression "*(int **)(param_1[4] + 8)" (* "*") (cast_expression "(int **)(param_1[4] + 8)" (( "(") (type_descriptor "int **" (primitive_type "int") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(param_1[4] + 8)" (( "(") (binary_expression "param_1[4] + 8" (subscript_expression "param_1[4]" (identifier "param_1") ([ "[") (number_literal "4") (] "]")) (+ "+") (number_literal "8")) () ")"))))) (; ";")) (} "}"))) (return_statement "return;" (return "return") (; ";")) (} "}")))

/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */
/* WARNING: Unknown calling convention */

void function_1(type_1 *command)

{
  type_2 var_2;
  type_3 *pfVar2;
  int var_5;
  
  while( true ) {
    var_2 = command->type;
    if ((var_1 == 0) && (var_2 == var_3)) {
      var_5 = var_4(0);
      if (((var_5 == 0) &&
          (((var_5 = var_4(0x42), var_5 == 0 &&
            (var_5 = var_6(), var_5 < 0)) && (command->redirects == (type_4 *)0x0)))
          ) && ((pfVar2 = (command->value).For, pfVar2->map_list == (type_5 *)0x0 &&
                ((command->flags & 0x84U) == 0)))) {
        command->flags = command->flags | 0x40;
        pfVar2->flags = pfVar2->flags | 0x40;
        return;
      }
      var_2 = command->type;
    }
    if (var_2 != var_7) {
      return;
    }
    if (1 < ((command->value).Connection)->connector - 0x120U) break;
    command = ((command->value).Connection)->second;
  }
  return;
}


(translation_unit (function_definition type: (primitive_type) declarator: (function_declarator declarator: (identifier) parameters: (parameter_list (parameter_declaration type: (primitive_type) declarator: (pointer_declarator declarator: (identifier))))) body: (compound_statement (declaration type: (type_identifier) declarator: (pointer_declarator declarator: (identifier))) (declaration type: (primitive_type) declarator: (identifier)) (while_statement condition: (parenthesized_expression (true)) body: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (pointer_expression argument: (identifier)))) (if_statement condition: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) right: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (number_literal))))) (if_statement condition: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) right: (parenthesized_expression (parenthesized_expression (binary_expression left: (parenthesized_expression (comma_expression left: (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (number_literal)))) right: (binary_expression left: (binary_expression left: (identifier) right: (number_literal)) right: (parenthesized_expression (comma_expression left: (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list))) right: (binary_expression left: (identifier) right: (number_literal))))))) right: (parenthesized_expression (binary_expression left: (subscript_expression argument: (identifier) index: (number_literal)) right: (number_literal)))))))) right: (parenthesized_expression (parenthesized_expression (comma_expression left: (assignment_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (subscript_expression argument: (identifier) index: (number_literal)))) right: (binary_expression left: (binary_expression left: (subscript_expression argument: (identifier) index: (number_literal)) right: (number_literal)) right: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_expression left: (subscript_expression argument: (identifier) index: (number_literal)) right: (number_literal))) right: (number_literal))))))))) consequence: (compound_statement (expression_statement (assignment_expression left: (subscript_expression argument: (identifier) index: (number_literal)) right: (binary_expression left: (subscript_expression argument: (identifier) index: (number_literal)) right: (number_literal)))) (expression_statement (assignment_expression left: (pointer_expression argument: (identifier)) right: (binary_expression left: (pointer_expression argument: (identifier)) right: (number_literal)))) (return_statement))) (expression_statement (assignment_expression left: (identifier) right: (pointer_expression argument: (identifier)))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (return_statement))) (if_statement condition: (parenthesized_expression (binary_expression left: (number_literal) right: (binary_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (subscript_expression argument: (identifier) index: (number_literal)) right: (number_literal))))) right: (number_literal)))) consequence: (break_statement)) (expression_statement (assignment_expression left: (identifier) right: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator declarator: (abstract_pointer_declarator))) value: (parenthesized_expression (binary_expression left: (subscript_expression argument: (identifier) index: (number_literal)) right: (number_literal))))))))) (return_statement))))

/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */

void MASKED(int *param_1)

{
  uint *puVar1;
  int iVar2;
  
  while( true ) {
    iVar2 = *param_1;
    if ((running_trap == 0) && (iVar2 == 4)) {
      iVar2 = signal_is_trapped(0);
      if (((iVar2 == 0) &&
          (((iVar2 = signal_is_trapped(0x42), iVar2 == 0 &&
            (iVar2 = any_signals_trapped(), iVar2 < 0)) && (param_1[3] == 0)))) &&
         ((puVar1 = (uint *)param_1[4], puVar1[3] == 0 && ((param_1[1] & 0x84U) == 0)))) {
        param_1[1] = param_1[1] | 0x40;
        *puVar1 = *puVar1 | 0x40;
        return;
      }
      iVar2 = *param_1;
    }
    if (iVar2 != 6) {
      return;
    }
    if (1 < *(int *)(param_1[4] + 0xc) - 0x120U) break;
    param_1 = *(int **)(param_1[4] + 8);
  }
  return;
}

