
zlib_table * __regparm3 zlib_mktable(uchar *lengths,int nlengths)

{
  int iVar1;
  int *piVar2;
  uint uVar3;
  int iVar4;
  uint uVar5;
  zlib_table *pzVar6;
  uint uVar7;
  byte *pbVar8;
  int iVar9;
  uint uVar10;
  uint *puVar11;
  int in_GS_OFFSET;
  uint local_534;
  int *local_530;
  int count [16];
  int startcode [16];
  int codes [288];
  
  iVar1 = *(int *)(in_GS_OFFSET + 0x14);
  piVar2 = count + 1;
  do {
    *piVar2 = 0;
    piVar2 = piVar2 + 1;
  } while (startcode != piVar2);
  if (nlengths < 1) {
    local_534 = 0;
  }
  else {
    uVar10 = 0;
    pbVar8 = lengths;
    do {
      uVar3 = (uint)*pbVar8;
      count[uVar3] = count[uVar3] + 1;
      if (uVar10 < uVar3) {
        uVar10 = uVar3;
      }
      pbVar8 = pbVar8 + 1;
    } while (pbVar8 != lengths + nlengths);
    local_534 = 9;
    if (uVar10 < 10) {
      local_534 = uVar10;
    }
  }
  iVar9 = 1;
  iVar4 = 0;
  do {
    startcode[iVar9] = iVar4;
    piVar2 = count + iVar9;
    iVar9 = iVar9 + 1;
    iVar4 = (iVar4 + *piVar2) * 2;
  } while (iVar9 != 0x10);
  if (0 < nlengths) {
    puVar11 = (uint *)codes;
    pbVar8 = lengths;
    do {
      uVar3 = (uint)*pbVar8;
      *puVar11 = 0;
      uVar10 = startcode[uVar3];
      startcode[uVar3] = uVar10 + 1;
      if (uVar3 != 0) {
        uVar5 = 0;
        uVar7 = 0;
        do {
          uVar7 = uVar7 + 1;
          uVar5 = uVar5 * 2 | uVar10 & 1;
          uVar10 = (int)uVar10 >> 1;
        } while (uVar3 != uVar7);
        *puVar11 = uVar5;
      }
      pbVar8 = pbVar8 + 1;
      puVar11 = puVar11 + 1;
    } while (lengths + nlengths != pbVar8);
  }
  local_530 = codes;
  pzVar6 = zlib_mkonetab(local_530,lengths,nlengths,0,0,local_534);
  if (iVar1 != *(int *)(in_GS_OFFSET + 0x14)) {
                    /* WARNING: Subroutine does not return */
    __stack_chk_fail_local();
  }
  return pzVar6;
}



void __regparm3 FUN_0006ee20(byte *param_1,int param_2)

{
  int *piVar1;
  uint *puVar2;
  uint uVar3;
  uint uVar4;
  uint uVar5;
  byte *pbVar6;
  int iVar7;
  uint uVar8;
  int in_GS_OFFSET;
  uint local_534;
  int local_520 [16];
  uint local_4e0 [16];
  uint local_4a0 [288];
  int local_20;
  
  local_20 = *(int *)(in_GS_OFFSET + 0x14);
  puVar2 = (uint *)(local_520 + 1);
  do {
    *puVar2 = 0;
    puVar2 = puVar2 + 1;
  } while (local_4e0 != puVar2);
  if (param_2 < 1) {
    local_534 = 0;
  }
  else {
    uVar8 = 0;
    pbVar6 = param_1;
    do {
      uVar3 = (uint)*pbVar6;
      local_520[uVar3] = local_520[uVar3] + 1;
      if (uVar8 < uVar3) {
        uVar8 = uVar3;
      }
      pbVar6 = pbVar6 + 1;
    } while (pbVar6 != param_1 + param_2);
    local_534 = 9;
    if (uVar8 < 10) {
      local_534 = uVar8;
    }
  }
  iVar7 = 1;
  uVar8 = 0;
  do {
    local_4e0[iVar7] = uVar8;
    piVar1 = local_520 + iVar7;
    iVar7 = iVar7 + 1;
    uVar8 = (uVar8 + *piVar1) * 2;
  } while (iVar7 != 0x10);
  if (0 < param_2) {
    puVar2 = local_4a0;
    pbVar6 = param_1 + param_2;
    do {
      uVar3 = (uint)*param_1;
      *puVar2 = 0;
      uVar8 = local_4e0[uVar3];
      local_4e0[uVar3] = uVar8 + 1;
      if (uVar3 != 0) {
        uVar4 = 0;
        uVar5 = 0;
        do {
          uVar5 = uVar5 + 1;
          uVar4 = uVar4 * 2 | uVar8 & 1;
          uVar8 = (int)uVar8 >> 1;
        } while (uVar3 != uVar5);
        *puVar2 = uVar4;
      }
      param_1 = param_1 + 1;
      puVar2 = puVar2 + 1;
    } while (pbVar6 != param_1);
  }
  FUN_0006ec30(0,0,local_534);
  if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {
                    /* WARNING: Subroutine does not return */
    FUN_000a39d0();
  }
  return;
}


