
int __gmpz_tstbit(mpz_srcptr u,mp_bitcnt_t bit_index)

{
  ulong *puVar1;
  ulong *puVar2;
  ulong uVar3;
  byte bVar4;
  ulong *puVar5;
  ulong uVar6;
  
  uVar6 = (ulong)u->_mp_size;
  if ((long)(((long)uVar6 >> 0x3f ^ uVar6) - ((long)uVar6 >> 0x3f)) <= (long)(bit_index >> 6)) {
    return (uint)(u->_mp_size >> 0x1f) >> 0x1f;
  }
  puVar2 = u->_mp_d;
  puVar1 = puVar2 + (bit_index >> 6);
  uVar3 = *puVar1;
  bVar4 = (byte)bit_index;
  if (-1 < (long)uVar6) {
    return (uint)(uVar3 >> (bVar4 & 0x3f)) & 1;
  }
  if (puVar2 != puVar1) {
    if (puVar1[-1] == 0) {
      if (puVar1 + -1 == puVar2) goto LAB_001260df;
      puVar5 = puVar1 + -2;
      uVar6 = puVar1[-2];
      while (uVar6 == 0) {
        if (puVar2 == puVar5) goto LAB_001260df;
        puVar5 = puVar5 + -1;
        uVar6 = *puVar5;
      }
    }
    return (uint)(~uVar3 >> (bVar4 & 0x3f)) & 1;
  }
LAB_001260df:
  return (uint)(-uVar3 >> (bVar4 & 0x3f)) & 1;
}



ulong __gmpz_tstbit(long param_1,ulong param_2)

{
  ulong *puVar1;
  ulong *puVar2;
  ulong uVar3;
  byte bVar4;
  ulong *puVar5;
  ulong uVar6;
  
  uVar6 = (ulong)*(int *)(param_1 + 4);
  if ((long)(((long)uVar6 >> 0x3f ^ uVar6) - ((long)uVar6 >> 0x3f)) <= (long)(param_2 >> 6)) {
    return uVar6 >> 0x3f;
  }
  puVar2 = *(ulong **)(param_1 + 8);
  puVar1 = puVar2 + (param_2 >> 6);
  uVar3 = *puVar1;
  bVar4 = (byte)param_2;
  if (-1 < (long)uVar6) {
    return (ulong)((uint)(uVar3 >> (bVar4 & 0x3f)) & 1);
  }
  if (puVar2 != puVar1) {
    if (puVar1[-1] == 0) {
      if (puVar1 + -1 == puVar2) goto LAB_001260df;
      puVar5 = puVar1 + -2;
      uVar6 = puVar1[-2];
      while (uVar6 == 0) {
        if (puVar2 == puVar5) goto LAB_001260df;
        puVar5 = puVar5 + -1;
        uVar6 = *puVar5;
      }
    }
    return (ulong)((uint)(~uVar3 >> (bVar4 & 0x3f)) & 1);
  }
LAB_001260df:
  return (ulong)((uint)(-uVar3 >> (bVar4 & 0x3f)) & 1);
}


