
u16 cellSizePtr(MemPage *pPage,u8 *pCell)

{
  byte *pbVar1;
  byte *pbVar2;
  uint uVar3;
  uint uVar4;
  uint uVar5;
  byte *pbVar6;
  
  pbVar2 = pCell + pPage->childPtrSize;
  uVar5 = (uint)*pbVar2;
  if (0x7f < uVar5) {
    pbVar6 = pbVar2 + 8;
    uVar5 = uVar5 & 0x7f;
    do {
      pbVar2 = pbVar2 + 1;
      uVar5 = *pbVar2 & 0x7f | uVar5 << 7;
      if (-1 < (char)*pbVar2) break;
    } while (pbVar6 != pbVar2);
  }
  pbVar6 = pbVar2 + 1;
  if (pPage->intKey != '\0') {
    pbVar1 = pbVar6;
    do {
      pbVar6 = pbVar1 + 1;
      if (-1 < (char)*pbVar1) break;
      pbVar1 = pbVar6;
    } while (pbVar6 != pbVar2 + 10);
  }
  if (uVar5 <= pPage->maxLocal) {
    uVar5 = ((int)pbVar6 - (int)pCell) + uVar5;
    if (uVar5 < 4) {
      uVar5 = 4;
    }
    return (u16)uVar5;
  }
  uVar4 = (uint)pPage->minLocal;
  uVar3 = pPage->pBt->usableSize - 4;
  if (uVar3 == 0) {
    trap(7);
  }
  uVar5 = uVar4 + (uVar5 - uVar4) % uVar3;
  if (pPage->maxLocal < uVar5) {
    uVar5 = uVar4;
  }
  return (short)((int)pbVar6 - (int)pCell) + 4 + (short)uVar5;
}



uint FUN_0001e76c(int param_1,int param_2)

{
  byte *pbVar1;
  byte *pbVar2;
  uint uVar3;
  uint uVar4;
  uint uVar5;
  byte *pbVar6;
  
  pbVar2 = (byte *)(param_2 + (uint)*(byte *)(param_1 + 10));
  uVar5 = (uint)*pbVar2;
  if (0x7f < uVar5) {
    pbVar6 = pbVar2 + 8;
    uVar5 = uVar5 & 0x7f;
    do {
      pbVar2 = pbVar2 + 1;
      uVar5 = *pbVar2 & 0x7f | uVar5 << 7;
      if (-1 < (char)*pbVar2) break;
    } while (pbVar6 != pbVar2);
  }
  pbVar6 = pbVar2 + 1;
  if (*(char *)(param_1 + 2) != '\0') {
    pbVar1 = pbVar6;
    do {
      pbVar6 = pbVar1 + 1;
      if (-1 < (char)*pbVar1) break;
      pbVar1 = pbVar6;
    } while (pbVar6 != pbVar2 + 10);
  }
  if (uVar5 <= *(ushort *)(param_1 + 0xe)) {
    uVar5 = ((int)pbVar6 - param_2) + uVar5;
    if (uVar5 < 4) {
      uVar5 = 4;
    }
    return uVar5 & 0xffff;
  }
  uVar4 = (uint)*(ushort *)(param_1 + 0x10);
  uVar3 = *(int *)(*(int *)(param_1 + 0x34) + 0x24) - 4;
  if (uVar3 == 0) {
    trap(7);
  }
  uVar5 = uVar4 + (uVar5 - uVar4) % uVar3;
  if (*(ushort *)(param_1 + 0xe) < uVar5) {
    uVar5 = uVar4;
  }
  return ((int)pbVar6 - param_2 & 0xffffU) + 4 + uVar5 & 0xffff;
}


