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

char * which_set_flags(void)

{
  char *pcVar1;
  char *pcVar2;
  undefined4 *puVar3;
  char cVar4;
  int iVar5;
  
  pcVar1 = (char *)xmalloc(want_pending_command + read_from_stdin + 0x18);
  cVar4 = 'a';
  iVar5 = 0;
  pcVar2 = pcVar1;
  puVar3 = (undefined4 *)(shell_flags + 4);
  do {
    while (*(int *)*puVar3 == 0) {
      cVar4 = *(char *)(puVar3 + 1);
      puVar3 = puVar3 + 2;
      if (cVar4 == '\0') goto LAB_00067520;
    }
    *pcVar2 = cVar4;
    iVar5 = iVar5 + 1;
    cVar4 = *(char *)(puVar3 + 1);
    pcVar2 = pcVar1 + iVar5;
    puVar3 = puVar3 + 2;
  } while (cVar4 != '\0');
LAB_00067520:
  if (want_pending_command != 0) {
    *pcVar2 = 'c';
    iVar5 = iVar5 + 1;
    pcVar2 = pcVar1 + iVar5;
  }
  if (read_from_stdin != 0) {
    *pcVar2 = 's';
    pcVar2 = pcVar1 + iVar5 + 1;
  }
  *pcVar2 = '\0';
  return pcVar1;
}



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

void which_set_flags(void)

{
  char *pcVar1;
  char *pcVar2;
  undefined4 *puVar3;
  char cVar4;
  int iVar5;
  
  pcVar1 = (char *)xmalloc(want_pending_command + read_from_stdin + 0x18);
  cVar4 = 'a';
  iVar5 = 0;
  pcVar2 = pcVar1;
  puVar3 = (undefined4 *)(shell_flags + 4);
  do {
    while (*(int *)*puVar3 == 0) {
      cVar4 = *(char *)(puVar3 + 1);
      puVar3 = puVar3 + 2;
      if (cVar4 == '\0') goto LAB_00067520;
    }
    *pcVar2 = cVar4;
    iVar5 = iVar5 + 1;
    cVar4 = *(char *)(puVar3 + 1);
    pcVar2 = pcVar1 + iVar5;
    puVar3 = puVar3 + 2;
  } while (cVar4 != '\0');
LAB_00067520:
  if (want_pending_command != 0) {
    *pcVar2 = 'c';
    iVar5 = iVar5 + 1;
    pcVar2 = pcVar1 + iVar5;
  }
  if (read_from_stdin != 0) {
    *pcVar2 = 's';
    pcVar2 = pcVar1 + iVar5 + 1;
  }
  *pcVar2 = '\0';
  return;
}


