
/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */
/* WARNING: Unknown calling convention */
/* WARNING: Enum "anon_enum_32": Some values do not have unique names */

void savewd_finish(savewd *wd)

{
  switch(wd->state) {
  case DT_UNKNOWN:
  case DT_DIR:
    break;
  case DT_FIFO:
  case DT_CHR:
    close((wd->val).fd);
    break;
  case FORKING_STATE:
    if (-1 < (wd->val).fd) {
                    /* WARNING: Subroutine does not return */
      __assert_fail("wd->val.child < 0","lib/savewd.c",0xf7,"savewd_finish");
    }
    break;
  default:
                    /* WARNING: Subroutine does not return */
    __assert_fail("0","lib/savewd.c",0xfb,"savewd_finish");
  }
  wd->state = FINAL_STATE;
  return;
}



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

void FUN_00018740(undefined4 *param_1)

{
  switch(*param_1) {
  case 0:
  case 4:
    break;
  case 1:
  case 2:
    close(param_1[1]);
    break;
  case 3:
    if (-1 < (int)param_1[1]) {
                    /* WARNING: Subroutine does not return */
      __assert_fail("wd->val.child < 0","lib/savewd.c",0xf7,"savewd_finish");
    }
    break;
  default:
                    /* WARNING: Subroutine does not return */
    __assert_fail("0","lib/savewd.c",0xfb,"savewd_finish");
  }
  *param_1 = 5;
  return;
}