lbu v1,0xa(a0)
addu v1,a1,v1
lbu a2,0x0(v1)
sltiu v0,a2,0x80
bne v0,zero,0x0001e7b0
_nop
addiu t0,v1,0x8
andi a2,a2,0x7f
addiu v1,v1,0x1
lbu a3,0x0(v1)
sll v0,a2,0x7
andi a2,a3,0x7f
seb a3,a3
bgez a3,0x0001e7b0
_or a2,a2,v0
bne t0,v1,0x0001e78c
_nop
lbu a3,0x2(a0)
beq a3,zero,0x0001e7d8
_addiu v0,v1,0x1
addiu v1,v1,0xa
addiu v0,v0,0x1
lb a3,-0x1(v0)
bgez a3,0x0001e7d8
_nop
bne v0,v1,0x0001e7c0
_nop
lhu a3,0xe(a0)
sltu v1,a3,a2
bne v1,zero,0x0001e800
_subu v0,v0,a1
addu v0,v0,a2
li v1,0x4
sltiu a0,v0,0x4
movn v0,v1,a0
jr ra
_andi v0,v0,0xffff
lw v1,0x34(a0)
andi v0,v0,0xffff
lhu a0,0x10(a0)
addiu v0,v0,0x4
lw v1,0x24(v1)
subu a2,a2,a0
addiu v1,v1,-0x4
teq v1,zero
divu a2,v1
mfhi a2
addu a2,a0,a2
sltu a3,a3,a2
movn a2,a0,a3
addu v0,v0,a2
jr ra
_andi v0,v0,0xffff
(translation_unit "uint FUN_0001e76c(int param_1,int param_2)\n\n{\n  byte *pbVar1;\n  byte *pbVar2;\n  uint uVar3;\n  uint uVar4;\n  uint uVar5;\n  byte *pbVar6;\n  \n  pbVar2 = (byte *)(param_2 + (uint)*(byte *)(param_1 + 10));\n  uVar5 = (uint)*pbVar2;\n  if (0x7f < uVar5) {\n    pbVar6 = pbVar2 + 8;\n    uVar5 = uVar5 & 0x7f;\n    do {\n      pbVar2 = pbVar2 + 1;\n      uVar5 = *pbVar2 & 0x7f | uVar5 << 7;\n      if (-1 < (char)*pbVar2) break;\n    } while (pbVar6 != pbVar2);\n  }\n  pbVar6 = pbVar2 + 1;\n  if (*(char *)(param_1 + 2) != '\0') {\n    pbVar1 = pbVar6;\n    do {\n      pbVar6 = pbVar1 + 1;\n      if (-1 < (char)*pbVar1) break;\n      pbVar1 = pbVar6;\n    } while (pbVar6 != pbVar2 + 10);\n  }\n  if (uVar5 <= *(ushort *)(param_1 + 0xe)) {\n    uVar5 = ((int)pbVar6 - param_2) + uVar5;\n    if (uVar5 < 4) {\n      uVar5 = 4;\n    }\n    return uVar5 & 0xffff;\n  }\n  uVar4 = (uint)*(ushort *)(param_1 + 0x10);\n  uVar3 = *(int *)(*(int *)(param_1 + 0x34) + 0x24) - 4;\n  if (uVar3 == 0) {\n    trap(7);\n  }\n  uVar5 = uVar4 + (uVar5 - uVar4) % uVar3;\n  if (*(ushort *)(param_1 + 0xe) < uVar5) {\n    uVar5 = uVar4;\n  }\n  return ((int)pbVar6 - param_2 & 0xffffU) + 4 + uVar5 & 0xffff;\n}\n\n" (function_definition "uint FUN_0001e76c(int param_1,int param_2)\n\n{\n  byte *pbVar1;\n  byte *pbVar2;\n  uint uVar3;\n  uint uVar4;\n  uint uVar5;\n  byte *pbVar6;\n  \n  pbVar2 = (byte *)(param_2 + (uint)*(byte *)(param_1 + 10));\n  uVar5 = (uint)*pbVar2;\n  if (0x7f < uVar5) {\n    pbVar6 = pbVar2 + 8;\n    uVar5 = uVar5 & 0x7f;\n    do {\n      pbVar2 = pbVar2 + 1;\n      uVar5 = *pbVar2 & 0x7f | uVar5 << 7;\n      if (-1 < (char)*pbVar2) break;\n    } while (pbVar6 != pbVar2);\n  }\n  pbVar6 = pbVar2 + 1;\n  if (*(char *)(param_1 + 2) != '\0') {\n    pbVar1 = pbVar6;\n    do {\n      pbVar6 = pbVar1 + 1;\n      if (-1 < (char)*pbVar1) break;\n      pbVar1 = pbVar6;\n    } while (pbVar6 != pbVar2 + 10);\n  }\n  if (uVar5 <= *(ushort *)(param_1 + 0xe)) {\n    uVar5 = ((int)pbVar6 - param_2) + uVar5;\n    if (uVar5 < 4) {\n      uVar5 = 4;\n    }\n    return uVar5 & 0xffff;\n  }\n  uVar4 = (uint)*(ushort *)(param_1 + 0x10);\n  uVar3 = *(int *)(*(int *)(param_1 + 0x34) + 0x24) - 4;\n  if (uVar3 == 0) {\n    trap(7);\n  }\n  uVar5 = uVar4 + (uVar5 - uVar4) % uVar3;\n  if (*(ushort *)(param_1 + 0xe) < uVar5) {\n    uVar5 = uVar4;\n  }\n  return ((int)pbVar6 - param_2 & 0xffffU) + 4 + uVar5 & 0xffff;\n}" type_identifier (function_declarator "FUN_0001e76c(int param_1,int param_2)" identifier (parameter_list "(int param_1,int param_2)" ( (parameter_declaration "int param_1" primitive_type identifier) , (parameter_declaration "int param_2" primitive_type identifier) ))) (compound_statement "{\n  byte *pbVar1;\n  byte *pbVar2;\n  uint uVar3;\n  uint uVar4;\n  uint uVar5;\n  byte *pbVar6;\n  \n  pbVar2 = (byte *)(param_2 + (uint)*(byte *)(param_1 + 10));\n  uVar5 = (uint)*pbVar2;\n  if (0x7f < uVar5) {\n    pbVar6 = pbVar2 + 8;\n    uVar5 = uVar5 & 0x7f;\n    do {\n      pbVar2 = pbVar2 + 1;\n      uVar5 = *pbVar2 & 0x7f | uVar5 << 7;\n      if (-1 < (char)*pbVar2) break;\n    } while (pbVar6 != pbVar2);\n  }\n  pbVar6 = pbVar2 + 1;\n  if (*(char *)(param_1 + 2) != '\0') {\n    pbVar1 = pbVar6;\n    do {\n      pbVar6 = pbVar1 + 1;\n      if (-1 < (char)*pbVar1) break;\n      pbVar1 = pbVar6;\n    } while (pbVar6 != pbVar2 + 10);\n  }\n  if (uVar5 <= *(ushort *)(param_1 + 0xe)) {\n    uVar5 = ((int)pbVar6 - param_2) + uVar5;\n    if (uVar5 < 4) {\n      uVar5 = 4;\n    }\n    return uVar5 & 0xffff;\n  }\n  uVar4 = (uint)*(ushort *)(param_1 + 0x10);\n  uVar3 = *(int *)(*(int *)(param_1 + 0x34) + 0x24) - 4;\n  if (uVar3 == 0) {\n    trap(7);\n  }\n  uVar5 = uVar4 + (uVar5 - uVar4) % uVar3;\n  if (*(ushort *)(param_1 + 0xe) < uVar5) {\n    uVar5 = uVar4;\n  }\n  return ((int)pbVar6 - param_2 & 0xffffU) + 4 + uVar5 & 0xffff;\n}" { (declaration "byte *pbVar1;" type_identifier (pointer_declarator "*pbVar1" * identifier) ;) (declaration "byte *pbVar2;" type_identifier (pointer_declarator "*pbVar2" * identifier) ;) (declaration "uint uVar3;" type_identifier identifier ;) (declaration "uint uVar4;" type_identifier identifier ;) (declaration "uint uVar5;" type_identifier identifier ;) (declaration "byte *pbVar6;" type_identifier (pointer_declarator "*pbVar6" * identifier) ;) (expression_statement "pbVar2 = (byte *)(param_2 + (uint)*(byte *)(param_1 + 10));" (assignment_expression "pbVar2 = (byte *)(param_2 + (uint)*(byte *)(param_1 + 10))" identifier = (cast_expression "(byte *)(param_2 + (uint)*(byte *)(param_1 + 10))" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_2 + (uint)*(byte *)(param_1 + 10))" ( (binary_expression "param_2 + (uint)*(byte *)(param_1 + 10)" identifier + (binary_expression "(uint)*(byte *)(param_1 + 10)" (parenthesized_expression "(uint)" ( identifier )) * (cast_expression "(byte *)(param_1 + 10)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 10)" ( (binary_expression "param_1 + 10" identifier + number_literal) ))))) )))) ;) (expression_statement "uVar5 = (uint)*pbVar2;" (assignment_expression "uVar5 = (uint)*pbVar2" identifier = (binary_expression "(uint)*pbVar2" (parenthesized_expression "(uint)" ( identifier )) * identifier)) ;) (if_statement "if (0x7f < uVar5) {\n    pbVar6 = pbVar2 + 8;\n    uVar5 = uVar5 & 0x7f;\n    do {\n      pbVar2 = pbVar2 + 1;\n      uVar5 = *pbVar2 & 0x7f | uVar5 << 7;\n      if (-1 < (char)*pbVar2) break;\n    } while (pbVar6 != pbVar2);\n  }" if (parenthesized_expression "(0x7f < uVar5)" ( (binary_expression "0x7f < uVar5" number_literal < identifier) )) (compound_statement "{\n    pbVar6 = pbVar2 + 8;\n    uVar5 = uVar5 & 0x7f;\n    do {\n      pbVar2 = pbVar2 + 1;\n      uVar5 = *pbVar2 & 0x7f | uVar5 << 7;\n      if (-1 < (char)*pbVar2) break;\n    } while (pbVar6 != pbVar2);\n  }" { (expression_statement "pbVar6 = pbVar2 + 8;" (assignment_expression "pbVar6 = pbVar2 + 8" identifier = (binary_expression "pbVar2 + 8" identifier + number_literal)) ;) (expression_statement "uVar5 = uVar5 & 0x7f;" (assignment_expression "uVar5 = uVar5 & 0x7f" identifier = (binary_expression "uVar5 & 0x7f" identifier & number_literal)) ;) (do_statement "do {\n      pbVar2 = pbVar2 + 1;\n      uVar5 = *pbVar2 & 0x7f | uVar5 << 7;\n      if (-1 < (char)*pbVar2) break;\n    } while (pbVar6 != pbVar2);" do (compound_statement "{\n      pbVar2 = pbVar2 + 1;\n      uVar5 = *pbVar2 & 0x7f | uVar5 << 7;\n      if (-1 < (char)*pbVar2) break;\n    }" { (expression_statement "pbVar2 = pbVar2 + 1;" (assignment_expression "pbVar2 = pbVar2 + 1" identifier = (binary_expression "pbVar2 + 1" identifier + number_literal)) ;) (expression_statement "uVar5 = *pbVar2 & 0x7f | uVar5 << 7;" (assignment_expression "uVar5 = *pbVar2 & 0x7f | uVar5 << 7" identifier = (binary_expression "*pbVar2 & 0x7f | uVar5 << 7" (binary_expression "*pbVar2 & 0x7f" (pointer_expression "*pbVar2" * identifier) & number_literal) | (binary_expression "uVar5 << 7" identifier << number_literal))) ;) (if_statement "if (-1 < (char)*pbVar2) break;" if (parenthesized_expression "(-1 < (char)*pbVar2)" ( (binary_expression "-1 < (char)*pbVar2" number_literal < (cast_expression "(char)*pbVar2" ( (type_descriptor "char" primitive_type) ) (pointer_expression "*pbVar2" * identifier))) )) (break_statement "break;" break ;)) }) while (parenthesized_expression "(pbVar6 != pbVar2)" ( (binary_expression "pbVar6 != pbVar2" identifier != identifier) )) ;) })) (expression_statement "pbVar6 = pbVar2 + 1;" (assignment_expression "pbVar6 = pbVar2 + 1" identifier = (binary_expression "pbVar2 + 1" identifier + number_literal)) ;) (if_statement "if (*(char *)(param_1 + 2) != '\0') {\n    pbVar1 = pbVar6;\n    do {\n      pbVar6 = pbVar1 + 1;\n      if (-1 < (char)*pbVar1) break;\n      pbVar1 = pbVar6;\n    } while (pbVar6 != pbVar2 + 10);\n  }" if (parenthesized_expression "(*(char *)(param_1 + 2) != '\0')" ( (binary_expression "*(char *)(param_1 + 2) != '\0'" (pointer_expression "*(char *)(param_1 + 2)" * (cast_expression "(char *)(param_1 + 2)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 2)" ( (binary_expression "param_1 + 2" identifier + number_literal) )))) != (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\n    pbVar1 = pbVar6;\n    do {\n      pbVar6 = pbVar1 + 1;\n      if (-1 < (char)*pbVar1) break;\n      pbVar1 = pbVar6;\n    } while (pbVar6 != pbVar2 + 10);\n  }" { (expression_statement "pbVar1 = pbVar6;" (assignment_expression "pbVar1 = pbVar6" identifier = identifier) ;) (do_statement "do {\n      pbVar6 = pbVar1 + 1;\n      if (-1 < (char)*pbVar1) break;\n      pbVar1 = pbVar6;\n    } while (pbVar6 != pbVar2 + 10);" do (compound_statement "{\n      pbVar6 = pbVar1 + 1;\n      if (-1 < (char)*pbVar1) break;\n      pbVar1 = pbVar6;\n    }" { (expression_statement "pbVar6 = pbVar1 + 1;" (assignment_expression "pbVar6 = pbVar1 + 1" identifier = (binary_expression "pbVar1 + 1" identifier + number_literal)) ;) (if_statement "if (-1 < (char)*pbVar1) break;" if (parenthesized_expression "(-1 < (char)*pbVar1)" ( (binary_expression "-1 < (char)*pbVar1" number_literal < (cast_expression "(char)*pbVar1" ( (type_descriptor "char" primitive_type) ) (pointer_expression "*pbVar1" * identifier))) )) (break_statement "break;" break ;)) (expression_statement "pbVar1 = pbVar6;" (assignment_expression "pbVar1 = pbVar6" identifier = identifier) ;) }) while (parenthesized_expression "(pbVar6 != pbVar2 + 10)" ( (binary_expression "pbVar6 != pbVar2 + 10" identifier != (binary_expression "pbVar2 + 10" identifier + number_literal)) )) ;) })) (if_statement "if (uVar5 <= *(ushort *)(param_1 + 0xe)) {\n    uVar5 = ((int)pbVar6 - param_2) + uVar5;\n    if (uVar5 < 4) {\n      uVar5 = 4;\n    }\n    return uVar5 & 0xffff;\n  }" if (parenthesized_expression "(uVar5 <= *(ushort *)(param_1 + 0xe))" ( (binary_expression "uVar5 <= *(ushort *)(param_1 + 0xe)" identifier <= (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) ))))) )) (compound_statement "{\n    uVar5 = ((int)pbVar6 - param_2) + uVar5;\n    if (uVar5 < 4) {\n      uVar5 = 4;\n    }\n    return uVar5 & 0xffff;\n  }" { (expression_statement "uVar5 = ((int)pbVar6 - param_2) + uVar5;" (assignment_expression "uVar5 = ((int)pbVar6 - param_2) + uVar5" identifier = (binary_expression "((int)pbVar6 - param_2) + uVar5" (parenthesized_expression "((int)pbVar6 - param_2)" ( (binary_expression "(int)pbVar6 - param_2" (cast_expression "(int)pbVar6" ( (type_descriptor "int" primitive_type) ) identifier) - identifier) )) + identifier)) ;) (if_statement "if (uVar5 < 4) {\n      uVar5 = 4;\n    }" if (parenthesized_expression "(uVar5 < 4)" ( (binary_expression "uVar5 < 4" identifier < number_literal) )) (compound_statement "{\n      uVar5 = 4;\n    }" { (expression_statement "uVar5 = 4;" (assignment_expression "uVar5 = 4" identifier = number_literal) ;) })) (return_statement "return uVar5 & 0xffff;" return (binary_expression "uVar5 & 0xffff" identifier & number_literal) ;) })) (expression_statement "uVar4 = (uint)*(ushort *)(param_1 + 0x10);" (assignment_expression "uVar4 = (uint)*(ushort *)(param_1 + 0x10)" identifier = (binary_expression "(uint)*(ushort *)(param_1 + 0x10)" (parenthesized_expression "(uint)" ( identifier )) * (cast_expression "(ushort *)(param_1 + 0x10)" ( (type_descriptor "ushort *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x10)" ( (binary_expression "param_1 + 0x10" identifier + number_literal) ))))) ;) (expression_statement "uVar3 = *(int *)(*(int *)(param_1 + 0x34) + 0x24) - 4;" (assignment_expression "uVar3 = *(int *)(*(int *)(param_1 + 0x34) + 0x24) - 4" identifier = (binary_expression "*(int *)(*(int *)(param_1 + 0x34) + 0x24) - 4" (pointer_expression "*(int *)(*(int *)(param_1 + 0x34) + 0x24)" * (cast_expression "(int *)(*(int *)(param_1 + 0x34) + 0x24)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*(int *)(param_1 + 0x34) + 0x24)" ( (binary_expression "*(int *)(param_1 + 0x34) + 0x24" (pointer_expression "*(int *)(param_1 + 0x34)" * (cast_expression "(int *)(param_1 + 0x34)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x34)" ( (binary_expression "param_1 + 0x34" identifier + number_literal) )))) + number_literal) )))) - number_literal)) ;) (if_statement "if (uVar3 == 0) {\n    trap(7);\n  }" if (parenthesized_expression "(uVar3 == 0)" ( (binary_expression "uVar3 == 0" identifier == number_literal) )) (compound_statement "{\n    trap(7);\n  }" { (expression_statement "trap(7);" (call_expression "trap(7)" identifier (argument_list "(7)" ( number_literal ))) ;) })) (expression_statement "uVar5 = uVar4 + (uVar5 - uVar4) % uVar3;" (assignment_expression "uVar5 = uVar4 + (uVar5 - uVar4) % uVar3" identifier = (binary_expression "uVar4 + (uVar5 - uVar4) % uVar3" identifier + (binary_expression "(uVar5 - uVar4) % uVar3" (parenthesized_expression "(uVar5 - uVar4)" ( (binary_expression "uVar5 - uVar4" identifier - identifier) )) % identifier))) ;) (if_statement "if (*(ushort *)(param_1 + 0xe) < uVar5) {\n    uVar5 = uVar4;\n  }" if (parenthesized_expression "(*(ushort *)(param_1 + 0xe) < uVar5)" ( (binary_expression "*(ushort *)(param_1 + 0xe) < uVar5" (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    uVar5 = uVar4;\n  }" { (expression_statement "uVar5 = uVar4;" (assignment_expression "uVar5 = uVar4" identifier = identifier) ;) })) (return_statement "return ((int)pbVar6 - param_2 & 0xffffU) + 4 + uVar5 & 0xffff;" return (binary_expression "((int)pbVar6 - param_2 & 0xffffU) + 4 + uVar5 & 0xffff" (binary_expression "((int)pbVar6 - param_2 & 0xffffU) + 4 + uVar5" (binary_expression "((int)pbVar6 - param_2 & 0xffffU) + 4" (parenthesized_expression "((int)pbVar6 - param_2 & 0xffffU)" ( (binary_expression "(int)pbVar6 - param_2 & 0xffffU" (binary_expression "(int)pbVar6 - param_2" (cast_expression "(int)pbVar6" ( (type_descriptor "int" primitive_type) ) identifier) - identifier) & number_literal) )) + number_literal) + identifier) & number_literal) ;) })))
(translation_unit "u16 cellSizePtr(MemPage *pPage,u8 *pCell)\n\n{\n  byte *pbVar1;\n  byte *pbVar2;\n  uint uVar3;\n  uint uVar4;\n  uint uVar5;\n  byte *pbVar6;\n  \n  pbVar2 = pCell + pPage->childPtrSize;\n  uVar5 = (uint)*pbVar2;\n  if (0x7f < uVar5) {\n    pbVar6 = pbVar2 + 8;\n    uVar5 = uVar5 & 0x7f;\n    do {\n      pbVar2 = pbVar2 + 1;\n      uVar5 = *pbVar2 & 0x7f | uVar5 << 7;\n      if (-1 < (char)*pbVar2) break;\n    } while (pbVar6 != pbVar2);\n  }\n  pbVar6 = pbVar2 + 1;\n  if (pPage->intKey != '\0') {\n    pbVar1 = pbVar6;\n    do {\n      pbVar6 = pbVar1 + 1;\n      if (-1 < (char)*pbVar1) break;\n      pbVar1 = pbVar6;\n    } while (pbVar6 != pbVar2 + 10);\n  }\n  if (uVar5 <= pPage->maxLocal) {\n    uVar5 = ((int)pbVar6 - (int)pCell) + uVar5;\n    if (uVar5 < 4) {\n      uVar5 = 4;\n    }\n    return (u16)uVar5;\n  }\n  uVar4 = (uint)pPage->minLocal;\n  uVar3 = pPage->pBt->usableSize - 4;\n  if (uVar3 == 0) {\n    trap(7);\n  }\n  uVar5 = uVar4 + (uVar5 - uVar4) % uVar3;\n  if (pPage->maxLocal < uVar5) {\n    uVar5 = uVar4;\n  }\n  return (short)((int)pbVar6 - (int)pCell) + 4 + (short)uVar5;\n}\n\n" (function_definition "u16 cellSizePtr(MemPage *pPage,u8 *pCell)\n\n{\n  byte *pbVar1;\n  byte *pbVar2;\n  uint uVar3;\n  uint uVar4;\n  uint uVar5;\n  byte *pbVar6;\n  \n  pbVar2 = pCell + pPage->childPtrSize;\n  uVar5 = (uint)*pbVar2;\n  if (0x7f < uVar5) {\n    pbVar6 = pbVar2 + 8;\n    uVar5 = uVar5 & 0x7f;\n    do {\n      pbVar2 = pbVar2 + 1;\n      uVar5 = *pbVar2 & 0x7f | uVar5 << 7;\n      if (-1 < (char)*pbVar2) break;\n    } while (pbVar6 != pbVar2);\n  }\n  pbVar6 = pbVar2 + 1;\n  if (pPage->intKey != '\0') {\n    pbVar1 = pbVar6;\n    do {\n      pbVar6 = pbVar1 + 1;\n      if (-1 < (char)*pbVar1) break;\n      pbVar1 = pbVar6;\n    } while (pbVar6 != pbVar2 + 10);\n  }\n  if (uVar5 <= pPage->maxLocal) {\n    uVar5 = ((int)pbVar6 - (int)pCell) + uVar5;\n    if (uVar5 < 4) {\n      uVar5 = 4;\n    }\n    return (u16)uVar5;\n  }\n  uVar4 = (uint)pPage->minLocal;\n  uVar3 = pPage->pBt->usableSize - 4;\n  if (uVar3 == 0) {\n    trap(7);\n  }\n  uVar5 = uVar4 + (uVar5 - uVar4) % uVar3;\n  if (pPage->maxLocal < uVar5) {\n    uVar5 = uVar4;\n  }\n  return (short)((int)pbVar6 - (int)pCell) + 4 + (short)uVar5;\n}" type_identifier (function_declarator "cellSizePtr(MemPage *pPage,u8 *pCell)" identifier (parameter_list "(MemPage *pPage,u8 *pCell)" ( (parameter_declaration "MemPage *pPage" type_identifier (pointer_declarator "*pPage" * identifier)) , (parameter_declaration "u8 *pCell" type_identifier (pointer_declarator "*pCell" * identifier)) ))) (compound_statement "{\n  byte *pbVar1;\n  byte *pbVar2;\n  uint uVar3;\n  uint uVar4;\n  uint uVar5;\n  byte *pbVar6;\n  \n  pbVar2 = pCell + pPage->childPtrSize;\n  uVar5 = (uint)*pbVar2;\n  if (0x7f < uVar5) {\n    pbVar6 = pbVar2 + 8;\n    uVar5 = uVar5 & 0x7f;\n    do {\n      pbVar2 = pbVar2 + 1;\n      uVar5 = *pbVar2 & 0x7f | uVar5 << 7;\n      if (-1 < (char)*pbVar2) break;\n    } while (pbVar6 != pbVar2);\n  }\n  pbVar6 = pbVar2 + 1;\n  if (pPage->intKey != '\0') {\n    pbVar1 = pbVar6;\n    do {\n      pbVar6 = pbVar1 + 1;\n      if (-1 < (char)*pbVar1) break;\n      pbVar1 = pbVar6;\n    } while (pbVar6 != pbVar2 + 10);\n  }\n  if (uVar5 <= pPage->maxLocal) {\n    uVar5 = ((int)pbVar6 - (int)pCell) + uVar5;\n    if (uVar5 < 4) {\n      uVar5 = 4;\n    }\n    return (u16)uVar5;\n  }\n  uVar4 = (uint)pPage->minLocal;\n  uVar3 = pPage->pBt->usableSize - 4;\n  if (uVar3 == 0) {\n    trap(7);\n  }\n  uVar5 = uVar4 + (uVar5 - uVar4) % uVar3;\n  if (pPage->maxLocal < uVar5) {\n    uVar5 = uVar4;\n  }\n  return (short)((int)pbVar6 - (int)pCell) + 4 + (short)uVar5;\n}" { (declaration "byte *pbVar1;" type_identifier (pointer_declarator "*pbVar1" * identifier) ;) (declaration "byte *pbVar2;" type_identifier (pointer_declarator "*pbVar2" * identifier) ;) (declaration "uint uVar3;" type_identifier identifier ;) (declaration "uint uVar4;" type_identifier identifier ;) (declaration "uint uVar5;" type_identifier identifier ;) (declaration "byte *pbVar6;" type_identifier (pointer_declarator "*pbVar6" * identifier) ;) (expression_statement "pbVar2 = pCell + pPage->childPtrSize;" (assignment_expression "pbVar2 = pCell + pPage->childPtrSize" identifier = (binary_expression "pCell + pPage->childPtrSize" identifier + (field_expression "pPage->childPtrSize" identifier -> field_identifier))) ;) (expression_statement "uVar5 = (uint)*pbVar2;" (assignment_expression "uVar5 = (uint)*pbVar2" identifier = (binary_expression "(uint)*pbVar2" (parenthesized_expression "(uint)" ( identifier )) * identifier)) ;) (if_statement "if (0x7f < uVar5) {\n    pbVar6 = pbVar2 + 8;\n    uVar5 = uVar5 & 0x7f;\n    do {\n      pbVar2 = pbVar2 + 1;\n      uVar5 = *pbVar2 & 0x7f | uVar5 << 7;\n      if (-1 < (char)*pbVar2) break;\n    } while (pbVar6 != pbVar2);\n  }" if (parenthesized_expression "(0x7f < uVar5)" ( (binary_expression "0x7f < uVar5" number_literal < identifier) )) (compound_statement "{\n    pbVar6 = pbVar2 + 8;\n    uVar5 = uVar5 & 0x7f;\n    do {\n      pbVar2 = pbVar2 + 1;\n      uVar5 = *pbVar2 & 0x7f | uVar5 << 7;\n      if (-1 < (char)*pbVar2) break;\n    } while (pbVar6 != pbVar2);\n  }" { (expression_statement "pbVar6 = pbVar2 + 8;" (assignment_expression "pbVar6 = pbVar2 + 8" identifier = (binary_expression "pbVar2 + 8" identifier + number_literal)) ;) (expression_statement "uVar5 = uVar5 & 0x7f;" (assignment_expression "uVar5 = uVar5 & 0x7f" identifier = (binary_expression "uVar5 & 0x7f" identifier & number_literal)) ;) (do_statement "do {\n      pbVar2 = pbVar2 + 1;\n      uVar5 = *pbVar2 & 0x7f | uVar5 << 7;\n      if (-1 < (char)*pbVar2) break;\n    } while (pbVar6 != pbVar2);" do (compound_statement "{\n      pbVar2 = pbVar2 + 1;\n      uVar5 = *pbVar2 & 0x7f | uVar5 << 7;\n      if (-1 < (char)*pbVar2) break;\n    }" { (expression_statement "pbVar2 = pbVar2 + 1;" (assignment_expression "pbVar2 = pbVar2 + 1" identifier = (binary_expression "pbVar2 + 1" identifier + number_literal)) ;) (expression_statement "uVar5 = *pbVar2 & 0x7f | uVar5 << 7;" (assignment_expression "uVar5 = *pbVar2 & 0x7f | uVar5 << 7" identifier = (binary_expression "*pbVar2 & 0x7f | uVar5 << 7" (binary_expression "*pbVar2 & 0x7f" (pointer_expression "*pbVar2" * identifier) & number_literal) | (binary_expression "uVar5 << 7" identifier << number_literal))) ;) (if_statement "if (-1 < (char)*pbVar2) break;" if (parenthesized_expression "(-1 < (char)*pbVar2)" ( (binary_expression "-1 < (char)*pbVar2" number_literal < (cast_expression "(char)*pbVar2" ( (type_descriptor "char" primitive_type) ) (pointer_expression "*pbVar2" * identifier))) )) (break_statement "break;" break ;)) }) while (parenthesized_expression "(pbVar6 != pbVar2)" ( (binary_expression "pbVar6 != pbVar2" identifier != identifier) )) ;) })) (expression_statement "pbVar6 = pbVar2 + 1;" (assignment_expression "pbVar6 = pbVar2 + 1" identifier = (binary_expression "pbVar2 + 1" identifier + number_literal)) ;) (if_statement "if (pPage->intKey != '\0') {\n    pbVar1 = pbVar6;\n    do {\n      pbVar6 = pbVar1 + 1;\n      if (-1 < (char)*pbVar1) break;\n      pbVar1 = pbVar6;\n    } while (pbVar6 != pbVar2 + 10);\n  }" if (parenthesized_expression "(pPage->intKey != '\0')" ( (binary_expression "pPage->intKey != '\0'" (field_expression "pPage->intKey" identifier -> field_identifier) != (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\n    pbVar1 = pbVar6;\n    do {\n      pbVar6 = pbVar1 + 1;\n      if (-1 < (char)*pbVar1) break;\n      pbVar1 = pbVar6;\n    } while (pbVar6 != pbVar2 + 10);\n  }" { (expression_statement "pbVar1 = pbVar6;" (assignment_expression "pbVar1 = pbVar6" identifier = identifier) ;) (do_statement "do {\n      pbVar6 = pbVar1 + 1;\n      if (-1 < (char)*pbVar1) break;\n      pbVar1 = pbVar6;\n    } while (pbVar6 != pbVar2 + 10);" do (compound_statement "{\n      pbVar6 = pbVar1 + 1;\n      if (-1 < (char)*pbVar1) break;\n      pbVar1 = pbVar6;\n    }" { (expression_statement "pbVar6 = pbVar1 + 1;" (assignment_expression "pbVar6 = pbVar1 + 1" identifier = (binary_expression "pbVar1 + 1" identifier + number_literal)) ;) (if_statement "if (-1 < (char)*pbVar1) break;" if (parenthesized_expression "(-1 < (char)*pbVar1)" ( (binary_expression "-1 < (char)*pbVar1" number_literal < (cast_expression "(char)*pbVar1" ( (type_descriptor "char" primitive_type) ) (pointer_expression "*pbVar1" * identifier))) )) (break_statement "break;" break ;)) (expression_statement "pbVar1 = pbVar6;" (assignment_expression "pbVar1 = pbVar6" identifier = identifier) ;) }) while (parenthesized_expression "(pbVar6 != pbVar2 + 10)" ( (binary_expression "pbVar6 != pbVar2 + 10" identifier != (binary_expression "pbVar2 + 10" identifier + number_literal)) )) ;) })) (if_statement "if (uVar5 <= pPage->maxLocal) {\n    uVar5 = ((int)pbVar6 - (int)pCell) + uVar5;\n    if (uVar5 < 4) {\n      uVar5 = 4;\n    }\n    return (u16)uVar5;\n  }" if (parenthesized_expression "(uVar5 <= pPage->maxLocal)" ( (binary_expression "uVar5 <= pPage->maxLocal" identifier <= (field_expression "pPage->maxLocal" identifier -> field_identifier)) )) (compound_statement "{\n    uVar5 = ((int)pbVar6 - (int)pCell) + uVar5;\n    if (uVar5 < 4) {\n      uVar5 = 4;\n    }\n    return (u16)uVar5;\n  }" { (expression_statement "uVar5 = ((int)pbVar6 - (int)pCell) + uVar5;" (assignment_expression "uVar5 = ((int)pbVar6 - (int)pCell) + uVar5" identifier = (binary_expression "((int)pbVar6 - (int)pCell) + uVar5" (parenthesized_expression "((int)pbVar6 - (int)pCell)" ( (binary_expression "(int)pbVar6 - (int)pCell" (cast_expression "(int)pbVar6" ( (type_descriptor "int" primitive_type) ) identifier) - (cast_expression "(int)pCell" ( (type_descriptor "int" primitive_type) ) identifier)) )) + identifier)) ;) (if_statement "if (uVar5 < 4) {\n      uVar5 = 4;\n    }" if (parenthesized_expression "(uVar5 < 4)" ( (binary_expression "uVar5 < 4" identifier < number_literal) )) (compound_statement "{\n      uVar5 = 4;\n    }" { (expression_statement "uVar5 = 4;" (assignment_expression "uVar5 = 4" identifier = number_literal) ;) })) (return_statement "return (u16)uVar5;" return (cast_expression "(u16)uVar5" ( (type_descriptor "u16" type_identifier) ) identifier) ;) })) (expression_statement "uVar4 = (uint)pPage->minLocal;" (assignment_expression "uVar4 = (uint)pPage->minLocal" identifier = (cast_expression "(uint)pPage->minLocal" ( (type_descriptor "uint" type_identifier) ) (field_expression "pPage->minLocal" identifier -> field_identifier))) ;) (expression_statement "uVar3 = pPage->pBt->usableSize - 4;" (assignment_expression "uVar3 = pPage->pBt->usableSize - 4" identifier = (binary_expression "pPage->pBt->usableSize - 4" (field_expression "pPage->pBt->usableSize" (field_expression "pPage->pBt" identifier -> field_identifier) -> field_identifier) - number_literal)) ;) (if_statement "if (uVar3 == 0) {\n    trap(7);\n  }" if (parenthesized_expression "(uVar3 == 0)" ( (binary_expression "uVar3 == 0" identifier == number_literal) )) (compound_statement "{\n    trap(7);\n  }" { (expression_statement "trap(7);" (call_expression "trap(7)" identifier (argument_list "(7)" ( number_literal ))) ;) })) (expression_statement "uVar5 = uVar4 + (uVar5 - uVar4) % uVar3;" (assignment_expression "uVar5 = uVar4 + (uVar5 - uVar4) % uVar3" identifier = (binary_expression "uVar4 + (uVar5 - uVar4) % uVar3" identifier + (binary_expression "(uVar5 - uVar4) % uVar3" (parenthesized_expression "(uVar5 - uVar4)" ( (binary_expression "uVar5 - uVar4" identifier - identifier) )) % identifier))) ;) (if_statement "if (pPage->maxLocal < uVar5) {\n    uVar5 = uVar4;\n  }" if (parenthesized_expression "(pPage->maxLocal < uVar5)" ( (binary_expression "pPage->maxLocal < uVar5" (field_expression "pPage->maxLocal" identifier -> field_identifier) < identifier) )) (compound_statement "{\n    uVar5 = uVar4;\n  }" { (expression_statement "uVar5 = uVar4;" (assignment_expression "uVar5 = uVar4" identifier = identifier) ;) })) (return_statement "return (short)((int)pbVar6 - (int)pCell) + 4 + (short)uVar5;" return (binary_expression "(short)((int)pbVar6 - (int)pCell) + 4 + (short)uVar5" (binary_expression "(short)((int)pbVar6 - (int)pCell) + 4" (cast_expression "(short)((int)pbVar6 - (int)pCell)" ( (type_descriptor "short" (sized_type_specifier "short" short)) ) (parenthesized_expression "((int)pbVar6 - (int)pCell)" ( (binary_expression "(int)pbVar6 - (int)pCell" (cast_expression "(int)pbVar6" ( (type_descriptor "int" primitive_type) ) identifier) - (cast_expression "(int)pCell" ( (type_descriptor "int" primitive_type) ) identifier)) ))) + number_literal) + (cast_expression "(short)uVar5" ( (type_descriptor "short" (sized_type_specifier "short" short)) ) identifier)) ;) })))
(translation_unit "uint FUN_0001e76c(int param_1,int param_2)\n\n{\n  byte *pbVar1;\n  byte *pbVar2;\n  uint uVar3;\n  uint uVar4;\n  uint uVar5;\n  byte *pbVar6;\n  \n  pbVar2 = (byte *)(param_2 + (uint)*(byte *)(param_1 + 10));\n  uVar5 = (uint)*pbVar2;\n  if (0x7f < uVar5) {\n    pbVar6 = pbVar2 + 8;\n    uVar5 = uVar5 & 0x7f;\n    do {\n      pbVar2 = pbVar2 + 1;\n      uVar5 = *pbVar2 & 0x7f | uVar5 << 7;\n      if (-1 < (char)*pbVar2) break;\n    } while (pbVar6 != pbVar2);\n  }\n  pbVar6 = pbVar2 + 1;\n  if (*(char *)(param_1 + 2) != '\0') {\n    pbVar1 = pbVar6;\n    do {\n      pbVar6 = pbVar1 + 1;\n      if (-1 < (char)*pbVar1) break;\n      pbVar1 = pbVar6;\n    } while (pbVar6 != pbVar2 + 10);\n  }\n  if (uVar5 <= *(ushort *)(param_1 + 0xe)) {\n    uVar5 = ((int)pbVar6 - param_2) + uVar5;\n    if (uVar5 < 4) {\n      uVar5 = 4;\n    }\n    return uVar5 & 0xffff;\n  }\n  uVar4 = (uint)*(ushort *)(param_1 + 0x10);\n  uVar3 = *(int *)(*(int *)(param_1 + 0x34) + 0x24) - 4;\n  if (uVar3 == 0) {\n    trap(7);\n  }\n  uVar5 = uVar4 + (uVar5 - uVar4) % uVar3;\n  if (*(ushort *)(param_1 + 0xe) < uVar5) {\n    uVar5 = uVar4;\n  }\n  return ((int)pbVar6 - param_2 & 0xffffU) + 4 + uVar5 & 0xffff;\n}\n\n" (function_definition "uint FUN_0001e76c(int param_1,int param_2)\n\n{\n  byte *pbVar1;\n  byte *pbVar2;\n  uint uVar3;\n  uint uVar4;\n  uint uVar5;\n  byte *pbVar6;\n  \n  pbVar2 = (byte *)(param_2 + (uint)*(byte *)(param_1 + 10));\n  uVar5 = (uint)*pbVar2;\n  if (0x7f < uVar5) {\n    pbVar6 = pbVar2 + 8;\n    uVar5 = uVar5 & 0x7f;\n    do {\n      pbVar2 = pbVar2 + 1;\n      uVar5 = *pbVar2 & 0x7f | uVar5 << 7;\n      if (-1 < (char)*pbVar2) break;\n    } while (pbVar6 != pbVar2);\n  }\n  pbVar6 = pbVar2 + 1;\n  if (*(char *)(param_1 + 2) != '\0') {\n    pbVar1 = pbVar6;\n    do {\n      pbVar6 = pbVar1 + 1;\n      if (-1 < (char)*pbVar1) break;\n      pbVar1 = pbVar6;\n    } while (pbVar6 != pbVar2 + 10);\n  }\n  if (uVar5 <= *(ushort *)(param_1 + 0xe)) {\n    uVar5 = ((int)pbVar6 - param_2) + uVar5;\n    if (uVar5 < 4) {\n      uVar5 = 4;\n    }\n    return uVar5 & 0xffff;\n  }\n  uVar4 = (uint)*(ushort *)(param_1 + 0x10);\n  uVar3 = *(int *)(*(int *)(param_1 + 0x34) + 0x24) - 4;\n  if (uVar3 == 0) {\n    trap(7);\n  }\n  uVar5 = uVar4 + (uVar5 - uVar4) % uVar3;\n  if (*(ushort *)(param_1 + 0xe) < uVar5) {\n    uVar5 = uVar4;\n  }\n  return ((int)pbVar6 - param_2 & 0xffffU) + 4 + uVar5 & 0xffff;\n}" type_identifier (function_declarator "FUN_0001e76c(int param_1,int param_2)" identifier (parameter_list "(int param_1,int param_2)" ( (parameter_declaration "int param_1" primitive_type identifier) , (parameter_declaration "int param_2" primitive_type identifier) ))) (compound_statement "{\n  byte *pbVar1;\n  byte *pbVar2;\n  uint uVar3;\n  uint uVar4;\n  uint uVar5;\n  byte *pbVar6;\n  \n  pbVar2 = (byte *)(param_2 + (uint)*(byte *)(param_1 + 10));\n  uVar5 = (uint)*pbVar2;\n  if (0x7f < uVar5) {\n    pbVar6 = pbVar2 + 8;\n    uVar5 = uVar5 & 0x7f;\n    do {\n      pbVar2 = pbVar2 + 1;\n      uVar5 = *pbVar2 & 0x7f | uVar5 << 7;\n      if (-1 < (char)*pbVar2) break;\n    } while (pbVar6 != pbVar2);\n  }\n  pbVar6 = pbVar2 + 1;\n  if (*(char *)(param_1 + 2) != '\0') {\n    pbVar1 = pbVar6;\n    do {\n      pbVar6 = pbVar1 + 1;\n      if (-1 < (char)*pbVar1) break;\n      pbVar1 = pbVar6;\n    } while (pbVar6 != pbVar2 + 10);\n  }\n  if (uVar5 <= *(ushort *)(param_1 + 0xe)) {\n    uVar5 = ((int)pbVar6 - param_2) + uVar5;\n    if (uVar5 < 4) {\n      uVar5 = 4;\n    }\n    return uVar5 & 0xffff;\n  }\n  uVar4 = (uint)*(ushort *)(param_1 + 0x10);\n  uVar3 = *(int *)(*(int *)(param_1 + 0x34) + 0x24) - 4;\n  if (uVar3 == 0) {\n    trap(7);\n  }\n  uVar5 = uVar4 + (uVar5 - uVar4) % uVar3;\n  if (*(ushort *)(param_1 + 0xe) < uVar5) {\n    uVar5 = uVar4;\n  }\n  return ((int)pbVar6 - param_2 & 0xffffU) + 4 + uVar5 & 0xffff;\n}" { (declaration "byte *pbVar1;" type_identifier (pointer_declarator "*pbVar1" * identifier) ;) (declaration "byte *pbVar2;" type_identifier (pointer_declarator "*pbVar2" * identifier) ;) (declaration "uint uVar3;" type_identifier identifier ;) (declaration "uint uVar4;" type_identifier identifier ;) (declaration "uint uVar5;" type_identifier identifier ;) (declaration "byte *pbVar6;" type_identifier (pointer_declarator "*pbVar6" * identifier) ;) (expression_statement "pbVar2 = (byte *)(param_2 + (uint)*(byte *)(param_1 + 10));" (assignment_expression "pbVar2 = (byte *)(param_2 + (uint)*(byte *)(param_1 + 10))" identifier = (cast_expression "(byte *)(param_2 + (uint)*(byte *)(param_1 + 10))" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_2 + (uint)*(byte *)(param_1 + 10))" ( (binary_expression "param_2 + (uint)*(byte *)(param_1 + 10)" identifier + (binary_expression "(uint)*(byte *)(param_1 + 10)" (parenthesized_expression "(uint)" ( identifier )) * (cast_expression "(byte *)(param_1 + 10)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 10)" ( (binary_expression "param_1 + 10" identifier + number_literal) ))))) )))) ;) (expression_statement "uVar5 = (uint)*pbVar2;" (assignment_expression "uVar5 = (uint)*pbVar2" identifier = (binary_expression "(uint)*pbVar2" (parenthesized_expression "(uint)" ( identifier )) * identifier)) ;) (if_statement "if (0x7f < uVar5) {\n    pbVar6 = pbVar2 + 8;\n    uVar5 = uVar5 & 0x7f;\n    do {\n      pbVar2 = pbVar2 + 1;\n      uVar5 = *pbVar2 & 0x7f | uVar5 << 7;\n      if (-1 < (char)*pbVar2) break;\n    } while (pbVar6 != pbVar2);\n  }" if (parenthesized_expression "(0x7f < uVar5)" ( (binary_expression "0x7f < uVar5" number_literal < identifier) )) (compound_statement "{\n    pbVar6 = pbVar2 + 8;\n    uVar5 = uVar5 & 0x7f;\n    do {\n      pbVar2 = pbVar2 + 1;\n      uVar5 = *pbVar2 & 0x7f | uVar5 << 7;\n      if (-1 < (char)*pbVar2) break;\n    } while (pbVar6 != pbVar2);\n  }" { (expression_statement "pbVar6 = pbVar2 + 8;" (assignment_expression "pbVar6 = pbVar2 + 8" identifier = (binary_expression "pbVar2 + 8" identifier + number_literal)) ;) (expression_statement "uVar5 = uVar5 & 0x7f;" (assignment_expression "uVar5 = uVar5 & 0x7f" identifier = (binary_expression "uVar5 & 0x7f" identifier & number_literal)) ;) (do_statement "do {\n      pbVar2 = pbVar2 + 1;\n      uVar5 = *pbVar2 & 0x7f | uVar5 << 7;\n      if (-1 < (char)*pbVar2) break;\n    } while (pbVar6 != pbVar2);" do (compound_statement "{\n      pbVar2 = pbVar2 + 1;\n      uVar5 = *pbVar2 & 0x7f | uVar5 << 7;\n      if (-1 < (char)*pbVar2) break;\n    }" { (expression_statement "pbVar2 = pbVar2 + 1;" (assignment_expression "pbVar2 = pbVar2 + 1" identifier = (binary_expression "pbVar2 + 1" identifier + number_literal)) ;) (expression_statement "uVar5 = *pbVar2 & 0x7f | uVar5 << 7;" (assignment_expression "uVar5 = *pbVar2 & 0x7f | uVar5 << 7" identifier = (binary_expression "*pbVar2 & 0x7f | uVar5 << 7" (binary_expression "*pbVar2 & 0x7f" (pointer_expression "*pbVar2" * identifier) & number_literal) | (binary_expression "uVar5 << 7" identifier << number_literal))) ;) (if_statement "if (-1 < (char)*pbVar2) break;" if (parenthesized_expression "(-1 < (char)*pbVar2)" ( (binary_expression "-1 < (char)*pbVar2" number_literal < (cast_expression "(char)*pbVar2" ( (type_descriptor "char" primitive_type) ) (pointer_expression "*pbVar2" * identifier))) )) (break_statement "break;" break ;)) }) while (parenthesized_expression "(pbVar6 != pbVar2)" ( (binary_expression "pbVar6 != pbVar2" identifier != identifier) )) ;) })) (expression_statement "pbVar6 = pbVar2 + 1;" (assignment_expression "pbVar6 = pbVar2 + 1" identifier = (binary_expression "pbVar2 + 1" identifier + number_literal)) ;) (if_statement "if (*(char *)(param_1 + 2) != '\0') {\n    pbVar1 = pbVar6;\n    do {\n      pbVar6 = pbVar1 + 1;\n      if (-1 < (char)*pbVar1) break;\n      pbVar1 = pbVar6;\n    } while (pbVar6 != pbVar2 + 10);\n  }" if (parenthesized_expression "(*(char *)(param_1 + 2) != '\0')" ( (binary_expression "*(char *)(param_1 + 2) != '\0'" (pointer_expression "*(char *)(param_1 + 2)" * (cast_expression "(char *)(param_1 + 2)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 2)" ( (binary_expression "param_1 + 2" identifier + number_literal) )))) != (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\n    pbVar1 = pbVar6;\n    do {\n      pbVar6 = pbVar1 + 1;\n      if (-1 < (char)*pbVar1) break;\n      pbVar1 = pbVar6;\n    } while (pbVar6 != pbVar2 + 10);\n  }" { (expression_statement "pbVar1 = pbVar6;" (assignment_expression "pbVar1 = pbVar6" identifier = identifier) ;) (do_statement "do {\n      pbVar6 = pbVar1 + 1;\n      if (-1 < (char)*pbVar1) break;\n      pbVar1 = pbVar6;\n    } while (pbVar6 != pbVar2 + 10);" do (compound_statement "{\n      pbVar6 = pbVar1 + 1;\n      if (-1 < (char)*pbVar1) break;\n      pbVar1 = pbVar6;\n    }" { (expression_statement "pbVar6 = pbVar1 + 1;" (assignment_expression "pbVar6 = pbVar1 + 1" identifier = (binary_expression "pbVar1 + 1" identifier + number_literal)) ;) (if_statement "if (-1 < (char)*pbVar1) break;" if (parenthesized_expression "(-1 < (char)*pbVar1)" ( (binary_expression "-1 < (char)*pbVar1" number_literal < (cast_expression "(char)*pbVar1" ( (type_descriptor "char" primitive_type) ) (pointer_expression "*pbVar1" * identifier))) )) (break_statement "break;" break ;)) (expression_statement "pbVar1 = pbVar6;" (assignment_expression "pbVar1 = pbVar6" identifier = identifier) ;) }) while (parenthesized_expression "(pbVar6 != pbVar2 + 10)" ( (binary_expression "pbVar6 != pbVar2 + 10" identifier != (binary_expression "pbVar2 + 10" identifier + number_literal)) )) ;) })) (if_statement "if (uVar5 <= *(ushort *)(param_1 + 0xe)) {\n    uVar5 = ((int)pbVar6 - param_2) + uVar5;\n    if (uVar5 < 4) {\n      uVar5 = 4;\n    }\n    return uVar5 & 0xffff;\n  }" if (parenthesized_expression "(uVar5 <= *(ushort *)(param_1 + 0xe))" ( (binary_expression "uVar5 <= *(ushort *)(param_1 + 0xe)" identifier <= (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) ))))) )) (compound_statement "{\n    uVar5 = ((int)pbVar6 - param_2) + uVar5;\n    if (uVar5 < 4) {\n      uVar5 = 4;\n    }\n    return uVar5 & 0xffff;\n  }" { (expression_statement "uVar5 = ((int)pbVar6 - param_2) + uVar5;" (assignment_expression "uVar5 = ((int)pbVar6 - param_2) + uVar5" identifier = (binary_expression "((int)pbVar6 - param_2) + uVar5" (parenthesized_expression "((int)pbVar6 - param_2)" ( (binary_expression "(int)pbVar6 - param_2" (cast_expression "(int)pbVar6" ( (type_descriptor "int" primitive_type) ) identifier) - identifier) )) + identifier)) ;) (if_statement "if (uVar5 < 4) {\n      uVar5 = 4;\n    }" if (parenthesized_expression "(uVar5 < 4)" ( (binary_expression "uVar5 < 4" identifier < number_literal) )) (compound_statement "{\n      uVar5 = 4;\n    }" { (expression_statement "uVar5 = 4;" (assignment_expression "uVar5 = 4" identifier = number_literal) ;) })) (return_statement "return uVar5 & 0xffff;" return (binary_expression "uVar5 & 0xffff" identifier & number_literal) ;) })) (expression_statement "uVar4 = (uint)*(ushort *)(param_1 + 0x10);" (assignment_expression "uVar4 = (uint)*(ushort *)(param_1 + 0x10)" identifier = (binary_expression "(uint)*(ushort *)(param_1 + 0x10)" (parenthesized_expression "(uint)" ( identifier )) * (cast_expression "(ushort *)(param_1 + 0x10)" ( (type_descriptor "ushort *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x10)" ( (binary_expression "param_1 + 0x10" identifier + number_literal) ))))) ;) (expression_statement "uVar3 = *(int *)(*(int *)(param_1 + 0x34) + 0x24) - 4;" (assignment_expression "uVar3 = *(int *)(*(int *)(param_1 + 0x34) + 0x24) - 4" identifier = (binary_expression "*(int *)(*(int *)(param_1 + 0x34) + 0x24) - 4" (pointer_expression "*(int *)(*(int *)(param_1 + 0x34) + 0x24)" * (cast_expression "(int *)(*(int *)(param_1 + 0x34) + 0x24)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*(int *)(param_1 + 0x34) + 0x24)" ( (binary_expression "*(int *)(param_1 + 0x34) + 0x24" (pointer_expression "*(int *)(param_1 + 0x34)" * (cast_expression "(int *)(param_1 + 0x34)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x34)" ( (binary_expression "param_1 + 0x34" identifier + number_literal) )))) + number_literal) )))) - number_literal)) ;) (if_statement "if (uVar3 == 0) {\n    trap(7);\n  }" if (parenthesized_expression "(uVar3 == 0)" ( (binary_expression "uVar3 == 0" identifier == number_literal) )) (compound_statement "{\n    trap(7);\n  }" { (expression_statement "trap(7);" (call_expression "trap(7)" identifier (argument_list "(7)" ( number_literal ))) ;) })) (expression_statement "uVar5 = uVar4 + (uVar5 - uVar4) % uVar3;" (assignment_expression "uVar5 = uVar4 + (uVar5 - uVar4) % uVar3" identifier = (binary_expression "uVar4 + (uVar5 - uVar4) % uVar3" identifier + (binary_expression "(uVar5 - uVar4) % uVar3" (parenthesized_expression "(uVar5 - uVar4)" ( (binary_expression "uVar5 - uVar4" identifier - identifier) )) % identifier))) ;) (if_statement "if (*(ushort *)(param_1 + 0xe) < uVar5) {\n    uVar5 = uVar4;\n  }" if (parenthesized_expression "(*(ushort *)(param_1 + 0xe) < uVar5)" ( (binary_expression "*(ushort *)(param_1 + 0xe) < uVar5" (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    uVar5 = uVar4;\n  }" { (expression_statement "uVar5 = uVar4;" (assignment_expression "uVar5 = uVar4" identifier = identifier) ;) })) (return_statement "return ((int)pbVar6 - param_2 & 0xffffU) + 4 + uVar5 & 0xffff;" return (binary_expression "((int)pbVar6 - param_2 & 0xffffU) + 4 + uVar5 & 0xffff" (binary_expression "((int)pbVar6 - param_2 & 0xffffU) + 4 + uVar5" (binary_expression "((int)pbVar6 - param_2 & 0xffffU) + 4" (parenthesized_expression "((int)pbVar6 - param_2 & 0xffffU)" ( (binary_expression "(int)pbVar6 - param_2 & 0xffffU" (binary_expression "(int)pbVar6 - param_2" (cast_expression "(int)pbVar6" ( (type_descriptor "int" primitive_type) ) identifier) - identifier) & number_literal) )) + number_literal) + identifier) & number_literal) ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + (binary_expression (parenthesized_expression ( IDENT )) * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) )))) ;) (expression_statement (assignment_expression IDENT = (binary_expression (parenthesized_expression ( IDENT )) * IDENT)) ;) (if_statement if (parenthesized_expression ( (binary_expression LIT < IDENT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT & LIT)) ;) (do_statement do (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (expression_statement (assignment_expression IDENT = (binary_expression (binary_expression (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 IDENT != IDENT) )) ;) })) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (if_statement if (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) != (char_literal ' escape_sequence ')) )) (compound_statement { (expression_statement (assignment_expression IDENT = IDENT) ;) (do_statement do (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (if_statement if (parenthesized_expression ( (binary_expression LIT < (cast_expression ( (type_descriptor TYPE) ) (pointer_expression * IDENT))) )) (break_statement break ;)) (expression_statement (assignment_expression IDENT = IDENT) ;) }) while (parenthesized_expression ( (binary_expression IDENT != (binary_expression IDENT + LIT)) )) ;) })) (if_statement if (parenthesized_expression ( (binary_expression IDENT <= (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) )) (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) - IDENT) )) + IDENT)) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT < LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) })) (return_statement return (binary_expression IDENT & LIT) ;) })) (expression_statement (assignment_expression IDENT = (binary_expression (parenthesized_expression ( IDENT )) * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (expression_statement (assignment_expression IDENT = (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) + LIT) )))) - LIT)) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( LIT ))) ;) })) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + (binary_expression (parenthesized_expression ( (binary_expression IDENT - IDENT) )) % 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 (assignment_expression IDENT = IDENT) ;) })) (return_statement return (binary_expression (binary_expression (binary_expression (parenthesized_expression ( (binary_expression (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) - IDENT) & LIT) )) + LIT) + IDENT) & LIT) ;) })))
(function_definition "uint FUN_0001e76c(int param_1,int param_2)\n\n{\n  byte *pbVar1;\n  byte *pbVar2;\n  uint uVar3;\n  uint uVar4;\n  uint uVar5;\n  byte *pbVar6;\n  \n  pbVar2 = (byte *)(param_2 + (uint)*(byte *)(param_1 + 10));\n  uVar5 = (uint)*pbVar2;\n  if (0x7f < uVar5) {\n    pbVar6 = pbVar2 + 8;\n    uVar5 = uVar5 & 0x7f;\n    do {\n      pbVar2 = pbVar2 + 1;\n      uVar5 = *pbVar2 & 0x7f | uVar5 << 7;\n      if (-1 < (char)*pbVar2) break;\n    } while (pbVar6 != pbVar2);\n  }\n  pbVar6 = pbVar2 + 1;\n  if (*(char *)(param_1 + 2) != '\0') {\n    pbVar1 = pbVar6;\n    do {\n      pbVar6 = pbVar1 + 1;\n      if (-1 < (char)*pbVar1) break;\n      pbVar1 = pbVar6;\n    } while (pbVar6 != pbVar2 + 10);\n  }\n  if (uVar5 <= *(ushort *)(param_1 + 0xe)) {\n    uVar5 = ((int)pbVar6 - param_2) + uVar5;\n    if (uVar5 < 4) {\n      uVar5 = 4;\n    }\n    return uVar5 & 0xffff;\n  }\n  uVar4 = (uint)*(ushort *)(param_1 + 0x10);\n  uVar3 = *(int *)(*(int *)(param_1 + 0x34) + 0x24) - 4;\n  if (uVar3 == 0) {\n    trap(7);\n  }\n  uVar5 = uVar4 + (uVar5 - uVar4) % uVar3;\n  if (*(ushort *)(param_1 + 0xe) < uVar5) {\n    uVar5 = uVar4;\n  }\n  return ((int)pbVar6 - param_2 & 0xffffU) + 4 + uVar5 & 0xffff;\n}" (type_identifier "uint") (function_declarator "FUN_0001e76c(int param_1,int param_2)" (identifier "FUN_0001e76c") (parameter_list "(int param_1,int param_2)" (( "(") (parameter_declaration "int param_1" (primitive_type "int") (identifier "param_1")) (, ",") (parameter_declaration "int param_2" (primitive_type "int") (identifier "param_2")) () ")"))) (compound_statement "{\n  byte *pbVar1;\n  byte *pbVar2;\n  uint uVar3;\n  uint uVar4;\n  uint uVar5;\n  byte *pbVar6;\n  \n  pbVar2 = (byte *)(param_2 + (uint)*(byte *)(param_1 + 10));\n  uVar5 = (uint)*pbVar2;\n  if (0x7f < uVar5) {\n    pbVar6 = pbVar2 + 8;\n    uVar5 = uVar5 & 0x7f;\n    do {\n      pbVar2 = pbVar2 + 1;\n      uVar5 = *pbVar2 & 0x7f | uVar5 << 7;\n      if (-1 < (char)*pbVar2) break;\n    } while (pbVar6 != pbVar2);\n  }\n  pbVar6 = pbVar2 + 1;\n  if (*(char *)(param_1 + 2) != '\0') {\n    pbVar1 = pbVar6;\n    do {\n      pbVar6 = pbVar1 + 1;\n      if (-1 < (char)*pbVar1) break;\n      pbVar1 = pbVar6;\n    } while (pbVar6 != pbVar2 + 10);\n  }\n  if (uVar5 <= *(ushort *)(param_1 + 0xe)) {\n    uVar5 = ((int)pbVar6 - param_2) + uVar5;\n    if (uVar5 < 4) {\n      uVar5 = 4;\n    }\n    return uVar5 & 0xffff;\n  }\n  uVar4 = (uint)*(ushort *)(param_1 + 0x10);\n  uVar3 = *(int *)(*(int *)(param_1 + 0x34) + 0x24) - 4;\n  if (uVar3 == 0) {\n    trap(7);\n  }\n  uVar5 = uVar4 + (uVar5 - uVar4) % uVar3;\n  if (*(ushort *)(param_1 + 0xe) < uVar5) {\n    uVar5 = uVar4;\n  }\n  return ((int)pbVar6 - param_2 & 0xffffU) + 4 + uVar5 & 0xffff;\n}" ({ "{") (declaration "byte *pbVar1;" (type_identifier "byte") (pointer_declarator "*pbVar1" (* "*") (identifier "pbVar1")) (; ";")) (declaration "byte *pbVar2;" (type_identifier "byte") (pointer_declarator "*pbVar2" (* "*") (identifier "pbVar2")) (; ";")) (declaration "uint uVar3;" (type_identifier "uint") (identifier "uVar3") (; ";")) (declaration "uint uVar4;" (type_identifier "uint") (identifier "uVar4") (; ";")) (declaration "uint uVar5;" (type_identifier "uint") (identifier "uVar5") (; ";")) (declaration "byte *pbVar6;" (type_identifier "byte") (pointer_declarator "*pbVar6" (* "*") (identifier "pbVar6")) (; ";")) (expression_statement "pbVar2 = (byte *)(param_2 + (uint)*(byte *)(param_1 + 10));" (assignment_expression "pbVar2 = (byte *)(param_2 + (uint)*(byte *)(param_1 + 10))" (identifier "pbVar2") (= "=") (cast_expression "(byte *)(param_2 + (uint)*(byte *)(param_1 + 10))" (( "(") (type_descriptor "byte *" (type_identifier "byte") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_2 + (uint)*(byte *)(param_1 + 10))" (( "(") (binary_expression "param_2 + (uint)*(byte *)(param_1 + 10)" (identifier "param_2") (+ "+") (binary_expression "(uint)*(byte *)(param_1 + 10)" (parenthesized_expression "(uint)" (( "(") (identifier "uint") () ")")) (* "*") (cast_expression "(byte *)(param_1 + 10)" (( "(") (type_descriptor "byte *" (type_identifier "byte") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 10)" (( "(") (binary_expression "param_1 + 10" (identifier "param_1") (+ "+") (number_literal "10")) () ")"))))) () ")")))) (; ";")) (expression_statement "uVar5 = (uint)*pbVar2;" (assignment_expression "uVar5 = (uint)*pbVar2" (identifier "uVar5") (= "=") (binary_expression "(uint)*pbVar2" (parenthesized_expression "(uint)" (( "(") (identifier "uint") () ")")) (* "*") (identifier "pbVar2"))) (; ";")) (if_statement "if (0x7f < uVar5) {\n    pbVar6 = pbVar2 + 8;\n    uVar5 = uVar5 & 0x7f;\n    do {\n      pbVar2 = pbVar2 + 1;\n      uVar5 = *pbVar2 & 0x7f | uVar5 << 7;\n      if (-1 < (char)*pbVar2) break;\n    } while (pbVar6 != pbVar2);\n  }" (if "if") (parenthesized_expression "(0x7f < uVar5)" (( "(") (binary_expression "0x7f < uVar5" (number_literal "0x7f") (< "<") (identifier "uVar5")) () ")")) (compound_statement "{\n    pbVar6 = pbVar2 + 8;\n    uVar5 = uVar5 & 0x7f;\n    do {\n      pbVar2 = pbVar2 + 1;\n      uVar5 = *pbVar2 & 0x7f | uVar5 << 7;\n      if (-1 < (char)*pbVar2) break;\n    } while (pbVar6 != pbVar2);\n  }" ({ "{") (expression_statement "pbVar6 = pbVar2 + 8;" (assignment_expression "pbVar6 = pbVar2 + 8" (identifier "pbVar6") (= "=") (binary_expression "pbVar2 + 8" (identifier "pbVar2") (+ "+") (number_literal "8"))) (; ";")) (expression_statement "uVar5 = uVar5 & 0x7f;" (assignment_expression "uVar5 = uVar5 & 0x7f" (identifier "uVar5") (= "=") (binary_expression "uVar5 & 0x7f" (identifier "uVar5") (& "&") (number_literal "0x7f"))) (; ";")) (do_statement "do {\n      pbVar2 = pbVar2 + 1;\n      uVar5 = *pbVar2 & 0x7f | uVar5 << 7;\n      if (-1 < (char)*pbVar2) break;\n    } while (pbVar6 != pbVar2);" (do "do") (compound_statement "{\n      pbVar2 = pbVar2 + 1;\n      uVar5 = *pbVar2 & 0x7f | uVar5 << 7;\n      if (-1 < (char)*pbVar2) break;\n    }" ({ "{") (expression_statement "pbVar2 = pbVar2 + 1;" (assignment_expression "pbVar2 = pbVar2 + 1" (identifier "pbVar2") (= "=") (binary_expression "pbVar2 + 1" (identifier "pbVar2") (+ "+") (number_literal "1"))) (; ";")) (expression_statement "uVar5 = *pbVar2 & 0x7f | uVar5 << 7;" (assignment_expression "uVar5 = *pbVar2 & 0x7f | uVar5 << 7" (identifier "uVar5") (= "=") (binary_expression "*pbVar2 & 0x7f | uVar5 << 7" (binary_expression "*pbVar2 & 0x7f" (pointer_expression "*pbVar2" (* "*") (identifier "pbVar2")) (& "&") (number_literal "0x7f")) (| "|") (binary_expression "uVar5 << 7" (identifier "uVar5") (<< "<<") (number_literal "7")))) (; ";")) (if_statement "if (-1 < (char)*pbVar2) break;" (if "if") (parenthesized_expression "(-1 < (char)*pbVar2)" (( "(") (binary_expression "-1 < (char)*pbVar2" (number_literal "-1") (< "<") (cast_expression "(char)*pbVar2" (( "(") (type_descriptor "char" (primitive_type "char")) () ")") (pointer_expression "*pbVar2" (* "*") (identifier "pbVar2")))) () ")")) (break_statement "break;" (break "break") (; ";"))) (} "}")) (while "while") (parenthesized_expression "(pbVar6 != pbVar2)" (( "(") (binary_expression "pbVar6 != pbVar2" (identifier "pbVar6") (!= "!=") (identifier "pbVar2")) () ")")) (; ";")) (} "}"))) (expression_statement "pbVar6 = pbVar2 + 1;" (assignment_expression "pbVar6 = pbVar2 + 1" (identifier "pbVar6") (= "=") (binary_expression "pbVar2 + 1" (identifier "pbVar2") (+ "+") (number_literal "1"))) (; ";")) (if_statement "if (*(char *)(param_1 + 2) != '\0') {\n    pbVar1 = pbVar6;\n    do {\n      pbVar6 = pbVar1 + 1;\n      if (-1 < (char)*pbVar1) break;\n      pbVar1 = pbVar6;\n    } while (pbVar6 != pbVar2 + 10);\n  }" (if "if") (parenthesized_expression "(*(char *)(param_1 + 2) != '\0')" (( "(") (binary_expression "*(char *)(param_1 + 2) != '\0'" (pointer_expression "*(char *)(param_1 + 2)" (* "*") (cast_expression "(char *)(param_1 + 2)" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 2)" (( "(") (binary_expression "param_1 + 2" (identifier "param_1") (+ "+") (number_literal "2")) () ")")))) (!= "!=") (char_literal "'\0'" (' "'") (escape_sequence "\0") (' "'"))) () ")")) (compound_statement "{\n    pbVar1 = pbVar6;\n    do {\n      pbVar6 = pbVar1 + 1;\n      if (-1 < (char)*pbVar1) break;\n      pbVar1 = pbVar6;\n    } while (pbVar6 != pbVar2 + 10);\n  }" ({ "{") (expression_statement "pbVar1 = pbVar6;" (assignment_expression "pbVar1 = pbVar6" (identifier "pbVar1") (= "=") (identifier "pbVar6")) (; ";")) (do_statement "do {\n      pbVar6 = pbVar1 + 1;\n      if (-1 < (char)*pbVar1) break;\n      pbVar1 = pbVar6;\n    } while (pbVar6 != pbVar2 + 10);" (do "do") (compound_statement "{\n      pbVar6 = pbVar1 + 1;\n      if (-1 < (char)*pbVar1) break;\n      pbVar1 = pbVar6;\n    }" ({ "{") (expression_statement "pbVar6 = pbVar1 + 1;" (assignment_expression "pbVar6 = pbVar1 + 1" (identifier "pbVar6") (= "=") (binary_expression "pbVar1 + 1" (identifier "pbVar1") (+ "+") (number_literal "1"))) (; ";")) (if_statement "if (-1 < (char)*pbVar1) break;" (if "if") (parenthesized_expression "(-1 < (char)*pbVar1)" (( "(") (binary_expression "-1 < (char)*pbVar1" (number_literal "-1") (< "<") (cast_expression "(char)*pbVar1" (( "(") (type_descriptor "char" (primitive_type "char")) () ")") (pointer_expression "*pbVar1" (* "*") (identifier "pbVar1")))) () ")")) (break_statement "break;" (break "break") (; ";"))) (expression_statement "pbVar1 = pbVar6;" (assignment_expression "pbVar1 = pbVar6" (identifier "pbVar1") (= "=") (identifier "pbVar6")) (; ";")) (} "}")) (while "while") (parenthesized_expression "(pbVar6 != pbVar2 + 10)" (( "(") (binary_expression "pbVar6 != pbVar2 + 10" (identifier "pbVar6") (!= "!=") (binary_expression "pbVar2 + 10" (identifier "pbVar2") (+ "+") (number_literal "10"))) () ")")) (; ";")) (} "}"))) (if_statement "if (uVar5 <= *(ushort *)(param_1 + 0xe)) {\n    uVar5 = ((int)pbVar6 - param_2) + uVar5;\n    if (uVar5 < 4) {\n      uVar5 = 4;\n    }\n    return uVar5 & 0xffff;\n  }" (if "if") (parenthesized_expression "(uVar5 <= *(ushort *)(param_1 + 0xe))" (( "(") (binary_expression "uVar5 <= *(ushort *)(param_1 + 0xe)" (identifier "uVar5") (<= "<=") (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")) () ")"))))) () ")")) (compound_statement "{\n    uVar5 = ((int)pbVar6 - param_2) + uVar5;\n    if (uVar5 < 4) {\n      uVar5 = 4;\n    }\n    return uVar5 & 0xffff;\n  }" ({ "{") (expression_statement "uVar5 = ((int)pbVar6 - param_2) + uVar5;" (assignment_expression "uVar5 = ((int)pbVar6 - param_2) + uVar5" (identifier "uVar5") (= "=") (binary_expression "((int)pbVar6 - param_2) + uVar5" (parenthesized_expression "((int)pbVar6 - param_2)" (( "(") (binary_expression "(int)pbVar6 - param_2" (cast_expression "(int)pbVar6" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "pbVar6")) (- "-") (identifier "param_2")) () ")")) (+ "+") (identifier "uVar5"))) (; ";")) (if_statement "if (uVar5 < 4) {\n      uVar5 = 4;\n    }" (if "if") (parenthesized_expression "(uVar5 < 4)" (( "(") (binary_expression "uVar5 < 4" (identifier "uVar5") (< "<") (number_literal "4")) () ")")) (compound_statement "{\n      uVar5 = 4;\n    }" ({ "{") (expression_statement "uVar5 = 4;" (assignment_expression "uVar5 = 4" (identifier "uVar5") (= "=") (number_literal "4")) (; ";")) (} "}"))) (return_statement "return uVar5 & 0xffff;" (return "return") (binary_expression "uVar5 & 0xffff" (identifier "uVar5") (& "&") (number_literal "0xffff")) (; ";")) (} "}"))) (expression_statement "uVar4 = (uint)*(ushort *)(param_1 + 0x10);" (assignment_expression "uVar4 = (uint)*(ushort *)(param_1 + 0x10)" (identifier "uVar4") (= "=") (binary_expression "(uint)*(ushort *)(param_1 + 0x10)" (parenthesized_expression "(uint)" (( "(") (identifier "uint") () ")")) (* "*") (cast_expression "(ushort *)(param_1 + 0x10)" (( "(") (type_descriptor "ushort *" (type_identifier "ushort") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x10)" (( "(") (binary_expression "param_1 + 0x10" (identifier "param_1") (+ "+") (number_literal "0x10")) () ")"))))) (; ";")) (expression_statement "uVar3 = *(int *)(*(int *)(param_1 + 0x34) + 0x24) - 4;" (assignment_expression "uVar3 = *(int *)(*(int *)(param_1 + 0x34) + 0x24) - 4" (identifier "uVar3") (= "=") (binary_expression "*(int *)(*(int *)(param_1 + 0x34) + 0x24) - 4" (pointer_expression "*(int *)(*(int *)(param_1 + 0x34) + 0x24)" (* "*") (cast_expression "(int *)(*(int *)(param_1 + 0x34) + 0x24)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(*(int *)(param_1 + 0x34) + 0x24)" (( "(") (binary_expression "*(int *)(param_1 + 0x34) + 0x24" (pointer_expression "*(int *)(param_1 + 0x34)" (* "*") (cast_expression "(int *)(param_1 + 0x34)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x34)" (( "(") (binary_expression "param_1 + 0x34" (identifier "param_1") (+ "+") (number_literal "0x34")) () ")")))) (+ "+") (number_literal "0x24")) () ")")))) (- "-") (number_literal "4"))) (; ";")) (if_statement "if (uVar3 == 0) {\n    trap(7);\n  }" (if "if") (parenthesized_expression "(uVar3 == 0)" (( "(") (binary_expression "uVar3 == 0" (identifier "uVar3") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n    trap(7);\n  }" ({ "{") (expression_statement "trap(7);" (call_expression "trap(7)" (identifier "trap") (argument_list "(7)" (( "(") (number_literal "7") () ")"))) (; ";")) (} "}"))) (expression_statement "uVar5 = uVar4 + (uVar5 - uVar4) % uVar3;" (assignment_expression "uVar5 = uVar4 + (uVar5 - uVar4) % uVar3" (identifier "uVar5") (= "=") (binary_expression "uVar4 + (uVar5 - uVar4) % uVar3" (identifier "uVar4") (+ "+") (binary_expression "(uVar5 - uVar4) % uVar3" (parenthesized_expression "(uVar5 - uVar4)" (( "(") (binary_expression "uVar5 - uVar4" (identifier "uVar5") (- "-") (identifier "uVar4")) () ")")) (% "%") (identifier "uVar3")))) (; ";")) (if_statement "if (*(ushort *)(param_1 + 0xe) < uVar5) {\n    uVar5 = uVar4;\n  }" (if "if") (parenthesized_expression "(*(ushort *)(param_1 + 0xe) < uVar5)" (( "(") (binary_expression "*(ushort *)(param_1 + 0xe) < uVar5" (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 "uVar5")) () ")")) (compound_statement "{\n    uVar5 = uVar4;\n  }" ({ "{") (expression_statement "uVar5 = uVar4;" (assignment_expression "uVar5 = uVar4" (identifier "uVar5") (= "=") (identifier "uVar4")) (; ";")) (} "}"))) (return_statement "return ((int)pbVar6 - param_2 & 0xffffU) + 4 + uVar5 & 0xffff;" (return "return") (binary_expression "((int)pbVar6 - param_2 & 0xffffU) + 4 + uVar5 & 0xffff" (binary_expression "((int)pbVar6 - param_2 & 0xffffU) + 4 + uVar5" (binary_expression "((int)pbVar6 - param_2 & 0xffffU) + 4" (parenthesized_expression "((int)pbVar6 - param_2 & 0xffffU)" (( "(") (binary_expression "(int)pbVar6 - param_2 & 0xffffU" (binary_expression "(int)pbVar6 - param_2" (cast_expression "(int)pbVar6" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "pbVar6")) (- "-") (identifier "param_2")) (& "&") (number_literal "0xffffU")) () ")")) (+ "+") (number_literal "4")) (+ "+") (identifier "uVar5")) (& "&") (number_literal "0xffff")) (; ";")) (} "}")))
(translation_unit (function_definition type: (type_identifier) declarator: (function_declarator declarator: (identifier) parameters: (parameter_list (parameter_declaration type: (primitive_type) declarator: (identifier)) (parameter_declaration type: (primitive_type) declarator: (identifier)))) body: (compound_statement (declaration type: (type_identifier) declarator: (pointer_declarator declarator: (identifier))) (declaration type: (type_identifier) declarator: (pointer_declarator declarator: (identifier))) (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (type_identifier) declarator: (pointer_declarator declarator: (identifier))) (expression_statement (assignment_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (binary_expression left: (parenthesized_expression (identifier)) right: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal)))))))))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (parenthesized_expression (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)))) (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: (identifier) right: (identifier)))))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal)))) (if_statement condition: (parenthesized_expression (binary_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) right: (char_literal (escape_sequence)))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (identifier))) (do_statement body: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal)))) (if_statement condition: (parenthesized_expression (binary_expression left: (number_literal) right: (cast_expression type: (type_descriptor type: (primitive_type)) value: (pointer_expression argument: (identifier))))) consequence: (break_statement)) (expression_statement (assignment_expression left: (identifier) right: (identifier)))) condition: (parenthesized_expression (binary_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal))))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (parenthesized_expression (binary_expression left: (cast_expression type: (type_descriptor type: (primitive_type)) value: (identifier)) right: (identifier))) right: (identifier)))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (number_literal))))) (return_statement (binary_expression left: (identifier) right: (number_literal))))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (parenthesized_expression (identifier)) right: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) right: (number_literal))))) right: (number_literal)))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (expression_statement (call_expression function: (identifier) arguments: (argument_list (number_literal)))))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (binary_expression left: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))) right: (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 (assignment_expression left: (identifier) right: (identifier))))) (return_statement (binary_expression left: (binary_expression left: (binary_expression left: (parenthesized_expression (binary_expression left: (binary_expression left: (cast_expression type: (type_descriptor type: (primitive_type)) value: (identifier)) right: (identifier)) right: (number_literal))) right: (number_literal)) right: (identifier)) right: (number_literal))))))

