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

char * xparse_dolparen(char *base,char *string,int *indp,int flags)

{
  int iVar1;
  STRING_SAVER *pSVar2;
  int iVar3;
  char *pcVar4;
  int iVar5;
  int in_GS_OFFSET;
  char *ep;
  sh_input_line_state_t ls;
  sh_parser_state_t ps;
  
  iVar1 = *(int *)(in_GS_OFFSET + 0x14);
  if (*string == '\0') {
    if ((flags & 1U) != 0) {
LAB_00040ad0:
      pcVar4 = (char *)0x0;
      goto LAB_00040964;
    }
  }
  else {
    save_parser_state(&ps);
    save_input_line_state(&ls);
    iVar3 = shell_eof_token;
    pSVar2 = pushed_string_list;
    shell_eof_token = 0x29;
    pushed_string_list = (STRING_SAVER *)0x0;
    parser_state = parser_state | 0x8040;
    iVar5 = parse_string(string,"command substitution",
                         (-(uint)((flags & 0x40U) == 0) & 0xffffffc0) + 0x4d,&ep);
    if (current_token == shell_eof_token) {
      yychar = -2;
    }
    shell_eof_token = iVar3;
    restore_parser_state(&ps);
    reset_parser();
    restore_input_line_state(&ls);
    token_to_read = 0;
    pushed_string_list = pSVar2;
    if (iVar5 < 0) {
      if (shell_input_line != (char *)0x0) {
        shell_input_line_index = 0;
        *shell_input_line = '\0';
      }
                    /* WARNING: Subroutine does not return */
      jump_to_top_level(-iVar5);
    }
    if ((string < ep) && (ep[-1] == '\n')) {
      pcVar4 = ep + -1;
      do {
        ep = pcVar4;
        if (string == ep) break;
        pcVar4 = ep + -1;
      } while (ep[-1] == '\n');
    }
    *indp = (int)(ep + (-1 - (int)base));
    if ((flags & 1U) != 0) goto LAB_00040ad0;
    if ((int)ep - (int)string != 0) {
      pcVar4 = substring(string,0,((int)ep - (int)string) + -1);
      goto LAB_00040964;
    }
  }
  pcVar4 = (char *)xmalloc(1);
  *pcVar4 = '\0';
LAB_00040964:
  if (iVar1 == *(int *)(in_GS_OFFSET + 0x14)) {
    return pcVar4;
  }
                    /* WARNING: Subroutine does not return */
  __stack_chk_fail_local();
}



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

undefined1 * xparse_dolparen(int param_1,char *param_2,undefined4 *param_3,uint param_4)

{
  undefined4 uVar1;
  undefined4 uVar2;
  char *pcVar3;
  undefined1 *puVar4;
  int iVar5;
  int in_GS_OFFSET;
  char *local_bc;
  undefined1 local_b8 [16];
  undefined1 local_a8 [136];
  int local_20;
  undefined4 uStack_14;
  
  uStack_14 = 0x40909;
  local_20 = *(int *)(in_GS_OFFSET + 0x14);
  if (*param_2 == '\0') {
    if ((param_4 & 1) != 0) {
LAB_00040ad0:
      puVar4 = (undefined1 *)0x0;
      goto LAB_00040964;
    }
  }
  else {
    save_parser_state(local_a8);
    save_input_line_state(local_b8);
    uVar2 = shell_eof_token;
    uVar1 = pushed_string_list;
    shell_eof_token = 0x29;
    pushed_string_list = 0;
    parser_state = parser_state | 0x8040;
    iVar5 = parse_string(param_2,"command substitution",
                         (-(uint)((param_4 & 0x40) == 0) & 0xffffffc0) + 0x4d,&local_bc);
    if (current_token == shell_eof_token) {
      yychar = 0xfffffffe;
    }
    shell_eof_token = uVar2;
    restore_parser_state(local_a8);
    reset_parser();
    restore_input_line_state(local_b8);
    DAT_0014e920 = 0;
    pushed_string_list = uVar1;
    if (iVar5 < 0) {
      if (DAT_0014eb74 != (undefined1 *)0x0) {
        DAT_0014eb70 = 0;
        *DAT_0014eb74 = 0;
      }
                    /* WARNING: Subroutine does not return */
      jump_to_top_level(-iVar5);
    }
    if ((param_2 < local_bc) && (local_bc[-1] == '\n')) {
      pcVar3 = local_bc + -1;
      do {
        local_bc = pcVar3;
        if (param_2 == local_bc) break;
        pcVar3 = local_bc + -1;
      } while (local_bc[-1] == '\n');
    }
    *param_3 = local_bc + (-1 - param_1);
    if ((param_4 & 1) != 0) goto LAB_00040ad0;
    if ((int)local_bc - (int)param_2 != 0) {
      puVar4 = (undefined1 *)substring(param_2,0,((int)local_bc - (int)param_2) + -1);
      goto LAB_00040964;
    }
  }
  puVar4 = (undefined1 *)xmalloc(1);
  *puVar4 = 0;
LAB_00040964:
  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {
    return puVar4;
  }
                    /* WARNING: Subroutine does not return */
  FUN_000ecc40();
}