PUSH EBP
PUSH EDI
PUSH ESI
PUSH EBX
CALL 0x000312b0
ADD EBX,0x10ab47
SUB ESP,0x28
LEA EAX,[EBX + 0x8c38]
MOV dword ptr [ESP + 0x18],EAX
MOV ESI,EAX
LEA EAX,[EBX + 0x8c20]
MOV dword ptr [ESP + 0x14],EAX
MOV EAX,dword ptr [EAX]
ADD EAX,dword ptr [ESI]
XOR ESI,ESI
ADD EAX,0x18
PUSH EAX
CALL 0x000ad700
LEA EDX,[EBX + 0xffffe824]
ADD ESP,0x10
MOV EBX,0x61
MOV ECX,EAX
LEA ESI,[ESI]
NOP
MOV EBP,dword ptr [EDX]
MOV EDI,ECX
MOV EBP,dword ptr [EBP]
TEST EBP,EBP
JZ 0x00067550
ADD EDX,0x8
MOV byte ptr [ECX],BL
ADD ESI,0x1
MOVZX EBX,byte ptr [EDX + -0x4]
LEA ECX,[EAX + ESI*0x1]
MOV EDI,ECX
TEST BL,BL
JNZ 0x00067500
MOV EDX,dword ptr [ESP + 0x8]
MOV EBX,dword ptr [EDX]
TEST EBX,EBX
JZ 0x00067533
MOV byte ptr [ECX],0x63
ADD ESI,0x1
LEA EDI,[EAX + ESI*0x1]
MOV ECX,dword ptr [ESP + 0xc]
MOV EDX,dword ptr [ECX]
TEST EDX,EDX
JZ 0x00067544
MOV byte ptr [EDI],0x73
LEA EDI,[EAX + ESI*0x1 + 0x1]
MOV byte ptr [EDI],0x0
ADD ESP,0x1c
POP EBX
POP ESI
POP EDI
POP EBP
RET
ADD EDX,0x8
MOVZX EBX,byte ptr [EDX + -0x4]
TEST BL,BL
JNZ 0x00067500
JMP 0x00067520
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nvoid which_set_flags(void)\n\n{\n  char *pcVar1;\n  char *pcVar2;\n  undefined4 *puVar3;\n  char cVar4;\n  int iVar5;\n  \n  pcVar1 = (char *)xmalloc(want_pending_command + read_from_stdin + 0x18);\n  cVar4 = 'a';\n  iVar5 = 0;\n  pcVar2 = pcVar1;\n  puVar3 = (undefined4 *)(shell_flags + 4);\n  do {\n    while (*(int *)*puVar3 == 0) {\n      cVar4 = *(char *)(puVar3 + 1);\n      puVar3 = puVar3 + 2;\n      if (cVar4 == '\0') goto LAB_00067520;\n    }\n    *pcVar2 = cVar4;\n    iVar5 = iVar5 + 1;\n    cVar4 = *(char *)(puVar3 + 1);\n    pcVar2 = pcVar1 + iVar5;\n    puVar3 = puVar3 + 2;\n  } while (cVar4 != '\0');\nLAB_00067520:\n  if (want_pending_command != 0) {\n    *pcVar2 = 'c';\n    iVar5 = iVar5 + 1;\n    pcVar2 = pcVar1 + iVar5;\n  }\n  if (read_from_stdin != 0) {\n    *pcVar2 = 's';\n    pcVar2 = pcVar1 + iVar5 + 1;\n  }\n  *pcVar2 = '\0';\n  return;\n}\n\n" comment (function_definition "void which_set_flags(void)\n\n{\n  char *pcVar1;\n  char *pcVar2;\n  undefined4 *puVar3;\n  char cVar4;\n  int iVar5;\n  \n  pcVar1 = (char *)xmalloc(want_pending_command + read_from_stdin + 0x18);\n  cVar4 = 'a';\n  iVar5 = 0;\n  pcVar2 = pcVar1;\n  puVar3 = (undefined4 *)(shell_flags + 4);\n  do {\n    while (*(int *)*puVar3 == 0) {\n      cVar4 = *(char *)(puVar3 + 1);\n      puVar3 = puVar3 + 2;\n      if (cVar4 == '\0') goto LAB_00067520;\n    }\n    *pcVar2 = cVar4;\n    iVar5 = iVar5 + 1;\n    cVar4 = *(char *)(puVar3 + 1);\n    pcVar2 = pcVar1 + iVar5;\n    puVar3 = puVar3 + 2;\n  } while (cVar4 != '\0');\nLAB_00067520:\n  if (want_pending_command != 0) {\n    *pcVar2 = 'c';\n    iVar5 = iVar5 + 1;\n    pcVar2 = pcVar1 + iVar5;\n  }\n  if (read_from_stdin != 0) {\n    *pcVar2 = 's';\n    pcVar2 = pcVar1 + iVar5 + 1;\n  }\n  *pcVar2 = '\0';\n  return;\n}" primitive_type (function_declarator "which_set_flags(void)" identifier (parameter_list "(void)" ( (parameter_declaration "void" primitive_type) ))) (compound_statement "{\n  char *pcVar1;\n  char *pcVar2;\n  undefined4 *puVar3;\n  char cVar4;\n  int iVar5;\n  \n  pcVar1 = (char *)xmalloc(want_pending_command + read_from_stdin + 0x18);\n  cVar4 = 'a';\n  iVar5 = 0;\n  pcVar2 = pcVar1;\n  puVar3 = (undefined4 *)(shell_flags + 4);\n  do {\n    while (*(int *)*puVar3 == 0) {\n      cVar4 = *(char *)(puVar3 + 1);\n      puVar3 = puVar3 + 2;\n      if (cVar4 == '\0') goto LAB_00067520;\n    }\n    *pcVar2 = cVar4;\n    iVar5 = iVar5 + 1;\n    cVar4 = *(char *)(puVar3 + 1);\n    pcVar2 = pcVar1 + iVar5;\n    puVar3 = puVar3 + 2;\n  } while (cVar4 != '\0');\nLAB_00067520:\n  if (want_pending_command != 0) {\n    *pcVar2 = 'c';\n    iVar5 = iVar5 + 1;\n    pcVar2 = pcVar1 + iVar5;\n  }\n  if (read_from_stdin != 0) {\n    *pcVar2 = 's';\n    pcVar2 = pcVar1 + iVar5 + 1;\n  }\n  *pcVar2 = '\0';\n  return;\n}" { (declaration "char *pcVar1;" primitive_type (pointer_declarator "*pcVar1" * identifier) ;) (declaration "char *pcVar2;" primitive_type (pointer_declarator "*pcVar2" * identifier) ;) (declaration "undefined4 *puVar3;" type_identifier (pointer_declarator "*puVar3" * identifier) ;) (declaration "char cVar4;" primitive_type identifier ;) (declaration "int iVar5;" primitive_type identifier ;) (expression_statement "pcVar1 = (char *)xmalloc(want_pending_command + read_from_stdin + 0x18);" (assignment_expression "pcVar1 = (char *)xmalloc(want_pending_command + read_from_stdin + 0x18)" identifier = (cast_expression "(char *)xmalloc(want_pending_command + read_from_stdin + 0x18)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "xmalloc(want_pending_command + read_from_stdin + 0x18)" identifier (argument_list "(want_pending_command + read_from_stdin + 0x18)" ( (binary_expression "want_pending_command + read_from_stdin + 0x18" (binary_expression "want_pending_command + read_from_stdin" identifier + identifier) + number_literal) ))))) ;) (expression_statement "cVar4 = 'a';" (assignment_expression "cVar4 = 'a'" identifier = (char_literal "'a'" ' character ')) ;) (expression_statement "iVar5 = 0;" (assignment_expression "iVar5 = 0" identifier = number_literal) ;) (expression_statement "pcVar2 = pcVar1;" (assignment_expression "pcVar2 = pcVar1" identifier = identifier) ;) (expression_statement "puVar3 = (undefined4 *)(shell_flags + 4);" (assignment_expression "puVar3 = (undefined4 *)(shell_flags + 4)" identifier = (cast_expression "(undefined4 *)(shell_flags + 4)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(shell_flags + 4)" ( (binary_expression "shell_flags + 4" identifier + number_literal) )))) ;) (do_statement "do {\n    while (*(int *)*puVar3 == 0) {\n      cVar4 = *(char *)(puVar3 + 1);\n      puVar3 = puVar3 + 2;\n      if (cVar4 == '\0') goto LAB_00067520;\n    }\n    *pcVar2 = cVar4;\n    iVar5 = iVar5 + 1;\n    cVar4 = *(char *)(puVar3 + 1);\n    pcVar2 = pcVar1 + iVar5;\n    puVar3 = puVar3 + 2;\n  } while (cVar4 != '\0');" do (compound_statement "{\n    while (*(int *)*puVar3 == 0) {\n      cVar4 = *(char *)(puVar3 + 1);\n      puVar3 = puVar3 + 2;\n      if (cVar4 == '\0') goto LAB_00067520;\n    }\n    *pcVar2 = cVar4;\n    iVar5 = iVar5 + 1;\n    cVar4 = *(char *)(puVar3 + 1);\n    pcVar2 = pcVar1 + iVar5;\n    puVar3 = puVar3 + 2;\n  }" { (while_statement "while (*(int *)*puVar3 == 0) {\n      cVar4 = *(char *)(puVar3 + 1);\n      puVar3 = puVar3 + 2;\n      if (cVar4 == '\0') goto LAB_00067520;\n    }" while (parenthesized_expression "(*(int *)*puVar3 == 0)" ( (binary_expression "*(int *)*puVar3 == 0" (pointer_expression "*(int *)*puVar3" * (cast_expression "(int *)*puVar3" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (pointer_expression "*puVar3" * identifier))) == number_literal) )) (compound_statement "{\n      cVar4 = *(char *)(puVar3 + 1);\n      puVar3 = puVar3 + 2;\n      if (cVar4 == '\0') goto LAB_00067520;\n    }" { (expression_statement "cVar4 = *(char *)(puVar3 + 1);" (assignment_expression "cVar4 = *(char *)(puVar3 + 1)" identifier = (pointer_expression "*(char *)(puVar3 + 1)" * (cast_expression "(char *)(puVar3 + 1)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(puVar3 + 1)" ( (binary_expression "puVar3 + 1" identifier + number_literal) ))))) ;) (expression_statement "puVar3 = puVar3 + 2;" (assignment_expression "puVar3 = puVar3 + 2" identifier = (binary_expression "puVar3 + 2" identifier + number_literal)) ;) (if_statement "if (cVar4 == '\0') goto LAB_00067520;" if (parenthesized_expression "(cVar4 == '\0')" ( (binary_expression "cVar4 == '\0'" identifier == (char_literal "'\0'" ' escape_sequence ')) )) (goto_statement "goto LAB_00067520;" goto statement_identifier ;)) })) (expression_statement "*pcVar2 = cVar4;" (assignment_expression "*pcVar2 = cVar4" (pointer_expression "*pcVar2" * identifier) = identifier) ;) (expression_statement "iVar5 = iVar5 + 1;" (assignment_expression "iVar5 = iVar5 + 1" identifier = (binary_expression "iVar5 + 1" identifier + number_literal)) ;) (expression_statement "cVar4 = *(char *)(puVar3 + 1);" (assignment_expression "cVar4 = *(char *)(puVar3 + 1)" identifier = (pointer_expression "*(char *)(puVar3 + 1)" * (cast_expression "(char *)(puVar3 + 1)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(puVar3 + 1)" ( (binary_expression "puVar3 + 1" identifier + number_literal) ))))) ;) (expression_statement "pcVar2 = pcVar1 + iVar5;" (assignment_expression "pcVar2 = pcVar1 + iVar5" identifier = (binary_expression "pcVar1 + iVar5" identifier + identifier)) ;) (expression_statement "puVar3 = puVar3 + 2;" (assignment_expression "puVar3 = puVar3 + 2" identifier = (binary_expression "puVar3 + 2" identifier + number_literal)) ;) }) while (parenthesized_expression "(cVar4 != '\0')" ( (binary_expression "cVar4 != '\0'" identifier != (char_literal "'\0'" ' escape_sequence ')) )) ;) (labeled_statement "LAB_00067520:\n  if (want_pending_command != 0) {\n    *pcVar2 = 'c';\n    iVar5 = iVar5 + 1;\n    pcVar2 = pcVar1 + iVar5;\n  }" statement_identifier : (if_statement "if (want_pending_command != 0) {\n    *pcVar2 = 'c';\n    iVar5 = iVar5 + 1;\n    pcVar2 = pcVar1 + iVar5;\n  }" if (parenthesized_expression "(want_pending_command != 0)" ( (binary_expression "want_pending_command != 0" identifier != number_literal) )) (compound_statement "{\n    *pcVar2 = 'c';\n    iVar5 = iVar5 + 1;\n    pcVar2 = pcVar1 + iVar5;\n  }" { (expression_statement "*pcVar2 = 'c';" (assignment_expression "*pcVar2 = 'c'" (pointer_expression "*pcVar2" * identifier) = (char_literal "'c'" ' character ')) ;) (expression_statement "iVar5 = iVar5 + 1;" (assignment_expression "iVar5 = iVar5 + 1" identifier = (binary_expression "iVar5 + 1" identifier + number_literal)) ;) (expression_statement "pcVar2 = pcVar1 + iVar5;" (assignment_expression "pcVar2 = pcVar1 + iVar5" identifier = (binary_expression "pcVar1 + iVar5" identifier + identifier)) ;) }))) (if_statement "if (read_from_stdin != 0) {\n    *pcVar2 = 's';\n    pcVar2 = pcVar1 + iVar5 + 1;\n  }" if (parenthesized_expression "(read_from_stdin != 0)" ( (binary_expression "read_from_stdin != 0" identifier != number_literal) )) (compound_statement "{\n    *pcVar2 = 's';\n    pcVar2 = pcVar1 + iVar5 + 1;\n  }" { (expression_statement "*pcVar2 = 's';" (assignment_expression "*pcVar2 = 's'" (pointer_expression "*pcVar2" * identifier) = (char_literal "'s'" ' character ')) ;) (expression_statement "pcVar2 = pcVar1 + iVar5 + 1;" (assignment_expression "pcVar2 = pcVar1 + iVar5 + 1" identifier = (binary_expression "pcVar1 + iVar5 + 1" (binary_expression "pcVar1 + iVar5" identifier + identifier) + number_literal)) ;) })) (expression_statement "*pcVar2 = '\0';" (assignment_expression "*pcVar2 = '\0'" (pointer_expression "*pcVar2" * identifier) = (char_literal "'\0'" ' escape_sequence ')) ;) (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\nchar * which_set_flags(void)\n\n{\n  char *pcVar1;\n  char *pcVar2;\n  undefined4 *puVar3;\n  char cVar4;\n  int iVar5;\n  \n  pcVar1 = (char *)xmalloc(want_pending_command + read_from_stdin + 0x18);\n  cVar4 = 'a';\n  iVar5 = 0;\n  pcVar2 = pcVar1;\n  puVar3 = (undefined4 *)(shell_flags + 4);\n  do {\n    while (*(int *)*puVar3 == 0) {\n      cVar4 = *(char *)(puVar3 + 1);\n      puVar3 = puVar3 + 2;\n      if (cVar4 == '\0') goto LAB_00067520;\n    }\n    *pcVar2 = cVar4;\n    iVar5 = iVar5 + 1;\n    cVar4 = *(char *)(puVar3 + 1);\n    pcVar2 = pcVar1 + iVar5;\n    puVar3 = puVar3 + 2;\n  } while (cVar4 != '\0');\nLAB_00067520:\n  if (want_pending_command != 0) {\n    *pcVar2 = 'c';\n    iVar5 = iVar5 + 1;\n    pcVar2 = pcVar1 + iVar5;\n  }\n  if (read_from_stdin != 0) {\n    *pcVar2 = 's';\n    pcVar2 = pcVar1 + iVar5 + 1;\n  }\n  *pcVar2 = '\0';\n  return pcVar1;\n}\n\n" comment comment (function_definition "char * which_set_flags(void)\n\n{\n  char *pcVar1;\n  char *pcVar2;\n  undefined4 *puVar3;\n  char cVar4;\n  int iVar5;\n  \n  pcVar1 = (char *)xmalloc(want_pending_command + read_from_stdin + 0x18);\n  cVar4 = 'a';\n  iVar5 = 0;\n  pcVar2 = pcVar1;\n  puVar3 = (undefined4 *)(shell_flags + 4);\n  do {\n    while (*(int *)*puVar3 == 0) {\n      cVar4 = *(char *)(puVar3 + 1);\n      puVar3 = puVar3 + 2;\n      if (cVar4 == '\0') goto LAB_00067520;\n    }\n    *pcVar2 = cVar4;\n    iVar5 = iVar5 + 1;\n    cVar4 = *(char *)(puVar3 + 1);\n    pcVar2 = pcVar1 + iVar5;\n    puVar3 = puVar3 + 2;\n  } while (cVar4 != '\0');\nLAB_00067520:\n  if (want_pending_command != 0) {\n    *pcVar2 = 'c';\n    iVar5 = iVar5 + 1;\n    pcVar2 = pcVar1 + iVar5;\n  }\n  if (read_from_stdin != 0) {\n    *pcVar2 = 's';\n    pcVar2 = pcVar1 + iVar5 + 1;\n  }\n  *pcVar2 = '\0';\n  return pcVar1;\n}" primitive_type (pointer_declarator "* which_set_flags(void)" * (function_declarator "which_set_flags(void)" identifier (parameter_list "(void)" ( (parameter_declaration "void" primitive_type) )))) (compound_statement "{\n  char *pcVar1;\n  char *pcVar2;\n  undefined4 *puVar3;\n  char cVar4;\n  int iVar5;\n  \n  pcVar1 = (char *)xmalloc(want_pending_command + read_from_stdin + 0x18);\n  cVar4 = 'a';\n  iVar5 = 0;\n  pcVar2 = pcVar1;\n  puVar3 = (undefined4 *)(shell_flags + 4);\n  do {\n    while (*(int *)*puVar3 == 0) {\n      cVar4 = *(char *)(puVar3 + 1);\n      puVar3 = puVar3 + 2;\n      if (cVar4 == '\0') goto LAB_00067520;\n    }\n    *pcVar2 = cVar4;\n    iVar5 = iVar5 + 1;\n    cVar4 = *(char *)(puVar3 + 1);\n    pcVar2 = pcVar1 + iVar5;\n    puVar3 = puVar3 + 2;\n  } while (cVar4 != '\0');\nLAB_00067520:\n  if (want_pending_command != 0) {\n    *pcVar2 = 'c';\n    iVar5 = iVar5 + 1;\n    pcVar2 = pcVar1 + iVar5;\n  }\n  if (read_from_stdin != 0) {\n    *pcVar2 = 's';\n    pcVar2 = pcVar1 + iVar5 + 1;\n  }\n  *pcVar2 = '\0';\n  return pcVar1;\n}" { (declaration "char *pcVar1;" primitive_type (pointer_declarator "*pcVar1" * identifier) ;) (declaration "char *pcVar2;" primitive_type (pointer_declarator "*pcVar2" * identifier) ;) (declaration "undefined4 *puVar3;" type_identifier (pointer_declarator "*puVar3" * identifier) ;) (declaration "char cVar4;" primitive_type identifier ;) (declaration "int iVar5;" primitive_type identifier ;) (expression_statement "pcVar1 = (char *)xmalloc(want_pending_command + read_from_stdin + 0x18);" (assignment_expression "pcVar1 = (char *)xmalloc(want_pending_command + read_from_stdin + 0x18)" identifier = (cast_expression "(char *)xmalloc(want_pending_command + read_from_stdin + 0x18)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "xmalloc(want_pending_command + read_from_stdin + 0x18)" identifier (argument_list "(want_pending_command + read_from_stdin + 0x18)" ( (binary_expression "want_pending_command + read_from_stdin + 0x18" (binary_expression "want_pending_command + read_from_stdin" identifier + identifier) + number_literal) ))))) ;) (expression_statement "cVar4 = 'a';" (assignment_expression "cVar4 = 'a'" identifier = (char_literal "'a'" ' character ')) ;) (expression_statement "iVar5 = 0;" (assignment_expression "iVar5 = 0" identifier = number_literal) ;) (expression_statement "pcVar2 = pcVar1;" (assignment_expression "pcVar2 = pcVar1" identifier = identifier) ;) (expression_statement "puVar3 = (undefined4 *)(shell_flags + 4);" (assignment_expression "puVar3 = (undefined4 *)(shell_flags + 4)" identifier = (cast_expression "(undefined4 *)(shell_flags + 4)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(shell_flags + 4)" ( (binary_expression "shell_flags + 4" identifier + number_literal) )))) ;) (do_statement "do {\n    while (*(int *)*puVar3 == 0) {\n      cVar4 = *(char *)(puVar3 + 1);\n      puVar3 = puVar3 + 2;\n      if (cVar4 == '\0') goto LAB_00067520;\n    }\n    *pcVar2 = cVar4;\n    iVar5 = iVar5 + 1;\n    cVar4 = *(char *)(puVar3 + 1);\n    pcVar2 = pcVar1 + iVar5;\n    puVar3 = puVar3 + 2;\n  } while (cVar4 != '\0');" do (compound_statement "{\n    while (*(int *)*puVar3 == 0) {\n      cVar4 = *(char *)(puVar3 + 1);\n      puVar3 = puVar3 + 2;\n      if (cVar4 == '\0') goto LAB_00067520;\n    }\n    *pcVar2 = cVar4;\n    iVar5 = iVar5 + 1;\n    cVar4 = *(char *)(puVar3 + 1);\n    pcVar2 = pcVar1 + iVar5;\n    puVar3 = puVar3 + 2;\n  }" { (while_statement "while (*(int *)*puVar3 == 0) {\n      cVar4 = *(char *)(puVar3 + 1);\n      puVar3 = puVar3 + 2;\n      if (cVar4 == '\0') goto LAB_00067520;\n    }" while (parenthesized_expression "(*(int *)*puVar3 == 0)" ( (binary_expression "*(int *)*puVar3 == 0" (pointer_expression "*(int *)*puVar3" * (cast_expression "(int *)*puVar3" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (pointer_expression "*puVar3" * identifier))) == number_literal) )) (compound_statement "{\n      cVar4 = *(char *)(puVar3 + 1);\n      puVar3 = puVar3 + 2;\n      if (cVar4 == '\0') goto LAB_00067520;\n    }" { (expression_statement "cVar4 = *(char *)(puVar3 + 1);" (assignment_expression "cVar4 = *(char *)(puVar3 + 1)" identifier = (pointer_expression "*(char *)(puVar3 + 1)" * (cast_expression "(char *)(puVar3 + 1)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(puVar3 + 1)" ( (binary_expression "puVar3 + 1" identifier + number_literal) ))))) ;) (expression_statement "puVar3 = puVar3 + 2;" (assignment_expression "puVar3 = puVar3 + 2" identifier = (binary_expression "puVar3 + 2" identifier + number_literal)) ;) (if_statement "if (cVar4 == '\0') goto LAB_00067520;" if (parenthesized_expression "(cVar4 == '\0')" ( (binary_expression "cVar4 == '\0'" identifier == (char_literal "'\0'" ' escape_sequence ')) )) (goto_statement "goto LAB_00067520;" goto statement_identifier ;)) })) (expression_statement "*pcVar2 = cVar4;" (assignment_expression "*pcVar2 = cVar4" (pointer_expression "*pcVar2" * identifier) = identifier) ;) (expression_statement "iVar5 = iVar5 + 1;" (assignment_expression "iVar5 = iVar5 + 1" identifier = (binary_expression "iVar5 + 1" identifier + number_literal)) ;) (expression_statement "cVar4 = *(char *)(puVar3 + 1);" (assignment_expression "cVar4 = *(char *)(puVar3 + 1)" identifier = (pointer_expression "*(char *)(puVar3 + 1)" * (cast_expression "(char *)(puVar3 + 1)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(puVar3 + 1)" ( (binary_expression "puVar3 + 1" identifier + number_literal) ))))) ;) (expression_statement "pcVar2 = pcVar1 + iVar5;" (assignment_expression "pcVar2 = pcVar1 + iVar5" identifier = (binary_expression "pcVar1 + iVar5" identifier + identifier)) ;) (expression_statement "puVar3 = puVar3 + 2;" (assignment_expression "puVar3 = puVar3 + 2" identifier = (binary_expression "puVar3 + 2" identifier + number_literal)) ;) }) while (parenthesized_expression "(cVar4 != '\0')" ( (binary_expression "cVar4 != '\0'" identifier != (char_literal "'\0'" ' escape_sequence ')) )) ;) (labeled_statement "LAB_00067520:\n  if (want_pending_command != 0) {\n    *pcVar2 = 'c';\n    iVar5 = iVar5 + 1;\n    pcVar2 = pcVar1 + iVar5;\n  }" statement_identifier : (if_statement "if (want_pending_command != 0) {\n    *pcVar2 = 'c';\n    iVar5 = iVar5 + 1;\n    pcVar2 = pcVar1 + iVar5;\n  }" if (parenthesized_expression "(want_pending_command != 0)" ( (binary_expression "want_pending_command != 0" identifier != number_literal) )) (compound_statement "{\n    *pcVar2 = 'c';\n    iVar5 = iVar5 + 1;\n    pcVar2 = pcVar1 + iVar5;\n  }" { (expression_statement "*pcVar2 = 'c';" (assignment_expression "*pcVar2 = 'c'" (pointer_expression "*pcVar2" * identifier) = (char_literal "'c'" ' character ')) ;) (expression_statement "iVar5 = iVar5 + 1;" (assignment_expression "iVar5 = iVar5 + 1" identifier = (binary_expression "iVar5 + 1" identifier + number_literal)) ;) (expression_statement "pcVar2 = pcVar1 + iVar5;" (assignment_expression "pcVar2 = pcVar1 + iVar5" identifier = (binary_expression "pcVar1 + iVar5" identifier + identifier)) ;) }))) (if_statement "if (read_from_stdin != 0) {\n    *pcVar2 = 's';\n    pcVar2 = pcVar1 + iVar5 + 1;\n  }" if (parenthesized_expression "(read_from_stdin != 0)" ( (binary_expression "read_from_stdin != 0" identifier != number_literal) )) (compound_statement "{\n    *pcVar2 = 's';\n    pcVar2 = pcVar1 + iVar5 + 1;\n  }" { (expression_statement "*pcVar2 = 's';" (assignment_expression "*pcVar2 = 's'" (pointer_expression "*pcVar2" * identifier) = (char_literal "'s'" ' character ')) ;) (expression_statement "pcVar2 = pcVar1 + iVar5 + 1;" (assignment_expression "pcVar2 = pcVar1 + iVar5 + 1" identifier = (binary_expression "pcVar1 + iVar5 + 1" (binary_expression "pcVar1 + iVar5" identifier + identifier) + number_literal)) ;) })) (expression_statement "*pcVar2 = '\0';" (assignment_expression "*pcVar2 = '\0'" (pointer_expression "*pcVar2" * identifier) = (char_literal "'\0'" ' escape_sequence ')) ;) (return_statement "return pcVar1;" return identifier ;) })))
(translation_unit "void which_set_flags(void)\n\n{\n  char *pcVar1;\n  char *pcVar2;\n  undefined4 *puVar3;\n  char cVar4;\n  int iVar5;\n  \n  pcVar1 = (char *)xmalloc(want_pending_command + read_from_stdin + 0x18);\n  cVar4 = 'a';\n  iVar5 = 0;\n  pcVar2 = pcVar1;\n  puVar3 = (undefined4 *)(shell_flags + 4);\n  do {\n    while (*(int *)*puVar3 == 0) {\n      cVar4 = *(char *)(puVar3 + 1);\n      puVar3 = puVar3 + 2;\n      if (cVar4 == '\0') goto LAB_00067520;\n    }\n    *pcVar2 = cVar4;\n    iVar5 = iVar5 + 1;\n    cVar4 = *(char *)(puVar3 + 1);\n    pcVar2 = pcVar1 + iVar5;\n    puVar3 = puVar3 + 2;\n  } while (cVar4 != '\0');\nLAB_00067520:\n  if (want_pending_command != 0) {\n    *pcVar2 = 'c';\n    iVar5 = iVar5 + 1;\n    pcVar2 = pcVar1 + iVar5;\n  }\n  if (read_from_stdin != 0) {\n    *pcVar2 = 's';\n    pcVar2 = pcVar1 + iVar5 + 1;\n  }\n  *pcVar2 = '\0';\n  return;\n}\n\n" (function_definition "void which_set_flags(void)\n\n{\n  char *pcVar1;\n  char *pcVar2;\n  undefined4 *puVar3;\n  char cVar4;\n  int iVar5;\n  \n  pcVar1 = (char *)xmalloc(want_pending_command + read_from_stdin + 0x18);\n  cVar4 = 'a';\n  iVar5 = 0;\n  pcVar2 = pcVar1;\n  puVar3 = (undefined4 *)(shell_flags + 4);\n  do {\n    while (*(int *)*puVar3 == 0) {\n      cVar4 = *(char *)(puVar3 + 1);\n      puVar3 = puVar3 + 2;\n      if (cVar4 == '\0') goto LAB_00067520;\n    }\n    *pcVar2 = cVar4;\n    iVar5 = iVar5 + 1;\n    cVar4 = *(char *)(puVar3 + 1);\n    pcVar2 = pcVar1 + iVar5;\n    puVar3 = puVar3 + 2;\n  } while (cVar4 != '\0');\nLAB_00067520:\n  if (want_pending_command != 0) {\n    *pcVar2 = 'c';\n    iVar5 = iVar5 + 1;\n    pcVar2 = pcVar1 + iVar5;\n  }\n  if (read_from_stdin != 0) {\n    *pcVar2 = 's';\n    pcVar2 = pcVar1 + iVar5 + 1;\n  }\n  *pcVar2 = '\0';\n  return;\n}" primitive_type (function_declarator "which_set_flags(void)" identifier (parameter_list "(void)" ( (parameter_declaration "void" primitive_type) ))) (compound_statement "{\n  char *pcVar1;\n  char *pcVar2;\n  undefined4 *puVar3;\n  char cVar4;\n  int iVar5;\n  \n  pcVar1 = (char *)xmalloc(want_pending_command + read_from_stdin + 0x18);\n  cVar4 = 'a';\n  iVar5 = 0;\n  pcVar2 = pcVar1;\n  puVar3 = (undefined4 *)(shell_flags + 4);\n  do {\n    while (*(int *)*puVar3 == 0) {\n      cVar4 = *(char *)(puVar3 + 1);\n      puVar3 = puVar3 + 2;\n      if (cVar4 == '\0') goto LAB_00067520;\n    }\n    *pcVar2 = cVar4;\n    iVar5 = iVar5 + 1;\n    cVar4 = *(char *)(puVar3 + 1);\n    pcVar2 = pcVar1 + iVar5;\n    puVar3 = puVar3 + 2;\n  } while (cVar4 != '\0');\nLAB_00067520:\n  if (want_pending_command != 0) {\n    *pcVar2 = 'c';\n    iVar5 = iVar5 + 1;\n    pcVar2 = pcVar1 + iVar5;\n  }\n  if (read_from_stdin != 0) {\n    *pcVar2 = 's';\n    pcVar2 = pcVar1 + iVar5 + 1;\n  }\n  *pcVar2 = '\0';\n  return;\n}" { (declaration "char *pcVar1;" primitive_type (pointer_declarator "*pcVar1" * identifier) ;) (declaration "char *pcVar2;" primitive_type (pointer_declarator "*pcVar2" * identifier) ;) (declaration "undefined4 *puVar3;" type_identifier (pointer_declarator "*puVar3" * identifier) ;) (declaration "char cVar4;" primitive_type identifier ;) (declaration "int iVar5;" primitive_type identifier ;) (expression_statement "pcVar1 = (char *)xmalloc(want_pending_command + read_from_stdin + 0x18);" (assignment_expression "pcVar1 = (char *)xmalloc(want_pending_command + read_from_stdin + 0x18)" identifier = (cast_expression "(char *)xmalloc(want_pending_command + read_from_stdin + 0x18)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "xmalloc(want_pending_command + read_from_stdin + 0x18)" identifier (argument_list "(want_pending_command + read_from_stdin + 0x18)" ( (binary_expression "want_pending_command + read_from_stdin + 0x18" (binary_expression "want_pending_command + read_from_stdin" identifier + identifier) + number_literal) ))))) ;) (expression_statement "cVar4 = 'a';" (assignment_expression "cVar4 = 'a'" identifier = (char_literal "'a'" ' character ')) ;) (expression_statement "iVar5 = 0;" (assignment_expression "iVar5 = 0" identifier = number_literal) ;) (expression_statement "pcVar2 = pcVar1;" (assignment_expression "pcVar2 = pcVar1" identifier = identifier) ;) (expression_statement "puVar3 = (undefined4 *)(shell_flags + 4);" (assignment_expression "puVar3 = (undefined4 *)(shell_flags + 4)" identifier = (cast_expression "(undefined4 *)(shell_flags + 4)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(shell_flags + 4)" ( (binary_expression "shell_flags + 4" identifier + number_literal) )))) ;) (do_statement "do {\n    while (*(int *)*puVar3 == 0) {\n      cVar4 = *(char *)(puVar3 + 1);\n      puVar3 = puVar3 + 2;\n      if (cVar4 == '\0') goto LAB_00067520;\n    }\n    *pcVar2 = cVar4;\n    iVar5 = iVar5 + 1;\n    cVar4 = *(char *)(puVar3 + 1);\n    pcVar2 = pcVar1 + iVar5;\n    puVar3 = puVar3 + 2;\n  } while (cVar4 != '\0');" do (compound_statement "{\n    while (*(int *)*puVar3 == 0) {\n      cVar4 = *(char *)(puVar3 + 1);\n      puVar3 = puVar3 + 2;\n      if (cVar4 == '\0') goto LAB_00067520;\n    }\n    *pcVar2 = cVar4;\n    iVar5 = iVar5 + 1;\n    cVar4 = *(char *)(puVar3 + 1);\n    pcVar2 = pcVar1 + iVar5;\n    puVar3 = puVar3 + 2;\n  }" { (while_statement "while (*(int *)*puVar3 == 0) {\n      cVar4 = *(char *)(puVar3 + 1);\n      puVar3 = puVar3 + 2;\n      if (cVar4 == '\0') goto LAB_00067520;\n    }" while (parenthesized_expression "(*(int *)*puVar3 == 0)" ( (binary_expression "*(int *)*puVar3 == 0" (pointer_expression "*(int *)*puVar3" * (cast_expression "(int *)*puVar3" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (pointer_expression "*puVar3" * identifier))) == number_literal) )) (compound_statement "{\n      cVar4 = *(char *)(puVar3 + 1);\n      puVar3 = puVar3 + 2;\n      if (cVar4 == '\0') goto LAB_00067520;\n    }" { (expression_statement "cVar4 = *(char *)(puVar3 + 1);" (assignment_expression "cVar4 = *(char *)(puVar3 + 1)" identifier = (pointer_expression "*(char *)(puVar3 + 1)" * (cast_expression "(char *)(puVar3 + 1)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(puVar3 + 1)" ( (binary_expression "puVar3 + 1" identifier + number_literal) ))))) ;) (expression_statement "puVar3 = puVar3 + 2;" (assignment_expression "puVar3 = puVar3 + 2" identifier = (binary_expression "puVar3 + 2" identifier + number_literal)) ;) (if_statement "if (cVar4 == '\0') goto LAB_00067520;" if (parenthesized_expression "(cVar4 == '\0')" ( (binary_expression "cVar4 == '\0'" identifier == (char_literal "'\0'" ' escape_sequence ')) )) (goto_statement "goto LAB_00067520;" goto statement_identifier ;)) })) (expression_statement "*pcVar2 = cVar4;" (assignment_expression "*pcVar2 = cVar4" (pointer_expression "*pcVar2" * identifier) = identifier) ;) (expression_statement "iVar5 = iVar5 + 1;" (assignment_expression "iVar5 = iVar5 + 1" identifier = (binary_expression "iVar5 + 1" identifier + number_literal)) ;) (expression_statement "cVar4 = *(char *)(puVar3 + 1);" (assignment_expression "cVar4 = *(char *)(puVar3 + 1)" identifier = (pointer_expression "*(char *)(puVar3 + 1)" * (cast_expression "(char *)(puVar3 + 1)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(puVar3 + 1)" ( (binary_expression "puVar3 + 1" identifier + number_literal) ))))) ;) (expression_statement "pcVar2 = pcVar1 + iVar5;" (assignment_expression "pcVar2 = pcVar1 + iVar5" identifier = (binary_expression "pcVar1 + iVar5" identifier + identifier)) ;) (expression_statement "puVar3 = puVar3 + 2;" (assignment_expression "puVar3 = puVar3 + 2" identifier = (binary_expression "puVar3 + 2" identifier + number_literal)) ;) }) while (parenthesized_expression "(cVar4 != '\0')" ( (binary_expression "cVar4 != '\0'" identifier != (char_literal "'\0'" ' escape_sequence ')) )) ;) (labeled_statement "LAB_00067520:\n  if (want_pending_command != 0) {\n    *pcVar2 = 'c';\n    iVar5 = iVar5 + 1;\n    pcVar2 = pcVar1 + iVar5;\n  }" statement_identifier : (if_statement "if (want_pending_command != 0) {\n    *pcVar2 = 'c';\n    iVar5 = iVar5 + 1;\n    pcVar2 = pcVar1 + iVar5;\n  }" if (parenthesized_expression "(want_pending_command != 0)" ( (binary_expression "want_pending_command != 0" identifier != number_literal) )) (compound_statement "{\n    *pcVar2 = 'c';\n    iVar5 = iVar5 + 1;\n    pcVar2 = pcVar1 + iVar5;\n  }" { (expression_statement "*pcVar2 = 'c';" (assignment_expression "*pcVar2 = 'c'" (pointer_expression "*pcVar2" * identifier) = (char_literal "'c'" ' character ')) ;) (expression_statement "iVar5 = iVar5 + 1;" (assignment_expression "iVar5 = iVar5 + 1" identifier = (binary_expression "iVar5 + 1" identifier + number_literal)) ;) (expression_statement "pcVar2 = pcVar1 + iVar5;" (assignment_expression "pcVar2 = pcVar1 + iVar5" identifier = (binary_expression "pcVar1 + iVar5" identifier + identifier)) ;) }))) (if_statement "if (read_from_stdin != 0) {\n    *pcVar2 = 's';\n    pcVar2 = pcVar1 + iVar5 + 1;\n  }" if (parenthesized_expression "(read_from_stdin != 0)" ( (binary_expression "read_from_stdin != 0" identifier != number_literal) )) (compound_statement "{\n    *pcVar2 = 's';\n    pcVar2 = pcVar1 + iVar5 + 1;\n  }" { (expression_statement "*pcVar2 = 's';" (assignment_expression "*pcVar2 = 's'" (pointer_expression "*pcVar2" * identifier) = (char_literal "'s'" ' character ')) ;) (expression_statement "pcVar2 = pcVar1 + iVar5 + 1;" (assignment_expression "pcVar2 = pcVar1 + iVar5 + 1" identifier = (binary_expression "pcVar1 + iVar5 + 1" (binary_expression "pcVar1 + iVar5" identifier + identifier) + number_literal)) ;) })) (expression_statement "*pcVar2 = '\0';" (assignment_expression "*pcVar2 = '\0'" (pointer_expression "*pcVar2" * identifier) = (char_literal "'\0'" ' escape_sequence ')) ;) (return_statement "return;" return ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE) ))) (compound_statement { (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (call_expression IDENT (argument_list ( (binary_expression (binary_expression IDENT + IDENT) + LIT) ))))) ;) (expression_statement (assignment_expression IDENT = (char_literal ' character ')) ;) (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) ;) (do_statement do (compound_statement { (while_statement while (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (pointer_expression * IDENT))) == LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == (char_literal ' escape_sequence ')) )) (goto_statement goto statement_identifier ;)) })) (expression_statement (assignment_expression (pointer_expression * IDENT) = IDENT) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + IDENT)) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) }) while (parenthesized_expression ( (binary_expression IDENT != (char_literal ' escape_sequence ')) )) ;) (labeled_statement statement_identifier : (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (expression_statement (assignment_expression (pointer_expression * IDENT) = (char_literal ' character ')) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + IDENT)) ;) }))) (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (expression_statement (assignment_expression (pointer_expression * IDENT) = (char_literal ' character ')) ;) (expression_statement (assignment_expression IDENT = (binary_expression (binary_expression IDENT + IDENT) + LIT)) ;) })) (expression_statement (assignment_expression (pointer_expression * IDENT) = (char_literal ' escape_sequence ')) ;) (return_statement return ;) })))
(function_definition "void which_set_flags(void)\n\n{\n  char *pcVar1;\n  char *pcVar2;\n  undefined4 *puVar3;\n  char cVar4;\n  int iVar5;\n  \n  pcVar1 = (char *)xmalloc(want_pending_command + read_from_stdin + 0x18);\n  cVar4 = 'a';\n  iVar5 = 0;\n  pcVar2 = pcVar1;\n  puVar3 = (undefined4 *)(shell_flags + 4);\n  do {\n    while (*(int *)*puVar3 == 0) {\n      cVar4 = *(char *)(puVar3 + 1);\n      puVar3 = puVar3 + 2;\n      if (cVar4 == '\0') goto LAB_00067520;\n    }\n    *pcVar2 = cVar4;\n    iVar5 = iVar5 + 1;\n    cVar4 = *(char *)(puVar3 + 1);\n    pcVar2 = pcVar1 + iVar5;\n    puVar3 = puVar3 + 2;\n  } while (cVar4 != '\0');\nLAB_00067520:\n  if (want_pending_command != 0) {\n    *pcVar2 = 'c';\n    iVar5 = iVar5 + 1;\n    pcVar2 = pcVar1 + iVar5;\n  }\n  if (read_from_stdin != 0) {\n    *pcVar2 = 's';\n    pcVar2 = pcVar1 + iVar5 + 1;\n  }\n  *pcVar2 = '\0';\n  return;\n}" (primitive_type "void") (function_declarator "which_set_flags(void)" (identifier "which_set_flags") (parameter_list "(void)" (( "(") (parameter_declaration "void" (primitive_type "void")) () ")"))) (compound_statement "{\n  char *pcVar1;\n  char *pcVar2;\n  undefined4 *puVar3;\n  char cVar4;\n  int iVar5;\n  \n  pcVar1 = (char *)xmalloc(want_pending_command + read_from_stdin + 0x18);\n  cVar4 = 'a';\n  iVar5 = 0;\n  pcVar2 = pcVar1;\n  puVar3 = (undefined4 *)(shell_flags + 4);\n  do {\n    while (*(int *)*puVar3 == 0) {\n      cVar4 = *(char *)(puVar3 + 1);\n      puVar3 = puVar3 + 2;\n      if (cVar4 == '\0') goto LAB_00067520;\n    }\n    *pcVar2 = cVar4;\n    iVar5 = iVar5 + 1;\n    cVar4 = *(char *)(puVar3 + 1);\n    pcVar2 = pcVar1 + iVar5;\n    puVar3 = puVar3 + 2;\n  } while (cVar4 != '\0');\nLAB_00067520:\n  if (want_pending_command != 0) {\n    *pcVar2 = 'c';\n    iVar5 = iVar5 + 1;\n    pcVar2 = pcVar1 + iVar5;\n  }\n  if (read_from_stdin != 0) {\n    *pcVar2 = 's';\n    pcVar2 = pcVar1 + iVar5 + 1;\n  }\n  *pcVar2 = '\0';\n  return;\n}" ({ "{") (declaration "char *pcVar1;" (primitive_type "char") (pointer_declarator "*pcVar1" (* "*") (identifier "pcVar1")) (; ";")) (declaration "char *pcVar2;" (primitive_type "char") (pointer_declarator "*pcVar2" (* "*") (identifier "pcVar2")) (; ";")) (declaration "undefined4 *puVar3;" (type_identifier "undefined4") (pointer_declarator "*puVar3" (* "*") (identifier "puVar3")) (; ";")) (declaration "char cVar4;" (primitive_type "char") (identifier "cVar4") (; ";")) (declaration "int iVar5;" (primitive_type "int") (identifier "iVar5") (; ";")) (expression_statement "pcVar1 = (char *)xmalloc(want_pending_command + read_from_stdin + 0x18);" (assignment_expression "pcVar1 = (char *)xmalloc(want_pending_command + read_from_stdin + 0x18)" (identifier "pcVar1") (= "=") (cast_expression "(char *)xmalloc(want_pending_command + read_from_stdin + 0x18)" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "xmalloc(want_pending_command + read_from_stdin + 0x18)" (identifier "xmalloc") (argument_list "(want_pending_command + read_from_stdin + 0x18)" (( "(") (binary_expression "want_pending_command + read_from_stdin + 0x18" (binary_expression "want_pending_command + read_from_stdin" (identifier "want_pending_command") (+ "+") (identifier "read_from_stdin")) (+ "+") (number_literal "0x18")) () ")"))))) (; ";")) (expression_statement "cVar4 = 'a';" (assignment_expression "cVar4 = 'a'" (identifier "cVar4") (= "=") (char_literal "'a'" (' "'") (character "a") (' "'"))) (; ";")) (expression_statement "iVar5 = 0;" (assignment_expression "iVar5 = 0" (identifier "iVar5") (= "=") (number_literal "0")) (; ";")) (expression_statement "pcVar2 = pcVar1;" (assignment_expression "pcVar2 = pcVar1" (identifier "pcVar2") (= "=") (identifier "pcVar1")) (; ";")) (expression_statement "puVar3 = (undefined4 *)(shell_flags + 4);" (assignment_expression "puVar3 = (undefined4 *)(shell_flags + 4)" (identifier "puVar3") (= "=") (cast_expression "(undefined4 *)(shell_flags + 4)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(shell_flags + 4)" (( "(") (binary_expression "shell_flags + 4" (identifier "shell_flags") (+ "+") (number_literal "4")) () ")")))) (; ";")) (do_statement "do {\n    while (*(int *)*puVar3 == 0) {\n      cVar4 = *(char *)(puVar3 + 1);\n      puVar3 = puVar3 + 2;\n      if (cVar4 == '\0') goto LAB_00067520;\n    }\n    *pcVar2 = cVar4;\n    iVar5 = iVar5 + 1;\n    cVar4 = *(char *)(puVar3 + 1);\n    pcVar2 = pcVar1 + iVar5;\n    puVar3 = puVar3 + 2;\n  } while (cVar4 != '\0');" (do "do") (compound_statement "{\n    while (*(int *)*puVar3 == 0) {\n      cVar4 = *(char *)(puVar3 + 1);\n      puVar3 = puVar3 + 2;\n      if (cVar4 == '\0') goto LAB_00067520;\n    }\n    *pcVar2 = cVar4;\n    iVar5 = iVar5 + 1;\n    cVar4 = *(char *)(puVar3 + 1);\n    pcVar2 = pcVar1 + iVar5;\n    puVar3 = puVar3 + 2;\n  }" ({ "{") (while_statement "while (*(int *)*puVar3 == 0) {\n      cVar4 = *(char *)(puVar3 + 1);\n      puVar3 = puVar3 + 2;\n      if (cVar4 == '\0') goto LAB_00067520;\n    }" (while "while") (parenthesized_expression "(*(int *)*puVar3 == 0)" (( "(") (binary_expression "*(int *)*puVar3 == 0" (pointer_expression "*(int *)*puVar3" (* "*") (cast_expression "(int *)*puVar3" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (pointer_expression "*puVar3" (* "*") (identifier "puVar3")))) (== "==") (number_literal "0")) () ")")) (compound_statement "{\n      cVar4 = *(char *)(puVar3 + 1);\n      puVar3 = puVar3 + 2;\n      if (cVar4 == '\0') goto LAB_00067520;\n    }" ({ "{") (expression_statement "cVar4 = *(char *)(puVar3 + 1);" (assignment_expression "cVar4 = *(char *)(puVar3 + 1)" (identifier "cVar4") (= "=") (pointer_expression "*(char *)(puVar3 + 1)" (* "*") (cast_expression "(char *)(puVar3 + 1)" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(puVar3 + 1)" (( "(") (binary_expression "puVar3 + 1" (identifier "puVar3") (+ "+") (number_literal "1")) () ")"))))) (; ";")) (expression_statement "puVar3 = puVar3 + 2;" (assignment_expression "puVar3 = puVar3 + 2" (identifier "puVar3") (= "=") (binary_expression "puVar3 + 2" (identifier "puVar3") (+ "+") (number_literal "2"))) (; ";")) (if_statement "if (cVar4 == '\0') goto LAB_00067520;" (if "if") (parenthesized_expression "(cVar4 == '\0')" (( "(") (binary_expression "cVar4 == '\0'" (identifier "cVar4") (== "==") (char_literal "'\0'" (' "'") (escape_sequence "\0") (' "'"))) () ")")) (goto_statement "goto LAB_00067520;" (goto "goto") (statement_identifier "LAB_00067520") (; ";"))) (} "}"))) (expression_statement "*pcVar2 = cVar4;" (assignment_expression "*pcVar2 = cVar4" (pointer_expression "*pcVar2" (* "*") (identifier "pcVar2")) (= "=") (identifier "cVar4")) (; ";")) (expression_statement "iVar5 = iVar5 + 1;" (assignment_expression "iVar5 = iVar5 + 1" (identifier "iVar5") (= "=") (binary_expression "iVar5 + 1" (identifier "iVar5") (+ "+") (number_literal "1"))) (; ";")) (expression_statement "cVar4 = *(char *)(puVar3 + 1);" (assignment_expression "cVar4 = *(char *)(puVar3 + 1)" (identifier "cVar4") (= "=") (pointer_expression "*(char *)(puVar3 + 1)" (* "*") (cast_expression "(char *)(puVar3 + 1)" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(puVar3 + 1)" (( "(") (binary_expression "puVar3 + 1" (identifier "puVar3") (+ "+") (number_literal "1")) () ")"))))) (; ";")) (expression_statement "pcVar2 = pcVar1 + iVar5;" (assignment_expression "pcVar2 = pcVar1 + iVar5" (identifier "pcVar2") (= "=") (binary_expression "pcVar1 + iVar5" (identifier "pcVar1") (+ "+") (identifier "iVar5"))) (; ";")) (expression_statement "puVar3 = puVar3 + 2;" (assignment_expression "puVar3 = puVar3 + 2" (identifier "puVar3") (= "=") (binary_expression "puVar3 + 2" (identifier "puVar3") (+ "+") (number_literal "2"))) (; ";")) (} "}")) (while "while") (parenthesized_expression "(cVar4 != '\0')" (( "(") (binary_expression "cVar4 != '\0'" (identifier "cVar4") (!= "!=") (char_literal "'\0'" (' "'") (escape_sequence "\0") (' "'"))) () ")")) (; ";")) (labeled_statement "LAB_00067520:\n  if (want_pending_command != 0) {\n    *pcVar2 = 'c';\n    iVar5 = iVar5 + 1;\n    pcVar2 = pcVar1 + iVar5;\n  }" (statement_identifier "LAB_00067520") (: ":") (if_statement "if (want_pending_command != 0) {\n    *pcVar2 = 'c';\n    iVar5 = iVar5 + 1;\n    pcVar2 = pcVar1 + iVar5;\n  }" (if "if") (parenthesized_expression "(want_pending_command != 0)" (( "(") (binary_expression "want_pending_command != 0" (identifier "want_pending_command") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n    *pcVar2 = 'c';\n    iVar5 = iVar5 + 1;\n    pcVar2 = pcVar1 + iVar5;\n  }" ({ "{") (expression_statement "*pcVar2 = 'c';" (assignment_expression "*pcVar2 = 'c'" (pointer_expression "*pcVar2" (* "*") (identifier "pcVar2")) (= "=") (char_literal "'c'" (' "'") (character "c") (' "'"))) (; ";")) (expression_statement "iVar5 = iVar5 + 1;" (assignment_expression "iVar5 = iVar5 + 1" (identifier "iVar5") (= "=") (binary_expression "iVar5 + 1" (identifier "iVar5") (+ "+") (number_literal "1"))) (; ";")) (expression_statement "pcVar2 = pcVar1 + iVar5;" (assignment_expression "pcVar2 = pcVar1 + iVar5" (identifier "pcVar2") (= "=") (binary_expression "pcVar1 + iVar5" (identifier "pcVar1") (+ "+") (identifier "iVar5"))) (; ";")) (} "}")))) (if_statement "if (read_from_stdin != 0) {\n    *pcVar2 = 's';\n    pcVar2 = pcVar1 + iVar5 + 1;\n  }" (if "if") (parenthesized_expression "(read_from_stdin != 0)" (( "(") (binary_expression "read_from_stdin != 0" (identifier "read_from_stdin") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n    *pcVar2 = 's';\n    pcVar2 = pcVar1 + iVar5 + 1;\n  }" ({ "{") (expression_statement "*pcVar2 = 's';" (assignment_expression "*pcVar2 = 's'" (pointer_expression "*pcVar2" (* "*") (identifier "pcVar2")) (= "=") (char_literal "'s'" (' "'") (character "s") (' "'"))) (; ";")) (expression_statement "pcVar2 = pcVar1 + iVar5 + 1;" (assignment_expression "pcVar2 = pcVar1 + iVar5 + 1" (identifier "pcVar2") (= "=") (binary_expression "pcVar1 + iVar5 + 1" (binary_expression "pcVar1 + iVar5" (identifier "pcVar1") (+ "+") (identifier "iVar5")) (+ "+") (number_literal "1"))) (; ";")) (} "}"))) (expression_statement "*pcVar2 = '\0';" (assignment_expression "*pcVar2 = '\0'" (pointer_expression "*pcVar2" (* "*") (identifier "pcVar2")) (= "=") (char_literal "'\0'" (' "'") (escape_sequence "\0") (' "'"))) (; ";")) (return_statement "return;" (return "return") (; ";")) (} "}")))

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

char * function_1(void)

{
  char *var_8;
  char *pcVar2;
  type_1 *var_5;
  char var_6;
  int var_7;
  
  var_8 = (char *)var_1(var_2 + var_3 + 0x18);
  var_6 = 'a';
  var_7 = 0;
  pcVar2 = var_8;
  var_5 = (type_1 *)(var_4 + 4);
  do {
    while (*(int *)*var_5 == 0) {
      var_6 = *(char *)(var_5 + 1);
      var_5 = var_5 + 2;
      if (var_6 == '\0') goto LAB_00067520;
    }
    *pcVar2 = var_6;
    var_7 = var_7 + 1;
    var_6 = *(char *)(var_5 + 1);
    pcVar2 = var_8 + var_7;
    var_5 = var_5 + 2;
  } while (var_6 != '\0');
LAB_00067520:
  if (var_2 != 0) {
    *pcVar2 = 'c';
    var_7 = var_7 + 1;
    pcVar2 = var_8 + var_7;
  }
  if (var_3 != 0) {
    *pcVar2 = 's';
    pcVar2 = var_8 + var_7 + 1;
  }
  *pcVar2 = '\0';
  return var_8;
}


(translation_unit (function_definition type: (primitive_type) declarator: (function_declarator declarator: (identifier) parameters: (parameter_list (parameter_declaration type: (primitive_type)))) body: (compound_statement (declaration type: (primitive_type) declarator: (pointer_declarator declarator: (identifier))) (declaration type: (primitive_type) declarator: (pointer_declarator declarator: (identifier))) (declaration type: (type_identifier) declarator: (pointer_declarator declarator: (identifier))) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (primitive_type) declarator: (identifier)) (expression_statement (assignment_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (call_expression function: (identifier) arguments: (argument_list (binary_expression left: (binary_expression left: (identifier) right: (identifier)) right: (number_literal))))))) (expression_statement (assignment_expression left: (identifier) right: (char_literal (character)))) (expression_statement (assignment_expression left: (identifier) right: (number_literal))) (expression_statement (assignment_expression left: (identifier) right: (identifier))) (expression_statement (assignment_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal)))))) (do_statement body: (compound_statement (while_statement condition: (parenthesized_expression (binary_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (pointer_expression argument: (identifier)))) right: (number_literal))) body: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal)))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (char_literal (escape_sequence)))) consequence: (goto_statement label: (statement_identifier))))) (expression_statement (assignment_expression left: (pointer_expression argument: (identifier)) right: (identifier))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal)))) (expression_statement (assignment_expression left: (identifier) right: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (identifier)))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal))))) condition: (parenthesized_expression (binary_expression left: (identifier) right: (char_literal (escape_sequence))))) (labeled_statement label: (statement_identifier) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (expression_statement (assignment_expression left: (pointer_expression argument: (identifier)) right: (char_literal (character)))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal)))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (identifier))))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (expression_statement (assignment_expression left: (pointer_expression argument: (identifier)) right: (char_literal (character)))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (binary_expression left: (identifier) right: (identifier)) right: (number_literal)))))) (expression_statement (assignment_expression left: (pointer_expression argument: (identifier)) right: (char_literal (escape_sequence)))) (return_statement))))

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

