
strtol_error bkm_scale_by_power(uintmax_t *x,int base,int power)

{
  ulonglong uVar1;
  uint uVar2;
  bool bVar3;
  strtol_error sVar4;
  uint uVar5;
  int iVar6;
  uint uVar7;
  int iVar8;
  uint uVar9;
  
  iVar6 = power + -1;
  if (power == 0) {
    return LONGINT_OK;
  }
  uVar9 = (uint)*x;
  uVar5 = *(uint *)x;
  sVar4 = LONGINT_OK;
  do {
    bVar3 = false;
    if (uVar5 == 0) {
      uVar7 = uVar9;
      uVar2 = base >> 0x1f;
      if (base < 0) {
LAB_000176a8:
        if ((int)((ulonglong)uVar7 * (ulonglong)uVar2 +
                  ((ulonglong)uVar9 * (ulonglong)(uint)base >> 0x20) >> 0x20) != 0)
        goto LAB_00017724;
      }
    }
    else {
      uVar7 = base;
      uVar2 = uVar5;
      if (-1 < base) goto LAB_000176a8;
LAB_00017724:
      bVar3 = true;
    }
    iVar8 = (base >> 0x1f) * uVar9;
    if (bVar3) {
      uVar9 = 0xffffffff;
      uVar5 = 0xffffffff;
    }
    else {
      uVar1 = (ulonglong)uVar9;
      uVar9 = (uint)(uVar1 * (uint)base);
      uVar5 = iVar8 + base * uVar5 + (int)(uVar1 * (uint)base >> 0x20);
    }
    iVar6 = iVar6 + -1;
    sVar4 = sVar4 | bVar3;
    if (iVar6 == -1) {
      *(uint *)((int)x + 4) = uVar9;
      *(uint *)x = uVar5;
      return sVar4;
    }
  } while( true );
}



byte FUN_00017660(uint *param_1,uint param_2,int param_3)

{
  ulonglong uVar1;
  uint uVar2;
  bool bVar3;
  byte bVar4;
  uint uVar5;
  uint uVar6;
  int iVar7;
  uint uVar8;
  int iVar9;
  
  iVar7 = param_3 + -1;
  if (param_3 == 0) {
    return 0;
  }
  uVar6 = param_1[1];
  uVar5 = *param_1;
  bVar4 = 0;
  do {
    bVar3 = false;
    if (uVar5 == 0) {
      uVar8 = uVar6;
      uVar2 = (int)param_2 >> 0x1f;
      if ((int)param_2 < 0) {
LAB_000176a8:
        if ((int)((ulonglong)uVar8 * (ulonglong)uVar2 +
                  ((ulonglong)uVar6 * (ulonglong)param_2 >> 0x20) >> 0x20) != 0) goto LAB_00017724;
      }
    }
    else {
      uVar8 = param_2;
      uVar2 = uVar5;
      if (-1 < (int)param_2) goto LAB_000176a8;
LAB_00017724:
      bVar3 = true;
    }
    iVar9 = ((int)param_2 >> 0x1f) * uVar6;
    if (bVar3) {
      uVar6 = 0xffffffff;
      uVar5 = 0xffffffff;
    }
    else {
      uVar1 = (ulonglong)uVar6;
      uVar6 = (uint)(uVar1 * param_2);
      uVar5 = iVar9 + param_2 * uVar5 + (int)(uVar1 * param_2 >> 0x20);
    }
    iVar7 = iVar7 + -1;
    bVar4 = bVar4 | bVar3;
    if (iVar7 == -1) {
      param_1[1] = uVar6;
      *param_1 = uVar5;
      return bVar4;
    }
  } while( true );
}