PUSH ESI
PUSH EBX
CALL 0x00012a80
ADD EBX,0x108b9
SUB ESP,0x4
MOV ESI,dword ptr [ESP + 0x10]
CMP dword ptr [ESI],0x4
JA 0x000187b6
MOV EAX,dword ptr [ESI]
MOV EDX,dword ptr [EBX + EAX*0x4 + 0xffff8fa4]
ADD EDX,EBX
JMP EDX
LEA EAX,[EBX + 0xffff8fb8]
PUSH EAX
LEA EAX,[EBX + 0xffff8f28]
PUSH 0xfb
PUSH EAX
LEA EAX,[EBX + 0xffff8f74]
PUSH EAX
CALL 0x00012600
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nvoid FUN_00018740(undefined4 *param_1)\n\n{\n  switch(*param_1) {\n  case 0:\n  case 4:\n    break;\n  case 1:\n  case 2:\n    close(param_1[1]);\n    break;\n  case 3:\n    if (-1 < (int)param_1[1]) {\n                    /* WARNING: Subroutine does not return */\n      __assert_fail("wd->val.child < 0","lib/savewd.c",0xf7,"savewd_finish");\n    }\n    break;\n  default:\n                    /* WARNING: Subroutine does not return */\n    __assert_fail("0","lib/savewd.c",0xfb,"savewd_finish");\n  }\n  *param_1 = 5;\n  return;\n}\n\n" comment (function_definition "void FUN_00018740(undefined4 *param_1)\n\n{\n  switch(*param_1) {\n  case 0:\n  case 4:\n    break;\n  case 1:\n  case 2:\n    close(param_1[1]);\n    break;\n  case 3:\n    if (-1 < (int)param_1[1]) {\n                    /* WARNING: Subroutine does not return */\n      __assert_fail("wd->val.child < 0","lib/savewd.c",0xf7,"savewd_finish");\n    }\n    break;\n  default:\n                    /* WARNING: Subroutine does not return */\n    __assert_fail("0","lib/savewd.c",0xfb,"savewd_finish");\n  }\n  *param_1 = 5;\n  return;\n}" primitive_type (function_declarator "FUN_00018740(undefined4 *param_1)" identifier (parameter_list "(undefined4 *param_1)" ( (parameter_declaration "undefined4 *param_1" type_identifier (pointer_declarator "*param_1" * identifier)) ))) (compound_statement "{\n  switch(*param_1) {\n  case 0:\n  case 4:\n    break;\n  case 1:\n  case 2:\n    close(param_1[1]);\n    break;\n  case 3:\n    if (-1 < (int)param_1[1]) {\n                    /* WARNING: Subroutine does not return */\n      __assert_fail("wd->val.child < 0","lib/savewd.c",0xf7,"savewd_finish");\n    }\n    break;\n  default:\n                    /* WARNING: Subroutine does not return */\n    __assert_fail("0","lib/savewd.c",0xfb,"savewd_finish");\n  }\n  *param_1 = 5;\n  return;\n}" { (switch_statement "switch(*param_1) {\n  case 0:\n  case 4:\n    break;\n  case 1:\n  case 2:\n    close(param_1[1]);\n    break;\n  case 3:\n    if (-1 < (int)param_1[1]) {\n                    /* WARNING: Subroutine does not return */\n      __assert_fail("wd->val.child < 0","lib/savewd.c",0xf7,"savewd_finish");\n    }\n    break;\n  default:\n                    /* WARNING: Subroutine does not return */\n    __assert_fail("0","lib/savewd.c",0xfb,"savewd_finish");\n  }" switch (parenthesized_expression "(*param_1)" ( (pointer_expression "*param_1" * identifier) )) (compound_statement "{\n  case 0:\n  case 4:\n    break;\n  case 1:\n  case 2:\n    close(param_1[1]);\n    break;\n  case 3:\n    if (-1 < (int)param_1[1]) {\n                    /* WARNING: Subroutine does not return */\n      __assert_fail("wd->val.child < 0","lib/savewd.c",0xf7,"savewd_finish");\n    }\n    break;\n  default:\n                    /* WARNING: Subroutine does not return */\n    __assert_fail("0","lib/savewd.c",0xfb,"savewd_finish");\n  }" { (case_statement "case 0:" case number_literal :) (case_statement "case 4:\n    break;" case number_literal : (break_statement "break;" break ;)) (case_statement "case 1:" case number_literal :) (case_statement "case 2:\n    close(param_1[1]);\n    break;" case number_literal : (expression_statement "close(param_1[1]);" (call_expression "close(param_1[1])" identifier (argument_list "(param_1[1])" ( (subscript_expression "param_1[1]" identifier [ number_literal ]) ))) ;) (break_statement "break;" break ;)) (case_statement "case 3:\n    if (-1 < (int)param_1[1]) {\n                    /* WARNING: Subroutine does not return */\n      __assert_fail("wd->val.child < 0","lib/savewd.c",0xf7,"savewd_finish");\n    }\n    break;" case number_literal : (if_statement "if (-1 < (int)param_1[1]) {\n                    /* WARNING: Subroutine does not return */\n      __assert_fail("wd->val.child < 0","lib/savewd.c",0xf7,"savewd_finish");\n    }" if (parenthesized_expression "(-1 < (int)param_1[1])" ( (binary_expression "-1 < (int)param_1[1]" number_literal < (cast_expression "(int)param_1[1]" ( (type_descriptor "int" primitive_type) ) (subscript_expression "param_1[1]" identifier [ number_literal ]))) )) (compound_statement "{\n                    /* WARNING: Subroutine does not return */\n      __assert_fail("wd->val.child < 0","lib/savewd.c",0xf7,"savewd_finish");\n    }" { comment (expression_statement "__assert_fail("wd->val.child < 0","lib/savewd.c",0xf7,"savewd_finish");" (call_expression "__assert_fail("wd->val.child < 0","lib/savewd.c",0xf7,"savewd_finish")" identifier (argument_list "("wd->val.child < 0","lib/savewd.c",0xf7,"savewd_finish")" ( (string_literal ""wd->val.child < 0"" " string_content ") , (string_literal ""lib/savewd.c"" " string_content ") , number_literal , (string_literal ""savewd_finish"" " string_content ") ))) ;) })) (break_statement "break;" break ;)) (case_statement "default:\n                    /* WARNING: Subroutine does not return */\n    __assert_fail("0","lib/savewd.c",0xfb,"savewd_finish");" default : comment (expression_statement "__assert_fail("0","lib/savewd.c",0xfb,"savewd_finish");" (call_expression "__assert_fail("0","lib/savewd.c",0xfb,"savewd_finish")" identifier (argument_list "("0","lib/savewd.c",0xfb,"savewd_finish")" ( (string_literal ""0"" " string_content ") , (string_literal ""lib/savewd.c"" " string_content ") , number_literal , (string_literal ""savewd_finish"" " string_content ") ))) ;)) })) (expression_statement "*param_1 = 5;" (assignment_expression "*param_1 = 5" (pointer_expression "*param_1" * identifier) = number_literal) ;) (return_statement "return;" return ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n/* WARNING: Unknown calling convention */\n/* WARNING: Enum "anon_enum_32": Some values do not have unique names */\n\nvoid savewd_finish(savewd *wd)\n\n{\n  switch(wd->state) {\n  case DT_UNKNOWN:\n  case DT_DIR:\n    break;\n  case DT_FIFO:\n  case DT_CHR:\n    close((wd->val).fd);\n    break;\n  case FORKING_STATE:\n    if (-1 < (wd->val).fd) {\n                    /* WARNING: Subroutine does not return */\n      __assert_fail("wd->val.child < 0","lib/savewd.c",0xf7,"savewd_finish");\n    }\n    break;\n  default:\n                    /* WARNING: Subroutine does not return */\n    __assert_fail("0","lib/savewd.c",0xfb,"savewd_finish");\n  }\n  wd->state = FINAL_STATE;\n  return;\n}\n\n" comment comment comment (function_definition "void savewd_finish(savewd *wd)\n\n{\n  switch(wd->state) {\n  case DT_UNKNOWN:\n  case DT_DIR:\n    break;\n  case DT_FIFO:\n  case DT_CHR:\n    close((wd->val).fd);\n    break;\n  case FORKING_STATE:\n    if (-1 < (wd->val).fd) {\n                    /* WARNING: Subroutine does not return */\n      __assert_fail("wd->val.child < 0","lib/savewd.c",0xf7,"savewd_finish");\n    }\n    break;\n  default:\n                    /* WARNING: Subroutine does not return */\n    __assert_fail("0","lib/savewd.c",0xfb,"savewd_finish");\n  }\n  wd->state = FINAL_STATE;\n  return;\n}" primitive_type (function_declarator "savewd_finish(savewd *wd)" identifier (parameter_list "(savewd *wd)" ( (parameter_declaration "savewd *wd" type_identifier (pointer_declarator "*wd" * identifier)) ))) (compound_statement "{\n  switch(wd->state) {\n  case DT_UNKNOWN:\n  case DT_DIR:\n    break;\n  case DT_FIFO:\n  case DT_CHR:\n    close((wd->val).fd);\n    break;\n  case FORKING_STATE:\n    if (-1 < (wd->val).fd) {\n                    /* WARNING: Subroutine does not return */\n      __assert_fail("wd->val.child < 0","lib/savewd.c",0xf7,"savewd_finish");\n    }\n    break;\n  default:\n                    /* WARNING: Subroutine does not return */\n    __assert_fail("0","lib/savewd.c",0xfb,"savewd_finish");\n  }\n  wd->state = FINAL_STATE;\n  return;\n}" { (switch_statement "switch(wd->state) {\n  case DT_UNKNOWN:\n  case DT_DIR:\n    break;\n  case DT_FIFO:\n  case DT_CHR:\n    close((wd->val).fd);\n    break;\n  case FORKING_STATE:\n    if (-1 < (wd->val).fd) {\n                    /* WARNING: Subroutine does not return */\n      __assert_fail("wd->val.child < 0","lib/savewd.c",0xf7,"savewd_finish");\n    }\n    break;\n  default:\n                    /* WARNING: Subroutine does not return */\n    __assert_fail("0","lib/savewd.c",0xfb,"savewd_finish");\n  }" switch (parenthesized_expression "(wd->state)" ( (field_expression "wd->state" identifier -> field_identifier) )) (compound_statement "{\n  case DT_UNKNOWN:\n  case DT_DIR:\n    break;\n  case DT_FIFO:\n  case DT_CHR:\n    close((wd->val).fd);\n    break;\n  case FORKING_STATE:\n    if (-1 < (wd->val).fd) {\n                    /* WARNING: Subroutine does not return */\n      __assert_fail("wd->val.child < 0","lib/savewd.c",0xf7,"savewd_finish");\n    }\n    break;\n  default:\n                    /* WARNING: Subroutine does not return */\n    __assert_fail("0","lib/savewd.c",0xfb,"savewd_finish");\n  }" { (case_statement "case DT_UNKNOWN:" case identifier :) (case_statement "case DT_DIR:\n    break;" case identifier : (break_statement "break;" break ;)) (case_statement "case DT_FIFO:" case identifier :) (case_statement "case DT_CHR:\n    close((wd->val).fd);\n    break;" case identifier : (expression_statement "close((wd->val).fd);" (call_expression "close((wd->val).fd)" identifier (argument_list "((wd->val).fd)" ( (field_expression "(wd->val).fd" (parenthesized_expression "(wd->val)" ( (field_expression "wd->val" identifier -> field_identifier) )) . field_identifier) ))) ;) (break_statement "break;" break ;)) (case_statement "case FORKING_STATE:\n    if (-1 < (wd->val).fd) {\n                    /* WARNING: Subroutine does not return */\n      __assert_fail("wd->val.child < 0","lib/savewd.c",0xf7,"savewd_finish");\n    }\n    break;" case identifier : (if_statement "if (-1 < (wd->val).fd) {\n                    /* WARNING: Subroutine does not return */\n      __assert_fail("wd->val.child < 0","lib/savewd.c",0xf7,"savewd_finish");\n    }" if (parenthesized_expression "(-1 < (wd->val).fd)" ( (binary_expression "-1 < (wd->val).fd" number_literal < (field_expression "(wd->val).fd" (parenthesized_expression "(wd->val)" ( (field_expression "wd->val" identifier -> field_identifier) )) . field_identifier)) )) (compound_statement "{\n                    /* WARNING: Subroutine does not return */\n      __assert_fail("wd->val.child < 0","lib/savewd.c",0xf7,"savewd_finish");\n    }" { comment (expression_statement "__assert_fail("wd->val.child < 0","lib/savewd.c",0xf7,"savewd_finish");" (call_expression "__assert_fail("wd->val.child < 0","lib/savewd.c",0xf7,"savewd_finish")" identifier (argument_list "("wd->val.child < 0","lib/savewd.c",0xf7,"savewd_finish")" ( (string_literal ""wd->val.child < 0"" " string_content ") , (string_literal ""lib/savewd.c"" " string_content ") , number_literal , (string_literal ""savewd_finish"" " string_content ") ))) ;) })) (break_statement "break;" break ;)) (case_statement "default:\n                    /* WARNING: Subroutine does not return */\n    __assert_fail("0","lib/savewd.c",0xfb,"savewd_finish");" default : comment (expression_statement "__assert_fail("0","lib/savewd.c",0xfb,"savewd_finish");" (call_expression "__assert_fail("0","lib/savewd.c",0xfb,"savewd_finish")" identifier (argument_list "("0","lib/savewd.c",0xfb,"savewd_finish")" ( (string_literal ""0"" " string_content ") , (string_literal ""lib/savewd.c"" " string_content ") , number_literal , (string_literal ""savewd_finish"" " string_content ") ))) ;)) })) (expression_statement "wd->state = FINAL_STATE;" (assignment_expression "wd->state = FINAL_STATE" (field_expression "wd->state" identifier -> field_identifier) = identifier) ;) (return_statement "return;" return ;) })))
(translation_unit "void FUN_00018740(undefined4 *param_1)\n\n{\n  switch(*param_1) {\n  case 0:\n  case 4:\n    break;\n  case 1:\n  case 2:\n    close(param_1[1]);\n    break;\n  case 3:\n    if (-1 < (int)param_1[1]) {\n                    \n      __assert_fail("wd->val.child < 0","lib/savewd.c",0xf7,"savewd_finish");\n    }\n    break;\n  default:\n                    \n    __assert_fail("0","lib/savewd.c",0xfb,"savewd_finish");\n  }\n  *param_1 = 5;\n  return;\n}\n\n" (function_definition "void FUN_00018740(undefined4 *param_1)\n\n{\n  switch(*param_1) {\n  case 0:\n  case 4:\n    break;\n  case 1:\n  case 2:\n    close(param_1[1]);\n    break;\n  case 3:\n    if (-1 < (int)param_1[1]) {\n                    \n      __assert_fail("wd->val.child < 0","lib/savewd.c",0xf7,"savewd_finish");\n    }\n    break;\n  default:\n                    \n    __assert_fail("0","lib/savewd.c",0xfb,"savewd_finish");\n  }\n  *param_1 = 5;\n  return;\n}" primitive_type (function_declarator "FUN_00018740(undefined4 *param_1)" identifier (parameter_list "(undefined4 *param_1)" ( (parameter_declaration "undefined4 *param_1" type_identifier (pointer_declarator "*param_1" * identifier)) ))) (compound_statement "{\n  switch(*param_1) {\n  case 0:\n  case 4:\n    break;\n  case 1:\n  case 2:\n    close(param_1[1]);\n    break;\n  case 3:\n    if (-1 < (int)param_1[1]) {\n                    \n      __assert_fail("wd->val.child < 0","lib/savewd.c",0xf7,"savewd_finish");\n    }\n    break;\n  default:\n                    \n    __assert_fail("0","lib/savewd.c",0xfb,"savewd_finish");\n  }\n  *param_1 = 5;\n  return;\n}" { (switch_statement "switch(*param_1) {\n  case 0:\n  case 4:\n    break;\n  case 1:\n  case 2:\n    close(param_1[1]);\n    break;\n  case 3:\n    if (-1 < (int)param_1[1]) {\n                    \n      __assert_fail("wd->val.child < 0","lib/savewd.c",0xf7,"savewd_finish");\n    }\n    break;\n  default:\n                    \n    __assert_fail("0","lib/savewd.c",0xfb,"savewd_finish");\n  }" switch (parenthesized_expression "(*param_1)" ( (pointer_expression "*param_1" * identifier) )) (compound_statement "{\n  case 0:\n  case 4:\n    break;\n  case 1:\n  case 2:\n    close(param_1[1]);\n    break;\n  case 3:\n    if (-1 < (int)param_1[1]) {\n                    \n      __assert_fail("wd->val.child < 0","lib/savewd.c",0xf7,"savewd_finish");\n    }\n    break;\n  default:\n                    \n    __assert_fail("0","lib/savewd.c",0xfb,"savewd_finish");\n  }" { (case_statement "case 0:" case number_literal :) (case_statement "case 4:\n    break;" case number_literal : (break_statement "break;" break ;)) (case_statement "case 1:" case number_literal :) (case_statement "case 2:\n    close(param_1[1]);\n    break;" case number_literal : (expression_statement "close(param_1[1]);" (call_expression "close(param_1[1])" identifier (argument_list "(param_1[1])" ( (subscript_expression "param_1[1]" identifier [ number_literal ]) ))) ;) (break_statement "break;" break ;)) (case_statement "case 3:\n    if (-1 < (int)param_1[1]) {\n                    \n      __assert_fail("wd->val.child < 0","lib/savewd.c",0xf7,"savewd_finish");\n    }\n    break;" case number_literal : (if_statement "if (-1 < (int)param_1[1]) {\n                    \n      __assert_fail("wd->val.child < 0","lib/savewd.c",0xf7,"savewd_finish");\n    }" if (parenthesized_expression "(-1 < (int)param_1[1])" ( (binary_expression "-1 < (int)param_1[1]" number_literal < (cast_expression "(int)param_1[1]" ( (type_descriptor "int" primitive_type) ) (subscript_expression "param_1[1]" identifier [ number_literal ]))) )) (compound_statement "{\n                    \n      __assert_fail("wd->val.child < 0","lib/savewd.c",0xf7,"savewd_finish");\n    }" { (expression_statement "__assert_fail("wd->val.child < 0","lib/savewd.c",0xf7,"savewd_finish");" (call_expression "__assert_fail("wd->val.child < 0","lib/savewd.c",0xf7,"savewd_finish")" identifier (argument_list "("wd->val.child < 0","lib/savewd.c",0xf7,"savewd_finish")" ( (string_literal ""wd->val.child < 0"" " string_content ") , (string_literal ""lib/savewd.c"" " string_content ") , number_literal , (string_literal ""savewd_finish"" " string_content ") ))) ;) })) (break_statement "break;" break ;)) (case_statement "default:\n                    \n    __assert_fail("0","lib/savewd.c",0xfb,"savewd_finish");" default : (expression_statement "__assert_fail("0","lib/savewd.c",0xfb,"savewd_finish");" (call_expression "__assert_fail("0","lib/savewd.c",0xfb,"savewd_finish")" identifier (argument_list "("0","lib/savewd.c",0xfb,"savewd_finish")" ( (string_literal ""0"" " string_content ") , (string_literal ""lib/savewd.c"" " string_content ") , number_literal , (string_literal ""savewd_finish"" " string_content ") ))) ;)) })) (expression_statement "*param_1 = 5;" (assignment_expression "*param_1 = 5" (pointer_expression "*param_1" * identifier) = number_literal) ;) (return_statement "return;" return ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE (pointer_declarator * IDENT)) ))) (compound_statement { (switch_statement switch (parenthesized_expression ( (pointer_expression * IDENT) )) (compound_statement { (case_statement case LIT :) (case_statement case LIT : (break_statement break ;)) (case_statement case LIT :) (case_statement case LIT : (expression_statement (call_expression IDENT (argument_list ( (subscript_expression IDENT [ LIT ]) ))) ;) (break_statement break ;)) (case_statement case LIT : (if_statement if (parenthesized_expression ( (binary_expression LIT < (cast_expression ( (type_descriptor TYPE) ) (subscript_expression IDENT [ LIT ]))) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( (string_literal " string_content ") , (string_literal " string_content ") , LIT , (string_literal " string_content ") ))) ;) })) (break_statement break ;)) (case_statement default : (expression_statement (call_expression IDENT (argument_list ( (string_literal " string_content ") , (string_literal " string_content ") , LIT , (string_literal " string_content ") ))) ;)) })) (expression_statement (assignment_expression (pointer_expression * IDENT) = LIT) ;) (return_statement return ;) })))
(function_definition "void FUN_00018740(undefined4 *param_1)\n\n{\n  switch(*param_1) {\n  case 0:\n  case 4:\n    break;\n  case 1:\n  case 2:\n    close(param_1[1]);\n    break;\n  case 3:\n    if (-1 < (int)param_1[1]) {\n                    \n      __assert_fail("wd->val.child < 0","lib/savewd.c",0xf7,"savewd_finish");\n    }\n    break;\n  default:\n                    \n    __assert_fail("0","lib/savewd.c",0xfb,"savewd_finish");\n  }\n  *param_1 = 5;\n  return;\n}" (primitive_type "void") (function_declarator "FUN_00018740(undefined4 *param_1)" (identifier "FUN_00018740") (parameter_list "(undefined4 *param_1)" (( "(") (parameter_declaration "undefined4 *param_1" (type_identifier "undefined4") (pointer_declarator "*param_1" (* "*") (identifier "param_1"))) () ")"))) (compound_statement "{\n  switch(*param_1) {\n  case 0:\n  case 4:\n    break;\n  case 1:\n  case 2:\n    close(param_1[1]);\n    break;\n  case 3:\n    if (-1 < (int)param_1[1]) {\n                    \n      __assert_fail("wd->val.child < 0","lib/savewd.c",0xf7,"savewd_finish");\n    }\n    break;\n  default:\n                    \n    __assert_fail("0","lib/savewd.c",0xfb,"savewd_finish");\n  }\n  *param_1 = 5;\n  return;\n}" ({ "{") (switch_statement "switch(*param_1) {\n  case 0:\n  case 4:\n    break;\n  case 1:\n  case 2:\n    close(param_1[1]);\n    break;\n  case 3:\n    if (-1 < (int)param_1[1]) {\n                    \n      __assert_fail("wd->val.child < 0","lib/savewd.c",0xf7,"savewd_finish");\n    }\n    break;\n  default:\n                    \n    __assert_fail("0","lib/savewd.c",0xfb,"savewd_finish");\n  }" (switch "switch") (parenthesized_expression "(*param_1)" (( "(") (pointer_expression "*param_1" (* "*") (identifier "param_1")) () ")")) (compound_statement "{\n  case 0:\n  case 4:\n    break;\n  case 1:\n  case 2:\n    close(param_1[1]);\n    break;\n  case 3:\n    if (-1 < (int)param_1[1]) {\n                    \n      __assert_fail("wd->val.child < 0","lib/savewd.c",0xf7,"savewd_finish");\n    }\n    break;\n  default:\n                    \n    __assert_fail("0","lib/savewd.c",0xfb,"savewd_finish");\n  }" ({ "{") (case_statement "case 0:" (case "case") (number_literal "0") (: ":")) (case_statement "case 4:\n    break;" (case "case") (number_literal "4") (: ":") (break_statement "break;" (break "break") (; ";"))) (case_statement "case 1:" (case "case") (number_literal "1") (: ":")) (case_statement "case 2:\n    close(param_1[1]);\n    break;" (case "case") (number_literal "2") (: ":") (expression_statement "close(param_1[1]);" (call_expression "close(param_1[1])" (identifier "close") (argument_list "(param_1[1])" (( "(") (subscript_expression "param_1[1]" (identifier "param_1") ([ "[") (number_literal "1") (] "]")) () ")"))) (; ";")) (break_statement "break;" (break "break") (; ";"))) (case_statement "case 3:\n    if (-1 < (int)param_1[1]) {\n                    \n      __assert_fail("wd->val.child < 0","lib/savewd.c",0xf7,"savewd_finish");\n    }\n    break;" (case "case") (number_literal "3") (: ":") (if_statement "if (-1 < (int)param_1[1]) {\n                    \n      __assert_fail("wd->val.child < 0","lib/savewd.c",0xf7,"savewd_finish");\n    }" (if "if") (parenthesized_expression "(-1 < (int)param_1[1])" (( "(") (binary_expression "-1 < (int)param_1[1]" (number_literal "-1") (< "<") (cast_expression "(int)param_1[1]" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (subscript_expression "param_1[1]" (identifier "param_1") ([ "[") (number_literal "1") (] "]")))) () ")")) (compound_statement "{\n                    \n      __assert_fail("wd->val.child < 0","lib/savewd.c",0xf7,"savewd_finish");\n    }" ({ "{") (expression_statement "__assert_fail("wd->val.child < 0","lib/savewd.c",0xf7,"savewd_finish");" (call_expression "__assert_fail("wd->val.child < 0","lib/savewd.c",0xf7,"savewd_finish")" (identifier "__assert_fail") (argument_list "("wd->val.child < 0","lib/savewd.c",0xf7,"savewd_finish")" (( "(") (string_literal ""wd->val.child < 0"" (" """) (string_content "wd->val.child < 0") (" """)) (, ",") (string_literal ""lib/savewd.c"" (" """) (string_content "lib/savewd.c") (" """)) (, ",") (number_literal "0xf7") (, ",") (string_literal ""savewd_finish"" (" """) (string_content "savewd_finish") (" """)) () ")"))) (; ";")) (} "}"))) (break_statement "break;" (break "break") (; ";"))) (case_statement "default:\n                    \n    __assert_fail("0","lib/savewd.c",0xfb,"savewd_finish");" (default "default") (: ":") (expression_statement "__assert_fail("0","lib/savewd.c",0xfb,"savewd_finish");" (call_expression "__assert_fail("0","lib/savewd.c",0xfb,"savewd_finish")" (identifier "__assert_fail") (argument_list "("0","lib/savewd.c",0xfb,"savewd_finish")" (( "(") (string_literal ""0"" (" """) (string_content "0") (" """)) (, ",") (string_literal ""lib/savewd.c"" (" """) (string_content "lib/savewd.c") (" """)) (, ",") (number_literal "0xfb") (, ",") (string_literal ""savewd_finish"" (" """) (string_content "savewd_finish") (" """)) () ")"))) (; ";"))) (} "}"))) (expression_statement "*param_1 = 5;" (assignment_expression "*param_1 = 5" (pointer_expression "*param_1" (* "*") (identifier "param_1")) (= "=") (number_literal "5")) (; ";")) (return_statement "return;" (return "return") (; ";")) (} "}")))

