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

void ssh2_set_window(ssh_channel *c,int newwin)

{
  undefined *puVar1;
  int iVar2;
  Packet *pPVar3;
  int *ctx;
  uint uVar4;
  Ssh_conflict *ssh;
  cchandler_fn_t handler;
  Ssh_conflict ssh_00;
  
  if ((c->closes & 6U) != 0) {
    return;
  }
  if (c->type == 1) {
    if ((c->u).a.inbuffer.tail != (bufchain_granule *)0x0) {
      return;
    }
    ssh_00 = c->ssh;
    uVar4 = ssh_00->remote_bugs;
    if ((uVar4 & 0x100) != 0) goto LAB_00046b5c;
  }
  else {
    ssh_00 = c->ssh;
    uVar4 = ssh_00->remote_bugs;
    iVar2 = newwin >> 1;
    if ((uVar4 & 0x100) == 0) goto LAB_00046b64;
LAB_00046b5c:
    if (0x4000 < newwin) {
      newwin = 0x4000;
    }
  }
  iVar2 = newwin >> 1;
LAB_00046b64:
  if (iVar2 < (c->v).v2.locwindow) {
    return;
  }
  if (((c->v).v2.locmaxwin == newwin) && ((uVar4 & 0x400) == 0)) {
    ctx = (int *)(*(code *)PTR_safemalloc_000b2408)(1,4);
    puVar1 = PTR_s_acket_from_server___s_000b23a8;
    handler = (cchandler_fn_t)(PTR_LAB_000b2760 + 0x6e24);
    *ctx = newwin - (c->v).v2.locwindow;
    pPVar3 = ssh2_chanreq_init(c,puVar1 + 0x646c,handler,ctx);
    ssh2_pkt_send(ssh_00,pPVar3);
    if ((c->v).v2.throttle_state != ADDRTYPE_IPV6) {
      (c->v).v2.throttle_state = ADDRTYPE_IPV4;
    }
  }
  else {
    (c->v).v2.remlocwin = newwin;
    (c->v).v2.throttle_state = ADDRTYPE_UNSPEC;
  }
  pPVar3 = ssh2_pkt_init(0x5d);
                    /* WARNING: Subroutine does not return */
  ssh_pkt_adduint32(pPVar3,c->remoteid);
}



void FUN_00046aec(int *param_1,int param_2)

{
  undefined *puVar1;
  int iVar2;
  undefined4 uVar3;
  int *piVar4;
  uint uVar5;
  undefined *puVar6;
  int iVar7;
  
  if ((param_1[5] & 6U) != 0) {
    return;
  }
  if (param_1[3] == 1) {
    if (param_1[0x14] != 0) {
      return;
    }
    iVar7 = *param_1;
    uVar5 = *(uint *)(iVar7 + 0x50);
    if ((uVar5 & 0x100) != 0) goto LAB_00046b5c;
  }
  else {
    iVar7 = *param_1;
    uVar5 = *(uint *)(iVar7 + 0x50);
    iVar2 = param_2 >> 1;
    if ((uVar5 & 0x100) == 0) goto LAB_00046b64;
LAB_00046b5c:
    if (0x4000 < param_2) {
      param_2 = 0x4000;
    }
  }
  iVar2 = param_2 >> 1;
LAB_00046b64:
  if (param_1[0xd] <= iVar2) {
    if ((param_1[0xe] == param_2) && ((uVar5 & 0x400) == 0)) {
      piVar4 = (int *)(*(code *)PTR_safemalloc_000b2408)(1,4);
      puVar1 = PTR_s_acket_from_server___s_000b23a8;
      puVar6 = PTR_LAB_000b2760 + 0x6e24;
      *piVar4 = param_2 - param_1[0xd];
      uVar3 = FUN_0003c380(param_1,puVar1 + 0x646c,puVar6,piVar4);
      FUN_000463f8(iVar7,uVar3);
      if (param_1[0x12] != 2) {
        param_1[0x12] = 1;
      }
    }
    else {
      param_1[0xf] = param_2;
      param_1[0x12] = 0;
    }
    uVar3 = FUN_0003b04c(0x5d);
    FUN_0003b1cc(uVar3,param_1[1]);
    FUN_0003b1cc(uVar3,param_2 - param_1[0xd]);
    FUN_000463f8(iVar7,uVar3);
    param_1[0xd] = param_2;
  }
  return;
}