beq a2,zero,0x0001775c
_addiu t0,a2,-0x1
addiu sp,sp,-0x10
sw s2,0xc(sp)
sw s1,0x8(sp)
sw s0,0x4(sp)
lw a3,0x4(a0)
lw a2,0x0(a0)
or v0,zero,zero
sra t9,a1,0x1f
or t1,zero,zero
or t3,t9,zero
li s0,0x1
or s1,a1,zero
b 0x00017704
_li t8,-0x1
bne t3,zero,0x00017724
_or t6,s1,zero
multu a3,a1
mfhi t4
multu t6,t2
mflo t7
mfhi t6
addu t2,t4,t7
sltu t2,t2,t7
addu t2,t2,t6
bne t2,zero,0x00017724
_nop
or v1,v1,s2
bne v1,zero,0x00017730
_mult t9,a3
madd a1,a2
mflo v1
multu a3,a1
mflo a3
mfhi a2
addu a2,v1,a2
or v1,t1,zero
addiu t0,t0,-0x1
beq t0,t8,0x00017740
_or v0,v0,v1
or v1,t1,zero
or s2,t1,zero
bne a2,zero,0x000176a0
_or t2,a2,zero
beq t3,zero,0x000176d0
_or t2,t3,zero
b 0x000176a8
_or t6,a3,zero
or v1,t1,zero
b 0x000176d0
_or s2,s0,zero
li a3,-0x1
li a2,-0x1
b 0x000176f8
_or v1,s0,zero
sw a3,0x4(a0)
sw a2,0x0(a0)
lw s2,0xc(sp)
lw s1,0x8(sp)
lw s0,0x4(sp)
jr ra
_addiu sp,sp,0x10
jr ra
_or v0,zero,zero
(translation_unit "byte FUN_00017660(uint *param_1,uint param_2,int param_3)\n\n{\n  ulonglong uVar1;\n  uint uVar2;\n  bool bVar3;\n  byte bVar4;\n  uint uVar5;\n  uint uVar6;\n  int iVar7;\n  uint uVar8;\n  int iVar9;\n  \n  iVar7 = param_3 + -1;\n  if (param_3 == 0) {\n    return 0;\n  }\n  uVar6 = param_1[1];\n  uVar5 = *param_1;\n  bVar4 = 0;\n  do {\n    bVar3 = false;\n    if (uVar5 == 0) {\n      uVar8 = uVar6;\n      uVar2 = (int)param_2 >> 0x1f;\n      if ((int)param_2 < 0) {\nLAB_000176a8:\n        if ((int)((ulonglong)uVar8 * (ulonglong)uVar2 +\n                  ((ulonglong)uVar6 * (ulonglong)param_2 >> 0x20) >> 0x20) != 0) goto LAB_00017724;\n      }\n    }\n    else {\n      uVar8 = param_2;\n      uVar2 = uVar5;\n      if (-1 < (int)param_2) goto LAB_000176a8;\nLAB_00017724:\n      bVar3 = true;\n    }\n    iVar9 = ((int)param_2 >> 0x1f) * uVar6;\n    if (bVar3) {\n      uVar6 = 0xffffffff;\n      uVar5 = 0xffffffff;\n    }\n    else {\n      uVar1 = (ulonglong)uVar6;\n      uVar6 = (uint)(uVar1 * param_2);\n      uVar5 = iVar9 + param_2 * uVar5 + (int)(uVar1 * param_2 >> 0x20);\n    }\n    iVar7 = iVar7 + -1;\n    bVar4 = bVar4 | bVar3;\n    if (iVar7 == -1) {\n      param_1[1] = uVar6;\n      *param_1 = uVar5;\n      return bVar4;\n    }\n  } while( true );\n}\n\n" (function_definition "byte FUN_00017660(uint *param_1,uint param_2,int param_3)\n\n{\n  ulonglong uVar1;\n  uint uVar2;\n  bool bVar3;\n  byte bVar4;\n  uint uVar5;\n  uint uVar6;\n  int iVar7;\n  uint uVar8;\n  int iVar9;\n  \n  iVar7 = param_3 + -1;\n  if (param_3 == 0) {\n    return 0;\n  }\n  uVar6 = param_1[1];\n  uVar5 = *param_1;\n  bVar4 = 0;\n  do {\n    bVar3 = false;\n    if (uVar5 == 0) {\n      uVar8 = uVar6;\n      uVar2 = (int)param_2 >> 0x1f;\n      if ((int)param_2 < 0) {\nLAB_000176a8:\n        if ((int)((ulonglong)uVar8 * (ulonglong)uVar2 +\n                  ((ulonglong)uVar6 * (ulonglong)param_2 >> 0x20) >> 0x20) != 0) goto LAB_00017724;\n      }\n    }\n    else {\n      uVar8 = param_2;\n      uVar2 = uVar5;\n      if (-1 < (int)param_2) goto LAB_000176a8;\nLAB_00017724:\n      bVar3 = true;\n    }\n    iVar9 = ((int)param_2 >> 0x1f) * uVar6;\n    if (bVar3) {\n      uVar6 = 0xffffffff;\n      uVar5 = 0xffffffff;\n    }\n    else {\n      uVar1 = (ulonglong)uVar6;\n      uVar6 = (uint)(uVar1 * param_2);\n      uVar5 = iVar9 + param_2 * uVar5 + (int)(uVar1 * param_2 >> 0x20);\n    }\n    iVar7 = iVar7 + -1;\n    bVar4 = bVar4 | bVar3;\n    if (iVar7 == -1) {\n      param_1[1] = uVar6;\n      *param_1 = uVar5;\n      return bVar4;\n    }\n  } while( true );\n}" type_identifier (function_declarator "FUN_00017660(uint *param_1,uint param_2,int param_3)" identifier (parameter_list "(uint *param_1,uint param_2,int param_3)" ( (parameter_declaration "uint *param_1" type_identifier (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "uint param_2" type_identifier identifier) , (parameter_declaration "int param_3" primitive_type identifier) ))) (compound_statement "{\n  ulonglong uVar1;\n  uint uVar2;\n  bool bVar3;\n  byte bVar4;\n  uint uVar5;\n  uint uVar6;\n  int iVar7;\n  uint uVar8;\n  int iVar9;\n  \n  iVar7 = param_3 + -1;\n  if (param_3 == 0) {\n    return 0;\n  }\n  uVar6 = param_1[1];\n  uVar5 = *param_1;\n  bVar4 = 0;\n  do {\n    bVar3 = false;\n    if (uVar5 == 0) {\n      uVar8 = uVar6;\n      uVar2 = (int)param_2 >> 0x1f;\n      if ((int)param_2 < 0) {\nLAB_000176a8:\n        if ((int)((ulonglong)uVar8 * (ulonglong)uVar2 +\n                  ((ulonglong)uVar6 * (ulonglong)param_2 >> 0x20) >> 0x20) != 0) goto LAB_00017724;\n      }\n    }\n    else {\n      uVar8 = param_2;\n      uVar2 = uVar5;\n      if (-1 < (int)param_2) goto LAB_000176a8;\nLAB_00017724:\n      bVar3 = true;\n    }\n    iVar9 = ((int)param_2 >> 0x1f) * uVar6;\n    if (bVar3) {\n      uVar6 = 0xffffffff;\n      uVar5 = 0xffffffff;\n    }\n    else {\n      uVar1 = (ulonglong)uVar6;\n      uVar6 = (uint)(uVar1 * param_2);\n      uVar5 = iVar9 + param_2 * uVar5 + (int)(uVar1 * param_2 >> 0x20);\n    }\n    iVar7 = iVar7 + -1;\n    bVar4 = bVar4 | bVar3;\n    if (iVar7 == -1) {\n      param_1[1] = uVar6;\n      *param_1 = uVar5;\n      return bVar4;\n    }\n  } while( true );\n}" { (declaration "ulonglong uVar1;" type_identifier identifier ;) (declaration "uint uVar2;" type_identifier identifier ;) (declaration "bool bVar3;" primitive_type identifier ;) (declaration "byte bVar4;" type_identifier identifier ;) (declaration "uint uVar5;" type_identifier identifier ;) (declaration "uint uVar6;" type_identifier identifier ;) (declaration "int iVar7;" primitive_type identifier ;) (declaration "uint uVar8;" type_identifier identifier ;) (declaration "int iVar9;" primitive_type identifier ;) (expression_statement "iVar7 = param_3 + -1;" (assignment_expression "iVar7 = param_3 + -1" identifier = (binary_expression "param_3 + -1" identifier + number_literal)) ;) (if_statement "if (param_3 == 0) {\n    return 0;\n  }" if (parenthesized_expression "(param_3 == 0)" ( (binary_expression "param_3 == 0" identifier == number_literal) )) (compound_statement "{\n    return 0;\n  }" { (return_statement "return 0;" return number_literal ;) })) (expression_statement "uVar6 = param_1[1];" (assignment_expression "uVar6 = param_1[1]" identifier = (subscript_expression "param_1[1]" identifier [ number_literal ])) ;) (expression_statement "uVar5 = *param_1;" (assignment_expression "uVar5 = *param_1" identifier = (pointer_expression "*param_1" * identifier)) ;) (expression_statement "bVar4 = 0;" (assignment_expression "bVar4 = 0" identifier = number_literal) ;) (do_statement "do {\n    bVar3 = false;\n    if (uVar5 == 0) {\n      uVar8 = uVar6;\n      uVar2 = (int)param_2 >> 0x1f;\n      if ((int)param_2 < 0) {\nLAB_000176a8:\n        if ((int)((ulonglong)uVar8 * (ulonglong)uVar2 +\n                  ((ulonglong)uVar6 * (ulonglong)param_2 >> 0x20) >> 0x20) != 0) goto LAB_00017724;\n      }\n    }\n    else {\n      uVar8 = param_2;\n      uVar2 = uVar5;\n      if (-1 < (int)param_2) goto LAB_000176a8;\nLAB_00017724:\n      bVar3 = true;\n    }\n    iVar9 = ((int)param_2 >> 0x1f) * uVar6;\n    if (bVar3) {\n      uVar6 = 0xffffffff;\n      uVar5 = 0xffffffff;\n    }\n    else {\n      uVar1 = (ulonglong)uVar6;\n      uVar6 = (uint)(uVar1 * param_2);\n      uVar5 = iVar9 + param_2 * uVar5 + (int)(uVar1 * param_2 >> 0x20);\n    }\n    iVar7 = iVar7 + -1;\n    bVar4 = bVar4 | bVar3;\n    if (iVar7 == -1) {\n      param_1[1] = uVar6;\n      *param_1 = uVar5;\n      return bVar4;\n    }\n  } while( true );" do (compound_statement "{\n    bVar3 = false;\n    if (uVar5 == 0) {\n      uVar8 = uVar6;\n      uVar2 = (int)param_2 >> 0x1f;\n      if ((int)param_2 < 0) {\nLAB_000176a8:\n        if ((int)((ulonglong)uVar8 * (ulonglong)uVar2 +\n                  ((ulonglong)uVar6 * (ulonglong)param_2 >> 0x20) >> 0x20) != 0) goto LAB_00017724;\n      }\n    }\n    else {\n      uVar8 = param_2;\n      uVar2 = uVar5;\n      if (-1 < (int)param_2) goto LAB_000176a8;\nLAB_00017724:\n      bVar3 = true;\n    }\n    iVar9 = ((int)param_2 >> 0x1f) * uVar6;\n    if (bVar3) {\n      uVar6 = 0xffffffff;\n      uVar5 = 0xffffffff;\n    }\n    else {\n      uVar1 = (ulonglong)uVar6;\n      uVar6 = (uint)(uVar1 * param_2);\n      uVar5 = iVar9 + param_2 * uVar5 + (int)(uVar1 * param_2 >> 0x20);\n    }\n    iVar7 = iVar7 + -1;\n    bVar4 = bVar4 | bVar3;\n    if (iVar7 == -1) {\n      param_1[1] = uVar6;\n      *param_1 = uVar5;\n      return bVar4;\n    }\n  }" { (expression_statement "bVar3 = false;" (assignment_expression "bVar3 = false" identifier = false) ;) (if_statement "if (uVar5 == 0) {\n      uVar8 = uVar6;\n      uVar2 = (int)param_2 >> 0x1f;\n      if ((int)param_2 < 0) {\nLAB_000176a8:\n        if ((int)((ulonglong)uVar8 * (ulonglong)uVar2 +\n                  ((ulonglong)uVar6 * (ulonglong)param_2 >> 0x20) >> 0x20) != 0) goto LAB_00017724;\n      }\n    }\n    else {\n      uVar8 = param_2;\n      uVar2 = uVar5;\n      if (-1 < (int)param_2) goto LAB_000176a8;\nLAB_00017724:\n      bVar3 = true;\n    }" if (parenthesized_expression "(uVar5 == 0)" ( (binary_expression "uVar5 == 0" identifier == number_literal) )) (compound_statement "{\n      uVar8 = uVar6;\n      uVar2 = (int)param_2 >> 0x1f;\n      if ((int)param_2 < 0) {\nLAB_000176a8:\n        if ((int)((ulonglong)uVar8 * (ulonglong)uVar2 +\n                  ((ulonglong)uVar6 * (ulonglong)param_2 >> 0x20) >> 0x20) != 0) goto LAB_00017724;\n      }\n    }" { (expression_statement "uVar8 = uVar6;" (assignment_expression "uVar8 = uVar6" identifier = identifier) ;) (expression_statement "uVar2 = (int)param_2 >> 0x1f;" (assignment_expression "uVar2 = (int)param_2 >> 0x1f" identifier = (binary_expression "(int)param_2 >> 0x1f" (cast_expression "(int)param_2" ( (type_descriptor "int" primitive_type) ) identifier) >> number_literal)) ;) (if_statement "if ((int)param_2 < 0) {\nLAB_000176a8:\n        if ((int)((ulonglong)uVar8 * (ulonglong)uVar2 +\n                  ((ulonglong)uVar6 * (ulonglong)param_2 >> 0x20) >> 0x20) != 0) goto LAB_00017724;\n      }" if (parenthesized_expression "((int)param_2 < 0)" ( (binary_expression "(int)param_2 < 0" (cast_expression "(int)param_2" ( (type_descriptor "int" primitive_type) ) identifier) < number_literal) )) (compound_statement "{\nLAB_000176a8:\n        if ((int)((ulonglong)uVar8 * (ulonglong)uVar2 +\n                  ((ulonglong)uVar6 * (ulonglong)param_2 >> 0x20) >> 0x20) != 0) goto LAB_00017724;\n      }" { (labeled_statement "LAB_000176a8:\n        if ((int)((ulonglong)uVar8 * (ulonglong)uVar2 +\n                  ((ulonglong)uVar6 * (ulonglong)param_2 >> 0x20) >> 0x20) != 0) goto LAB_00017724;" statement_identifier : (if_statement "if ((int)((ulonglong)uVar8 * (ulonglong)uVar2 +\n                  ((ulonglong)uVar6 * (ulonglong)param_2 >> 0x20) >> 0x20) != 0) goto LAB_00017724;" if (parenthesized_expression "((int)((ulonglong)uVar8 * (ulonglong)uVar2 +\n                  ((ulonglong)uVar6 * (ulonglong)param_2 >> 0x20) >> 0x20) != 0)" ( (binary_expression "(int)((ulonglong)uVar8 * (ulonglong)uVar2 +\n                  ((ulonglong)uVar6 * (ulonglong)param_2 >> 0x20) >> 0x20) != 0" (cast_expression "(int)((ulonglong)uVar8 * (ulonglong)uVar2 +\n                  ((ulonglong)uVar6 * (ulonglong)param_2 >> 0x20) >> 0x20)" ( (type_descriptor "int" primitive_type) ) (parenthesized_expression "((ulonglong)uVar8 * (ulonglong)uVar2 +\n                  ((ulonglong)uVar6 * (ulonglong)param_2 >> 0x20) >> 0x20)" ( (binary_expression "(ulonglong)uVar8 * (ulonglong)uVar2 +\n                  ((ulonglong)uVar6 * (ulonglong)param_2 >> 0x20) >> 0x20" (binary_expression "(ulonglong)uVar8 * (ulonglong)uVar2 +\n                  ((ulonglong)uVar6 * (ulonglong)param_2 >> 0x20)" (binary_expression "(ulonglong)uVar8 * (ulonglong)uVar2" (cast_expression "(ulonglong)uVar8" ( (type_descriptor "ulonglong" type_identifier) ) identifier) * (cast_expression "(ulonglong)uVar2" ( (type_descriptor "ulonglong" type_identifier) ) identifier)) + (parenthesized_expression "((ulonglong)uVar6 * (ulonglong)param_2 >> 0x20)" ( (binary_expression "(ulonglong)uVar6 * (ulonglong)param_2 >> 0x20" (binary_expression "(ulonglong)uVar6 * (ulonglong)param_2" (cast_expression "(ulonglong)uVar6" ( (type_descriptor "ulonglong" type_identifier) ) identifier) * (cast_expression "(ulonglong)param_2" ( (type_descriptor "ulonglong" type_identifier) ) identifier)) >> number_literal) ))) >> number_literal) ))) != number_literal) )) (goto_statement "goto LAB_00017724;" goto statement_identifier ;))) })) }) (else_clause "else {\n      uVar8 = param_2;\n      uVar2 = uVar5;\n      if (-1 < (int)param_2) goto LAB_000176a8;\nLAB_00017724:\n      bVar3 = true;\n    }" else (compound_statement "{\n      uVar8 = param_2;\n      uVar2 = uVar5;\n      if (-1 < (int)param_2) goto LAB_000176a8;\nLAB_00017724:\n      bVar3 = true;\n    }" { (expression_statement "uVar8 = param_2;" (assignment_expression "uVar8 = param_2" identifier = identifier) ;) (expression_statement "uVar2 = uVar5;" (assignment_expression "uVar2 = uVar5" identifier = identifier) ;) (if_statement "if (-1 < (int)param_2) goto LAB_000176a8;" if (parenthesized_expression "(-1 < (int)param_2)" ( (binary_expression "-1 < (int)param_2" number_literal < (cast_expression "(int)param_2" ( (type_descriptor "int" primitive_type) ) identifier)) )) (goto_statement "goto LAB_000176a8;" goto statement_identifier ;)) (labeled_statement "LAB_00017724:\n      bVar3 = true;" statement_identifier : (expression_statement "bVar3 = true;" (assignment_expression "bVar3 = true" identifier = true) ;)) }))) (expression_statement "iVar9 = ((int)param_2 >> 0x1f) * uVar6;" (assignment_expression "iVar9 = ((int)param_2 >> 0x1f) * uVar6" identifier = (binary_expression "((int)param_2 >> 0x1f) * uVar6" (parenthesized_expression "((int)param_2 >> 0x1f)" ( (binary_expression "(int)param_2 >> 0x1f" (cast_expression "(int)param_2" ( (type_descriptor "int" primitive_type) ) identifier) >> number_literal) )) * identifier)) ;) (if_statement "if (bVar3) {\n      uVar6 = 0xffffffff;\n      uVar5 = 0xffffffff;\n    }\n    else {\n      uVar1 = (ulonglong)uVar6;\n      uVar6 = (uint)(uVar1 * param_2);\n      uVar5 = iVar9 + param_2 * uVar5 + (int)(uVar1 * param_2 >> 0x20);\n    }" if (parenthesized_expression "(bVar3)" ( identifier )) (compound_statement "{\n      uVar6 = 0xffffffff;\n      uVar5 = 0xffffffff;\n    }" { (expression_statement "uVar6 = 0xffffffff;" (assignment_expression "uVar6 = 0xffffffff" identifier = number_literal) ;) (expression_statement "uVar5 = 0xffffffff;" (assignment_expression "uVar5 = 0xffffffff" identifier = number_literal) ;) }) (else_clause "else {\n      uVar1 = (ulonglong)uVar6;\n      uVar6 = (uint)(uVar1 * param_2);\n      uVar5 = iVar9 + param_2 * uVar5 + (int)(uVar1 * param_2 >> 0x20);\n    }" else (compound_statement "{\n      uVar1 = (ulonglong)uVar6;\n      uVar6 = (uint)(uVar1 * param_2);\n      uVar5 = iVar9 + param_2 * uVar5 + (int)(uVar1 * param_2 >> 0x20);\n    }" { (expression_statement "uVar1 = (ulonglong)uVar6;" (assignment_expression "uVar1 = (ulonglong)uVar6" identifier = (cast_expression "(ulonglong)uVar6" ( (type_descriptor "ulonglong" type_identifier) ) identifier)) ;) (expression_statement "uVar6 = (uint)(uVar1 * param_2);" (assignment_expression "uVar6 = (uint)(uVar1 * param_2)" identifier = (call_expression "(uint)(uVar1 * param_2)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(uVar1 * param_2)" ( (binary_expression "uVar1 * param_2" identifier * identifier) )))) ;) (expression_statement "uVar5 = iVar9 + param_2 * uVar5 + (int)(uVar1 * param_2 >> 0x20);" (assignment_expression "uVar5 = iVar9 + param_2 * uVar5 + (int)(uVar1 * param_2 >> 0x20)" identifier = (binary_expression "iVar9 + param_2 * uVar5 + (int)(uVar1 * param_2 >> 0x20)" (binary_expression "iVar9 + param_2 * uVar5" identifier + (binary_expression "param_2 * uVar5" identifier * identifier)) + (cast_expression "(int)(uVar1 * param_2 >> 0x20)" ( (type_descriptor "int" primitive_type) ) (parenthesized_expression "(uVar1 * param_2 >> 0x20)" ( (binary_expression "uVar1 * param_2 >> 0x20" (binary_expression "uVar1 * param_2" identifier * identifier) >> number_literal) ))))) ;) }))) (expression_statement "iVar7 = iVar7 + -1;" (assignment_expression "iVar7 = iVar7 + -1" identifier = (binary_expression "iVar7 + -1" identifier + number_literal)) ;) (expression_statement "bVar4 = bVar4 | bVar3;" (assignment_expression "bVar4 = bVar4 | bVar3" identifier = (binary_expression "bVar4 | bVar3" identifier | identifier)) ;) (if_statement "if (iVar7 == -1) {\n      param_1[1] = uVar6;\n      *param_1 = uVar5;\n      return bVar4;\n    }" if (parenthesized_expression "(iVar7 == -1)" ( (binary_expression "iVar7 == -1" identifier == number_literal) )) (compound_statement "{\n      param_1[1] = uVar6;\n      *param_1 = uVar5;\n      return bVar4;\n    }" { (expression_statement "param_1[1] = uVar6;" (assignment_expression "param_1[1] = uVar6" (subscript_expression "param_1[1]" identifier [ number_literal ]) = identifier) ;) (expression_statement "*param_1 = uVar5;" (assignment_expression "*param_1 = uVar5" (pointer_expression "*param_1" * identifier) = identifier) ;) (return_statement "return bVar4;" return identifier ;) })) }) while (parenthesized_expression "( true )" ( true )) ;) })))
(translation_unit "strtol_error bkm_scale_by_power(uintmax_t *x,int base,int power)\n\n{\n  ulonglong uVar1;\n  uint uVar2;\n  bool bVar3;\n  strtol_error sVar4;\n  uint uVar5;\n  int iVar6;\n  uint uVar7;\n  int iVar8;\n  uint uVar9;\n  \n  iVar6 = power + -1;\n  if (power == 0) {\n    return LONGINT_OK;\n  }\n  uVar9 = (uint)*x;\n  uVar5 = *(uint *)x;\n  sVar4 = LONGINT_OK;\n  do {\n    bVar3 = false;\n    if (uVar5 == 0) {\n      uVar7 = uVar9;\n      uVar2 = base >> 0x1f;\n      if (base < 0) {\nLAB_000176a8:\n        if ((int)((ulonglong)uVar7 * (ulonglong)uVar2 +\n                  ((ulonglong)uVar9 * (ulonglong)(uint)base >> 0x20) >> 0x20) != 0)\n        goto LAB_00017724;\n      }\n    }\n    else {\n      uVar7 = base;\n      uVar2 = uVar5;\n      if (-1 < base) goto LAB_000176a8;\nLAB_00017724:\n      bVar3 = true;\n    }\n    iVar8 = (base >> 0x1f) * uVar9;\n    if (bVar3) {\n      uVar9 = 0xffffffff;\n      uVar5 = 0xffffffff;\n    }\n    else {\n      uVar1 = (ulonglong)uVar9;\n      uVar9 = (uint)(uVar1 * (uint)base);\n      uVar5 = iVar8 + base * uVar5 + (int)(uVar1 * (uint)base >> 0x20);\n    }\n    iVar6 = iVar6 + -1;\n    sVar4 = sVar4 | bVar3;\n    if (iVar6 == -1) {\n      *(uint *)((int)x + 4) = uVar9;\n      *(uint *)x = uVar5;\n      return sVar4;\n    }\n  } while( true );\n}\n\n" (function_definition "strtol_error bkm_scale_by_power(uintmax_t *x,int base,int power)\n\n{\n  ulonglong uVar1;\n  uint uVar2;\n  bool bVar3;\n  strtol_error sVar4;\n  uint uVar5;\n  int iVar6;\n  uint uVar7;\n  int iVar8;\n  uint uVar9;\n  \n  iVar6 = power + -1;\n  if (power == 0) {\n    return LONGINT_OK;\n  }\n  uVar9 = (uint)*x;\n  uVar5 = *(uint *)x;\n  sVar4 = LONGINT_OK;\n  do {\n    bVar3 = false;\n    if (uVar5 == 0) {\n      uVar7 = uVar9;\n      uVar2 = base >> 0x1f;\n      if (base < 0) {\nLAB_000176a8:\n        if ((int)((ulonglong)uVar7 * (ulonglong)uVar2 +\n                  ((ulonglong)uVar9 * (ulonglong)(uint)base >> 0x20) >> 0x20) != 0)\n        goto LAB_00017724;\n      }\n    }\n    else {\n      uVar7 = base;\n      uVar2 = uVar5;\n      if (-1 < base) goto LAB_000176a8;\nLAB_00017724:\n      bVar3 = true;\n    }\n    iVar8 = (base >> 0x1f) * uVar9;\n    if (bVar3) {\n      uVar9 = 0xffffffff;\n      uVar5 = 0xffffffff;\n    }\n    else {\n      uVar1 = (ulonglong)uVar9;\n      uVar9 = (uint)(uVar1 * (uint)base);\n      uVar5 = iVar8 + base * uVar5 + (int)(uVar1 * (uint)base >> 0x20);\n    }\n    iVar6 = iVar6 + -1;\n    sVar4 = sVar4 | bVar3;\n    if (iVar6 == -1) {\n      *(uint *)((int)x + 4) = uVar9;\n      *(uint *)x = uVar5;\n      return sVar4;\n    }\n  } while( true );\n}" type_identifier (function_declarator "bkm_scale_by_power(uintmax_t *x,int base,int power)" identifier (parameter_list "(uintmax_t *x,int base,int power)" ( (parameter_declaration "uintmax_t *x" type_identifier (pointer_declarator "*x" * identifier)) , (parameter_declaration "int base" primitive_type identifier) , (parameter_declaration "int power" primitive_type identifier) ))) (compound_statement "{\n  ulonglong uVar1;\n  uint uVar2;\n  bool bVar3;\n  strtol_error sVar4;\n  uint uVar5;\n  int iVar6;\n  uint uVar7;\n  int iVar8;\n  uint uVar9;\n  \n  iVar6 = power + -1;\n  if (power == 0) {\n    return LONGINT_OK;\n  }\n  uVar9 = (uint)*x;\n  uVar5 = *(uint *)x;\n  sVar4 = LONGINT_OK;\n  do {\n    bVar3 = false;\n    if (uVar5 == 0) {\n      uVar7 = uVar9;\n      uVar2 = base >> 0x1f;\n      if (base < 0) {\nLAB_000176a8:\n        if ((int)((ulonglong)uVar7 * (ulonglong)uVar2 +\n                  ((ulonglong)uVar9 * (ulonglong)(uint)base >> 0x20) >> 0x20) != 0)\n        goto LAB_00017724;\n      }\n    }\n    else {\n      uVar7 = base;\n      uVar2 = uVar5;\n      if (-1 < base) goto LAB_000176a8;\nLAB_00017724:\n      bVar3 = true;\n    }\n    iVar8 = (base >> 0x1f) * uVar9;\n    if (bVar3) {\n      uVar9 = 0xffffffff;\n      uVar5 = 0xffffffff;\n    }\n    else {\n      uVar1 = (ulonglong)uVar9;\n      uVar9 = (uint)(uVar1 * (uint)base);\n      uVar5 = iVar8 + base * uVar5 + (int)(uVar1 * (uint)base >> 0x20);\n    }\n    iVar6 = iVar6 + -1;\n    sVar4 = sVar4 | bVar3;\n    if (iVar6 == -1) {\n      *(uint *)((int)x + 4) = uVar9;\n      *(uint *)x = uVar5;\n      return sVar4;\n    }\n  } while( true );\n}" { (declaration "ulonglong uVar1;" type_identifier identifier ;) (declaration "uint uVar2;" type_identifier identifier ;) (declaration "bool bVar3;" primitive_type identifier ;) (declaration "strtol_error sVar4;" type_identifier identifier ;) (declaration "uint uVar5;" type_identifier identifier ;) (declaration "int iVar6;" primitive_type identifier ;) (declaration "uint uVar7;" type_identifier identifier ;) (declaration "int iVar8;" primitive_type identifier ;) (declaration "uint uVar9;" type_identifier identifier ;) (expression_statement "iVar6 = power + -1;" (assignment_expression "iVar6 = power + -1" identifier = (binary_expression "power + -1" identifier + number_literal)) ;) (if_statement "if (power == 0) {\n    return LONGINT_OK;\n  }" if (parenthesized_expression "(power == 0)" ( (binary_expression "power == 0" identifier == number_literal) )) (compound_statement "{\n    return LONGINT_OK;\n  }" { (return_statement "return LONGINT_OK;" return identifier ;) })) (expression_statement "uVar9 = (uint)*x;" (assignment_expression "uVar9 = (uint)*x" identifier = (binary_expression "(uint)*x" (parenthesized_expression "(uint)" ( identifier )) * identifier)) ;) (expression_statement "uVar5 = *(uint *)x;" (assignment_expression "uVar5 = *(uint *)x" identifier = (pointer_expression "*(uint *)x" * (cast_expression "(uint *)x" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier))) ;) (expression_statement "sVar4 = LONGINT_OK;" (assignment_expression "sVar4 = LONGINT_OK" identifier = identifier) ;) (do_statement "do {\n    bVar3 = false;\n    if (uVar5 == 0) {\n      uVar7 = uVar9;\n      uVar2 = base >> 0x1f;\n      if (base < 0) {\nLAB_000176a8:\n        if ((int)((ulonglong)uVar7 * (ulonglong)uVar2 +\n                  ((ulonglong)uVar9 * (ulonglong)(uint)base >> 0x20) >> 0x20) != 0)\n        goto LAB_00017724;\n      }\n    }\n    else {\n      uVar7 = base;\n      uVar2 = uVar5;\n      if (-1 < base) goto LAB_000176a8;\nLAB_00017724:\n      bVar3 = true;\n    }\n    iVar8 = (base >> 0x1f) * uVar9;\n    if (bVar3) {\n      uVar9 = 0xffffffff;\n      uVar5 = 0xffffffff;\n    }\n    else {\n      uVar1 = (ulonglong)uVar9;\n      uVar9 = (uint)(uVar1 * (uint)base);\n      uVar5 = iVar8 + base * uVar5 + (int)(uVar1 * (uint)base >> 0x20);\n    }\n    iVar6 = iVar6 + -1;\n    sVar4 = sVar4 | bVar3;\n    if (iVar6 == -1) {\n      *(uint *)((int)x + 4) = uVar9;\n      *(uint *)x = uVar5;\n      return sVar4;\n    }\n  } while( true );" do (compound_statement "{\n    bVar3 = false;\n    if (uVar5 == 0) {\n      uVar7 = uVar9;\n      uVar2 = base >> 0x1f;\n      if (base < 0) {\nLAB_000176a8:\n        if ((int)((ulonglong)uVar7 * (ulonglong)uVar2 +\n                  ((ulonglong)uVar9 * (ulonglong)(uint)base >> 0x20) >> 0x20) != 0)\n        goto LAB_00017724;\n      }\n    }\n    else {\n      uVar7 = base;\n      uVar2 = uVar5;\n      if (-1 < base) goto LAB_000176a8;\nLAB_00017724:\n      bVar3 = true;\n    }\n    iVar8 = (base >> 0x1f) * uVar9;\n    if (bVar3) {\n      uVar9 = 0xffffffff;\n      uVar5 = 0xffffffff;\n    }\n    else {\n      uVar1 = (ulonglong)uVar9;\n      uVar9 = (uint)(uVar1 * (uint)base);\n      uVar5 = iVar8 + base * uVar5 + (int)(uVar1 * (uint)base >> 0x20);\n    }\n    iVar6 = iVar6 + -1;\n    sVar4 = sVar4 | bVar3;\n    if (iVar6 == -1) {\n      *(uint *)((int)x + 4) = uVar9;\n      *(uint *)x = uVar5;\n      return sVar4;\n    }\n  }" { (expression_statement "bVar3 = false;" (assignment_expression "bVar3 = false" identifier = false) ;) (if_statement "if (uVar5 == 0) {\n      uVar7 = uVar9;\n      uVar2 = base >> 0x1f;\n      if (base < 0) {\nLAB_000176a8:\n        if ((int)((ulonglong)uVar7 * (ulonglong)uVar2 +\n                  ((ulonglong)uVar9 * (ulonglong)(uint)base >> 0x20) >> 0x20) != 0)\n        goto LAB_00017724;\n      }\n    }\n    else {\n      uVar7 = base;\n      uVar2 = uVar5;\n      if (-1 < base) goto LAB_000176a8;\nLAB_00017724:\n      bVar3 = true;\n    }" if (parenthesized_expression "(uVar5 == 0)" ( (binary_expression "uVar5 == 0" identifier == number_literal) )) (compound_statement "{\n      uVar7 = uVar9;\n      uVar2 = base >> 0x1f;\n      if (base < 0) {\nLAB_000176a8:\n        if ((int)((ulonglong)uVar7 * (ulonglong)uVar2 +\n                  ((ulonglong)uVar9 * (ulonglong)(uint)base >> 0x20) >> 0x20) != 0)\n        goto LAB_00017724;\n      }\n    }" { (expression_statement "uVar7 = uVar9;" (assignment_expression "uVar7 = uVar9" identifier = identifier) ;) (expression_statement "uVar2 = base >> 0x1f;" (assignment_expression "uVar2 = base >> 0x1f" identifier = (binary_expression "base >> 0x1f" identifier >> number_literal)) ;) (if_statement "if (base < 0) {\nLAB_000176a8:\n        if ((int)((ulonglong)uVar7 * (ulonglong)uVar2 +\n                  ((ulonglong)uVar9 * (ulonglong)(uint)base >> 0x20) >> 0x20) != 0)\n        goto LAB_00017724;\n      }" if (parenthesized_expression "(base < 0)" ( (binary_expression "base < 0" identifier < number_literal) )) (compound_statement "{\nLAB_000176a8:\n        if ((int)((ulonglong)uVar7 * (ulonglong)uVar2 +\n                  ((ulonglong)uVar9 * (ulonglong)(uint)base >> 0x20) >> 0x20) != 0)\n        goto LAB_00017724;\n      }" { (labeled_statement "LAB_000176a8:\n        if ((int)((ulonglong)uVar7 * (ulonglong)uVar2 +\n                  ((ulonglong)uVar9 * (ulonglong)(uint)base >> 0x20) >> 0x20) != 0)\n        goto LAB_00017724;" statement_identifier : (if_statement "if ((int)((ulonglong)uVar7 * (ulonglong)uVar2 +\n                  ((ulonglong)uVar9 * (ulonglong)(uint)base >> 0x20) >> 0x20) != 0)\n        goto LAB_00017724;" if (parenthesized_expression "((int)((ulonglong)uVar7 * (ulonglong)uVar2 +\n                  ((ulonglong)uVar9 * (ulonglong)(uint)base >> 0x20) >> 0x20) != 0)" ( (binary_expression "(int)((ulonglong)uVar7 * (ulonglong)uVar2 +\n                  ((ulonglong)uVar9 * (ulonglong)(uint)base >> 0x20) >> 0x20) != 0" (cast_expression "(int)((ulonglong)uVar7 * (ulonglong)uVar2 +\n                  ((ulonglong)uVar9 * (ulonglong)(uint)base >> 0x20) >> 0x20)" ( (type_descriptor "int" primitive_type) ) (parenthesized_expression "((ulonglong)uVar7 * (ulonglong)uVar2 +\n                  ((ulonglong)uVar9 * (ulonglong)(uint)base >> 0x20) >> 0x20)" ( (binary_expression "(ulonglong)uVar7 * (ulonglong)uVar2 +\n                  ((ulonglong)uVar9 * (ulonglong)(uint)base >> 0x20) >> 0x20" (binary_expression "(ulonglong)uVar7 * (ulonglong)uVar2 +\n                  ((ulonglong)uVar9 * (ulonglong)(uint)base >> 0x20)" (binary_expression "(ulonglong)uVar7 * (ulonglong)uVar2" (cast_expression "(ulonglong)uVar7" ( (type_descriptor "ulonglong" type_identifier) ) identifier) * (cast_expression "(ulonglong)uVar2" ( (type_descriptor "ulonglong" type_identifier) ) identifier)) + (parenthesized_expression "((ulonglong)uVar9 * (ulonglong)(uint)base >> 0x20)" ( (binary_expression "(ulonglong)uVar9 * (ulonglong)(uint)base >> 0x20" (binary_expression "(ulonglong)uVar9 * (ulonglong)(uint)base" (cast_expression "(ulonglong)uVar9" ( (type_descriptor "ulonglong" type_identifier) ) identifier) * (cast_expression "(ulonglong)(uint)base" ( (type_descriptor "ulonglong" type_identifier) ) (cast_expression "(uint)base" ( (type_descriptor "uint" type_identifier) ) identifier))) >> number_literal) ))) >> number_literal) ))) != number_literal) )) (goto_statement "goto LAB_00017724;" goto statement_identifier ;))) })) }) (else_clause "else {\n      uVar7 = base;\n      uVar2 = uVar5;\n      if (-1 < base) goto LAB_000176a8;\nLAB_00017724:\n      bVar3 = true;\n    }" else (compound_statement "{\n      uVar7 = base;\n      uVar2 = uVar5;\n      if (-1 < base) goto LAB_000176a8;\nLAB_00017724:\n      bVar3 = true;\n    }" { (expression_statement "uVar7 = base;" (assignment_expression "uVar7 = base" identifier = identifier) ;) (expression_statement "uVar2 = uVar5;" (assignment_expression "uVar2 = uVar5" identifier = identifier) ;) (if_statement "if (-1 < base) goto LAB_000176a8;" if (parenthesized_expression "(-1 < base)" ( (binary_expression "-1 < base" number_literal < identifier) )) (goto_statement "goto LAB_000176a8;" goto statement_identifier ;)) (labeled_statement "LAB_00017724:\n      bVar3 = true;" statement_identifier : (expression_statement "bVar3 = true;" (assignment_expression "bVar3 = true" identifier = true) ;)) }))) (expression_statement "iVar8 = (base >> 0x1f) * uVar9;" (assignment_expression "iVar8 = (base >> 0x1f) * uVar9" identifier = (binary_expression "(base >> 0x1f) * uVar9" (parenthesized_expression "(base >> 0x1f)" ( (binary_expression "base >> 0x1f" identifier >> number_literal) )) * identifier)) ;) (if_statement "if (bVar3) {\n      uVar9 = 0xffffffff;\n      uVar5 = 0xffffffff;\n    }\n    else {\n      uVar1 = (ulonglong)uVar9;\n      uVar9 = (uint)(uVar1 * (uint)base);\n      uVar5 = iVar8 + base * uVar5 + (int)(uVar1 * (uint)base >> 0x20);\n    }" if (parenthesized_expression "(bVar3)" ( identifier )) (compound_statement "{\n      uVar9 = 0xffffffff;\n      uVar5 = 0xffffffff;\n    }" { (expression_statement "uVar9 = 0xffffffff;" (assignment_expression "uVar9 = 0xffffffff" identifier = number_literal) ;) (expression_statement "uVar5 = 0xffffffff;" (assignment_expression "uVar5 = 0xffffffff" identifier = number_literal) ;) }) (else_clause "else {\n      uVar1 = (ulonglong)uVar9;\n      uVar9 = (uint)(uVar1 * (uint)base);\n      uVar5 = iVar8 + base * uVar5 + (int)(uVar1 * (uint)base >> 0x20);\n    }" else (compound_statement "{\n      uVar1 = (ulonglong)uVar9;\n      uVar9 = (uint)(uVar1 * (uint)base);\n      uVar5 = iVar8 + base * uVar5 + (int)(uVar1 * (uint)base >> 0x20);\n    }" { (expression_statement "uVar1 = (ulonglong)uVar9;" (assignment_expression "uVar1 = (ulonglong)uVar9" identifier = (cast_expression "(ulonglong)uVar9" ( (type_descriptor "ulonglong" type_identifier) ) identifier)) ;) (expression_statement "uVar9 = (uint)(uVar1 * (uint)base);" (assignment_expression "uVar9 = (uint)(uVar1 * (uint)base)" identifier = (call_expression "(uint)(uVar1 * (uint)base)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(uVar1 * (uint)base)" ( (binary_expression "uVar1 * (uint)base" identifier * (cast_expression "(uint)base" ( (type_descriptor "uint" type_identifier) ) identifier)) )))) ;) (expression_statement "uVar5 = iVar8 + base * uVar5 + (int)(uVar1 * (uint)base >> 0x20);" (assignment_expression "uVar5 = iVar8 + base * uVar5 + (int)(uVar1 * (uint)base >> 0x20)" identifier = (binary_expression "iVar8 + base * uVar5 + (int)(uVar1 * (uint)base >> 0x20)" (binary_expression "iVar8 + base * uVar5" identifier + (binary_expression "base * uVar5" identifier * identifier)) + (cast_expression "(int)(uVar1 * (uint)base >> 0x20)" ( (type_descriptor "int" primitive_type) ) (parenthesized_expression "(uVar1 * (uint)base >> 0x20)" ( (binary_expression "uVar1 * (uint)base >> 0x20" (binary_expression "uVar1 * (uint)base" identifier * (cast_expression "(uint)base" ( (type_descriptor "uint" type_identifier) ) identifier)) >> number_literal) ))))) ;) }))) (expression_statement "iVar6 = iVar6 + -1;" (assignment_expression "iVar6 = iVar6 + -1" identifier = (binary_expression "iVar6 + -1" identifier + number_literal)) ;) (expression_statement "sVar4 = sVar4 | bVar3;" (assignment_expression "sVar4 = sVar4 | bVar3" identifier = (binary_expression "sVar4 | bVar3" identifier | identifier)) ;) (if_statement "if (iVar6 == -1) {\n      *(uint *)((int)x + 4) = uVar9;\n      *(uint *)x = uVar5;\n      return sVar4;\n    }" if (parenthesized_expression "(iVar6 == -1)" ( (binary_expression "iVar6 == -1" identifier == number_literal) )) (compound_statement "{\n      *(uint *)((int)x + 4) = uVar9;\n      *(uint *)x = uVar5;\n      return sVar4;\n    }" { (expression_statement "*(uint *)((int)x + 4) = uVar9;" (assignment_expression "*(uint *)((int)x + 4) = uVar9" (pointer_expression "*(uint *)((int)x + 4)" * (cast_expression "(uint *)((int)x + 4)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)x + 4)" ( (binary_expression "(int)x + 4" (cast_expression "(int)x" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal) )))) = identifier) ;) (expression_statement "*(uint *)x = uVar5;" (assignment_expression "*(uint *)x = uVar5" (pointer_expression "*(uint *)x" * (cast_expression "(uint *)x" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) = identifier) ;) (return_statement "return sVar4;" return identifier ;) })) }) while (parenthesized_expression "( true )" ( true )) ;) })))
(translation_unit "byte FUN_00017660(uint *param_1,uint param_2,int param_3)\n\n{\n  ulonglong uVar1;\n  uint uVar2;\n  bool bVar3;\n  byte bVar4;\n  uint uVar5;\n  uint uVar6;\n  int iVar7;\n  uint uVar8;\n  int iVar9;\n  \n  iVar7 = param_3 + -1;\n  if (param_3 == 0) {\n    return 0;\n  }\n  uVar6 = param_1[1];\n  uVar5 = *param_1;\n  bVar4 = 0;\n  do {\n    bVar3 = false;\n    if (uVar5 == 0) {\n      uVar8 = uVar6;\n      uVar2 = (int)param_2 >> 0x1f;\n      if ((int)param_2 < 0) {\nLAB_000176a8:\n        if ((int)((ulonglong)uVar8 * (ulonglong)uVar2 +\n                  ((ulonglong)uVar6 * (ulonglong)param_2 >> 0x20) >> 0x20) != 0) goto LAB_00017724;\n      }\n    }\n    else {\n      uVar8 = param_2;\n      uVar2 = uVar5;\n      if (-1 < (int)param_2) goto LAB_000176a8;\nLAB_00017724:\n      bVar3 = true;\n    }\n    iVar9 = ((int)param_2 >> 0x1f) * uVar6;\n    if (bVar3) {\n      uVar6 = 0xffffffff;\n      uVar5 = 0xffffffff;\n    }\n    else {\n      uVar1 = (ulonglong)uVar6;\n      uVar6 = (uint)(uVar1 * param_2);\n      uVar5 = iVar9 + param_2 * uVar5 + (int)(uVar1 * param_2 >> 0x20);\n    }\n    iVar7 = iVar7 + -1;\n    bVar4 = bVar4 | bVar3;\n    if (iVar7 == -1) {\n      param_1[1] = uVar6;\n      *param_1 = uVar5;\n      return bVar4;\n    }\n  } while( true );\n}\n\n" (function_definition "byte FUN_00017660(uint *param_1,uint param_2,int param_3)\n\n{\n  ulonglong uVar1;\n  uint uVar2;\n  bool bVar3;\n  byte bVar4;\n  uint uVar5;\n  uint uVar6;\n  int iVar7;\n  uint uVar8;\n  int iVar9;\n  \n  iVar7 = param_3 + -1;\n  if (param_3 == 0) {\n    return 0;\n  }\n  uVar6 = param_1[1];\n  uVar5 = *param_1;\n  bVar4 = 0;\n  do {\n    bVar3 = false;\n    if (uVar5 == 0) {\n      uVar8 = uVar6;\n      uVar2 = (int)param_2 >> 0x1f;\n      if ((int)param_2 < 0) {\nLAB_000176a8:\n        if ((int)((ulonglong)uVar8 * (ulonglong)uVar2 +\n                  ((ulonglong)uVar6 * (ulonglong)param_2 >> 0x20) >> 0x20) != 0) goto LAB_00017724;\n      }\n    }\n    else {\n      uVar8 = param_2;\n      uVar2 = uVar5;\n      if (-1 < (int)param_2) goto LAB_000176a8;\nLAB_00017724:\n      bVar3 = true;\n    }\n    iVar9 = ((int)param_2 >> 0x1f) * uVar6;\n    if (bVar3) {\n      uVar6 = 0xffffffff;\n      uVar5 = 0xffffffff;\n    }\n    else {\n      uVar1 = (ulonglong)uVar6;\n      uVar6 = (uint)(uVar1 * param_2);\n      uVar5 = iVar9 + param_2 * uVar5 + (int)(uVar1 * param_2 >> 0x20);\n    }\n    iVar7 = iVar7 + -1;\n    bVar4 = bVar4 | bVar3;\n    if (iVar7 == -1) {\n      param_1[1] = uVar6;\n      *param_1 = uVar5;\n      return bVar4;\n    }\n  } while( true );\n}" type_identifier (function_declarator "FUN_00017660(uint *param_1,uint param_2,int param_3)" identifier (parameter_list "(uint *param_1,uint param_2,int param_3)" ( (parameter_declaration "uint *param_1" type_identifier (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "uint param_2" type_identifier identifier) , (parameter_declaration "int param_3" primitive_type identifier) ))) (compound_statement "{\n  ulonglong uVar1;\n  uint uVar2;\n  bool bVar3;\n  byte bVar4;\n  uint uVar5;\n  uint uVar6;\n  int iVar7;\n  uint uVar8;\n  int iVar9;\n  \n  iVar7 = param_3 + -1;\n  if (param_3 == 0) {\n    return 0;\n  }\n  uVar6 = param_1[1];\n  uVar5 = *param_1;\n  bVar4 = 0;\n  do {\n    bVar3 = false;\n    if (uVar5 == 0) {\n      uVar8 = uVar6;\n      uVar2 = (int)param_2 >> 0x1f;\n      if ((int)param_2 < 0) {\nLAB_000176a8:\n        if ((int)((ulonglong)uVar8 * (ulonglong)uVar2 +\n                  ((ulonglong)uVar6 * (ulonglong)param_2 >> 0x20) >> 0x20) != 0) goto LAB_00017724;\n      }\n    }\n    else {\n      uVar8 = param_2;\n      uVar2 = uVar5;\n      if (-1 < (int)param_2) goto LAB_000176a8;\nLAB_00017724:\n      bVar3 = true;\n    }\n    iVar9 = ((int)param_2 >> 0x1f) * uVar6;\n    if (bVar3) {\n      uVar6 = 0xffffffff;\n      uVar5 = 0xffffffff;\n    }\n    else {\n      uVar1 = (ulonglong)uVar6;\n      uVar6 = (uint)(uVar1 * param_2);\n      uVar5 = iVar9 + param_2 * uVar5 + (int)(uVar1 * param_2 >> 0x20);\n    }\n    iVar7 = iVar7 + -1;\n    bVar4 = bVar4 | bVar3;\n    if (iVar7 == -1) {\n      param_1[1] = uVar6;\n      *param_1 = uVar5;\n      return bVar4;\n    }\n  } while( true );\n}" { (declaration "ulonglong uVar1;" type_identifier identifier ;) (declaration "uint uVar2;" type_identifier identifier ;) (declaration "bool bVar3;" primitive_type identifier ;) (declaration "byte bVar4;" type_identifier identifier ;) (declaration "uint uVar5;" type_identifier identifier ;) (declaration "uint uVar6;" type_identifier identifier ;) (declaration "int iVar7;" primitive_type identifier ;) (declaration "uint uVar8;" type_identifier identifier ;) (declaration "int iVar9;" primitive_type identifier ;) (expression_statement "iVar7 = param_3 + -1;" (assignment_expression "iVar7 = param_3 + -1" identifier = (binary_expression "param_3 + -1" identifier + number_literal)) ;) (if_statement "if (param_3 == 0) {\n    return 0;\n  }" if (parenthesized_expression "(param_3 == 0)" ( (binary_expression "param_3 == 0" identifier == number_literal) )) (compound_statement "{\n    return 0;\n  }" { (return_statement "return 0;" return number_literal ;) })) (expression_statement "uVar6 = param_1[1];" (assignment_expression "uVar6 = param_1[1]" identifier = (subscript_expression "param_1[1]" identifier [ number_literal ])) ;) (expression_statement "uVar5 = *param_1;" (assignment_expression "uVar5 = *param_1" identifier = (pointer_expression "*param_1" * identifier)) ;) (expression_statement "bVar4 = 0;" (assignment_expression "bVar4 = 0" identifier = number_literal) ;) (do_statement "do {\n    bVar3 = false;\n    if (uVar5 == 0) {\n      uVar8 = uVar6;\n      uVar2 = (int)param_2 >> 0x1f;\n      if ((int)param_2 < 0) {\nLAB_000176a8:\n        if ((int)((ulonglong)uVar8 * (ulonglong)uVar2 +\n                  ((ulonglong)uVar6 * (ulonglong)param_2 >> 0x20) >> 0x20) != 0) goto LAB_00017724;\n      }\n    }\n    else {\n      uVar8 = param_2;\n      uVar2 = uVar5;\n      if (-1 < (int)param_2) goto LAB_000176a8;\nLAB_00017724:\n      bVar3 = true;\n    }\n    iVar9 = ((int)param_2 >> 0x1f) * uVar6;\n    if (bVar3) {\n      uVar6 = 0xffffffff;\n      uVar5 = 0xffffffff;\n    }\n    else {\n      uVar1 = (ulonglong)uVar6;\n      uVar6 = (uint)(uVar1 * param_2);\n      uVar5 = iVar9 + param_2 * uVar5 + (int)(uVar1 * param_2 >> 0x20);\n    }\n    iVar7 = iVar7 + -1;\n    bVar4 = bVar4 | bVar3;\n    if (iVar7 == -1) {\n      param_1[1] = uVar6;\n      *param_1 = uVar5;\n      return bVar4;\n    }\n  } while( true );" do (compound_statement "{\n    bVar3 = false;\n    if (uVar5 == 0) {\n      uVar8 = uVar6;\n      uVar2 = (int)param_2 >> 0x1f;\n      if ((int)param_2 < 0) {\nLAB_000176a8:\n        if ((int)((ulonglong)uVar8 * (ulonglong)uVar2 +\n                  ((ulonglong)uVar6 * (ulonglong)param_2 >> 0x20) >> 0x20) != 0) goto LAB_00017724;\n      }\n    }\n    else {\n      uVar8 = param_2;\n      uVar2 = uVar5;\n      if (-1 < (int)param_2) goto LAB_000176a8;\nLAB_00017724:\n      bVar3 = true;\n    }\n    iVar9 = ((int)param_2 >> 0x1f) * uVar6;\n    if (bVar3) {\n      uVar6 = 0xffffffff;\n      uVar5 = 0xffffffff;\n    }\n    else {\n      uVar1 = (ulonglong)uVar6;\n      uVar6 = (uint)(uVar1 * param_2);\n      uVar5 = iVar9 + param_2 * uVar5 + (int)(uVar1 * param_2 >> 0x20);\n    }\n    iVar7 = iVar7 + -1;\n    bVar4 = bVar4 | bVar3;\n    if (iVar7 == -1) {\n      param_1[1] = uVar6;\n      *param_1 = uVar5;\n      return bVar4;\n    }\n  }" { (expression_statement "bVar3 = false;" (assignment_expression "bVar3 = false" identifier = false) ;) (if_statement "if (uVar5 == 0) {\n      uVar8 = uVar6;\n      uVar2 = (int)param_2 >> 0x1f;\n      if ((int)param_2 < 0) {\nLAB_000176a8:\n        if ((int)((ulonglong)uVar8 * (ulonglong)uVar2 +\n                  ((ulonglong)uVar6 * (ulonglong)param_2 >> 0x20) >> 0x20) != 0) goto LAB_00017724;\n      }\n    }\n    else {\n      uVar8 = param_2;\n      uVar2 = uVar5;\n      if (-1 < (int)param_2) goto LAB_000176a8;\nLAB_00017724:\n      bVar3 = true;\n    }" if (parenthesized_expression "(uVar5 == 0)" ( (binary_expression "uVar5 == 0" identifier == number_literal) )) (compound_statement "{\n      uVar8 = uVar6;\n      uVar2 = (int)param_2 >> 0x1f;\n      if ((int)param_2 < 0) {\nLAB_000176a8:\n        if ((int)((ulonglong)uVar8 * (ulonglong)uVar2 +\n                  ((ulonglong)uVar6 * (ulonglong)param_2 >> 0x20) >> 0x20) != 0) goto LAB_00017724;\n      }\n    }" { (expression_statement "uVar8 = uVar6;" (assignment_expression "uVar8 = uVar6" identifier = identifier) ;) (expression_statement "uVar2 = (int)param_2 >> 0x1f;" (assignment_expression "uVar2 = (int)param_2 >> 0x1f" identifier = (binary_expression "(int)param_2 >> 0x1f" (cast_expression "(int)param_2" ( (type_descriptor "int" primitive_type) ) identifier) >> number_literal)) ;) (if_statement "if ((int)param_2 < 0) {\nLAB_000176a8:\n        if ((int)((ulonglong)uVar8 * (ulonglong)uVar2 +\n                  ((ulonglong)uVar6 * (ulonglong)param_2 >> 0x20) >> 0x20) != 0) goto LAB_00017724;\n      }" if (parenthesized_expression "((int)param_2 < 0)" ( (binary_expression "(int)param_2 < 0" (cast_expression "(int)param_2" ( (type_descriptor "int" primitive_type) ) identifier) < number_literal) )) (compound_statement "{\nLAB_000176a8:\n        if ((int)((ulonglong)uVar8 * (ulonglong)uVar2 +\n                  ((ulonglong)uVar6 * (ulonglong)param_2 >> 0x20) >> 0x20) != 0) goto LAB_00017724;\n      }" { (labeled_statement "LAB_000176a8:\n        if ((int)((ulonglong)uVar8 * (ulonglong)uVar2 +\n                  ((ulonglong)uVar6 * (ulonglong)param_2 >> 0x20) >> 0x20) != 0) goto LAB_00017724;" statement_identifier : (if_statement "if ((int)((ulonglong)uVar8 * (ulonglong)uVar2 +\n                  ((ulonglong)uVar6 * (ulonglong)param_2 >> 0x20) >> 0x20) != 0) goto LAB_00017724;" if (parenthesized_expression "((int)((ulonglong)uVar8 * (ulonglong)uVar2 +\n                  ((ulonglong)uVar6 * (ulonglong)param_2 >> 0x20) >> 0x20) != 0)" ( (binary_expression "(int)((ulonglong)uVar8 * (ulonglong)uVar2 +\n                  ((ulonglong)uVar6 * (ulonglong)param_2 >> 0x20) >> 0x20) != 0" (cast_expression "(int)((ulonglong)uVar8 * (ulonglong)uVar2 +\n                  ((ulonglong)uVar6 * (ulonglong)param_2 >> 0x20) >> 0x20)" ( (type_descriptor "int" primitive_type) ) (parenthesized_expression "((ulonglong)uVar8 * (ulonglong)uVar2 +\n                  ((ulonglong)uVar6 * (ulonglong)param_2 >> 0x20) >> 0x20)" ( (binary_expression "(ulonglong)uVar8 * (ulonglong)uVar2 +\n                  ((ulonglong)uVar6 * (ulonglong)param_2 >> 0x20) >> 0x20" (binary_expression "(ulonglong)uVar8 * (ulonglong)uVar2 +\n                  ((ulonglong)uVar6 * (ulonglong)param_2 >> 0x20)" (binary_expression "(ulonglong)uVar8 * (ulonglong)uVar2" (cast_expression "(ulonglong)uVar8" ( (type_descriptor "ulonglong" type_identifier) ) identifier) * (cast_expression "(ulonglong)uVar2" ( (type_descriptor "ulonglong" type_identifier) ) identifier)) + (parenthesized_expression "((ulonglong)uVar6 * (ulonglong)param_2 >> 0x20)" ( (binary_expression "(ulonglong)uVar6 * (ulonglong)param_2 >> 0x20" (binary_expression "(ulonglong)uVar6 * (ulonglong)param_2" (cast_expression "(ulonglong)uVar6" ( (type_descriptor "ulonglong" type_identifier) ) identifier) * (cast_expression "(ulonglong)param_2" ( (type_descriptor "ulonglong" type_identifier) ) identifier)) >> number_literal) ))) >> number_literal) ))) != number_literal) )) (goto_statement "goto LAB_00017724;" goto statement_identifier ;))) })) }) (else_clause "else {\n      uVar8 = param_2;\n      uVar2 = uVar5;\n      if (-1 < (int)param_2) goto LAB_000176a8;\nLAB_00017724:\n      bVar3 = true;\n    }" else (compound_statement "{\n      uVar8 = param_2;\n      uVar2 = uVar5;\n      if (-1 < (int)param_2) goto LAB_000176a8;\nLAB_00017724:\n      bVar3 = true;\n    }" { (expression_statement "uVar8 = param_2;" (assignment_expression "uVar8 = param_2" identifier = identifier) ;) (expression_statement "uVar2 = uVar5;" (assignment_expression "uVar2 = uVar5" identifier = identifier) ;) (if_statement "if (-1 < (int)param_2) goto LAB_000176a8;" if (parenthesized_expression "(-1 < (int)param_2)" ( (binary_expression "-1 < (int)param_2" number_literal < (cast_expression "(int)param_2" ( (type_descriptor "int" primitive_type) ) identifier)) )) (goto_statement "goto LAB_000176a8;" goto statement_identifier ;)) (labeled_statement "LAB_00017724:\n      bVar3 = true;" statement_identifier : (expression_statement "bVar3 = true;" (assignment_expression "bVar3 = true" identifier = true) ;)) }))) (expression_statement "iVar9 = ((int)param_2 >> 0x1f) * uVar6;" (assignment_expression "iVar9 = ((int)param_2 >> 0x1f) * uVar6" identifier = (binary_expression "((int)param_2 >> 0x1f) * uVar6" (parenthesized_expression "((int)param_2 >> 0x1f)" ( (binary_expression "(int)param_2 >> 0x1f" (cast_expression "(int)param_2" ( (type_descriptor "int" primitive_type) ) identifier) >> number_literal) )) * identifier)) ;) (if_statement "if (bVar3) {\n      uVar6 = 0xffffffff;\n      uVar5 = 0xffffffff;\n    }\n    else {\n      uVar1 = (ulonglong)uVar6;\n      uVar6 = (uint)(uVar1 * param_2);\n      uVar5 = iVar9 + param_2 * uVar5 + (int)(uVar1 * param_2 >> 0x20);\n    }" if (parenthesized_expression "(bVar3)" ( identifier )) (compound_statement "{\n      uVar6 = 0xffffffff;\n      uVar5 = 0xffffffff;\n    }" { (expression_statement "uVar6 = 0xffffffff;" (assignment_expression "uVar6 = 0xffffffff" identifier = number_literal) ;) (expression_statement "uVar5 = 0xffffffff;" (assignment_expression "uVar5 = 0xffffffff" identifier = number_literal) ;) }) (else_clause "else {\n      uVar1 = (ulonglong)uVar6;\n      uVar6 = (uint)(uVar1 * param_2);\n      uVar5 = iVar9 + param_2 * uVar5 + (int)(uVar1 * param_2 >> 0x20);\n    }" else (compound_statement "{\n      uVar1 = (ulonglong)uVar6;\n      uVar6 = (uint)(uVar1 * param_2);\n      uVar5 = iVar9 + param_2 * uVar5 + (int)(uVar1 * param_2 >> 0x20);\n    }" { (expression_statement "uVar1 = (ulonglong)uVar6;" (assignment_expression "uVar1 = (ulonglong)uVar6" identifier = (cast_expression "(ulonglong)uVar6" ( (type_descriptor "ulonglong" type_identifier) ) identifier)) ;) (expression_statement "uVar6 = (uint)(uVar1 * param_2);" (assignment_expression "uVar6 = (uint)(uVar1 * param_2)" identifier = (call_expression "(uint)(uVar1 * param_2)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(uVar1 * param_2)" ( (binary_expression "uVar1 * param_2" identifier * identifier) )))) ;) (expression_statement "uVar5 = iVar9 + param_2 * uVar5 + (int)(uVar1 * param_2 >> 0x20);" (assignment_expression "uVar5 = iVar9 + param_2 * uVar5 + (int)(uVar1 * param_2 >> 0x20)" identifier = (binary_expression "iVar9 + param_2 * uVar5 + (int)(uVar1 * param_2 >> 0x20)" (binary_expression "iVar9 + param_2 * uVar5" identifier + (binary_expression "param_2 * uVar5" identifier * identifier)) + (cast_expression "(int)(uVar1 * param_2 >> 0x20)" ( (type_descriptor "int" primitive_type) ) (parenthesized_expression "(uVar1 * param_2 >> 0x20)" ( (binary_expression "uVar1 * param_2 >> 0x20" (binary_expression "uVar1 * param_2" identifier * identifier) >> number_literal) ))))) ;) }))) (expression_statement "iVar7 = iVar7 + -1;" (assignment_expression "iVar7 = iVar7 + -1" identifier = (binary_expression "iVar7 + -1" identifier + number_literal)) ;) (expression_statement "bVar4 = bVar4 | bVar3;" (assignment_expression "bVar4 = bVar4 | bVar3" identifier = (binary_expression "bVar4 | bVar3" identifier | identifier)) ;) (if_statement "if (iVar7 == -1) {\n      param_1[1] = uVar6;\n      *param_1 = uVar5;\n      return bVar4;\n    }" if (parenthesized_expression "(iVar7 == -1)" ( (binary_expression "iVar7 == -1" identifier == number_literal) )) (compound_statement "{\n      param_1[1] = uVar6;\n      *param_1 = uVar5;\n      return bVar4;\n    }" { (expression_statement "param_1[1] = uVar6;" (assignment_expression "param_1[1] = uVar6" (subscript_expression "param_1[1]" identifier [ number_literal ]) = identifier) ;) (expression_statement "*param_1 = uVar5;" (assignment_expression "*param_1 = uVar5" (pointer_expression "*param_1" * identifier) = identifier) ;) (return_statement "return bVar4;" return identifier ;) })) }) while (parenthesized_expression "( true )" ( true )) ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE (pointer_declarator * IDENT)) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (return_statement return LIT ;) })) (expression_statement (assignment_expression IDENT = (subscript_expression IDENT [ LIT ])) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * IDENT)) ;) (expression_statement (assignment_expression IDENT = LIT) ;) (do_statement do (compound_statement { (expression_statement (assignment_expression IDENT = BOOL) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = IDENT) ;) (expression_statement (assignment_expression IDENT = (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) >> LIT)) ;) (if_statement if (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) < LIT) )) (compound_statement { (labeled_statement statement_identifier : (if_statement if (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor TYPE) ) (parenthesized_expression ( (binary_expression (binary_expression (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) * (cast_expression ( (type_descriptor TYPE) ) IDENT)) + (parenthesized_expression ( (binary_expression (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) * (cast_expression ( (type_descriptor TYPE) ) IDENT)) >> LIT) ))) >> LIT) ))) != LIT) )) (goto_statement goto statement_identifier ;))) })) }) (else_clause else (compound_statement { (expression_statement (assignment_expression IDENT = IDENT) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (if_statement if (parenthesized_expression ( (binary_expression LIT < (cast_expression ( (type_descriptor TYPE) ) IDENT)) )) (goto_statement goto statement_identifier ;)) (labeled_statement statement_identifier : (expression_statement (assignment_expression IDENT = BOOL) ;)) }))) (expression_statement (assignment_expression IDENT = (binary_expression (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) >> LIT) )) * IDENT)) ;) (if_statement if (parenthesized_expression ( IDENT )) (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = LIT) ;) }) (else_clause else (compound_statement { (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE) ) IDENT)) ;) (expression_statement (assignment_expression IDENT = (call_expression (parenthesized_expression ( IDENT )) (argument_list ( (binary_expression IDENT * IDENT) )))) ;) (expression_statement (assignment_expression IDENT = (binary_expression (binary_expression IDENT + (binary_expression IDENT * IDENT)) + (cast_expression ( (type_descriptor TYPE) ) (parenthesized_expression ( (binary_expression (binary_expression IDENT * IDENT) >> LIT) ))))) ;) }))) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT | IDENT)) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = IDENT) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = IDENT) ;) (return_statement return IDENT ;) })) }) while (parenthesized_expression ( BOOL )) ;) })))
(function_definition "byte FUN_00017660(uint *param_1,uint param_2,int param_3)\n\n{\n  ulonglong uVar1;\n  uint uVar2;\n  bool bVar3;\n  byte bVar4;\n  uint uVar5;\n  uint uVar6;\n  int iVar7;\n  uint uVar8;\n  int iVar9;\n  \n  iVar7 = param_3 + -1;\n  if (param_3 == 0) {\n    return 0;\n  }\n  uVar6 = param_1[1];\n  uVar5 = *param_1;\n  bVar4 = 0;\n  do {\n    bVar3 = false;\n    if (uVar5 == 0) {\n      uVar8 = uVar6;\n      uVar2 = (int)param_2 >> 0x1f;\n      if ((int)param_2 < 0) {\nLAB_000176a8:\n        if ((int)((ulonglong)uVar8 * (ulonglong)uVar2 +\n                  ((ulonglong)uVar6 * (ulonglong)param_2 >> 0x20) >> 0x20) != 0) goto LAB_00017724;\n      }\n    }\n    else {\n      uVar8 = param_2;\n      uVar2 = uVar5;\n      if (-1 < (int)param_2) goto LAB_000176a8;\nLAB_00017724:\n      bVar3 = true;\n    }\n    iVar9 = ((int)param_2 >> 0x1f) * uVar6;\n    if (bVar3) {\n      uVar6 = 0xffffffff;\n      uVar5 = 0xffffffff;\n    }\n    else {\n      uVar1 = (ulonglong)uVar6;\n      uVar6 = (uint)(uVar1 * param_2);\n      uVar5 = iVar9 + param_2 * uVar5 + (int)(uVar1 * param_2 >> 0x20);\n    }\n    iVar7 = iVar7 + -1;\n    bVar4 = bVar4 | bVar3;\n    if (iVar7 == -1) {\n      param_1[1] = uVar6;\n      *param_1 = uVar5;\n      return bVar4;\n    }\n  } while( true );\n}" (type_identifier "byte") (function_declarator "FUN_00017660(uint *param_1,uint param_2,int param_3)" (identifier "FUN_00017660") (parameter_list "(uint *param_1,uint param_2,int param_3)" (( "(") (parameter_declaration "uint *param_1" (type_identifier "uint") (pointer_declarator "*param_1" (* "*") (identifier "param_1"))) (, ",") (parameter_declaration "uint param_2" (type_identifier "uint") (identifier "param_2")) (, ",") (parameter_declaration "int param_3" (primitive_type "int") (identifier "param_3")) () ")"))) (compound_statement "{\n  ulonglong uVar1;\n  uint uVar2;\n  bool bVar3;\n  byte bVar4;\n  uint uVar5;\n  uint uVar6;\n  int iVar7;\n  uint uVar8;\n  int iVar9;\n  \n  iVar7 = param_3 + -1;\n  if (param_3 == 0) {\n    return 0;\n  }\n  uVar6 = param_1[1];\n  uVar5 = *param_1;\n  bVar4 = 0;\n  do {\n    bVar3 = false;\n    if (uVar5 == 0) {\n      uVar8 = uVar6;\n      uVar2 = (int)param_2 >> 0x1f;\n      if ((int)param_2 < 0) {\nLAB_000176a8:\n        if ((int)((ulonglong)uVar8 * (ulonglong)uVar2 +\n                  ((ulonglong)uVar6 * (ulonglong)param_2 >> 0x20) >> 0x20) != 0) goto LAB_00017724;\n      }\n    }\n    else {\n      uVar8 = param_2;\n      uVar2 = uVar5;\n      if (-1 < (int)param_2) goto LAB_000176a8;\nLAB_00017724:\n      bVar3 = true;\n    }\n    iVar9 = ((int)param_2 >> 0x1f) * uVar6;\n    if (bVar3) {\n      uVar6 = 0xffffffff;\n      uVar5 = 0xffffffff;\n    }\n    else {\n      uVar1 = (ulonglong)uVar6;\n      uVar6 = (uint)(uVar1 * param_2);\n      uVar5 = iVar9 + param_2 * uVar5 + (int)(uVar1 * param_2 >> 0x20);\n    }\n    iVar7 = iVar7 + -1;\n    bVar4 = bVar4 | bVar3;\n    if (iVar7 == -1) {\n      param_1[1] = uVar6;\n      *param_1 = uVar5;\n      return bVar4;\n    }\n  } while( true );\n}" ({ "{") (declaration "ulonglong uVar1;" (type_identifier "ulonglong") (identifier "uVar1") (; ";")) (declaration "uint uVar2;" (type_identifier "uint") (identifier "uVar2") (; ";")) (declaration "bool bVar3;" (primitive_type "bool") (identifier "bVar3") (; ";")) (declaration "byte bVar4;" (type_identifier "byte") (identifier "bVar4") (; ";")) (declaration "uint uVar5;" (type_identifier "uint") (identifier "uVar5") (; ";")) (declaration "uint uVar6;" (type_identifier "uint") (identifier "uVar6") (; ";")) (declaration "int iVar7;" (primitive_type "int") (identifier "iVar7") (; ";")) (declaration "uint uVar8;" (type_identifier "uint") (identifier "uVar8") (; ";")) (declaration "int iVar9;" (primitive_type "int") (identifier "iVar9") (; ";")) (expression_statement "iVar7 = param_3 + -1;" (assignment_expression "iVar7 = param_3 + -1" (identifier "iVar7") (= "=") (binary_expression "param_3 + -1" (identifier "param_3") (+ "+") (number_literal "-1"))) (; ";")) (if_statement "if (param_3 == 0) {\n    return 0;\n  }" (if "if") (parenthesized_expression "(param_3 == 0)" (( "(") (binary_expression "param_3 == 0" (identifier "param_3") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n    return 0;\n  }" ({ "{") (return_statement "return 0;" (return "return") (number_literal "0") (; ";")) (} "}"))) (expression_statement "uVar6 = param_1[1];" (assignment_expression "uVar6 = param_1[1]" (identifier "uVar6") (= "=") (subscript_expression "param_1[1]" (identifier "param_1") ([ "[") (number_literal "1") (] "]"))) (; ";")) (expression_statement "uVar5 = *param_1;" (assignment_expression "uVar5 = *param_1" (identifier "uVar5") (= "=") (pointer_expression "*param_1" (* "*") (identifier "param_1"))) (; ";")) (expression_statement "bVar4 = 0;" (assignment_expression "bVar4 = 0" (identifier "bVar4") (= "=") (number_literal "0")) (; ";")) (do_statement "do {\n    bVar3 = false;\n    if (uVar5 == 0) {\n      uVar8 = uVar6;\n      uVar2 = (int)param_2 >> 0x1f;\n      if ((int)param_2 < 0) {\nLAB_000176a8:\n        if ((int)((ulonglong)uVar8 * (ulonglong)uVar2 +\n                  ((ulonglong)uVar6 * (ulonglong)param_2 >> 0x20) >> 0x20) != 0) goto LAB_00017724;\n      }\n    }\n    else {\n      uVar8 = param_2;\n      uVar2 = uVar5;\n      if (-1 < (int)param_2) goto LAB_000176a8;\nLAB_00017724:\n      bVar3 = true;\n    }\n    iVar9 = ((int)param_2 >> 0x1f) * uVar6;\n    if (bVar3) {\n      uVar6 = 0xffffffff;\n      uVar5 = 0xffffffff;\n    }\n    else {\n      uVar1 = (ulonglong)uVar6;\n      uVar6 = (uint)(uVar1 * param_2);\n      uVar5 = iVar9 + param_2 * uVar5 + (int)(uVar1 * param_2 >> 0x20);\n    }\n    iVar7 = iVar7 + -1;\n    bVar4 = bVar4 | bVar3;\n    if (iVar7 == -1) {\n      param_1[1] = uVar6;\n      *param_1 = uVar5;\n      return bVar4;\n    }\n  } while( true );" (do "do") (compound_statement "{\n    bVar3 = false;\n    if (uVar5 == 0) {\n      uVar8 = uVar6;\n      uVar2 = (int)param_2 >> 0x1f;\n      if ((int)param_2 < 0) {\nLAB_000176a8:\n        if ((int)((ulonglong)uVar8 * (ulonglong)uVar2 +\n                  ((ulonglong)uVar6 * (ulonglong)param_2 >> 0x20) >> 0x20) != 0) goto LAB_00017724;\n      }\n    }\n    else {\n      uVar8 = param_2;\n      uVar2 = uVar5;\n      if (-1 < (int)param_2) goto LAB_000176a8;\nLAB_00017724:\n      bVar3 = true;\n    }\n    iVar9 = ((int)param_2 >> 0x1f) * uVar6;\n    if (bVar3) {\n      uVar6 = 0xffffffff;\n      uVar5 = 0xffffffff;\n    }\n    else {\n      uVar1 = (ulonglong)uVar6;\n      uVar6 = (uint)(uVar1 * param_2);\n      uVar5 = iVar9 + param_2 * uVar5 + (int)(uVar1 * param_2 >> 0x20);\n    }\n    iVar7 = iVar7 + -1;\n    bVar4 = bVar4 | bVar3;\n    if (iVar7 == -1) {\n      param_1[1] = uVar6;\n      *param_1 = uVar5;\n      return bVar4;\n    }\n  }" ({ "{") (expression_statement "bVar3 = false;" (assignment_expression "bVar3 = false" (identifier "bVar3") (= "=") (false "false")) (; ";")) (if_statement "if (uVar5 == 0) {\n      uVar8 = uVar6;\n      uVar2 = (int)param_2 >> 0x1f;\n      if ((int)param_2 < 0) {\nLAB_000176a8:\n        if ((int)((ulonglong)uVar8 * (ulonglong)uVar2 +\n                  ((ulonglong)uVar6 * (ulonglong)param_2 >> 0x20) >> 0x20) != 0) goto LAB_00017724;\n      }\n    }\n    else {\n      uVar8 = param_2;\n      uVar2 = uVar5;\n      if (-1 < (int)param_2) goto LAB_000176a8;\nLAB_00017724:\n      bVar3 = true;\n    }" (if "if") (parenthesized_expression "(uVar5 == 0)" (( "(") (binary_expression "uVar5 == 0" (identifier "uVar5") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n      uVar8 = uVar6;\n      uVar2 = (int)param_2 >> 0x1f;\n      if ((int)param_2 < 0) {\nLAB_000176a8:\n        if ((int)((ulonglong)uVar8 * (ulonglong)uVar2 +\n                  ((ulonglong)uVar6 * (ulonglong)param_2 >> 0x20) >> 0x20) != 0) goto LAB_00017724;\n      }\n    }" ({ "{") (expression_statement "uVar8 = uVar6;" (assignment_expression "uVar8 = uVar6" (identifier "uVar8") (= "=") (identifier "uVar6")) (; ";")) (expression_statement "uVar2 = (int)param_2 >> 0x1f;" (assignment_expression "uVar2 = (int)param_2 >> 0x1f" (identifier "uVar2") (= "=") (binary_expression "(int)param_2 >> 0x1f" (cast_expression "(int)param_2" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "param_2")) (>> ">>") (number_literal "0x1f"))) (; ";")) (if_statement "if ((int)param_2 < 0) {\nLAB_000176a8:\n        if ((int)((ulonglong)uVar8 * (ulonglong)uVar2 +\n                  ((ulonglong)uVar6 * (ulonglong)param_2 >> 0x20) >> 0x20) != 0) goto LAB_00017724;\n      }" (if "if") (parenthesized_expression "((int)param_2 < 0)" (( "(") (binary_expression "(int)param_2 < 0" (cast_expression "(int)param_2" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "param_2")) (< "<") (number_literal "0")) () ")")) (compound_statement "{\nLAB_000176a8:\n        if ((int)((ulonglong)uVar8 * (ulonglong)uVar2 +\n                  ((ulonglong)uVar6 * (ulonglong)param_2 >> 0x20) >> 0x20) != 0) goto LAB_00017724;\n      }" ({ "{") (labeled_statement "LAB_000176a8:\n        if ((int)((ulonglong)uVar8 * (ulonglong)uVar2 +\n                  ((ulonglong)uVar6 * (ulonglong)param_2 >> 0x20) >> 0x20) != 0) goto LAB_00017724;" (statement_identifier "LAB_000176a8") (: ":") (if_statement "if ((int)((ulonglong)uVar8 * (ulonglong)uVar2 +\n                  ((ulonglong)uVar6 * (ulonglong)param_2 >> 0x20) >> 0x20) != 0) goto LAB_00017724;" (if "if") (parenthesized_expression "((int)((ulonglong)uVar8 * (ulonglong)uVar2 +\n                  ((ulonglong)uVar6 * (ulonglong)param_2 >> 0x20) >> 0x20) != 0)" (( "(") (binary_expression "(int)((ulonglong)uVar8 * (ulonglong)uVar2 +\n                  ((ulonglong)uVar6 * (ulonglong)param_2 >> 0x20) >> 0x20) != 0" (cast_expression "(int)((ulonglong)uVar8 * (ulonglong)uVar2 +\n                  ((ulonglong)uVar6 * (ulonglong)param_2 >> 0x20) >> 0x20)" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (parenthesized_expression "((ulonglong)uVar8 * (ulonglong)uVar2 +\n                  ((ulonglong)uVar6 * (ulonglong)param_2 >> 0x20) >> 0x20)" (( "(") (binary_expression "(ulonglong)uVar8 * (ulonglong)uVar2 +\n                  ((ulonglong)uVar6 * (ulonglong)param_2 >> 0x20) >> 0x20" (binary_expression "(ulonglong)uVar8 * (ulonglong)uVar2 +\n                  ((ulonglong)uVar6 * (ulonglong)param_2 >> 0x20)" (binary_expression "(ulonglong)uVar8 * (ulonglong)uVar2" (cast_expression "(ulonglong)uVar8" (( "(") (type_descriptor "ulonglong" (type_identifier "ulonglong")) () ")") (identifier "uVar8")) (* "*") (cast_expression "(ulonglong)uVar2" (( "(") (type_descriptor "ulonglong" (type_identifier "ulonglong")) () ")") (identifier "uVar2"))) (+ "+") (parenthesized_expression "((ulonglong)uVar6 * (ulonglong)param_2 >> 0x20)" (( "(") (binary_expression "(ulonglong)uVar6 * (ulonglong)param_2 >> 0x20" (binary_expression "(ulonglong)uVar6 * (ulonglong)param_2" (cast_expression "(ulonglong)uVar6" (( "(") (type_descriptor "ulonglong" (type_identifier "ulonglong")) () ")") (identifier "uVar6")) (* "*") (cast_expression "(ulonglong)param_2" (( "(") (type_descriptor "ulonglong" (type_identifier "ulonglong")) () ")") (identifier "param_2"))) (>> ">>") (number_literal "0x20")) () ")"))) (>> ">>") (number_literal "0x20")) () ")"))) (!= "!=") (number_literal "0")) () ")")) (goto_statement "goto LAB_00017724;" (goto "goto") (statement_identifier "LAB_00017724") (; ";")))) (} "}"))) (} "}")) (else_clause "else {\n      uVar8 = param_2;\n      uVar2 = uVar5;\n      if (-1 < (int)param_2) goto LAB_000176a8;\nLAB_00017724:\n      bVar3 = true;\n    }" (else "else") (compound_statement "{\n      uVar8 = param_2;\n      uVar2 = uVar5;\n      if (-1 < (int)param_2) goto LAB_000176a8;\nLAB_00017724:\n      bVar3 = true;\n    }" ({ "{") (expression_statement "uVar8 = param_2;" (assignment_expression "uVar8 = param_2" (identifier "uVar8") (= "=") (identifier "param_2")) (; ";")) (expression_statement "uVar2 = uVar5;" (assignment_expression "uVar2 = uVar5" (identifier "uVar2") (= "=") (identifier "uVar5")) (; ";")) (if_statement "if (-1 < (int)param_2) goto LAB_000176a8;" (if "if") (parenthesized_expression "(-1 < (int)param_2)" (( "(") (binary_expression "-1 < (int)param_2" (number_literal "-1") (< "<") (cast_expression "(int)param_2" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "param_2"))) () ")")) (goto_statement "goto LAB_000176a8;" (goto "goto") (statement_identifier "LAB_000176a8") (; ";"))) (labeled_statement "LAB_00017724:\n      bVar3 = true;" (statement_identifier "LAB_00017724") (: ":") (expression_statement "bVar3 = true;" (assignment_expression "bVar3 = true" (identifier "bVar3") (= "=") (true "true")) (; ";"))) (} "}")))) (expression_statement "iVar9 = ((int)param_2 >> 0x1f) * uVar6;" (assignment_expression "iVar9 = ((int)param_2 >> 0x1f) * uVar6" (identifier "iVar9") (= "=") (binary_expression "((int)param_2 >> 0x1f) * uVar6" (parenthesized_expression "((int)param_2 >> 0x1f)" (( "(") (binary_expression "(int)param_2 >> 0x1f" (cast_expression "(int)param_2" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "param_2")) (>> ">>") (number_literal "0x1f")) () ")")) (* "*") (identifier "uVar6"))) (; ";")) (if_statement "if (bVar3) {\n      uVar6 = 0xffffffff;\n      uVar5 = 0xffffffff;\n    }\n    else {\n      uVar1 = (ulonglong)uVar6;\n      uVar6 = (uint)(uVar1 * param_2);\n      uVar5 = iVar9 + param_2 * uVar5 + (int)(uVar1 * param_2 >> 0x20);\n    }" (if "if") (parenthesized_expression "(bVar3)" (( "(") (identifier "bVar3") () ")")) (compound_statement "{\n      uVar6 = 0xffffffff;\n      uVar5 = 0xffffffff;\n    }" ({ "{") (expression_statement "uVar6 = 0xffffffff;" (assignment_expression "uVar6 = 0xffffffff" (identifier "uVar6") (= "=") (number_literal "0xffffffff")) (; ";")) (expression_statement "uVar5 = 0xffffffff;" (assignment_expression "uVar5 = 0xffffffff" (identifier "uVar5") (= "=") (number_literal "0xffffffff")) (; ";")) (} "}")) (else_clause "else {\n      uVar1 = (ulonglong)uVar6;\n      uVar6 = (uint)(uVar1 * param_2);\n      uVar5 = iVar9 + param_2 * uVar5 + (int)(uVar1 * param_2 >> 0x20);\n    }" (else "else") (compound_statement "{\n      uVar1 = (ulonglong)uVar6;\n      uVar6 = (uint)(uVar1 * param_2);\n      uVar5 = iVar9 + param_2 * uVar5 + (int)(uVar1 * param_2 >> 0x20);\n    }" ({ "{") (expression_statement "uVar1 = (ulonglong)uVar6;" (assignment_expression "uVar1 = (ulonglong)uVar6" (identifier "uVar1") (= "=") (cast_expression "(ulonglong)uVar6" (( "(") (type_descriptor "ulonglong" (type_identifier "ulonglong")) () ")") (identifier "uVar6"))) (; ";")) (expression_statement "uVar6 = (uint)(uVar1 * param_2);" (assignment_expression "uVar6 = (uint)(uVar1 * param_2)" (identifier "uVar6") (= "=") (call_expression "(uint)(uVar1 * param_2)" (parenthesized_expression "(uint)" (( "(") (identifier "uint") () ")")) (argument_list "(uVar1 * param_2)" (( "(") (binary_expression "uVar1 * param_2" (identifier "uVar1") (* "*") (identifier "param_2")) () ")")))) (; ";")) (expression_statement "uVar5 = iVar9 + param_2 * uVar5 + (int)(uVar1 * param_2 >> 0x20);" (assignment_expression "uVar5 = iVar9 + param_2 * uVar5 + (int)(uVar1 * param_2 >> 0x20)" (identifier "uVar5") (= "=") (binary_expression "iVar9 + param_2 * uVar5 + (int)(uVar1 * param_2 >> 0x20)" (binary_expression "iVar9 + param_2 * uVar5" (identifier "iVar9") (+ "+") (binary_expression "param_2 * uVar5" (identifier "param_2") (* "*") (identifier "uVar5"))) (+ "+") (cast_expression "(int)(uVar1 * param_2 >> 0x20)" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (parenthesized_expression "(uVar1 * param_2 >> 0x20)" (( "(") (binary_expression "uVar1 * param_2 >> 0x20" (binary_expression "uVar1 * param_2" (identifier "uVar1") (* "*") (identifier "param_2")) (>> ">>") (number_literal "0x20")) () ")"))))) (; ";")) (} "}")))) (expression_statement "iVar7 = iVar7 + -1;" (assignment_expression "iVar7 = iVar7 + -1" (identifier "iVar7") (= "=") (binary_expression "iVar7 + -1" (identifier "iVar7") (+ "+") (number_literal "-1"))) (; ";")) (expression_statement "bVar4 = bVar4 | bVar3;" (assignment_expression "bVar4 = bVar4 | bVar3" (identifier "bVar4") (= "=") (binary_expression "bVar4 | bVar3" (identifier "bVar4") (| "|") (identifier "bVar3"))) (; ";")) (if_statement "if (iVar7 == -1) {\n      param_1[1] = uVar6;\n      *param_1 = uVar5;\n      return bVar4;\n    }" (if "if") (parenthesized_expression "(iVar7 == -1)" (( "(") (binary_expression "iVar7 == -1" (identifier "iVar7") (== "==") (number_literal "-1")) () ")")) (compound_statement "{\n      param_1[1] = uVar6;\n      *param_1 = uVar5;\n      return bVar4;\n    }" ({ "{") (expression_statement "param_1[1] = uVar6;" (assignment_expression "param_1[1] = uVar6" (subscript_expression "param_1[1]" (identifier "param_1") ([ "[") (number_literal "1") (] "]")) (= "=") (identifier "uVar6")) (; ";")) (expression_statement "*param_1 = uVar5;" (assignment_expression "*param_1 = uVar5" (pointer_expression "*param_1" (* "*") (identifier "param_1")) (= "=") (identifier "uVar5")) (; ";")) (return_statement "return bVar4;" (return "return") (identifier "bVar4") (; ";")) (} "}"))) (} "}")) (while "while") (parenthesized_expression "( true )" (( "(") (true "true") () ")")) (; ";")) (} "}")))

