
void btreeParseCellPtr(MemPage *pPage,u8 *pCell,CellInfo *pInfo)

{
  uint uVar1;
  uint uVar2;
  uint uVar3;
  u8 *pIter;
  byte *pbVar4;
  byte *pbVar5;
  byte *pbVar6;
  uint uVar7;
  
  uVar1 = (uint)*pCell;
  pbVar6 = pCell;
  if (0x7f < uVar1) {
    uVar1 = uVar1 & 0x7f;
    do {
      pbVar6 = pbVar6 + 1;
      uVar1 = *pbVar6 & 0x7f | uVar1 << 7;
      if (-1 < (char)*pbVar6) break;
    } while (pCell + 8 != pbVar6);
  }
  uVar2 = (uint)pbVar6[1];
  pbVar4 = pbVar6 + 1;
  uVar7 = 0;
  if (0x7f < uVar2) {
    uVar2 = uVar2 & 0x7f;
    do {
      pbVar5 = pbVar4;
      uVar3 = uVar2 << 7;
      pbVar4 = pbVar5 + 1;
      uVar7 = uVar2 >> 0x19 | uVar7 << 7;
      uVar2 = uVar3 | pbVar5[1] & 0x7f;
      if (-1 < (char)pbVar5[1]) goto LAB_000411f4;
    } while (pbVar4 != pbVar6 + 8);
    pbVar4 = pbVar5 + 2;
    uVar7 = uVar3 >> 0x18 | uVar7 << 8;
    uVar2 = uVar2 << 8 | (uint)pbVar6[9];
  }
LAB_000411f4:
  pbVar4 = pbVar4 + 1;
  *(uint *)&pInfo->nKey = uVar7;
  *(uint *)((int)&pInfo->nKey + 4) = uVar2;
  pInfo->nPayload = uVar1;
  pInfo->pPayload = pbVar4;
  if (pPage->maxLocal < uVar1) {
    btreeParseCellAdjustSizeForOverflow(pPage,pCell,pInfo);
    return;
  }
  if (((uint)(pbVar4 + ((uVar1 & 0xffff) - (int)pCell)) & 0xffff) < 4) {
    pInfo->nLocal = (u16)uVar1;
    pInfo->nSize = 4;
    return;
  }
  pInfo->nSize = (u16)(pbVar4 + ((uVar1 & 0xffff) - (int)pCell));
  pInfo->nLocal = (u16)uVar1;
  return;
}



void FUN_00041140(int param_1,byte *param_2,uint *param_3)

{
  uint uVar1;
  uint uVar2;
  uint uVar3;
  byte *pbVar4;
  byte *pbVar5;
  byte *pbVar6;
  uint uVar7;
  
  uVar1 = (uint)*param_2;
  pbVar6 = param_2;
  if (0x7f < uVar1) {
    uVar1 = uVar1 & 0x7f;
    do {
      pbVar6 = pbVar6 + 1;
      uVar1 = *pbVar6 & 0x7f | uVar1 << 7;
      if (-1 < (char)*pbVar6) break;
    } while (param_2 + 8 != pbVar6);
  }
  uVar2 = (uint)pbVar6[1];
  pbVar4 = pbVar6 + 1;
  uVar7 = 0;
  if (0x7f < uVar2) {
    uVar2 = uVar2 & 0x7f;
    do {
      pbVar5 = pbVar4;
      uVar3 = uVar2 << 7;
      pbVar4 = pbVar5 + 1;
      uVar7 = uVar2 >> 0x19 | uVar7 << 7;
      uVar2 = uVar3 | pbVar5[1] & 0x7f;
      if (-1 < (char)pbVar5[1]) goto LAB_000411f4;
    } while (pbVar4 != pbVar6 + 8);
    pbVar4 = pbVar5 + 2;
    uVar7 = uVar3 >> 0x18 | uVar7 << 8;
    uVar2 = uVar2 << 8 | (uint)pbVar6[9];
  }
LAB_000411f4:
  pbVar4 = pbVar4 + 1;
  *param_3 = uVar7;
  param_3[1] = uVar2;
  param_3[3] = uVar1;
  param_3[2] = (uint)pbVar4;
  if (*(ushort *)(param_1 + 0xe) < uVar1) {
    FUN_00041094();
    return;
  }
  if (((uint)(pbVar4 + ((uVar1 & 0xffff) - (int)param_2)) & 0xffff) < 4) {
    *(short *)(param_3 + 4) = (short)uVar1;
    *(undefined2 *)((int)param_3 + 0x12) = 4;
    return;
  }
  *(short *)((int)param_3 + 0x12) = (short)(pbVar4 + ((uVar1 & 0xffff) - (int)param_2));
  *(short *)(param_3 + 4) = (short)uVar1;
  return;
}