PUSH EBP
PUSH EDI
PUSH ESI
PUSH EBX
CALL 0x00031ed0
ADD EBX,0x1096f7
SUB ESP,0xcc
MOV EAX,dword ptr [ESP + 0xe0]
MOV ESI,dword ptr [ESP + 0xe4]
MOV dword ptr [ESP + 0x8],EAX
MOV EAX,dword ptr [ESP + 0xe8]
MOV dword ptr [ESP + 0xc],EAX
MOV EAX,GS:[0x14]
MOV dword ptr [ESP + 0xbc],EAX
XOR EAX,EAX
CMP byte ptr [ESI],0x0
JNZ 0x00040988
TEST byte ptr [ESP + 0xec],0x1
JNZ 0x00040ad0
SUB ESP,0xc
PUSH 0x1
CALL 0x00099200
ADD ESP,0x10
MOV byte ptr [EAX],0x0
MOV EDI,dword ptr [ESP + 0xbc]
XOR EDI,dword ptr GS:[0x14]
JNZ 0x00040b13
ADD ESP,0xcc
POP EBX
POP ESI
POP EDI
POP EBP
RET
MOV EAX,dword ptr [ESP + 0xec]
AND EAX,0x40
CMP EAX,0x1
SBB ECX,ECX
SUB ESP,0xc
AND ECX,0xffffffc0
ADD ECX,0x4d
MOV dword ptr [ESP + 0x28],ECX
LEA EDX,[ESP + 0x40]
PUSH EDX
MOV dword ptr [ESP + 0x28],EDX
CALL 0x00040330
POP EAX
LEA EDI,[ESP + 0x30]
PUSH EDI
CALL 0x00040810
LEA EBP,[EBX + 0x8c5c]
MOV EAX,dword ptr [EBP]
MOV dword ptr [EBP],0x29
MOV dword ptr [ESP + 0x20],EAX
MOV EAX,dword ptr [EBX + 0x48b4]
MOV dword ptr [EBX + 0x48b4],0x0
MOV dword ptr [ESP + 0x24],EAX
LEA EAX,[EBX + 0x8c50]
OR dword ptr [EAX],0x8040
LEA EAX,[ESP + 0x30]
PUSH EAX
MOV ECX,dword ptr [ESP + 0x30]
LEA EAX,[EBX + 0xfffa36ff]
PUSH ECX
PUSH EAX
PUSH ESI
CALL 0x000a0d30
LEA ECX,[EBX + 0x8c74]
ADD ESP,0x20
MOV EDX,dword ptr [EBP]
CMP dword ptr [ECX],EDX
MOV EDX,dword ptr [ESP + 0x18]
JZ 0x00040ae0
MOV dword ptr [ESP + 0x18],EAX
MOV EAX,dword ptr [ESP + 0x10]
SUB ESP,0xc
PUSH EDX
MOV dword ptr [EBP],EAX
CALL 0x000404f0
CALL 0x00034b30
MOV dword ptr [ESP],EDI
CALL 0x000408a0
MOV EAX,dword ptr [ESP + 0x24]
ADD ESP,0x10
MOV dword ptr [EBX + 0x4920],0x0
MOV dword ptr [EBX + 0x48b4],EAX
MOV EAX,dword ptr [ESP + 0x18]
TEST EAX,EAX
JS 0x00040af1
MOV EDX,dword ptr [ESP + 0x20]
CMP EDX,ESI
JBE 0x00040a92
CMP byte ptr [EDX + -0x1],0xa
JNZ 0x00040a92
LEA EAX,[EDX + -0x1]
JMP 0x00040a88
SUB EAX,0x1
CMP byte ptr [EAX],0xa
JNZ 0x00040a92
MOV EDX,EAX
MOV dword ptr [ESP + 0x20],EAX
CMP ESI,EAX
JNZ 0x00040a80
MOV EAX,EDX
MOV EDI,dword ptr [ESP + 0xc]
SUB EDX,dword ptr [ESP + 0x8]
SUB EDX,0x1
SUB EAX,ESI
MOV dword ptr [EDI],EDX
TEST byte ptr [ESP + 0xec],0x1
JNZ 0x00040ad0
TEST EAX,EAX
JZ 0x00040954
SUB ESP,0x4
SUB EAX,0x1
PUSH EAX
PUSH 0x0
PUSH ESI
CALL 0x000917f0
ADD ESP,0x10
JMP 0x00040964
XOR EAX,EAX
JMP 0x00040964
LEA ECX,[EBX + 0x8c6c]
MOV dword ptr [ECX],0xfffffffe
JMP 0x00040a20
MOV EDX,dword ptr [EBX + 0x4b74]
TEST EDX,EDX
JZ 0x00040b08
MOV dword ptr [EBX + 0x4b70],0x0
MOV byte ptr [EDX],0x0
SUB ESP,0xc
NEG EAX
PUSH EAX
CALL 0x0007efa0
CALL 0x000ecc40
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nundefined1 * xparse_dolparen(int param_1,char *param_2,undefined4 *param_3,uint param_4)\n\n{\n  undefined4 uVar1;\n  undefined4 uVar2;\n  char *pcVar3;\n  undefined1 *puVar4;\n  int iVar5;\n  int in_GS_OFFSET;\n  char *local_bc;\n  undefined1 local_b8 [16];\n  undefined1 local_a8 [136];\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x40909;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  if (*param_2 == '\0') {\n    if ((param_4 & 1) != 0) {\nLAB_00040ad0:\n      puVar4 = (undefined1 *)0x0;\n      goto LAB_00040964;\n    }\n  }\n  else {\n    save_parser_state(local_a8);\n    save_input_line_state(local_b8);\n    uVar2 = shell_eof_token;\n    uVar1 = pushed_string_list;\n    shell_eof_token = 0x29;\n    pushed_string_list = 0;\n    parser_state = parser_state | 0x8040;\n    iVar5 = parse_string(param_2,"command substitution",\n                         (-(uint)((param_4 & 0x40) == 0) & 0xffffffc0) + 0x4d,&local_bc);\n    if (current_token == shell_eof_token) {\n      yychar = 0xfffffffe;\n    }\n    shell_eof_token = uVar2;\n    restore_parser_state(local_a8);\n    reset_parser();\n    restore_input_line_state(local_b8);\n    DAT_0014e920 = 0;\n    pushed_string_list = uVar1;\n    if (iVar5 < 0) {\n      if (DAT_0014eb74 != (undefined1 *)0x0) {\n        DAT_0014eb70 = 0;\n        *DAT_0014eb74 = 0;\n      }\n                    /* WARNING: Subroutine does not return */\n      jump_to_top_level(-iVar5);\n    }\n    if ((param_2 < local_bc) && (local_bc[-1] == '\n')) {\n      pcVar3 = local_bc + -1;\n      do {\n        local_bc = pcVar3;\n        if (param_2 == local_bc) break;\n        pcVar3 = local_bc + -1;\n      } while (local_bc[-1] == '\n');\n    }\n    *param_3 = local_bc + (-1 - param_1);\n    if ((param_4 & 1) != 0) goto LAB_00040ad0;\n    if ((int)local_bc - (int)param_2 != 0) {\n      puVar4 = (undefined1 *)substring(param_2,0,((int)local_bc - (int)param_2) + -1);\n      goto LAB_00040964;\n    }\n  }\n  puVar4 = (undefined1 *)xmalloc(1);\n  *puVar4 = 0;\nLAB_00040964:\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return puVar4;\n  }\n                    /* WARNING: Subroutine does not return */\n  FUN_000ecc40();\n}\n\n" comment (function_definition "undefined1 * xparse_dolparen(int param_1,char *param_2,undefined4 *param_3,uint param_4)\n\n{\n  undefined4 uVar1;\n  undefined4 uVar2;\n  char *pcVar3;\n  undefined1 *puVar4;\n  int iVar5;\n  int in_GS_OFFSET;\n  char *local_bc;\n  undefined1 local_b8 [16];\n  undefined1 local_a8 [136];\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x40909;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  if (*param_2 == '\0') {\n    if ((param_4 & 1) != 0) {\nLAB_00040ad0:\n      puVar4 = (undefined1 *)0x0;\n      goto LAB_00040964;\n    }\n  }\n  else {\n    save_parser_state(local_a8);\n    save_input_line_state(local_b8);\n    uVar2 = shell_eof_token;\n    uVar1 = pushed_string_list;\n    shell_eof_token = 0x29;\n    pushed_string_list = 0;\n    parser_state = parser_state | 0x8040;\n    iVar5 = parse_string(param_2,"command substitution",\n                         (-(uint)((param_4 & 0x40) == 0) & 0xffffffc0) + 0x4d,&local_bc);\n    if (current_token == shell_eof_token) {\n      yychar = 0xfffffffe;\n    }\n    shell_eof_token = uVar2;\n    restore_parser_state(local_a8);\n    reset_parser();\n    restore_input_line_state(local_b8);\n    DAT_0014e920 = 0;\n    pushed_string_list = uVar1;\n    if (iVar5 < 0) {\n      if (DAT_0014eb74 != (undefined1 *)0x0) {\n        DAT_0014eb70 = 0;\n        *DAT_0014eb74 = 0;\n      }\n                    /* WARNING: Subroutine does not return */\n      jump_to_top_level(-iVar5);\n    }\n    if ((param_2 < local_bc) && (local_bc[-1] == '\n')) {\n      pcVar3 = local_bc + -1;\n      do {\n        local_bc = pcVar3;\n        if (param_2 == local_bc) break;\n        pcVar3 = local_bc + -1;\n      } while (local_bc[-1] == '\n');\n    }\n    *param_3 = local_bc + (-1 - param_1);\n    if ((param_4 & 1) != 0) goto LAB_00040ad0;\n    if ((int)local_bc - (int)param_2 != 0) {\n      puVar4 = (undefined1 *)substring(param_2,0,((int)local_bc - (int)param_2) + -1);\n      goto LAB_00040964;\n    }\n  }\n  puVar4 = (undefined1 *)xmalloc(1);\n  *puVar4 = 0;\nLAB_00040964:\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return puVar4;\n  }\n                    /* WARNING: Subroutine does not return */\n  FUN_000ecc40();\n}" type_identifier (pointer_declarator "* xparse_dolparen(int param_1,char *param_2,undefined4 *param_3,uint param_4)" * (function_declarator "xparse_dolparen(int param_1,char *param_2,undefined4 *param_3,uint param_4)" identifier (parameter_list "(int param_1,char *param_2,undefined4 *param_3,uint param_4)" ( (parameter_declaration "int param_1" primitive_type identifier) , (parameter_declaration "char *param_2" primitive_type (pointer_declarator "*param_2" * identifier)) , (parameter_declaration "undefined4 *param_3" type_identifier (pointer_declarator "*param_3" * identifier)) , (parameter_declaration "uint param_4" type_identifier identifier) )))) (compound_statement "{\n  undefined4 uVar1;\n  undefined4 uVar2;\n  char *pcVar3;\n  undefined1 *puVar4;\n  int iVar5;\n  int in_GS_OFFSET;\n  char *local_bc;\n  undefined1 local_b8 [16];\n  undefined1 local_a8 [136];\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x40909;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  if (*param_2 == '\0') {\n    if ((param_4 & 1) != 0) {\nLAB_00040ad0:\n      puVar4 = (undefined1 *)0x0;\n      goto LAB_00040964;\n    }\n  }\n  else {\n    save_parser_state(local_a8);\n    save_input_line_state(local_b8);\n    uVar2 = shell_eof_token;\n    uVar1 = pushed_string_list;\n    shell_eof_token = 0x29;\n    pushed_string_list = 0;\n    parser_state = parser_state | 0x8040;\n    iVar5 = parse_string(param_2,"command substitution",\n                         (-(uint)((param_4 & 0x40) == 0) & 0xffffffc0) + 0x4d,&local_bc);\n    if (current_token == shell_eof_token) {\n      yychar = 0xfffffffe;\n    }\n    shell_eof_token = uVar2;\n    restore_parser_state(local_a8);\n    reset_parser();\n    restore_input_line_state(local_b8);\n    DAT_0014e920 = 0;\n    pushed_string_list = uVar1;\n    if (iVar5 < 0) {\n      if (DAT_0014eb74 != (undefined1 *)0x0) {\n        DAT_0014eb70 = 0;\n        *DAT_0014eb74 = 0;\n      }\n                    /* WARNING: Subroutine does not return */\n      jump_to_top_level(-iVar5);\n    }\n    if ((param_2 < local_bc) && (local_bc[-1] == '\n')) {\n      pcVar3 = local_bc + -1;\n      do {\n        local_bc = pcVar3;\n        if (param_2 == local_bc) break;\n        pcVar3 = local_bc + -1;\n      } while (local_bc[-1] == '\n');\n    }\n    *param_3 = local_bc + (-1 - param_1);\n    if ((param_4 & 1) != 0) goto LAB_00040ad0;\n    if ((int)local_bc - (int)param_2 != 0) {\n      puVar4 = (undefined1 *)substring(param_2,0,((int)local_bc - (int)param_2) + -1);\n      goto LAB_00040964;\n    }\n  }\n  puVar4 = (undefined1 *)xmalloc(1);\n  *puVar4 = 0;\nLAB_00040964:\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return puVar4;\n  }\n                    /* WARNING: Subroutine does not return */\n  FUN_000ecc40();\n}" { (declaration "undefined4 uVar1;" type_identifier identifier ;) (declaration "undefined4 uVar2;" type_identifier identifier ;) (declaration "char *pcVar3;" primitive_type (pointer_declarator "*pcVar3" * identifier) ;) (declaration "undefined1 *puVar4;" type_identifier (pointer_declarator "*puVar4" * identifier) ;) (declaration "int iVar5;" primitive_type identifier ;) (declaration "int in_GS_OFFSET;" primitive_type identifier ;) (declaration "char *local_bc;" primitive_type (pointer_declarator "*local_bc" * identifier) ;) (declaration "undefined1 local_b8 [16];" type_identifier (array_declarator "local_b8 [16]" identifier [ number_literal ]) ;) (declaration "undefined1 local_a8 [136];" type_identifier (array_declarator "local_a8 [136]" identifier [ number_literal ]) ;) (declaration "int local_20;" primitive_type identifier ;) (declaration "undefined4 uStack_14;" type_identifier identifier ;) (expression_statement "uStack_14 = 0x40909;" (assignment_expression "uStack_14 = 0x40909" identifier = number_literal) ;) (expression_statement "local_20 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "local_20 = *(int *)(in_GS_OFFSET + 0x14)" identifier = (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) ;) (if_statement "if (*param_2 == '\0') {\n    if ((param_4 & 1) != 0) {\nLAB_00040ad0:\n      puVar4 = (undefined1 *)0x0;\n      goto LAB_00040964;\n    }\n  }\n  else {\n    save_parser_state(local_a8);\n    save_input_line_state(local_b8);\n    uVar2 = shell_eof_token;\n    uVar1 = pushed_string_list;\n    shell_eof_token = 0x29;\n    pushed_string_list = 0;\n    parser_state = parser_state | 0x8040;\n    iVar5 = parse_string(param_2,"command substitution",\n                         (-(uint)((param_4 & 0x40) == 0) & 0xffffffc0) + 0x4d,&local_bc);\n    if (current_token == shell_eof_token) {\n      yychar = 0xfffffffe;\n    }\n    shell_eof_token = uVar2;\n    restore_parser_state(local_a8);\n    reset_parser();\n    restore_input_line_state(local_b8);\n    DAT_0014e920 = 0;\n    pushed_string_list = uVar1;\n    if (iVar5 < 0) {\n      if (DAT_0014eb74 != (undefined1 *)0x0) {\n        DAT_0014eb70 = 0;\n        *DAT_0014eb74 = 0;\n      }\n                    /* WARNING: Subroutine does not return */\n      jump_to_top_level(-iVar5);\n    }\n    if ((param_2 < local_bc) && (local_bc[-1] == '\n')) {\n      pcVar3 = local_bc + -1;\n      do {\n        local_bc = pcVar3;\n        if (param_2 == local_bc) break;\n        pcVar3 = local_bc + -1;\n      } while (local_bc[-1] == '\n');\n    }\n    *param_3 = local_bc + (-1 - param_1);\n    if ((param_4 & 1) != 0) goto LAB_00040ad0;\n    if ((int)local_bc - (int)param_2 != 0) {\n      puVar4 = (undefined1 *)substring(param_2,0,((int)local_bc - (int)param_2) + -1);\n      goto LAB_00040964;\n    }\n  }" if (parenthesized_expression "(*param_2 == '\0')" ( (binary_expression "*param_2 == '\0'" (pointer_expression "*param_2" * identifier) == (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\n    if ((param_4 & 1) != 0) {\nLAB_00040ad0:\n      puVar4 = (undefined1 *)0x0;\n      goto LAB_00040964;\n    }\n  }" { (if_statement "if ((param_4 & 1) != 0) {\nLAB_00040ad0:\n      puVar4 = (undefined1 *)0x0;\n      goto LAB_00040964;\n    }" if (parenthesized_expression "((param_4 & 1) != 0)" ( (binary_expression "(param_4 & 1) != 0" (parenthesized_expression "(param_4 & 1)" ( (binary_expression "param_4 & 1" identifier & number_literal) )) != number_literal) )) (compound_statement "{\nLAB_00040ad0:\n      puVar4 = (undefined1 *)0x0;\n      goto LAB_00040964;\n    }" { (labeled_statement "LAB_00040ad0:\n      puVar4 = (undefined1 *)0x0;" statement_identifier : (expression_statement "puVar4 = (undefined1 *)0x0;" (assignment_expression "puVar4 = (undefined1 *)0x0" identifier = (cast_expression "(undefined1 *)0x0" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) ;)) (goto_statement "goto LAB_00040964;" goto statement_identifier ;) })) }) (else_clause "else {\n    save_parser_state(local_a8);\n    save_input_line_state(local_b8);\n    uVar2 = shell_eof_token;\n    uVar1 = pushed_string_list;\n    shell_eof_token = 0x29;\n    pushed_string_list = 0;\n    parser_state = parser_state | 0x8040;\n    iVar5 = parse_string(param_2,"command substitution",\n                         (-(uint)((param_4 & 0x40) == 0) & 0xffffffc0) + 0x4d,&local_bc);\n    if (current_token == shell_eof_token) {\n      yychar = 0xfffffffe;\n    }\n    shell_eof_token = uVar2;\n    restore_parser_state(local_a8);\n    reset_parser();\n    restore_input_line_state(local_b8);\n    DAT_0014e920 = 0;\n    pushed_string_list = uVar1;\n    if (iVar5 < 0) {\n      if (DAT_0014eb74 != (undefined1 *)0x0) {\n        DAT_0014eb70 = 0;\n        *DAT_0014eb74 = 0;\n      }\n                    /* WARNING: Subroutine does not return */\n      jump_to_top_level(-iVar5);\n    }\n    if ((param_2 < local_bc) && (local_bc[-1] == '\n')) {\n      pcVar3 = local_bc + -1;\n      do {\n        local_bc = pcVar3;\n        if (param_2 == local_bc) break;\n        pcVar3 = local_bc + -1;\n      } while (local_bc[-1] == '\n');\n    }\n    *param_3 = local_bc + (-1 - param_1);\n    if ((param_4 & 1) != 0) goto LAB_00040ad0;\n    if ((int)local_bc - (int)param_2 != 0) {\n      puVar4 = (undefined1 *)substring(param_2,0,((int)local_bc - (int)param_2) + -1);\n      goto LAB_00040964;\n    }\n  }" else (compound_statement "{\n    save_parser_state(local_a8);\n    save_input_line_state(local_b8);\n    uVar2 = shell_eof_token;\n    uVar1 = pushed_string_list;\n    shell_eof_token = 0x29;\n    pushed_string_list = 0;\n    parser_state = parser_state | 0x8040;\n    iVar5 = parse_string(param_2,"command substitution",\n                         (-(uint)((param_4 & 0x40) == 0) & 0xffffffc0) + 0x4d,&local_bc);\n    if (current_token == shell_eof_token) {\n      yychar = 0xfffffffe;\n    }\n    shell_eof_token = uVar2;\n    restore_parser_state(local_a8);\n    reset_parser();\n    restore_input_line_state(local_b8);\n    DAT_0014e920 = 0;\n    pushed_string_list = uVar1;\n    if (iVar5 < 0) {\n      if (DAT_0014eb74 != (undefined1 *)0x0) {\n        DAT_0014eb70 = 0;\n        *DAT_0014eb74 = 0;\n      }\n                    /* WARNING: Subroutine does not return */\n      jump_to_top_level(-iVar5);\n    }\n    if ((param_2 < local_bc) && (local_bc[-1] == '\n')) {\n      pcVar3 = local_bc + -1;\n      do {\n        local_bc = pcVar3;\n        if (param_2 == local_bc) break;\n        pcVar3 = local_bc + -1;\n      } while (local_bc[-1] == '\n');\n    }\n    *param_3 = local_bc + (-1 - param_1);\n    if ((param_4 & 1) != 0) goto LAB_00040ad0;\n    if ((int)local_bc - (int)param_2 != 0) {\n      puVar4 = (undefined1 *)substring(param_2,0,((int)local_bc - (int)param_2) + -1);\n      goto LAB_00040964;\n    }\n  }" { (expression_statement "save_parser_state(local_a8);" (call_expression "save_parser_state(local_a8)" identifier (argument_list "(local_a8)" ( identifier ))) ;) (expression_statement "save_input_line_state(local_b8);" (call_expression "save_input_line_state(local_b8)" identifier (argument_list "(local_b8)" ( identifier ))) ;) (expression_statement "uVar2 = shell_eof_token;" (assignment_expression "uVar2 = shell_eof_token" identifier = identifier) ;) (expression_statement "uVar1 = pushed_string_list;" (assignment_expression "uVar1 = pushed_string_list" identifier = identifier) ;) (expression_statement "shell_eof_token = 0x29;" (assignment_expression "shell_eof_token = 0x29" identifier = number_literal) ;) (expression_statement "pushed_string_list = 0;" (assignment_expression "pushed_string_list = 0" identifier = number_literal) ;) (expression_statement "parser_state = parser_state | 0x8040;" (assignment_expression "parser_state = parser_state | 0x8040" identifier = (binary_expression "parser_state | 0x8040" identifier | number_literal)) ;) (expression_statement "iVar5 = parse_string(param_2,"command substitution",\n                         (-(uint)((param_4 & 0x40) == 0) & 0xffffffc0) + 0x4d,&local_bc);" (assignment_expression "iVar5 = parse_string(param_2,"command substitution",\n                         (-(uint)((param_4 & 0x40) == 0) & 0xffffffc0) + 0x4d,&local_bc)" identifier = (call_expression "parse_string(param_2,"command substitution",\n                         (-(uint)((param_4 & 0x40) == 0) & 0xffffffc0) + 0x4d,&local_bc)" identifier (argument_list "(param_2,"command substitution",\n                         (-(uint)((param_4 & 0x40) == 0) & 0xffffffc0) + 0x4d,&local_bc)" ( identifier , (string_literal ""command substitution"" " string_content ") , (binary_expression "(-(uint)((param_4 & 0x40) == 0) & 0xffffffc0) + 0x4d" (parenthesized_expression "(-(uint)((param_4 & 0x40) == 0) & 0xffffffc0)" ( (binary_expression "-(uint)((param_4 & 0x40) == 0) & 0xffffffc0" (unary_expression "-(uint)((param_4 & 0x40) == 0)" - (call_expression "(uint)((param_4 & 0x40) == 0)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "((param_4 & 0x40) == 0)" ( (binary_expression "(param_4 & 0x40) == 0" (parenthesized_expression "(param_4 & 0x40)" ( (binary_expression "param_4 & 0x40" identifier & number_literal) )) == number_literal) )))) & number_literal) )) + number_literal) , (pointer_expression "&local_bc" & identifier) )))) ;) (if_statement "if (current_token == shell_eof_token) {\n      yychar = 0xfffffffe;\n    }" if (parenthesized_expression "(current_token == shell_eof_token)" ( (binary_expression "current_token == shell_eof_token" identifier == identifier) )) (compound_statement "{\n      yychar = 0xfffffffe;\n    }" { (expression_statement "yychar = 0xfffffffe;" (assignment_expression "yychar = 0xfffffffe" identifier = number_literal) ;) })) (expression_statement "shell_eof_token = uVar2;" (assignment_expression "shell_eof_token = uVar2" identifier = identifier) ;) (expression_statement "restore_parser_state(local_a8);" (call_expression "restore_parser_state(local_a8)" identifier (argument_list "(local_a8)" ( identifier ))) ;) (expression_statement "reset_parser();" (call_expression "reset_parser()" identifier (argument_list "()" ( ))) ;) (expression_statement "restore_input_line_state(local_b8);" (call_expression "restore_input_line_state(local_b8)" identifier (argument_list "(local_b8)" ( identifier ))) ;) (expression_statement "DAT_0014e920 = 0;" (assignment_expression "DAT_0014e920 = 0" identifier = number_literal) ;) (expression_statement "pushed_string_list = uVar1;" (assignment_expression "pushed_string_list = uVar1" identifier = identifier) ;) (if_statement "if (iVar5 < 0) {\n      if (DAT_0014eb74 != (undefined1 *)0x0) {\n        DAT_0014eb70 = 0;\n        *DAT_0014eb74 = 0;\n      }\n                    /* WARNING: Subroutine does not return */\n      jump_to_top_level(-iVar5);\n    }" if (parenthesized_expression "(iVar5 < 0)" ( (binary_expression "iVar5 < 0" identifier < number_literal) )) (compound_statement "{\n      if (DAT_0014eb74 != (undefined1 *)0x0) {\n        DAT_0014eb70 = 0;\n        *DAT_0014eb74 = 0;\n      }\n                    /* WARNING: Subroutine does not return */\n      jump_to_top_level(-iVar5);\n    }" { (if_statement "if (DAT_0014eb74 != (undefined1 *)0x0) {\n        DAT_0014eb70 = 0;\n        *DAT_0014eb74 = 0;\n      }" if (parenthesized_expression "(DAT_0014eb74 != (undefined1 *)0x0)" ( (binary_expression "DAT_0014eb74 != (undefined1 *)0x0" identifier != (cast_expression "(undefined1 *)0x0" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n        DAT_0014eb70 = 0;\n        *DAT_0014eb74 = 0;\n      }" { (expression_statement "DAT_0014eb70 = 0;" (assignment_expression "DAT_0014eb70 = 0" identifier = number_literal) ;) (expression_statement "*DAT_0014eb74 = 0;" (assignment_expression "*DAT_0014eb74 = 0" (pointer_expression "*DAT_0014eb74" * identifier) = number_literal) ;) })) comment (expression_statement "jump_to_top_level(-iVar5);" (call_expression "jump_to_top_level(-iVar5)" identifier (argument_list "(-iVar5)" ( (unary_expression "-iVar5" - identifier) ))) ;) })) (if_statement "if ((param_2 < local_bc) && (local_bc[-1] == '\n')) {\n      pcVar3 = local_bc + -1;\n      do {\n        local_bc = pcVar3;\n        if (param_2 == local_bc) break;\n        pcVar3 = local_bc + -1;\n      } while (local_bc[-1] == '\n');\n    }" if (parenthesized_expression "((param_2 < local_bc) && (local_bc[-1] == '\n'))" ( (binary_expression "(param_2 < local_bc) && (local_bc[-1] == '\n')" (parenthesized_expression "(param_2 < local_bc)" ( (binary_expression "param_2 < local_bc" identifier < identifier) )) && (parenthesized_expression "(local_bc[-1] == '\n')" ( (binary_expression "local_bc[-1] == '\n'" (subscript_expression "local_bc[-1]" identifier [ number_literal ]) == (char_literal "'\n'" ' escape_sequence ')) ))) )) (compound_statement "{\n      pcVar3 = local_bc + -1;\n      do {\n        local_bc = pcVar3;\n        if (param_2 == local_bc) break;\n        pcVar3 = local_bc + -1;\n      } while (local_bc[-1] == '\n');\n    }" { (expression_statement "pcVar3 = local_bc + -1;" (assignment_expression "pcVar3 = local_bc + -1" identifier = (binary_expression "local_bc + -1" identifier + number_literal)) ;) (do_statement "do {\n        local_bc = pcVar3;\n        if (param_2 == local_bc) break;\n        pcVar3 = local_bc + -1;\n      } while (local_bc[-1] == '\n');" do (compound_statement "{\n        local_bc = pcVar3;\n        if (param_2 == local_bc) break;\n        pcVar3 = local_bc + -1;\n      }" { (expression_statement "local_bc = pcVar3;" (assignment_expression "local_bc = pcVar3" identifier = identifier) ;) (if_statement "if (param_2 == local_bc) break;" if (parenthesized_expression "(param_2 == local_bc)" ( (binary_expression "param_2 == local_bc" identifier == identifier) )) (break_statement "break;" break ;)) (expression_statement "pcVar3 = local_bc + -1;" (assignment_expression "pcVar3 = local_bc + -1" identifier = (binary_expression "local_bc + -1" identifier + number_literal)) ;) }) while (parenthesized_expression "(local_bc[-1] == '\n')" ( (binary_expression "local_bc[-1] == '\n'" (subscript_expression "local_bc[-1]" identifier [ number_literal ]) == (char_literal "'\n'" ' escape_sequence ')) )) ;) })) (expression_statement "*param_3 = local_bc + (-1 - param_1);" (assignment_expression "*param_3 = local_bc + (-1 - param_1)" (pointer_expression "*param_3" * identifier) = (binary_expression "local_bc + (-1 - param_1)" identifier + (parenthesized_expression "(-1 - param_1)" ( (binary_expression "-1 - param_1" number_literal - identifier) )))) ;) (if_statement "if ((param_4 & 1) != 0) goto LAB_00040ad0;" if (parenthesized_expression "((param_4 & 1) != 0)" ( (binary_expression "(param_4 & 1) != 0" (parenthesized_expression "(param_4 & 1)" ( (binary_expression "param_4 & 1" identifier & number_literal) )) != number_literal) )) (goto_statement "goto LAB_00040ad0;" goto statement_identifier ;)) (if_statement "if ((int)local_bc - (int)param_2 != 0) {\n      puVar4 = (undefined1 *)substring(param_2,0,((int)local_bc - (int)param_2) + -1);\n      goto LAB_00040964;\n    }" if (parenthesized_expression "((int)local_bc - (int)param_2 != 0)" ( (binary_expression "(int)local_bc - (int)param_2 != 0" (binary_expression "(int)local_bc - (int)param_2" (cast_expression "(int)local_bc" ( (type_descriptor "int" primitive_type) ) identifier) - (cast_expression "(int)param_2" ( (type_descriptor "int" primitive_type) ) identifier)) != number_literal) )) (compound_statement "{\n      puVar4 = (undefined1 *)substring(param_2,0,((int)local_bc - (int)param_2) + -1);\n      goto LAB_00040964;\n    }" { (expression_statement "puVar4 = (undefined1 *)substring(param_2,0,((int)local_bc - (int)param_2) + -1);" (assignment_expression "puVar4 = (undefined1 *)substring(param_2,0,((int)local_bc - (int)param_2) + -1)" identifier = (cast_expression "(undefined1 *)substring(param_2,0,((int)local_bc - (int)param_2) + -1)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "substring(param_2,0,((int)local_bc - (int)param_2) + -1)" identifier (argument_list "(param_2,0,((int)local_bc - (int)param_2) + -1)" ( identifier , number_literal , (binary_expression "((int)local_bc - (int)param_2) + -1" (parenthesized_expression "((int)local_bc - (int)param_2)" ( (binary_expression "(int)local_bc - (int)param_2" (cast_expression "(int)local_bc" ( (type_descriptor "int" primitive_type) ) identifier) - (cast_expression "(int)param_2" ( (type_descriptor "int" primitive_type) ) identifier)) )) + number_literal) ))))) ;) (goto_statement "goto LAB_00040964;" goto statement_identifier ;) })) }))) (expression_statement "puVar4 = (undefined1 *)xmalloc(1);" (assignment_expression "puVar4 = (undefined1 *)xmalloc(1)" identifier = (cast_expression "(undefined1 *)xmalloc(1)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "xmalloc(1)" identifier (argument_list "(1)" ( number_literal ))))) ;) (expression_statement "*puVar4 = 0;" (assignment_expression "*puVar4 = 0" (pointer_expression "*puVar4" * identifier) = number_literal) ;) (labeled_statement "LAB_00040964:\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return puVar4;\n  }" statement_identifier : (if_statement "if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return puVar4;\n  }" if (parenthesized_expression "(local_20 == *(int *)(in_GS_OFFSET + 0x14))" ( (binary_expression "local_20 == *(int *)(in_GS_OFFSET + 0x14)" identifier == (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) )) (compound_statement "{\n    return puVar4;\n  }" { (return_statement "return puVar4;" return identifier ;) }))) comment (expression_statement "FUN_000ecc40();" (call_expression "FUN_000ecc40()" identifier (argument_list "()" ( ))) ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nchar * xparse_dolparen(char *base,char *string,int *indp,int flags)\n\n{\n  int iVar1;\n  STRING_SAVER *pSVar2;\n  int iVar3;\n  char *pcVar4;\n  int iVar5;\n  int in_GS_OFFSET;\n  char *ep;\n  sh_input_line_state_t ls;\n  sh_parser_state_t ps;\n  \n  iVar1 = *(int *)(in_GS_OFFSET + 0x14);\n  if (*string == '\0') {\n    if ((flags & 1U) != 0) {\nLAB_00040ad0:\n      pcVar4 = (char *)0x0;\n      goto LAB_00040964;\n    }\n  }\n  else {\n    save_parser_state(&ps);\n    save_input_line_state(&ls);\n    iVar3 = shell_eof_token;\n    pSVar2 = pushed_string_list;\n    shell_eof_token = 0x29;\n    pushed_string_list = (STRING_SAVER *)0x0;\n    parser_state = parser_state | 0x8040;\n    iVar5 = parse_string(string,"command substitution",\n                         (-(uint)((flags & 0x40U) == 0) & 0xffffffc0) + 0x4d,&ep);\n    if (current_token == shell_eof_token) {\n      yychar = -2;\n    }\n    shell_eof_token = iVar3;\n    restore_parser_state(&ps);\n    reset_parser();\n    restore_input_line_state(&ls);\n    token_to_read = 0;\n    pushed_string_list = pSVar2;\n    if (iVar5 < 0) {\n      if (shell_input_line != (char *)0x0) {\n        shell_input_line_index = 0;\n        *shell_input_line = '\0';\n      }\n                    /* WARNING: Subroutine does not return */\n      jump_to_top_level(-iVar5);\n    }\n    if ((string < ep) && (ep[-1] == '\n')) {\n      pcVar4 = ep + -1;\n      do {\n        ep = pcVar4;\n        if (string == ep) break;\n        pcVar4 = ep + -1;\n      } while (ep[-1] == '\n');\n    }\n    *indp = (int)(ep + (-1 - (int)base));\n    if ((flags & 1U) != 0) goto LAB_00040ad0;\n    if ((int)ep - (int)string != 0) {\n      pcVar4 = substring(string,0,((int)ep - (int)string) + -1);\n      goto LAB_00040964;\n    }\n  }\n  pcVar4 = (char *)xmalloc(1);\n  *pcVar4 = '\0';\nLAB_00040964:\n  if (iVar1 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return pcVar4;\n  }\n                    /* WARNING: Subroutine does not return */\n  __stack_chk_fail_local();\n}\n\n" comment (function_definition "char * xparse_dolparen(char *base,char *string,int *indp,int flags)\n\n{\n  int iVar1;\n  STRING_SAVER *pSVar2;\n  int iVar3;\n  char *pcVar4;\n  int iVar5;\n  int in_GS_OFFSET;\n  char *ep;\n  sh_input_line_state_t ls;\n  sh_parser_state_t ps;\n  \n  iVar1 = *(int *)(in_GS_OFFSET + 0x14);\n  if (*string == '\0') {\n    if ((flags & 1U) != 0) {\nLAB_00040ad0:\n      pcVar4 = (char *)0x0;\n      goto LAB_00040964;\n    }\n  }\n  else {\n    save_parser_state(&ps);\n    save_input_line_state(&ls);\n    iVar3 = shell_eof_token;\n    pSVar2 = pushed_string_list;\n    shell_eof_token = 0x29;\n    pushed_string_list = (STRING_SAVER *)0x0;\n    parser_state = parser_state | 0x8040;\n    iVar5 = parse_string(string,"command substitution",\n                         (-(uint)((flags & 0x40U) == 0) & 0xffffffc0) + 0x4d,&ep);\n    if (current_token == shell_eof_token) {\n      yychar = -2;\n    }\n    shell_eof_token = iVar3;\n    restore_parser_state(&ps);\n    reset_parser();\n    restore_input_line_state(&ls);\n    token_to_read = 0;\n    pushed_string_list = pSVar2;\n    if (iVar5 < 0) {\n      if (shell_input_line != (char *)0x0) {\n        shell_input_line_index = 0;\n        *shell_input_line = '\0';\n      }\n                    /* WARNING: Subroutine does not return */\n      jump_to_top_level(-iVar5);\n    }\n    if ((string < ep) && (ep[-1] == '\n')) {\n      pcVar4 = ep + -1;\n      do {\n        ep = pcVar4;\n        if (string == ep) break;\n        pcVar4 = ep + -1;\n      } while (ep[-1] == '\n');\n    }\n    *indp = (int)(ep + (-1 - (int)base));\n    if ((flags & 1U) != 0) goto LAB_00040ad0;\n    if ((int)ep - (int)string != 0) {\n      pcVar4 = substring(string,0,((int)ep - (int)string) + -1);\n      goto LAB_00040964;\n    }\n  }\n  pcVar4 = (char *)xmalloc(1);\n  *pcVar4 = '\0';\nLAB_00040964:\n  if (iVar1 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return pcVar4;\n  }\n                    /* WARNING: Subroutine does not return */\n  __stack_chk_fail_local();\n}" primitive_type (pointer_declarator "* xparse_dolparen(char *base,char *string,int *indp,int flags)" * (function_declarator "xparse_dolparen(char *base,char *string,int *indp,int flags)" identifier (parameter_list "(char *base,char *string,int *indp,int flags)" ( (parameter_declaration "char *base" primitive_type (pointer_declarator "*base" * identifier)) , (parameter_declaration "char *string" primitive_type (pointer_declarator "*string" * identifier)) , (parameter_declaration "int *indp" primitive_type (pointer_declarator "*indp" * identifier)) , (parameter_declaration "int flags" primitive_type identifier) )))) (compound_statement "{\n  int iVar1;\n  STRING_SAVER *pSVar2;\n  int iVar3;\n  char *pcVar4;\n  int iVar5;\n  int in_GS_OFFSET;\n  char *ep;\n  sh_input_line_state_t ls;\n  sh_parser_state_t ps;\n  \n  iVar1 = *(int *)(in_GS_OFFSET + 0x14);\n  if (*string == '\0') {\n    if ((flags & 1U) != 0) {\nLAB_00040ad0:\n      pcVar4 = (char *)0x0;\n      goto LAB_00040964;\n    }\n  }\n  else {\n    save_parser_state(&ps);\n    save_input_line_state(&ls);\n    iVar3 = shell_eof_token;\n    pSVar2 = pushed_string_list;\n    shell_eof_token = 0x29;\n    pushed_string_list = (STRING_SAVER *)0x0;\n    parser_state = parser_state | 0x8040;\n    iVar5 = parse_string(string,"command substitution",\n                         (-(uint)((flags & 0x40U) == 0) & 0xffffffc0) + 0x4d,&ep);\n    if (current_token == shell_eof_token) {\n      yychar = -2;\n    }\n    shell_eof_token = iVar3;\n    restore_parser_state(&ps);\n    reset_parser();\n    restore_input_line_state(&ls);\n    token_to_read = 0;\n    pushed_string_list = pSVar2;\n    if (iVar5 < 0) {\n      if (shell_input_line != (char *)0x0) {\n        shell_input_line_index = 0;\n        *shell_input_line = '\0';\n      }\n                    /* WARNING: Subroutine does not return */\n      jump_to_top_level(-iVar5);\n    }\n    if ((string < ep) && (ep[-1] == '\n')) {\n      pcVar4 = ep + -1;\n      do {\n        ep = pcVar4;\n        if (string == ep) break;\n        pcVar4 = ep + -1;\n      } while (ep[-1] == '\n');\n    }\n    *indp = (int)(ep + (-1 - (int)base));\n    if ((flags & 1U) != 0) goto LAB_00040ad0;\n    if ((int)ep - (int)string != 0) {\n      pcVar4 = substring(string,0,((int)ep - (int)string) + -1);\n      goto LAB_00040964;\n    }\n  }\n  pcVar4 = (char *)xmalloc(1);\n  *pcVar4 = '\0';\nLAB_00040964:\n  if (iVar1 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return pcVar4;\n  }\n                    /* WARNING: Subroutine does not return */\n  __stack_chk_fail_local();\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "STRING_SAVER *pSVar2;" type_identifier (pointer_declarator "*pSVar2" * identifier) ;) (declaration "int iVar3;" primitive_type identifier ;) (declaration "char *pcVar4;" primitive_type (pointer_declarator "*pcVar4" * identifier) ;) (declaration "int iVar5;" primitive_type identifier ;) (declaration "int in_GS_OFFSET;" primitive_type identifier ;) (declaration "char *ep;" primitive_type (pointer_declarator "*ep" * identifier) ;) (declaration "sh_input_line_state_t ls;" type_identifier identifier ;) (declaration "sh_parser_state_t ps;" type_identifier identifier ;) (expression_statement "iVar1 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "iVar1 = *(int *)(in_GS_OFFSET + 0x14)" identifier = (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) ;) (if_statement "if (*string == '\0') {\n    if ((flags & 1U) != 0) {\nLAB_00040ad0:\n      pcVar4 = (char *)0x0;\n      goto LAB_00040964;\n    }\n  }\n  else {\n    save_parser_state(&ps);\n    save_input_line_state(&ls);\n    iVar3 = shell_eof_token;\n    pSVar2 = pushed_string_list;\n    shell_eof_token = 0x29;\n    pushed_string_list = (STRING_SAVER *)0x0;\n    parser_state = parser_state | 0x8040;\n    iVar5 = parse_string(string,"command substitution",\n                         (-(uint)((flags & 0x40U) == 0) & 0xffffffc0) + 0x4d,&ep);\n    if (current_token == shell_eof_token) {\n      yychar = -2;\n    }\n    shell_eof_token = iVar3;\n    restore_parser_state(&ps);\n    reset_parser();\n    restore_input_line_state(&ls);\n    token_to_read = 0;\n    pushed_string_list = pSVar2;\n    if (iVar5 < 0) {\n      if (shell_input_line != (char *)0x0) {\n        shell_input_line_index = 0;\n        *shell_input_line = '\0';\n      }\n                    /* WARNING: Subroutine does not return */\n      jump_to_top_level(-iVar5);\n    }\n    if ((string < ep) && (ep[-1] == '\n')) {\n      pcVar4 = ep + -1;\n      do {\n        ep = pcVar4;\n        if (string == ep) break;\n        pcVar4 = ep + -1;\n      } while (ep[-1] == '\n');\n    }\n    *indp = (int)(ep + (-1 - (int)base));\n    if ((flags & 1U) != 0) goto LAB_00040ad0;\n    if ((int)ep - (int)string != 0) {\n      pcVar4 = substring(string,0,((int)ep - (int)string) + -1);\n      goto LAB_00040964;\n    }\n  }" if (parenthesized_expression "(*string == '\0')" ( (binary_expression "*string == '\0'" (pointer_expression "*string" * identifier) == (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\n    if ((flags & 1U) != 0) {\nLAB_00040ad0:\n      pcVar4 = (char *)0x0;\n      goto LAB_00040964;\n    }\n  }" { (if_statement "if ((flags & 1U) != 0) {\nLAB_00040ad0:\n      pcVar4 = (char *)0x0;\n      goto LAB_00040964;\n    }" if (parenthesized_expression "((flags & 1U) != 0)" ( (binary_expression "(flags & 1U) != 0" (parenthesized_expression "(flags & 1U)" ( (binary_expression "flags & 1U" identifier & number_literal) )) != number_literal) )) (compound_statement "{\nLAB_00040ad0:\n      pcVar4 = (char *)0x0;\n      goto LAB_00040964;\n    }" { (labeled_statement "LAB_00040ad0:\n      pcVar4 = (char *)0x0;" statement_identifier : (expression_statement "pcVar4 = (char *)0x0;" (assignment_expression "pcVar4 = (char *)0x0" identifier = (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) ;)) (goto_statement "goto LAB_00040964;" goto statement_identifier ;) })) }) (else_clause "else {\n    save_parser_state(&ps);\n    save_input_line_state(&ls);\n    iVar3 = shell_eof_token;\n    pSVar2 = pushed_string_list;\n    shell_eof_token = 0x29;\n    pushed_string_list = (STRING_SAVER *)0x0;\n    parser_state = parser_state | 0x8040;\n    iVar5 = parse_string(string,"command substitution",\n                         (-(uint)((flags & 0x40U) == 0) & 0xffffffc0) + 0x4d,&ep);\n    if (current_token == shell_eof_token) {\n      yychar = -2;\n    }\n    shell_eof_token = iVar3;\n    restore_parser_state(&ps);\n    reset_parser();\n    restore_input_line_state(&ls);\n    token_to_read = 0;\n    pushed_string_list = pSVar2;\n    if (iVar5 < 0) {\n      if (shell_input_line != (char *)0x0) {\n        shell_input_line_index = 0;\n        *shell_input_line = '\0';\n      }\n                    /* WARNING: Subroutine does not return */\n      jump_to_top_level(-iVar5);\n    }\n    if ((string < ep) && (ep[-1] == '\n')) {\n      pcVar4 = ep + -1;\n      do {\n        ep = pcVar4;\n        if (string == ep) break;\n        pcVar4 = ep + -1;\n      } while (ep[-1] == '\n');\n    }\n    *indp = (int)(ep + (-1 - (int)base));\n    if ((flags & 1U) != 0) goto LAB_00040ad0;\n    if ((int)ep - (int)string != 0) {\n      pcVar4 = substring(string,0,((int)ep - (int)string) + -1);\n      goto LAB_00040964;\n    }\n  }" else (compound_statement "{\n    save_parser_state(&ps);\n    save_input_line_state(&ls);\n    iVar3 = shell_eof_token;\n    pSVar2 = pushed_string_list;\n    shell_eof_token = 0x29;\n    pushed_string_list = (STRING_SAVER *)0x0;\n    parser_state = parser_state | 0x8040;\n    iVar5 = parse_string(string,"command substitution",\n                         (-(uint)((flags & 0x40U) == 0) & 0xffffffc0) + 0x4d,&ep);\n    if (current_token == shell_eof_token) {\n      yychar = -2;\n    }\n    shell_eof_token = iVar3;\n    restore_parser_state(&ps);\n    reset_parser();\n    restore_input_line_state(&ls);\n    token_to_read = 0;\n    pushed_string_list = pSVar2;\n    if (iVar5 < 0) {\n      if (shell_input_line != (char *)0x0) {\n        shell_input_line_index = 0;\n        *shell_input_line = '\0';\n      }\n                    /* WARNING: Subroutine does not return */\n      jump_to_top_level(-iVar5);\n    }\n    if ((string < ep) && (ep[-1] == '\n')) {\n      pcVar4 = ep + -1;\n      do {\n        ep = pcVar4;\n        if (string == ep) break;\n        pcVar4 = ep + -1;\n      } while (ep[-1] == '\n');\n    }\n    *indp = (int)(ep + (-1 - (int)base));\n    if ((flags & 1U) != 0) goto LAB_00040ad0;\n    if ((int)ep - (int)string != 0) {\n      pcVar4 = substring(string,0,((int)ep - (int)string) + -1);\n      goto LAB_00040964;\n    }\n  }" { (expression_statement "save_parser_state(&ps);" (call_expression "save_parser_state(&ps)" identifier (argument_list "(&ps)" ( (pointer_expression "&ps" & identifier) ))) ;) (expression_statement "save_input_line_state(&ls);" (call_expression "save_input_line_state(&ls)" identifier (argument_list "(&ls)" ( (pointer_expression "&ls" & identifier) ))) ;) (expression_statement "iVar3 = shell_eof_token;" (assignment_expression "iVar3 = shell_eof_token" identifier = identifier) ;) (expression_statement "pSVar2 = pushed_string_list;" (assignment_expression "pSVar2 = pushed_string_list" identifier = identifier) ;) (expression_statement "shell_eof_token = 0x29;" (assignment_expression "shell_eof_token = 0x29" identifier = number_literal) ;) (expression_statement "pushed_string_list = (STRING_SAVER *)0x0;" (assignment_expression "pushed_string_list = (STRING_SAVER *)0x0" identifier = (cast_expression "(STRING_SAVER *)0x0" ( (type_descriptor "STRING_SAVER *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) ;) (expression_statement "parser_state = parser_state | 0x8040;" (assignment_expression "parser_state = parser_state | 0x8040" identifier = (binary_expression "parser_state | 0x8040" identifier | number_literal)) ;) (expression_statement "iVar5 = parse_string(string,"command substitution",\n                         (-(uint)((flags & 0x40U) == 0) & 0xffffffc0) + 0x4d,&ep);" (assignment_expression "iVar5 = parse_string(string,"command substitution",\n                         (-(uint)((flags & 0x40U) == 0) & 0xffffffc0) + 0x4d,&ep)" identifier = (call_expression "parse_string(string,"command substitution",\n                         (-(uint)((flags & 0x40U) == 0) & 0xffffffc0) + 0x4d,&ep)" identifier (argument_list "(string,"command substitution",\n                         (-(uint)((flags & 0x40U) == 0) & 0xffffffc0) + 0x4d,&ep)" ( identifier , (string_literal ""command substitution"" " string_content ") , (binary_expression "(-(uint)((flags & 0x40U) == 0) & 0xffffffc0) + 0x4d" (parenthesized_expression "(-(uint)((flags & 0x40U) == 0) & 0xffffffc0)" ( (binary_expression "-(uint)((flags & 0x40U) == 0) & 0xffffffc0" (unary_expression "-(uint)((flags & 0x40U) == 0)" - (call_expression "(uint)((flags & 0x40U) == 0)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "((flags & 0x40U) == 0)" ( (binary_expression "(flags & 0x40U) == 0" (parenthesized_expression "(flags & 0x40U)" ( (binary_expression "flags & 0x40U" identifier & number_literal) )) == number_literal) )))) & number_literal) )) + number_literal) , (pointer_expression "&ep" & identifier) )))) ;) (if_statement "if (current_token == shell_eof_token) {\n      yychar = -2;\n    }" if (parenthesized_expression "(current_token == shell_eof_token)" ( (binary_expression "current_token == shell_eof_token" identifier == identifier) )) (compound_statement "{\n      yychar = -2;\n    }" { (expression_statement "yychar = -2;" (assignment_expression "yychar = -2" identifier = number_literal) ;) })) (expression_statement "shell_eof_token = iVar3;" (assignment_expression "shell_eof_token = iVar3" identifier = identifier) ;) (expression_statement "restore_parser_state(&ps);" (call_expression "restore_parser_state(&ps)" identifier (argument_list "(&ps)" ( (pointer_expression "&ps" & identifier) ))) ;) (expression_statement "reset_parser();" (call_expression "reset_parser()" identifier (argument_list "()" ( ))) ;) (expression_statement "restore_input_line_state(&ls);" (call_expression "restore_input_line_state(&ls)" identifier (argument_list "(&ls)" ( (pointer_expression "&ls" & identifier) ))) ;) (expression_statement "token_to_read = 0;" (assignment_expression "token_to_read = 0" identifier = number_literal) ;) (expression_statement "pushed_string_list = pSVar2;" (assignment_expression "pushed_string_list = pSVar2" identifier = identifier) ;) (if_statement "if (iVar5 < 0) {\n      if (shell_input_line != (char *)0x0) {\n        shell_input_line_index = 0;\n        *shell_input_line = '\0';\n      }\n                    /* WARNING: Subroutine does not return */\n      jump_to_top_level(-iVar5);\n    }" if (parenthesized_expression "(iVar5 < 0)" ( (binary_expression "iVar5 < 0" identifier < number_literal) )) (compound_statement "{\n      if (shell_input_line != (char *)0x0) {\n        shell_input_line_index = 0;\n        *shell_input_line = '\0';\n      }\n                    /* WARNING: Subroutine does not return */\n      jump_to_top_level(-iVar5);\n    }" { (if_statement "if (shell_input_line != (char *)0x0) {\n        shell_input_line_index = 0;\n        *shell_input_line = '\0';\n      }" if (parenthesized_expression "(shell_input_line != (char *)0x0)" ( (binary_expression "shell_input_line != (char *)0x0" identifier != (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n        shell_input_line_index = 0;\n        *shell_input_line = '\0';\n      }" { (expression_statement "shell_input_line_index = 0;" (assignment_expression "shell_input_line_index = 0" identifier = number_literal) ;) (expression_statement "*shell_input_line = '\0';" (assignment_expression "*shell_input_line = '\0'" (pointer_expression "*shell_input_line" * identifier) = (char_literal "'\0'" ' escape_sequence ')) ;) })) comment (expression_statement "jump_to_top_level(-iVar5);" (call_expression "jump_to_top_level(-iVar5)" identifier (argument_list "(-iVar5)" ( (unary_expression "-iVar5" - identifier) ))) ;) })) (if_statement "if ((string < ep) && (ep[-1] == '\n')) {\n      pcVar4 = ep + -1;\n      do {\n        ep = pcVar4;\n        if (string == ep) break;\n        pcVar4 = ep + -1;\n      } while (ep[-1] == '\n');\n    }" if (parenthesized_expression "((string < ep) && (ep[-1] == '\n'))" ( (binary_expression "(string < ep) && (ep[-1] == '\n')" (parenthesized_expression "(string < ep)" ( (binary_expression "string < ep" identifier < identifier) )) && (parenthesized_expression "(ep[-1] == '\n')" ( (binary_expression "ep[-1] == '\n'" (subscript_expression "ep[-1]" identifier [ number_literal ]) == (char_literal "'\n'" ' escape_sequence ')) ))) )) (compound_statement "{\n      pcVar4 = ep + -1;\n      do {\n        ep = pcVar4;\n        if (string == ep) break;\n        pcVar4 = ep + -1;\n      } while (ep[-1] == '\n');\n    }" { (expression_statement "pcVar4 = ep + -1;" (assignment_expression "pcVar4 = ep + -1" identifier = (binary_expression "ep + -1" identifier + number_literal)) ;) (do_statement "do {\n        ep = pcVar4;\n        if (string == ep) break;\n        pcVar4 = ep + -1;\n      } while (ep[-1] == '\n');" do (compound_statement "{\n        ep = pcVar4;\n        if (string == ep) break;\n        pcVar4 = ep + -1;\n      }" { (expression_statement "ep = pcVar4;" (assignment_expression "ep = pcVar4" identifier = identifier) ;) (if_statement "if (string == ep) break;" if (parenthesized_expression "(string == ep)" ( (binary_expression "string == ep" identifier == identifier) )) (break_statement "break;" break ;)) (expression_statement "pcVar4 = ep + -1;" (assignment_expression "pcVar4 = ep + -1" identifier = (binary_expression "ep + -1" identifier + number_literal)) ;) }) while (parenthesized_expression "(ep[-1] == '\n')" ( (binary_expression "ep[-1] == '\n'" (subscript_expression "ep[-1]" identifier [ number_literal ]) == (char_literal "'\n'" ' escape_sequence ')) )) ;) })) (expression_statement "*indp = (int)(ep + (-1 - (int)base));" (assignment_expression "*indp = (int)(ep + (-1 - (int)base))" (pointer_expression "*indp" * identifier) = (cast_expression "(int)(ep + (-1 - (int)base))" ( (type_descriptor "int" primitive_type) ) (parenthesized_expression "(ep + (-1 - (int)base))" ( (binary_expression "ep + (-1 - (int)base)" identifier + (parenthesized_expression "(-1 - (int)base)" ( (binary_expression "-1 - (int)base" number_literal - (cast_expression "(int)base" ( (type_descriptor "int" primitive_type) ) identifier)) ))) )))) ;) (if_statement "if ((flags & 1U) != 0) goto LAB_00040ad0;" if (parenthesized_expression "((flags & 1U) != 0)" ( (binary_expression "(flags & 1U) != 0" (parenthesized_expression "(flags & 1U)" ( (binary_expression "flags & 1U" identifier & number_literal) )) != number_literal) )) (goto_statement "goto LAB_00040ad0;" goto statement_identifier ;)) (if_statement "if ((int)ep - (int)string != 0) {\n      pcVar4 = substring(string,0,((int)ep - (int)string) + -1);\n      goto LAB_00040964;\n    }" if (parenthesized_expression "((int)ep - (int)string != 0)" ( (binary_expression "(int)ep - (int)string != 0" (binary_expression "(int)ep - (int)string" (cast_expression "(int)ep" ( (type_descriptor "int" primitive_type) ) identifier) - (cast_expression "(int)string" ( (type_descriptor "int" primitive_type) ) identifier)) != number_literal) )) (compound_statement "{\n      pcVar4 = substring(string,0,((int)ep - (int)string) + -1);\n      goto LAB_00040964;\n    }" { (expression_statement "pcVar4 = substring(string,0,((int)ep - (int)string) + -1);" (assignment_expression "pcVar4 = substring(string,0,((int)ep - (int)string) + -1)" identifier = (call_expression "substring(string,0,((int)ep - (int)string) + -1)" identifier (argument_list "(string,0,((int)ep - (int)string) + -1)" ( identifier , number_literal , (binary_expression "((int)ep - (int)string) + -1" (parenthesized_expression "((int)ep - (int)string)" ( (binary_expression "(int)ep - (int)string" (cast_expression "(int)ep" ( (type_descriptor "int" primitive_type) ) identifier) - (cast_expression "(int)string" ( (type_descriptor "int" primitive_type) ) identifier)) )) + number_literal) )))) ;) (goto_statement "goto LAB_00040964;" goto statement_identifier ;) })) }))) (expression_statement "pcVar4 = (char *)xmalloc(1);" (assignment_expression "pcVar4 = (char *)xmalloc(1)" identifier = (cast_expression "(char *)xmalloc(1)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "xmalloc(1)" identifier (argument_list "(1)" ( number_literal ))))) ;) (expression_statement "*pcVar4 = '\0';" (assignment_expression "*pcVar4 = '\0'" (pointer_expression "*pcVar4" * identifier) = (char_literal "'\0'" ' escape_sequence ')) ;) (labeled_statement "LAB_00040964:\n  if (iVar1 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return pcVar4;\n  }" statement_identifier : (if_statement "if (iVar1 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return pcVar4;\n  }" if (parenthesized_expression "(iVar1 == *(int *)(in_GS_OFFSET + 0x14))" ( (binary_expression "iVar1 == *(int *)(in_GS_OFFSET + 0x14)" identifier == (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) )) (compound_statement "{\n    return pcVar4;\n  }" { (return_statement "return pcVar4;" return identifier ;) }))) comment (expression_statement "__stack_chk_fail_local();" (call_expression "__stack_chk_fail_local()" identifier (argument_list "()" ( ))) ;) })))
(translation_unit "undefined1 * xparse_dolparen(int param_1,char *param_2,undefined4 *param_3,uint param_4)\n\n{\n  undefined4 uVar1;\n  undefined4 uVar2;\n  char *pcVar3;\n  undefined1 *puVar4;\n  int iVar5;\n  int in_GS_OFFSET;\n  char *local_bc;\n  undefined1 local_b8 [16];\n  undefined1 local_a8 [136];\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x40909;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  if (*param_2 == '\0') {\n    if ((param_4 & 1) != 0) {\nLAB_00040ad0:\n      puVar4 = (undefined1 *)0x0;\n      goto LAB_00040964;\n    }\n  }\n  else {\n    save_parser_state(local_a8);\n    save_input_line_state(local_b8);\n    uVar2 = shell_eof_token;\n    uVar1 = pushed_string_list;\n    shell_eof_token = 0x29;\n    pushed_string_list = 0;\n    parser_state = parser_state | 0x8040;\n    iVar5 = parse_string(param_2,"command substitution",\n                         (-(uint)((param_4 & 0x40) == 0) & 0xffffffc0) + 0x4d,&local_bc);\n    if (current_token == shell_eof_token) {\n      yychar = 0xfffffffe;\n    }\n    shell_eof_token = uVar2;\n    restore_parser_state(local_a8);\n    reset_parser();\n    restore_input_line_state(local_b8);\n    DAT_0014e920 = 0;\n    pushed_string_list = uVar1;\n    if (iVar5 < 0) {\n      if (DAT_0014eb74 != (undefined1 *)0x0) {\n        DAT_0014eb70 = 0;\n        *DAT_0014eb74 = 0;\n      }\n                    \n      jump_to_top_level(-iVar5);\n    }\n    if ((param_2 < local_bc) && (local_bc[-1] == '\n')) {\n      pcVar3 = local_bc + -1;\n      do {\n        local_bc = pcVar3;\n        if (param_2 == local_bc) break;\n        pcVar3 = local_bc + -1;\n      } while (local_bc[-1] == '\n');\n    }\n    *param_3 = local_bc + (-1 - param_1);\n    if ((param_4 & 1) != 0) goto LAB_00040ad0;\n    if ((int)local_bc - (int)param_2 != 0) {\n      puVar4 = (undefined1 *)substring(param_2,0,((int)local_bc - (int)param_2) + -1);\n      goto LAB_00040964;\n    }\n  }\n  puVar4 = (undefined1 *)xmalloc(1);\n  *puVar4 = 0;\nLAB_00040964:\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return puVar4;\n  }\n                    \n  FUN_000ecc40();\n}\n\n" (function_definition "undefined1 * xparse_dolparen(int param_1,char *param_2,undefined4 *param_3,uint param_4)\n\n{\n  undefined4 uVar1;\n  undefined4 uVar2;\n  char *pcVar3;\n  undefined1 *puVar4;\n  int iVar5;\n  int in_GS_OFFSET;\n  char *local_bc;\n  undefined1 local_b8 [16];\n  undefined1 local_a8 [136];\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x40909;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  if (*param_2 == '\0') {\n    if ((param_4 & 1) != 0) {\nLAB_00040ad0:\n      puVar4 = (undefined1 *)0x0;\n      goto LAB_00040964;\n    }\n  }\n  else {\n    save_parser_state(local_a8);\n    save_input_line_state(local_b8);\n    uVar2 = shell_eof_token;\n    uVar1 = pushed_string_list;\n    shell_eof_token = 0x29;\n    pushed_string_list = 0;\n    parser_state = parser_state | 0x8040;\n    iVar5 = parse_string(param_2,"command substitution",\n                         (-(uint)((param_4 & 0x40) == 0) & 0xffffffc0) + 0x4d,&local_bc);\n    if (current_token == shell_eof_token) {\n      yychar = 0xfffffffe;\n    }\n    shell_eof_token = uVar2;\n    restore_parser_state(local_a8);\n    reset_parser();\n    restore_input_line_state(local_b8);\n    DAT_0014e920 = 0;\n    pushed_string_list = uVar1;\n    if (iVar5 < 0) {\n      if (DAT_0014eb74 != (undefined1 *)0x0) {\n        DAT_0014eb70 = 0;\n        *DAT_0014eb74 = 0;\n      }\n                    \n      jump_to_top_level(-iVar5);\n    }\n    if ((param_2 < local_bc) && (local_bc[-1] == '\n')) {\n      pcVar3 = local_bc + -1;\n      do {\n        local_bc = pcVar3;\n        if (param_2 == local_bc) break;\n        pcVar3 = local_bc + -1;\n      } while (local_bc[-1] == '\n');\n    }\n    *param_3 = local_bc + (-1 - param_1);\n    if ((param_4 & 1) != 0) goto LAB_00040ad0;\n    if ((int)local_bc - (int)param_2 != 0) {\n      puVar4 = (undefined1 *)substring(param_2,0,((int)local_bc - (int)param_2) + -1);\n      goto LAB_00040964;\n    }\n  }\n  puVar4 = (undefined1 *)xmalloc(1);\n  *puVar4 = 0;\nLAB_00040964:\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return puVar4;\n  }\n                    \n  FUN_000ecc40();\n}" type_identifier (pointer_declarator "* xparse_dolparen(int param_1,char *param_2,undefined4 *param_3,uint param_4)" * (function_declarator "xparse_dolparen(int param_1,char *param_2,undefined4 *param_3,uint param_4)" identifier (parameter_list "(int param_1,char *param_2,undefined4 *param_3,uint param_4)" ( (parameter_declaration "int param_1" primitive_type identifier) , (parameter_declaration "char *param_2" primitive_type (pointer_declarator "*param_2" * identifier)) , (parameter_declaration "undefined4 *param_3" type_identifier (pointer_declarator "*param_3" * identifier)) , (parameter_declaration "uint param_4" type_identifier identifier) )))) (compound_statement "{\n  undefined4 uVar1;\n  undefined4 uVar2;\n  char *pcVar3;\n  undefined1 *puVar4;\n  int iVar5;\n  int in_GS_OFFSET;\n  char *local_bc;\n  undefined1 local_b8 [16];\n  undefined1 local_a8 [136];\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x40909;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  if (*param_2 == '\0') {\n    if ((param_4 & 1) != 0) {\nLAB_00040ad0:\n      puVar4 = (undefined1 *)0x0;\n      goto LAB_00040964;\n    }\n  }\n  else {\n    save_parser_state(local_a8);\n    save_input_line_state(local_b8);\n    uVar2 = shell_eof_token;\n    uVar1 = pushed_string_list;\n    shell_eof_token = 0x29;\n    pushed_string_list = 0;\n    parser_state = parser_state | 0x8040;\n    iVar5 = parse_string(param_2,"command substitution",\n                         (-(uint)((param_4 & 0x40) == 0) & 0xffffffc0) + 0x4d,&local_bc);\n    if (current_token == shell_eof_token) {\n      yychar = 0xfffffffe;\n    }\n    shell_eof_token = uVar2;\n    restore_parser_state(local_a8);\n    reset_parser();\n    restore_input_line_state(local_b8);\n    DAT_0014e920 = 0;\n    pushed_string_list = uVar1;\n    if (iVar5 < 0) {\n      if (DAT_0014eb74 != (undefined1 *)0x0) {\n        DAT_0014eb70 = 0;\n        *DAT_0014eb74 = 0;\n      }\n                    \n      jump_to_top_level(-iVar5);\n    }\n    if ((param_2 < local_bc) && (local_bc[-1] == '\n')) {\n      pcVar3 = local_bc + -1;\n      do {\n        local_bc = pcVar3;\n        if (param_2 == local_bc) break;\n        pcVar3 = local_bc + -1;\n      } while (local_bc[-1] == '\n');\n    }\n    *param_3 = local_bc + (-1 - param_1);\n    if ((param_4 & 1) != 0) goto LAB_00040ad0;\n    if ((int)local_bc - (int)param_2 != 0) {\n      puVar4 = (undefined1 *)substring(param_2,0,((int)local_bc - (int)param_2) + -1);\n      goto LAB_00040964;\n    }\n  }\n  puVar4 = (undefined1 *)xmalloc(1);\n  *puVar4 = 0;\nLAB_00040964:\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return puVar4;\n  }\n                    \n  FUN_000ecc40();\n}" { (declaration "undefined4 uVar1;" type_identifier identifier ;) (declaration "undefined4 uVar2;" type_identifier identifier ;) (declaration "char *pcVar3;" primitive_type (pointer_declarator "*pcVar3" * identifier) ;) (declaration "undefined1 *puVar4;" type_identifier (pointer_declarator "*puVar4" * identifier) ;) (declaration "int iVar5;" primitive_type identifier ;) (declaration "int in_GS_OFFSET;" primitive_type identifier ;) (declaration "char *local_bc;" primitive_type (pointer_declarator "*local_bc" * identifier) ;) (declaration "undefined1 local_b8 [16];" type_identifier (array_declarator "local_b8 [16]" identifier [ number_literal ]) ;) (declaration "undefined1 local_a8 [136];" type_identifier (array_declarator "local_a8 [136]" identifier [ number_literal ]) ;) (declaration "int local_20;" primitive_type identifier ;) (declaration "undefined4 uStack_14;" type_identifier identifier ;) (expression_statement "uStack_14 = 0x40909;" (assignment_expression "uStack_14 = 0x40909" identifier = number_literal) ;) (expression_statement "local_20 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "local_20 = *(int *)(in_GS_OFFSET + 0x14)" identifier = (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) ;) (if_statement "if (*param_2 == '\0') {\n    if ((param_4 & 1) != 0) {\nLAB_00040ad0:\n      puVar4 = (undefined1 *)0x0;\n      goto LAB_00040964;\n    }\n  }\n  else {\n    save_parser_state(local_a8);\n    save_input_line_state(local_b8);\n    uVar2 = shell_eof_token;\n    uVar1 = pushed_string_list;\n    shell_eof_token = 0x29;\n    pushed_string_list = 0;\n    parser_state = parser_state | 0x8040;\n    iVar5 = parse_string(param_2,"command substitution",\n                         (-(uint)((param_4 & 0x40) == 0) & 0xffffffc0) + 0x4d,&local_bc);\n    if (current_token == shell_eof_token) {\n      yychar = 0xfffffffe;\n    }\n    shell_eof_token = uVar2;\n    restore_parser_state(local_a8);\n    reset_parser();\n    restore_input_line_state(local_b8);\n    DAT_0014e920 = 0;\n    pushed_string_list = uVar1;\n    if (iVar5 < 0) {\n      if (DAT_0014eb74 != (undefined1 *)0x0) {\n        DAT_0014eb70 = 0;\n        *DAT_0014eb74 = 0;\n      }\n                    \n      jump_to_top_level(-iVar5);\n    }\n    if ((param_2 < local_bc) && (local_bc[-1] == '\n')) {\n      pcVar3 = local_bc + -1;\n      do {\n        local_bc = pcVar3;\n        if (param_2 == local_bc) break;\n        pcVar3 = local_bc + -1;\n      } while (local_bc[-1] == '\n');\n    }\n    *param_3 = local_bc + (-1 - param_1);\n    if ((param_4 & 1) != 0) goto LAB_00040ad0;\n    if ((int)local_bc - (int)param_2 != 0) {\n      puVar4 = (undefined1 *)substring(param_2,0,((int)local_bc - (int)param_2) + -1);\n      goto LAB_00040964;\n    }\n  }" if (parenthesized_expression "(*param_2 == '\0')" ( (binary_expression "*param_2 == '\0'" (pointer_expression "*param_2" * identifier) == (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\n    if ((param_4 & 1) != 0) {\nLAB_00040ad0:\n      puVar4 = (undefined1 *)0x0;\n      goto LAB_00040964;\n    }\n  }" { (if_statement "if ((param_4 & 1) != 0) {\nLAB_00040ad0:\n      puVar4 = (undefined1 *)0x0;\n      goto LAB_00040964;\n    }" if (parenthesized_expression "((param_4 & 1) != 0)" ( (binary_expression "(param_4 & 1) != 0" (parenthesized_expression "(param_4 & 1)" ( (binary_expression "param_4 & 1" identifier & number_literal) )) != number_literal) )) (compound_statement "{\nLAB_00040ad0:\n      puVar4 = (undefined1 *)0x0;\n      goto LAB_00040964;\n    }" { (labeled_statement "LAB_00040ad0:\n      puVar4 = (undefined1 *)0x0;" statement_identifier : (expression_statement "puVar4 = (undefined1 *)0x0;" (assignment_expression "puVar4 = (undefined1 *)0x0" identifier = (cast_expression "(undefined1 *)0x0" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) ;)) (goto_statement "goto LAB_00040964;" goto statement_identifier ;) })) }) (else_clause "else {\n    save_parser_state(local_a8);\n    save_input_line_state(local_b8);\n    uVar2 = shell_eof_token;\n    uVar1 = pushed_string_list;\n    shell_eof_token = 0x29;\n    pushed_string_list = 0;\n    parser_state = parser_state | 0x8040;\n    iVar5 = parse_string(param_2,"command substitution",\n                         (-(uint)((param_4 & 0x40) == 0) & 0xffffffc0) + 0x4d,&local_bc);\n    if (current_token == shell_eof_token) {\n      yychar = 0xfffffffe;\n    }\n    shell_eof_token = uVar2;\n    restore_parser_state(local_a8);\n    reset_parser();\n    restore_input_line_state(local_b8);\n    DAT_0014e920 = 0;\n    pushed_string_list = uVar1;\n    if (iVar5 < 0) {\n      if (DAT_0014eb74 != (undefined1 *)0x0) {\n        DAT_0014eb70 = 0;\n        *DAT_0014eb74 = 0;\n      }\n                    \n      jump_to_top_level(-iVar5);\n    }\n    if ((param_2 < local_bc) && (local_bc[-1] == '\n')) {\n      pcVar3 = local_bc + -1;\n      do {\n        local_bc = pcVar3;\n        if (param_2 == local_bc) break;\n        pcVar3 = local_bc + -1;\n      } while (local_bc[-1] == '\n');\n    }\n    *param_3 = local_bc + (-1 - param_1);\n    if ((param_4 & 1) != 0) goto LAB_00040ad0;\n    if ((int)local_bc - (int)param_2 != 0) {\n      puVar4 = (undefined1 *)substring(param_2,0,((int)local_bc - (int)param_2) + -1);\n      goto LAB_00040964;\n    }\n  }" else (compound_statement "{\n    save_parser_state(local_a8);\n    save_input_line_state(local_b8);\n    uVar2 = shell_eof_token;\n    uVar1 = pushed_string_list;\n    shell_eof_token = 0x29;\n    pushed_string_list = 0;\n    parser_state = parser_state | 0x8040;\n    iVar5 = parse_string(param_2,"command substitution",\n                         (-(uint)((param_4 & 0x40) == 0) & 0xffffffc0) + 0x4d,&local_bc);\n    if (current_token == shell_eof_token) {\n      yychar = 0xfffffffe;\n    }\n    shell_eof_token = uVar2;\n    restore_parser_state(local_a8);\n    reset_parser();\n    restore_input_line_state(local_b8);\n    DAT_0014e920 = 0;\n    pushed_string_list = uVar1;\n    if (iVar5 < 0) {\n      if (DAT_0014eb74 != (undefined1 *)0x0) {\n        DAT_0014eb70 = 0;\n        *DAT_0014eb74 = 0;\n      }\n                    \n      jump_to_top_level(-iVar5);\n    }\n    if ((param_2 < local_bc) && (local_bc[-1] == '\n')) {\n      pcVar3 = local_bc + -1;\n      do {\n        local_bc = pcVar3;\n        if (param_2 == local_bc) break;\n        pcVar3 = local_bc + -1;\n      } while (local_bc[-1] == '\n');\n    }\n    *param_3 = local_bc + (-1 - param_1);\n    if ((param_4 & 1) != 0) goto LAB_00040ad0;\n    if ((int)local_bc - (int)param_2 != 0) {\n      puVar4 = (undefined1 *)substring(param_2,0,((int)local_bc - (int)param_2) + -1);\n      goto LAB_00040964;\n    }\n  }" { (expression_statement "save_parser_state(local_a8);" (call_expression "save_parser_state(local_a8)" identifier (argument_list "(local_a8)" ( identifier ))) ;) (expression_statement "save_input_line_state(local_b8);" (call_expression "save_input_line_state(local_b8)" identifier (argument_list "(local_b8)" ( identifier ))) ;) (expression_statement "uVar2 = shell_eof_token;" (assignment_expression "uVar2 = shell_eof_token" identifier = identifier) ;) (expression_statement "uVar1 = pushed_string_list;" (assignment_expression "uVar1 = pushed_string_list" identifier = identifier) ;) (expression_statement "shell_eof_token = 0x29;" (assignment_expression "shell_eof_token = 0x29" identifier = number_literal) ;) (expression_statement "pushed_string_list = 0;" (assignment_expression "pushed_string_list = 0" identifier = number_literal) ;) (expression_statement "parser_state = parser_state | 0x8040;" (assignment_expression "parser_state = parser_state | 0x8040" identifier = (binary_expression "parser_state | 0x8040" identifier | number_literal)) ;) (expression_statement "iVar5 = parse_string(param_2,"command substitution",\n                         (-(uint)((param_4 & 0x40) == 0) & 0xffffffc0) + 0x4d,&local_bc);" (assignment_expression "iVar5 = parse_string(param_2,"command substitution",\n                         (-(uint)((param_4 & 0x40) == 0) & 0xffffffc0) + 0x4d,&local_bc)" identifier = (call_expression "parse_string(param_2,"command substitution",\n                         (-(uint)((param_4 & 0x40) == 0) & 0xffffffc0) + 0x4d,&local_bc)" identifier (argument_list "(param_2,"command substitution",\n                         (-(uint)((param_4 & 0x40) == 0) & 0xffffffc0) + 0x4d,&local_bc)" ( identifier , (string_literal ""command substitution"" " string_content ") , (binary_expression "(-(uint)((param_4 & 0x40) == 0) & 0xffffffc0) + 0x4d" (parenthesized_expression "(-(uint)((param_4 & 0x40) == 0) & 0xffffffc0)" ( (binary_expression "-(uint)((param_4 & 0x40) == 0) & 0xffffffc0" (unary_expression "-(uint)((param_4 & 0x40) == 0)" - (call_expression "(uint)((param_4 & 0x40) == 0)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "((param_4 & 0x40) == 0)" ( (binary_expression "(param_4 & 0x40) == 0" (parenthesized_expression "(param_4 & 0x40)" ( (binary_expression "param_4 & 0x40" identifier & number_literal) )) == number_literal) )))) & number_literal) )) + number_literal) , (pointer_expression "&local_bc" & identifier) )))) ;) (if_statement "if (current_token == shell_eof_token) {\n      yychar = 0xfffffffe;\n    }" if (parenthesized_expression "(current_token == shell_eof_token)" ( (binary_expression "current_token == shell_eof_token" identifier == identifier) )) (compound_statement "{\n      yychar = 0xfffffffe;\n    }" { (expression_statement "yychar = 0xfffffffe;" (assignment_expression "yychar = 0xfffffffe" identifier = number_literal) ;) })) (expression_statement "shell_eof_token = uVar2;" (assignment_expression "shell_eof_token = uVar2" identifier = identifier) ;) (expression_statement "restore_parser_state(local_a8);" (call_expression "restore_parser_state(local_a8)" identifier (argument_list "(local_a8)" ( identifier ))) ;) (expression_statement "reset_parser();" (call_expression "reset_parser()" identifier (argument_list "()" ( ))) ;) (expression_statement "restore_input_line_state(local_b8);" (call_expression "restore_input_line_state(local_b8)" identifier (argument_list "(local_b8)" ( identifier ))) ;) (expression_statement "DAT_0014e920 = 0;" (assignment_expression "DAT_0014e920 = 0" identifier = number_literal) ;) (expression_statement "pushed_string_list = uVar1;" (assignment_expression "pushed_string_list = uVar1" identifier = identifier) ;) (if_statement "if (iVar5 < 0) {\n      if (DAT_0014eb74 != (undefined1 *)0x0) {\n        DAT_0014eb70 = 0;\n        *DAT_0014eb74 = 0;\n      }\n                    \n      jump_to_top_level(-iVar5);\n    }" if (parenthesized_expression "(iVar5 < 0)" ( (binary_expression "iVar5 < 0" identifier < number_literal) )) (compound_statement "{\n      if (DAT_0014eb74 != (undefined1 *)0x0) {\n        DAT_0014eb70 = 0;\n        *DAT_0014eb74 = 0;\n      }\n                    \n      jump_to_top_level(-iVar5);\n    }" { (if_statement "if (DAT_0014eb74 != (undefined1 *)0x0) {\n        DAT_0014eb70 = 0;\n        *DAT_0014eb74 = 0;\n      }" if (parenthesized_expression "(DAT_0014eb74 != (undefined1 *)0x0)" ( (binary_expression "DAT_0014eb74 != (undefined1 *)0x0" identifier != (cast_expression "(undefined1 *)0x0" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n        DAT_0014eb70 = 0;\n        *DAT_0014eb74 = 0;\n      }" { (expression_statement "DAT_0014eb70 = 0;" (assignment_expression "DAT_0014eb70 = 0" identifier = number_literal) ;) (expression_statement "*DAT_0014eb74 = 0;" (assignment_expression "*DAT_0014eb74 = 0" (pointer_expression "*DAT_0014eb74" * identifier) = number_literal) ;) })) (expression_statement "jump_to_top_level(-iVar5);" (call_expression "jump_to_top_level(-iVar5)" identifier (argument_list "(-iVar5)" ( (unary_expression "-iVar5" - identifier) ))) ;) })) (if_statement "if ((param_2 < local_bc) && (local_bc[-1] == '\n')) {\n      pcVar3 = local_bc + -1;\n      do {\n        local_bc = pcVar3;\n        if (param_2 == local_bc) break;\n        pcVar3 = local_bc + -1;\n      } while (local_bc[-1] == '\n');\n    }" if (parenthesized_expression "((param_2 < local_bc) && (local_bc[-1] == '\n'))" ( (binary_expression "(param_2 < local_bc) && (local_bc[-1] == '\n')" (parenthesized_expression "(param_2 < local_bc)" ( (binary_expression "param_2 < local_bc" identifier < identifier) )) && (parenthesized_expression "(local_bc[-1] == '\n')" ( (binary_expression "local_bc[-1] == '\n'" (subscript_expression "local_bc[-1]" identifier [ number_literal ]) == (char_literal "'\n'" ' escape_sequence ')) ))) )) (compound_statement "{\n      pcVar3 = local_bc + -1;\n      do {\n        local_bc = pcVar3;\n        if (param_2 == local_bc) break;\n        pcVar3 = local_bc + -1;\n      } while (local_bc[-1] == '\n');\n    }" { (expression_statement "pcVar3 = local_bc + -1;" (assignment_expression "pcVar3 = local_bc + -1" identifier = (binary_expression "local_bc + -1" identifier + number_literal)) ;) (do_statement "do {\n        local_bc = pcVar3;\n        if (param_2 == local_bc) break;\n        pcVar3 = local_bc + -1;\n      } while (local_bc[-1] == '\n');" do (compound_statement "{\n        local_bc = pcVar3;\n        if (param_2 == local_bc) break;\n        pcVar3 = local_bc + -1;\n      }" { (expression_statement "local_bc = pcVar3;" (assignment_expression "local_bc = pcVar3" identifier = identifier) ;) (if_statement "if (param_2 == local_bc) break;" if (parenthesized_expression "(param_2 == local_bc)" ( (binary_expression "param_2 == local_bc" identifier == identifier) )) (break_statement "break;" break ;)) (expression_statement "pcVar3 = local_bc + -1;" (assignment_expression "pcVar3 = local_bc + -1" identifier = (binary_expression "local_bc + -1" identifier + number_literal)) ;) }) while (parenthesized_expression "(local_bc[-1] == '\n')" ( (binary_expression "local_bc[-1] == '\n'" (subscript_expression "local_bc[-1]" identifier [ number_literal ]) == (char_literal "'\n'" ' escape_sequence ')) )) ;) })) (expression_statement "*param_3 = local_bc + (-1 - param_1);" (assignment_expression "*param_3 = local_bc + (-1 - param_1)" (pointer_expression "*param_3" * identifier) = (binary_expression "local_bc + (-1 - param_1)" identifier + (parenthesized_expression "(-1 - param_1)" ( (binary_expression "-1 - param_1" number_literal - identifier) )))) ;) (if_statement "if ((param_4 & 1) != 0) goto LAB_00040ad0;" if (parenthesized_expression "((param_4 & 1) != 0)" ( (binary_expression "(param_4 & 1) != 0" (parenthesized_expression "(param_4 & 1)" ( (binary_expression "param_4 & 1" identifier & number_literal) )) != number_literal) )) (goto_statement "goto LAB_00040ad0;" goto statement_identifier ;)) (if_statement "if ((int)local_bc - (int)param_2 != 0) {\n      puVar4 = (undefined1 *)substring(param_2,0,((int)local_bc - (int)param_2) + -1);\n      goto LAB_00040964;\n    }" if (parenthesized_expression "((int)local_bc - (int)param_2 != 0)" ( (binary_expression "(int)local_bc - (int)param_2 != 0" (binary_expression "(int)local_bc - (int)param_2" (cast_expression "(int)local_bc" ( (type_descriptor "int" primitive_type) ) identifier) - (cast_expression "(int)param_2" ( (type_descriptor "int" primitive_type) ) identifier)) != number_literal) )) (compound_statement "{\n      puVar4 = (undefined1 *)substring(param_2,0,((int)local_bc - (int)param_2) + -1);\n      goto LAB_00040964;\n    }" { (expression_statement "puVar4 = (undefined1 *)substring(param_2,0,((int)local_bc - (int)param_2) + -1);" (assignment_expression "puVar4 = (undefined1 *)substring(param_2,0,((int)local_bc - (int)param_2) + -1)" identifier = (cast_expression "(undefined1 *)substring(param_2,0,((int)local_bc - (int)param_2) + -1)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "substring(param_2,0,((int)local_bc - (int)param_2) + -1)" identifier (argument_list "(param_2,0,((int)local_bc - (int)param_2) + -1)" ( identifier , number_literal , (binary_expression "((int)local_bc - (int)param_2) + -1" (parenthesized_expression "((int)local_bc - (int)param_2)" ( (binary_expression "(int)local_bc - (int)param_2" (cast_expression "(int)local_bc" ( (type_descriptor "int" primitive_type) ) identifier) - (cast_expression "(int)param_2" ( (type_descriptor "int" primitive_type) ) identifier)) )) + number_literal) ))))) ;) (goto_statement "goto LAB_00040964;" goto statement_identifier ;) })) }))) (expression_statement "puVar4 = (undefined1 *)xmalloc(1);" (assignment_expression "puVar4 = (undefined1 *)xmalloc(1)" identifier = (cast_expression "(undefined1 *)xmalloc(1)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "xmalloc(1)" identifier (argument_list "(1)" ( number_literal ))))) ;) (expression_statement "*puVar4 = 0;" (assignment_expression "*puVar4 = 0" (pointer_expression "*puVar4" * identifier) = number_literal) ;) (labeled_statement "LAB_00040964:\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return puVar4;\n  }" statement_identifier : (if_statement "if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return puVar4;\n  }" if (parenthesized_expression "(local_20 == *(int *)(in_GS_OFFSET + 0x14))" ( (binary_expression "local_20 == *(int *)(in_GS_OFFSET + 0x14)" identifier == (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) )) (compound_statement "{\n    return puVar4;\n  }" { (return_statement "return puVar4;" return identifier ;) }))) (expression_statement "FUN_000ecc40();" (call_expression "FUN_000ecc40()" identifier (argument_list "()" ( ))) ;) })))
(translation_unit (function_definition TYPE (pointer_declarator * (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE (pointer_declarator * IDENT)) , (parameter_declaration TYPE (pointer_declarator * IDENT)) , (parameter_declaration TYPE IDENT) )))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE (array_declarator IDENT [ LIT ]) ;) (declaration TYPE (array_declarator IDENT [ LIT ]) ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (if_statement if (parenthesized_expression ( (binary_expression (pointer_expression * IDENT) == (char_literal ' escape_sequence ')) )) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT & LIT) )) != LIT) )) (compound_statement { (labeled_statement statement_identifier : (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) ;)) (goto_statement goto statement_identifier ;) })) }) (else_clause else (compound_statement { (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT | LIT)) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , (string_literal " string_content ") , (binary_expression (parenthesized_expression ( (binary_expression (unary_expression - (call_expression (parenthesized_expression ( IDENT )) (argument_list ( (binary_expression (parenthesized_expression ( (binary_expression IDENT & LIT) )) == LIT) )))) & LIT) )) + LIT) , (pointer_expression & IDENT) )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == IDENT) )) (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) })) (expression_statement (assignment_expression IDENT = IDENT) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) (expression_statement (call_expression IDENT (argument_list ( ))) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT < LIT) )) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression IDENT != (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = LIT) ;) })) (expression_statement (call_expression IDENT (argument_list ( (unary_expression - IDENT) ))) ;) })) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT < IDENT) )) && (parenthesized_expression ( (binary_expression (subscript_expression IDENT [ LIT ]) == (char_literal ' escape_sequence ')) ))) )) (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (do_statement do (compound_statement { (expression_statement (assignment_expression IDENT = IDENT) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == IDENT) )) (break_statement break ;)) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) }) while (parenthesized_expression ( (binary_expression (subscript_expression IDENT [ LIT ]) == (char_literal ' escape_sequence ')) )) ;) })) (expression_statement (assignment_expression (pointer_expression * IDENT) = (binary_expression IDENT + (parenthesized_expression ( (binary_expression LIT - IDENT) )))) ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT & LIT) )) != LIT) )) (goto_statement goto statement_identifier ;)) (if_statement if (parenthesized_expression ( (binary_expression (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) - (cast_expression ( (type_descriptor TYPE) ) IDENT)) != LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (call_expression IDENT (argument_list ( IDENT , LIT , (binary_expression (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) - (cast_expression ( (type_descriptor TYPE) ) IDENT)) )) + LIT) ))))) ;) (goto_statement goto statement_identifier ;) })) }))) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (call_expression IDENT (argument_list ( LIT ))))) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = LIT) ;) (labeled_statement statement_identifier : (if_statement if (parenthesized_expression ( (binary_expression IDENT == (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) )) (compound_statement { (return_statement return IDENT ;) }))) (expression_statement (call_expression IDENT (argument_list ( ))) ;) })))
(function_definition "undefined1 * xparse_dolparen(int param_1,char *param_2,undefined4 *param_3,uint param_4)\n\n{\n  undefined4 uVar1;\n  undefined4 uVar2;\n  char *pcVar3;\n  undefined1 *puVar4;\n  int iVar5;\n  int in_GS_OFFSET;\n  char *local_bc;\n  undefined1 local_b8 [16];\n  undefined1 local_a8 [136];\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x40909;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  if (*param_2 == '\0') {\n    if ((param_4 & 1) != 0) {\nLAB_00040ad0:\n      puVar4 = (undefined1 *)0x0;\n      goto LAB_00040964;\n    }\n  }\n  else {\n    save_parser_state(local_a8);\n    save_input_line_state(local_b8);\n    uVar2 = shell_eof_token;\n    uVar1 = pushed_string_list;\n    shell_eof_token = 0x29;\n    pushed_string_list = 0;\n    parser_state = parser_state | 0x8040;\n    iVar5 = parse_string(param_2,"command substitution",\n                         (-(uint)((param_4 & 0x40) == 0) & 0xffffffc0) + 0x4d,&local_bc);\n    if (current_token == shell_eof_token) {\n      yychar = 0xfffffffe;\n    }\n    shell_eof_token = uVar2;\n    restore_parser_state(local_a8);\n    reset_parser();\n    restore_input_line_state(local_b8);\n    DAT_0014e920 = 0;\n    pushed_string_list = uVar1;\n    if (iVar5 < 0) {\n      if (DAT_0014eb74 != (undefined1 *)0x0) {\n        DAT_0014eb70 = 0;\n        *DAT_0014eb74 = 0;\n      }\n                    \n      jump_to_top_level(-iVar5);\n    }\n    if ((param_2 < local_bc) && (local_bc[-1] == '\n')) {\n      pcVar3 = local_bc + -1;\n      do {\n        local_bc = pcVar3;\n        if (param_2 == local_bc) break;\n        pcVar3 = local_bc + -1;\n      } while (local_bc[-1] == '\n');\n    }\n    *param_3 = local_bc + (-1 - param_1);\n    if ((param_4 & 1) != 0) goto LAB_00040ad0;\n    if ((int)local_bc - (int)param_2 != 0) {\n      puVar4 = (undefined1 *)substring(param_2,0,((int)local_bc - (int)param_2) + -1);\n      goto LAB_00040964;\n    }\n  }\n  puVar4 = (undefined1 *)xmalloc(1);\n  *puVar4 = 0;\nLAB_00040964:\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return puVar4;\n  }\n                    \n  FUN_000ecc40();\n}" (type_identifier "undefined1") (pointer_declarator "* xparse_dolparen(int param_1,char *param_2,undefined4 *param_3,uint param_4)" (* "*") (function_declarator "xparse_dolparen(int param_1,char *param_2,undefined4 *param_3,uint param_4)" (identifier "xparse_dolparen") (parameter_list "(int param_1,char *param_2,undefined4 *param_3,uint param_4)" (( "(") (parameter_declaration "int param_1" (primitive_type "int") (identifier "param_1")) (, ",") (parameter_declaration "char *param_2" (primitive_type "char") (pointer_declarator "*param_2" (* "*") (identifier "param_2"))) (, ",") (parameter_declaration "undefined4 *param_3" (type_identifier "undefined4") (pointer_declarator "*param_3" (* "*") (identifier "param_3"))) (, ",") (parameter_declaration "uint param_4" (type_identifier "uint") (identifier "param_4")) () ")")))) (compound_statement "{\n  undefined4 uVar1;\n  undefined4 uVar2;\n  char *pcVar3;\n  undefined1 *puVar4;\n  int iVar5;\n  int in_GS_OFFSET;\n  char *local_bc;\n  undefined1 local_b8 [16];\n  undefined1 local_a8 [136];\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x40909;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  if (*param_2 == '\0') {\n    if ((param_4 & 1) != 0) {\nLAB_00040ad0:\n      puVar4 = (undefined1 *)0x0;\n      goto LAB_00040964;\n    }\n  }\n  else {\n    save_parser_state(local_a8);\n    save_input_line_state(local_b8);\n    uVar2 = shell_eof_token;\n    uVar1 = pushed_string_list;\n    shell_eof_token = 0x29;\n    pushed_string_list = 0;\n    parser_state = parser_state | 0x8040;\n    iVar5 = parse_string(param_2,"command substitution",\n                         (-(uint)((param_4 & 0x40) == 0) & 0xffffffc0) + 0x4d,&local_bc);\n    if (current_token == shell_eof_token) {\n      yychar = 0xfffffffe;\n    }\n    shell_eof_token = uVar2;\n    restore_parser_state(local_a8);\n    reset_parser();\n    restore_input_line_state(local_b8);\n    DAT_0014e920 = 0;\n    pushed_string_list = uVar1;\n    if (iVar5 < 0) {\n      if (DAT_0014eb74 != (undefined1 *)0x0) {\n        DAT_0014eb70 = 0;\n        *DAT_0014eb74 = 0;\n      }\n                    \n      jump_to_top_level(-iVar5);\n    }\n    if ((param_2 < local_bc) && (local_bc[-1] == '\n')) {\n      pcVar3 = local_bc + -1;\n      do {\n        local_bc = pcVar3;\n        if (param_2 == local_bc) break;\n        pcVar3 = local_bc + -1;\n      } while (local_bc[-1] == '\n');\n    }\n    *param_3 = local_bc + (-1 - param_1);\n    if ((param_4 & 1) != 0) goto LAB_00040ad0;\n    if ((int)local_bc - (int)param_2 != 0) {\n      puVar4 = (undefined1 *)substring(param_2,0,((int)local_bc - (int)param_2) + -1);\n      goto LAB_00040964;\n    }\n  }\n  puVar4 = (undefined1 *)xmalloc(1);\n  *puVar4 = 0;\nLAB_00040964:\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return puVar4;\n  }\n                    \n  FUN_000ecc40();\n}" ({ "{") (declaration "undefined4 uVar1;" (type_identifier "undefined4") (identifier "uVar1") (; ";")) (declaration "undefined4 uVar2;" (type_identifier "undefined4") (identifier "uVar2") (; ";")) (declaration "char *pcVar3;" (primitive_type "char") (pointer_declarator "*pcVar3" (* "*") (identifier "pcVar3")) (; ";")) (declaration "undefined1 *puVar4;" (type_identifier "undefined1") (pointer_declarator "*puVar4" (* "*") (identifier "puVar4")) (; ";")) (declaration "int iVar5;" (primitive_type "int") (identifier "iVar5") (; ";")) (declaration "int in_GS_OFFSET;" (primitive_type "int") (identifier "in_GS_OFFSET") (; ";")) (declaration "char *local_bc;" (primitive_type "char") (pointer_declarator "*local_bc" (* "*") (identifier "local_bc")) (; ";")) (declaration "undefined1 local_b8 [16];" (type_identifier "undefined1") (array_declarator "local_b8 [16]" (identifier "local_b8") ([ "[") (number_literal "16") (] "]")) (; ";")) (declaration "undefined1 local_a8 [136];" (type_identifier "undefined1") (array_declarator "local_a8 [136]" (identifier "local_a8") ([ "[") (number_literal "136") (] "]")) (; ";")) (declaration "int local_20;" (primitive_type "int") (identifier "local_20") (; ";")) (declaration "undefined4 uStack_14;" (type_identifier "undefined4") (identifier "uStack_14") (; ";")) (expression_statement "uStack_14 = 0x40909;" (assignment_expression "uStack_14 = 0x40909" (identifier "uStack_14") (= "=") (number_literal "0x40909")) (; ";")) (expression_statement "local_20 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "local_20 = *(int *)(in_GS_OFFSET + 0x14)" (identifier "local_20") (= "=") (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" (* "*") (cast_expression "(int *)(in_GS_OFFSET + 0x14)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(in_GS_OFFSET + 0x14)" (( "(") (binary_expression "in_GS_OFFSET + 0x14" (identifier "in_GS_OFFSET") (+ "+") (number_literal "0x14")) () ")"))))) (; ";")) (if_statement "if (*param_2 == '\0') {\n    if ((param_4 & 1) != 0) {\nLAB_00040ad0:\n      puVar4 = (undefined1 *)0x0;\n      goto LAB_00040964;\n    }\n  }\n  else {\n    save_parser_state(local_a8);\n    save_input_line_state(local_b8);\n    uVar2 = shell_eof_token;\n    uVar1 = pushed_string_list;\n    shell_eof_token = 0x29;\n    pushed_string_list = 0;\n    parser_state = parser_state | 0x8040;\n    iVar5 = parse_string(param_2,"command substitution",\n                         (-(uint)((param_4 & 0x40) == 0) & 0xffffffc0) + 0x4d,&local_bc);\n    if (current_token == shell_eof_token) {\n      yychar = 0xfffffffe;\n    }\n    shell_eof_token = uVar2;\n    restore_parser_state(local_a8);\n    reset_parser();\n    restore_input_line_state(local_b8);\n    DAT_0014e920 = 0;\n    pushed_string_list = uVar1;\n    if (iVar5 < 0) {\n      if (DAT_0014eb74 != (undefined1 *)0x0) {\n        DAT_0014eb70 = 0;\n        *DAT_0014eb74 = 0;\n      }\n                    \n      jump_to_top_level(-iVar5);\n    }\n    if ((param_2 < local_bc) && (local_bc[-1] == '\n')) {\n      pcVar3 = local_bc + -1;\n      do {\n        local_bc = pcVar3;\n        if (param_2 == local_bc) break;\n        pcVar3 = local_bc + -1;\n      } while (local_bc[-1] == '\n');\n    }\n    *param_3 = local_bc + (-1 - param_1);\n    if ((param_4 & 1) != 0) goto LAB_00040ad0;\n    if ((int)local_bc - (int)param_2 != 0) {\n      puVar4 = (undefined1 *)substring(param_2,0,((int)local_bc - (int)param_2) + -1);\n      goto LAB_00040964;\n    }\n  }" (if "if") (parenthesized_expression "(*param_2 == '\0')" (( "(") (binary_expression "*param_2 == '\0'" (pointer_expression "*param_2" (* "*") (identifier "param_2")) (== "==") (char_literal "'\0'" (' "'") (escape_sequence "\0") (' "'"))) () ")")) (compound_statement "{\n    if ((param_4 & 1) != 0) {\nLAB_00040ad0:\n      puVar4 = (undefined1 *)0x0;\n      goto LAB_00040964;\n    }\n  }" ({ "{") (if_statement "if ((param_4 & 1) != 0) {\nLAB_00040ad0:\n      puVar4 = (undefined1 *)0x0;\n      goto LAB_00040964;\n    }" (if "if") (parenthesized_expression "((param_4 & 1) != 0)" (( "(") (binary_expression "(param_4 & 1) != 0" (parenthesized_expression "(param_4 & 1)" (( "(") (binary_expression "param_4 & 1" (identifier "param_4") (& "&") (number_literal "1")) () ")")) (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\nLAB_00040ad0:\n      puVar4 = (undefined1 *)0x0;\n      goto LAB_00040964;\n    }" ({ "{") (labeled_statement "LAB_00040ad0:\n      puVar4 = (undefined1 *)0x0;" (statement_identifier "LAB_00040ad0") (: ":") (expression_statement "puVar4 = (undefined1 *)0x0;" (assignment_expression "puVar4 = (undefined1 *)0x0" (identifier "puVar4") (= "=") (cast_expression "(undefined1 *)0x0" (( "(") (type_descriptor "undefined1 *" (type_identifier "undefined1") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) (; ";"))) (goto_statement "goto LAB_00040964;" (goto "goto") (statement_identifier "LAB_00040964") (; ";")) (} "}"))) (} "}")) (else_clause "else {\n    save_parser_state(local_a8);\n    save_input_line_state(local_b8);\n    uVar2 = shell_eof_token;\n    uVar1 = pushed_string_list;\n    shell_eof_token = 0x29;\n    pushed_string_list = 0;\n    parser_state = parser_state | 0x8040;\n    iVar5 = parse_string(param_2,"command substitution",\n                         (-(uint)((param_4 & 0x40) == 0) & 0xffffffc0) + 0x4d,&local_bc);\n    if (current_token == shell_eof_token) {\n      yychar = 0xfffffffe;\n    }\n    shell_eof_token = uVar2;\n    restore_parser_state(local_a8);\n    reset_parser();\n    restore_input_line_state(local_b8);\n    DAT_0014e920 = 0;\n    pushed_string_list = uVar1;\n    if (iVar5 < 0) {\n      if (DAT_0014eb74 != (undefined1 *)0x0) {\n        DAT_0014eb70 = 0;\n        *DAT_0014eb74 = 0;\n      }\n                    \n      jump_to_top_level(-iVar5);\n    }\n    if ((param_2 < local_bc) && (local_bc[-1] == '\n')) {\n      pcVar3 = local_bc + -1;\n      do {\n        local_bc = pcVar3;\n        if (param_2 == local_bc) break;\n        pcVar3 = local_bc + -1;\n      } while (local_bc[-1] == '\n');\n    }\n    *param_3 = local_bc + (-1 - param_1);\n    if ((param_4 & 1) != 0) goto LAB_00040ad0;\n    if ((int)local_bc - (int)param_2 != 0) {\n      puVar4 = (undefined1 *)substring(param_2,0,((int)local_bc - (int)param_2) + -1);\n      goto LAB_00040964;\n    }\n  }" (else "else") (compound_statement "{\n    save_parser_state(local_a8);\n    save_input_line_state(local_b8);\n    uVar2 = shell_eof_token;\n    uVar1 = pushed_string_list;\n    shell_eof_token = 0x29;\n    pushed_string_list = 0;\n    parser_state = parser_state | 0x8040;\n    iVar5 = parse_string(param_2,"command substitution",\n                         (-(uint)((param_4 & 0x40) == 0) & 0xffffffc0) + 0x4d,&local_bc);\n    if (current_token == shell_eof_token) {\n      yychar = 0xfffffffe;\n    }\n    shell_eof_token = uVar2;\n    restore_parser_state(local_a8);\n    reset_parser();\n    restore_input_line_state(local_b8);\n    DAT_0014e920 = 0;\n    pushed_string_list = uVar1;\n    if (iVar5 < 0) {\n      if (DAT_0014eb74 != (undefined1 *)0x0) {\n        DAT_0014eb70 = 0;\n        *DAT_0014eb74 = 0;\n      }\n                    \n      jump_to_top_level(-iVar5);\n    }\n    if ((param_2 < local_bc) && (local_bc[-1] == '\n')) {\n      pcVar3 = local_bc + -1;\n      do {\n        local_bc = pcVar3;\n        if (param_2 == local_bc) break;\n        pcVar3 = local_bc + -1;\n      } while (local_bc[-1] == '\n');\n    }\n    *param_3 = local_bc + (-1 - param_1);\n    if ((param_4 & 1) != 0) goto LAB_00040ad0;\n    if ((int)local_bc - (int)param_2 != 0) {\n      puVar4 = (undefined1 *)substring(param_2,0,((int)local_bc - (int)param_2) + -1);\n      goto LAB_00040964;\n    }\n  }" ({ "{") (expression_statement "save_parser_state(local_a8);" (call_expression "save_parser_state(local_a8)" (identifier "save_parser_state") (argument_list "(local_a8)" (( "(") (identifier "local_a8") () ")"))) (; ";")) (expression_statement "save_input_line_state(local_b8);" (call_expression "save_input_line_state(local_b8)" (identifier "save_input_line_state") (argument_list "(local_b8)" (( "(") (identifier "local_b8") () ")"))) (; ";")) (expression_statement "uVar2 = shell_eof_token;" (assignment_expression "uVar2 = shell_eof_token" (identifier "uVar2") (= "=") (identifier "shell_eof_token")) (; ";")) (expression_statement "uVar1 = pushed_string_list;" (assignment_expression "uVar1 = pushed_string_list" (identifier "uVar1") (= "=") (identifier "pushed_string_list")) (; ";")) (expression_statement "shell_eof_token = 0x29;" (assignment_expression "shell_eof_token = 0x29" (identifier "shell_eof_token") (= "=") (number_literal "0x29")) (; ";")) (expression_statement "pushed_string_list = 0;" (assignment_expression "pushed_string_list = 0" (identifier "pushed_string_list") (= "=") (number_literal "0")) (; ";")) (expression_statement "parser_state = parser_state | 0x8040;" (assignment_expression "parser_state = parser_state | 0x8040" (identifier "parser_state") (= "=") (binary_expression "parser_state | 0x8040" (identifier "parser_state") (| "|") (number_literal "0x8040"))) (; ";")) (expression_statement "iVar5 = parse_string(param_2,"command substitution",\n                         (-(uint)((param_4 & 0x40) == 0) & 0xffffffc0) + 0x4d,&local_bc);" (assignment_expression "iVar5 = parse_string(param_2,"command substitution",\n                         (-(uint)((param_4 & 0x40) == 0) & 0xffffffc0) + 0x4d,&local_bc)" (identifier "iVar5") (= "=") (call_expression "parse_string(param_2,"command substitution",\n                         (-(uint)((param_4 & 0x40) == 0) & 0xffffffc0) + 0x4d,&local_bc)" (identifier "parse_string") (argument_list "(param_2,"command substitution",\n                         (-(uint)((param_4 & 0x40) == 0) & 0xffffffc0) + 0x4d,&local_bc)" (( "(") (identifier "param_2") (, ",") (string_literal ""command substitution"" (" """) (string_content "command substitution") (" """)) (, ",") (binary_expression "(-(uint)((param_4 & 0x40) == 0) & 0xffffffc0) + 0x4d" (parenthesized_expression "(-(uint)((param_4 & 0x40) == 0) & 0xffffffc0)" (( "(") (binary_expression "-(uint)((param_4 & 0x40) == 0) & 0xffffffc0" (unary_expression "-(uint)((param_4 & 0x40) == 0)" (- "-") (call_expression "(uint)((param_4 & 0x40) == 0)" (parenthesized_expression "(uint)" (( "(") (identifier "uint") () ")")) (argument_list "((param_4 & 0x40) == 0)" (( "(") (binary_expression "(param_4 & 0x40) == 0" (parenthesized_expression "(param_4 & 0x40)" (( "(") (binary_expression "param_4 & 0x40" (identifier "param_4") (& "&") (number_literal "0x40")) () ")")) (== "==") (number_literal "0")) () ")")))) (& "&") (number_literal "0xffffffc0")) () ")")) (+ "+") (number_literal "0x4d")) (, ",") (pointer_expression "&local_bc" (& "&") (identifier "local_bc")) () ")")))) (; ";")) (if_statement "if (current_token == shell_eof_token) {\n      yychar = 0xfffffffe;\n    }" (if "if") (parenthesized_expression "(current_token == shell_eof_token)" (( "(") (binary_expression "current_token == shell_eof_token" (identifier "current_token") (== "==") (identifier "shell_eof_token")) () ")")) (compound_statement "{\n      yychar = 0xfffffffe;\n    }" ({ "{") (expression_statement "yychar = 0xfffffffe;" (assignment_expression "yychar = 0xfffffffe" (identifier "yychar") (= "=") (number_literal "0xfffffffe")) (; ";")) (} "}"))) (expression_statement "shell_eof_token = uVar2;" (assignment_expression "shell_eof_token = uVar2" (identifier "shell_eof_token") (= "=") (identifier "uVar2")) (; ";")) (expression_statement "restore_parser_state(local_a8);" (call_expression "restore_parser_state(local_a8)" (identifier "restore_parser_state") (argument_list "(local_a8)" (( "(") (identifier "local_a8") () ")"))) (; ";")) (expression_statement "reset_parser();" (call_expression "reset_parser()" (identifier "reset_parser") (argument_list "()" (( "(") () ")"))) (; ";")) (expression_statement "restore_input_line_state(local_b8);" (call_expression "restore_input_line_state(local_b8)" (identifier "restore_input_line_state") (argument_list "(local_b8)" (( "(") (identifier "local_b8") () ")"))) (; ";")) (expression_statement "DAT_0014e920 = 0;" (assignment_expression "DAT_0014e920 = 0" (identifier "DAT_0014e920") (= "=") (number_literal "0")) (; ";")) (expression_statement "pushed_string_list = uVar1;" (assignment_expression "pushed_string_list = uVar1" (identifier "pushed_string_list") (= "=") (identifier "uVar1")) (; ";")) (if_statement "if (iVar5 < 0) {\n      if (DAT_0014eb74 != (undefined1 *)0x0) {\n        DAT_0014eb70 = 0;\n        *DAT_0014eb74 = 0;\n      }\n                    \n      jump_to_top_level(-iVar5);\n    }" (if "if") (parenthesized_expression "(iVar5 < 0)" (( "(") (binary_expression "iVar5 < 0" (identifier "iVar5") (< "<") (number_literal "0")) () ")")) (compound_statement "{\n      if (DAT_0014eb74 != (undefined1 *)0x0) {\n        DAT_0014eb70 = 0;\n        *DAT_0014eb74 = 0;\n      }\n                    \n      jump_to_top_level(-iVar5);\n    }" ({ "{") (if_statement "if (DAT_0014eb74 != (undefined1 *)0x0) {\n        DAT_0014eb70 = 0;\n        *DAT_0014eb74 = 0;\n      }" (if "if") (parenthesized_expression "(DAT_0014eb74 != (undefined1 *)0x0)" (( "(") (binary_expression "DAT_0014eb74 != (undefined1 *)0x0" (identifier "DAT_0014eb74") (!= "!=") (cast_expression "(undefined1 *)0x0" (( "(") (type_descriptor "undefined1 *" (type_identifier "undefined1") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\n        DAT_0014eb70 = 0;\n        *DAT_0014eb74 = 0;\n      }" ({ "{") (expression_statement "DAT_0014eb70 = 0;" (assignment_expression "DAT_0014eb70 = 0" (identifier "DAT_0014eb70") (= "=") (number_literal "0")) (; ";")) (expression_statement "*DAT_0014eb74 = 0;" (assignment_expression "*DAT_0014eb74 = 0" (pointer_expression "*DAT_0014eb74" (* "*") (identifier "DAT_0014eb74")) (= "=") (number_literal "0")) (; ";")) (} "}"))) (expression_statement "jump_to_top_level(-iVar5);" (call_expression "jump_to_top_level(-iVar5)" (identifier "jump_to_top_level") (argument_list "(-iVar5)" (( "(") (unary_expression "-iVar5" (- "-") (identifier "iVar5")) () ")"))) (; ";")) (} "}"))) (if_statement "if ((param_2 < local_bc) && (local_bc[-1] == '\n')) {\n      pcVar3 = local_bc + -1;\n      do {\n        local_bc = pcVar3;\n        if (param_2 == local_bc) break;\n        pcVar3 = local_bc + -1;\n      } while (local_bc[-1] == '\n');\n    }" (if "if") (parenthesized_expression "((param_2 < local_bc) && (local_bc[-1] == '\n'))" (( "(") (binary_expression "(param_2 < local_bc) && (local_bc[-1] == '\n')" (parenthesized_expression "(param_2 < local_bc)" (( "(") (binary_expression "param_2 < local_bc" (identifier "param_2") (< "<") (identifier "local_bc")) () ")")) (&& "&&") (parenthesized_expression "(local_bc[-1] == '\n')" (( "(") (binary_expression "local_bc[-1] == '\n'" (subscript_expression "local_bc[-1]" (identifier "local_bc") ([ "[") (number_literal "-1") (] "]")) (== "==") (char_literal "'\n'" (' "'") (escape_sequence "\n") (' "'"))) () ")"))) () ")")) (compound_statement "{\n      pcVar3 = local_bc + -1;\n      do {\n        local_bc = pcVar3;\n        if (param_2 == local_bc) break;\n        pcVar3 = local_bc + -1;\n      } while (local_bc[-1] == '\n');\n    }" ({ "{") (expression_statement "pcVar3 = local_bc + -1;" (assignment_expression "pcVar3 = local_bc + -1" (identifier "pcVar3") (= "=") (binary_expression "local_bc + -1" (identifier "local_bc") (+ "+") (number_literal "-1"))) (; ";")) (do_statement "do {\n        local_bc = pcVar3;\n        if (param_2 == local_bc) break;\n        pcVar3 = local_bc + -1;\n      } while (local_bc[-1] == '\n');" (do "do") (compound_statement "{\n        local_bc = pcVar3;\n        if (param_2 == local_bc) break;\n        pcVar3 = local_bc + -1;\n      }" ({ "{") (expression_statement "local_bc = pcVar3;" (assignment_expression "local_bc = pcVar3" (identifier "local_bc") (= "=") (identifier "pcVar3")) (; ";")) (if_statement "if (param_2 == local_bc) break;" (if "if") (parenthesized_expression "(param_2 == local_bc)" (( "(") (binary_expression "param_2 == local_bc" (identifier "param_2") (== "==") (identifier "local_bc")) () ")")) (break_statement "break;" (break "break") (; ";"))) (expression_statement "pcVar3 = local_bc + -1;" (assignment_expression "pcVar3 = local_bc + -1" (identifier "pcVar3") (= "=") (binary_expression "local_bc + -1" (identifier "local_bc") (+ "+") (number_literal "-1"))) (; ";")) (} "}")) (while "while") (parenthesized_expression "(local_bc[-1] == '\n')" (( "(") (binary_expression "local_bc[-1] == '\n'" (subscript_expression "local_bc[-1]" (identifier "local_bc") ([ "[") (number_literal "-1") (] "]")) (== "==") (char_literal "'\n'" (' "'") (escape_sequence "\n") (' "'"))) () ")")) (; ";")) (} "}"))) (expression_statement "*param_3 = local_bc + (-1 - param_1);" (assignment_expression "*param_3 = local_bc + (-1 - param_1)" (pointer_expression "*param_3" (* "*") (identifier "param_3")) (= "=") (binary_expression "local_bc + (-1 - param_1)" (identifier "local_bc") (+ "+") (parenthesized_expression "(-1 - param_1)" (( "(") (binary_expression "-1 - param_1" (number_literal "-1") (- "-") (identifier "param_1")) () ")")))) (; ";")) (if_statement "if ((param_4 & 1) != 0) goto LAB_00040ad0;" (if "if") (parenthesized_expression "((param_4 & 1) != 0)" (( "(") (binary_expression "(param_4 & 1) != 0" (parenthesized_expression "(param_4 & 1)" (( "(") (binary_expression "param_4 & 1" (identifier "param_4") (& "&") (number_literal "1")) () ")")) (!= "!=") (number_literal "0")) () ")")) (goto_statement "goto LAB_00040ad0;" (goto "goto") (statement_identifier "LAB_00040ad0") (; ";"))) (if_statement "if ((int)local_bc - (int)param_2 != 0) {\n      puVar4 = (undefined1 *)substring(param_2,0,((int)local_bc - (int)param_2) + -1);\n      goto LAB_00040964;\n    }" (if "if") (parenthesized_expression "((int)local_bc - (int)param_2 != 0)" (( "(") (binary_expression "(int)local_bc - (int)param_2 != 0" (binary_expression "(int)local_bc - (int)param_2" (cast_expression "(int)local_bc" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "local_bc")) (- "-") (cast_expression "(int)param_2" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "param_2"))) (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n      puVar4 = (undefined1 *)substring(param_2,0,((int)local_bc - (int)param_2) + -1);\n      goto LAB_00040964;\n    }" ({ "{") (expression_statement "puVar4 = (undefined1 *)substring(param_2,0,((int)local_bc - (int)param_2) + -1);" (assignment_expression "puVar4 = (undefined1 *)substring(param_2,0,((int)local_bc - (int)param_2) + -1)" (identifier "puVar4") (= "=") (cast_expression "(undefined1 *)substring(param_2,0,((int)local_bc - (int)param_2) + -1)" (( "(") (type_descriptor "undefined1 *" (type_identifier "undefined1") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "substring(param_2,0,((int)local_bc - (int)param_2) + -1)" (identifier "substring") (argument_list "(param_2,0,((int)local_bc - (int)param_2) + -1)" (( "(") (identifier "param_2") (, ",") (number_literal "0") (, ",") (binary_expression "((int)local_bc - (int)param_2) + -1" (parenthesized_expression "((int)local_bc - (int)param_2)" (( "(") (binary_expression "(int)local_bc - (int)param_2" (cast_expression "(int)local_bc" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "local_bc")) (- "-") (cast_expression "(int)param_2" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "param_2"))) () ")")) (+ "+") (number_literal "-1")) () ")"))))) (; ";")) (goto_statement "goto LAB_00040964;" (goto "goto") (statement_identifier "LAB_00040964") (; ";")) (} "}"))) (} "}")))) (expression_statement "puVar4 = (undefined1 *)xmalloc(1);" (assignment_expression "puVar4 = (undefined1 *)xmalloc(1)" (identifier "puVar4") (= "=") (cast_expression "(undefined1 *)xmalloc(1)" (( "(") (type_descriptor "undefined1 *" (type_identifier "undefined1") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "xmalloc(1)" (identifier "xmalloc") (argument_list "(1)" (( "(") (number_literal "1") () ")"))))) (; ";")) (expression_statement "*puVar4 = 0;" (assignment_expression "*puVar4 = 0" (pointer_expression "*puVar4" (* "*") (identifier "puVar4")) (= "=") (number_literal "0")) (; ";")) (labeled_statement "LAB_00040964:\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return puVar4;\n  }" (statement_identifier "LAB_00040964") (: ":") (if_statement "if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return puVar4;\n  }" (if "if") (parenthesized_expression "(local_20 == *(int *)(in_GS_OFFSET + 0x14))" (( "(") (binary_expression "local_20 == *(int *)(in_GS_OFFSET + 0x14)" (identifier "local_20") (== "==") (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" (* "*") (cast_expression "(int *)(in_GS_OFFSET + 0x14)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(in_GS_OFFSET + 0x14)" (( "(") (binary_expression "in_GS_OFFSET + 0x14" (identifier "in_GS_OFFSET") (+ "+") (number_literal "0x14")) () ")"))))) () ")")) (compound_statement "{\n    return puVar4;\n  }" ({ "{") (return_statement "return puVar4;" (return "return") (identifier "puVar4") (; ";")) (} "}")))) (expression_statement "FUN_000ecc40();" (call_expression "FUN_000ecc40()" (identifier "FUN_000ecc40") (argument_list "()" (( "(") () ")"))) (; ";")) (} "}")))

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

