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

void ssh1_msg_channel_close(Ssh_conflict ssh,Packet *pktin)

{
  ssh_channel *c;
  char *text;
  
  c = ssh_channel_msg(ssh,pktin);
  if (c != (ssh_channel *)0x0) {
    if (pktin->type == 0x18) {
      ssh_channel_got_eof(c);
    }
    if ((pktin->type == 0x19) && ((c->closes & 8U) == 0)) {
      if ((c->closes & 1U) == 0) {
        text = dupprintf("Received CHANNEL_CLOSE_CONFIRMATION for channel %u for which we never sent CHANNEL_CLOSE\n"
                         ,(ulong)c->localid);
        bomb_out(ssh,text);
      }
      c->closes = c->closes | 8;
    }
    if ((c->closes & 7U) == 5) {
      send_packet(ssh,0x19,1,(ulong)c->remoteid,0);
      c->closes = c->closes | 2;
    }
    if ((~c->closes & 10U) == 0) {
      ssh_channel_destroy(c);
    }
  }
  return;
}



void FUN_00128291(undefined8 param_1,long param_2)

{
  long lVar1;
  undefined8 uVar2;
  
  lVar1 = FUN_001258d2();
  if (lVar1 != 0) {
    if (*(int *)(param_2 + 0x10) == 0x18) {
      FUN_00127b69(lVar1);
    }
    if ((*(int *)(param_2 + 0x10) == 0x19) && ((*(uint *)(lVar1 + 0x18) & 8) == 0)) {
      if ((*(uint *)(lVar1 + 0x18) & 1) == 0) {
        uVar2 = FUN_0010f07c("Received CHANNEL_CLOSE_CONFIRMATION for channel %u for which we never sent CHANNEL_CLOSE\n"
                             ,*(undefined4 *)(lVar1 + 0xc));
        FUN_0011b5c2(param_1,uVar2);
      }
      *(uint *)(lVar1 + 0x18) = *(uint *)(lVar1 + 0x18) | 8;
    }
    if ((*(uint *)(lVar1 + 0x18) & 7) == 5) {
      FUN_001269c5(param_1,0x19,1,*(undefined4 *)(lVar1 + 8),0);
      *(uint *)(lVar1 + 0x18) = *(uint *)(lVar1 + 0x18) | 2;
    }
    if ((~*(uint *)(lVar1 + 0x18) & 10) == 0) {
      FUN_00126348(lVar1);
    }
  }
  return;
}


