
uint64_t sg_get_big_endian(uint8_t *from_bp,int start_bit,int num_bits)

{
  byte bVar1;
  uint uVar2;
  byte bVar3;
  uint uVar4;
  byte *pbVar5;
  uint uVar7;
  int local_1c;
  byte *pbVar6;
  
  local_1c = num_bits - (start_bit + 1);
  uVar2 = (1 << ((byte)(start_bit + 1) & 0x1f)) - 1U & (uint)*from_bp;
  uVar7 = 0;
  if (0 < local_1c) {
    uVar4 = local_1c - 1U >> 3;
    pbVar6 = from_bp + 1;
    do {
      pbVar5 = pbVar6 + 1;
      uVar7 = uVar7 << 8 | uVar2 >> 0x18;
      uVar2 = (uint)*pbVar6 | uVar2 << 8;
      pbVar6 = pbVar5;
    } while (pbVar5 != from_bp + uVar4 + 2);
    local_1c = local_1c + -8 + uVar4 * -8;
  }
  if (local_1c != 0) {
    bVar3 = (byte)-local_1c;
    bVar1 = bVar3 & 0x1f;
    uVar4 = uVar7 >> (bVar3 & 0x1f);
    uVar2 = uVar2 >> bVar1 | uVar7 << 0x20 - bVar1;
    uVar7 = uVar4;
    if ((-local_1c & 0x20U) != 0) {
      uVar7 = 0;
      uVar2 = uVar4;
    }
  }
  return CONCAT44(uVar7,uVar2);
}



undefined8 sg_get_big_endian(byte *param_1,int param_2,int param_3)

{
  byte bVar1;
  uint uVar2;
  byte bVar3;
  uint uVar4;
  byte *pbVar5;
  uint uVar7;
  int local_1c;
  byte *pbVar6;
  
  local_1c = param_3 - (param_2 + 1);
  uVar2 = (1 << ((byte)(param_2 + 1) & 0x1f)) - 1U & (uint)*param_1;
  uVar7 = 0;
  if (0 < local_1c) {
    uVar4 = local_1c - 1U >> 3;
    pbVar6 = param_1 + 1;
    do {
      pbVar5 = pbVar6 + 1;
      uVar7 = uVar7 << 8 | uVar2 >> 0x18;
      uVar2 = (uint)*pbVar6 | uVar2 << 8;
      pbVar6 = pbVar5;
    } while (pbVar5 != param_1 + uVar4 + 2);
    local_1c = local_1c + -8 + uVar4 * -8;
  }
  if (local_1c != 0) {
    bVar3 = (byte)-local_1c;
    bVar1 = bVar3 & 0x1f;
    uVar4 = uVar7 >> (bVar3 & 0x1f);
    uVar2 = uVar2 >> bVar1 | uVar7 << 0x20 - bVar1;
    uVar7 = uVar4;
    if ((-local_1c & 0x20U) != 0) {
      uVar7 = 0;
      uVar2 = uVar4;
    }
  }
  return CONCAT44(uVar7,uVar2);
}