char * function_1(char *base,char *var_15,int *indp,int var_2)

{
  int var_19;
  type_1 *pSVar2;
  int iVar3;
  char *pcVar4;
  int var_12;
  int var_1;
  char *var_16;
  type_2 ls;
  type_3 ps;
  
  var_19 = *(int *)(var_1 + 0x14);
  if (*var_15 == '\0') {
    if ((var_2 & 1U) != 0) {
LAB_00040ad0:
      pcVar4 = (char *)0x0;
      goto LAB_00040964;
    }
  }
  else {
    var_3(&ps);
    var_4(&ls);
    iVar3 = var_8;
    pSVar2 = pushed_string_list;
    var_8 = 0x29;
    pushed_string_list = (type_1 *)0x0;
    var_5 = var_5 | 0x8040;
    var_12 = var_6(var_15,"command substitution",
                         (-(uint)((var_2 & 0x40U) == 0) & 0xffffffc0) + 0x4d,&var_16);
    if (var_7 == var_8) {
      yychar = -2;
    }
    var_8 = iVar3;
    var_9(&ps);
    var_10();
    var_11(&ls);
    token_to_read = 0;
    pushed_string_list = pSVar2;
    if (var_12 < 0) {
      if (var_13 != (char *)0x0) {
        shell_input_line_index = 0;
        *var_13 = '\0';
      }
                    /* WARNING: Subroutine does not return */
      var_14(-var_12);
    }
    if ((var_15 < var_16) && (var_16[-1] == '\n')) {
      pcVar4 = var_16 + -1;
      do {
        var_16 = pcVar4;
        if (var_15 == var_16) break;
        pcVar4 = var_16 + -1;
      } while (var_16[-1] == '\n');
    }
    *indp = (int)(var_16 + (-1 - (int)base));
    if ((var_2 & 1U) != 0) goto LAB_00040ad0;
    if ((int)var_16 - (int)var_15 != 0) {
      pcVar4 = var_17(var_15,0,((int)var_16 - (int)var_15) + -1);
      goto LAB_00040964;
    }
  }
  pcVar4 = (char *)var_18(1);
  *pcVar4 = '\0';
LAB_00040964:
  if (var_19 == *(int *)(var_1 + 0x14)) {
    return pcVar4;
  }
                    /* WARNING: Subroutine does not return */
  var_20();
}