PUSH R12
PUSH RBP
PUSH RBX
MOV R12,RDI
MOV RBP,RSI
CALL 0x001258d2
TEST RAX,RAX
JZ 0x001282c8
MOV RBX,RAX
CMP dword ptr [RBP + 0x10],0x18
JZ 0x001282cd
CMP dword ptr [RBP + 0x10],0x19
JZ 0x001282d7
MOV EAX,dword ptr [RBX + 0x18]
AND EAX,0x7
CMP EAX,0x5
JZ 0x00128309
MOV EAX,dword ptr [RBX + 0x18]
NOT EAX
TEST AL,0xa
JZ 0x0012832f
POP RBX
POP RBP
POP R12
RET
MOV RDI,RAX
CALL 0x00127b69
JMP 0x001282ae
MOV EAX,dword ptr [RBX + 0x18]
TEST AL,0x8
JNZ 0x001282b4
TEST AL,0x1
JZ 0x001282e8
OR dword ptr [RBX + 0x18],0x8
JMP 0x001282b4
MOV ESI,dword ptr [RBX + 0xc]
LEA RDI,[0x1635e0]
MOV EAX,0x0
CALL 0x0010f07c
MOV RSI,RAX
MOV RDI,R12
CALL 0x0011b5c2
JMP 0x001282e2
MOV ECX,dword ptr [RBX + 0x8]
MOV R8D,0x0
MOV EDX,0x1
MOV ESI,0x19
MOV RDI,R12
MOV EAX,0x0
CALL 0x001269c5
OR dword ptr [RBX + 0x18],0x2
JMP 0x001282bf
MOV RDI,RBX
CALL 0x00126348
JMP 0x001282c8
(translation_unit "void FUN_00128291(undefined8 param_1,long param_2)\n\n{\n  long lVar1;\n  undefined8 uVar2;\n  \n  lVar1 = FUN_001258d2();\n  if (lVar1 != 0) {\n    if (*(int *)(param_2 + 0x10) == 0x18) {\n      FUN_00127b69(lVar1);\n    }\n    if ((*(int *)(param_2 + 0x10) == 0x19) && ((*(uint *)(lVar1 + 0x18) & 8) == 0)) {\n      if ((*(uint *)(lVar1 + 0x18) & 1) == 0) {\n        uVar2 = FUN_0010f07c("Received CHANNEL_CLOSE_CONFIRMATION for channel %u for which we never sent CHANNEL_CLOSE\n"\n                             ,*(undefined4 *)(lVar1 + 0xc));\n        FUN_0011b5c2(param_1,uVar2);\n      }\n      *(uint *)(lVar1 + 0x18) = *(uint *)(lVar1 + 0x18) | 8;\n    }\n    if ((*(uint *)(lVar1 + 0x18) & 7) == 5) {\n      FUN_001269c5(param_1,0x19,1,*(undefined4 *)(lVar1 + 8),0);\n      *(uint *)(lVar1 + 0x18) = *(uint *)(lVar1 + 0x18) | 2;\n    }\n    if ((~*(uint *)(lVar1 + 0x18) & 10) == 0) {\n      FUN_00126348(lVar1);\n    }\n  }\n  return;\n}\n\n" (function_definition "void FUN_00128291(undefined8 param_1,long param_2)\n\n{\n  long lVar1;\n  undefined8 uVar2;\n  \n  lVar1 = FUN_001258d2();\n  if (lVar1 != 0) {\n    if (*(int *)(param_2 + 0x10) == 0x18) {\n      FUN_00127b69(lVar1);\n    }\n    if ((*(int *)(param_2 + 0x10) == 0x19) && ((*(uint *)(lVar1 + 0x18) & 8) == 0)) {\n      if ((*(uint *)(lVar1 + 0x18) & 1) == 0) {\n        uVar2 = FUN_0010f07c("Received CHANNEL_CLOSE_CONFIRMATION for channel %u for which we never sent CHANNEL_CLOSE\n"\n                             ,*(undefined4 *)(lVar1 + 0xc));\n        FUN_0011b5c2(param_1,uVar2);\n      }\n      *(uint *)(lVar1 + 0x18) = *(uint *)(lVar1 + 0x18) | 8;\n    }\n    if ((*(uint *)(lVar1 + 0x18) & 7) == 5) {\n      FUN_001269c5(param_1,0x19,1,*(undefined4 *)(lVar1 + 8),0);\n      *(uint *)(lVar1 + 0x18) = *(uint *)(lVar1 + 0x18) | 2;\n    }\n    if ((~*(uint *)(lVar1 + 0x18) & 10) == 0) {\n      FUN_00126348(lVar1);\n    }\n  }\n  return;\n}" primitive_type (function_declarator "FUN_00128291(undefined8 param_1,long param_2)" identifier (parameter_list "(undefined8 param_1,long param_2)" ( (parameter_declaration "undefined8 param_1" type_identifier identifier) , (parameter_declaration "long param_2" (sized_type_specifier "long" long) identifier) ))) (compound_statement "{\n  long lVar1;\n  undefined8 uVar2;\n  \n  lVar1 = FUN_001258d2();\n  if (lVar1 != 0) {\n    if (*(int *)(param_2 + 0x10) == 0x18) {\n      FUN_00127b69(lVar1);\n    }\n    if ((*(int *)(param_2 + 0x10) == 0x19) && ((*(uint *)(lVar1 + 0x18) & 8) == 0)) {\n      if ((*(uint *)(lVar1 + 0x18) & 1) == 0) {\n        uVar2 = FUN_0010f07c("Received CHANNEL_CLOSE_CONFIRMATION for channel %u for which we never sent CHANNEL_CLOSE\n"\n                             ,*(undefined4 *)(lVar1 + 0xc));\n        FUN_0011b5c2(param_1,uVar2);\n      }\n      *(uint *)(lVar1 + 0x18) = *(uint *)(lVar1 + 0x18) | 8;\n    }\n    if ((*(uint *)(lVar1 + 0x18) & 7) == 5) {\n      FUN_001269c5(param_1,0x19,1,*(undefined4 *)(lVar1 + 8),0);\n      *(uint *)(lVar1 + 0x18) = *(uint *)(lVar1 + 0x18) | 2;\n    }\n    if ((~*(uint *)(lVar1 + 0x18) & 10) == 0) {\n      FUN_00126348(lVar1);\n    }\n  }\n  return;\n}" { (declaration "long lVar1;" (sized_type_specifier "long" long) identifier ;) (declaration "undefined8 uVar2;" type_identifier identifier ;) (expression_statement "lVar1 = FUN_001258d2();" (assignment_expression "lVar1 = FUN_001258d2()" identifier = (call_expression "FUN_001258d2()" identifier (argument_list "()" ( )))) ;) (if_statement "if (lVar1 != 0) {\n    if (*(int *)(param_2 + 0x10) == 0x18) {\n      FUN_00127b69(lVar1);\n    }\n    if ((*(int *)(param_2 + 0x10) == 0x19) && ((*(uint *)(lVar1 + 0x18) & 8) == 0)) {\n      if ((*(uint *)(lVar1 + 0x18) & 1) == 0) {\n        uVar2 = FUN_0010f07c("Received CHANNEL_CLOSE_CONFIRMATION for channel %u for which we never sent CHANNEL_CLOSE\n"\n                             ,*(undefined4 *)(lVar1 + 0xc));\n        FUN_0011b5c2(param_1,uVar2);\n      }\n      *(uint *)(lVar1 + 0x18) = *(uint *)(lVar1 + 0x18) | 8;\n    }\n    if ((*(uint *)(lVar1 + 0x18) & 7) == 5) {\n      FUN_001269c5(param_1,0x19,1,*(undefined4 *)(lVar1 + 8),0);\n      *(uint *)(lVar1 + 0x18) = *(uint *)(lVar1 + 0x18) | 2;\n    }\n    if ((~*(uint *)(lVar1 + 0x18) & 10) == 0) {\n      FUN_00126348(lVar1);\n    }\n  }" if (parenthesized_expression "(lVar1 != 0)" ( (binary_expression "lVar1 != 0" identifier != number_literal) )) (compound_statement "{\n    if (*(int *)(param_2 + 0x10) == 0x18) {\n      FUN_00127b69(lVar1);\n    }\n    if ((*(int *)(param_2 + 0x10) == 0x19) && ((*(uint *)(lVar1 + 0x18) & 8) == 0)) {\n      if ((*(uint *)(lVar1 + 0x18) & 1) == 0) {\n        uVar2 = FUN_0010f07c("Received CHANNEL_CLOSE_CONFIRMATION for channel %u for which we never sent CHANNEL_CLOSE\n"\n                             ,*(undefined4 *)(lVar1 + 0xc));\n        FUN_0011b5c2(param_1,uVar2);\n      }\n      *(uint *)(lVar1 + 0x18) = *(uint *)(lVar1 + 0x18) | 8;\n    }\n    if ((*(uint *)(lVar1 + 0x18) & 7) == 5) {\n      FUN_001269c5(param_1,0x19,1,*(undefined4 *)(lVar1 + 8),0);\n      *(uint *)(lVar1 + 0x18) = *(uint *)(lVar1 + 0x18) | 2;\n    }\n    if ((~*(uint *)(lVar1 + 0x18) & 10) == 0) {\n      FUN_00126348(lVar1);\n    }\n  }" { (if_statement "if (*(int *)(param_2 + 0x10) == 0x18) {\n      FUN_00127b69(lVar1);\n    }" if (parenthesized_expression "(*(int *)(param_2 + 0x10) == 0x18)" ( (binary_expression "*(int *)(param_2 + 0x10) == 0x18" (pointer_expression "*(int *)(param_2 + 0x10)" * (cast_expression "(int *)(param_2 + 0x10)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_2 + 0x10)" ( (binary_expression "param_2 + 0x10" identifier + number_literal) )))) == number_literal) )) (compound_statement "{\n      FUN_00127b69(lVar1);\n    }" { (expression_statement "FUN_00127b69(lVar1);" (call_expression "FUN_00127b69(lVar1)" identifier (argument_list "(lVar1)" ( identifier ))) ;) })) (if_statement "if ((*(int *)(param_2 + 0x10) == 0x19) && ((*(uint *)(lVar1 + 0x18) & 8) == 0)) {\n      if ((*(uint *)(lVar1 + 0x18) & 1) == 0) {\n        uVar2 = FUN_0010f07c("Received CHANNEL_CLOSE_CONFIRMATION for channel %u for which we never sent CHANNEL_CLOSE\n"\n                             ,*(undefined4 *)(lVar1 + 0xc));\n        FUN_0011b5c2(param_1,uVar2);\n      }\n      *(uint *)(lVar1 + 0x18) = *(uint *)(lVar1 + 0x18) | 8;\n    }" if (parenthesized_expression "((*(int *)(param_2 + 0x10) == 0x19) && ((*(uint *)(lVar1 + 0x18) & 8) == 0))" ( (binary_expression "(*(int *)(param_2 + 0x10) == 0x19) && ((*(uint *)(lVar1 + 0x18) & 8) == 0)" (parenthesized_expression "(*(int *)(param_2 + 0x10) == 0x19)" ( (binary_expression "*(int *)(param_2 + 0x10) == 0x19" (pointer_expression "*(int *)(param_2 + 0x10)" * (cast_expression "(int *)(param_2 + 0x10)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_2 + 0x10)" ( (binary_expression "param_2 + 0x10" identifier + number_literal) )))) == number_literal) )) && (parenthesized_expression "((*(uint *)(lVar1 + 0x18) & 8) == 0)" ( (binary_expression "(*(uint *)(lVar1 + 0x18) & 8) == 0" (parenthesized_expression "(*(uint *)(lVar1 + 0x18) & 8)" ( (binary_expression "*(uint *)(lVar1 + 0x18) & 8" (pointer_expression "*(uint *)(lVar1 + 0x18)" * (cast_expression "(uint *)(lVar1 + 0x18)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(lVar1 + 0x18)" ( (binary_expression "lVar1 + 0x18" identifier + number_literal) )))) & number_literal) )) == number_literal) ))) )) (compound_statement "{\n      if ((*(uint *)(lVar1 + 0x18) & 1) == 0) {\n        uVar2 = FUN_0010f07c("Received CHANNEL_CLOSE_CONFIRMATION for channel %u for which we never sent CHANNEL_CLOSE\n"\n                             ,*(undefined4 *)(lVar1 + 0xc));\n        FUN_0011b5c2(param_1,uVar2);\n      }\n      *(uint *)(lVar1 + 0x18) = *(uint *)(lVar1 + 0x18) | 8;\n    }" { (if_statement "if ((*(uint *)(lVar1 + 0x18) & 1) == 0) {\n        uVar2 = FUN_0010f07c("Received CHANNEL_CLOSE_CONFIRMATION for channel %u for which we never sent CHANNEL_CLOSE\n"\n                             ,*(undefined4 *)(lVar1 + 0xc));\n        FUN_0011b5c2(param_1,uVar2);\n      }" if (parenthesized_expression "((*(uint *)(lVar1 + 0x18) & 1) == 0)" ( (binary_expression "(*(uint *)(lVar1 + 0x18) & 1) == 0" (parenthesized_expression "(*(uint *)(lVar1 + 0x18) & 1)" ( (binary_expression "*(uint *)(lVar1 + 0x18) & 1" (pointer_expression "*(uint *)(lVar1 + 0x18)" * (cast_expression "(uint *)(lVar1 + 0x18)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(lVar1 + 0x18)" ( (binary_expression "lVar1 + 0x18" identifier + number_literal) )))) & number_literal) )) == number_literal) )) (compound_statement "{\n        uVar2 = FUN_0010f07c("Received CHANNEL_CLOSE_CONFIRMATION for channel %u for which we never sent CHANNEL_CLOSE\n"\n                             ,*(undefined4 *)(lVar1 + 0xc));\n        FUN_0011b5c2(param_1,uVar2);\n      }" { (expression_statement "uVar2 = FUN_0010f07c("Received CHANNEL_CLOSE_CONFIRMATION for channel %u for which we never sent CHANNEL_CLOSE\n"\n                             ,*(undefined4 *)(lVar1 + 0xc));" (assignment_expression "uVar2 = FUN_0010f07c("Received CHANNEL_CLOSE_CONFIRMATION for channel %u for which we never sent CHANNEL_CLOSE\n"\n                             ,*(undefined4 *)(lVar1 + 0xc))" identifier = (call_expression "FUN_0010f07c("Received CHANNEL_CLOSE_CONFIRMATION for channel %u for which we never sent CHANNEL_CLOSE\n"\n                             ,*(undefined4 *)(lVar1 + 0xc))" identifier (argument_list "("Received CHANNEL_CLOSE_CONFIRMATION for channel %u for which we never sent CHANNEL_CLOSE\n"\n                             ,*(undefined4 *)(lVar1 + 0xc))" ( (string_literal ""Received CHANNEL_CLOSE_CONFIRMATION for channel %u for which we never sent CHANNEL_CLOSE\n"" " string_content escape_sequence ") , (pointer_expression "*(undefined4 *)(lVar1 + 0xc)" * (cast_expression "(undefined4 *)(lVar1 + 0xc)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(lVar1 + 0xc)" ( (binary_expression "lVar1 + 0xc" identifier + number_literal) )))) )))) ;) (expression_statement "FUN_0011b5c2(param_1,uVar2);" (call_expression "FUN_0011b5c2(param_1,uVar2)" identifier (argument_list "(param_1,uVar2)" ( identifier , identifier ))) ;) })) (expression_statement "*(uint *)(lVar1 + 0x18) = *(uint *)(lVar1 + 0x18) | 8;" (assignment_expression "*(uint *)(lVar1 + 0x18) = *(uint *)(lVar1 + 0x18) | 8" (pointer_expression "*(uint *)(lVar1 + 0x18)" * (cast_expression "(uint *)(lVar1 + 0x18)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(lVar1 + 0x18)" ( (binary_expression "lVar1 + 0x18" identifier + number_literal) )))) = (binary_expression "*(uint *)(lVar1 + 0x18) | 8" (pointer_expression "*(uint *)(lVar1 + 0x18)" * (cast_expression "(uint *)(lVar1 + 0x18)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(lVar1 + 0x18)" ( (binary_expression "lVar1 + 0x18" identifier + number_literal) )))) | number_literal)) ;) })) (if_statement "if ((*(uint *)(lVar1 + 0x18) & 7) == 5) {\n      FUN_001269c5(param_1,0x19,1,*(undefined4 *)(lVar1 + 8),0);\n      *(uint *)(lVar1 + 0x18) = *(uint *)(lVar1 + 0x18) | 2;\n    }" if (parenthesized_expression "((*(uint *)(lVar1 + 0x18) & 7) == 5)" ( (binary_expression "(*(uint *)(lVar1 + 0x18) & 7) == 5" (parenthesized_expression "(*(uint *)(lVar1 + 0x18) & 7)" ( (binary_expression "*(uint *)(lVar1 + 0x18) & 7" (pointer_expression "*(uint *)(lVar1 + 0x18)" * (cast_expression "(uint *)(lVar1 + 0x18)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(lVar1 + 0x18)" ( (binary_expression "lVar1 + 0x18" identifier + number_literal) )))) & number_literal) )) == number_literal) )) (compound_statement "{\n      FUN_001269c5(param_1,0x19,1,*(undefined4 *)(lVar1 + 8),0);\n      *(uint *)(lVar1 + 0x18) = *(uint *)(lVar1 + 0x18) | 2;\n    }" { (expression_statement "FUN_001269c5(param_1,0x19,1,*(undefined4 *)(lVar1 + 8),0);" (call_expression "FUN_001269c5(param_1,0x19,1,*(undefined4 *)(lVar1 + 8),0)" identifier (argument_list "(param_1,0x19,1,*(undefined4 *)(lVar1 + 8),0)" ( identifier , number_literal , number_literal , (pointer_expression "*(undefined4 *)(lVar1 + 8)" * (cast_expression "(undefined4 *)(lVar1 + 8)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(lVar1 + 8)" ( (binary_expression "lVar1 + 8" identifier + number_literal) )))) , number_literal ))) ;) (expression_statement "*(uint *)(lVar1 + 0x18) = *(uint *)(lVar1 + 0x18) | 2;" (assignment_expression "*(uint *)(lVar1 + 0x18) = *(uint *)(lVar1 + 0x18) | 2" (pointer_expression "*(uint *)(lVar1 + 0x18)" * (cast_expression "(uint *)(lVar1 + 0x18)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(lVar1 + 0x18)" ( (binary_expression "lVar1 + 0x18" identifier + number_literal) )))) = (binary_expression "*(uint *)(lVar1 + 0x18) | 2" (pointer_expression "*(uint *)(lVar1 + 0x18)" * (cast_expression "(uint *)(lVar1 + 0x18)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(lVar1 + 0x18)" ( (binary_expression "lVar1 + 0x18" identifier + number_literal) )))) | number_literal)) ;) })) (if_statement "if ((~*(uint *)(lVar1 + 0x18) & 10) == 0) {\n      FUN_00126348(lVar1);\n    }" if (parenthesized_expression "((~*(uint *)(lVar1 + 0x18) & 10) == 0)" ( (binary_expression "(~*(uint *)(lVar1 + 0x18) & 10) == 0" (parenthesized_expression "(~*(uint *)(lVar1 + 0x18) & 10)" ( (binary_expression "~*(uint *)(lVar1 + 0x18) & 10" (unary_expression "~*(uint *)(lVar1 + 0x18)" ~ (pointer_expression "*(uint *)(lVar1 + 0x18)" * (cast_expression "(uint *)(lVar1 + 0x18)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(lVar1 + 0x18)" ( (binary_expression "lVar1 + 0x18" identifier + number_literal) ))))) & number_literal) )) == number_literal) )) (compound_statement "{\n      FUN_00126348(lVar1);\n    }" { (expression_statement "FUN_00126348(lVar1);" (call_expression "FUN_00126348(lVar1)" identifier (argument_list "(lVar1)" ( identifier ))) ;) })) })) (return_statement "return;" return ;) })))
(translation_unit "/* WARNING: Enum "anon_enum_32": Some values do not have unique names */\n\nvoid ssh1_msg_channel_close(Ssh_conflict ssh,Packet *pktin)\n\n{\n  ssh_channel *c;\n  char *text;\n  \n  c = ssh_channel_msg(ssh,pktin);\n  if (c != (ssh_channel *)0x0) {\n    if (pktin->type == 0x18) {\n      ssh_channel_got_eof(c);\n    }\n    if ((pktin->type == 0x19) && ((c->closes & 8U) == 0)) {\n      if ((c->closes & 1U) == 0) {\n        text = dupprintf("Received CHANNEL_CLOSE_CONFIRMATION for channel %u for which we never sent CHANNEL_CLOSE\n"\n                         ,(ulong)c->localid);\n        bomb_out(ssh,text);\n      }\n      c->closes = c->closes | 8;\n    }\n    if ((c->closes & 7U) == 5) {\n      send_packet(ssh,0x19,1,(ulong)c->remoteid,0);\n      c->closes = c->closes | 2;\n    }\n    if ((~c->closes & 10U) == 0) {\n      ssh_channel_destroy(c);\n    }\n  }\n  return;\n}\n\n" comment (function_definition "void ssh1_msg_channel_close(Ssh_conflict ssh,Packet *pktin)\n\n{\n  ssh_channel *c;\n  char *text;\n  \n  c = ssh_channel_msg(ssh,pktin);\n  if (c != (ssh_channel *)0x0) {\n    if (pktin->type == 0x18) {\n      ssh_channel_got_eof(c);\n    }\n    if ((pktin->type == 0x19) && ((c->closes & 8U) == 0)) {\n      if ((c->closes & 1U) == 0) {\n        text = dupprintf("Received CHANNEL_CLOSE_CONFIRMATION for channel %u for which we never sent CHANNEL_CLOSE\n"\n                         ,(ulong)c->localid);\n        bomb_out(ssh,text);\n      }\n      c->closes = c->closes | 8;\n    }\n    if ((c->closes & 7U) == 5) {\n      send_packet(ssh,0x19,1,(ulong)c->remoteid,0);\n      c->closes = c->closes | 2;\n    }\n    if ((~c->closes & 10U) == 0) {\n      ssh_channel_destroy(c);\n    }\n  }\n  return;\n}" primitive_type (function_declarator "ssh1_msg_channel_close(Ssh_conflict ssh,Packet *pktin)" identifier (parameter_list "(Ssh_conflict ssh,Packet *pktin)" ( (parameter_declaration "Ssh_conflict ssh" type_identifier identifier) , (parameter_declaration "Packet *pktin" type_identifier (pointer_declarator "*pktin" * identifier)) ))) (compound_statement "{\n  ssh_channel *c;\n  char *text;\n  \n  c = ssh_channel_msg(ssh,pktin);\n  if (c != (ssh_channel *)0x0) {\n    if (pktin->type == 0x18) {\n      ssh_channel_got_eof(c);\n    }\n    if ((pktin->type == 0x19) && ((c->closes & 8U) == 0)) {\n      if ((c->closes & 1U) == 0) {\n        text = dupprintf("Received CHANNEL_CLOSE_CONFIRMATION for channel %u for which we never sent CHANNEL_CLOSE\n"\n                         ,(ulong)c->localid);\n        bomb_out(ssh,text);\n      }\n      c->closes = c->closes | 8;\n    }\n    if ((c->closes & 7U) == 5) {\n      send_packet(ssh,0x19,1,(ulong)c->remoteid,0);\n      c->closes = c->closes | 2;\n    }\n    if ((~c->closes & 10U) == 0) {\n      ssh_channel_destroy(c);\n    }\n  }\n  return;\n}" { (declaration "ssh_channel *c;" type_identifier (pointer_declarator "*c" * identifier) ;) (declaration "char *text;" primitive_type (pointer_declarator "*text" * identifier) ;) (expression_statement "c = ssh_channel_msg(ssh,pktin);" (assignment_expression "c = ssh_channel_msg(ssh,pktin)" identifier = (call_expression "ssh_channel_msg(ssh,pktin)" identifier (argument_list "(ssh,pktin)" ( identifier , identifier )))) ;) (if_statement "if (c != (ssh_channel *)0x0) {\n    if (pktin->type == 0x18) {\n      ssh_channel_got_eof(c);\n    }\n    if ((pktin->type == 0x19) && ((c->closes & 8U) == 0)) {\n      if ((c->closes & 1U) == 0) {\n        text = dupprintf("Received CHANNEL_CLOSE_CONFIRMATION for channel %u for which we never sent CHANNEL_CLOSE\n"\n                         ,(ulong)c->localid);\n        bomb_out(ssh,text);\n      }\n      c->closes = c->closes | 8;\n    }\n    if ((c->closes & 7U) == 5) {\n      send_packet(ssh,0x19,1,(ulong)c->remoteid,0);\n      c->closes = c->closes | 2;\n    }\n    if ((~c->closes & 10U) == 0) {\n      ssh_channel_destroy(c);\n    }\n  }" if (parenthesized_expression "(c != (ssh_channel *)0x0)" ( (binary_expression "c != (ssh_channel *)0x0" identifier != (cast_expression "(ssh_channel *)0x0" ( (type_descriptor "ssh_channel *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    if (pktin->type == 0x18) {\n      ssh_channel_got_eof(c);\n    }\n    if ((pktin->type == 0x19) && ((c->closes & 8U) == 0)) {\n      if ((c->closes & 1U) == 0) {\n        text = dupprintf("Received CHANNEL_CLOSE_CONFIRMATION for channel %u for which we never sent CHANNEL_CLOSE\n"\n                         ,(ulong)c->localid);\n        bomb_out(ssh,text);\n      }\n      c->closes = c->closes | 8;\n    }\n    if ((c->closes & 7U) == 5) {\n      send_packet(ssh,0x19,1,(ulong)c->remoteid,0);\n      c->closes = c->closes | 2;\n    }\n    if ((~c->closes & 10U) == 0) {\n      ssh_channel_destroy(c);\n    }\n  }" { (if_statement "if (pktin->type == 0x18) {\n      ssh_channel_got_eof(c);\n    }" if (parenthesized_expression "(pktin->type == 0x18)" ( (binary_expression "pktin->type == 0x18" (field_expression "pktin->type" identifier -> field_identifier) == number_literal) )) (compound_statement "{\n      ssh_channel_got_eof(c);\n    }" { (expression_statement "ssh_channel_got_eof(c);" (call_expression "ssh_channel_got_eof(c)" identifier (argument_list "(c)" ( identifier ))) ;) })) (if_statement "if ((pktin->type == 0x19) && ((c->closes & 8U) == 0)) {\n      if ((c->closes & 1U) == 0) {\n        text = dupprintf("Received CHANNEL_CLOSE_CONFIRMATION for channel %u for which we never sent CHANNEL_CLOSE\n"\n                         ,(ulong)c->localid);\n        bomb_out(ssh,text);\n      }\n      c->closes = c->closes | 8;\n    }" if (parenthesized_expression "((pktin->type == 0x19) && ((c->closes & 8U) == 0))" ( (binary_expression "(pktin->type == 0x19) && ((c->closes & 8U) == 0)" (parenthesized_expression "(pktin->type == 0x19)" ( (binary_expression "pktin->type == 0x19" (field_expression "pktin->type" identifier -> field_identifier) == number_literal) )) && (parenthesized_expression "((c->closes & 8U) == 0)" ( (binary_expression "(c->closes & 8U) == 0" (parenthesized_expression "(c->closes & 8U)" ( (binary_expression "c->closes & 8U" (field_expression "c->closes" identifier -> field_identifier) & number_literal) )) == number_literal) ))) )) (compound_statement "{\n      if ((c->closes & 1U) == 0) {\n        text = dupprintf("Received CHANNEL_CLOSE_CONFIRMATION for channel %u for which we never sent CHANNEL_CLOSE\n"\n                         ,(ulong)c->localid);\n        bomb_out(ssh,text);\n      }\n      c->closes = c->closes | 8;\n    }" { (if_statement "if ((c->closes & 1U) == 0) {\n        text = dupprintf("Received CHANNEL_CLOSE_CONFIRMATION for channel %u for which we never sent CHANNEL_CLOSE\n"\n                         ,(ulong)c->localid);\n        bomb_out(ssh,text);\n      }" if (parenthesized_expression "((c->closes & 1U) == 0)" ( (binary_expression "(c->closes & 1U) == 0" (parenthesized_expression "(c->closes & 1U)" ( (binary_expression "c->closes & 1U" (field_expression "c->closes" identifier -> field_identifier) & number_literal) )) == number_literal) )) (compound_statement "{\n        text = dupprintf("Received CHANNEL_CLOSE_CONFIRMATION for channel %u for which we never sent CHANNEL_CLOSE\n"\n                         ,(ulong)c->localid);\n        bomb_out(ssh,text);\n      }" { (expression_statement "text = dupprintf("Received CHANNEL_CLOSE_CONFIRMATION for channel %u for which we never sent CHANNEL_CLOSE\n"\n                         ,(ulong)c->localid);" (assignment_expression "text = dupprintf("Received CHANNEL_CLOSE_CONFIRMATION for channel %u for which we never sent CHANNEL_CLOSE\n"\n                         ,(ulong)c->localid)" identifier = (call_expression "dupprintf("Received CHANNEL_CLOSE_CONFIRMATION for channel %u for which we never sent CHANNEL_CLOSE\n"\n                         ,(ulong)c->localid)" identifier (argument_list "("Received CHANNEL_CLOSE_CONFIRMATION for channel %u for which we never sent CHANNEL_CLOSE\n"\n                         ,(ulong)c->localid)" ( (string_literal ""Received CHANNEL_CLOSE_CONFIRMATION for channel %u for which we never sent CHANNEL_CLOSE\n"" " string_content escape_sequence ") , (cast_expression "(ulong)c->localid" ( (type_descriptor "ulong" type_identifier) ) (field_expression "c->localid" identifier -> field_identifier)) )))) ;) (expression_statement "bomb_out(ssh,text);" (call_expression "bomb_out(ssh,text)" identifier (argument_list "(ssh,text)" ( identifier , identifier ))) ;) })) (expression_statement "c->closes = c->closes | 8;" (assignment_expression "c->closes = c->closes | 8" (field_expression "c->closes" identifier -> field_identifier) = (binary_expression "c->closes | 8" (field_expression "c->closes" identifier -> field_identifier) | number_literal)) ;) })) (if_statement "if ((c->closes & 7U) == 5) {\n      send_packet(ssh,0x19,1,(ulong)c->remoteid,0);\n      c->closes = c->closes | 2;\n    }" if (parenthesized_expression "((c->closes & 7U) == 5)" ( (binary_expression "(c->closes & 7U) == 5" (parenthesized_expression "(c->closes & 7U)" ( (binary_expression "c->closes & 7U" (field_expression "c->closes" identifier -> field_identifier) & number_literal) )) == number_literal) )) (compound_statement "{\n      send_packet(ssh,0x19,1,(ulong)c->remoteid,0);\n      c->closes = c->closes | 2;\n    }" { (expression_statement "send_packet(ssh,0x19,1,(ulong)c->remoteid,0);" (call_expression "send_packet(ssh,0x19,1,(ulong)c->remoteid,0)" identifier (argument_list "(ssh,0x19,1,(ulong)c->remoteid,0)" ( identifier , number_literal , number_literal , (cast_expression "(ulong)c->remoteid" ( (type_descriptor "ulong" type_identifier) ) (field_expression "c->remoteid" identifier -> field_identifier)) , number_literal ))) ;) (expression_statement "c->closes = c->closes | 2;" (assignment_expression "c->closes = c->closes | 2" (field_expression "c->closes" identifier -> field_identifier) = (binary_expression "c->closes | 2" (field_expression "c->closes" identifier -> field_identifier) | number_literal)) ;) })) (if_statement "if ((~c->closes & 10U) == 0) {\n      ssh_channel_destroy(c);\n    }" if (parenthesized_expression "((~c->closes & 10U) == 0)" ( (binary_expression "(~c->closes & 10U) == 0" (parenthesized_expression "(~c->closes & 10U)" ( (binary_expression "~c->closes & 10U" (unary_expression "~c->closes" ~ (field_expression "c->closes" identifier -> field_identifier)) & number_literal) )) == number_literal) )) (compound_statement "{\n      ssh_channel_destroy(c);\n    }" { (expression_statement "ssh_channel_destroy(c);" (call_expression "ssh_channel_destroy(c)" identifier (argument_list "(c)" ( identifier ))) ;) })) })) (return_statement "return;" return ;) })))
(translation_unit "void FUN_00128291(undefined8 param_1,long param_2)\n\n{\n  long lVar1;\n  undefined8 uVar2;\n  \n  lVar1 = FUN_001258d2();\n  if (lVar1 != 0) {\n    if (*(int *)(param_2 + 0x10) == 0x18) {\n      FUN_00127b69(lVar1);\n    }\n    if ((*(int *)(param_2 + 0x10) == 0x19) && ((*(uint *)(lVar1 + 0x18) & 8) == 0)) {\n      if ((*(uint *)(lVar1 + 0x18) & 1) == 0) {\n        uVar2 = FUN_0010f07c("Received CHANNEL_CLOSE_CONFIRMATION for channel %u for which we never sent CHANNEL_CLOSE\n"\n                             ,*(undefined4 *)(lVar1 + 0xc));\n        FUN_0011b5c2(param_1,uVar2);\n      }\n      *(uint *)(lVar1 + 0x18) = *(uint *)(lVar1 + 0x18) | 8;\n    }\n    if ((*(uint *)(lVar1 + 0x18) & 7) == 5) {\n      FUN_001269c5(param_1,0x19,1,*(undefined4 *)(lVar1 + 8),0);\n      *(uint *)(lVar1 + 0x18) = *(uint *)(lVar1 + 0x18) | 2;\n    }\n    if ((~*(uint *)(lVar1 + 0x18) & 10) == 0) {\n      FUN_00126348(lVar1);\n    }\n  }\n  return;\n}\n\n" (function_definition "void FUN_00128291(undefined8 param_1,long param_2)\n\n{\n  long lVar1;\n  undefined8 uVar2;\n  \n  lVar1 = FUN_001258d2();\n  if (lVar1 != 0) {\n    if (*(int *)(param_2 + 0x10) == 0x18) {\n      FUN_00127b69(lVar1);\n    }\n    if ((*(int *)(param_2 + 0x10) == 0x19) && ((*(uint *)(lVar1 + 0x18) & 8) == 0)) {\n      if ((*(uint *)(lVar1 + 0x18) & 1) == 0) {\n        uVar2 = FUN_0010f07c("Received CHANNEL_CLOSE_CONFIRMATION for channel %u for which we never sent CHANNEL_CLOSE\n"\n                             ,*(undefined4 *)(lVar1 + 0xc));\n        FUN_0011b5c2(param_1,uVar2);\n      }\n      *(uint *)(lVar1 + 0x18) = *(uint *)(lVar1 + 0x18) | 8;\n    }\n    if ((*(uint *)(lVar1 + 0x18) & 7) == 5) {\n      FUN_001269c5(param_1,0x19,1,*(undefined4 *)(lVar1 + 8),0);\n      *(uint *)(lVar1 + 0x18) = *(uint *)(lVar1 + 0x18) | 2;\n    }\n    if ((~*(uint *)(lVar1 + 0x18) & 10) == 0) {\n      FUN_00126348(lVar1);\n    }\n  }\n  return;\n}" primitive_type (function_declarator "FUN_00128291(undefined8 param_1,long param_2)" identifier (parameter_list "(undefined8 param_1,long param_2)" ( (parameter_declaration "undefined8 param_1" type_identifier identifier) , (parameter_declaration "long param_2" (sized_type_specifier "long" long) identifier) ))) (compound_statement "{\n  long lVar1;\n  undefined8 uVar2;\n  \n  lVar1 = FUN_001258d2();\n  if (lVar1 != 0) {\n    if (*(int *)(param_2 + 0x10) == 0x18) {\n      FUN_00127b69(lVar1);\n    }\n    if ((*(int *)(param_2 + 0x10) == 0x19) && ((*(uint *)(lVar1 + 0x18) & 8) == 0)) {\n      if ((*(uint *)(lVar1 + 0x18) & 1) == 0) {\n        uVar2 = FUN_0010f07c("Received CHANNEL_CLOSE_CONFIRMATION for channel %u for which we never sent CHANNEL_CLOSE\n"\n                             ,*(undefined4 *)(lVar1 + 0xc));\n        FUN_0011b5c2(param_1,uVar2);\n      }\n      *(uint *)(lVar1 + 0x18) = *(uint *)(lVar1 + 0x18) | 8;\n    }\n    if ((*(uint *)(lVar1 + 0x18) & 7) == 5) {\n      FUN_001269c5(param_1,0x19,1,*(undefined4 *)(lVar1 + 8),0);\n      *(uint *)(lVar1 + 0x18) = *(uint *)(lVar1 + 0x18) | 2;\n    }\n    if ((~*(uint *)(lVar1 + 0x18) & 10) == 0) {\n      FUN_00126348(lVar1);\n    }\n  }\n  return;\n}" { (declaration "long lVar1;" (sized_type_specifier "long" long) identifier ;) (declaration "undefined8 uVar2;" type_identifier identifier ;) (expression_statement "lVar1 = FUN_001258d2();" (assignment_expression "lVar1 = FUN_001258d2()" identifier = (call_expression "FUN_001258d2()" identifier (argument_list "()" ( )))) ;) (if_statement "if (lVar1 != 0) {\n    if (*(int *)(param_2 + 0x10) == 0x18) {\n      FUN_00127b69(lVar1);\n    }\n    if ((*(int *)(param_2 + 0x10) == 0x19) && ((*(uint *)(lVar1 + 0x18) & 8) == 0)) {\n      if ((*(uint *)(lVar1 + 0x18) & 1) == 0) {\n        uVar2 = FUN_0010f07c("Received CHANNEL_CLOSE_CONFIRMATION for channel %u for which we never sent CHANNEL_CLOSE\n"\n                             ,*(undefined4 *)(lVar1 + 0xc));\n        FUN_0011b5c2(param_1,uVar2);\n      }\n      *(uint *)(lVar1 + 0x18) = *(uint *)(lVar1 + 0x18) | 8;\n    }\n    if ((*(uint *)(lVar1 + 0x18) & 7) == 5) {\n      FUN_001269c5(param_1,0x19,1,*(undefined4 *)(lVar1 + 8),0);\n      *(uint *)(lVar1 + 0x18) = *(uint *)(lVar1 + 0x18) | 2;\n    }\n    if ((~*(uint *)(lVar1 + 0x18) & 10) == 0) {\n      FUN_00126348(lVar1);\n    }\n  }" if (parenthesized_expression "(lVar1 != 0)" ( (binary_expression "lVar1 != 0" identifier != number_literal) )) (compound_statement "{\n    if (*(int *)(param_2 + 0x10) == 0x18) {\n      FUN_00127b69(lVar1);\n    }\n    if ((*(int *)(param_2 + 0x10) == 0x19) && ((*(uint *)(lVar1 + 0x18) & 8) == 0)) {\n      if ((*(uint *)(lVar1 + 0x18) & 1) == 0) {\n        uVar2 = FUN_0010f07c("Received CHANNEL_CLOSE_CONFIRMATION for channel %u for which we never sent CHANNEL_CLOSE\n"\n                             ,*(undefined4 *)(lVar1 + 0xc));\n        FUN_0011b5c2(param_1,uVar2);\n      }\n      *(uint *)(lVar1 + 0x18) = *(uint *)(lVar1 + 0x18) | 8;\n    }\n    if ((*(uint *)(lVar1 + 0x18) & 7) == 5) {\n      FUN_001269c5(param_1,0x19,1,*(undefined4 *)(lVar1 + 8),0);\n      *(uint *)(lVar1 + 0x18) = *(uint *)(lVar1 + 0x18) | 2;\n    }\n    if ((~*(uint *)(lVar1 + 0x18) & 10) == 0) {\n      FUN_00126348(lVar1);\n    }\n  }" { (if_statement "if (*(int *)(param_2 + 0x10) == 0x18) {\n      FUN_00127b69(lVar1);\n    }" if (parenthesized_expression "(*(int *)(param_2 + 0x10) == 0x18)" ( (binary_expression "*(int *)(param_2 + 0x10) == 0x18" (pointer_expression "*(int *)(param_2 + 0x10)" * (cast_expression "(int *)(param_2 + 0x10)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_2 + 0x10)" ( (binary_expression "param_2 + 0x10" identifier + number_literal) )))) == number_literal) )) (compound_statement "{\n      FUN_00127b69(lVar1);\n    }" { (expression_statement "FUN_00127b69(lVar1);" (call_expression "FUN_00127b69(lVar1)" identifier (argument_list "(lVar1)" ( identifier ))) ;) })) (if_statement "if ((*(int *)(param_2 + 0x10) == 0x19) && ((*(uint *)(lVar1 + 0x18) & 8) == 0)) {\n      if ((*(uint *)(lVar1 + 0x18) & 1) == 0) {\n        uVar2 = FUN_0010f07c("Received CHANNEL_CLOSE_CONFIRMATION for channel %u for which we never sent CHANNEL_CLOSE\n"\n                             ,*(undefined4 *)(lVar1 + 0xc));\n        FUN_0011b5c2(param_1,uVar2);\n      }\n      *(uint *)(lVar1 + 0x18) = *(uint *)(lVar1 + 0x18) | 8;\n    }" if (parenthesized_expression "((*(int *)(param_2 + 0x10) == 0x19) && ((*(uint *)(lVar1 + 0x18) & 8) == 0))" ( (binary_expression "(*(int *)(param_2 + 0x10) == 0x19) && ((*(uint *)(lVar1 + 0x18) & 8) == 0)" (parenthesized_expression "(*(int *)(param_2 + 0x10) == 0x19)" ( (binary_expression "*(int *)(param_2 + 0x10) == 0x19" (pointer_expression "*(int *)(param_2 + 0x10)" * (cast_expression "(int *)(param_2 + 0x10)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_2 + 0x10)" ( (binary_expression "param_2 + 0x10" identifier + number_literal) )))) == number_literal) )) && (parenthesized_expression "((*(uint *)(lVar1 + 0x18) & 8) == 0)" ( (binary_expression "(*(uint *)(lVar1 + 0x18) & 8) == 0" (parenthesized_expression "(*(uint *)(lVar1 + 0x18) & 8)" ( (binary_expression "*(uint *)(lVar1 + 0x18) & 8" (pointer_expression "*(uint *)(lVar1 + 0x18)" * (cast_expression "(uint *)(lVar1 + 0x18)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(lVar1 + 0x18)" ( (binary_expression "lVar1 + 0x18" identifier + number_literal) )))) & number_literal) )) == number_literal) ))) )) (compound_statement "{\n      if ((*(uint *)(lVar1 + 0x18) & 1) == 0) {\n        uVar2 = FUN_0010f07c("Received CHANNEL_CLOSE_CONFIRMATION for channel %u for which we never sent CHANNEL_CLOSE\n"\n                             ,*(undefined4 *)(lVar1 + 0xc));\n        FUN_0011b5c2(param_1,uVar2);\n      }\n      *(uint *)(lVar1 + 0x18) = *(uint *)(lVar1 + 0x18) | 8;\n    }" { (if_statement "if ((*(uint *)(lVar1 + 0x18) & 1) == 0) {\n        uVar2 = FUN_0010f07c("Received CHANNEL_CLOSE_CONFIRMATION for channel %u for which we never sent CHANNEL_CLOSE\n"\n                             ,*(undefined4 *)(lVar1 + 0xc));\n        FUN_0011b5c2(param_1,uVar2);\n      }" if (parenthesized_expression "((*(uint *)(lVar1 + 0x18) & 1) == 0)" ( (binary_expression "(*(uint *)(lVar1 + 0x18) & 1) == 0" (parenthesized_expression "(*(uint *)(lVar1 + 0x18) & 1)" ( (binary_expression "*(uint *)(lVar1 + 0x18) & 1" (pointer_expression "*(uint *)(lVar1 + 0x18)" * (cast_expression "(uint *)(lVar1 + 0x18)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(lVar1 + 0x18)" ( (binary_expression "lVar1 + 0x18" identifier + number_literal) )))) & number_literal) )) == number_literal) )) (compound_statement "{\n        uVar2 = FUN_0010f07c("Received CHANNEL_CLOSE_CONFIRMATION for channel %u for which we never sent CHANNEL_CLOSE\n"\n                             ,*(undefined4 *)(lVar1 + 0xc));\n        FUN_0011b5c2(param_1,uVar2);\n      }" { (expression_statement "uVar2 = FUN_0010f07c("Received CHANNEL_CLOSE_CONFIRMATION for channel %u for which we never sent CHANNEL_CLOSE\n"\n                             ,*(undefined4 *)(lVar1 + 0xc));" (assignment_expression "uVar2 = FUN_0010f07c("Received CHANNEL_CLOSE_CONFIRMATION for channel %u for which we never sent CHANNEL_CLOSE\n"\n                             ,*(undefined4 *)(lVar1 + 0xc))" identifier = (call_expression "FUN_0010f07c("Received CHANNEL_CLOSE_CONFIRMATION for channel %u for which we never sent CHANNEL_CLOSE\n"\n                             ,*(undefined4 *)(lVar1 + 0xc))" identifier (argument_list "("Received CHANNEL_CLOSE_CONFIRMATION for channel %u for which we never sent CHANNEL_CLOSE\n"\n                             ,*(undefined4 *)(lVar1 + 0xc))" ( (string_literal ""Received CHANNEL_CLOSE_CONFIRMATION for channel %u for which we never sent CHANNEL_CLOSE\n"" " string_content escape_sequence ") , (pointer_expression "*(undefined4 *)(lVar1 + 0xc)" * (cast_expression "(undefined4 *)(lVar1 + 0xc)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(lVar1 + 0xc)" ( (binary_expression "lVar1 + 0xc" identifier + number_literal) )))) )))) ;) (expression_statement "FUN_0011b5c2(param_1,uVar2);" (call_expression "FUN_0011b5c2(param_1,uVar2)" identifier (argument_list "(param_1,uVar2)" ( identifier , identifier ))) ;) })) (expression_statement "*(uint *)(lVar1 + 0x18) = *(uint *)(lVar1 + 0x18) | 8;" (assignment_expression "*(uint *)(lVar1 + 0x18) = *(uint *)(lVar1 + 0x18) | 8" (pointer_expression "*(uint *)(lVar1 + 0x18)" * (cast_expression "(uint *)(lVar1 + 0x18)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(lVar1 + 0x18)" ( (binary_expression "lVar1 + 0x18" identifier + number_literal) )))) = (binary_expression "*(uint *)(lVar1 + 0x18) | 8" (pointer_expression "*(uint *)(lVar1 + 0x18)" * (cast_expression "(uint *)(lVar1 + 0x18)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(lVar1 + 0x18)" ( (binary_expression "lVar1 + 0x18" identifier + number_literal) )))) | number_literal)) ;) })) (if_statement "if ((*(uint *)(lVar1 + 0x18) & 7) == 5) {\n      FUN_001269c5(param_1,0x19,1,*(undefined4 *)(lVar1 + 8),0);\n      *(uint *)(lVar1 + 0x18) = *(uint *)(lVar1 + 0x18) | 2;\n    }" if (parenthesized_expression "((*(uint *)(lVar1 + 0x18) & 7) == 5)" ( (binary_expression "(*(uint *)(lVar1 + 0x18) & 7) == 5" (parenthesized_expression "(*(uint *)(lVar1 + 0x18) & 7)" ( (binary_expression "*(uint *)(lVar1 + 0x18) & 7" (pointer_expression "*(uint *)(lVar1 + 0x18)" * (cast_expression "(uint *)(lVar1 + 0x18)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(lVar1 + 0x18)" ( (binary_expression "lVar1 + 0x18" identifier + number_literal) )))) & number_literal) )) == number_literal) )) (compound_statement "{\n      FUN_001269c5(param_1,0x19,1,*(undefined4 *)(lVar1 + 8),0);\n      *(uint *)(lVar1 + 0x18) = *(uint *)(lVar1 + 0x18) | 2;\n    }" { (expression_statement "FUN_001269c5(param_1,0x19,1,*(undefined4 *)(lVar1 + 8),0);" (call_expression "FUN_001269c5(param_1,0x19,1,*(undefined4 *)(lVar1 + 8),0)" identifier (argument_list "(param_1,0x19,1,*(undefined4 *)(lVar1 + 8),0)" ( identifier , number_literal , number_literal , (pointer_expression "*(undefined4 *)(lVar1 + 8)" * (cast_expression "(undefined4 *)(lVar1 + 8)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(lVar1 + 8)" ( (binary_expression "lVar1 + 8" identifier + number_literal) )))) , number_literal ))) ;) (expression_statement "*(uint *)(lVar1 + 0x18) = *(uint *)(lVar1 + 0x18) | 2;" (assignment_expression "*(uint *)(lVar1 + 0x18) = *(uint *)(lVar1 + 0x18) | 2" (pointer_expression "*(uint *)(lVar1 + 0x18)" * (cast_expression "(uint *)(lVar1 + 0x18)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(lVar1 + 0x18)" ( (binary_expression "lVar1 + 0x18" identifier + number_literal) )))) = (binary_expression "*(uint *)(lVar1 + 0x18) | 2" (pointer_expression "*(uint *)(lVar1 + 0x18)" * (cast_expression "(uint *)(lVar1 + 0x18)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(lVar1 + 0x18)" ( (binary_expression "lVar1 + 0x18" identifier + number_literal) )))) | number_literal)) ;) })) (if_statement "if ((~*(uint *)(lVar1 + 0x18) & 10) == 0) {\n      FUN_00126348(lVar1);\n    }" if (parenthesized_expression "((~*(uint *)(lVar1 + 0x18) & 10) == 0)" ( (binary_expression "(~*(uint *)(lVar1 + 0x18) & 10) == 0" (parenthesized_expression "(~*(uint *)(lVar1 + 0x18) & 10)" ( (binary_expression "~*(uint *)(lVar1 + 0x18) & 10" (unary_expression "~*(uint *)(lVar1 + 0x18)" ~ (pointer_expression "*(uint *)(lVar1 + 0x18)" * (cast_expression "(uint *)(lVar1 + 0x18)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(lVar1 + 0x18)" ( (binary_expression "lVar1 + 0x18" identifier + number_literal) ))))) & number_literal) )) == number_literal) )) (compound_statement "{\n      FUN_00126348(lVar1);\n    }" { (expression_statement "FUN_00126348(lVar1);" (call_expression "FUN_00126348(lVar1)" identifier (argument_list "(lVar1)" ( identifier ))) ;) })) })) (return_statement "return;" return ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) , (parameter_declaration (sized_type_specifier long) IDENT) ))) (compound_statement { (declaration (sized_type_specifier long) IDENT ;) (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (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 ))) ;) })) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) == LIT) )) && (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) & LIT) )) == LIT) ))) )) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) & LIT) )) == LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( (string_literal " string_content escape_sequence ") , (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) )))) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT , IDENT ))) ;) })) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) | LIT)) ;) })) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) & LIT) )) == LIT) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( IDENT , LIT , LIT , (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) , LIT ))) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) | LIT)) ;) })) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression (unary_expression ~ (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) & LIT) )) == LIT) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) })) })) (return_statement return ;) })))
(function_definition "void FUN_00128291(undefined8 param_1,long param_2)\n\n{\n  long lVar1;\n  undefined8 uVar2;\n  \n  lVar1 = FUN_001258d2();\n  if (lVar1 != 0) {\n    if (*(int *)(param_2 + 0x10) == 0x18) {\n      FUN_00127b69(lVar1);\n    }\n    if ((*(int *)(param_2 + 0x10) == 0x19) && ((*(uint *)(lVar1 + 0x18) & 8) == 0)) {\n      if ((*(uint *)(lVar1 + 0x18) & 1) == 0) {\n        uVar2 = FUN_0010f07c("Received CHANNEL_CLOSE_CONFIRMATION for channel %u for which we never sent CHANNEL_CLOSE\n"\n                             ,*(undefined4 *)(lVar1 + 0xc));\n        FUN_0011b5c2(param_1,uVar2);\n      }\n      *(uint *)(lVar1 + 0x18) = *(uint *)(lVar1 + 0x18) | 8;\n    }\n    if ((*(uint *)(lVar1 + 0x18) & 7) == 5) {\n      FUN_001269c5(param_1,0x19,1,*(undefined4 *)(lVar1 + 8),0);\n      *(uint *)(lVar1 + 0x18) = *(uint *)(lVar1 + 0x18) | 2;\n    }\n    if ((~*(uint *)(lVar1 + 0x18) & 10) == 0) {\n      FUN_00126348(lVar1);\n    }\n  }\n  return;\n}" (primitive_type "void") (function_declarator "FUN_00128291(undefined8 param_1,long param_2)" (identifier "FUN_00128291") (parameter_list "(undefined8 param_1,long param_2)" (( "(") (parameter_declaration "undefined8 param_1" (type_identifier "undefined8") (identifier "param_1")) (, ",") (parameter_declaration "long param_2" (sized_type_specifier "long" (long "long")) (identifier "param_2")) () ")"))) (compound_statement "{\n  long lVar1;\n  undefined8 uVar2;\n  \n  lVar1 = FUN_001258d2();\n  if (lVar1 != 0) {\n    if (*(int *)(param_2 + 0x10) == 0x18) {\n      FUN_00127b69(lVar1);\n    }\n    if ((*(int *)(param_2 + 0x10) == 0x19) && ((*(uint *)(lVar1 + 0x18) & 8) == 0)) {\n      if ((*(uint *)(lVar1 + 0x18) & 1) == 0) {\n        uVar2 = FUN_0010f07c("Received CHANNEL_CLOSE_CONFIRMATION for channel %u for which we never sent CHANNEL_CLOSE\n"\n                             ,*(undefined4 *)(lVar1 + 0xc));\n        FUN_0011b5c2(param_1,uVar2);\n      }\n      *(uint *)(lVar1 + 0x18) = *(uint *)(lVar1 + 0x18) | 8;\n    }\n    if ((*(uint *)(lVar1 + 0x18) & 7) == 5) {\n      FUN_001269c5(param_1,0x19,1,*(undefined4 *)(lVar1 + 8),0);\n      *(uint *)(lVar1 + 0x18) = *(uint *)(lVar1 + 0x18) | 2;\n    }\n    if ((~*(uint *)(lVar1 + 0x18) & 10) == 0) {\n      FUN_00126348(lVar1);\n    }\n  }\n  return;\n}" ({ "{") (declaration "long lVar1;" (sized_type_specifier "long" (long "long")) (identifier "lVar1") (; ";")) (declaration "undefined8 uVar2;" (type_identifier "undefined8") (identifier "uVar2") (; ";")) (expression_statement "lVar1 = FUN_001258d2();" (assignment_expression "lVar1 = FUN_001258d2()" (identifier "lVar1") (= "=") (call_expression "FUN_001258d2()" (identifier "FUN_001258d2") (argument_list "()" (( "(") () ")")))) (; ";")) (if_statement "if (lVar1 != 0) {\n    if (*(int *)(param_2 + 0x10) == 0x18) {\n      FUN_00127b69(lVar1);\n    }\n    if ((*(int *)(param_2 + 0x10) == 0x19) && ((*(uint *)(lVar1 + 0x18) & 8) == 0)) {\n      if ((*(uint *)(lVar1 + 0x18) & 1) == 0) {\n        uVar2 = FUN_0010f07c("Received CHANNEL_CLOSE_CONFIRMATION for channel %u for which we never sent CHANNEL_CLOSE\n"\n                             ,*(undefined4 *)(lVar1 + 0xc));\n        FUN_0011b5c2(param_1,uVar2);\n      }\n      *(uint *)(lVar1 + 0x18) = *(uint *)(lVar1 + 0x18) | 8;\n    }\n    if ((*(uint *)(lVar1 + 0x18) & 7) == 5) {\n      FUN_001269c5(param_1,0x19,1,*(undefined4 *)(lVar1 + 8),0);\n      *(uint *)(lVar1 + 0x18) = *(uint *)(lVar1 + 0x18) | 2;\n    }\n    if ((~*(uint *)(lVar1 + 0x18) & 10) == 0) {\n      FUN_00126348(lVar1);\n    }\n  }" (if "if") (parenthesized_expression "(lVar1 != 0)" (( "(") (binary_expression "lVar1 != 0" (identifier "lVar1") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n    if (*(int *)(param_2 + 0x10) == 0x18) {\n      FUN_00127b69(lVar1);\n    }\n    if ((*(int *)(param_2 + 0x10) == 0x19) && ((*(uint *)(lVar1 + 0x18) & 8) == 0)) {\n      if ((*(uint *)(lVar1 + 0x18) & 1) == 0) {\n        uVar2 = FUN_0010f07c("Received CHANNEL_CLOSE_CONFIRMATION for channel %u for which we never sent CHANNEL_CLOSE\n"\n                             ,*(undefined4 *)(lVar1 + 0xc));\n        FUN_0011b5c2(param_1,uVar2);\n      }\n      *(uint *)(lVar1 + 0x18) = *(uint *)(lVar1 + 0x18) | 8;\n    }\n    if ((*(uint *)(lVar1 + 0x18) & 7) == 5) {\n      FUN_001269c5(param_1,0x19,1,*(undefined4 *)(lVar1 + 8),0);\n      *(uint *)(lVar1 + 0x18) = *(uint *)(lVar1 + 0x18) | 2;\n    }\n    if ((~*(uint *)(lVar1 + 0x18) & 10) == 0) {\n      FUN_00126348(lVar1);\n    }\n  }" ({ "{") (if_statement "if (*(int *)(param_2 + 0x10) == 0x18) {\n      FUN_00127b69(lVar1);\n    }" (if "if") (parenthesized_expression "(*(int *)(param_2 + 0x10) == 0x18)" (( "(") (binary_expression "*(int *)(param_2 + 0x10) == 0x18" (pointer_expression "*(int *)(param_2 + 0x10)" (* "*") (cast_expression "(int *)(param_2 + 0x10)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_2 + 0x10)" (( "(") (binary_expression "param_2 + 0x10" (identifier "param_2") (+ "+") (number_literal "0x10")) () ")")))) (== "==") (number_literal "0x18")) () ")")) (compound_statement "{\n      FUN_00127b69(lVar1);\n    }" ({ "{") (expression_statement "FUN_00127b69(lVar1);" (call_expression "FUN_00127b69(lVar1)" (identifier "FUN_00127b69") (argument_list "(lVar1)" (( "(") (identifier "lVar1") () ")"))) (; ";")) (} "}"))) (if_statement "if ((*(int *)(param_2 + 0x10) == 0x19) && ((*(uint *)(lVar1 + 0x18) & 8) == 0)) {\n      if ((*(uint *)(lVar1 + 0x18) & 1) == 0) {\n        uVar2 = FUN_0010f07c("Received CHANNEL_CLOSE_CONFIRMATION for channel %u for which we never sent CHANNEL_CLOSE\n"\n                             ,*(undefined4 *)(lVar1 + 0xc));\n        FUN_0011b5c2(param_1,uVar2);\n      }\n      *(uint *)(lVar1 + 0x18) = *(uint *)(lVar1 + 0x18) | 8;\n    }" (if "if") (parenthesized_expression "((*(int *)(param_2 + 0x10) == 0x19) && ((*(uint *)(lVar1 + 0x18) & 8) == 0))" (( "(") (binary_expression "(*(int *)(param_2 + 0x10) == 0x19) && ((*(uint *)(lVar1 + 0x18) & 8) == 0)" (parenthesized_expression "(*(int *)(param_2 + 0x10) == 0x19)" (( "(") (binary_expression "*(int *)(param_2 + 0x10) == 0x19" (pointer_expression "*(int *)(param_2 + 0x10)" (* "*") (cast_expression "(int *)(param_2 + 0x10)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_2 + 0x10)" (( "(") (binary_expression "param_2 + 0x10" (identifier "param_2") (+ "+") (number_literal "0x10")) () ")")))) (== "==") (number_literal "0x19")) () ")")) (&& "&&") (parenthesized_expression "((*(uint *)(lVar1 + 0x18) & 8) == 0)" (( "(") (binary_expression "(*(uint *)(lVar1 + 0x18) & 8) == 0" (parenthesized_expression "(*(uint *)(lVar1 + 0x18) & 8)" (( "(") (binary_expression "*(uint *)(lVar1 + 0x18) & 8" (pointer_expression "*(uint *)(lVar1 + 0x18)" (* "*") (cast_expression "(uint *)(lVar1 + 0x18)" (( "(") (type_descriptor "uint *" (type_identifier "uint") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(lVar1 + 0x18)" (( "(") (binary_expression "lVar1 + 0x18" (identifier "lVar1") (+ "+") (number_literal "0x18")) () ")")))) (& "&") (number_literal "8")) () ")")) (== "==") (number_literal "0")) () ")"))) () ")")) (compound_statement "{\n      if ((*(uint *)(lVar1 + 0x18) & 1) == 0) {\n        uVar2 = FUN_0010f07c("Received CHANNEL_CLOSE_CONFIRMATION for channel %u for which we never sent CHANNEL_CLOSE\n"\n                             ,*(undefined4 *)(lVar1 + 0xc));\n        FUN_0011b5c2(param_1,uVar2);\n      }\n      *(uint *)(lVar1 + 0x18) = *(uint *)(lVar1 + 0x18) | 8;\n    }" ({ "{") (if_statement "if ((*(uint *)(lVar1 + 0x18) & 1) == 0) {\n        uVar2 = FUN_0010f07c("Received CHANNEL_CLOSE_CONFIRMATION for channel %u for which we never sent CHANNEL_CLOSE\n"\n                             ,*(undefined4 *)(lVar1 + 0xc));\n        FUN_0011b5c2(param_1,uVar2);\n      }" (if "if") (parenthesized_expression "((*(uint *)(lVar1 + 0x18) & 1) == 0)" (( "(") (binary_expression "(*(uint *)(lVar1 + 0x18) & 1) == 0" (parenthesized_expression "(*(uint *)(lVar1 + 0x18) & 1)" (( "(") (binary_expression "*(uint *)(lVar1 + 0x18) & 1" (pointer_expression "*(uint *)(lVar1 + 0x18)" (* "*") (cast_expression "(uint *)(lVar1 + 0x18)" (( "(") (type_descriptor "uint *" (type_identifier "uint") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(lVar1 + 0x18)" (( "(") (binary_expression "lVar1 + 0x18" (identifier "lVar1") (+ "+") (number_literal "0x18")) () ")")))) (& "&") (number_literal "1")) () ")")) (== "==") (number_literal "0")) () ")")) (compound_statement "{\n        uVar2 = FUN_0010f07c("Received CHANNEL_CLOSE_CONFIRMATION for channel %u for which we never sent CHANNEL_CLOSE\n"\n                             ,*(undefined4 *)(lVar1 + 0xc));\n        FUN_0011b5c2(param_1,uVar2);\n      }" ({ "{") (expression_statement "uVar2 = FUN_0010f07c("Received CHANNEL_CLOSE_CONFIRMATION for channel %u for which we never sent CHANNEL_CLOSE\n"\n                             ,*(undefined4 *)(lVar1 + 0xc));" (assignment_expression "uVar2 = FUN_0010f07c("Received CHANNEL_CLOSE_CONFIRMATION for channel %u for which we never sent CHANNEL_CLOSE\n"\n                             ,*(undefined4 *)(lVar1 + 0xc))" (identifier "uVar2") (= "=") (call_expression "FUN_0010f07c("Received CHANNEL_CLOSE_CONFIRMATION for channel %u for which we never sent CHANNEL_CLOSE\n"\n                             ,*(undefined4 *)(lVar1 + 0xc))" (identifier "FUN_0010f07c") (argument_list "("Received CHANNEL_CLOSE_CONFIRMATION for channel %u for which we never sent CHANNEL_CLOSE\n"\n                             ,*(undefined4 *)(lVar1 + 0xc))" (( "(") (string_literal ""Received CHANNEL_CLOSE_CONFIRMATION for channel %u for which we never sent CHANNEL_CLOSE\n"" (" """) (string_content "Received CHANNEL_CLOSE_CONFIRMATION for channel %u for which we never sent CHANNEL_CLOSE") (escape_sequence "\n") (" """)) (, ",") (pointer_expression "*(undefined4 *)(lVar1 + 0xc)" (* "*") (cast_expression "(undefined4 *)(lVar1 + 0xc)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(lVar1 + 0xc)" (( "(") (binary_expression "lVar1 + 0xc" (identifier "lVar1") (+ "+") (number_literal "0xc")) () ")")))) () ")")))) (; ";")) (expression_statement "FUN_0011b5c2(param_1,uVar2);" (call_expression "FUN_0011b5c2(param_1,uVar2)" (identifier "FUN_0011b5c2") (argument_list "(param_1,uVar2)" (( "(") (identifier "param_1") (, ",") (identifier "uVar2") () ")"))) (; ";")) (} "}"))) (expression_statement "*(uint *)(lVar1 + 0x18) = *(uint *)(lVar1 + 0x18) | 8;" (assignment_expression "*(uint *)(lVar1 + 0x18) = *(uint *)(lVar1 + 0x18) | 8" (pointer_expression "*(uint *)(lVar1 + 0x18)" (* "*") (cast_expression "(uint *)(lVar1 + 0x18)" (( "(") (type_descriptor "uint *" (type_identifier "uint") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(lVar1 + 0x18)" (( "(") (binary_expression "lVar1 + 0x18" (identifier "lVar1") (+ "+") (number_literal "0x18")) () ")")))) (= "=") (binary_expression "*(uint *)(lVar1 + 0x18) | 8" (pointer_expression "*(uint *)(lVar1 + 0x18)" (* "*") (cast_expression "(uint *)(lVar1 + 0x18)" (( "(") (type_descriptor "uint *" (type_identifier "uint") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(lVar1 + 0x18)" (( "(") (binary_expression "lVar1 + 0x18" (identifier "lVar1") (+ "+") (number_literal "0x18")) () ")")))) (| "|") (number_literal "8"))) (; ";")) (} "}"))) (if_statement "if ((*(uint *)(lVar1 + 0x18) & 7) == 5) {\n      FUN_001269c5(param_1,0x19,1,*(undefined4 *)(lVar1 + 8),0);\n      *(uint *)(lVar1 + 0x18) = *(uint *)(lVar1 + 0x18) | 2;\n    }" (if "if") (parenthesized_expression "((*(uint *)(lVar1 + 0x18) & 7) == 5)" (( "(") (binary_expression "(*(uint *)(lVar1 + 0x18) & 7) == 5" (parenthesized_expression "(*(uint *)(lVar1 + 0x18) & 7)" (( "(") (binary_expression "*(uint *)(lVar1 + 0x18) & 7" (pointer_expression "*(uint *)(lVar1 + 0x18)" (* "*") (cast_expression "(uint *)(lVar1 + 0x18)" (( "(") (type_descriptor "uint *" (type_identifier "uint") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(lVar1 + 0x18)" (( "(") (binary_expression "lVar1 + 0x18" (identifier "lVar1") (+ "+") (number_literal "0x18")) () ")")))) (& "&") (number_literal "7")) () ")")) (== "==") (number_literal "5")) () ")")) (compound_statement "{\n      FUN_001269c5(param_1,0x19,1,*(undefined4 *)(lVar1 + 8),0);\n      *(uint *)(lVar1 + 0x18) = *(uint *)(lVar1 + 0x18) | 2;\n    }" ({ "{") (expression_statement "FUN_001269c5(param_1,0x19,1,*(undefined4 *)(lVar1 + 8),0);" (call_expression "FUN_001269c5(param_1,0x19,1,*(undefined4 *)(lVar1 + 8),0)" (identifier "FUN_001269c5") (argument_list "(param_1,0x19,1,*(undefined4 *)(lVar1 + 8),0)" (( "(") (identifier "param_1") (, ",") (number_literal "0x19") (, ",") (number_literal "1") (, ",") (pointer_expression "*(undefined4 *)(lVar1 + 8)" (* "*") (cast_expression "(undefined4 *)(lVar1 + 8)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(lVar1 + 8)" (( "(") (binary_expression "lVar1 + 8" (identifier "lVar1") (+ "+") (number_literal "8")) () ")")))) (, ",") (number_literal "0") () ")"))) (; ";")) (expression_statement "*(uint *)(lVar1 + 0x18) = *(uint *)(lVar1 + 0x18) | 2;" (assignment_expression "*(uint *)(lVar1 + 0x18) = *(uint *)(lVar1 + 0x18) | 2" (pointer_expression "*(uint *)(lVar1 + 0x18)" (* "*") (cast_expression "(uint *)(lVar1 + 0x18)" (( "(") (type_descriptor "uint *" (type_identifier "uint") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(lVar1 + 0x18)" (( "(") (binary_expression "lVar1 + 0x18" (identifier "lVar1") (+ "+") (number_literal "0x18")) () ")")))) (= "=") (binary_expression "*(uint *)(lVar1 + 0x18) | 2" (pointer_expression "*(uint *)(lVar1 + 0x18)" (* "*") (cast_expression "(uint *)(lVar1 + 0x18)" (( "(") (type_descriptor "uint *" (type_identifier "uint") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(lVar1 + 0x18)" (( "(") (binary_expression "lVar1 + 0x18" (identifier "lVar1") (+ "+") (number_literal "0x18")) () ")")))) (| "|") (number_literal "2"))) (; ";")) (} "}"))) (if_statement "if ((~*(uint *)(lVar1 + 0x18) & 10) == 0) {\n      FUN_00126348(lVar1);\n    }" (if "if") (parenthesized_expression "((~*(uint *)(lVar1 + 0x18) & 10) == 0)" (( "(") (binary_expression "(~*(uint *)(lVar1 + 0x18) & 10) == 0" (parenthesized_expression "(~*(uint *)(lVar1 + 0x18) & 10)" (( "(") (binary_expression "~*(uint *)(lVar1 + 0x18) & 10" (unary_expression "~*(uint *)(lVar1 + 0x18)" (~ "~") (pointer_expression "*(uint *)(lVar1 + 0x18)" (* "*") (cast_expression "(uint *)(lVar1 + 0x18)" (( "(") (type_descriptor "uint *" (type_identifier "uint") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(lVar1 + 0x18)" (( "(") (binary_expression "lVar1 + 0x18" (identifier "lVar1") (+ "+") (number_literal "0x18")) () ")"))))) (& "&") (number_literal "10")) () ")")) (== "==") (number_literal "0")) () ")")) (compound_statement "{\n      FUN_00126348(lVar1);\n    }" ({ "{") (expression_statement "FUN_00126348(lVar1);" (call_expression "FUN_00126348(lVar1)" (identifier "FUN_00126348") (argument_list "(lVar1)" (( "(") (identifier "lVar1") () ")"))) (; ";")) (} "}"))) (} "}"))) (return_statement "return;" (return "return") (; ";")) (} "}")))

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