lui gp,0x15
addiu gp,gp,0x77e0
addu gp,gp,t9
lbu v0,0x0(a1)
sltiu v1,v0,0x80
bne v1,zero,0x00041188
_or t0,a1,zero
addiu a3,a1,0x8
andi v0,v0,0x7f
addiu t0,t0,0x1
lbu v1,0x0(t0)
sll v0,v0,0x7
andi t1,v1,0x7f
seb v1,v1
bgez v1,0x00041188
_or v0,t1,v0
bne a3,t0,0x00041164
_nop
lbu v1,0x1(t0)
addiu a3,t0,0x1
sltiu t2,v1,0x80
bne t2,zero,0x000411f4
_or t1,zero,zero
andi v1,v1,0x7f
b 0x000411ac
_addiu t6,t0,0x8
or a3,t3,zero
lbu t2,0x1(a3)
srl t5,v1,0x19
sll t1,t1,0x7
sll v1,v1,0x7
andi t4,t2,0x7f
seb t2,t2
addiu t3,a3,0x1
or t1,t5,t1
bgez t2,0x0004125c
_or v1,v1,t4
bne t3,t6,0x000411a8
_srl t2,v1,0x18
lbu t0,0x9(t0)
sll t1,t1,0x8
sll v1,v1,0x8
addiu a3,a3,0x2
or t1,t2,t1
or v1,v1,t0
addiu a3,a3,0x1
sw t1,0x0(a2)
sw v1,0x4(a2)
sw v0,0xc(a2)
sw a3,0x8(a2)
lhu v1,0xe(a0)
sltu v1,v1,v0
bne v1,zero,0x00041250
_lw t9,-0x7de0(gp)
subu a3,a3,a1
andi v0,v0,0xffff
addu a3,v0,a3
andi a3,a3,0xffff
sltiu v1,a3,0x4
bne v1,zero,0x00041240
_nop
sh a3,0x12(a2)
jr ra
_sh v0,0x10(a2)
li v1,0x4
sh v0,0x10(a2)
jr ra
_sh v1,0x12(a2)
addiu t9,t9,0x1094
b 0x00041094
_nop
b 0x000411f4
_or a3,t3,zero
(translation_unit "void FUN_00041140(int param_1,byte *param_2,uint *param_3)\n\n{\n  uint uVar1;\n  uint uVar2;\n  uint uVar3;\n  byte *pbVar4;\n  byte *pbVar5;\n  byte *pbVar6;\n  uint uVar7;\n  \n  uVar1 = (uint)*param_2;\n  pbVar6 = param_2;\n  if (0x7f < uVar1) {\n    uVar1 = uVar1 & 0x7f;\n    do {\n      pbVar6 = pbVar6 + 1;\n      uVar1 = *pbVar6 & 0x7f | uVar1 << 7;\n      if (-1 < (char)*pbVar6) break;\n    } while (param_2 + 8 != pbVar6);\n  }\n  uVar2 = (uint)pbVar6[1];\n  pbVar4 = pbVar6 + 1;\n  uVar7 = 0;\n  if (0x7f < uVar2) {\n    uVar2 = uVar2 & 0x7f;\n    do {\n      pbVar5 = pbVar4;\n      uVar3 = uVar2 << 7;\n      pbVar4 = pbVar5 + 1;\n      uVar7 = uVar2 >> 0x19 | uVar7 << 7;\n      uVar2 = uVar3 | pbVar5[1] & 0x7f;\n      if (-1 < (char)pbVar5[1]) goto LAB_000411f4;\n    } while (pbVar4 != pbVar6 + 8);\n    pbVar4 = pbVar5 + 2;\n    uVar7 = uVar3 >> 0x18 | uVar7 << 8;\n    uVar2 = uVar2 << 8 | (uint)pbVar6[9];\n  }\nLAB_000411f4:\n  pbVar4 = pbVar4 + 1;\n  *param_3 = uVar7;\n  param_3[1] = uVar2;\n  param_3[3] = uVar1;\n  param_3[2] = (uint)pbVar4;\n  if (*(ushort *)(param_1 + 0xe) < uVar1) {\n    FUN_00041094();\n    return;\n  }\n  if (((uint)(pbVar4 + ((uVar1 & 0xffff) - (int)param_2)) & 0xffff) < 4) {\n    *(short *)(param_3 + 4) = (short)uVar1;\n    *(undefined2 *)((int)param_3 + 0x12) = 4;\n    return;\n  }\n  *(short *)((int)param_3 + 0x12) = (short)(pbVar4 + ((uVar1 & 0xffff) - (int)param_2));\n  *(short *)(param_3 + 4) = (short)uVar1;\n  return;\n}\n\n" (function_definition "void FUN_00041140(int param_1,byte *param_2,uint *param_3)\n\n{\n  uint uVar1;\n  uint uVar2;\n  uint uVar3;\n  byte *pbVar4;\n  byte *pbVar5;\n  byte *pbVar6;\n  uint uVar7;\n  \n  uVar1 = (uint)*param_2;\n  pbVar6 = param_2;\n  if (0x7f < uVar1) {\n    uVar1 = uVar1 & 0x7f;\n    do {\n      pbVar6 = pbVar6 + 1;\n      uVar1 = *pbVar6 & 0x7f | uVar1 << 7;\n      if (-1 < (char)*pbVar6) break;\n    } while (param_2 + 8 != pbVar6);\n  }\n  uVar2 = (uint)pbVar6[1];\n  pbVar4 = pbVar6 + 1;\n  uVar7 = 0;\n  if (0x7f < uVar2) {\n    uVar2 = uVar2 & 0x7f;\n    do {\n      pbVar5 = pbVar4;\n      uVar3 = uVar2 << 7;\n      pbVar4 = pbVar5 + 1;\n      uVar7 = uVar2 >> 0x19 | uVar7 << 7;\n      uVar2 = uVar3 | pbVar5[1] & 0x7f;\n      if (-1 < (char)pbVar5[1]) goto LAB_000411f4;\n    } while (pbVar4 != pbVar6 + 8);\n    pbVar4 = pbVar5 + 2;\n    uVar7 = uVar3 >> 0x18 | uVar7 << 8;\n    uVar2 = uVar2 << 8 | (uint)pbVar6[9];\n  }\nLAB_000411f4:\n  pbVar4 = pbVar4 + 1;\n  *param_3 = uVar7;\n  param_3[1] = uVar2;\n  param_3[3] = uVar1;\n  param_3[2] = (uint)pbVar4;\n  if (*(ushort *)(param_1 + 0xe) < uVar1) {\n    FUN_00041094();\n    return;\n  }\n  if (((uint)(pbVar4 + ((uVar1 & 0xffff) - (int)param_2)) & 0xffff) < 4) {\n    *(short *)(param_3 + 4) = (short)uVar1;\n    *(undefined2 *)((int)param_3 + 0x12) = 4;\n    return;\n  }\n  *(short *)((int)param_3 + 0x12) = (short)(pbVar4 + ((uVar1 & 0xffff) - (int)param_2));\n  *(short *)(param_3 + 4) = (short)uVar1;\n  return;\n}" primitive_type (function_declarator "FUN_00041140(int param_1,byte *param_2,uint *param_3)" identifier (parameter_list "(int param_1,byte *param_2,uint *param_3)" ( (parameter_declaration "int param_1" primitive_type identifier) , (parameter_declaration "byte *param_2" type_identifier (pointer_declarator "*param_2" * identifier)) , (parameter_declaration "uint *param_3" type_identifier (pointer_declarator "*param_3" * identifier)) ))) (compound_statement "{\n  uint uVar1;\n  uint uVar2;\n  uint uVar3;\n  byte *pbVar4;\n  byte *pbVar5;\n  byte *pbVar6;\n  uint uVar7;\n  \n  uVar1 = (uint)*param_2;\n  pbVar6 = param_2;\n  if (0x7f < uVar1) {\n    uVar1 = uVar1 & 0x7f;\n    do {\n      pbVar6 = pbVar6 + 1;\n      uVar1 = *pbVar6 & 0x7f | uVar1 << 7;\n      if (-1 < (char)*pbVar6) break;\n    } while (param_2 + 8 != pbVar6);\n  }\n  uVar2 = (uint)pbVar6[1];\n  pbVar4 = pbVar6 + 1;\n  uVar7 = 0;\n  if (0x7f < uVar2) {\n    uVar2 = uVar2 & 0x7f;\n    do {\n      pbVar5 = pbVar4;\n      uVar3 = uVar2 << 7;\n      pbVar4 = pbVar5 + 1;\n      uVar7 = uVar2 >> 0x19 | uVar7 << 7;\n      uVar2 = uVar3 | pbVar5[1] & 0x7f;\n      if (-1 < (char)pbVar5[1]) goto LAB_000411f4;\n    } while (pbVar4 != pbVar6 + 8);\n    pbVar4 = pbVar5 + 2;\n    uVar7 = uVar3 >> 0x18 | uVar7 << 8;\n    uVar2 = uVar2 << 8 | (uint)pbVar6[9];\n  }\nLAB_000411f4:\n  pbVar4 = pbVar4 + 1;\n  *param_3 = uVar7;\n  param_3[1] = uVar2;\n  param_3[3] = uVar1;\n  param_3[2] = (uint)pbVar4;\n  if (*(ushort *)(param_1 + 0xe) < uVar1) {\n    FUN_00041094();\n    return;\n  }\n  if (((uint)(pbVar4 + ((uVar1 & 0xffff) - (int)param_2)) & 0xffff) < 4) {\n    *(short *)(param_3 + 4) = (short)uVar1;\n    *(undefined2 *)((int)param_3 + 0x12) = 4;\n    return;\n  }\n  *(short *)((int)param_3 + 0x12) = (short)(pbVar4 + ((uVar1 & 0xffff) - (int)param_2));\n  *(short *)(param_3 + 4) = (short)uVar1;\n  return;\n}" { (declaration "uint uVar1;" type_identifier identifier ;) (declaration "uint uVar2;" type_identifier identifier ;) (declaration "uint uVar3;" type_identifier identifier ;) (declaration "byte *pbVar4;" type_identifier (pointer_declarator "*pbVar4" * identifier) ;) (declaration "byte *pbVar5;" type_identifier (pointer_declarator "*pbVar5" * identifier) ;) (declaration "byte *pbVar6;" type_identifier (pointer_declarator "*pbVar6" * identifier) ;) (declaration "uint uVar7;" type_identifier identifier ;) (expression_statement "uVar1 = (uint)*param_2;" (assignment_expression "uVar1 = (uint)*param_2" identifier = (binary_expression "(uint)*param_2" (parenthesized_expression "(uint)" ( identifier )) * identifier)) ;) (expression_statement "pbVar6 = param_2;" (assignment_expression "pbVar6 = param_2" identifier = identifier) ;) (if_statement "if (0x7f < uVar1) {\n    uVar1 = uVar1 & 0x7f;\n    do {\n      pbVar6 = pbVar6 + 1;\n      uVar1 = *pbVar6 & 0x7f | uVar1 << 7;\n      if (-1 < (char)*pbVar6) break;\n    } while (param_2 + 8 != pbVar6);\n  }" if (parenthesized_expression "(0x7f < uVar1)" ( (binary_expression "0x7f < uVar1" number_literal < identifier) )) (compound_statement "{\n    uVar1 = uVar1 & 0x7f;\n    do {\n      pbVar6 = pbVar6 + 1;\n      uVar1 = *pbVar6 & 0x7f | uVar1 << 7;\n      if (-1 < (char)*pbVar6) break;\n    } while (param_2 + 8 != pbVar6);\n  }" { (expression_statement "uVar1 = uVar1 & 0x7f;" (assignment_expression "uVar1 = uVar1 & 0x7f" identifier = (binary_expression "uVar1 & 0x7f" identifier & number_literal)) ;) (do_statement "do {\n      pbVar6 = pbVar6 + 1;\n      uVar1 = *pbVar6 & 0x7f | uVar1 << 7;\n      if (-1 < (char)*pbVar6) break;\n    } while (param_2 + 8 != pbVar6);" do (compound_statement "{\n      pbVar6 = pbVar6 + 1;\n      uVar1 = *pbVar6 & 0x7f | uVar1 << 7;\n      if (-1 < (char)*pbVar6) break;\n    }" { (expression_statement "pbVar6 = pbVar6 + 1;" (assignment_expression "pbVar6 = pbVar6 + 1" identifier = (binary_expression "pbVar6 + 1" identifier + number_literal)) ;) (expression_statement "uVar1 = *pbVar6 & 0x7f | uVar1 << 7;" (assignment_expression "uVar1 = *pbVar6 & 0x7f | uVar1 << 7" identifier = (binary_expression "*pbVar6 & 0x7f | uVar1 << 7" (binary_expression "*pbVar6 & 0x7f" (pointer_expression "*pbVar6" * identifier) & number_literal) | (binary_expression "uVar1 << 7" identifier << number_literal))) ;) (if_statement "if (-1 < (char)*pbVar6) break;" if (parenthesized_expression "(-1 < (char)*pbVar6)" ( (binary_expression "-1 < (char)*pbVar6" number_literal < (cast_expression "(char)*pbVar6" ( (type_descriptor "char" primitive_type) ) (pointer_expression "*pbVar6" * identifier))) )) (break_statement "break;" break ;)) }) while (parenthesized_expression "(param_2 + 8 != pbVar6)" ( (binary_expression "param_2 + 8 != pbVar6" (binary_expression "param_2 + 8" identifier + number_literal) != identifier) )) ;) })) (expression_statement "uVar2 = (uint)pbVar6[1];" (assignment_expression "uVar2 = (uint)pbVar6[1]" identifier = (cast_expression "(uint)pbVar6[1]" ( (type_descriptor "uint" type_identifier) ) (subscript_expression "pbVar6[1]" identifier [ number_literal ]))) ;) (expression_statement "pbVar4 = pbVar6 + 1;" (assignment_expression "pbVar4 = pbVar6 + 1" identifier = (binary_expression "pbVar6 + 1" identifier + number_literal)) ;) (expression_statement "uVar7 = 0;" (assignment_expression "uVar7 = 0" identifier = number_literal) ;) (if_statement "if (0x7f < uVar2) {\n    uVar2 = uVar2 & 0x7f;\n    do {\n      pbVar5 = pbVar4;\n      uVar3 = uVar2 << 7;\n      pbVar4 = pbVar5 + 1;\n      uVar7 = uVar2 >> 0x19 | uVar7 << 7;\n      uVar2 = uVar3 | pbVar5[1] & 0x7f;\n      if (-1 < (char)pbVar5[1]) goto LAB_000411f4;\n    } while (pbVar4 != pbVar6 + 8);\n    pbVar4 = pbVar5 + 2;\n    uVar7 = uVar3 >> 0x18 | uVar7 << 8;\n    uVar2 = uVar2 << 8 | (uint)pbVar6[9];\n  }" if (parenthesized_expression "(0x7f < uVar2)" ( (binary_expression "0x7f < uVar2" number_literal < identifier) )) (compound_statement "{\n    uVar2 = uVar2 & 0x7f;\n    do {\n      pbVar5 = pbVar4;\n      uVar3 = uVar2 << 7;\n      pbVar4 = pbVar5 + 1;\n      uVar7 = uVar2 >> 0x19 | uVar7 << 7;\n      uVar2 = uVar3 | pbVar5[1] & 0x7f;\n      if (-1 < (char)pbVar5[1]) goto LAB_000411f4;\n    } while (pbVar4 != pbVar6 + 8);\n    pbVar4 = pbVar5 + 2;\n    uVar7 = uVar3 >> 0x18 | uVar7 << 8;\n    uVar2 = uVar2 << 8 | (uint)pbVar6[9];\n  }" { (expression_statement "uVar2 = uVar2 & 0x7f;" (assignment_expression "uVar2 = uVar2 & 0x7f" identifier = (binary_expression "uVar2 & 0x7f" identifier & number_literal)) ;) (do_statement "do {\n      pbVar5 = pbVar4;\n      uVar3 = uVar2 << 7;\n      pbVar4 = pbVar5 + 1;\n      uVar7 = uVar2 >> 0x19 | uVar7 << 7;\n      uVar2 = uVar3 | pbVar5[1] & 0x7f;\n      if (-1 < (char)pbVar5[1]) goto LAB_000411f4;\n    } while (pbVar4 != pbVar6 + 8);" do (compound_statement "{\n      pbVar5 = pbVar4;\n      uVar3 = uVar2 << 7;\n      pbVar4 = pbVar5 + 1;\n      uVar7 = uVar2 >> 0x19 | uVar7 << 7;\n      uVar2 = uVar3 | pbVar5[1] & 0x7f;\n      if (-1 < (char)pbVar5[1]) goto LAB_000411f4;\n    }" { (expression_statement "pbVar5 = pbVar4;" (assignment_expression "pbVar5 = pbVar4" identifier = identifier) ;) (expression_statement "uVar3 = uVar2 << 7;" (assignment_expression "uVar3 = uVar2 << 7" identifier = (binary_expression "uVar2 << 7" identifier << number_literal)) ;) (expression_statement "pbVar4 = pbVar5 + 1;" (assignment_expression "pbVar4 = pbVar5 + 1" identifier = (binary_expression "pbVar5 + 1" identifier + number_literal)) ;) (expression_statement "uVar7 = uVar2 >> 0x19 | uVar7 << 7;" (assignment_expression "uVar7 = uVar2 >> 0x19 | uVar7 << 7" identifier = (binary_expression "uVar2 >> 0x19 | uVar7 << 7" (binary_expression "uVar2 >> 0x19" identifier >> number_literal) | (binary_expression "uVar7 << 7" identifier << number_literal))) ;) (expression_statement "uVar2 = uVar3 | pbVar5[1] & 0x7f;" (assignment_expression "uVar2 = uVar3 | pbVar5[1] & 0x7f" identifier = (binary_expression "uVar3 | pbVar5[1] & 0x7f" identifier | (binary_expression "pbVar5[1] & 0x7f" (subscript_expression "pbVar5[1]" identifier [ number_literal ]) & number_literal))) ;) (if_statement "if (-1 < (char)pbVar5[1]) goto LAB_000411f4;" if (parenthesized_expression "(-1 < (char)pbVar5[1])" ( (binary_expression "-1 < (char)pbVar5[1]" number_literal < (cast_expression "(char)pbVar5[1]" ( (type_descriptor "char" primitive_type) ) (subscript_expression "pbVar5[1]" identifier [ number_literal ]))) )) (goto_statement "goto LAB_000411f4;" goto statement_identifier ;)) }) while (parenthesized_expression "(pbVar4 != pbVar6 + 8)" ( (binary_expression "pbVar4 != pbVar6 + 8" identifier != (binary_expression "pbVar6 + 8" identifier + number_literal)) )) ;) (expression_statement "pbVar4 = pbVar5 + 2;" (assignment_expression "pbVar4 = pbVar5 + 2" identifier = (binary_expression "pbVar5 + 2" identifier + number_literal)) ;) (expression_statement "uVar7 = uVar3 >> 0x18 | uVar7 << 8;" (assignment_expression "uVar7 = uVar3 >> 0x18 | uVar7 << 8" identifier = (binary_expression "uVar3 >> 0x18 | uVar7 << 8" (binary_expression "uVar3 >> 0x18" identifier >> number_literal) | (binary_expression "uVar7 << 8" identifier << number_literal))) ;) (expression_statement "uVar2 = uVar2 << 8 | (uint)pbVar6[9];" (assignment_expression "uVar2 = uVar2 << 8 | (uint)pbVar6[9]" identifier = (binary_expression "uVar2 << 8 | (uint)pbVar6[9]" (binary_expression "uVar2 << 8" identifier << number_literal) | (cast_expression "(uint)pbVar6[9]" ( (type_descriptor "uint" type_identifier) ) (subscript_expression "pbVar6[9]" identifier [ number_literal ])))) ;) })) (labeled_statement "LAB_000411f4:\n  pbVar4 = pbVar4 + 1;" statement_identifier : (expression_statement "pbVar4 = pbVar4 + 1;" (assignment_expression "pbVar4 = pbVar4 + 1" identifier = (binary_expression "pbVar4 + 1" identifier + number_literal)) ;)) (expression_statement "*param_3 = uVar7;" (assignment_expression "*param_3 = uVar7" (pointer_expression "*param_3" * identifier) = identifier) ;) (expression_statement "param_3[1] = uVar2;" (assignment_expression "param_3[1] = uVar2" (subscript_expression "param_3[1]" identifier [ number_literal ]) = identifier) ;) (expression_statement "param_3[3] = uVar1;" (assignment_expression "param_3[3] = uVar1" (subscript_expression "param_3[3]" identifier [ number_literal ]) = identifier) ;) (expression_statement "param_3[2] = (uint)pbVar4;" (assignment_expression "param_3[2] = (uint)pbVar4" (subscript_expression "param_3[2]" identifier [ number_literal ]) = (cast_expression "(uint)pbVar4" ( (type_descriptor "uint" type_identifier) ) identifier)) ;) (if_statement "if (*(ushort *)(param_1 + 0xe) < uVar1) {\n    FUN_00041094();\n    return;\n  }" if (parenthesized_expression "(*(ushort *)(param_1 + 0xe) < uVar1)" ( (binary_expression "*(ushort *)(param_1 + 0xe) < uVar1" (pointer_expression "*(ushort *)(param_1 + 0xe)" * (cast_expression "(ushort *)(param_1 + 0xe)" ( (type_descriptor "ushort *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0xe)" ( (binary_expression "param_1 + 0xe" identifier + number_literal) )))) < identifier) )) (compound_statement "{\n    FUN_00041094();\n    return;\n  }" { (expression_statement "FUN_00041094();" (call_expression "FUN_00041094()" identifier (argument_list "()" ( ))) ;) (return_statement "return;" return ;) })) (if_statement "if (((uint)(pbVar4 + ((uVar1 & 0xffff) - (int)param_2)) & 0xffff) < 4) {\n    *(short *)(param_3 + 4) = (short)uVar1;\n    *(undefined2 *)((int)param_3 + 0x12) = 4;\n    return;\n  }" if (parenthesized_expression "(((uint)(pbVar4 + ((uVar1 & 0xffff) - (int)param_2)) & 0xffff) < 4)" ( (binary_expression "((uint)(pbVar4 + ((uVar1 & 0xffff) - (int)param_2)) & 0xffff) < 4" (parenthesized_expression "((uint)(pbVar4 + ((uVar1 & 0xffff) - (int)param_2)) & 0xffff)" ( (binary_expression "(uint)(pbVar4 + ((uVar1 & 0xffff) - (int)param_2)) & 0xffff" (call_expression "(uint)(pbVar4 + ((uVar1 & 0xffff) - (int)param_2))" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(pbVar4 + ((uVar1 & 0xffff) - (int)param_2))" ( (binary_expression "pbVar4 + ((uVar1 & 0xffff) - (int)param_2)" identifier + (parenthesized_expression "((uVar1 & 0xffff) - (int)param_2)" ( (binary_expression "(uVar1 & 0xffff) - (int)param_2" (parenthesized_expression "(uVar1 & 0xffff)" ( (binary_expression "uVar1 & 0xffff" identifier & number_literal) )) - (cast_expression "(int)param_2" ( (type_descriptor "int" primitive_type) ) identifier)) ))) ))) & number_literal) )) < number_literal) )) (compound_statement "{\n    *(short *)(param_3 + 4) = (short)uVar1;\n    *(undefined2 *)((int)param_3 + 0x12) = 4;\n    return;\n  }" { (expression_statement "*(short *)(param_3 + 4) = (short)uVar1;" (assignment_expression "*(short *)(param_3 + 4) = (short)uVar1" (pointer_expression "*(short *)(param_3 + 4)" * (cast_expression "(short *)(param_3 + 4)" ( (type_descriptor "short *" (sized_type_specifier "short" short) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_3 + 4)" ( (binary_expression "param_3 + 4" identifier + number_literal) )))) = (cast_expression "(short)uVar1" ( (type_descriptor "short" (sized_type_specifier "short" short)) ) identifier)) ;) (expression_statement "*(undefined2 *)((int)param_3 + 0x12) = 4;" (assignment_expression "*(undefined2 *)((int)param_3 + 0x12) = 4" (pointer_expression "*(undefined2 *)((int)param_3 + 0x12)" * (cast_expression "(undefined2 *)((int)param_3 + 0x12)" ( (type_descriptor "undefined2 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)param_3 + 0x12)" ( (binary_expression "(int)param_3 + 0x12" (cast_expression "(int)param_3" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal) )))) = number_literal) ;) (return_statement "return;" return ;) })) (expression_statement "*(short *)((int)param_3 + 0x12) = (short)(pbVar4 + ((uVar1 & 0xffff) - (int)param_2));" (assignment_expression "*(short *)((int)param_3 + 0x12) = (short)(pbVar4 + ((uVar1 & 0xffff) - (int)param_2))" (pointer_expression "*(short *)((int)param_3 + 0x12)" * (cast_expression "(short *)((int)param_3 + 0x12)" ( (type_descriptor "short *" (sized_type_specifier "short" short) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)param_3 + 0x12)" ( (binary_expression "(int)param_3 + 0x12" (cast_expression "(int)param_3" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal) )))) = (cast_expression "(short)(pbVar4 + ((uVar1 & 0xffff) - (int)param_2))" ( (type_descriptor "short" (sized_type_specifier "short" short)) ) (parenthesized_expression "(pbVar4 + ((uVar1 & 0xffff) - (int)param_2))" ( (binary_expression "pbVar4 + ((uVar1 & 0xffff) - (int)param_2)" identifier + (parenthesized_expression "((uVar1 & 0xffff) - (int)param_2)" ( (binary_expression "(uVar1 & 0xffff) - (int)param_2" (parenthesized_expression "(uVar1 & 0xffff)" ( (binary_expression "uVar1 & 0xffff" identifier & number_literal) )) - (cast_expression "(int)param_2" ( (type_descriptor "int" primitive_type) ) identifier)) ))) )))) ;) (expression_statement "*(short *)(param_3 + 4) = (short)uVar1;" (assignment_expression "*(short *)(param_3 + 4) = (short)uVar1" (pointer_expression "*(short *)(param_3 + 4)" * (cast_expression "(short *)(param_3 + 4)" ( (type_descriptor "short *" (sized_type_specifier "short" short) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_3 + 4)" ( (binary_expression "param_3 + 4" identifier + number_literal) )))) = (cast_expression "(short)uVar1" ( (type_descriptor "short" (sized_type_specifier "short" short)) ) identifier)) ;) (return_statement "return;" return ;) })))
(translation_unit "void btreeParseCellPtr(MemPage *pPage,u8 *pCell,CellInfo *pInfo)\n\n{\n  uint uVar1;\n  uint uVar2;\n  uint uVar3;\n  u8 *pIter;\n  byte *pbVar4;\n  byte *pbVar5;\n  byte *pbVar6;\n  uint uVar7;\n  \n  uVar1 = (uint)*pCell;\n  pbVar6 = pCell;\n  if (0x7f < uVar1) {\n    uVar1 = uVar1 & 0x7f;\n    do {\n      pbVar6 = pbVar6 + 1;\n      uVar1 = *pbVar6 & 0x7f | uVar1 << 7;\n      if (-1 < (char)*pbVar6) break;\n    } while (pCell + 8 != pbVar6);\n  }\n  uVar2 = (uint)pbVar6[1];\n  pbVar4 = pbVar6 + 1;\n  uVar7 = 0;\n  if (0x7f < uVar2) {\n    uVar2 = uVar2 & 0x7f;\n    do {\n      pbVar5 = pbVar4;\n      uVar3 = uVar2 << 7;\n      pbVar4 = pbVar5 + 1;\n      uVar7 = uVar2 >> 0x19 | uVar7 << 7;\n      uVar2 = uVar3 | pbVar5[1] & 0x7f;\n      if (-1 < (char)pbVar5[1]) goto LAB_000411f4;\n    } while (pbVar4 != pbVar6 + 8);\n    pbVar4 = pbVar5 + 2;\n    uVar7 = uVar3 >> 0x18 | uVar7 << 8;\n    uVar2 = uVar2 << 8 | (uint)pbVar6[9];\n  }\nLAB_000411f4:\n  pbVar4 = pbVar4 + 1;\n  *(uint *)&pInfo->nKey = uVar7;\n  *(uint *)((int)&pInfo->nKey + 4) = uVar2;\n  pInfo->nPayload = uVar1;\n  pInfo->pPayload = pbVar4;\n  if (pPage->maxLocal < uVar1) {\n    btreeParseCellAdjustSizeForOverflow(pPage,pCell,pInfo);\n    return;\n  }\n  if (((uint)(pbVar4 + ((uVar1 & 0xffff) - (int)pCell)) & 0xffff) < 4) {\n    pInfo->nLocal = (u16)uVar1;\n    pInfo->nSize = 4;\n    return;\n  }\n  pInfo->nSize = (u16)(pbVar4 + ((uVar1 & 0xffff) - (int)pCell));\n  pInfo->nLocal = (u16)uVar1;\n  return;\n}\n\n" (function_definition "void btreeParseCellPtr(MemPage *pPage,u8 *pCell,CellInfo *pInfo)\n\n{\n  uint uVar1;\n  uint uVar2;\n  uint uVar3;\n  u8 *pIter;\n  byte *pbVar4;\n  byte *pbVar5;\n  byte *pbVar6;\n  uint uVar7;\n  \n  uVar1 = (uint)*pCell;\n  pbVar6 = pCell;\n  if (0x7f < uVar1) {\n    uVar1 = uVar1 & 0x7f;\n    do {\n      pbVar6 = pbVar6 + 1;\n      uVar1 = *pbVar6 & 0x7f | uVar1 << 7;\n      if (-1 < (char)*pbVar6) break;\n    } while (pCell + 8 != pbVar6);\n  }\n  uVar2 = (uint)pbVar6[1];\n  pbVar4 = pbVar6 + 1;\n  uVar7 = 0;\n  if (0x7f < uVar2) {\n    uVar2 = uVar2 & 0x7f;\n    do {\n      pbVar5 = pbVar4;\n      uVar3 = uVar2 << 7;\n      pbVar4 = pbVar5 + 1;\n      uVar7 = uVar2 >> 0x19 | uVar7 << 7;\n      uVar2 = uVar3 | pbVar5[1] & 0x7f;\n      if (-1 < (char)pbVar5[1]) goto LAB_000411f4;\n    } while (pbVar4 != pbVar6 + 8);\n    pbVar4 = pbVar5 + 2;\n    uVar7 = uVar3 >> 0x18 | uVar7 << 8;\n    uVar2 = uVar2 << 8 | (uint)pbVar6[9];\n  }\nLAB_000411f4:\n  pbVar4 = pbVar4 + 1;\n  *(uint *)&pInfo->nKey = uVar7;\n  *(uint *)((int)&pInfo->nKey + 4) = uVar2;\n  pInfo->nPayload = uVar1;\n  pInfo->pPayload = pbVar4;\n  if (pPage->maxLocal < uVar1) {\n    btreeParseCellAdjustSizeForOverflow(pPage,pCell,pInfo);\n    return;\n  }\n  if (((uint)(pbVar4 + ((uVar1 & 0xffff) - (int)pCell)) & 0xffff) < 4) {\n    pInfo->nLocal = (u16)uVar1;\n    pInfo->nSize = 4;\n    return;\n  }\n  pInfo->nSize = (u16)(pbVar4 + ((uVar1 & 0xffff) - (int)pCell));\n  pInfo->nLocal = (u16)uVar1;\n  return;\n}" primitive_type (function_declarator "btreeParseCellPtr(MemPage *pPage,u8 *pCell,CellInfo *pInfo)" identifier (parameter_list "(MemPage *pPage,u8 *pCell,CellInfo *pInfo)" ( (parameter_declaration "MemPage *pPage" type_identifier (pointer_declarator "*pPage" * identifier)) , (parameter_declaration "u8 *pCell" type_identifier (pointer_declarator "*pCell" * identifier)) , (parameter_declaration "CellInfo *pInfo" type_identifier (pointer_declarator "*pInfo" * identifier)) ))) (compound_statement "{\n  uint uVar1;\n  uint uVar2;\n  uint uVar3;\n  u8 *pIter;\n  byte *pbVar4;\n  byte *pbVar5;\n  byte *pbVar6;\n  uint uVar7;\n  \n  uVar1 = (uint)*pCell;\n  pbVar6 = pCell;\n  if (0x7f < uVar1) {\n    uVar1 = uVar1 & 0x7f;\n    do {\n      pbVar6 = pbVar6 + 1;\n      uVar1 = *pbVar6 & 0x7f | uVar1 << 7;\n      if (-1 < (char)*pbVar6) break;\n    } while (pCell + 8 != pbVar6);\n  }\n  uVar2 = (uint)pbVar6[1];\n  pbVar4 = pbVar6 + 1;\n  uVar7 = 0;\n  if (0x7f < uVar2) {\n    uVar2 = uVar2 & 0x7f;\n    do {\n      pbVar5 = pbVar4;\n      uVar3 = uVar2 << 7;\n      pbVar4 = pbVar5 + 1;\n      uVar7 = uVar2 >> 0x19 | uVar7 << 7;\n      uVar2 = uVar3 | pbVar5[1] & 0x7f;\n      if (-1 < (char)pbVar5[1]) goto LAB_000411f4;\n    } while (pbVar4 != pbVar6 + 8);\n    pbVar4 = pbVar5 + 2;\n    uVar7 = uVar3 >> 0x18 | uVar7 << 8;\n    uVar2 = uVar2 << 8 | (uint)pbVar6[9];\n  }\nLAB_000411f4:\n  pbVar4 = pbVar4 + 1;\n  *(uint *)&pInfo->nKey = uVar7;\n  *(uint *)((int)&pInfo->nKey + 4) = uVar2;\n  pInfo->nPayload = uVar1;\n  pInfo->pPayload = pbVar4;\n  if (pPage->maxLocal < uVar1) {\n    btreeParseCellAdjustSizeForOverflow(pPage,pCell,pInfo);\n    return;\n  }\n  if (((uint)(pbVar4 + ((uVar1 & 0xffff) - (int)pCell)) & 0xffff) < 4) {\n    pInfo->nLocal = (u16)uVar1;\n    pInfo->nSize = 4;\n    return;\n  }\n  pInfo->nSize = (u16)(pbVar4 + ((uVar1 & 0xffff) - (int)pCell));\n  pInfo->nLocal = (u16)uVar1;\n  return;\n}" { (declaration "uint uVar1;" type_identifier identifier ;) (declaration "uint uVar2;" type_identifier identifier ;) (declaration "uint uVar3;" type_identifier identifier ;) (declaration "u8 *pIter;" type_identifier (pointer_declarator "*pIter" * identifier) ;) (declaration "byte *pbVar4;" type_identifier (pointer_declarator "*pbVar4" * identifier) ;) (declaration "byte *pbVar5;" type_identifier (pointer_declarator "*pbVar5" * identifier) ;) (declaration "byte *pbVar6;" type_identifier (pointer_declarator "*pbVar6" * identifier) ;) (declaration "uint uVar7;" type_identifier identifier ;) (expression_statement "uVar1 = (uint)*pCell;" (assignment_expression "uVar1 = (uint)*pCell" identifier = (binary_expression "(uint)*pCell" (parenthesized_expression "(uint)" ( identifier )) * identifier)) ;) (expression_statement "pbVar6 = pCell;" (assignment_expression "pbVar6 = pCell" identifier = identifier) ;) (if_statement "if (0x7f < uVar1) {\n    uVar1 = uVar1 & 0x7f;\n    do {\n      pbVar6 = pbVar6 + 1;\n      uVar1 = *pbVar6 & 0x7f | uVar1 << 7;\n      if (-1 < (char)*pbVar6) break;\n    } while (pCell + 8 != pbVar6);\n  }" if (parenthesized_expression "(0x7f < uVar1)" ( (binary_expression "0x7f < uVar1" number_literal < identifier) )) (compound_statement "{\n    uVar1 = uVar1 & 0x7f;\n    do {\n      pbVar6 = pbVar6 + 1;\n      uVar1 = *pbVar6 & 0x7f | uVar1 << 7;\n      if (-1 < (char)*pbVar6) break;\n    } while (pCell + 8 != pbVar6);\n  }" { (expression_statement "uVar1 = uVar1 & 0x7f;" (assignment_expression "uVar1 = uVar1 & 0x7f" identifier = (binary_expression "uVar1 & 0x7f" identifier & number_literal)) ;) (do_statement "do {\n      pbVar6 = pbVar6 + 1;\n      uVar1 = *pbVar6 & 0x7f | uVar1 << 7;\n      if (-1 < (char)*pbVar6) break;\n    } while (pCell + 8 != pbVar6);" do (compound_statement "{\n      pbVar6 = pbVar6 + 1;\n      uVar1 = *pbVar6 & 0x7f | uVar1 << 7;\n      if (-1 < (char)*pbVar6) break;\n    }" { (expression_statement "pbVar6 = pbVar6 + 1;" (assignment_expression "pbVar6 = pbVar6 + 1" identifier = (binary_expression "pbVar6 + 1" identifier + number_literal)) ;) (expression_statement "uVar1 = *pbVar6 & 0x7f | uVar1 << 7;" (assignment_expression "uVar1 = *pbVar6 & 0x7f | uVar1 << 7" identifier = (binary_expression "*pbVar6 & 0x7f | uVar1 << 7" (binary_expression "*pbVar6 & 0x7f" (pointer_expression "*pbVar6" * identifier) & number_literal) | (binary_expression "uVar1 << 7" identifier << number_literal))) ;) (if_statement "if (-1 < (char)*pbVar6) break;" if (parenthesized_expression "(-1 < (char)*pbVar6)" ( (binary_expression "-1 < (char)*pbVar6" number_literal < (cast_expression "(char)*pbVar6" ( (type_descriptor "char" primitive_type) ) (pointer_expression "*pbVar6" * identifier))) )) (break_statement "break;" break ;)) }) while (parenthesized_expression "(pCell + 8 != pbVar6)" ( (binary_expression "pCell + 8 != pbVar6" (binary_expression "pCell + 8" identifier + number_literal) != identifier) )) ;) })) (expression_statement "uVar2 = (uint)pbVar6[1];" (assignment_expression "uVar2 = (uint)pbVar6[1]" identifier = (cast_expression "(uint)pbVar6[1]" ( (type_descriptor "uint" type_identifier) ) (subscript_expression "pbVar6[1]" identifier [ number_literal ]))) ;) (expression_statement "pbVar4 = pbVar6 + 1;" (assignment_expression "pbVar4 = pbVar6 + 1" identifier = (binary_expression "pbVar6 + 1" identifier + number_literal)) ;) (expression_statement "uVar7 = 0;" (assignment_expression "uVar7 = 0" identifier = number_literal) ;) (if_statement "if (0x7f < uVar2) {\n    uVar2 = uVar2 & 0x7f;\n    do {\n      pbVar5 = pbVar4;\n      uVar3 = uVar2 << 7;\n      pbVar4 = pbVar5 + 1;\n      uVar7 = uVar2 >> 0x19 | uVar7 << 7;\n      uVar2 = uVar3 | pbVar5[1] & 0x7f;\n      if (-1 < (char)pbVar5[1]) goto LAB_000411f4;\n    } while (pbVar4 != pbVar6 + 8);\n    pbVar4 = pbVar5 + 2;\n    uVar7 = uVar3 >> 0x18 | uVar7 << 8;\n    uVar2 = uVar2 << 8 | (uint)pbVar6[9];\n  }" if (parenthesized_expression "(0x7f < uVar2)" ( (binary_expression "0x7f < uVar2" number_literal < identifier) )) (compound_statement "{\n    uVar2 = uVar2 & 0x7f;\n    do {\n      pbVar5 = pbVar4;\n      uVar3 = uVar2 << 7;\n      pbVar4 = pbVar5 + 1;\n      uVar7 = uVar2 >> 0x19 | uVar7 << 7;\n      uVar2 = uVar3 | pbVar5[1] & 0x7f;\n      if (-1 < (char)pbVar5[1]) goto LAB_000411f4;\n    } while (pbVar4 != pbVar6 + 8);\n    pbVar4 = pbVar5 + 2;\n    uVar7 = uVar3 >> 0x18 | uVar7 << 8;\n    uVar2 = uVar2 << 8 | (uint)pbVar6[9];\n  }" { (expression_statement "uVar2 = uVar2 & 0x7f;" (assignment_expression "uVar2 = uVar2 & 0x7f" identifier = (binary_expression "uVar2 & 0x7f" identifier & number_literal)) ;) (do_statement "do {\n      pbVar5 = pbVar4;\n      uVar3 = uVar2 << 7;\n      pbVar4 = pbVar5 + 1;\n      uVar7 = uVar2 >> 0x19 | uVar7 << 7;\n      uVar2 = uVar3 | pbVar5[1] & 0x7f;\n      if (-1 < (char)pbVar5[1]) goto LAB_000411f4;\n    } while (pbVar4 != pbVar6 + 8);" do (compound_statement "{\n      pbVar5 = pbVar4;\n      uVar3 = uVar2 << 7;\n      pbVar4 = pbVar5 + 1;\n      uVar7 = uVar2 >> 0x19 | uVar7 << 7;\n      uVar2 = uVar3 | pbVar5[1] & 0x7f;\n      if (-1 < (char)pbVar5[1]) goto LAB_000411f4;\n    }" { (expression_statement "pbVar5 = pbVar4;" (assignment_expression "pbVar5 = pbVar4" identifier = identifier) ;) (expression_statement "uVar3 = uVar2 << 7;" (assignment_expression "uVar3 = uVar2 << 7" identifier = (binary_expression "uVar2 << 7" identifier << number_literal)) ;) (expression_statement "pbVar4 = pbVar5 + 1;" (assignment_expression "pbVar4 = pbVar5 + 1" identifier = (binary_expression "pbVar5 + 1" identifier + number_literal)) ;) (expression_statement "uVar7 = uVar2 >> 0x19 | uVar7 << 7;" (assignment_expression "uVar7 = uVar2 >> 0x19 | uVar7 << 7" identifier = (binary_expression "uVar2 >> 0x19 | uVar7 << 7" (binary_expression "uVar2 >> 0x19" identifier >> number_literal) | (binary_expression "uVar7 << 7" identifier << number_literal))) ;) (expression_statement "uVar2 = uVar3 | pbVar5[1] & 0x7f;" (assignment_expression "uVar2 = uVar3 | pbVar5[1] & 0x7f" identifier = (binary_expression "uVar3 | pbVar5[1] & 0x7f" identifier | (binary_expression "pbVar5[1] & 0x7f" (subscript_expression "pbVar5[1]" identifier [ number_literal ]) & number_literal))) ;) (if_statement "if (-1 < (char)pbVar5[1]) goto LAB_000411f4;" if (parenthesized_expression "(-1 < (char)pbVar5[1])" ( (binary_expression "-1 < (char)pbVar5[1]" number_literal < (cast_expression "(char)pbVar5[1]" ( (type_descriptor "char" primitive_type) ) (subscript_expression "pbVar5[1]" identifier [ number_literal ]))) )) (goto_statement "goto LAB_000411f4;" goto statement_identifier ;)) }) while (parenthesized_expression "(pbVar4 != pbVar6 + 8)" ( (binary_expression "pbVar4 != pbVar6 + 8" identifier != (binary_expression "pbVar6 + 8" identifier + number_literal)) )) ;) (expression_statement "pbVar4 = pbVar5 + 2;" (assignment_expression "pbVar4 = pbVar5 + 2" identifier = (binary_expression "pbVar5 + 2" identifier + number_literal)) ;) (expression_statement "uVar7 = uVar3 >> 0x18 | uVar7 << 8;" (assignment_expression "uVar7 = uVar3 >> 0x18 | uVar7 << 8" identifier = (binary_expression "uVar3 >> 0x18 | uVar7 << 8" (binary_expression "uVar3 >> 0x18" identifier >> number_literal) | (binary_expression "uVar7 << 8" identifier << number_literal))) ;) (expression_statement "uVar2 = uVar2 << 8 | (uint)pbVar6[9];" (assignment_expression "uVar2 = uVar2 << 8 | (uint)pbVar6[9]" identifier = (binary_expression "uVar2 << 8 | (uint)pbVar6[9]" (binary_expression "uVar2 << 8" identifier << number_literal) | (cast_expression "(uint)pbVar6[9]" ( (type_descriptor "uint" type_identifier) ) (subscript_expression "pbVar6[9]" identifier [ number_literal ])))) ;) })) (labeled_statement "LAB_000411f4:\n  pbVar4 = pbVar4 + 1;" statement_identifier : (expression_statement "pbVar4 = pbVar4 + 1;" (assignment_expression "pbVar4 = pbVar4 + 1" identifier = (binary_expression "pbVar4 + 1" identifier + number_literal)) ;)) (expression_statement "*(uint *)&pInfo->nKey = uVar7;" (assignment_expression "*(uint *)&pInfo->nKey = uVar7" (pointer_expression "*(uint *)&pInfo->nKey" * (cast_expression "(uint *)&pInfo->nKey" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "&pInfo->nKey" & (field_expression "pInfo->nKey" identifier -> field_identifier)))) = identifier) ;) (expression_statement "*(uint *)((int)&pInfo->nKey + 4) = uVar2;" (assignment_expression "*(uint *)((int)&pInfo->nKey + 4) = uVar2" (pointer_expression "*(uint *)((int)&pInfo->nKey + 4)" * (cast_expression "(uint *)((int)&pInfo->nKey + 4)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)&pInfo->nKey + 4)" ( (binary_expression "(int)&pInfo->nKey + 4" (cast_expression "(int)&pInfo->nKey" ( (type_descriptor "int" primitive_type) ) (pointer_expression "&pInfo->nKey" & (field_expression "pInfo->nKey" identifier -> field_identifier))) + number_literal) )))) = identifier) ;) (expression_statement "pInfo->nPayload = uVar1;" (assignment_expression "pInfo->nPayload = uVar1" (field_expression "pInfo->nPayload" identifier -> field_identifier) = identifier) ;) (expression_statement "pInfo->pPayload = pbVar4;" (assignment_expression "pInfo->pPayload = pbVar4" (field_expression "pInfo->pPayload" identifier -> field_identifier) = identifier) ;) (if_statement "if (pPage->maxLocal < uVar1) {\n    btreeParseCellAdjustSizeForOverflow(pPage,pCell,pInfo);\n    return;\n  }" if (parenthesized_expression "(pPage->maxLocal < uVar1)" ( (binary_expression "pPage->maxLocal < uVar1" (field_expression "pPage->maxLocal" identifier -> field_identifier) < identifier) )) (compound_statement "{\n    btreeParseCellAdjustSizeForOverflow(pPage,pCell,pInfo);\n    return;\n  }" { (expression_statement "btreeParseCellAdjustSizeForOverflow(pPage,pCell,pInfo);" (call_expression "btreeParseCellAdjustSizeForOverflow(pPage,pCell,pInfo)" identifier (argument_list "(pPage,pCell,pInfo)" ( identifier , identifier , identifier ))) ;) (return_statement "return;" return ;) })) (if_statement "if (((uint)(pbVar4 + ((uVar1 & 0xffff) - (int)pCell)) & 0xffff) < 4) {\n    pInfo->nLocal = (u16)uVar1;\n    pInfo->nSize = 4;\n    return;\n  }" if (parenthesized_expression "(((uint)(pbVar4 + ((uVar1 & 0xffff) - (int)pCell)) & 0xffff) < 4)" ( (binary_expression "((uint)(pbVar4 + ((uVar1 & 0xffff) - (int)pCell)) & 0xffff) < 4" (parenthesized_expression "((uint)(pbVar4 + ((uVar1 & 0xffff) - (int)pCell)) & 0xffff)" ( (binary_expression "(uint)(pbVar4 + ((uVar1 & 0xffff) - (int)pCell)) & 0xffff" (call_expression "(uint)(pbVar4 + ((uVar1 & 0xffff) - (int)pCell))" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(pbVar4 + ((uVar1 & 0xffff) - (int)pCell))" ( (binary_expression "pbVar4 + ((uVar1 & 0xffff) - (int)pCell)" identifier + (parenthesized_expression "((uVar1 & 0xffff) - (int)pCell)" ( (binary_expression "(uVar1 & 0xffff) - (int)pCell" (parenthesized_expression "(uVar1 & 0xffff)" ( (binary_expression "uVar1 & 0xffff" identifier & number_literal) )) - (cast_expression "(int)pCell" ( (type_descriptor "int" primitive_type) ) identifier)) ))) ))) & number_literal) )) < number_literal) )) (compound_statement "{\n    pInfo->nLocal = (u16)uVar1;\n    pInfo->nSize = 4;\n    return;\n  }" { (expression_statement "pInfo->nLocal = (u16)uVar1;" (assignment_expression "pInfo->nLocal = (u16)uVar1" (field_expression "pInfo->nLocal" identifier -> field_identifier) = (cast_expression "(u16)uVar1" ( (type_descriptor "u16" type_identifier) ) identifier)) ;) (expression_statement "pInfo->nSize = 4;" (assignment_expression "pInfo->nSize = 4" (field_expression "pInfo->nSize" identifier -> field_identifier) = number_literal) ;) (return_statement "return;" return ;) })) (expression_statement "pInfo->nSize = (u16)(pbVar4 + ((uVar1 & 0xffff) - (int)pCell));" (assignment_expression "pInfo->nSize = (u16)(pbVar4 + ((uVar1 & 0xffff) - (int)pCell))" (field_expression "pInfo->nSize" identifier -> field_identifier) = (call_expression "(u16)(pbVar4 + ((uVar1 & 0xffff) - (int)pCell))" (parenthesized_expression "(u16)" ( identifier )) (argument_list "(pbVar4 + ((uVar1 & 0xffff) - (int)pCell))" ( (binary_expression "pbVar4 + ((uVar1 & 0xffff) - (int)pCell)" identifier + (parenthesized_expression "((uVar1 & 0xffff) - (int)pCell)" ( (binary_expression "(uVar1 & 0xffff) - (int)pCell" (parenthesized_expression "(uVar1 & 0xffff)" ( (binary_expression "uVar1 & 0xffff" identifier & number_literal) )) - (cast_expression "(int)pCell" ( (type_descriptor "int" primitive_type) ) identifier)) ))) )))) ;) (expression_statement "pInfo->nLocal = (u16)uVar1;" (assignment_expression "pInfo->nLocal = (u16)uVar1" (field_expression "pInfo->nLocal" identifier -> field_identifier) = (cast_expression "(u16)uVar1" ( (type_descriptor "u16" type_identifier) ) identifier)) ;) (return_statement "return;" return ;) })))
(translation_unit "void FUN_00041140(int param_1,byte *param_2,uint *param_3)\n\n{\n  uint uVar1;\n  uint uVar2;\n  uint uVar3;\n  byte *pbVar4;\n  byte *pbVar5;\n  byte *pbVar6;\n  uint uVar7;\n  \n  uVar1 = (uint)*param_2;\n  pbVar6 = param_2;\n  if (0x7f < uVar1) {\n    uVar1 = uVar1 & 0x7f;\n    do {\n      pbVar6 = pbVar6 + 1;\n      uVar1 = *pbVar6 & 0x7f | uVar1 << 7;\n      if (-1 < (char)*pbVar6) break;\n    } while (param_2 + 8 != pbVar6);\n  }\n  uVar2 = (uint)pbVar6[1];\n  pbVar4 = pbVar6 + 1;\n  uVar7 = 0;\n  if (0x7f < uVar2) {\n    uVar2 = uVar2 & 0x7f;\n    do {\n      pbVar5 = pbVar4;\n      uVar3 = uVar2 << 7;\n      pbVar4 = pbVar5 + 1;\n      uVar7 = uVar2 >> 0x19 | uVar7 << 7;\n      uVar2 = uVar3 | pbVar5[1] & 0x7f;\n      if (-1 < (char)pbVar5[1]) goto LAB_000411f4;\n    } while (pbVar4 != pbVar6 + 8);\n    pbVar4 = pbVar5 + 2;\n    uVar7 = uVar3 >> 0x18 | uVar7 << 8;\n    uVar2 = uVar2 << 8 | (uint)pbVar6[9];\n  }\nLAB_000411f4:\n  pbVar4 = pbVar4 + 1;\n  *param_3 = uVar7;\n  param_3[1] = uVar2;\n  param_3[3] = uVar1;\n  param_3[2] = (uint)pbVar4;\n  if (*(ushort *)(param_1 + 0xe) < uVar1) {\n    FUN_00041094();\n    return;\n  }\n  if (((uint)(pbVar4 + ((uVar1 & 0xffff) - (int)param_2)) & 0xffff) < 4) {\n    *(short *)(param_3 + 4) = (short)uVar1;\n    *(undefined2 *)((int)param_3 + 0x12) = 4;\n    return;\n  }\n  *(short *)((int)param_3 + 0x12) = (short)(pbVar4 + ((uVar1 & 0xffff) - (int)param_2));\n  *(short *)(param_3 + 4) = (short)uVar1;\n  return;\n}\n\n" (function_definition "void FUN_00041140(int param_1,byte *param_2,uint *param_3)\n\n{\n  uint uVar1;\n  uint uVar2;\n  uint uVar3;\n  byte *pbVar4;\n  byte *pbVar5;\n  byte *pbVar6;\n  uint uVar7;\n  \n  uVar1 = (uint)*param_2;\n  pbVar6 = param_2;\n  if (0x7f < uVar1) {\n    uVar1 = uVar1 & 0x7f;\n    do {\n      pbVar6 = pbVar6 + 1;\n      uVar1 = *pbVar6 & 0x7f | uVar1 << 7;\n      if (-1 < (char)*pbVar6) break;\n    } while (param_2 + 8 != pbVar6);\n  }\n  uVar2 = (uint)pbVar6[1];\n  pbVar4 = pbVar6 + 1;\n  uVar7 = 0;\n  if (0x7f < uVar2) {\n    uVar2 = uVar2 & 0x7f;\n    do {\n      pbVar5 = pbVar4;\n      uVar3 = uVar2 << 7;\n      pbVar4 = pbVar5 + 1;\n      uVar7 = uVar2 >> 0x19 | uVar7 << 7;\n      uVar2 = uVar3 | pbVar5[1] & 0x7f;\n      if (-1 < (char)pbVar5[1]) goto LAB_000411f4;\n    } while (pbVar4 != pbVar6 + 8);\n    pbVar4 = pbVar5 + 2;\n    uVar7 = uVar3 >> 0x18 | uVar7 << 8;\n    uVar2 = uVar2 << 8 | (uint)pbVar6[9];\n  }\nLAB_000411f4:\n  pbVar4 = pbVar4 + 1;\n  *param_3 = uVar7;\n  param_3[1] = uVar2;\n  param_3[3] = uVar1;\n  param_3[2] = (uint)pbVar4;\n  if (*(ushort *)(param_1 + 0xe) < uVar1) {\n    FUN_00041094();\n    return;\n  }\n  if (((uint)(pbVar4 + ((uVar1 & 0xffff) - (int)param_2)) & 0xffff) < 4) {\n    *(short *)(param_3 + 4) = (short)uVar1;\n    *(undefined2 *)((int)param_3 + 0x12) = 4;\n    return;\n  }\n  *(short *)((int)param_3 + 0x12) = (short)(pbVar4 + ((uVar1 & 0xffff) - (int)param_2));\n  *(short *)(param_3 + 4) = (short)uVar1;\n  return;\n}" primitive_type (function_declarator "FUN_00041140(int param_1,byte *param_2,uint *param_3)" identifier (parameter_list "(int param_1,byte *param_2,uint *param_3)" ( (parameter_declaration "int param_1" primitive_type identifier) , (parameter_declaration "byte *param_2" type_identifier (pointer_declarator "*param_2" * identifier)) , (parameter_declaration "uint *param_3" type_identifier (pointer_declarator "*param_3" * identifier)) ))) (compound_statement "{\n  uint uVar1;\n  uint uVar2;\n  uint uVar3;\n  byte *pbVar4;\n  byte *pbVar5;\n  byte *pbVar6;\n  uint uVar7;\n  \n  uVar1 = (uint)*param_2;\n  pbVar6 = param_2;\n  if (0x7f < uVar1) {\n    uVar1 = uVar1 & 0x7f;\n    do {\n      pbVar6 = pbVar6 + 1;\n      uVar1 = *pbVar6 & 0x7f | uVar1 << 7;\n      if (-1 < (char)*pbVar6) break;\n    } while (param_2 + 8 != pbVar6);\n  }\n  uVar2 = (uint)pbVar6[1];\n  pbVar4 = pbVar6 + 1;\n  uVar7 = 0;\n  if (0x7f < uVar2) {\n    uVar2 = uVar2 & 0x7f;\n    do {\n      pbVar5 = pbVar4;\n      uVar3 = uVar2 << 7;\n      pbVar4 = pbVar5 + 1;\n      uVar7 = uVar2 >> 0x19 | uVar7 << 7;\n      uVar2 = uVar3 | pbVar5[1] & 0x7f;\n      if (-1 < (char)pbVar5[1]) goto LAB_000411f4;\n    } while (pbVar4 != pbVar6 + 8);\n    pbVar4 = pbVar5 + 2;\n    uVar7 = uVar3 >> 0x18 | uVar7 << 8;\n    uVar2 = uVar2 << 8 | (uint)pbVar6[9];\n  }\nLAB_000411f4:\n  pbVar4 = pbVar4 + 1;\n  *param_3 = uVar7;\n  param_3[1] = uVar2;\n  param_3[3] = uVar1;\n  param_3[2] = (uint)pbVar4;\n  if (*(ushort *)(param_1 + 0xe) < uVar1) {\n    FUN_00041094();\n    return;\n  }\n  if (((uint)(pbVar4 + ((uVar1 & 0xffff) - (int)param_2)) & 0xffff) < 4) {\n    *(short *)(param_3 + 4) = (short)uVar1;\n    *(undefined2 *)((int)param_3 + 0x12) = 4;\n    return;\n  }\n  *(short *)((int)param_3 + 0x12) = (short)(pbVar4 + ((uVar1 & 0xffff) - (int)param_2));\n  *(short *)(param_3 + 4) = (short)uVar1;\n  return;\n}" { (declaration "uint uVar1;" type_identifier identifier ;) (declaration "uint uVar2;" type_identifier identifier ;) (declaration "uint uVar3;" type_identifier identifier ;) (declaration "byte *pbVar4;" type_identifier (pointer_declarator "*pbVar4" * identifier) ;) (declaration "byte *pbVar5;" type_identifier (pointer_declarator "*pbVar5" * identifier) ;) (declaration "byte *pbVar6;" type_identifier (pointer_declarator "*pbVar6" * identifier) ;) (declaration "uint uVar7;" type_identifier identifier ;) (expression_statement "uVar1 = (uint)*param_2;" (assignment_expression "uVar1 = (uint)*param_2" identifier = (binary_expression "(uint)*param_2" (parenthesized_expression "(uint)" ( identifier )) * identifier)) ;) (expression_statement "pbVar6 = param_2;" (assignment_expression "pbVar6 = param_2" identifier = identifier) ;) (if_statement "if (0x7f < uVar1) {\n    uVar1 = uVar1 & 0x7f;\n    do {\n      pbVar6 = pbVar6 + 1;\n      uVar1 = *pbVar6 & 0x7f | uVar1 << 7;\n      if (-1 < (char)*pbVar6) break;\n    } while (param_2 + 8 != pbVar6);\n  }" if (parenthesized_expression "(0x7f < uVar1)" ( (binary_expression "0x7f < uVar1" number_literal < identifier) )) (compound_statement "{\n    uVar1 = uVar1 & 0x7f;\n    do {\n      pbVar6 = pbVar6 + 1;\n      uVar1 = *pbVar6 & 0x7f | uVar1 << 7;\n      if (-1 < (char)*pbVar6) break;\n    } while (param_2 + 8 != pbVar6);\n  }" { (expression_statement "uVar1 = uVar1 & 0x7f;" (assignment_expression "uVar1 = uVar1 & 0x7f" identifier = (binary_expression "uVar1 & 0x7f" identifier & number_literal)) ;) (do_statement "do {\n      pbVar6 = pbVar6 + 1;\n      uVar1 = *pbVar6 & 0x7f | uVar1 << 7;\n      if (-1 < (char)*pbVar6) break;\n    } while (param_2 + 8 != pbVar6);" do (compound_statement "{\n      pbVar6 = pbVar6 + 1;\n      uVar1 = *pbVar6 & 0x7f | uVar1 << 7;\n      if (-1 < (char)*pbVar6) break;\n    }" { (expression_statement "pbVar6 = pbVar6 + 1;" (assignment_expression "pbVar6 = pbVar6 + 1" identifier = (binary_expression "pbVar6 + 1" identifier + number_literal)) ;) (expression_statement "uVar1 = *pbVar6 & 0x7f | uVar1 << 7;" (assignment_expression "uVar1 = *pbVar6 & 0x7f | uVar1 << 7" identifier = (binary_expression "*pbVar6 & 0x7f | uVar1 << 7" (binary_expression "*pbVar6 & 0x7f" (pointer_expression "*pbVar6" * identifier) & number_literal) | (binary_expression "uVar1 << 7" identifier << number_literal))) ;) (if_statement "if (-1 < (char)*pbVar6) break;" if (parenthesized_expression "(-1 < (char)*pbVar6)" ( (binary_expression "-1 < (char)*pbVar6" number_literal < (cast_expression "(char)*pbVar6" ( (type_descriptor "char" primitive_type) ) (pointer_expression "*pbVar6" * identifier))) )) (break_statement "break;" break ;)) }) while (parenthesized_expression "(param_2 + 8 != pbVar6)" ( (binary_expression "param_2 + 8 != pbVar6" (binary_expression "param_2 + 8" identifier + number_literal) != identifier) )) ;) })) (expression_statement "uVar2 = (uint)pbVar6[1];" (assignment_expression "uVar2 = (uint)pbVar6[1]" identifier = (cast_expression "(uint)pbVar6[1]" ( (type_descriptor "uint" type_identifier) ) (subscript_expression "pbVar6[1]" identifier [ number_literal ]))) ;) (expression_statement "pbVar4 = pbVar6 + 1;" (assignment_expression "pbVar4 = pbVar6 + 1" identifier = (binary_expression "pbVar6 + 1" identifier + number_literal)) ;) (expression_statement "uVar7 = 0;" (assignment_expression "uVar7 = 0" identifier = number_literal) ;) (if_statement "if (0x7f < uVar2) {\n    uVar2 = uVar2 & 0x7f;\n    do {\n      pbVar5 = pbVar4;\n      uVar3 = uVar2 << 7;\n      pbVar4 = pbVar5 + 1;\n      uVar7 = uVar2 >> 0x19 | uVar7 << 7;\n      uVar2 = uVar3 | pbVar5[1] & 0x7f;\n      if (-1 < (char)pbVar5[1]) goto LAB_000411f4;\n    } while (pbVar4 != pbVar6 + 8);\n    pbVar4 = pbVar5 + 2;\n    uVar7 = uVar3 >> 0x18 | uVar7 << 8;\n    uVar2 = uVar2 << 8 | (uint)pbVar6[9];\n  }" if (parenthesized_expression "(0x7f < uVar2)" ( (binary_expression "0x7f < uVar2" number_literal < identifier) )) (compound_statement "{\n    uVar2 = uVar2 & 0x7f;\n    do {\n      pbVar5 = pbVar4;\n      uVar3 = uVar2 << 7;\n      pbVar4 = pbVar5 + 1;\n      uVar7 = uVar2 >> 0x19 | uVar7 << 7;\n      uVar2 = uVar3 | pbVar5[1] & 0x7f;\n      if (-1 < (char)pbVar5[1]) goto LAB_000411f4;\n    } while (pbVar4 != pbVar6 + 8);\n    pbVar4 = pbVar5 + 2;\n    uVar7 = uVar3 >> 0x18 | uVar7 << 8;\n    uVar2 = uVar2 << 8 | (uint)pbVar6[9];\n  }" { (expression_statement "uVar2 = uVar2 & 0x7f;" (assignment_expression "uVar2 = uVar2 & 0x7f" identifier = (binary_expression "uVar2 & 0x7f" identifier & number_literal)) ;) (do_statement "do {\n      pbVar5 = pbVar4;\n      uVar3 = uVar2 << 7;\n      pbVar4 = pbVar5 + 1;\n      uVar7 = uVar2 >> 0x19 | uVar7 << 7;\n      uVar2 = uVar3 | pbVar5[1] & 0x7f;\n      if (-1 < (char)pbVar5[1]) goto LAB_000411f4;\n    } while (pbVar4 != pbVar6 + 8);" do (compound_statement "{\n      pbVar5 = pbVar4;\n      uVar3 = uVar2 << 7;\n      pbVar4 = pbVar5 + 1;\n      uVar7 = uVar2 >> 0x19 | uVar7 << 7;\n      uVar2 = uVar3 | pbVar5[1] & 0x7f;\n      if (-1 < (char)pbVar5[1]) goto LAB_000411f4;\n    }" { (expression_statement "pbVar5 = pbVar4;" (assignment_expression "pbVar5 = pbVar4" identifier = identifier) ;) (expression_statement "uVar3 = uVar2 << 7;" (assignment_expression "uVar3 = uVar2 << 7" identifier = (binary_expression "uVar2 << 7" identifier << number_literal)) ;) (expression_statement "pbVar4 = pbVar5 + 1;" (assignment_expression "pbVar4 = pbVar5 + 1" identifier = (binary_expression "pbVar5 + 1" identifier + number_literal)) ;) (expression_statement "uVar7 = uVar2 >> 0x19 | uVar7 << 7;" (assignment_expression "uVar7 = uVar2 >> 0x19 | uVar7 << 7" identifier = (binary_expression "uVar2 >> 0x19 | uVar7 << 7" (binary_expression "uVar2 >> 0x19" identifier >> number_literal) | (binary_expression "uVar7 << 7" identifier << number_literal))) ;) (expression_statement "uVar2 = uVar3 | pbVar5[1] & 0x7f;" (assignment_expression "uVar2 = uVar3 | pbVar5[1] & 0x7f" identifier = (binary_expression "uVar3 | pbVar5[1] & 0x7f" identifier | (binary_expression "pbVar5[1] & 0x7f" (subscript_expression "pbVar5[1]" identifier [ number_literal ]) & number_literal))) ;) (if_statement "if (-1 < (char)pbVar5[1]) goto LAB_000411f4;" if (parenthesized_expression "(-1 < (char)pbVar5[1])" ( (binary_expression "-1 < (char)pbVar5[1]" number_literal < (cast_expression "(char)pbVar5[1]" ( (type_descriptor "char" primitive_type) ) (subscript_expression "pbVar5[1]" identifier [ number_literal ]))) )) (goto_statement "goto LAB_000411f4;" goto statement_identifier ;)) }) while (parenthesized_expression "(pbVar4 != pbVar6 + 8)" ( (binary_expression "pbVar4 != pbVar6 + 8" identifier != (binary_expression "pbVar6 + 8" identifier + number_literal)) )) ;) (expression_statement "pbVar4 = pbVar5 + 2;" (assignment_expression "pbVar4 = pbVar5 + 2" identifier = (binary_expression "pbVar5 + 2" identifier + number_literal)) ;) (expression_statement "uVar7 = uVar3 >> 0x18 | uVar7 << 8;" (assignment_expression "uVar7 = uVar3 >> 0x18 | uVar7 << 8" identifier = (binary_expression "uVar3 >> 0x18 | uVar7 << 8" (binary_expression "uVar3 >> 0x18" identifier >> number_literal) | (binary_expression "uVar7 << 8" identifier << number_literal))) ;) (expression_statement "uVar2 = uVar2 << 8 | (uint)pbVar6[9];" (assignment_expression "uVar2 = uVar2 << 8 | (uint)pbVar6[9]" identifier = (binary_expression "uVar2 << 8 | (uint)pbVar6[9]" (binary_expression "uVar2 << 8" identifier << number_literal) | (cast_expression "(uint)pbVar6[9]" ( (type_descriptor "uint" type_identifier) ) (subscript_expression "pbVar6[9]" identifier [ number_literal ])))) ;) })) (labeled_statement "LAB_000411f4:\n  pbVar4 = pbVar4 + 1;" statement_identifier : (expression_statement "pbVar4 = pbVar4 + 1;" (assignment_expression "pbVar4 = pbVar4 + 1" identifier = (binary_expression "pbVar4 + 1" identifier + number_literal)) ;)) (expression_statement "*param_3 = uVar7;" (assignment_expression "*param_3 = uVar7" (pointer_expression "*param_3" * identifier) = identifier) ;) (expression_statement "param_3[1] = uVar2;" (assignment_expression "param_3[1] = uVar2" (subscript_expression "param_3[1]" identifier [ number_literal ]) = identifier) ;) (expression_statement "param_3[3] = uVar1;" (assignment_expression "param_3[3] = uVar1" (subscript_expression "param_3[3]" identifier [ number_literal ]) = identifier) ;) (expression_statement "param_3[2] = (uint)pbVar4;" (assignment_expression "param_3[2] = (uint)pbVar4" (subscript_expression "param_3[2]" identifier [ number_literal ]) = (cast_expression "(uint)pbVar4" ( (type_descriptor "uint" type_identifier) ) identifier)) ;) (if_statement "if (*(ushort *)(param_1 + 0xe) < uVar1) {\n    FUN_00041094();\n    return;\n  }" if (parenthesized_expression "(*(ushort *)(param_1 + 0xe) < uVar1)" ( (binary_expression "*(ushort *)(param_1 + 0xe) < uVar1" (pointer_expression "*(ushort *)(param_1 + 0xe)" * (cast_expression "(ushort *)(param_1 + 0xe)" ( (type_descriptor "ushort *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0xe)" ( (binary_expression "param_1 + 0xe" identifier + number_literal) )))) < identifier) )) (compound_statement "{\n    FUN_00041094();\n    return;\n  }" { (expression_statement "FUN_00041094();" (call_expression "FUN_00041094()" identifier (argument_list "()" ( ))) ;) (return_statement "return;" return ;) })) (if_statement "if (((uint)(pbVar4 + ((uVar1 & 0xffff) - (int)param_2)) & 0xffff) < 4) {\n    *(short *)(param_3 + 4) = (short)uVar1;\n    *(undefined2 *)((int)param_3 + 0x12) = 4;\n    return;\n  }" if (parenthesized_expression "(((uint)(pbVar4 + ((uVar1 & 0xffff) - (int)param_2)) & 0xffff) < 4)" ( (binary_expression "((uint)(pbVar4 + ((uVar1 & 0xffff) - (int)param_2)) & 0xffff) < 4" (parenthesized_expression "((uint)(pbVar4 + ((uVar1 & 0xffff) - (int)param_2)) & 0xffff)" ( (binary_expression "(uint)(pbVar4 + ((uVar1 & 0xffff) - (int)param_2)) & 0xffff" (call_expression "(uint)(pbVar4 + ((uVar1 & 0xffff) - (int)param_2))" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(pbVar4 + ((uVar1 & 0xffff) - (int)param_2))" ( (binary_expression "pbVar4 + ((uVar1 & 0xffff) - (int)param_2)" identifier + (parenthesized_expression "((uVar1 & 0xffff) - (int)param_2)" ( (binary_expression "(uVar1 & 0xffff) - (int)param_2" (parenthesized_expression "(uVar1 & 0xffff)" ( (binary_expression "uVar1 & 0xffff" identifier & number_literal) )) - (cast_expression "(int)param_2" ( (type_descriptor "int" primitive_type) ) identifier)) ))) ))) & number_literal) )) < number_literal) )) (compound_statement "{\n    *(short *)(param_3 + 4) = (short)uVar1;\n    *(undefined2 *)((int)param_3 + 0x12) = 4;\n    return;\n  }" { (expression_statement "*(short *)(param_3 + 4) = (short)uVar1;" (assignment_expression "*(short *)(param_3 + 4) = (short)uVar1" (pointer_expression "*(short *)(param_3 + 4)" * (cast_expression "(short *)(param_3 + 4)" ( (type_descriptor "short *" (sized_type_specifier "short" short) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_3 + 4)" ( (binary_expression "param_3 + 4" identifier + number_literal) )))) = (cast_expression "(short)uVar1" ( (type_descriptor "short" (sized_type_specifier "short" short)) ) identifier)) ;) (expression_statement "*(undefined2 *)((int)param_3 + 0x12) = 4;" (assignment_expression "*(undefined2 *)((int)param_3 + 0x12) = 4" (pointer_expression "*(undefined2 *)((int)param_3 + 0x12)" * (cast_expression "(undefined2 *)((int)param_3 + 0x12)" ( (type_descriptor "undefined2 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)param_3 + 0x12)" ( (binary_expression "(int)param_3 + 0x12" (cast_expression "(int)param_3" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal) )))) = number_literal) ;) (return_statement "return;" return ;) })) (expression_statement "*(short *)((int)param_3 + 0x12) = (short)(pbVar4 + ((uVar1 & 0xffff) - (int)param_2));" (assignment_expression "*(short *)((int)param_3 + 0x12) = (short)(pbVar4 + ((uVar1 & 0xffff) - (int)param_2))" (pointer_expression "*(short *)((int)param_3 + 0x12)" * (cast_expression "(short *)((int)param_3 + 0x12)" ( (type_descriptor "short *" (sized_type_specifier "short" short) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)param_3 + 0x12)" ( (binary_expression "(int)param_3 + 0x12" (cast_expression "(int)param_3" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal) )))) = (cast_expression "(short)(pbVar4 + ((uVar1 & 0xffff) - (int)param_2))" ( (type_descriptor "short" (sized_type_specifier "short" short)) ) (parenthesized_expression "(pbVar4 + ((uVar1 & 0xffff) - (int)param_2))" ( (binary_expression "pbVar4 + ((uVar1 & 0xffff) - (int)param_2)" identifier + (parenthesized_expression "((uVar1 & 0xffff) - (int)param_2)" ( (binary_expression "(uVar1 & 0xffff) - (int)param_2" (parenthesized_expression "(uVar1 & 0xffff)" ( (binary_expression "uVar1 & 0xffff" identifier & number_literal) )) - (cast_expression "(int)param_2" ( (type_descriptor "int" primitive_type) ) identifier)) ))) )))) ;) (expression_statement "*(short *)(param_3 + 4) = (short)uVar1;" (assignment_expression "*(short *)(param_3 + 4) = (short)uVar1" (pointer_expression "*(short *)(param_3 + 4)" * (cast_expression "(short *)(param_3 + 4)" ( (type_descriptor "short *" (sized_type_specifier "short" short) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_3 + 4)" ( (binary_expression "param_3 + 4" identifier + number_literal) )))) = (cast_expression "(short)uVar1" ( (type_descriptor "short" (sized_type_specifier "short" short)) ) identifier)) ;) (return_statement "return;" return ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE (pointer_declarator * IDENT)) , (parameter_declaration TYPE (pointer_declarator * IDENT)) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = (binary_expression (parenthesized_expression ( IDENT )) * IDENT)) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (if_statement if (parenthesized_expression ( (binary_expression LIT < IDENT) )) (compound_statement { (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 (pointer_expression * IDENT) & LIT) | (binary_expression IDENT << LIT))) ;) (if_statement if (parenthesized_expression ( (binary_expression LIT < (cast_expression ( (type_descriptor TYPE) ) (pointer_expression * IDENT))) )) (break_statement break ;)) }) while (parenthesized_expression ( (binary_expression (binary_expression IDENT + LIT) != IDENT) )) ;) })) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE) ) (subscript_expression IDENT [ LIT ]))) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (expression_statement (assignment_expression IDENT = LIT) ;) (if_statement if (parenthesized_expression ( (binary_expression LIT < IDENT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression IDENT & LIT)) ;) (do_statement do (compound_statement { (expression_statement (assignment_expression IDENT = IDENT) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT << LIT)) ;) (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 IDENT | (binary_expression (subscript_expression IDENT [ LIT ]) & LIT))) ;) (if_statement if (parenthesized_expression ( (binary_expression LIT < (cast_expression ( (type_descriptor TYPE) ) (subscript_expression IDENT [ LIT ]))) )) (goto_statement goto statement_identifier ;)) }) while (parenthesized_expression ( (binary_expression IDENT != (binary_expression IDENT + LIT)) )) ;) (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 IDENT << LIT) | (cast_expression ( (type_descriptor TYPE) ) (subscript_expression IDENT [ LIT ])))) ;) })) (labeled_statement statement_identifier : (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;)) (expression_statement (assignment_expression (pointer_expression * IDENT) = IDENT) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = IDENT) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = IDENT) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = (cast_expression ( (type_descriptor TYPE) ) IDENT)) ;) (if_statement if (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) < IDENT) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( ))) ;) (return_statement return ;) })) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression (call_expression (parenthesized_expression ( IDENT )) (argument_list ( (binary_expression IDENT + (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT & LIT) )) - (cast_expression ( (type_descriptor TYPE) ) IDENT)) ))) ))) & LIT) )) < LIT) )) (compound_statement { (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor (sized_type_specifier short) (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = (cast_expression ( (type_descriptor (sized_type_specifier short)) ) IDENT)) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) + LIT) )))) = LIT) ;) (return_statement return ;) })) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor (sized_type_specifier short) (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) + LIT) )))) = (cast_expression ( (type_descriptor (sized_type_specifier short)) ) (parenthesized_expression ( (binary_expression IDENT + (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT & LIT) )) - (cast_expression ( (type_descriptor TYPE) ) IDENT)) ))) )))) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor (sized_type_specifier short) (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = (cast_expression ( (type_descriptor (sized_type_specifier short)) ) IDENT)) ;) (return_statement return ;) })))
(function_definition "void FUN_00041140(int param_1,byte *param_2,uint *param_3)\n\n{\n  uint uVar1;\n  uint uVar2;\n  uint uVar3;\n  byte *pbVar4;\n  byte *pbVar5;\n  byte *pbVar6;\n  uint uVar7;\n  \n  uVar1 = (uint)*param_2;\n  pbVar6 = param_2;\n  if (0x7f < uVar1) {\n    uVar1 = uVar1 & 0x7f;\n    do {\n      pbVar6 = pbVar6 + 1;\n      uVar1 = *pbVar6 & 0x7f | uVar1 << 7;\n      if (-1 < (char)*pbVar6) break;\n    } while (param_2 + 8 != pbVar6);\n  }\n  uVar2 = (uint)pbVar6[1];\n  pbVar4 = pbVar6 + 1;\n  uVar7 = 0;\n  if (0x7f < uVar2) {\n    uVar2 = uVar2 & 0x7f;\n    do {\n      pbVar5 = pbVar4;\n      uVar3 = uVar2 << 7;\n      pbVar4 = pbVar5 + 1;\n      uVar7 = uVar2 >> 0x19 | uVar7 << 7;\n      uVar2 = uVar3 | pbVar5[1] & 0x7f;\n      if (-1 < (char)pbVar5[1]) goto LAB_000411f4;\n    } while (pbVar4 != pbVar6 + 8);\n    pbVar4 = pbVar5 + 2;\n    uVar7 = uVar3 >> 0x18 | uVar7 << 8;\n    uVar2 = uVar2 << 8 | (uint)pbVar6[9];\n  }\nLAB_000411f4:\n  pbVar4 = pbVar4 + 1;\n  *param_3 = uVar7;\n  param_3[1] = uVar2;\n  param_3[3] = uVar1;\n  param_3[2] = (uint)pbVar4;\n  if (*(ushort *)(param_1 + 0xe) < uVar1) {\n    FUN_00041094();\n    return;\n  }\n  if (((uint)(pbVar4 + ((uVar1 & 0xffff) - (int)param_2)) & 0xffff) < 4) {\n    *(short *)(param_3 + 4) = (short)uVar1;\n    *(undefined2 *)((int)param_3 + 0x12) = 4;\n    return;\n  }\n  *(short *)((int)param_3 + 0x12) = (short)(pbVar4 + ((uVar1 & 0xffff) - (int)param_2));\n  *(short *)(param_3 + 4) = (short)uVar1;\n  return;\n}" (primitive_type "void") (function_declarator "FUN_00041140(int param_1,byte *param_2,uint *param_3)" (identifier "FUN_00041140") (parameter_list "(int param_1,byte *param_2,uint *param_3)" (( "(") (parameter_declaration "int param_1" (primitive_type "int") (identifier "param_1")) (, ",") (parameter_declaration "byte *param_2" (type_identifier "byte") (pointer_declarator "*param_2" (* "*") (identifier "param_2"))) (, ",") (parameter_declaration "uint *param_3" (type_identifier "uint") (pointer_declarator "*param_3" (* "*") (identifier "param_3"))) () ")"))) (compound_statement "{\n  uint uVar1;\n  uint uVar2;\n  uint uVar3;\n  byte *pbVar4;\n  byte *pbVar5;\n  byte *pbVar6;\n  uint uVar7;\n  \n  uVar1 = (uint)*param_2;\n  pbVar6 = param_2;\n  if (0x7f < uVar1) {\n    uVar1 = uVar1 & 0x7f;\n    do {\n      pbVar6 = pbVar6 + 1;\n      uVar1 = *pbVar6 & 0x7f | uVar1 << 7;\n      if (-1 < (char)*pbVar6) break;\n    } while (param_2 + 8 != pbVar6);\n  }\n  uVar2 = (uint)pbVar6[1];\n  pbVar4 = pbVar6 + 1;\n  uVar7 = 0;\n  if (0x7f < uVar2) {\n    uVar2 = uVar2 & 0x7f;\n    do {\n      pbVar5 = pbVar4;\n      uVar3 = uVar2 << 7;\n      pbVar4 = pbVar5 + 1;\n      uVar7 = uVar2 >> 0x19 | uVar7 << 7;\n      uVar2 = uVar3 | pbVar5[1] & 0x7f;\n      if (-1 < (char)pbVar5[1]) goto LAB_000411f4;\n    } while (pbVar4 != pbVar6 + 8);\n    pbVar4 = pbVar5 + 2;\n    uVar7 = uVar3 >> 0x18 | uVar7 << 8;\n    uVar2 = uVar2 << 8 | (uint)pbVar6[9];\n  }\nLAB_000411f4:\n  pbVar4 = pbVar4 + 1;\n  *param_3 = uVar7;\n  param_3[1] = uVar2;\n  param_3[3] = uVar1;\n  param_3[2] = (uint)pbVar4;\n  if (*(ushort *)(param_1 + 0xe) < uVar1) {\n    FUN_00041094();\n    return;\n  }\n  if (((uint)(pbVar4 + ((uVar1 & 0xffff) - (int)param_2)) & 0xffff) < 4) {\n    *(short *)(param_3 + 4) = (short)uVar1;\n    *(undefined2 *)((int)param_3 + 0x12) = 4;\n    return;\n  }\n  *(short *)((int)param_3 + 0x12) = (short)(pbVar4 + ((uVar1 & 0xffff) - (int)param_2));\n  *(short *)(param_3 + 4) = (short)uVar1;\n  return;\n}" ({ "{") (declaration "uint uVar1;" (type_identifier "uint") (identifier "uVar1") (; ";")) (declaration "uint uVar2;" (type_identifier "uint") (identifier "uVar2") (; ";")) (declaration "uint uVar3;" (type_identifier "uint") (identifier "uVar3") (; ";")) (declaration "byte *pbVar4;" (type_identifier "byte") (pointer_declarator "*pbVar4" (* "*") (identifier "pbVar4")) (; ";")) (declaration "byte *pbVar5;" (type_identifier "byte") (pointer_declarator "*pbVar5" (* "*") (identifier "pbVar5")) (; ";")) (declaration "byte *pbVar6;" (type_identifier "byte") (pointer_declarator "*pbVar6" (* "*") (identifier "pbVar6")) (; ";")) (declaration "uint uVar7;" (type_identifier "uint") (identifier "uVar7") (; ";")) (expression_statement "uVar1 = (uint)*param_2;" (assignment_expression "uVar1 = (uint)*param_2" (identifier "uVar1") (= "=") (binary_expression "(uint)*param_2" (parenthesized_expression "(uint)" (( "(") (identifier "uint") () ")")) (* "*") (identifier "param_2"))) (; ";")) (expression_statement "pbVar6 = param_2;" (assignment_expression "pbVar6 = param_2" (identifier "pbVar6") (= "=") (identifier "param_2")) (; ";")) (if_statement "if (0x7f < uVar1) {\n    uVar1 = uVar1 & 0x7f;\n    do {\n      pbVar6 = pbVar6 + 1;\n      uVar1 = *pbVar6 & 0x7f | uVar1 << 7;\n      if (-1 < (char)*pbVar6) break;\n    } while (param_2 + 8 != pbVar6);\n  }" (if "if") (parenthesized_expression "(0x7f < uVar1)" (( "(") (binary_expression "0x7f < uVar1" (number_literal "0x7f") (< "<") (identifier "uVar1")) () ")")) (compound_statement "{\n    uVar1 = uVar1 & 0x7f;\n    do {\n      pbVar6 = pbVar6 + 1;\n      uVar1 = *pbVar6 & 0x7f | uVar1 << 7;\n      if (-1 < (char)*pbVar6) break;\n    } while (param_2 + 8 != pbVar6);\n  }" ({ "{") (expression_statement "uVar1 = uVar1 & 0x7f;" (assignment_expression "uVar1 = uVar1 & 0x7f" (identifier "uVar1") (= "=") (binary_expression "uVar1 & 0x7f" (identifier "uVar1") (& "&") (number_literal "0x7f"))) (; ";")) (do_statement "do {\n      pbVar6 = pbVar6 + 1;\n      uVar1 = *pbVar6 & 0x7f | uVar1 << 7;\n      if (-1 < (char)*pbVar6) break;\n    } while (param_2 + 8 != pbVar6);" (do "do") (compound_statement "{\n      pbVar6 = pbVar6 + 1;\n      uVar1 = *pbVar6 & 0x7f | uVar1 << 7;\n      if (-1 < (char)*pbVar6) break;\n    }" ({ "{") (expression_statement "pbVar6 = pbVar6 + 1;" (assignment_expression "pbVar6 = pbVar6 + 1" (identifier "pbVar6") (= "=") (binary_expression "pbVar6 + 1" (identifier "pbVar6") (+ "+") (number_literal "1"))) (; ";")) (expression_statement "uVar1 = *pbVar6 & 0x7f | uVar1 << 7;" (assignment_expression "uVar1 = *pbVar6 & 0x7f | uVar1 << 7" (identifier "uVar1") (= "=") (binary_expression "*pbVar6 & 0x7f | uVar1 << 7" (binary_expression "*pbVar6 & 0x7f" (pointer_expression "*pbVar6" (* "*") (identifier "pbVar6")) (& "&") (number_literal "0x7f")) (| "|") (binary_expression "uVar1 << 7" (identifier "uVar1") (<< "<<") (number_literal "7")))) (; ";")) (if_statement "if (-1 < (char)*pbVar6) break;" (if "if") (parenthesized_expression "(-1 < (char)*pbVar6)" (( "(") (binary_expression "-1 < (char)*pbVar6" (number_literal "-1") (< "<") (cast_expression "(char)*pbVar6" (( "(") (type_descriptor "char" (primitive_type "char")) () ")") (pointer_expression "*pbVar6" (* "*") (identifier "pbVar6")))) () ")")) (break_statement "break;" (break "break") (; ";"))) (} "}")) (while "while") (parenthesized_expression "(param_2 + 8 != pbVar6)" (( "(") (binary_expression "param_2 + 8 != pbVar6" (binary_expression "param_2 + 8" (identifier "param_2") (+ "+") (number_literal "8")) (!= "!=") (identifier "pbVar6")) () ")")) (; ";")) (} "}"))) (expression_statement "uVar2 = (uint)pbVar6[1];" (assignment_expression "uVar2 = (uint)pbVar6[1]" (identifier "uVar2") (= "=") (cast_expression "(uint)pbVar6[1]" (( "(") (type_descriptor "uint" (type_identifier "uint")) () ")") (subscript_expression "pbVar6[1]" (identifier "pbVar6") ([ "[") (number_literal "1") (] "]")))) (; ";")) (expression_statement "pbVar4 = pbVar6 + 1;" (assignment_expression "pbVar4 = pbVar6 + 1" (identifier "pbVar4") (= "=") (binary_expression "pbVar6 + 1" (identifier "pbVar6") (+ "+") (number_literal "1"))) (; ";")) (expression_statement "uVar7 = 0;" (assignment_expression "uVar7 = 0" (identifier "uVar7") (= "=") (number_literal "0")) (; ";")) (if_statement "if (0x7f < uVar2) {\n    uVar2 = uVar2 & 0x7f;\n    do {\n      pbVar5 = pbVar4;\n      uVar3 = uVar2 << 7;\n      pbVar4 = pbVar5 + 1;\n      uVar7 = uVar2 >> 0x19 | uVar7 << 7;\n      uVar2 = uVar3 | pbVar5[1] & 0x7f;\n      if (-1 < (char)pbVar5[1]) goto LAB_000411f4;\n    } while (pbVar4 != pbVar6 + 8);\n    pbVar4 = pbVar5 + 2;\n    uVar7 = uVar3 >> 0x18 | uVar7 << 8;\n    uVar2 = uVar2 << 8 | (uint)pbVar6[9];\n  }" (if "if") (parenthesized_expression "(0x7f < uVar2)" (( "(") (binary_expression "0x7f < uVar2" (number_literal "0x7f") (< "<") (identifier "uVar2")) () ")")) (compound_statement "{\n    uVar2 = uVar2 & 0x7f;\n    do {\n      pbVar5 = pbVar4;\n      uVar3 = uVar2 << 7;\n      pbVar4 = pbVar5 + 1;\n      uVar7 = uVar2 >> 0x19 | uVar7 << 7;\n      uVar2 = uVar3 | pbVar5[1] & 0x7f;\n      if (-1 < (char)pbVar5[1]) goto LAB_000411f4;\n    } while (pbVar4 != pbVar6 + 8);\n    pbVar4 = pbVar5 + 2;\n    uVar7 = uVar3 >> 0x18 | uVar7 << 8;\n    uVar2 = uVar2 << 8 | (uint)pbVar6[9];\n  }" ({ "{") (expression_statement "uVar2 = uVar2 & 0x7f;" (assignment_expression "uVar2 = uVar2 & 0x7f" (identifier "uVar2") (= "=") (binary_expression "uVar2 & 0x7f" (identifier "uVar2") (& "&") (number_literal "0x7f"))) (; ";")) (do_statement "do {\n      pbVar5 = pbVar4;\n      uVar3 = uVar2 << 7;\n      pbVar4 = pbVar5 + 1;\n      uVar7 = uVar2 >> 0x19 | uVar7 << 7;\n      uVar2 = uVar3 | pbVar5[1] & 0x7f;\n      if (-1 < (char)pbVar5[1]) goto LAB_000411f4;\n    } while (pbVar4 != pbVar6 + 8);" (do "do") (compound_statement "{\n      pbVar5 = pbVar4;\n      uVar3 = uVar2 << 7;\n      pbVar4 = pbVar5 + 1;\n      uVar7 = uVar2 >> 0x19 | uVar7 << 7;\n      uVar2 = uVar3 | pbVar5[1] & 0x7f;\n      if (-1 < (char)pbVar5[1]) goto LAB_000411f4;\n    }" ({ "{") (expression_statement "pbVar5 = pbVar4;" (assignment_expression "pbVar5 = pbVar4" (identifier "pbVar5") (= "=") (identifier "pbVar4")) (; ";")) (expression_statement "uVar3 = uVar2 << 7;" (assignment_expression "uVar3 = uVar2 << 7" (identifier "uVar3") (= "=") (binary_expression "uVar2 << 7" (identifier "uVar2") (<< "<<") (number_literal "7"))) (; ";")) (expression_statement "pbVar4 = pbVar5 + 1;" (assignment_expression "pbVar4 = pbVar5 + 1" (identifier "pbVar4") (= "=") (binary_expression "pbVar5 + 1" (identifier "pbVar5") (+ "+") (number_literal "1"))) (; ";")) (expression_statement "uVar7 = uVar2 >> 0x19 | uVar7 << 7;" (assignment_expression "uVar7 = uVar2 >> 0x19 | uVar7 << 7" (identifier "uVar7") (= "=") (binary_expression "uVar2 >> 0x19 | uVar7 << 7" (binary_expression "uVar2 >> 0x19" (identifier "uVar2") (>> ">>") (number_literal "0x19")) (| "|") (binary_expression "uVar7 << 7" (identifier "uVar7") (<< "<<") (number_literal "7")))) (; ";")) (expression_statement "uVar2 = uVar3 | pbVar5[1] & 0x7f;" (assignment_expression "uVar2 = uVar3 | pbVar5[1] & 0x7f" (identifier "uVar2") (= "=") (binary_expression "uVar3 | pbVar5[1] & 0x7f" (identifier "uVar3") (| "|") (binary_expression "pbVar5[1] & 0x7f" (subscript_expression "pbVar5[1]" (identifier "pbVar5") ([ "[") (number_literal "1") (] "]")) (& "&") (number_literal "0x7f")))) (; ";")) (if_statement "if (-1 < (char)pbVar5[1]) goto LAB_000411f4;" (if "if") (parenthesized_expression "(-1 < (char)pbVar5[1])" (( "(") (binary_expression "-1 < (char)pbVar5[1]" (number_literal "-1") (< "<") (cast_expression "(char)pbVar5[1]" (( "(") (type_descriptor "char" (primitive_type "char")) () ")") (subscript_expression "pbVar5[1]" (identifier "pbVar5") ([ "[") (number_literal "1") (] "]")))) () ")")) (goto_statement "goto LAB_000411f4;" (goto "goto") (statement_identifier "LAB_000411f4") (; ";"))) (} "}")) (while "while") (parenthesized_expression "(pbVar4 != pbVar6 + 8)" (( "(") (binary_expression "pbVar4 != pbVar6 + 8" (identifier "pbVar4") (!= "!=") (binary_expression "pbVar6 + 8" (identifier "pbVar6") (+ "+") (number_literal "8"))) () ")")) (; ";")) (expression_statement "pbVar4 = pbVar5 + 2;" (assignment_expression "pbVar4 = pbVar5 + 2" (identifier "pbVar4") (= "=") (binary_expression "pbVar5 + 2" (identifier "pbVar5") (+ "+") (number_literal "2"))) (; ";")) (expression_statement "uVar7 = uVar3 >> 0x18 | uVar7 << 8;" (assignment_expression "uVar7 = uVar3 >> 0x18 | uVar7 << 8" (identifier "uVar7") (= "=") (binary_expression "uVar3 >> 0x18 | uVar7 << 8" (binary_expression "uVar3 >> 0x18" (identifier "uVar3") (>> ">>") (number_literal "0x18")) (| "|") (binary_expression "uVar7 << 8" (identifier "uVar7") (<< "<<") (number_literal "8")))) (; ";")) (expression_statement "uVar2 = uVar2 << 8 | (uint)pbVar6[9];" (assignment_expression "uVar2 = uVar2 << 8 | (uint)pbVar6[9]" (identifier "uVar2") (= "=") (binary_expression "uVar2 << 8 | (uint)pbVar6[9]" (binary_expression "uVar2 << 8" (identifier "uVar2") (<< "<<") (number_literal "8")) (| "|") (cast_expression "(uint)pbVar6[9]" (( "(") (type_descriptor "uint" (type_identifier "uint")) () ")") (subscript_expression "pbVar6[9]" (identifier "pbVar6") ([ "[") (number_literal "9") (] "]"))))) (; ";")) (} "}"))) (labeled_statement "LAB_000411f4:\n  pbVar4 = pbVar4 + 1;" (statement_identifier "LAB_000411f4") (: ":") (expression_statement "pbVar4 = pbVar4 + 1;" (assignment_expression "pbVar4 = pbVar4 + 1" (identifier "pbVar4") (= "=") (binary_expression "pbVar4 + 1" (identifier "pbVar4") (+ "+") (number_literal "1"))) (; ";"))) (expression_statement "*param_3 = uVar7;" (assignment_expression "*param_3 = uVar7" (pointer_expression "*param_3" (* "*") (identifier "param_3")) (= "=") (identifier "uVar7")) (; ";")) (expression_statement "param_3[1] = uVar2;" (assignment_expression "param_3[1] = uVar2" (subscript_expression "param_3[1]" (identifier "param_3") ([ "[") (number_literal "1") (] "]")) (= "=") (identifier "uVar2")) (; ";")) (expression_statement "param_3[3] = uVar1;" (assignment_expression "param_3[3] = uVar1" (subscript_expression "param_3[3]" (identifier "param_3") ([ "[") (number_literal "3") (] "]")) (= "=") (identifier "uVar1")) (; ";")) (expression_statement "param_3[2] = (uint)pbVar4;" (assignment_expression "param_3[2] = (uint)pbVar4" (subscript_expression "param_3[2]" (identifier "param_3") ([ "[") (number_literal "2") (] "]")) (= "=") (cast_expression "(uint)pbVar4" (( "(") (type_descriptor "uint" (type_identifier "uint")) () ")") (identifier "pbVar4"))) (; ";")) (if_statement "if (*(ushort *)(param_1 + 0xe) < uVar1) {\n    FUN_00041094();\n    return;\n  }" (if "if") (parenthesized_expression "(*(ushort *)(param_1 + 0xe) < uVar1)" (( "(") (binary_expression "*(ushort *)(param_1 + 0xe) < uVar1" (pointer_expression "*(ushort *)(param_1 + 0xe)" (* "*") (cast_expression "(ushort *)(param_1 + 0xe)" (( "(") (type_descriptor "ushort *" (type_identifier "ushort") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0xe)" (( "(") (binary_expression "param_1 + 0xe" (identifier "param_1") (+ "+") (number_literal "0xe")) () ")")))) (< "<") (identifier "uVar1")) () ")")) (compound_statement "{\n    FUN_00041094();\n    return;\n  }" ({ "{") (expression_statement "FUN_00041094();" (call_expression "FUN_00041094()" (identifier "FUN_00041094") (argument_list "()" (( "(") () ")"))) (; ";")) (return_statement "return;" (return "return") (; ";")) (} "}"))) (if_statement "if (((uint)(pbVar4 + ((uVar1 & 0xffff) - (int)param_2)) & 0xffff) < 4) {\n    *(short *)(param_3 + 4) = (short)uVar1;\n    *(undefined2 *)((int)param_3 + 0x12) = 4;\n    return;\n  }" (if "if") (parenthesized_expression "(((uint)(pbVar4 + ((uVar1 & 0xffff) - (int)param_2)) & 0xffff) < 4)" (( "(") (binary_expression "((uint)(pbVar4 + ((uVar1 & 0xffff) - (int)param_2)) & 0xffff) < 4" (parenthesized_expression "((uint)(pbVar4 + ((uVar1 & 0xffff) - (int)param_2)) & 0xffff)" (( "(") (binary_expression "(uint)(pbVar4 + ((uVar1 & 0xffff) - (int)param_2)) & 0xffff" (call_expression "(uint)(pbVar4 + ((uVar1 & 0xffff) - (int)param_2))" (parenthesized_expression "(uint)" (( "(") (identifier "uint") () ")")) (argument_list "(pbVar4 + ((uVar1 & 0xffff) - (int)param_2))" (( "(") (binary_expression "pbVar4 + ((uVar1 & 0xffff) - (int)param_2)" (identifier "pbVar4") (+ "+") (parenthesized_expression "((uVar1 & 0xffff) - (int)param_2)" (( "(") (binary_expression "(uVar1 & 0xffff) - (int)param_2" (parenthesized_expression "(uVar1 & 0xffff)" (( "(") (binary_expression "uVar1 & 0xffff" (identifier "uVar1") (& "&") (number_literal "0xffff")) () ")")) (- "-") (cast_expression "(int)param_2" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "param_2"))) () ")"))) () ")"))) (& "&") (number_literal "0xffff")) () ")")) (< "<") (number_literal "4")) () ")")) (compound_statement "{\n    *(short *)(param_3 + 4) = (short)uVar1;\n    *(undefined2 *)((int)param_3 + 0x12) = 4;\n    return;\n  }" ({ "{") (expression_statement "*(short *)(param_3 + 4) = (short)uVar1;" (assignment_expression "*(short *)(param_3 + 4) = (short)uVar1" (pointer_expression "*(short *)(param_3 + 4)" (* "*") (cast_expression "(short *)(param_3 + 4)" (( "(") (type_descriptor "short *" (sized_type_specifier "short" (short "short")) (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_3 + 4)" (( "(") (binary_expression "param_3 + 4" (identifier "param_3") (+ "+") (number_literal "4")) () ")")))) (= "=") (cast_expression "(short)uVar1" (( "(") (type_descriptor "short" (sized_type_specifier "short" (short "short"))) () ")") (identifier "uVar1"))) (; ";")) (expression_statement "*(undefined2 *)((int)param_3 + 0x12) = 4;" (assignment_expression "*(undefined2 *)((int)param_3 + 0x12) = 4" (pointer_expression "*(undefined2 *)((int)param_3 + 0x12)" (* "*") (cast_expression "(undefined2 *)((int)param_3 + 0x12)" (( "(") (type_descriptor "undefined2 *" (type_identifier "undefined2") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "((int)param_3 + 0x12)" (( "(") (binary_expression "(int)param_3 + 0x12" (cast_expression "(int)param_3" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "param_3")) (+ "+") (number_literal "0x12")) () ")")))) (= "=") (number_literal "4")) (; ";")) (return_statement "return;" (return "return") (; ";")) (} "}"))) (expression_statement "*(short *)((int)param_3 + 0x12) = (short)(pbVar4 + ((uVar1 & 0xffff) - (int)param_2));" (assignment_expression "*(short *)((int)param_3 + 0x12) = (short)(pbVar4 + ((uVar1 & 0xffff) - (int)param_2))" (pointer_expression "*(short *)((int)param_3 + 0x12)" (* "*") (cast_expression "(short *)((int)param_3 + 0x12)" (( "(") (type_descriptor "short *" (sized_type_specifier "short" (short "short")) (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "((int)param_3 + 0x12)" (( "(") (binary_expression "(int)param_3 + 0x12" (cast_expression "(int)param_3" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "param_3")) (+ "+") (number_literal "0x12")) () ")")))) (= "=") (cast_expression "(short)(pbVar4 + ((uVar1 & 0xffff) - (int)param_2))" (( "(") (type_descriptor "short" (sized_type_specifier "short" (short "short"))) () ")") (parenthesized_expression "(pbVar4 + ((uVar1 & 0xffff) - (int)param_2))" (( "(") (binary_expression "pbVar4 + ((uVar1 & 0xffff) - (int)param_2)" (identifier "pbVar4") (+ "+") (parenthesized_expression "((uVar1 & 0xffff) - (int)param_2)" (( "(") (binary_expression "(uVar1 & 0xffff) - (int)param_2" (parenthesized_expression "(uVar1 & 0xffff)" (( "(") (binary_expression "uVar1 & 0xffff" (identifier "uVar1") (& "&") (number_literal "0xffff")) () ")")) (- "-") (cast_expression "(int)param_2" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "param_2"))) () ")"))) () ")")))) (; ";")) (expression_statement "*(short *)(param_3 + 4) = (short)uVar1;" (assignment_expression "*(short *)(param_3 + 4) = (short)uVar1" (pointer_expression "*(short *)(param_3 + 4)" (* "*") (cast_expression "(short *)(param_3 + 4)" (( "(") (type_descriptor "short *" (sized_type_specifier "short" (short "short")) (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_3 + 4)" (( "(") (binary_expression "param_3 + 4" (identifier "param_3") (+ "+") (number_literal "4")) () ")")))) (= "=") (cast_expression "(short)uVar1" (( "(") (type_descriptor "short" (sized_type_specifier "short" (short "short"))) () ")") (identifier "uVar1"))) (; ";")) (return_statement "return;" (return "return") (; ";")) (} "}")))

void function_1(type_1 *pPage,type_2 *var_1,type_3 *pInfo)

{
  type_4 var_2;
  type_4 var_4;
  type_4 var_7;
  type_2 *pIter;
  type_5 *var_8;
  type_5 *var_5;
  type_5 *var_3;
  type_4 var_6;
  
  var_2 = (type_4)*var_1;
  var_3 = var_1;
  if (0x7f < var_2) {
    var_2 = var_2 & 0x7f;
    do {
      var_3 = var_3 + 1;
      var_2 = *var_3 & 0x7f | var_2 << 7;
      if (-1 < (char)*var_3) break;
    } while (var_1 + 8 != var_3);
  }
  var_4 = (type_4)var_3[1];
  var_8 = var_3 + 1;
  var_6 = 0;
  if (0x7f < var_4) {
    var_4 = var_4 & 0x7f;
    do {
      var_5 = var_8;
      var_7 = var_4 << 7;
      var_8 = var_5 + 1;
      var_6 = var_4 >> 0x19 | var_6 << 7;
      var_4 = var_7 | var_5[1] & 0x7f;
      if (-1 < (char)var_5[1]) goto LAB_000411f4;
    } while (var_8 != var_3 + 8);
    var_8 = var_5 + 2;
    var_6 = var_7 >> 0x18 | var_6 << 8;
    var_4 = var_4 << 8 | (type_4)var_3[9];
  }
LAB_000411f4:
  var_8 = var_8 + 1;
  *(type_4 *)&pInfo->nKey = var_6;
  *(type_4 *)((int)&pInfo->nKey + 4) = var_4;
  pInfo->nPayload = var_2;
  pInfo->pPayload = var_8;
  if (pPage->maxLocal < var_2) {
    var_9(pPage,var_1,pInfo);
    return;
  }
  if (((type_4)(var_8 + ((var_2 & 0xffff) - (int)var_1)) & 0xffff) < 4) {
    pInfo->nLocal = (type_6)var_2;
    pInfo->nSize = 4;
    return;
  }
  pInfo->nSize = (type_6)(var_8 + ((var_2 & 0xffff) - (int)var_1));
  pInfo->nLocal = (type_6)var_2;
  return;
}


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

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

{
  uint uVar1;
  uint uVar2;
  uint uVar3;
  byte *pbVar4;
  byte *pbVar5;
  byte *pbVar6;
  uint uVar7;
  
  uVar1 = (uint)*param_2;
  pbVar6 = param_2;
  if (0x7f < uVar1) {
    uVar1 = uVar1 & 0x7f;
    do {
      pbVar6 = pbVar6 + 1;
      uVar1 = *pbVar6 & 0x7f | uVar1 << 7;
      if (-1 < (char)*pbVar6) break;
    } while (param_2 + 8 != pbVar6);
  }
  uVar2 = (uint)pbVar6[1];
  pbVar4 = pbVar6 + 1;
  uVar7 = 0;
  if (0x7f < uVar2) {
    uVar2 = uVar2 & 0x7f;
    do {
      pbVar5 = pbVar4;
      uVar3 = uVar2 << 7;
      pbVar4 = pbVar5 + 1;
      uVar7 = uVar2 >> 0x19 | uVar7 << 7;
      uVar2 = uVar3 | pbVar5[1] & 0x7f;
      if (-1 < (char)pbVar5[1]) goto LAB_000411f4;
    } while (pbVar4 != pbVar6 + 8);
    pbVar4 = pbVar5 + 2;
    uVar7 = uVar3 >> 0x18 | uVar7 << 8;
    uVar2 = uVar2 << 8 | (uint)pbVar6[9];
  }
LAB_000411f4:
  pbVar4 = pbVar4 + 1;
  *param_3 = uVar7;
  param_3[1] = uVar2;
  param_3[3] = uVar1;
  param_3[2] = (uint)pbVar4;
  if (*(ushort *)(param_1 + 0xe) < uVar1) {
    FUN_00041094();
    return;
  }
  if (((uint)(pbVar4 + ((uVar1 & 0xffff) - (int)param_2)) & 0xffff) < 4) {
    *(short *)(param_3 + 4) = (short)uVar1;
    *(undefined2 *)((int)param_3 + 0x12) = 4;
    return;
  }
  *(short *)((int)param_3 + 0x12) = (short)(pbVar4 + ((uVar1 & 0xffff) - (int)param_2));
  *(short *)(param_3 + 4) = (short)uVar1;
  return;
}