(translation_unit (function_definition type: (type_identifier) declarator: (pointer_declarator declarator: (function_declarator declarator: (identifier) parameters: (parameter_list (parameter_declaration type: (primitive_type) declarator: (identifier)) (parameter_declaration type: (primitive_type) declarator: (pointer_declarator declarator: (identifier))) (parameter_declaration type: (type_identifier) declarator: (pointer_declarator declarator: (identifier))) (parameter_declaration type: (type_identifier) declarator: (identifier))))) body: (compound_statement (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (type_identifier) 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)) (declaration type: (primitive_type) declarator: (pointer_declarator declarator: (identifier))) (declaration type: (type_identifier) declarator: (array_declarator declarator: (identifier) size: (number_literal))) (declaration type: (type_identifier) declarator: (array_declarator declarator: (identifier) size: (number_literal))) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (type_identifier) declarator: (identifier)) (expression_statement (assignment_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))))))) (if_statement condition: (parenthesized_expression (binary_expression left: (pointer_expression argument: (identifier)) right: (char_literal (escape_sequence)))) consequence: (compound_statement (if_statement condition: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) right: (number_literal))) consequence: (compound_statement (labeled_statement label: (statement_identifier) (expression_statement (assignment_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (number_literal))))) (goto_statement label: (statement_identifier))))) alternative: (else_clause (compound_statement (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier)))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier)))) (expression_statement (assignment_expression left: (identifier) right: (identifier))) (expression_statement (assignment_expression left: (identifier) right: (identifier))) (expression_statement (assignment_expression left: (identifier) right: (number_literal))) (expression_statement (assignment_expression left: (identifier) right: (number_literal))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal)))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (identifier) (string_literal (string_content)) (binary_expression left: (parenthesized_expression (binary_expression left: (unary_expression argument: (call_expression function: (parenthesized_expression (identifier)) arguments: (argument_list (binary_expression left: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) right: (number_literal))))) right: (number_literal))) right: (number_literal)) (pointer_expression argument: (identifier)))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (number_literal))))) (expression_statement (assignment_expression left: (identifier) right: (identifier))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier)))) (expression_statement (call_expression function: (identifier) arguments: (argument_list))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier)))) (expression_statement (assignment_expression left: (identifier) right: (number_literal))) (expression_statement (assignment_expression left: (identifier) right: (identifier))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (number_literal)))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (number_literal))) (expression_statement (assignment_expression left: (pointer_expression argument: (identifier)) right: (number_literal))))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (unary_expression argument: (identifier))))))) (if_statement condition: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))) right: (parenthesized_expression (binary_expression left: (subscript_expression argument: (identifier) index: (number_literal)) right: (char_literal (escape_sequence)))))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal)))) (do_statement body: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (identifier))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))) consequence: (break_statement)) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal))))) condition: (parenthesized_expression (binary_expression left: (subscript_expression argument: (identifier) index: (number_literal)) right: (char_literal (escape_sequence))))))) (expression_statement (assignment_expression left: (pointer_expression argument: (identifier)) right: (binary_expression left: (identifier) right: (parenthesized_expression (binary_expression left: (number_literal) right: (identifier)))))) (if_statement condition: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) right: (number_literal))) consequence: (goto_statement label: (statement_identifier))) (if_statement condition: (parenthesized_expression (binary_expression left: (binary_expression left: (cast_expression type: (type_descriptor type: (primitive_type)) value: (identifier)) right: (cast_expression type: (type_descriptor type: (primitive_type)) value: (identifier))) right: (number_literal))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (call_expression function: (identifier) arguments: (argument_list (identifier) (number_literal) (binary_expression left: (parenthesized_expression (binary_expression left: (cast_expression type: (type_descriptor type: (primitive_type)) value: (identifier)) right: (cast_expression type: (type_descriptor type: (primitive_type)) value: (identifier)))) right: (number_literal))))))) (goto_statement label: (statement_identifier))))))) (expression_statement (assignment_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (call_expression function: (identifier) arguments: (argument_list (number_literal)))))) (expression_statement (assignment_expression left: (pointer_expression argument: (identifier)) right: (number_literal))) (labeled_statement label: (statement_identifier) (if_statement condition: (parenthesized_expression (binary_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))))))) consequence: (compound_statement (return_statement (identifier))))) (expression_statement (call_expression function: (identifier) arguments: (argument_list))))))

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

