
/* WARNING: Enum "anon_enum_32": Some values do not have unique names */

void ssh_disconnect(Ssh_conflict ssh,char *client_reason,char *wire_reason,int code,int clean_exit)

{
  char *error_msg;
  Packet *pkt;
  
  if (client_reason == (char *)0x0) {
    if (wire_reason == (char *)0x0) {
      error_msg = dupstr(PTR_DAT_000ad2c8 + -0xb3c);
      goto LAB_0003fe88;
    }
    error_msg = dupprintf(PTR_DAT_000ad2c8 + -0xb50,wire_reason);
  }
  else {
    error_msg = dupprintf(PTR_DAT_000ad2c8 + -0xb50);
    if (wire_reason == (char *)0x0) goto LAB_0003fe88;
  }
  if (ssh->version == 1) {
    send_packet(ssh,1,4,wire_reason,0);
  }
  else if (ssh->version == 2) {
    pkt = ssh2_pkt_init(1);
                    /* WARNING: Subroutine does not return */
    ssh_pkt_adduint32(pkt,code);
  }
LAB_0003fe88:
  ssh->clean_exit = clean_exit;
  ssh->close_expected = 1;
  ssh_closing(&ssh->fn,error_msg,0,0);
                    /* WARNING: Subroutine does not return */
  safefree(error_msg);
}



void FUN_0003fe14(int param_1,int param_2,int param_3,undefined4 param_4,undefined4 param_5)

{
  undefined4 uVar1;
  undefined4 uVar2;
  
  if (param_2 == 0) {
    if (param_3 == 0) {
      uVar1 = dupstr(PTR_DAT_000ad2c8 + -0xb3c);
      goto LAB_0003fe88;
    }
    uVar1 = dupprintf(PTR_DAT_000ad2c8 + -0xb50,param_3);
  }
  else {
    uVar1 = dupprintf(PTR_DAT_000ad2c8 + -0xb50);
    if (param_3 == 0) goto LAB_0003fe88;
  }
  if (*(int *)(param_1 + 0x198) == 1) {
    FUN_00041954(param_1,1,4,param_3,0);
  }
  else if (*(int *)(param_1 + 0x198) == 2) {
    uVar2 = FUN_000334cc(1);
    FUN_0003364c(uVar2,param_4);
    FUN_000336bc(uVar2,param_3);
    FUN_000336bc(uVar2,PTR_DAT_000ad2c8 + -0x5530);
    FUN_0003e700(param_1,uVar2);
  }
LAB_0003fe88:
  *(undefined4 *)(param_1 + 0x138) = param_5;
  *(undefined4 *)(param_1 + 0x134) = 1;
  FUN_000305a8(param_1,uVar1,0,0);
  safefree(uVar1);
  return;
}


