
mp_bitcnt_t __gmpz_scan0(mpz_srcptr u,mp_bitcnt_t starting_bit)

{
  uint uVar1;
  uint *puVar2;
  int iVar3;
  uint *puVar4;
  uint uVar5;
  uint *puVar6;
  
  uVar1 = u->_mp_size;
  iVar3 = ((int)uVar1 >> 0x1f ^ uVar1) - ((int)uVar1 >> 0x1f);
  if (iVar3 <= (int)(starting_bit >> 5)) {
    if ((int)uVar1 < 0) {
      return 0xffffffff;
    }
    return starting_bit;
  }
  puVar2 = u->_mp_d;
  puVar6 = puVar2 + (starting_bit >> 5);
  uVar5 = *puVar6;
  if (-1 < (int)uVar1) {
    uVar5 = (1 << ((byte)starting_bit & 0x1f)) - 1U | uVar5;
    while( true ) {
      if (uVar5 != 0xffffffff) {
        iVar3 = 0;
        for (uVar5 = ~uVar5; (uVar5 & 1) == 0; uVar5 = uVar5 >> 1 | 0x80000000) {
          iVar3 = iVar3 + 1;
        }
        return ((int)puVar6 - (int)puVar2 >> 2) * 0x20 + iVar3;
      }
      puVar6 = puVar6 + 1;
      if (puVar2 + iVar3 == puVar6) break;
      uVar5 = *puVar6;
    }
    return iVar3 * 0x20;
  }
  if (puVar2 != puVar6) {
    if (puVar6[-1] != 0) goto LAB_00031ce0;
    if (puVar2 != puVar6 + -1) {
      puVar4 = puVar6 + -2;
      uVar1 = puVar6[-2];
      while (uVar1 == 0) {
        if (puVar2 == puVar4) goto LAB_00031cdd;
        puVar4 = puVar4 + -1;
        uVar1 = *puVar4;
      }
      goto LAB_00031ce0;
    }
  }
LAB_00031cdd:
  uVar5 = uVar5 - 1;
LAB_00031ce0:
  uVar5 = -1 << ((byte)starting_bit & 0x1f) & uVar5;
  if (uVar5 == 0) {
    if (puVar2 + iVar3 == puVar6 + 1) {
      return 0xffffffff;
    }
    uVar5 = puVar6[1];
    puVar6 = puVar6 + 1;
    while (uVar5 == 0) {
      puVar6 = puVar6 + 1;
      uVar5 = *puVar6;
    }
  }
  iVar3 = 0;
  for (; (uVar5 & 1) == 0; uVar5 = uVar5 >> 1 | 0x80000000) {
    iVar3 = iVar3 + 1;
  }
  return ((int)puVar6 - (int)puVar2 >> 2) * 0x20 + iVar3;
}



uint __gmpz_scan0(int param_1,uint param_2)

{
  uint uVar1;
  uint *puVar2;
  int iVar3;
  uint *puVar4;
  uint uVar5;
  uint *puVar6;
  
  uVar1 = *(uint *)(param_1 + 4);
  iVar3 = ((int)uVar1 >> 0x1f ^ uVar1) - ((int)uVar1 >> 0x1f);
  if (iVar3 <= (int)(param_2 >> 5)) {
    if ((int)uVar1 < 0) {
      return 0xffffffff;
    }
    return param_2;
  }
  puVar2 = *(uint **)(param_1 + 8);
  puVar6 = puVar2 + (param_2 >> 5);
  uVar5 = *puVar6;
  if (-1 < (int)uVar1) {
    uVar5 = (1 << ((byte)param_2 & 0x1f)) - 1U | uVar5;
    while( true ) {
      if (uVar5 != 0xffffffff) {
        iVar3 = 0;
        for (uVar5 = ~uVar5; (uVar5 & 1) == 0; uVar5 = uVar5 >> 1 | 0x80000000) {
          iVar3 = iVar3 + 1;
        }
        return ((int)puVar6 - (int)puVar2 >> 2) * 0x20 + iVar3;
      }
      puVar6 = puVar6 + 1;
      if (puVar2 + iVar3 == puVar6) break;
      uVar5 = *puVar6;
    }
    return iVar3 * 0x20;
  }
  if (puVar2 != puVar6) {
    if (puVar6[-1] != 0) goto LAB_00031ce0;
    if (puVar2 != puVar6 + -1) {
      puVar4 = puVar6 + -2;
      uVar1 = puVar6[-2];
      while (uVar1 == 0) {
        if (puVar2 == puVar4) goto LAB_00031cdd;
        puVar4 = puVar4 + -1;
        uVar1 = *puVar4;
      }
      goto LAB_00031ce0;
    }
  }
LAB_00031cdd:
  uVar5 = uVar5 - 1;
LAB_00031ce0:
  uVar5 = -1 << ((byte)param_2 & 0x1f) & uVar5;
  if (uVar5 == 0) {
    if (puVar2 + iVar3 == puVar6 + 1) {
      return 0xffffffff;
    }
    uVar5 = puVar6[1];
    puVar6 = puVar6 + 1;
    while (uVar5 == 0) {
      puVar6 = puVar6 + 1;
      uVar5 = *puVar6;
    }
  }
  iVar3 = 0;
  for (; (uVar5 & 1) == 0; uVar5 = uVar5 >> 1 | 0x80000000) {
    iVar3 = iVar3 + 1;
  }
  return ((int)puVar6 - (int)puVar2 >> 2) * 0x20 + iVar3;
}


