
/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */

void __regparm3 gen_codes(ct_data *tree,int max_code)

{
  ct_data *pcVar1;
  ushort uVar2;
  int iVar3;
  uint uVar4;
  ush uVar5;
  int iVar6;
  int in_GS_OFFSET;
  ush next_code [16];
  
  uVar5 = 0;
  iVar3 = *(int *)(in_GS_OFFSET + 0x14);
  iVar6 = 1;
  do {
    uVar5 = (uVar5 + *(short *)(iVar6 * 2 + 0x2b9fe)) * 2;
    next_code[iVar6] = uVar5;
    iVar6 = iVar6 + 1;
  } while (iVar6 != 0x10);
  if (-1 < max_code) {
    pcVar1 = tree + max_code + 1;
    do {
      uVar4 = (uint)(tree->dl).dad;
      if (uVar4 != 0) {
        uVar2 = next_code[uVar4];
        next_code[uVar4] = uVar2 + 1;
        uVar4 = bi_reverse((uint)uVar2,uVar4);
        (tree->fc).freq = (ush)uVar4;
      }
      tree = tree + 1;
    } while (tree != pcVar1);
  }
  if (iVar3 == *(int *)(in_GS_OFFSET + 0x14)) {
    return;
  }
                    /* WARNING: Subroutine does not return */
  __stack_chk_fail_local();
}



/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */

void __regparm3 FUN_00019310(undefined2 *param_1,int param_2)

{
  undefined2 *puVar1;
  undefined2 uVar2;
  uint uVar3;
  short sVar4;
  int iVar5;
  int in_GS_OFFSET;
  short local_30 [16];
  int local_10;
  
  sVar4 = 0;
  local_10 = *(int *)(in_GS_OFFSET + 0x14);
  iVar5 = 1;
  do {
    sVar4 = (sVar4 + *(short *)(iVar5 * 2 + 0x2b9fe)) * 2;
    local_30[iVar5] = sVar4;
    iVar5 = iVar5 + 1;
  } while (iVar5 != 0x10);
  if (-1 < param_2) {
    puVar1 = param_1 + param_2 * 2 + 2;
    do {
      uVar3 = (uint)(ushort)param_1[1];
      if (uVar3 != 0) {
        sVar4 = local_30[uVar3];
        local_30[uVar3] = sVar4 + 1;
        uVar2 = FUN_000130a0(sVar4,uVar3);
        *param_1 = uVar2;
      }
      param_1 = param_1 + 2;
    } while (param_1 != puVar1);
  }
  if (local_10 == *(int *)(in_GS_OFFSET + 0x14)) {
    return;
  }
                    /* WARNING: Subroutine does not return */
  FUN_00021190();
}