PUSH EBP
PUSH EDI
PUSH ESI
PUSH EBX
SUB ESP,0xc
MOV EAX,dword ptr [ESP + 0x24]
MOV ESI,dword ptr [ESP + 0x20]
MOV EDI,dword ptr [ESP + 0x28]
LEA ECX,[EAX + 0x1]
MOV EAX,0x1
MOVZX EDX,byte ptr [ESI]
SHL EAX,CL
SUB EDI,ECX
SUB EAX,0x1
MOV dword ptr [ESP],EDI
AND EAX,EDX
CDQ
TEST EDI,EDI
JLE 0x0001f15c
LEA ECX,[EDI + -0x1]
LEA EBX,[ESI + 0x1]
SHR ECX,0x3
MOV dword ptr [ESP + 0x4],ECX
LEA EBP,[ESI + ECX*0x1 + 0x2]
ADD EBX,0x1
MOV ESI,EAX
MOVZX ECX,byte ptr [EBX + -0x1]
MOV EDI,EDX
SHL ESI,0x8
SHLD EDI,EAX,0x8
OR ECX,ESI
MOV EDX,EDI
MOV EAX,ECX
CMP EBX,EBP
JNZ 0x0001f130
MOV ECX,dword ptr [ESP + 0x4]
MOV EBX,dword ptr [ESP]
NEG ECX
LEA EBX,[EBX + ECX*0x8 + -0x8]
MOV dword ptr [ESP],EBX
MOV EBX,dword ptr [ESP]
TEST EBX,EBX
JZ 0x0001f177
MOV ECX,EBX
XOR EBX,EBX
NEG ECX
SHRD EAX,EDX,CL
SHR EDX,CL
AND ECX,0x20
CMOVNZ EAX,EDX
CMOVNZ EDX,EBX
ADD ESP,0xc
POP EBX
POP ESI
POP EDI
POP EBP
RET
(translation_unit "undefined8 sg_get_big_endian(byte *param_1,int param_2,int param_3)\n\n{\n  byte bVar1;\n  uint uVar2;\n  byte bVar3;\n  uint uVar4;\n  byte *pbVar5;\n  uint uVar7;\n  int local_1c;\n  byte *pbVar6;\n  \n  local_1c = param_3 - (param_2 + 1);\n  uVar2 = (1 << ((byte)(param_2 + 1) & 0x1f)) - 1U & (uint)*param_1;\n  uVar7 = 0;\n  if (0 < local_1c) {\n    uVar4 = local_1c - 1U >> 3;\n    pbVar6 = param_1 + 1;\n    do {\n      pbVar5 = pbVar6 + 1;\n      uVar7 = uVar7 << 8 | uVar2 >> 0x18;\n      uVar2 = (uint)*pbVar6 | uVar2 << 8;\n      pbVar6 = pbVar5;\n    } while (pbVar5 != param_1 + uVar4 + 2);\n    local_1c = local_1c + -8 + uVar4 * -8;\n  }\n  if (local_1c != 0) {\n    bVar3 = (byte)-local_1c;\n    bVar1 = bVar3 & 0x1f;\n    uVar4 = uVar7 >> (bVar3 & 0x1f);\n    uVar2 = uVar2 >> bVar1 | uVar7 << 0x20 - bVar1;\n    uVar7 = uVar4;\n    if ((-local_1c & 0x20U) != 0) {\n      uVar7 = 0;\n      uVar2 = uVar4;\n    }\n  }\n  return CONCAT44(uVar7,uVar2);\n}\n\n" (function_definition "undefined8 sg_get_big_endian(byte *param_1,int param_2,int param_3)\n\n{\n  byte bVar1;\n  uint uVar2;\n  byte bVar3;\n  uint uVar4;\n  byte *pbVar5;\n  uint uVar7;\n  int local_1c;\n  byte *pbVar6;\n  \n  local_1c = param_3 - (param_2 + 1);\n  uVar2 = (1 << ((byte)(param_2 + 1) & 0x1f)) - 1U & (uint)*param_1;\n  uVar7 = 0;\n  if (0 < local_1c) {\n    uVar4 = local_1c - 1U >> 3;\n    pbVar6 = param_1 + 1;\n    do {\n      pbVar5 = pbVar6 + 1;\n      uVar7 = uVar7 << 8 | uVar2 >> 0x18;\n      uVar2 = (uint)*pbVar6 | uVar2 << 8;\n      pbVar6 = pbVar5;\n    } while (pbVar5 != param_1 + uVar4 + 2);\n    local_1c = local_1c + -8 + uVar4 * -8;\n  }\n  if (local_1c != 0) {\n    bVar3 = (byte)-local_1c;\n    bVar1 = bVar3 & 0x1f;\n    uVar4 = uVar7 >> (bVar3 & 0x1f);\n    uVar2 = uVar2 >> bVar1 | uVar7 << 0x20 - bVar1;\n    uVar7 = uVar4;\n    if ((-local_1c & 0x20U) != 0) {\n      uVar7 = 0;\n      uVar2 = uVar4;\n    }\n  }\n  return CONCAT44(uVar7,uVar2);\n}" type_identifier (function_declarator "sg_get_big_endian(byte *param_1,int param_2,int param_3)" identifier (parameter_list "(byte *param_1,int param_2,int param_3)" ( (parameter_declaration "byte *param_1" type_identifier (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "int param_2" primitive_type identifier) , (parameter_declaration "int param_3" primitive_type identifier) ))) (compound_statement "{\n  byte bVar1;\n  uint uVar2;\n  byte bVar3;\n  uint uVar4;\n  byte *pbVar5;\n  uint uVar7;\n  int local_1c;\n  byte *pbVar6;\n  \n  local_1c = param_3 - (param_2 + 1);\n  uVar2 = (1 << ((byte)(param_2 + 1) & 0x1f)) - 1U & (uint)*param_1;\n  uVar7 = 0;\n  if (0 < local_1c) {\n    uVar4 = local_1c - 1U >> 3;\n    pbVar6 = param_1 + 1;\n    do {\n      pbVar5 = pbVar6 + 1;\n      uVar7 = uVar7 << 8 | uVar2 >> 0x18;\n      uVar2 = (uint)*pbVar6 | uVar2 << 8;\n      pbVar6 = pbVar5;\n    } while (pbVar5 != param_1 + uVar4 + 2);\n    local_1c = local_1c + -8 + uVar4 * -8;\n  }\n  if (local_1c != 0) {\n    bVar3 = (byte)-local_1c;\n    bVar1 = bVar3 & 0x1f;\n    uVar4 = uVar7 >> (bVar3 & 0x1f);\n    uVar2 = uVar2 >> bVar1 | uVar7 << 0x20 - bVar1;\n    uVar7 = uVar4;\n    if ((-local_1c & 0x20U) != 0) {\n      uVar7 = 0;\n      uVar2 = uVar4;\n    }\n  }\n  return CONCAT44(uVar7,uVar2);\n}" { (declaration "byte bVar1;" type_identifier identifier ;) (declaration "uint uVar2;" type_identifier identifier ;) (declaration "byte bVar3;" type_identifier identifier ;) (declaration "uint uVar4;" type_identifier identifier ;) (declaration "byte *pbVar5;" type_identifier (pointer_declarator "*pbVar5" * identifier) ;) (declaration "uint uVar7;" type_identifier identifier ;) (declaration "int local_1c;" primitive_type identifier ;) (declaration "byte *pbVar6;" type_identifier (pointer_declarator "*pbVar6" * identifier) ;) (expression_statement "local_1c = param_3 - (param_2 + 1);" (assignment_expression "local_1c = param_3 - (param_2 + 1)" identifier = (binary_expression "param_3 - (param_2 + 1)" identifier - (parenthesized_expression "(param_2 + 1)" ( (binary_expression "param_2 + 1" identifier + number_literal) )))) ;) (expression_statement "uVar2 = (1 << ((byte)(param_2 + 1) & 0x1f)) - 1U & (uint)*param_1;" (assignment_expression "uVar2 = (1 << ((byte)(param_2 + 1) & 0x1f)) - 1U & (uint)*param_1" identifier = (binary_expression "(1 << ((byte)(param_2 + 1) & 0x1f)) - 1U & (uint)*param_1" (binary_expression "(1 << ((byte)(param_2 + 1) & 0x1f)) - 1U" (parenthesized_expression "(1 << ((byte)(param_2 + 1) & 0x1f))" ( (binary_expression "1 << ((byte)(param_2 + 1) & 0x1f)" number_literal << (parenthesized_expression "((byte)(param_2 + 1) & 0x1f)" ( (binary_expression "(byte)(param_2 + 1) & 0x1f" (call_expression "(byte)(param_2 + 1)" (parenthesized_expression "(byte)" ( identifier )) (argument_list "(param_2 + 1)" ( (binary_expression "param_2 + 1" identifier + number_literal) ))) & number_literal) ))) )) - number_literal) & (binary_expression "(uint)*param_1" (parenthesized_expression "(uint)" ( identifier )) * identifier))) ;) (expression_statement "uVar7 = 0;" (assignment_expression "uVar7 = 0" identifier = number_literal) ;) (if_statement "if (0 < local_1c) {\n    uVar4 = local_1c - 1U >> 3;\n    pbVar6 = param_1 + 1;\n    do {\n      pbVar5 = pbVar6 + 1;\n      uVar7 = uVar7 << 8 | uVar2 >> 0x18;\n      uVar2 = (uint)*pbVar6 | uVar2 << 8;\n      pbVar6 = pbVar5;\n    } while (pbVar5 != param_1 + uVar4 + 2);\n    local_1c = local_1c + -8 + uVar4 * -8;\n  }" if (parenthesized_expression "(0 < local_1c)" ( (binary_expression "0 < local_1c" number_literal < identifier) )) (compound_statement "{\n    uVar4 = local_1c - 1U >> 3;\n    pbVar6 = param_1 + 1;\n    do {\n      pbVar5 = pbVar6 + 1;\n      uVar7 = uVar7 << 8 | uVar2 >> 0x18;\n      uVar2 = (uint)*pbVar6 | uVar2 << 8;\n      pbVar6 = pbVar5;\n    } while (pbVar5 != param_1 + uVar4 + 2);\n    local_1c = local_1c + -8 + uVar4 * -8;\n  }" { (expression_statement "uVar4 = local_1c - 1U >> 3;" (assignment_expression "uVar4 = local_1c - 1U >> 3" identifier = (binary_expression "local_1c - 1U >> 3" (binary_expression "local_1c - 1U" identifier - number_literal) >> number_literal)) ;) (expression_statement "pbVar6 = param_1 + 1;" (assignment_expression "pbVar6 = param_1 + 1" identifier = (binary_expression "param_1 + 1" identifier + number_literal)) ;) (do_statement "do {\n      pbVar5 = pbVar6 + 1;\n      uVar7 = uVar7 << 8 | uVar2 >> 0x18;\n      uVar2 = (uint)*pbVar6 | uVar2 << 8;\n      pbVar6 = pbVar5;\n    } while (pbVar5 != param_1 + uVar4 + 2);" do (compound_statement "{\n      pbVar5 = pbVar6 + 1;\n      uVar7 = uVar7 << 8 | uVar2 >> 0x18;\n      uVar2 = (uint)*pbVar6 | uVar2 << 8;\n      pbVar6 = pbVar5;\n    }" { (expression_statement "pbVar5 = pbVar6 + 1;" (assignment_expression "pbVar5 = pbVar6 + 1" identifier = (binary_expression "pbVar6 + 1" identifier + number_literal)) ;) (expression_statement "uVar7 = uVar7 << 8 | uVar2 >> 0x18;" (assignment_expression "uVar7 = uVar7 << 8 | uVar2 >> 0x18" identifier = (binary_expression "uVar7 << 8 | uVar2 >> 0x18" (binary_expression "uVar7 << 8" identifier << number_literal) | (binary_expression "uVar2 >> 0x18" identifier >> number_literal))) ;) (expression_statement "uVar2 = (uint)*pbVar6 | uVar2 << 8;" (assignment_expression "uVar2 = (uint)*pbVar6 | uVar2 << 8" identifier = (binary_expression "(uint)*pbVar6 | uVar2 << 8" (binary_expression "(uint)*pbVar6" (parenthesized_expression "(uint)" ( identifier )) * identifier) | (binary_expression "uVar2 << 8" identifier << number_literal))) ;) (expression_statement "pbVar6 = pbVar5;" (assignment_expression "pbVar6 = pbVar5" identifier = identifier) ;) }) while (parenthesized_expression "(pbVar5 != param_1 + uVar4 + 2)" ( (binary_expression "pbVar5 != param_1 + uVar4 + 2" identifier != (binary_expression "param_1 + uVar4 + 2" (binary_expression "param_1 + uVar4" identifier + identifier) + number_literal)) )) ;) (expression_statement "local_1c = local_1c + -8 + uVar4 * -8;" (assignment_expression "local_1c = local_1c + -8 + uVar4 * -8" identifier = (binary_expression "local_1c + -8 + uVar4 * -8" (binary_expression "local_1c + -8" identifier + number_literal) + (binary_expression "uVar4 * -8" identifier * number_literal))) ;) })) (if_statement "if (local_1c != 0) {\n    bVar3 = (byte)-local_1c;\n    bVar1 = bVar3 & 0x1f;\n    uVar4 = uVar7 >> (bVar3 & 0x1f);\n    uVar2 = uVar2 >> bVar1 | uVar7 << 0x20 - bVar1;\n    uVar7 = uVar4;\n    if ((-local_1c & 0x20U) != 0) {\n      uVar7 = 0;\n      uVar2 = uVar4;\n    }\n  }" if (parenthesized_expression "(local_1c != 0)" ( (binary_expression "local_1c != 0" identifier != number_literal) )) (compound_statement "{\n    bVar3 = (byte)-local_1c;\n    bVar1 = bVar3 & 0x1f;\n    uVar4 = uVar7 >> (bVar3 & 0x1f);\n    uVar2 = uVar2 >> bVar1 | uVar7 << 0x20 - bVar1;\n    uVar7 = uVar4;\n    if ((-local_1c & 0x20U) != 0) {\n      uVar7 = 0;\n      uVar2 = uVar4;\n    }\n  }" { (expression_statement "bVar3 = (byte)-local_1c;" (assignment_expression "bVar3 = (byte)-local_1c" identifier = (binary_expression "(byte)-local_1c" (parenthesized_expression "(byte)" ( identifier )) - identifier)) ;) (expression_statement "bVar1 = bVar3 & 0x1f;" (assignment_expression "bVar1 = bVar3 & 0x1f" identifier = (binary_expression "bVar3 & 0x1f" identifier & number_literal)) ;) (expression_statement "uVar4 = uVar7 >> (bVar3 & 0x1f);" (assignment_expression "uVar4 = uVar7 >> (bVar3 & 0x1f)" identifier = (binary_expression "uVar7 >> (bVar3 & 0x1f)" identifier >> (parenthesized_expression "(bVar3 & 0x1f)" ( (binary_expression "bVar3 & 0x1f" identifier & number_literal) )))) ;) (expression_statement "uVar2 = uVar2 >> bVar1 | uVar7 << 0x20 - bVar1;" (assignment_expression "uVar2 = uVar2 >> bVar1 | uVar7 << 0x20 - bVar1" identifier = (binary_expression "uVar2 >> bVar1 | uVar7 << 0x20 - bVar1" (binary_expression "uVar2 >> bVar1" identifier >> identifier) | (binary_expression "uVar7 << 0x20 - bVar1" identifier << (binary_expression "0x20 - bVar1" number_literal - identifier)))) ;) (expression_statement "uVar7 = uVar4;" (assignment_expression "uVar7 = uVar4" identifier = identifier) ;) (if_statement "if ((-local_1c & 0x20U) != 0) {\n      uVar7 = 0;\n      uVar2 = uVar4;\n    }" if (parenthesized_expression "((-local_1c & 0x20U) != 0)" ( (binary_expression "(-local_1c & 0x20U) != 0" (parenthesized_expression "(-local_1c & 0x20U)" ( (binary_expression "-local_1c & 0x20U" (unary_expression "-local_1c" - identifier) & number_literal) )) != number_literal) )) (compound_statement "{\n      uVar7 = 0;\n      uVar2 = uVar4;\n    }" { (expression_statement "uVar7 = 0;" (assignment_expression "uVar7 = 0" identifier = number_literal) ;) (expression_statement "uVar2 = uVar4;" (assignment_expression "uVar2 = uVar4" identifier = identifier) ;) })) })) (return_statement "return CONCAT44(uVar7,uVar2);" return (call_expression "CONCAT44(uVar7,uVar2)" identifier (argument_list "(uVar7,uVar2)" ( identifier , identifier ))) ;) })))
(translation_unit "uint64_t sg_get_big_endian(uint8_t *from_bp,int start_bit,int num_bits)\n\n{\n  byte bVar1;\n  uint uVar2;\n  byte bVar3;\n  uint uVar4;\n  byte *pbVar5;\n  uint uVar7;\n  int local_1c;\n  byte *pbVar6;\n  \n  local_1c = num_bits - (start_bit + 1);\n  uVar2 = (1 << ((byte)(start_bit + 1) & 0x1f)) - 1U & (uint)*from_bp;\n  uVar7 = 0;\n  if (0 < local_1c) {\n    uVar4 = local_1c - 1U >> 3;\n    pbVar6 = from_bp + 1;\n    do {\n      pbVar5 = pbVar6 + 1;\n      uVar7 = uVar7 << 8 | uVar2 >> 0x18;\n      uVar2 = (uint)*pbVar6 | uVar2 << 8;\n      pbVar6 = pbVar5;\n    } while (pbVar5 != from_bp + uVar4 + 2);\n    local_1c = local_1c + -8 + uVar4 * -8;\n  }\n  if (local_1c != 0) {\n    bVar3 = (byte)-local_1c;\n    bVar1 = bVar3 & 0x1f;\n    uVar4 = uVar7 >> (bVar3 & 0x1f);\n    uVar2 = uVar2 >> bVar1 | uVar7 << 0x20 - bVar1;\n    uVar7 = uVar4;\n    if ((-local_1c & 0x20U) != 0) {\n      uVar7 = 0;\n      uVar2 = uVar4;\n    }\n  }\n  return CONCAT44(uVar7,uVar2);\n}\n\n" (function_definition "uint64_t sg_get_big_endian(uint8_t *from_bp,int start_bit,int num_bits)\n\n{\n  byte bVar1;\n  uint uVar2;\n  byte bVar3;\n  uint uVar4;\n  byte *pbVar5;\n  uint uVar7;\n  int local_1c;\n  byte *pbVar6;\n  \n  local_1c = num_bits - (start_bit + 1);\n  uVar2 = (1 << ((byte)(start_bit + 1) & 0x1f)) - 1U & (uint)*from_bp;\n  uVar7 = 0;\n  if (0 < local_1c) {\n    uVar4 = local_1c - 1U >> 3;\n    pbVar6 = from_bp + 1;\n    do {\n      pbVar5 = pbVar6 + 1;\n      uVar7 = uVar7 << 8 | uVar2 >> 0x18;\n      uVar2 = (uint)*pbVar6 | uVar2 << 8;\n      pbVar6 = pbVar5;\n    } while (pbVar5 != from_bp + uVar4 + 2);\n    local_1c = local_1c + -8 + uVar4 * -8;\n  }\n  if (local_1c != 0) {\n    bVar3 = (byte)-local_1c;\n    bVar1 = bVar3 & 0x1f;\n    uVar4 = uVar7 >> (bVar3 & 0x1f);\n    uVar2 = uVar2 >> bVar1 | uVar7 << 0x20 - bVar1;\n    uVar7 = uVar4;\n    if ((-local_1c & 0x20U) != 0) {\n      uVar7 = 0;\n      uVar2 = uVar4;\n    }\n  }\n  return CONCAT44(uVar7,uVar2);\n}" primitive_type (function_declarator "sg_get_big_endian(uint8_t *from_bp,int start_bit,int num_bits)" identifier (parameter_list "(uint8_t *from_bp,int start_bit,int num_bits)" ( (parameter_declaration "uint8_t *from_bp" primitive_type (pointer_declarator "*from_bp" * identifier)) , (parameter_declaration "int start_bit" primitive_type identifier) , (parameter_declaration "int num_bits" primitive_type identifier) ))) (compound_statement "{\n  byte bVar1;\n  uint uVar2;\n  byte bVar3;\n  uint uVar4;\n  byte *pbVar5;\n  uint uVar7;\n  int local_1c;\n  byte *pbVar6;\n  \n  local_1c = num_bits - (start_bit + 1);\n  uVar2 = (1 << ((byte)(start_bit + 1) & 0x1f)) - 1U & (uint)*from_bp;\n  uVar7 = 0;\n  if (0 < local_1c) {\n    uVar4 = local_1c - 1U >> 3;\n    pbVar6 = from_bp + 1;\n    do {\n      pbVar5 = pbVar6 + 1;\n      uVar7 = uVar7 << 8 | uVar2 >> 0x18;\n      uVar2 = (uint)*pbVar6 | uVar2 << 8;\n      pbVar6 = pbVar5;\n    } while (pbVar5 != from_bp + uVar4 + 2);\n    local_1c = local_1c + -8 + uVar4 * -8;\n  }\n  if (local_1c != 0) {\n    bVar3 = (byte)-local_1c;\n    bVar1 = bVar3 & 0x1f;\n    uVar4 = uVar7 >> (bVar3 & 0x1f);\n    uVar2 = uVar2 >> bVar1 | uVar7 << 0x20 - bVar1;\n    uVar7 = uVar4;\n    if ((-local_1c & 0x20U) != 0) {\n      uVar7 = 0;\n      uVar2 = uVar4;\n    }\n  }\n  return CONCAT44(uVar7,uVar2);\n}" { (declaration "byte bVar1;" type_identifier identifier ;) (declaration "uint uVar2;" type_identifier identifier ;) (declaration "byte bVar3;" type_identifier identifier ;) (declaration "uint uVar4;" type_identifier identifier ;) (declaration "byte *pbVar5;" type_identifier (pointer_declarator "*pbVar5" * identifier) ;) (declaration "uint uVar7;" type_identifier identifier ;) (declaration "int local_1c;" primitive_type identifier ;) (declaration "byte *pbVar6;" type_identifier (pointer_declarator "*pbVar6" * identifier) ;) (expression_statement "local_1c = num_bits - (start_bit + 1);" (assignment_expression "local_1c = num_bits - (start_bit + 1)" identifier = (binary_expression "num_bits - (start_bit + 1)" identifier - (parenthesized_expression "(start_bit + 1)" ( (binary_expression "start_bit + 1" identifier + number_literal) )))) ;) (expression_statement "uVar2 = (1 << ((byte)(start_bit + 1) & 0x1f)) - 1U & (uint)*from_bp;" (assignment_expression "uVar2 = (1 << ((byte)(start_bit + 1) & 0x1f)) - 1U & (uint)*from_bp" identifier = (binary_expression "(1 << ((byte)(start_bit + 1) & 0x1f)) - 1U & (uint)*from_bp" (binary_expression "(1 << ((byte)(start_bit + 1) & 0x1f)) - 1U" (parenthesized_expression "(1 << ((byte)(start_bit + 1) & 0x1f))" ( (binary_expression "1 << ((byte)(start_bit + 1) & 0x1f)" number_literal << (parenthesized_expression "((byte)(start_bit + 1) & 0x1f)" ( (binary_expression "(byte)(start_bit + 1) & 0x1f" (call_expression "(byte)(start_bit + 1)" (parenthesized_expression "(byte)" ( identifier )) (argument_list "(start_bit + 1)" ( (binary_expression "start_bit + 1" identifier + number_literal) ))) & number_literal) ))) )) - number_literal) & (binary_expression "(uint)*from_bp" (parenthesized_expression "(uint)" ( identifier )) * identifier))) ;) (expression_statement "uVar7 = 0;" (assignment_expression "uVar7 = 0" identifier = number_literal) ;) (if_statement "if (0 < local_1c) {\n    uVar4 = local_1c - 1U >> 3;\n    pbVar6 = from_bp + 1;\n    do {\n      pbVar5 = pbVar6 + 1;\n      uVar7 = uVar7 << 8 | uVar2 >> 0x18;\n      uVar2 = (uint)*pbVar6 | uVar2 << 8;\n      pbVar6 = pbVar5;\n    } while (pbVar5 != from_bp + uVar4 + 2);\n    local_1c = local_1c + -8 + uVar4 * -8;\n  }" if (parenthesized_expression "(0 < local_1c)" ( (binary_expression "0 < local_1c" number_literal < identifier) )) (compound_statement "{\n    uVar4 = local_1c - 1U >> 3;\n    pbVar6 = from_bp + 1;\n    do {\n      pbVar5 = pbVar6 + 1;\n      uVar7 = uVar7 << 8 | uVar2 >> 0x18;\n      uVar2 = (uint)*pbVar6 | uVar2 << 8;\n      pbVar6 = pbVar5;\n    } while (pbVar5 != from_bp + uVar4 + 2);\n    local_1c = local_1c + -8 + uVar4 * -8;\n  }" { (expression_statement "uVar4 = local_1c - 1U >> 3;" (assignment_expression "uVar4 = local_1c - 1U >> 3" identifier = (binary_expression "local_1c - 1U >> 3" (binary_expression "local_1c - 1U" identifier - number_literal) >> number_literal)) ;) (expression_statement "pbVar6 = from_bp + 1;" (assignment_expression "pbVar6 = from_bp + 1" identifier = (binary_expression "from_bp + 1" identifier + number_literal)) ;) (do_statement "do {\n      pbVar5 = pbVar6 + 1;\n      uVar7 = uVar7 << 8 | uVar2 >> 0x18;\n      uVar2 = (uint)*pbVar6 | uVar2 << 8;\n      pbVar6 = pbVar5;\n    } while (pbVar5 != from_bp + uVar4 + 2);" do (compound_statement "{\n      pbVar5 = pbVar6 + 1;\n      uVar7 = uVar7 << 8 | uVar2 >> 0x18;\n      uVar2 = (uint)*pbVar6 | uVar2 << 8;\n      pbVar6 = pbVar5;\n    }" { (expression_statement "pbVar5 = pbVar6 + 1;" (assignment_expression "pbVar5 = pbVar6 + 1" identifier = (binary_expression "pbVar6 + 1" identifier + number_literal)) ;) (expression_statement "uVar7 = uVar7 << 8 | uVar2 >> 0x18;" (assignment_expression "uVar7 = uVar7 << 8 | uVar2 >> 0x18" identifier = (binary_expression "uVar7 << 8 | uVar2 >> 0x18" (binary_expression "uVar7 << 8" identifier << number_literal) | (binary_expression "uVar2 >> 0x18" identifier >> number_literal))) ;) (expression_statement "uVar2 = (uint)*pbVar6 | uVar2 << 8;" (assignment_expression "uVar2 = (uint)*pbVar6 | uVar2 << 8" identifier = (binary_expression "(uint)*pbVar6 | uVar2 << 8" (binary_expression "(uint)*pbVar6" (parenthesized_expression "(uint)" ( identifier )) * identifier) | (binary_expression "uVar2 << 8" identifier << number_literal))) ;) (expression_statement "pbVar6 = pbVar5;" (assignment_expression "pbVar6 = pbVar5" identifier = identifier) ;) }) while (parenthesized_expression "(pbVar5 != from_bp + uVar4 + 2)" ( (binary_expression "pbVar5 != from_bp + uVar4 + 2" identifier != (binary_expression "from_bp + uVar4 + 2" (binary_expression "from_bp + uVar4" identifier + identifier) + number_literal)) )) ;) (expression_statement "local_1c = local_1c + -8 + uVar4 * -8;" (assignment_expression "local_1c = local_1c + -8 + uVar4 * -8" identifier = (binary_expression "local_1c + -8 + uVar4 * -8" (binary_expression "local_1c + -8" identifier + number_literal) + (binary_expression "uVar4 * -8" identifier * number_literal))) ;) })) (if_statement "if (local_1c != 0) {\n    bVar3 = (byte)-local_1c;\n    bVar1 = bVar3 & 0x1f;\n    uVar4 = uVar7 >> (bVar3 & 0x1f);\n    uVar2 = uVar2 >> bVar1 | uVar7 << 0x20 - bVar1;\n    uVar7 = uVar4;\n    if ((-local_1c & 0x20U) != 0) {\n      uVar7 = 0;\n      uVar2 = uVar4;\n    }\n  }" if (parenthesized_expression "(local_1c != 0)" ( (binary_expression "local_1c != 0" identifier != number_literal) )) (compound_statement "{\n    bVar3 = (byte)-local_1c;\n    bVar1 = bVar3 & 0x1f;\n    uVar4 = uVar7 >> (bVar3 & 0x1f);\n    uVar2 = uVar2 >> bVar1 | uVar7 << 0x20 - bVar1;\n    uVar7 = uVar4;\n    if ((-local_1c & 0x20U) != 0) {\n      uVar7 = 0;\n      uVar2 = uVar4;\n    }\n  }" { (expression_statement "bVar3 = (byte)-local_1c;" (assignment_expression "bVar3 = (byte)-local_1c" identifier = (binary_expression "(byte)-local_1c" (parenthesized_expression "(byte)" ( identifier )) - identifier)) ;) (expression_statement "bVar1 = bVar3 & 0x1f;" (assignment_expression "bVar1 = bVar3 & 0x1f" identifier = (binary_expression "bVar3 & 0x1f" identifier & number_literal)) ;) (expression_statement "uVar4 = uVar7 >> (bVar3 & 0x1f);" (assignment_expression "uVar4 = uVar7 >> (bVar3 & 0x1f)" identifier = (binary_expression "uVar7 >> (bVar3 & 0x1f)" identifier >> (parenthesized_expression "(bVar3 & 0x1f)" ( (binary_expression "bVar3 & 0x1f" identifier & number_literal) )))) ;) (expression_statement "uVar2 = uVar2 >> bVar1 | uVar7 << 0x20 - bVar1;" (assignment_expression "uVar2 = uVar2 >> bVar1 | uVar7 << 0x20 - bVar1" identifier = (binary_expression "uVar2 >> bVar1 | uVar7 << 0x20 - bVar1" (binary_expression "uVar2 >> bVar1" identifier >> identifier) | (binary_expression "uVar7 << 0x20 - bVar1" identifier << (binary_expression "0x20 - bVar1" number_literal - identifier)))) ;) (expression_statement "uVar7 = uVar4;" (assignment_expression "uVar7 = uVar4" identifier = identifier) ;) (if_statement "if ((-local_1c & 0x20U) != 0) {\n      uVar7 = 0;\n      uVar2 = uVar4;\n    }" if (parenthesized_expression "((-local_1c & 0x20U) != 0)" ( (binary_expression "(-local_1c & 0x20U) != 0" (parenthesized_expression "(-local_1c & 0x20U)" ( (binary_expression "-local_1c & 0x20U" (unary_expression "-local_1c" - identifier) & number_literal) )) != number_literal) )) (compound_statement "{\n      uVar7 = 0;\n      uVar2 = uVar4;\n    }" { (expression_statement "uVar7 = 0;" (assignment_expression "uVar7 = 0" identifier = number_literal) ;) (expression_statement "uVar2 = uVar4;" (assignment_expression "uVar2 = uVar4" identifier = identifier) ;) })) })) (return_statement "return CONCAT44(uVar7,uVar2);" return (call_expression "CONCAT44(uVar7,uVar2)" identifier (argument_list "(uVar7,uVar2)" ( identifier , identifier ))) ;) })))
(translation_unit "undefined8 sg_get_big_endian(byte *param_1,int param_2,int param_3)\n\n{\n  byte bVar1;\n  uint uVar2;\n  byte bVar3;\n  uint uVar4;\n  byte *pbVar5;\n  uint uVar7;\n  int local_1c;\n  byte *pbVar6;\n  \n  local_1c = param_3 - (param_2 + 1);\n  uVar2 = (1 << ((byte)(param_2 + 1) & 0x1f)) - 1U & (uint)*param_1;\n  uVar7 = 0;\n  if (0 < local_1c) {\n    uVar4 = local_1c - 1U >> 3;\n    pbVar6 = param_1 + 1;\n    do {\n      pbVar5 = pbVar6 + 1;\n      uVar7 = uVar7 << 8 | uVar2 >> 0x18;\n      uVar2 = (uint)*pbVar6 | uVar2 << 8;\n      pbVar6 = pbVar5;\n    } while (pbVar5 != param_1 + uVar4 + 2);\n    local_1c = local_1c + -8 + uVar4 * -8;\n  }\n  if (local_1c != 0) {\n    bVar3 = (byte)-local_1c;\n    bVar1 = bVar3 & 0x1f;\n    uVar4 = uVar7 >> (bVar3 & 0x1f);\n    uVar2 = uVar2 >> bVar1 | uVar7 << 0x20 - bVar1;\n    uVar7 = uVar4;\n    if ((-local_1c & 0x20U) != 0) {\n      uVar7 = 0;\n      uVar2 = uVar4;\n    }\n  }\n  return CONCAT44(uVar7,uVar2);\n}\n\n" (function_definition "undefined8 sg_get_big_endian(byte *param_1,int param_2,int param_3)\n\n{\n  byte bVar1;\n  uint uVar2;\n  byte bVar3;\n  uint uVar4;\n  byte *pbVar5;\n  uint uVar7;\n  int local_1c;\n  byte *pbVar6;\n  \n  local_1c = param_3 - (param_2 + 1);\n  uVar2 = (1 << ((byte)(param_2 + 1) & 0x1f)) - 1U & (uint)*param_1;\n  uVar7 = 0;\n  if (0 < local_1c) {\n    uVar4 = local_1c - 1U >> 3;\n    pbVar6 = param_1 + 1;\n    do {\n      pbVar5 = pbVar6 + 1;\n      uVar7 = uVar7 << 8 | uVar2 >> 0x18;\n      uVar2 = (uint)*pbVar6 | uVar2 << 8;\n      pbVar6 = pbVar5;\n    } while (pbVar5 != param_1 + uVar4 + 2);\n    local_1c = local_1c + -8 + uVar4 * -8;\n  }\n  if (local_1c != 0) {\n    bVar3 = (byte)-local_1c;\n    bVar1 = bVar3 & 0x1f;\n    uVar4 = uVar7 >> (bVar3 & 0x1f);\n    uVar2 = uVar2 >> bVar1 | uVar7 << 0x20 - bVar1;\n    uVar7 = uVar4;\n    if ((-local_1c & 0x20U) != 0) {\n      uVar7 = 0;\n      uVar2 = uVar4;\n    }\n  }\n  return CONCAT44(uVar7,uVar2);\n}" type_identifier (function_declarator "sg_get_big_endian(byte *param_1,int param_2,int param_3)" identifier (parameter_list "(byte *param_1,int param_2,int param_3)" ( (parameter_declaration "byte *param_1" type_identifier (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "int param_2" primitive_type identifier) , (parameter_declaration "int param_3" primitive_type identifier) ))) (compound_statement "{\n  byte bVar1;\n  uint uVar2;\n  byte bVar3;\n  uint uVar4;\n  byte *pbVar5;\n  uint uVar7;\n  int local_1c;\n  byte *pbVar6;\n  \n  local_1c = param_3 - (param_2 + 1);\n  uVar2 = (1 << ((byte)(param_2 + 1) & 0x1f)) - 1U & (uint)*param_1;\n  uVar7 = 0;\n  if (0 < local_1c) {\n    uVar4 = local_1c - 1U >> 3;\n    pbVar6 = param_1 + 1;\n    do {\n      pbVar5 = pbVar6 + 1;\n      uVar7 = uVar7 << 8 | uVar2 >> 0x18;\n      uVar2 = (uint)*pbVar6 | uVar2 << 8;\n      pbVar6 = pbVar5;\n    } while (pbVar5 != param_1 + uVar4 + 2);\n    local_1c = local_1c + -8 + uVar4 * -8;\n  }\n  if (local_1c != 0) {\n    bVar3 = (byte)-local_1c;\n    bVar1 = bVar3 & 0x1f;\n    uVar4 = uVar7 >> (bVar3 & 0x1f);\n    uVar2 = uVar2 >> bVar1 | uVar7 << 0x20 - bVar1;\n    uVar7 = uVar4;\n    if ((-local_1c & 0x20U) != 0) {\n      uVar7 = 0;\n      uVar2 = uVar4;\n    }\n  }\n  return CONCAT44(uVar7,uVar2);\n}" { (declaration "byte bVar1;" type_identifier identifier ;) (declaration "uint uVar2;" type_identifier identifier ;) (declaration "byte bVar3;" type_identifier identifier ;) (declaration "uint uVar4;" type_identifier identifier ;) (declaration "byte *pbVar5;" type_identifier (pointer_declarator "*pbVar5" * identifier) ;) (declaration "uint uVar7;" type_identifier identifier ;) (declaration "int local_1c;" primitive_type identifier ;) (declaration "byte *pbVar6;" type_identifier (pointer_declarator "*pbVar6" * identifier) ;) (expression_statement "local_1c = param_3 - (param_2 + 1);" (assignment_expression "local_1c = param_3 - (param_2 + 1)" identifier = (binary_expression "param_3 - (param_2 + 1)" identifier - (parenthesized_expression "(param_2 + 1)" ( (binary_expression "param_2 + 1" identifier + number_literal) )))) ;) (expression_statement "uVar2 = (1 << ((byte)(param_2 + 1) & 0x1f)) - 1U & (uint)*param_1;" (assignment_expression "uVar2 = (1 << ((byte)(param_2 + 1) & 0x1f)) - 1U & (uint)*param_1" identifier = (binary_expression "(1 << ((byte)(param_2 + 1) & 0x1f)) - 1U & (uint)*param_1" (binary_expression "(1 << ((byte)(param_2 + 1) & 0x1f)) - 1U" (parenthesized_expression "(1 << ((byte)(param_2 + 1) & 0x1f))" ( (binary_expression "1 << ((byte)(param_2 + 1) & 0x1f)" number_literal << (parenthesized_expression "((byte)(param_2 + 1) & 0x1f)" ( (binary_expression "(byte)(param_2 + 1) & 0x1f" (call_expression "(byte)(param_2 + 1)" (parenthesized_expression "(byte)" ( identifier )) (argument_list "(param_2 + 1)" ( (binary_expression "param_2 + 1" identifier + number_literal) ))) & number_literal) ))) )) - number_literal) & (binary_expression "(uint)*param_1" (parenthesized_expression "(uint)" ( identifier )) * identifier))) ;) (expression_statement "uVar7 = 0;" (assignment_expression "uVar7 = 0" identifier = number_literal) ;) (if_statement "if (0 < local_1c) {\n    uVar4 = local_1c - 1U >> 3;\n    pbVar6 = param_1 + 1;\n    do {\n      pbVar5 = pbVar6 + 1;\n      uVar7 = uVar7 << 8 | uVar2 >> 0x18;\n      uVar2 = (uint)*pbVar6 | uVar2 << 8;\n      pbVar6 = pbVar5;\n    } while (pbVar5 != param_1 + uVar4 + 2);\n    local_1c = local_1c + -8 + uVar4 * -8;\n  }" if (parenthesized_expression "(0 < local_1c)" ( (binary_expression "0 < local_1c" number_literal < identifier) )) (compound_statement "{\n    uVar4 = local_1c - 1U >> 3;\n    pbVar6 = param_1 + 1;\n    do {\n      pbVar5 = pbVar6 + 1;\n      uVar7 = uVar7 << 8 | uVar2 >> 0x18;\n      uVar2 = (uint)*pbVar6 | uVar2 << 8;\n      pbVar6 = pbVar5;\n    } while (pbVar5 != param_1 + uVar4 + 2);\n    local_1c = local_1c + -8 + uVar4 * -8;\n  }" { (expression_statement "uVar4 = local_1c - 1U >> 3;" (assignment_expression "uVar4 = local_1c - 1U >> 3" identifier = (binary_expression "local_1c - 1U >> 3" (binary_expression "local_1c - 1U" identifier - number_literal) >> number_literal)) ;) (expression_statement "pbVar6 = param_1 + 1;" (assignment_expression "pbVar6 = param_1 + 1" identifier = (binary_expression "param_1 + 1" identifier + number_literal)) ;) (do_statement "do {\n      pbVar5 = pbVar6 + 1;\n      uVar7 = uVar7 << 8 | uVar2 >> 0x18;\n      uVar2 = (uint)*pbVar6 | uVar2 << 8;\n      pbVar6 = pbVar5;\n    } while (pbVar5 != param_1 + uVar4 + 2);" do (compound_statement "{\n      pbVar5 = pbVar6 + 1;\n      uVar7 = uVar7 << 8 | uVar2 >> 0x18;\n      uVar2 = (uint)*pbVar6 | uVar2 << 8;\n      pbVar6 = pbVar5;\n    }" { (expression_statement "pbVar5 = pbVar6 + 1;" (assignment_expression "pbVar5 = pbVar6 + 1" identifier = (binary_expression "pbVar6 + 1" identifier + number_literal)) ;) (expression_statement "uVar7 = uVar7 << 8 | uVar2 >> 0x18;" (assignment_expression "uVar7 = uVar7 << 8 | uVar2 >> 0x18" identifier = (binary_expression "uVar7 << 8 | uVar2 >> 0x18" (binary_expression "uVar7 << 8" identifier << number_literal) | (binary_expression "uVar2 >> 0x18" identifier >> number_literal))) ;) (expression_statement "uVar2 = (uint)*pbVar6 | uVar2 << 8;" (assignment_expression "uVar2 = (uint)*pbVar6 | uVar2 << 8" identifier = (binary_expression "(uint)*pbVar6 | uVar2 << 8" (binary_expression "(uint)*pbVar6" (parenthesized_expression "(uint)" ( identifier )) * identifier) | (binary_expression "uVar2 << 8" identifier << number_literal))) ;) (expression_statement "pbVar6 = pbVar5;" (assignment_expression "pbVar6 = pbVar5" identifier = identifier) ;) }) while (parenthesized_expression "(pbVar5 != param_1 + uVar4 + 2)" ( (binary_expression "pbVar5 != param_1 + uVar4 + 2" identifier != (binary_expression "param_1 + uVar4 + 2" (binary_expression "param_1 + uVar4" identifier + identifier) + number_literal)) )) ;) (expression_statement "local_1c = local_1c + -8 + uVar4 * -8;" (assignment_expression "local_1c = local_1c + -8 + uVar4 * -8" identifier = (binary_expression "local_1c + -8 + uVar4 * -8" (binary_expression "local_1c + -8" identifier + number_literal) + (binary_expression "uVar4 * -8" identifier * number_literal))) ;) })) (if_statement "if (local_1c != 0) {\n    bVar3 = (byte)-local_1c;\n    bVar1 = bVar3 & 0x1f;\n    uVar4 = uVar7 >> (bVar3 & 0x1f);\n    uVar2 = uVar2 >> bVar1 | uVar7 << 0x20 - bVar1;\n    uVar7 = uVar4;\n    if ((-local_1c & 0x20U) != 0) {\n      uVar7 = 0;\n      uVar2 = uVar4;\n    }\n  }" if (parenthesized_expression "(local_1c != 0)" ( (binary_expression "local_1c != 0" identifier != number_literal) )) (compound_statement "{\n    bVar3 = (byte)-local_1c;\n    bVar1 = bVar3 & 0x1f;\n    uVar4 = uVar7 >> (bVar3 & 0x1f);\n    uVar2 = uVar2 >> bVar1 | uVar7 << 0x20 - bVar1;\n    uVar7 = uVar4;\n    if ((-local_1c & 0x20U) != 0) {\n      uVar7 = 0;\n      uVar2 = uVar4;\n    }\n  }" { (expression_statement "bVar3 = (byte)-local_1c;" (assignment_expression "bVar3 = (byte)-local_1c" identifier = (binary_expression "(byte)-local_1c" (parenthesized_expression "(byte)" ( identifier )) - identifier)) ;) (expression_statement "bVar1 = bVar3 & 0x1f;" (assignment_expression "bVar1 = bVar3 & 0x1f" identifier = (binary_expression "bVar3 & 0x1f" identifier & number_literal)) ;) (expression_statement "uVar4 = uVar7 >> (bVar3 & 0x1f);" (assignment_expression "uVar4 = uVar7 >> (bVar3 & 0x1f)" identifier = (binary_expression "uVar7 >> (bVar3 & 0x1f)" identifier >> (parenthesized_expression "(bVar3 & 0x1f)" ( (binary_expression "bVar3 & 0x1f" identifier & number_literal) )))) ;) (expression_statement "uVar2 = uVar2 >> bVar1 | uVar7 << 0x20 - bVar1;" (assignment_expression "uVar2 = uVar2 >> bVar1 | uVar7 << 0x20 - bVar1" identifier = (binary_expression "uVar2 >> bVar1 | uVar7 << 0x20 - bVar1" (binary_expression "uVar2 >> bVar1" identifier >> identifier) | (binary_expression "uVar7 << 0x20 - bVar1" identifier << (binary_expression "0x20 - bVar1" number_literal - identifier)))) ;) (expression_statement "uVar7 = uVar4;" (assignment_expression "uVar7 = uVar4" identifier = identifier) ;) (if_statement "if ((-local_1c & 0x20U) != 0) {\n      uVar7 = 0;\n      uVar2 = uVar4;\n    }" if (parenthesized_expression "((-local_1c & 0x20U) != 0)" ( (binary_expression "(-local_1c & 0x20U) != 0" (parenthesized_expression "(-local_1c & 0x20U)" ( (binary_expression "-local_1c & 0x20U" (unary_expression "-local_1c" - identifier) & number_literal) )) != number_literal) )) (compound_statement "{\n      uVar7 = 0;\n      uVar2 = uVar4;\n    }" { (expression_statement "uVar7 = 0;" (assignment_expression "uVar7 = 0" identifier = number_literal) ;) (expression_statement "uVar2 = uVar4;" (assignment_expression "uVar2 = uVar4" identifier = identifier) ;) })) })) (return_statement "return CONCAT44(uVar7,uVar2);" return (call_expression "CONCAT44(uVar7,uVar2)" identifier (argument_list "(uVar7,uVar2)" ( identifier , identifier ))) ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE (pointer_declarator * IDENT)) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT - (parenthesized_expression ( (binary_expression IDENT + LIT) )))) ;) (expression_statement (assignment_expression IDENT = (binary_expression (binary_expression (parenthesized_expression ( (binary_expression LIT << (parenthesized_expression ( (binary_expression (call_expression (parenthesized_expression ( IDENT )) (argument_list ( (binary_expression IDENT + LIT) ))) & LIT) ))) )) - LIT) & (binary_expression (parenthesized_expression ( IDENT )) * IDENT))) ;) (expression_statement (assignment_expression IDENT = LIT) ;) (if_statement if (parenthesized_expression ( (binary_expression LIT < IDENT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression (binary_expression IDENT - LIT) >> LIT)) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (do_statement do (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (expression_statement (assignment_expression IDENT = (binary_expression (binary_expression IDENT << LIT) | (binary_expression IDENT >> LIT))) ;) (expression_statement (assignment_expression IDENT = (binary_expression (binary_expression (parenthesized_expression ( IDENT )) * IDENT) | (binary_expression IDENT << LIT))) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) }) while (parenthesized_expression ( (binary_expression IDENT != (binary_expression (binary_expression IDENT + IDENT) + LIT)) )) ;) (expression_statement (assignment_expression IDENT = (binary_expression (binary_expression IDENT + LIT) + (binary_expression IDENT * LIT))) ;) })) (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression (parenthesized_expression ( IDENT )) - IDENT)) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT & LIT)) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT >> (parenthesized_expression ( (binary_expression IDENT & LIT) )))) ;) (expression_statement (assignment_expression IDENT = (binary_expression (binary_expression IDENT >> IDENT) | (binary_expression IDENT << (binary_expression LIT - IDENT)))) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression (unary_expression - IDENT) & LIT) )) != LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) })) })) (return_statement return (call_expression IDENT (argument_list ( IDENT , IDENT ))) ;) })))
(function_definition "undefined8 sg_get_big_endian(byte *param_1,int param_2,int param_3)\n\n{\n  byte bVar1;\n  uint uVar2;\n  byte bVar3;\n  uint uVar4;\n  byte *pbVar5;\n  uint uVar7;\n  int local_1c;\n  byte *pbVar6;\n  \n  local_1c = param_3 - (param_2 + 1);\n  uVar2 = (1 << ((byte)(param_2 + 1) & 0x1f)) - 1U & (uint)*param_1;\n  uVar7 = 0;\n  if (0 < local_1c) {\n    uVar4 = local_1c - 1U >> 3;\n    pbVar6 = param_1 + 1;\n    do {\n      pbVar5 = pbVar6 + 1;\n      uVar7 = uVar7 << 8 | uVar2 >> 0x18;\n      uVar2 = (uint)*pbVar6 | uVar2 << 8;\n      pbVar6 = pbVar5;\n    } while (pbVar5 != param_1 + uVar4 + 2);\n    local_1c = local_1c + -8 + uVar4 * -8;\n  }\n  if (local_1c != 0) {\n    bVar3 = (byte)-local_1c;\n    bVar1 = bVar3 & 0x1f;\n    uVar4 = uVar7 >> (bVar3 & 0x1f);\n    uVar2 = uVar2 >> bVar1 | uVar7 << 0x20 - bVar1;\n    uVar7 = uVar4;\n    if ((-local_1c & 0x20U) != 0) {\n      uVar7 = 0;\n      uVar2 = uVar4;\n    }\n  }\n  return CONCAT44(uVar7,uVar2);\n}" (type_identifier "undefined8") (function_declarator "sg_get_big_endian(byte *param_1,int param_2,int param_3)" (identifier "sg_get_big_endian") (parameter_list "(byte *param_1,int param_2,int param_3)" (( "(") (parameter_declaration "byte *param_1" (type_identifier "byte") (pointer_declarator "*param_1" (* "*") (identifier "param_1"))) (, ",") (parameter_declaration "int param_2" (primitive_type "int") (identifier "param_2")) (, ",") (parameter_declaration "int param_3" (primitive_type "int") (identifier "param_3")) () ")"))) (compound_statement "{\n  byte bVar1;\n  uint uVar2;\n  byte bVar3;\n  uint uVar4;\n  byte *pbVar5;\n  uint uVar7;\n  int local_1c;\n  byte *pbVar6;\n  \n  local_1c = param_3 - (param_2 + 1);\n  uVar2 = (1 << ((byte)(param_2 + 1) & 0x1f)) - 1U & (uint)*param_1;\n  uVar7 = 0;\n  if (0 < local_1c) {\n    uVar4 = local_1c - 1U >> 3;\n    pbVar6 = param_1 + 1;\n    do {\n      pbVar5 = pbVar6 + 1;\n      uVar7 = uVar7 << 8 | uVar2 >> 0x18;\n      uVar2 = (uint)*pbVar6 | uVar2 << 8;\n      pbVar6 = pbVar5;\n    } while (pbVar5 != param_1 + uVar4 + 2);\n    local_1c = local_1c + -8 + uVar4 * -8;\n  }\n  if (local_1c != 0) {\n    bVar3 = (byte)-local_1c;\n    bVar1 = bVar3 & 0x1f;\n    uVar4 = uVar7 >> (bVar3 & 0x1f);\n    uVar2 = uVar2 >> bVar1 | uVar7 << 0x20 - bVar1;\n    uVar7 = uVar4;\n    if ((-local_1c & 0x20U) != 0) {\n      uVar7 = 0;\n      uVar2 = uVar4;\n    }\n  }\n  return CONCAT44(uVar7,uVar2);\n}" ({ "{") (declaration "byte bVar1;" (type_identifier "byte") (identifier "bVar1") (; ";")) (declaration "uint uVar2;" (type_identifier "uint") (identifier "uVar2") (; ";")) (declaration "byte bVar3;" (type_identifier "byte") (identifier "bVar3") (; ";")) (declaration "uint uVar4;" (type_identifier "uint") (identifier "uVar4") (; ";")) (declaration "byte *pbVar5;" (type_identifier "byte") (pointer_declarator "*pbVar5" (* "*") (identifier "pbVar5")) (; ";")) (declaration "uint uVar7;" (type_identifier "uint") (identifier "uVar7") (; ";")) (declaration "int local_1c;" (primitive_type "int") (identifier "local_1c") (; ";")) (declaration "byte *pbVar6;" (type_identifier "byte") (pointer_declarator "*pbVar6" (* "*") (identifier "pbVar6")) (; ";")) (expression_statement "local_1c = param_3 - (param_2 + 1);" (assignment_expression "local_1c = param_3 - (param_2 + 1)" (identifier "local_1c") (= "=") (binary_expression "param_3 - (param_2 + 1)" (identifier "param_3") (- "-") (parenthesized_expression "(param_2 + 1)" (( "(") (binary_expression "param_2 + 1" (identifier "param_2") (+ "+") (number_literal "1")) () ")")))) (; ";")) (expression_statement "uVar2 = (1 << ((byte)(param_2 + 1) & 0x1f)) - 1U & (uint)*param_1;" (assignment_expression "uVar2 = (1 << ((byte)(param_2 + 1) & 0x1f)) - 1U & (uint)*param_1" (identifier "uVar2") (= "=") (binary_expression "(1 << ((byte)(param_2 + 1) & 0x1f)) - 1U & (uint)*param_1" (binary_expression "(1 << ((byte)(param_2 + 1) & 0x1f)) - 1U" (parenthesized_expression "(1 << ((byte)(param_2 + 1) & 0x1f))" (( "(") (binary_expression "1 << ((byte)(param_2 + 1) & 0x1f)" (number_literal "1") (<< "<<") (parenthesized_expression "((byte)(param_2 + 1) & 0x1f)" (( "(") (binary_expression "(byte)(param_2 + 1) & 0x1f" (call_expression "(byte)(param_2 + 1)" (parenthesized_expression "(byte)" (( "(") (identifier "byte") () ")")) (argument_list "(param_2 + 1)" (( "(") (binary_expression "param_2 + 1" (identifier "param_2") (+ "+") (number_literal "1")) () ")"))) (& "&") (number_literal "0x1f")) () ")"))) () ")")) (- "-") (number_literal "1U")) (& "&") (binary_expression "(uint)*param_1" (parenthesized_expression "(uint)" (( "(") (identifier "uint") () ")")) (* "*") (identifier "param_1")))) (; ";")) (expression_statement "uVar7 = 0;" (assignment_expression "uVar7 = 0" (identifier "uVar7") (= "=") (number_literal "0")) (; ";")) (if_statement "if (0 < local_1c) {\n    uVar4 = local_1c - 1U >> 3;\n    pbVar6 = param_1 + 1;\n    do {\n      pbVar5 = pbVar6 + 1;\n      uVar7 = uVar7 << 8 | uVar2 >> 0x18;\n      uVar2 = (uint)*pbVar6 | uVar2 << 8;\n      pbVar6 = pbVar5;\n    } while (pbVar5 != param_1 + uVar4 + 2);\n    local_1c = local_1c + -8 + uVar4 * -8;\n  }" (if "if") (parenthesized_expression "(0 < local_1c)" (( "(") (binary_expression "0 < local_1c" (number_literal "0") (< "<") (identifier "local_1c")) () ")")) (compound_statement "{\n    uVar4 = local_1c - 1U >> 3;\n    pbVar6 = param_1 + 1;\n    do {\n      pbVar5 = pbVar6 + 1;\n      uVar7 = uVar7 << 8 | uVar2 >> 0x18;\n      uVar2 = (uint)*pbVar6 | uVar2 << 8;\n      pbVar6 = pbVar5;\n    } while (pbVar5 != param_1 + uVar4 + 2);\n    local_1c = local_1c + -8 + uVar4 * -8;\n  }" ({ "{") (expression_statement "uVar4 = local_1c - 1U >> 3;" (assignment_expression "uVar4 = local_1c - 1U >> 3" (identifier "uVar4") (= "=") (binary_expression "local_1c - 1U >> 3" (binary_expression "local_1c - 1U" (identifier "local_1c") (- "-") (number_literal "1U")) (>> ">>") (number_literal "3"))) (; ";")) (expression_statement "pbVar6 = param_1 + 1;" (assignment_expression "pbVar6 = param_1 + 1" (identifier "pbVar6") (= "=") (binary_expression "param_1 + 1" (identifier "param_1") (+ "+") (number_literal "1"))) (; ";")) (do_statement "do {\n      pbVar5 = pbVar6 + 1;\n      uVar7 = uVar7 << 8 | uVar2 >> 0x18;\n      uVar2 = (uint)*pbVar6 | uVar2 << 8;\n      pbVar6 = pbVar5;\n    } while (pbVar5 != param_1 + uVar4 + 2);" (do "do") (compound_statement "{\n      pbVar5 = pbVar6 + 1;\n      uVar7 = uVar7 << 8 | uVar2 >> 0x18;\n      uVar2 = (uint)*pbVar6 | uVar2 << 8;\n      pbVar6 = pbVar5;\n    }" ({ "{") (expression_statement "pbVar5 = pbVar6 + 1;" (assignment_expression "pbVar5 = pbVar6 + 1" (identifier "pbVar5") (= "=") (binary_expression "pbVar6 + 1" (identifier "pbVar6") (+ "+") (number_literal "1"))) (; ";")) (expression_statement "uVar7 = uVar7 << 8 | uVar2 >> 0x18;" (assignment_expression "uVar7 = uVar7 << 8 | uVar2 >> 0x18" (identifier "uVar7") (= "=") (binary_expression "uVar7 << 8 | uVar2 >> 0x18" (binary_expression "uVar7 << 8" (identifier "uVar7") (<< "<<") (number_literal "8")) (| "|") (binary_expression "uVar2 >> 0x18" (identifier "uVar2") (>> ">>") (number_literal "0x18")))) (; ";")) (expression_statement "uVar2 = (uint)*pbVar6 | uVar2 << 8;" (assignment_expression "uVar2 = (uint)*pbVar6 | uVar2 << 8" (identifier "uVar2") (= "=") (binary_expression "(uint)*pbVar6 | uVar2 << 8" (binary_expression "(uint)*pbVar6" (parenthesized_expression "(uint)" (( "(") (identifier "uint") () ")")) (* "*") (identifier "pbVar6")) (| "|") (binary_expression "uVar2 << 8" (identifier "uVar2") (<< "<<") (number_literal "8")))) (; ";")) (expression_statement "pbVar6 = pbVar5;" (assignment_expression "pbVar6 = pbVar5" (identifier "pbVar6") (= "=") (identifier "pbVar5")) (; ";")) (} "}")) (while "while") (parenthesized_expression "(pbVar5 != param_1 + uVar4 + 2)" (( "(") (binary_expression "pbVar5 != param_1 + uVar4 + 2" (identifier "pbVar5") (!= "!=") (binary_expression "param_1 + uVar4 + 2" (binary_expression "param_1 + uVar4" (identifier "param_1") (+ "+") (identifier "uVar4")) (+ "+") (number_literal "2"))) () ")")) (; ";")) (expression_statement "local_1c = local_1c + -8 + uVar4 * -8;" (assignment_expression "local_1c = local_1c + -8 + uVar4 * -8" (identifier "local_1c") (= "=") (binary_expression "local_1c + -8 + uVar4 * -8" (binary_expression "local_1c + -8" (identifier "local_1c") (+ "+") (number_literal "-8")) (+ "+") (binary_expression "uVar4 * -8" (identifier "uVar4") (* "*") (number_literal "-8")))) (; ";")) (} "}"))) (if_statement "if (local_1c != 0) {\n    bVar3 = (byte)-local_1c;\n    bVar1 = bVar3 & 0x1f;\n    uVar4 = uVar7 >> (bVar3 & 0x1f);\n    uVar2 = uVar2 >> bVar1 | uVar7 << 0x20 - bVar1;\n    uVar7 = uVar4;\n    if ((-local_1c & 0x20U) != 0) {\n      uVar7 = 0;\n      uVar2 = uVar4;\n    }\n  }" (if "if") (parenthesized_expression "(local_1c != 0)" (( "(") (binary_expression "local_1c != 0" (identifier "local_1c") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n    bVar3 = (byte)-local_1c;\n    bVar1 = bVar3 & 0x1f;\n    uVar4 = uVar7 >> (bVar3 & 0x1f);\n    uVar2 = uVar2 >> bVar1 | uVar7 << 0x20 - bVar1;\n    uVar7 = uVar4;\n    if ((-local_1c & 0x20U) != 0) {\n      uVar7 = 0;\n      uVar2 = uVar4;\n    }\n  }" ({ "{") (expression_statement "bVar3 = (byte)-local_1c;" (assignment_expression "bVar3 = (byte)-local_1c" (identifier "bVar3") (= "=") (binary_expression "(byte)-local_1c" (parenthesized_expression "(byte)" (( "(") (identifier "byte") () ")")) (- "-") (identifier "local_1c"))) (; ";")) (expression_statement "bVar1 = bVar3 & 0x1f;" (assignment_expression "bVar1 = bVar3 & 0x1f" (identifier "bVar1") (= "=") (binary_expression "bVar3 & 0x1f" (identifier "bVar3") (& "&") (number_literal "0x1f"))) (; ";")) (expression_statement "uVar4 = uVar7 >> (bVar3 & 0x1f);" (assignment_expression "uVar4 = uVar7 >> (bVar3 & 0x1f)" (identifier "uVar4") (= "=") (binary_expression "uVar7 >> (bVar3 & 0x1f)" (identifier "uVar7") (>> ">>") (parenthesized_expression "(bVar3 & 0x1f)" (( "(") (binary_expression "bVar3 & 0x1f" (identifier "bVar3") (& "&") (number_literal "0x1f")) () ")")))) (; ";")) (expression_statement "uVar2 = uVar2 >> bVar1 | uVar7 << 0x20 - bVar1;" (assignment_expression "uVar2 = uVar2 >> bVar1 | uVar7 << 0x20 - bVar1" (identifier "uVar2") (= "=") (binary_expression "uVar2 >> bVar1 | uVar7 << 0x20 - bVar1" (binary_expression "uVar2 >> bVar1" (identifier "uVar2") (>> ">>") (identifier "bVar1")) (| "|") (binary_expression "uVar7 << 0x20 - bVar1" (identifier "uVar7") (<< "<<") (binary_expression "0x20 - bVar1" (number_literal "0x20") (- "-") (identifier "bVar1"))))) (; ";")) (expression_statement "uVar7 = uVar4;" (assignment_expression "uVar7 = uVar4" (identifier "uVar7") (= "=") (identifier "uVar4")) (; ";")) (if_statement "if ((-local_1c & 0x20U) != 0) {\n      uVar7 = 0;\n      uVar2 = uVar4;\n    }" (if "if") (parenthesized_expression "((-local_1c & 0x20U) != 0)" (( "(") (binary_expression "(-local_1c & 0x20U) != 0" (parenthesized_expression "(-local_1c & 0x20U)" (( "(") (binary_expression "-local_1c & 0x20U" (unary_expression "-local_1c" (- "-") (identifier "local_1c")) (& "&") (number_literal "0x20U")) () ")")) (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n      uVar7 = 0;\n      uVar2 = uVar4;\n    }" ({ "{") (expression_statement "uVar7 = 0;" (assignment_expression "uVar7 = 0" (identifier "uVar7") (= "=") (number_literal "0")) (; ";")) (expression_statement "uVar2 = uVar4;" (assignment_expression "uVar2 = uVar4" (identifier "uVar2") (= "=") (identifier "uVar4")) (; ";")) (} "}"))) (} "}"))) (return_statement "return CONCAT44(uVar7,uVar2);" (return "return") (call_expression "CONCAT44(uVar7,uVar2)" (identifier "CONCAT44") (argument_list "(uVar7,uVar2)" (( "(") (identifier "uVar7") (, ",") (identifier "uVar2") () ")"))) (; ";")) (} "}")))