PUSH EBP
PUSH EDI
PUSH ESI
PUSH EBX
MOV EBX,dword ptr [ESP + 0x14]
MOV ECX,dword ptr [ESP + 0x18]
MOV EBP,dword ptr [EBX + 0x4]
MOV EDX,EBP
SAR EDX,0x1f
MOV EAX,EDX
XOR EAX,EBP
SUB EAX,EDX
MOV EDX,ECX
SHR EDX,0x5
CMP EAX,EDX
JLE 0x00031d20
MOV EBX,dword ptr [EBX + 0x8]
AND ECX,0x1f
LEA EDX,[EBX + EDX*0x4]
LEA ESI,[EBX + EAX*0x4]
MOV EDI,dword ptr [EDX]
TEST EBP,EBP
JS 0x00031cb0
MOV EBP,0x1
SHL EBP,CL
LEA ECX,[EBP + -0x1]
OR ECX,EDI
CMP ECX,-0x1
JZ 0x00031c9b
JMP 0x00031d30
MOV ECX,dword ptr [EDX]
CMP ECX,-0x1
JNZ 0x00031d30
ADD EDX,0x4
CMP ESI,EDX
JNZ 0x00031c90
POP EBX
SHL EAX,0x5
POP ESI
POP EDI
POP EBP
RET
CMP EBX,EDX
JZ 0x00031cdd
MOV EBP,dword ptr [EDX + -0x4]
LEA EAX,[EDX + -0x4]
TEST EBP,EBP
JNZ 0x00031ce0
CMP EBX,EAX
JZ 0x00031cdd
MOV EBP,dword ptr [EDX + -0x8]
LEA EAX,[EDX + -0x8]
TEST EBP,EBP
JZ 0x00031cd9
JMP 0x00031ce0
SUB EAX,0x4
MOV EBP,dword ptr [EAX]
TEST EBP,EBP
JNZ 0x00031ce0
CMP EBX,EAX
JNZ 0x00031cd0
SUB EDI,0x1
MOV EBP,0xffffffff
SHL EBP,CL
MOV ECX,EBP
AND ECX,EDI
JNZ 0x00031d09
LEA EAX,[EDX + 0x4]
CMP ESI,EAX
JZ 0x00031d43
MOV ECX,dword ptr [EDX + 0x4]
MOV EDX,EAX
TEST ECX,ECX
JNZ 0x00031d09
LEA ESI,[ESI]
ADD EDX,0x4
MOV ECX,dword ptr [EDX]
TEST ECX,ECX
JZ 0x00031d00
SUB EDX,EBX
TZCNT ECX,ECX
SAR EDX,0x2
SHL EDX,0x5
LEA EAX,[EDX + ECX*0x1]
POP EBX
POP ESI
POP EDI
POP EBP
RET
TEST EBP,EBP
MOV EAX,0xffffffff
CMOVNS EAX,ECX
POP EBX
POP ESI
POP EDI
POP EBP
RET
SUB EDX,EBX
NOT ECX
SAR EDX,0x2
TZCNT ECX,ECX
SHL EDX,0x5
LEA EAX,[EDX + ECX*0x1]
JMP 0x00031d18
MOV EAX,0xffffffff
JMP 0x00031d2a
(translation_unit "uint __gmpz_scan0(int param_1,uint param_2)\n\n{\n  uint uVar1;\n  uint *puVar2;\n  int iVar3;\n  uint *puVar4;\n  uint uVar5;\n  uint *puVar6;\n  \n  uVar1 = *(uint *)(param_1 + 4);\n  iVar3 = ((int)uVar1 >> 0x1f ^ uVar1) - ((int)uVar1 >> 0x1f);\n  if (iVar3 <= (int)(param_2 >> 5)) {\n    if ((int)uVar1 < 0) {\n      return 0xffffffff;\n    }\n    return param_2;\n  }\n  puVar2 = *(uint **)(param_1 + 8);\n  puVar6 = puVar2 + (param_2 >> 5);\n  uVar5 = *puVar6;\n  if (-1 < (int)uVar1) {\n    uVar5 = (1 << ((byte)param_2 & 0x1f)) - 1U | uVar5;\n    while( true ) {\n      if (uVar5 != 0xffffffff) {\n        iVar3 = 0;\n        for (uVar5 = ~uVar5; (uVar5 & 1) == 0; uVar5 = uVar5 >> 1 | 0x80000000) {\n          iVar3 = iVar3 + 1;\n        }\n        return ((int)puVar6 - (int)puVar2 >> 2) * 0x20 + iVar3;\n      }\n      puVar6 = puVar6 + 1;\n      if (puVar2 + iVar3 == puVar6) break;\n      uVar5 = *puVar6;\n    }\n    return iVar3 * 0x20;\n  }\n  if (puVar2 != puVar6) {\n    if (puVar6[-1] != 0) goto LAB_00031ce0;\n    if (puVar2 != puVar6 + -1) {\n      puVar4 = puVar6 + -2;\n      uVar1 = puVar6[-2];\n      while (uVar1 == 0) {\n        if (puVar2 == puVar4) goto LAB_00031cdd;\n        puVar4 = puVar4 + -1;\n        uVar1 = *puVar4;\n      }\n      goto LAB_00031ce0;\n    }\n  }\nLAB_00031cdd:\n  uVar5 = uVar5 - 1;\nLAB_00031ce0:\n  uVar5 = -1 << ((byte)param_2 & 0x1f) & uVar5;\n  if (uVar5 == 0) {\n    if (puVar2 + iVar3 == puVar6 + 1) {\n      return 0xffffffff;\n    }\n    uVar5 = puVar6[1];\n    puVar6 = puVar6 + 1;\n    while (uVar5 == 0) {\n      puVar6 = puVar6 + 1;\n      uVar5 = *puVar6;\n    }\n  }\n  iVar3 = 0;\n  for (; (uVar5 & 1) == 0; uVar5 = uVar5 >> 1 | 0x80000000) {\n    iVar3 = iVar3 + 1;\n  }\n  return ((int)puVar6 - (int)puVar2 >> 2) * 0x20 + iVar3;\n}\n\n" (function_definition "uint __gmpz_scan0(int param_1,uint param_2)\n\n{\n  uint uVar1;\n  uint *puVar2;\n  int iVar3;\n  uint *puVar4;\n  uint uVar5;\n  uint *puVar6;\n  \n  uVar1 = *(uint *)(param_1 + 4);\n  iVar3 = ((int)uVar1 >> 0x1f ^ uVar1) - ((int)uVar1 >> 0x1f);\n  if (iVar3 <= (int)(param_2 >> 5)) {\n    if ((int)uVar1 < 0) {\n      return 0xffffffff;\n    }\n    return param_2;\n  }\n  puVar2 = *(uint **)(param_1 + 8);\n  puVar6 = puVar2 + (param_2 >> 5);\n  uVar5 = *puVar6;\n  if (-1 < (int)uVar1) {\n    uVar5 = (1 << ((byte)param_2 & 0x1f)) - 1U | uVar5;\n    while( true ) {\n      if (uVar5 != 0xffffffff) {\n        iVar3 = 0;\n        for (uVar5 = ~uVar5; (uVar5 & 1) == 0; uVar5 = uVar5 >> 1 | 0x80000000) {\n          iVar3 = iVar3 + 1;\n        }\n        return ((int)puVar6 - (int)puVar2 >> 2) * 0x20 + iVar3;\n      }\n      puVar6 = puVar6 + 1;\n      if (puVar2 + iVar3 == puVar6) break;\n      uVar5 = *puVar6;\n    }\n    return iVar3 * 0x20;\n  }\n  if (puVar2 != puVar6) {\n    if (puVar6[-1] != 0) goto LAB_00031ce0;\n    if (puVar2 != puVar6 + -1) {\n      puVar4 = puVar6 + -2;\n      uVar1 = puVar6[-2];\n      while (uVar1 == 0) {\n        if (puVar2 == puVar4) goto LAB_00031cdd;\n        puVar4 = puVar4 + -1;\n        uVar1 = *puVar4;\n      }\n      goto LAB_00031ce0;\n    }\n  }\nLAB_00031cdd:\n  uVar5 = uVar5 - 1;\nLAB_00031ce0:\n  uVar5 = -1 << ((byte)param_2 & 0x1f) & uVar5;\n  if (uVar5 == 0) {\n    if (puVar2 + iVar3 == puVar6 + 1) {\n      return 0xffffffff;\n    }\n    uVar5 = puVar6[1];\n    puVar6 = puVar6 + 1;\n    while (uVar5 == 0) {\n      puVar6 = puVar6 + 1;\n      uVar5 = *puVar6;\n    }\n  }\n  iVar3 = 0;\n  for (; (uVar5 & 1) == 0; uVar5 = uVar5 >> 1 | 0x80000000) {\n    iVar3 = iVar3 + 1;\n  }\n  return ((int)puVar6 - (int)puVar2 >> 2) * 0x20 + iVar3;\n}" type_identifier (function_declarator "__gmpz_scan0(int param_1,uint param_2)" identifier (parameter_list "(int param_1,uint param_2)" ( (parameter_declaration "int param_1" primitive_type identifier) , (parameter_declaration "uint param_2" type_identifier identifier) ))) (compound_statement "{\n  uint uVar1;\n  uint *puVar2;\n  int iVar3;\n  uint *puVar4;\n  uint uVar5;\n  uint *puVar6;\n  \n  uVar1 = *(uint *)(param_1 + 4);\n  iVar3 = ((int)uVar1 >> 0x1f ^ uVar1) - ((int)uVar1 >> 0x1f);\n  if (iVar3 <= (int)(param_2 >> 5)) {\n    if ((int)uVar1 < 0) {\n      return 0xffffffff;\n    }\n    return param_2;\n  }\n  puVar2 = *(uint **)(param_1 + 8);\n  puVar6 = puVar2 + (param_2 >> 5);\n  uVar5 = *puVar6;\n  if (-1 < (int)uVar1) {\n    uVar5 = (1 << ((byte)param_2 & 0x1f)) - 1U | uVar5;\n    while( true ) {\n      if (uVar5 != 0xffffffff) {\n        iVar3 = 0;\n        for (uVar5 = ~uVar5; (uVar5 & 1) == 0; uVar5 = uVar5 >> 1 | 0x80000000) {\n          iVar3 = iVar3 + 1;\n        }\n        return ((int)puVar6 - (int)puVar2 >> 2) * 0x20 + iVar3;\n      }\n      puVar6 = puVar6 + 1;\n      if (puVar2 + iVar3 == puVar6) break;\n      uVar5 = *puVar6;\n    }\n    return iVar3 * 0x20;\n  }\n  if (puVar2 != puVar6) {\n    if (puVar6[-1] != 0) goto LAB_00031ce0;\n    if (puVar2 != puVar6 + -1) {\n      puVar4 = puVar6 + -2;\n      uVar1 = puVar6[-2];\n      while (uVar1 == 0) {\n        if (puVar2 == puVar4) goto LAB_00031cdd;\n        puVar4 = puVar4 + -1;\n        uVar1 = *puVar4;\n      }\n      goto LAB_00031ce0;\n    }\n  }\nLAB_00031cdd:\n  uVar5 = uVar5 - 1;\nLAB_00031ce0:\n  uVar5 = -1 << ((byte)param_2 & 0x1f) & uVar5;\n  if (uVar5 == 0) {\n    if (puVar2 + iVar3 == puVar6 + 1) {\n      return 0xffffffff;\n    }\n    uVar5 = puVar6[1];\n    puVar6 = puVar6 + 1;\n    while (uVar5 == 0) {\n      puVar6 = puVar6 + 1;\n      uVar5 = *puVar6;\n    }\n  }\n  iVar3 = 0;\n  for (; (uVar5 & 1) == 0; uVar5 = uVar5 >> 1 | 0x80000000) {\n    iVar3 = iVar3 + 1;\n  }\n  return ((int)puVar6 - (int)puVar2 >> 2) * 0x20 + iVar3;\n}" { (declaration "uint uVar1;" type_identifier identifier ;) (declaration "uint *puVar2;" type_identifier (pointer_declarator "*puVar2" * identifier) ;) (declaration "int iVar3;" primitive_type identifier ;) (declaration "uint *puVar4;" type_identifier (pointer_declarator "*puVar4" * identifier) ;) (declaration "uint uVar5;" type_identifier identifier ;) (declaration "uint *puVar6;" type_identifier (pointer_declarator "*puVar6" * identifier) ;) (expression_statement "uVar1 = *(uint *)(param_1 + 4);" (assignment_expression "uVar1 = *(uint *)(param_1 + 4)" identifier = (pointer_expression "*(uint *)(param_1 + 4)" * (cast_expression "(uint *)(param_1 + 4)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 4)" ( (binary_expression "param_1 + 4" identifier + number_literal) ))))) ;) (expression_statement "iVar3 = ((int)uVar1 >> 0x1f ^ uVar1) - ((int)uVar1 >> 0x1f);" (assignment_expression "iVar3 = ((int)uVar1 >> 0x1f ^ uVar1) - ((int)uVar1 >> 0x1f)" identifier = (binary_expression "((int)uVar1 >> 0x1f ^ uVar1) - ((int)uVar1 >> 0x1f)" (parenthesized_expression "((int)uVar1 >> 0x1f ^ uVar1)" ( (binary_expression "(int)uVar1 >> 0x1f ^ uVar1" (binary_expression "(int)uVar1 >> 0x1f" (cast_expression "(int)uVar1" ( (type_descriptor "int" primitive_type) ) identifier) >> number_literal) ^ identifier) )) - (parenthesized_expression "((int)uVar1 >> 0x1f)" ( (binary_expression "(int)uVar1 >> 0x1f" (cast_expression "(int)uVar1" ( (type_descriptor "int" primitive_type) ) identifier) >> number_literal) )))) ;) (if_statement "if (iVar3 <= (int)(param_2 >> 5)) {\n    if ((int)uVar1 < 0) {\n      return 0xffffffff;\n    }\n    return param_2;\n  }" if (parenthesized_expression "(iVar3 <= (int)(param_2 >> 5))" ( (binary_expression "iVar3 <= (int)(param_2 >> 5)" identifier <= (cast_expression "(int)(param_2 >> 5)" ( (type_descriptor "int" primitive_type) ) (parenthesized_expression "(param_2 >> 5)" ( (binary_expression "param_2 >> 5" identifier >> number_literal) )))) )) (compound_statement "{\n    if ((int)uVar1 < 0) {\n      return 0xffffffff;\n    }\n    return param_2;\n  }" { (if_statement "if ((int)uVar1 < 0) {\n      return 0xffffffff;\n    }" if (parenthesized_expression "((int)uVar1 < 0)" ( (binary_expression "(int)uVar1 < 0" (cast_expression "(int)uVar1" ( (type_descriptor "int" primitive_type) ) identifier) < number_literal) )) (compound_statement "{\n      return 0xffffffff;\n    }" { (return_statement "return 0xffffffff;" return number_literal ;) })) (return_statement "return param_2;" return identifier ;) })) (expression_statement "puVar2 = *(uint **)(param_1 + 8);" (assignment_expression "puVar2 = *(uint **)(param_1 + 8)" identifier = (pointer_expression "*(uint **)(param_1 + 8)" * (cast_expression "(uint **)(param_1 + 8)" ( (type_descriptor "uint **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_1 + 8)" ( (binary_expression "param_1 + 8" identifier + number_literal) ))))) ;) (expression_statement "puVar6 = puVar2 + (param_2 >> 5);" (assignment_expression "puVar6 = puVar2 + (param_2 >> 5)" identifier = (binary_expression "puVar2 + (param_2 >> 5)" identifier + (parenthesized_expression "(param_2 >> 5)" ( (binary_expression "param_2 >> 5" identifier >> number_literal) )))) ;) (expression_statement "uVar5 = *puVar6;" (assignment_expression "uVar5 = *puVar6" identifier = (pointer_expression "*puVar6" * identifier)) ;) (if_statement "if (-1 < (int)uVar1) {\n    uVar5 = (1 << ((byte)param_2 & 0x1f)) - 1U | uVar5;\n    while( true ) {\n      if (uVar5 != 0xffffffff) {\n        iVar3 = 0;\n        for (uVar5 = ~uVar5; (uVar5 & 1) == 0; uVar5 = uVar5 >> 1 | 0x80000000) {\n          iVar3 = iVar3 + 1;\n        }\n        return ((int)puVar6 - (int)puVar2 >> 2) * 0x20 + iVar3;\n      }\n      puVar6 = puVar6 + 1;\n      if (puVar2 + iVar3 == puVar6) break;\n      uVar5 = *puVar6;\n    }\n    return iVar3 * 0x20;\n  }" if (parenthesized_expression "(-1 < (int)uVar1)" ( (binary_expression "-1 < (int)uVar1" number_literal < (cast_expression "(int)uVar1" ( (type_descriptor "int" primitive_type) ) identifier)) )) (compound_statement "{\n    uVar5 = (1 << ((byte)param_2 & 0x1f)) - 1U | uVar5;\n    while( true ) {\n      if (uVar5 != 0xffffffff) {\n        iVar3 = 0;\n        for (uVar5 = ~uVar5; (uVar5 & 1) == 0; uVar5 = uVar5 >> 1 | 0x80000000) {\n          iVar3 = iVar3 + 1;\n        }\n        return ((int)puVar6 - (int)puVar2 >> 2) * 0x20 + iVar3;\n      }\n      puVar6 = puVar6 + 1;\n      if (puVar2 + iVar3 == puVar6) break;\n      uVar5 = *puVar6;\n    }\n    return iVar3 * 0x20;\n  }" { (expression_statement "uVar5 = (1 << ((byte)param_2 & 0x1f)) - 1U | uVar5;" (assignment_expression "uVar5 = (1 << ((byte)param_2 & 0x1f)) - 1U | uVar5" identifier = (binary_expression "(1 << ((byte)param_2 & 0x1f)) - 1U | uVar5" (binary_expression "(1 << ((byte)param_2 & 0x1f)) - 1U" (parenthesized_expression "(1 << ((byte)param_2 & 0x1f))" ( (binary_expression "1 << ((byte)param_2 & 0x1f)" number_literal << (parenthesized_expression "((byte)param_2 & 0x1f)" ( (binary_expression "(byte)param_2 & 0x1f" (cast_expression "(byte)param_2" ( (type_descriptor "byte" type_identifier) ) identifier) & number_literal) ))) )) - number_literal) | identifier)) ;) (while_statement "while( true ) {\n      if (uVar5 != 0xffffffff) {\n        iVar3 = 0;\n        for (uVar5 = ~uVar5; (uVar5 & 1) == 0; uVar5 = uVar5 >> 1 | 0x80000000) {\n          iVar3 = iVar3 + 1;\n        }\n        return ((int)puVar6 - (int)puVar2 >> 2) * 0x20 + iVar3;\n      }\n      puVar6 = puVar6 + 1;\n      if (puVar2 + iVar3 == puVar6) break;\n      uVar5 = *puVar6;\n    }" while (parenthesized_expression "( true )" ( true )) (compound_statement "{\n      if (uVar5 != 0xffffffff) {\n        iVar3 = 0;\n        for (uVar5 = ~uVar5; (uVar5 & 1) == 0; uVar5 = uVar5 >> 1 | 0x80000000) {\n          iVar3 = iVar3 + 1;\n        }\n        return ((int)puVar6 - (int)puVar2 >> 2) * 0x20 + iVar3;\n      }\n      puVar6 = puVar6 + 1;\n      if (puVar2 + iVar3 == puVar6) break;\n      uVar5 = *puVar6;\n    }" { (if_statement "if (uVar5 != 0xffffffff) {\n        iVar3 = 0;\n        for (uVar5 = ~uVar5; (uVar5 & 1) == 0; uVar5 = uVar5 >> 1 | 0x80000000) {\n          iVar3 = iVar3 + 1;\n        }\n        return ((int)puVar6 - (int)puVar2 >> 2) * 0x20 + iVar3;\n      }" if (parenthesized_expression "(uVar5 != 0xffffffff)" ( (binary_expression "uVar5 != 0xffffffff" identifier != number_literal) )) (compound_statement "{\n        iVar3 = 0;\n        for (uVar5 = ~uVar5; (uVar5 & 1) == 0; uVar5 = uVar5 >> 1 | 0x80000000) {\n          iVar3 = iVar3 + 1;\n        }\n        return ((int)puVar6 - (int)puVar2 >> 2) * 0x20 + iVar3;\n      }" { (expression_statement "iVar3 = 0;" (assignment_expression "iVar3 = 0" identifier = number_literal) ;) (for_statement "for (uVar5 = ~uVar5; (uVar5 & 1) == 0; uVar5 = uVar5 >> 1 | 0x80000000) {\n          iVar3 = iVar3 + 1;\n        }" for ( (assignment_expression "uVar5 = ~uVar5" identifier = (unary_expression "~uVar5" ~ identifier)) ; (binary_expression "(uVar5 & 1) == 0" (parenthesized_expression "(uVar5 & 1)" ( (binary_expression "uVar5 & 1" identifier & number_literal) )) == number_literal) ; (assignment_expression "uVar5 = uVar5 >> 1 | 0x80000000" identifier = (binary_expression "uVar5 >> 1 | 0x80000000" (binary_expression "uVar5 >> 1" identifier >> number_literal) | number_literal)) ) (compound_statement "{\n          iVar3 = iVar3 + 1;\n        }" { (expression_statement "iVar3 = iVar3 + 1;" (assignment_expression "iVar3 = iVar3 + 1" identifier = (binary_expression "iVar3 + 1" identifier + number_literal)) ;) })) (return_statement "return ((int)puVar6 - (int)puVar2 >> 2) * 0x20 + iVar3;" return (binary_expression "((int)puVar6 - (int)puVar2 >> 2) * 0x20 + iVar3" (binary_expression "((int)puVar6 - (int)puVar2 >> 2) * 0x20" (parenthesized_expression "((int)puVar6 - (int)puVar2 >> 2)" ( (binary_expression "(int)puVar6 - (int)puVar2 >> 2" (binary_expression "(int)puVar6 - (int)puVar2" (cast_expression "(int)puVar6" ( (type_descriptor "int" primitive_type) ) identifier) - (cast_expression "(int)puVar2" ( (type_descriptor "int" primitive_type) ) identifier)) >> number_literal) )) * number_literal) + identifier) ;) })) (expression_statement "puVar6 = puVar6 + 1;" (assignment_expression "puVar6 = puVar6 + 1" identifier = (binary_expression "puVar6 + 1" identifier + number_literal)) ;) (if_statement "if (puVar2 + iVar3 == puVar6) break;" if (parenthesized_expression "(puVar2 + iVar3 == puVar6)" ( (binary_expression "puVar2 + iVar3 == puVar6" (binary_expression "puVar2 + iVar3" identifier + identifier) == identifier) )) (break_statement "break;" break ;)) (expression_statement "uVar5 = *puVar6;" (assignment_expression "uVar5 = *puVar6" identifier = (pointer_expression "*puVar6" * identifier)) ;) })) (return_statement "return iVar3 * 0x20;" return (binary_expression "iVar3 * 0x20" identifier * number_literal) ;) })) (if_statement "if (puVar2 != puVar6) {\n    if (puVar6[-1] != 0) goto LAB_00031ce0;\n    if (puVar2 != puVar6 + -1) {\n      puVar4 = puVar6 + -2;\n      uVar1 = puVar6[-2];\n      while (uVar1 == 0) {\n        if (puVar2 == puVar4) goto LAB_00031cdd;\n        puVar4 = puVar4 + -1;\n        uVar1 = *puVar4;\n      }\n      goto LAB_00031ce0;\n    }\n  }" if (parenthesized_expression "(puVar2 != puVar6)" ( (binary_expression "puVar2 != puVar6" identifier != identifier) )) (compound_statement "{\n    if (puVar6[-1] != 0) goto LAB_00031ce0;\n    if (puVar2 != puVar6 + -1) {\n      puVar4 = puVar6 + -2;\n      uVar1 = puVar6[-2];\n      while (uVar1 == 0) {\n        if (puVar2 == puVar4) goto LAB_00031cdd;\n        puVar4 = puVar4 + -1;\n        uVar1 = *puVar4;\n      }\n      goto LAB_00031ce0;\n    }\n  }" { (if_statement "if (puVar6[-1] != 0) goto LAB_00031ce0;" if (parenthesized_expression "(puVar6[-1] != 0)" ( (binary_expression "puVar6[-1] != 0" (subscript_expression "puVar6[-1]" identifier [ number_literal ]) != number_literal) )) (goto_statement "goto LAB_00031ce0;" goto statement_identifier ;)) (if_statement "if (puVar2 != puVar6 + -1) {\n      puVar4 = puVar6 + -2;\n      uVar1 = puVar6[-2];\n      while (uVar1 == 0) {\n        if (puVar2 == puVar4) goto LAB_00031cdd;\n        puVar4 = puVar4 + -1;\n        uVar1 = *puVar4;\n      }\n      goto LAB_00031ce0;\n    }" if (parenthesized_expression "(puVar2 != puVar6 + -1)" ( (binary_expression "puVar2 != puVar6 + -1" identifier != (binary_expression "puVar6 + -1" identifier + number_literal)) )) (compound_statement "{\n      puVar4 = puVar6 + -2;\n      uVar1 = puVar6[-2];\n      while (uVar1 == 0) {\n        if (puVar2 == puVar4) goto LAB_00031cdd;\n        puVar4 = puVar4 + -1;\n        uVar1 = *puVar4;\n      }\n      goto LAB_00031ce0;\n    }" { (expression_statement "puVar4 = puVar6 + -2;" (assignment_expression "puVar4 = puVar6 + -2" identifier = (binary_expression "puVar6 + -2" identifier + number_literal)) ;) (expression_statement "uVar1 = puVar6[-2];" (assignment_expression "uVar1 = puVar6[-2]" identifier = (subscript_expression "puVar6[-2]" identifier [ number_literal ])) ;) (while_statement "while (uVar1 == 0) {\n        if (puVar2 == puVar4) goto LAB_00031cdd;\n        puVar4 = puVar4 + -1;\n        uVar1 = *puVar4;\n      }" while (parenthesized_expression "(uVar1 == 0)" ( (binary_expression "uVar1 == 0" identifier == number_literal) )) (compound_statement "{\n        if (puVar2 == puVar4) goto LAB_00031cdd;\n        puVar4 = puVar4 + -1;\n        uVar1 = *puVar4;\n      }" { (if_statement "if (puVar2 == puVar4) goto LAB_00031cdd;" if (parenthesized_expression "(puVar2 == puVar4)" ( (binary_expression "puVar2 == puVar4" identifier == identifier) )) (goto_statement "goto LAB_00031cdd;" goto statement_identifier ;)) (expression_statement "puVar4 = puVar4 + -1;" (assignment_expression "puVar4 = puVar4 + -1" identifier = (binary_expression "puVar4 + -1" identifier + number_literal)) ;) (expression_statement "uVar1 = *puVar4;" (assignment_expression "uVar1 = *puVar4" identifier = (pointer_expression "*puVar4" * identifier)) ;) })) (goto_statement "goto LAB_00031ce0;" goto statement_identifier ;) })) })) (labeled_statement "LAB_00031cdd:\n  uVar5 = uVar5 - 1;" statement_identifier : (expression_statement "uVar5 = uVar5 - 1;" (assignment_expression "uVar5 = uVar5 - 1" identifier = (binary_expression "uVar5 - 1" identifier - number_literal)) ;)) (labeled_statement "LAB_00031ce0:\n  uVar5 = -1 << ((byte)param_2 & 0x1f) & uVar5;" statement_identifier : (expression_statement "uVar5 = -1 << ((byte)param_2 & 0x1f) & uVar5;" (assignment_expression "uVar5 = -1 << ((byte)param_2 & 0x1f) & uVar5" identifier = (binary_expression "-1 << ((byte)param_2 & 0x1f) & uVar5" (binary_expression "-1 << ((byte)param_2 & 0x1f)" number_literal << (parenthesized_expression "((byte)param_2 & 0x1f)" ( (binary_expression "(byte)param_2 & 0x1f" (cast_expression "(byte)param_2" ( (type_descriptor "byte" type_identifier) ) identifier) & number_literal) ))) & identifier)) ;)) (if_statement "if (uVar5 == 0) {\n    if (puVar2 + iVar3 == puVar6 + 1) {\n      return 0xffffffff;\n    }\n    uVar5 = puVar6[1];\n    puVar6 = puVar6 + 1;\n    while (uVar5 == 0) {\n      puVar6 = puVar6 + 1;\n      uVar5 = *puVar6;\n    }\n  }" if (parenthesized_expression "(uVar5 == 0)" ( (binary_expression "uVar5 == 0" identifier == number_literal) )) (compound_statement "{\n    if (puVar2 + iVar3 == puVar6 + 1) {\n      return 0xffffffff;\n    }\n    uVar5 = puVar6[1];\n    puVar6 = puVar6 + 1;\n    while (uVar5 == 0) {\n      puVar6 = puVar6 + 1;\n      uVar5 = *puVar6;\n    }\n  }" { (if_statement "if (puVar2 + iVar3 == puVar6 + 1) {\n      return 0xffffffff;\n    }" if (parenthesized_expression "(puVar2 + iVar3 == puVar6 + 1)" ( (binary_expression "puVar2 + iVar3 == puVar6 + 1" (binary_expression "puVar2 + iVar3" identifier + identifier) == (binary_expression "puVar6 + 1" identifier + number_literal)) )) (compound_statement "{\n      return 0xffffffff;\n    }" { (return_statement "return 0xffffffff;" return number_literal ;) })) (expression_statement "uVar5 = puVar6[1];" (assignment_expression "uVar5 = puVar6[1]" identifier = (subscript_expression "puVar6[1]" identifier [ number_literal ])) ;) (expression_statement "puVar6 = puVar6 + 1;" (assignment_expression "puVar6 = puVar6 + 1" identifier = (binary_expression "puVar6 + 1" identifier + number_literal)) ;) (while_statement "while (uVar5 == 0) {\n      puVar6 = puVar6 + 1;\n      uVar5 = *puVar6;\n    }" while (parenthesized_expression "(uVar5 == 0)" ( (binary_expression "uVar5 == 0" identifier == number_literal) )) (compound_statement "{\n      puVar6 = puVar6 + 1;\n      uVar5 = *puVar6;\n    }" { (expression_statement "puVar6 = puVar6 + 1;" (assignment_expression "puVar6 = puVar6 + 1" identifier = (binary_expression "puVar6 + 1" identifier + number_literal)) ;) (expression_statement "uVar5 = *puVar6;" (assignment_expression "uVar5 = *puVar6" identifier = (pointer_expression "*puVar6" * identifier)) ;) })) })) (expression_statement "iVar3 = 0;" (assignment_expression "iVar3 = 0" identifier = number_literal) ;) (for_statement "for (; (uVar5 & 1) == 0; uVar5 = uVar5 >> 1 | 0x80000000) {\n    iVar3 = iVar3 + 1;\n  }" for ( ; (binary_expression "(uVar5 & 1) == 0" (parenthesized_expression "(uVar5 & 1)" ( (binary_expression "uVar5 & 1" identifier & number_literal) )) == number_literal) ; (assignment_expression "uVar5 = uVar5 >> 1 | 0x80000000" identifier = (binary_expression "uVar5 >> 1 | 0x80000000" (binary_expression "uVar5 >> 1" identifier >> number_literal) | number_literal)) ) (compound_statement "{\n    iVar3 = iVar3 + 1;\n  }" { (expression_statement "iVar3 = iVar3 + 1;" (assignment_expression "iVar3 = iVar3 + 1" identifier = (binary_expression "iVar3 + 1" identifier + number_literal)) ;) })) (return_statement "return ((int)puVar6 - (int)puVar2 >> 2) * 0x20 + iVar3;" return (binary_expression "((int)puVar6 - (int)puVar2 >> 2) * 0x20 + iVar3" (binary_expression "((int)puVar6 - (int)puVar2 >> 2) * 0x20" (parenthesized_expression "((int)puVar6 - (int)puVar2 >> 2)" ( (binary_expression "(int)puVar6 - (int)puVar2 >> 2" (binary_expression "(int)puVar6 - (int)puVar2" (cast_expression "(int)puVar6" ( (type_descriptor "int" primitive_type) ) identifier) - (cast_expression "(int)puVar2" ( (type_descriptor "int" primitive_type) ) identifier)) >> number_literal) )) * number_literal) + identifier) ;) })))
(translation_unit "mp_bitcnt_t __gmpz_scan0(mpz_srcptr u,mp_bitcnt_t starting_bit)\n\n{\n  uint uVar1;\n  uint *puVar2;\n  int iVar3;\n  uint *puVar4;\n  uint uVar5;\n  uint *puVar6;\n  \n  uVar1 = u->_mp_size;\n  iVar3 = ((int)uVar1 >> 0x1f ^ uVar1) - ((int)uVar1 >> 0x1f);\n  if (iVar3 <= (int)(starting_bit >> 5)) {\n    if ((int)uVar1 < 0) {\n      return 0xffffffff;\n    }\n    return starting_bit;\n  }\n  puVar2 = u->_mp_d;\n  puVar6 = puVar2 + (starting_bit >> 5);\n  uVar5 = *puVar6;\n  if (-1 < (int)uVar1) {\n    uVar5 = (1 << ((byte)starting_bit & 0x1f)) - 1U | uVar5;\n    while( true ) {\n      if (uVar5 != 0xffffffff) {\n        iVar3 = 0;\n        for (uVar5 = ~uVar5; (uVar5 & 1) == 0; uVar5 = uVar5 >> 1 | 0x80000000) {\n          iVar3 = iVar3 + 1;\n        }\n        return ((int)puVar6 - (int)puVar2 >> 2) * 0x20 + iVar3;\n      }\n      puVar6 = puVar6 + 1;\n      if (puVar2 + iVar3 == puVar6) break;\n      uVar5 = *puVar6;\n    }\n    return iVar3 * 0x20;\n  }\n  if (puVar2 != puVar6) {\n    if (puVar6[-1] != 0) goto LAB_00031ce0;\n    if (puVar2 != puVar6 + -1) {\n      puVar4 = puVar6 + -2;\n      uVar1 = puVar6[-2];\n      while (uVar1 == 0) {\n        if (puVar2 == puVar4) goto LAB_00031cdd;\n        puVar4 = puVar4 + -1;\n        uVar1 = *puVar4;\n      }\n      goto LAB_00031ce0;\n    }\n  }\nLAB_00031cdd:\n  uVar5 = uVar5 - 1;\nLAB_00031ce0:\n  uVar5 = -1 << ((byte)starting_bit & 0x1f) & uVar5;\n  if (uVar5 == 0) {\n    if (puVar2 + iVar3 == puVar6 + 1) {\n      return 0xffffffff;\n    }\n    uVar5 = puVar6[1];\n    puVar6 = puVar6 + 1;\n    while (uVar5 == 0) {\n      puVar6 = puVar6 + 1;\n      uVar5 = *puVar6;\n    }\n  }\n  iVar3 = 0;\n  for (; (uVar5 & 1) == 0; uVar5 = uVar5 >> 1 | 0x80000000) {\n    iVar3 = iVar3 + 1;\n  }\n  return ((int)puVar6 - (int)puVar2 >> 2) * 0x20 + iVar3;\n}\n\n" (function_definition "mp_bitcnt_t __gmpz_scan0(mpz_srcptr u,mp_bitcnt_t starting_bit)\n\n{\n  uint uVar1;\n  uint *puVar2;\n  int iVar3;\n  uint *puVar4;\n  uint uVar5;\n  uint *puVar6;\n  \n  uVar1 = u->_mp_size;\n  iVar3 = ((int)uVar1 >> 0x1f ^ uVar1) - ((int)uVar1 >> 0x1f);\n  if (iVar3 <= (int)(starting_bit >> 5)) {\n    if ((int)uVar1 < 0) {\n      return 0xffffffff;\n    }\n    return starting_bit;\n  }\n  puVar2 = u->_mp_d;\n  puVar6 = puVar2 + (starting_bit >> 5);\n  uVar5 = *puVar6;\n  if (-1 < (int)uVar1) {\n    uVar5 = (1 << ((byte)starting_bit & 0x1f)) - 1U | uVar5;\n    while( true ) {\n      if (uVar5 != 0xffffffff) {\n        iVar3 = 0;\n        for (uVar5 = ~uVar5; (uVar5 & 1) == 0; uVar5 = uVar5 >> 1 | 0x80000000) {\n          iVar3 = iVar3 + 1;\n        }\n        return ((int)puVar6 - (int)puVar2 >> 2) * 0x20 + iVar3;\n      }\n      puVar6 = puVar6 + 1;\n      if (puVar2 + iVar3 == puVar6) break;\n      uVar5 = *puVar6;\n    }\n    return iVar3 * 0x20;\n  }\n  if (puVar2 != puVar6) {\n    if (puVar6[-1] != 0) goto LAB_00031ce0;\n    if (puVar2 != puVar6 + -1) {\n      puVar4 = puVar6 + -2;\n      uVar1 = puVar6[-2];\n      while (uVar1 == 0) {\n        if (puVar2 == puVar4) goto LAB_00031cdd;\n        puVar4 = puVar4 + -1;\n        uVar1 = *puVar4;\n      }\n      goto LAB_00031ce0;\n    }\n  }\nLAB_00031cdd:\n  uVar5 = uVar5 - 1;\nLAB_00031ce0:\n  uVar5 = -1 << ((byte)starting_bit & 0x1f) & uVar5;\n  if (uVar5 == 0) {\n    if (puVar2 + iVar3 == puVar6 + 1) {\n      return 0xffffffff;\n    }\n    uVar5 = puVar6[1];\n    puVar6 = puVar6 + 1;\n    while (uVar5 == 0) {\n      puVar6 = puVar6 + 1;\n      uVar5 = *puVar6;\n    }\n  }\n  iVar3 = 0;\n  for (; (uVar5 & 1) == 0; uVar5 = uVar5 >> 1 | 0x80000000) {\n    iVar3 = iVar3 + 1;\n  }\n  return ((int)puVar6 - (int)puVar2 >> 2) * 0x20 + iVar3;\n}" type_identifier (function_declarator "__gmpz_scan0(mpz_srcptr u,mp_bitcnt_t starting_bit)" identifier (parameter_list "(mpz_srcptr u,mp_bitcnt_t starting_bit)" ( (parameter_declaration "mpz_srcptr u" type_identifier identifier) , (parameter_declaration "mp_bitcnt_t starting_bit" type_identifier identifier) ))) (compound_statement "{\n  uint uVar1;\n  uint *puVar2;\n  int iVar3;\n  uint *puVar4;\n  uint uVar5;\n  uint *puVar6;\n  \n  uVar1 = u->_mp_size;\n  iVar3 = ((int)uVar1 >> 0x1f ^ uVar1) - ((int)uVar1 >> 0x1f);\n  if (iVar3 <= (int)(starting_bit >> 5)) {\n    if ((int)uVar1 < 0) {\n      return 0xffffffff;\n    }\n    return starting_bit;\n  }\n  puVar2 = u->_mp_d;\n  puVar6 = puVar2 + (starting_bit >> 5);\n  uVar5 = *puVar6;\n  if (-1 < (int)uVar1) {\n    uVar5 = (1 << ((byte)starting_bit & 0x1f)) - 1U | uVar5;\n    while( true ) {\n      if (uVar5 != 0xffffffff) {\n        iVar3 = 0;\n        for (uVar5 = ~uVar5; (uVar5 & 1) == 0; uVar5 = uVar5 >> 1 | 0x80000000) {\n          iVar3 = iVar3 + 1;\n        }\n        return ((int)puVar6 - (int)puVar2 >> 2) * 0x20 + iVar3;\n      }\n      puVar6 = puVar6 + 1;\n      if (puVar2 + iVar3 == puVar6) break;\n      uVar5 = *puVar6;\n    }\n    return iVar3 * 0x20;\n  }\n  if (puVar2 != puVar6) {\n    if (puVar6[-1] != 0) goto LAB_00031ce0;\n    if (puVar2 != puVar6 + -1) {\n      puVar4 = puVar6 + -2;\n      uVar1 = puVar6[-2];\n      while (uVar1 == 0) {\n        if (puVar2 == puVar4) goto LAB_00031cdd;\n        puVar4 = puVar4 + -1;\n        uVar1 = *puVar4;\n      }\n      goto LAB_00031ce0;\n    }\n  }\nLAB_00031cdd:\n  uVar5 = uVar5 - 1;\nLAB_00031ce0:\n  uVar5 = -1 << ((byte)starting_bit & 0x1f) & uVar5;\n  if (uVar5 == 0) {\n    if (puVar2 + iVar3 == puVar6 + 1) {\n      return 0xffffffff;\n    }\n    uVar5 = puVar6[1];\n    puVar6 = puVar6 + 1;\n    while (uVar5 == 0) {\n      puVar6 = puVar6 + 1;\n      uVar5 = *puVar6;\n    }\n  }\n  iVar3 = 0;\n  for (; (uVar5 & 1) == 0; uVar5 = uVar5 >> 1 | 0x80000000) {\n    iVar3 = iVar3 + 1;\n  }\n  return ((int)puVar6 - (int)puVar2 >> 2) * 0x20 + iVar3;\n}" { (declaration "uint uVar1;" type_identifier identifier ;) (declaration "uint *puVar2;" type_identifier (pointer_declarator "*puVar2" * identifier) ;) (declaration "int iVar3;" primitive_type identifier ;) (declaration "uint *puVar4;" type_identifier (pointer_declarator "*puVar4" * identifier) ;) (declaration "uint uVar5;" type_identifier identifier ;) (declaration "uint *puVar6;" type_identifier (pointer_declarator "*puVar6" * identifier) ;) (expression_statement "uVar1 = u->_mp_size;" (assignment_expression "uVar1 = u->_mp_size" identifier = (field_expression "u->_mp_size" identifier -> field_identifier)) ;) (expression_statement "iVar3 = ((int)uVar1 >> 0x1f ^ uVar1) - ((int)uVar1 >> 0x1f);" (assignment_expression "iVar3 = ((int)uVar1 >> 0x1f ^ uVar1) - ((int)uVar1 >> 0x1f)" identifier = (binary_expression "((int)uVar1 >> 0x1f ^ uVar1) - ((int)uVar1 >> 0x1f)" (parenthesized_expression "((int)uVar1 >> 0x1f ^ uVar1)" ( (binary_expression "(int)uVar1 >> 0x1f ^ uVar1" (binary_expression "(int)uVar1 >> 0x1f" (cast_expression "(int)uVar1" ( (type_descriptor "int" primitive_type) ) identifier) >> number_literal) ^ identifier) )) - (parenthesized_expression "((int)uVar1 >> 0x1f)" ( (binary_expression "(int)uVar1 >> 0x1f" (cast_expression "(int)uVar1" ( (type_descriptor "int" primitive_type) ) identifier) >> number_literal) )))) ;) (if_statement "if (iVar3 <= (int)(starting_bit >> 5)) {\n    if ((int)uVar1 < 0) {\n      return 0xffffffff;\n    }\n    return starting_bit;\n  }" if (parenthesized_expression "(iVar3 <= (int)(starting_bit >> 5))" ( (binary_expression "iVar3 <= (int)(starting_bit >> 5)" identifier <= (cast_expression "(int)(starting_bit >> 5)" ( (type_descriptor "int" primitive_type) ) (parenthesized_expression "(starting_bit >> 5)" ( (binary_expression "starting_bit >> 5" identifier >> number_literal) )))) )) (compound_statement "{\n    if ((int)uVar1 < 0) {\n      return 0xffffffff;\n    }\n    return starting_bit;\n  }" { (if_statement "if ((int)uVar1 < 0) {\n      return 0xffffffff;\n    }" if (parenthesized_expression "((int)uVar1 < 0)" ( (binary_expression "(int)uVar1 < 0" (cast_expression "(int)uVar1" ( (type_descriptor "int" primitive_type) ) identifier) < number_literal) )) (compound_statement "{\n      return 0xffffffff;\n    }" { (return_statement "return 0xffffffff;" return number_literal ;) })) (return_statement "return starting_bit;" return identifier ;) })) (expression_statement "puVar2 = u->_mp_d;" (assignment_expression "puVar2 = u->_mp_d" identifier = (field_expression "u->_mp_d" identifier -> field_identifier)) ;) (expression_statement "puVar6 = puVar2 + (starting_bit >> 5);" (assignment_expression "puVar6 = puVar2 + (starting_bit >> 5)" identifier = (binary_expression "puVar2 + (starting_bit >> 5)" identifier + (parenthesized_expression "(starting_bit >> 5)" ( (binary_expression "starting_bit >> 5" identifier >> number_literal) )))) ;) (expression_statement "uVar5 = *puVar6;" (assignment_expression "uVar5 = *puVar6" identifier = (pointer_expression "*puVar6" * identifier)) ;) (if_statement "if (-1 < (int)uVar1) {\n    uVar5 = (1 << ((byte)starting_bit & 0x1f)) - 1U | uVar5;\n    while( true ) {\n      if (uVar5 != 0xffffffff) {\n        iVar3 = 0;\n        for (uVar5 = ~uVar5; (uVar5 & 1) == 0; uVar5 = uVar5 >> 1 | 0x80000000) {\n          iVar3 = iVar3 + 1;\n        }\n        return ((int)puVar6 - (int)puVar2 >> 2) * 0x20 + iVar3;\n      }\n      puVar6 = puVar6 + 1;\n      if (puVar2 + iVar3 == puVar6) break;\n      uVar5 = *puVar6;\n    }\n    return iVar3 * 0x20;\n  }" if (parenthesized_expression "(-1 < (int)uVar1)" ( (binary_expression "-1 < (int)uVar1" number_literal < (cast_expression "(int)uVar1" ( (type_descriptor "int" primitive_type) ) identifier)) )) (compound_statement "{\n    uVar5 = (1 << ((byte)starting_bit & 0x1f)) - 1U | uVar5;\n    while( true ) {\n      if (uVar5 != 0xffffffff) {\n        iVar3 = 0;\n        for (uVar5 = ~uVar5; (uVar5 & 1) == 0; uVar5 = uVar5 >> 1 | 0x80000000) {\n          iVar3 = iVar3 + 1;\n        }\n        return ((int)puVar6 - (int)puVar2 >> 2) * 0x20 + iVar3;\n      }\n      puVar6 = puVar6 + 1;\n      if (puVar2 + iVar3 == puVar6) break;\n      uVar5 = *puVar6;\n    }\n    return iVar3 * 0x20;\n  }" { (expression_statement "uVar5 = (1 << ((byte)starting_bit & 0x1f)) - 1U | uVar5;" (assignment_expression "uVar5 = (1 << ((byte)starting_bit & 0x1f)) - 1U | uVar5" identifier = (binary_expression "(1 << ((byte)starting_bit & 0x1f)) - 1U | uVar5" (binary_expression "(1 << ((byte)starting_bit & 0x1f)) - 1U" (parenthesized_expression "(1 << ((byte)starting_bit & 0x1f))" ( (binary_expression "1 << ((byte)starting_bit & 0x1f)" number_literal << (parenthesized_expression "((byte)starting_bit & 0x1f)" ( (binary_expression "(byte)starting_bit & 0x1f" (cast_expression "(byte)starting_bit" ( (type_descriptor "byte" type_identifier) ) identifier) & number_literal) ))) )) - number_literal) | identifier)) ;) (while_statement "while( true ) {\n      if (uVar5 != 0xffffffff) {\n        iVar3 = 0;\n        for (uVar5 = ~uVar5; (uVar5 & 1) == 0; uVar5 = uVar5 >> 1 | 0x80000000) {\n          iVar3 = iVar3 + 1;\n        }\n        return ((int)puVar6 - (int)puVar2 >> 2) * 0x20 + iVar3;\n      }\n      puVar6 = puVar6 + 1;\n      if (puVar2 + iVar3 == puVar6) break;\n      uVar5 = *puVar6;\n    }" while (parenthesized_expression "( true )" ( true )) (compound_statement "{\n      if (uVar5 != 0xffffffff) {\n        iVar3 = 0;\n        for (uVar5 = ~uVar5; (uVar5 & 1) == 0; uVar5 = uVar5 >> 1 | 0x80000000) {\n          iVar3 = iVar3 + 1;\n        }\n        return ((int)puVar6 - (int)puVar2 >> 2) * 0x20 + iVar3;\n      }\n      puVar6 = puVar6 + 1;\n      if (puVar2 + iVar3 == puVar6) break;\n      uVar5 = *puVar6;\n    }" { (if_statement "if (uVar5 != 0xffffffff) {\n        iVar3 = 0;\n        for (uVar5 = ~uVar5; (uVar5 & 1) == 0; uVar5 = uVar5 >> 1 | 0x80000000) {\n          iVar3 = iVar3 + 1;\n        }\n        return ((int)puVar6 - (int)puVar2 >> 2) * 0x20 + iVar3;\n      }" if (parenthesized_expression "(uVar5 != 0xffffffff)" ( (binary_expression "uVar5 != 0xffffffff" identifier != number_literal) )) (compound_statement "{\n        iVar3 = 0;\n        for (uVar5 = ~uVar5; (uVar5 & 1) == 0; uVar5 = uVar5 >> 1 | 0x80000000) {\n          iVar3 = iVar3 + 1;\n        }\n        return ((int)puVar6 - (int)puVar2 >> 2) * 0x20 + iVar3;\n      }" { (expression_statement "iVar3 = 0;" (assignment_expression "iVar3 = 0" identifier = number_literal) ;) (for_statement "for (uVar5 = ~uVar5; (uVar5 & 1) == 0; uVar5 = uVar5 >> 1 | 0x80000000) {\n          iVar3 = iVar3 + 1;\n        }" for ( (assignment_expression "uVar5 = ~uVar5" identifier = (unary_expression "~uVar5" ~ identifier)) ; (binary_expression "(uVar5 & 1) == 0" (parenthesized_expression "(uVar5 & 1)" ( (binary_expression "uVar5 & 1" identifier & number_literal) )) == number_literal) ; (assignment_expression "uVar5 = uVar5 >> 1 | 0x80000000" identifier = (binary_expression "uVar5 >> 1 | 0x80000000" (binary_expression "uVar5 >> 1" identifier >> number_literal) | number_literal)) ) (compound_statement "{\n          iVar3 = iVar3 + 1;\n        }" { (expression_statement "iVar3 = iVar3 + 1;" (assignment_expression "iVar3 = iVar3 + 1" identifier = (binary_expression "iVar3 + 1" identifier + number_literal)) ;) })) (return_statement "return ((int)puVar6 - (int)puVar2 >> 2) * 0x20 + iVar3;" return (binary_expression "((int)puVar6 - (int)puVar2 >> 2) * 0x20 + iVar3" (binary_expression "((int)puVar6 - (int)puVar2 >> 2) * 0x20" (parenthesized_expression "((int)puVar6 - (int)puVar2 >> 2)" ( (binary_expression "(int)puVar6 - (int)puVar2 >> 2" (binary_expression "(int)puVar6 - (int)puVar2" (cast_expression "(int)puVar6" ( (type_descriptor "int" primitive_type) ) identifier) - (cast_expression "(int)puVar2" ( (type_descriptor "int" primitive_type) ) identifier)) >> number_literal) )) * number_literal) + identifier) ;) })) (expression_statement "puVar6 = puVar6 + 1;" (assignment_expression "puVar6 = puVar6 + 1" identifier = (binary_expression "puVar6 + 1" identifier + number_literal)) ;) (if_statement "if (puVar2 + iVar3 == puVar6) break;" if (parenthesized_expression "(puVar2 + iVar3 == puVar6)" ( (binary_expression "puVar2 + iVar3 == puVar6" (binary_expression "puVar2 + iVar3" identifier + identifier) == identifier) )) (break_statement "break;" break ;)) (expression_statement "uVar5 = *puVar6;" (assignment_expression "uVar5 = *puVar6" identifier = (pointer_expression "*puVar6" * identifier)) ;) })) (return_statement "return iVar3 * 0x20;" return (binary_expression "iVar3 * 0x20" identifier * number_literal) ;) })) (if_statement "if (puVar2 != puVar6) {\n    if (puVar6[-1] != 0) goto LAB_00031ce0;\n    if (puVar2 != puVar6 + -1) {\n      puVar4 = puVar6 + -2;\n      uVar1 = puVar6[-2];\n      while (uVar1 == 0) {\n        if (puVar2 == puVar4) goto LAB_00031cdd;\n        puVar4 = puVar4 + -1;\n        uVar1 = *puVar4;\n      }\n      goto LAB_00031ce0;\n    }\n  }" if (parenthesized_expression "(puVar2 != puVar6)" ( (binary_expression "puVar2 != puVar6" identifier != identifier) )) (compound_statement "{\n    if (puVar6[-1] != 0) goto LAB_00031ce0;\n    if (puVar2 != puVar6 + -1) {\n      puVar4 = puVar6 + -2;\n      uVar1 = puVar6[-2];\n      while (uVar1 == 0) {\n        if (puVar2 == puVar4) goto LAB_00031cdd;\n        puVar4 = puVar4 + -1;\n        uVar1 = *puVar4;\n      }\n      goto LAB_00031ce0;\n    }\n  }" { (if_statement "if (puVar6[-1] != 0) goto LAB_00031ce0;" if (parenthesized_expression "(puVar6[-1] != 0)" ( (binary_expression "puVar6[-1] != 0" (subscript_expression "puVar6[-1]" identifier [ number_literal ]) != number_literal) )) (goto_statement "goto LAB_00031ce0;" goto statement_identifier ;)) (if_statement "if (puVar2 != puVar6 + -1) {\n      puVar4 = puVar6 + -2;\n      uVar1 = puVar6[-2];\n      while (uVar1 == 0) {\n        if (puVar2 == puVar4) goto LAB_00031cdd;\n        puVar4 = puVar4 + -1;\n        uVar1 = *puVar4;\n      }\n      goto LAB_00031ce0;\n    }" if (parenthesized_expression "(puVar2 != puVar6 + -1)" ( (binary_expression "puVar2 != puVar6 + -1" identifier != (binary_expression "puVar6 + -1" identifier + number_literal)) )) (compound_statement "{\n      puVar4 = puVar6 + -2;\n      uVar1 = puVar6[-2];\n      while (uVar1 == 0) {\n        if (puVar2 == puVar4) goto LAB_00031cdd;\n        puVar4 = puVar4 + -1;\n        uVar1 = *puVar4;\n      }\n      goto LAB_00031ce0;\n    }" { (expression_statement "puVar4 = puVar6 + -2;" (assignment_expression "puVar4 = puVar6 + -2" identifier = (binary_expression "puVar6 + -2" identifier + number_literal)) ;) (expression_statement "uVar1 = puVar6[-2];" (assignment_expression "uVar1 = puVar6[-2]" identifier = (subscript_expression "puVar6[-2]" identifier [ number_literal ])) ;) (while_statement "while (uVar1 == 0) {\n        if (puVar2 == puVar4) goto LAB_00031cdd;\n        puVar4 = puVar4 + -1;\n        uVar1 = *puVar4;\n      }" while (parenthesized_expression "(uVar1 == 0)" ( (binary_expression "uVar1 == 0" identifier == number_literal) )) (compound_statement "{\n        if (puVar2 == puVar4) goto LAB_00031cdd;\n        puVar4 = puVar4 + -1;\n        uVar1 = *puVar4;\n      }" { (if_statement "if (puVar2 == puVar4) goto LAB_00031cdd;" if (parenthesized_expression "(puVar2 == puVar4)" ( (binary_expression "puVar2 == puVar4" identifier == identifier) )) (goto_statement "goto LAB_00031cdd;" goto statement_identifier ;)) (expression_statement "puVar4 = puVar4 + -1;" (assignment_expression "puVar4 = puVar4 + -1" identifier = (binary_expression "puVar4 + -1" identifier + number_literal)) ;) (expression_statement "uVar1 = *puVar4;" (assignment_expression "uVar1 = *puVar4" identifier = (pointer_expression "*puVar4" * identifier)) ;) })) (goto_statement "goto LAB_00031ce0;" goto statement_identifier ;) })) })) (labeled_statement "LAB_00031cdd:\n  uVar5 = uVar5 - 1;" statement_identifier : (expression_statement "uVar5 = uVar5 - 1;" (assignment_expression "uVar5 = uVar5 - 1" identifier = (binary_expression "uVar5 - 1" identifier - number_literal)) ;)) (labeled_statement "LAB_00031ce0:\n  uVar5 = -1 << ((byte)starting_bit & 0x1f) & uVar5;" statement_identifier : (expression_statement "uVar5 = -1 << ((byte)starting_bit & 0x1f) & uVar5;" (assignment_expression "uVar5 = -1 << ((byte)starting_bit & 0x1f) & uVar5" identifier = (binary_expression "-1 << ((byte)starting_bit & 0x1f) & uVar5" (binary_expression "-1 << ((byte)starting_bit & 0x1f)" number_literal << (parenthesized_expression "((byte)starting_bit & 0x1f)" ( (binary_expression "(byte)starting_bit & 0x1f" (cast_expression "(byte)starting_bit" ( (type_descriptor "byte" type_identifier) ) identifier) & number_literal) ))) & identifier)) ;)) (if_statement "if (uVar5 == 0) {\n    if (puVar2 + iVar3 == puVar6 + 1) {\n      return 0xffffffff;\n    }\n    uVar5 = puVar6[1];\n    puVar6 = puVar6 + 1;\n    while (uVar5 == 0) {\n      puVar6 = puVar6 + 1;\n      uVar5 = *puVar6;\n    }\n  }" if (parenthesized_expression "(uVar5 == 0)" ( (binary_expression "uVar5 == 0" identifier == number_literal) )) (compound_statement "{\n    if (puVar2 + iVar3 == puVar6 + 1) {\n      return 0xffffffff;\n    }\n    uVar5 = puVar6[1];\n    puVar6 = puVar6 + 1;\n    while (uVar5 == 0) {\n      puVar6 = puVar6 + 1;\n      uVar5 = *puVar6;\n    }\n  }" { (if_statement "if (puVar2 + iVar3 == puVar6 + 1) {\n      return 0xffffffff;\n    }" if (parenthesized_expression "(puVar2 + iVar3 == puVar6 + 1)" ( (binary_expression "puVar2 + iVar3 == puVar6 + 1" (binary_expression "puVar2 + iVar3" identifier + identifier) == (binary_expression "puVar6 + 1" identifier + number_literal)) )) (compound_statement "{\n      return 0xffffffff;\n    }" { (return_statement "return 0xffffffff;" return number_literal ;) })) (expression_statement "uVar5 = puVar6[1];" (assignment_expression "uVar5 = puVar6[1]" identifier = (subscript_expression "puVar6[1]" identifier [ number_literal ])) ;) (expression_statement "puVar6 = puVar6 + 1;" (assignment_expression "puVar6 = puVar6 + 1" identifier = (binary_expression "puVar6 + 1" identifier + number_literal)) ;) (while_statement "while (uVar5 == 0) {\n      puVar6 = puVar6 + 1;\n      uVar5 = *puVar6;\n    }" while (parenthesized_expression "(uVar5 == 0)" ( (binary_expression "uVar5 == 0" identifier == number_literal) )) (compound_statement "{\n      puVar6 = puVar6 + 1;\n      uVar5 = *puVar6;\n    }" { (expression_statement "puVar6 = puVar6 + 1;" (assignment_expression "puVar6 = puVar6 + 1" identifier = (binary_expression "puVar6 + 1" identifier + number_literal)) ;) (expression_statement "uVar5 = *puVar6;" (assignment_expression "uVar5 = *puVar6" identifier = (pointer_expression "*puVar6" * identifier)) ;) })) })) (expression_statement "iVar3 = 0;" (assignment_expression "iVar3 = 0" identifier = number_literal) ;) (for_statement "for (; (uVar5 & 1) == 0; uVar5 = uVar5 >> 1 | 0x80000000) {\n    iVar3 = iVar3 + 1;\n  }" for ( ; (binary_expression "(uVar5 & 1) == 0" (parenthesized_expression "(uVar5 & 1)" ( (binary_expression "uVar5 & 1" identifier & number_literal) )) == number_literal) ; (assignment_expression "uVar5 = uVar5 >> 1 | 0x80000000" identifier = (binary_expression "uVar5 >> 1 | 0x80000000" (binary_expression "uVar5 >> 1" identifier >> number_literal) | number_literal)) ) (compound_statement "{\n    iVar3 = iVar3 + 1;\n  }" { (expression_statement "iVar3 = iVar3 + 1;" (assignment_expression "iVar3 = iVar3 + 1" identifier = (binary_expression "iVar3 + 1" identifier + number_literal)) ;) })) (return_statement "return ((int)puVar6 - (int)puVar2 >> 2) * 0x20 + iVar3;" return (binary_expression "((int)puVar6 - (int)puVar2 >> 2) * 0x20 + iVar3" (binary_expression "((int)puVar6 - (int)puVar2 >> 2) * 0x20" (parenthesized_expression "((int)puVar6 - (int)puVar2 >> 2)" ( (binary_expression "(int)puVar6 - (int)puVar2 >> 2" (binary_expression "(int)puVar6 - (int)puVar2" (cast_expression "(int)puVar6" ( (type_descriptor "int" primitive_type) ) identifier) - (cast_expression "(int)puVar2" ( (type_descriptor "int" primitive_type) ) identifier)) >> number_literal) )) * number_literal) + identifier) ;) })))
(translation_unit "uint __gmpz_scan0(int param_1,uint param_2)\n\n{\n  uint uVar1;\n  uint *puVar2;\n  int iVar3;\n  uint *puVar4;\n  uint uVar5;\n  uint *puVar6;\n  \n  uVar1 = *(uint *)(param_1 + 4);\n  iVar3 = ((int)uVar1 >> 0x1f ^ uVar1) - ((int)uVar1 >> 0x1f);\n  if (iVar3 <= (int)(param_2 >> 5)) {\n    if ((int)uVar1 < 0) {\n      return 0xffffffff;\n    }\n    return param_2;\n  }\n  puVar2 = *(uint **)(param_1 + 8);\n  puVar6 = puVar2 + (param_2 >> 5);\n  uVar5 = *puVar6;\n  if (-1 < (int)uVar1) {\n    uVar5 = (1 << ((byte)param_2 & 0x1f)) - 1U | uVar5;\n    while( true ) {\n      if (uVar5 != 0xffffffff) {\n        iVar3 = 0;\n        for (uVar5 = ~uVar5; (uVar5 & 1) == 0; uVar5 = uVar5 >> 1 | 0x80000000) {\n          iVar3 = iVar3 + 1;\n        }\n        return ((int)puVar6 - (int)puVar2 >> 2) * 0x20 + iVar3;\n      }\n      puVar6 = puVar6 + 1;\n      if (puVar2 + iVar3 == puVar6) break;\n      uVar5 = *puVar6;\n    }\n    return iVar3 * 0x20;\n  }\n  if (puVar2 != puVar6) {\n    if (puVar6[-1] != 0) goto LAB_00031ce0;\n    if (puVar2 != puVar6 + -1) {\n      puVar4 = puVar6 + -2;\n      uVar1 = puVar6[-2];\n      while (uVar1 == 0) {\n        if (puVar2 == puVar4) goto LAB_00031cdd;\n        puVar4 = puVar4 + -1;\n        uVar1 = *puVar4;\n      }\n      goto LAB_00031ce0;\n    }\n  }\nLAB_00031cdd:\n  uVar5 = uVar5 - 1;\nLAB_00031ce0:\n  uVar5 = -1 << ((byte)param_2 & 0x1f) & uVar5;\n  if (uVar5 == 0) {\n    if (puVar2 + iVar3 == puVar6 + 1) {\n      return 0xffffffff;\n    }\n    uVar5 = puVar6[1];\n    puVar6 = puVar6 + 1;\n    while (uVar5 == 0) {\n      puVar6 = puVar6 + 1;\n      uVar5 = *puVar6;\n    }\n  }\n  iVar3 = 0;\n  for (; (uVar5 & 1) == 0; uVar5 = uVar5 >> 1 | 0x80000000) {\n    iVar3 = iVar3 + 1;\n  }\n  return ((int)puVar6 - (int)puVar2 >> 2) * 0x20 + iVar3;\n}\n\n" (function_definition "uint __gmpz_scan0(int param_1,uint param_2)\n\n{\n  uint uVar1;\n  uint *puVar2;\n  int iVar3;\n  uint *puVar4;\n  uint uVar5;\n  uint *puVar6;\n  \n  uVar1 = *(uint *)(param_1 + 4);\n  iVar3 = ((int)uVar1 >> 0x1f ^ uVar1) - ((int)uVar1 >> 0x1f);\n  if (iVar3 <= (int)(param_2 >> 5)) {\n    if ((int)uVar1 < 0) {\n      return 0xffffffff;\n    }\n    return param_2;\n  }\n  puVar2 = *(uint **)(param_1 + 8);\n  puVar6 = puVar2 + (param_2 >> 5);\n  uVar5 = *puVar6;\n  if (-1 < (int)uVar1) {\n    uVar5 = (1 << ((byte)param_2 & 0x1f)) - 1U | uVar5;\n    while( true ) {\n      if (uVar5 != 0xffffffff) {\n        iVar3 = 0;\n        for (uVar5 = ~uVar5; (uVar5 & 1) == 0; uVar5 = uVar5 >> 1 | 0x80000000) {\n          iVar3 = iVar3 + 1;\n        }\n        return ((int)puVar6 - (int)puVar2 >> 2) * 0x20 + iVar3;\n      }\n      puVar6 = puVar6 + 1;\n      if (puVar2 + iVar3 == puVar6) break;\n      uVar5 = *puVar6;\n    }\n    return iVar3 * 0x20;\n  }\n  if (puVar2 != puVar6) {\n    if (puVar6[-1] != 0) goto LAB_00031ce0;\n    if (puVar2 != puVar6 + -1) {\n      puVar4 = puVar6 + -2;\n      uVar1 = puVar6[-2];\n      while (uVar1 == 0) {\n        if (puVar2 == puVar4) goto LAB_00031cdd;\n        puVar4 = puVar4 + -1;\n        uVar1 = *puVar4;\n      }\n      goto LAB_00031ce0;\n    }\n  }\nLAB_00031cdd:\n  uVar5 = uVar5 - 1;\nLAB_00031ce0:\n  uVar5 = -1 << ((byte)param_2 & 0x1f) & uVar5;\n  if (uVar5 == 0) {\n    if (puVar2 + iVar3 == puVar6 + 1) {\n      return 0xffffffff;\n    }\n    uVar5 = puVar6[1];\n    puVar6 = puVar6 + 1;\n    while (uVar5 == 0) {\n      puVar6 = puVar6 + 1;\n      uVar5 = *puVar6;\n    }\n  }\n  iVar3 = 0;\n  for (; (uVar5 & 1) == 0; uVar5 = uVar5 >> 1 | 0x80000000) {\n    iVar3 = iVar3 + 1;\n  }\n  return ((int)puVar6 - (int)puVar2 >> 2) * 0x20 + iVar3;\n}" type_identifier (function_declarator "__gmpz_scan0(int param_1,uint param_2)" identifier (parameter_list "(int param_1,uint param_2)" ( (parameter_declaration "int param_1" primitive_type identifier) , (parameter_declaration "uint param_2" type_identifier identifier) ))) (compound_statement "{\n  uint uVar1;\n  uint *puVar2;\n  int iVar3;\n  uint *puVar4;\n  uint uVar5;\n  uint *puVar6;\n  \n  uVar1 = *(uint *)(param_1 + 4);\n  iVar3 = ((int)uVar1 >> 0x1f ^ uVar1) - ((int)uVar1 >> 0x1f);\n  if (iVar3 <= (int)(param_2 >> 5)) {\n    if ((int)uVar1 < 0) {\n      return 0xffffffff;\n    }\n    return param_2;\n  }\n  puVar2 = *(uint **)(param_1 + 8);\n  puVar6 = puVar2 + (param_2 >> 5);\n  uVar5 = *puVar6;\n  if (-1 < (int)uVar1) {\n    uVar5 = (1 << ((byte)param_2 & 0x1f)) - 1U | uVar5;\n    while( true ) {\n      if (uVar5 != 0xffffffff) {\n        iVar3 = 0;\n        for (uVar5 = ~uVar5; (uVar5 & 1) == 0; uVar5 = uVar5 >> 1 | 0x80000000) {\n          iVar3 = iVar3 + 1;\n        }\n        return ((int)puVar6 - (int)puVar2 >> 2) * 0x20 + iVar3;\n      }\n      puVar6 = puVar6 + 1;\n      if (puVar2 + iVar3 == puVar6) break;\n      uVar5 = *puVar6;\n    }\n    return iVar3 * 0x20;\n  }\n  if (puVar2 != puVar6) {\n    if (puVar6[-1] != 0) goto LAB_00031ce0;\n    if (puVar2 != puVar6 + -1) {\n      puVar4 = puVar6 + -2;\n      uVar1 = puVar6[-2];\n      while (uVar1 == 0) {\n        if (puVar2 == puVar4) goto LAB_00031cdd;\n        puVar4 = puVar4 + -1;\n        uVar1 = *puVar4;\n      }\n      goto LAB_00031ce0;\n    }\n  }\nLAB_00031cdd:\n  uVar5 = uVar5 - 1;\nLAB_00031ce0:\n  uVar5 = -1 << ((byte)param_2 & 0x1f) & uVar5;\n  if (uVar5 == 0) {\n    if (puVar2 + iVar3 == puVar6 + 1) {\n      return 0xffffffff;\n    }\n    uVar5 = puVar6[1];\n    puVar6 = puVar6 + 1;\n    while (uVar5 == 0) {\n      puVar6 = puVar6 + 1;\n      uVar5 = *puVar6;\n    }\n  }\n  iVar3 = 0;\n  for (; (uVar5 & 1) == 0; uVar5 = uVar5 >> 1 | 0x80000000) {\n    iVar3 = iVar3 + 1;\n  }\n  return ((int)puVar6 - (int)puVar2 >> 2) * 0x20 + iVar3;\n}" { (declaration "uint uVar1;" type_identifier identifier ;) (declaration "uint *puVar2;" type_identifier (pointer_declarator "*puVar2" * identifier) ;) (declaration "int iVar3;" primitive_type identifier ;) (declaration "uint *puVar4;" type_identifier (pointer_declarator "*puVar4" * identifier) ;) (declaration "uint uVar5;" type_identifier identifier ;) (declaration "uint *puVar6;" type_identifier (pointer_declarator "*puVar6" * identifier) ;) (expression_statement "uVar1 = *(uint *)(param_1 + 4);" (assignment_expression "uVar1 = *(uint *)(param_1 + 4)" identifier = (pointer_expression "*(uint *)(param_1 + 4)" * (cast_expression "(uint *)(param_1 + 4)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 4)" ( (binary_expression "param_1 + 4" identifier + number_literal) ))))) ;) (expression_statement "iVar3 = ((int)uVar1 >> 0x1f ^ uVar1) - ((int)uVar1 >> 0x1f);" (assignment_expression "iVar3 = ((int)uVar1 >> 0x1f ^ uVar1) - ((int)uVar1 >> 0x1f)" identifier = (binary_expression "((int)uVar1 >> 0x1f ^ uVar1) - ((int)uVar1 >> 0x1f)" (parenthesized_expression "((int)uVar1 >> 0x1f ^ uVar1)" ( (binary_expression "(int)uVar1 >> 0x1f ^ uVar1" (binary_expression "(int)uVar1 >> 0x1f" (cast_expression "(int)uVar1" ( (type_descriptor "int" primitive_type) ) identifier) >> number_literal) ^ identifier) )) - (parenthesized_expression "((int)uVar1 >> 0x1f)" ( (binary_expression "(int)uVar1 >> 0x1f" (cast_expression "(int)uVar1" ( (type_descriptor "int" primitive_type) ) identifier) >> number_literal) )))) ;) (if_statement "if (iVar3 <= (int)(param_2 >> 5)) {\n    if ((int)uVar1 < 0) {\n      return 0xffffffff;\n    }\n    return param_2;\n  }" if (parenthesized_expression "(iVar3 <= (int)(param_2 >> 5))" ( (binary_expression "iVar3 <= (int)(param_2 >> 5)" identifier <= (cast_expression "(int)(param_2 >> 5)" ( (type_descriptor "int" primitive_type) ) (parenthesized_expression "(param_2 >> 5)" ( (binary_expression "param_2 >> 5" identifier >> number_literal) )))) )) (compound_statement "{\n    if ((int)uVar1 < 0) {\n      return 0xffffffff;\n    }\n    return param_2;\n  }" { (if_statement "if ((int)uVar1 < 0) {\n      return 0xffffffff;\n    }" if (parenthesized_expression "((int)uVar1 < 0)" ( (binary_expression "(int)uVar1 < 0" (cast_expression "(int)uVar1" ( (type_descriptor "int" primitive_type) ) identifier) < number_literal) )) (compound_statement "{\n      return 0xffffffff;\n    }" { (return_statement "return 0xffffffff;" return number_literal ;) })) (return_statement "return param_2;" return identifier ;) })) (expression_statement "puVar2 = *(uint **)(param_1 + 8);" (assignment_expression "puVar2 = *(uint **)(param_1 + 8)" identifier = (pointer_expression "*(uint **)(param_1 + 8)" * (cast_expression "(uint **)(param_1 + 8)" ( (type_descriptor "uint **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_1 + 8)" ( (binary_expression "param_1 + 8" identifier + number_literal) ))))) ;) (expression_statement "puVar6 = puVar2 + (param_2 >> 5);" (assignment_expression "puVar6 = puVar2 + (param_2 >> 5)" identifier = (binary_expression "puVar2 + (param_2 >> 5)" identifier + (parenthesized_expression "(param_2 >> 5)" ( (binary_expression "param_2 >> 5" identifier >> number_literal) )))) ;) (expression_statement "uVar5 = *puVar6;" (assignment_expression "uVar5 = *puVar6" identifier = (pointer_expression "*puVar6" * identifier)) ;) (if_statement "if (-1 < (int)uVar1) {\n    uVar5 = (1 << ((byte)param_2 & 0x1f)) - 1U | uVar5;\n    while( true ) {\n      if (uVar5 != 0xffffffff) {\n        iVar3 = 0;\n        for (uVar5 = ~uVar5; (uVar5 & 1) == 0; uVar5 = uVar5 >> 1 | 0x80000000) {\n          iVar3 = iVar3 + 1;\n        }\n        return ((int)puVar6 - (int)puVar2 >> 2) * 0x20 + iVar3;\n      }\n      puVar6 = puVar6 + 1;\n      if (puVar2 + iVar3 == puVar6) break;\n      uVar5 = *puVar6;\n    }\n    return iVar3 * 0x20;\n  }" if (parenthesized_expression "(-1 < (int)uVar1)" ( (binary_expression "-1 < (int)uVar1" number_literal < (cast_expression "(int)uVar1" ( (type_descriptor "int" primitive_type) ) identifier)) )) (compound_statement "{\n    uVar5 = (1 << ((byte)param_2 & 0x1f)) - 1U | uVar5;\n    while( true ) {\n      if (uVar5 != 0xffffffff) {\n        iVar3 = 0;\n        for (uVar5 = ~uVar5; (uVar5 & 1) == 0; uVar5 = uVar5 >> 1 | 0x80000000) {\n          iVar3 = iVar3 + 1;\n        }\n        return ((int)puVar6 - (int)puVar2 >> 2) * 0x20 + iVar3;\n      }\n      puVar6 = puVar6 + 1;\n      if (puVar2 + iVar3 == puVar6) break;\n      uVar5 = *puVar6;\n    }\n    return iVar3 * 0x20;\n  }" { (expression_statement "uVar5 = (1 << ((byte)param_2 & 0x1f)) - 1U | uVar5;" (assignment_expression "uVar5 = (1 << ((byte)param_2 & 0x1f)) - 1U | uVar5" identifier = (binary_expression "(1 << ((byte)param_2 & 0x1f)) - 1U | uVar5" (binary_expression "(1 << ((byte)param_2 & 0x1f)) - 1U" (parenthesized_expression "(1 << ((byte)param_2 & 0x1f))" ( (binary_expression "1 << ((byte)param_2 & 0x1f)" number_literal << (parenthesized_expression "((byte)param_2 & 0x1f)" ( (binary_expression "(byte)param_2 & 0x1f" (cast_expression "(byte)param_2" ( (type_descriptor "byte" type_identifier) ) identifier) & number_literal) ))) )) - number_literal) | identifier)) ;) (while_statement "while( true ) {\n      if (uVar5 != 0xffffffff) {\n        iVar3 = 0;\n        for (uVar5 = ~uVar5; (uVar5 & 1) == 0; uVar5 = uVar5 >> 1 | 0x80000000) {\n          iVar3 = iVar3 + 1;\n        }\n        return ((int)puVar6 - (int)puVar2 >> 2) * 0x20 + iVar3;\n      }\n      puVar6 = puVar6 + 1;\n      if (puVar2 + iVar3 == puVar6) break;\n      uVar5 = *puVar6;\n    }" while (parenthesized_expression "( true )" ( true )) (compound_statement "{\n      if (uVar5 != 0xffffffff) {\n        iVar3 = 0;\n        for (uVar5 = ~uVar5; (uVar5 & 1) == 0; uVar5 = uVar5 >> 1 | 0x80000000) {\n          iVar3 = iVar3 + 1;\n        }\n        return ((int)puVar6 - (int)puVar2 >> 2) * 0x20 + iVar3;\n      }\n      puVar6 = puVar6 + 1;\n      if (puVar2 + iVar3 == puVar6) break;\n      uVar5 = *puVar6;\n    }" { (if_statement "if (uVar5 != 0xffffffff) {\n        iVar3 = 0;\n        for (uVar5 = ~uVar5; (uVar5 & 1) == 0; uVar5 = uVar5 >> 1 | 0x80000000) {\n          iVar3 = iVar3 + 1;\n        }\n        return ((int)puVar6 - (int)puVar2 >> 2) * 0x20 + iVar3;\n      }" if (parenthesized_expression "(uVar5 != 0xffffffff)" ( (binary_expression "uVar5 != 0xffffffff" identifier != number_literal) )) (compound_statement "{\n        iVar3 = 0;\n        for (uVar5 = ~uVar5; (uVar5 & 1) == 0; uVar5 = uVar5 >> 1 | 0x80000000) {\n          iVar3 = iVar3 + 1;\n        }\n        return ((int)puVar6 - (int)puVar2 >> 2) * 0x20 + iVar3;\n      }" { (expression_statement "iVar3 = 0;" (assignment_expression "iVar3 = 0" identifier = number_literal) ;) (for_statement "for (uVar5 = ~uVar5; (uVar5 & 1) == 0; uVar5 = uVar5 >> 1 | 0x80000000) {\n          iVar3 = iVar3 + 1;\n        }" for ( (assignment_expression "uVar5 = ~uVar5" identifier = (unary_expression "~uVar5" ~ identifier)) ; (binary_expression "(uVar5 & 1) == 0" (parenthesized_expression "(uVar5 & 1)" ( (binary_expression "uVar5 & 1" identifier & number_literal) )) == number_literal) ; (assignment_expression "uVar5 = uVar5 >> 1 | 0x80000000" identifier = (binary_expression "uVar5 >> 1 | 0x80000000" (binary_expression "uVar5 >> 1" identifier >> number_literal) | number_literal)) ) (compound_statement "{\n          iVar3 = iVar3 + 1;\n        }" { (expression_statement "iVar3 = iVar3 + 1;" (assignment_expression "iVar3 = iVar3 + 1" identifier = (binary_expression "iVar3 + 1" identifier + number_literal)) ;) })) (return_statement "return ((int)puVar6 - (int)puVar2 >> 2) * 0x20 + iVar3;" return (binary_expression "((int)puVar6 - (int)puVar2 >> 2) * 0x20 + iVar3" (binary_expression "((int)puVar6 - (int)puVar2 >> 2) * 0x20" (parenthesized_expression "((int)puVar6 - (int)puVar2 >> 2)" ( (binary_expression "(int)puVar6 - (int)puVar2 >> 2" (binary_expression "(int)puVar6 - (int)puVar2" (cast_expression "(int)puVar6" ( (type_descriptor "int" primitive_type) ) identifier) - (cast_expression "(int)puVar2" ( (type_descriptor "int" primitive_type) ) identifier)) >> number_literal) )) * number_literal) + identifier) ;) })) (expression_statement "puVar6 = puVar6 + 1;" (assignment_expression "puVar6 = puVar6 + 1" identifier = (binary_expression "puVar6 + 1" identifier + number_literal)) ;) (if_statement "if (puVar2 + iVar3 == puVar6) break;" if (parenthesized_expression "(puVar2 + iVar3 == puVar6)" ( (binary_expression "puVar2 + iVar3 == puVar6" (binary_expression "puVar2 + iVar3" identifier + identifier) == identifier) )) (break_statement "break;" break ;)) (expression_statement "uVar5 = *puVar6;" (assignment_expression "uVar5 = *puVar6" identifier = (pointer_expression "*puVar6" * identifier)) ;) })) (return_statement "return iVar3 * 0x20;" return (binary_expression "iVar3 * 0x20" identifier * number_literal) ;) })) (if_statement "if (puVar2 != puVar6) {\n    if (puVar6[-1] != 0) goto LAB_00031ce0;\n    if (puVar2 != puVar6 + -1) {\n      puVar4 = puVar6 + -2;\n      uVar1 = puVar6[-2];\n      while (uVar1 == 0) {\n        if (puVar2 == puVar4) goto LAB_00031cdd;\n        puVar4 = puVar4 + -1;\n        uVar1 = *puVar4;\n      }\n      goto LAB_00031ce0;\n    }\n  }" if (parenthesized_expression "(puVar2 != puVar6)" ( (binary_expression "puVar2 != puVar6" identifier != identifier) )) (compound_statement "{\n    if (puVar6[-1] != 0) goto LAB_00031ce0;\n    if (puVar2 != puVar6 + -1) {\n      puVar4 = puVar6 + -2;\n      uVar1 = puVar6[-2];\n      while (uVar1 == 0) {\n        if (puVar2 == puVar4) goto LAB_00031cdd;\n        puVar4 = puVar4 + -1;\n        uVar1 = *puVar4;\n      }\n      goto LAB_00031ce0;\n    }\n  }" { (if_statement "if (puVar6[-1] != 0) goto LAB_00031ce0;" if (parenthesized_expression "(puVar6[-1] != 0)" ( (binary_expression "puVar6[-1] != 0" (subscript_expression "puVar6[-1]" identifier [ number_literal ]) != number_literal) )) (goto_statement "goto LAB_00031ce0;" goto statement_identifier ;)) (if_statement "if (puVar2 != puVar6 + -1) {\n      puVar4 = puVar6 + -2;\n      uVar1 = puVar6[-2];\n      while (uVar1 == 0) {\n        if (puVar2 == puVar4) goto LAB_00031cdd;\n        puVar4 = puVar4 + -1;\n        uVar1 = *puVar4;\n      }\n      goto LAB_00031ce0;\n    }" if (parenthesized_expression "(puVar2 != puVar6 + -1)" ( (binary_expression "puVar2 != puVar6 + -1" identifier != (binary_expression "puVar6 + -1" identifier + number_literal)) )) (compound_statement "{\n      puVar4 = puVar6 + -2;\n      uVar1 = puVar6[-2];\n      while (uVar1 == 0) {\n        if (puVar2 == puVar4) goto LAB_00031cdd;\n        puVar4 = puVar4 + -1;\n        uVar1 = *puVar4;\n      }\n      goto LAB_00031ce0;\n    }" { (expression_statement "puVar4 = puVar6 + -2;" (assignment_expression "puVar4 = puVar6 + -2" identifier = (binary_expression "puVar6 + -2" identifier + number_literal)) ;) (expression_statement "uVar1 = puVar6[-2];" (assignment_expression "uVar1 = puVar6[-2]" identifier = (subscript_expression "puVar6[-2]" identifier [ number_literal ])) ;) (while_statement "while (uVar1 == 0) {\n        if (puVar2 == puVar4) goto LAB_00031cdd;\n        puVar4 = puVar4 + -1;\n        uVar1 = *puVar4;\n      }" while (parenthesized_expression "(uVar1 == 0)" ( (binary_expression "uVar1 == 0" identifier == number_literal) )) (compound_statement "{\n        if (puVar2 == puVar4) goto LAB_00031cdd;\n        puVar4 = puVar4 + -1;\n        uVar1 = *puVar4;\n      }" { (if_statement "if (puVar2 == puVar4) goto LAB_00031cdd;" if (parenthesized_expression "(puVar2 == puVar4)" ( (binary_expression "puVar2 == puVar4" identifier == identifier) )) (goto_statement "goto LAB_00031cdd;" goto statement_identifier ;)) (expression_statement "puVar4 = puVar4 + -1;" (assignment_expression "puVar4 = puVar4 + -1" identifier = (binary_expression "puVar4 + -1" identifier + number_literal)) ;) (expression_statement "uVar1 = *puVar4;" (assignment_expression "uVar1 = *puVar4" identifier = (pointer_expression "*puVar4" * identifier)) ;) })) (goto_statement "goto LAB_00031ce0;" goto statement_identifier ;) })) })) (labeled_statement "LAB_00031cdd:\n  uVar5 = uVar5 - 1;" statement_identifier : (expression_statement "uVar5 = uVar5 - 1;" (assignment_expression "uVar5 = uVar5 - 1" identifier = (binary_expression "uVar5 - 1" identifier - number_literal)) ;)) (labeled_statement "LAB_00031ce0:\n  uVar5 = -1 << ((byte)param_2 & 0x1f) & uVar5;" statement_identifier : (expression_statement "uVar5 = -1 << ((byte)param_2 & 0x1f) & uVar5;" (assignment_expression "uVar5 = -1 << ((byte)param_2 & 0x1f) & uVar5" identifier = (binary_expression "-1 << ((byte)param_2 & 0x1f) & uVar5" (binary_expression "-1 << ((byte)param_2 & 0x1f)" number_literal << (parenthesized_expression "((byte)param_2 & 0x1f)" ( (binary_expression "(byte)param_2 & 0x1f" (cast_expression "(byte)param_2" ( (type_descriptor "byte" type_identifier) ) identifier) & number_literal) ))) & identifier)) ;)) (if_statement "if (uVar5 == 0) {\n    if (puVar2 + iVar3 == puVar6 + 1) {\n      return 0xffffffff;\n    }\n    uVar5 = puVar6[1];\n    puVar6 = puVar6 + 1;\n    while (uVar5 == 0) {\n      puVar6 = puVar6 + 1;\n      uVar5 = *puVar6;\n    }\n  }" if (parenthesized_expression "(uVar5 == 0)" ( (binary_expression "uVar5 == 0" identifier == number_literal) )) (compound_statement "{\n    if (puVar2 + iVar3 == puVar6 + 1) {\n      return 0xffffffff;\n    }\n    uVar5 = puVar6[1];\n    puVar6 = puVar6 + 1;\n    while (uVar5 == 0) {\n      puVar6 = puVar6 + 1;\n      uVar5 = *puVar6;\n    }\n  }" { (if_statement "if (puVar2 + iVar3 == puVar6 + 1) {\n      return 0xffffffff;\n    }" if (parenthesized_expression "(puVar2 + iVar3 == puVar6 + 1)" ( (binary_expression "puVar2 + iVar3 == puVar6 + 1" (binary_expression "puVar2 + iVar3" identifier + identifier) == (binary_expression "puVar6 + 1" identifier + number_literal)) )) (compound_statement "{\n      return 0xffffffff;\n    }" { (return_statement "return 0xffffffff;" return number_literal ;) })) (expression_statement "uVar5 = puVar6[1];" (assignment_expression "uVar5 = puVar6[1]" identifier = (subscript_expression "puVar6[1]" identifier [ number_literal ])) ;) (expression_statement "puVar6 = puVar6 + 1;" (assignment_expression "puVar6 = puVar6 + 1" identifier = (binary_expression "puVar6 + 1" identifier + number_literal)) ;) (while_statement "while (uVar5 == 0) {\n      puVar6 = puVar6 + 1;\n      uVar5 = *puVar6;\n    }" while (parenthesized_expression "(uVar5 == 0)" ( (binary_expression "uVar5 == 0" identifier == number_literal) )) (compound_statement "{\n      puVar6 = puVar6 + 1;\n      uVar5 = *puVar6;\n    }" { (expression_statement "puVar6 = puVar6 + 1;" (assignment_expression "puVar6 = puVar6 + 1" identifier = (binary_expression "puVar6 + 1" identifier + number_literal)) ;) (expression_statement "uVar5 = *puVar6;" (assignment_expression "uVar5 = *puVar6" identifier = (pointer_expression "*puVar6" * identifier)) ;) })) })) (expression_statement "iVar3 = 0;" (assignment_expression "iVar3 = 0" identifier = number_literal) ;) (for_statement "for (; (uVar5 & 1) == 0; uVar5 = uVar5 >> 1 | 0x80000000) {\n    iVar3 = iVar3 + 1;\n  }" for ( ; (binary_expression "(uVar5 & 1) == 0" (parenthesized_expression "(uVar5 & 1)" ( (binary_expression "uVar5 & 1" identifier & number_literal) )) == number_literal) ; (assignment_expression "uVar5 = uVar5 >> 1 | 0x80000000" identifier = (binary_expression "uVar5 >> 1 | 0x80000000" (binary_expression "uVar5 >> 1" identifier >> number_literal) | number_literal)) ) (compound_statement "{\n    iVar3 = iVar3 + 1;\n  }" { (expression_statement "iVar3 = iVar3 + 1;" (assignment_expression "iVar3 = iVar3 + 1" identifier = (binary_expression "iVar3 + 1" identifier + number_literal)) ;) })) (return_statement "return ((int)puVar6 - (int)puVar2 >> 2) * 0x20 + iVar3;" return (binary_expression "((int)puVar6 - (int)puVar2 >> 2) * 0x20 + iVar3" (binary_expression "((int)puVar6 - (int)puVar2 >> 2) * 0x20" (parenthesized_expression "((int)puVar6 - (int)puVar2 >> 2)" ( (binary_expression "(int)puVar6 - (int)puVar2 >> 2" (binary_expression "(int)puVar6 - (int)puVar2" (cast_expression "(int)puVar6" ( (type_descriptor "int" primitive_type) ) identifier) - (cast_expression "(int)puVar2" ( (type_descriptor "int" primitive_type) ) identifier)) >> number_literal) )) * number_literal) + identifier) ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (expression_statement (assignment_expression IDENT = (binary_expression (parenthesized_expression ( (binary_expression (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) >> LIT) ^ IDENT) )) - (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) >> LIT) )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT <= (cast_expression ( (type_descriptor TYPE) ) (parenthesized_expression ( (binary_expression IDENT >> LIT) )))) )) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) < LIT) )) (compound_statement { (return_statement return LIT ;) })) (return_statement return IDENT ;) })) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + (parenthesized_expression ( (binary_expression IDENT >> LIT) )))) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * IDENT)) ;) (if_statement if (parenthesized_expression ( (binary_expression LIT < (cast_expression ( (type_descriptor TYPE) ) IDENT)) )) (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression (binary_expression (parenthesized_expression ( (binary_expression LIT << (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) & LIT) ))) )) - LIT) | IDENT)) ;) (while_statement while (parenthesized_expression ( BOOL )) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) (for_statement for ( (assignment_expression IDENT = (unary_expression ~ IDENT)) ; (binary_expression (parenthesized_expression ( (binary_expression IDENT & LIT) )) == LIT) ; (assignment_expression IDENT = (binary_expression (binary_expression IDENT >> LIT) | LIT)) ) (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) })) (return_statement return (binary_expression (binary_expression (parenthesized_expression ( (binary_expression (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) - (cast_expression ( (type_descriptor TYPE) ) IDENT)) >> LIT) )) * LIT) + IDENT) ;) })) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (if_statement if (parenthesized_expression ( (binary_expression (binary_expression IDENT + IDENT) == IDENT) )) (break_statement break ;)) (expression_statement (assignment_expression IDENT = (pointer_expression * IDENT)) ;) })) (return_statement return (binary_expression IDENT * LIT) ;) })) (if_statement if (parenthesized_expression ( (binary_expression IDENT != IDENT) )) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression (subscript_expression IDENT [ LIT ]) != LIT) )) (goto_statement goto statement_identifier ;)) (if_statement if (parenthesized_expression ( (binary_expression IDENT != (binary_expression IDENT + LIT)) )) (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (expression_statement (assignment_expression IDENT = (subscript_expression IDENT [ LIT ])) ;) (while_statement while (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression IDENT == IDENT) )) (goto_statement goto statement_identifier ;)) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * IDENT)) ;) })) (goto_statement goto statement_identifier ;) })) })) (labeled_statement statement_identifier : (expression_statement (assignment_expression IDENT = (binary_expression IDENT - LIT)) ;)) (labeled_statement statement_identifier : (expression_statement (assignment_expression IDENT = (binary_expression (binary_expression LIT << (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) & LIT) ))) & IDENT)) ;)) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression (binary_expression IDENT + IDENT) == (binary_expression IDENT + LIT)) )) (compound_statement { (return_statement return LIT ;) })) (expression_statement (assignment_expression IDENT = (subscript_expression IDENT [ LIT ])) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (while_statement while (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * IDENT)) ;) })) })) (expression_statement (assignment_expression IDENT = LIT) ;) (for_statement for ( ; (binary_expression (parenthesized_expression ( (binary_expression IDENT & LIT) )) == LIT) ; (assignment_expression IDENT = (binary_expression (binary_expression IDENT >> LIT) | LIT)) ) (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) })) (return_statement return (binary_expression (binary_expression (parenthesized_expression ( (binary_expression (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) - (cast_expression ( (type_descriptor TYPE) ) IDENT)) >> LIT) )) * LIT) + IDENT) ;) })))
(function_definition "uint __gmpz_scan0(int param_1,uint param_2)\n\n{\n  uint uVar1;\n  uint *puVar2;\n  int iVar3;\n  uint *puVar4;\n  uint uVar5;\n  uint *puVar6;\n  \n  uVar1 = *(uint *)(param_1 + 4);\n  iVar3 = ((int)uVar1 >> 0x1f ^ uVar1) - ((int)uVar1 >> 0x1f);\n  if (iVar3 <= (int)(param_2 >> 5)) {\n    if ((int)uVar1 < 0) {\n      return 0xffffffff;\n    }\n    return param_2;\n  }\n  puVar2 = *(uint **)(param_1 + 8);\n  puVar6 = puVar2 + (param_2 >> 5);\n  uVar5 = *puVar6;\n  if (-1 < (int)uVar1) {\n    uVar5 = (1 << ((byte)param_2 & 0x1f)) - 1U | uVar5;\n    while( true ) {\n      if (uVar5 != 0xffffffff) {\n        iVar3 = 0;\n        for (uVar5 = ~uVar5; (uVar5 & 1) == 0; uVar5 = uVar5 >> 1 | 0x80000000) {\n          iVar3 = iVar3 + 1;\n        }\n        return ((int)puVar6 - (int)puVar2 >> 2) * 0x20 + iVar3;\n      }\n      puVar6 = puVar6 + 1;\n      if (puVar2 + iVar3 == puVar6) break;\n      uVar5 = *puVar6;\n    }\n    return iVar3 * 0x20;\n  }\n  if (puVar2 != puVar6) {\n    if (puVar6[-1] != 0) goto LAB_00031ce0;\n    if (puVar2 != puVar6 + -1) {\n      puVar4 = puVar6 + -2;\n      uVar1 = puVar6[-2];\n      while (uVar1 == 0) {\n        if (puVar2 == puVar4) goto LAB_00031cdd;\n        puVar4 = puVar4 + -1;\n        uVar1 = *puVar4;\n      }\n      goto LAB_00031ce0;\n    }\n  }\nLAB_00031cdd:\n  uVar5 = uVar5 - 1;\nLAB_00031ce0:\n  uVar5 = -1 << ((byte)param_2 & 0x1f) & uVar5;\n  if (uVar5 == 0) {\n    if (puVar2 + iVar3 == puVar6 + 1) {\n      return 0xffffffff;\n    }\n    uVar5 = puVar6[1];\n    puVar6 = puVar6 + 1;\n    while (uVar5 == 0) {\n      puVar6 = puVar6 + 1;\n      uVar5 = *puVar6;\n    }\n  }\n  iVar3 = 0;\n  for (; (uVar5 & 1) == 0; uVar5 = uVar5 >> 1 | 0x80000000) {\n    iVar3 = iVar3 + 1;\n  }\n  return ((int)puVar6 - (int)puVar2 >> 2) * 0x20 + iVar3;\n}" (type_identifier "uint") (function_declarator "__gmpz_scan0(int param_1,uint param_2)" (identifier "__gmpz_scan0") (parameter_list "(int param_1,uint param_2)" (( "(") (parameter_declaration "int param_1" (primitive_type "int") (identifier "param_1")) (, ",") (parameter_declaration "uint param_2" (type_identifier "uint") (identifier "param_2")) () ")"))) (compound_statement "{\n  uint uVar1;\n  uint *puVar2;\n  int iVar3;\n  uint *puVar4;\n  uint uVar5;\n  uint *puVar6;\n  \n  uVar1 = *(uint *)(param_1 + 4);\n  iVar3 = ((int)uVar1 >> 0x1f ^ uVar1) - ((int)uVar1 >> 0x1f);\n  if (iVar3 <= (int)(param_2 >> 5)) {\n    if ((int)uVar1 < 0) {\n      return 0xffffffff;\n    }\n    return param_2;\n  }\n  puVar2 = *(uint **)(param_1 + 8);\n  puVar6 = puVar2 + (param_2 >> 5);\n  uVar5 = *puVar6;\n  if (-1 < (int)uVar1) {\n    uVar5 = (1 << ((byte)param_2 & 0x1f)) - 1U | uVar5;\n    while( true ) {\n      if (uVar5 != 0xffffffff) {\n        iVar3 = 0;\n        for (uVar5 = ~uVar5; (uVar5 & 1) == 0; uVar5 = uVar5 >> 1 | 0x80000000) {\n          iVar3 = iVar3 + 1;\n        }\n        return ((int)puVar6 - (int)puVar2 >> 2) * 0x20 + iVar3;\n      }\n      puVar6 = puVar6 + 1;\n      if (puVar2 + iVar3 == puVar6) break;\n      uVar5 = *puVar6;\n    }\n    return iVar3 * 0x20;\n  }\n  if (puVar2 != puVar6) {\n    if (puVar6[-1] != 0) goto LAB_00031ce0;\n    if (puVar2 != puVar6 + -1) {\n      puVar4 = puVar6 + -2;\n      uVar1 = puVar6[-2];\n      while (uVar1 == 0) {\n        if (puVar2 == puVar4) goto LAB_00031cdd;\n        puVar4 = puVar4 + -1;\n        uVar1 = *puVar4;\n      }\n      goto LAB_00031ce0;\n    }\n  }\nLAB_00031cdd:\n  uVar5 = uVar5 - 1;\nLAB_00031ce0:\n  uVar5 = -1 << ((byte)param_2 & 0x1f) & uVar5;\n  if (uVar5 == 0) {\n    if (puVar2 + iVar3 == puVar6 + 1) {\n      return 0xffffffff;\n    }\n    uVar5 = puVar6[1];\n    puVar6 = puVar6 + 1;\n    while (uVar5 == 0) {\n      puVar6 = puVar6 + 1;\n      uVar5 = *puVar6;\n    }\n  }\n  iVar3 = 0;\n  for (; (uVar5 & 1) == 0; uVar5 = uVar5 >> 1 | 0x80000000) {\n    iVar3 = iVar3 + 1;\n  }\n  return ((int)puVar6 - (int)puVar2 >> 2) * 0x20 + iVar3;\n}" ({ "{") (declaration "uint uVar1;" (type_identifier "uint") (identifier "uVar1") (; ";")) (declaration "uint *puVar2;" (type_identifier "uint") (pointer_declarator "*puVar2" (* "*") (identifier "puVar2")) (; ";")) (declaration "int iVar3;" (primitive_type "int") (identifier "iVar3") (; ";")) (declaration "uint *puVar4;" (type_identifier "uint") (pointer_declarator "*puVar4" (* "*") (identifier "puVar4")) (; ";")) (declaration "uint uVar5;" (type_identifier "uint") (identifier "uVar5") (; ";")) (declaration "uint *puVar6;" (type_identifier "uint") (pointer_declarator "*puVar6" (* "*") (identifier "puVar6")) (; ";")) (expression_statement "uVar1 = *(uint *)(param_1 + 4);" (assignment_expression "uVar1 = *(uint *)(param_1 + 4)" (identifier "uVar1") (= "=") (pointer_expression "*(uint *)(param_1 + 4)" (* "*") (cast_expression "(uint *)(param_1 + 4)" (( "(") (type_descriptor "uint *" (type_identifier "uint") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 4)" (( "(") (binary_expression "param_1 + 4" (identifier "param_1") (+ "+") (number_literal "4")) () ")"))))) (; ";")) (expression_statement "iVar3 = ((int)uVar1 >> 0x1f ^ uVar1) - ((int)uVar1 >> 0x1f);" (assignment_expression "iVar3 = ((int)uVar1 >> 0x1f ^ uVar1) - ((int)uVar1 >> 0x1f)" (identifier "iVar3") (= "=") (binary_expression "((int)uVar1 >> 0x1f ^ uVar1) - ((int)uVar1 >> 0x1f)" (parenthesized_expression "((int)uVar1 >> 0x1f ^ uVar1)" (( "(") (binary_expression "(int)uVar1 >> 0x1f ^ uVar1" (binary_expression "(int)uVar1 >> 0x1f" (cast_expression "(int)uVar1" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "uVar1")) (>> ">>") (number_literal "0x1f")) (^ "^") (identifier "uVar1")) () ")")) (- "-") (parenthesized_expression "((int)uVar1 >> 0x1f)" (( "(") (binary_expression "(int)uVar1 >> 0x1f" (cast_expression "(int)uVar1" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "uVar1")) (>> ">>") (number_literal "0x1f")) () ")")))) (; ";")) (if_statement "if (iVar3 <= (int)(param_2 >> 5)) {\n    if ((int)uVar1 < 0) {\n      return 0xffffffff;\n    }\n    return param_2;\n  }" (if "if") (parenthesized_expression "(iVar3 <= (int)(param_2 >> 5))" (( "(") (binary_expression "iVar3 <= (int)(param_2 >> 5)" (identifier "iVar3") (<= "<=") (cast_expression "(int)(param_2 >> 5)" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (parenthesized_expression "(param_2 >> 5)" (( "(") (binary_expression "param_2 >> 5" (identifier "param_2") (>> ">>") (number_literal "5")) () ")")))) () ")")) (compound_statement "{\n    if ((int)uVar1 < 0) {\n      return 0xffffffff;\n    }\n    return param_2;\n  }" ({ "{") (if_statement "if ((int)uVar1 < 0) {\n      return 0xffffffff;\n    }" (if "if") (parenthesized_expression "((int)uVar1 < 0)" (( "(") (binary_expression "(int)uVar1 < 0" (cast_expression "(int)uVar1" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "uVar1")) (< "<") (number_literal "0")) () ")")) (compound_statement "{\n      return 0xffffffff;\n    }" ({ "{") (return_statement "return 0xffffffff;" (return "return") (number_literal "0xffffffff") (; ";")) (} "}"))) (return_statement "return param_2;" (return "return") (identifier "param_2") (; ";")) (} "}"))) (expression_statement "puVar2 = *(uint **)(param_1 + 8);" (assignment_expression "puVar2 = *(uint **)(param_1 + 8)" (identifier "puVar2") (= "=") (pointer_expression "*(uint **)(param_1 + 8)" (* "*") (cast_expression "(uint **)(param_1 + 8)" (( "(") (type_descriptor "uint **" (type_identifier "uint") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(param_1 + 8)" (( "(") (binary_expression "param_1 + 8" (identifier "param_1") (+ "+") (number_literal "8")) () ")"))))) (; ";")) (expression_statement "puVar6 = puVar2 + (param_2 >> 5);" (assignment_expression "puVar6 = puVar2 + (param_2 >> 5)" (identifier "puVar6") (= "=") (binary_expression "puVar2 + (param_2 >> 5)" (identifier "puVar2") (+ "+") (parenthesized_expression "(param_2 >> 5)" (( "(") (binary_expression "param_2 >> 5" (identifier "param_2") (>> ">>") (number_literal "5")) () ")")))) (; ";")) (expression_statement "uVar5 = *puVar6;" (assignment_expression "uVar5 = *puVar6" (identifier "uVar5") (= "=") (pointer_expression "*puVar6" (* "*") (identifier "puVar6"))) (; ";")) (if_statement "if (-1 < (int)uVar1) {\n    uVar5 = (1 << ((byte)param_2 & 0x1f)) - 1U | uVar5;\n    while( true ) {\n      if (uVar5 != 0xffffffff) {\n        iVar3 = 0;\n        for (uVar5 = ~uVar5; (uVar5 & 1) == 0; uVar5 = uVar5 >> 1 | 0x80000000) {\n          iVar3 = iVar3 + 1;\n        }\n        return ((int)puVar6 - (int)puVar2 >> 2) * 0x20 + iVar3;\n      }\n      puVar6 = puVar6 + 1;\n      if (puVar2 + iVar3 == puVar6) break;\n      uVar5 = *puVar6;\n    }\n    return iVar3 * 0x20;\n  }" (if "if") (parenthesized_expression "(-1 < (int)uVar1)" (( "(") (binary_expression "-1 < (int)uVar1" (number_literal "-1") (< "<") (cast_expression "(int)uVar1" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "uVar1"))) () ")")) (compound_statement "{\n    uVar5 = (1 << ((byte)param_2 & 0x1f)) - 1U | uVar5;\n    while( true ) {\n      if (uVar5 != 0xffffffff) {\n        iVar3 = 0;\n        for (uVar5 = ~uVar5; (uVar5 & 1) == 0; uVar5 = uVar5 >> 1 | 0x80000000) {\n          iVar3 = iVar3 + 1;\n        }\n        return ((int)puVar6 - (int)puVar2 >> 2) * 0x20 + iVar3;\n      }\n      puVar6 = puVar6 + 1;\n      if (puVar2 + iVar3 == puVar6) break;\n      uVar5 = *puVar6;\n    }\n    return iVar3 * 0x20;\n  }" ({ "{") (expression_statement "uVar5 = (1 << ((byte)param_2 & 0x1f)) - 1U | uVar5;" (assignment_expression "uVar5 = (1 << ((byte)param_2 & 0x1f)) - 1U | uVar5" (identifier "uVar5") (= "=") (binary_expression "(1 << ((byte)param_2 & 0x1f)) - 1U | uVar5" (binary_expression "(1 << ((byte)param_2 & 0x1f)) - 1U" (parenthesized_expression "(1 << ((byte)param_2 & 0x1f))" (( "(") (binary_expression "1 << ((byte)param_2 & 0x1f)" (number_literal "1") (<< "<<") (parenthesized_expression "((byte)param_2 & 0x1f)" (( "(") (binary_expression "(byte)param_2 & 0x1f" (cast_expression "(byte)param_2" (( "(") (type_descriptor "byte" (type_identifier "byte")) () ")") (identifier "param_2")) (& "&") (number_literal "0x1f")) () ")"))) () ")")) (- "-") (number_literal "1U")) (| "|") (identifier "uVar5"))) (; ";")) (while_statement "while( true ) {\n      if (uVar5 != 0xffffffff) {\n        iVar3 = 0;\n        for (uVar5 = ~uVar5; (uVar5 & 1) == 0; uVar5 = uVar5 >> 1 | 0x80000000) {\n          iVar3 = iVar3 + 1;\n        }\n        return ((int)puVar6 - (int)puVar2 >> 2) * 0x20 + iVar3;\n      }\n      puVar6 = puVar6 + 1;\n      if (puVar2 + iVar3 == puVar6) break;\n      uVar5 = *puVar6;\n    }" (while "while") (parenthesized_expression "( true )" (( "(") (true "true") () ")")) (compound_statement "{\n      if (uVar5 != 0xffffffff) {\n        iVar3 = 0;\n        for (uVar5 = ~uVar5; (uVar5 & 1) == 0; uVar5 = uVar5 >> 1 | 0x80000000) {\n          iVar3 = iVar3 + 1;\n        }\n        return ((int)puVar6 - (int)puVar2 >> 2) * 0x20 + iVar3;\n      }\n      puVar6 = puVar6 + 1;\n      if (puVar2 + iVar3 == puVar6) break;\n      uVar5 = *puVar6;\n    }" ({ "{") (if_statement "if (uVar5 != 0xffffffff) {\n        iVar3 = 0;\n        for (uVar5 = ~uVar5; (uVar5 & 1) == 0; uVar5 = uVar5 >> 1 | 0x80000000) {\n          iVar3 = iVar3 + 1;\n        }\n        return ((int)puVar6 - (int)puVar2 >> 2) * 0x20 + iVar3;\n      }" (if "if") (parenthesized_expression "(uVar5 != 0xffffffff)" (( "(") (binary_expression "uVar5 != 0xffffffff" (identifier "uVar5") (!= "!=") (number_literal "0xffffffff")) () ")")) (compound_statement "{\n        iVar3 = 0;\n        for (uVar5 = ~uVar5; (uVar5 & 1) == 0; uVar5 = uVar5 >> 1 | 0x80000000) {\n          iVar3 = iVar3 + 1;\n        }\n        return ((int)puVar6 - (int)puVar2 >> 2) * 0x20 + iVar3;\n      }" ({ "{") (expression_statement "iVar3 = 0;" (assignment_expression "iVar3 = 0" (identifier "iVar3") (= "=") (number_literal "0")) (; ";")) (for_statement "for (uVar5 = ~uVar5; (uVar5 & 1) == 0; uVar5 = uVar5 >> 1 | 0x80000000) {\n          iVar3 = iVar3 + 1;\n        }" (for "for") (( "(") (assignment_expression "uVar5 = ~uVar5" (identifier "uVar5") (= "=") (unary_expression "~uVar5" (~ "~") (identifier "uVar5"))) (; ";") (binary_expression "(uVar5 & 1) == 0" (parenthesized_expression "(uVar5 & 1)" (( "(") (binary_expression "uVar5 & 1" (identifier "uVar5") (& "&") (number_literal "1")) () ")")) (== "==") (number_literal "0")) (; ";") (assignment_expression "uVar5 = uVar5 >> 1 | 0x80000000" (identifier "uVar5") (= "=") (binary_expression "uVar5 >> 1 | 0x80000000" (binary_expression "uVar5 >> 1" (identifier "uVar5") (>> ">>") (number_literal "1")) (| "|") (number_literal "0x80000000"))) () ")") (compound_statement "{\n          iVar3 = iVar3 + 1;\n        }" ({ "{") (expression_statement "iVar3 = iVar3 + 1;" (assignment_expression "iVar3 = iVar3 + 1" (identifier "iVar3") (= "=") (binary_expression "iVar3 + 1" (identifier "iVar3") (+ "+") (number_literal "1"))) (; ";")) (} "}"))) (return_statement "return ((int)puVar6 - (int)puVar2 >> 2) * 0x20 + iVar3;" (return "return") (binary_expression "((int)puVar6 - (int)puVar2 >> 2) * 0x20 + iVar3" (binary_expression "((int)puVar6 - (int)puVar2 >> 2) * 0x20" (parenthesized_expression "((int)puVar6 - (int)puVar2 >> 2)" (( "(") (binary_expression "(int)puVar6 - (int)puVar2 >> 2" (binary_expression "(int)puVar6 - (int)puVar2" (cast_expression "(int)puVar6" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "puVar6")) (- "-") (cast_expression "(int)puVar2" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "puVar2"))) (>> ">>") (number_literal "2")) () ")")) (* "*") (number_literal "0x20")) (+ "+") (identifier "iVar3")) (; ";")) (} "}"))) (expression_statement "puVar6 = puVar6 + 1;" (assignment_expression "puVar6 = puVar6 + 1" (identifier "puVar6") (= "=") (binary_expression "puVar6 + 1" (identifier "puVar6") (+ "+") (number_literal "1"))) (; ";")) (if_statement "if (puVar2 + iVar3 == puVar6) break;" (if "if") (parenthesized_expression "(puVar2 + iVar3 == puVar6)" (( "(") (binary_expression "puVar2 + iVar3 == puVar6" (binary_expression "puVar2 + iVar3" (identifier "puVar2") (+ "+") (identifier "iVar3")) (== "==") (identifier "puVar6")) () ")")) (break_statement "break;" (break "break") (; ";"))) (expression_statement "uVar5 = *puVar6;" (assignment_expression "uVar5 = *puVar6" (identifier "uVar5") (= "=") (pointer_expression "*puVar6" (* "*") (identifier "puVar6"))) (; ";")) (} "}"))) (return_statement "return iVar3 * 0x20;" (return "return") (binary_expression "iVar3 * 0x20" (identifier "iVar3") (* "*") (number_literal "0x20")) (; ";")) (} "}"))) (if_statement "if (puVar2 != puVar6) {\n    if (puVar6[-1] != 0) goto LAB_00031ce0;\n    if (puVar2 != puVar6 + -1) {\n      puVar4 = puVar6 + -2;\n      uVar1 = puVar6[-2];\n      while (uVar1 == 0) {\n        if (puVar2 == puVar4) goto LAB_00031cdd;\n        puVar4 = puVar4 + -1;\n        uVar1 = *puVar4;\n      }\n      goto LAB_00031ce0;\n    }\n  }" (if "if") (parenthesized_expression "(puVar2 != puVar6)" (( "(") (binary_expression "puVar2 != puVar6" (identifier "puVar2") (!= "!=") (identifier "puVar6")) () ")")) (compound_statement "{\n    if (puVar6[-1] != 0) goto LAB_00031ce0;\n    if (puVar2 != puVar6 + -1) {\n      puVar4 = puVar6 + -2;\n      uVar1 = puVar6[-2];\n      while (uVar1 == 0) {\n        if (puVar2 == puVar4) goto LAB_00031cdd;\n        puVar4 = puVar4 + -1;\n        uVar1 = *puVar4;\n      }\n      goto LAB_00031ce0;\n    }\n  }" ({ "{") (if_statement "if (puVar6[-1] != 0) goto LAB_00031ce0;" (if "if") (parenthesized_expression "(puVar6[-1] != 0)" (( "(") (binary_expression "puVar6[-1] != 0" (subscript_expression "puVar6[-1]" (identifier "puVar6") ([ "[") (number_literal "-1") (] "]")) (!= "!=") (number_literal "0")) () ")")) (goto_statement "goto LAB_00031ce0;" (goto "goto") (statement_identifier "LAB_00031ce0") (; ";"))) (if_statement "if (puVar2 != puVar6 + -1) {\n      puVar4 = puVar6 + -2;\n      uVar1 = puVar6[-2];\n      while (uVar1 == 0) {\n        if (puVar2 == puVar4) goto LAB_00031cdd;\n        puVar4 = puVar4 + -1;\n        uVar1 = *puVar4;\n      }\n      goto LAB_00031ce0;\n    }" (if "if") (parenthesized_expression "(puVar2 != puVar6 + -1)" (( "(") (binary_expression "puVar2 != puVar6 + -1" (identifier "puVar2") (!= "!=") (binary_expression "puVar6 + -1" (identifier "puVar6") (+ "+") (number_literal "-1"))) () ")")) (compound_statement "{\n      puVar4 = puVar6 + -2;\n      uVar1 = puVar6[-2];\n      while (uVar1 == 0) {\n        if (puVar2 == puVar4) goto LAB_00031cdd;\n        puVar4 = puVar4 + -1;\n        uVar1 = *puVar4;\n      }\n      goto LAB_00031ce0;\n    }" ({ "{") (expression_statement "puVar4 = puVar6 + -2;" (assignment_expression "puVar4 = puVar6 + -2" (identifier "puVar4") (= "=") (binary_expression "puVar6 + -2" (identifier "puVar6") (+ "+") (number_literal "-2"))) (; ";")) (expression_statement "uVar1 = puVar6[-2];" (assignment_expression "uVar1 = puVar6[-2]" (identifier "uVar1") (= "=") (subscript_expression "puVar6[-2]" (identifier "puVar6") ([ "[") (number_literal "-2") (] "]"))) (; ";")) (while_statement "while (uVar1 == 0) {\n        if (puVar2 == puVar4) goto LAB_00031cdd;\n        puVar4 = puVar4 + -1;\n        uVar1 = *puVar4;\n      }" (while "while") (parenthesized_expression "(uVar1 == 0)" (( "(") (binary_expression "uVar1 == 0" (identifier "uVar1") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n        if (puVar2 == puVar4) goto LAB_00031cdd;\n        puVar4 = puVar4 + -1;\n        uVar1 = *puVar4;\n      }" ({ "{") (if_statement "if (puVar2 == puVar4) goto LAB_00031cdd;" (if "if") (parenthesized_expression "(puVar2 == puVar4)" (( "(") (binary_expression "puVar2 == puVar4" (identifier "puVar2") (== "==") (identifier "puVar4")) () ")")) (goto_statement "goto LAB_00031cdd;" (goto "goto") (statement_identifier "LAB_00031cdd") (; ";"))) (expression_statement "puVar4 = puVar4 + -1;" (assignment_expression "puVar4 = puVar4 + -1" (identifier "puVar4") (= "=") (binary_expression "puVar4 + -1" (identifier "puVar4") (+ "+") (number_literal "-1"))) (; ";")) (expression_statement "uVar1 = *puVar4;" (assignment_expression "uVar1 = *puVar4" (identifier "uVar1") (= "=") (pointer_expression "*puVar4" (* "*") (identifier "puVar4"))) (; ";")) (} "}"))) (goto_statement "goto LAB_00031ce0;" (goto "goto") (statement_identifier "LAB_00031ce0") (; ";")) (} "}"))) (} "}"))) (labeled_statement "LAB_00031cdd:\n  uVar5 = uVar5 - 1;" (statement_identifier "LAB_00031cdd") (: ":") (expression_statement "uVar5 = uVar5 - 1;" (assignment_expression "uVar5 = uVar5 - 1" (identifier "uVar5") (= "=") (binary_expression "uVar5 - 1" (identifier "uVar5") (- "-") (number_literal "1"))) (; ";"))) (labeled_statement "LAB_00031ce0:\n  uVar5 = -1 << ((byte)param_2 & 0x1f) & uVar5;" (statement_identifier "LAB_00031ce0") (: ":") (expression_statement "uVar5 = -1 << ((byte)param_2 & 0x1f) & uVar5;" (assignment_expression "uVar5 = -1 << ((byte)param_2 & 0x1f) & uVar5" (identifier "uVar5") (= "=") (binary_expression "-1 << ((byte)param_2 & 0x1f) & uVar5" (binary_expression "-1 << ((byte)param_2 & 0x1f)" (number_literal "-1") (<< "<<") (parenthesized_expression "((byte)param_2 & 0x1f)" (( "(") (binary_expression "(byte)param_2 & 0x1f" (cast_expression "(byte)param_2" (( "(") (type_descriptor "byte" (type_identifier "byte")) () ")") (identifier "param_2")) (& "&") (number_literal "0x1f")) () ")"))) (& "&") (identifier "uVar5"))) (; ";"))) (if_statement "if (uVar5 == 0) {\n    if (puVar2 + iVar3 == puVar6 + 1) {\n      return 0xffffffff;\n    }\n    uVar5 = puVar6[1];\n    puVar6 = puVar6 + 1;\n    while (uVar5 == 0) {\n      puVar6 = puVar6 + 1;\n      uVar5 = *puVar6;\n    }\n  }" (if "if") (parenthesized_expression "(uVar5 == 0)" (( "(") (binary_expression "uVar5 == 0" (identifier "uVar5") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n    if (puVar2 + iVar3 == puVar6 + 1) {\n      return 0xffffffff;\n    }\n    uVar5 = puVar6[1];\n    puVar6 = puVar6 + 1;\n    while (uVar5 == 0) {\n      puVar6 = puVar6 + 1;\n      uVar5 = *puVar6;\n    }\n  }" ({ "{") (if_statement "if (puVar2 + iVar3 == puVar6 + 1) {\n      return 0xffffffff;\n    }" (if "if") (parenthesized_expression "(puVar2 + iVar3 == puVar6 + 1)" (( "(") (binary_expression "puVar2 + iVar3 == puVar6 + 1" (binary_expression "puVar2 + iVar3" (identifier "puVar2") (+ "+") (identifier "iVar3")) (== "==") (binary_expression "puVar6 + 1" (identifier "puVar6") (+ "+") (number_literal "1"))) () ")")) (compound_statement "{\n      return 0xffffffff;\n    }" ({ "{") (return_statement "return 0xffffffff;" (return "return") (number_literal "0xffffffff") (; ";")) (} "}"))) (expression_statement "uVar5 = puVar6[1];" (assignment_expression "uVar5 = puVar6[1]" (identifier "uVar5") (= "=") (subscript_expression "puVar6[1]" (identifier "puVar6") ([ "[") (number_literal "1") (] "]"))) (; ";")) (expression_statement "puVar6 = puVar6 + 1;" (assignment_expression "puVar6 = puVar6 + 1" (identifier "puVar6") (= "=") (binary_expression "puVar6 + 1" (identifier "puVar6") (+ "+") (number_literal "1"))) (; ";")) (while_statement "while (uVar5 == 0) {\n      puVar6 = puVar6 + 1;\n      uVar5 = *puVar6;\n    }" (while "while") (parenthesized_expression "(uVar5 == 0)" (( "(") (binary_expression "uVar5 == 0" (identifier "uVar5") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n      puVar6 = puVar6 + 1;\n      uVar5 = *puVar6;\n    }" ({ "{") (expression_statement "puVar6 = puVar6 + 1;" (assignment_expression "puVar6 = puVar6 + 1" (identifier "puVar6") (= "=") (binary_expression "puVar6 + 1" (identifier "puVar6") (+ "+") (number_literal "1"))) (; ";")) (expression_statement "uVar5 = *puVar6;" (assignment_expression "uVar5 = *puVar6" (identifier "uVar5") (= "=") (pointer_expression "*puVar6" (* "*") (identifier "puVar6"))) (; ";")) (} "}"))) (} "}"))) (expression_statement "iVar3 = 0;" (assignment_expression "iVar3 = 0" (identifier "iVar3") (= "=") (number_literal "0")) (; ";")) (for_statement "for (; (uVar5 & 1) == 0; uVar5 = uVar5 >> 1 | 0x80000000) {\n    iVar3 = iVar3 + 1;\n  }" (for "for") (( "(") (; ";") (binary_expression "(uVar5 & 1) == 0" (parenthesized_expression "(uVar5 & 1)" (( "(") (binary_expression "uVar5 & 1" (identifier "uVar5") (& "&") (number_literal "1")) () ")")) (== "==") (number_literal "0")) (; ";") (assignment_expression "uVar5 = uVar5 >> 1 | 0x80000000" (identifier "uVar5") (= "=") (binary_expression "uVar5 >> 1 | 0x80000000" (binary_expression "uVar5 >> 1" (identifier "uVar5") (>> ">>") (number_literal "1")) (| "|") (number_literal "0x80000000"))) () ")") (compound_statement "{\n    iVar3 = iVar3 + 1;\n  }" ({ "{") (expression_statement "iVar3 = iVar3 + 1;" (assignment_expression "iVar3 = iVar3 + 1" (identifier "iVar3") (= "=") (binary_expression "iVar3 + 1" (identifier "iVar3") (+ "+") (number_literal "1"))) (; ";")) (} "}"))) (return_statement "return ((int)puVar6 - (int)puVar2 >> 2) * 0x20 + iVar3;" (return "return") (binary_expression "((int)puVar6 - (int)puVar2 >> 2) * 0x20 + iVar3" (binary_expression "((int)puVar6 - (int)puVar2 >> 2) * 0x20" (parenthesized_expression "((int)puVar6 - (int)puVar2 >> 2)" (( "(") (binary_expression "(int)puVar6 - (int)puVar2 >> 2" (binary_expression "(int)puVar6 - (int)puVar2" (cast_expression "(int)puVar6" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "puVar6")) (- "-") (cast_expression "(int)puVar2" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "puVar2"))) (>> ">>") (number_literal "2")) () ")")) (* "*") (number_literal "0x20")) (+ "+") (identifier "iVar3")) (; ";")) (} "}")))

type_1 function_1(type_2 u,type_1 var_3)

{
  type_3 var_1;
  type_3 *var_4;
  int var_2;
  type_3 *var_7;
  type_3 var_5;
  type_3 *var_6;
  
  var_1 = u->_mp_size;
  var_2 = ((int)var_1 >> 0x1f ^ var_1) - ((int)var_1 >> 0x1f);
  if (var_2 <= (int)(var_3 >> 5)) {
    if ((int)var_1 < 0) {
      return 0xffffffff;
    }
    return var_3;
  }
  var_4 = u->_mp_d;
  var_6 = var_4 + (var_3 >> 5);
  var_5 = *var_6;
  if (-1 < (int)var_1) {
    var_5 = (1 << ((type_4)var_3 & 0x1f)) - 1U | var_5;
    while( true ) {
      if (var_5 != 0xffffffff) {
        var_2 = 0;
        for (var_5 = ~var_5; (var_5 & 1) == 0; var_5 = var_5 >> 1 | 0x80000000) {
          var_2 = var_2 + 1;
        }
        return ((int)var_6 - (int)var_4 >> 2) * 0x20 + var_2;
      }
      var_6 = var_6 + 1;
      if (var_4 + var_2 == var_6) break;
      var_5 = *var_6;
    }
    return var_2 * 0x20;
  }
  if (var_4 != var_6) {
    if (var_6[-1] != 0) goto LAB_00031ce0;
    if (var_4 != var_6 + -1) {
      var_7 = var_6 + -2;
      var_1 = var_6[-2];
      while (var_1 == 0) {
        if (var_4 == var_7) goto LAB_00031cdd;
        var_7 = var_7 + -1;
        var_1 = *var_7;
      }
      goto LAB_00031ce0;
    }
  }
LAB_00031cdd:
  var_5 = var_5 - 1;
LAB_00031ce0:
  var_5 = -1 << ((type_4)var_3 & 0x1f) & var_5;
  if (var_5 == 0) {
    if (var_4 + var_2 == var_6 + 1) {
      return 0xffffffff;
    }
    var_5 = var_6[1];
    var_6 = var_6 + 1;
    while (var_5 == 0) {
      var_6 = var_6 + 1;
      var_5 = *var_6;
    }
  }
  var_2 = 0;
  for (; (var_5 & 1) == 0; var_5 = var_5 >> 1 | 0x80000000) {
    var_2 = var_2 + 1;
  }
  return ((int)var_6 - (int)var_4 >> 2) * 0x20 + var_2;
}


(translation_unit (function_definition type: (type_identifier) declarator: (function_declarator declarator: (identifier) parameters: (parameter_list (parameter_declaration type: (primitive_type) declarator: (identifier)) (parameter_declaration type: (type_identifier) declarator: (identifier)))) body: (compound_statement (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (type_identifier) declarator: (pointer_declarator declarator: (identifier))) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (type_identifier) declarator: (pointer_declarator declarator: (identifier))) (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (type_identifier) declarator: (pointer_declarator declarator: (identifier))) (expression_statement (assignment_expression left: (identifier) right: (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (parenthesized_expression (binary_expression left: (binary_expression left: (cast_expression type: (type_descriptor type: (primitive_type)) value: (identifier)) right: (number_literal)) right: (identifier))) right: (parenthesized_expression (binary_expression left: (cast_expression type: (type_descriptor type: (primitive_type)) value: (identifier)) right: (number_literal)))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (primitive_type)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal)))))) consequence: (compound_statement (if_statement condition: (parenthesized_expression (binary_expression left: (cast_expression type: (type_descriptor type: (primitive_type)) value: (identifier)) right: (number_literal))) consequence: (compound_statement (return_statement (number_literal)))) (return_statement (identifier)))) (expression_statement (assignment_expression left: (identifier) right: (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator declarator: (abstract_pointer_declarator))) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal)))))) (expression_statement (assignment_expression left: (identifier) right: (pointer_expression argument: (identifier)))) (if_statement condition: (parenthesized_expression (binary_expression left: (number_literal) right: (cast_expression type: (type_descriptor type: (primitive_type)) value: (identifier)))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (binary_expression left: (parenthesized_expression (binary_expression left: (number_literal) right: (parenthesized_expression (binary_expression left: (cast_expression type: (type_descriptor type: (type_identifier)) value: (identifier)) right: (number_literal))))) right: (number_literal)) right: (identifier)))) (while_statement condition: (parenthesized_expression (true)) body: (compound_statement (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (number_literal))) (for_statement initializer: (assignment_expression left: (identifier) right: (unary_expression argument: (identifier))) condition: (binary_expression left: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) right: (number_literal)) update: (assignment_expression left: (identifier) right: (binary_expression left: (binary_expression left: (identifier) right: (number_literal)) right: (number_literal))) body: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal)))))) (return_statement (binary_expression left: (binary_expression left: (parenthesized_expression (binary_expression left: (binary_expression left: (cast_expression type: (type_descriptor type: (primitive_type)) value: (identifier)) right: (cast_expression type: (type_descriptor type: (primitive_type)) value: (identifier))) right: (number_literal))) right: (number_literal)) right: (identifier))))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal)))) (if_statement condition: (parenthesized_expression (binary_expression left: (binary_expression left: (identifier) right: (identifier)) right: (identifier))) consequence: (break_statement)) (expression_statement (assignment_expression left: (identifier) right: (pointer_expression argument: (identifier)))))) (return_statement (binary_expression left: (identifier) right: (number_literal))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))) consequence: (compound_statement (if_statement condition: (parenthesized_expression (binary_expression left: (subscript_expression argument: (identifier) index: (number_literal)) right: (number_literal))) consequence: (goto_statement label: (statement_identifier))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal)))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal)))) (expression_statement (assignment_expression left: (identifier) right: (subscript_expression argument: (identifier) index: (number_literal)))) (while_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) body: (compound_statement (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))) consequence: (goto_statement label: (statement_identifier))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal)))) (expression_statement (assignment_expression left: (identifier) right: (pointer_expression argument: (identifier)))))) (goto_statement label: (statement_identifier)))))) (labeled_statement label: (statement_identifier) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal))))) (labeled_statement label: (statement_identifier) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (binary_expression left: (number_literal) right: (parenthesized_expression (binary_expression left: (cast_expression type: (type_descriptor type: (type_identifier)) value: (identifier)) right: (number_literal)))) right: (identifier))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (if_statement condition: (parenthesized_expression (binary_expression left: (binary_expression left: (identifier) right: (identifier)) right: (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: (binary_expression left: (identifier) right: (number_literal)))) (while_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) body: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal)))) (expression_statement (assignment_expression left: (identifier) right: (pointer_expression argument: (identifier)))))))) (expression_statement (assignment_expression left: (identifier) right: (number_literal))) (for_statement condition: (binary_expression left: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) right: (number_literal)) update: (assignment_expression left: (identifier) right: (binary_expression left: (binary_expression left: (identifier) right: (number_literal)) right: (number_literal))) body: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal)))))) (return_statement (binary_expression left: (binary_expression left: (parenthesized_expression (binary_expression left: (binary_expression left: (cast_expression type: (type_descriptor type: (primitive_type)) value: (identifier)) right: (cast_expression type: (type_descriptor type: (primitive_type)) value: (identifier))) right: (number_literal))) right: (number_literal)) right: (identifier))))))