undefined1 * MASKED(int param_1,char *param_2,undefined4 *param_3,uint param_4)

{
  undefined4 uVar1;
  undefined4 uVar2;
  char *pcVar3;
  undefined1 *puVar4;
  int iVar5;
  int in_GS_OFFSET;
  char *local_bc;
  undefined1 local_b8 [16];
  undefined1 local_a8 [136];
  int local_20;
  undefined4 uStack_14;
  
  uStack_14 = 0x40909;
  local_20 = *(int *)(in_GS_OFFSET + 0x14);
  if (*param_2 == '\0') {
    if ((param_4 & 1) != 0) {
LAB_00040ad0:
      puVar4 = (undefined1 *)0x0;
      goto LAB_00040964;
    }
  }
  else {
    save_parser_state(local_a8);
    save_input_line_state(local_b8);
    uVar2 = shell_eof_token;
    uVar1 = pushed_string_list;
    shell_eof_token = 0x29;
    pushed_string_list = 0;
    parser_state = parser_state | 0x8040;
    iVar5 = parse_string(param_2,"command substitution",
                         (-(uint)((param_4 & 0x40) == 0) & 0xffffffc0) + 0x4d,&local_bc);
    if (current_token == shell_eof_token) {
      yychar = 0xfffffffe;
    }
    shell_eof_token = uVar2;
    restore_parser_state(local_a8);
    reset_parser();
    restore_input_line_state(local_b8);
    DAT_0014e920 = 0;
    pushed_string_list = uVar1;
    if (iVar5 < 0) {
      if (DAT_0014eb74 != (undefined1 *)0x0) {
        DAT_0014eb70 = 0;
        *DAT_0014eb74 = 0;
      }
                    /* WARNING: Subroutine does not return */
      jump_to_top_level(-iVar5);
    }
    if ((param_2 < local_bc) && (local_bc[-1] == '\n')) {
      pcVar3 = local_bc + -1;
      do {
        local_bc = pcVar3;
        if (param_2 == local_bc) break;
        pcVar3 = local_bc + -1;
      } while (local_bc[-1] == '\n');
    }
    *param_3 = local_bc + (-1 - param_1);
    if ((param_4 & 1) != 0) goto LAB_00040ad0;
    if ((int)local_bc - (int)param_2 != 0) {
      puVar4 = (undefined1 *)substring(param_2,0,((int)local_bc - (int)param_2) + -1);
      goto LAB_00040964;
    }
  }
  puVar4 = (undefined1 *)xmalloc(1);
  *puVar4 = 0;
LAB_00040964:
  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {
    return puVar4;
  }
                    /* WARNING: Subroutine does not return */
  FUN_000ecc40();
}