uint MASKED(int param_1,int param_2)

{
  byte *pbVar1;
  byte *pbVar2;
  uint uVar3;
  uint uVar4;
  uint uVar5;
  byte *pbVar6;
  
  pbVar2 = (byte *)(param_2 + (uint)*(byte *)(param_1 + 10));
  uVar5 = (uint)*pbVar2;
  if (0x7f < uVar5) {
    pbVar6 = pbVar2 + 8;
    uVar5 = uVar5 & 0x7f;
    do {
      pbVar2 = pbVar2 + 1;
      uVar5 = *pbVar2 & 0x7f | uVar5 << 7;
      if (-1 < (char)*pbVar2) break;
    } while (pbVar6 != pbVar2);
  }
  pbVar6 = pbVar2 + 1;
  if (*(char *)(param_1 + 2) != '\0') {
    pbVar1 = pbVar6;
    do {
      pbVar6 = pbVar1 + 1;
      if (-1 < (char)*pbVar1) break;
      pbVar1 = pbVar6;
    } while (pbVar6 != pbVar2 + 10);
  }
  if (uVar5 <= *(ushort *)(param_1 + 0xe)) {
    uVar5 = ((int)pbVar6 - param_2) + uVar5;
    if (uVar5 < 4) {
      uVar5 = 4;
    }
    return uVar5 & 0xffff;
  }
  uVar4 = (uint)*(ushort *)(param_1 + 0x10);
  uVar3 = *(int *)(*(int *)(param_1 + 0x34) + 0x24) - 4;
  if (uVar3 == 0) {
    trap(7);
  }
  uVar5 = uVar4 + (uVar5 - uVar4) % uVar3;
  if (*(ushort *)(param_1 + 0xe) < uVar5) {
    uVar5 = uVar4;
  }
  return ((int)pbVar6 - param_2 & 0xffffU) + 4 + uVar5 & 0xffff;
}