type_1 function_1(type_2 *var_2,int var_4,int var_1)

{
  type_3 var_6;
  type_4 uVar2;
  bool var_10;
  type_1 var_9;
  type_4 var_3;
  int var_8;
  type_4 uVar7;
  int var_7;
  type_4 var_5;
  
  var_8 = var_1 + -1;
  if (var_1 == 0) {
    return LONGINT_OK;
  }
  var_5 = (type_4)*var_2;
  var_3 = *(type_4 *)var_2;
  var_9 = LONGINT_OK;
  do {
    var_10 = false;
    if (var_3 == 0) {
      uVar7 = var_5;
      uVar2 = var_4 >> 0x1f;
      if (var_4 < 0) {
LAB_000176a8:
        if ((int)((type_3)uVar7 * (type_3)uVar2 +
                  ((type_3)var_5 * (type_3)(type_4)var_4 >> 0x20) >> 0x20) != 0)
        goto LAB_00017724;
      }
    }
    else {
      uVar7 = var_4;
      uVar2 = var_3;
      if (-1 < var_4) goto LAB_000176a8;
LAB_00017724:
      var_10 = true;
    }
    var_7 = (var_4 >> 0x1f) * var_5;
    if (var_10) {
      var_5 = 0xffffffff;
      var_3 = 0xffffffff;
    }
    else {
      var_6 = (type_3)var_5;
      var_5 = (type_4)(var_6 * (type_4)var_4);
      var_3 = var_7 + var_4 * var_3 + (int)(var_6 * (type_4)var_4 >> 0x20);
    }
    var_8 = var_8 + -1;
    var_9 = var_9 | var_10;
    if (var_8 == -1) {
      *(type_4 *)((int)var_2 + 4) = var_5;
      *(type_4 *)var_2 = var_3;
      return var_9;
    }
  } while( true );
}


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