PUSH EDI
XOR ECX,ECX
PUSH ESI
MOV ESI,0x1
PUSH EBX
CALL 0x00012e10
ADD EBX,0xfce1
SUB ESP,0x30
MOV EDI,dword ptr GS:[0x14]
MOV dword ptr [ESP + 0x2c],EDI
XOR EDI,EDI
LEA EDI,[ESP + 0xc]
LEA ESI,[ESI]
ADD CX,word ptr [EBX + ESI*0x2 + 0x29fe]
ADD ECX,ECX
MOV word ptr [EDI + ESI*0x2],CX
ADD ESI,0x1
CMP ESI,0x10
JNZ 0x00019340
TEST EDX,EDX
JS 0x0001938c
MOV ESI,EAX
LEA EDI,[EAX + EDX*0x4 + 0x4]
MOVZX EAX,word ptr [ESI + 0x2]
TEST EAX,EAX
JZ 0x00019385
MOVZX EDX,word ptr [ESP + EAX*0x2 + 0xc]
LEA ECX,[EDX + 0x1]
MOV word ptr [ESP + EAX*0x2 + 0xc],CX
SUB ESP,0x8
PUSH EAX
PUSH EDX
CALL 0x000130a0
ADD ESP,0x10
MOV word ptr [ESI],AX
ADD ESI,0x4
CMP ESI,EDI
JNZ 0x00019360
MOV EAX,dword ptr [ESP + 0x2c]
XOR EAX,dword ptr GS:[0x14]
JNZ 0x000193a0
ADD ESP,0x30
POP EBX
POP ESI
POP EDI
RET
CALL 0x00021190
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nvoid __regparm3 FUN_00019310(undefined2 *param_1,int param_2)\n\n{\n  undefined2 *puVar1;\n  undefined2 uVar2;\n  uint uVar3;\n  short sVar4;\n  int iVar5;\n  int in_GS_OFFSET;\n  short local_30 [16];\n  int local_10;\n  \n  sVar4 = 0;\n  local_10 = *(int *)(in_GS_OFFSET + 0x14);\n  iVar5 = 1;\n  do {\n    sVar4 = (sVar4 + *(short *)(iVar5 * 2 + 0x2b9fe)) * 2;\n    local_30[iVar5] = sVar4;\n    iVar5 = iVar5 + 1;\n  } while (iVar5 != 0x10);\n  if (-1 < param_2) {\n    puVar1 = param_1 + param_2 * 2 + 2;\n    do {\n      uVar3 = (uint)(ushort)param_1[1];\n      if (uVar3 != 0) {\n        sVar4 = local_30[uVar3];\n        local_30[uVar3] = sVar4 + 1;\n        uVar2 = FUN_000130a0(sVar4,uVar3);\n        *param_1 = uVar2;\n      }\n      param_1 = param_1 + 2;\n    } while (param_1 != puVar1);\n  }\n  if (local_10 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }\n                    /* WARNING: Subroutine does not return */\n  FUN_00021190();\n}\n\n" comment (function_definition "void __regparm3 FUN_00019310(undefined2 *param_1,int param_2)\n\n{\n  undefined2 *puVar1;\n  undefined2 uVar2;\n  uint uVar3;\n  short sVar4;\n  int iVar5;\n  int in_GS_OFFSET;\n  short local_30 [16];\n  int local_10;\n  \n  sVar4 = 0;\n  local_10 = *(int *)(in_GS_OFFSET + 0x14);\n  iVar5 = 1;\n  do {\n    sVar4 = (sVar4 + *(short *)(iVar5 * 2 + 0x2b9fe)) * 2;\n    local_30[iVar5] = sVar4;\n    iVar5 = iVar5 + 1;\n  } while (iVar5 != 0x10);\n  if (-1 < param_2) {\n    puVar1 = param_1 + param_2 * 2 + 2;\n    do {\n      uVar3 = (uint)(ushort)param_1[1];\n      if (uVar3 != 0) {\n        sVar4 = local_30[uVar3];\n        local_30[uVar3] = sVar4 + 1;\n        uVar2 = FUN_000130a0(sVar4,uVar3);\n        *param_1 = uVar2;\n      }\n      param_1 = param_1 + 2;\n    } while (param_1 != puVar1);\n  }\n  if (local_10 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }\n                    /* WARNING: Subroutine does not return */\n  FUN_00021190();\n}" primitive_type (ERROR "__regparm3" identifier) (function_declarator "FUN_00019310(undefined2 *param_1,int param_2)" identifier (parameter_list "(undefined2 *param_1,int param_2)" ( (parameter_declaration "undefined2 *param_1" type_identifier (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "int param_2" primitive_type identifier) ))) (compound_statement "{\n  undefined2 *puVar1;\n  undefined2 uVar2;\n  uint uVar3;\n  short sVar4;\n  int iVar5;\n  int in_GS_OFFSET;\n  short local_30 [16];\n  int local_10;\n  \n  sVar4 = 0;\n  local_10 = *(int *)(in_GS_OFFSET + 0x14);\n  iVar5 = 1;\n  do {\n    sVar4 = (sVar4 + *(short *)(iVar5 * 2 + 0x2b9fe)) * 2;\n    local_30[iVar5] = sVar4;\n    iVar5 = iVar5 + 1;\n  } while (iVar5 != 0x10);\n  if (-1 < param_2) {\n    puVar1 = param_1 + param_2 * 2 + 2;\n    do {\n      uVar3 = (uint)(ushort)param_1[1];\n      if (uVar3 != 0) {\n        sVar4 = local_30[uVar3];\n        local_30[uVar3] = sVar4 + 1;\n        uVar2 = FUN_000130a0(sVar4,uVar3);\n        *param_1 = uVar2;\n      }\n      param_1 = param_1 + 2;\n    } while (param_1 != puVar1);\n  }\n  if (local_10 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }\n                    /* WARNING: Subroutine does not return */\n  FUN_00021190();\n}" { (declaration "undefined2 *puVar1;" type_identifier (pointer_declarator "*puVar1" * identifier) ;) (declaration "undefined2 uVar2;" type_identifier identifier ;) (declaration "uint uVar3;" type_identifier identifier ;) (declaration "short sVar4;" (sized_type_specifier "short" short) identifier ;) (declaration "int iVar5;" primitive_type identifier ;) (declaration "int in_GS_OFFSET;" primitive_type identifier ;) (declaration "short local_30 [16];" (sized_type_specifier "short" short) (array_declarator "local_30 [16]" identifier [ number_literal ]) ;) (declaration "int local_10;" primitive_type identifier ;) (expression_statement "sVar4 = 0;" (assignment_expression "sVar4 = 0" identifier = number_literal) ;) (expression_statement "local_10 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "local_10 = *(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 "iVar5 = 1;" (assignment_expression "iVar5 = 1" identifier = number_literal) ;) (do_statement "do {\n    sVar4 = (sVar4 + *(short *)(iVar5 * 2 + 0x2b9fe)) * 2;\n    local_30[iVar5] = sVar4;\n    iVar5 = iVar5 + 1;\n  } while (iVar5 != 0x10);" do (compound_statement "{\n    sVar4 = (sVar4 + *(short *)(iVar5 * 2 + 0x2b9fe)) * 2;\n    local_30[iVar5] = sVar4;\n    iVar5 = iVar5 + 1;\n  }" { (expression_statement "sVar4 = (sVar4 + *(short *)(iVar5 * 2 + 0x2b9fe)) * 2;" (assignment_expression "sVar4 = (sVar4 + *(short *)(iVar5 * 2 + 0x2b9fe)) * 2" identifier = (binary_expression "(sVar4 + *(short *)(iVar5 * 2 + 0x2b9fe)) * 2" (parenthesized_expression "(sVar4 + *(short *)(iVar5 * 2 + 0x2b9fe))" ( (binary_expression "sVar4 + *(short *)(iVar5 * 2 + 0x2b9fe)" identifier + (pointer_expression "*(short *)(iVar5 * 2 + 0x2b9fe)" * (cast_expression "(short *)(iVar5 * 2 + 0x2b9fe)" ( (type_descriptor "short *" (sized_type_specifier "short" short) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar5 * 2 + 0x2b9fe)" ( (binary_expression "iVar5 * 2 + 0x2b9fe" (binary_expression "iVar5 * 2" identifier * number_literal) + number_literal) ))))) )) * number_literal)) ;) (expression_statement "local_30[iVar5] = sVar4;" (assignment_expression "local_30[iVar5] = sVar4" (subscript_expression "local_30[iVar5]" identifier [ identifier ]) = identifier) ;) (expression_statement "iVar5 = iVar5 + 1;" (assignment_expression "iVar5 = iVar5 + 1" identifier = (binary_expression "iVar5 + 1" identifier + number_literal)) ;) }) while (parenthesized_expression "(iVar5 != 0x10)" ( (binary_expression "iVar5 != 0x10" identifier != number_literal) )) ;) (if_statement "if (-1 < param_2) {\n    puVar1 = param_1 + param_2 * 2 + 2;\n    do {\n      uVar3 = (uint)(ushort)param_1[1];\n      if (uVar3 != 0) {\n        sVar4 = local_30[uVar3];\n        local_30[uVar3] = sVar4 + 1;\n        uVar2 = FUN_000130a0(sVar4,uVar3);\n        *param_1 = uVar2;\n      }\n      param_1 = param_1 + 2;\n    } while (param_1 != puVar1);\n  }" if (parenthesized_expression "(-1 < param_2)" ( (binary_expression "-1 < param_2" number_literal < identifier) )) (compound_statement "{\n    puVar1 = param_1 + param_2 * 2 + 2;\n    do {\n      uVar3 = (uint)(ushort)param_1[1];\n      if (uVar3 != 0) {\n        sVar4 = local_30[uVar3];\n        local_30[uVar3] = sVar4 + 1;\n        uVar2 = FUN_000130a0(sVar4,uVar3);\n        *param_1 = uVar2;\n      }\n      param_1 = param_1 + 2;\n    } while (param_1 != puVar1);\n  }" { (expression_statement "puVar1 = param_1 + param_2 * 2 + 2;" (assignment_expression "puVar1 = param_1 + param_2 * 2 + 2" identifier = (binary_expression "param_1 + param_2 * 2 + 2" (binary_expression "param_1 + param_2 * 2" identifier + (binary_expression "param_2 * 2" identifier * number_literal)) + number_literal)) ;) (do_statement "do {\n      uVar3 = (uint)(ushort)param_1[1];\n      if (uVar3 != 0) {\n        sVar4 = local_30[uVar3];\n        local_30[uVar3] = sVar4 + 1;\n        uVar2 = FUN_000130a0(sVar4,uVar3);\n        *param_1 = uVar2;\n      }\n      param_1 = param_1 + 2;\n    } while (param_1 != puVar1);" do (compound_statement "{\n      uVar3 = (uint)(ushort)param_1[1];\n      if (uVar3 != 0) {\n        sVar4 = local_30[uVar3];\n        local_30[uVar3] = sVar4 + 1;\n        uVar2 = FUN_000130a0(sVar4,uVar3);\n        *param_1 = uVar2;\n      }\n      param_1 = param_1 + 2;\n    }" { (expression_statement "uVar3 = (uint)(ushort)param_1[1];" (assignment_expression "uVar3 = (uint)(ushort)param_1[1]" identifier = (cast_expression "(uint)(ushort)param_1[1]" ( (type_descriptor "uint" type_identifier) ) (cast_expression "(ushort)param_1[1]" ( (type_descriptor "ushort" type_identifier) ) (subscript_expression "param_1[1]" identifier [ number_literal ])))) ;) (if_statement "if (uVar3 != 0) {\n        sVar4 = local_30[uVar3];\n        local_30[uVar3] = sVar4 + 1;\n        uVar2 = FUN_000130a0(sVar4,uVar3);\n        *param_1 = uVar2;\n      }" if (parenthesized_expression "(uVar3 != 0)" ( (binary_expression "uVar3 != 0" identifier != number_literal) )) (compound_statement "{\n        sVar4 = local_30[uVar3];\n        local_30[uVar3] = sVar4 + 1;\n        uVar2 = FUN_000130a0(sVar4,uVar3);\n        *param_1 = uVar2;\n      }" { (expression_statement "sVar4 = local_30[uVar3];" (assignment_expression "sVar4 = local_30[uVar3]" identifier = (subscript_expression "local_30[uVar3]" identifier [ identifier ])) ;) (expression_statement "local_30[uVar3] = sVar4 + 1;" (assignment_expression "local_30[uVar3] = sVar4 + 1" (subscript_expression "local_30[uVar3]" identifier [ identifier ]) = (binary_expression "sVar4 + 1" identifier + number_literal)) ;) (expression_statement "uVar2 = FUN_000130a0(sVar4,uVar3);" (assignment_expression "uVar2 = FUN_000130a0(sVar4,uVar3)" identifier = (call_expression "FUN_000130a0(sVar4,uVar3)" identifier (argument_list "(sVar4,uVar3)" ( identifier , identifier )))) ;) (expression_statement "*param_1 = uVar2;" (assignment_expression "*param_1 = uVar2" (pointer_expression "*param_1" * identifier) = identifier) ;) })) (expression_statement "param_1 = param_1 + 2;" (assignment_expression "param_1 = param_1 + 2" identifier = (binary_expression "param_1 + 2" identifier + number_literal)) ;) }) while (parenthesized_expression "(param_1 != puVar1)" ( (binary_expression "param_1 != puVar1" identifier != identifier) )) ;) })) (if_statement "if (local_10 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }" if (parenthesized_expression "(local_10 == *(int *)(in_GS_OFFSET + 0x14))" ( (binary_expression "local_10 == *(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    return;\n  }" { (return_statement "return;" return ;) })) comment (expression_statement "FUN_00021190();" (call_expression "FUN_00021190()" identifier (argument_list "()" ( ))) ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nvoid __regparm3 gen_codes(ct_data *tree,int max_code)\n\n{\n  ct_data *pcVar1;\n  ushort uVar2;\n  int iVar3;\n  uint uVar4;\n  ush uVar5;\n  int iVar6;\n  int in_GS_OFFSET;\n  ush next_code [16];\n  \n  uVar5 = 0;\n  iVar3 = *(int *)(in_GS_OFFSET + 0x14);\n  iVar6 = 1;\n  do {\n    uVar5 = (uVar5 + *(short *)(iVar6 * 2 + 0x2b9fe)) * 2;\n    next_code[iVar6] = uVar5;\n    iVar6 = iVar6 + 1;\n  } while (iVar6 != 0x10);\n  if (-1 < max_code) {\n    pcVar1 = tree + max_code + 1;\n    do {\n      uVar4 = (uint)(tree->dl).dad;\n      if (uVar4 != 0) {\n        uVar2 = next_code[uVar4];\n        next_code[uVar4] = uVar2 + 1;\n        uVar4 = bi_reverse((uint)uVar2,uVar4);\n        (tree->fc).freq = (ush)uVar4;\n      }\n      tree = tree + 1;\n    } while (tree != pcVar1);\n  }\n  if (iVar3 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }\n                    /* WARNING: Subroutine does not return */\n  __stack_chk_fail_local();\n}\n\n" comment (function_definition "void __regparm3 gen_codes(ct_data *tree,int max_code)\n\n{\n  ct_data *pcVar1;\n  ushort uVar2;\n  int iVar3;\n  uint uVar4;\n  ush uVar5;\n  int iVar6;\n  int in_GS_OFFSET;\n  ush next_code [16];\n  \n  uVar5 = 0;\n  iVar3 = *(int *)(in_GS_OFFSET + 0x14);\n  iVar6 = 1;\n  do {\n    uVar5 = (uVar5 + *(short *)(iVar6 * 2 + 0x2b9fe)) * 2;\n    next_code[iVar6] = uVar5;\n    iVar6 = iVar6 + 1;\n  } while (iVar6 != 0x10);\n  if (-1 < max_code) {\n    pcVar1 = tree + max_code + 1;\n    do {\n      uVar4 = (uint)(tree->dl).dad;\n      if (uVar4 != 0) {\n        uVar2 = next_code[uVar4];\n        next_code[uVar4] = uVar2 + 1;\n        uVar4 = bi_reverse((uint)uVar2,uVar4);\n        (tree->fc).freq = (ush)uVar4;\n      }\n      tree = tree + 1;\n    } while (tree != pcVar1);\n  }\n  if (iVar3 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }\n                    /* WARNING: Subroutine does not return */\n  __stack_chk_fail_local();\n}" primitive_type (ERROR "__regparm3" identifier) (function_declarator "gen_codes(ct_data *tree,int max_code)" identifier (parameter_list "(ct_data *tree,int max_code)" ( (parameter_declaration "ct_data *tree" type_identifier (pointer_declarator "*tree" * identifier)) , (parameter_declaration "int max_code" primitive_type identifier) ))) (compound_statement "{\n  ct_data *pcVar1;\n  ushort uVar2;\n  int iVar3;\n  uint uVar4;\n  ush uVar5;\n  int iVar6;\n  int in_GS_OFFSET;\n  ush next_code [16];\n  \n  uVar5 = 0;\n  iVar3 = *(int *)(in_GS_OFFSET + 0x14);\n  iVar6 = 1;\n  do {\n    uVar5 = (uVar5 + *(short *)(iVar6 * 2 + 0x2b9fe)) * 2;\n    next_code[iVar6] = uVar5;\n    iVar6 = iVar6 + 1;\n  } while (iVar6 != 0x10);\n  if (-1 < max_code) {\n    pcVar1 = tree + max_code + 1;\n    do {\n      uVar4 = (uint)(tree->dl).dad;\n      if (uVar4 != 0) {\n        uVar2 = next_code[uVar4];\n        next_code[uVar4] = uVar2 + 1;\n        uVar4 = bi_reverse((uint)uVar2,uVar4);\n        (tree->fc).freq = (ush)uVar4;\n      }\n      tree = tree + 1;\n    } while (tree != pcVar1);\n  }\n  if (iVar3 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }\n                    /* WARNING: Subroutine does not return */\n  __stack_chk_fail_local();\n}" { (declaration "ct_data *pcVar1;" type_identifier (pointer_declarator "*pcVar1" * identifier) ;) (declaration "ushort uVar2;" type_identifier identifier ;) (declaration "int iVar3;" primitive_type identifier ;) (declaration "uint uVar4;" type_identifier identifier ;) (declaration "ush uVar5;" type_identifier identifier ;) (declaration "int iVar6;" primitive_type identifier ;) (declaration "int in_GS_OFFSET;" primitive_type identifier ;) (declaration "ush next_code [16];" type_identifier (array_declarator "next_code [16]" identifier [ number_literal ]) ;) (expression_statement "uVar5 = 0;" (assignment_expression "uVar5 = 0" identifier = number_literal) ;) (expression_statement "iVar3 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "iVar3 = *(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 "iVar6 = 1;" (assignment_expression "iVar6 = 1" identifier = number_literal) ;) (do_statement "do {\n    uVar5 = (uVar5 + *(short *)(iVar6 * 2 + 0x2b9fe)) * 2;\n    next_code[iVar6] = uVar5;\n    iVar6 = iVar6 + 1;\n  } while (iVar6 != 0x10);" do (compound_statement "{\n    uVar5 = (uVar5 + *(short *)(iVar6 * 2 + 0x2b9fe)) * 2;\n    next_code[iVar6] = uVar5;\n    iVar6 = iVar6 + 1;\n  }" { (expression_statement "uVar5 = (uVar5 + *(short *)(iVar6 * 2 + 0x2b9fe)) * 2;" (assignment_expression "uVar5 = (uVar5 + *(short *)(iVar6 * 2 + 0x2b9fe)) * 2" identifier = (binary_expression "(uVar5 + *(short *)(iVar6 * 2 + 0x2b9fe)) * 2" (parenthesized_expression "(uVar5 + *(short *)(iVar6 * 2 + 0x2b9fe))" ( (binary_expression "uVar5 + *(short *)(iVar6 * 2 + 0x2b9fe)" identifier + (pointer_expression "*(short *)(iVar6 * 2 + 0x2b9fe)" * (cast_expression "(short *)(iVar6 * 2 + 0x2b9fe)" ( (type_descriptor "short *" (sized_type_specifier "short" short) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar6 * 2 + 0x2b9fe)" ( (binary_expression "iVar6 * 2 + 0x2b9fe" (binary_expression "iVar6 * 2" identifier * number_literal) + number_literal) ))))) )) * number_literal)) ;) (expression_statement "next_code[iVar6] = uVar5;" (assignment_expression "next_code[iVar6] = uVar5" (subscript_expression "next_code[iVar6]" identifier [ identifier ]) = identifier) ;) (expression_statement "iVar6 = iVar6 + 1;" (assignment_expression "iVar6 = iVar6 + 1" identifier = (binary_expression "iVar6 + 1" identifier + number_literal)) ;) }) while (parenthesized_expression "(iVar6 != 0x10)" ( (binary_expression "iVar6 != 0x10" identifier != number_literal) )) ;) (if_statement "if (-1 < max_code) {\n    pcVar1 = tree + max_code + 1;\n    do {\n      uVar4 = (uint)(tree->dl).dad;\n      if (uVar4 != 0) {\n        uVar2 = next_code[uVar4];\n        next_code[uVar4] = uVar2 + 1;\n        uVar4 = bi_reverse((uint)uVar2,uVar4);\n        (tree->fc).freq = (ush)uVar4;\n      }\n      tree = tree + 1;\n    } while (tree != pcVar1);\n  }" if (parenthesized_expression "(-1 < max_code)" ( (binary_expression "-1 < max_code" number_literal < identifier) )) (compound_statement "{\n    pcVar1 = tree + max_code + 1;\n    do {\n      uVar4 = (uint)(tree->dl).dad;\n      if (uVar4 != 0) {\n        uVar2 = next_code[uVar4];\n        next_code[uVar4] = uVar2 + 1;\n        uVar4 = bi_reverse((uint)uVar2,uVar4);\n        (tree->fc).freq = (ush)uVar4;\n      }\n      tree = tree + 1;\n    } while (tree != pcVar1);\n  }" { (expression_statement "pcVar1 = tree + max_code + 1;" (assignment_expression "pcVar1 = tree + max_code + 1" identifier = (binary_expression "tree + max_code + 1" (binary_expression "tree + max_code" identifier + identifier) + number_literal)) ;) (do_statement "do {\n      uVar4 = (uint)(tree->dl).dad;\n      if (uVar4 != 0) {\n        uVar2 = next_code[uVar4];\n        next_code[uVar4] = uVar2 + 1;\n        uVar4 = bi_reverse((uint)uVar2,uVar4);\n        (tree->fc).freq = (ush)uVar4;\n      }\n      tree = tree + 1;\n    } while (tree != pcVar1);" do (compound_statement "{\n      uVar4 = (uint)(tree->dl).dad;\n      if (uVar4 != 0) {\n        uVar2 = next_code[uVar4];\n        next_code[uVar4] = uVar2 + 1;\n        uVar4 = bi_reverse((uint)uVar2,uVar4);\n        (tree->fc).freq = (ush)uVar4;\n      }\n      tree = tree + 1;\n    }" { (expression_statement "uVar4 = (uint)(tree->dl).dad;" (assignment_expression "uVar4 = (uint)(tree->dl).dad" identifier = (field_expression "(uint)(tree->dl).dad" (call_expression "(uint)(tree->dl)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(tree->dl)" ( (field_expression "tree->dl" identifier -> field_identifier) ))) . field_identifier)) ;) (if_statement "if (uVar4 != 0) {\n        uVar2 = next_code[uVar4];\n        next_code[uVar4] = uVar2 + 1;\n        uVar4 = bi_reverse((uint)uVar2,uVar4);\n        (tree->fc).freq = (ush)uVar4;\n      }" if (parenthesized_expression "(uVar4 != 0)" ( (binary_expression "uVar4 != 0" identifier != number_literal) )) (compound_statement "{\n        uVar2 = next_code[uVar4];\n        next_code[uVar4] = uVar2 + 1;\n        uVar4 = bi_reverse((uint)uVar2,uVar4);\n        (tree->fc).freq = (ush)uVar4;\n      }" { (expression_statement "uVar2 = next_code[uVar4];" (assignment_expression "uVar2 = next_code[uVar4]" identifier = (subscript_expression "next_code[uVar4]" identifier [ identifier ])) ;) (expression_statement "next_code[uVar4] = uVar2 + 1;" (assignment_expression "next_code[uVar4] = uVar2 + 1" (subscript_expression "next_code[uVar4]" identifier [ identifier ]) = (binary_expression "uVar2 + 1" identifier + number_literal)) ;) (expression_statement "uVar4 = bi_reverse((uint)uVar2,uVar4);" (assignment_expression "uVar4 = bi_reverse((uint)uVar2,uVar4)" identifier = (call_expression "bi_reverse((uint)uVar2,uVar4)" identifier (argument_list "((uint)uVar2,uVar4)" ( (cast_expression "(uint)uVar2" ( (type_descriptor "uint" type_identifier) ) identifier) , identifier )))) ;) (expression_statement "(tree->fc).freq = (ush)uVar4;" (assignment_expression "(tree->fc).freq = (ush)uVar4" (field_expression "(tree->fc).freq" (parenthesized_expression "(tree->fc)" ( (field_expression "tree->fc" identifier -> field_identifier) )) . field_identifier) = (cast_expression "(ush)uVar4" ( (type_descriptor "ush" type_identifier) ) identifier)) ;) })) (expression_statement "tree = tree + 1;" (assignment_expression "tree = tree + 1" identifier = (binary_expression "tree + 1" identifier + number_literal)) ;) }) while (parenthesized_expression "(tree != pcVar1)" ( (binary_expression "tree != pcVar1" identifier != identifier) )) ;) })) (if_statement "if (iVar3 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }" if (parenthesized_expression "(iVar3 == *(int *)(in_GS_OFFSET + 0x14))" ( (binary_expression "iVar3 == *(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    return;\n  }" { (return_statement "return;" return ;) })) comment (expression_statement "__stack_chk_fail_local();" (call_expression "__stack_chk_fail_local()" identifier (argument_list "()" ( ))) ;) })))
(translation_unit "void __regparm3 FUN_00019310(undefined2 *param_1,int param_2)\n\n{\n  undefined2 *puVar1;\n  undefined2 uVar2;\n  uint uVar3;\n  short sVar4;\n  int iVar5;\n  int in_GS_OFFSET;\n  short local_30 [16];\n  int local_10;\n  \n  sVar4 = 0;\n  local_10 = *(int *)(in_GS_OFFSET + 0x14);\n  iVar5 = 1;\n  do {\n    sVar4 = (sVar4 + *(short *)(iVar5 * 2 + 0x2b9fe)) * 2;\n    local_30[iVar5] = sVar4;\n    iVar5 = iVar5 + 1;\n  } while (iVar5 != 0x10);\n  if (-1 < param_2) {\n    puVar1 = param_1 + param_2 * 2 + 2;\n    do {\n      uVar3 = (uint)(ushort)param_1[1];\n      if (uVar3 != 0) {\n        sVar4 = local_30[uVar3];\n        local_30[uVar3] = sVar4 + 1;\n        uVar2 = FUN_000130a0(sVar4,uVar3);\n        *param_1 = uVar2;\n      }\n      param_1 = param_1 + 2;\n    } while (param_1 != puVar1);\n  }\n  if (local_10 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }\n                    \n  FUN_00021190();\n}\n\n" (function_definition "void __regparm3 FUN_00019310(undefined2 *param_1,int param_2)\n\n{\n  undefined2 *puVar1;\n  undefined2 uVar2;\n  uint uVar3;\n  short sVar4;\n  int iVar5;\n  int in_GS_OFFSET;\n  short local_30 [16];\n  int local_10;\n  \n  sVar4 = 0;\n  local_10 = *(int *)(in_GS_OFFSET + 0x14);\n  iVar5 = 1;\n  do {\n    sVar4 = (sVar4 + *(short *)(iVar5 * 2 + 0x2b9fe)) * 2;\n    local_30[iVar5] = sVar4;\n    iVar5 = iVar5 + 1;\n  } while (iVar5 != 0x10);\n  if (-1 < param_2) {\n    puVar1 = param_1 + param_2 * 2 + 2;\n    do {\n      uVar3 = (uint)(ushort)param_1[1];\n      if (uVar3 != 0) {\n        sVar4 = local_30[uVar3];\n        local_30[uVar3] = sVar4 + 1;\n        uVar2 = FUN_000130a0(sVar4,uVar3);\n        *param_1 = uVar2;\n      }\n      param_1 = param_1 + 2;\n    } while (param_1 != puVar1);\n  }\n  if (local_10 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }\n                    \n  FUN_00021190();\n}" primitive_type (ERROR "__regparm3" identifier) (function_declarator "FUN_00019310(undefined2 *param_1,int param_2)" identifier (parameter_list "(undefined2 *param_1,int param_2)" ( (parameter_declaration "undefined2 *param_1" type_identifier (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "int param_2" primitive_type identifier) ))) (compound_statement "{\n  undefined2 *puVar1;\n  undefined2 uVar2;\n  uint uVar3;\n  short sVar4;\n  int iVar5;\n  int in_GS_OFFSET;\n  short local_30 [16];\n  int local_10;\n  \n  sVar4 = 0;\n  local_10 = *(int *)(in_GS_OFFSET + 0x14);\n  iVar5 = 1;\n  do {\n    sVar4 = (sVar4 + *(short *)(iVar5 * 2 + 0x2b9fe)) * 2;\n    local_30[iVar5] = sVar4;\n    iVar5 = iVar5 + 1;\n  } while (iVar5 != 0x10);\n  if (-1 < param_2) {\n    puVar1 = param_1 + param_2 * 2 + 2;\n    do {\n      uVar3 = (uint)(ushort)param_1[1];\n      if (uVar3 != 0) {\n        sVar4 = local_30[uVar3];\n        local_30[uVar3] = sVar4 + 1;\n        uVar2 = FUN_000130a0(sVar4,uVar3);\n        *param_1 = uVar2;\n      }\n      param_1 = param_1 + 2;\n    } while (param_1 != puVar1);\n  }\n  if (local_10 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }\n                    \n  FUN_00021190();\n}" { (declaration "undefined2 *puVar1;" type_identifier (pointer_declarator "*puVar1" * identifier) ;) (declaration "undefined2 uVar2;" type_identifier identifier ;) (declaration "uint uVar3;" type_identifier identifier ;) (declaration "short sVar4;" (sized_type_specifier "short" short) identifier ;) (declaration "int iVar5;" primitive_type identifier ;) (declaration "int in_GS_OFFSET;" primitive_type identifier ;) (declaration "short local_30 [16];" (sized_type_specifier "short" short) (array_declarator "local_30 [16]" identifier [ number_literal ]) ;) (declaration "int local_10;" primitive_type identifier ;) (expression_statement "sVar4 = 0;" (assignment_expression "sVar4 = 0" identifier = number_literal) ;) (expression_statement "local_10 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "local_10 = *(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 "iVar5 = 1;" (assignment_expression "iVar5 = 1" identifier = number_literal) ;) (do_statement "do {\n    sVar4 = (sVar4 + *(short *)(iVar5 * 2 + 0x2b9fe)) * 2;\n    local_30[iVar5] = sVar4;\n    iVar5 = iVar5 + 1;\n  } while (iVar5 != 0x10);" do (compound_statement "{\n    sVar4 = (sVar4 + *(short *)(iVar5 * 2 + 0x2b9fe)) * 2;\n    local_30[iVar5] = sVar4;\n    iVar5 = iVar5 + 1;\n  }" { (expression_statement "sVar4 = (sVar4 + *(short *)(iVar5 * 2 + 0x2b9fe)) * 2;" (assignment_expression "sVar4 = (sVar4 + *(short *)(iVar5 * 2 + 0x2b9fe)) * 2" identifier = (binary_expression "(sVar4 + *(short *)(iVar5 * 2 + 0x2b9fe)) * 2" (parenthesized_expression "(sVar4 + *(short *)(iVar5 * 2 + 0x2b9fe))" ( (binary_expression "sVar4 + *(short *)(iVar5 * 2 + 0x2b9fe)" identifier + (pointer_expression "*(short *)(iVar5 * 2 + 0x2b9fe)" * (cast_expression "(short *)(iVar5 * 2 + 0x2b9fe)" ( (type_descriptor "short *" (sized_type_specifier "short" short) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar5 * 2 + 0x2b9fe)" ( (binary_expression "iVar5 * 2 + 0x2b9fe" (binary_expression "iVar5 * 2" identifier * number_literal) + number_literal) ))))) )) * number_literal)) ;) (expression_statement "local_30[iVar5] = sVar4;" (assignment_expression "local_30[iVar5] = sVar4" (subscript_expression "local_30[iVar5]" identifier [ identifier ]) = identifier) ;) (expression_statement "iVar5 = iVar5 + 1;" (assignment_expression "iVar5 = iVar5 + 1" identifier = (binary_expression "iVar5 + 1" identifier + number_literal)) ;) }) while (parenthesized_expression "(iVar5 != 0x10)" ( (binary_expression "iVar5 != 0x10" identifier != number_literal) )) ;) (if_statement "if (-1 < param_2) {\n    puVar1 = param_1 + param_2 * 2 + 2;\n    do {\n      uVar3 = (uint)(ushort)param_1[1];\n      if (uVar3 != 0) {\n        sVar4 = local_30[uVar3];\n        local_30[uVar3] = sVar4 + 1;\n        uVar2 = FUN_000130a0(sVar4,uVar3);\n        *param_1 = uVar2;\n      }\n      param_1 = param_1 + 2;\n    } while (param_1 != puVar1);\n  }" if (parenthesized_expression "(-1 < param_2)" ( (binary_expression "-1 < param_2" number_literal < identifier) )) (compound_statement "{\n    puVar1 = param_1 + param_2 * 2 + 2;\n    do {\n      uVar3 = (uint)(ushort)param_1[1];\n      if (uVar3 != 0) {\n        sVar4 = local_30[uVar3];\n        local_30[uVar3] = sVar4 + 1;\n        uVar2 = FUN_000130a0(sVar4,uVar3);\n        *param_1 = uVar2;\n      }\n      param_1 = param_1 + 2;\n    } while (param_1 != puVar1);\n  }" { (expression_statement "puVar1 = param_1 + param_2 * 2 + 2;" (assignment_expression "puVar1 = param_1 + param_2 * 2 + 2" identifier = (binary_expression "param_1 + param_2 * 2 + 2" (binary_expression "param_1 + param_2 * 2" identifier + (binary_expression "param_2 * 2" identifier * number_literal)) + number_literal)) ;) (do_statement "do {\n      uVar3 = (uint)(ushort)param_1[1];\n      if (uVar3 != 0) {\n        sVar4 = local_30[uVar3];\n        local_30[uVar3] = sVar4 + 1;\n        uVar2 = FUN_000130a0(sVar4,uVar3);\n        *param_1 = uVar2;\n      }\n      param_1 = param_1 + 2;\n    } while (param_1 != puVar1);" do (compound_statement "{\n      uVar3 = (uint)(ushort)param_1[1];\n      if (uVar3 != 0) {\n        sVar4 = local_30[uVar3];\n        local_30[uVar3] = sVar4 + 1;\n        uVar2 = FUN_000130a0(sVar4,uVar3);\n        *param_1 = uVar2;\n      }\n      param_1 = param_1 + 2;\n    }" { (expression_statement "uVar3 = (uint)(ushort)param_1[1];" (assignment_expression "uVar3 = (uint)(ushort)param_1[1]" identifier = (cast_expression "(uint)(ushort)param_1[1]" ( (type_descriptor "uint" type_identifier) ) (cast_expression "(ushort)param_1[1]" ( (type_descriptor "ushort" type_identifier) ) (subscript_expression "param_1[1]" identifier [ number_literal ])))) ;) (if_statement "if (uVar3 != 0) {\n        sVar4 = local_30[uVar3];\n        local_30[uVar3] = sVar4 + 1;\n        uVar2 = FUN_000130a0(sVar4,uVar3);\n        *param_1 = uVar2;\n      }" if (parenthesized_expression "(uVar3 != 0)" ( (binary_expression "uVar3 != 0" identifier != number_literal) )) (compound_statement "{\n        sVar4 = local_30[uVar3];\n        local_30[uVar3] = sVar4 + 1;\n        uVar2 = FUN_000130a0(sVar4,uVar3);\n        *param_1 = uVar2;\n      }" { (expression_statement "sVar4 = local_30[uVar3];" (assignment_expression "sVar4 = local_30[uVar3]" identifier = (subscript_expression "local_30[uVar3]" identifier [ identifier ])) ;) (expression_statement "local_30[uVar3] = sVar4 + 1;" (assignment_expression "local_30[uVar3] = sVar4 + 1" (subscript_expression "local_30[uVar3]" identifier [ identifier ]) = (binary_expression "sVar4 + 1" identifier + number_literal)) ;) (expression_statement "uVar2 = FUN_000130a0(sVar4,uVar3);" (assignment_expression "uVar2 = FUN_000130a0(sVar4,uVar3)" identifier = (call_expression "FUN_000130a0(sVar4,uVar3)" identifier (argument_list "(sVar4,uVar3)" ( identifier , identifier )))) ;) (expression_statement "*param_1 = uVar2;" (assignment_expression "*param_1 = uVar2" (pointer_expression "*param_1" * identifier) = identifier) ;) })) (expression_statement "param_1 = param_1 + 2;" (assignment_expression "param_1 = param_1 + 2" identifier = (binary_expression "param_1 + 2" identifier + number_literal)) ;) }) while (parenthesized_expression "(param_1 != puVar1)" ( (binary_expression "param_1 != puVar1" identifier != identifier) )) ;) })) (if_statement "if (local_10 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }" if (parenthesized_expression "(local_10 == *(int *)(in_GS_OFFSET + 0x14))" ( (binary_expression "local_10 == *(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    return;\n  }" { (return_statement "return;" return ;) })) (expression_statement "FUN_00021190();" (call_expression "FUN_00021190()" identifier (argument_list "()" ( ))) ;) })))
(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 IDENT ;) (declaration TYPE IDENT ;) (declaration (sized_type_specifier short) IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration (sized_type_specifier short) (array_declarator IDENT [ LIT ]) ;) (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = LIT) ;) (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 = LIT) ;) (do_statement do (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression (parenthesized_expression ( (binary_expression IDENT + (pointer_expression * (cast_expression ( (type_descriptor (sized_type_specifier short) (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (binary_expression IDENT * LIT) + LIT) ))))) )) * LIT)) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ IDENT ]) = IDENT) ;) (expression_statement (assignment_expression IDENT = (binary_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 = (binary_expression (binary_expression IDENT + (binary_expression IDENT * LIT)) + LIT)) ;) (do_statement do (compound_statement { (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE) ) (cast_expression ( (type_descriptor TYPE) ) (subscript_expression IDENT [ LIT ])))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (subscript_expression IDENT [ IDENT ])) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ IDENT ]) = (binary_expression IDENT + LIT)) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , IDENT )))) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = IDENT) ;) })) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) }) while (parenthesized_expression ( (binary_expression IDENT != 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 { (return_statement return ;) })) (expression_statement (call_expression IDENT (argument_list ( ))) ;) })))
(function_definition "void __regparm3 FUN_00019310(undefined2 *param_1,int param_2)\n\n{\n  undefined2 *puVar1;\n  undefined2 uVar2;\n  uint uVar3;\n  short sVar4;\n  int iVar5;\n  int in_GS_OFFSET;\n  short local_30 [16];\n  int local_10;\n  \n  sVar4 = 0;\n  local_10 = *(int *)(in_GS_OFFSET + 0x14);\n  iVar5 = 1;\n  do {\n    sVar4 = (sVar4 + *(short *)(iVar5 * 2 + 0x2b9fe)) * 2;\n    local_30[iVar5] = sVar4;\n    iVar5 = iVar5 + 1;\n  } while (iVar5 != 0x10);\n  if (-1 < param_2) {\n    puVar1 = param_1 + param_2 * 2 + 2;\n    do {\n      uVar3 = (uint)(ushort)param_1[1];\n      if (uVar3 != 0) {\n        sVar4 = local_30[uVar3];\n        local_30[uVar3] = sVar4 + 1;\n        uVar2 = FUN_000130a0(sVar4,uVar3);\n        *param_1 = uVar2;\n      }\n      param_1 = param_1 + 2;\n    } while (param_1 != puVar1);\n  }\n  if (local_10 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }\n                    \n  FUN_00021190();\n}" (primitive_type "void") (ERROR "__regparm3" (identifier "__regparm3")) (function_declarator "FUN_00019310(undefined2 *param_1,int param_2)" (identifier "FUN_00019310") (parameter_list "(undefined2 *param_1,int param_2)" (( "(") (parameter_declaration "undefined2 *param_1" (type_identifier "undefined2") (pointer_declarator "*param_1" (* "*") (identifier "param_1"))) (, ",") (parameter_declaration "int param_2" (primitive_type "int") (identifier "param_2")) () ")"))) (compound_statement "{\n  undefined2 *puVar1;\n  undefined2 uVar2;\n  uint uVar3;\n  short sVar4;\n  int iVar5;\n  int in_GS_OFFSET;\n  short local_30 [16];\n  int local_10;\n  \n  sVar4 = 0;\n  local_10 = *(int *)(in_GS_OFFSET + 0x14);\n  iVar5 = 1;\n  do {\n    sVar4 = (sVar4 + *(short *)(iVar5 * 2 + 0x2b9fe)) * 2;\n    local_30[iVar5] = sVar4;\n    iVar5 = iVar5 + 1;\n  } while (iVar5 != 0x10);\n  if (-1 < param_2) {\n    puVar1 = param_1 + param_2 * 2 + 2;\n    do {\n      uVar3 = (uint)(ushort)param_1[1];\n      if (uVar3 != 0) {\n        sVar4 = local_30[uVar3];\n        local_30[uVar3] = sVar4 + 1;\n        uVar2 = FUN_000130a0(sVar4,uVar3);\n        *param_1 = uVar2;\n      }\n      param_1 = param_1 + 2;\n    } while (param_1 != puVar1);\n  }\n  if (local_10 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }\n                    \n  FUN_00021190();\n}" ({ "{") (declaration "undefined2 *puVar1;" (type_identifier "undefined2") (pointer_declarator "*puVar1" (* "*") (identifier "puVar1")) (; ";")) (declaration "undefined2 uVar2;" (type_identifier "undefined2") (identifier "uVar2") (; ";")) (declaration "uint uVar3;" (type_identifier "uint") (identifier "uVar3") (; ";")) (declaration "short sVar4;" (sized_type_specifier "short" (short "short")) (identifier "sVar4") (; ";")) (declaration "int iVar5;" (primitive_type "int") (identifier "iVar5") (; ";")) (declaration "int in_GS_OFFSET;" (primitive_type "int") (identifier "in_GS_OFFSET") (; ";")) (declaration "short local_30 [16];" (sized_type_specifier "short" (short "short")) (array_declarator "local_30 [16]" (identifier "local_30") ([ "[") (number_literal "16") (] "]")) (; ";")) (declaration "int local_10;" (primitive_type "int") (identifier "local_10") (; ";")) (expression_statement "sVar4 = 0;" (assignment_expression "sVar4 = 0" (identifier "sVar4") (= "=") (number_literal "0")) (; ";")) (expression_statement "local_10 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "local_10 = *(int *)(in_GS_OFFSET + 0x14)" (identifier "local_10") (= "=") (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 "iVar5 = 1;" (assignment_expression "iVar5 = 1" (identifier "iVar5") (= "=") (number_literal "1")) (; ";")) (do_statement "do {\n    sVar4 = (sVar4 + *(short *)(iVar5 * 2 + 0x2b9fe)) * 2;\n    local_30[iVar5] = sVar4;\n    iVar5 = iVar5 + 1;\n  } while (iVar5 != 0x10);" (do "do") (compound_statement "{\n    sVar4 = (sVar4 + *(short *)(iVar5 * 2 + 0x2b9fe)) * 2;\n    local_30[iVar5] = sVar4;\n    iVar5 = iVar5 + 1;\n  }" ({ "{") (expression_statement "sVar4 = (sVar4 + *(short *)(iVar5 * 2 + 0x2b9fe)) * 2;" (assignment_expression "sVar4 = (sVar4 + *(short *)(iVar5 * 2 + 0x2b9fe)) * 2" (identifier "sVar4") (= "=") (binary_expression "(sVar4 + *(short *)(iVar5 * 2 + 0x2b9fe)) * 2" (parenthesized_expression "(sVar4 + *(short *)(iVar5 * 2 + 0x2b9fe))" (( "(") (binary_expression "sVar4 + *(short *)(iVar5 * 2 + 0x2b9fe)" (identifier "sVar4") (+ "+") (pointer_expression "*(short *)(iVar5 * 2 + 0x2b9fe)" (* "*") (cast_expression "(short *)(iVar5 * 2 + 0x2b9fe)" (( "(") (type_descriptor "short *" (sized_type_specifier "short" (short "short")) (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar5 * 2 + 0x2b9fe)" (( "(") (binary_expression "iVar5 * 2 + 0x2b9fe" (binary_expression "iVar5 * 2" (identifier "iVar5") (* "*") (number_literal "2")) (+ "+") (number_literal "0x2b9fe")) () ")"))))) () ")")) (* "*") (number_literal "2"))) (; ";")) (expression_statement "local_30[iVar5] = sVar4;" (assignment_expression "local_30[iVar5] = sVar4" (subscript_expression "local_30[iVar5]" (identifier "local_30") ([ "[") (identifier "iVar5") (] "]")) (= "=") (identifier "sVar4")) (; ";")) (expression_statement "iVar5 = iVar5 + 1;" (assignment_expression "iVar5 = iVar5 + 1" (identifier "iVar5") (= "=") (binary_expression "iVar5 + 1" (identifier "iVar5") (+ "+") (number_literal "1"))) (; ";")) (} "}")) (while "while") (parenthesized_expression "(iVar5 != 0x10)" (( "(") (binary_expression "iVar5 != 0x10" (identifier "iVar5") (!= "!=") (number_literal "0x10")) () ")")) (; ";")) (if_statement "if (-1 < param_2) {\n    puVar1 = param_1 + param_2 * 2 + 2;\n    do {\n      uVar3 = (uint)(ushort)param_1[1];\n      if (uVar3 != 0) {\n        sVar4 = local_30[uVar3];\n        local_30[uVar3] = sVar4 + 1;\n        uVar2 = FUN_000130a0(sVar4,uVar3);\n        *param_1 = uVar2;\n      }\n      param_1 = param_1 + 2;\n    } while (param_1 != puVar1);\n  }" (if "if") (parenthesized_expression "(-1 < param_2)" (( "(") (binary_expression "-1 < param_2" (number_literal "-1") (< "<") (identifier "param_2")) () ")")) (compound_statement "{\n    puVar1 = param_1 + param_2 * 2 + 2;\n    do {\n      uVar3 = (uint)(ushort)param_1[1];\n      if (uVar3 != 0) {\n        sVar4 = local_30[uVar3];\n        local_30[uVar3] = sVar4 + 1;\n        uVar2 = FUN_000130a0(sVar4,uVar3);\n        *param_1 = uVar2;\n      }\n      param_1 = param_1 + 2;\n    } while (param_1 != puVar1);\n  }" ({ "{") (expression_statement "puVar1 = param_1 + param_2 * 2 + 2;" (assignment_expression "puVar1 = param_1 + param_2 * 2 + 2" (identifier "puVar1") (= "=") (binary_expression "param_1 + param_2 * 2 + 2" (binary_expression "param_1 + param_2 * 2" (identifier "param_1") (+ "+") (binary_expression "param_2 * 2" (identifier "param_2") (* "*") (number_literal "2"))) (+ "+") (number_literal "2"))) (; ";")) (do_statement "do {\n      uVar3 = (uint)(ushort)param_1[1];\n      if (uVar3 != 0) {\n        sVar4 = local_30[uVar3];\n        local_30[uVar3] = sVar4 + 1;\n        uVar2 = FUN_000130a0(sVar4,uVar3);\n        *param_1 = uVar2;\n      }\n      param_1 = param_1 + 2;\n    } while (param_1 != puVar1);" (do "do") (compound_statement "{\n      uVar3 = (uint)(ushort)param_1[1];\n      if (uVar3 != 0) {\n        sVar4 = local_30[uVar3];\n        local_30[uVar3] = sVar4 + 1;\n        uVar2 = FUN_000130a0(sVar4,uVar3);\n        *param_1 = uVar2;\n      }\n      param_1 = param_1 + 2;\n    }" ({ "{") (expression_statement "uVar3 = (uint)(ushort)param_1[1];" (assignment_expression "uVar3 = (uint)(ushort)param_1[1]" (identifier "uVar3") (= "=") (cast_expression "(uint)(ushort)param_1[1]" (( "(") (type_descriptor "uint" (type_identifier "uint")) () ")") (cast_expression "(ushort)param_1[1]" (( "(") (type_descriptor "ushort" (type_identifier "ushort")) () ")") (subscript_expression "param_1[1]" (identifier "param_1") ([ "[") (number_literal "1") (] "]"))))) (; ";")) (if_statement "if (uVar3 != 0) {\n        sVar4 = local_30[uVar3];\n        local_30[uVar3] = sVar4 + 1;\n        uVar2 = FUN_000130a0(sVar4,uVar3);\n        *param_1 = uVar2;\n      }" (if "if") (parenthesized_expression "(uVar3 != 0)" (( "(") (binary_expression "uVar3 != 0" (identifier "uVar3") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n        sVar4 = local_30[uVar3];\n        local_30[uVar3] = sVar4 + 1;\n        uVar2 = FUN_000130a0(sVar4,uVar3);\n        *param_1 = uVar2;\n      }" ({ "{") (expression_statement "sVar4 = local_30[uVar3];" (assignment_expression "sVar4 = local_30[uVar3]" (identifier "sVar4") (= "=") (subscript_expression "local_30[uVar3]" (identifier "local_30") ([ "[") (identifier "uVar3") (] "]"))) (; ";")) (expression_statement "local_30[uVar3] = sVar4 + 1;" (assignment_expression "local_30[uVar3] = sVar4 + 1" (subscript_expression "local_30[uVar3]" (identifier "local_30") ([ "[") (identifier "uVar3") (] "]")) (= "=") (binary_expression "sVar4 + 1" (identifier "sVar4") (+ "+") (number_literal "1"))) (; ";")) (expression_statement "uVar2 = FUN_000130a0(sVar4,uVar3);" (assignment_expression "uVar2 = FUN_000130a0(sVar4,uVar3)" (identifier "uVar2") (= "=") (call_expression "FUN_000130a0(sVar4,uVar3)" (identifier "FUN_000130a0") (argument_list "(sVar4,uVar3)" (( "(") (identifier "sVar4") (, ",") (identifier "uVar3") () ")")))) (; ";")) (expression_statement "*param_1 = uVar2;" (assignment_expression "*param_1 = uVar2" (pointer_expression "*param_1" (* "*") (identifier "param_1")) (= "=") (identifier "uVar2")) (; ";")) (} "}"))) (expression_statement "param_1 = param_1 + 2;" (assignment_expression "param_1 = param_1 + 2" (identifier "param_1") (= "=") (binary_expression "param_1 + 2" (identifier "param_1") (+ "+") (number_literal "2"))) (; ";")) (} "}")) (while "while") (parenthesized_expression "(param_1 != puVar1)" (( "(") (binary_expression "param_1 != puVar1" (identifier "param_1") (!= "!=") (identifier "puVar1")) () ")")) (; ";")) (} "}"))) (if_statement "if (local_10 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }" (if "if") (parenthesized_expression "(local_10 == *(int *)(in_GS_OFFSET + 0x14))" (( "(") (binary_expression "local_10 == *(int *)(in_GS_OFFSET + 0x14)" (identifier "local_10") (== "==") (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    return;\n  }" ({ "{") (return_statement "return;" (return "return") (; ";")) (} "}"))) (expression_statement "FUN_00021190();" (call_expression "FUN_00021190()" (identifier "FUN_00021190") (argument_list "()" (( "(") () ")"))) (; ";")) (} "}")))

/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */

void __regparm3 function_1(type_1 *var_5,int var_4)

{
  type_1 *var_9;
  type_2 var_7;
  int var_10;
  type_3 var_6;
  type_4 var_2;
  int var_3;
  int var_1;
  type_4 next_code [16];
  
  var_2 = 0;
  var_10 = *(int *)(var_1 + 0x14);
  var_3 = 1;
  do {
    var_2 = (var_2 + *(short *)(var_3 * 2 + 0x2b9fe)) * 2;
    next_code[var_3] = var_2;
    var_3 = var_3 + 1;
  } while (var_3 != 0x10);
  if (-1 < var_4) {
    var_9 = var_5 + var_4 + 1;
    do {
      var_6 = (type_3)(var_5->dl).dad;
      if (var_6 != 0) {
        var_7 = next_code[var_6];
        next_code[var_6] = var_7 + 1;
        var_6 = var_8((type_3)var_7,var_6);
        (var_5->fc).freq = (type_4)var_6;
      }
      var_5 = var_5 + 1;
    } while (var_5 != var_9);
  }
  if (var_10 == *(int *)(var_1 + 0x14)) {
    return;
  }
                    /* WARNING: Subroutine does not return */
  var_11();
}


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

/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */

void __regparm3 MASKED(undefined2 *param_1,int param_2)

{
  undefined2 *puVar1;
  undefined2 uVar2;
  uint uVar3;
  short sVar4;
  int iVar5;
  int in_GS_OFFSET;
  short local_30 [16];
  int local_10;
  
  sVar4 = 0;
  local_10 = *(int *)(in_GS_OFFSET + 0x14);
  iVar5 = 1;
  do {
    sVar4 = (sVar4 + *(short *)(iVar5 * 2 + 0x2b9fe)) * 2;
    local_30[iVar5] = sVar4;
    iVar5 = iVar5 + 1;
  } while (iVar5 != 0x10);
  if (-1 < param_2) {
    puVar1 = param_1 + param_2 * 2 + 2;
    do {
      uVar3 = (uint)(ushort)param_1[1];
      if (uVar3 != 0) {
        sVar4 = local_30[uVar3];
        local_30[uVar3] = sVar4 + 1;
        uVar2 = FUN_000130a0(sVar4,uVar3);
        *param_1 = uVar2;
      }
      param_1 = param_1 + 2;
    } while (param_1 != puVar1);
  }
  if (local_10 == *(int *)(in_GS_OFFSET + 0x14)) {
    return;
  }
                    /* WARNING: Subroutine does not return */
  FUN_00021190();
}