lui gp,0x7
addiu gp,gp,0x547c
addu gp,gp,t9
addiu sp,sp,-0x38
sw gp,0x18(sp)
sw s4,0x30(sp)
or s4,a3,zero
sw s3,0x2c(sp)
sw s2,0x28(sp)
or s2,a2,zero
sw s0,0x20(sp)
or s0,a0,zero
sw ra,0x34(sp)
sw s1,0x24(sp)
beq a1,zero,0x0003fedc
_lw s3,0x48(sp)
lw a0,-0x7fc8(gp)
lw t9,-0x7fb8(gp)
bal 0x00022a38
_addiu a0,a0,-0xb50
lw gp,0x18(sp)
beq s2,zero,0x0003fe88
_or s1,v0,zero
lw v0,0x198(s0)
li v1,0x1
beq v0,v1,0x0003ff78
_li v1,0x2
beq v0,v1,0x0003fefc
_lw t9,-0x7ce0(gp)
lw t9,-0x7ce0(gp)
li v0,0x1
or a3,zero,zero
sw s3,0x138(s0)
or a2,zero,zero
sw v0,0x134(s0)
addiu t9,t9,0x5a8
or a0,s0,zero
bal 0x000305a8
_or a1,s1,zero
or a0,s1,zero
lw gp,0x18(sp)
lw ra,0x34(sp)
lw s4,0x30(sp)
lw s3,0x2c(sp)
lw s2,0x28(sp)
lw s1,0x24(sp)
lw s0,0x20(sp)
lw t9,-0x7f10(gp)
b 0x00022dc4
_addiu sp,sp,0x38
bne a2,zero,0x0003ffa0
_lw t9,-0x7fb4(gp)
lw a0,-0x7fc8(gp)
bal 0x000221dc
_addiu a0,a0,-0xb3c
lw gp,0x18(sp)
b 0x0003fe88
_or s1,v0,zero
addiu t9,t9,0x34cc
bal 0x000334cc
_li a0,0x1
or a1,s4,zero
lw gp,0x18(sp)
or a0,v0,zero
lw t9,-0x7ce0(gp)
addiu t9,t9,0x364c
bal 0x0003364c
_or s4,v0,zero
or a1,s2,zero
lw gp,0x18(sp)
lw s2,-0x7ce0(gp)
addiu s2,s2,0x36bc
or t9,s2,zero
bal 0x000336bc
_or a0,s4,zero
or a0,s4,zero
lw gp,0x18(sp)
or t9,s2,zero
lw a1,-0x7fc8(gp)
bal 0x000336bc
_addiu a1,a1,-0x5530
or a1,s4,zero
lw gp,0x18(sp)
lw t9,-0x7b94(gp)
addiu t9,t9,-0x1900
bal 0x0003e700
_or a0,s0,zero
b 0x0003fe88
_lw gp,0x18(sp)
lw t9,-0x7b94(gp)
li a2,0x4
li a1,0x1
sw zero,0x10(sp)
or a3,s2,zero
addiu t9,t9,0x1954
bal 0x00041954
_or a0,s0,zero
b 0x0003fe88
_lw gp,0x18(sp)
lw a0,-0x7fc8(gp)
or a1,a2,zero
lw t9,-0x7fb8(gp)
bal 0x00022a38
_addiu a0,a0,-0xb50
lw gp,0x18(sp)
b 0x0003fe70
_or s1,v0,zero
(translation_unit "void FUN_0003fe14(int param_1,int param_2,int param_3,undefined4 param_4,undefined4 param_5)\n\n{\n  undefined4 uVar1;\n  undefined4 uVar2;\n  \n  if (param_2 == 0) {\n    if (param_3 == 0) {\n      uVar1 = dupstr(PTR_DAT_000ad2c8 + -0xb3c);\n      goto LAB_0003fe88;\n    }\n    uVar1 = dupprintf(PTR_DAT_000ad2c8 + -0xb50,param_3);\n  }\n  else {\n    uVar1 = dupprintf(PTR_DAT_000ad2c8 + -0xb50);\n    if (param_3 == 0) goto LAB_0003fe88;\n  }\n  if (*(int *)(param_1 + 0x198) == 1) {\n    FUN_00041954(param_1,1,4,param_3,0);\n  }\n  else if (*(int *)(param_1 + 0x198) == 2) {\n    uVar2 = FUN_000334cc(1);\n    FUN_0003364c(uVar2,param_4);\n    FUN_000336bc(uVar2,param_3);\n    FUN_000336bc(uVar2,PTR_DAT_000ad2c8 + -0x5530);\n    FUN_0003e700(param_1,uVar2);\n  }\nLAB_0003fe88:\n  *(undefined4 *)(param_1 + 0x138) = param_5;\n  *(undefined4 *)(param_1 + 0x134) = 1;\n  FUN_000305a8(param_1,uVar1,0,0);\n  safefree(uVar1);\n  return;\n}\n\n" (function_definition "void FUN_0003fe14(int param_1,int param_2,int param_3,undefined4 param_4,undefined4 param_5)\n\n{\n  undefined4 uVar1;\n  undefined4 uVar2;\n  \n  if (param_2 == 0) {\n    if (param_3 == 0) {\n      uVar1 = dupstr(PTR_DAT_000ad2c8 + -0xb3c);\n      goto LAB_0003fe88;\n    }\n    uVar1 = dupprintf(PTR_DAT_000ad2c8 + -0xb50,param_3);\n  }\n  else {\n    uVar1 = dupprintf(PTR_DAT_000ad2c8 + -0xb50);\n    if (param_3 == 0) goto LAB_0003fe88;\n  }\n  if (*(int *)(param_1 + 0x198) == 1) {\n    FUN_00041954(param_1,1,4,param_3,0);\n  }\n  else if (*(int *)(param_1 + 0x198) == 2) {\n    uVar2 = FUN_000334cc(1);\n    FUN_0003364c(uVar2,param_4);\n    FUN_000336bc(uVar2,param_3);\n    FUN_000336bc(uVar2,PTR_DAT_000ad2c8 + -0x5530);\n    FUN_0003e700(param_1,uVar2);\n  }\nLAB_0003fe88:\n  *(undefined4 *)(param_1 + 0x138) = param_5;\n  *(undefined4 *)(param_1 + 0x134) = 1;\n  FUN_000305a8(param_1,uVar1,0,0);\n  safefree(uVar1);\n  return;\n}" primitive_type (function_declarator "FUN_0003fe14(int param_1,int param_2,int param_3,undefined4 param_4,undefined4 param_5)" identifier (parameter_list "(int param_1,int param_2,int param_3,undefined4 param_4,undefined4 param_5)" ( (parameter_declaration "int param_1" primitive_type identifier) , (parameter_declaration "int param_2" primitive_type identifier) , (parameter_declaration "int param_3" primitive_type identifier) , (parameter_declaration "undefined4 param_4" type_identifier identifier) , (parameter_declaration "undefined4 param_5" type_identifier identifier) ))) (compound_statement "{\n  undefined4 uVar1;\n  undefined4 uVar2;\n  \n  if (param_2 == 0) {\n    if (param_3 == 0) {\n      uVar1 = dupstr(PTR_DAT_000ad2c8 + -0xb3c);\n      goto LAB_0003fe88;\n    }\n    uVar1 = dupprintf(PTR_DAT_000ad2c8 + -0xb50,param_3);\n  }\n  else {\n    uVar1 = dupprintf(PTR_DAT_000ad2c8 + -0xb50);\n    if (param_3 == 0) goto LAB_0003fe88;\n  }\n  if (*(int *)(param_1 + 0x198) == 1) {\n    FUN_00041954(param_1,1,4,param_3,0);\n  }\n  else if (*(int *)(param_1 + 0x198) == 2) {\n    uVar2 = FUN_000334cc(1);\n    FUN_0003364c(uVar2,param_4);\n    FUN_000336bc(uVar2,param_3);\n    FUN_000336bc(uVar2,PTR_DAT_000ad2c8 + -0x5530);\n    FUN_0003e700(param_1,uVar2);\n  }\nLAB_0003fe88:\n  *(undefined4 *)(param_1 + 0x138) = param_5;\n  *(undefined4 *)(param_1 + 0x134) = 1;\n  FUN_000305a8(param_1,uVar1,0,0);\n  safefree(uVar1);\n  return;\n}" { (declaration "undefined4 uVar1;" type_identifier identifier ;) (declaration "undefined4 uVar2;" type_identifier identifier ;) (if_statement "if (param_2 == 0) {\n    if (param_3 == 0) {\n      uVar1 = dupstr(PTR_DAT_000ad2c8 + -0xb3c);\n      goto LAB_0003fe88;\n    }\n    uVar1 = dupprintf(PTR_DAT_000ad2c8 + -0xb50,param_3);\n  }\n  else {\n    uVar1 = dupprintf(PTR_DAT_000ad2c8 + -0xb50);\n    if (param_3 == 0) goto LAB_0003fe88;\n  }" if (parenthesized_expression "(param_2 == 0)" ( (binary_expression "param_2 == 0" identifier == number_literal) )) (compound_statement "{\n    if (param_3 == 0) {\n      uVar1 = dupstr(PTR_DAT_000ad2c8 + -0xb3c);\n      goto LAB_0003fe88;\n    }\n    uVar1 = dupprintf(PTR_DAT_000ad2c8 + -0xb50,param_3);\n  }" { (if_statement "if (param_3 == 0) {\n      uVar1 = dupstr(PTR_DAT_000ad2c8 + -0xb3c);\n      goto LAB_0003fe88;\n    }" if (parenthesized_expression "(param_3 == 0)" ( (binary_expression "param_3 == 0" identifier == number_literal) )) (compound_statement "{\n      uVar1 = dupstr(PTR_DAT_000ad2c8 + -0xb3c);\n      goto LAB_0003fe88;\n    }" { (expression_statement "uVar1 = dupstr(PTR_DAT_000ad2c8 + -0xb3c);" (assignment_expression "uVar1 = dupstr(PTR_DAT_000ad2c8 + -0xb3c)" identifier = (call_expression "dupstr(PTR_DAT_000ad2c8 + -0xb3c)" identifier (argument_list "(PTR_DAT_000ad2c8 + -0xb3c)" ( (binary_expression "PTR_DAT_000ad2c8 + -0xb3c" identifier + number_literal) )))) ;) (goto_statement "goto LAB_0003fe88;" goto statement_identifier ;) })) (expression_statement "uVar1 = dupprintf(PTR_DAT_000ad2c8 + -0xb50,param_3);" (assignment_expression "uVar1 = dupprintf(PTR_DAT_000ad2c8 + -0xb50,param_3)" identifier = (call_expression "dupprintf(PTR_DAT_000ad2c8 + -0xb50,param_3)" identifier (argument_list "(PTR_DAT_000ad2c8 + -0xb50,param_3)" ( (binary_expression "PTR_DAT_000ad2c8 + -0xb50" identifier + number_literal) , identifier )))) ;) }) (else_clause "else {\n    uVar1 = dupprintf(PTR_DAT_000ad2c8 + -0xb50);\n    if (param_3 == 0) goto LAB_0003fe88;\n  }" else (compound_statement "{\n    uVar1 = dupprintf(PTR_DAT_000ad2c8 + -0xb50);\n    if (param_3 == 0) goto LAB_0003fe88;\n  }" { (expression_statement "uVar1 = dupprintf(PTR_DAT_000ad2c8 + -0xb50);" (assignment_expression "uVar1 = dupprintf(PTR_DAT_000ad2c8 + -0xb50)" identifier = (call_expression "dupprintf(PTR_DAT_000ad2c8 + -0xb50)" identifier (argument_list "(PTR_DAT_000ad2c8 + -0xb50)" ( (binary_expression "PTR_DAT_000ad2c8 + -0xb50" identifier + number_literal) )))) ;) (if_statement "if (param_3 == 0) goto LAB_0003fe88;" if (parenthesized_expression "(param_3 == 0)" ( (binary_expression "param_3 == 0" identifier == number_literal) )) (goto_statement "goto LAB_0003fe88;" goto statement_identifier ;)) }))) (if_statement "if (*(int *)(param_1 + 0x198) == 1) {\n    FUN_00041954(param_1,1,4,param_3,0);\n  }\n  else if (*(int *)(param_1 + 0x198) == 2) {\n    uVar2 = FUN_000334cc(1);\n    FUN_0003364c(uVar2,param_4);\n    FUN_000336bc(uVar2,param_3);\n    FUN_000336bc(uVar2,PTR_DAT_000ad2c8 + -0x5530);\n    FUN_0003e700(param_1,uVar2);\n  }" if (parenthesized_expression "(*(int *)(param_1 + 0x198) == 1)" ( (binary_expression "*(int *)(param_1 + 0x198) == 1" (pointer_expression "*(int *)(param_1 + 0x198)" * (cast_expression "(int *)(param_1 + 0x198)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x198)" ( (binary_expression "param_1 + 0x198" identifier + number_literal) )))) == number_literal) )) (compound_statement "{\n    FUN_00041954(param_1,1,4,param_3,0);\n  }" { (expression_statement "FUN_00041954(param_1,1,4,param_3,0);" (call_expression "FUN_00041954(param_1,1,4,param_3,0)" identifier (argument_list "(param_1,1,4,param_3,0)" ( identifier , number_literal , number_literal , identifier , number_literal ))) ;) }) (else_clause "else if (*(int *)(param_1 + 0x198) == 2) {\n    uVar2 = FUN_000334cc(1);\n    FUN_0003364c(uVar2,param_4);\n    FUN_000336bc(uVar2,param_3);\n    FUN_000336bc(uVar2,PTR_DAT_000ad2c8 + -0x5530);\n    FUN_0003e700(param_1,uVar2);\n  }" else (if_statement "if (*(int *)(param_1 + 0x198) == 2) {\n    uVar2 = FUN_000334cc(1);\n    FUN_0003364c(uVar2,param_4);\n    FUN_000336bc(uVar2,param_3);\n    FUN_000336bc(uVar2,PTR_DAT_000ad2c8 + -0x5530);\n    FUN_0003e700(param_1,uVar2);\n  }" if (parenthesized_expression "(*(int *)(param_1 + 0x198) == 2)" ( (binary_expression "*(int *)(param_1 + 0x198) == 2" (pointer_expression "*(int *)(param_1 + 0x198)" * (cast_expression "(int *)(param_1 + 0x198)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x198)" ( (binary_expression "param_1 + 0x198" identifier + number_literal) )))) == number_literal) )) (compound_statement "{\n    uVar2 = FUN_000334cc(1);\n    FUN_0003364c(uVar2,param_4);\n    FUN_000336bc(uVar2,param_3);\n    FUN_000336bc(uVar2,PTR_DAT_000ad2c8 + -0x5530);\n    FUN_0003e700(param_1,uVar2);\n  }" { (expression_statement "uVar2 = FUN_000334cc(1);" (assignment_expression "uVar2 = FUN_000334cc(1)" identifier = (call_expression "FUN_000334cc(1)" identifier (argument_list "(1)" ( number_literal )))) ;) (expression_statement "FUN_0003364c(uVar2,param_4);" (call_expression "FUN_0003364c(uVar2,param_4)" identifier (argument_list "(uVar2,param_4)" ( identifier , identifier ))) ;) (expression_statement "FUN_000336bc(uVar2,param_3);" (call_expression "FUN_000336bc(uVar2,param_3)" identifier (argument_list "(uVar2,param_3)" ( identifier , identifier ))) ;) (expression_statement "FUN_000336bc(uVar2,PTR_DAT_000ad2c8 + -0x5530);" (call_expression "FUN_000336bc(uVar2,PTR_DAT_000ad2c8 + -0x5530)" identifier (argument_list "(uVar2,PTR_DAT_000ad2c8 + -0x5530)" ( identifier , (binary_expression "PTR_DAT_000ad2c8 + -0x5530" identifier + number_literal) ))) ;) (expression_statement "FUN_0003e700(param_1,uVar2);" (call_expression "FUN_0003e700(param_1,uVar2)" identifier (argument_list "(param_1,uVar2)" ( identifier , identifier ))) ;) })))) (labeled_statement "LAB_0003fe88:\n  *(undefined4 *)(param_1 + 0x138) = param_5;" statement_identifier : (expression_statement "*(undefined4 *)(param_1 + 0x138) = param_5;" (assignment_expression "*(undefined4 *)(param_1 + 0x138) = param_5" (pointer_expression "*(undefined4 *)(param_1 + 0x138)" * (cast_expression "(undefined4 *)(param_1 + 0x138)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x138)" ( (binary_expression "param_1 + 0x138" identifier + number_literal) )))) = identifier) ;)) (expression_statement "*(undefined4 *)(param_1 + 0x134) = 1;" (assignment_expression "*(undefined4 *)(param_1 + 0x134) = 1" (pointer_expression "*(undefined4 *)(param_1 + 0x134)" * (cast_expression "(undefined4 *)(param_1 + 0x134)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x134)" ( (binary_expression "param_1 + 0x134" identifier + number_literal) )))) = number_literal) ;) (expression_statement "FUN_000305a8(param_1,uVar1,0,0);" (call_expression "FUN_000305a8(param_1,uVar1,0,0)" identifier (argument_list "(param_1,uVar1,0,0)" ( identifier , identifier , number_literal , number_literal ))) ;) (expression_statement "safefree(uVar1);" (call_expression "safefree(uVar1)" identifier (argument_list "(uVar1)" ( identifier ))) ;) (return_statement "return;" return ;) })))
(translation_unit "/* WARNING: Enum "anon_enum_32": Some values do not have unique names */\n\nvoid ssh_disconnect(Ssh_conflict ssh,char *client_reason,char *wire_reason,int code,int clean_exit)\n\n{\n  char *error_msg;\n  Packet *pkt;\n  \n  if (client_reason == (char *)0x0) {\n    if (wire_reason == (char *)0x0) {\n      error_msg = dupstr(PTR_DAT_000ad2c8 + -0xb3c);\n      goto LAB_0003fe88;\n    }\n    error_msg = dupprintf(PTR_DAT_000ad2c8 + -0xb50,wire_reason);\n  }\n  else {\n    error_msg = dupprintf(PTR_DAT_000ad2c8 + -0xb50);\n    if (wire_reason == (char *)0x0) goto LAB_0003fe88;\n  }\n  if (ssh->version == 1) {\n    send_packet(ssh,1,4,wire_reason,0);\n  }\n  else if (ssh->version == 2) {\n    pkt = ssh2_pkt_init(1);\n                    /* WARNING: Subroutine does not return */\n    ssh_pkt_adduint32(pkt,code);\n  }\nLAB_0003fe88:\n  ssh->clean_exit = clean_exit;\n  ssh->close_expected = 1;\n  ssh_closing(&ssh->fn,error_msg,0,0);\n                    /* WARNING: Subroutine does not return */\n  safefree(error_msg);\n}\n\n" comment (function_definition "void ssh_disconnect(Ssh_conflict ssh,char *client_reason,char *wire_reason,int code,int clean_exit)\n\n{\n  char *error_msg;\n  Packet *pkt;\n  \n  if (client_reason == (char *)0x0) {\n    if (wire_reason == (char *)0x0) {\n      error_msg = dupstr(PTR_DAT_000ad2c8 + -0xb3c);\n      goto LAB_0003fe88;\n    }\n    error_msg = dupprintf(PTR_DAT_000ad2c8 + -0xb50,wire_reason);\n  }\n  else {\n    error_msg = dupprintf(PTR_DAT_000ad2c8 + -0xb50);\n    if (wire_reason == (char *)0x0) goto LAB_0003fe88;\n  }\n  if (ssh->version == 1) {\n    send_packet(ssh,1,4,wire_reason,0);\n  }\n  else if (ssh->version == 2) {\n    pkt = ssh2_pkt_init(1);\n                    /* WARNING: Subroutine does not return */\n    ssh_pkt_adduint32(pkt,code);\n  }\nLAB_0003fe88:\n  ssh->clean_exit = clean_exit;\n  ssh->close_expected = 1;\n  ssh_closing(&ssh->fn,error_msg,0,0);\n                    /* WARNING: Subroutine does not return */\n  safefree(error_msg);\n}" primitive_type (function_declarator "ssh_disconnect(Ssh_conflict ssh,char *client_reason,char *wire_reason,int code,int clean_exit)" identifier (parameter_list "(Ssh_conflict ssh,char *client_reason,char *wire_reason,int code,int clean_exit)" ( (parameter_declaration "Ssh_conflict ssh" type_identifier identifier) , (parameter_declaration "char *client_reason" primitive_type (pointer_declarator "*client_reason" * identifier)) , (parameter_declaration "char *wire_reason" primitive_type (pointer_declarator "*wire_reason" * identifier)) , (parameter_declaration "int code" primitive_type identifier) , (parameter_declaration "int clean_exit" primitive_type identifier) ))) (compound_statement "{\n  char *error_msg;\n  Packet *pkt;\n  \n  if (client_reason == (char *)0x0) {\n    if (wire_reason == (char *)0x0) {\n      error_msg = dupstr(PTR_DAT_000ad2c8 + -0xb3c);\n      goto LAB_0003fe88;\n    }\n    error_msg = dupprintf(PTR_DAT_000ad2c8 + -0xb50,wire_reason);\n  }\n  else {\n    error_msg = dupprintf(PTR_DAT_000ad2c8 + -0xb50);\n    if (wire_reason == (char *)0x0) goto LAB_0003fe88;\n  }\n  if (ssh->version == 1) {\n    send_packet(ssh,1,4,wire_reason,0);\n  }\n  else if (ssh->version == 2) {\n    pkt = ssh2_pkt_init(1);\n                    /* WARNING: Subroutine does not return */\n    ssh_pkt_adduint32(pkt,code);\n  }\nLAB_0003fe88:\n  ssh->clean_exit = clean_exit;\n  ssh->close_expected = 1;\n  ssh_closing(&ssh->fn,error_msg,0,0);\n                    /* WARNING: Subroutine does not return */\n  safefree(error_msg);\n}" { (declaration "char *error_msg;" primitive_type (pointer_declarator "*error_msg" * identifier) ;) (declaration "Packet *pkt;" type_identifier (pointer_declarator "*pkt" * identifier) ;) (if_statement "if (client_reason == (char *)0x0) {\n    if (wire_reason == (char *)0x0) {\n      error_msg = dupstr(PTR_DAT_000ad2c8 + -0xb3c);\n      goto LAB_0003fe88;\n    }\n    error_msg = dupprintf(PTR_DAT_000ad2c8 + -0xb50,wire_reason);\n  }\n  else {\n    error_msg = dupprintf(PTR_DAT_000ad2c8 + -0xb50);\n    if (wire_reason == (char *)0x0) goto LAB_0003fe88;\n  }" if (parenthesized_expression "(client_reason == (char *)0x0)" ( (binary_expression "client_reason == (char *)0x0" identifier == (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    if (wire_reason == (char *)0x0) {\n      error_msg = dupstr(PTR_DAT_000ad2c8 + -0xb3c);\n      goto LAB_0003fe88;\n    }\n    error_msg = dupprintf(PTR_DAT_000ad2c8 + -0xb50,wire_reason);\n  }" { (if_statement "if (wire_reason == (char *)0x0) {\n      error_msg = dupstr(PTR_DAT_000ad2c8 + -0xb3c);\n      goto LAB_0003fe88;\n    }" if (parenthesized_expression "(wire_reason == (char *)0x0)" ( (binary_expression "wire_reason == (char *)0x0" identifier == (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n      error_msg = dupstr(PTR_DAT_000ad2c8 + -0xb3c);\n      goto LAB_0003fe88;\n    }" { (expression_statement "error_msg = dupstr(PTR_DAT_000ad2c8 + -0xb3c);" (assignment_expression "error_msg = dupstr(PTR_DAT_000ad2c8 + -0xb3c)" identifier = (call_expression "dupstr(PTR_DAT_000ad2c8 + -0xb3c)" identifier (argument_list "(PTR_DAT_000ad2c8 + -0xb3c)" ( (binary_expression "PTR_DAT_000ad2c8 + -0xb3c" identifier + number_literal) )))) ;) (goto_statement "goto LAB_0003fe88;" goto statement_identifier ;) })) (expression_statement "error_msg = dupprintf(PTR_DAT_000ad2c8 + -0xb50,wire_reason);" (assignment_expression "error_msg = dupprintf(PTR_DAT_000ad2c8 + -0xb50,wire_reason)" identifier = (call_expression "dupprintf(PTR_DAT_000ad2c8 + -0xb50,wire_reason)" identifier (argument_list "(PTR_DAT_000ad2c8 + -0xb50,wire_reason)" ( (binary_expression "PTR_DAT_000ad2c8 + -0xb50" identifier + number_literal) , identifier )))) ;) }) (else_clause "else {\n    error_msg = dupprintf(PTR_DAT_000ad2c8 + -0xb50);\n    if (wire_reason == (char *)0x0) goto LAB_0003fe88;\n  }" else (compound_statement "{\n    error_msg = dupprintf(PTR_DAT_000ad2c8 + -0xb50);\n    if (wire_reason == (char *)0x0) goto LAB_0003fe88;\n  }" { (expression_statement "error_msg = dupprintf(PTR_DAT_000ad2c8 + -0xb50);" (assignment_expression "error_msg = dupprintf(PTR_DAT_000ad2c8 + -0xb50)" identifier = (call_expression "dupprintf(PTR_DAT_000ad2c8 + -0xb50)" identifier (argument_list "(PTR_DAT_000ad2c8 + -0xb50)" ( (binary_expression "PTR_DAT_000ad2c8 + -0xb50" identifier + number_literal) )))) ;) (if_statement "if (wire_reason == (char *)0x0) goto LAB_0003fe88;" if (parenthesized_expression "(wire_reason == (char *)0x0)" ( (binary_expression "wire_reason == (char *)0x0" identifier == (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (goto_statement "goto LAB_0003fe88;" goto statement_identifier ;)) }))) (if_statement "if (ssh->version == 1) {\n    send_packet(ssh,1,4,wire_reason,0);\n  }\n  else if (ssh->version == 2) {\n    pkt = ssh2_pkt_init(1);\n                    /* WARNING: Subroutine does not return */\n    ssh_pkt_adduint32(pkt,code);\n  }" if (parenthesized_expression "(ssh->version == 1)" ( (binary_expression "ssh->version == 1" (field_expression "ssh->version" identifier -> field_identifier) == number_literal) )) (compound_statement "{\n    send_packet(ssh,1,4,wire_reason,0);\n  }" { (expression_statement "send_packet(ssh,1,4,wire_reason,0);" (call_expression "send_packet(ssh,1,4,wire_reason,0)" identifier (argument_list "(ssh,1,4,wire_reason,0)" ( identifier , number_literal , number_literal , identifier , number_literal ))) ;) }) (else_clause "else if (ssh->version == 2) {\n    pkt = ssh2_pkt_init(1);\n                    /* WARNING: Subroutine does not return */\n    ssh_pkt_adduint32(pkt,code);\n  }" else (if_statement "if (ssh->version == 2) {\n    pkt = ssh2_pkt_init(1);\n                    /* WARNING: Subroutine does not return */\n    ssh_pkt_adduint32(pkt,code);\n  }" if (parenthesized_expression "(ssh->version == 2)" ( (binary_expression "ssh->version == 2" (field_expression "ssh->version" identifier -> field_identifier) == number_literal) )) (compound_statement "{\n    pkt = ssh2_pkt_init(1);\n                    /* WARNING: Subroutine does not return */\n    ssh_pkt_adduint32(pkt,code);\n  }" { (expression_statement "pkt = ssh2_pkt_init(1);" (assignment_expression "pkt = ssh2_pkt_init(1)" identifier = (call_expression "ssh2_pkt_init(1)" identifier (argument_list "(1)" ( number_literal )))) ;) comment (expression_statement "ssh_pkt_adduint32(pkt,code);" (call_expression "ssh_pkt_adduint32(pkt,code)" identifier (argument_list "(pkt,code)" ( identifier , identifier ))) ;) })))) (labeled_statement "LAB_0003fe88:\n  ssh->clean_exit = clean_exit;" statement_identifier : (expression_statement "ssh->clean_exit = clean_exit;" (assignment_expression "ssh->clean_exit = clean_exit" (field_expression "ssh->clean_exit" identifier -> field_identifier) = identifier) ;)) (expression_statement "ssh->close_expected = 1;" (assignment_expression "ssh->close_expected = 1" (field_expression "ssh->close_expected" identifier -> field_identifier) = number_literal) ;) (expression_statement "ssh_closing(&ssh->fn,error_msg,0,0);" (call_expression "ssh_closing(&ssh->fn,error_msg,0,0)" identifier (argument_list "(&ssh->fn,error_msg,0,0)" ( (pointer_expression "&ssh->fn" & (field_expression "ssh->fn" identifier -> field_identifier)) , identifier , number_literal , number_literal ))) ;) comment (expression_statement "safefree(error_msg);" (call_expression "safefree(error_msg)" identifier (argument_list "(error_msg)" ( identifier ))) ;) })))
(translation_unit "void FUN_0003fe14(int param_1,int param_2,int param_3,undefined4 param_4,undefined4 param_5)\n\n{\n  undefined4 uVar1;\n  undefined4 uVar2;\n  \n  if (param_2 == 0) {\n    if (param_3 == 0) {\n      uVar1 = dupstr(PTR_DAT_000ad2c8 + -0xb3c);\n      goto LAB_0003fe88;\n    }\n    uVar1 = dupprintf(PTR_DAT_000ad2c8 + -0xb50,param_3);\n  }\n  else {\n    uVar1 = dupprintf(PTR_DAT_000ad2c8 + -0xb50);\n    if (param_3 == 0) goto LAB_0003fe88;\n  }\n  if (*(int *)(param_1 + 0x198) == 1) {\n    FUN_00041954(param_1,1,4,param_3,0);\n  }\n  else if (*(int *)(param_1 + 0x198) == 2) {\n    uVar2 = FUN_000334cc(1);\n    FUN_0003364c(uVar2,param_4);\n    FUN_000336bc(uVar2,param_3);\n    FUN_000336bc(uVar2,PTR_DAT_000ad2c8 + -0x5530);\n    FUN_0003e700(param_1,uVar2);\n  }\nLAB_0003fe88:\n  *(undefined4 *)(param_1 + 0x138) = param_5;\n  *(undefined4 *)(param_1 + 0x134) = 1;\n  FUN_000305a8(param_1,uVar1,0,0);\n  safefree(uVar1);\n  return;\n}\n\n" (function_definition "void FUN_0003fe14(int param_1,int param_2,int param_3,undefined4 param_4,undefined4 param_5)\n\n{\n  undefined4 uVar1;\n  undefined4 uVar2;\n  \n  if (param_2 == 0) {\n    if (param_3 == 0) {\n      uVar1 = dupstr(PTR_DAT_000ad2c8 + -0xb3c);\n      goto LAB_0003fe88;\n    }\n    uVar1 = dupprintf(PTR_DAT_000ad2c8 + -0xb50,param_3);\n  }\n  else {\n    uVar1 = dupprintf(PTR_DAT_000ad2c8 + -0xb50);\n    if (param_3 == 0) goto LAB_0003fe88;\n  }\n  if (*(int *)(param_1 + 0x198) == 1) {\n    FUN_00041954(param_1,1,4,param_3,0);\n  }\n  else if (*(int *)(param_1 + 0x198) == 2) {\n    uVar2 = FUN_000334cc(1);\n    FUN_0003364c(uVar2,param_4);\n    FUN_000336bc(uVar2,param_3);\n    FUN_000336bc(uVar2,PTR_DAT_000ad2c8 + -0x5530);\n    FUN_0003e700(param_1,uVar2);\n  }\nLAB_0003fe88:\n  *(undefined4 *)(param_1 + 0x138) = param_5;\n  *(undefined4 *)(param_1 + 0x134) = 1;\n  FUN_000305a8(param_1,uVar1,0,0);\n  safefree(uVar1);\n  return;\n}" primitive_type (function_declarator "FUN_0003fe14(int param_1,int param_2,int param_3,undefined4 param_4,undefined4 param_5)" identifier (parameter_list "(int param_1,int param_2,int param_3,undefined4 param_4,undefined4 param_5)" ( (parameter_declaration "int param_1" primitive_type identifier) , (parameter_declaration "int param_2" primitive_type identifier) , (parameter_declaration "int param_3" primitive_type identifier) , (parameter_declaration "undefined4 param_4" type_identifier identifier) , (parameter_declaration "undefined4 param_5" type_identifier identifier) ))) (compound_statement "{\n  undefined4 uVar1;\n  undefined4 uVar2;\n  \n  if (param_2 == 0) {\n    if (param_3 == 0) {\n      uVar1 = dupstr(PTR_DAT_000ad2c8 + -0xb3c);\n      goto LAB_0003fe88;\n    }\n    uVar1 = dupprintf(PTR_DAT_000ad2c8 + -0xb50,param_3);\n  }\n  else {\n    uVar1 = dupprintf(PTR_DAT_000ad2c8 + -0xb50);\n    if (param_3 == 0) goto LAB_0003fe88;\n  }\n  if (*(int *)(param_1 + 0x198) == 1) {\n    FUN_00041954(param_1,1,4,param_3,0);\n  }\n  else if (*(int *)(param_1 + 0x198) == 2) {\n    uVar2 = FUN_000334cc(1);\n    FUN_0003364c(uVar2,param_4);\n    FUN_000336bc(uVar2,param_3);\n    FUN_000336bc(uVar2,PTR_DAT_000ad2c8 + -0x5530);\n    FUN_0003e700(param_1,uVar2);\n  }\nLAB_0003fe88:\n  *(undefined4 *)(param_1 + 0x138) = param_5;\n  *(undefined4 *)(param_1 + 0x134) = 1;\n  FUN_000305a8(param_1,uVar1,0,0);\n  safefree(uVar1);\n  return;\n}" { (declaration "undefined4 uVar1;" type_identifier identifier ;) (declaration "undefined4 uVar2;" type_identifier identifier ;) (if_statement "if (param_2 == 0) {\n    if (param_3 == 0) {\n      uVar1 = dupstr(PTR_DAT_000ad2c8 + -0xb3c);\n      goto LAB_0003fe88;\n    }\n    uVar1 = dupprintf(PTR_DAT_000ad2c8 + -0xb50,param_3);\n  }\n  else {\n    uVar1 = dupprintf(PTR_DAT_000ad2c8 + -0xb50);\n    if (param_3 == 0) goto LAB_0003fe88;\n  }" if (parenthesized_expression "(param_2 == 0)" ( (binary_expression "param_2 == 0" identifier == number_literal) )) (compound_statement "{\n    if (param_3 == 0) {\n      uVar1 = dupstr(PTR_DAT_000ad2c8 + -0xb3c);\n      goto LAB_0003fe88;\n    }\n    uVar1 = dupprintf(PTR_DAT_000ad2c8 + -0xb50,param_3);\n  }" { (if_statement "if (param_3 == 0) {\n      uVar1 = dupstr(PTR_DAT_000ad2c8 + -0xb3c);\n      goto LAB_0003fe88;\n    }" if (parenthesized_expression "(param_3 == 0)" ( (binary_expression "param_3 == 0" identifier == number_literal) )) (compound_statement "{\n      uVar1 = dupstr(PTR_DAT_000ad2c8 + -0xb3c);\n      goto LAB_0003fe88;\n    }" { (expression_statement "uVar1 = dupstr(PTR_DAT_000ad2c8 + -0xb3c);" (assignment_expression "uVar1 = dupstr(PTR_DAT_000ad2c8 + -0xb3c)" identifier = (call_expression "dupstr(PTR_DAT_000ad2c8 + -0xb3c)" identifier (argument_list "(PTR_DAT_000ad2c8 + -0xb3c)" ( (binary_expression "PTR_DAT_000ad2c8 + -0xb3c" identifier + number_literal) )))) ;) (goto_statement "goto LAB_0003fe88;" goto statement_identifier ;) })) (expression_statement "uVar1 = dupprintf(PTR_DAT_000ad2c8 + -0xb50,param_3);" (assignment_expression "uVar1 = dupprintf(PTR_DAT_000ad2c8 + -0xb50,param_3)" identifier = (call_expression "dupprintf(PTR_DAT_000ad2c8 + -0xb50,param_3)" identifier (argument_list "(PTR_DAT_000ad2c8 + -0xb50,param_3)" ( (binary_expression "PTR_DAT_000ad2c8 + -0xb50" identifier + number_literal) , identifier )))) ;) }) (else_clause "else {\n    uVar1 = dupprintf(PTR_DAT_000ad2c8 + -0xb50);\n    if (param_3 == 0) goto LAB_0003fe88;\n  }" else (compound_statement "{\n    uVar1 = dupprintf(PTR_DAT_000ad2c8 + -0xb50);\n    if (param_3 == 0) goto LAB_0003fe88;\n  }" { (expression_statement "uVar1 = dupprintf(PTR_DAT_000ad2c8 + -0xb50);" (assignment_expression "uVar1 = dupprintf(PTR_DAT_000ad2c8 + -0xb50)" identifier = (call_expression "dupprintf(PTR_DAT_000ad2c8 + -0xb50)" identifier (argument_list "(PTR_DAT_000ad2c8 + -0xb50)" ( (binary_expression "PTR_DAT_000ad2c8 + -0xb50" identifier + number_literal) )))) ;) (if_statement "if (param_3 == 0) goto LAB_0003fe88;" if (parenthesized_expression "(param_3 == 0)" ( (binary_expression "param_3 == 0" identifier == number_literal) )) (goto_statement "goto LAB_0003fe88;" goto statement_identifier ;)) }))) (if_statement "if (*(int *)(param_1 + 0x198) == 1) {\n    FUN_00041954(param_1,1,4,param_3,0);\n  }\n  else if (*(int *)(param_1 + 0x198) == 2) {\n    uVar2 = FUN_000334cc(1);\n    FUN_0003364c(uVar2,param_4);\n    FUN_000336bc(uVar2,param_3);\n    FUN_000336bc(uVar2,PTR_DAT_000ad2c8 + -0x5530);\n    FUN_0003e700(param_1,uVar2);\n  }" if (parenthesized_expression "(*(int *)(param_1 + 0x198) == 1)" ( (binary_expression "*(int *)(param_1 + 0x198) == 1" (pointer_expression "*(int *)(param_1 + 0x198)" * (cast_expression "(int *)(param_1 + 0x198)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x198)" ( (binary_expression "param_1 + 0x198" identifier + number_literal) )))) == number_literal) )) (compound_statement "{\n    FUN_00041954(param_1,1,4,param_3,0);\n  }" { (expression_statement "FUN_00041954(param_1,1,4,param_3,0);" (call_expression "FUN_00041954(param_1,1,4,param_3,0)" identifier (argument_list "(param_1,1,4,param_3,0)" ( identifier , number_literal , number_literal , identifier , number_literal ))) ;) }) (else_clause "else if (*(int *)(param_1 + 0x198) == 2) {\n    uVar2 = FUN_000334cc(1);\n    FUN_0003364c(uVar2,param_4);\n    FUN_000336bc(uVar2,param_3);\n    FUN_000336bc(uVar2,PTR_DAT_000ad2c8 + -0x5530);\n    FUN_0003e700(param_1,uVar2);\n  }" else (if_statement "if (*(int *)(param_1 + 0x198) == 2) {\n    uVar2 = FUN_000334cc(1);\n    FUN_0003364c(uVar2,param_4);\n    FUN_000336bc(uVar2,param_3);\n    FUN_000336bc(uVar2,PTR_DAT_000ad2c8 + -0x5530);\n    FUN_0003e700(param_1,uVar2);\n  }" if (parenthesized_expression "(*(int *)(param_1 + 0x198) == 2)" ( (binary_expression "*(int *)(param_1 + 0x198) == 2" (pointer_expression "*(int *)(param_1 + 0x198)" * (cast_expression "(int *)(param_1 + 0x198)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x198)" ( (binary_expression "param_1 + 0x198" identifier + number_literal) )))) == number_literal) )) (compound_statement "{\n    uVar2 = FUN_000334cc(1);\n    FUN_0003364c(uVar2,param_4);\n    FUN_000336bc(uVar2,param_3);\n    FUN_000336bc(uVar2,PTR_DAT_000ad2c8 + -0x5530);\n    FUN_0003e700(param_1,uVar2);\n  }" { (expression_statement "uVar2 = FUN_000334cc(1);" (assignment_expression "uVar2 = FUN_000334cc(1)" identifier = (call_expression "FUN_000334cc(1)" identifier (argument_list "(1)" ( number_literal )))) ;) (expression_statement "FUN_0003364c(uVar2,param_4);" (call_expression "FUN_0003364c(uVar2,param_4)" identifier (argument_list "(uVar2,param_4)" ( identifier , identifier ))) ;) (expression_statement "FUN_000336bc(uVar2,param_3);" (call_expression "FUN_000336bc(uVar2,param_3)" identifier (argument_list "(uVar2,param_3)" ( identifier , identifier ))) ;) (expression_statement "FUN_000336bc(uVar2,PTR_DAT_000ad2c8 + -0x5530);" (call_expression "FUN_000336bc(uVar2,PTR_DAT_000ad2c8 + -0x5530)" identifier (argument_list "(uVar2,PTR_DAT_000ad2c8 + -0x5530)" ( identifier , (binary_expression "PTR_DAT_000ad2c8 + -0x5530" identifier + number_literal) ))) ;) (expression_statement "FUN_0003e700(param_1,uVar2);" (call_expression "FUN_0003e700(param_1,uVar2)" identifier (argument_list "(param_1,uVar2)" ( identifier , identifier ))) ;) })))) (labeled_statement "LAB_0003fe88:\n  *(undefined4 *)(param_1 + 0x138) = param_5;" statement_identifier : (expression_statement "*(undefined4 *)(param_1 + 0x138) = param_5;" (assignment_expression "*(undefined4 *)(param_1 + 0x138) = param_5" (pointer_expression "*(undefined4 *)(param_1 + 0x138)" * (cast_expression "(undefined4 *)(param_1 + 0x138)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x138)" ( (binary_expression "param_1 + 0x138" identifier + number_literal) )))) = identifier) ;)) (expression_statement "*(undefined4 *)(param_1 + 0x134) = 1;" (assignment_expression "*(undefined4 *)(param_1 + 0x134) = 1" (pointer_expression "*(undefined4 *)(param_1 + 0x134)" * (cast_expression "(undefined4 *)(param_1 + 0x134)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x134)" ( (binary_expression "param_1 + 0x134" identifier + number_literal) )))) = number_literal) ;) (expression_statement "FUN_000305a8(param_1,uVar1,0,0);" (call_expression "FUN_000305a8(param_1,uVar1,0,0)" identifier (argument_list "(param_1,uVar1,0,0)" ( identifier , identifier , number_literal , number_literal ))) ;) (expression_statement "safefree(uVar1);" (call_expression "safefree(uVar1)" identifier (argument_list "(uVar1)" ( identifier ))) ;) (return_statement "return;" return ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( (binary_expression IDENT + LIT) )))) ;) (goto_statement goto statement_identifier ;) })) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( (binary_expression IDENT + LIT) , IDENT )))) ;) }) (else_clause else (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( (binary_expression IDENT + LIT) )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (goto_statement goto statement_identifier ;)) }))) (if_statement if (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) == LIT) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( IDENT , LIT , LIT , IDENT , LIT ))) ;) }) (else_clause else (if_statement if (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) == LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( LIT )))) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT , IDENT ))) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT , IDENT ))) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT , (binary_expression IDENT + LIT) ))) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT , IDENT ))) ;) })))) (labeled_statement statement_identifier : (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = IDENT) ;)) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = LIT) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT , IDENT , LIT , LIT ))) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) (return_statement return ;) })))
(function_definition "void FUN_0003fe14(int param_1,int param_2,int param_3,undefined4 param_4,undefined4 param_5)\n\n{\n  undefined4 uVar1;\n  undefined4 uVar2;\n  \n  if (param_2 == 0) {\n    if (param_3 == 0) {\n      uVar1 = dupstr(PTR_DAT_000ad2c8 + -0xb3c);\n      goto LAB_0003fe88;\n    }\n    uVar1 = dupprintf(PTR_DAT_000ad2c8 + -0xb50,param_3);\n  }\n  else {\n    uVar1 = dupprintf(PTR_DAT_000ad2c8 + -0xb50);\n    if (param_3 == 0) goto LAB_0003fe88;\n  }\n  if (*(int *)(param_1 + 0x198) == 1) {\n    FUN_00041954(param_1,1,4,param_3,0);\n  }\n  else if (*(int *)(param_1 + 0x198) == 2) {\n    uVar2 = FUN_000334cc(1);\n    FUN_0003364c(uVar2,param_4);\n    FUN_000336bc(uVar2,param_3);\n    FUN_000336bc(uVar2,PTR_DAT_000ad2c8 + -0x5530);\n    FUN_0003e700(param_1,uVar2);\n  }\nLAB_0003fe88:\n  *(undefined4 *)(param_1 + 0x138) = param_5;\n  *(undefined4 *)(param_1 + 0x134) = 1;\n  FUN_000305a8(param_1,uVar1,0,0);\n  safefree(uVar1);\n  return;\n}" (primitive_type "void") (function_declarator "FUN_0003fe14(int param_1,int param_2,int param_3,undefined4 param_4,undefined4 param_5)" (identifier "FUN_0003fe14") (parameter_list "(int param_1,int param_2,int param_3,undefined4 param_4,undefined4 param_5)" (( "(") (parameter_declaration "int param_1" (primitive_type "int") (identifier "param_1")) (, ",") (parameter_declaration "int param_2" (primitive_type "int") (identifier "param_2")) (, ",") (parameter_declaration "int param_3" (primitive_type "int") (identifier "param_3")) (, ",") (parameter_declaration "undefined4 param_4" (type_identifier "undefined4") (identifier "param_4")) (, ",") (parameter_declaration "undefined4 param_5" (type_identifier "undefined4") (identifier "param_5")) () ")"))) (compound_statement "{\n  undefined4 uVar1;\n  undefined4 uVar2;\n  \n  if (param_2 == 0) {\n    if (param_3 == 0) {\n      uVar1 = dupstr(PTR_DAT_000ad2c8 + -0xb3c);\n      goto LAB_0003fe88;\n    }\n    uVar1 = dupprintf(PTR_DAT_000ad2c8 + -0xb50,param_3);\n  }\n  else {\n    uVar1 = dupprintf(PTR_DAT_000ad2c8 + -0xb50);\n    if (param_3 == 0) goto LAB_0003fe88;\n  }\n  if (*(int *)(param_1 + 0x198) == 1) {\n    FUN_00041954(param_1,1,4,param_3,0);\n  }\n  else if (*(int *)(param_1 + 0x198) == 2) {\n    uVar2 = FUN_000334cc(1);\n    FUN_0003364c(uVar2,param_4);\n    FUN_000336bc(uVar2,param_3);\n    FUN_000336bc(uVar2,PTR_DAT_000ad2c8 + -0x5530);\n    FUN_0003e700(param_1,uVar2);\n  }\nLAB_0003fe88:\n  *(undefined4 *)(param_1 + 0x138) = param_5;\n  *(undefined4 *)(param_1 + 0x134) = 1;\n  FUN_000305a8(param_1,uVar1,0,0);\n  safefree(uVar1);\n  return;\n}" ({ "{") (declaration "undefined4 uVar1;" (type_identifier "undefined4") (identifier "uVar1") (; ";")) (declaration "undefined4 uVar2;" (type_identifier "undefined4") (identifier "uVar2") (; ";")) (if_statement "if (param_2 == 0) {\n    if (param_3 == 0) {\n      uVar1 = dupstr(PTR_DAT_000ad2c8 + -0xb3c);\n      goto LAB_0003fe88;\n    }\n    uVar1 = dupprintf(PTR_DAT_000ad2c8 + -0xb50,param_3);\n  }\n  else {\n    uVar1 = dupprintf(PTR_DAT_000ad2c8 + -0xb50);\n    if (param_3 == 0) goto LAB_0003fe88;\n  }" (if "if") (parenthesized_expression "(param_2 == 0)" (( "(") (binary_expression "param_2 == 0" (identifier "param_2") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n    if (param_3 == 0) {\n      uVar1 = dupstr(PTR_DAT_000ad2c8 + -0xb3c);\n      goto LAB_0003fe88;\n    }\n    uVar1 = dupprintf(PTR_DAT_000ad2c8 + -0xb50,param_3);\n  }" ({ "{") (if_statement "if (param_3 == 0) {\n      uVar1 = dupstr(PTR_DAT_000ad2c8 + -0xb3c);\n      goto LAB_0003fe88;\n    }" (if "if") (parenthesized_expression "(param_3 == 0)" (( "(") (binary_expression "param_3 == 0" (identifier "param_3") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n      uVar1 = dupstr(PTR_DAT_000ad2c8 + -0xb3c);\n      goto LAB_0003fe88;\n    }" ({ "{") (expression_statement "uVar1 = dupstr(PTR_DAT_000ad2c8 + -0xb3c);" (assignment_expression "uVar1 = dupstr(PTR_DAT_000ad2c8 + -0xb3c)" (identifier "uVar1") (= "=") (call_expression "dupstr(PTR_DAT_000ad2c8 + -0xb3c)" (identifier "dupstr") (argument_list "(PTR_DAT_000ad2c8 + -0xb3c)" (( "(") (binary_expression "PTR_DAT_000ad2c8 + -0xb3c" (identifier "PTR_DAT_000ad2c8") (+ "+") (number_literal "-0xb3c")) () ")")))) (; ";")) (goto_statement "goto LAB_0003fe88;" (goto "goto") (statement_identifier "LAB_0003fe88") (; ";")) (} "}"))) (expression_statement "uVar1 = dupprintf(PTR_DAT_000ad2c8 + -0xb50,param_3);" (assignment_expression "uVar1 = dupprintf(PTR_DAT_000ad2c8 + -0xb50,param_3)" (identifier "uVar1") (= "=") (call_expression "dupprintf(PTR_DAT_000ad2c8 + -0xb50,param_3)" (identifier "dupprintf") (argument_list "(PTR_DAT_000ad2c8 + -0xb50,param_3)" (( "(") (binary_expression "PTR_DAT_000ad2c8 + -0xb50" (identifier "PTR_DAT_000ad2c8") (+ "+") (number_literal "-0xb50")) (, ",") (identifier "param_3") () ")")))) (; ";")) (} "}")) (else_clause "else {\n    uVar1 = dupprintf(PTR_DAT_000ad2c8 + -0xb50);\n    if (param_3 == 0) goto LAB_0003fe88;\n  }" (else "else") (compound_statement "{\n    uVar1 = dupprintf(PTR_DAT_000ad2c8 + -0xb50);\n    if (param_3 == 0) goto LAB_0003fe88;\n  }" ({ "{") (expression_statement "uVar1 = dupprintf(PTR_DAT_000ad2c8 + -0xb50);" (assignment_expression "uVar1 = dupprintf(PTR_DAT_000ad2c8 + -0xb50)" (identifier "uVar1") (= "=") (call_expression "dupprintf(PTR_DAT_000ad2c8 + -0xb50)" (identifier "dupprintf") (argument_list "(PTR_DAT_000ad2c8 + -0xb50)" (( "(") (binary_expression "PTR_DAT_000ad2c8 + -0xb50" (identifier "PTR_DAT_000ad2c8") (+ "+") (number_literal "-0xb50")) () ")")))) (; ";")) (if_statement "if (param_3 == 0) goto LAB_0003fe88;" (if "if") (parenthesized_expression "(param_3 == 0)" (( "(") (binary_expression "param_3 == 0" (identifier "param_3") (== "==") (number_literal "0")) () ")")) (goto_statement "goto LAB_0003fe88;" (goto "goto") (statement_identifier "LAB_0003fe88") (; ";"))) (} "}")))) (if_statement "if (*(int *)(param_1 + 0x198) == 1) {\n    FUN_00041954(param_1,1,4,param_3,0);\n  }\n  else if (*(int *)(param_1 + 0x198) == 2) {\n    uVar2 = FUN_000334cc(1);\n    FUN_0003364c(uVar2,param_4);\n    FUN_000336bc(uVar2,param_3);\n    FUN_000336bc(uVar2,PTR_DAT_000ad2c8 + -0x5530);\n    FUN_0003e700(param_1,uVar2);\n  }" (if "if") (parenthesized_expression "(*(int *)(param_1 + 0x198) == 1)" (( "(") (binary_expression "*(int *)(param_1 + 0x198) == 1" (pointer_expression "*(int *)(param_1 + 0x198)" (* "*") (cast_expression "(int *)(param_1 + 0x198)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x198)" (( "(") (binary_expression "param_1 + 0x198" (identifier "param_1") (+ "+") (number_literal "0x198")) () ")")))) (== "==") (number_literal "1")) () ")")) (compound_statement "{\n    FUN_00041954(param_1,1,4,param_3,0);\n  }" ({ "{") (expression_statement "FUN_00041954(param_1,1,4,param_3,0);" (call_expression "FUN_00041954(param_1,1,4,param_3,0)" (identifier "FUN_00041954") (argument_list "(param_1,1,4,param_3,0)" (( "(") (identifier "param_1") (, ",") (number_literal "1") (, ",") (number_literal "4") (, ",") (identifier "param_3") (, ",") (number_literal "0") () ")"))) (; ";")) (} "}")) (else_clause "else if (*(int *)(param_1 + 0x198) == 2) {\n    uVar2 = FUN_000334cc(1);\n    FUN_0003364c(uVar2,param_4);\n    FUN_000336bc(uVar2,param_3);\n    FUN_000336bc(uVar2,PTR_DAT_000ad2c8 + -0x5530);\n    FUN_0003e700(param_1,uVar2);\n  }" (else "else") (if_statement "if (*(int *)(param_1 + 0x198) == 2) {\n    uVar2 = FUN_000334cc(1);\n    FUN_0003364c(uVar2,param_4);\n    FUN_000336bc(uVar2,param_3);\n    FUN_000336bc(uVar2,PTR_DAT_000ad2c8 + -0x5530);\n    FUN_0003e700(param_1,uVar2);\n  }" (if "if") (parenthesized_expression "(*(int *)(param_1 + 0x198) == 2)" (( "(") (binary_expression "*(int *)(param_1 + 0x198) == 2" (pointer_expression "*(int *)(param_1 + 0x198)" (* "*") (cast_expression "(int *)(param_1 + 0x198)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x198)" (( "(") (binary_expression "param_1 + 0x198" (identifier "param_1") (+ "+") (number_literal "0x198")) () ")")))) (== "==") (number_literal "2")) () ")")) (compound_statement "{\n    uVar2 = FUN_000334cc(1);\n    FUN_0003364c(uVar2,param_4);\n    FUN_000336bc(uVar2,param_3);\n    FUN_000336bc(uVar2,PTR_DAT_000ad2c8 + -0x5530);\n    FUN_0003e700(param_1,uVar2);\n  }" ({ "{") (expression_statement "uVar2 = FUN_000334cc(1);" (assignment_expression "uVar2 = FUN_000334cc(1)" (identifier "uVar2") (= "=") (call_expression "FUN_000334cc(1)" (identifier "FUN_000334cc") (argument_list "(1)" (( "(") (number_literal "1") () ")")))) (; ";")) (expression_statement "FUN_0003364c(uVar2,param_4);" (call_expression "FUN_0003364c(uVar2,param_4)" (identifier "FUN_0003364c") (argument_list "(uVar2,param_4)" (( "(") (identifier "uVar2") (, ",") (identifier "param_4") () ")"))) (; ";")) (expression_statement "FUN_000336bc(uVar2,param_3);" (call_expression "FUN_000336bc(uVar2,param_3)" (identifier "FUN_000336bc") (argument_list "(uVar2,param_3)" (( "(") (identifier "uVar2") (, ",") (identifier "param_3") () ")"))) (; ";")) (expression_statement "FUN_000336bc(uVar2,PTR_DAT_000ad2c8 + -0x5530);" (call_expression "FUN_000336bc(uVar2,PTR_DAT_000ad2c8 + -0x5530)" (identifier "FUN_000336bc") (argument_list "(uVar2,PTR_DAT_000ad2c8 + -0x5530)" (( "(") (identifier "uVar2") (, ",") (binary_expression "PTR_DAT_000ad2c8 + -0x5530" (identifier "PTR_DAT_000ad2c8") (+ "+") (number_literal "-0x5530")) () ")"))) (; ";")) (expression_statement "FUN_0003e700(param_1,uVar2);" (call_expression "FUN_0003e700(param_1,uVar2)" (identifier "FUN_0003e700") (argument_list "(param_1,uVar2)" (( "(") (identifier "param_1") (, ",") (identifier "uVar2") () ")"))) (; ";")) (} "}"))))) (labeled_statement "LAB_0003fe88:\n  *(undefined4 *)(param_1 + 0x138) = param_5;" (statement_identifier "LAB_0003fe88") (: ":") (expression_statement "*(undefined4 *)(param_1 + 0x138) = param_5;" (assignment_expression "*(undefined4 *)(param_1 + 0x138) = param_5" (pointer_expression "*(undefined4 *)(param_1 + 0x138)" (* "*") (cast_expression "(undefined4 *)(param_1 + 0x138)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x138)" (( "(") (binary_expression "param_1 + 0x138" (identifier "param_1") (+ "+") (number_literal "0x138")) () ")")))) (= "=") (identifier "param_5")) (; ";"))) (expression_statement "*(undefined4 *)(param_1 + 0x134) = 1;" (assignment_expression "*(undefined4 *)(param_1 + 0x134) = 1" (pointer_expression "*(undefined4 *)(param_1 + 0x134)" (* "*") (cast_expression "(undefined4 *)(param_1 + 0x134)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x134)" (( "(") (binary_expression "param_1 + 0x134" (identifier "param_1") (+ "+") (number_literal "0x134")) () ")")))) (= "=") (number_literal "1")) (; ";")) (expression_statement "FUN_000305a8(param_1,uVar1,0,0);" (call_expression "FUN_000305a8(param_1,uVar1,0,0)" (identifier "FUN_000305a8") (argument_list "(param_1,uVar1,0,0)" (( "(") (identifier "param_1") (, ",") (identifier "uVar1") (, ",") (number_literal "0") (, ",") (number_literal "0") () ")"))) (; ";")) (expression_statement "safefree(uVar1);" (call_expression "safefree(uVar1)" (identifier "safefree") (argument_list "(uVar1)" (( "(") (identifier "uVar1") () ")"))) (; ";")) (return_statement "return;" (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)) (parameter_declaration type: (primitive_type) declarator: (identifier)) (parameter_declaration type: (type_identifier) declarator: (identifier)) (parameter_declaration type: (type_identifier) declarator: (identifier)))) body: (compound_statement (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (type_identifier) declarator: (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: (number_literal))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (binary_expression left: (identifier) right: (number_literal)))))) (goto_statement label: (statement_identifier)))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (binary_expression left: (identifier) right: (number_literal)) (identifier)))))) alternative: (else_clause (compound_statement (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (binary_expression left: (identifier) right: (number_literal)))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (goto_statement label: (statement_identifier)))))) (if_statement condition: (parenthesized_expression (binary_expression left: (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))))) right: (number_literal))) consequence: (compound_statement (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier) (number_literal) (number_literal) (identifier) (number_literal))))) alternative: (else_clause (if_statement condition: (parenthesized_expression (binary_expression left: (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))))) right: (number_literal))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (number_literal))))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier) (identifier)))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier) (identifier)))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier) (binary_expression left: (identifier) right: (number_literal))))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier) (identifier)))))))) (labeled_statement label: (statement_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: (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))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier) (identifier) (number_literal) (number_literal)))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier)))) (return_statement))))