void function_1(type_1 ssh,type_2 *pktin)

{
  type_3 *var_2;
  char *text;
  
  var_2 = var_1(ssh,pktin);
  if (var_2 != (type_3 *)0x0) {
    if (pktin->type == 0x18) {
      var_3(var_2);
    }
    if ((pktin->type == 0x19) && ((var_2->closes & 8U) == 0)) {
      if ((var_2->closes & 1U) == 0) {
        text = var_4("Received CHANNEL_CLOSE_CONFIRMATION for channel %u for which we never sent CHANNEL_CLOSE\n"
                         ,(type_4)var_2->localid);
        var_5(ssh,text);
      }
      var_2->closes = var_2->closes | 8;
    }
    if ((var_2->closes & 7U) == 5) {
      var_6(ssh,0x19,1,(type_4)var_2->remoteid,0);
      var_2->closes = var_2->closes | 2;
    }
    if ((~var_2->closes & 10U) == 0) {
      var_7(var_2);
    }
  }
  return;
}


(translation_unit (function_definition type: (primitive_type) declarator: (function_declarator declarator: (identifier) parameters: (parameter_list (parameter_declaration type: (type_identifier) declarator: (identifier)) (parameter_declaration type: (sized_type_specifier) declarator: (identifier)))) body: (compound_statement (declaration type: (sized_type_specifier) declarator: (identifier)) (declaration type: (type_identifier) declarator: (identifier)) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list)))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (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)))))) (if_statement condition: (parenthesized_expression (binary_expression left: (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))) right: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_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))) right: (number_literal))))) consequence: (compound_statement (if_statement condition: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_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))) right: (number_literal))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (string_literal (string_content) (escape_sequence)) (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))))))))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier) (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: (binary_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)))))) (if_statement condition: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_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))) right: (number_literal))) consequence: (compound_statement (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier) (number_literal) (number_literal) (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))))) (number_literal)))) (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: (binary_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)))))) (if_statement condition: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_expression left: (unary_expression argument: (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))) right: (number_literal))) consequence: (compound_statement (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier)))))))) (return_statement))))