MOVSXD R8,dword ptr [RDI + 0x4]
MOV RCX,RSI
SHR RCX,0x6
MOV RAX,R8
SAR RAX,0x3f
MOV RDX,RAX
XOR RDX,R8
SUB RDX,RAX
CMP RDX,RCX
JLE 0x001260f0
MOV RDI,qword ptr [RDI + 0x8]
LEA RCX,[RDI + RCX*0x8]
MOV RAX,qword ptr [RCX]
TEST R8,R8
JS 0x001260a0
MOV ECX,ESI
SHR RAX,CL
AND EAX,0x1
RET
MOV R8,RAX
NEG R8
CMP RDI,RCX
JZ 0x001260df
CMP qword ptr [RCX + -0x8],0x0
LEA RDX,[RCX + -0x8]
JNZ 0x00126100
CMP RDX,RDI
JZ 0x001260df
CMP qword ptr [RCX + -0x10],0x0
LEA RDX,[RCX + -0x10]
JZ 0x001260da
JMP 0x00126100
SUB RDX,0x8
CMP qword ptr [RDX],0x0
JNZ 0x00126100
CMP RDI,RDX
JNZ 0x001260d0
MOV RAX,R8
MOV ECX,ESI
SHR RAX,CL
AND EAX,0x1
RET
SHR R8,0x3f
MOV RAX,R8
RET
MOV ECX,ESI
NOT RAX
SHR RAX,CL
AND EAX,0x1
RET
(translation_unit "ulong __gmpz_tstbit(long param_1,ulong param_2)\n\n{\n  ulong *puVar1;\n  ulong *puVar2;\n  ulong uVar3;\n  byte bVar4;\n  ulong *puVar5;\n  ulong uVar6;\n  \n  uVar6 = (ulong)*(int *)(param_1 + 4);\n  if ((long)(((long)uVar6 >> 0x3f ^ uVar6) - ((long)uVar6 >> 0x3f)) <= (long)(param_2 >> 6)) {\n    return uVar6 >> 0x3f;\n  }\n  puVar2 = *(ulong **)(param_1 + 8);\n  puVar1 = puVar2 + (param_2 >> 6);\n  uVar3 = *puVar1;\n  bVar4 = (byte)param_2;\n  if (-1 < (long)uVar6) {\n    return (ulong)((uint)(uVar3 >> (bVar4 & 0x3f)) & 1);\n  }\n  if (puVar2 != puVar1) {\n    if (puVar1[-1] == 0) {\n      if (puVar1 + -1 == puVar2) goto LAB_001260df;\n      puVar5 = puVar1 + -2;\n      uVar6 = puVar1[-2];\n      while (uVar6 == 0) {\n        if (puVar2 == puVar5) goto LAB_001260df;\n        puVar5 = puVar5 + -1;\n        uVar6 = *puVar5;\n      }\n    }\n    return (ulong)((uint)(~uVar3 >> (bVar4 & 0x3f)) & 1);\n  }\nLAB_001260df:\n  return (ulong)((uint)(-uVar3 >> (bVar4 & 0x3f)) & 1);\n}\n\n" (function_definition "ulong __gmpz_tstbit(long param_1,ulong param_2)\n\n{\n  ulong *puVar1;\n  ulong *puVar2;\n  ulong uVar3;\n  byte bVar4;\n  ulong *puVar5;\n  ulong uVar6;\n  \n  uVar6 = (ulong)*(int *)(param_1 + 4);\n  if ((long)(((long)uVar6 >> 0x3f ^ uVar6) - ((long)uVar6 >> 0x3f)) <= (long)(param_2 >> 6)) {\n    return uVar6 >> 0x3f;\n  }\n  puVar2 = *(ulong **)(param_1 + 8);\n  puVar1 = puVar2 + (param_2 >> 6);\n  uVar3 = *puVar1;\n  bVar4 = (byte)param_2;\n  if (-1 < (long)uVar6) {\n    return (ulong)((uint)(uVar3 >> (bVar4 & 0x3f)) & 1);\n  }\n  if (puVar2 != puVar1) {\n    if (puVar1[-1] == 0) {\n      if (puVar1 + -1 == puVar2) goto LAB_001260df;\n      puVar5 = puVar1 + -2;\n      uVar6 = puVar1[-2];\n      while (uVar6 == 0) {\n        if (puVar2 == puVar5) goto LAB_001260df;\n        puVar5 = puVar5 + -1;\n        uVar6 = *puVar5;\n      }\n    }\n    return (ulong)((uint)(~uVar3 >> (bVar4 & 0x3f)) & 1);\n  }\nLAB_001260df:\n  return (ulong)((uint)(-uVar3 >> (bVar4 & 0x3f)) & 1);\n}" type_identifier (function_declarator "__gmpz_tstbit(long param_1,ulong param_2)" identifier (parameter_list "(long param_1,ulong param_2)" ( (parameter_declaration "long param_1" (sized_type_specifier "long" long) identifier) , (parameter_declaration "ulong param_2" type_identifier identifier) ))) (compound_statement "{\n  ulong *puVar1;\n  ulong *puVar2;\n  ulong uVar3;\n  byte bVar4;\n  ulong *puVar5;\n  ulong uVar6;\n  \n  uVar6 = (ulong)*(int *)(param_1 + 4);\n  if ((long)(((long)uVar6 >> 0x3f ^ uVar6) - ((long)uVar6 >> 0x3f)) <= (long)(param_2 >> 6)) {\n    return uVar6 >> 0x3f;\n  }\n  puVar2 = *(ulong **)(param_1 + 8);\n  puVar1 = puVar2 + (param_2 >> 6);\n  uVar3 = *puVar1;\n  bVar4 = (byte)param_2;\n  if (-1 < (long)uVar6) {\n    return (ulong)((uint)(uVar3 >> (bVar4 & 0x3f)) & 1);\n  }\n  if (puVar2 != puVar1) {\n    if (puVar1[-1] == 0) {\n      if (puVar1 + -1 == puVar2) goto LAB_001260df;\n      puVar5 = puVar1 + -2;\n      uVar6 = puVar1[-2];\n      while (uVar6 == 0) {\n        if (puVar2 == puVar5) goto LAB_001260df;\n        puVar5 = puVar5 + -1;\n        uVar6 = *puVar5;\n      }\n    }\n    return (ulong)((uint)(~uVar3 >> (bVar4 & 0x3f)) & 1);\n  }\nLAB_001260df:\n  return (ulong)((uint)(-uVar3 >> (bVar4 & 0x3f)) & 1);\n}" { (declaration "ulong *puVar1;" type_identifier (pointer_declarator "*puVar1" * identifier) ;) (declaration "ulong *puVar2;" type_identifier (pointer_declarator "*puVar2" * identifier) ;) (declaration "ulong uVar3;" type_identifier identifier ;) (declaration "byte bVar4;" type_identifier identifier ;) (declaration "ulong *puVar5;" type_identifier (pointer_declarator "*puVar5" * identifier) ;) (declaration "ulong uVar6;" type_identifier identifier ;) (expression_statement "uVar6 = (ulong)*(int *)(param_1 + 4);" (assignment_expression "uVar6 = (ulong)*(int *)(param_1 + 4)" identifier = (binary_expression "(ulong)*(int *)(param_1 + 4)" (parenthesized_expression "(ulong)" ( identifier )) * (cast_expression "(int *)(param_1 + 4)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 4)" ( (binary_expression "param_1 + 4" identifier + number_literal) ))))) ;) (if_statement "if ((long)(((long)uVar6 >> 0x3f ^ uVar6) - ((long)uVar6 >> 0x3f)) <= (long)(param_2 >> 6)) {\n    return uVar6 >> 0x3f;\n  }" if (parenthesized_expression "((long)(((long)uVar6 >> 0x3f ^ uVar6) - ((long)uVar6 >> 0x3f)) <= (long)(param_2 >> 6))" ( (binary_expression "(long)(((long)uVar6 >> 0x3f ^ uVar6) - ((long)uVar6 >> 0x3f)) <= (long)(param_2 >> 6)" (cast_expression "(long)(((long)uVar6 >> 0x3f ^ uVar6) - ((long)uVar6 >> 0x3f))" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) (parenthesized_expression "(((long)uVar6 >> 0x3f ^ uVar6) - ((long)uVar6 >> 0x3f))" ( (binary_expression "((long)uVar6 >> 0x3f ^ uVar6) - ((long)uVar6 >> 0x3f)" (parenthesized_expression "((long)uVar6 >> 0x3f ^ uVar6)" ( (binary_expression "(long)uVar6 >> 0x3f ^ uVar6" (binary_expression "(long)uVar6 >> 0x3f" (cast_expression "(long)uVar6" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier) >> number_literal) ^ identifier) )) - (parenthesized_expression "((long)uVar6 >> 0x3f)" ( (binary_expression "(long)uVar6 >> 0x3f" (cast_expression "(long)uVar6" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier) >> number_literal) ))) ))) <= (cast_expression "(long)(param_2 >> 6)" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) (parenthesized_expression "(param_2 >> 6)" ( (binary_expression "param_2 >> 6" identifier >> number_literal) )))) )) (compound_statement "{\n    return uVar6 >> 0x3f;\n  }" { (return_statement "return uVar6 >> 0x3f;" return (binary_expression "uVar6 >> 0x3f" identifier >> number_literal) ;) })) (expression_statement "puVar2 = *(ulong **)(param_1 + 8);" (assignment_expression "puVar2 = *(ulong **)(param_1 + 8)" identifier = (pointer_expression "*(ulong **)(param_1 + 8)" * (cast_expression "(ulong **)(param_1 + 8)" ( (type_descriptor "ulong **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_1 + 8)" ( (binary_expression "param_1 + 8" identifier + number_literal) ))))) ;) (expression_statement "puVar1 = puVar2 + (param_2 >> 6);" (assignment_expression "puVar1 = puVar2 + (param_2 >> 6)" identifier = (binary_expression "puVar2 + (param_2 >> 6)" identifier + (parenthesized_expression "(param_2 >> 6)" ( (binary_expression "param_2 >> 6" identifier >> number_literal) )))) ;) (expression_statement "uVar3 = *puVar1;" (assignment_expression "uVar3 = *puVar1" identifier = (pointer_expression "*puVar1" * identifier)) ;) (expression_statement "bVar4 = (byte)param_2;" (assignment_expression "bVar4 = (byte)param_2" identifier = (cast_expression "(byte)param_2" ( (type_descriptor "byte" type_identifier) ) identifier)) ;) (if_statement "if (-1 < (long)uVar6) {\n    return (ulong)((uint)(uVar3 >> (bVar4 & 0x3f)) & 1);\n  }" if (parenthesized_expression "(-1 < (long)uVar6)" ( (binary_expression "-1 < (long)uVar6" number_literal < (cast_expression "(long)uVar6" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier)) )) (compound_statement "{\n    return (ulong)((uint)(uVar3 >> (bVar4 & 0x3f)) & 1);\n  }" { (return_statement "return (ulong)((uint)(uVar3 >> (bVar4 & 0x3f)) & 1);" return (call_expression "(ulong)((uint)(uVar3 >> (bVar4 & 0x3f)) & 1)" (parenthesized_expression "(ulong)" ( identifier )) (argument_list "((uint)(uVar3 >> (bVar4 & 0x3f)) & 1)" ( (binary_expression "(uint)(uVar3 >> (bVar4 & 0x3f)) & 1" (call_expression "(uint)(uVar3 >> (bVar4 & 0x3f))" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(uVar3 >> (bVar4 & 0x3f))" ( (binary_expression "uVar3 >> (bVar4 & 0x3f)" identifier >> (parenthesized_expression "(bVar4 & 0x3f)" ( (binary_expression "bVar4 & 0x3f" identifier & number_literal) ))) ))) & number_literal) ))) ;) })) (if_statement "if (puVar2 != puVar1) {\n    if (puVar1[-1] == 0) {\n      if (puVar1 + -1 == puVar2) goto LAB_001260df;\n      puVar5 = puVar1 + -2;\n      uVar6 = puVar1[-2];\n      while (uVar6 == 0) {\n        if (puVar2 == puVar5) goto LAB_001260df;\n        puVar5 = puVar5 + -1;\n        uVar6 = *puVar5;\n      }\n    }\n    return (ulong)((uint)(~uVar3 >> (bVar4 & 0x3f)) & 1);\n  }" if (parenthesized_expression "(puVar2 != puVar1)" ( (binary_expression "puVar2 != puVar1" identifier != identifier) )) (compound_statement "{\n    if (puVar1[-1] == 0) {\n      if (puVar1 + -1 == puVar2) goto LAB_001260df;\n      puVar5 = puVar1 + -2;\n      uVar6 = puVar1[-2];\n      while (uVar6 == 0) {\n        if (puVar2 == puVar5) goto LAB_001260df;\n        puVar5 = puVar5 + -1;\n        uVar6 = *puVar5;\n      }\n    }\n    return (ulong)((uint)(~uVar3 >> (bVar4 & 0x3f)) & 1);\n  }" { (if_statement "if (puVar1[-1] == 0) {\n      if (puVar1 + -1 == puVar2) goto LAB_001260df;\n      puVar5 = puVar1 + -2;\n      uVar6 = puVar1[-2];\n      while (uVar6 == 0) {\n        if (puVar2 == puVar5) goto LAB_001260df;\n        puVar5 = puVar5 + -1;\n        uVar6 = *puVar5;\n      }\n    }" if (parenthesized_expression "(puVar1[-1] == 0)" ( (binary_expression "puVar1[-1] == 0" (subscript_expression "puVar1[-1]" identifier [ number_literal ]) == number_literal) )) (compound_statement "{\n      if (puVar1 + -1 == puVar2) goto LAB_001260df;\n      puVar5 = puVar1 + -2;\n      uVar6 = puVar1[-2];\n      while (uVar6 == 0) {\n        if (puVar2 == puVar5) goto LAB_001260df;\n        puVar5 = puVar5 + -1;\n        uVar6 = *puVar5;\n      }\n    }" { (if_statement "if (puVar1 + -1 == puVar2) goto LAB_001260df;" if (parenthesized_expression "(puVar1 + -1 == puVar2)" ( (binary_expression "puVar1 + -1 == puVar2" (binary_expression "puVar1 + -1" identifier + number_literal) == identifier) )) (goto_statement "goto LAB_001260df;" goto statement_identifier ;)) (expression_statement "puVar5 = puVar1 + -2;" (assignment_expression "puVar5 = puVar1 + -2" identifier = (binary_expression "puVar1 + -2" identifier + number_literal)) ;) (expression_statement "uVar6 = puVar1[-2];" (assignment_expression "uVar6 = puVar1[-2]" identifier = (subscript_expression "puVar1[-2]" identifier [ number_literal ])) ;) (while_statement "while (uVar6 == 0) {\n        if (puVar2 == puVar5) goto LAB_001260df;\n        puVar5 = puVar5 + -1;\n        uVar6 = *puVar5;\n      }" while (parenthesized_expression "(uVar6 == 0)" ( (binary_expression "uVar6 == 0" identifier == number_literal) )) (compound_statement "{\n        if (puVar2 == puVar5) goto LAB_001260df;\n        puVar5 = puVar5 + -1;\n        uVar6 = *puVar5;\n      }" { (if_statement "if (puVar2 == puVar5) goto LAB_001260df;" if (parenthesized_expression "(puVar2 == puVar5)" ( (binary_expression "puVar2 == puVar5" identifier == identifier) )) (goto_statement "goto LAB_001260df;" goto statement_identifier ;)) (expression_statement "puVar5 = puVar5 + -1;" (assignment_expression "puVar5 = puVar5 + -1" identifier = (binary_expression "puVar5 + -1" identifier + number_literal)) ;) (expression_statement "uVar6 = *puVar5;" (assignment_expression "uVar6 = *puVar5" identifier = (pointer_expression "*puVar5" * identifier)) ;) })) })) (return_statement "return (ulong)((uint)(~uVar3 >> (bVar4 & 0x3f)) & 1);" return (call_expression "(ulong)((uint)(~uVar3 >> (bVar4 & 0x3f)) & 1)" (parenthesized_expression "(ulong)" ( identifier )) (argument_list "((uint)(~uVar3 >> (bVar4 & 0x3f)) & 1)" ( (binary_expression "(uint)(~uVar3 >> (bVar4 & 0x3f)) & 1" (call_expression "(uint)(~uVar3 >> (bVar4 & 0x3f))" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(~uVar3 >> (bVar4 & 0x3f))" ( (binary_expression "~uVar3 >> (bVar4 & 0x3f)" (unary_expression "~uVar3" ~ identifier) >> (parenthesized_expression "(bVar4 & 0x3f)" ( (binary_expression "bVar4 & 0x3f" identifier & number_literal) ))) ))) & number_literal) ))) ;) })) (labeled_statement "LAB_001260df:\n  return (ulong)((uint)(-uVar3 >> (bVar4 & 0x3f)) & 1);" statement_identifier : (return_statement "return (ulong)((uint)(-uVar3 >> (bVar4 & 0x3f)) & 1);" return (call_expression "(ulong)((uint)(-uVar3 >> (bVar4 & 0x3f)) & 1)" (parenthesized_expression "(ulong)" ( identifier )) (argument_list "((uint)(-uVar3 >> (bVar4 & 0x3f)) & 1)" ( (binary_expression "(uint)(-uVar3 >> (bVar4 & 0x3f)) & 1" (call_expression "(uint)(-uVar3 >> (bVar4 & 0x3f))" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(-uVar3 >> (bVar4 & 0x3f))" ( (binary_expression "-uVar3 >> (bVar4 & 0x3f)" (unary_expression "-uVar3" - identifier) >> (parenthesized_expression "(bVar4 & 0x3f)" ( (binary_expression "bVar4 & 0x3f" identifier & number_literal) ))) ))) & number_literal) ))) ;)) })))
(translation_unit "int __gmpz_tstbit(mpz_srcptr u,mp_bitcnt_t bit_index)\n\n{\n  ulong *puVar1;\n  ulong *puVar2;\n  ulong uVar3;\n  byte bVar4;\n  ulong *puVar5;\n  ulong uVar6;\n  \n  uVar6 = (ulong)u->_mp_size;\n  if ((long)(((long)uVar6 >> 0x3f ^ uVar6) - ((long)uVar6 >> 0x3f)) <= (long)(bit_index >> 6)) {\n    return (uint)(u->_mp_size >> 0x1f) >> 0x1f;\n  }\n  puVar2 = u->_mp_d;\n  puVar1 = puVar2 + (bit_index >> 6);\n  uVar3 = *puVar1;\n  bVar4 = (byte)bit_index;\n  if (-1 < (long)uVar6) {\n    return (uint)(uVar3 >> (bVar4 & 0x3f)) & 1;\n  }\n  if (puVar2 != puVar1) {\n    if (puVar1[-1] == 0) {\n      if (puVar1 + -1 == puVar2) goto LAB_001260df;\n      puVar5 = puVar1 + -2;\n      uVar6 = puVar1[-2];\n      while (uVar6 == 0) {\n        if (puVar2 == puVar5) goto LAB_001260df;\n        puVar5 = puVar5 + -1;\n        uVar6 = *puVar5;\n      }\n    }\n    return (uint)(~uVar3 >> (bVar4 & 0x3f)) & 1;\n  }\nLAB_001260df:\n  return (uint)(-uVar3 >> (bVar4 & 0x3f)) & 1;\n}\n\n" (function_definition "int __gmpz_tstbit(mpz_srcptr u,mp_bitcnt_t bit_index)\n\n{\n  ulong *puVar1;\n  ulong *puVar2;\n  ulong uVar3;\n  byte bVar4;\n  ulong *puVar5;\n  ulong uVar6;\n  \n  uVar6 = (ulong)u->_mp_size;\n  if ((long)(((long)uVar6 >> 0x3f ^ uVar6) - ((long)uVar6 >> 0x3f)) <= (long)(bit_index >> 6)) {\n    return (uint)(u->_mp_size >> 0x1f) >> 0x1f;\n  }\n  puVar2 = u->_mp_d;\n  puVar1 = puVar2 + (bit_index >> 6);\n  uVar3 = *puVar1;\n  bVar4 = (byte)bit_index;\n  if (-1 < (long)uVar6) {\n    return (uint)(uVar3 >> (bVar4 & 0x3f)) & 1;\n  }\n  if (puVar2 != puVar1) {\n    if (puVar1[-1] == 0) {\n      if (puVar1 + -1 == puVar2) goto LAB_001260df;\n      puVar5 = puVar1 + -2;\n      uVar6 = puVar1[-2];\n      while (uVar6 == 0) {\n        if (puVar2 == puVar5) goto LAB_001260df;\n        puVar5 = puVar5 + -1;\n        uVar6 = *puVar5;\n      }\n    }\n    return (uint)(~uVar3 >> (bVar4 & 0x3f)) & 1;\n  }\nLAB_001260df:\n  return (uint)(-uVar3 >> (bVar4 & 0x3f)) & 1;\n}" primitive_type (function_declarator "__gmpz_tstbit(mpz_srcptr u,mp_bitcnt_t bit_index)" identifier (parameter_list "(mpz_srcptr u,mp_bitcnt_t bit_index)" ( (parameter_declaration "mpz_srcptr u" type_identifier identifier) , (parameter_declaration "mp_bitcnt_t bit_index" type_identifier identifier) ))) (compound_statement "{\n  ulong *puVar1;\n  ulong *puVar2;\n  ulong uVar3;\n  byte bVar4;\n  ulong *puVar5;\n  ulong uVar6;\n  \n  uVar6 = (ulong)u->_mp_size;\n  if ((long)(((long)uVar6 >> 0x3f ^ uVar6) - ((long)uVar6 >> 0x3f)) <= (long)(bit_index >> 6)) {\n    return (uint)(u->_mp_size >> 0x1f) >> 0x1f;\n  }\n  puVar2 = u->_mp_d;\n  puVar1 = puVar2 + (bit_index >> 6);\n  uVar3 = *puVar1;\n  bVar4 = (byte)bit_index;\n  if (-1 < (long)uVar6) {\n    return (uint)(uVar3 >> (bVar4 & 0x3f)) & 1;\n  }\n  if (puVar2 != puVar1) {\n    if (puVar1[-1] == 0) {\n      if (puVar1 + -1 == puVar2) goto LAB_001260df;\n      puVar5 = puVar1 + -2;\n      uVar6 = puVar1[-2];\n      while (uVar6 == 0) {\n        if (puVar2 == puVar5) goto LAB_001260df;\n        puVar5 = puVar5 + -1;\n        uVar6 = *puVar5;\n      }\n    }\n    return (uint)(~uVar3 >> (bVar4 & 0x3f)) & 1;\n  }\nLAB_001260df:\n  return (uint)(-uVar3 >> (bVar4 & 0x3f)) & 1;\n}" { (declaration "ulong *puVar1;" type_identifier (pointer_declarator "*puVar1" * identifier) ;) (declaration "ulong *puVar2;" type_identifier (pointer_declarator "*puVar2" * identifier) ;) (declaration "ulong uVar3;" type_identifier identifier ;) (declaration "byte bVar4;" type_identifier identifier ;) (declaration "ulong *puVar5;" type_identifier (pointer_declarator "*puVar5" * identifier) ;) (declaration "ulong uVar6;" type_identifier identifier ;) (expression_statement "uVar6 = (ulong)u->_mp_size;" (assignment_expression "uVar6 = (ulong)u->_mp_size" identifier = (cast_expression "(ulong)u->_mp_size" ( (type_descriptor "ulong" type_identifier) ) (field_expression "u->_mp_size" identifier -> field_identifier))) ;) (if_statement "if ((long)(((long)uVar6 >> 0x3f ^ uVar6) - ((long)uVar6 >> 0x3f)) <= (long)(bit_index >> 6)) {\n    return (uint)(u->_mp_size >> 0x1f) >> 0x1f;\n  }" if (parenthesized_expression "((long)(((long)uVar6 >> 0x3f ^ uVar6) - ((long)uVar6 >> 0x3f)) <= (long)(bit_index >> 6))" ( (binary_expression "(long)(((long)uVar6 >> 0x3f ^ uVar6) - ((long)uVar6 >> 0x3f)) <= (long)(bit_index >> 6)" (cast_expression "(long)(((long)uVar6 >> 0x3f ^ uVar6) - ((long)uVar6 >> 0x3f))" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) (parenthesized_expression "(((long)uVar6 >> 0x3f ^ uVar6) - ((long)uVar6 >> 0x3f))" ( (binary_expression "((long)uVar6 >> 0x3f ^ uVar6) - ((long)uVar6 >> 0x3f)" (parenthesized_expression "((long)uVar6 >> 0x3f ^ uVar6)" ( (binary_expression "(long)uVar6 >> 0x3f ^ uVar6" (binary_expression "(long)uVar6 >> 0x3f" (cast_expression "(long)uVar6" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier) >> number_literal) ^ identifier) )) - (parenthesized_expression "((long)uVar6 >> 0x3f)" ( (binary_expression "(long)uVar6 >> 0x3f" (cast_expression "(long)uVar6" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier) >> number_literal) ))) ))) <= (cast_expression "(long)(bit_index >> 6)" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) (parenthesized_expression "(bit_index >> 6)" ( (binary_expression "bit_index >> 6" identifier >> number_literal) )))) )) (compound_statement "{\n    return (uint)(u->_mp_size >> 0x1f) >> 0x1f;\n  }" { (return_statement "return (uint)(u->_mp_size >> 0x1f) >> 0x1f;" return (binary_expression "(uint)(u->_mp_size >> 0x1f) >> 0x1f" (call_expression "(uint)(u->_mp_size >> 0x1f)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(u->_mp_size >> 0x1f)" ( (binary_expression "u->_mp_size >> 0x1f" (field_expression "u->_mp_size" identifier -> field_identifier) >> number_literal) ))) >> number_literal) ;) })) (expression_statement "puVar2 = u->_mp_d;" (assignment_expression "puVar2 = u->_mp_d" identifier = (field_expression "u->_mp_d" identifier -> field_identifier)) ;) (expression_statement "puVar1 = puVar2 + (bit_index >> 6);" (assignment_expression "puVar1 = puVar2 + (bit_index >> 6)" identifier = (binary_expression "puVar2 + (bit_index >> 6)" identifier + (parenthesized_expression "(bit_index >> 6)" ( (binary_expression "bit_index >> 6" identifier >> number_literal) )))) ;) (expression_statement "uVar3 = *puVar1;" (assignment_expression "uVar3 = *puVar1" identifier = (pointer_expression "*puVar1" * identifier)) ;) (expression_statement "bVar4 = (byte)bit_index;" (assignment_expression "bVar4 = (byte)bit_index" identifier = (cast_expression "(byte)bit_index" ( (type_descriptor "byte" type_identifier) ) identifier)) ;) (if_statement "if (-1 < (long)uVar6) {\n    return (uint)(uVar3 >> (bVar4 & 0x3f)) & 1;\n  }" if (parenthesized_expression "(-1 < (long)uVar6)" ( (binary_expression "-1 < (long)uVar6" number_literal < (cast_expression "(long)uVar6" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier)) )) (compound_statement "{\n    return (uint)(uVar3 >> (bVar4 & 0x3f)) & 1;\n  }" { (return_statement "return (uint)(uVar3 >> (bVar4 & 0x3f)) & 1;" return (binary_expression "(uint)(uVar3 >> (bVar4 & 0x3f)) & 1" (call_expression "(uint)(uVar3 >> (bVar4 & 0x3f))" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(uVar3 >> (bVar4 & 0x3f))" ( (binary_expression "uVar3 >> (bVar4 & 0x3f)" identifier >> (parenthesized_expression "(bVar4 & 0x3f)" ( (binary_expression "bVar4 & 0x3f" identifier & number_literal) ))) ))) & number_literal) ;) })) (if_statement "if (puVar2 != puVar1) {\n    if (puVar1[-1] == 0) {\n      if (puVar1 + -1 == puVar2) goto LAB_001260df;\n      puVar5 = puVar1 + -2;\n      uVar6 = puVar1[-2];\n      while (uVar6 == 0) {\n        if (puVar2 == puVar5) goto LAB_001260df;\n        puVar5 = puVar5 + -1;\n        uVar6 = *puVar5;\n      }\n    }\n    return (uint)(~uVar3 >> (bVar4 & 0x3f)) & 1;\n  }" if (parenthesized_expression "(puVar2 != puVar1)" ( (binary_expression "puVar2 != puVar1" identifier != identifier) )) (compound_statement "{\n    if (puVar1[-1] == 0) {\n      if (puVar1 + -1 == puVar2) goto LAB_001260df;\n      puVar5 = puVar1 + -2;\n      uVar6 = puVar1[-2];\n      while (uVar6 == 0) {\n        if (puVar2 == puVar5) goto LAB_001260df;\n        puVar5 = puVar5 + -1;\n        uVar6 = *puVar5;\n      }\n    }\n    return (uint)(~uVar3 >> (bVar4 & 0x3f)) & 1;\n  }" { (if_statement "if (puVar1[-1] == 0) {\n      if (puVar1 + -1 == puVar2) goto LAB_001260df;\n      puVar5 = puVar1 + -2;\n      uVar6 = puVar1[-2];\n      while (uVar6 == 0) {\n        if (puVar2 == puVar5) goto LAB_001260df;\n        puVar5 = puVar5 + -1;\n        uVar6 = *puVar5;\n      }\n    }" if (parenthesized_expression "(puVar1[-1] == 0)" ( (binary_expression "puVar1[-1] == 0" (subscript_expression "puVar1[-1]" identifier [ number_literal ]) == number_literal) )) (compound_statement "{\n      if (puVar1 + -1 == puVar2) goto LAB_001260df;\n      puVar5 = puVar1 + -2;\n      uVar6 = puVar1[-2];\n      while (uVar6 == 0) {\n        if (puVar2 == puVar5) goto LAB_001260df;\n        puVar5 = puVar5 + -1;\n        uVar6 = *puVar5;\n      }\n    }" { (if_statement "if (puVar1 + -1 == puVar2) goto LAB_001260df;" if (parenthesized_expression "(puVar1 + -1 == puVar2)" ( (binary_expression "puVar1 + -1 == puVar2" (binary_expression "puVar1 + -1" identifier + number_literal) == identifier) )) (goto_statement "goto LAB_001260df;" goto statement_identifier ;)) (expression_statement "puVar5 = puVar1 + -2;" (assignment_expression "puVar5 = puVar1 + -2" identifier = (binary_expression "puVar1 + -2" identifier + number_literal)) ;) (expression_statement "uVar6 = puVar1[-2];" (assignment_expression "uVar6 = puVar1[-2]" identifier = (subscript_expression "puVar1[-2]" identifier [ number_literal ])) ;) (while_statement "while (uVar6 == 0) {\n        if (puVar2 == puVar5) goto LAB_001260df;\n        puVar5 = puVar5 + -1;\n        uVar6 = *puVar5;\n      }" while (parenthesized_expression "(uVar6 == 0)" ( (binary_expression "uVar6 == 0" identifier == number_literal) )) (compound_statement "{\n        if (puVar2 == puVar5) goto LAB_001260df;\n        puVar5 = puVar5 + -1;\n        uVar6 = *puVar5;\n      }" { (if_statement "if (puVar2 == puVar5) goto LAB_001260df;" if (parenthesized_expression "(puVar2 == puVar5)" ( (binary_expression "puVar2 == puVar5" identifier == identifier) )) (goto_statement "goto LAB_001260df;" goto statement_identifier ;)) (expression_statement "puVar5 = puVar5 + -1;" (assignment_expression "puVar5 = puVar5 + -1" identifier = (binary_expression "puVar5 + -1" identifier + number_literal)) ;) (expression_statement "uVar6 = *puVar5;" (assignment_expression "uVar6 = *puVar5" identifier = (pointer_expression "*puVar5" * identifier)) ;) })) })) (return_statement "return (uint)(~uVar3 >> (bVar4 & 0x3f)) & 1;" return (binary_expression "(uint)(~uVar3 >> (bVar4 & 0x3f)) & 1" (call_expression "(uint)(~uVar3 >> (bVar4 & 0x3f))" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(~uVar3 >> (bVar4 & 0x3f))" ( (binary_expression "~uVar3 >> (bVar4 & 0x3f)" (unary_expression "~uVar3" ~ identifier) >> (parenthesized_expression "(bVar4 & 0x3f)" ( (binary_expression "bVar4 & 0x3f" identifier & number_literal) ))) ))) & number_literal) ;) })) (labeled_statement "LAB_001260df:\n  return (uint)(-uVar3 >> (bVar4 & 0x3f)) & 1;" statement_identifier : (return_statement "return (uint)(-uVar3 >> (bVar4 & 0x3f)) & 1;" return (binary_expression "(uint)(-uVar3 >> (bVar4 & 0x3f)) & 1" (call_expression "(uint)(-uVar3 >> (bVar4 & 0x3f))" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(-uVar3 >> (bVar4 & 0x3f))" ( (binary_expression "-uVar3 >> (bVar4 & 0x3f)" (unary_expression "-uVar3" - identifier) >> (parenthesized_expression "(bVar4 & 0x3f)" ( (binary_expression "bVar4 & 0x3f" identifier & number_literal) ))) ))) & number_literal) ;)) })))
(translation_unit "ulong __gmpz_tstbit(long param_1,ulong param_2)\n\n{\n  ulong *puVar1;\n  ulong *puVar2;\n  ulong uVar3;\n  byte bVar4;\n  ulong *puVar5;\n  ulong uVar6;\n  \n  uVar6 = (ulong)*(int *)(param_1 + 4);\n  if ((long)(((long)uVar6 >> 0x3f ^ uVar6) - ((long)uVar6 >> 0x3f)) <= (long)(param_2 >> 6)) {\n    return uVar6 >> 0x3f;\n  }\n  puVar2 = *(ulong **)(param_1 + 8);\n  puVar1 = puVar2 + (param_2 >> 6);\n  uVar3 = *puVar1;\n  bVar4 = (byte)param_2;\n  if (-1 < (long)uVar6) {\n    return (ulong)((uint)(uVar3 >> (bVar4 & 0x3f)) & 1);\n  }\n  if (puVar2 != puVar1) {\n    if (puVar1[-1] == 0) {\n      if (puVar1 + -1 == puVar2) goto LAB_001260df;\n      puVar5 = puVar1 + -2;\n      uVar6 = puVar1[-2];\n      while (uVar6 == 0) {\n        if (puVar2 == puVar5) goto LAB_001260df;\n        puVar5 = puVar5 + -1;\n        uVar6 = *puVar5;\n      }\n    }\n    return (ulong)((uint)(~uVar3 >> (bVar4 & 0x3f)) & 1);\n  }\nLAB_001260df:\n  return (ulong)((uint)(-uVar3 >> (bVar4 & 0x3f)) & 1);\n}\n\n" (function_definition "ulong __gmpz_tstbit(long param_1,ulong param_2)\n\n{\n  ulong *puVar1;\n  ulong *puVar2;\n  ulong uVar3;\n  byte bVar4;\n  ulong *puVar5;\n  ulong uVar6;\n  \n  uVar6 = (ulong)*(int *)(param_1 + 4);\n  if ((long)(((long)uVar6 >> 0x3f ^ uVar6) - ((long)uVar6 >> 0x3f)) <= (long)(param_2 >> 6)) {\n    return uVar6 >> 0x3f;\n  }\n  puVar2 = *(ulong **)(param_1 + 8);\n  puVar1 = puVar2 + (param_2 >> 6);\n  uVar3 = *puVar1;\n  bVar4 = (byte)param_2;\n  if (-1 < (long)uVar6) {\n    return (ulong)((uint)(uVar3 >> (bVar4 & 0x3f)) & 1);\n  }\n  if (puVar2 != puVar1) {\n    if (puVar1[-1] == 0) {\n      if (puVar1 + -1 == puVar2) goto LAB_001260df;\n      puVar5 = puVar1 + -2;\n      uVar6 = puVar1[-2];\n      while (uVar6 == 0) {\n        if (puVar2 == puVar5) goto LAB_001260df;\n        puVar5 = puVar5 + -1;\n        uVar6 = *puVar5;\n      }\n    }\n    return (ulong)((uint)(~uVar3 >> (bVar4 & 0x3f)) & 1);\n  }\nLAB_001260df:\n  return (ulong)((uint)(-uVar3 >> (bVar4 & 0x3f)) & 1);\n}" type_identifier (function_declarator "__gmpz_tstbit(long param_1,ulong param_2)" identifier (parameter_list "(long param_1,ulong param_2)" ( (parameter_declaration "long param_1" (sized_type_specifier "long" long) identifier) , (parameter_declaration "ulong param_2" type_identifier identifier) ))) (compound_statement "{\n  ulong *puVar1;\n  ulong *puVar2;\n  ulong uVar3;\n  byte bVar4;\n  ulong *puVar5;\n  ulong uVar6;\n  \n  uVar6 = (ulong)*(int *)(param_1 + 4);\n  if ((long)(((long)uVar6 >> 0x3f ^ uVar6) - ((long)uVar6 >> 0x3f)) <= (long)(param_2 >> 6)) {\n    return uVar6 >> 0x3f;\n  }\n  puVar2 = *(ulong **)(param_1 + 8);\n  puVar1 = puVar2 + (param_2 >> 6);\n  uVar3 = *puVar1;\n  bVar4 = (byte)param_2;\n  if (-1 < (long)uVar6) {\n    return (ulong)((uint)(uVar3 >> (bVar4 & 0x3f)) & 1);\n  }\n  if (puVar2 != puVar1) {\n    if (puVar1[-1] == 0) {\n      if (puVar1 + -1 == puVar2) goto LAB_001260df;\n      puVar5 = puVar1 + -2;\n      uVar6 = puVar1[-2];\n      while (uVar6 == 0) {\n        if (puVar2 == puVar5) goto LAB_001260df;\n        puVar5 = puVar5 + -1;\n        uVar6 = *puVar5;\n      }\n    }\n    return (ulong)((uint)(~uVar3 >> (bVar4 & 0x3f)) & 1);\n  }\nLAB_001260df:\n  return (ulong)((uint)(-uVar3 >> (bVar4 & 0x3f)) & 1);\n}" { (declaration "ulong *puVar1;" type_identifier (pointer_declarator "*puVar1" * identifier) ;) (declaration "ulong *puVar2;" type_identifier (pointer_declarator "*puVar2" * identifier) ;) (declaration "ulong uVar3;" type_identifier identifier ;) (declaration "byte bVar4;" type_identifier identifier ;) (declaration "ulong *puVar5;" type_identifier (pointer_declarator "*puVar5" * identifier) ;) (declaration "ulong uVar6;" type_identifier identifier ;) (expression_statement "uVar6 = (ulong)*(int *)(param_1 + 4);" (assignment_expression "uVar6 = (ulong)*(int *)(param_1 + 4)" identifier = (binary_expression "(ulong)*(int *)(param_1 + 4)" (parenthesized_expression "(ulong)" ( identifier )) * (cast_expression "(int *)(param_1 + 4)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 4)" ( (binary_expression "param_1 + 4" identifier + number_literal) ))))) ;) (if_statement "if ((long)(((long)uVar6 >> 0x3f ^ uVar6) - ((long)uVar6 >> 0x3f)) <= (long)(param_2 >> 6)) {\n    return uVar6 >> 0x3f;\n  }" if (parenthesized_expression "((long)(((long)uVar6 >> 0x3f ^ uVar6) - ((long)uVar6 >> 0x3f)) <= (long)(param_2 >> 6))" ( (binary_expression "(long)(((long)uVar6 >> 0x3f ^ uVar6) - ((long)uVar6 >> 0x3f)) <= (long)(param_2 >> 6)" (cast_expression "(long)(((long)uVar6 >> 0x3f ^ uVar6) - ((long)uVar6 >> 0x3f))" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) (parenthesized_expression "(((long)uVar6 >> 0x3f ^ uVar6) - ((long)uVar6 >> 0x3f))" ( (binary_expression "((long)uVar6 >> 0x3f ^ uVar6) - ((long)uVar6 >> 0x3f)" (parenthesized_expression "((long)uVar6 >> 0x3f ^ uVar6)" ( (binary_expression "(long)uVar6 >> 0x3f ^ uVar6" (binary_expression "(long)uVar6 >> 0x3f" (cast_expression "(long)uVar6" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier) >> number_literal) ^ identifier) )) - (parenthesized_expression "((long)uVar6 >> 0x3f)" ( (binary_expression "(long)uVar6 >> 0x3f" (cast_expression "(long)uVar6" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier) >> number_literal) ))) ))) <= (cast_expression "(long)(param_2 >> 6)" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) (parenthesized_expression "(param_2 >> 6)" ( (binary_expression "param_2 >> 6" identifier >> number_literal) )))) )) (compound_statement "{\n    return uVar6 >> 0x3f;\n  }" { (return_statement "return uVar6 >> 0x3f;" return (binary_expression "uVar6 >> 0x3f" identifier >> number_literal) ;) })) (expression_statement "puVar2 = *(ulong **)(param_1 + 8);" (assignment_expression "puVar2 = *(ulong **)(param_1 + 8)" identifier = (pointer_expression "*(ulong **)(param_1 + 8)" * (cast_expression "(ulong **)(param_1 + 8)" ( (type_descriptor "ulong **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_1 + 8)" ( (binary_expression "param_1 + 8" identifier + number_literal) ))))) ;) (expression_statement "puVar1 = puVar2 + (param_2 >> 6);" (assignment_expression "puVar1 = puVar2 + (param_2 >> 6)" identifier = (binary_expression "puVar2 + (param_2 >> 6)" identifier + (parenthesized_expression "(param_2 >> 6)" ( (binary_expression "param_2 >> 6" identifier >> number_literal) )))) ;) (expression_statement "uVar3 = *puVar1;" (assignment_expression "uVar3 = *puVar1" identifier = (pointer_expression "*puVar1" * identifier)) ;) (expression_statement "bVar4 = (byte)param_2;" (assignment_expression "bVar4 = (byte)param_2" identifier = (cast_expression "(byte)param_2" ( (type_descriptor "byte" type_identifier) ) identifier)) ;) (if_statement "if (-1 < (long)uVar6) {\n    return (ulong)((uint)(uVar3 >> (bVar4 & 0x3f)) & 1);\n  }" if (parenthesized_expression "(-1 < (long)uVar6)" ( (binary_expression "-1 < (long)uVar6" number_literal < (cast_expression "(long)uVar6" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier)) )) (compound_statement "{\n    return (ulong)((uint)(uVar3 >> (bVar4 & 0x3f)) & 1);\n  }" { (return_statement "return (ulong)((uint)(uVar3 >> (bVar4 & 0x3f)) & 1);" return (call_expression "(ulong)((uint)(uVar3 >> (bVar4 & 0x3f)) & 1)" (parenthesized_expression "(ulong)" ( identifier )) (argument_list "((uint)(uVar3 >> (bVar4 & 0x3f)) & 1)" ( (binary_expression "(uint)(uVar3 >> (bVar4 & 0x3f)) & 1" (call_expression "(uint)(uVar3 >> (bVar4 & 0x3f))" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(uVar3 >> (bVar4 & 0x3f))" ( (binary_expression "uVar3 >> (bVar4 & 0x3f)" identifier >> (parenthesized_expression "(bVar4 & 0x3f)" ( (binary_expression "bVar4 & 0x3f" identifier & number_literal) ))) ))) & number_literal) ))) ;) })) (if_statement "if (puVar2 != puVar1) {\n    if (puVar1[-1] == 0) {\n      if (puVar1 + -1 == puVar2) goto LAB_001260df;\n      puVar5 = puVar1 + -2;\n      uVar6 = puVar1[-2];\n      while (uVar6 == 0) {\n        if (puVar2 == puVar5) goto LAB_001260df;\n        puVar5 = puVar5 + -1;\n        uVar6 = *puVar5;\n      }\n    }\n    return (ulong)((uint)(~uVar3 >> (bVar4 & 0x3f)) & 1);\n  }" if (parenthesized_expression "(puVar2 != puVar1)" ( (binary_expression "puVar2 != puVar1" identifier != identifier) )) (compound_statement "{\n    if (puVar1[-1] == 0) {\n      if (puVar1 + -1 == puVar2) goto LAB_001260df;\n      puVar5 = puVar1 + -2;\n      uVar6 = puVar1[-2];\n      while (uVar6 == 0) {\n        if (puVar2 == puVar5) goto LAB_001260df;\n        puVar5 = puVar5 + -1;\n        uVar6 = *puVar5;\n      }\n    }\n    return (ulong)((uint)(~uVar3 >> (bVar4 & 0x3f)) & 1);\n  }" { (if_statement "if (puVar1[-1] == 0) {\n      if (puVar1 + -1 == puVar2) goto LAB_001260df;\n      puVar5 = puVar1 + -2;\n      uVar6 = puVar1[-2];\n      while (uVar6 == 0) {\n        if (puVar2 == puVar5) goto LAB_001260df;\n        puVar5 = puVar5 + -1;\n        uVar6 = *puVar5;\n      }\n    }" if (parenthesized_expression "(puVar1[-1] == 0)" ( (binary_expression "puVar1[-1] == 0" (subscript_expression "puVar1[-1]" identifier [ number_literal ]) == number_literal) )) (compound_statement "{\n      if (puVar1 + -1 == puVar2) goto LAB_001260df;\n      puVar5 = puVar1 + -2;\n      uVar6 = puVar1[-2];\n      while (uVar6 == 0) {\n        if (puVar2 == puVar5) goto LAB_001260df;\n        puVar5 = puVar5 + -1;\n        uVar6 = *puVar5;\n      }\n    }" { (if_statement "if (puVar1 + -1 == puVar2) goto LAB_001260df;" if (parenthesized_expression "(puVar1 + -1 == puVar2)" ( (binary_expression "puVar1 + -1 == puVar2" (binary_expression "puVar1 + -1" identifier + number_literal) == identifier) )) (goto_statement "goto LAB_001260df;" goto statement_identifier ;)) (expression_statement "puVar5 = puVar1 + -2;" (assignment_expression "puVar5 = puVar1 + -2" identifier = (binary_expression "puVar1 + -2" identifier + number_literal)) ;) (expression_statement "uVar6 = puVar1[-2];" (assignment_expression "uVar6 = puVar1[-2]" identifier = (subscript_expression "puVar1[-2]" identifier [ number_literal ])) ;) (while_statement "while (uVar6 == 0) {\n        if (puVar2 == puVar5) goto LAB_001260df;\n        puVar5 = puVar5 + -1;\n        uVar6 = *puVar5;\n      }" while (parenthesized_expression "(uVar6 == 0)" ( (binary_expression "uVar6 == 0" identifier == number_literal) )) (compound_statement "{\n        if (puVar2 == puVar5) goto LAB_001260df;\n        puVar5 = puVar5 + -1;\n        uVar6 = *puVar5;\n      }" { (if_statement "if (puVar2 == puVar5) goto LAB_001260df;" if (parenthesized_expression "(puVar2 == puVar5)" ( (binary_expression "puVar2 == puVar5" identifier == identifier) )) (goto_statement "goto LAB_001260df;" goto statement_identifier ;)) (expression_statement "puVar5 = puVar5 + -1;" (assignment_expression "puVar5 = puVar5 + -1" identifier = (binary_expression "puVar5 + -1" identifier + number_literal)) ;) (expression_statement "uVar6 = *puVar5;" (assignment_expression "uVar6 = *puVar5" identifier = (pointer_expression "*puVar5" * identifier)) ;) })) })) (return_statement "return (ulong)((uint)(~uVar3 >> (bVar4 & 0x3f)) & 1);" return (call_expression "(ulong)((uint)(~uVar3 >> (bVar4 & 0x3f)) & 1)" (parenthesized_expression "(ulong)" ( identifier )) (argument_list "((uint)(~uVar3 >> (bVar4 & 0x3f)) & 1)" ( (binary_expression "(uint)(~uVar3 >> (bVar4 & 0x3f)) & 1" (call_expression "(uint)(~uVar3 >> (bVar4 & 0x3f))" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(~uVar3 >> (bVar4 & 0x3f))" ( (binary_expression "~uVar3 >> (bVar4 & 0x3f)" (unary_expression "~uVar3" ~ identifier) >> (parenthesized_expression "(bVar4 & 0x3f)" ( (binary_expression "bVar4 & 0x3f" identifier & number_literal) ))) ))) & number_literal) ))) ;) })) (labeled_statement "LAB_001260df:\n  return (ulong)((uint)(-uVar3 >> (bVar4 & 0x3f)) & 1);" statement_identifier : (return_statement "return (ulong)((uint)(-uVar3 >> (bVar4 & 0x3f)) & 1);" return (call_expression "(ulong)((uint)(-uVar3 >> (bVar4 & 0x3f)) & 1)" (parenthesized_expression "(ulong)" ( identifier )) (argument_list "((uint)(-uVar3 >> (bVar4 & 0x3f)) & 1)" ( (binary_expression "(uint)(-uVar3 >> (bVar4 & 0x3f)) & 1" (call_expression "(uint)(-uVar3 >> (bVar4 & 0x3f))" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(-uVar3 >> (bVar4 & 0x3f))" ( (binary_expression "-uVar3 >> (bVar4 & 0x3f)" (unary_expression "-uVar3" - identifier) >> (parenthesized_expression "(bVar4 & 0x3f)" ( (binary_expression "bVar4 & 0x3f" identifier & number_literal) ))) ))) & number_literal) ))) ;)) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration (sized_type_specifier long) IDENT) , (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = (binary_expression (parenthesized_expression ( IDENT )) * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (if_statement if (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor (sized_type_specifier long)) ) (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression (binary_expression (cast_expression ( (type_descriptor (sized_type_specifier long)) ) IDENT) >> LIT) ^ IDENT) )) - (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor (sized_type_specifier long)) ) IDENT) >> LIT) ))) ))) <= (cast_expression ( (type_descriptor (sized_type_specifier long)) ) (parenthesized_expression ( (binary_expression IDENT >> LIT) )))) )) (compound_statement { (return_statement return (binary_expression IDENT >> LIT) ;) })) (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)) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE) ) IDENT)) ;) (if_statement if (parenthesized_expression ( (binary_expression LIT < (cast_expression ( (type_descriptor (sized_type_specifier long)) ) IDENT)) )) (compound_statement { (return_statement return (call_expression (parenthesized_expression ( IDENT )) (argument_list ( (binary_expression (call_expression (parenthesized_expression ( IDENT )) (argument_list ( (binary_expression IDENT >> (parenthesized_expression ( (binary_expression IDENT & LIT) ))) ))) & LIT) ))) ;) })) (if_statement if (parenthesized_expression ( (binary_expression IDENT != IDENT) )) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression (subscript_expression IDENT [ LIT ]) == LIT) )) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression (binary_expression IDENT + LIT) == IDENT) )) (goto_statement goto statement_identifier ;)) (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)) ;) })) })) (return_statement return (call_expression (parenthesized_expression ( IDENT )) (argument_list ( (binary_expression (call_expression (parenthesized_expression ( IDENT )) (argument_list ( (binary_expression (unary_expression ~ IDENT) >> (parenthesized_expression ( (binary_expression IDENT & LIT) ))) ))) & LIT) ))) ;) })) (labeled_statement statement_identifier : (return_statement return (call_expression (parenthesized_expression ( IDENT )) (argument_list ( (binary_expression (call_expression (parenthesized_expression ( IDENT )) (argument_list ( (binary_expression (unary_expression - IDENT) >> (parenthesized_expression ( (binary_expression IDENT & LIT) ))) ))) & LIT) ))) ;)) })))
(function_definition "ulong __gmpz_tstbit(long param_1,ulong param_2)\n\n{\n  ulong *puVar1;\n  ulong *puVar2;\n  ulong uVar3;\n  byte bVar4;\n  ulong *puVar5;\n  ulong uVar6;\n  \n  uVar6 = (ulong)*(int *)(param_1 + 4);\n  if ((long)(((long)uVar6 >> 0x3f ^ uVar6) - ((long)uVar6 >> 0x3f)) <= (long)(param_2 >> 6)) {\n    return uVar6 >> 0x3f;\n  }\n  puVar2 = *(ulong **)(param_1 + 8);\n  puVar1 = puVar2 + (param_2 >> 6);\n  uVar3 = *puVar1;\n  bVar4 = (byte)param_2;\n  if (-1 < (long)uVar6) {\n    return (ulong)((uint)(uVar3 >> (bVar4 & 0x3f)) & 1);\n  }\n  if (puVar2 != puVar1) {\n    if (puVar1[-1] == 0) {\n      if (puVar1 + -1 == puVar2) goto LAB_001260df;\n      puVar5 = puVar1 + -2;\n      uVar6 = puVar1[-2];\n      while (uVar6 == 0) {\n        if (puVar2 == puVar5) goto LAB_001260df;\n        puVar5 = puVar5 + -1;\n        uVar6 = *puVar5;\n      }\n    }\n    return (ulong)((uint)(~uVar3 >> (bVar4 & 0x3f)) & 1);\n  }\nLAB_001260df:\n  return (ulong)((uint)(-uVar3 >> (bVar4 & 0x3f)) & 1);\n}" (type_identifier "ulong") (function_declarator "__gmpz_tstbit(long param_1,ulong param_2)" (identifier "__gmpz_tstbit") (parameter_list "(long param_1,ulong param_2)" (( "(") (parameter_declaration "long param_1" (sized_type_specifier "long" (long "long")) (identifier "param_1")) (, ",") (parameter_declaration "ulong param_2" (type_identifier "ulong") (identifier "param_2")) () ")"))) (compound_statement "{\n  ulong *puVar1;\n  ulong *puVar2;\n  ulong uVar3;\n  byte bVar4;\n  ulong *puVar5;\n  ulong uVar6;\n  \n  uVar6 = (ulong)*(int *)(param_1 + 4);\n  if ((long)(((long)uVar6 >> 0x3f ^ uVar6) - ((long)uVar6 >> 0x3f)) <= (long)(param_2 >> 6)) {\n    return uVar6 >> 0x3f;\n  }\n  puVar2 = *(ulong **)(param_1 + 8);\n  puVar1 = puVar2 + (param_2 >> 6);\n  uVar3 = *puVar1;\n  bVar4 = (byte)param_2;\n  if (-1 < (long)uVar6) {\n    return (ulong)((uint)(uVar3 >> (bVar4 & 0x3f)) & 1);\n  }\n  if (puVar2 != puVar1) {\n    if (puVar1[-1] == 0) {\n      if (puVar1 + -1 == puVar2) goto LAB_001260df;\n      puVar5 = puVar1 + -2;\n      uVar6 = puVar1[-2];\n      while (uVar6 == 0) {\n        if (puVar2 == puVar5) goto LAB_001260df;\n        puVar5 = puVar5 + -1;\n        uVar6 = *puVar5;\n      }\n    }\n    return (ulong)((uint)(~uVar3 >> (bVar4 & 0x3f)) & 1);\n  }\nLAB_001260df:\n  return (ulong)((uint)(-uVar3 >> (bVar4 & 0x3f)) & 1);\n}" ({ "{") (declaration "ulong *puVar1;" (type_identifier "ulong") (pointer_declarator "*puVar1" (* "*") (identifier "puVar1")) (; ";")) (declaration "ulong *puVar2;" (type_identifier "ulong") (pointer_declarator "*puVar2" (* "*") (identifier "puVar2")) (; ";")) (declaration "ulong uVar3;" (type_identifier "ulong") (identifier "uVar3") (; ";")) (declaration "byte bVar4;" (type_identifier "byte") (identifier "bVar4") (; ";")) (declaration "ulong *puVar5;" (type_identifier "ulong") (pointer_declarator "*puVar5" (* "*") (identifier "puVar5")) (; ";")) (declaration "ulong uVar6;" (type_identifier "ulong") (identifier "uVar6") (; ";")) (expression_statement "uVar6 = (ulong)*(int *)(param_1 + 4);" (assignment_expression "uVar6 = (ulong)*(int *)(param_1 + 4)" (identifier "uVar6") (= "=") (binary_expression "(ulong)*(int *)(param_1 + 4)" (parenthesized_expression "(ulong)" (( "(") (identifier "ulong") () ")")) (* "*") (cast_expression "(int *)(param_1 + 4)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 4)" (( "(") (binary_expression "param_1 + 4" (identifier "param_1") (+ "+") (number_literal "4")) () ")"))))) (; ";")) (if_statement "if ((long)(((long)uVar6 >> 0x3f ^ uVar6) - ((long)uVar6 >> 0x3f)) <= (long)(param_2 >> 6)) {\n    return uVar6 >> 0x3f;\n  }" (if "if") (parenthesized_expression "((long)(((long)uVar6 >> 0x3f ^ uVar6) - ((long)uVar6 >> 0x3f)) <= (long)(param_2 >> 6))" (( "(") (binary_expression "(long)(((long)uVar6 >> 0x3f ^ uVar6) - ((long)uVar6 >> 0x3f)) <= (long)(param_2 >> 6)" (cast_expression "(long)(((long)uVar6 >> 0x3f ^ uVar6) - ((long)uVar6 >> 0x3f))" (( "(") (type_descriptor "long" (sized_type_specifier "long" (long "long"))) () ")") (parenthesized_expression "(((long)uVar6 >> 0x3f ^ uVar6) - ((long)uVar6 >> 0x3f))" (( "(") (binary_expression "((long)uVar6 >> 0x3f ^ uVar6) - ((long)uVar6 >> 0x3f)" (parenthesized_expression "((long)uVar6 >> 0x3f ^ uVar6)" (( "(") (binary_expression "(long)uVar6 >> 0x3f ^ uVar6" (binary_expression "(long)uVar6 >> 0x3f" (cast_expression "(long)uVar6" (( "(") (type_descriptor "long" (sized_type_specifier "long" (long "long"))) () ")") (identifier "uVar6")) (>> ">>") (number_literal "0x3f")) (^ "^") (identifier "uVar6")) () ")")) (- "-") (parenthesized_expression "((long)uVar6 >> 0x3f)" (( "(") (binary_expression "(long)uVar6 >> 0x3f" (cast_expression "(long)uVar6" (( "(") (type_descriptor "long" (sized_type_specifier "long" (long "long"))) () ")") (identifier "uVar6")) (>> ">>") (number_literal "0x3f")) () ")"))) () ")"))) (<= "<=") (cast_expression "(long)(param_2 >> 6)" (( "(") (type_descriptor "long" (sized_type_specifier "long" (long "long"))) () ")") (parenthesized_expression "(param_2 >> 6)" (( "(") (binary_expression "param_2 >> 6" (identifier "param_2") (>> ">>") (number_literal "6")) () ")")))) () ")")) (compound_statement "{\n    return uVar6 >> 0x3f;\n  }" ({ "{") (return_statement "return uVar6 >> 0x3f;" (return "return") (binary_expression "uVar6 >> 0x3f" (identifier "uVar6") (>> ">>") (number_literal "0x3f")) (; ";")) (} "}"))) (expression_statement "puVar2 = *(ulong **)(param_1 + 8);" (assignment_expression "puVar2 = *(ulong **)(param_1 + 8)" (identifier "puVar2") (= "=") (pointer_expression "*(ulong **)(param_1 + 8)" (* "*") (cast_expression "(ulong **)(param_1 + 8)" (( "(") (type_descriptor "ulong **" (type_identifier "ulong") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(param_1 + 8)" (( "(") (binary_expression "param_1 + 8" (identifier "param_1") (+ "+") (number_literal "8")) () ")"))))) (; ";")) (expression_statement "puVar1 = puVar2 + (param_2 >> 6);" (assignment_expression "puVar1 = puVar2 + (param_2 >> 6)" (identifier "puVar1") (= "=") (binary_expression "puVar2 + (param_2 >> 6)" (identifier "puVar2") (+ "+") (parenthesized_expression "(param_2 >> 6)" (( "(") (binary_expression "param_2 >> 6" (identifier "param_2") (>> ">>") (number_literal "6")) () ")")))) (; ";")) (expression_statement "uVar3 = *puVar1;" (assignment_expression "uVar3 = *puVar1" (identifier "uVar3") (= "=") (pointer_expression "*puVar1" (* "*") (identifier "puVar1"))) (; ";")) (expression_statement "bVar4 = (byte)param_2;" (assignment_expression "bVar4 = (byte)param_2" (identifier "bVar4") (= "=") (cast_expression "(byte)param_2" (( "(") (type_descriptor "byte" (type_identifier "byte")) () ")") (identifier "param_2"))) (; ";")) (if_statement "if (-1 < (long)uVar6) {\n    return (ulong)((uint)(uVar3 >> (bVar4 & 0x3f)) & 1);\n  }" (if "if") (parenthesized_expression "(-1 < (long)uVar6)" (( "(") (binary_expression "-1 < (long)uVar6" (number_literal "-1") (< "<") (cast_expression "(long)uVar6" (( "(") (type_descriptor "long" (sized_type_specifier "long" (long "long"))) () ")") (identifier "uVar6"))) () ")")) (compound_statement "{\n    return (ulong)((uint)(uVar3 >> (bVar4 & 0x3f)) & 1);\n  }" ({ "{") (return_statement "return (ulong)((uint)(uVar3 >> (bVar4 & 0x3f)) & 1);" (return "return") (call_expression "(ulong)((uint)(uVar3 >> (bVar4 & 0x3f)) & 1)" (parenthesized_expression "(ulong)" (( "(") (identifier "ulong") () ")")) (argument_list "((uint)(uVar3 >> (bVar4 & 0x3f)) & 1)" (( "(") (binary_expression "(uint)(uVar3 >> (bVar4 & 0x3f)) & 1" (call_expression "(uint)(uVar3 >> (bVar4 & 0x3f))" (parenthesized_expression "(uint)" (( "(") (identifier "uint") () ")")) (argument_list "(uVar3 >> (bVar4 & 0x3f))" (( "(") (binary_expression "uVar3 >> (bVar4 & 0x3f)" (identifier "uVar3") (>> ">>") (parenthesized_expression "(bVar4 & 0x3f)" (( "(") (binary_expression "bVar4 & 0x3f" (identifier "bVar4") (& "&") (number_literal "0x3f")) () ")"))) () ")"))) (& "&") (number_literal "1")) () ")"))) (; ";")) (} "}"))) (if_statement "if (puVar2 != puVar1) {\n    if (puVar1[-1] == 0) {\n      if (puVar1 + -1 == puVar2) goto LAB_001260df;\n      puVar5 = puVar1 + -2;\n      uVar6 = puVar1[-2];\n      while (uVar6 == 0) {\n        if (puVar2 == puVar5) goto LAB_001260df;\n        puVar5 = puVar5 + -1;\n        uVar6 = *puVar5;\n      }\n    }\n    return (ulong)((uint)(~uVar3 >> (bVar4 & 0x3f)) & 1);\n  }" (if "if") (parenthesized_expression "(puVar2 != puVar1)" (( "(") (binary_expression "puVar2 != puVar1" (identifier "puVar2") (!= "!=") (identifier "puVar1")) () ")")) (compound_statement "{\n    if (puVar1[-1] == 0) {\n      if (puVar1 + -1 == puVar2) goto LAB_001260df;\n      puVar5 = puVar1 + -2;\n      uVar6 = puVar1[-2];\n      while (uVar6 == 0) {\n        if (puVar2 == puVar5) goto LAB_001260df;\n        puVar5 = puVar5 + -1;\n        uVar6 = *puVar5;\n      }\n    }\n    return (ulong)((uint)(~uVar3 >> (bVar4 & 0x3f)) & 1);\n  }" ({ "{") (if_statement "if (puVar1[-1] == 0) {\n      if (puVar1 + -1 == puVar2) goto LAB_001260df;\n      puVar5 = puVar1 + -2;\n      uVar6 = puVar1[-2];\n      while (uVar6 == 0) {\n        if (puVar2 == puVar5) goto LAB_001260df;\n        puVar5 = puVar5 + -1;\n        uVar6 = *puVar5;\n      }\n    }" (if "if") (parenthesized_expression "(puVar1[-1] == 0)" (( "(") (binary_expression "puVar1[-1] == 0" (subscript_expression "puVar1[-1]" (identifier "puVar1") ([ "[") (number_literal "-1") (] "]")) (== "==") (number_literal "0")) () ")")) (compound_statement "{\n      if (puVar1 + -1 == puVar2) goto LAB_001260df;\n      puVar5 = puVar1 + -2;\n      uVar6 = puVar1[-2];\n      while (uVar6 == 0) {\n        if (puVar2 == puVar5) goto LAB_001260df;\n        puVar5 = puVar5 + -1;\n        uVar6 = *puVar5;\n      }\n    }" ({ "{") (if_statement "if (puVar1 + -1 == puVar2) goto LAB_001260df;" (if "if") (parenthesized_expression "(puVar1 + -1 == puVar2)" (( "(") (binary_expression "puVar1 + -1 == puVar2" (binary_expression "puVar1 + -1" (identifier "puVar1") (+ "+") (number_literal "-1")) (== "==") (identifier "puVar2")) () ")")) (goto_statement "goto LAB_001260df;" (goto "goto") (statement_identifier "LAB_001260df") (; ";"))) (expression_statement "puVar5 = puVar1 + -2;" (assignment_expression "puVar5 = puVar1 + -2" (identifier "puVar5") (= "=") (binary_expression "puVar1 + -2" (identifier "puVar1") (+ "+") (number_literal "-2"))) (; ";")) (expression_statement "uVar6 = puVar1[-2];" (assignment_expression "uVar6 = puVar1[-2]" (identifier "uVar6") (= "=") (subscript_expression "puVar1[-2]" (identifier "puVar1") ([ "[") (number_literal "-2") (] "]"))) (; ";")) (while_statement "while (uVar6 == 0) {\n        if (puVar2 == puVar5) goto LAB_001260df;\n        puVar5 = puVar5 + -1;\n        uVar6 = *puVar5;\n      }" (while "while") (parenthesized_expression "(uVar6 == 0)" (( "(") (binary_expression "uVar6 == 0" (identifier "uVar6") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n        if (puVar2 == puVar5) goto LAB_001260df;\n        puVar5 = puVar5 + -1;\n        uVar6 = *puVar5;\n      }" ({ "{") (if_statement "if (puVar2 == puVar5) goto LAB_001260df;" (if "if") (parenthesized_expression "(puVar2 == puVar5)" (( "(") (binary_expression "puVar2 == puVar5" (identifier "puVar2") (== "==") (identifier "puVar5")) () ")")) (goto_statement "goto LAB_001260df;" (goto "goto") (statement_identifier "LAB_001260df") (; ";"))) (expression_statement "puVar5 = puVar5 + -1;" (assignment_expression "puVar5 = puVar5 + -1" (identifier "puVar5") (= "=") (binary_expression "puVar5 + -1" (identifier "puVar5") (+ "+") (number_literal "-1"))) (; ";")) (expression_statement "uVar6 = *puVar5;" (assignment_expression "uVar6 = *puVar5" (identifier "uVar6") (= "=") (pointer_expression "*puVar5" (* "*") (identifier "puVar5"))) (; ";")) (} "}"))) (} "}"))) (return_statement "return (ulong)((uint)(~uVar3 >> (bVar4 & 0x3f)) & 1);" (return "return") (call_expression "(ulong)((uint)(~uVar3 >> (bVar4 & 0x3f)) & 1)" (parenthesized_expression "(ulong)" (( "(") (identifier "ulong") () ")")) (argument_list "((uint)(~uVar3 >> (bVar4 & 0x3f)) & 1)" (( "(") (binary_expression "(uint)(~uVar3 >> (bVar4 & 0x3f)) & 1" (call_expression "(uint)(~uVar3 >> (bVar4 & 0x3f))" (parenthesized_expression "(uint)" (( "(") (identifier "uint") () ")")) (argument_list "(~uVar3 >> (bVar4 & 0x3f))" (( "(") (binary_expression "~uVar3 >> (bVar4 & 0x3f)" (unary_expression "~uVar3" (~ "~") (identifier "uVar3")) (>> ">>") (parenthesized_expression "(bVar4 & 0x3f)" (( "(") (binary_expression "bVar4 & 0x3f" (identifier "bVar4") (& "&") (number_literal "0x3f")) () ")"))) () ")"))) (& "&") (number_literal "1")) () ")"))) (; ";")) (} "}"))) (labeled_statement "LAB_001260df:\n  return (ulong)((uint)(-uVar3 >> (bVar4 & 0x3f)) & 1);" (statement_identifier "LAB_001260df") (: ":") (return_statement "return (ulong)((uint)(-uVar3 >> (bVar4 & 0x3f)) & 1);" (return "return") (call_expression "(ulong)((uint)(-uVar3 >> (bVar4 & 0x3f)) & 1)" (parenthesized_expression "(ulong)" (( "(") (identifier "ulong") () ")")) (argument_list "((uint)(-uVar3 >> (bVar4 & 0x3f)) & 1)" (( "(") (binary_expression "(uint)(-uVar3 >> (bVar4 & 0x3f)) & 1" (call_expression "(uint)(-uVar3 >> (bVar4 & 0x3f))" (parenthesized_expression "(uint)" (( "(") (identifier "uint") () ")")) (argument_list "(-uVar3 >> (bVar4 & 0x3f))" (( "(") (binary_expression "-uVar3 >> (bVar4 & 0x3f)" (unary_expression "-uVar3" (- "-") (identifier "uVar3")) (>> ">>") (parenthesized_expression "(bVar4 & 0x3f)" (( "(") (binary_expression "bVar4 & 0x3f" (identifier "bVar4") (& "&") (number_literal "0x3f")) () ")"))) () ")"))) (& "&") (number_literal "1")) () ")"))) (; ";"))) (} "}")))

int function_1(type_1 u,type_2 var_2)

{
  type_3 *var_6;
  type_3 *var_3;
  type_3 var_4;
  type_4 var_5;
  type_3 *var_7;
  type_3 var_1;
  
  var_1 = (type_3)u->_mp_size;
  if ((long)(((long)var_1 >> 0x3f ^ var_1) - ((long)var_1 >> 0x3f)) <= (long)(var_2 >> 6)) {
    return (uint)(u->_mp_size >> 0x1f) >> 0x1f;
  }
  var_3 = u->_mp_d;
  var_6 = var_3 + (var_2 >> 6);
  var_4 = *var_6;
  var_5 = (type_4)var_2;
  if (-1 < (long)var_1) {
    return (uint)(var_4 >> (var_5 & 0x3f)) & 1;
  }
  if (var_3 != var_6) {
    if (var_6[-1] == 0) {
      if (var_6 + -1 == var_3) goto LAB_001260df;
      var_7 = var_6 + -2;
      var_1 = var_6[-2];
      while (var_1 == 0) {
        if (var_3 == var_7) goto LAB_001260df;
        var_7 = var_7 + -1;
        var_1 = *var_7;
      }
    }
    return (uint)(~var_4 >> (var_5 & 0x3f)) & 1;
  }
LAB_001260df:
  return (uint)(-var_4 >> (var_5 & 0x3f)) & 1;
}


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

ulong MASKED(long param_1,ulong param_2)

{
  ulong *puVar1;
  ulong *puVar2;
  ulong uVar3;
  byte bVar4;
  ulong *puVar5;
  ulong uVar6;
  
  uVar6 = (ulong)*(int *)(param_1 + 4);
  if ((long)(((long)uVar6 >> 0x3f ^ uVar6) - ((long)uVar6 >> 0x3f)) <= (long)(param_2 >> 6)) {
    return uVar6 >> 0x3f;
  }
  puVar2 = *(ulong **)(param_1 + 8);
  puVar1 = puVar2 + (param_2 >> 6);
  uVar3 = *puVar1;
  bVar4 = (byte)param_2;
  if (-1 < (long)uVar6) {
    return (ulong)((uint)(uVar3 >> (bVar4 & 0x3f)) & 1);
  }
  if (puVar2 != puVar1) {
    if (puVar1[-1] == 0) {
      if (puVar1 + -1 == puVar2) goto LAB_001260df;
      puVar5 = puVar1 + -2;
      uVar6 = puVar1[-2];
      while (uVar6 == 0) {
        if (puVar2 == puVar5) goto LAB_001260df;
        puVar5 = puVar5 + -1;
        uVar6 = *puVar5;
      }
    }
    return (ulong)((uint)(~uVar3 >> (bVar4 & 0x3f)) & 1);
  }
LAB_001260df:
  return (ulong)((uint)(-uVar3 >> (bVar4 & 0x3f)) & 1);
}