uint MASKED(int param_1,uint param_2)

{
  uint uVar1;
  uint *puVar2;
  int iVar3;
  uint *puVar4;
  uint uVar5;
  uint *puVar6;
  
  uVar1 = *(uint *)(param_1 + 4);
  iVar3 = ((int)uVar1 >> 0x1f ^ uVar1) - ((int)uVar1 >> 0x1f);
  if (iVar3 <= (int)(param_2 >> 5)) {
    if ((int)uVar1 < 0) {
      return 0xffffffff;
    }
    return param_2;
  }
  puVar2 = *(uint **)(param_1 + 8);
  puVar6 = puVar2 + (param_2 >> 5);
  uVar5 = *puVar6;
  if (-1 < (int)uVar1) {
    uVar5 = (1 << ((byte)param_2 & 0x1f)) - 1U | uVar5;
    while( true ) {
      if (uVar5 != 0xffffffff) {
        iVar3 = 0;
        for (uVar5 = ~uVar5; (uVar5 & 1) == 0; uVar5 = uVar5 >> 1 | 0x80000000) {
          iVar3 = iVar3 + 1;
        }
        return ((int)puVar6 - (int)puVar2 >> 2) * 0x20 + iVar3;
      }
      puVar6 = puVar6 + 1;
      if (puVar2 + iVar3 == puVar6) break;
      uVar5 = *puVar6;
    }
    return iVar3 * 0x20;
  }
  if (puVar2 != puVar6) {
    if (puVar6[-1] != 0) goto LAB_00031ce0;
    if (puVar2 != puVar6 + -1) {
      puVar4 = puVar6 + -2;
      uVar1 = puVar6[-2];
      while (uVar1 == 0) {
        if (puVar2 == puVar4) goto LAB_00031cdd;
        puVar4 = puVar4 + -1;
        uVar1 = *puVar4;
      }
      goto LAB_00031ce0;
    }
  }
LAB_00031cdd:
  uVar5 = uVar5 - 1;
LAB_00031ce0:
  uVar5 = -1 << ((byte)param_2 & 0x1f) & uVar5;
  if (uVar5 == 0) {
    if (puVar2 + iVar3 == puVar6 + 1) {
      return 0xffffffff;
    }
    uVar5 = puVar6[1];
    puVar6 = puVar6 + 1;
    while (uVar5 == 0) {
      puVar6 = puVar6 + 1;
      uVar5 = *puVar6;
    }
  }
  iVar3 = 0;
  for (; (uVar5 & 1) == 0; uVar5 = uVar5 >> 1 | 0x80000000) {
    iVar3 = iVar3 + 1;
  }
  return ((int)puVar6 - (int)puVar2 >> 2) * 0x20 + iVar3;
}