void MASKED(undefined8 param_1,long param_2)

{
  long lVar1;
  undefined8 uVar2;
  
  lVar1 = FUN_001258d2();
  if (lVar1 != 0) {
    if (*(int *)(param_2 + 0x10) == 0x18) {
      FUN_00127b69(lVar1);
    }
    if ((*(int *)(param_2 + 0x10) == 0x19) && ((*(uint *)(lVar1 + 0x18) & 8) == 0)) {
      if ((*(uint *)(lVar1 + 0x18) & 1) == 0) {
        uVar2 = FUN_0010f07c("Received CHANNEL_CLOSE_CONFIRMATION for channel %u for which we never sent CHANNEL_CLOSE\n"
                             ,*(undefined4 *)(lVar1 + 0xc));
        FUN_0011b5c2(param_1,uVar2);
      }
      *(uint *)(lVar1 + 0x18) = *(uint *)(lVar1 + 0x18) | 8;
    }
    if ((*(uint *)(lVar1 + 0x18) & 7) == 5) {
      FUN_001269c5(param_1,0x19,1,*(undefined4 *)(lVar1 + 8),0);
      *(uint *)(lVar1 + 0x18) = *(uint *)(lVar1 + 0x18) | 2;
    }
    if ((~*(uint *)(lVar1 + 0x18) & 10) == 0) {
      FUN_00126348(lVar1);
    }
  }
  return;
}