uint64_t function_1(uint8_t *var_3,int var_2,int var_1)

{
  type_1 var_11;
  type_2 var_7;
  type_1 var_10;
  type_2 var_9;
  type_1 *var_8;
  type_2 var_6;
  int var_4;
  type_1 *var_5;
  
  var_4 = var_1 - (var_2 + 1);
  var_7 = (1 << ((type_1)(var_2 + 1) & 0x1f)) - 1U & (type_2)*var_3;
  var_6 = 0;
  if (0 < var_4) {
    var_9 = var_4 - 1U >> 3;
    var_5 = var_3 + 1;
    do {
      var_8 = var_5 + 1;
      var_6 = var_6 << 8 | var_7 >> 0x18;
      var_7 = (type_2)*var_5 | var_7 << 8;
      var_5 = var_8;
    } while (var_8 != var_3 + var_9 + 2);
    var_4 = var_4 + -8 + var_9 * -8;
  }
  if (var_4 != 0) {
    var_10 = (type_1)-var_4;
    var_11 = var_10 & 0x1f;
    var_9 = var_6 >> (var_10 & 0x1f);
    var_7 = var_7 >> var_11 | var_6 << 0x20 - var_11;
    var_6 = var_9;
    if ((-var_4 & 0x20U) != 0) {
      var_6 = 0;
      var_7 = var_9;
    }
  }
  return var_12(var_6,var_7);
}


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

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