lui gp,0x7
addiu gp,gp,0x3884
addu gp,gp,t9
lw v0,0x14(a0)
andi v0,v0,0x6
bne v0,zero,0x00046c34
_nop
addiu sp,sp,-0x38
lw v1,0xc(a0)
li v0,0x1
sw gp,0x10(sp)
sw s1,0x20(sp)
or s1,a1,zero
sw s0,0x1c(sp)
or s0,a0,zero
sw ra,0x34(sp)
sw s5,0x30(sp)
sw s4,0x2c(sp)
sw s3,0x28(sp)
beq v1,v0,0x00046c0c
_sw s2,0x24(sp)
lw s2,0x0(s0)
lw v1,0x50(s2)
andi v0,v1,0x100
beq v0,zero,0x00046b64
_sra v0,s1,0x1
li v0,0x4000
slti a0,s1,0x4001
movz s1,v0,a0
sra v0,s1,0x1
lw a0,0x34(s0)
slt v0,v0,a0
bne v0,zero,0x00046bec
_lw ra,0x34(sp)
lw v0,0x38(s0)
beq v0,s1,0x00046c3c
_andi v1,v1,0x400
lw s4,-0x7adc(gp)
sw s1,0x3c(s0)
sw zero,0x48(s0)
addiu s4,s4,0x63f8
lw t9,-0x7adc(gp)
addiu t9,t9,-0x4fb4
bal 0x0003b04c
_li a0,0x5d
lw gp,0x10(sp)
or a0,v0,zero
lw a1,0x4(s0)
lw s3,-0x7adc(gp)
addiu s3,s3,-0x4e34
or t9,s3,zero
bal 0x0003b1cc
_or s5,v0,zero
or a0,s5,zero
lw a1,0x34(s0)
or t9,s3,zero
bal 0x0003b1cc
_subu a1,s1,a1
or a1,s5,zero
or t9,s4,zero
bal 0x000463f8
_or a0,s2,zero
sw s1,0x34(s0)
lw ra,0x34(sp)
lw s5,0x30(sp)
lw s4,0x2c(sp)
lw s3,0x28(sp)
lw s2,0x24(sp)
lw s1,0x20(sp)
lw s0,0x1c(sp)
jr ra
_addiu sp,sp,0x38
lw v0,0x50(a0)
bne v0,zero,0x00046bec
_lw ra,0x34(sp)
lw s2,0x0(s0)
lw v1,0x50(s2)
andi v0,v1,0x100
beq v0,zero,0x00046b60
_li v0,0x4000
b 0x00046b5c
_slti a0,s1,0x4001
jr ra
_nop
bne v1,zero,0x00046b84
_lw s4,-0x7adc(gp)
lw t9,-0x7f68(gp)
li a1,0x4
jalr t9
_li a0,0x1
or a0,s0,zero
lw gp,0x10(sp)
or a3,v0,zero
lw v1,0x34(s0)
lw a2,-0x7c10(gp)
subu v1,s1,v1
lw a1,-0x7fc8(gp)
lw t9,-0x7adc(gp)
addiu a2,a2,0x6e24
sw v1,0x0(v0)
addiu t9,t9,-0x3c80
bal 0x0003c380
_addiu a1,a1,0x646c
or a0,s2,zero
lw gp,0x10(sp)
lw s4,-0x7adc(gp)
addiu s4,s4,0x63f8
or t9,s4,zero
bal 0x000463f8
_or a1,v0,zero
li v0,0x2
lw v1,0x48(s0)
beq v1,v0,0x00046b90
_lw gp,0x10(sp)
li v0,0x1
b 0x00046b90
_sw v0,0x48(s0)
(translation_unit "void FUN_00046aec(int *param_1,int param_2)\n\n{\n  undefined *puVar1;\n  int iVar2;\n  undefined4 uVar3;\n  int *piVar4;\n  uint uVar5;\n  undefined *puVar6;\n  int iVar7;\n  \n  if ((param_1[5] & 6U) != 0) {\n    return;\n  }\n  if (param_1[3] == 1) {\n    if (param_1[0x14] != 0) {\n      return;\n    }\n    iVar7 = *param_1;\n    uVar5 = *(uint *)(iVar7 + 0x50);\n    if ((uVar5 & 0x100) != 0) goto LAB_00046b5c;\n  }\n  else {\n    iVar7 = *param_1;\n    uVar5 = *(uint *)(iVar7 + 0x50);\n    iVar2 = param_2 >> 1;\n    if ((uVar5 & 0x100) == 0) goto LAB_00046b64;\nLAB_00046b5c:\n    if (0x4000 < param_2) {\n      param_2 = 0x4000;\n    }\n  }\n  iVar2 = param_2 >> 1;\nLAB_00046b64:\n  if (param_1[0xd] <= iVar2) {\n    if ((param_1[0xe] == param_2) && ((uVar5 & 0x400) == 0)) {\n      piVar4 = (int *)(*(code *)PTR_safemalloc_000b2408)(1,4);\n      puVar1 = PTR_s_acket_from_server___s_000b23a8;\n      puVar6 = PTR_LAB_000b2760 + 0x6e24;\n      *piVar4 = param_2 - param_1[0xd];\n      uVar3 = FUN_0003c380(param_1,puVar1 + 0x646c,puVar6,piVar4);\n      FUN_000463f8(iVar7,uVar3);\n      if (param_1[0x12] != 2) {\n        param_1[0x12] = 1;\n      }\n    }\n    else {\n      param_1[0xf] = param_2;\n      param_1[0x12] = 0;\n    }\n    uVar3 = FUN_0003b04c(0x5d);\n    FUN_0003b1cc(uVar3,param_1[1]);\n    FUN_0003b1cc(uVar3,param_2 - param_1[0xd]);\n    FUN_000463f8(iVar7,uVar3);\n    param_1[0xd] = param_2;\n  }\n  return;\n}\n\n" (function_definition "void FUN_00046aec(int *param_1,int param_2)\n\n{\n  undefined *puVar1;\n  int iVar2;\n  undefined4 uVar3;\n  int *piVar4;\n  uint uVar5;\n  undefined *puVar6;\n  int iVar7;\n  \n  if ((param_1[5] & 6U) != 0) {\n    return;\n  }\n  if (param_1[3] == 1) {\n    if (param_1[0x14] != 0) {\n      return;\n    }\n    iVar7 = *param_1;\n    uVar5 = *(uint *)(iVar7 + 0x50);\n    if ((uVar5 & 0x100) != 0) goto LAB_00046b5c;\n  }\n  else {\n    iVar7 = *param_1;\n    uVar5 = *(uint *)(iVar7 + 0x50);\n    iVar2 = param_2 >> 1;\n    if ((uVar5 & 0x100) == 0) goto LAB_00046b64;\nLAB_00046b5c:\n    if (0x4000 < param_2) {\n      param_2 = 0x4000;\n    }\n  }\n  iVar2 = param_2 >> 1;\nLAB_00046b64:\n  if (param_1[0xd] <= iVar2) {\n    if ((param_1[0xe] == param_2) && ((uVar5 & 0x400) == 0)) {\n      piVar4 = (int *)(*(code *)PTR_safemalloc_000b2408)(1,4);\n      puVar1 = PTR_s_acket_from_server___s_000b23a8;\n      puVar6 = PTR_LAB_000b2760 + 0x6e24;\n      *piVar4 = param_2 - param_1[0xd];\n      uVar3 = FUN_0003c380(param_1,puVar1 + 0x646c,puVar6,piVar4);\n      FUN_000463f8(iVar7,uVar3);\n      if (param_1[0x12] != 2) {\n        param_1[0x12] = 1;\n      }\n    }\n    else {\n      param_1[0xf] = param_2;\n      param_1[0x12] = 0;\n    }\n    uVar3 = FUN_0003b04c(0x5d);\n    FUN_0003b1cc(uVar3,param_1[1]);\n    FUN_0003b1cc(uVar3,param_2 - param_1[0xd]);\n    FUN_000463f8(iVar7,uVar3);\n    param_1[0xd] = param_2;\n  }\n  return;\n}" primitive_type (function_declarator "FUN_00046aec(int *param_1,int param_2)" identifier (parameter_list "(int *param_1,int param_2)" ( (parameter_declaration "int *param_1" primitive_type (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "int param_2" primitive_type identifier) ))) (compound_statement "{\n  undefined *puVar1;\n  int iVar2;\n  undefined4 uVar3;\n  int *piVar4;\n  uint uVar5;\n  undefined *puVar6;\n  int iVar7;\n  \n  if ((param_1[5] & 6U) != 0) {\n    return;\n  }\n  if (param_1[3] == 1) {\n    if (param_1[0x14] != 0) {\n      return;\n    }\n    iVar7 = *param_1;\n    uVar5 = *(uint *)(iVar7 + 0x50);\n    if ((uVar5 & 0x100) != 0) goto LAB_00046b5c;\n  }\n  else {\n    iVar7 = *param_1;\n    uVar5 = *(uint *)(iVar7 + 0x50);\n    iVar2 = param_2 >> 1;\n    if ((uVar5 & 0x100) == 0) goto LAB_00046b64;\nLAB_00046b5c:\n    if (0x4000 < param_2) {\n      param_2 = 0x4000;\n    }\n  }\n  iVar2 = param_2 >> 1;\nLAB_00046b64:\n  if (param_1[0xd] <= iVar2) {\n    if ((param_1[0xe] == param_2) && ((uVar5 & 0x400) == 0)) {\n      piVar4 = (int *)(*(code *)PTR_safemalloc_000b2408)(1,4);\n      puVar1 = PTR_s_acket_from_server___s_000b23a8;\n      puVar6 = PTR_LAB_000b2760 + 0x6e24;\n      *piVar4 = param_2 - param_1[0xd];\n      uVar3 = FUN_0003c380(param_1,puVar1 + 0x646c,puVar6,piVar4);\n      FUN_000463f8(iVar7,uVar3);\n      if (param_1[0x12] != 2) {\n        param_1[0x12] = 1;\n      }\n    }\n    else {\n      param_1[0xf] = param_2;\n      param_1[0x12] = 0;\n    }\n    uVar3 = FUN_0003b04c(0x5d);\n    FUN_0003b1cc(uVar3,param_1[1]);\n    FUN_0003b1cc(uVar3,param_2 - param_1[0xd]);\n    FUN_000463f8(iVar7,uVar3);\n    param_1[0xd] = param_2;\n  }\n  return;\n}" { (declaration "undefined *puVar1;" type_identifier (pointer_declarator "*puVar1" * identifier) ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "undefined4 uVar3;" type_identifier identifier ;) (declaration "int *piVar4;" primitive_type (pointer_declarator "*piVar4" * identifier) ;) (declaration "uint uVar5;" type_identifier identifier ;) (declaration "undefined *puVar6;" type_identifier (pointer_declarator "*puVar6" * identifier) ;) (declaration "int iVar7;" primitive_type identifier ;) (if_statement "if ((param_1[5] & 6U) != 0) {\n    return;\n  }" if (parenthesized_expression "((param_1[5] & 6U) != 0)" ( (binary_expression "(param_1[5] & 6U) != 0" (parenthesized_expression "(param_1[5] & 6U)" ( (binary_expression "param_1[5] & 6U" (subscript_expression "param_1[5]" identifier [ number_literal ]) & number_literal) )) != number_literal) )) (compound_statement "{\n    return;\n  }" { (return_statement "return;" return ;) })) (if_statement "if (param_1[3] == 1) {\n    if (param_1[0x14] != 0) {\n      return;\n    }\n    iVar7 = *param_1;\n    uVar5 = *(uint *)(iVar7 + 0x50);\n    if ((uVar5 & 0x100) != 0) goto LAB_00046b5c;\n  }\n  else {\n    iVar7 = *param_1;\n    uVar5 = *(uint *)(iVar7 + 0x50);\n    iVar2 = param_2 >> 1;\n    if ((uVar5 & 0x100) == 0) goto LAB_00046b64;\nLAB_00046b5c:\n    if (0x4000 < param_2) {\n      param_2 = 0x4000;\n    }\n  }" if (parenthesized_expression "(param_1[3] == 1)" ( (binary_expression "param_1[3] == 1" (subscript_expression "param_1[3]" identifier [ number_literal ]) == number_literal) )) (compound_statement "{\n    if (param_1[0x14] != 0) {\n      return;\n    }\n    iVar7 = *param_1;\n    uVar5 = *(uint *)(iVar7 + 0x50);\n    if ((uVar5 & 0x100) != 0) goto LAB_00046b5c;\n  }" { (if_statement "if (param_1[0x14] != 0) {\n      return;\n    }" if (parenthesized_expression "(param_1[0x14] != 0)" ( (binary_expression "param_1[0x14] != 0" (subscript_expression "param_1[0x14]" identifier [ number_literal ]) != number_literal) )) (compound_statement "{\n      return;\n    }" { (return_statement "return;" return ;) })) (expression_statement "iVar7 = *param_1;" (assignment_expression "iVar7 = *param_1" identifier = (pointer_expression "*param_1" * identifier)) ;) (expression_statement "uVar5 = *(uint *)(iVar7 + 0x50);" (assignment_expression "uVar5 = *(uint *)(iVar7 + 0x50)" identifier = (pointer_expression "*(uint *)(iVar7 + 0x50)" * (cast_expression "(uint *)(iVar7 + 0x50)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar7 + 0x50)" ( (binary_expression "iVar7 + 0x50" identifier + number_literal) ))))) ;) (if_statement "if ((uVar5 & 0x100) != 0) goto LAB_00046b5c;" if (parenthesized_expression "((uVar5 & 0x100) != 0)" ( (binary_expression "(uVar5 & 0x100) != 0" (parenthesized_expression "(uVar5 & 0x100)" ( (binary_expression "uVar5 & 0x100" identifier & number_literal) )) != number_literal) )) (goto_statement "goto LAB_00046b5c;" goto statement_identifier ;)) }) (else_clause "else {\n    iVar7 = *param_1;\n    uVar5 = *(uint *)(iVar7 + 0x50);\n    iVar2 = param_2 >> 1;\n    if ((uVar5 & 0x100) == 0) goto LAB_00046b64;\nLAB_00046b5c:\n    if (0x4000 < param_2) {\n      param_2 = 0x4000;\n    }\n  }" else (compound_statement "{\n    iVar7 = *param_1;\n    uVar5 = *(uint *)(iVar7 + 0x50);\n    iVar2 = param_2 >> 1;\n    if ((uVar5 & 0x100) == 0) goto LAB_00046b64;\nLAB_00046b5c:\n    if (0x4000 < param_2) {\n      param_2 = 0x4000;\n    }\n  }" { (expression_statement "iVar7 = *param_1;" (assignment_expression "iVar7 = *param_1" identifier = (pointer_expression "*param_1" * identifier)) ;) (expression_statement "uVar5 = *(uint *)(iVar7 + 0x50);" (assignment_expression "uVar5 = *(uint *)(iVar7 + 0x50)" identifier = (pointer_expression "*(uint *)(iVar7 + 0x50)" * (cast_expression "(uint *)(iVar7 + 0x50)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar7 + 0x50)" ( (binary_expression "iVar7 + 0x50" identifier + number_literal) ))))) ;) (expression_statement "iVar2 = param_2 >> 1;" (assignment_expression "iVar2 = param_2 >> 1" identifier = (binary_expression "param_2 >> 1" identifier >> number_literal)) ;) (if_statement "if ((uVar5 & 0x100) == 0) goto LAB_00046b64;" if (parenthesized_expression "((uVar5 & 0x100) == 0)" ( (binary_expression "(uVar5 & 0x100) == 0" (parenthesized_expression "(uVar5 & 0x100)" ( (binary_expression "uVar5 & 0x100" identifier & number_literal) )) == number_literal) )) (goto_statement "goto LAB_00046b64;" goto statement_identifier ;)) (labeled_statement "LAB_00046b5c:\n    if (0x4000 < param_2) {\n      param_2 = 0x4000;\n    }" statement_identifier : (if_statement "if (0x4000 < param_2) {\n      param_2 = 0x4000;\n    }" if (parenthesized_expression "(0x4000 < param_2)" ( (binary_expression "0x4000 < param_2" number_literal < identifier) )) (compound_statement "{\n      param_2 = 0x4000;\n    }" { (expression_statement "param_2 = 0x4000;" (assignment_expression "param_2 = 0x4000" identifier = number_literal) ;) }))) }))) (expression_statement "iVar2 = param_2 >> 1;" (assignment_expression "iVar2 = param_2 >> 1" identifier = (binary_expression "param_2 >> 1" identifier >> number_literal)) ;) (labeled_statement "LAB_00046b64:\n  if (param_1[0xd] <= iVar2) {\n    if ((param_1[0xe] == param_2) && ((uVar5 & 0x400) == 0)) {\n      piVar4 = (int *)(*(code *)PTR_safemalloc_000b2408)(1,4);\n      puVar1 = PTR_s_acket_from_server___s_000b23a8;\n      puVar6 = PTR_LAB_000b2760 + 0x6e24;\n      *piVar4 = param_2 - param_1[0xd];\n      uVar3 = FUN_0003c380(param_1,puVar1 + 0x646c,puVar6,piVar4);\n      FUN_000463f8(iVar7,uVar3);\n      if (param_1[0x12] != 2) {\n        param_1[0x12] = 1;\n      }\n    }\n    else {\n      param_1[0xf] = param_2;\n      param_1[0x12] = 0;\n    }\n    uVar3 = FUN_0003b04c(0x5d);\n    FUN_0003b1cc(uVar3,param_1[1]);\n    FUN_0003b1cc(uVar3,param_2 - param_1[0xd]);\n    FUN_000463f8(iVar7,uVar3);\n    param_1[0xd] = param_2;\n  }" statement_identifier : (if_statement "if (param_1[0xd] <= iVar2) {\n    if ((param_1[0xe] == param_2) && ((uVar5 & 0x400) == 0)) {\n      piVar4 = (int *)(*(code *)PTR_safemalloc_000b2408)(1,4);\n      puVar1 = PTR_s_acket_from_server___s_000b23a8;\n      puVar6 = PTR_LAB_000b2760 + 0x6e24;\n      *piVar4 = param_2 - param_1[0xd];\n      uVar3 = FUN_0003c380(param_1,puVar1 + 0x646c,puVar6,piVar4);\n      FUN_000463f8(iVar7,uVar3);\n      if (param_1[0x12] != 2) {\n        param_1[0x12] = 1;\n      }\n    }\n    else {\n      param_1[0xf] = param_2;\n      param_1[0x12] = 0;\n    }\n    uVar3 = FUN_0003b04c(0x5d);\n    FUN_0003b1cc(uVar3,param_1[1]);\n    FUN_0003b1cc(uVar3,param_2 - param_1[0xd]);\n    FUN_000463f8(iVar7,uVar3);\n    param_1[0xd] = param_2;\n  }" if (parenthesized_expression "(param_1[0xd] <= iVar2)" ( (binary_expression "param_1[0xd] <= iVar2" (subscript_expression "param_1[0xd]" identifier [ number_literal ]) <= identifier) )) (compound_statement "{\n    if ((param_1[0xe] == param_2) && ((uVar5 & 0x400) == 0)) {\n      piVar4 = (int *)(*(code *)PTR_safemalloc_000b2408)(1,4);\n      puVar1 = PTR_s_acket_from_server___s_000b23a8;\n      puVar6 = PTR_LAB_000b2760 + 0x6e24;\n      *piVar4 = param_2 - param_1[0xd];\n      uVar3 = FUN_0003c380(param_1,puVar1 + 0x646c,puVar6,piVar4);\n      FUN_000463f8(iVar7,uVar3);\n      if (param_1[0x12] != 2) {\n        param_1[0x12] = 1;\n      }\n    }\n    else {\n      param_1[0xf] = param_2;\n      param_1[0x12] = 0;\n    }\n    uVar3 = FUN_0003b04c(0x5d);\n    FUN_0003b1cc(uVar3,param_1[1]);\n    FUN_0003b1cc(uVar3,param_2 - param_1[0xd]);\n    FUN_000463f8(iVar7,uVar3);\n    param_1[0xd] = param_2;\n  }" { (if_statement "if ((param_1[0xe] == param_2) && ((uVar5 & 0x400) == 0)) {\n      piVar4 = (int *)(*(code *)PTR_safemalloc_000b2408)(1,4);\n      puVar1 = PTR_s_acket_from_server___s_000b23a8;\n      puVar6 = PTR_LAB_000b2760 + 0x6e24;\n      *piVar4 = param_2 - param_1[0xd];\n      uVar3 = FUN_0003c380(param_1,puVar1 + 0x646c,puVar6,piVar4);\n      FUN_000463f8(iVar7,uVar3);\n      if (param_1[0x12] != 2) {\n        param_1[0x12] = 1;\n      }\n    }\n    else {\n      param_1[0xf] = param_2;\n      param_1[0x12] = 0;\n    }" if (parenthesized_expression "((param_1[0xe] == param_2) && ((uVar5 & 0x400) == 0))" ( (binary_expression "(param_1[0xe] == param_2) && ((uVar5 & 0x400) == 0)" (parenthesized_expression "(param_1[0xe] == param_2)" ( (binary_expression "param_1[0xe] == param_2" (subscript_expression "param_1[0xe]" identifier [ number_literal ]) == identifier) )) && (parenthesized_expression "((uVar5 & 0x400) == 0)" ( (binary_expression "(uVar5 & 0x400) == 0" (parenthesized_expression "(uVar5 & 0x400)" ( (binary_expression "uVar5 & 0x400" identifier & number_literal) )) == number_literal) ))) )) (compound_statement "{\n      piVar4 = (int *)(*(code *)PTR_safemalloc_000b2408)(1,4);\n      puVar1 = PTR_s_acket_from_server___s_000b23a8;\n      puVar6 = PTR_LAB_000b2760 + 0x6e24;\n      *piVar4 = param_2 - param_1[0xd];\n      uVar3 = FUN_0003c380(param_1,puVar1 + 0x646c,puVar6,piVar4);\n      FUN_000463f8(iVar7,uVar3);\n      if (param_1[0x12] != 2) {\n        param_1[0x12] = 1;\n      }\n    }" { (expression_statement "piVar4 = (int *)(*(code *)PTR_safemalloc_000b2408)(1,4);" (assignment_expression "piVar4 = (int *)(*(code *)PTR_safemalloc_000b2408)(1,4)" identifier = (cast_expression "(int *)(*(code *)PTR_safemalloc_000b2408)(1,4)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "(*(code *)PTR_safemalloc_000b2408)(1,4)" (parenthesized_expression "(*(code *)PTR_safemalloc_000b2408)" ( (pointer_expression "*(code *)PTR_safemalloc_000b2408" * (cast_expression "(code *)PTR_safemalloc_000b2408" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(1,4)" ( number_literal , number_literal ))))) ;) (expression_statement "puVar1 = PTR_s_acket_from_server___s_000b23a8;" (assignment_expression "puVar1 = PTR_s_acket_from_server___s_000b23a8" identifier = identifier) ;) (expression_statement "puVar6 = PTR_LAB_000b2760 + 0x6e24;" (assignment_expression "puVar6 = PTR_LAB_000b2760 + 0x6e24" identifier = (binary_expression "PTR_LAB_000b2760 + 0x6e24" identifier + number_literal)) ;) (expression_statement "*piVar4 = param_2 - param_1[0xd];" (assignment_expression "*piVar4 = param_2 - param_1[0xd]" (pointer_expression "*piVar4" * identifier) = (binary_expression "param_2 - param_1[0xd]" identifier - (subscript_expression "param_1[0xd]" identifier [ number_literal ]))) ;) (expression_statement "uVar3 = FUN_0003c380(param_1,puVar1 + 0x646c,puVar6,piVar4);" (assignment_expression "uVar3 = FUN_0003c380(param_1,puVar1 + 0x646c,puVar6,piVar4)" identifier = (call_expression "FUN_0003c380(param_1,puVar1 + 0x646c,puVar6,piVar4)" identifier (argument_list "(param_1,puVar1 + 0x646c,puVar6,piVar4)" ( identifier , (binary_expression "puVar1 + 0x646c" identifier + number_literal) , identifier , identifier )))) ;) (expression_statement "FUN_000463f8(iVar7,uVar3);" (call_expression "FUN_000463f8(iVar7,uVar3)" identifier (argument_list "(iVar7,uVar3)" ( identifier , identifier ))) ;) (if_statement "if (param_1[0x12] != 2) {\n        param_1[0x12] = 1;\n      }" if (parenthesized_expression "(param_1[0x12] != 2)" ( (binary_expression "param_1[0x12] != 2" (subscript_expression "param_1[0x12]" identifier [ number_literal ]) != number_literal) )) (compound_statement "{\n        param_1[0x12] = 1;\n      }" { (expression_statement "param_1[0x12] = 1;" (assignment_expression "param_1[0x12] = 1" (subscript_expression "param_1[0x12]" identifier [ number_literal ]) = number_literal) ;) })) }) (else_clause "else {\n      param_1[0xf] = param_2;\n      param_1[0x12] = 0;\n    }" else (compound_statement "{\n      param_1[0xf] = param_2;\n      param_1[0x12] = 0;\n    }" { (expression_statement "param_1[0xf] = param_2;" (assignment_expression "param_1[0xf] = param_2" (subscript_expression "param_1[0xf]" identifier [ number_literal ]) = identifier) ;) (expression_statement "param_1[0x12] = 0;" (assignment_expression "param_1[0x12] = 0" (subscript_expression "param_1[0x12]" identifier [ number_literal ]) = number_literal) ;) }))) (expression_statement "uVar3 = FUN_0003b04c(0x5d);" (assignment_expression "uVar3 = FUN_0003b04c(0x5d)" identifier = (call_expression "FUN_0003b04c(0x5d)" identifier (argument_list "(0x5d)" ( number_literal )))) ;) (expression_statement "FUN_0003b1cc(uVar3,param_1[1]);" (call_expression "FUN_0003b1cc(uVar3,param_1[1])" identifier (argument_list "(uVar3,param_1[1])" ( identifier , (subscript_expression "param_1[1]" identifier [ number_literal ]) ))) ;) (expression_statement "FUN_0003b1cc(uVar3,param_2 - param_1[0xd]);" (call_expression "FUN_0003b1cc(uVar3,param_2 - param_1[0xd])" identifier (argument_list "(uVar3,param_2 - param_1[0xd])" ( identifier , (binary_expression "param_2 - param_1[0xd]" identifier - (subscript_expression "param_1[0xd]" identifier [ number_literal ])) ))) ;) (expression_statement "FUN_000463f8(iVar7,uVar3);" (call_expression "FUN_000463f8(iVar7,uVar3)" identifier (argument_list "(iVar7,uVar3)" ( identifier , identifier ))) ;) (expression_statement "param_1[0xd] = param_2;" (assignment_expression "param_1[0xd] = param_2" (subscript_expression "param_1[0xd]" identifier [ number_literal ]) = identifier) ;) }))) (return_statement "return;" return ;) })))
(translation_unit "/* WARNING: Enum "anon_enum_32": Some values do not have unique names */\n\nvoid ssh2_set_window(ssh_channel *c,int newwin)\n\n{\n  undefined *puVar1;\n  int iVar2;\n  Packet *pPVar3;\n  int *ctx;\n  uint uVar4;\n  Ssh_conflict *ssh;\n  cchandler_fn_t handler;\n  Ssh_conflict ssh_00;\n  \n  if ((c->closes & 6U) != 0) {\n    return;\n  }\n  if (c->type == 1) {\n    if ((c->u).a.inbuffer.tail != (bufchain_granule *)0x0) {\n      return;\n    }\n    ssh_00 = c->ssh;\n    uVar4 = ssh_00->remote_bugs;\n    if ((uVar4 & 0x100) != 0) goto LAB_00046b5c;\n  }\n  else {\n    ssh_00 = c->ssh;\n    uVar4 = ssh_00->remote_bugs;\n    iVar2 = newwin >> 1;\n    if ((uVar4 & 0x100) == 0) goto LAB_00046b64;\nLAB_00046b5c:\n    if (0x4000 < newwin) {\n      newwin = 0x4000;\n    }\n  }\n  iVar2 = newwin >> 1;\nLAB_00046b64:\n  if (iVar2 < (c->v).v2.locwindow) {\n    return;\n  }\n  if (((c->v).v2.locmaxwin == newwin) && ((uVar4 & 0x400) == 0)) {\n    ctx = (int *)(*(code *)PTR_safemalloc_000b2408)(1,4);\n    puVar1 = PTR_s_acket_from_server___s_000b23a8;\n    handler = (cchandler_fn_t)(PTR_LAB_000b2760 + 0x6e24);\n    *ctx = newwin - (c->v).v2.locwindow;\n    pPVar3 = ssh2_chanreq_init(c,puVar1 + 0x646c,handler,ctx);\n    ssh2_pkt_send(ssh_00,pPVar3);\n    if ((c->v).v2.throttle_state != ADDRTYPE_IPV6) {\n      (c->v).v2.throttle_state = ADDRTYPE_IPV4;\n    }\n  }\n  else {\n    (c->v).v2.remlocwin = newwin;\n    (c->v).v2.throttle_state = ADDRTYPE_UNSPEC;\n  }\n  pPVar3 = ssh2_pkt_init(0x5d);\n                    /* WARNING: Subroutine does not return */\n  ssh_pkt_adduint32(pPVar3,c->remoteid);\n}\n\n" comment (function_definition "void ssh2_set_window(ssh_channel *c,int newwin)\n\n{\n  undefined *puVar1;\n  int iVar2;\n  Packet *pPVar3;\n  int *ctx;\n  uint uVar4;\n  Ssh_conflict *ssh;\n  cchandler_fn_t handler;\n  Ssh_conflict ssh_00;\n  \n  if ((c->closes & 6U) != 0) {\n    return;\n  }\n  if (c->type == 1) {\n    if ((c->u).a.inbuffer.tail != (bufchain_granule *)0x0) {\n      return;\n    }\n    ssh_00 = c->ssh;\n    uVar4 = ssh_00->remote_bugs;\n    if ((uVar4 & 0x100) != 0) goto LAB_00046b5c;\n  }\n  else {\n    ssh_00 = c->ssh;\n    uVar4 = ssh_00->remote_bugs;\n    iVar2 = newwin >> 1;\n    if ((uVar4 & 0x100) == 0) goto LAB_00046b64;\nLAB_00046b5c:\n    if (0x4000 < newwin) {\n      newwin = 0x4000;\n    }\n  }\n  iVar2 = newwin >> 1;\nLAB_00046b64:\n  if (iVar2 < (c->v).v2.locwindow) {\n    return;\n  }\n  if (((c->v).v2.locmaxwin == newwin) && ((uVar4 & 0x400) == 0)) {\n    ctx = (int *)(*(code *)PTR_safemalloc_000b2408)(1,4);\n    puVar1 = PTR_s_acket_from_server___s_000b23a8;\n    handler = (cchandler_fn_t)(PTR_LAB_000b2760 + 0x6e24);\n    *ctx = newwin - (c->v).v2.locwindow;\n    pPVar3 = ssh2_chanreq_init(c,puVar1 + 0x646c,handler,ctx);\n    ssh2_pkt_send(ssh_00,pPVar3);\n    if ((c->v).v2.throttle_state != ADDRTYPE_IPV6) {\n      (c->v).v2.throttle_state = ADDRTYPE_IPV4;\n    }\n  }\n  else {\n    (c->v).v2.remlocwin = newwin;\n    (c->v).v2.throttle_state = ADDRTYPE_UNSPEC;\n  }\n  pPVar3 = ssh2_pkt_init(0x5d);\n                    /* WARNING: Subroutine does not return */\n  ssh_pkt_adduint32(pPVar3,c->remoteid);\n}" primitive_type (function_declarator "ssh2_set_window(ssh_channel *c,int newwin)" identifier (parameter_list "(ssh_channel *c,int newwin)" ( (parameter_declaration "ssh_channel *c" type_identifier (pointer_declarator "*c" * identifier)) , (parameter_declaration "int newwin" primitive_type identifier) ))) (compound_statement "{\n  undefined *puVar1;\n  int iVar2;\n  Packet *pPVar3;\n  int *ctx;\n  uint uVar4;\n  Ssh_conflict *ssh;\n  cchandler_fn_t handler;\n  Ssh_conflict ssh_00;\n  \n  if ((c->closes & 6U) != 0) {\n    return;\n  }\n  if (c->type == 1) {\n    if ((c->u).a.inbuffer.tail != (bufchain_granule *)0x0) {\n      return;\n    }\n    ssh_00 = c->ssh;\n    uVar4 = ssh_00->remote_bugs;\n    if ((uVar4 & 0x100) != 0) goto LAB_00046b5c;\n  }\n  else {\n    ssh_00 = c->ssh;\n    uVar4 = ssh_00->remote_bugs;\n    iVar2 = newwin >> 1;\n    if ((uVar4 & 0x100) == 0) goto LAB_00046b64;\nLAB_00046b5c:\n    if (0x4000 < newwin) {\n      newwin = 0x4000;\n    }\n  }\n  iVar2 = newwin >> 1;\nLAB_00046b64:\n  if (iVar2 < (c->v).v2.locwindow) {\n    return;\n  }\n  if (((c->v).v2.locmaxwin == newwin) && ((uVar4 & 0x400) == 0)) {\n    ctx = (int *)(*(code *)PTR_safemalloc_000b2408)(1,4);\n    puVar1 = PTR_s_acket_from_server___s_000b23a8;\n    handler = (cchandler_fn_t)(PTR_LAB_000b2760 + 0x6e24);\n    *ctx = newwin - (c->v).v2.locwindow;\n    pPVar3 = ssh2_chanreq_init(c,puVar1 + 0x646c,handler,ctx);\n    ssh2_pkt_send(ssh_00,pPVar3);\n    if ((c->v).v2.throttle_state != ADDRTYPE_IPV6) {\n      (c->v).v2.throttle_state = ADDRTYPE_IPV4;\n    }\n  }\n  else {\n    (c->v).v2.remlocwin = newwin;\n    (c->v).v2.throttle_state = ADDRTYPE_UNSPEC;\n  }\n  pPVar3 = ssh2_pkt_init(0x5d);\n                    /* WARNING: Subroutine does not return */\n  ssh_pkt_adduint32(pPVar3,c->remoteid);\n}" { (declaration "undefined *puVar1;" type_identifier (pointer_declarator "*puVar1" * identifier) ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "Packet *pPVar3;" type_identifier (pointer_declarator "*pPVar3" * identifier) ;) (declaration "int *ctx;" primitive_type (pointer_declarator "*ctx" * identifier) ;) (declaration "uint uVar4;" type_identifier identifier ;) (declaration "Ssh_conflict *ssh;" type_identifier (pointer_declarator "*ssh" * identifier) ;) (declaration "cchandler_fn_t handler;" type_identifier identifier ;) (declaration "Ssh_conflict ssh_00;" type_identifier identifier ;) (if_statement "if ((c->closes & 6U) != 0) {\n    return;\n  }" if (parenthesized_expression "((c->closes & 6U) != 0)" ( (binary_expression "(c->closes & 6U) != 0" (parenthesized_expression "(c->closes & 6U)" ( (binary_expression "c->closes & 6U" (field_expression "c->closes" identifier -> field_identifier) & number_literal) )) != number_literal) )) (compound_statement "{\n    return;\n  }" { (return_statement "return;" return ;) })) (if_statement "if (c->type == 1) {\n    if ((c->u).a.inbuffer.tail != (bufchain_granule *)0x0) {\n      return;\n    }\n    ssh_00 = c->ssh;\n    uVar4 = ssh_00->remote_bugs;\n    if ((uVar4 & 0x100) != 0) goto LAB_00046b5c;\n  }\n  else {\n    ssh_00 = c->ssh;\n    uVar4 = ssh_00->remote_bugs;\n    iVar2 = newwin >> 1;\n    if ((uVar4 & 0x100) == 0) goto LAB_00046b64;\nLAB_00046b5c:\n    if (0x4000 < newwin) {\n      newwin = 0x4000;\n    }\n  }" if (parenthesized_expression "(c->type == 1)" ( (binary_expression "c->type == 1" (field_expression "c->type" identifier -> field_identifier) == number_literal) )) (compound_statement "{\n    if ((c->u).a.inbuffer.tail != (bufchain_granule *)0x0) {\n      return;\n    }\n    ssh_00 = c->ssh;\n    uVar4 = ssh_00->remote_bugs;\n    if ((uVar4 & 0x100) != 0) goto LAB_00046b5c;\n  }" { (if_statement "if ((c->u).a.inbuffer.tail != (bufchain_granule *)0x0) {\n      return;\n    }" if (parenthesized_expression "((c->u).a.inbuffer.tail != (bufchain_granule *)0x0)" ( (binary_expression "(c->u).a.inbuffer.tail != (bufchain_granule *)0x0" (field_expression "(c->u).a.inbuffer.tail" (field_expression "(c->u).a.inbuffer" (field_expression "(c->u).a" (parenthesized_expression "(c->u)" ( (field_expression "c->u" identifier -> field_identifier) )) . field_identifier) . field_identifier) . field_identifier) != (cast_expression "(bufchain_granule *)0x0" ( (type_descriptor "bufchain_granule *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n      return;\n    }" { (return_statement "return;" return ;) })) (expression_statement "ssh_00 = c->ssh;" (assignment_expression "ssh_00 = c->ssh" identifier = (field_expression "c->ssh" identifier -> field_identifier)) ;) (expression_statement "uVar4 = ssh_00->remote_bugs;" (assignment_expression "uVar4 = ssh_00->remote_bugs" identifier = (field_expression "ssh_00->remote_bugs" identifier -> field_identifier)) ;) (if_statement "if ((uVar4 & 0x100) != 0) goto LAB_00046b5c;" if (parenthesized_expression "((uVar4 & 0x100) != 0)" ( (binary_expression "(uVar4 & 0x100) != 0" (parenthesized_expression "(uVar4 & 0x100)" ( (binary_expression "uVar4 & 0x100" identifier & number_literal) )) != number_literal) )) (goto_statement "goto LAB_00046b5c;" goto statement_identifier ;)) }) (else_clause "else {\n    ssh_00 = c->ssh;\n    uVar4 = ssh_00->remote_bugs;\n    iVar2 = newwin >> 1;\n    if ((uVar4 & 0x100) == 0) goto LAB_00046b64;\nLAB_00046b5c:\n    if (0x4000 < newwin) {\n      newwin = 0x4000;\n    }\n  }" else (compound_statement "{\n    ssh_00 = c->ssh;\n    uVar4 = ssh_00->remote_bugs;\n    iVar2 = newwin >> 1;\n    if ((uVar4 & 0x100) == 0) goto LAB_00046b64;\nLAB_00046b5c:\n    if (0x4000 < newwin) {\n      newwin = 0x4000;\n    }\n  }" { (expression_statement "ssh_00 = c->ssh;" (assignment_expression "ssh_00 = c->ssh" identifier = (field_expression "c->ssh" identifier -> field_identifier)) ;) (expression_statement "uVar4 = ssh_00->remote_bugs;" (assignment_expression "uVar4 = ssh_00->remote_bugs" identifier = (field_expression "ssh_00->remote_bugs" identifier -> field_identifier)) ;) (expression_statement "iVar2 = newwin >> 1;" (assignment_expression "iVar2 = newwin >> 1" identifier = (binary_expression "newwin >> 1" identifier >> number_literal)) ;) (if_statement "if ((uVar4 & 0x100) == 0) goto LAB_00046b64;" if (parenthesized_expression "((uVar4 & 0x100) == 0)" ( (binary_expression "(uVar4 & 0x100) == 0" (parenthesized_expression "(uVar4 & 0x100)" ( (binary_expression "uVar4 & 0x100" identifier & number_literal) )) == number_literal) )) (goto_statement "goto LAB_00046b64;" goto statement_identifier ;)) (labeled_statement "LAB_00046b5c:\n    if (0x4000 < newwin) {\n      newwin = 0x4000;\n    }" statement_identifier : (if_statement "if (0x4000 < newwin) {\n      newwin = 0x4000;\n    }" if (parenthesized_expression "(0x4000 < newwin)" ( (binary_expression "0x4000 < newwin" number_literal < identifier) )) (compound_statement "{\n      newwin = 0x4000;\n    }" { (expression_statement "newwin = 0x4000;" (assignment_expression "newwin = 0x4000" identifier = number_literal) ;) }))) }))) (expression_statement "iVar2 = newwin >> 1;" (assignment_expression "iVar2 = newwin >> 1" identifier = (binary_expression "newwin >> 1" identifier >> number_literal)) ;) (labeled_statement "LAB_00046b64:\n  if (iVar2 < (c->v).v2.locwindow) {\n    return;\n  }" statement_identifier : (if_statement "if (iVar2 < (c->v).v2.locwindow) {\n    return;\n  }" if (parenthesized_expression "(iVar2 < (c->v).v2.locwindow)" ( (binary_expression "iVar2 < (c->v).v2.locwindow" identifier < (field_expression "(c->v).v2.locwindow" (field_expression "(c->v).v2" (parenthesized_expression "(c->v)" ( (field_expression "c->v" identifier -> field_identifier) )) . field_identifier) . field_identifier)) )) (compound_statement "{\n    return;\n  }" { (return_statement "return;" return ;) }))) (if_statement "if (((c->v).v2.locmaxwin == newwin) && ((uVar4 & 0x400) == 0)) {\n    ctx = (int *)(*(code *)PTR_safemalloc_000b2408)(1,4);\n    puVar1 = PTR_s_acket_from_server___s_000b23a8;\n    handler = (cchandler_fn_t)(PTR_LAB_000b2760 + 0x6e24);\n    *ctx = newwin - (c->v).v2.locwindow;\n    pPVar3 = ssh2_chanreq_init(c,puVar1 + 0x646c,handler,ctx);\n    ssh2_pkt_send(ssh_00,pPVar3);\n    if ((c->v).v2.throttle_state != ADDRTYPE_IPV6) {\n      (c->v).v2.throttle_state = ADDRTYPE_IPV4;\n    }\n  }\n  else {\n    (c->v).v2.remlocwin = newwin;\n    (c->v).v2.throttle_state = ADDRTYPE_UNSPEC;\n  }" if (parenthesized_expression "(((c->v).v2.locmaxwin == newwin) && ((uVar4 & 0x400) == 0))" ( (binary_expression "((c->v).v2.locmaxwin == newwin) && ((uVar4 & 0x400) == 0)" (parenthesized_expression "((c->v).v2.locmaxwin == newwin)" ( (binary_expression "(c->v).v2.locmaxwin == newwin" (field_expression "(c->v).v2.locmaxwin" (field_expression "(c->v).v2" (parenthesized_expression "(c->v)" ( (field_expression "c->v" identifier -> field_identifier) )) . field_identifier) . field_identifier) == identifier) )) && (parenthesized_expression "((uVar4 & 0x400) == 0)" ( (binary_expression "(uVar4 & 0x400) == 0" (parenthesized_expression "(uVar4 & 0x400)" ( (binary_expression "uVar4 & 0x400" identifier & number_literal) )) == number_literal) ))) )) (compound_statement "{\n    ctx = (int *)(*(code *)PTR_safemalloc_000b2408)(1,4);\n    puVar1 = PTR_s_acket_from_server___s_000b23a8;\n    handler = (cchandler_fn_t)(PTR_LAB_000b2760 + 0x6e24);\n    *ctx = newwin - (c->v).v2.locwindow;\n    pPVar3 = ssh2_chanreq_init(c,puVar1 + 0x646c,handler,ctx);\n    ssh2_pkt_send(ssh_00,pPVar3);\n    if ((c->v).v2.throttle_state != ADDRTYPE_IPV6) {\n      (c->v).v2.throttle_state = ADDRTYPE_IPV4;\n    }\n  }" { (expression_statement "ctx = (int *)(*(code *)PTR_safemalloc_000b2408)(1,4);" (assignment_expression "ctx = (int *)(*(code *)PTR_safemalloc_000b2408)(1,4)" identifier = (cast_expression "(int *)(*(code *)PTR_safemalloc_000b2408)(1,4)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "(*(code *)PTR_safemalloc_000b2408)(1,4)" (parenthesized_expression "(*(code *)PTR_safemalloc_000b2408)" ( (pointer_expression "*(code *)PTR_safemalloc_000b2408" * (cast_expression "(code *)PTR_safemalloc_000b2408" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(1,4)" ( number_literal , number_literal ))))) ;) (expression_statement "puVar1 = PTR_s_acket_from_server___s_000b23a8;" (assignment_expression "puVar1 = PTR_s_acket_from_server___s_000b23a8" identifier = identifier) ;) (expression_statement "handler = (cchandler_fn_t)(PTR_LAB_000b2760 + 0x6e24);" (assignment_expression "handler = (cchandler_fn_t)(PTR_LAB_000b2760 + 0x6e24)" identifier = (call_expression "(cchandler_fn_t)(PTR_LAB_000b2760 + 0x6e24)" (parenthesized_expression "(cchandler_fn_t)" ( identifier )) (argument_list "(PTR_LAB_000b2760 + 0x6e24)" ( (binary_expression "PTR_LAB_000b2760 + 0x6e24" identifier + number_literal) )))) ;) (expression_statement "*ctx = newwin - (c->v).v2.locwindow;" (assignment_expression "*ctx = newwin - (c->v).v2.locwindow" (pointer_expression "*ctx" * identifier) = (binary_expression "newwin - (c->v).v2.locwindow" identifier - (field_expression "(c->v).v2.locwindow" (field_expression "(c->v).v2" (parenthesized_expression "(c->v)" ( (field_expression "c->v" identifier -> field_identifier) )) . field_identifier) . field_identifier))) ;) (expression_statement "pPVar3 = ssh2_chanreq_init(c,puVar1 + 0x646c,handler,ctx);" (assignment_expression "pPVar3 = ssh2_chanreq_init(c,puVar1 + 0x646c,handler,ctx)" identifier = (call_expression "ssh2_chanreq_init(c,puVar1 + 0x646c,handler,ctx)" identifier (argument_list "(c,puVar1 + 0x646c,handler,ctx)" ( identifier , (binary_expression "puVar1 + 0x646c" identifier + number_literal) , identifier , identifier )))) ;) (expression_statement "ssh2_pkt_send(ssh_00,pPVar3);" (call_expression "ssh2_pkt_send(ssh_00,pPVar3)" identifier (argument_list "(ssh_00,pPVar3)" ( identifier , identifier ))) ;) (if_statement "if ((c->v).v2.throttle_state != ADDRTYPE_IPV6) {\n      (c->v).v2.throttle_state = ADDRTYPE_IPV4;\n    }" if (parenthesized_expression "((c->v).v2.throttle_state != ADDRTYPE_IPV6)" ( (binary_expression "(c->v).v2.throttle_state != ADDRTYPE_IPV6" (field_expression "(c->v).v2.throttle_state" (field_expression "(c->v).v2" (parenthesized_expression "(c->v)" ( (field_expression "c->v" identifier -> field_identifier) )) . field_identifier) . field_identifier) != identifier) )) (compound_statement "{\n      (c->v).v2.throttle_state = ADDRTYPE_IPV4;\n    }" { (expression_statement "(c->v).v2.throttle_state = ADDRTYPE_IPV4;" (assignment_expression "(c->v).v2.throttle_state = ADDRTYPE_IPV4" (field_expression "(c->v).v2.throttle_state" (field_expression "(c->v).v2" (parenthesized_expression "(c->v)" ( (field_expression "c->v" identifier -> field_identifier) )) . field_identifier) . field_identifier) = identifier) ;) })) }) (else_clause "else {\n    (c->v).v2.remlocwin = newwin;\n    (c->v).v2.throttle_state = ADDRTYPE_UNSPEC;\n  }" else (compound_statement "{\n    (c->v).v2.remlocwin = newwin;\n    (c->v).v2.throttle_state = ADDRTYPE_UNSPEC;\n  }" { (expression_statement "(c->v).v2.remlocwin = newwin;" (assignment_expression "(c->v).v2.remlocwin = newwin" (field_expression "(c->v).v2.remlocwin" (field_expression "(c->v).v2" (parenthesized_expression "(c->v)" ( (field_expression "c->v" identifier -> field_identifier) )) . field_identifier) . field_identifier) = identifier) ;) (expression_statement "(c->v).v2.throttle_state = ADDRTYPE_UNSPEC;" (assignment_expression "(c->v).v2.throttle_state = ADDRTYPE_UNSPEC" (field_expression "(c->v).v2.throttle_state" (field_expression "(c->v).v2" (parenthesized_expression "(c->v)" ( (field_expression "c->v" identifier -> field_identifier) )) . field_identifier) . field_identifier) = identifier) ;) }))) (expression_statement "pPVar3 = ssh2_pkt_init(0x5d);" (assignment_expression "pPVar3 = ssh2_pkt_init(0x5d)" identifier = (call_expression "ssh2_pkt_init(0x5d)" identifier (argument_list "(0x5d)" ( number_literal )))) ;) comment (expression_statement "ssh_pkt_adduint32(pPVar3,c->remoteid);" (call_expression "ssh_pkt_adduint32(pPVar3,c->remoteid)" identifier (argument_list "(pPVar3,c->remoteid)" ( identifier , (field_expression "c->remoteid" identifier -> field_identifier) ))) ;) })))
(translation_unit "void FUN_00046aec(int *param_1,int param_2)\n\n{\n  undefined *puVar1;\n  int iVar2;\n  undefined4 uVar3;\n  int *piVar4;\n  uint uVar5;\n  undefined *puVar6;\n  int iVar7;\n  \n  if ((param_1[5] & 6U) != 0) {\n    return;\n  }\n  if (param_1[3] == 1) {\n    if (param_1[0x14] != 0) {\n      return;\n    }\n    iVar7 = *param_1;\n    uVar5 = *(uint *)(iVar7 + 0x50);\n    if ((uVar5 & 0x100) != 0) goto LAB_00046b5c;\n  }\n  else {\n    iVar7 = *param_1;\n    uVar5 = *(uint *)(iVar7 + 0x50);\n    iVar2 = param_2 >> 1;\n    if ((uVar5 & 0x100) == 0) goto LAB_00046b64;\nLAB_00046b5c:\n    if (0x4000 < param_2) {\n      param_2 = 0x4000;\n    }\n  }\n  iVar2 = param_2 >> 1;\nLAB_00046b64:\n  if (param_1[0xd] <= iVar2) {\n    if ((param_1[0xe] == param_2) && ((uVar5 & 0x400) == 0)) {\n      piVar4 = (int *)(*(code *)PTR_safemalloc_000b2408)(1,4);\n      puVar1 = PTR_s_acket_from_server___s_000b23a8;\n      puVar6 = PTR_LAB_000b2760 + 0x6e24;\n      *piVar4 = param_2 - param_1[0xd];\n      uVar3 = FUN_0003c380(param_1,puVar1 + 0x646c,puVar6,piVar4);\n      FUN_000463f8(iVar7,uVar3);\n      if (param_1[0x12] != 2) {\n        param_1[0x12] = 1;\n      }\n    }\n    else {\n      param_1[0xf] = param_2;\n      param_1[0x12] = 0;\n    }\n    uVar3 = FUN_0003b04c(0x5d);\n    FUN_0003b1cc(uVar3,param_1[1]);\n    FUN_0003b1cc(uVar3,param_2 - param_1[0xd]);\n    FUN_000463f8(iVar7,uVar3);\n    param_1[0xd] = param_2;\n  }\n  return;\n}\n\n" (function_definition "void FUN_00046aec(int *param_1,int param_2)\n\n{\n  undefined *puVar1;\n  int iVar2;\n  undefined4 uVar3;\n  int *piVar4;\n  uint uVar5;\n  undefined *puVar6;\n  int iVar7;\n  \n  if ((param_1[5] & 6U) != 0) {\n    return;\n  }\n  if (param_1[3] == 1) {\n    if (param_1[0x14] != 0) {\n      return;\n    }\n    iVar7 = *param_1;\n    uVar5 = *(uint *)(iVar7 + 0x50);\n    if ((uVar5 & 0x100) != 0) goto LAB_00046b5c;\n  }\n  else {\n    iVar7 = *param_1;\n    uVar5 = *(uint *)(iVar7 + 0x50);\n    iVar2 = param_2 >> 1;\n    if ((uVar5 & 0x100) == 0) goto LAB_00046b64;\nLAB_00046b5c:\n    if (0x4000 < param_2) {\n      param_2 = 0x4000;\n    }\n  }\n  iVar2 = param_2 >> 1;\nLAB_00046b64:\n  if (param_1[0xd] <= iVar2) {\n    if ((param_1[0xe] == param_2) && ((uVar5 & 0x400) == 0)) {\n      piVar4 = (int *)(*(code *)PTR_safemalloc_000b2408)(1,4);\n      puVar1 = PTR_s_acket_from_server___s_000b23a8;\n      puVar6 = PTR_LAB_000b2760 + 0x6e24;\n      *piVar4 = param_2 - param_1[0xd];\n      uVar3 = FUN_0003c380(param_1,puVar1 + 0x646c,puVar6,piVar4);\n      FUN_000463f8(iVar7,uVar3);\n      if (param_1[0x12] != 2) {\n        param_1[0x12] = 1;\n      }\n    }\n    else {\n      param_1[0xf] = param_2;\n      param_1[0x12] = 0;\n    }\n    uVar3 = FUN_0003b04c(0x5d);\n    FUN_0003b1cc(uVar3,param_1[1]);\n    FUN_0003b1cc(uVar3,param_2 - param_1[0xd]);\n    FUN_000463f8(iVar7,uVar3);\n    param_1[0xd] = param_2;\n  }\n  return;\n}" primitive_type (function_declarator "FUN_00046aec(int *param_1,int param_2)" identifier (parameter_list "(int *param_1,int param_2)" ( (parameter_declaration "int *param_1" primitive_type (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "int param_2" primitive_type identifier) ))) (compound_statement "{\n  undefined *puVar1;\n  int iVar2;\n  undefined4 uVar3;\n  int *piVar4;\n  uint uVar5;\n  undefined *puVar6;\n  int iVar7;\n  \n  if ((param_1[5] & 6U) != 0) {\n    return;\n  }\n  if (param_1[3] == 1) {\n    if (param_1[0x14] != 0) {\n      return;\n    }\n    iVar7 = *param_1;\n    uVar5 = *(uint *)(iVar7 + 0x50);\n    if ((uVar5 & 0x100) != 0) goto LAB_00046b5c;\n  }\n  else {\n    iVar7 = *param_1;\n    uVar5 = *(uint *)(iVar7 + 0x50);\n    iVar2 = param_2 >> 1;\n    if ((uVar5 & 0x100) == 0) goto LAB_00046b64;\nLAB_00046b5c:\n    if (0x4000 < param_2) {\n      param_2 = 0x4000;\n    }\n  }\n  iVar2 = param_2 >> 1;\nLAB_00046b64:\n  if (param_1[0xd] <= iVar2) {\n    if ((param_1[0xe] == param_2) && ((uVar5 & 0x400) == 0)) {\n      piVar4 = (int *)(*(code *)PTR_safemalloc_000b2408)(1,4);\n      puVar1 = PTR_s_acket_from_server___s_000b23a8;\n      puVar6 = PTR_LAB_000b2760 + 0x6e24;\n      *piVar4 = param_2 - param_1[0xd];\n      uVar3 = FUN_0003c380(param_1,puVar1 + 0x646c,puVar6,piVar4);\n      FUN_000463f8(iVar7,uVar3);\n      if (param_1[0x12] != 2) {\n        param_1[0x12] = 1;\n      }\n    }\n    else {\n      param_1[0xf] = param_2;\n      param_1[0x12] = 0;\n    }\n    uVar3 = FUN_0003b04c(0x5d);\n    FUN_0003b1cc(uVar3,param_1[1]);\n    FUN_0003b1cc(uVar3,param_2 - param_1[0xd]);\n    FUN_000463f8(iVar7,uVar3);\n    param_1[0xd] = param_2;\n  }\n  return;\n}" { (declaration "undefined *puVar1;" type_identifier (pointer_declarator "*puVar1" * identifier) ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "undefined4 uVar3;" type_identifier identifier ;) (declaration "int *piVar4;" primitive_type (pointer_declarator "*piVar4" * identifier) ;) (declaration "uint uVar5;" type_identifier identifier ;) (declaration "undefined *puVar6;" type_identifier (pointer_declarator "*puVar6" * identifier) ;) (declaration "int iVar7;" primitive_type identifier ;) (if_statement "if ((param_1[5] & 6U) != 0) {\n    return;\n  }" if (parenthesized_expression "((param_1[5] & 6U) != 0)" ( (binary_expression "(param_1[5] & 6U) != 0" (parenthesized_expression "(param_1[5] & 6U)" ( (binary_expression "param_1[5] & 6U" (subscript_expression "param_1[5]" identifier [ number_literal ]) & number_literal) )) != number_literal) )) (compound_statement "{\n    return;\n  }" { (return_statement "return;" return ;) })) (if_statement "if (param_1[3] == 1) {\n    if (param_1[0x14] != 0) {\n      return;\n    }\n    iVar7 = *param_1;\n    uVar5 = *(uint *)(iVar7 + 0x50);\n    if ((uVar5 & 0x100) != 0) goto LAB_00046b5c;\n  }\n  else {\n    iVar7 = *param_1;\n    uVar5 = *(uint *)(iVar7 + 0x50);\n    iVar2 = param_2 >> 1;\n    if ((uVar5 & 0x100) == 0) goto LAB_00046b64;\nLAB_00046b5c:\n    if (0x4000 < param_2) {\n      param_2 = 0x4000;\n    }\n  }" if (parenthesized_expression "(param_1[3] == 1)" ( (binary_expression "param_1[3] == 1" (subscript_expression "param_1[3]" identifier [ number_literal ]) == number_literal) )) (compound_statement "{\n    if (param_1[0x14] != 0) {\n      return;\n    }\n    iVar7 = *param_1;\n    uVar5 = *(uint *)(iVar7 + 0x50);\n    if ((uVar5 & 0x100) != 0) goto LAB_00046b5c;\n  }" { (if_statement "if (param_1[0x14] != 0) {\n      return;\n    }" if (parenthesized_expression "(param_1[0x14] != 0)" ( (binary_expression "param_1[0x14] != 0" (subscript_expression "param_1[0x14]" identifier [ number_literal ]) != number_literal) )) (compound_statement "{\n      return;\n    }" { (return_statement "return;" return ;) })) (expression_statement "iVar7 = *param_1;" (assignment_expression "iVar7 = *param_1" identifier = (pointer_expression "*param_1" * identifier)) ;) (expression_statement "uVar5 = *(uint *)(iVar7 + 0x50);" (assignment_expression "uVar5 = *(uint *)(iVar7 + 0x50)" identifier = (pointer_expression "*(uint *)(iVar7 + 0x50)" * (cast_expression "(uint *)(iVar7 + 0x50)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar7 + 0x50)" ( (binary_expression "iVar7 + 0x50" identifier + number_literal) ))))) ;) (if_statement "if ((uVar5 & 0x100) != 0) goto LAB_00046b5c;" if (parenthesized_expression "((uVar5 & 0x100) != 0)" ( (binary_expression "(uVar5 & 0x100) != 0" (parenthesized_expression "(uVar5 & 0x100)" ( (binary_expression "uVar5 & 0x100" identifier & number_literal) )) != number_literal) )) (goto_statement "goto LAB_00046b5c;" goto statement_identifier ;)) }) (else_clause "else {\n    iVar7 = *param_1;\n    uVar5 = *(uint *)(iVar7 + 0x50);\n    iVar2 = param_2 >> 1;\n    if ((uVar5 & 0x100) == 0) goto LAB_00046b64;\nLAB_00046b5c:\n    if (0x4000 < param_2) {\n      param_2 = 0x4000;\n    }\n  }" else (compound_statement "{\n    iVar7 = *param_1;\n    uVar5 = *(uint *)(iVar7 + 0x50);\n    iVar2 = param_2 >> 1;\n    if ((uVar5 & 0x100) == 0) goto LAB_00046b64;\nLAB_00046b5c:\n    if (0x4000 < param_2) {\n      param_2 = 0x4000;\n    }\n  }" { (expression_statement "iVar7 = *param_1;" (assignment_expression "iVar7 = *param_1" identifier = (pointer_expression "*param_1" * identifier)) ;) (expression_statement "uVar5 = *(uint *)(iVar7 + 0x50);" (assignment_expression "uVar5 = *(uint *)(iVar7 + 0x50)" identifier = (pointer_expression "*(uint *)(iVar7 + 0x50)" * (cast_expression "(uint *)(iVar7 + 0x50)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar7 + 0x50)" ( (binary_expression "iVar7 + 0x50" identifier + number_literal) ))))) ;) (expression_statement "iVar2 = param_2 >> 1;" (assignment_expression "iVar2 = param_2 >> 1" identifier = (binary_expression "param_2 >> 1" identifier >> number_literal)) ;) (if_statement "if ((uVar5 & 0x100) == 0) goto LAB_00046b64;" if (parenthesized_expression "((uVar5 & 0x100) == 0)" ( (binary_expression "(uVar5 & 0x100) == 0" (parenthesized_expression "(uVar5 & 0x100)" ( (binary_expression "uVar5 & 0x100" identifier & number_literal) )) == number_literal) )) (goto_statement "goto LAB_00046b64;" goto statement_identifier ;)) (labeled_statement "LAB_00046b5c:\n    if (0x4000 < param_2) {\n      param_2 = 0x4000;\n    }" statement_identifier : (if_statement "if (0x4000 < param_2) {\n      param_2 = 0x4000;\n    }" if (parenthesized_expression "(0x4000 < param_2)" ( (binary_expression "0x4000 < param_2" number_literal < identifier) )) (compound_statement "{\n      param_2 = 0x4000;\n    }" { (expression_statement "param_2 = 0x4000;" (assignment_expression "param_2 = 0x4000" identifier = number_literal) ;) }))) }))) (expression_statement "iVar2 = param_2 >> 1;" (assignment_expression "iVar2 = param_2 >> 1" identifier = (binary_expression "param_2 >> 1" identifier >> number_literal)) ;) (labeled_statement "LAB_00046b64:\n  if (param_1[0xd] <= iVar2) {\n    if ((param_1[0xe] == param_2) && ((uVar5 & 0x400) == 0)) {\n      piVar4 = (int *)(*(code *)PTR_safemalloc_000b2408)(1,4);\n      puVar1 = PTR_s_acket_from_server___s_000b23a8;\n      puVar6 = PTR_LAB_000b2760 + 0x6e24;\n      *piVar4 = param_2 - param_1[0xd];\n      uVar3 = FUN_0003c380(param_1,puVar1 + 0x646c,puVar6,piVar4);\n      FUN_000463f8(iVar7,uVar3);\n      if (param_1[0x12] != 2) {\n        param_1[0x12] = 1;\n      }\n    }\n    else {\n      param_1[0xf] = param_2;\n      param_1[0x12] = 0;\n    }\n    uVar3 = FUN_0003b04c(0x5d);\n    FUN_0003b1cc(uVar3,param_1[1]);\n    FUN_0003b1cc(uVar3,param_2 - param_1[0xd]);\n    FUN_000463f8(iVar7,uVar3);\n    param_1[0xd] = param_2;\n  }" statement_identifier : (if_statement "if (param_1[0xd] <= iVar2) {\n    if ((param_1[0xe] == param_2) && ((uVar5 & 0x400) == 0)) {\n      piVar4 = (int *)(*(code *)PTR_safemalloc_000b2408)(1,4);\n      puVar1 = PTR_s_acket_from_server___s_000b23a8;\n      puVar6 = PTR_LAB_000b2760 + 0x6e24;\n      *piVar4 = param_2 - param_1[0xd];\n      uVar3 = FUN_0003c380(param_1,puVar1 + 0x646c,puVar6,piVar4);\n      FUN_000463f8(iVar7,uVar3);\n      if (param_1[0x12] != 2) {\n        param_1[0x12] = 1;\n      }\n    }\n    else {\n      param_1[0xf] = param_2;\n      param_1[0x12] = 0;\n    }\n    uVar3 = FUN_0003b04c(0x5d);\n    FUN_0003b1cc(uVar3,param_1[1]);\n    FUN_0003b1cc(uVar3,param_2 - param_1[0xd]);\n    FUN_000463f8(iVar7,uVar3);\n    param_1[0xd] = param_2;\n  }" if (parenthesized_expression "(param_1[0xd] <= iVar2)" ( (binary_expression "param_1[0xd] <= iVar2" (subscript_expression "param_1[0xd]" identifier [ number_literal ]) <= identifier) )) (compound_statement "{\n    if ((param_1[0xe] == param_2) && ((uVar5 & 0x400) == 0)) {\n      piVar4 = (int *)(*(code *)PTR_safemalloc_000b2408)(1,4);\n      puVar1 = PTR_s_acket_from_server___s_000b23a8;\n      puVar6 = PTR_LAB_000b2760 + 0x6e24;\n      *piVar4 = param_2 - param_1[0xd];\n      uVar3 = FUN_0003c380(param_1,puVar1 + 0x646c,puVar6,piVar4);\n      FUN_000463f8(iVar7,uVar3);\n      if (param_1[0x12] != 2) {\n        param_1[0x12] = 1;\n      }\n    }\n    else {\n      param_1[0xf] = param_2;\n      param_1[0x12] = 0;\n    }\n    uVar3 = FUN_0003b04c(0x5d);\n    FUN_0003b1cc(uVar3,param_1[1]);\n    FUN_0003b1cc(uVar3,param_2 - param_1[0xd]);\n    FUN_000463f8(iVar7,uVar3);\n    param_1[0xd] = param_2;\n  }" { (if_statement "if ((param_1[0xe] == param_2) && ((uVar5 & 0x400) == 0)) {\n      piVar4 = (int *)(*(code *)PTR_safemalloc_000b2408)(1,4);\n      puVar1 = PTR_s_acket_from_server___s_000b23a8;\n      puVar6 = PTR_LAB_000b2760 + 0x6e24;\n      *piVar4 = param_2 - param_1[0xd];\n      uVar3 = FUN_0003c380(param_1,puVar1 + 0x646c,puVar6,piVar4);\n      FUN_000463f8(iVar7,uVar3);\n      if (param_1[0x12] != 2) {\n        param_1[0x12] = 1;\n      }\n    }\n    else {\n      param_1[0xf] = param_2;\n      param_1[0x12] = 0;\n    }" if (parenthesized_expression "((param_1[0xe] == param_2) && ((uVar5 & 0x400) == 0))" ( (binary_expression "(param_1[0xe] == param_2) && ((uVar5 & 0x400) == 0)" (parenthesized_expression "(param_1[0xe] == param_2)" ( (binary_expression "param_1[0xe] == param_2" (subscript_expression "param_1[0xe]" identifier [ number_literal ]) == identifier) )) && (parenthesized_expression "((uVar5 & 0x400) == 0)" ( (binary_expression "(uVar5 & 0x400) == 0" (parenthesized_expression "(uVar5 & 0x400)" ( (binary_expression "uVar5 & 0x400" identifier & number_literal) )) == number_literal) ))) )) (compound_statement "{\n      piVar4 = (int *)(*(code *)PTR_safemalloc_000b2408)(1,4);\n      puVar1 = PTR_s_acket_from_server___s_000b23a8;\n      puVar6 = PTR_LAB_000b2760 + 0x6e24;\n      *piVar4 = param_2 - param_1[0xd];\n      uVar3 = FUN_0003c380(param_1,puVar1 + 0x646c,puVar6,piVar4);\n      FUN_000463f8(iVar7,uVar3);\n      if (param_1[0x12] != 2) {\n        param_1[0x12] = 1;\n      }\n    }" { (expression_statement "piVar4 = (int *)(*(code *)PTR_safemalloc_000b2408)(1,4);" (assignment_expression "piVar4 = (int *)(*(code *)PTR_safemalloc_000b2408)(1,4)" identifier = (cast_expression "(int *)(*(code *)PTR_safemalloc_000b2408)(1,4)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "(*(code *)PTR_safemalloc_000b2408)(1,4)" (parenthesized_expression "(*(code *)PTR_safemalloc_000b2408)" ( (pointer_expression "*(code *)PTR_safemalloc_000b2408" * (cast_expression "(code *)PTR_safemalloc_000b2408" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(1,4)" ( number_literal , number_literal ))))) ;) (expression_statement "puVar1 = PTR_s_acket_from_server___s_000b23a8;" (assignment_expression "puVar1 = PTR_s_acket_from_server___s_000b23a8" identifier = identifier) ;) (expression_statement "puVar6 = PTR_LAB_000b2760 + 0x6e24;" (assignment_expression "puVar6 = PTR_LAB_000b2760 + 0x6e24" identifier = (binary_expression "PTR_LAB_000b2760 + 0x6e24" identifier + number_literal)) ;) (expression_statement "*piVar4 = param_2 - param_1[0xd];" (assignment_expression "*piVar4 = param_2 - param_1[0xd]" (pointer_expression "*piVar4" * identifier) = (binary_expression "param_2 - param_1[0xd]" identifier - (subscript_expression "param_1[0xd]" identifier [ number_literal ]))) ;) (expression_statement "uVar3 = FUN_0003c380(param_1,puVar1 + 0x646c,puVar6,piVar4);" (assignment_expression "uVar3 = FUN_0003c380(param_1,puVar1 + 0x646c,puVar6,piVar4)" identifier = (call_expression "FUN_0003c380(param_1,puVar1 + 0x646c,puVar6,piVar4)" identifier (argument_list "(param_1,puVar1 + 0x646c,puVar6,piVar4)" ( identifier , (binary_expression "puVar1 + 0x646c" identifier + number_literal) , identifier , identifier )))) ;) (expression_statement "FUN_000463f8(iVar7,uVar3);" (call_expression "FUN_000463f8(iVar7,uVar3)" identifier (argument_list "(iVar7,uVar3)" ( identifier , identifier ))) ;) (if_statement "if (param_1[0x12] != 2) {\n        param_1[0x12] = 1;\n      }" if (parenthesized_expression "(param_1[0x12] != 2)" ( (binary_expression "param_1[0x12] != 2" (subscript_expression "param_1[0x12]" identifier [ number_literal ]) != number_literal) )) (compound_statement "{\n        param_1[0x12] = 1;\n      }" { (expression_statement "param_1[0x12] = 1;" (assignment_expression "param_1[0x12] = 1" (subscript_expression "param_1[0x12]" identifier [ number_literal ]) = number_literal) ;) })) }) (else_clause "else {\n      param_1[0xf] = param_2;\n      param_1[0x12] = 0;\n    }" else (compound_statement "{\n      param_1[0xf] = param_2;\n      param_1[0x12] = 0;\n    }" { (expression_statement "param_1[0xf] = param_2;" (assignment_expression "param_1[0xf] = param_2" (subscript_expression "param_1[0xf]" identifier [ number_literal ]) = identifier) ;) (expression_statement "param_1[0x12] = 0;" (assignment_expression "param_1[0x12] = 0" (subscript_expression "param_1[0x12]" identifier [ number_literal ]) = number_literal) ;) }))) (expression_statement "uVar3 = FUN_0003b04c(0x5d);" (assignment_expression "uVar3 = FUN_0003b04c(0x5d)" identifier = (call_expression "FUN_0003b04c(0x5d)" identifier (argument_list "(0x5d)" ( number_literal )))) ;) (expression_statement "FUN_0003b1cc(uVar3,param_1[1]);" (call_expression "FUN_0003b1cc(uVar3,param_1[1])" identifier (argument_list "(uVar3,param_1[1])" ( identifier , (subscript_expression "param_1[1]" identifier [ number_literal ]) ))) ;) (expression_statement "FUN_0003b1cc(uVar3,param_2 - param_1[0xd]);" (call_expression "FUN_0003b1cc(uVar3,param_2 - param_1[0xd])" identifier (argument_list "(uVar3,param_2 - param_1[0xd])" ( identifier , (binary_expression "param_2 - param_1[0xd]" identifier - (subscript_expression "param_1[0xd]" identifier [ number_literal ])) ))) ;) (expression_statement "FUN_000463f8(iVar7,uVar3);" (call_expression "FUN_000463f8(iVar7,uVar3)" identifier (argument_list "(iVar7,uVar3)" ( identifier , identifier ))) ;) (expression_statement "param_1[0xd] = param_2;" (assignment_expression "param_1[0xd] = param_2" (subscript_expression "param_1[0xd]" identifier [ number_literal ]) = identifier) ;) }))) (return_statement "return;" return ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE (pointer_declarator * IDENT)) , (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression (subscript_expression IDENT [ LIT ]) & LIT) )) != LIT) )) (compound_statement { (return_statement return ;) })) (if_statement if (parenthesized_expression ( (binary_expression (subscript_expression IDENT [ LIT ]) == LIT) )) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression (subscript_expression IDENT [ LIT ]) != LIT) )) (compound_statement { (return_statement return ;) })) (expression_statement (assignment_expression IDENT = (pointer_expression * IDENT)) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT & LIT) )) != LIT) )) (goto_statement goto statement_identifier ;)) }) (else_clause else (compound_statement { (expression_statement (assignment_expression IDENT = (pointer_expression * IDENT)) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT >> LIT)) ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT & LIT) )) == LIT) )) (goto_statement goto statement_identifier ;)) (labeled_statement statement_identifier : (if_statement if (parenthesized_expression ( (binary_expression LIT < IDENT) )) (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) }))) }))) (expression_statement (assignment_expression IDENT = (binary_expression IDENT >> LIT)) ;) (labeled_statement statement_identifier : (if_statement if (parenthesized_expression ( (binary_expression (subscript_expression IDENT [ LIT ]) <= IDENT) )) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression (subscript_expression IDENT [ LIT ]) == IDENT) )) && (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT & LIT) )) == LIT) ))) )) (compound_statement { (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( LIT , LIT ))))) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = (binary_expression IDENT - (subscript_expression IDENT [ LIT ]))) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , (binary_expression IDENT + LIT) , IDENT , IDENT )))) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT , IDENT ))) ;) (if_statement if (parenthesized_expression ( (binary_expression (subscript_expression IDENT [ LIT ]) != LIT) )) (compound_statement { (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = LIT) ;) })) }) (else_clause else (compound_statement { (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = IDENT) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = LIT) ;) }))) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( LIT )))) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT , (subscript_expression IDENT [ LIT ]) ))) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT , (binary_expression IDENT - (subscript_expression IDENT [ LIT ])) ))) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT , IDENT ))) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = IDENT) ;) }))) (return_statement return ;) })))
(function_definition "void FUN_00046aec(int *param_1,int param_2)\n\n{\n  undefined *puVar1;\n  int iVar2;\n  undefined4 uVar3;\n  int *piVar4;\n  uint uVar5;\n  undefined *puVar6;\n  int iVar7;\n  \n  if ((param_1[5] & 6U) != 0) {\n    return;\n  }\n  if (param_1[3] == 1) {\n    if (param_1[0x14] != 0) {\n      return;\n    }\n    iVar7 = *param_1;\n    uVar5 = *(uint *)(iVar7 + 0x50);\n    if ((uVar5 & 0x100) != 0) goto LAB_00046b5c;\n  }\n  else {\n    iVar7 = *param_1;\n    uVar5 = *(uint *)(iVar7 + 0x50);\n    iVar2 = param_2 >> 1;\n    if ((uVar5 & 0x100) == 0) goto LAB_00046b64;\nLAB_00046b5c:\n    if (0x4000 < param_2) {\n      param_2 = 0x4000;\n    }\n  }\n  iVar2 = param_2 >> 1;\nLAB_00046b64:\n  if (param_1[0xd] <= iVar2) {\n    if ((param_1[0xe] == param_2) && ((uVar5 & 0x400) == 0)) {\n      piVar4 = (int *)(*(code *)PTR_safemalloc_000b2408)(1,4);\n      puVar1 = PTR_s_acket_from_server___s_000b23a8;\n      puVar6 = PTR_LAB_000b2760 + 0x6e24;\n      *piVar4 = param_2 - param_1[0xd];\n      uVar3 = FUN_0003c380(param_1,puVar1 + 0x646c,puVar6,piVar4);\n      FUN_000463f8(iVar7,uVar3);\n      if (param_1[0x12] != 2) {\n        param_1[0x12] = 1;\n      }\n    }\n    else {\n      param_1[0xf] = param_2;\n      param_1[0x12] = 0;\n    }\n    uVar3 = FUN_0003b04c(0x5d);\n    FUN_0003b1cc(uVar3,param_1[1]);\n    FUN_0003b1cc(uVar3,param_2 - param_1[0xd]);\n    FUN_000463f8(iVar7,uVar3);\n    param_1[0xd] = param_2;\n  }\n  return;\n}" (primitive_type "void") (function_declarator "FUN_00046aec(int *param_1,int param_2)" (identifier "FUN_00046aec") (parameter_list "(int *param_1,int param_2)" (( "(") (parameter_declaration "int *param_1" (primitive_type "int") (pointer_declarator "*param_1" (* "*") (identifier "param_1"))) (, ",") (parameter_declaration "int param_2" (primitive_type "int") (identifier "param_2")) () ")"))) (compound_statement "{\n  undefined *puVar1;\n  int iVar2;\n  undefined4 uVar3;\n  int *piVar4;\n  uint uVar5;\n  undefined *puVar6;\n  int iVar7;\n  \n  if ((param_1[5] & 6U) != 0) {\n    return;\n  }\n  if (param_1[3] == 1) {\n    if (param_1[0x14] != 0) {\n      return;\n    }\n    iVar7 = *param_1;\n    uVar5 = *(uint *)(iVar7 + 0x50);\n    if ((uVar5 & 0x100) != 0) goto LAB_00046b5c;\n  }\n  else {\n    iVar7 = *param_1;\n    uVar5 = *(uint *)(iVar7 + 0x50);\n    iVar2 = param_2 >> 1;\n    if ((uVar5 & 0x100) == 0) goto LAB_00046b64;\nLAB_00046b5c:\n    if (0x4000 < param_2) {\n      param_2 = 0x4000;\n    }\n  }\n  iVar2 = param_2 >> 1;\nLAB_00046b64:\n  if (param_1[0xd] <= iVar2) {\n    if ((param_1[0xe] == param_2) && ((uVar5 & 0x400) == 0)) {\n      piVar4 = (int *)(*(code *)PTR_safemalloc_000b2408)(1,4);\n      puVar1 = PTR_s_acket_from_server___s_000b23a8;\n      puVar6 = PTR_LAB_000b2760 + 0x6e24;\n      *piVar4 = param_2 - param_1[0xd];\n      uVar3 = FUN_0003c380(param_1,puVar1 + 0x646c,puVar6,piVar4);\n      FUN_000463f8(iVar7,uVar3);\n      if (param_1[0x12] != 2) {\n        param_1[0x12] = 1;\n      }\n    }\n    else {\n      param_1[0xf] = param_2;\n      param_1[0x12] = 0;\n    }\n    uVar3 = FUN_0003b04c(0x5d);\n    FUN_0003b1cc(uVar3,param_1[1]);\n    FUN_0003b1cc(uVar3,param_2 - param_1[0xd]);\n    FUN_000463f8(iVar7,uVar3);\n    param_1[0xd] = param_2;\n  }\n  return;\n}" ({ "{") (declaration "undefined *puVar1;" (type_identifier "undefined") (pointer_declarator "*puVar1" (* "*") (identifier "puVar1")) (; ";")) (declaration "int iVar2;" (primitive_type "int") (identifier "iVar2") (; ";")) (declaration "undefined4 uVar3;" (type_identifier "undefined4") (identifier "uVar3") (; ";")) (declaration "int *piVar4;" (primitive_type "int") (pointer_declarator "*piVar4" (* "*") (identifier "piVar4")) (; ";")) (declaration "uint uVar5;" (type_identifier "uint") (identifier "uVar5") (; ";")) (declaration "undefined *puVar6;" (type_identifier "undefined") (pointer_declarator "*puVar6" (* "*") (identifier "puVar6")) (; ";")) (declaration "int iVar7;" (primitive_type "int") (identifier "iVar7") (; ";")) (if_statement "if ((param_1[5] & 6U) != 0) {\n    return;\n  }" (if "if") (parenthesized_expression "((param_1[5] & 6U) != 0)" (( "(") (binary_expression "(param_1[5] & 6U) != 0" (parenthesized_expression "(param_1[5] & 6U)" (( "(") (binary_expression "param_1[5] & 6U" (subscript_expression "param_1[5]" (identifier "param_1") ([ "[") (number_literal "5") (] "]")) (& "&") (number_literal "6U")) () ")")) (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n    return;\n  }" ({ "{") (return_statement "return;" (return "return") (; ";")) (} "}"))) (if_statement "if (param_1[3] == 1) {\n    if (param_1[0x14] != 0) {\n      return;\n    }\n    iVar7 = *param_1;\n    uVar5 = *(uint *)(iVar7 + 0x50);\n    if ((uVar5 & 0x100) != 0) goto LAB_00046b5c;\n  }\n  else {\n    iVar7 = *param_1;\n    uVar5 = *(uint *)(iVar7 + 0x50);\n    iVar2 = param_2 >> 1;\n    if ((uVar5 & 0x100) == 0) goto LAB_00046b64;\nLAB_00046b5c:\n    if (0x4000 < param_2) {\n      param_2 = 0x4000;\n    }\n  }" (if "if") (parenthesized_expression "(param_1[3] == 1)" (( "(") (binary_expression "param_1[3] == 1" (subscript_expression "param_1[3]" (identifier "param_1") ([ "[") (number_literal "3") (] "]")) (== "==") (number_literal "1")) () ")")) (compound_statement "{\n    if (param_1[0x14] != 0) {\n      return;\n    }\n    iVar7 = *param_1;\n    uVar5 = *(uint *)(iVar7 + 0x50);\n    if ((uVar5 & 0x100) != 0) goto LAB_00046b5c;\n  }" ({ "{") (if_statement "if (param_1[0x14] != 0) {\n      return;\n    }" (if "if") (parenthesized_expression "(param_1[0x14] != 0)" (( "(") (binary_expression "param_1[0x14] != 0" (subscript_expression "param_1[0x14]" (identifier "param_1") ([ "[") (number_literal "0x14") (] "]")) (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n      return;\n    }" ({ "{") (return_statement "return;" (return "return") (; ";")) (} "}"))) (expression_statement "iVar7 = *param_1;" (assignment_expression "iVar7 = *param_1" (identifier "iVar7") (= "=") (pointer_expression "*param_1" (* "*") (identifier "param_1"))) (; ";")) (expression_statement "uVar5 = *(uint *)(iVar7 + 0x50);" (assignment_expression "uVar5 = *(uint *)(iVar7 + 0x50)" (identifier "uVar5") (= "=") (pointer_expression "*(uint *)(iVar7 + 0x50)" (* "*") (cast_expression "(uint *)(iVar7 + 0x50)" (( "(") (type_descriptor "uint *" (type_identifier "uint") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar7 + 0x50)" (( "(") (binary_expression "iVar7 + 0x50" (identifier "iVar7") (+ "+") (number_literal "0x50")) () ")"))))) (; ";")) (if_statement "if ((uVar5 & 0x100) != 0) goto LAB_00046b5c;" (if "if") (parenthesized_expression "((uVar5 & 0x100) != 0)" (( "(") (binary_expression "(uVar5 & 0x100) != 0" (parenthesized_expression "(uVar5 & 0x100)" (( "(") (binary_expression "uVar5 & 0x100" (identifier "uVar5") (& "&") (number_literal "0x100")) () ")")) (!= "!=") (number_literal "0")) () ")")) (goto_statement "goto LAB_00046b5c;" (goto "goto") (statement_identifier "LAB_00046b5c") (; ";"))) (} "}")) (else_clause "else {\n    iVar7 = *param_1;\n    uVar5 = *(uint *)(iVar7 + 0x50);\n    iVar2 = param_2 >> 1;\n    if ((uVar5 & 0x100) == 0) goto LAB_00046b64;\nLAB_00046b5c:\n    if (0x4000 < param_2) {\n      param_2 = 0x4000;\n    }\n  }" (else "else") (compound_statement "{\n    iVar7 = *param_1;\n    uVar5 = *(uint *)(iVar7 + 0x50);\n    iVar2 = param_2 >> 1;\n    if ((uVar5 & 0x100) == 0) goto LAB_00046b64;\nLAB_00046b5c:\n    if (0x4000 < param_2) {\n      param_2 = 0x4000;\n    }\n  }" ({ "{") (expression_statement "iVar7 = *param_1;" (assignment_expression "iVar7 = *param_1" (identifier "iVar7") (= "=") (pointer_expression "*param_1" (* "*") (identifier "param_1"))) (; ";")) (expression_statement "uVar5 = *(uint *)(iVar7 + 0x50);" (assignment_expression "uVar5 = *(uint *)(iVar7 + 0x50)" (identifier "uVar5") (= "=") (pointer_expression "*(uint *)(iVar7 + 0x50)" (* "*") (cast_expression "(uint *)(iVar7 + 0x50)" (( "(") (type_descriptor "uint *" (type_identifier "uint") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar7 + 0x50)" (( "(") (binary_expression "iVar7 + 0x50" (identifier "iVar7") (+ "+") (number_literal "0x50")) () ")"))))) (; ";")) (expression_statement "iVar2 = param_2 >> 1;" (assignment_expression "iVar2 = param_2 >> 1" (identifier "iVar2") (= "=") (binary_expression "param_2 >> 1" (identifier "param_2") (>> ">>") (number_literal "1"))) (; ";")) (if_statement "if ((uVar5 & 0x100) == 0) goto LAB_00046b64;" (if "if") (parenthesized_expression "((uVar5 & 0x100) == 0)" (( "(") (binary_expression "(uVar5 & 0x100) == 0" (parenthesized_expression "(uVar5 & 0x100)" (( "(") (binary_expression "uVar5 & 0x100" (identifier "uVar5") (& "&") (number_literal "0x100")) () ")")) (== "==") (number_literal "0")) () ")")) (goto_statement "goto LAB_00046b64;" (goto "goto") (statement_identifier "LAB_00046b64") (; ";"))) (labeled_statement "LAB_00046b5c:\n    if (0x4000 < param_2) {\n      param_2 = 0x4000;\n    }" (statement_identifier "LAB_00046b5c") (: ":") (if_statement "if (0x4000 < param_2) {\n      param_2 = 0x4000;\n    }" (if "if") (parenthesized_expression "(0x4000 < param_2)" (( "(") (binary_expression "0x4000 < param_2" (number_literal "0x4000") (< "<") (identifier "param_2")) () ")")) (compound_statement "{\n      param_2 = 0x4000;\n    }" ({ "{") (expression_statement "param_2 = 0x4000;" (assignment_expression "param_2 = 0x4000" (identifier "param_2") (= "=") (number_literal "0x4000")) (; ";")) (} "}")))) (} "}")))) (expression_statement "iVar2 = param_2 >> 1;" (assignment_expression "iVar2 = param_2 >> 1" (identifier "iVar2") (= "=") (binary_expression "param_2 >> 1" (identifier "param_2") (>> ">>") (number_literal "1"))) (; ";")) (labeled_statement "LAB_00046b64:\n  if (param_1[0xd] <= iVar2) {\n    if ((param_1[0xe] == param_2) && ((uVar5 & 0x400) == 0)) {\n      piVar4 = (int *)(*(code *)PTR_safemalloc_000b2408)(1,4);\n      puVar1 = PTR_s_acket_from_server___s_000b23a8;\n      puVar6 = PTR_LAB_000b2760 + 0x6e24;\n      *piVar4 = param_2 - param_1[0xd];\n      uVar3 = FUN_0003c380(param_1,puVar1 + 0x646c,puVar6,piVar4);\n      FUN_000463f8(iVar7,uVar3);\n      if (param_1[0x12] != 2) {\n        param_1[0x12] = 1;\n      }\n    }\n    else {\n      param_1[0xf] = param_2;\n      param_1[0x12] = 0;\n    }\n    uVar3 = FUN_0003b04c(0x5d);\n    FUN_0003b1cc(uVar3,param_1[1]);\n    FUN_0003b1cc(uVar3,param_2 - param_1[0xd]);\n    FUN_000463f8(iVar7,uVar3);\n    param_1[0xd] = param_2;\n  }" (statement_identifier "LAB_00046b64") (: ":") (if_statement "if (param_1[0xd] <= iVar2) {\n    if ((param_1[0xe] == param_2) && ((uVar5 & 0x400) == 0)) {\n      piVar4 = (int *)(*(code *)PTR_safemalloc_000b2408)(1,4);\n      puVar1 = PTR_s_acket_from_server___s_000b23a8;\n      puVar6 = PTR_LAB_000b2760 + 0x6e24;\n      *piVar4 = param_2 - param_1[0xd];\n      uVar3 = FUN_0003c380(param_1,puVar1 + 0x646c,puVar6,piVar4);\n      FUN_000463f8(iVar7,uVar3);\n      if (param_1[0x12] != 2) {\n        param_1[0x12] = 1;\n      }\n    }\n    else {\n      param_1[0xf] = param_2;\n      param_1[0x12] = 0;\n    }\n    uVar3 = FUN_0003b04c(0x5d);\n    FUN_0003b1cc(uVar3,param_1[1]);\n    FUN_0003b1cc(uVar3,param_2 - param_1[0xd]);\n    FUN_000463f8(iVar7,uVar3);\n    param_1[0xd] = param_2;\n  }" (if "if") (parenthesized_expression "(param_1[0xd] <= iVar2)" (( "(") (binary_expression "param_1[0xd] <= iVar2" (subscript_expression "param_1[0xd]" (identifier "param_1") ([ "[") (number_literal "0xd") (] "]")) (<= "<=") (identifier "iVar2")) () ")")) (compound_statement "{\n    if ((param_1[0xe] == param_2) && ((uVar5 & 0x400) == 0)) {\n      piVar4 = (int *)(*(code *)PTR_safemalloc_000b2408)(1,4);\n      puVar1 = PTR_s_acket_from_server___s_000b23a8;\n      puVar6 = PTR_LAB_000b2760 + 0x6e24;\n      *piVar4 = param_2 - param_1[0xd];\n      uVar3 = FUN_0003c380(param_1,puVar1 + 0x646c,puVar6,piVar4);\n      FUN_000463f8(iVar7,uVar3);\n      if (param_1[0x12] != 2) {\n        param_1[0x12] = 1;\n      }\n    }\n    else {\n      param_1[0xf] = param_2;\n      param_1[0x12] = 0;\n    }\n    uVar3 = FUN_0003b04c(0x5d);\n    FUN_0003b1cc(uVar3,param_1[1]);\n    FUN_0003b1cc(uVar3,param_2 - param_1[0xd]);\n    FUN_000463f8(iVar7,uVar3);\n    param_1[0xd] = param_2;\n  }" ({ "{") (if_statement "if ((param_1[0xe] == param_2) && ((uVar5 & 0x400) == 0)) {\n      piVar4 = (int *)(*(code *)PTR_safemalloc_000b2408)(1,4);\n      puVar1 = PTR_s_acket_from_server___s_000b23a8;\n      puVar6 = PTR_LAB_000b2760 + 0x6e24;\n      *piVar4 = param_2 - param_1[0xd];\n      uVar3 = FUN_0003c380(param_1,puVar1 + 0x646c,puVar6,piVar4);\n      FUN_000463f8(iVar7,uVar3);\n      if (param_1[0x12] != 2) {\n        param_1[0x12] = 1;\n      }\n    }\n    else {\n      param_1[0xf] = param_2;\n      param_1[0x12] = 0;\n    }" (if "if") (parenthesized_expression "((param_1[0xe] == param_2) && ((uVar5 & 0x400) == 0))" (( "(") (binary_expression "(param_1[0xe] == param_2) && ((uVar5 & 0x400) == 0)" (parenthesized_expression "(param_1[0xe] == param_2)" (( "(") (binary_expression "param_1[0xe] == param_2" (subscript_expression "param_1[0xe]" (identifier "param_1") ([ "[") (number_literal "0xe") (] "]")) (== "==") (identifier "param_2")) () ")")) (&& "&&") (parenthesized_expression "((uVar5 & 0x400) == 0)" (( "(") (binary_expression "(uVar5 & 0x400) == 0" (parenthesized_expression "(uVar5 & 0x400)" (( "(") (binary_expression "uVar5 & 0x400" (identifier "uVar5") (& "&") (number_literal "0x400")) () ")")) (== "==") (number_literal "0")) () ")"))) () ")")) (compound_statement "{\n      piVar4 = (int *)(*(code *)PTR_safemalloc_000b2408)(1,4);\n      puVar1 = PTR_s_acket_from_server___s_000b23a8;\n      puVar6 = PTR_LAB_000b2760 + 0x6e24;\n      *piVar4 = param_2 - param_1[0xd];\n      uVar3 = FUN_0003c380(param_1,puVar1 + 0x646c,puVar6,piVar4);\n      FUN_000463f8(iVar7,uVar3);\n      if (param_1[0x12] != 2) {\n        param_1[0x12] = 1;\n      }\n    }" ({ "{") (expression_statement "piVar4 = (int *)(*(code *)PTR_safemalloc_000b2408)(1,4);" (assignment_expression "piVar4 = (int *)(*(code *)PTR_safemalloc_000b2408)(1,4)" (identifier "piVar4") (= "=") (cast_expression "(int *)(*(code *)PTR_safemalloc_000b2408)(1,4)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "(*(code *)PTR_safemalloc_000b2408)(1,4)" (parenthesized_expression "(*(code *)PTR_safemalloc_000b2408)" (( "(") (pointer_expression "*(code *)PTR_safemalloc_000b2408" (* "*") (cast_expression "(code *)PTR_safemalloc_000b2408" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_safemalloc_000b2408"))) () ")")) (argument_list "(1,4)" (( "(") (number_literal "1") (, ",") (number_literal "4") () ")"))))) (; ";")) (expression_statement "puVar1 = PTR_s_acket_from_server___s_000b23a8;" (assignment_expression "puVar1 = PTR_s_acket_from_server___s_000b23a8" (identifier "puVar1") (= "=") (identifier "PTR_s_acket_from_server___s_000b23a8")) (; ";")) (expression_statement "puVar6 = PTR_LAB_000b2760 + 0x6e24;" (assignment_expression "puVar6 = PTR_LAB_000b2760 + 0x6e24" (identifier "puVar6") (= "=") (binary_expression "PTR_LAB_000b2760 + 0x6e24" (identifier "PTR_LAB_000b2760") (+ "+") (number_literal "0x6e24"))) (; ";")) (expression_statement "*piVar4 = param_2 - param_1[0xd];" (assignment_expression "*piVar4 = param_2 - param_1[0xd]" (pointer_expression "*piVar4" (* "*") (identifier "piVar4")) (= "=") (binary_expression "param_2 - param_1[0xd]" (identifier "param_2") (- "-") (subscript_expression "param_1[0xd]" (identifier "param_1") ([ "[") (number_literal "0xd") (] "]")))) (; ";")) (expression_statement "uVar3 = FUN_0003c380(param_1,puVar1 + 0x646c,puVar6,piVar4);" (assignment_expression "uVar3 = FUN_0003c380(param_1,puVar1 + 0x646c,puVar6,piVar4)" (identifier "uVar3") (= "=") (call_expression "FUN_0003c380(param_1,puVar1 + 0x646c,puVar6,piVar4)" (identifier "FUN_0003c380") (argument_list "(param_1,puVar1 + 0x646c,puVar6,piVar4)" (( "(") (identifier "param_1") (, ",") (binary_expression "puVar1 + 0x646c" (identifier "puVar1") (+ "+") (number_literal "0x646c")) (, ",") (identifier "puVar6") (, ",") (identifier "piVar4") () ")")))) (; ";")) (expression_statement "FUN_000463f8(iVar7,uVar3);" (call_expression "FUN_000463f8(iVar7,uVar3)" (identifier "FUN_000463f8") (argument_list "(iVar7,uVar3)" (( "(") (identifier "iVar7") (, ",") (identifier "uVar3") () ")"))) (; ";")) (if_statement "if (param_1[0x12] != 2) {\n        param_1[0x12] = 1;\n      }" (if "if") (parenthesized_expression "(param_1[0x12] != 2)" (( "(") (binary_expression "param_1[0x12] != 2" (subscript_expression "param_1[0x12]" (identifier "param_1") ([ "[") (number_literal "0x12") (] "]")) (!= "!=") (number_literal "2")) () ")")) (compound_statement "{\n        param_1[0x12] = 1;\n      }" ({ "{") (expression_statement "param_1[0x12] = 1;" (assignment_expression "param_1[0x12] = 1" (subscript_expression "param_1[0x12]" (identifier "param_1") ([ "[") (number_literal "0x12") (] "]")) (= "=") (number_literal "1")) (; ";")) (} "}"))) (} "}")) (else_clause "else {\n      param_1[0xf] = param_2;\n      param_1[0x12] = 0;\n    }" (else "else") (compound_statement "{\n      param_1[0xf] = param_2;\n      param_1[0x12] = 0;\n    }" ({ "{") (expression_statement "param_1[0xf] = param_2;" (assignment_expression "param_1[0xf] = param_2" (subscript_expression "param_1[0xf]" (identifier "param_1") ([ "[") (number_literal "0xf") (] "]")) (= "=") (identifier "param_2")) (; ";")) (expression_statement "param_1[0x12] = 0;" (assignment_expression "param_1[0x12] = 0" (subscript_expression "param_1[0x12]" (identifier "param_1") ([ "[") (number_literal "0x12") (] "]")) (= "=") (number_literal "0")) (; ";")) (} "}")))) (expression_statement "uVar3 = FUN_0003b04c(0x5d);" (assignment_expression "uVar3 = FUN_0003b04c(0x5d)" (identifier "uVar3") (= "=") (call_expression "FUN_0003b04c(0x5d)" (identifier "FUN_0003b04c") (argument_list "(0x5d)" (( "(") (number_literal "0x5d") () ")")))) (; ";")) (expression_statement "FUN_0003b1cc(uVar3,param_1[1]);" (call_expression "FUN_0003b1cc(uVar3,param_1[1])" (identifier "FUN_0003b1cc") (argument_list "(uVar3,param_1[1])" (( "(") (identifier "uVar3") (, ",") (subscript_expression "param_1[1]" (identifier "param_1") ([ "[") (number_literal "1") (] "]")) () ")"))) (; ";")) (expression_statement "FUN_0003b1cc(uVar3,param_2 - param_1[0xd]);" (call_expression "FUN_0003b1cc(uVar3,param_2 - param_1[0xd])" (identifier "FUN_0003b1cc") (argument_list "(uVar3,param_2 - param_1[0xd])" (( "(") (identifier "uVar3") (, ",") (binary_expression "param_2 - param_1[0xd]" (identifier "param_2") (- "-") (subscript_expression "param_1[0xd]" (identifier "param_1") ([ "[") (number_literal "0xd") (] "]"))) () ")"))) (; ";")) (expression_statement "FUN_000463f8(iVar7,uVar3);" (call_expression "FUN_000463f8(iVar7,uVar3)" (identifier "FUN_000463f8") (argument_list "(iVar7,uVar3)" (( "(") (identifier "iVar7") (, ",") (identifier "uVar3") () ")"))) (; ";")) (expression_statement "param_1[0xd] = param_2;" (assignment_expression "param_1[0xd] = param_2" (subscript_expression "param_1[0xd]" (identifier "param_1") ([ "[") (number_literal "0xd") (] "]")) (= "=") (identifier "param_2")) (; ";")) (} "}")))) (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: (pointer_declarator declarator: (identifier))) (parameter_declaration type: (primitive_type) declarator: (identifier)))) body: (compound_statement (declaration type: (type_identifier) declarator: (pointer_declarator declarator: (identifier))) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (primitive_type) declarator: (pointer_declarator declarator: (identifier))) (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (type_identifier) declarator: (pointer_declarator declarator: (identifier))) (declaration type: (primitive_type) declarator: (identifier)) (if_statement condition: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_expression left: (subscript_expression argument: (identifier) index: (number_literal)) right: (number_literal))) right: (number_literal))) consequence: (compound_statement (return_statement))) (if_statement condition: (parenthesized_expression (binary_expression left: (subscript_expression argument: (identifier) index: (number_literal)) right: (number_literal))) consequence: (compound_statement (if_statement condition: (parenthesized_expression (binary_expression left: (subscript_expression argument: (identifier) index: (number_literal)) right: (number_literal))) consequence: (compound_statement (return_statement))) (expression_statement (assignment_expression left: (identifier) right: (pointer_expression argument: (identifier)))) (expression_statement (assignment_expression left: (identifier) right: (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))))))) (if_statement condition: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) right: (number_literal))) consequence: (goto_statement label: (statement_identifier)))) alternative: (else_clause (compound_statement (expression_statement (assignment_expression left: (identifier) right: (pointer_expression argument: (identifier)))) (expression_statement (assignment_expression left: (identifier) right: (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 (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal)))) (if_statement condition: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) right: (number_literal))) consequence: (goto_statement label: (statement_identifier))) (labeled_statement label: (statement_identifier) (if_statement condition: (parenthesized_expression (binary_expression left: (number_literal) right: (identifier))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (number_literal))))))))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal)))) (labeled_statement label: (statement_identifier) (if_statement condition: (parenthesized_expression (binary_expression left: (subscript_expression argument: (identifier) index: (number_literal)) right: (identifier))) consequence: (compound_statement (if_statement condition: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_expression left: (subscript_expression argument: (identifier) index: (number_literal)) right: (identifier))) right: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) right: (number_literal))))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (call_expression function: (parenthesized_expression (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (identifier)))) arguments: (argument_list (number_literal) (number_literal)))))) (expression_statement (assignment_expression left: (identifier) right: (identifier))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal)))) (expression_statement (assignment_expression left: (pointer_expression argument: (identifier)) right: (binary_expression left: (identifier) right: (subscript_expression argument: (identifier) index: (number_literal))))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (identifier) (binary_expression left: (identifier) right: (number_literal)) (identifier) (identifier))))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier) (identifier)))) (if_statement condition: (parenthesized_expression (binary_expression left: (subscript_expression argument: (identifier) index: (number_literal)) right: (number_literal))) consequence: (compound_statement (expression_statement (assignment_expression left: (subscript_expression argument: (identifier) index: (number_literal)) right: (number_literal)))))) alternative: (else_clause (compound_statement (expression_statement (assignment_expression left: (subscript_expression argument: (identifier) index: (number_literal)) right: (identifier))) (expression_statement (assignment_expression left: (subscript_expression argument: (identifier) index: (number_literal)) right: (number_literal)))))) (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) (subscript_expression argument: (identifier) index: (number_literal))))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier) (binary_expression left: (identifier) right: (subscript_expression argument: (identifier) index: (number_literal)))))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier) (identifier)))) (expression_statement (assignment_expression left: (subscript_expression argument: (identifier) index: (number_literal)) right: (identifier)))))) (return_statement))))