void MASKED(int param_1,int param_2,int param_3,undefined4 param_4,undefined4 param_5)

{
  undefined4 uVar1;
  undefined4 uVar2;
  
  if (param_2 == 0) {
    if (param_3 == 0) {
      uVar1 = dupstr(PTR_DAT_000ad2c8 + -0xb3c);
      goto LAB_0003fe88;
    }
    uVar1 = dupprintf(PTR_DAT_000ad2c8 + -0xb50,param_3);
  }
  else {
    uVar1 = dupprintf(PTR_DAT_000ad2c8 + -0xb50);
    if (param_3 == 0) goto LAB_0003fe88;
  }
  if (*(int *)(param_1 + 0x198) == 1) {
    FUN_00041954(param_1,1,4,param_3,0);
  }
  else if (*(int *)(param_1 + 0x198) == 2) {
    uVar2 = FUN_000334cc(1);
    FUN_0003364c(uVar2,param_4);
    FUN_000336bc(uVar2,param_3);
    FUN_000336bc(uVar2,PTR_DAT_000ad2c8 + -0x5530);
    FUN_0003e700(param_1,uVar2);
  }
LAB_0003fe88:
  *(undefined4 *)(param_1 + 0x138) = param_5;
  *(undefined4 *)(param_1 + 0x134) = 1;
  FUN_000305a8(param_1,uVar1,0,0);
  safefree(uVar1);
  return;
}