/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */
/* WARNING: Unknown calling convention */
/* WARNING: Enum "anon_enum_32": Some values do not have unique names */

void function_1(type_1 *wd)

{
  switch(wd->state) {
  case DT_UNKNOWN:
  case DT_DIR:
    break;
  case DT_FIFO:
  case DT_CHR:
    var_1((wd->val).fd);
    break;
  case FORKING_STATE:
    if (-1 < (wd->val).fd) {
                    /* WARNING: Subroutine does not return */
      var_2("wd->val.child < 0","lib/savewd.c",0xf7,"savewd_finish");
    }
    break;
  default:
                    /* WARNING: Subroutine does not return */
    var_2("0","lib/savewd.c",0xfb,"savewd_finish");
  }
  wd->state = FINAL_STATE;
  return;
}


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

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

void MASKED(undefined4 *param_1)

{
  switch(*param_1) {
  case 0:
  case 4:
    break;
  case 1:
  case 2:
    close(param_1[1]);
    break;
  case 3:
    if (-1 < (int)param_1[1]) {
                    /* WARNING: Subroutine does not return */
      __assert_fail("wd->val.child < 0","lib/savewd.c",0xf7,"savewd_finish");
    }
    break;
  default:
                    /* WARNING: Subroutine does not return */
    __assert_fail("0","lib/savewd.c",0xfb,"savewd_finish");
  }
  *param_1 = 5;
  return;
}