void MASKED(int *param_1,int param_2)

{
  undefined *puVar1;
  int iVar2;
  undefined4 uVar3;
  int *piVar4;
  uint uVar5;
  undefined *puVar6;
  int iVar7;
  
  if ((param_1[5] & 6U) != 0) {
    return;
  }
  if (param_1[3] == 1) {
    if (param_1[0x14] != 0) {
      return;
    }
    iVar7 = *param_1;
    uVar5 = *(uint *)(iVar7 + 0x50);
    if ((uVar5 & 0x100) != 0) goto LAB_00046b5c;
  }
  else {
    iVar7 = *param_1;
    uVar5 = *(uint *)(iVar7 + 0x50);
    iVar2 = param_2 >> 1;
    if ((uVar5 & 0x100) == 0) goto LAB_00046b64;
LAB_00046b5c:
    if (0x4000 < param_2) {
      param_2 = 0x4000;
    }
  }
  iVar2 = param_2 >> 1;
LAB_00046b64:
  if (param_1[0xd] <= iVar2) {
    if ((param_1[0xe] == param_2) && ((uVar5 & 0x400) == 0)) {
      piVar4 = (int *)(*(code *)PTR_safemalloc_000b2408)(1,4);
      puVar1 = PTR_s_acket_from_server___s_000b23a8;
      puVar6 = PTR_LAB_000b2760 + 0x6e24;
      *piVar4 = param_2 - param_1[0xd];
      uVar3 = FUN_0003c380(param_1,puVar1 + 0x646c,puVar6,piVar4);
      FUN_000463f8(iVar7,uVar3);
      if (param_1[0x12] != 2) {
        param_1[0x12] = 1;
      }
    }
    else {
      param_1[0xf] = param_2;
      param_1[0x12] = 0;
    }
    uVar3 = FUN_0003b04c(0x5d);
    FUN_0003b1cc(uVar3,param_1[1]);
    FUN_0003b1cc(uVar3,param_2 - param_1[0xd]);
    FUN_000463f8(iVar7,uVar3);
    param_1[0xd] = param_2;
  }
  return;
}

