
Bignum_conflict bignum_random_in_range(Bignum_conflict lower,Bignum_conflict upper)

{
  int iVar1;
  int iVar2;
  uchar *data;
  Bignum_conflict a;
  uchar *puVar3;
  int iVar4;
  int nbytes;
  byte local_44;
  
  iVar1 = bignum_bitcount(upper);
  iVar4 = iVar1 + 7;
  if (-1 < iVar1) {
    iVar4 = iVar1;
  }
  iVar1 = iVar1 % 8;
  nbytes = ((iVar4 >> 3) + 1) - (uint)(iVar1 == 0);
  data = (uchar *)safemalloc((long)nbytes,1);
  iVar4 = 0;
  if (-1 < nbytes) {
    iVar4 = nbytes;
  }
  while( true ) {
    puVar3 = data;
    if (0 < nbytes) {
      do {
        iVar2 = random_byte();
        *puVar3 = (uchar)iVar2;
        puVar3 = puVar3 + 1;
      } while (puVar3 != data + (ulong)(nbytes - 1) + 1);
    }
    if (iVar1 != 0) {
      local_44 = (byte)(0xff >> (8U - (char)iVar1 & 0x1f));
      data[(long)iVar4 + -1] = data[(long)iVar4 + -1] & local_44;
    }
    a = bignum_from_bytes(data,nbytes);
    iVar2 = bignum_cmp(a,lower);
    if ((-1 < iVar2) && (iVar2 = bignum_cmp(a,upper), iVar2 < 1)) break;
    if (a != (Bignum_conflict)0x0) {
      freebn(a);
    }
  }
  smemclr(data,(long)nbytes);
  safefree(data);
  return a;
}



long FUN_0014a64e(undefined8 param_1,undefined8 param_2)

{
  undefined1 uVar1;
  int iVar2;
  int iVar3;
  undefined1 *puVar4;
  long lVar5;
  undefined1 *puVar6;
  int iVar7;
  int iVar8;
  byte local_44;
  
  iVar2 = FUN_0014a306(param_2);
  iVar7 = iVar2 + 7;
  if (-1 < iVar2) {
    iVar7 = iVar2;
  }
  iVar2 = iVar2 % 8;
  iVar8 = ((iVar7 >> 3) + 1) - (uint)(iVar2 == 0);
  puVar4 = (undefined1 *)FUN_00126895((long)iVar8,1);
  iVar7 = 0;
  if (-1 < iVar8) {
    iVar7 = iVar8;
  }
  while( true ) {
    puVar6 = puVar4;
    if (0 < iVar8) {
      do {
        uVar1 = FUN_0015b3a9();
        *puVar6 = uVar1;
        puVar6 = puVar6 + 1;
      } while (puVar6 != puVar4 + (ulong)(iVar8 - 1) + 1);
    }
    if (iVar2 != 0) {
      local_44 = (byte)(0xff >> (8U - (char)iVar2 & 0x1f));
      puVar4[(long)iVar7 + -1] = puVar4[(long)iVar7 + -1] & local_44;
    }
    lVar5 = FUN_0014a104(puVar4,iVar8);
    iVar3 = FUN_0014a527(lVar5,param_1);
    if ((-1 < iVar3) && (iVar3 = FUN_0014a527(lVar5,param_2), iVar3 < 1)) break;
    if (lVar5 != 0) {
      FUN_00149d43(lVar5);
    }
  }
  FUN_00127355(puVar4,(long)iVar8);
  FUN_00127101(puVar4);
  return lVar5;
}


PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x28
MOV qword ptr [RSP],RDI
MOV qword ptr [RSP + 0x8],RSI
MOV RDI,RSI
CALL 0x0014a306
LEA R12D,[RAX + 0x7]
TEST EAX,EAX
CMOVNS R12D,EAX
SAR R12D,0x3
CDQ
SHR EDX,0x1d
LEA EBX,[RAX + RDX*0x1]
AND EBX,0x7
SUB EBX,EDX
MOV R15D,EBX
CMP EBX,0x1
SBB R12D,-0x1
MOVSXD RAX,R12D
MOV qword ptr [RSP + 0x18],RAX
MOV ESI,0x1
MOV RDI,RAX
CALL 0x00126895
MOV R13,RAX
MOV ECX,0x8
SUB ECX,EBX
MOV EAX,0xff
SAR EAX,CL
MOV dword ptr [RSP + 0x14],EAX
TEST R12D,R12D
MOV EAX,0x0
CMOVNS EAX,R12D
CDQE
LEA R14,[R13 + RAX*0x1 + -0x1]
LEA EAX,[R12 + -0x1]
LEA RBP,[R13 + RAX*0x1 + 0x1]
JMP 0x0014a716
MOV ESI,R12D
MOV RDI,R13
CALL 0x0014a104
MOV RBX,RAX
MOV RSI,qword ptr [RSP]
MOV RDI,RAX
CALL 0x0014a527
TEST EAX,EAX
JS 0x0014a709
MOV RSI,qword ptr [RSP + 0x8]
MOV RDI,RBX
CALL 0x0014a527
TEST EAX,EAX
JLE 0x0014a73d
TEST RBX,RBX
JZ 0x0014a716
MOV RDI,RBX
CALL 0x00149d43
TEST R12D,R12D
JLE 0x0014a72e
MOV RBX,R13
CALL 0x0015b3a9
MOV byte ptr [RBX],AL
ADD RBX,0x1
CMP RBX,RBP
JNZ 0x0014a71e
TEST R15D,R15D
JZ 0x0014a6da
MOVZX EAX,byte ptr [RSP + 0x14]
AND byte ptr [R14],AL
JMP 0x0014a6da
MOV RSI,qword ptr [RSP + 0x18]
MOV RDI,R13
CALL 0x00127355
MOV RDI,R13
CALL 0x00127101
MOV RAX,RBX
ADD RSP,0x28
POP RBX
POP RBP
POP R12
POP R13
POP R14
POP R15
RET
(translation_unit "long FUN_0014a64e(undefined8 param_1,undefined8 param_2)\n\n{\n  undefined1 uVar1;\n  int iVar2;\n  int iVar3;\n  undefined1 *puVar4;\n  long lVar5;\n  undefined1 *puVar6;\n  int iVar7;\n  int iVar8;\n  byte local_44;\n  \n  iVar2 = FUN_0014a306(param_2);\n  iVar7 = iVar2 + 7;\n  if (-1 < iVar2) {\n    iVar7 = iVar2;\n  }\n  iVar2 = iVar2 % 8;\n  iVar8 = ((iVar7 >> 3) + 1) - (uint)(iVar2 == 0);\n  puVar4 = (undefined1 *)FUN_00126895((long)iVar8,1);\n  iVar7 = 0;\n  if (-1 < iVar8) {\n    iVar7 = iVar8;\n  }\n  while( true ) {\n    puVar6 = puVar4;\n    if (0 < iVar8) {\n      do {\n        uVar1 = FUN_0015b3a9();\n        *puVar6 = uVar1;\n        puVar6 = puVar6 + 1;\n      } while (puVar6 != puVar4 + (ulong)(iVar8 - 1) + 1);\n    }\n    if (iVar2 != 0) {\n      local_44 = (byte)(0xff >> (8U - (char)iVar2 & 0x1f));\n      puVar4[(long)iVar7 + -1] = puVar4[(long)iVar7 + -1] & local_44;\n    }\n    lVar5 = FUN_0014a104(puVar4,iVar8);\n    iVar3 = FUN_0014a527(lVar5,param_1);\n    if ((-1 < iVar3) && (iVar3 = FUN_0014a527(lVar5,param_2), iVar3 < 1)) break;\n    if (lVar5 != 0) {\n      FUN_00149d43(lVar5);\n    }\n  }\n  FUN_00127355(puVar4,(long)iVar8);\n  FUN_00127101(puVar4);\n  return lVar5;\n}\n\n" (function_definition "long FUN_0014a64e(undefined8 param_1,undefined8 param_2)\n\n{\n  undefined1 uVar1;\n  int iVar2;\n  int iVar3;\n  undefined1 *puVar4;\n  long lVar5;\n  undefined1 *puVar6;\n  int iVar7;\n  int iVar8;\n  byte local_44;\n  \n  iVar2 = FUN_0014a306(param_2);\n  iVar7 = iVar2 + 7;\n  if (-1 < iVar2) {\n    iVar7 = iVar2;\n  }\n  iVar2 = iVar2 % 8;\n  iVar8 = ((iVar7 >> 3) + 1) - (uint)(iVar2 == 0);\n  puVar4 = (undefined1 *)FUN_00126895((long)iVar8,1);\n  iVar7 = 0;\n  if (-1 < iVar8) {\n    iVar7 = iVar8;\n  }\n  while( true ) {\n    puVar6 = puVar4;\n    if (0 < iVar8) {\n      do {\n        uVar1 = FUN_0015b3a9();\n        *puVar6 = uVar1;\n        puVar6 = puVar6 + 1;\n      } while (puVar6 != puVar4 + (ulong)(iVar8 - 1) + 1);\n    }\n    if (iVar2 != 0) {\n      local_44 = (byte)(0xff >> (8U - (char)iVar2 & 0x1f));\n      puVar4[(long)iVar7 + -1] = puVar4[(long)iVar7 + -1] & local_44;\n    }\n    lVar5 = FUN_0014a104(puVar4,iVar8);\n    iVar3 = FUN_0014a527(lVar5,param_1);\n    if ((-1 < iVar3) && (iVar3 = FUN_0014a527(lVar5,param_2), iVar3 < 1)) break;\n    if (lVar5 != 0) {\n      FUN_00149d43(lVar5);\n    }\n  }\n  FUN_00127355(puVar4,(long)iVar8);\n  FUN_00127101(puVar4);\n  return lVar5;\n}" (sized_type_specifier "long" long) (function_declarator "FUN_0014a64e(undefined8 param_1,undefined8 param_2)" identifier (parameter_list "(undefined8 param_1,undefined8 param_2)" ( (parameter_declaration "undefined8 param_1" type_identifier identifier) , (parameter_declaration "undefined8 param_2" type_identifier identifier) ))) (compound_statement "{\n  undefined1 uVar1;\n  int iVar2;\n  int iVar3;\n  undefined1 *puVar4;\n  long lVar5;\n  undefined1 *puVar6;\n  int iVar7;\n  int iVar8;\n  byte local_44;\n  \n  iVar2 = FUN_0014a306(param_2);\n  iVar7 = iVar2 + 7;\n  if (-1 < iVar2) {\n    iVar7 = iVar2;\n  }\n  iVar2 = iVar2 % 8;\n  iVar8 = ((iVar7 >> 3) + 1) - (uint)(iVar2 == 0);\n  puVar4 = (undefined1 *)FUN_00126895((long)iVar8,1);\n  iVar7 = 0;\n  if (-1 < iVar8) {\n    iVar7 = iVar8;\n  }\n  while( true ) {\n    puVar6 = puVar4;\n    if (0 < iVar8) {\n      do {\n        uVar1 = FUN_0015b3a9();\n        *puVar6 = uVar1;\n        puVar6 = puVar6 + 1;\n      } while (puVar6 != puVar4 + (ulong)(iVar8 - 1) + 1);\n    }\n    if (iVar2 != 0) {\n      local_44 = (byte)(0xff >> (8U - (char)iVar2 & 0x1f));\n      puVar4[(long)iVar7 + -1] = puVar4[(long)iVar7 + -1] & local_44;\n    }\n    lVar5 = FUN_0014a104(puVar4,iVar8);\n    iVar3 = FUN_0014a527(lVar5,param_1);\n    if ((-1 < iVar3) && (iVar3 = FUN_0014a527(lVar5,param_2), iVar3 < 1)) break;\n    if (lVar5 != 0) {\n      FUN_00149d43(lVar5);\n    }\n  }\n  FUN_00127355(puVar4,(long)iVar8);\n  FUN_00127101(puVar4);\n  return lVar5;\n}" { (declaration "undefined1 uVar1;" type_identifier identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "int iVar3;" primitive_type identifier ;) (declaration "undefined1 *puVar4;" type_identifier (pointer_declarator "*puVar4" * identifier) ;) (declaration "long lVar5;" (sized_type_specifier "long" long) identifier ;) (declaration "undefined1 *puVar6;" type_identifier (pointer_declarator "*puVar6" * identifier) ;) (declaration "int iVar7;" primitive_type identifier ;) (declaration "int iVar8;" primitive_type identifier ;) (declaration "byte local_44;" type_identifier identifier ;) (expression_statement "iVar2 = FUN_0014a306(param_2);" (assignment_expression "iVar2 = FUN_0014a306(param_2)" identifier = (call_expression "FUN_0014a306(param_2)" identifier (argument_list "(param_2)" ( identifier )))) ;) (expression_statement "iVar7 = iVar2 + 7;" (assignment_expression "iVar7 = iVar2 + 7" identifier = (binary_expression "iVar2 + 7" identifier + number_literal)) ;) (if_statement "if (-1 < iVar2) {\n    iVar7 = iVar2;\n  }" if (parenthesized_expression "(-1 < iVar2)" ( (binary_expression "-1 < iVar2" number_literal < identifier) )) (compound_statement "{\n    iVar7 = iVar2;\n  }" { (expression_statement "iVar7 = iVar2;" (assignment_expression "iVar7 = iVar2" identifier = identifier) ;) })) (expression_statement "iVar2 = iVar2 % 8;" (assignment_expression "iVar2 = iVar2 % 8" identifier = (binary_expression "iVar2 % 8" identifier % number_literal)) ;) (expression_statement "iVar8 = ((iVar7 >> 3) + 1) - (uint)(iVar2 == 0);" (assignment_expression "iVar8 = ((iVar7 >> 3) + 1) - (uint)(iVar2 == 0)" identifier = (binary_expression "((iVar7 >> 3) + 1) - (uint)(iVar2 == 0)" (parenthesized_expression "((iVar7 >> 3) + 1)" ( (binary_expression "(iVar7 >> 3) + 1" (parenthesized_expression "(iVar7 >> 3)" ( (binary_expression "iVar7 >> 3" identifier >> number_literal) )) + number_literal) )) - (call_expression "(uint)(iVar2 == 0)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(iVar2 == 0)" ( (binary_expression "iVar2 == 0" identifier == number_literal) ))))) ;) (expression_statement "puVar4 = (undefined1 *)FUN_00126895((long)iVar8,1);" (assignment_expression "puVar4 = (undefined1 *)FUN_00126895((long)iVar8,1)" identifier = (cast_expression "(undefined1 *)FUN_00126895((long)iVar8,1)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_00126895((long)iVar8,1)" identifier (argument_list "((long)iVar8,1)" ( (cast_expression "(long)iVar8" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier) , number_literal ))))) ;) (expression_statement "iVar7 = 0;" (assignment_expression "iVar7 = 0" identifier = number_literal) ;) (if_statement "if (-1 < iVar8) {\n    iVar7 = iVar8;\n  }" if (parenthesized_expression "(-1 < iVar8)" ( (binary_expression "-1 < iVar8" number_literal < identifier) )) (compound_statement "{\n    iVar7 = iVar8;\n  }" { (expression_statement "iVar7 = iVar8;" (assignment_expression "iVar7 = iVar8" identifier = identifier) ;) })) (while_statement "while( true ) {\n    puVar6 = puVar4;\n    if (0 < iVar8) {\n      do {\n        uVar1 = FUN_0015b3a9();\n        *puVar6 = uVar1;\n        puVar6 = puVar6 + 1;\n      } while (puVar6 != puVar4 + (ulong)(iVar8 - 1) + 1);\n    }\n    if (iVar2 != 0) {\n      local_44 = (byte)(0xff >> (8U - (char)iVar2 & 0x1f));\n      puVar4[(long)iVar7 + -1] = puVar4[(long)iVar7 + -1] & local_44;\n    }\n    lVar5 = FUN_0014a104(puVar4,iVar8);\n    iVar3 = FUN_0014a527(lVar5,param_1);\n    if ((-1 < iVar3) && (iVar3 = FUN_0014a527(lVar5,param_2), iVar3 < 1)) break;\n    if (lVar5 != 0) {\n      FUN_00149d43(lVar5);\n    }\n  }" while (parenthesized_expression "( true )" ( true )) (compound_statement "{\n    puVar6 = puVar4;\n    if (0 < iVar8) {\n      do {\n        uVar1 = FUN_0015b3a9();\n        *puVar6 = uVar1;\n        puVar6 = puVar6 + 1;\n      } while (puVar6 != puVar4 + (ulong)(iVar8 - 1) + 1);\n    }\n    if (iVar2 != 0) {\n      local_44 = (byte)(0xff >> (8U - (char)iVar2 & 0x1f));\n      puVar4[(long)iVar7 + -1] = puVar4[(long)iVar7 + -1] & local_44;\n    }\n    lVar5 = FUN_0014a104(puVar4,iVar8);\n    iVar3 = FUN_0014a527(lVar5,param_1);\n    if ((-1 < iVar3) && (iVar3 = FUN_0014a527(lVar5,param_2), iVar3 < 1)) break;\n    if (lVar5 != 0) {\n      FUN_00149d43(lVar5);\n    }\n  }" { (expression_statement "puVar6 = puVar4;" (assignment_expression "puVar6 = puVar4" identifier = identifier) ;) (if_statement "if (0 < iVar8) {\n      do {\n        uVar1 = FUN_0015b3a9();\n        *puVar6 = uVar1;\n        puVar6 = puVar6 + 1;\n      } while (puVar6 != puVar4 + (ulong)(iVar8 - 1) + 1);\n    }" if (parenthesized_expression "(0 < iVar8)" ( (binary_expression "0 < iVar8" number_literal < identifier) )) (compound_statement "{\n      do {\n        uVar1 = FUN_0015b3a9();\n        *puVar6 = uVar1;\n        puVar6 = puVar6 + 1;\n      } while (puVar6 != puVar4 + (ulong)(iVar8 - 1) + 1);\n    }" { (do_statement "do {\n        uVar1 = FUN_0015b3a9();\n        *puVar6 = uVar1;\n        puVar6 = puVar6 + 1;\n      } while (puVar6 != puVar4 + (ulong)(iVar8 - 1) + 1);" do (compound_statement "{\n        uVar1 = FUN_0015b3a9();\n        *puVar6 = uVar1;\n        puVar6 = puVar6 + 1;\n      }" { (expression_statement "uVar1 = FUN_0015b3a9();" (assignment_expression "uVar1 = FUN_0015b3a9()" identifier = (call_expression "FUN_0015b3a9()" identifier (argument_list "()" ( )))) ;) (expression_statement "*puVar6 = uVar1;" (assignment_expression "*puVar6 = uVar1" (pointer_expression "*puVar6" * identifier) = identifier) ;) (expression_statement "puVar6 = puVar6 + 1;" (assignment_expression "puVar6 = puVar6 + 1" identifier = (binary_expression "puVar6 + 1" identifier + number_literal)) ;) }) while (parenthesized_expression "(puVar6 != puVar4 + (ulong)(iVar8 - 1) + 1)" ( (binary_expression "puVar6 != puVar4 + (ulong)(iVar8 - 1) + 1" identifier != (binary_expression "puVar4 + (ulong)(iVar8 - 1) + 1" (binary_expression "puVar4 + (ulong)(iVar8 - 1)" identifier + (call_expression "(ulong)(iVar8 - 1)" (parenthesized_expression "(ulong)" ( identifier )) (argument_list "(iVar8 - 1)" ( (binary_expression "iVar8 - 1" identifier - number_literal) )))) + number_literal)) )) ;) })) (if_statement "if (iVar2 != 0) {\n      local_44 = (byte)(0xff >> (8U - (char)iVar2 & 0x1f));\n      puVar4[(long)iVar7 + -1] = puVar4[(long)iVar7 + -1] & local_44;\n    }" if (parenthesized_expression "(iVar2 != 0)" ( (binary_expression "iVar2 != 0" identifier != number_literal) )) (compound_statement "{\n      local_44 = (byte)(0xff >> (8U - (char)iVar2 & 0x1f));\n      puVar4[(long)iVar7 + -1] = puVar4[(long)iVar7 + -1] & local_44;\n    }" { (expression_statement "local_44 = (byte)(0xff >> (8U - (char)iVar2 & 0x1f));" (assignment_expression "local_44 = (byte)(0xff >> (8U - (char)iVar2 & 0x1f))" identifier = (call_expression "(byte)(0xff >> (8U - (char)iVar2 & 0x1f))" (parenthesized_expression "(byte)" ( identifier )) (argument_list "(0xff >> (8U - (char)iVar2 & 0x1f))" ( (binary_expression "0xff >> (8U - (char)iVar2 & 0x1f)" number_literal >> (parenthesized_expression "(8U - (char)iVar2 & 0x1f)" ( (binary_expression "8U - (char)iVar2 & 0x1f" (binary_expression "8U - (char)iVar2" number_literal - (cast_expression "(char)iVar2" ( (type_descriptor "char" primitive_type) ) identifier)) & number_literal) ))) )))) ;) (expression_statement "puVar4[(long)iVar7 + -1] = puVar4[(long)iVar7 + -1] & local_44;" (assignment_expression "puVar4[(long)iVar7 + -1] = puVar4[(long)iVar7 + -1] & local_44" (subscript_expression "puVar4[(long)iVar7 + -1]" identifier [ (binary_expression "(long)iVar7 + -1" (cast_expression "(long)iVar7" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier) + number_literal) ]) = (binary_expression "puVar4[(long)iVar7 + -1] & local_44" (subscript_expression "puVar4[(long)iVar7 + -1]" identifier [ (binary_expression "(long)iVar7 + -1" (cast_expression "(long)iVar7" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier) + number_literal) ]) & identifier)) ;) })) (expression_statement "lVar5 = FUN_0014a104(puVar4,iVar8);" (assignment_expression "lVar5 = FUN_0014a104(puVar4,iVar8)" identifier = (call_expression "FUN_0014a104(puVar4,iVar8)" identifier (argument_list "(puVar4,iVar8)" ( identifier , identifier )))) ;) (expression_statement "iVar3 = FUN_0014a527(lVar5,param_1);" (assignment_expression "iVar3 = FUN_0014a527(lVar5,param_1)" identifier = (call_expression "FUN_0014a527(lVar5,param_1)" identifier (argument_list "(lVar5,param_1)" ( identifier , identifier )))) ;) (if_statement "if ((-1 < iVar3) && (iVar3 = FUN_0014a527(lVar5,param_2), iVar3 < 1)) break;" if (parenthesized_expression "((-1 < iVar3) && (iVar3 = FUN_0014a527(lVar5,param_2), iVar3 < 1))" ( (binary_expression "(-1 < iVar3) && (iVar3 = FUN_0014a527(lVar5,param_2), iVar3 < 1)" (parenthesized_expression "(-1 < iVar3)" ( (binary_expression "-1 < iVar3" number_literal < identifier) )) && (parenthesized_expression "(iVar3 = FUN_0014a527(lVar5,param_2), iVar3 < 1)" ( (comma_expression "iVar3 = FUN_0014a527(lVar5,param_2), iVar3 < 1" (assignment_expression "iVar3 = FUN_0014a527(lVar5,param_2)" identifier = (call_expression "FUN_0014a527(lVar5,param_2)" identifier (argument_list "(lVar5,param_2)" ( identifier , identifier )))) , (binary_expression "iVar3 < 1" identifier < number_literal)) ))) )) (break_statement "break;" break ;)) (if_statement "if (lVar5 != 0) {\n      FUN_00149d43(lVar5);\n    }" if (parenthesized_expression "(lVar5 != 0)" ( (binary_expression "lVar5 != 0" identifier != number_literal) )) (compound_statement "{\n      FUN_00149d43(lVar5);\n    }" { (expression_statement "FUN_00149d43(lVar5);" (call_expression "FUN_00149d43(lVar5)" identifier (argument_list "(lVar5)" ( identifier ))) ;) })) })) (expression_statement "FUN_00127355(puVar4,(long)iVar8);" (call_expression "FUN_00127355(puVar4,(long)iVar8)" identifier (argument_list "(puVar4,(long)iVar8)" ( identifier , (cast_expression "(long)iVar8" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier) ))) ;) (expression_statement "FUN_00127101(puVar4);" (call_expression "FUN_00127101(puVar4)" identifier (argument_list "(puVar4)" ( identifier ))) ;) (return_statement "return lVar5;" return identifier ;) })))
(translation_unit "Bignum_conflict bignum_random_in_range(Bignum_conflict lower,Bignum_conflict upper)\n\n{\n  int iVar1;\n  int iVar2;\n  uchar *data;\n  Bignum_conflict a;\n  uchar *puVar3;\n  int iVar4;\n  int nbytes;\n  byte local_44;\n  \n  iVar1 = bignum_bitcount(upper);\n  iVar4 = iVar1 + 7;\n  if (-1 < iVar1) {\n    iVar4 = iVar1;\n  }\n  iVar1 = iVar1 % 8;\n  nbytes = ((iVar4 >> 3) + 1) - (uint)(iVar1 == 0);\n  data = (uchar *)safemalloc((long)nbytes,1);\n  iVar4 = 0;\n  if (-1 < nbytes) {\n    iVar4 = nbytes;\n  }\n  while( true ) {\n    puVar3 = data;\n    if (0 < nbytes) {\n      do {\n        iVar2 = random_byte();\n        *puVar3 = (uchar)iVar2;\n        puVar3 = puVar3 + 1;\n      } while (puVar3 != data + (ulong)(nbytes - 1) + 1);\n    }\n    if (iVar1 != 0) {\n      local_44 = (byte)(0xff >> (8U - (char)iVar1 & 0x1f));\n      data[(long)iVar4 + -1] = data[(long)iVar4 + -1] & local_44;\n    }\n    a = bignum_from_bytes(data,nbytes);\n    iVar2 = bignum_cmp(a,lower);\n    if ((-1 < iVar2) && (iVar2 = bignum_cmp(a,upper), iVar2 < 1)) break;\n    if (a != (Bignum_conflict)0x0) {\n      freebn(a);\n    }\n  }\n  smemclr(data,(long)nbytes);\n  safefree(data);\n  return a;\n}\n\n" (function_definition "Bignum_conflict bignum_random_in_range(Bignum_conflict lower,Bignum_conflict upper)\n\n{\n  int iVar1;\n  int iVar2;\n  uchar *data;\n  Bignum_conflict a;\n  uchar *puVar3;\n  int iVar4;\n  int nbytes;\n  byte local_44;\n  \n  iVar1 = bignum_bitcount(upper);\n  iVar4 = iVar1 + 7;\n  if (-1 < iVar1) {\n    iVar4 = iVar1;\n  }\n  iVar1 = iVar1 % 8;\n  nbytes = ((iVar4 >> 3) + 1) - (uint)(iVar1 == 0);\n  data = (uchar *)safemalloc((long)nbytes,1);\n  iVar4 = 0;\n  if (-1 < nbytes) {\n    iVar4 = nbytes;\n  }\n  while( true ) {\n    puVar3 = data;\n    if (0 < nbytes) {\n      do {\n        iVar2 = random_byte();\n        *puVar3 = (uchar)iVar2;\n        puVar3 = puVar3 + 1;\n      } while (puVar3 != data + (ulong)(nbytes - 1) + 1);\n    }\n    if (iVar1 != 0) {\n      local_44 = (byte)(0xff >> (8U - (char)iVar1 & 0x1f));\n      data[(long)iVar4 + -1] = data[(long)iVar4 + -1] & local_44;\n    }\n    a = bignum_from_bytes(data,nbytes);\n    iVar2 = bignum_cmp(a,lower);\n    if ((-1 < iVar2) && (iVar2 = bignum_cmp(a,upper), iVar2 < 1)) break;\n    if (a != (Bignum_conflict)0x0) {\n      freebn(a);\n    }\n  }\n  smemclr(data,(long)nbytes);\n  safefree(data);\n  return a;\n}" type_identifier (function_declarator "bignum_random_in_range(Bignum_conflict lower,Bignum_conflict upper)" identifier (parameter_list "(Bignum_conflict lower,Bignum_conflict upper)" ( (parameter_declaration "Bignum_conflict lower" type_identifier identifier) , (parameter_declaration "Bignum_conflict upper" type_identifier identifier) ))) (compound_statement "{\n  int iVar1;\n  int iVar2;\n  uchar *data;\n  Bignum_conflict a;\n  uchar *puVar3;\n  int iVar4;\n  int nbytes;\n  byte local_44;\n  \n  iVar1 = bignum_bitcount(upper);\n  iVar4 = iVar1 + 7;\n  if (-1 < iVar1) {\n    iVar4 = iVar1;\n  }\n  iVar1 = iVar1 % 8;\n  nbytes = ((iVar4 >> 3) + 1) - (uint)(iVar1 == 0);\n  data = (uchar *)safemalloc((long)nbytes,1);\n  iVar4 = 0;\n  if (-1 < nbytes) {\n    iVar4 = nbytes;\n  }\n  while( true ) {\n    puVar3 = data;\n    if (0 < nbytes) {\n      do {\n        iVar2 = random_byte();\n        *puVar3 = (uchar)iVar2;\n        puVar3 = puVar3 + 1;\n      } while (puVar3 != data + (ulong)(nbytes - 1) + 1);\n    }\n    if (iVar1 != 0) {\n      local_44 = (byte)(0xff >> (8U - (char)iVar1 & 0x1f));\n      data[(long)iVar4 + -1] = data[(long)iVar4 + -1] & local_44;\n    }\n    a = bignum_from_bytes(data,nbytes);\n    iVar2 = bignum_cmp(a,lower);\n    if ((-1 < iVar2) && (iVar2 = bignum_cmp(a,upper), iVar2 < 1)) break;\n    if (a != (Bignum_conflict)0x0) {\n      freebn(a);\n    }\n  }\n  smemclr(data,(long)nbytes);\n  safefree(data);\n  return a;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "uchar *data;" type_identifier (pointer_declarator "*data" * identifier) ;) (declaration "Bignum_conflict a;" type_identifier identifier ;) (declaration "uchar *puVar3;" type_identifier (pointer_declarator "*puVar3" * identifier) ;) (declaration "int iVar4;" primitive_type identifier ;) (declaration "int nbytes;" primitive_type identifier ;) (declaration "byte local_44;" type_identifier identifier ;) (expression_statement "iVar1 = bignum_bitcount(upper);" (assignment_expression "iVar1 = bignum_bitcount(upper)" identifier = (call_expression "bignum_bitcount(upper)" identifier (argument_list "(upper)" ( identifier )))) ;) (expression_statement "iVar4 = iVar1 + 7;" (assignment_expression "iVar4 = iVar1 + 7" identifier = (binary_expression "iVar1 + 7" identifier + number_literal)) ;) (if_statement "if (-1 < iVar1) {\n    iVar4 = iVar1;\n  }" if (parenthesized_expression "(-1 < iVar1)" ( (binary_expression "-1 < iVar1" number_literal < identifier) )) (compound_statement "{\n    iVar4 = iVar1;\n  }" { (expression_statement "iVar4 = iVar1;" (assignment_expression "iVar4 = iVar1" identifier = identifier) ;) })) (expression_statement "iVar1 = iVar1 % 8;" (assignment_expression "iVar1 = iVar1 % 8" identifier = (binary_expression "iVar1 % 8" identifier % number_literal)) ;) (expression_statement "nbytes = ((iVar4 >> 3) + 1) - (uint)(iVar1 == 0);" (assignment_expression "nbytes = ((iVar4 >> 3) + 1) - (uint)(iVar1 == 0)" identifier = (binary_expression "((iVar4 >> 3) + 1) - (uint)(iVar1 == 0)" (parenthesized_expression "((iVar4 >> 3) + 1)" ( (binary_expression "(iVar4 >> 3) + 1" (parenthesized_expression "(iVar4 >> 3)" ( (binary_expression "iVar4 >> 3" identifier >> number_literal) )) + number_literal) )) - (call_expression "(uint)(iVar1 == 0)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(iVar1 == 0)" ( (binary_expression "iVar1 == 0" identifier == number_literal) ))))) ;) (expression_statement "data = (uchar *)safemalloc((long)nbytes,1);" (assignment_expression "data = (uchar *)safemalloc((long)nbytes,1)" identifier = (cast_expression "(uchar *)safemalloc((long)nbytes,1)" ( (type_descriptor "uchar *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "safemalloc((long)nbytes,1)" identifier (argument_list "((long)nbytes,1)" ( (cast_expression "(long)nbytes" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier) , number_literal ))))) ;) (expression_statement "iVar4 = 0;" (assignment_expression "iVar4 = 0" identifier = number_literal) ;) (if_statement "if (-1 < nbytes) {\n    iVar4 = nbytes;\n  }" if (parenthesized_expression "(-1 < nbytes)" ( (binary_expression "-1 < nbytes" number_literal < identifier) )) (compound_statement "{\n    iVar4 = nbytes;\n  }" { (expression_statement "iVar4 = nbytes;" (assignment_expression "iVar4 = nbytes" identifier = identifier) ;) })) (while_statement "while( true ) {\n    puVar3 = data;\n    if (0 < nbytes) {\n      do {\n        iVar2 = random_byte();\n        *puVar3 = (uchar)iVar2;\n        puVar3 = puVar3 + 1;\n      } while (puVar3 != data + (ulong)(nbytes - 1) + 1);\n    }\n    if (iVar1 != 0) {\n      local_44 = (byte)(0xff >> (8U - (char)iVar1 & 0x1f));\n      data[(long)iVar4 + -1] = data[(long)iVar4 + -1] & local_44;\n    }\n    a = bignum_from_bytes(data,nbytes);\n    iVar2 = bignum_cmp(a,lower);\n    if ((-1 < iVar2) && (iVar2 = bignum_cmp(a,upper), iVar2 < 1)) break;\n    if (a != (Bignum_conflict)0x0) {\n      freebn(a);\n    }\n  }" while (parenthesized_expression "( true )" ( true )) (compound_statement "{\n    puVar3 = data;\n    if (0 < nbytes) {\n      do {\n        iVar2 = random_byte();\n        *puVar3 = (uchar)iVar2;\n        puVar3 = puVar3 + 1;\n      } while (puVar3 != data + (ulong)(nbytes - 1) + 1);\n    }\n    if (iVar1 != 0) {\n      local_44 = (byte)(0xff >> (8U - (char)iVar1 & 0x1f));\n      data[(long)iVar4 + -1] = data[(long)iVar4 + -1] & local_44;\n    }\n    a = bignum_from_bytes(data,nbytes);\n    iVar2 = bignum_cmp(a,lower);\n    if ((-1 < iVar2) && (iVar2 = bignum_cmp(a,upper), iVar2 < 1)) break;\n    if (a != (Bignum_conflict)0x0) {\n      freebn(a);\n    }\n  }" { (expression_statement "puVar3 = data;" (assignment_expression "puVar3 = data" identifier = identifier) ;) (if_statement "if (0 < nbytes) {\n      do {\n        iVar2 = random_byte();\n        *puVar3 = (uchar)iVar2;\n        puVar3 = puVar3 + 1;\n      } while (puVar3 != data + (ulong)(nbytes - 1) + 1);\n    }" if (parenthesized_expression "(0 < nbytes)" ( (binary_expression "0 < nbytes" number_literal < identifier) )) (compound_statement "{\n      do {\n        iVar2 = random_byte();\n        *puVar3 = (uchar)iVar2;\n        puVar3 = puVar3 + 1;\n      } while (puVar3 != data + (ulong)(nbytes - 1) + 1);\n    }" { (do_statement "do {\n        iVar2 = random_byte();\n        *puVar3 = (uchar)iVar2;\n        puVar3 = puVar3 + 1;\n      } while (puVar3 != data + (ulong)(nbytes - 1) + 1);" do (compound_statement "{\n        iVar2 = random_byte();\n        *puVar3 = (uchar)iVar2;\n        puVar3 = puVar3 + 1;\n      }" { (expression_statement "iVar2 = random_byte();" (assignment_expression "iVar2 = random_byte()" identifier = (call_expression "random_byte()" identifier (argument_list "()" ( )))) ;) (expression_statement "*puVar3 = (uchar)iVar2;" (assignment_expression "*puVar3 = (uchar)iVar2" (pointer_expression "*puVar3" * identifier) = (cast_expression "(uchar)iVar2" ( (type_descriptor "uchar" type_identifier) ) identifier)) ;) (expression_statement "puVar3 = puVar3 + 1;" (assignment_expression "puVar3 = puVar3 + 1" identifier = (binary_expression "puVar3 + 1" identifier + number_literal)) ;) }) while (parenthesized_expression "(puVar3 != data + (ulong)(nbytes - 1) + 1)" ( (binary_expression "puVar3 != data + (ulong)(nbytes - 1) + 1" identifier != (binary_expression "data + (ulong)(nbytes - 1) + 1" (binary_expression "data + (ulong)(nbytes - 1)" identifier + (call_expression "(ulong)(nbytes - 1)" (parenthesized_expression "(ulong)" ( identifier )) (argument_list "(nbytes - 1)" ( (binary_expression "nbytes - 1" identifier - number_literal) )))) + number_literal)) )) ;) })) (if_statement "if (iVar1 != 0) {\n      local_44 = (byte)(0xff >> (8U - (char)iVar1 & 0x1f));\n      data[(long)iVar4 + -1] = data[(long)iVar4 + -1] & local_44;\n    }" if (parenthesized_expression "(iVar1 != 0)" ( (binary_expression "iVar1 != 0" identifier != number_literal) )) (compound_statement "{\n      local_44 = (byte)(0xff >> (8U - (char)iVar1 & 0x1f));\n      data[(long)iVar4 + -1] = data[(long)iVar4 + -1] & local_44;\n    }" { (expression_statement "local_44 = (byte)(0xff >> (8U - (char)iVar1 & 0x1f));" (assignment_expression "local_44 = (byte)(0xff >> (8U - (char)iVar1 & 0x1f))" identifier = (call_expression "(byte)(0xff >> (8U - (char)iVar1 & 0x1f))" (parenthesized_expression "(byte)" ( identifier )) (argument_list "(0xff >> (8U - (char)iVar1 & 0x1f))" ( (binary_expression "0xff >> (8U - (char)iVar1 & 0x1f)" number_literal >> (parenthesized_expression "(8U - (char)iVar1 & 0x1f)" ( (binary_expression "8U - (char)iVar1 & 0x1f" (binary_expression "8U - (char)iVar1" number_literal - (cast_expression "(char)iVar1" ( (type_descriptor "char" primitive_type) ) identifier)) & number_literal) ))) )))) ;) (expression_statement "data[(long)iVar4 + -1] = data[(long)iVar4 + -1] & local_44;" (assignment_expression "data[(long)iVar4 + -1] = data[(long)iVar4 + -1] & local_44" (subscript_expression "data[(long)iVar4 + -1]" identifier [ (binary_expression "(long)iVar4 + -1" (cast_expression "(long)iVar4" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier) + number_literal) ]) = (binary_expression "data[(long)iVar4 + -1] & local_44" (subscript_expression "data[(long)iVar4 + -1]" identifier [ (binary_expression "(long)iVar4 + -1" (cast_expression "(long)iVar4" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier) + number_literal) ]) & identifier)) ;) })) (expression_statement "a = bignum_from_bytes(data,nbytes);" (assignment_expression "a = bignum_from_bytes(data,nbytes)" identifier = (call_expression "bignum_from_bytes(data,nbytes)" identifier (argument_list "(data,nbytes)" ( identifier , identifier )))) ;) (expression_statement "iVar2 = bignum_cmp(a,lower);" (assignment_expression "iVar2 = bignum_cmp(a,lower)" identifier = (call_expression "bignum_cmp(a,lower)" identifier (argument_list "(a,lower)" ( identifier , identifier )))) ;) (if_statement "if ((-1 < iVar2) && (iVar2 = bignum_cmp(a,upper), iVar2 < 1)) break;" if (parenthesized_expression "((-1 < iVar2) && (iVar2 = bignum_cmp(a,upper), iVar2 < 1))" ( (binary_expression "(-1 < iVar2) && (iVar2 = bignum_cmp(a,upper), iVar2 < 1)" (parenthesized_expression "(-1 < iVar2)" ( (binary_expression "-1 < iVar2" number_literal < identifier) )) && (parenthesized_expression "(iVar2 = bignum_cmp(a,upper), iVar2 < 1)" ( (comma_expression "iVar2 = bignum_cmp(a,upper), iVar2 < 1" (assignment_expression "iVar2 = bignum_cmp(a,upper)" identifier = (call_expression "bignum_cmp(a,upper)" identifier (argument_list "(a,upper)" ( identifier , identifier )))) , (binary_expression "iVar2 < 1" identifier < number_literal)) ))) )) (break_statement "break;" break ;)) (if_statement "if (a != (Bignum_conflict)0x0) {\n      freebn(a);\n    }" if (parenthesized_expression "(a != (Bignum_conflict)0x0)" ( (binary_expression "a != (Bignum_conflict)0x0" identifier != (cast_expression "(Bignum_conflict)0x0" ( (type_descriptor "Bignum_conflict" type_identifier) ) number_literal)) )) (compound_statement "{\n      freebn(a);\n    }" { (expression_statement "freebn(a);" (call_expression "freebn(a)" identifier (argument_list "(a)" ( identifier ))) ;) })) })) (expression_statement "smemclr(data,(long)nbytes);" (call_expression "smemclr(data,(long)nbytes)" identifier (argument_list "(data,(long)nbytes)" ( identifier , (cast_expression "(long)nbytes" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier) ))) ;) (expression_statement "safefree(data);" (call_expression "safefree(data)" identifier (argument_list "(data)" ( identifier ))) ;) (return_statement "return a;" return identifier ;) })))
(translation_unit "long FUN_0014a64e(undefined8 param_1,undefined8 param_2)\n\n{\n  undefined1 uVar1;\n  int iVar2;\n  int iVar3;\n  undefined1 *puVar4;\n  long lVar5;\n  undefined1 *puVar6;\n  int iVar7;\n  int iVar8;\n  byte local_44;\n  \n  iVar2 = FUN_0014a306(param_2);\n  iVar7 = iVar2 + 7;\n  if (-1 < iVar2) {\n    iVar7 = iVar2;\n  }\n  iVar2 = iVar2 % 8;\n  iVar8 = ((iVar7 >> 3) + 1) - (uint)(iVar2 == 0);\n  puVar4 = (undefined1 *)FUN_00126895((long)iVar8,1);\n  iVar7 = 0;\n  if (-1 < iVar8) {\n    iVar7 = iVar8;\n  }\n  while( true ) {\n    puVar6 = puVar4;\n    if (0 < iVar8) {\n      do {\n        uVar1 = FUN_0015b3a9();\n        *puVar6 = uVar1;\n        puVar6 = puVar6 + 1;\n      } while (puVar6 != puVar4 + (ulong)(iVar8 - 1) + 1);\n    }\n    if (iVar2 != 0) {\n      local_44 = (byte)(0xff >> (8U - (char)iVar2 & 0x1f));\n      puVar4[(long)iVar7 + -1] = puVar4[(long)iVar7 + -1] & local_44;\n    }\n    lVar5 = FUN_0014a104(puVar4,iVar8);\n    iVar3 = FUN_0014a527(lVar5,param_1);\n    if ((-1 < iVar3) && (iVar3 = FUN_0014a527(lVar5,param_2), iVar3 < 1)) break;\n    if (lVar5 != 0) {\n      FUN_00149d43(lVar5);\n    }\n  }\n  FUN_00127355(puVar4,(long)iVar8);\n  FUN_00127101(puVar4);\n  return lVar5;\n}\n\n" (function_definition "long FUN_0014a64e(undefined8 param_1,undefined8 param_2)\n\n{\n  undefined1 uVar1;\n  int iVar2;\n  int iVar3;\n  undefined1 *puVar4;\n  long lVar5;\n  undefined1 *puVar6;\n  int iVar7;\n  int iVar8;\n  byte local_44;\n  \n  iVar2 = FUN_0014a306(param_2);\n  iVar7 = iVar2 + 7;\n  if (-1 < iVar2) {\n    iVar7 = iVar2;\n  }\n  iVar2 = iVar2 % 8;\n  iVar8 = ((iVar7 >> 3) + 1) - (uint)(iVar2 == 0);\n  puVar4 = (undefined1 *)FUN_00126895((long)iVar8,1);\n  iVar7 = 0;\n  if (-1 < iVar8) {\n    iVar7 = iVar8;\n  }\n  while( true ) {\n    puVar6 = puVar4;\n    if (0 < iVar8) {\n      do {\n        uVar1 = FUN_0015b3a9();\n        *puVar6 = uVar1;\n        puVar6 = puVar6 + 1;\n      } while (puVar6 != puVar4 + (ulong)(iVar8 - 1) + 1);\n    }\n    if (iVar2 != 0) {\n      local_44 = (byte)(0xff >> (8U - (char)iVar2 & 0x1f));\n      puVar4[(long)iVar7 + -1] = puVar4[(long)iVar7 + -1] & local_44;\n    }\n    lVar5 = FUN_0014a104(puVar4,iVar8);\n    iVar3 = FUN_0014a527(lVar5,param_1);\n    if ((-1 < iVar3) && (iVar3 = FUN_0014a527(lVar5,param_2), iVar3 < 1)) break;\n    if (lVar5 != 0) {\n      FUN_00149d43(lVar5);\n    }\n  }\n  FUN_00127355(puVar4,(long)iVar8);\n  FUN_00127101(puVar4);\n  return lVar5;\n}" (sized_type_specifier "long" long) (function_declarator "FUN_0014a64e(undefined8 param_1,undefined8 param_2)" identifier (parameter_list "(undefined8 param_1,undefined8 param_2)" ( (parameter_declaration "undefined8 param_1" type_identifier identifier) , (parameter_declaration "undefined8 param_2" type_identifier identifier) ))) (compound_statement "{\n  undefined1 uVar1;\n  int iVar2;\n  int iVar3;\n  undefined1 *puVar4;\n  long lVar5;\n  undefined1 *puVar6;\n  int iVar7;\n  int iVar8;\n  byte local_44;\n  \n  iVar2 = FUN_0014a306(param_2);\n  iVar7 = iVar2 + 7;\n  if (-1 < iVar2) {\n    iVar7 = iVar2;\n  }\n  iVar2 = iVar2 % 8;\n  iVar8 = ((iVar7 >> 3) + 1) - (uint)(iVar2 == 0);\n  puVar4 = (undefined1 *)FUN_00126895((long)iVar8,1);\n  iVar7 = 0;\n  if (-1 < iVar8) {\n    iVar7 = iVar8;\n  }\n  while( true ) {\n    puVar6 = puVar4;\n    if (0 < iVar8) {\n      do {\n        uVar1 = FUN_0015b3a9();\n        *puVar6 = uVar1;\n        puVar6 = puVar6 + 1;\n      } while (puVar6 != puVar4 + (ulong)(iVar8 - 1) + 1);\n    }\n    if (iVar2 != 0) {\n      local_44 = (byte)(0xff >> (8U - (char)iVar2 & 0x1f));\n      puVar4[(long)iVar7 + -1] = puVar4[(long)iVar7 + -1] & local_44;\n    }\n    lVar5 = FUN_0014a104(puVar4,iVar8);\n    iVar3 = FUN_0014a527(lVar5,param_1);\n    if ((-1 < iVar3) && (iVar3 = FUN_0014a527(lVar5,param_2), iVar3 < 1)) break;\n    if (lVar5 != 0) {\n      FUN_00149d43(lVar5);\n    }\n  }\n  FUN_00127355(puVar4,(long)iVar8);\n  FUN_00127101(puVar4);\n  return lVar5;\n}" { (declaration "undefined1 uVar1;" type_identifier identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "int iVar3;" primitive_type identifier ;) (declaration "undefined1 *puVar4;" type_identifier (pointer_declarator "*puVar4" * identifier) ;) (declaration "long lVar5;" (sized_type_specifier "long" long) identifier ;) (declaration "undefined1 *puVar6;" type_identifier (pointer_declarator "*puVar6" * identifier) ;) (declaration "int iVar7;" primitive_type identifier ;) (declaration "int iVar8;" primitive_type identifier ;) (declaration "byte local_44;" type_identifier identifier ;) (expression_statement "iVar2 = FUN_0014a306(param_2);" (assignment_expression "iVar2 = FUN_0014a306(param_2)" identifier = (call_expression "FUN_0014a306(param_2)" identifier (argument_list "(param_2)" ( identifier )))) ;) (expression_statement "iVar7 = iVar2 + 7;" (assignment_expression "iVar7 = iVar2 + 7" identifier = (binary_expression "iVar2 + 7" identifier + number_literal)) ;) (if_statement "if (-1 < iVar2) {\n    iVar7 = iVar2;\n  }" if (parenthesized_expression "(-1 < iVar2)" ( (binary_expression "-1 < iVar2" number_literal < identifier) )) (compound_statement "{\n    iVar7 = iVar2;\n  }" { (expression_statement "iVar7 = iVar2;" (assignment_expression "iVar7 = iVar2" identifier = identifier) ;) })) (expression_statement "iVar2 = iVar2 % 8;" (assignment_expression "iVar2 = iVar2 % 8" identifier = (binary_expression "iVar2 % 8" identifier % number_literal)) ;) (expression_statement "iVar8 = ((iVar7 >> 3) + 1) - (uint)(iVar2 == 0);" (assignment_expression "iVar8 = ((iVar7 >> 3) + 1) - (uint)(iVar2 == 0)" identifier = (binary_expression "((iVar7 >> 3) + 1) - (uint)(iVar2 == 0)" (parenthesized_expression "((iVar7 >> 3) + 1)" ( (binary_expression "(iVar7 >> 3) + 1" (parenthesized_expression "(iVar7 >> 3)" ( (binary_expression "iVar7 >> 3" identifier >> number_literal) )) + number_literal) )) - (call_expression "(uint)(iVar2 == 0)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(iVar2 == 0)" ( (binary_expression "iVar2 == 0" identifier == number_literal) ))))) ;) (expression_statement "puVar4 = (undefined1 *)FUN_00126895((long)iVar8,1);" (assignment_expression "puVar4 = (undefined1 *)FUN_00126895((long)iVar8,1)" identifier = (cast_expression "(undefined1 *)FUN_00126895((long)iVar8,1)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_00126895((long)iVar8,1)" identifier (argument_list "((long)iVar8,1)" ( (cast_expression "(long)iVar8" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier) , number_literal ))))) ;) (expression_statement "iVar7 = 0;" (assignment_expression "iVar7 = 0" identifier = number_literal) ;) (if_statement "if (-1 < iVar8) {\n    iVar7 = iVar8;\n  }" if (parenthesized_expression "(-1 < iVar8)" ( (binary_expression "-1 < iVar8" number_literal < identifier) )) (compound_statement "{\n    iVar7 = iVar8;\n  }" { (expression_statement "iVar7 = iVar8;" (assignment_expression "iVar7 = iVar8" identifier = identifier) ;) })) (while_statement "while( true ) {\n    puVar6 = puVar4;\n    if (0 < iVar8) {\n      do {\n        uVar1 = FUN_0015b3a9();\n        *puVar6 = uVar1;\n        puVar6 = puVar6 + 1;\n      } while (puVar6 != puVar4 + (ulong)(iVar8 - 1) + 1);\n    }\n    if (iVar2 != 0) {\n      local_44 = (byte)(0xff >> (8U - (char)iVar2 & 0x1f));\n      puVar4[(long)iVar7 + -1] = puVar4[(long)iVar7 + -1] & local_44;\n    }\n    lVar5 = FUN_0014a104(puVar4,iVar8);\n    iVar3 = FUN_0014a527(lVar5,param_1);\n    if ((-1 < iVar3) && (iVar3 = FUN_0014a527(lVar5,param_2), iVar3 < 1)) break;\n    if (lVar5 != 0) {\n      FUN_00149d43(lVar5);\n    }\n  }" while (parenthesized_expression "( true )" ( true )) (compound_statement "{\n    puVar6 = puVar4;\n    if (0 < iVar8) {\n      do {\n        uVar1 = FUN_0015b3a9();\n        *puVar6 = uVar1;\n        puVar6 = puVar6 + 1;\n      } while (puVar6 != puVar4 + (ulong)(iVar8 - 1) + 1);\n    }\n    if (iVar2 != 0) {\n      local_44 = (byte)(0xff >> (8U - (char)iVar2 & 0x1f));\n      puVar4[(long)iVar7 + -1] = puVar4[(long)iVar7 + -1] & local_44;\n    }\n    lVar5 = FUN_0014a104(puVar4,iVar8);\n    iVar3 = FUN_0014a527(lVar5,param_1);\n    if ((-1 < iVar3) && (iVar3 = FUN_0014a527(lVar5,param_2), iVar3 < 1)) break;\n    if (lVar5 != 0) {\n      FUN_00149d43(lVar5);\n    }\n  }" { (expression_statement "puVar6 = puVar4;" (assignment_expression "puVar6 = puVar4" identifier = identifier) ;) (if_statement "if (0 < iVar8) {\n      do {\n        uVar1 = FUN_0015b3a9();\n        *puVar6 = uVar1;\n        puVar6 = puVar6 + 1;\n      } while (puVar6 != puVar4 + (ulong)(iVar8 - 1) + 1);\n    }" if (parenthesized_expression "(0 < iVar8)" ( (binary_expression "0 < iVar8" number_literal < identifier) )) (compound_statement "{\n      do {\n        uVar1 = FUN_0015b3a9();\n        *puVar6 = uVar1;\n        puVar6 = puVar6 + 1;\n      } while (puVar6 != puVar4 + (ulong)(iVar8 - 1) + 1);\n    }" { (do_statement "do {\n        uVar1 = FUN_0015b3a9();\n        *puVar6 = uVar1;\n        puVar6 = puVar6 + 1;\n      } while (puVar6 != puVar4 + (ulong)(iVar8 - 1) + 1);" do (compound_statement "{\n        uVar1 = FUN_0015b3a9();\n        *puVar6 = uVar1;\n        puVar6 = puVar6 + 1;\n      }" { (expression_statement "uVar1 = FUN_0015b3a9();" (assignment_expression "uVar1 = FUN_0015b3a9()" identifier = (call_expression "FUN_0015b3a9()" identifier (argument_list "()" ( )))) ;) (expression_statement "*puVar6 = uVar1;" (assignment_expression "*puVar6 = uVar1" (pointer_expression "*puVar6" * identifier) = identifier) ;) (expression_statement "puVar6 = puVar6 + 1;" (assignment_expression "puVar6 = puVar6 + 1" identifier = (binary_expression "puVar6 + 1" identifier + number_literal)) ;) }) while (parenthesized_expression "(puVar6 != puVar4 + (ulong)(iVar8 - 1) + 1)" ( (binary_expression "puVar6 != puVar4 + (ulong)(iVar8 - 1) + 1" identifier != (binary_expression "puVar4 + (ulong)(iVar8 - 1) + 1" (binary_expression "puVar4 + (ulong)(iVar8 - 1)" identifier + (call_expression "(ulong)(iVar8 - 1)" (parenthesized_expression "(ulong)" ( identifier )) (argument_list "(iVar8 - 1)" ( (binary_expression "iVar8 - 1" identifier - number_literal) )))) + number_literal)) )) ;) })) (if_statement "if (iVar2 != 0) {\n      local_44 = (byte)(0xff >> (8U - (char)iVar2 & 0x1f));\n      puVar4[(long)iVar7 + -1] = puVar4[(long)iVar7 + -1] & local_44;\n    }" if (parenthesized_expression "(iVar2 != 0)" ( (binary_expression "iVar2 != 0" identifier != number_literal) )) (compound_statement "{\n      local_44 = (byte)(0xff >> (8U - (char)iVar2 & 0x1f));\n      puVar4[(long)iVar7 + -1] = puVar4[(long)iVar7 + -1] & local_44;\n    }" { (expression_statement "local_44 = (byte)(0xff >> (8U - (char)iVar2 & 0x1f));" (assignment_expression "local_44 = (byte)(0xff >> (8U - (char)iVar2 & 0x1f))" identifier = (call_expression "(byte)(0xff >> (8U - (char)iVar2 & 0x1f))" (parenthesized_expression "(byte)" ( identifier )) (argument_list "(0xff >> (8U - (char)iVar2 & 0x1f))" ( (binary_expression "0xff >> (8U - (char)iVar2 & 0x1f)" number_literal >> (parenthesized_expression "(8U - (char)iVar2 & 0x1f)" ( (binary_expression "8U - (char)iVar2 & 0x1f" (binary_expression "8U - (char)iVar2" number_literal - (cast_expression "(char)iVar2" ( (type_descriptor "char" primitive_type) ) identifier)) & number_literal) ))) )))) ;) (expression_statement "puVar4[(long)iVar7 + -1] = puVar4[(long)iVar7 + -1] & local_44;" (assignment_expression "puVar4[(long)iVar7 + -1] = puVar4[(long)iVar7 + -1] & local_44" (subscript_expression "puVar4[(long)iVar7 + -1]" identifier [ (binary_expression "(long)iVar7 + -1" (cast_expression "(long)iVar7" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier) + number_literal) ]) = (binary_expression "puVar4[(long)iVar7 + -1] & local_44" (subscript_expression "puVar4[(long)iVar7 + -1]" identifier [ (binary_expression "(long)iVar7 + -1" (cast_expression "(long)iVar7" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier) + number_literal) ]) & identifier)) ;) })) (expression_statement "lVar5 = FUN_0014a104(puVar4,iVar8);" (assignment_expression "lVar5 = FUN_0014a104(puVar4,iVar8)" identifier = (call_expression "FUN_0014a104(puVar4,iVar8)" identifier (argument_list "(puVar4,iVar8)" ( identifier , identifier )))) ;) (expression_statement "iVar3 = FUN_0014a527(lVar5,param_1);" (assignment_expression "iVar3 = FUN_0014a527(lVar5,param_1)" identifier = (call_expression "FUN_0014a527(lVar5,param_1)" identifier (argument_list "(lVar5,param_1)" ( identifier , identifier )))) ;) (if_statement "if ((-1 < iVar3) && (iVar3 = FUN_0014a527(lVar5,param_2), iVar3 < 1)) break;" if (parenthesized_expression "((-1 < iVar3) && (iVar3 = FUN_0014a527(lVar5,param_2), iVar3 < 1))" ( (binary_expression "(-1 < iVar3) && (iVar3 = FUN_0014a527(lVar5,param_2), iVar3 < 1)" (parenthesized_expression "(-1 < iVar3)" ( (binary_expression "-1 < iVar3" number_literal < identifier) )) && (parenthesized_expression "(iVar3 = FUN_0014a527(lVar5,param_2), iVar3 < 1)" ( (comma_expression "iVar3 = FUN_0014a527(lVar5,param_2), iVar3 < 1" (assignment_expression "iVar3 = FUN_0014a527(lVar5,param_2)" identifier = (call_expression "FUN_0014a527(lVar5,param_2)" identifier (argument_list "(lVar5,param_2)" ( identifier , identifier )))) , (binary_expression "iVar3 < 1" identifier < number_literal)) ))) )) (break_statement "break;" break ;)) (if_statement "if (lVar5 != 0) {\n      FUN_00149d43(lVar5);\n    }" if (parenthesized_expression "(lVar5 != 0)" ( (binary_expression "lVar5 != 0" identifier != number_literal) )) (compound_statement "{\n      FUN_00149d43(lVar5);\n    }" { (expression_statement "FUN_00149d43(lVar5);" (call_expression "FUN_00149d43(lVar5)" identifier (argument_list "(lVar5)" ( identifier ))) ;) })) })) (expression_statement "FUN_00127355(puVar4,(long)iVar8);" (call_expression "FUN_00127355(puVar4,(long)iVar8)" identifier (argument_list "(puVar4,(long)iVar8)" ( identifier , (cast_expression "(long)iVar8" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier) ))) ;) (expression_statement "FUN_00127101(puVar4);" (call_expression "FUN_00127101(puVar4)" identifier (argument_list "(puVar4)" ( identifier ))) ;) (return_statement "return lVar5;" return identifier ;) })))
(translation_unit (function_definition (sized_type_specifier long) (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration (sized_type_specifier long) IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT )))) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (if_statement if (parenthesized_expression ( (binary_expression LIT < IDENT) )) (compound_statement { (expression_statement (assignment_expression IDENT = IDENT) ;) })) (expression_statement (assignment_expression IDENT = (binary_expression IDENT % LIT)) ;) (expression_statement (assignment_expression IDENT = (binary_expression (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT >> LIT) )) + LIT) )) - (call_expression (parenthesized_expression ( IDENT )) (argument_list ( (binary_expression IDENT == LIT) ))))) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (call_expression IDENT (argument_list ( (cast_expression ( (type_descriptor (sized_type_specifier long)) ) IDENT) , LIT ))))) ;) (expression_statement (assignment_expression IDENT = LIT) ;) (if_statement if (parenthesized_expression ( (binary_expression LIT < IDENT) )) (compound_statement { (expression_statement (assignment_expression IDENT = IDENT) ;) })) (while_statement while (parenthesized_expression ( BOOL )) (compound_statement { (expression_statement (assignment_expression IDENT = IDENT) ;) (if_statement if (parenthesized_expression ( (binary_expression LIT < IDENT) )) (compound_statement { (do_statement do (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( )))) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = IDENT) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) }) while (parenthesized_expression ( (binary_expression IDENT != (binary_expression (binary_expression IDENT + (call_expression (parenthesized_expression ( IDENT )) (argument_list ( (binary_expression IDENT - LIT) )))) + LIT)) )) ;) })) (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression (parenthesized_expression ( IDENT )) (argument_list ( (binary_expression LIT >> (parenthesized_expression ( (binary_expression (binary_expression LIT - (cast_expression ( (type_descriptor TYPE) ) IDENT)) & LIT) ))) )))) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ (binary_expression (cast_expression ( (type_descriptor (sized_type_specifier long)) ) IDENT) + LIT) ]) = (binary_expression (subscript_expression IDENT [ (binary_expression (cast_expression ( (type_descriptor (sized_type_specifier long)) ) IDENT) + LIT) ]) & IDENT)) ;) })) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , IDENT )))) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , IDENT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression LIT < IDENT) )) && (parenthesized_expression ( (comma_expression (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , IDENT )))) , (binary_expression IDENT < LIT)) ))) )) (break_statement break ;)) (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) })) })) (expression_statement (call_expression IDENT (argument_list ( IDENT , (cast_expression ( (type_descriptor (sized_type_specifier long)) ) IDENT) ))) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) (return_statement return IDENT ;) })))
(function_definition "long FUN_0014a64e(undefined8 param_1,undefined8 param_2)\n\n{\n  undefined1 uVar1;\n  int iVar2;\n  int iVar3;\n  undefined1 *puVar4;\n  long lVar5;\n  undefined1 *puVar6;\n  int iVar7;\n  int iVar8;\n  byte local_44;\n  \n  iVar2 = FUN_0014a306(param_2);\n  iVar7 = iVar2 + 7;\n  if (-1 < iVar2) {\n    iVar7 = iVar2;\n  }\n  iVar2 = iVar2 % 8;\n  iVar8 = ((iVar7 >> 3) + 1) - (uint)(iVar2 == 0);\n  puVar4 = (undefined1 *)FUN_00126895((long)iVar8,1);\n  iVar7 = 0;\n  if (-1 < iVar8) {\n    iVar7 = iVar8;\n  }\n  while( true ) {\n    puVar6 = puVar4;\n    if (0 < iVar8) {\n      do {\n        uVar1 = FUN_0015b3a9();\n        *puVar6 = uVar1;\n        puVar6 = puVar6 + 1;\n      } while (puVar6 != puVar4 + (ulong)(iVar8 - 1) + 1);\n    }\n    if (iVar2 != 0) {\n      local_44 = (byte)(0xff >> (8U - (char)iVar2 & 0x1f));\n      puVar4[(long)iVar7 + -1] = puVar4[(long)iVar7 + -1] & local_44;\n    }\n    lVar5 = FUN_0014a104(puVar4,iVar8);\n    iVar3 = FUN_0014a527(lVar5,param_1);\n    if ((-1 < iVar3) && (iVar3 = FUN_0014a527(lVar5,param_2), iVar3 < 1)) break;\n    if (lVar5 != 0) {\n      FUN_00149d43(lVar5);\n    }\n  }\n  FUN_00127355(puVar4,(long)iVar8);\n  FUN_00127101(puVar4);\n  return lVar5;\n}" (sized_type_specifier "long" (long "long")) (function_declarator "FUN_0014a64e(undefined8 param_1,undefined8 param_2)" (identifier "FUN_0014a64e") (parameter_list "(undefined8 param_1,undefined8 param_2)" (( "(") (parameter_declaration "undefined8 param_1" (type_identifier "undefined8") (identifier "param_1")) (, ",") (parameter_declaration "undefined8 param_2" (type_identifier "undefined8") (identifier "param_2")) () ")"))) (compound_statement "{\n  undefined1 uVar1;\n  int iVar2;\n  int iVar3;\n  undefined1 *puVar4;\n  long lVar5;\n  undefined1 *puVar6;\n  int iVar7;\n  int iVar8;\n  byte local_44;\n  \n  iVar2 = FUN_0014a306(param_2);\n  iVar7 = iVar2 + 7;\n  if (-1 < iVar2) {\n    iVar7 = iVar2;\n  }\n  iVar2 = iVar2 % 8;\n  iVar8 = ((iVar7 >> 3) + 1) - (uint)(iVar2 == 0);\n  puVar4 = (undefined1 *)FUN_00126895((long)iVar8,1);\n  iVar7 = 0;\n  if (-1 < iVar8) {\n    iVar7 = iVar8;\n  }\n  while( true ) {\n    puVar6 = puVar4;\n    if (0 < iVar8) {\n      do {\n        uVar1 = FUN_0015b3a9();\n        *puVar6 = uVar1;\n        puVar6 = puVar6 + 1;\n      } while (puVar6 != puVar4 + (ulong)(iVar8 - 1) + 1);\n    }\n    if (iVar2 != 0) {\n      local_44 = (byte)(0xff >> (8U - (char)iVar2 & 0x1f));\n      puVar4[(long)iVar7 + -1] = puVar4[(long)iVar7 + -1] & local_44;\n    }\n    lVar5 = FUN_0014a104(puVar4,iVar8);\n    iVar3 = FUN_0014a527(lVar5,param_1);\n    if ((-1 < iVar3) && (iVar3 = FUN_0014a527(lVar5,param_2), iVar3 < 1)) break;\n    if (lVar5 != 0) {\n      FUN_00149d43(lVar5);\n    }\n  }\n  FUN_00127355(puVar4,(long)iVar8);\n  FUN_00127101(puVar4);\n  return lVar5;\n}" ({ "{") (declaration "undefined1 uVar1;" (type_identifier "undefined1") (identifier "uVar1") (; ";")) (declaration "int iVar2;" (primitive_type "int") (identifier "iVar2") (; ";")) (declaration "int iVar3;" (primitive_type "int") (identifier "iVar3") (; ";")) (declaration "undefined1 *puVar4;" (type_identifier "undefined1") (pointer_declarator "*puVar4" (* "*") (identifier "puVar4")) (; ";")) (declaration "long lVar5;" (sized_type_specifier "long" (long "long")) (identifier "lVar5") (; ";")) (declaration "undefined1 *puVar6;" (type_identifier "undefined1") (pointer_declarator "*puVar6" (* "*") (identifier "puVar6")) (; ";")) (declaration "int iVar7;" (primitive_type "int") (identifier "iVar7") (; ";")) (declaration "int iVar8;" (primitive_type "int") (identifier "iVar8") (; ";")) (declaration "byte local_44;" (type_identifier "byte") (identifier "local_44") (; ";")) (expression_statement "iVar2 = FUN_0014a306(param_2);" (assignment_expression "iVar2 = FUN_0014a306(param_2)" (identifier "iVar2") (= "=") (call_expression "FUN_0014a306(param_2)" (identifier "FUN_0014a306") (argument_list "(param_2)" (( "(") (identifier "param_2") () ")")))) (; ";")) (expression_statement "iVar7 = iVar2 + 7;" (assignment_expression "iVar7 = iVar2 + 7" (identifier "iVar7") (= "=") (binary_expression "iVar2 + 7" (identifier "iVar2") (+ "+") (number_literal "7"))) (; ";")) (if_statement "if (-1 < iVar2) {\n    iVar7 = iVar2;\n  }" (if "if") (parenthesized_expression "(-1 < iVar2)" (( "(") (binary_expression "-1 < iVar2" (number_literal "-1") (< "<") (identifier "iVar2")) () ")")) (compound_statement "{\n    iVar7 = iVar2;\n  }" ({ "{") (expression_statement "iVar7 = iVar2;" (assignment_expression "iVar7 = iVar2" (identifier "iVar7") (= "=") (identifier "iVar2")) (; ";")) (} "}"))) (expression_statement "iVar2 = iVar2 % 8;" (assignment_expression "iVar2 = iVar2 % 8" (identifier "iVar2") (= "=") (binary_expression "iVar2 % 8" (identifier "iVar2") (% "%") (number_literal "8"))) (; ";")) (expression_statement "iVar8 = ((iVar7 >> 3) + 1) - (uint)(iVar2 == 0);" (assignment_expression "iVar8 = ((iVar7 >> 3) + 1) - (uint)(iVar2 == 0)" (identifier "iVar8") (= "=") (binary_expression "((iVar7 >> 3) + 1) - (uint)(iVar2 == 0)" (parenthesized_expression "((iVar7 >> 3) + 1)" (( "(") (binary_expression "(iVar7 >> 3) + 1" (parenthesized_expression "(iVar7 >> 3)" (( "(") (binary_expression "iVar7 >> 3" (identifier "iVar7") (>> ">>") (number_literal "3")) () ")")) (+ "+") (number_literal "1")) () ")")) (- "-") (call_expression "(uint)(iVar2 == 0)" (parenthesized_expression "(uint)" (( "(") (identifier "uint") () ")")) (argument_list "(iVar2 == 0)" (( "(") (binary_expression "iVar2 == 0" (identifier "iVar2") (== "==") (number_literal "0")) () ")"))))) (; ";")) (expression_statement "puVar4 = (undefined1 *)FUN_00126895((long)iVar8,1);" (assignment_expression "puVar4 = (undefined1 *)FUN_00126895((long)iVar8,1)" (identifier "puVar4") (= "=") (cast_expression "(undefined1 *)FUN_00126895((long)iVar8,1)" (( "(") (type_descriptor "undefined1 *" (type_identifier "undefined1") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "FUN_00126895((long)iVar8,1)" (identifier "FUN_00126895") (argument_list "((long)iVar8,1)" (( "(") (cast_expression "(long)iVar8" (( "(") (type_descriptor "long" (sized_type_specifier "long" (long "long"))) () ")") (identifier "iVar8")) (, ",") (number_literal "1") () ")"))))) (; ";")) (expression_statement "iVar7 = 0;" (assignment_expression "iVar7 = 0" (identifier "iVar7") (= "=") (number_literal "0")) (; ";")) (if_statement "if (-1 < iVar8) {\n    iVar7 = iVar8;\n  }" (if "if") (parenthesized_expression "(-1 < iVar8)" (( "(") (binary_expression "-1 < iVar8" (number_literal "-1") (< "<") (identifier "iVar8")) () ")")) (compound_statement "{\n    iVar7 = iVar8;\n  }" ({ "{") (expression_statement "iVar7 = iVar8;" (assignment_expression "iVar7 = iVar8" (identifier "iVar7") (= "=") (identifier "iVar8")) (; ";")) (} "}"))) (while_statement "while( true ) {\n    puVar6 = puVar4;\n    if (0 < iVar8) {\n      do {\n        uVar1 = FUN_0015b3a9();\n        *puVar6 = uVar1;\n        puVar6 = puVar6 + 1;\n      } while (puVar6 != puVar4 + (ulong)(iVar8 - 1) + 1);\n    }\n    if (iVar2 != 0) {\n      local_44 = (byte)(0xff >> (8U - (char)iVar2 & 0x1f));\n      puVar4[(long)iVar7 + -1] = puVar4[(long)iVar7 + -1] & local_44;\n    }\n    lVar5 = FUN_0014a104(puVar4,iVar8);\n    iVar3 = FUN_0014a527(lVar5,param_1);\n    if ((-1 < iVar3) && (iVar3 = FUN_0014a527(lVar5,param_2), iVar3 < 1)) break;\n    if (lVar5 != 0) {\n      FUN_00149d43(lVar5);\n    }\n  }" (while "while") (parenthesized_expression "( true )" (( "(") (true "true") () ")")) (compound_statement "{\n    puVar6 = puVar4;\n    if (0 < iVar8) {\n      do {\n        uVar1 = FUN_0015b3a9();\n        *puVar6 = uVar1;\n        puVar6 = puVar6 + 1;\n      } while (puVar6 != puVar4 + (ulong)(iVar8 - 1) + 1);\n    }\n    if (iVar2 != 0) {\n      local_44 = (byte)(0xff >> (8U - (char)iVar2 & 0x1f));\n      puVar4[(long)iVar7 + -1] = puVar4[(long)iVar7 + -1] & local_44;\n    }\n    lVar5 = FUN_0014a104(puVar4,iVar8);\n    iVar3 = FUN_0014a527(lVar5,param_1);\n    if ((-1 < iVar3) && (iVar3 = FUN_0014a527(lVar5,param_2), iVar3 < 1)) break;\n    if (lVar5 != 0) {\n      FUN_00149d43(lVar5);\n    }\n  }" ({ "{") (expression_statement "puVar6 = puVar4;" (assignment_expression "puVar6 = puVar4" (identifier "puVar6") (= "=") (identifier "puVar4")) (; ";")) (if_statement "if (0 < iVar8) {\n      do {\n        uVar1 = FUN_0015b3a9();\n        *puVar6 = uVar1;\n        puVar6 = puVar6 + 1;\n      } while (puVar6 != puVar4 + (ulong)(iVar8 - 1) + 1);\n    }" (if "if") (parenthesized_expression "(0 < iVar8)" (( "(") (binary_expression "0 < iVar8" (number_literal "0") (< "<") (identifier "iVar8")) () ")")) (compound_statement "{\n      do {\n        uVar1 = FUN_0015b3a9();\n        *puVar6 = uVar1;\n        puVar6 = puVar6 + 1;\n      } while (puVar6 != puVar4 + (ulong)(iVar8 - 1) + 1);\n    }" ({ "{") (do_statement "do {\n        uVar1 = FUN_0015b3a9();\n        *puVar6 = uVar1;\n        puVar6 = puVar6 + 1;\n      } while (puVar6 != puVar4 + (ulong)(iVar8 - 1) + 1);" (do "do") (compound_statement "{\n        uVar1 = FUN_0015b3a9();\n        *puVar6 = uVar1;\n        puVar6 = puVar6 + 1;\n      }" ({ "{") (expression_statement "uVar1 = FUN_0015b3a9();" (assignment_expression "uVar1 = FUN_0015b3a9()" (identifier "uVar1") (= "=") (call_expression "FUN_0015b3a9()" (identifier "FUN_0015b3a9") (argument_list "()" (( "(") () ")")))) (; ";")) (expression_statement "*puVar6 = uVar1;" (assignment_expression "*puVar6 = uVar1" (pointer_expression "*puVar6" (* "*") (identifier "puVar6")) (= "=") (identifier "uVar1")) (; ";")) (expression_statement "puVar6 = puVar6 + 1;" (assignment_expression "puVar6 = puVar6 + 1" (identifier "puVar6") (= "=") (binary_expression "puVar6 + 1" (identifier "puVar6") (+ "+") (number_literal "1"))) (; ";")) (} "}")) (while "while") (parenthesized_expression "(puVar6 != puVar4 + (ulong)(iVar8 - 1) + 1)" (( "(") (binary_expression "puVar6 != puVar4 + (ulong)(iVar8 - 1) + 1" (identifier "puVar6") (!= "!=") (binary_expression "puVar4 + (ulong)(iVar8 - 1) + 1" (binary_expression "puVar4 + (ulong)(iVar8 - 1)" (identifier "puVar4") (+ "+") (call_expression "(ulong)(iVar8 - 1)" (parenthesized_expression "(ulong)" (( "(") (identifier "ulong") () ")")) (argument_list "(iVar8 - 1)" (( "(") (binary_expression "iVar8 - 1" (identifier "iVar8") (- "-") (number_literal "1")) () ")")))) (+ "+") (number_literal "1"))) () ")")) (; ";")) (} "}"))) (if_statement "if (iVar2 != 0) {\n      local_44 = (byte)(0xff >> (8U - (char)iVar2 & 0x1f));\n      puVar4[(long)iVar7 + -1] = puVar4[(long)iVar7 + -1] & local_44;\n    }" (if "if") (parenthesized_expression "(iVar2 != 0)" (( "(") (binary_expression "iVar2 != 0" (identifier "iVar2") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n      local_44 = (byte)(0xff >> (8U - (char)iVar2 & 0x1f));\n      puVar4[(long)iVar7 + -1] = puVar4[(long)iVar7 + -1] & local_44;\n    }" ({ "{") (expression_statement "local_44 = (byte)(0xff >> (8U - (char)iVar2 & 0x1f));" (assignment_expression "local_44 = (byte)(0xff >> (8U - (char)iVar2 & 0x1f))" (identifier "local_44") (= "=") (call_expression "(byte)(0xff >> (8U - (char)iVar2 & 0x1f))" (parenthesized_expression "(byte)" (( "(") (identifier "byte") () ")")) (argument_list "(0xff >> (8U - (char)iVar2 & 0x1f))" (( "(") (binary_expression "0xff >> (8U - (char)iVar2 & 0x1f)" (number_literal "0xff") (>> ">>") (parenthesized_expression "(8U - (char)iVar2 & 0x1f)" (( "(") (binary_expression "8U - (char)iVar2 & 0x1f" (binary_expression "8U - (char)iVar2" (number_literal "8U") (- "-") (cast_expression "(char)iVar2" (( "(") (type_descriptor "char" (primitive_type "char")) () ")") (identifier "iVar2"))) (& "&") (number_literal "0x1f")) () ")"))) () ")")))) (; ";")) (expression_statement "puVar4[(long)iVar7 + -1] = puVar4[(long)iVar7 + -1] & local_44;" (assignment_expression "puVar4[(long)iVar7 + -1] = puVar4[(long)iVar7 + -1] & local_44" (subscript_expression "puVar4[(long)iVar7 + -1]" (identifier "puVar4") ([ "[") (binary_expression "(long)iVar7 + -1" (cast_expression "(long)iVar7" (( "(") (type_descriptor "long" (sized_type_specifier "long" (long "long"))) () ")") (identifier "iVar7")) (+ "+") (number_literal "-1")) (] "]")) (= "=") (binary_expression "puVar4[(long)iVar7 + -1] & local_44" (subscript_expression "puVar4[(long)iVar7 + -1]" (identifier "puVar4") ([ "[") (binary_expression "(long)iVar7 + -1" (cast_expression "(long)iVar7" (( "(") (type_descriptor "long" (sized_type_specifier "long" (long "long"))) () ")") (identifier "iVar7")) (+ "+") (number_literal "-1")) (] "]")) (& "&") (identifier "local_44"))) (; ";")) (} "}"))) (expression_statement "lVar5 = FUN_0014a104(puVar4,iVar8);" (assignment_expression "lVar5 = FUN_0014a104(puVar4,iVar8)" (identifier "lVar5") (= "=") (call_expression "FUN_0014a104(puVar4,iVar8)" (identifier "FUN_0014a104") (argument_list "(puVar4,iVar8)" (( "(") (identifier "puVar4") (, ",") (identifier "iVar8") () ")")))) (; ";")) (expression_statement "iVar3 = FUN_0014a527(lVar5,param_1);" (assignment_expression "iVar3 = FUN_0014a527(lVar5,param_1)" (identifier "iVar3") (= "=") (call_expression "FUN_0014a527(lVar5,param_1)" (identifier "FUN_0014a527") (argument_list "(lVar5,param_1)" (( "(") (identifier "lVar5") (, ",") (identifier "param_1") () ")")))) (; ";")) (if_statement "if ((-1 < iVar3) && (iVar3 = FUN_0014a527(lVar5,param_2), iVar3 < 1)) break;" (if "if") (parenthesized_expression "((-1 < iVar3) && (iVar3 = FUN_0014a527(lVar5,param_2), iVar3 < 1))" (( "(") (binary_expression "(-1 < iVar3) && (iVar3 = FUN_0014a527(lVar5,param_2), iVar3 < 1)" (parenthesized_expression "(-1 < iVar3)" (( "(") (binary_expression "-1 < iVar3" (number_literal "-1") (< "<") (identifier "iVar3")) () ")")) (&& "&&") (parenthesized_expression "(iVar3 = FUN_0014a527(lVar5,param_2), iVar3 < 1)" (( "(") (comma_expression "iVar3 = FUN_0014a527(lVar5,param_2), iVar3 < 1" (assignment_expression "iVar3 = FUN_0014a527(lVar5,param_2)" (identifier "iVar3") (= "=") (call_expression "FUN_0014a527(lVar5,param_2)" (identifier "FUN_0014a527") (argument_list "(lVar5,param_2)" (( "(") (identifier "lVar5") (, ",") (identifier "param_2") () ")")))) (, ",") (binary_expression "iVar3 < 1" (identifier "iVar3") (< "<") (number_literal "1"))) () ")"))) () ")")) (break_statement "break;" (break "break") (; ";"))) (if_statement "if (lVar5 != 0) {\n      FUN_00149d43(lVar5);\n    }" (if "if") (parenthesized_expression "(lVar5 != 0)" (( "(") (binary_expression "lVar5 != 0" (identifier "lVar5") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n      FUN_00149d43(lVar5);\n    }" ({ "{") (expression_statement "FUN_00149d43(lVar5);" (call_expression "FUN_00149d43(lVar5)" (identifier "FUN_00149d43") (argument_list "(lVar5)" (( "(") (identifier "lVar5") () ")"))) (; ";")) (} "}"))) (} "}"))) (expression_statement "FUN_00127355(puVar4,(long)iVar8);" (call_expression "FUN_00127355(puVar4,(long)iVar8)" (identifier "FUN_00127355") (argument_list "(puVar4,(long)iVar8)" (( "(") (identifier "puVar4") (, ",") (cast_expression "(long)iVar8" (( "(") (type_descriptor "long" (sized_type_specifier "long" (long "long"))) () ")") (identifier "iVar8")) () ")"))) (; ";")) (expression_statement "FUN_00127101(puVar4);" (call_expression "FUN_00127101(puVar4)" (identifier "FUN_00127101") (argument_list "(puVar4)" (( "(") (identifier "puVar4") () ")"))) (; ";")) (return_statement "return lVar5;" (return "return") (identifier "lVar5") (; ";")) (} "}")))

type_1 function_1(type_1 lower,type_1 upper)

{
  int var_2;
  int var_12;
  type_2 *var_8;
  type_1 var_13;
  type_2 *var_7;
  int var_3;
  int var_5;
  type_3 var_9;
  
  var_2 = var_1(upper);
  var_3 = var_2 + 7;
  if (-1 < var_2) {
    var_3 = var_2;
  }
  var_2 = var_2 % 8;
  var_5 = ((var_3 >> 3) + 1) - (uint)(var_2 == 0);
  var_8 = (type_2 *)var_4((long)var_5,1);
  var_3 = 0;
  if (-1 < var_5) {
    var_3 = var_5;
  }
  while( true ) {
    var_7 = var_8;
    if (0 < var_5) {
      do {
        var_12 = var_6();
        *var_7 = (type_2)var_12;
        var_7 = var_7 + 1;
      } while (var_7 != var_8 + (ulong)(var_5 - 1) + 1);
    }
    if (var_2 != 0) {
      var_9 = (type_3)(0xff >> (8U - (char)var_2 & 0x1f));
      var_8[(long)var_3 + -1] = var_8[(long)var_3 + -1] & var_9;
    }
    var_13 = var_10(var_8,var_5);
    var_12 = var_11(var_13,lower);
    if ((-1 < var_12) && (var_12 = var_11(var_13,upper), var_12 < 1)) break;
    if (var_13 != (type_1)0x0) {
      var_14(var_13);
    }
  }
  var_15(var_8,(long)var_5);
  var_16(var_8);
  return var_13;
}


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

long MASKED(undefined8 param_1,undefined8 param_2)

{
  undefined1 uVar1;
  int iVar2;
  int iVar3;
  undefined1 *puVar4;
  long lVar5;
  undefined1 *puVar6;
  int iVar7;
  int iVar8;
  byte local_44;
  
  iVar2 = FUN_0014a306(param_2);
  iVar7 = iVar2 + 7;
  if (-1 < iVar2) {
    iVar7 = iVar2;
  }
  iVar2 = iVar2 % 8;
  iVar8 = ((iVar7 >> 3) + 1) - (uint)(iVar2 == 0);
  puVar4 = (undefined1 *)FUN_00126895((long)iVar8,1);
  iVar7 = 0;
  if (-1 < iVar8) {
    iVar7 = iVar8;
  }
  while( true ) {
    puVar6 = puVar4;
    if (0 < iVar8) {
      do {
        uVar1 = FUN_0015b3a9();
        *puVar6 = uVar1;
        puVar6 = puVar6 + 1;
      } while (puVar6 != puVar4 + (ulong)(iVar8 - 1) + 1);
    }
    if (iVar2 != 0) {
      local_44 = (byte)(0xff >> (8U - (char)iVar2 & 0x1f));
      puVar4[(long)iVar7 + -1] = puVar4[(long)iVar7 + -1] & local_44;
    }
    lVar5 = FUN_0014a104(puVar4,iVar8);
    iVar3 = FUN_0014a527(lVar5,param_1);
    if ((-1 < iVar3) && (iVar3 = FUN_0014a527(lVar5,param_2), iVar3 < 1)) break;
    if (lVar5 != 0) {
      FUN_00149d43(lVar5);
    }
  }
  FUN_00127355(puVar4,(long)iVar8);
  FUN_00127101(puVar4);
  return lVar5;
}

