
void coproc_wclose(coproc *cp,int fd)

{
  int iVar1;
  
  iVar1 = cp->c_wfd;
  if ((-1 < iVar1) && (iVar1 == fd)) {
    (*(code *)PTR_close_0014620c)(iVar1);
    cp->c_wfd = -1;
    return;
  }
  return;
}



void coproc_wclose(int param_1,int param_2)

{
  int iVar1;
  
  iVar1 = *(int *)(param_1 + 0xc);
  if ((-1 < iVar1) && (iVar1 == param_2)) {
    (*(code *)PTR_close_0014620c)(iVar1);
    *(undefined4 *)(param_1 + 0xc) = 0xffffffff;
    return;
  }
  return;
}


lui gp,0x10
addiu gp,gp,0x22dc
addu gp,gp,t9
lw v0,0xc(a0)
bltz v0,0x0004a284
_nop
beq v0,a1,0x0004a28c
_lw t9,-0x6334(gp)
jr ra
_nop
addiu sp,sp,-0x20
sw s0,0x18(sp)
or s0,a0,zero
sw ra,0x1c(sp)
sw gp,0x10(sp)
jalr t9
_or a0,v0,zero
li v0,-0x1
lw ra,0x1c(sp)
sw v0,0xc(s0)
lw s0,0x18(sp)
jr ra
_addiu sp,sp,0x20
(translation_unit "void coproc_wclose(int param_1,int param_2)\n\n{\n  int iVar1;\n  \n  iVar1 = *(int *)(param_1 + 0xc);\n  if ((-1 < iVar1) && (iVar1 == param_2)) {\n    (*(code *)PTR_close_0014620c)(iVar1);\n    *(undefined4 *)(param_1 + 0xc) = 0xffffffff;\n    return;\n  }\n  return;\n}\n\n" (function_definition "void coproc_wclose(int param_1,int param_2)\n\n{\n  int iVar1;\n  \n  iVar1 = *(int *)(param_1 + 0xc);\n  if ((-1 < iVar1) && (iVar1 == param_2)) {\n    (*(code *)PTR_close_0014620c)(iVar1);\n    *(undefined4 *)(param_1 + 0xc) = 0xffffffff;\n    return;\n  }\n  return;\n}" primitive_type (function_declarator "coproc_wclose(int param_1,int param_2)" identifier (parameter_list "(int param_1,int param_2)" ( (parameter_declaration "int param_1" primitive_type identifier) , (parameter_declaration "int param_2" primitive_type identifier) ))) (compound_statement "{\n  int iVar1;\n  \n  iVar1 = *(int *)(param_1 + 0xc);\n  if ((-1 < iVar1) && (iVar1 == param_2)) {\n    (*(code *)PTR_close_0014620c)(iVar1);\n    *(undefined4 *)(param_1 + 0xc) = 0xffffffff;\n    return;\n  }\n  return;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (expression_statement "iVar1 = *(int *)(param_1 + 0xc);" (assignment_expression "iVar1 = *(int *)(param_1 + 0xc)" identifier = (pointer_expression "*(int *)(param_1 + 0xc)" * (cast_expression "(int *)(param_1 + 0xc)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0xc)" ( (binary_expression "param_1 + 0xc" identifier + number_literal) ))))) ;) (if_statement "if ((-1 < iVar1) && (iVar1 == param_2)) {\n    (*(code *)PTR_close_0014620c)(iVar1);\n    *(undefined4 *)(param_1 + 0xc) = 0xffffffff;\n    return;\n  }" if (parenthesized_expression "((-1 < iVar1) && (iVar1 == param_2))" ( (binary_expression "(-1 < iVar1) && (iVar1 == param_2)" (parenthesized_expression "(-1 < iVar1)" ( (binary_expression "-1 < iVar1" number_literal < identifier) )) && (parenthesized_expression "(iVar1 == param_2)" ( (binary_expression "iVar1 == param_2" identifier == identifier) ))) )) (compound_statement "{\n    (*(code *)PTR_close_0014620c)(iVar1);\n    *(undefined4 *)(param_1 + 0xc) = 0xffffffff;\n    return;\n  }" { (expression_statement "(*(code *)PTR_close_0014620c)(iVar1);" (call_expression "(*(code *)PTR_close_0014620c)(iVar1)" (parenthesized_expression "(*(code *)PTR_close_0014620c)" ( (pointer_expression "*(code *)PTR_close_0014620c" * (cast_expression "(code *)PTR_close_0014620c" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(iVar1)" ( identifier ))) ;) (expression_statement "*(undefined4 *)(param_1 + 0xc) = 0xffffffff;" (assignment_expression "*(undefined4 *)(param_1 + 0xc) = 0xffffffff" (pointer_expression "*(undefined4 *)(param_1 + 0xc)" * (cast_expression "(undefined4 *)(param_1 + 0xc)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0xc)" ( (binary_expression "param_1 + 0xc" identifier + number_literal) )))) = number_literal) ;) (return_statement "return;" return ;) })) (return_statement "return;" return ;) })))
(translation_unit "void coproc_wclose(coproc *cp,int fd)\n\n{\n  int iVar1;\n  \n  iVar1 = cp->c_wfd;\n  if ((-1 < iVar1) && (iVar1 == fd)) {\n    (*(code *)PTR_close_0014620c)(iVar1);\n    cp->c_wfd = -1;\n    return;\n  }\n  return;\n}\n\n" (function_definition "void coproc_wclose(coproc *cp,int fd)\n\n{\n  int iVar1;\n  \n  iVar1 = cp->c_wfd;\n  if ((-1 < iVar1) && (iVar1 == fd)) {\n    (*(code *)PTR_close_0014620c)(iVar1);\n    cp->c_wfd = -1;\n    return;\n  }\n  return;\n}" primitive_type (function_declarator "coproc_wclose(coproc *cp,int fd)" identifier (parameter_list "(coproc *cp,int fd)" ( (parameter_declaration "coproc *cp" type_identifier (pointer_declarator "*cp" * identifier)) , (parameter_declaration "int fd" primitive_type identifier) ))) (compound_statement "{\n  int iVar1;\n  \n  iVar1 = cp->c_wfd;\n  if ((-1 < iVar1) && (iVar1 == fd)) {\n    (*(code *)PTR_close_0014620c)(iVar1);\n    cp->c_wfd = -1;\n    return;\n  }\n  return;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (expression_statement "iVar1 = cp->c_wfd;" (assignment_expression "iVar1 = cp->c_wfd" identifier = (field_expression "cp->c_wfd" identifier -> field_identifier)) ;) (if_statement "if ((-1 < iVar1) && (iVar1 == fd)) {\n    (*(code *)PTR_close_0014620c)(iVar1);\n    cp->c_wfd = -1;\n    return;\n  }" if (parenthesized_expression "((-1 < iVar1) && (iVar1 == fd))" ( (binary_expression "(-1 < iVar1) && (iVar1 == fd)" (parenthesized_expression "(-1 < iVar1)" ( (binary_expression "-1 < iVar1" number_literal < identifier) )) && (parenthesized_expression "(iVar1 == fd)" ( (binary_expression "iVar1 == fd" identifier == identifier) ))) )) (compound_statement "{\n    (*(code *)PTR_close_0014620c)(iVar1);\n    cp->c_wfd = -1;\n    return;\n  }" { (expression_statement "(*(code *)PTR_close_0014620c)(iVar1);" (call_expression "(*(code *)PTR_close_0014620c)(iVar1)" (parenthesized_expression "(*(code *)PTR_close_0014620c)" ( (pointer_expression "*(code *)PTR_close_0014620c" * (cast_expression "(code *)PTR_close_0014620c" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(iVar1)" ( identifier ))) ;) (expression_statement "cp->c_wfd = -1;" (assignment_expression "cp->c_wfd = -1" (field_expression "cp->c_wfd" identifier -> field_identifier) = number_literal) ;) (return_statement "return;" return ;) })) (return_statement "return;" return ;) })))
(translation_unit "void coproc_wclose(int param_1,int param_2)\n\n{\n  int iVar1;\n  \n  iVar1 = *(int *)(param_1 + 0xc);\n  if ((-1 < iVar1) && (iVar1 == param_2)) {\n    (*(code *)PTR_close_0014620c)(iVar1);\n    *(undefined4 *)(param_1 + 0xc) = 0xffffffff;\n    return;\n  }\n  return;\n}\n\n" (function_definition "void coproc_wclose(int param_1,int param_2)\n\n{\n  int iVar1;\n  \n  iVar1 = *(int *)(param_1 + 0xc);\n  if ((-1 < iVar1) && (iVar1 == param_2)) {\n    (*(code *)PTR_close_0014620c)(iVar1);\n    *(undefined4 *)(param_1 + 0xc) = 0xffffffff;\n    return;\n  }\n  return;\n}" primitive_type (function_declarator "coproc_wclose(int param_1,int param_2)" identifier (parameter_list "(int param_1,int param_2)" ( (parameter_declaration "int param_1" primitive_type identifier) , (parameter_declaration "int param_2" primitive_type identifier) ))) (compound_statement "{\n  int iVar1;\n  \n  iVar1 = *(int *)(param_1 + 0xc);\n  if ((-1 < iVar1) && (iVar1 == param_2)) {\n    (*(code *)PTR_close_0014620c)(iVar1);\n    *(undefined4 *)(param_1 + 0xc) = 0xffffffff;\n    return;\n  }\n  return;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (expression_statement "iVar1 = *(int *)(param_1 + 0xc);" (assignment_expression "iVar1 = *(int *)(param_1 + 0xc)" identifier = (pointer_expression "*(int *)(param_1 + 0xc)" * (cast_expression "(int *)(param_1 + 0xc)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0xc)" ( (binary_expression "param_1 + 0xc" identifier + number_literal) ))))) ;) (if_statement "if ((-1 < iVar1) && (iVar1 == param_2)) {\n    (*(code *)PTR_close_0014620c)(iVar1);\n    *(undefined4 *)(param_1 + 0xc) = 0xffffffff;\n    return;\n  }" if (parenthesized_expression "((-1 < iVar1) && (iVar1 == param_2))" ( (binary_expression "(-1 < iVar1) && (iVar1 == param_2)" (parenthesized_expression "(-1 < iVar1)" ( (binary_expression "-1 < iVar1" number_literal < identifier) )) && (parenthesized_expression "(iVar1 == param_2)" ( (binary_expression "iVar1 == param_2" identifier == identifier) ))) )) (compound_statement "{\n    (*(code *)PTR_close_0014620c)(iVar1);\n    *(undefined4 *)(param_1 + 0xc) = 0xffffffff;\n    return;\n  }" { (expression_statement "(*(code *)PTR_close_0014620c)(iVar1);" (call_expression "(*(code *)PTR_close_0014620c)(iVar1)" (parenthesized_expression "(*(code *)PTR_close_0014620c)" ( (pointer_expression "*(code *)PTR_close_0014620c" * (cast_expression "(code *)PTR_close_0014620c" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(iVar1)" ( identifier ))) ;) (expression_statement "*(undefined4 *)(param_1 + 0xc) = 0xffffffff;" (assignment_expression "*(undefined4 *)(param_1 + 0xc) = 0xffffffff" (pointer_expression "*(undefined4 *)(param_1 + 0xc)" * (cast_expression "(undefined4 *)(param_1 + 0xc)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0xc)" ( (binary_expression "param_1 + 0xc" identifier + number_literal) )))) = number_literal) ;) (return_statement "return;" return ;) })) (return_statement "return;" return ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE IDENT ;) (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 (parenthesized_expression ( (binary_expression LIT < IDENT) )) && (parenthesized_expression ( (binary_expression IDENT == IDENT) ))) )) (compound_statement { (expression_statement (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( IDENT ))) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = LIT) ;) (return_statement return ;) })) (return_statement return ;) })))
(function_definition "void coproc_wclose(int param_1,int param_2)\n\n{\n  int iVar1;\n  \n  iVar1 = *(int *)(param_1 + 0xc);\n  if ((-1 < iVar1) && (iVar1 == param_2)) {\n    (*(code *)PTR_close_0014620c)(iVar1);\n    *(undefined4 *)(param_1 + 0xc) = 0xffffffff;\n    return;\n  }\n  return;\n}" (primitive_type "void") (function_declarator "coproc_wclose(int param_1,int param_2)" (identifier "coproc_wclose") (parameter_list "(int param_1,int param_2)" (( "(") (parameter_declaration "int param_1" (primitive_type "int") (identifier "param_1")) (, ",") (parameter_declaration "int param_2" (primitive_type "int") (identifier "param_2")) () ")"))) (compound_statement "{\n  int iVar1;\n  \n  iVar1 = *(int *)(param_1 + 0xc);\n  if ((-1 < iVar1) && (iVar1 == param_2)) {\n    (*(code *)PTR_close_0014620c)(iVar1);\n    *(undefined4 *)(param_1 + 0xc) = 0xffffffff;\n    return;\n  }\n  return;\n}" ({ "{") (declaration "int iVar1;" (primitive_type "int") (identifier "iVar1") (; ";")) (expression_statement "iVar1 = *(int *)(param_1 + 0xc);" (assignment_expression "iVar1 = *(int *)(param_1 + 0xc)" (identifier "iVar1") (= "=") (pointer_expression "*(int *)(param_1 + 0xc)" (* "*") (cast_expression "(int *)(param_1 + 0xc)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0xc)" (( "(") (binary_expression "param_1 + 0xc" (identifier "param_1") (+ "+") (number_literal "0xc")) () ")"))))) (; ";")) (if_statement "if ((-1 < iVar1) && (iVar1 == param_2)) {\n    (*(code *)PTR_close_0014620c)(iVar1);\n    *(undefined4 *)(param_1 + 0xc) = 0xffffffff;\n    return;\n  }" (if "if") (parenthesized_expression "((-1 < iVar1) && (iVar1 == param_2))" (( "(") (binary_expression "(-1 < iVar1) && (iVar1 == param_2)" (parenthesized_expression "(-1 < iVar1)" (( "(") (binary_expression "-1 < iVar1" (number_literal "-1") (< "<") (identifier "iVar1")) () ")")) (&& "&&") (parenthesized_expression "(iVar1 == param_2)" (( "(") (binary_expression "iVar1 == param_2" (identifier "iVar1") (== "==") (identifier "param_2")) () ")"))) () ")")) (compound_statement "{\n    (*(code *)PTR_close_0014620c)(iVar1);\n    *(undefined4 *)(param_1 + 0xc) = 0xffffffff;\n    return;\n  }" ({ "{") (expression_statement "(*(code *)PTR_close_0014620c)(iVar1);" (call_expression "(*(code *)PTR_close_0014620c)(iVar1)" (parenthesized_expression "(*(code *)PTR_close_0014620c)" (( "(") (pointer_expression "*(code *)PTR_close_0014620c" (* "*") (cast_expression "(code *)PTR_close_0014620c" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_close_0014620c"))) () ")")) (argument_list "(iVar1)" (( "(") (identifier "iVar1") () ")"))) (; ";")) (expression_statement "*(undefined4 *)(param_1 + 0xc) = 0xffffffff;" (assignment_expression "*(undefined4 *)(param_1 + 0xc) = 0xffffffff" (pointer_expression "*(undefined4 *)(param_1 + 0xc)" (* "*") (cast_expression "(undefined4 *)(param_1 + 0xc)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0xc)" (( "(") (binary_expression "param_1 + 0xc" (identifier "param_1") (+ "+") (number_literal "0xc")) () ")")))) (= "=") (number_literal "0xffffffff")) (; ";")) (return_statement "return;" (return "return") (; ";")) (} "}"))) (return_statement "return;" (return "return") (; ";")) (} "}")))

void function_1(type_1 *cp,int var_2)

{
  int var_1;
  
  var_1 = cp->c_wfd;
  if ((-1 < var_1) && (var_1 == var_2)) {
    (*(type_2 *)PTR_close_0014620c)(var_1);
    cp->c_wfd = -1;
    return;
  }
  return;
}


(translation_unit (function_definition type: (primitive_type) declarator: (function_declarator declarator: (identifier) parameters: (parameter_list (parameter_declaration type: (primitive_type) declarator: (identifier)) (parameter_declaration type: (primitive_type) declarator: (identifier)))) body: (compound_statement (declaration type: (primitive_type) declarator: (identifier)) (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: (parenthesized_expression (binary_expression left: (number_literal) right: (identifier))) right: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))))) consequence: (compound_statement (expression_statement (call_expression function: (parenthesized_expression (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (identifier)))) arguments: (argument_list (identifier)))) (expression_statement (assignment_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) right: (number_literal))) (return_statement))) (return_statement))))

void MASKED(int param_1,int param_2)

{
  int iVar1;
  
  iVar1 = *(int *)(param_1 + 0xc);
  if ((-1 < iVar1) && (iVar1 == param_2)) {
    (*(code *)PTR_close_0014620c)(iVar1);
    *(undefined4 *)(param_1 + 0xc) = 0xffffffff;
    return;
  }
  return;
}