PUSH EBP
PUSH EDI
PUSH ESI
PUSH EBX
SUB ESP,0x53c
MOV dword ptr [ESP + 0x14],EAX
LEA ECX,[ESP + 0x6c]
MOV dword ptr [ESP + 0x10],EDX
MOV EAX,GS:[0x14]
MOV dword ptr [ESP + 0x52c],EAX
XOR EAX,EAX
LEA EAX,[ESP + 0x30]
LEA ESI,[ESI]
MOV dword ptr [EAX],0x0
ADD EAX,0x4
CMP ECX,EAX
JNZ 0x0006ee50
MOV ESI,dword ptr [ESP + 0x10]
TEST ESI,ESI
JLE 0x0006ef6b
MOV EAX,dword ptr [ESP + 0x14]
XOR EBX,EBX
MOV EDX,EAX
ADD ESI,EAX
LEA ESI,[ESI]
NOP
MOVZX EAX,byte ptr [EDX]
ADD dword ptr [ESP + EAX*0x4 + 0x2c],0x1
CMP EBX,EAX
CMOVL EBX,EAX
ADD EDX,0x1
CMP EDX,ESI
JNZ 0x0006ee78
CMP EBX,0x9
MOV EAX,0x9
CMOVLE EAX,EBX
MOV dword ptr [ESP + 0x18],EAX
MOV EDX,0x1
XOR EAX,EAX
LEA EBX,[ESP + 0x2c]
LEA ESI,[ESI]
LEA ESI,[ESI]
MOV dword ptr [ECX + EDX*0x4],EAX
ADD EAX,dword ptr [EBX + EDX*0x4]
ADD EDX,0x1
ADD EAX,EAX
CMP EDX,0x10
JNZ 0x0006eeb0
MOV EAX,dword ptr [ESP + 0x10]
TEST EAX,EAX
JLE 0x0006ef78
LEA EAX,[ESP + 0xac]
MOV ESI,dword ptr [ESP + 0x14]
MOV dword ptr [ESP + 0x1c],EAX
MOV EBP,EAX
MOV EAX,dword ptr [ESP + 0x10]
MOV EDI,ESI
ADD EAX,ESI
MOV dword ptr [ESP + 0xc],EAX
LEA ESI,[ESI]
MOVZX ESI,byte ptr [EDI]
MOV dword ptr [EBP],0x0
MOV EDX,dword ptr [ESP + ESI*0x4 + 0x6c]
LEA EAX,[EDX + 0x1]
MOV dword ptr [ESP + ESI*0x4 + 0x6c],EAX
TEST ESI,ESI
JZ 0x0006ef25
XOR EAX,EAX
XOR ECX,ECX
LEA ESI,[ESI]
MOV EBX,EDX
ADD EAX,EAX
ADD ECX,0x1
SAR EDX,0x1
AND EBX,0x1
OR EAX,EBX
CMP ESI,ECX
JNZ 0x0006ef10
MOV dword ptr [EBP],EAX
ADD EDI,0x1
ADD EBP,0x4
CMP dword ptr [ESP + 0xc],EDI
JNZ 0x0006eef0
SUB ESP,0x4
PUSH dword ptr [ESP + 0x1c]
PUSH 0x0
PUSH 0x0
MOV ECX,dword ptr [ESP + 0x20]
MOV EDX,dword ptr [ESP + 0x24]
MOV EAX,dword ptr [ESP + 0x2c]
CALL 0x0006ec30
ADD ESP,0x10
MOV EDI,dword ptr [ESP + 0x52c]
XOR EDI,dword ptr GS:[0x14]
JNZ 0x0006ef85
ADD ESP,0x53c
POP EBX
POP ESI
POP EDI
POP EBP
RET
MOV dword ptr [ESP + 0x18],0x0
JMP 0x0006ee9b
LEA EAX,[ESP + 0xac]
MOV dword ptr [ESP + 0x1c],EAX
JMP 0x0006ef31
CALL 0x000a39d0
(translation_unit "void __regparm3 FUN_0006ee20(byte *param_1,int param_2)\n\n{\n  int *piVar1;\n  uint *puVar2;\n  uint uVar3;\n  uint uVar4;\n  uint uVar5;\n  byte *pbVar6;\n  int iVar7;\n  uint uVar8;\n  int in_GS_OFFSET;\n  uint local_534;\n  int local_520 [16];\n  uint local_4e0 [16];\n  uint local_4a0 [288];\n  int local_20;\n  \n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  puVar2 = (uint *)(local_520 + 1);\n  do {\n    *puVar2 = 0;\n    puVar2 = puVar2 + 1;\n  } while (local_4e0 != puVar2);\n  if (param_2 < 1) {\n    local_534 = 0;\n  }\n  else {\n    uVar8 = 0;\n    pbVar6 = param_1;\n    do {\n      uVar3 = (uint)*pbVar6;\n      local_520[uVar3] = local_520[uVar3] + 1;\n      if (uVar8 < uVar3) {\n        uVar8 = uVar3;\n      }\n      pbVar6 = pbVar6 + 1;\n    } while (pbVar6 != param_1 + param_2);\n    local_534 = 9;\n    if (uVar8 < 10) {\n      local_534 = uVar8;\n    }\n  }\n  iVar7 = 1;\n  uVar8 = 0;\n  do {\n    local_4e0[iVar7] = uVar8;\n    piVar1 = local_520 + iVar7;\n    iVar7 = iVar7 + 1;\n    uVar8 = (uVar8 + *piVar1) * 2;\n  } while (iVar7 != 0x10);\n  if (0 < param_2) {\n    puVar2 = local_4a0;\n    pbVar6 = param_1 + param_2;\n    do {\n      uVar3 = (uint)*param_1;\n      *puVar2 = 0;\n      uVar8 = local_4e0[uVar3];\n      local_4e0[uVar3] = uVar8 + 1;\n      if (uVar3 != 0) {\n        uVar4 = 0;\n        uVar5 = 0;\n        do {\n          uVar5 = uVar5 + 1;\n          uVar4 = uVar4 * 2 | uVar8 & 1;\n          uVar8 = (int)uVar8 >> 1;\n        } while (uVar3 != uVar5);\n        *puVar2 = uVar4;\n      }\n      param_1 = param_1 + 1;\n      puVar2 = puVar2 + 1;\n    } while (pbVar6 != param_1);\n  }\n  FUN_0006ec30(0,0,local_534);\n  if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n    FUN_000a39d0();\n  }\n  return;\n}\n\n" (function_definition "void __regparm3 FUN_0006ee20(byte *param_1,int param_2)\n\n{\n  int *piVar1;\n  uint *puVar2;\n  uint uVar3;\n  uint uVar4;\n  uint uVar5;\n  byte *pbVar6;\n  int iVar7;\n  uint uVar8;\n  int in_GS_OFFSET;\n  uint local_534;\n  int local_520 [16];\n  uint local_4e0 [16];\n  uint local_4a0 [288];\n  int local_20;\n  \n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  puVar2 = (uint *)(local_520 + 1);\n  do {\n    *puVar2 = 0;\n    puVar2 = puVar2 + 1;\n  } while (local_4e0 != puVar2);\n  if (param_2 < 1) {\n    local_534 = 0;\n  }\n  else {\n    uVar8 = 0;\n    pbVar6 = param_1;\n    do {\n      uVar3 = (uint)*pbVar6;\n      local_520[uVar3] = local_520[uVar3] + 1;\n      if (uVar8 < uVar3) {\n        uVar8 = uVar3;\n      }\n      pbVar6 = pbVar6 + 1;\n    } while (pbVar6 != param_1 + param_2);\n    local_534 = 9;\n    if (uVar8 < 10) {\n      local_534 = uVar8;\n    }\n  }\n  iVar7 = 1;\n  uVar8 = 0;\n  do {\n    local_4e0[iVar7] = uVar8;\n    piVar1 = local_520 + iVar7;\n    iVar7 = iVar7 + 1;\n    uVar8 = (uVar8 + *piVar1) * 2;\n  } while (iVar7 != 0x10);\n  if (0 < param_2) {\n    puVar2 = local_4a0;\n    pbVar6 = param_1 + param_2;\n    do {\n      uVar3 = (uint)*param_1;\n      *puVar2 = 0;\n      uVar8 = local_4e0[uVar3];\n      local_4e0[uVar3] = uVar8 + 1;\n      if (uVar3 != 0) {\n        uVar4 = 0;\n        uVar5 = 0;\n        do {\n          uVar5 = uVar5 + 1;\n          uVar4 = uVar4 * 2 | uVar8 & 1;\n          uVar8 = (int)uVar8 >> 1;\n        } while (uVar3 != uVar5);\n        *puVar2 = uVar4;\n      }\n      param_1 = param_1 + 1;\n      puVar2 = puVar2 + 1;\n    } while (pbVar6 != param_1);\n  }\n  FUN_0006ec30(0,0,local_534);\n  if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n    FUN_000a39d0();\n  }\n  return;\n}" primitive_type (ERROR "__regparm3" identifier) (function_declarator "FUN_0006ee20(byte *param_1,int param_2)" identifier (parameter_list "(byte *param_1,int param_2)" ( (parameter_declaration "byte *param_1" type_identifier (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "int param_2" primitive_type identifier) ))) (compound_statement "{\n  int *piVar1;\n  uint *puVar2;\n  uint uVar3;\n  uint uVar4;\n  uint uVar5;\n  byte *pbVar6;\n  int iVar7;\n  uint uVar8;\n  int in_GS_OFFSET;\n  uint local_534;\n  int local_520 [16];\n  uint local_4e0 [16];\n  uint local_4a0 [288];\n  int local_20;\n  \n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  puVar2 = (uint *)(local_520 + 1);\n  do {\n    *puVar2 = 0;\n    puVar2 = puVar2 + 1;\n  } while (local_4e0 != puVar2);\n  if (param_2 < 1) {\n    local_534 = 0;\n  }\n  else {\n    uVar8 = 0;\n    pbVar6 = param_1;\n    do {\n      uVar3 = (uint)*pbVar6;\n      local_520[uVar3] = local_520[uVar3] + 1;\n      if (uVar8 < uVar3) {\n        uVar8 = uVar3;\n      }\n      pbVar6 = pbVar6 + 1;\n    } while (pbVar6 != param_1 + param_2);\n    local_534 = 9;\n    if (uVar8 < 10) {\n      local_534 = uVar8;\n    }\n  }\n  iVar7 = 1;\n  uVar8 = 0;\n  do {\n    local_4e0[iVar7] = uVar8;\n    piVar1 = local_520 + iVar7;\n    iVar7 = iVar7 + 1;\n    uVar8 = (uVar8 + *piVar1) * 2;\n  } while (iVar7 != 0x10);\n  if (0 < param_2) {\n    puVar2 = local_4a0;\n    pbVar6 = param_1 + param_2;\n    do {\n      uVar3 = (uint)*param_1;\n      *puVar2 = 0;\n      uVar8 = local_4e0[uVar3];\n      local_4e0[uVar3] = uVar8 + 1;\n      if (uVar3 != 0) {\n        uVar4 = 0;\n        uVar5 = 0;\n        do {\n          uVar5 = uVar5 + 1;\n          uVar4 = uVar4 * 2 | uVar8 & 1;\n          uVar8 = (int)uVar8 >> 1;\n        } while (uVar3 != uVar5);\n        *puVar2 = uVar4;\n      }\n      param_1 = param_1 + 1;\n      puVar2 = puVar2 + 1;\n    } while (pbVar6 != param_1);\n  }\n  FUN_0006ec30(0,0,local_534);\n  if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n    FUN_000a39d0();\n  }\n  return;\n}" { (declaration "int *piVar1;" primitive_type (pointer_declarator "*piVar1" * identifier) ;) (declaration "uint *puVar2;" type_identifier (pointer_declarator "*puVar2" * identifier) ;) (declaration "uint uVar3;" type_identifier identifier ;) (declaration "uint uVar4;" type_identifier identifier ;) (declaration "uint uVar5;" type_identifier identifier ;) (declaration "byte *pbVar6;" type_identifier (pointer_declarator "*pbVar6" * identifier) ;) (declaration "int iVar7;" primitive_type identifier ;) (declaration "uint uVar8;" type_identifier identifier ;) (declaration "int in_GS_OFFSET;" primitive_type identifier ;) (declaration "uint local_534;" type_identifier identifier ;) (declaration "int local_520 [16];" primitive_type (array_declarator "local_520 [16]" identifier [ number_literal ]) ;) (declaration "uint local_4e0 [16];" type_identifier (array_declarator "local_4e0 [16]" identifier [ number_literal ]) ;) (declaration "uint local_4a0 [288];" type_identifier (array_declarator "local_4a0 [288]" identifier [ number_literal ]) ;) (declaration "int local_20;" primitive_type identifier ;) (expression_statement "local_20 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "local_20 = *(int *)(in_GS_OFFSET + 0x14)" identifier = (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) ;) (expression_statement "puVar2 = (uint *)(local_520 + 1);" (assignment_expression "puVar2 = (uint *)(local_520 + 1)" identifier = (cast_expression "(uint *)(local_520 + 1)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(local_520 + 1)" ( (binary_expression "local_520 + 1" identifier + number_literal) )))) ;) (do_statement "do {\n    *puVar2 = 0;\n    puVar2 = puVar2 + 1;\n  } while (local_4e0 != puVar2);" do (compound_statement "{\n    *puVar2 = 0;\n    puVar2 = puVar2 + 1;\n  }" { (expression_statement "*puVar2 = 0;" (assignment_expression "*puVar2 = 0" (pointer_expression "*puVar2" * identifier) = number_literal) ;) (expression_statement "puVar2 = puVar2 + 1;" (assignment_expression "puVar2 = puVar2 + 1" identifier = (binary_expression "puVar2 + 1" identifier + number_literal)) ;) }) while (parenthesized_expression "(local_4e0 != puVar2)" ( (binary_expression "local_4e0 != puVar2" identifier != identifier) )) ;) (if_statement "if (param_2 < 1) {\n    local_534 = 0;\n  }\n  else {\n    uVar8 = 0;\n    pbVar6 = param_1;\n    do {\n      uVar3 = (uint)*pbVar6;\n      local_520[uVar3] = local_520[uVar3] + 1;\n      if (uVar8 < uVar3) {\n        uVar8 = uVar3;\n      }\n      pbVar6 = pbVar6 + 1;\n    } while (pbVar6 != param_1 + param_2);\n    local_534 = 9;\n    if (uVar8 < 10) {\n      local_534 = uVar8;\n    }\n  }" if (parenthesized_expression "(param_2 < 1)" ( (binary_expression "param_2 < 1" identifier < number_literal) )) (compound_statement "{\n    local_534 = 0;\n  }" { (expression_statement "local_534 = 0;" (assignment_expression "local_534 = 0" identifier = number_literal) ;) }) (else_clause "else {\n    uVar8 = 0;\n    pbVar6 = param_1;\n    do {\n      uVar3 = (uint)*pbVar6;\n      local_520[uVar3] = local_520[uVar3] + 1;\n      if (uVar8 < uVar3) {\n        uVar8 = uVar3;\n      }\n      pbVar6 = pbVar6 + 1;\n    } while (pbVar6 != param_1 + param_2);\n    local_534 = 9;\n    if (uVar8 < 10) {\n      local_534 = uVar8;\n    }\n  }" else (compound_statement "{\n    uVar8 = 0;\n    pbVar6 = param_1;\n    do {\n      uVar3 = (uint)*pbVar6;\n      local_520[uVar3] = local_520[uVar3] + 1;\n      if (uVar8 < uVar3) {\n        uVar8 = uVar3;\n      }\n      pbVar6 = pbVar6 + 1;\n    } while (pbVar6 != param_1 + param_2);\n    local_534 = 9;\n    if (uVar8 < 10) {\n      local_534 = uVar8;\n    }\n  }" { (expression_statement "uVar8 = 0;" (assignment_expression "uVar8 = 0" identifier = number_literal) ;) (expression_statement "pbVar6 = param_1;" (assignment_expression "pbVar6 = param_1" identifier = identifier) ;) (do_statement "do {\n      uVar3 = (uint)*pbVar6;\n      local_520[uVar3] = local_520[uVar3] + 1;\n      if (uVar8 < uVar3) {\n        uVar8 = uVar3;\n      }\n      pbVar6 = pbVar6 + 1;\n    } while (pbVar6 != param_1 + param_2);" do (compound_statement "{\n      uVar3 = (uint)*pbVar6;\n      local_520[uVar3] = local_520[uVar3] + 1;\n      if (uVar8 < uVar3) {\n        uVar8 = uVar3;\n      }\n      pbVar6 = pbVar6 + 1;\n    }" { (expression_statement "uVar3 = (uint)*pbVar6;" (assignment_expression "uVar3 = (uint)*pbVar6" identifier = (binary_expression "(uint)*pbVar6" (parenthesized_expression "(uint)" ( identifier )) * identifier)) ;) (expression_statement "local_520[uVar3] = local_520[uVar3] + 1;" (assignment_expression "local_520[uVar3] = local_520[uVar3] + 1" (subscript_expression "local_520[uVar3]" identifier [ identifier ]) = (binary_expression "local_520[uVar3] + 1" (subscript_expression "local_520[uVar3]" identifier [ identifier ]) + number_literal)) ;) (if_statement "if (uVar8 < uVar3) {\n        uVar8 = uVar3;\n      }" if (parenthesized_expression "(uVar8 < uVar3)" ( (binary_expression "uVar8 < uVar3" identifier < identifier) )) (compound_statement "{\n        uVar8 = uVar3;\n      }" { (expression_statement "uVar8 = uVar3;" (assignment_expression "uVar8 = uVar3" identifier = identifier) ;) })) (expression_statement "pbVar6 = pbVar6 + 1;" (assignment_expression "pbVar6 = pbVar6 + 1" identifier = (binary_expression "pbVar6 + 1" identifier + number_literal)) ;) }) while (parenthesized_expression "(pbVar6 != param_1 + param_2)" ( (binary_expression "pbVar6 != param_1 + param_2" identifier != (binary_expression "param_1 + param_2" identifier + identifier)) )) ;) (expression_statement "local_534 = 9;" (assignment_expression "local_534 = 9" identifier = number_literal) ;) (if_statement "if (uVar8 < 10) {\n      local_534 = uVar8;\n    }" if (parenthesized_expression "(uVar8 < 10)" ( (binary_expression "uVar8 < 10" identifier < number_literal) )) (compound_statement "{\n      local_534 = uVar8;\n    }" { (expression_statement "local_534 = uVar8;" (assignment_expression "local_534 = uVar8" identifier = identifier) ;) })) }))) (expression_statement "iVar7 = 1;" (assignment_expression "iVar7 = 1" identifier = number_literal) ;) (expression_statement "uVar8 = 0;" (assignment_expression "uVar8 = 0" identifier = number_literal) ;) (do_statement "do {\n    local_4e0[iVar7] = uVar8;\n    piVar1 = local_520 + iVar7;\n    iVar7 = iVar7 + 1;\n    uVar8 = (uVar8 + *piVar1) * 2;\n  } while (iVar7 != 0x10);" do (compound_statement "{\n    local_4e0[iVar7] = uVar8;\n    piVar1 = local_520 + iVar7;\n    iVar7 = iVar7 + 1;\n    uVar8 = (uVar8 + *piVar1) * 2;\n  }" { (expression_statement "local_4e0[iVar7] = uVar8;" (assignment_expression "local_4e0[iVar7] = uVar8" (subscript_expression "local_4e0[iVar7]" identifier [ identifier ]) = identifier) ;) (expression_statement "piVar1 = local_520 + iVar7;" (assignment_expression "piVar1 = local_520 + iVar7" identifier = (binary_expression "local_520 + iVar7" identifier + identifier)) ;) (expression_statement "iVar7 = iVar7 + 1;" (assignment_expression "iVar7 = iVar7 + 1" identifier = (binary_expression "iVar7 + 1" identifier + number_literal)) ;) (expression_statement "uVar8 = (uVar8 + *piVar1) * 2;" (assignment_expression "uVar8 = (uVar8 + *piVar1) * 2" identifier = (binary_expression "(uVar8 + *piVar1) * 2" (parenthesized_expression "(uVar8 + *piVar1)" ( (binary_expression "uVar8 + *piVar1" identifier + (pointer_expression "*piVar1" * identifier)) )) * number_literal)) ;) }) while (parenthesized_expression "(iVar7 != 0x10)" ( (binary_expression "iVar7 != 0x10" identifier != number_literal) )) ;) (if_statement "if (0 < param_2) {\n    puVar2 = local_4a0;\n    pbVar6 = param_1 + param_2;\n    do {\n      uVar3 = (uint)*param_1;\n      *puVar2 = 0;\n      uVar8 = local_4e0[uVar3];\n      local_4e0[uVar3] = uVar8 + 1;\n      if (uVar3 != 0) {\n        uVar4 = 0;\n        uVar5 = 0;\n        do {\n          uVar5 = uVar5 + 1;\n          uVar4 = uVar4 * 2 | uVar8 & 1;\n          uVar8 = (int)uVar8 >> 1;\n        } while (uVar3 != uVar5);\n        *puVar2 = uVar4;\n      }\n      param_1 = param_1 + 1;\n      puVar2 = puVar2 + 1;\n    } while (pbVar6 != param_1);\n  }" if (parenthesized_expression "(0 < param_2)" ( (binary_expression "0 < param_2" number_literal < identifier) )) (compound_statement "{\n    puVar2 = local_4a0;\n    pbVar6 = param_1 + param_2;\n    do {\n      uVar3 = (uint)*param_1;\n      *puVar2 = 0;\n      uVar8 = local_4e0[uVar3];\n      local_4e0[uVar3] = uVar8 + 1;\n      if (uVar3 != 0) {\n        uVar4 = 0;\n        uVar5 = 0;\n        do {\n          uVar5 = uVar5 + 1;\n          uVar4 = uVar4 * 2 | uVar8 & 1;\n          uVar8 = (int)uVar8 >> 1;\n        } while (uVar3 != uVar5);\n        *puVar2 = uVar4;\n      }\n      param_1 = param_1 + 1;\n      puVar2 = puVar2 + 1;\n    } while (pbVar6 != param_1);\n  }" { (expression_statement "puVar2 = local_4a0;" (assignment_expression "puVar2 = local_4a0" identifier = identifier) ;) (expression_statement "pbVar6 = param_1 + param_2;" (assignment_expression "pbVar6 = param_1 + param_2" identifier = (binary_expression "param_1 + param_2" identifier + identifier)) ;) (do_statement "do {\n      uVar3 = (uint)*param_1;\n      *puVar2 = 0;\n      uVar8 = local_4e0[uVar3];\n      local_4e0[uVar3] = uVar8 + 1;\n      if (uVar3 != 0) {\n        uVar4 = 0;\n        uVar5 = 0;\n        do {\n          uVar5 = uVar5 + 1;\n          uVar4 = uVar4 * 2 | uVar8 & 1;\n          uVar8 = (int)uVar8 >> 1;\n        } while (uVar3 != uVar5);\n        *puVar2 = uVar4;\n      }\n      param_1 = param_1 + 1;\n      puVar2 = puVar2 + 1;\n    } while (pbVar6 != param_1);" do (compound_statement "{\n      uVar3 = (uint)*param_1;\n      *puVar2 = 0;\n      uVar8 = local_4e0[uVar3];\n      local_4e0[uVar3] = uVar8 + 1;\n      if (uVar3 != 0) {\n        uVar4 = 0;\n        uVar5 = 0;\n        do {\n          uVar5 = uVar5 + 1;\n          uVar4 = uVar4 * 2 | uVar8 & 1;\n          uVar8 = (int)uVar8 >> 1;\n        } while (uVar3 != uVar5);\n        *puVar2 = uVar4;\n      }\n      param_1 = param_1 + 1;\n      puVar2 = puVar2 + 1;\n    }" { (expression_statement "uVar3 = (uint)*param_1;" (assignment_expression "uVar3 = (uint)*param_1" identifier = (binary_expression "(uint)*param_1" (parenthesized_expression "(uint)" ( identifier )) * identifier)) ;) (expression_statement "*puVar2 = 0;" (assignment_expression "*puVar2 = 0" (pointer_expression "*puVar2" * identifier) = number_literal) ;) (expression_statement "uVar8 = local_4e0[uVar3];" (assignment_expression "uVar8 = local_4e0[uVar3]" identifier = (subscript_expression "local_4e0[uVar3]" identifier [ identifier ])) ;) (expression_statement "local_4e0[uVar3] = uVar8 + 1;" (assignment_expression "local_4e0[uVar3] = uVar8 + 1" (subscript_expression "local_4e0[uVar3]" identifier [ identifier ]) = (binary_expression "uVar8 + 1" identifier + number_literal)) ;) (if_statement "if (uVar3 != 0) {\n        uVar4 = 0;\n        uVar5 = 0;\n        do {\n          uVar5 = uVar5 + 1;\n          uVar4 = uVar4 * 2 | uVar8 & 1;\n          uVar8 = (int)uVar8 >> 1;\n        } while (uVar3 != uVar5);\n        *puVar2 = uVar4;\n      }" if (parenthesized_expression "(uVar3 != 0)" ( (binary_expression "uVar3 != 0" identifier != number_literal) )) (compound_statement "{\n        uVar4 = 0;\n        uVar5 = 0;\n        do {\n          uVar5 = uVar5 + 1;\n          uVar4 = uVar4 * 2 | uVar8 & 1;\n          uVar8 = (int)uVar8 >> 1;\n        } while (uVar3 != uVar5);\n        *puVar2 = uVar4;\n      }" { (expression_statement "uVar4 = 0;" (assignment_expression "uVar4 = 0" identifier = number_literal) ;) (expression_statement "uVar5 = 0;" (assignment_expression "uVar5 = 0" identifier = number_literal) ;) (do_statement "do {\n          uVar5 = uVar5 + 1;\n          uVar4 = uVar4 * 2 | uVar8 & 1;\n          uVar8 = (int)uVar8 >> 1;\n        } while (uVar3 != uVar5);" do (compound_statement "{\n          uVar5 = uVar5 + 1;\n          uVar4 = uVar4 * 2 | uVar8 & 1;\n          uVar8 = (int)uVar8 >> 1;\n        }" { (expression_statement "uVar5 = uVar5 + 1;" (assignment_expression "uVar5 = uVar5 + 1" identifier = (binary_expression "uVar5 + 1" identifier + number_literal)) ;) (expression_statement "uVar4 = uVar4 * 2 | uVar8 & 1;" (assignment_expression "uVar4 = uVar4 * 2 | uVar8 & 1" identifier = (binary_expression "uVar4 * 2 | uVar8 & 1" (binary_expression "uVar4 * 2" identifier * number_literal) | (binary_expression "uVar8 & 1" identifier & number_literal))) ;) (expression_statement "uVar8 = (int)uVar8 >> 1;" (assignment_expression "uVar8 = (int)uVar8 >> 1" identifier = (binary_expression "(int)uVar8 >> 1" (cast_expression "(int)uVar8" ( (type_descriptor "int" primitive_type) ) identifier) >> number_literal)) ;) }) while (parenthesized_expression "(uVar3 != uVar5)" ( (binary_expression "uVar3 != uVar5" identifier != identifier) )) ;) (expression_statement "*puVar2 = uVar4;" (assignment_expression "*puVar2 = uVar4" (pointer_expression "*puVar2" * identifier) = identifier) ;) })) (expression_statement "param_1 = param_1 + 1;" (assignment_expression "param_1 = param_1 + 1" identifier = (binary_expression "param_1 + 1" identifier + number_literal)) ;) (expression_statement "puVar2 = puVar2 + 1;" (assignment_expression "puVar2 = puVar2 + 1" identifier = (binary_expression "puVar2 + 1" identifier + number_literal)) ;) }) while (parenthesized_expression "(pbVar6 != param_1)" ( (binary_expression "pbVar6 != param_1" identifier != identifier) )) ;) })) (expression_statement "FUN_0006ec30(0,0,local_534);" (call_expression "FUN_0006ec30(0,0,local_534)" identifier (argument_list "(0,0,local_534)" ( number_literal , number_literal , identifier ))) ;) (if_statement "if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n    FUN_000a39d0();\n  }" if (parenthesized_expression "(local_20 != *(int *)(in_GS_OFFSET + 0x14))" ( (binary_expression "local_20 != *(int *)(in_GS_OFFSET + 0x14)" identifier != (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) )) (compound_statement "{\n                    /* WARNING: Subroutine does not return */\n    FUN_000a39d0();\n  }" { comment (expression_statement "FUN_000a39d0();" (call_expression "FUN_000a39d0()" identifier (argument_list "()" ( ))) ;) })) (return_statement "return;" return ;) })))
(translation_unit "zlib_table * __regparm3 zlib_mktable(uchar *lengths,int nlengths)\n\n{\n  int iVar1;\n  int *piVar2;\n  uint uVar3;\n  int iVar4;\n  uint uVar5;\n  zlib_table *pzVar6;\n  uint uVar7;\n  byte *pbVar8;\n  int iVar9;\n  uint uVar10;\n  uint *puVar11;\n  int in_GS_OFFSET;\n  uint local_534;\n  int *local_530;\n  int count [16];\n  int startcode [16];\n  int codes [288];\n  \n  iVar1 = *(int *)(in_GS_OFFSET + 0x14);\n  piVar2 = count + 1;\n  do {\n    *piVar2 = 0;\n    piVar2 = piVar2 + 1;\n  } while (startcode != piVar2);\n  if (nlengths < 1) {\n    local_534 = 0;\n  }\n  else {\n    uVar10 = 0;\n    pbVar8 = lengths;\n    do {\n      uVar3 = (uint)*pbVar8;\n      count[uVar3] = count[uVar3] + 1;\n      if (uVar10 < uVar3) {\n        uVar10 = uVar3;\n      }\n      pbVar8 = pbVar8 + 1;\n    } while (pbVar8 != lengths + nlengths);\n    local_534 = 9;\n    if (uVar10 < 10) {\n      local_534 = uVar10;\n    }\n  }\n  iVar9 = 1;\n  iVar4 = 0;\n  do {\n    startcode[iVar9] = iVar4;\n    piVar2 = count + iVar9;\n    iVar9 = iVar9 + 1;\n    iVar4 = (iVar4 + *piVar2) * 2;\n  } while (iVar9 != 0x10);\n  if (0 < nlengths) {\n    puVar11 = (uint *)codes;\n    pbVar8 = lengths;\n    do {\n      uVar3 = (uint)*pbVar8;\n      *puVar11 = 0;\n      uVar10 = startcode[uVar3];\n      startcode[uVar3] = uVar10 + 1;\n      if (uVar3 != 0) {\n        uVar5 = 0;\n        uVar7 = 0;\n        do {\n          uVar7 = uVar7 + 1;\n          uVar5 = uVar5 * 2 | uVar10 & 1;\n          uVar10 = (int)uVar10 >> 1;\n        } while (uVar3 != uVar7);\n        *puVar11 = uVar5;\n      }\n      pbVar8 = pbVar8 + 1;\n      puVar11 = puVar11 + 1;\n    } while (lengths + nlengths != pbVar8);\n  }\n  local_530 = codes;\n  pzVar6 = zlib_mkonetab(local_530,lengths,nlengths,0,0,local_534);\n  if (iVar1 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n    __stack_chk_fail_local();\n  }\n  return pzVar6;\n}\n\n" (ERROR "zlib_table * __regparm3 zlib_mktable(uchar *lengths,int nlengths)" (binary_expression "zlib_table * __regparm3 zlib_mktable(uchar *lengths,int nlengths)" identifier * (ERROR "__regparm3" identifier) (call_expression "zlib_mktable(uchar *lengths,int nlengths)" identifier (argument_list "(uchar *lengths,int nlengths)" ( (binary_expression "uchar *lengths" identifier * identifier) , (ERROR "int" identifier) identifier ))))) (compound_statement "{\n  int iVar1;\n  int *piVar2;\n  uint uVar3;\n  int iVar4;\n  uint uVar5;\n  zlib_table *pzVar6;\n  uint uVar7;\n  byte *pbVar8;\n  int iVar9;\n  uint uVar10;\n  uint *puVar11;\n  int in_GS_OFFSET;\n  uint local_534;\n  int *local_530;\n  int count [16];\n  int startcode [16];\n  int codes [288];\n  \n  iVar1 = *(int *)(in_GS_OFFSET + 0x14);\n  piVar2 = count + 1;\n  do {\n    *piVar2 = 0;\n    piVar2 = piVar2 + 1;\n  } while (startcode != piVar2);\n  if (nlengths < 1) {\n    local_534 = 0;\n  }\n  else {\n    uVar10 = 0;\n    pbVar8 = lengths;\n    do {\n      uVar3 = (uint)*pbVar8;\n      count[uVar3] = count[uVar3] + 1;\n      if (uVar10 < uVar3) {\n        uVar10 = uVar3;\n      }\n      pbVar8 = pbVar8 + 1;\n    } while (pbVar8 != lengths + nlengths);\n    local_534 = 9;\n    if (uVar10 < 10) {\n      local_534 = uVar10;\n    }\n  }\n  iVar9 = 1;\n  iVar4 = 0;\n  do {\n    startcode[iVar9] = iVar4;\n    piVar2 = count + iVar9;\n    iVar9 = iVar9 + 1;\n    iVar4 = (iVar4 + *piVar2) * 2;\n  } while (iVar9 != 0x10);\n  if (0 < nlengths) {\n    puVar11 = (uint *)codes;\n    pbVar8 = lengths;\n    do {\n      uVar3 = (uint)*pbVar8;\n      *puVar11 = 0;\n      uVar10 = startcode[uVar3];\n      startcode[uVar3] = uVar10 + 1;\n      if (uVar3 != 0) {\n        uVar5 = 0;\n        uVar7 = 0;\n        do {\n          uVar7 = uVar7 + 1;\n          uVar5 = uVar5 * 2 | uVar10 & 1;\n          uVar10 = (int)uVar10 >> 1;\n        } while (uVar3 != uVar7);\n        *puVar11 = uVar5;\n      }\n      pbVar8 = pbVar8 + 1;\n      puVar11 = puVar11 + 1;\n    } while (lengths + nlengths != pbVar8);\n  }\n  local_530 = codes;\n  pzVar6 = zlib_mkonetab(local_530,lengths,nlengths,0,0,local_534);\n  if (iVar1 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n    __stack_chk_fail_local();\n  }\n  return pzVar6;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "int *piVar2;" primitive_type (pointer_declarator "*piVar2" * identifier) ;) (declaration "uint uVar3;" type_identifier identifier ;) (declaration "int iVar4;" primitive_type identifier ;) (declaration "uint uVar5;" type_identifier identifier ;) (declaration "zlib_table *pzVar6;" type_identifier (pointer_declarator "*pzVar6" * identifier) ;) (declaration "uint uVar7;" type_identifier identifier ;) (declaration "byte *pbVar8;" type_identifier (pointer_declarator "*pbVar8" * identifier) ;) (declaration "int iVar9;" primitive_type identifier ;) (declaration "uint uVar10;" type_identifier identifier ;) (declaration "uint *puVar11;" type_identifier (pointer_declarator "*puVar11" * identifier) ;) (declaration "int in_GS_OFFSET;" primitive_type identifier ;) (declaration "uint local_534;" type_identifier identifier ;) (declaration "int *local_530;" primitive_type (pointer_declarator "*local_530" * identifier) ;) (declaration "int count [16];" primitive_type (array_declarator "count [16]" identifier [ number_literal ]) ;) (declaration "int startcode [16];" primitive_type (array_declarator "startcode [16]" identifier [ number_literal ]) ;) (declaration "int codes [288];" primitive_type (array_declarator "codes [288]" identifier [ number_literal ]) ;) (expression_statement "iVar1 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "iVar1 = *(int *)(in_GS_OFFSET + 0x14)" identifier = (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) ;) (expression_statement "piVar2 = count + 1;" (assignment_expression "piVar2 = count + 1" identifier = (binary_expression "count + 1" identifier + number_literal)) ;) (do_statement "do {\n    *piVar2 = 0;\n    piVar2 = piVar2 + 1;\n  } while (startcode != piVar2);" do (compound_statement "{\n    *piVar2 = 0;\n    piVar2 = piVar2 + 1;\n  }" { (expression_statement "*piVar2 = 0;" (assignment_expression "*piVar2 = 0" (pointer_expression "*piVar2" * identifier) = number_literal) ;) (expression_statement "piVar2 = piVar2 + 1;" (assignment_expression "piVar2 = piVar2 + 1" identifier = (binary_expression "piVar2 + 1" identifier + number_literal)) ;) }) while (parenthesized_expression "(startcode != piVar2)" ( (binary_expression "startcode != piVar2" identifier != identifier) )) ;) (if_statement "if (nlengths < 1) {\n    local_534 = 0;\n  }\n  else {\n    uVar10 = 0;\n    pbVar8 = lengths;\n    do {\n      uVar3 = (uint)*pbVar8;\n      count[uVar3] = count[uVar3] + 1;\n      if (uVar10 < uVar3) {\n        uVar10 = uVar3;\n      }\n      pbVar8 = pbVar8 + 1;\n    } while (pbVar8 != lengths + nlengths);\n    local_534 = 9;\n    if (uVar10 < 10) {\n      local_534 = uVar10;\n    }\n  }" if (parenthesized_expression "(nlengths < 1)" ( (binary_expression "nlengths < 1" identifier < number_literal) )) (compound_statement "{\n    local_534 = 0;\n  }" { (expression_statement "local_534 = 0;" (assignment_expression "local_534 = 0" identifier = number_literal) ;) }) (else_clause "else {\n    uVar10 = 0;\n    pbVar8 = lengths;\n    do {\n      uVar3 = (uint)*pbVar8;\n      count[uVar3] = count[uVar3] + 1;\n      if (uVar10 < uVar3) {\n        uVar10 = uVar3;\n      }\n      pbVar8 = pbVar8 + 1;\n    } while (pbVar8 != lengths + nlengths);\n    local_534 = 9;\n    if (uVar10 < 10) {\n      local_534 = uVar10;\n    }\n  }" else (compound_statement "{\n    uVar10 = 0;\n    pbVar8 = lengths;\n    do {\n      uVar3 = (uint)*pbVar8;\n      count[uVar3] = count[uVar3] + 1;\n      if (uVar10 < uVar3) {\n        uVar10 = uVar3;\n      }\n      pbVar8 = pbVar8 + 1;\n    } while (pbVar8 != lengths + nlengths);\n    local_534 = 9;\n    if (uVar10 < 10) {\n      local_534 = uVar10;\n    }\n  }" { (expression_statement "uVar10 = 0;" (assignment_expression "uVar10 = 0" identifier = number_literal) ;) (expression_statement "pbVar8 = lengths;" (assignment_expression "pbVar8 = lengths" identifier = identifier) ;) (do_statement "do {\n      uVar3 = (uint)*pbVar8;\n      count[uVar3] = count[uVar3] + 1;\n      if (uVar10 < uVar3) {\n        uVar10 = uVar3;\n      }\n      pbVar8 = pbVar8 + 1;\n    } while (pbVar8 != lengths + nlengths);" do (compound_statement "{\n      uVar3 = (uint)*pbVar8;\n      count[uVar3] = count[uVar3] + 1;\n      if (uVar10 < uVar3) {\n        uVar10 = uVar3;\n      }\n      pbVar8 = pbVar8 + 1;\n    }" { (expression_statement "uVar3 = (uint)*pbVar8;" (assignment_expression "uVar3 = (uint)*pbVar8" identifier = (binary_expression "(uint)*pbVar8" (parenthesized_expression "(uint)" ( identifier )) * identifier)) ;) (expression_statement "count[uVar3] = count[uVar3] + 1;" (assignment_expression "count[uVar3] = count[uVar3] + 1" (subscript_expression "count[uVar3]" identifier [ identifier ]) = (binary_expression "count[uVar3] + 1" (subscript_expression "count[uVar3]" identifier [ identifier ]) + number_literal)) ;) (if_statement "if (uVar10 < uVar3) {\n        uVar10 = uVar3;\n      }" if (parenthesized_expression "(uVar10 < uVar3)" ( (binary_expression "uVar10 < uVar3" identifier < identifier) )) (compound_statement "{\n        uVar10 = uVar3;\n      }" { (expression_statement "uVar10 = uVar3;" (assignment_expression "uVar10 = uVar3" identifier = identifier) ;) })) (expression_statement "pbVar8 = pbVar8 + 1;" (assignment_expression "pbVar8 = pbVar8 + 1" identifier = (binary_expression "pbVar8 + 1" identifier + number_literal)) ;) }) while (parenthesized_expression "(pbVar8 != lengths + nlengths)" ( (binary_expression "pbVar8 != lengths + nlengths" identifier != (binary_expression "lengths + nlengths" identifier + identifier)) )) ;) (expression_statement "local_534 = 9;" (assignment_expression "local_534 = 9" identifier = number_literal) ;) (if_statement "if (uVar10 < 10) {\n      local_534 = uVar10;\n    }" if (parenthesized_expression "(uVar10 < 10)" ( (binary_expression "uVar10 < 10" identifier < number_literal) )) (compound_statement "{\n      local_534 = uVar10;\n    }" { (expression_statement "local_534 = uVar10;" (assignment_expression "local_534 = uVar10" identifier = identifier) ;) })) }))) (expression_statement "iVar9 = 1;" (assignment_expression "iVar9 = 1" identifier = number_literal) ;) (expression_statement "iVar4 = 0;" (assignment_expression "iVar4 = 0" identifier = number_literal) ;) (do_statement "do {\n    startcode[iVar9] = iVar4;\n    piVar2 = count + iVar9;\n    iVar9 = iVar9 + 1;\n    iVar4 = (iVar4 + *piVar2) * 2;\n  } while (iVar9 != 0x10);" do (compound_statement "{\n    startcode[iVar9] = iVar4;\n    piVar2 = count + iVar9;\n    iVar9 = iVar9 + 1;\n    iVar4 = (iVar4 + *piVar2) * 2;\n  }" { (expression_statement "startcode[iVar9] = iVar4;" (assignment_expression "startcode[iVar9] = iVar4" (subscript_expression "startcode[iVar9]" identifier [ identifier ]) = identifier) ;) (expression_statement "piVar2 = count + iVar9;" (assignment_expression "piVar2 = count + iVar9" identifier = (binary_expression "count + iVar9" identifier + identifier)) ;) (expression_statement "iVar9 = iVar9 + 1;" (assignment_expression "iVar9 = iVar9 + 1" identifier = (binary_expression "iVar9 + 1" identifier + number_literal)) ;) (expression_statement "iVar4 = (iVar4 + *piVar2) * 2;" (assignment_expression "iVar4 = (iVar4 + *piVar2) * 2" identifier = (binary_expression "(iVar4 + *piVar2) * 2" (parenthesized_expression "(iVar4 + *piVar2)" ( (binary_expression "iVar4 + *piVar2" identifier + (pointer_expression "*piVar2" * identifier)) )) * number_literal)) ;) }) while (parenthesized_expression "(iVar9 != 0x10)" ( (binary_expression "iVar9 != 0x10" identifier != number_literal) )) ;) (if_statement "if (0 < nlengths) {\n    puVar11 = (uint *)codes;\n    pbVar8 = lengths;\n    do {\n      uVar3 = (uint)*pbVar8;\n      *puVar11 = 0;\n      uVar10 = startcode[uVar3];\n      startcode[uVar3] = uVar10 + 1;\n      if (uVar3 != 0) {\n        uVar5 = 0;\n        uVar7 = 0;\n        do {\n          uVar7 = uVar7 + 1;\n          uVar5 = uVar5 * 2 | uVar10 & 1;\n          uVar10 = (int)uVar10 >> 1;\n        } while (uVar3 != uVar7);\n        *puVar11 = uVar5;\n      }\n      pbVar8 = pbVar8 + 1;\n      puVar11 = puVar11 + 1;\n    } while (lengths + nlengths != pbVar8);\n  }" if (parenthesized_expression "(0 < nlengths)" ( (binary_expression "0 < nlengths" number_literal < identifier) )) (compound_statement "{\n    puVar11 = (uint *)codes;\n    pbVar8 = lengths;\n    do {\n      uVar3 = (uint)*pbVar8;\n      *puVar11 = 0;\n      uVar10 = startcode[uVar3];\n      startcode[uVar3] = uVar10 + 1;\n      if (uVar3 != 0) {\n        uVar5 = 0;\n        uVar7 = 0;\n        do {\n          uVar7 = uVar7 + 1;\n          uVar5 = uVar5 * 2 | uVar10 & 1;\n          uVar10 = (int)uVar10 >> 1;\n        } while (uVar3 != uVar7);\n        *puVar11 = uVar5;\n      }\n      pbVar8 = pbVar8 + 1;\n      puVar11 = puVar11 + 1;\n    } while (lengths + nlengths != pbVar8);\n  }" { (expression_statement "puVar11 = (uint *)codes;" (assignment_expression "puVar11 = (uint *)codes" identifier = (cast_expression "(uint *)codes" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) ;) (expression_statement "pbVar8 = lengths;" (assignment_expression "pbVar8 = lengths" identifier = identifier) ;) (do_statement "do {\n      uVar3 = (uint)*pbVar8;\n      *puVar11 = 0;\n      uVar10 = startcode[uVar3];\n      startcode[uVar3] = uVar10 + 1;\n      if (uVar3 != 0) {\n        uVar5 = 0;\n        uVar7 = 0;\n        do {\n          uVar7 = uVar7 + 1;\n          uVar5 = uVar5 * 2 | uVar10 & 1;\n          uVar10 = (int)uVar10 >> 1;\n        } while (uVar3 != uVar7);\n        *puVar11 = uVar5;\n      }\n      pbVar8 = pbVar8 + 1;\n      puVar11 = puVar11 + 1;\n    } while (lengths + nlengths != pbVar8);" do (compound_statement "{\n      uVar3 = (uint)*pbVar8;\n      *puVar11 = 0;\n      uVar10 = startcode[uVar3];\n      startcode[uVar3] = uVar10 + 1;\n      if (uVar3 != 0) {\n        uVar5 = 0;\n        uVar7 = 0;\n        do {\n          uVar7 = uVar7 + 1;\n          uVar5 = uVar5 * 2 | uVar10 & 1;\n          uVar10 = (int)uVar10 >> 1;\n        } while (uVar3 != uVar7);\n        *puVar11 = uVar5;\n      }\n      pbVar8 = pbVar8 + 1;\n      puVar11 = puVar11 + 1;\n    }" { (expression_statement "uVar3 = (uint)*pbVar8;" (assignment_expression "uVar3 = (uint)*pbVar8" identifier = (binary_expression "(uint)*pbVar8" (parenthesized_expression "(uint)" ( identifier )) * identifier)) ;) (expression_statement "*puVar11 = 0;" (assignment_expression "*puVar11 = 0" (pointer_expression "*puVar11" * identifier) = number_literal) ;) (expression_statement "uVar10 = startcode[uVar3];" (assignment_expression "uVar10 = startcode[uVar3]" identifier = (subscript_expression "startcode[uVar3]" identifier [ identifier ])) ;) (expression_statement "startcode[uVar3] = uVar10 + 1;" (assignment_expression "startcode[uVar3] = uVar10 + 1" (subscript_expression "startcode[uVar3]" identifier [ identifier ]) = (binary_expression "uVar10 + 1" identifier + number_literal)) ;) (if_statement "if (uVar3 != 0) {\n        uVar5 = 0;\n        uVar7 = 0;\n        do {\n          uVar7 = uVar7 + 1;\n          uVar5 = uVar5 * 2 | uVar10 & 1;\n          uVar10 = (int)uVar10 >> 1;\n        } while (uVar3 != uVar7);\n        *puVar11 = uVar5;\n      }" if (parenthesized_expression "(uVar3 != 0)" ( (binary_expression "uVar3 != 0" identifier != number_literal) )) (compound_statement "{\n        uVar5 = 0;\n        uVar7 = 0;\n        do {\n          uVar7 = uVar7 + 1;\n          uVar5 = uVar5 * 2 | uVar10 & 1;\n          uVar10 = (int)uVar10 >> 1;\n        } while (uVar3 != uVar7);\n        *puVar11 = uVar5;\n      }" { (expression_statement "uVar5 = 0;" (assignment_expression "uVar5 = 0" identifier = number_literal) ;) (expression_statement "uVar7 = 0;" (assignment_expression "uVar7 = 0" identifier = number_literal) ;) (do_statement "do {\n          uVar7 = uVar7 + 1;\n          uVar5 = uVar5 * 2 | uVar10 & 1;\n          uVar10 = (int)uVar10 >> 1;\n        } while (uVar3 != uVar7);" do (compound_statement "{\n          uVar7 = uVar7 + 1;\n          uVar5 = uVar5 * 2 | uVar10 & 1;\n          uVar10 = (int)uVar10 >> 1;\n        }" { (expression_statement "uVar7 = uVar7 + 1;" (assignment_expression "uVar7 = uVar7 + 1" identifier = (binary_expression "uVar7 + 1" identifier + number_literal)) ;) (expression_statement "uVar5 = uVar5 * 2 | uVar10 & 1;" (assignment_expression "uVar5 = uVar5 * 2 | uVar10 & 1" identifier = (binary_expression "uVar5 * 2 | uVar10 & 1" (binary_expression "uVar5 * 2" identifier * number_literal) | (binary_expression "uVar10 & 1" identifier & number_literal))) ;) (expression_statement "uVar10 = (int)uVar10 >> 1;" (assignment_expression "uVar10 = (int)uVar10 >> 1" identifier = (binary_expression "(int)uVar10 >> 1" (cast_expression "(int)uVar10" ( (type_descriptor "int" primitive_type) ) identifier) >> number_literal)) ;) }) while (parenthesized_expression "(uVar3 != uVar7)" ( (binary_expression "uVar3 != uVar7" identifier != identifier) )) ;) (expression_statement "*puVar11 = uVar5;" (assignment_expression "*puVar11 = uVar5" (pointer_expression "*puVar11" * identifier) = identifier) ;) })) (expression_statement "pbVar8 = pbVar8 + 1;" (assignment_expression "pbVar8 = pbVar8 + 1" identifier = (binary_expression "pbVar8 + 1" identifier + number_literal)) ;) (expression_statement "puVar11 = puVar11 + 1;" (assignment_expression "puVar11 = puVar11 + 1" identifier = (binary_expression "puVar11 + 1" identifier + number_literal)) ;) }) while (parenthesized_expression "(lengths + nlengths != pbVar8)" ( (binary_expression "lengths + nlengths != pbVar8" (binary_expression "lengths + nlengths" identifier + identifier) != identifier) )) ;) })) (expression_statement "local_530 = codes;" (assignment_expression "local_530 = codes" identifier = identifier) ;) (expression_statement "pzVar6 = zlib_mkonetab(local_530,lengths,nlengths,0,0,local_534);" (assignment_expression "pzVar6 = zlib_mkonetab(local_530,lengths,nlengths,0,0,local_534)" identifier = (call_expression "zlib_mkonetab(local_530,lengths,nlengths,0,0,local_534)" identifier (argument_list "(local_530,lengths,nlengths,0,0,local_534)" ( identifier , identifier , identifier , number_literal , number_literal , identifier )))) ;) (if_statement "if (iVar1 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n    __stack_chk_fail_local();\n  }" if (parenthesized_expression "(iVar1 != *(int *)(in_GS_OFFSET + 0x14))" ( (binary_expression "iVar1 != *(int *)(in_GS_OFFSET + 0x14)" identifier != (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) )) (compound_statement "{\n                    /* WARNING: Subroutine does not return */\n    __stack_chk_fail_local();\n  }" { comment (expression_statement "__stack_chk_fail_local();" (call_expression "__stack_chk_fail_local()" identifier (argument_list "()" ( ))) ;) })) (return_statement "return pzVar6;" return identifier ;) }))
(translation_unit "void __regparm3 FUN_0006ee20(byte *param_1,int param_2)\n\n{\n  int *piVar1;\n  uint *puVar2;\n  uint uVar3;\n  uint uVar4;\n  uint uVar5;\n  byte *pbVar6;\n  int iVar7;\n  uint uVar8;\n  int in_GS_OFFSET;\n  uint local_534;\n  int local_520 [16];\n  uint local_4e0 [16];\n  uint local_4a0 [288];\n  int local_20;\n  \n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  puVar2 = (uint *)(local_520 + 1);\n  do {\n    *puVar2 = 0;\n    puVar2 = puVar2 + 1;\n  } while (local_4e0 != puVar2);\n  if (param_2 < 1) {\n    local_534 = 0;\n  }\n  else {\n    uVar8 = 0;\n    pbVar6 = param_1;\n    do {\n      uVar3 = (uint)*pbVar6;\n      local_520[uVar3] = local_520[uVar3] + 1;\n      if (uVar8 < uVar3) {\n        uVar8 = uVar3;\n      }\n      pbVar6 = pbVar6 + 1;\n    } while (pbVar6 != param_1 + param_2);\n    local_534 = 9;\n    if (uVar8 < 10) {\n      local_534 = uVar8;\n    }\n  }\n  iVar7 = 1;\n  uVar8 = 0;\n  do {\n    local_4e0[iVar7] = uVar8;\n    piVar1 = local_520 + iVar7;\n    iVar7 = iVar7 + 1;\n    uVar8 = (uVar8 + *piVar1) * 2;\n  } while (iVar7 != 0x10);\n  if (0 < param_2) {\n    puVar2 = local_4a0;\n    pbVar6 = param_1 + param_2;\n    do {\n      uVar3 = (uint)*param_1;\n      *puVar2 = 0;\n      uVar8 = local_4e0[uVar3];\n      local_4e0[uVar3] = uVar8 + 1;\n      if (uVar3 != 0) {\n        uVar4 = 0;\n        uVar5 = 0;\n        do {\n          uVar5 = uVar5 + 1;\n          uVar4 = uVar4 * 2 | uVar8 & 1;\n          uVar8 = (int)uVar8 >> 1;\n        } while (uVar3 != uVar5);\n        *puVar2 = uVar4;\n      }\n      param_1 = param_1 + 1;\n      puVar2 = puVar2 + 1;\n    } while (pbVar6 != param_1);\n  }\n  FUN_0006ec30(0,0,local_534);\n  if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    \n    FUN_000a39d0();\n  }\n  return;\n}\n\n" (function_definition "void __regparm3 FUN_0006ee20(byte *param_1,int param_2)\n\n{\n  int *piVar1;\n  uint *puVar2;\n  uint uVar3;\n  uint uVar4;\n  uint uVar5;\n  byte *pbVar6;\n  int iVar7;\n  uint uVar8;\n  int in_GS_OFFSET;\n  uint local_534;\n  int local_520 [16];\n  uint local_4e0 [16];\n  uint local_4a0 [288];\n  int local_20;\n  \n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  puVar2 = (uint *)(local_520 + 1);\n  do {\n    *puVar2 = 0;\n    puVar2 = puVar2 + 1;\n  } while (local_4e0 != puVar2);\n  if (param_2 < 1) {\n    local_534 = 0;\n  }\n  else {\n    uVar8 = 0;\n    pbVar6 = param_1;\n    do {\n      uVar3 = (uint)*pbVar6;\n      local_520[uVar3] = local_520[uVar3] + 1;\n      if (uVar8 < uVar3) {\n        uVar8 = uVar3;\n      }\n      pbVar6 = pbVar6 + 1;\n    } while (pbVar6 != param_1 + param_2);\n    local_534 = 9;\n    if (uVar8 < 10) {\n      local_534 = uVar8;\n    }\n  }\n  iVar7 = 1;\n  uVar8 = 0;\n  do {\n    local_4e0[iVar7] = uVar8;\n    piVar1 = local_520 + iVar7;\n    iVar7 = iVar7 + 1;\n    uVar8 = (uVar8 + *piVar1) * 2;\n  } while (iVar7 != 0x10);\n  if (0 < param_2) {\n    puVar2 = local_4a0;\n    pbVar6 = param_1 + param_2;\n    do {\n      uVar3 = (uint)*param_1;\n      *puVar2 = 0;\n      uVar8 = local_4e0[uVar3];\n      local_4e0[uVar3] = uVar8 + 1;\n      if (uVar3 != 0) {\n        uVar4 = 0;\n        uVar5 = 0;\n        do {\n          uVar5 = uVar5 + 1;\n          uVar4 = uVar4 * 2 | uVar8 & 1;\n          uVar8 = (int)uVar8 >> 1;\n        } while (uVar3 != uVar5);\n        *puVar2 = uVar4;\n      }\n      param_1 = param_1 + 1;\n      puVar2 = puVar2 + 1;\n    } while (pbVar6 != param_1);\n  }\n  FUN_0006ec30(0,0,local_534);\n  if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    \n    FUN_000a39d0();\n  }\n  return;\n}" primitive_type (ERROR "__regparm3" identifier) (function_declarator "FUN_0006ee20(byte *param_1,int param_2)" identifier (parameter_list "(byte *param_1,int param_2)" ( (parameter_declaration "byte *param_1" type_identifier (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "int param_2" primitive_type identifier) ))) (compound_statement "{\n  int *piVar1;\n  uint *puVar2;\n  uint uVar3;\n  uint uVar4;\n  uint uVar5;\n  byte *pbVar6;\n  int iVar7;\n  uint uVar8;\n  int in_GS_OFFSET;\n  uint local_534;\n  int local_520 [16];\n  uint local_4e0 [16];\n  uint local_4a0 [288];\n  int local_20;\n  \n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  puVar2 = (uint *)(local_520 + 1);\n  do {\n    *puVar2 = 0;\n    puVar2 = puVar2 + 1;\n  } while (local_4e0 != puVar2);\n  if (param_2 < 1) {\n    local_534 = 0;\n  }\n  else {\n    uVar8 = 0;\n    pbVar6 = param_1;\n    do {\n      uVar3 = (uint)*pbVar6;\n      local_520[uVar3] = local_520[uVar3] + 1;\n      if (uVar8 < uVar3) {\n        uVar8 = uVar3;\n      }\n      pbVar6 = pbVar6 + 1;\n    } while (pbVar6 != param_1 + param_2);\n    local_534 = 9;\n    if (uVar8 < 10) {\n      local_534 = uVar8;\n    }\n  }\n  iVar7 = 1;\n  uVar8 = 0;\n  do {\n    local_4e0[iVar7] = uVar8;\n    piVar1 = local_520 + iVar7;\n    iVar7 = iVar7 + 1;\n    uVar8 = (uVar8 + *piVar1) * 2;\n  } while (iVar7 != 0x10);\n  if (0 < param_2) {\n    puVar2 = local_4a0;\n    pbVar6 = param_1 + param_2;\n    do {\n      uVar3 = (uint)*param_1;\n      *puVar2 = 0;\n      uVar8 = local_4e0[uVar3];\n      local_4e0[uVar3] = uVar8 + 1;\n      if (uVar3 != 0) {\n        uVar4 = 0;\n        uVar5 = 0;\n        do {\n          uVar5 = uVar5 + 1;\n          uVar4 = uVar4 * 2 | uVar8 & 1;\n          uVar8 = (int)uVar8 >> 1;\n        } while (uVar3 != uVar5);\n        *puVar2 = uVar4;\n      }\n      param_1 = param_1 + 1;\n      puVar2 = puVar2 + 1;\n    } while (pbVar6 != param_1);\n  }\n  FUN_0006ec30(0,0,local_534);\n  if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    \n    FUN_000a39d0();\n  }\n  return;\n}" { (declaration "int *piVar1;" primitive_type (pointer_declarator "*piVar1" * identifier) ;) (declaration "uint *puVar2;" type_identifier (pointer_declarator "*puVar2" * identifier) ;) (declaration "uint uVar3;" type_identifier identifier ;) (declaration "uint uVar4;" type_identifier identifier ;) (declaration "uint uVar5;" type_identifier identifier ;) (declaration "byte *pbVar6;" type_identifier (pointer_declarator "*pbVar6" * identifier) ;) (declaration "int iVar7;" primitive_type identifier ;) (declaration "uint uVar8;" type_identifier identifier ;) (declaration "int in_GS_OFFSET;" primitive_type identifier ;) (declaration "uint local_534;" type_identifier identifier ;) (declaration "int local_520 [16];" primitive_type (array_declarator "local_520 [16]" identifier [ number_literal ]) ;) (declaration "uint local_4e0 [16];" type_identifier (array_declarator "local_4e0 [16]" identifier [ number_literal ]) ;) (declaration "uint local_4a0 [288];" type_identifier (array_declarator "local_4a0 [288]" identifier [ number_literal ]) ;) (declaration "int local_20;" primitive_type identifier ;) (expression_statement "local_20 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "local_20 = *(int *)(in_GS_OFFSET + 0x14)" identifier = (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) ;) (expression_statement "puVar2 = (uint *)(local_520 + 1);" (assignment_expression "puVar2 = (uint *)(local_520 + 1)" identifier = (cast_expression "(uint *)(local_520 + 1)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(local_520 + 1)" ( (binary_expression "local_520 + 1" identifier + number_literal) )))) ;) (do_statement "do {\n    *puVar2 = 0;\n    puVar2 = puVar2 + 1;\n  } while (local_4e0 != puVar2);" do (compound_statement "{\n    *puVar2 = 0;\n    puVar2 = puVar2 + 1;\n  }" { (expression_statement "*puVar2 = 0;" (assignment_expression "*puVar2 = 0" (pointer_expression "*puVar2" * identifier) = number_literal) ;) (expression_statement "puVar2 = puVar2 + 1;" (assignment_expression "puVar2 = puVar2 + 1" identifier = (binary_expression "puVar2 + 1" identifier + number_literal)) ;) }) while (parenthesized_expression "(local_4e0 != puVar2)" ( (binary_expression "local_4e0 != puVar2" identifier != identifier) )) ;) (if_statement "if (param_2 < 1) {\n    local_534 = 0;\n  }\n  else {\n    uVar8 = 0;\n    pbVar6 = param_1;\n    do {\n      uVar3 = (uint)*pbVar6;\n      local_520[uVar3] = local_520[uVar3] + 1;\n      if (uVar8 < uVar3) {\n        uVar8 = uVar3;\n      }\n      pbVar6 = pbVar6 + 1;\n    } while (pbVar6 != param_1 + param_2);\n    local_534 = 9;\n    if (uVar8 < 10) {\n      local_534 = uVar8;\n    }\n  }" if (parenthesized_expression "(param_2 < 1)" ( (binary_expression "param_2 < 1" identifier < number_literal) )) (compound_statement "{\n    local_534 = 0;\n  }" { (expression_statement "local_534 = 0;" (assignment_expression "local_534 = 0" identifier = number_literal) ;) }) (else_clause "else {\n    uVar8 = 0;\n    pbVar6 = param_1;\n    do {\n      uVar3 = (uint)*pbVar6;\n      local_520[uVar3] = local_520[uVar3] + 1;\n      if (uVar8 < uVar3) {\n        uVar8 = uVar3;\n      }\n      pbVar6 = pbVar6 + 1;\n    } while (pbVar6 != param_1 + param_2);\n    local_534 = 9;\n    if (uVar8 < 10) {\n      local_534 = uVar8;\n    }\n  }" else (compound_statement "{\n    uVar8 = 0;\n    pbVar6 = param_1;\n    do {\n      uVar3 = (uint)*pbVar6;\n      local_520[uVar3] = local_520[uVar3] + 1;\n      if (uVar8 < uVar3) {\n        uVar8 = uVar3;\n      }\n      pbVar6 = pbVar6 + 1;\n    } while (pbVar6 != param_1 + param_2);\n    local_534 = 9;\n    if (uVar8 < 10) {\n      local_534 = uVar8;\n    }\n  }" { (expression_statement "uVar8 = 0;" (assignment_expression "uVar8 = 0" identifier = number_literal) ;) (expression_statement "pbVar6 = param_1;" (assignment_expression "pbVar6 = param_1" identifier = identifier) ;) (do_statement "do {\n      uVar3 = (uint)*pbVar6;\n      local_520[uVar3] = local_520[uVar3] + 1;\n      if (uVar8 < uVar3) {\n        uVar8 = uVar3;\n      }\n      pbVar6 = pbVar6 + 1;\n    } while (pbVar6 != param_1 + param_2);" do (compound_statement "{\n      uVar3 = (uint)*pbVar6;\n      local_520[uVar3] = local_520[uVar3] + 1;\n      if (uVar8 < uVar3) {\n        uVar8 = uVar3;\n      }\n      pbVar6 = pbVar6 + 1;\n    }" { (expression_statement "uVar3 = (uint)*pbVar6;" (assignment_expression "uVar3 = (uint)*pbVar6" identifier = (binary_expression "(uint)*pbVar6" (parenthesized_expression "(uint)" ( identifier )) * identifier)) ;) (expression_statement "local_520[uVar3] = local_520[uVar3] + 1;" (assignment_expression "local_520[uVar3] = local_520[uVar3] + 1" (subscript_expression "local_520[uVar3]" identifier [ identifier ]) = (binary_expression "local_520[uVar3] + 1" (subscript_expression "local_520[uVar3]" identifier [ identifier ]) + number_literal)) ;) (if_statement "if (uVar8 < uVar3) {\n        uVar8 = uVar3;\n      }" if (parenthesized_expression "(uVar8 < uVar3)" ( (binary_expression "uVar8 < uVar3" identifier < identifier) )) (compound_statement "{\n        uVar8 = uVar3;\n      }" { (expression_statement "uVar8 = uVar3;" (assignment_expression "uVar8 = uVar3" identifier = identifier) ;) })) (expression_statement "pbVar6 = pbVar6 + 1;" (assignment_expression "pbVar6 = pbVar6 + 1" identifier = (binary_expression "pbVar6 + 1" identifier + number_literal)) ;) }) while (parenthesized_expression "(pbVar6 != param_1 + param_2)" ( (binary_expression "pbVar6 != param_1 + param_2" identifier != (binary_expression "param_1 + param_2" identifier + identifier)) )) ;) (expression_statement "local_534 = 9;" (assignment_expression "local_534 = 9" identifier = number_literal) ;) (if_statement "if (uVar8 < 10) {\n      local_534 = uVar8;\n    }" if (parenthesized_expression "(uVar8 < 10)" ( (binary_expression "uVar8 < 10" identifier < number_literal) )) (compound_statement "{\n      local_534 = uVar8;\n    }" { (expression_statement "local_534 = uVar8;" (assignment_expression "local_534 = uVar8" identifier = identifier) ;) })) }))) (expression_statement "iVar7 = 1;" (assignment_expression "iVar7 = 1" identifier = number_literal) ;) (expression_statement "uVar8 = 0;" (assignment_expression "uVar8 = 0" identifier = number_literal) ;) (do_statement "do {\n    local_4e0[iVar7] = uVar8;\n    piVar1 = local_520 + iVar7;\n    iVar7 = iVar7 + 1;\n    uVar8 = (uVar8 + *piVar1) * 2;\n  } while (iVar7 != 0x10);" do (compound_statement "{\n    local_4e0[iVar7] = uVar8;\n    piVar1 = local_520 + iVar7;\n    iVar7 = iVar7 + 1;\n    uVar8 = (uVar8 + *piVar1) * 2;\n  }" { (expression_statement "local_4e0[iVar7] = uVar8;" (assignment_expression "local_4e0[iVar7] = uVar8" (subscript_expression "local_4e0[iVar7]" identifier [ identifier ]) = identifier) ;) (expression_statement "piVar1 = local_520 + iVar7;" (assignment_expression "piVar1 = local_520 + iVar7" identifier = (binary_expression "local_520 + iVar7" identifier + identifier)) ;) (expression_statement "iVar7 = iVar7 + 1;" (assignment_expression "iVar7 = iVar7 + 1" identifier = (binary_expression "iVar7 + 1" identifier + number_literal)) ;) (expression_statement "uVar8 = (uVar8 + *piVar1) * 2;" (assignment_expression "uVar8 = (uVar8 + *piVar1) * 2" identifier = (binary_expression "(uVar8 + *piVar1) * 2" (parenthesized_expression "(uVar8 + *piVar1)" ( (binary_expression "uVar8 + *piVar1" identifier + (pointer_expression "*piVar1" * identifier)) )) * number_literal)) ;) }) while (parenthesized_expression "(iVar7 != 0x10)" ( (binary_expression "iVar7 != 0x10" identifier != number_literal) )) ;) (if_statement "if (0 < param_2) {\n    puVar2 = local_4a0;\n    pbVar6 = param_1 + param_2;\n    do {\n      uVar3 = (uint)*param_1;\n      *puVar2 = 0;\n      uVar8 = local_4e0[uVar3];\n      local_4e0[uVar3] = uVar8 + 1;\n      if (uVar3 != 0) {\n        uVar4 = 0;\n        uVar5 = 0;\n        do {\n          uVar5 = uVar5 + 1;\n          uVar4 = uVar4 * 2 | uVar8 & 1;\n          uVar8 = (int)uVar8 >> 1;\n        } while (uVar3 != uVar5);\n        *puVar2 = uVar4;\n      }\n      param_1 = param_1 + 1;\n      puVar2 = puVar2 + 1;\n    } while (pbVar6 != param_1);\n  }" if (parenthesized_expression "(0 < param_2)" ( (binary_expression "0 < param_2" number_literal < identifier) )) (compound_statement "{\n    puVar2 = local_4a0;\n    pbVar6 = param_1 + param_2;\n    do {\n      uVar3 = (uint)*param_1;\n      *puVar2 = 0;\n      uVar8 = local_4e0[uVar3];\n      local_4e0[uVar3] = uVar8 + 1;\n      if (uVar3 != 0) {\n        uVar4 = 0;\n        uVar5 = 0;\n        do {\n          uVar5 = uVar5 + 1;\n          uVar4 = uVar4 * 2 | uVar8 & 1;\n          uVar8 = (int)uVar8 >> 1;\n        } while (uVar3 != uVar5);\n        *puVar2 = uVar4;\n      }\n      param_1 = param_1 + 1;\n      puVar2 = puVar2 + 1;\n    } while (pbVar6 != param_1);\n  }" { (expression_statement "puVar2 = local_4a0;" (assignment_expression "puVar2 = local_4a0" identifier = identifier) ;) (expression_statement "pbVar6 = param_1 + param_2;" (assignment_expression "pbVar6 = param_1 + param_2" identifier = (binary_expression "param_1 + param_2" identifier + identifier)) ;) (do_statement "do {\n      uVar3 = (uint)*param_1;\n      *puVar2 = 0;\n      uVar8 = local_4e0[uVar3];\n      local_4e0[uVar3] = uVar8 + 1;\n      if (uVar3 != 0) {\n        uVar4 = 0;\n        uVar5 = 0;\n        do {\n          uVar5 = uVar5 + 1;\n          uVar4 = uVar4 * 2 | uVar8 & 1;\n          uVar8 = (int)uVar8 >> 1;\n        } while (uVar3 != uVar5);\n        *puVar2 = uVar4;\n      }\n      param_1 = param_1 + 1;\n      puVar2 = puVar2 + 1;\n    } while (pbVar6 != param_1);" do (compound_statement "{\n      uVar3 = (uint)*param_1;\n      *puVar2 = 0;\n      uVar8 = local_4e0[uVar3];\n      local_4e0[uVar3] = uVar8 + 1;\n      if (uVar3 != 0) {\n        uVar4 = 0;\n        uVar5 = 0;\n        do {\n          uVar5 = uVar5 + 1;\n          uVar4 = uVar4 * 2 | uVar8 & 1;\n          uVar8 = (int)uVar8 >> 1;\n        } while (uVar3 != uVar5);\n        *puVar2 = uVar4;\n      }\n      param_1 = param_1 + 1;\n      puVar2 = puVar2 + 1;\n    }" { (expression_statement "uVar3 = (uint)*param_1;" (assignment_expression "uVar3 = (uint)*param_1" identifier = (binary_expression "(uint)*param_1" (parenthesized_expression "(uint)" ( identifier )) * identifier)) ;) (expression_statement "*puVar2 = 0;" (assignment_expression "*puVar2 = 0" (pointer_expression "*puVar2" * identifier) = number_literal) ;) (expression_statement "uVar8 = local_4e0[uVar3];" (assignment_expression "uVar8 = local_4e0[uVar3]" identifier = (subscript_expression "local_4e0[uVar3]" identifier [ identifier ])) ;) (expression_statement "local_4e0[uVar3] = uVar8 + 1;" (assignment_expression "local_4e0[uVar3] = uVar8 + 1" (subscript_expression "local_4e0[uVar3]" identifier [ identifier ]) = (binary_expression "uVar8 + 1" identifier + number_literal)) ;) (if_statement "if (uVar3 != 0) {\n        uVar4 = 0;\n        uVar5 = 0;\n        do {\n          uVar5 = uVar5 + 1;\n          uVar4 = uVar4 * 2 | uVar8 & 1;\n          uVar8 = (int)uVar8 >> 1;\n        } while (uVar3 != uVar5);\n        *puVar2 = uVar4;\n      }" if (parenthesized_expression "(uVar3 != 0)" ( (binary_expression "uVar3 != 0" identifier != number_literal) )) (compound_statement "{\n        uVar4 = 0;\n        uVar5 = 0;\n        do {\n          uVar5 = uVar5 + 1;\n          uVar4 = uVar4 * 2 | uVar8 & 1;\n          uVar8 = (int)uVar8 >> 1;\n        } while (uVar3 != uVar5);\n        *puVar2 = uVar4;\n      }" { (expression_statement "uVar4 = 0;" (assignment_expression "uVar4 = 0" identifier = number_literal) ;) (expression_statement "uVar5 = 0;" (assignment_expression "uVar5 = 0" identifier = number_literal) ;) (do_statement "do {\n          uVar5 = uVar5 + 1;\n          uVar4 = uVar4 * 2 | uVar8 & 1;\n          uVar8 = (int)uVar8 >> 1;\n        } while (uVar3 != uVar5);" do (compound_statement "{\n          uVar5 = uVar5 + 1;\n          uVar4 = uVar4 * 2 | uVar8 & 1;\n          uVar8 = (int)uVar8 >> 1;\n        }" { (expression_statement "uVar5 = uVar5 + 1;" (assignment_expression "uVar5 = uVar5 + 1" identifier = (binary_expression "uVar5 + 1" identifier + number_literal)) ;) (expression_statement "uVar4 = uVar4 * 2 | uVar8 & 1;" (assignment_expression "uVar4 = uVar4 * 2 | uVar8 & 1" identifier = (binary_expression "uVar4 * 2 | uVar8 & 1" (binary_expression "uVar4 * 2" identifier * number_literal) | (binary_expression "uVar8 & 1" identifier & number_literal))) ;) (expression_statement "uVar8 = (int)uVar8 >> 1;" (assignment_expression "uVar8 = (int)uVar8 >> 1" identifier = (binary_expression "(int)uVar8 >> 1" (cast_expression "(int)uVar8" ( (type_descriptor "int" primitive_type) ) identifier) >> number_literal)) ;) }) while (parenthesized_expression "(uVar3 != uVar5)" ( (binary_expression "uVar3 != uVar5" identifier != identifier) )) ;) (expression_statement "*puVar2 = uVar4;" (assignment_expression "*puVar2 = uVar4" (pointer_expression "*puVar2" * identifier) = identifier) ;) })) (expression_statement "param_1 = param_1 + 1;" (assignment_expression "param_1 = param_1 + 1" identifier = (binary_expression "param_1 + 1" identifier + number_literal)) ;) (expression_statement "puVar2 = puVar2 + 1;" (assignment_expression "puVar2 = puVar2 + 1" identifier = (binary_expression "puVar2 + 1" identifier + number_literal)) ;) }) while (parenthesized_expression "(pbVar6 != param_1)" ( (binary_expression "pbVar6 != param_1" identifier != identifier) )) ;) })) (expression_statement "FUN_0006ec30(0,0,local_534);" (call_expression "FUN_0006ec30(0,0,local_534)" identifier (argument_list "(0,0,local_534)" ( number_literal , number_literal , identifier ))) ;) (if_statement "if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    \n    FUN_000a39d0();\n  }" if (parenthesized_expression "(local_20 != *(int *)(in_GS_OFFSET + 0x14))" ( (binary_expression "local_20 != *(int *)(in_GS_OFFSET + 0x14)" identifier != (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) )) (compound_statement "{\n                    \n    FUN_000a39d0();\n  }" { (expression_statement "FUN_000a39d0();" (call_expression "FUN_000a39d0()" identifier (argument_list "()" ( ))) ;) })) (return_statement "return;" return ;) })))
(translation_unit (function_definition TYPE (ERROR IDENT) (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE (pointer_declarator * IDENT)) , (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE (array_declarator IDENT [ LIT ]) ;) (declaration TYPE (array_declarator IDENT [ LIT ]) ;) (declaration TYPE (array_declarator IDENT [ LIT ]) ;) (declaration TYPE 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 = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) ;) (do_statement do (compound_statement { (expression_statement (assignment_expression (pointer_expression * IDENT) = LIT) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) }) while (parenthesized_expression ( (binary_expression IDENT != IDENT) )) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT < LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) }) (else_clause else (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (do_statement do (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression (parenthesized_expression ( IDENT )) * IDENT)) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ IDENT ]) = (binary_expression (subscript_expression IDENT [ IDENT ]) + LIT)) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT < IDENT) )) (compound_statement { (expression_statement (assignment_expression IDENT = IDENT) ;) })) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) }) while (parenthesized_expression ( (binary_expression IDENT != (binary_expression IDENT + IDENT)) )) ;) (expression_statement (assignment_expression IDENT = LIT) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT < LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = IDENT) ;) })) }))) (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = LIT) ;) (do_statement do (compound_statement { (expression_statement (assignment_expression (subscript_expression IDENT [ IDENT ]) = IDENT) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + IDENT)) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (expression_statement (assignment_expression IDENT = (binary_expression (parenthesized_expression ( (binary_expression IDENT + (pointer_expression * IDENT)) )) * LIT)) ;) }) while (parenthesized_expression ( (binary_expression IDENT != LIT) )) ;) (if_statement if (parenthesized_expression ( (binary_expression LIT < IDENT) )) (compound_statement { (expression_statement (assignment_expression IDENT = IDENT) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + IDENT)) ;) (do_statement do (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression (parenthesized_expression ( IDENT )) * IDENT)) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = LIT) ;) (expression_statement (assignment_expression IDENT = (subscript_expression IDENT [ IDENT ])) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ IDENT ]) = (binary_expression IDENT + LIT)) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = LIT) ;) (do_statement do (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (expression_statement (assignment_expression IDENT = (binary_expression (binary_expression IDENT * LIT) | (binary_expression IDENT & LIT))) ;) (expression_statement (assignment_expression IDENT = (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) >> LIT)) ;) }) while (parenthesized_expression ( (binary_expression IDENT != IDENT) )) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = IDENT) ;) })) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) }) while (parenthesized_expression ( (binary_expression IDENT != IDENT) )) ;) })) (expression_statement (call_expression IDENT (argument_list ( LIT , LIT , IDENT ))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( ))) ;) })) (return_statement return ;) })))
(function_definition "void __regparm3 FUN_0006ee20(byte *param_1,int param_2)\n\n{\n  int *piVar1;\n  uint *puVar2;\n  uint uVar3;\n  uint uVar4;\n  uint uVar5;\n  byte *pbVar6;\n  int iVar7;\n  uint uVar8;\n  int in_GS_OFFSET;\n  uint local_534;\n  int local_520 [16];\n  uint local_4e0 [16];\n  uint local_4a0 [288];\n  int local_20;\n  \n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  puVar2 = (uint *)(local_520 + 1);\n  do {\n    *puVar2 = 0;\n    puVar2 = puVar2 + 1;\n  } while (local_4e0 != puVar2);\n  if (param_2 < 1) {\n    local_534 = 0;\n  }\n  else {\n    uVar8 = 0;\n    pbVar6 = param_1;\n    do {\n      uVar3 = (uint)*pbVar6;\n      local_520[uVar3] = local_520[uVar3] + 1;\n      if (uVar8 < uVar3) {\n        uVar8 = uVar3;\n      }\n      pbVar6 = pbVar6 + 1;\n    } while (pbVar6 != param_1 + param_2);\n    local_534 = 9;\n    if (uVar8 < 10) {\n      local_534 = uVar8;\n    }\n  }\n  iVar7 = 1;\n  uVar8 = 0;\n  do {\n    local_4e0[iVar7] = uVar8;\n    piVar1 = local_520 + iVar7;\n    iVar7 = iVar7 + 1;\n    uVar8 = (uVar8 + *piVar1) * 2;\n  } while (iVar7 != 0x10);\n  if (0 < param_2) {\n    puVar2 = local_4a0;\n    pbVar6 = param_1 + param_2;\n    do {\n      uVar3 = (uint)*param_1;\n      *puVar2 = 0;\n      uVar8 = local_4e0[uVar3];\n      local_4e0[uVar3] = uVar8 + 1;\n      if (uVar3 != 0) {\n        uVar4 = 0;\n        uVar5 = 0;\n        do {\n          uVar5 = uVar5 + 1;\n          uVar4 = uVar4 * 2 | uVar8 & 1;\n          uVar8 = (int)uVar8 >> 1;\n        } while (uVar3 != uVar5);\n        *puVar2 = uVar4;\n      }\n      param_1 = param_1 + 1;\n      puVar2 = puVar2 + 1;\n    } while (pbVar6 != param_1);\n  }\n  FUN_0006ec30(0,0,local_534);\n  if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    \n    FUN_000a39d0();\n  }\n  return;\n}" (primitive_type "void") (ERROR "__regparm3" (identifier "__regparm3")) (function_declarator "FUN_0006ee20(byte *param_1,int param_2)" (identifier "FUN_0006ee20") (parameter_list "(byte *param_1,int param_2)" (( "(") (parameter_declaration "byte *param_1" (type_identifier "byte") (pointer_declarator "*param_1" (* "*") (identifier "param_1"))) (, ",") (parameter_declaration "int param_2" (primitive_type "int") (identifier "param_2")) () ")"))) (compound_statement "{\n  int *piVar1;\n  uint *puVar2;\n  uint uVar3;\n  uint uVar4;\n  uint uVar5;\n  byte *pbVar6;\n  int iVar7;\n  uint uVar8;\n  int in_GS_OFFSET;\n  uint local_534;\n  int local_520 [16];\n  uint local_4e0 [16];\n  uint local_4a0 [288];\n  int local_20;\n  \n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  puVar2 = (uint *)(local_520 + 1);\n  do {\n    *puVar2 = 0;\n    puVar2 = puVar2 + 1;\n  } while (local_4e0 != puVar2);\n  if (param_2 < 1) {\n    local_534 = 0;\n  }\n  else {\n    uVar8 = 0;\n    pbVar6 = param_1;\n    do {\n      uVar3 = (uint)*pbVar6;\n      local_520[uVar3] = local_520[uVar3] + 1;\n      if (uVar8 < uVar3) {\n        uVar8 = uVar3;\n      }\n      pbVar6 = pbVar6 + 1;\n    } while (pbVar6 != param_1 + param_2);\n    local_534 = 9;\n    if (uVar8 < 10) {\n      local_534 = uVar8;\n    }\n  }\n  iVar7 = 1;\n  uVar8 = 0;\n  do {\n    local_4e0[iVar7] = uVar8;\n    piVar1 = local_520 + iVar7;\n    iVar7 = iVar7 + 1;\n    uVar8 = (uVar8 + *piVar1) * 2;\n  } while (iVar7 != 0x10);\n  if (0 < param_2) {\n    puVar2 = local_4a0;\n    pbVar6 = param_1 + param_2;\n    do {\n      uVar3 = (uint)*param_1;\n      *puVar2 = 0;\n      uVar8 = local_4e0[uVar3];\n      local_4e0[uVar3] = uVar8 + 1;\n      if (uVar3 != 0) {\n        uVar4 = 0;\n        uVar5 = 0;\n        do {\n          uVar5 = uVar5 + 1;\n          uVar4 = uVar4 * 2 | uVar8 & 1;\n          uVar8 = (int)uVar8 >> 1;\n        } while (uVar3 != uVar5);\n        *puVar2 = uVar4;\n      }\n      param_1 = param_1 + 1;\n      puVar2 = puVar2 + 1;\n    } while (pbVar6 != param_1);\n  }\n  FUN_0006ec30(0,0,local_534);\n  if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    \n    FUN_000a39d0();\n  }\n  return;\n}" ({ "{") (declaration "int *piVar1;" (primitive_type "int") (pointer_declarator "*piVar1" (* "*") (identifier "piVar1")) (; ";")) (declaration "uint *puVar2;" (type_identifier "uint") (pointer_declarator "*puVar2" (* "*") (identifier "puVar2")) (; ";")) (declaration "uint uVar3;" (type_identifier "uint") (identifier "uVar3") (; ";")) (declaration "uint uVar4;" (type_identifier "uint") (identifier "uVar4") (; ";")) (declaration "uint uVar5;" (type_identifier "uint") (identifier "uVar5") (; ";")) (declaration "byte *pbVar6;" (type_identifier "byte") (pointer_declarator "*pbVar6" (* "*") (identifier "pbVar6")) (; ";")) (declaration "int iVar7;" (primitive_type "int") (identifier "iVar7") (; ";")) (declaration "uint uVar8;" (type_identifier "uint") (identifier "uVar8") (; ";")) (declaration "int in_GS_OFFSET;" (primitive_type "int") (identifier "in_GS_OFFSET") (; ";")) (declaration "uint local_534;" (type_identifier "uint") (identifier "local_534") (; ";")) (declaration "int local_520 [16];" (primitive_type "int") (array_declarator "local_520 [16]" (identifier "local_520") ([ "[") (number_literal "16") (] "]")) (; ";")) (declaration "uint local_4e0 [16];" (type_identifier "uint") (array_declarator "local_4e0 [16]" (identifier "local_4e0") ([ "[") (number_literal "16") (] "]")) (; ";")) (declaration "uint local_4a0 [288];" (type_identifier "uint") (array_declarator "local_4a0 [288]" (identifier "local_4a0") ([ "[") (number_literal "288") (] "]")) (; ";")) (declaration "int local_20;" (primitive_type "int") (identifier "local_20") (; ";")) (expression_statement "local_20 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "local_20 = *(int *)(in_GS_OFFSET + 0x14)" (identifier "local_20") (= "=") (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" (* "*") (cast_expression "(int *)(in_GS_OFFSET + 0x14)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(in_GS_OFFSET + 0x14)" (( "(") (binary_expression "in_GS_OFFSET + 0x14" (identifier "in_GS_OFFSET") (+ "+") (number_literal "0x14")) () ")"))))) (; ";")) (expression_statement "puVar2 = (uint *)(local_520 + 1);" (assignment_expression "puVar2 = (uint *)(local_520 + 1)" (identifier "puVar2") (= "=") (cast_expression "(uint *)(local_520 + 1)" (( "(") (type_descriptor "uint *" (type_identifier "uint") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(local_520 + 1)" (( "(") (binary_expression "local_520 + 1" (identifier "local_520") (+ "+") (number_literal "1")) () ")")))) (; ";")) (do_statement "do {\n    *puVar2 = 0;\n    puVar2 = puVar2 + 1;\n  } while (local_4e0 != puVar2);" (do "do") (compound_statement "{\n    *puVar2 = 0;\n    puVar2 = puVar2 + 1;\n  }" ({ "{") (expression_statement "*puVar2 = 0;" (assignment_expression "*puVar2 = 0" (pointer_expression "*puVar2" (* "*") (identifier "puVar2")) (= "=") (number_literal "0")) (; ";")) (expression_statement "puVar2 = puVar2 + 1;" (assignment_expression "puVar2 = puVar2 + 1" (identifier "puVar2") (= "=") (binary_expression "puVar2 + 1" (identifier "puVar2") (+ "+") (number_literal "1"))) (; ";")) (} "}")) (while "while") (parenthesized_expression "(local_4e0 != puVar2)" (( "(") (binary_expression "local_4e0 != puVar2" (identifier "local_4e0") (!= "!=") (identifier "puVar2")) () ")")) (; ";")) (if_statement "if (param_2 < 1) {\n    local_534 = 0;\n  }\n  else {\n    uVar8 = 0;\n    pbVar6 = param_1;\n    do {\n      uVar3 = (uint)*pbVar6;\n      local_520[uVar3] = local_520[uVar3] + 1;\n      if (uVar8 < uVar3) {\n        uVar8 = uVar3;\n      }\n      pbVar6 = pbVar6 + 1;\n    } while (pbVar6 != param_1 + param_2);\n    local_534 = 9;\n    if (uVar8 < 10) {\n      local_534 = uVar8;\n    }\n  }" (if "if") (parenthesized_expression "(param_2 < 1)" (( "(") (binary_expression "param_2 < 1" (identifier "param_2") (< "<") (number_literal "1")) () ")")) (compound_statement "{\n    local_534 = 0;\n  }" ({ "{") (expression_statement "local_534 = 0;" (assignment_expression "local_534 = 0" (identifier "local_534") (= "=") (number_literal "0")) (; ";")) (} "}")) (else_clause "else {\n    uVar8 = 0;\n    pbVar6 = param_1;\n    do {\n      uVar3 = (uint)*pbVar6;\n      local_520[uVar3] = local_520[uVar3] + 1;\n      if (uVar8 < uVar3) {\n        uVar8 = uVar3;\n      }\n      pbVar6 = pbVar6 + 1;\n    } while (pbVar6 != param_1 + param_2);\n    local_534 = 9;\n    if (uVar8 < 10) {\n      local_534 = uVar8;\n    }\n  }" (else "else") (compound_statement "{\n    uVar8 = 0;\n    pbVar6 = param_1;\n    do {\n      uVar3 = (uint)*pbVar6;\n      local_520[uVar3] = local_520[uVar3] + 1;\n      if (uVar8 < uVar3) {\n        uVar8 = uVar3;\n      }\n      pbVar6 = pbVar6 + 1;\n    } while (pbVar6 != param_1 + param_2);\n    local_534 = 9;\n    if (uVar8 < 10) {\n      local_534 = uVar8;\n    }\n  }" ({ "{") (expression_statement "uVar8 = 0;" (assignment_expression "uVar8 = 0" (identifier "uVar8") (= "=") (number_literal "0")) (; ";")) (expression_statement "pbVar6 = param_1;" (assignment_expression "pbVar6 = param_1" (identifier "pbVar6") (= "=") (identifier "param_1")) (; ";")) (do_statement "do {\n      uVar3 = (uint)*pbVar6;\n      local_520[uVar3] = local_520[uVar3] + 1;\n      if (uVar8 < uVar3) {\n        uVar8 = uVar3;\n      }\n      pbVar6 = pbVar6 + 1;\n    } while (pbVar6 != param_1 + param_2);" (do "do") (compound_statement "{\n      uVar3 = (uint)*pbVar6;\n      local_520[uVar3] = local_520[uVar3] + 1;\n      if (uVar8 < uVar3) {\n        uVar8 = uVar3;\n      }\n      pbVar6 = pbVar6 + 1;\n    }" ({ "{") (expression_statement "uVar3 = (uint)*pbVar6;" (assignment_expression "uVar3 = (uint)*pbVar6" (identifier "uVar3") (= "=") (binary_expression "(uint)*pbVar6" (parenthesized_expression "(uint)" (( "(") (identifier "uint") () ")")) (* "*") (identifier "pbVar6"))) (; ";")) (expression_statement "local_520[uVar3] = local_520[uVar3] + 1;" (assignment_expression "local_520[uVar3] = local_520[uVar3] + 1" (subscript_expression "local_520[uVar3]" (identifier "local_520") ([ "[") (identifier "uVar3") (] "]")) (= "=") (binary_expression "local_520[uVar3] + 1" (subscript_expression "local_520[uVar3]" (identifier "local_520") ([ "[") (identifier "uVar3") (] "]")) (+ "+") (number_literal "1"))) (; ";")) (if_statement "if (uVar8 < uVar3) {\n        uVar8 = uVar3;\n      }" (if "if") (parenthesized_expression "(uVar8 < uVar3)" (( "(") (binary_expression "uVar8 < uVar3" (identifier "uVar8") (< "<") (identifier "uVar3")) () ")")) (compound_statement "{\n        uVar8 = uVar3;\n      }" ({ "{") (expression_statement "uVar8 = uVar3;" (assignment_expression "uVar8 = uVar3" (identifier "uVar8") (= "=") (identifier "uVar3")) (; ";")) (} "}"))) (expression_statement "pbVar6 = pbVar6 + 1;" (assignment_expression "pbVar6 = pbVar6 + 1" (identifier "pbVar6") (= "=") (binary_expression "pbVar6 + 1" (identifier "pbVar6") (+ "+") (number_literal "1"))) (; ";")) (} "}")) (while "while") (parenthesized_expression "(pbVar6 != param_1 + param_2)" (( "(") (binary_expression "pbVar6 != param_1 + param_2" (identifier "pbVar6") (!= "!=") (binary_expression "param_1 + param_2" (identifier "param_1") (+ "+") (identifier "param_2"))) () ")")) (; ";")) (expression_statement "local_534 = 9;" (assignment_expression "local_534 = 9" (identifier "local_534") (= "=") (number_literal "9")) (; ";")) (if_statement "if (uVar8 < 10) {\n      local_534 = uVar8;\n    }" (if "if") (parenthesized_expression "(uVar8 < 10)" (( "(") (binary_expression "uVar8 < 10" (identifier "uVar8") (< "<") (number_literal "10")) () ")")) (compound_statement "{\n      local_534 = uVar8;\n    }" ({ "{") (expression_statement "local_534 = uVar8;" (assignment_expression "local_534 = uVar8" (identifier "local_534") (= "=") (identifier "uVar8")) (; ";")) (} "}"))) (} "}")))) (expression_statement "iVar7 = 1;" (assignment_expression "iVar7 = 1" (identifier "iVar7") (= "=") (number_literal "1")) (; ";")) (expression_statement "uVar8 = 0;" (assignment_expression "uVar8 = 0" (identifier "uVar8") (= "=") (number_literal "0")) (; ";")) (do_statement "do {\n    local_4e0[iVar7] = uVar8;\n    piVar1 = local_520 + iVar7;\n    iVar7 = iVar7 + 1;\n    uVar8 = (uVar8 + *piVar1) * 2;\n  } while (iVar7 != 0x10);" (do "do") (compound_statement "{\n    local_4e0[iVar7] = uVar8;\n    piVar1 = local_520 + iVar7;\n    iVar7 = iVar7 + 1;\n    uVar8 = (uVar8 + *piVar1) * 2;\n  }" ({ "{") (expression_statement "local_4e0[iVar7] = uVar8;" (assignment_expression "local_4e0[iVar7] = uVar8" (subscript_expression "local_4e0[iVar7]" (identifier "local_4e0") ([ "[") (identifier "iVar7") (] "]")) (= "=") (identifier "uVar8")) (; ";")) (expression_statement "piVar1 = local_520 + iVar7;" (assignment_expression "piVar1 = local_520 + iVar7" (identifier "piVar1") (= "=") (binary_expression "local_520 + iVar7" (identifier "local_520") (+ "+") (identifier "iVar7"))) (; ";")) (expression_statement "iVar7 = iVar7 + 1;" (assignment_expression "iVar7 = iVar7 + 1" (identifier "iVar7") (= "=") (binary_expression "iVar7 + 1" (identifier "iVar7") (+ "+") (number_literal "1"))) (; ";")) (expression_statement "uVar8 = (uVar8 + *piVar1) * 2;" (assignment_expression "uVar8 = (uVar8 + *piVar1) * 2" (identifier "uVar8") (= "=") (binary_expression "(uVar8 + *piVar1) * 2" (parenthesized_expression "(uVar8 + *piVar1)" (( "(") (binary_expression "uVar8 + *piVar1" (identifier "uVar8") (+ "+") (pointer_expression "*piVar1" (* "*") (identifier "piVar1"))) () ")")) (* "*") (number_literal "2"))) (; ";")) (} "}")) (while "while") (parenthesized_expression "(iVar7 != 0x10)" (( "(") (binary_expression "iVar7 != 0x10" (identifier "iVar7") (!= "!=") (number_literal "0x10")) () ")")) (; ";")) (if_statement "if (0 < param_2) {\n    puVar2 = local_4a0;\n    pbVar6 = param_1 + param_2;\n    do {\n      uVar3 = (uint)*param_1;\n      *puVar2 = 0;\n      uVar8 = local_4e0[uVar3];\n      local_4e0[uVar3] = uVar8 + 1;\n      if (uVar3 != 0) {\n        uVar4 = 0;\n        uVar5 = 0;\n        do {\n          uVar5 = uVar5 + 1;\n          uVar4 = uVar4 * 2 | uVar8 & 1;\n          uVar8 = (int)uVar8 >> 1;\n        } while (uVar3 != uVar5);\n        *puVar2 = uVar4;\n      }\n      param_1 = param_1 + 1;\n      puVar2 = puVar2 + 1;\n    } while (pbVar6 != param_1);\n  }" (if "if") (parenthesized_expression "(0 < param_2)" (( "(") (binary_expression "0 < param_2" (number_literal "0") (< "<") (identifier "param_2")) () ")")) (compound_statement "{\n    puVar2 = local_4a0;\n    pbVar6 = param_1 + param_2;\n    do {\n      uVar3 = (uint)*param_1;\n      *puVar2 = 0;\n      uVar8 = local_4e0[uVar3];\n      local_4e0[uVar3] = uVar8 + 1;\n      if (uVar3 != 0) {\n        uVar4 = 0;\n        uVar5 = 0;\n        do {\n          uVar5 = uVar5 + 1;\n          uVar4 = uVar4 * 2 | uVar8 & 1;\n          uVar8 = (int)uVar8 >> 1;\n        } while (uVar3 != uVar5);\n        *puVar2 = uVar4;\n      }\n      param_1 = param_1 + 1;\n      puVar2 = puVar2 + 1;\n    } while (pbVar6 != param_1);\n  }" ({ "{") (expression_statement "puVar2 = local_4a0;" (assignment_expression "puVar2 = local_4a0" (identifier "puVar2") (= "=") (identifier "local_4a0")) (; ";")) (expression_statement "pbVar6 = param_1 + param_2;" (assignment_expression "pbVar6 = param_1 + param_2" (identifier "pbVar6") (= "=") (binary_expression "param_1 + param_2" (identifier "param_1") (+ "+") (identifier "param_2"))) (; ";")) (do_statement "do {\n      uVar3 = (uint)*param_1;\n      *puVar2 = 0;\n      uVar8 = local_4e0[uVar3];\n      local_4e0[uVar3] = uVar8 + 1;\n      if (uVar3 != 0) {\n        uVar4 = 0;\n        uVar5 = 0;\n        do {\n          uVar5 = uVar5 + 1;\n          uVar4 = uVar4 * 2 | uVar8 & 1;\n          uVar8 = (int)uVar8 >> 1;\n        } while (uVar3 != uVar5);\n        *puVar2 = uVar4;\n      }\n      param_1 = param_1 + 1;\n      puVar2 = puVar2 + 1;\n    } while (pbVar6 != param_1);" (do "do") (compound_statement "{\n      uVar3 = (uint)*param_1;\n      *puVar2 = 0;\n      uVar8 = local_4e0[uVar3];\n      local_4e0[uVar3] = uVar8 + 1;\n      if (uVar3 != 0) {\n        uVar4 = 0;\n        uVar5 = 0;\n        do {\n          uVar5 = uVar5 + 1;\n          uVar4 = uVar4 * 2 | uVar8 & 1;\n          uVar8 = (int)uVar8 >> 1;\n        } while (uVar3 != uVar5);\n        *puVar2 = uVar4;\n      }\n      param_1 = param_1 + 1;\n      puVar2 = puVar2 + 1;\n    }" ({ "{") (expression_statement "uVar3 = (uint)*param_1;" (assignment_expression "uVar3 = (uint)*param_1" (identifier "uVar3") (= "=") (binary_expression "(uint)*param_1" (parenthesized_expression "(uint)" (( "(") (identifier "uint") () ")")) (* "*") (identifier "param_1"))) (; ";")) (expression_statement "*puVar2 = 0;" (assignment_expression "*puVar2 = 0" (pointer_expression "*puVar2" (* "*") (identifier "puVar2")) (= "=") (number_literal "0")) (; ";")) (expression_statement "uVar8 = local_4e0[uVar3];" (assignment_expression "uVar8 = local_4e0[uVar3]" (identifier "uVar8") (= "=") (subscript_expression "local_4e0[uVar3]" (identifier "local_4e0") ([ "[") (identifier "uVar3") (] "]"))) (; ";")) (expression_statement "local_4e0[uVar3] = uVar8 + 1;" (assignment_expression "local_4e0[uVar3] = uVar8 + 1" (subscript_expression "local_4e0[uVar3]" (identifier "local_4e0") ([ "[") (identifier "uVar3") (] "]")) (= "=") (binary_expression "uVar8 + 1" (identifier "uVar8") (+ "+") (number_literal "1"))) (; ";")) (if_statement "if (uVar3 != 0) {\n        uVar4 = 0;\n        uVar5 = 0;\n        do {\n          uVar5 = uVar5 + 1;\n          uVar4 = uVar4 * 2 | uVar8 & 1;\n          uVar8 = (int)uVar8 >> 1;\n        } while (uVar3 != uVar5);\n        *puVar2 = uVar4;\n      }" (if "if") (parenthesized_expression "(uVar3 != 0)" (( "(") (binary_expression "uVar3 != 0" (identifier "uVar3") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n        uVar4 = 0;\n        uVar5 = 0;\n        do {\n          uVar5 = uVar5 + 1;\n          uVar4 = uVar4 * 2 | uVar8 & 1;\n          uVar8 = (int)uVar8 >> 1;\n        } while (uVar3 != uVar5);\n        *puVar2 = uVar4;\n      }" ({ "{") (expression_statement "uVar4 = 0;" (assignment_expression "uVar4 = 0" (identifier "uVar4") (= "=") (number_literal "0")) (; ";")) (expression_statement "uVar5 = 0;" (assignment_expression "uVar5 = 0" (identifier "uVar5") (= "=") (number_literal "0")) (; ";")) (do_statement "do {\n          uVar5 = uVar5 + 1;\n          uVar4 = uVar4 * 2 | uVar8 & 1;\n          uVar8 = (int)uVar8 >> 1;\n        } while (uVar3 != uVar5);" (do "do") (compound_statement "{\n          uVar5 = uVar5 + 1;\n          uVar4 = uVar4 * 2 | uVar8 & 1;\n          uVar8 = (int)uVar8 >> 1;\n        }" ({ "{") (expression_statement "uVar5 = uVar5 + 1;" (assignment_expression "uVar5 = uVar5 + 1" (identifier "uVar5") (= "=") (binary_expression "uVar5 + 1" (identifier "uVar5") (+ "+") (number_literal "1"))) (; ";")) (expression_statement "uVar4 = uVar4 * 2 | uVar8 & 1;" (assignment_expression "uVar4 = uVar4 * 2 | uVar8 & 1" (identifier "uVar4") (= "=") (binary_expression "uVar4 * 2 | uVar8 & 1" (binary_expression "uVar4 * 2" (identifier "uVar4") (* "*") (number_literal "2")) (| "|") (binary_expression "uVar8 & 1" (identifier "uVar8") (& "&") (number_literal "1")))) (; ";")) (expression_statement "uVar8 = (int)uVar8 >> 1;" (assignment_expression "uVar8 = (int)uVar8 >> 1" (identifier "uVar8") (= "=") (binary_expression "(int)uVar8 >> 1" (cast_expression "(int)uVar8" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "uVar8")) (>> ">>") (number_literal "1"))) (; ";")) (} "}")) (while "while") (parenthesized_expression "(uVar3 != uVar5)" (( "(") (binary_expression "uVar3 != uVar5" (identifier "uVar3") (!= "!=") (identifier "uVar5")) () ")")) (; ";")) (expression_statement "*puVar2 = uVar4;" (assignment_expression "*puVar2 = uVar4" (pointer_expression "*puVar2" (* "*") (identifier "puVar2")) (= "=") (identifier "uVar4")) (; ";")) (} "}"))) (expression_statement "param_1 = param_1 + 1;" (assignment_expression "param_1 = param_1 + 1" (identifier "param_1") (= "=") (binary_expression "param_1 + 1" (identifier "param_1") (+ "+") (number_literal "1"))) (; ";")) (expression_statement "puVar2 = puVar2 + 1;" (assignment_expression "puVar2 = puVar2 + 1" (identifier "puVar2") (= "=") (binary_expression "puVar2 + 1" (identifier "puVar2") (+ "+") (number_literal "1"))) (; ";")) (} "}")) (while "while") (parenthesized_expression "(pbVar6 != param_1)" (( "(") (binary_expression "pbVar6 != param_1" (identifier "pbVar6") (!= "!=") (identifier "param_1")) () ")")) (; ";")) (} "}"))) (expression_statement "FUN_0006ec30(0,0,local_534);" (call_expression "FUN_0006ec30(0,0,local_534)" (identifier "FUN_0006ec30") (argument_list "(0,0,local_534)" (( "(") (number_literal "0") (, ",") (number_literal "0") (, ",") (identifier "local_534") () ")"))) (; ";")) (if_statement "if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    \n    FUN_000a39d0();\n  }" (if "if") (parenthesized_expression "(local_20 != *(int *)(in_GS_OFFSET + 0x14))" (( "(") (binary_expression "local_20 != *(int *)(in_GS_OFFSET + 0x14)" (identifier "local_20") (!= "!=") (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" (* "*") (cast_expression "(int *)(in_GS_OFFSET + 0x14)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(in_GS_OFFSET + 0x14)" (( "(") (binary_expression "in_GS_OFFSET + 0x14" (identifier "in_GS_OFFSET") (+ "+") (number_literal "0x14")) () ")"))))) () ")")) (compound_statement "{\n                    \n    FUN_000a39d0();\n  }" ({ "{") (expression_statement "FUN_000a39d0();" (call_expression "FUN_000a39d0()" (identifier "FUN_000a39d0") (argument_list "()" (( "(") () ")"))) (; ";")) (} "}"))) (return_statement "return;" (return "return") (; ";")) (} "}")))

type_2 * __regparm3 zlib_mktable(uchar *var_9,int var_5)

{
  int var_16;
  int *var_3;
  type_1 var_8;
  int var_11;
  type_1 var_13;
  type_2 *pzVar6;
  type_1 var_12;
  type_3 *var_6;
  int var_10;
  type_1 var_7;
  type_1 *var_14;
  int var_1;
  type_1 local_534;
  int *local_530;
  int var_2 [16];
  int var_4 [16];
  int codes [288];
  
  var_16 = *(int *)(var_1 + 0x14);
  var_3 = var_2 + 1;
  do {
    *var_3 = 0;
    var_3 = var_3 + 1;
  } while (var_4 != var_3);
  if (var_5 < 1) {
    local_534 = 0;
  }
  else {
    var_7 = 0;
    var_6 = var_9;
    do {
      var_8 = (type_1)*var_6;
      var_2[var_8] = var_2[var_8] + 1;
      if (var_7 < var_8) {
        var_7 = var_8;
      }
      var_6 = var_6 + 1;
    } while (var_6 != var_9 + var_5);
    local_534 = 9;
    if (var_7 < 10) {
      local_534 = var_7;
    }
  }
  var_10 = 1;
  var_11 = 0;
  do {
    var_4[var_10] = var_11;
    var_3 = var_2 + var_10;
    var_10 = var_10 + 1;
    var_11 = (var_11 + *var_3) * 2;
  } while (var_10 != 0x10);
  if (0 < var_5) {
    var_14 = (type_1 *)codes;
    var_6 = var_9;
    do {
      var_8 = (type_1)*var_6;
      *var_14 = 0;
      var_7 = var_4[var_8];
      var_4[var_8] = var_7 + 1;
      if (var_8 != 0) {
        var_13 = 0;
        var_12 = 0;
        do {
          var_12 = var_12 + 1;
          var_13 = var_13 * 2 | var_7 & 1;
          var_7 = (int)var_7 >> 1;
        } while (var_8 != var_12);
        *var_14 = var_13;
      }
      var_6 = var_6 + 1;
      var_14 = var_14 + 1;
    } while (var_9 + var_5 != var_6);
  }
  local_530 = codes;
  pzVar6 = var_15(local_530,var_9,var_5,0,0,local_534);
  if (var_16 != *(int *)(var_1 + 0x14)) {
                    /* WARNING: Subroutine does not return */
    var_17();
  }
  return pzVar6;
}


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

void __regparm3 MASKED(byte *param_1,int param_2)

{
  int *piVar1;
  uint *puVar2;
  uint uVar3;
  uint uVar4;
  uint uVar5;
  byte *pbVar6;
  int iVar7;
  uint uVar8;
  int in_GS_OFFSET;
  uint local_534;
  int local_520 [16];
  uint local_4e0 [16];
  uint local_4a0 [288];
  int local_20;
  
  local_20 = *(int *)(in_GS_OFFSET + 0x14);
  puVar2 = (uint *)(local_520 + 1);
  do {
    *puVar2 = 0;
    puVar2 = puVar2 + 1;
  } while (local_4e0 != puVar2);
  if (param_2 < 1) {
    local_534 = 0;
  }
  else {
    uVar8 = 0;
    pbVar6 = param_1;
    do {
      uVar3 = (uint)*pbVar6;
      local_520[uVar3] = local_520[uVar3] + 1;
      if (uVar8 < uVar3) {
        uVar8 = uVar3;
      }
      pbVar6 = pbVar6 + 1;
    } while (pbVar6 != param_1 + param_2);
    local_534 = 9;
    if (uVar8 < 10) {
      local_534 = uVar8;
    }
  }
  iVar7 = 1;
  uVar8 = 0;
  do {
    local_4e0[iVar7] = uVar8;
    piVar1 = local_520 + iVar7;
    iVar7 = iVar7 + 1;
    uVar8 = (uVar8 + *piVar1) * 2;
  } while (iVar7 != 0x10);
  if (0 < param_2) {
    puVar2 = local_4a0;
    pbVar6 = param_1 + param_2;
    do {
      uVar3 = (uint)*param_1;
      *puVar2 = 0;
      uVar8 = local_4e0[uVar3];
      local_4e0[uVar3] = uVar8 + 1;
      if (uVar3 != 0) {
        uVar4 = 0;
        uVar5 = 0;
        do {
          uVar5 = uVar5 + 1;
          uVar4 = uVar4 * 2 | uVar8 & 1;
          uVar8 = (int)uVar8 >> 1;
        } while (uVar3 != uVar5);
        *puVar2 = uVar4;
      }
      param_1 = param_1 + 1;
      puVar2 = puVar2 + 1;
    } while (pbVar6 != param_1);
  }
  FUN_0006ec30(0,0,local_534);
  if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {
                    /* WARNING: Subroutine does not return */
    FUN_000a39d0();
  }
  return;
}