{
  byte bVar1;
  uint uVar2;
  byte bVar3;
  uint uVar4;
  byte *pbVar5;
  uint uVar7;
  int local_1c;
  byte *pbVar6;
  
  local_1c = param_3 - (param_2 + 1);
  uVar2 = (1 << ((byte)(param_2 + 1) & 0x1f)) - 1U & (uint)*param_1;
  uVar7 = 0;
  if (0 < local_1c) {
    uVar4 = local_1c - 1U >> 3;
    pbVar6 = param_1 + 1;
    do {
      pbVar5 = pbVar6 + 1;
      uVar7 = uVar7 << 8 | uVar2 >> 0x18;
      uVar2 = (uint)*pbVar6 | uVar2 << 8;
      pbVar6 = pbVar5;
    } while (pbVar5 != param_1 + uVar4 + 2);
    local_1c = local_1c + -8 + uVar4 * -8;
  }
  if (local_1c != 0) {
    bVar3 = (byte)-local_1c;
    bVar1 = bVar3 & 0x1f;
    uVar4 = uVar7 >> (bVar3 & 0x1f);
    uVar2 = uVar2 >> bVar1 | uVar7 << 0x20 - bVar1;
    uVar7 = uVar4;
    if ((-local_1c & 0x20U) != 0) {
      uVar7 = 0;
      uVar2 = uVar4;
    }
  }
  return CONCAT44(uVar7,uVar2);
}