byte MASKED(uint *param_1,uint param_2,int param_3)

{
  ulonglong uVar1;
  uint uVar2;
  bool bVar3;
  byte bVar4;
  uint uVar5;
  uint uVar6;
  int iVar7;
  uint uVar8;
  int iVar9;
  
  iVar7 = param_3 + -1;
  if (param_3 == 0) {
    return 0;
  }
  uVar6 = param_1[1];
  uVar5 = *param_1;
  bVar4 = 0;
  do {
    bVar3 = false;
    if (uVar5 == 0) {
      uVar8 = uVar6;
      uVar2 = (int)param_2 >> 0x1f;
      if ((int)param_2 < 0) {
LAB_000176a8:
        if ((int)((ulonglong)uVar8 * (ulonglong)uVar2 +
                  ((ulonglong)uVar6 * (ulonglong)param_2 >> 0x20) >> 0x20) != 0) goto LAB_00017724;
      }
    }
    else {
      uVar8 = param_2;
      uVar2 = uVar5;
      if (-1 < (int)param_2) goto LAB_000176a8;
LAB_00017724:
      bVar3 = true;
    }
    iVar9 = ((int)param_2 >> 0x1f) * uVar6;
    if (bVar3) {
      uVar6 = 0xffffffff;
      uVar5 = 0xffffffff;
    }
    else {
      uVar1 = (ulonglong)uVar6;
      uVar6 = (uint)(uVar1 * param_2);
      uVar5 = iVar9 + param_2 * uVar5 + (int)(uVar1 * param_2 >> 0x20);
    }
    iVar7 = iVar7 + -1;
    bVar4 = bVar4 | bVar3;
    if (iVar7 == -1) {
      param_1[1] = uVar6;
      *param_1 = uVar5;
      return bVar4;
    }
  } while( true );
}