void MASKED(void)

{
  char *pcVar1;
  char *pcVar2;
  undefined4 *puVar3;
  char cVar4;
  int iVar5;
  
  pcVar1 = (char *)xmalloc(want_pending_command + read_from_stdin + 0x18);
  cVar4 = 'a';
  iVar5 = 0;
  pcVar2 = pcVar1;
  puVar3 = (undefined4 *)(shell_flags + 4);
  do {
    while (*(int *)*puVar3 == 0) {
      cVar4 = *(char *)(puVar3 + 1);
      puVar3 = puVar3 + 2;
      if (cVar4 == '\0') goto LAB_00067520;
    }
    *pcVar2 = cVar4;
    iVar5 = iVar5 + 1;
    cVar4 = *(char *)(puVar3 + 1);
    pcVar2 = pcVar1 + iVar5;
    puVar3 = puVar3 + 2;
  } while (cVar4 != '\0');
LAB_00067520:
  if (want_pending_command != 0) {
    *pcVar2 = 'c';
    iVar5 = iVar5 + 1;
    pcVar2 = pcVar1 + iVar5;
  }
  if (read_from_stdin != 0) {
    *pcVar2 = 's';
    pcVar2 = pcVar1 + iVar5 + 1;
  }
  *pcVar2 = '\0';
  return;
}

