
void fts3PutDeltaVarint3(char **pp,int bDescIdx,sqlite3_int64 *piPrev,int *pbFirst,
                        sqlite3_int64 iVal)

{
  byte bVar1;
  byte *pbVar2;
  uint uVar3;
  uint uVar4;
  byte *pbVar5;
  uint uVar6;
  byte *pbVar7;
  
  uVar3 = (uint)*piPrev;
  if ((bDescIdx == 0) || (*pbFirst == 0)) {
    uVar4 = iVal._4_4_ - uVar3;
    uVar3 = (iVal._0_4_ - *(int *)piPrev) - (uint)(iVal._4_4_ < uVar4);
  }
  else {
    uVar4 = uVar3 - iVal._4_4_;
    uVar3 = (*(int *)piPrev - iVal._0_4_) - (uint)(uVar3 < uVar4);
  }
  pbVar7 = (byte *)*pp;
  pbVar2 = pbVar7;
  do {
    pbVar5 = pbVar2;
    uVar6 = uVar3 << 0x19;
    uVar3 = uVar3 >> 7;
    uVar6 = uVar6 | uVar4 >> 7;
    bVar1 = (byte)uVar4;
    *pbVar5 = bVar1 | 0x80;
    uVar4 = uVar6;
    pbVar2 = pbVar5 + 1;
  } while (uVar3 != 0 || uVar6 != 0);
  *pbVar5 = bVar1 & 0x7f;
  *pp = *pp + ((int)(pbVar5 + 1) - (int)pbVar7);
  *piPrev = iVal;
  *pbFirst = 1;
  return;
}



void FUN_00021f28(int *param_1,int param_2,int *param_3,int *param_4,int param_5,uint param_6)

{
  byte bVar1;
  byte *pbVar2;
  uint uVar3;
  uint uVar4;
  byte *pbVar5;
  uint uVar6;
  byte *pbVar7;
  
  uVar4 = param_3[1];
  if ((param_2 == 0) || (*param_4 == 0)) {
    uVar3 = param_6 - uVar4;
    uVar4 = (param_5 - *param_3) - (uint)(param_6 < uVar3);
  }
  else {
    uVar3 = uVar4 - param_6;
    uVar4 = (*param_3 - param_5) - (uint)(uVar4 < uVar3);
  }
  pbVar7 = (byte *)*param_1;
  pbVar2 = pbVar7;
  do {
    pbVar5 = pbVar2;
    uVar6 = uVar4 << 0x19;
    uVar4 = uVar4 >> 7;
    uVar6 = uVar6 | uVar3 >> 7;
    bVar1 = (byte)uVar3;
    *pbVar5 = bVar1 | 0x80;
    uVar3 = uVar6;
    pbVar2 = pbVar5 + 1;
  } while (uVar4 != 0 || uVar6 != 0);
  *pbVar5 = bVar1 & 0x7f;
  *param_1 = (int)(pbVar5 + 1 + (*param_1 - (int)pbVar7));
  *param_3 = param_5;
  param_3[1] = param_6;
  *param_4 = 1;
  return;
}


lw t5,0x10(sp)
lw t6,0x14(sp)
lw v0,0x0(a2)
beq a1,zero,0x00021f48
_lw t0,0x4(a2)
lw v1,0x0(a3)
bne v1,zero,0x00021fc0
_nop
subu v1,t6,t0
subu v0,t5,v0
sltu a1,t6,v1
subu v0,v0,a1
lw t7,0x0(a0)
li t4,-0x80
b 0x00021f6c
_or t1,t7,zero
or t1,a1,zero
sll t3,v0,0x19
srl t2,v1,0x7
addiu a1,t1,0x1
srl v0,v0,0x7
andi t0,v1,0xff
or v1,t3,t2
or t2,v0,v1
or t3,t0,t4
bne t2,zero,0x00021f68
_sb t3,-0x1(a1)
andi t0,t0,0x7f
sb t0,0x0(t1)
subu a1,a1,t7
lw v0,0x0(a0)
addu a1,v0,a1
li v0,0x1
sw a1,0x0(a0)
sw t5,0x0(a2)
sw t6,0x4(a2)
jr ra
_sw v0,0x0(a3)
subu v1,t0,t6
subu v0,v0,t5
sltu t0,t0,v1
b 0x00021f58
_subu v0,v0,t0
(translation_unit "void FUN_00021f28(int *param_1,int param_2,int *param_3,int *param_4,int param_5,uint param_6)\n\n{\n  byte bVar1;\n  byte *pbVar2;\n  uint uVar3;\n  uint uVar4;\n  byte *pbVar5;\n  uint uVar6;\n  byte *pbVar7;\n  \n  uVar4 = param_3[1];\n  if ((param_2 == 0) || (*param_4 == 0)) {\n    uVar3 = param_6 - uVar4;\n    uVar4 = (param_5 - *param_3) - (uint)(param_6 < uVar3);\n  }\n  else {\n    uVar3 = uVar4 - param_6;\n    uVar4 = (*param_3 - param_5) - (uint)(uVar4 < uVar3);\n  }\n  pbVar7 = (byte *)*param_1;\n  pbVar2 = pbVar7;\n  do {\n    pbVar5 = pbVar2;\n    uVar6 = uVar4 << 0x19;\n    uVar4 = uVar4 >> 7;\n    uVar6 = uVar6 | uVar3 >> 7;\n    bVar1 = (byte)uVar3;\n    *pbVar5 = bVar1 | 0x80;\n    uVar3 = uVar6;\n    pbVar2 = pbVar5 + 1;\n  } while (uVar4 != 0 || uVar6 != 0);\n  *pbVar5 = bVar1 & 0x7f;\n  *param_1 = (int)(pbVar5 + 1 + (*param_1 - (int)pbVar7));\n  *param_3 = param_5;\n  param_3[1] = param_6;\n  *param_4 = 1;\n  return;\n}\n\n" (function_definition "void FUN_00021f28(int *param_1,int param_2,int *param_3,int *param_4,int param_5,uint param_6)\n\n{\n  byte bVar1;\n  byte *pbVar2;\n  uint uVar3;\n  uint uVar4;\n  byte *pbVar5;\n  uint uVar6;\n  byte *pbVar7;\n  \n  uVar4 = param_3[1];\n  if ((param_2 == 0) || (*param_4 == 0)) {\n    uVar3 = param_6 - uVar4;\n    uVar4 = (param_5 - *param_3) - (uint)(param_6 < uVar3);\n  }\n  else {\n    uVar3 = uVar4 - param_6;\n    uVar4 = (*param_3 - param_5) - (uint)(uVar4 < uVar3);\n  }\n  pbVar7 = (byte *)*param_1;\n  pbVar2 = pbVar7;\n  do {\n    pbVar5 = pbVar2;\n    uVar6 = uVar4 << 0x19;\n    uVar4 = uVar4 >> 7;\n    uVar6 = uVar6 | uVar3 >> 7;\n    bVar1 = (byte)uVar3;\n    *pbVar5 = bVar1 | 0x80;\n    uVar3 = uVar6;\n    pbVar2 = pbVar5 + 1;\n  } while (uVar4 != 0 || uVar6 != 0);\n  *pbVar5 = bVar1 & 0x7f;\n  *param_1 = (int)(pbVar5 + 1 + (*param_1 - (int)pbVar7));\n  *param_3 = param_5;\n  param_3[1] = param_6;\n  *param_4 = 1;\n  return;\n}" primitive_type (function_declarator "FUN_00021f28(int *param_1,int param_2,int *param_3,int *param_4,int param_5,uint param_6)" identifier (parameter_list "(int *param_1,int param_2,int *param_3,int *param_4,int param_5,uint param_6)" ( (parameter_declaration "int *param_1" primitive_type (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "int param_2" primitive_type identifier) , (parameter_declaration "int *param_3" primitive_type (pointer_declarator "*param_3" * identifier)) , (parameter_declaration "int *param_4" primitive_type (pointer_declarator "*param_4" * identifier)) , (parameter_declaration "int param_5" primitive_type identifier) , (parameter_declaration "uint param_6" type_identifier identifier) ))) (compound_statement "{\n  byte bVar1;\n  byte *pbVar2;\n  uint uVar3;\n  uint uVar4;\n  byte *pbVar5;\n  uint uVar6;\n  byte *pbVar7;\n  \n  uVar4 = param_3[1];\n  if ((param_2 == 0) || (*param_4 == 0)) {\n    uVar3 = param_6 - uVar4;\n    uVar4 = (param_5 - *param_3) - (uint)(param_6 < uVar3);\n  }\n  else {\n    uVar3 = uVar4 - param_6;\n    uVar4 = (*param_3 - param_5) - (uint)(uVar4 < uVar3);\n  }\n  pbVar7 = (byte *)*param_1;\n  pbVar2 = pbVar7;\n  do {\n    pbVar5 = pbVar2;\n    uVar6 = uVar4 << 0x19;\n    uVar4 = uVar4 >> 7;\n    uVar6 = uVar6 | uVar3 >> 7;\n    bVar1 = (byte)uVar3;\n    *pbVar5 = bVar1 | 0x80;\n    uVar3 = uVar6;\n    pbVar2 = pbVar5 + 1;\n  } while (uVar4 != 0 || uVar6 != 0);\n  *pbVar5 = bVar1 & 0x7f;\n  *param_1 = (int)(pbVar5 + 1 + (*param_1 - (int)pbVar7));\n  *param_3 = param_5;\n  param_3[1] = param_6;\n  *param_4 = 1;\n  return;\n}" { (declaration "byte bVar1;" type_identifier identifier ;) (declaration "byte *pbVar2;" type_identifier (pointer_declarator "*pbVar2" * identifier) ;) (declaration "uint uVar3;" type_identifier identifier ;) (declaration "uint uVar4;" type_identifier identifier ;) (declaration "byte *pbVar5;" type_identifier (pointer_declarator "*pbVar5" * identifier) ;) (declaration "uint uVar6;" type_identifier identifier ;) (declaration "byte *pbVar7;" type_identifier (pointer_declarator "*pbVar7" * identifier) ;) (expression_statement "uVar4 = param_3[1];" (assignment_expression "uVar4 = param_3[1]" identifier = (subscript_expression "param_3[1]" identifier [ number_literal ])) ;) (if_statement "if ((param_2 == 0) || (*param_4 == 0)) {\n    uVar3 = param_6 - uVar4;\n    uVar4 = (param_5 - *param_3) - (uint)(param_6 < uVar3);\n  }\n  else {\n    uVar3 = uVar4 - param_6;\n    uVar4 = (*param_3 - param_5) - (uint)(uVar4 < uVar3);\n  }" if (parenthesized_expression "((param_2 == 0) || (*param_4 == 0))" ( (binary_expression "(param_2 == 0) || (*param_4 == 0)" (parenthesized_expression "(param_2 == 0)" ( (binary_expression "param_2 == 0" identifier == number_literal) )) || (parenthesized_expression "(*param_4 == 0)" ( (binary_expression "*param_4 == 0" (pointer_expression "*param_4" * identifier) == number_literal) ))) )) (compound_statement "{\n    uVar3 = param_6 - uVar4;\n    uVar4 = (param_5 - *param_3) - (uint)(param_6 < uVar3);\n  }" { (expression_statement "uVar3 = param_6 - uVar4;" (assignment_expression "uVar3 = param_6 - uVar4" identifier = (binary_expression "param_6 - uVar4" identifier - identifier)) ;) (expression_statement "uVar4 = (param_5 - *param_3) - (uint)(param_6 < uVar3);" (assignment_expression "uVar4 = (param_5 - *param_3) - (uint)(param_6 < uVar3)" identifier = (binary_expression "(param_5 - *param_3) - (uint)(param_6 < uVar3)" (parenthesized_expression "(param_5 - *param_3)" ( (binary_expression "param_5 - *param_3" identifier - (pointer_expression "*param_3" * identifier)) )) - (call_expression "(uint)(param_6 < uVar3)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(param_6 < uVar3)" ( (binary_expression "param_6 < uVar3" identifier < identifier) ))))) ;) }) (else_clause "else {\n    uVar3 = uVar4 - param_6;\n    uVar4 = (*param_3 - param_5) - (uint)(uVar4 < uVar3);\n  }" else (compound_statement "{\n    uVar3 = uVar4 - param_6;\n    uVar4 = (*param_3 - param_5) - (uint)(uVar4 < uVar3);\n  }" { (expression_statement "uVar3 = uVar4 - param_6;" (assignment_expression "uVar3 = uVar4 - param_6" identifier = (binary_expression "uVar4 - param_6" identifier - identifier)) ;) (expression_statement "uVar4 = (*param_3 - param_5) - (uint)(uVar4 < uVar3);" (assignment_expression "uVar4 = (*param_3 - param_5) - (uint)(uVar4 < uVar3)" identifier = (binary_expression "(*param_3 - param_5) - (uint)(uVar4 < uVar3)" (parenthesized_expression "(*param_3 - param_5)" ( (binary_expression "*param_3 - param_5" (pointer_expression "*param_3" * identifier) - identifier) )) - (call_expression "(uint)(uVar4 < uVar3)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(uVar4 < uVar3)" ( (binary_expression "uVar4 < uVar3" identifier < identifier) ))))) ;) }))) (expression_statement "pbVar7 = (byte *)*param_1;" (assignment_expression "pbVar7 = (byte *)*param_1" identifier = (cast_expression "(byte *)*param_1" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "*param_1" * identifier))) ;) (expression_statement "pbVar2 = pbVar7;" (assignment_expression "pbVar2 = pbVar7" identifier = identifier) ;) (do_statement "do {\n    pbVar5 = pbVar2;\n    uVar6 = uVar4 << 0x19;\n    uVar4 = uVar4 >> 7;\n    uVar6 = uVar6 | uVar3 >> 7;\n    bVar1 = (byte)uVar3;\n    *pbVar5 = bVar1 | 0x80;\n    uVar3 = uVar6;\n    pbVar2 = pbVar5 + 1;\n  } while (uVar4 != 0 || uVar6 != 0);" do (compound_statement "{\n    pbVar5 = pbVar2;\n    uVar6 = uVar4 << 0x19;\n    uVar4 = uVar4 >> 7;\n    uVar6 = uVar6 | uVar3 >> 7;\n    bVar1 = (byte)uVar3;\n    *pbVar5 = bVar1 | 0x80;\n    uVar3 = uVar6;\n    pbVar2 = pbVar5 + 1;\n  }" { (expression_statement "pbVar5 = pbVar2;" (assignment_expression "pbVar5 = pbVar2" identifier = identifier) ;) (expression_statement "uVar6 = uVar4 << 0x19;" (assignment_expression "uVar6 = uVar4 << 0x19" identifier = (binary_expression "uVar4 << 0x19" identifier << number_literal)) ;) (expression_statement "uVar4 = uVar4 >> 7;" (assignment_expression "uVar4 = uVar4 >> 7" identifier = (binary_expression "uVar4 >> 7" identifier >> number_literal)) ;) (expression_statement "uVar6 = uVar6 | uVar3 >> 7;" (assignment_expression "uVar6 = uVar6 | uVar3 >> 7" identifier = (binary_expression "uVar6 | uVar3 >> 7" identifier | (binary_expression "uVar3 >> 7" identifier >> number_literal))) ;) (expression_statement "bVar1 = (byte)uVar3;" (assignment_expression "bVar1 = (byte)uVar3" identifier = (cast_expression "(byte)uVar3" ( (type_descriptor "byte" type_identifier) ) identifier)) ;) (expression_statement "*pbVar5 = bVar1 | 0x80;" (assignment_expression "*pbVar5 = bVar1 | 0x80" (pointer_expression "*pbVar5" * identifier) = (binary_expression "bVar1 | 0x80" identifier | number_literal)) ;) (expression_statement "uVar3 = uVar6;" (assignment_expression "uVar3 = uVar6" identifier = identifier) ;) (expression_statement "pbVar2 = pbVar5 + 1;" (assignment_expression "pbVar2 = pbVar5 + 1" identifier = (binary_expression "pbVar5 + 1" identifier + number_literal)) ;) }) while (parenthesized_expression "(uVar4 != 0 || uVar6 != 0)" ( (binary_expression "uVar4 != 0 || uVar6 != 0" (binary_expression "uVar4 != 0" identifier != number_literal) || (binary_expression "uVar6 != 0" identifier != number_literal)) )) ;) (expression_statement "*pbVar5 = bVar1 & 0x7f;" (assignment_expression "*pbVar5 = bVar1 & 0x7f" (pointer_expression "*pbVar5" * identifier) = (binary_expression "bVar1 & 0x7f" identifier & number_literal)) ;) (expression_statement "*param_1 = (int)(pbVar5 + 1 + (*param_1 - (int)pbVar7));" (assignment_expression "*param_1 = (int)(pbVar5 + 1 + (*param_1 - (int)pbVar7))" (pointer_expression "*param_1" * identifier) = (cast_expression "(int)(pbVar5 + 1 + (*param_1 - (int)pbVar7))" ( (type_descriptor "int" primitive_type) ) (parenthesized_expression "(pbVar5 + 1 + (*param_1 - (int)pbVar7))" ( (binary_expression "pbVar5 + 1 + (*param_1 - (int)pbVar7)" (binary_expression "pbVar5 + 1" identifier + number_literal) + (parenthesized_expression "(*param_1 - (int)pbVar7)" ( (binary_expression "*param_1 - (int)pbVar7" (pointer_expression "*param_1" * identifier) - (cast_expression "(int)pbVar7" ( (type_descriptor "int" primitive_type) ) identifier)) ))) )))) ;) (expression_statement "*param_3 = param_5;" (assignment_expression "*param_3 = param_5" (pointer_expression "*param_3" * identifier) = identifier) ;) (expression_statement "param_3[1] = param_6;" (assignment_expression "param_3[1] = param_6" (subscript_expression "param_3[1]" identifier [ number_literal ]) = identifier) ;) (expression_statement "*param_4 = 1;" (assignment_expression "*param_4 = 1" (pointer_expression "*param_4" * identifier) = number_literal) ;) (return_statement "return;" return ;) })))
(translation_unit "void fts3PutDeltaVarint3(char **pp,int bDescIdx,sqlite3_int64 *piPrev,int *pbFirst,\n                        sqlite3_int64 iVal)\n\n{\n  byte bVar1;\n  byte *pbVar2;\n  uint uVar3;\n  uint uVar4;\n  byte *pbVar5;\n  uint uVar6;\n  byte *pbVar7;\n  \n  uVar3 = (uint)*piPrev;\n  if ((bDescIdx == 0) || (*pbFirst == 0)) {\n    uVar4 = iVal._4_4_ - uVar3;\n    uVar3 = (iVal._0_4_ - *(int *)piPrev) - (uint)(iVal._4_4_ < uVar4);\n  }\n  else {\n    uVar4 = uVar3 - iVal._4_4_;\n    uVar3 = (*(int *)piPrev - iVal._0_4_) - (uint)(uVar3 < uVar4);\n  }\n  pbVar7 = (byte *)*pp;\n  pbVar2 = pbVar7;\n  do {\n    pbVar5 = pbVar2;\n    uVar6 = uVar3 << 0x19;\n    uVar3 = uVar3 >> 7;\n    uVar6 = uVar6 | uVar4 >> 7;\n    bVar1 = (byte)uVar4;\n    *pbVar5 = bVar1 | 0x80;\n    uVar4 = uVar6;\n    pbVar2 = pbVar5 + 1;\n  } while (uVar3 != 0 || uVar6 != 0);\n  *pbVar5 = bVar1 & 0x7f;\n  *pp = *pp + ((int)(pbVar5 + 1) - (int)pbVar7);\n  *piPrev = iVal;\n  *pbFirst = 1;\n  return;\n}\n\n" (function_definition "void fts3PutDeltaVarint3(char **pp,int bDescIdx,sqlite3_int64 *piPrev,int *pbFirst,\n                        sqlite3_int64 iVal)\n\n{\n  byte bVar1;\n  byte *pbVar2;\n  uint uVar3;\n  uint uVar4;\n  byte *pbVar5;\n  uint uVar6;\n  byte *pbVar7;\n  \n  uVar3 = (uint)*piPrev;\n  if ((bDescIdx == 0) || (*pbFirst == 0)) {\n    uVar4 = iVal._4_4_ - uVar3;\n    uVar3 = (iVal._0_4_ - *(int *)piPrev) - (uint)(iVal._4_4_ < uVar4);\n  }\n  else {\n    uVar4 = uVar3 - iVal._4_4_;\n    uVar3 = (*(int *)piPrev - iVal._0_4_) - (uint)(uVar3 < uVar4);\n  }\n  pbVar7 = (byte *)*pp;\n  pbVar2 = pbVar7;\n  do {\n    pbVar5 = pbVar2;\n    uVar6 = uVar3 << 0x19;\n    uVar3 = uVar3 >> 7;\n    uVar6 = uVar6 | uVar4 >> 7;\n    bVar1 = (byte)uVar4;\n    *pbVar5 = bVar1 | 0x80;\n    uVar4 = uVar6;\n    pbVar2 = pbVar5 + 1;\n  } while (uVar3 != 0 || uVar6 != 0);\n  *pbVar5 = bVar1 & 0x7f;\n  *pp = *pp + ((int)(pbVar5 + 1) - (int)pbVar7);\n  *piPrev = iVal;\n  *pbFirst = 1;\n  return;\n}" primitive_type (function_declarator "fts3PutDeltaVarint3(char **pp,int bDescIdx,sqlite3_int64 *piPrev,int *pbFirst,\n                        sqlite3_int64 iVal)" identifier (parameter_list "(char **pp,int bDescIdx,sqlite3_int64 *piPrev,int *pbFirst,\n                        sqlite3_int64 iVal)" ( (parameter_declaration "char **pp" primitive_type (pointer_declarator "**pp" * (pointer_declarator "*pp" * identifier))) , (parameter_declaration "int bDescIdx" primitive_type identifier) , (parameter_declaration "sqlite3_int64 *piPrev" type_identifier (pointer_declarator "*piPrev" * identifier)) , (parameter_declaration "int *pbFirst" primitive_type (pointer_declarator "*pbFirst" * identifier)) , (parameter_declaration "sqlite3_int64 iVal" type_identifier identifier) ))) (compound_statement "{\n  byte bVar1;\n  byte *pbVar2;\n  uint uVar3;\n  uint uVar4;\n  byte *pbVar5;\n  uint uVar6;\n  byte *pbVar7;\n  \n  uVar3 = (uint)*piPrev;\n  if ((bDescIdx == 0) || (*pbFirst == 0)) {\n    uVar4 = iVal._4_4_ - uVar3;\n    uVar3 = (iVal._0_4_ - *(int *)piPrev) - (uint)(iVal._4_4_ < uVar4);\n  }\n  else {\n    uVar4 = uVar3 - iVal._4_4_;\n    uVar3 = (*(int *)piPrev - iVal._0_4_) - (uint)(uVar3 < uVar4);\n  }\n  pbVar7 = (byte *)*pp;\n  pbVar2 = pbVar7;\n  do {\n    pbVar5 = pbVar2;\n    uVar6 = uVar3 << 0x19;\n    uVar3 = uVar3 >> 7;\n    uVar6 = uVar6 | uVar4 >> 7;\n    bVar1 = (byte)uVar4;\n    *pbVar5 = bVar1 | 0x80;\n    uVar4 = uVar6;\n    pbVar2 = pbVar5 + 1;\n  } while (uVar3 != 0 || uVar6 != 0);\n  *pbVar5 = bVar1 & 0x7f;\n  *pp = *pp + ((int)(pbVar5 + 1) - (int)pbVar7);\n  *piPrev = iVal;\n  *pbFirst = 1;\n  return;\n}" { (declaration "byte bVar1;" type_identifier identifier ;) (declaration "byte *pbVar2;" type_identifier (pointer_declarator "*pbVar2" * identifier) ;) (declaration "uint uVar3;" type_identifier identifier ;) (declaration "uint uVar4;" type_identifier identifier ;) (declaration "byte *pbVar5;" type_identifier (pointer_declarator "*pbVar5" * identifier) ;) (declaration "uint uVar6;" type_identifier identifier ;) (declaration "byte *pbVar7;" type_identifier (pointer_declarator "*pbVar7" * identifier) ;) (expression_statement "uVar3 = (uint)*piPrev;" (assignment_expression "uVar3 = (uint)*piPrev" identifier = (binary_expression "(uint)*piPrev" (parenthesized_expression "(uint)" ( identifier )) * identifier)) ;) (if_statement "if ((bDescIdx == 0) || (*pbFirst == 0)) {\n    uVar4 = iVal._4_4_ - uVar3;\n    uVar3 = (iVal._0_4_ - *(int *)piPrev) - (uint)(iVal._4_4_ < uVar4);\n  }\n  else {\n    uVar4 = uVar3 - iVal._4_4_;\n    uVar3 = (*(int *)piPrev - iVal._0_4_) - (uint)(uVar3 < uVar4);\n  }" if (parenthesized_expression "((bDescIdx == 0) || (*pbFirst == 0))" ( (binary_expression "(bDescIdx == 0) || (*pbFirst == 0)" (parenthesized_expression "(bDescIdx == 0)" ( (binary_expression "bDescIdx == 0" identifier == number_literal) )) || (parenthesized_expression "(*pbFirst == 0)" ( (binary_expression "*pbFirst == 0" (pointer_expression "*pbFirst" * identifier) == number_literal) ))) )) (compound_statement "{\n    uVar4 = iVal._4_4_ - uVar3;\n    uVar3 = (iVal._0_4_ - *(int *)piPrev) - (uint)(iVal._4_4_ < uVar4);\n  }" { (expression_statement "uVar4 = iVal._4_4_ - uVar3;" (assignment_expression "uVar4 = iVal._4_4_ - uVar3" identifier = (binary_expression "iVal._4_4_ - uVar3" (field_expression "iVal._4_4_" identifier . field_identifier) - identifier)) ;) (expression_statement "uVar3 = (iVal._0_4_ - *(int *)piPrev) - (uint)(iVal._4_4_ < uVar4);" (assignment_expression "uVar3 = (iVal._0_4_ - *(int *)piPrev) - (uint)(iVal._4_4_ < uVar4)" identifier = (binary_expression "(iVal._0_4_ - *(int *)piPrev) - (uint)(iVal._4_4_ < uVar4)" (parenthesized_expression "(iVal._0_4_ - *(int *)piPrev)" ( (binary_expression "iVal._0_4_ - *(int *)piPrev" (field_expression "iVal._0_4_" identifier . field_identifier) - (pointer_expression "*(int *)piPrev" * (cast_expression "(int *)piPrev" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier))) )) - (call_expression "(uint)(iVal._4_4_ < uVar4)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(iVal._4_4_ < uVar4)" ( (binary_expression "iVal._4_4_ < uVar4" (field_expression "iVal._4_4_" identifier . field_identifier) < identifier) ))))) ;) }) (else_clause "else {\n    uVar4 = uVar3 - iVal._4_4_;\n    uVar3 = (*(int *)piPrev - iVal._0_4_) - (uint)(uVar3 < uVar4);\n  }" else (compound_statement "{\n    uVar4 = uVar3 - iVal._4_4_;\n    uVar3 = (*(int *)piPrev - iVal._0_4_) - (uint)(uVar3 < uVar4);\n  }" { (expression_statement "uVar4 = uVar3 - iVal._4_4_;" (assignment_expression "uVar4 = uVar3 - iVal._4_4_" identifier = (binary_expression "uVar3 - iVal._4_4_" identifier - (field_expression "iVal._4_4_" identifier . field_identifier))) ;) (expression_statement "uVar3 = (*(int *)piPrev - iVal._0_4_) - (uint)(uVar3 < uVar4);" (assignment_expression "uVar3 = (*(int *)piPrev - iVal._0_4_) - (uint)(uVar3 < uVar4)" identifier = (binary_expression "(*(int *)piPrev - iVal._0_4_) - (uint)(uVar3 < uVar4)" (parenthesized_expression "(*(int *)piPrev - iVal._0_4_)" ( (binary_expression "*(int *)piPrev - iVal._0_4_" (pointer_expression "*(int *)piPrev" * (cast_expression "(int *)piPrev" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier)) - (field_expression "iVal._0_4_" identifier . field_identifier)) )) - (call_expression "(uint)(uVar3 < uVar4)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(uVar3 < uVar4)" ( (binary_expression "uVar3 < uVar4" identifier < identifier) ))))) ;) }))) (expression_statement "pbVar7 = (byte *)*pp;" (assignment_expression "pbVar7 = (byte *)*pp" identifier = (cast_expression "(byte *)*pp" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "*pp" * identifier))) ;) (expression_statement "pbVar2 = pbVar7;" (assignment_expression "pbVar2 = pbVar7" identifier = identifier) ;) (do_statement "do {\n    pbVar5 = pbVar2;\n    uVar6 = uVar3 << 0x19;\n    uVar3 = uVar3 >> 7;\n    uVar6 = uVar6 | uVar4 >> 7;\n    bVar1 = (byte)uVar4;\n    *pbVar5 = bVar1 | 0x80;\n    uVar4 = uVar6;\n    pbVar2 = pbVar5 + 1;\n  } while (uVar3 != 0 || uVar6 != 0);" do (compound_statement "{\n    pbVar5 = pbVar2;\n    uVar6 = uVar3 << 0x19;\n    uVar3 = uVar3 >> 7;\n    uVar6 = uVar6 | uVar4 >> 7;\n    bVar1 = (byte)uVar4;\n    *pbVar5 = bVar1 | 0x80;\n    uVar4 = uVar6;\n    pbVar2 = pbVar5 + 1;\n  }" { (expression_statement "pbVar5 = pbVar2;" (assignment_expression "pbVar5 = pbVar2" identifier = identifier) ;) (expression_statement "uVar6 = uVar3 << 0x19;" (assignment_expression "uVar6 = uVar3 << 0x19" identifier = (binary_expression "uVar3 << 0x19" identifier << number_literal)) ;) (expression_statement "uVar3 = uVar3 >> 7;" (assignment_expression "uVar3 = uVar3 >> 7" identifier = (binary_expression "uVar3 >> 7" identifier >> number_literal)) ;) (expression_statement "uVar6 = uVar6 | uVar4 >> 7;" (assignment_expression "uVar6 = uVar6 | uVar4 >> 7" identifier = (binary_expression "uVar6 | uVar4 >> 7" identifier | (binary_expression "uVar4 >> 7" identifier >> number_literal))) ;) (expression_statement "bVar1 = (byte)uVar4;" (assignment_expression "bVar1 = (byte)uVar4" identifier = (cast_expression "(byte)uVar4" ( (type_descriptor "byte" type_identifier) ) identifier)) ;) (expression_statement "*pbVar5 = bVar1 | 0x80;" (assignment_expression "*pbVar5 = bVar1 | 0x80" (pointer_expression "*pbVar5" * identifier) = (binary_expression "bVar1 | 0x80" identifier | number_literal)) ;) (expression_statement "uVar4 = uVar6;" (assignment_expression "uVar4 = uVar6" identifier = identifier) ;) (expression_statement "pbVar2 = pbVar5 + 1;" (assignment_expression "pbVar2 = pbVar5 + 1" identifier = (binary_expression "pbVar5 + 1" identifier + number_literal)) ;) }) while (parenthesized_expression "(uVar3 != 0 || uVar6 != 0)" ( (binary_expression "uVar3 != 0 || uVar6 != 0" (binary_expression "uVar3 != 0" identifier != number_literal) || (binary_expression "uVar6 != 0" identifier != number_literal)) )) ;) (expression_statement "*pbVar5 = bVar1 & 0x7f;" (assignment_expression "*pbVar5 = bVar1 & 0x7f" (pointer_expression "*pbVar5" * identifier) = (binary_expression "bVar1 & 0x7f" identifier & number_literal)) ;) (expression_statement "*pp = *pp + ((int)(pbVar5 + 1) - (int)pbVar7);" (assignment_expression "*pp = *pp + ((int)(pbVar5 + 1) - (int)pbVar7)" (pointer_expression "*pp" * identifier) = (binary_expression "*pp + ((int)(pbVar5 + 1) - (int)pbVar7)" (pointer_expression "*pp" * identifier) + (parenthesized_expression "((int)(pbVar5 + 1) - (int)pbVar7)" ( (binary_expression "(int)(pbVar5 + 1) - (int)pbVar7" (cast_expression "(int)(pbVar5 + 1)" ( (type_descriptor "int" primitive_type) ) (parenthesized_expression "(pbVar5 + 1)" ( (binary_expression "pbVar5 + 1" identifier + number_literal) ))) - (cast_expression "(int)pbVar7" ( (type_descriptor "int" primitive_type) ) identifier)) )))) ;) (expression_statement "*piPrev = iVal;" (assignment_expression "*piPrev = iVal" (pointer_expression "*piPrev" * identifier) = identifier) ;) (expression_statement "*pbFirst = 1;" (assignment_expression "*pbFirst = 1" (pointer_expression "*pbFirst" * identifier) = number_literal) ;) (return_statement "return;" return ;) })))
(translation_unit "void FUN_00021f28(int *param_1,int param_2,int *param_3,int *param_4,int param_5,uint param_6)\n\n{\n  byte bVar1;\n  byte *pbVar2;\n  uint uVar3;\n  uint uVar4;\n  byte *pbVar5;\n  uint uVar6;\n  byte *pbVar7;\n  \n  uVar4 = param_3[1];\n  if ((param_2 == 0) || (*param_4 == 0)) {\n    uVar3 = param_6 - uVar4;\n    uVar4 = (param_5 - *param_3) - (uint)(param_6 < uVar3);\n  }\n  else {\n    uVar3 = uVar4 - param_6;\n    uVar4 = (*param_3 - param_5) - (uint)(uVar4 < uVar3);\n  }\n  pbVar7 = (byte *)*param_1;\n  pbVar2 = pbVar7;\n  do {\n    pbVar5 = pbVar2;\n    uVar6 = uVar4 << 0x19;\n    uVar4 = uVar4 >> 7;\n    uVar6 = uVar6 | uVar3 >> 7;\n    bVar1 = (byte)uVar3;\n    *pbVar5 = bVar1 | 0x80;\n    uVar3 = uVar6;\n    pbVar2 = pbVar5 + 1;\n  } while (uVar4 != 0 || uVar6 != 0);\n  *pbVar5 = bVar1 & 0x7f;\n  *param_1 = (int)(pbVar5 + 1 + (*param_1 - (int)pbVar7));\n  *param_3 = param_5;\n  param_3[1] = param_6;\n  *param_4 = 1;\n  return;\n}\n\n" (function_definition "void FUN_00021f28(int *param_1,int param_2,int *param_3,int *param_4,int param_5,uint param_6)\n\n{\n  byte bVar1;\n  byte *pbVar2;\n  uint uVar3;\n  uint uVar4;\n  byte *pbVar5;\n  uint uVar6;\n  byte *pbVar7;\n  \n  uVar4 = param_3[1];\n  if ((param_2 == 0) || (*param_4 == 0)) {\n    uVar3 = param_6 - uVar4;\n    uVar4 = (param_5 - *param_3) - (uint)(param_6 < uVar3);\n  }\n  else {\n    uVar3 = uVar4 - param_6;\n    uVar4 = (*param_3 - param_5) - (uint)(uVar4 < uVar3);\n  }\n  pbVar7 = (byte *)*param_1;\n  pbVar2 = pbVar7;\n  do {\n    pbVar5 = pbVar2;\n    uVar6 = uVar4 << 0x19;\n    uVar4 = uVar4 >> 7;\n    uVar6 = uVar6 | uVar3 >> 7;\n    bVar1 = (byte)uVar3;\n    *pbVar5 = bVar1 | 0x80;\n    uVar3 = uVar6;\n    pbVar2 = pbVar5 + 1;\n  } while (uVar4 != 0 || uVar6 != 0);\n  *pbVar5 = bVar1 & 0x7f;\n  *param_1 = (int)(pbVar5 + 1 + (*param_1 - (int)pbVar7));\n  *param_3 = param_5;\n  param_3[1] = param_6;\n  *param_4 = 1;\n  return;\n}" primitive_type (function_declarator "FUN_00021f28(int *param_1,int param_2,int *param_3,int *param_4,int param_5,uint param_6)" identifier (parameter_list "(int *param_1,int param_2,int *param_3,int *param_4,int param_5,uint param_6)" ( (parameter_declaration "int *param_1" primitive_type (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "int param_2" primitive_type identifier) , (parameter_declaration "int *param_3" primitive_type (pointer_declarator "*param_3" * identifier)) , (parameter_declaration "int *param_4" primitive_type (pointer_declarator "*param_4" * identifier)) , (parameter_declaration "int param_5" primitive_type identifier) , (parameter_declaration "uint param_6" type_identifier identifier) ))) (compound_statement "{\n  byte bVar1;\n  byte *pbVar2;\n  uint uVar3;\n  uint uVar4;\n  byte *pbVar5;\n  uint uVar6;\n  byte *pbVar7;\n  \n  uVar4 = param_3[1];\n  if ((param_2 == 0) || (*param_4 == 0)) {\n    uVar3 = param_6 - uVar4;\n    uVar4 = (param_5 - *param_3) - (uint)(param_6 < uVar3);\n  }\n  else {\n    uVar3 = uVar4 - param_6;\n    uVar4 = (*param_3 - param_5) - (uint)(uVar4 < uVar3);\n  }\n  pbVar7 = (byte *)*param_1;\n  pbVar2 = pbVar7;\n  do {\n    pbVar5 = pbVar2;\n    uVar6 = uVar4 << 0x19;\n    uVar4 = uVar4 >> 7;\n    uVar6 = uVar6 | uVar3 >> 7;\n    bVar1 = (byte)uVar3;\n    *pbVar5 = bVar1 | 0x80;\n    uVar3 = uVar6;\n    pbVar2 = pbVar5 + 1;\n  } while (uVar4 != 0 || uVar6 != 0);\n  *pbVar5 = bVar1 & 0x7f;\n  *param_1 = (int)(pbVar5 + 1 + (*param_1 - (int)pbVar7));\n  *param_3 = param_5;\n  param_3[1] = param_6;\n  *param_4 = 1;\n  return;\n}" { (declaration "byte bVar1;" type_identifier identifier ;) (declaration "byte *pbVar2;" type_identifier (pointer_declarator "*pbVar2" * identifier) ;) (declaration "uint uVar3;" type_identifier identifier ;) (declaration "uint uVar4;" type_identifier identifier ;) (declaration "byte *pbVar5;" type_identifier (pointer_declarator "*pbVar5" * identifier) ;) (declaration "uint uVar6;" type_identifier identifier ;) (declaration "byte *pbVar7;" type_identifier (pointer_declarator "*pbVar7" * identifier) ;) (expression_statement "uVar4 = param_3[1];" (assignment_expression "uVar4 = param_3[1]" identifier = (subscript_expression "param_3[1]" identifier [ number_literal ])) ;) (if_statement "if ((param_2 == 0) || (*param_4 == 0)) {\n    uVar3 = param_6 - uVar4;\n    uVar4 = (param_5 - *param_3) - (uint)(param_6 < uVar3);\n  }\n  else {\n    uVar3 = uVar4 - param_6;\n    uVar4 = (*param_3 - param_5) - (uint)(uVar4 < uVar3);\n  }" if (parenthesized_expression "((param_2 == 0) || (*param_4 == 0))" ( (binary_expression "(param_2 == 0) || (*param_4 == 0)" (parenthesized_expression "(param_2 == 0)" ( (binary_expression "param_2 == 0" identifier == number_literal) )) || (parenthesized_expression "(*param_4 == 0)" ( (binary_expression "*param_4 == 0" (pointer_expression "*param_4" * identifier) == number_literal) ))) )) (compound_statement "{\n    uVar3 = param_6 - uVar4;\n    uVar4 = (param_5 - *param_3) - (uint)(param_6 < uVar3);\n  }" { (expression_statement "uVar3 = param_6 - uVar4;" (assignment_expression "uVar3 = param_6 - uVar4" identifier = (binary_expression "param_6 - uVar4" identifier - identifier)) ;) (expression_statement "uVar4 = (param_5 - *param_3) - (uint)(param_6 < uVar3);" (assignment_expression "uVar4 = (param_5 - *param_3) - (uint)(param_6 < uVar3)" identifier = (binary_expression "(param_5 - *param_3) - (uint)(param_6 < uVar3)" (parenthesized_expression "(param_5 - *param_3)" ( (binary_expression "param_5 - *param_3" identifier - (pointer_expression "*param_3" * identifier)) )) - (call_expression "(uint)(param_6 < uVar3)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(param_6 < uVar3)" ( (binary_expression "param_6 < uVar3" identifier < identifier) ))))) ;) }) (else_clause "else {\n    uVar3 = uVar4 - param_6;\n    uVar4 = (*param_3 - param_5) - (uint)(uVar4 < uVar3);\n  }" else (compound_statement "{\n    uVar3 = uVar4 - param_6;\n    uVar4 = (*param_3 - param_5) - (uint)(uVar4 < uVar3);\n  }" { (expression_statement "uVar3 = uVar4 - param_6;" (assignment_expression "uVar3 = uVar4 - param_6" identifier = (binary_expression "uVar4 - param_6" identifier - identifier)) ;) (expression_statement "uVar4 = (*param_3 - param_5) - (uint)(uVar4 < uVar3);" (assignment_expression "uVar4 = (*param_3 - param_5) - (uint)(uVar4 < uVar3)" identifier = (binary_expression "(*param_3 - param_5) - (uint)(uVar4 < uVar3)" (parenthesized_expression "(*param_3 - param_5)" ( (binary_expression "*param_3 - param_5" (pointer_expression "*param_3" * identifier) - identifier) )) - (call_expression "(uint)(uVar4 < uVar3)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(uVar4 < uVar3)" ( (binary_expression "uVar4 < uVar3" identifier < identifier) ))))) ;) }))) (expression_statement "pbVar7 = (byte *)*param_1;" (assignment_expression "pbVar7 = (byte *)*param_1" identifier = (cast_expression "(byte *)*param_1" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "*param_1" * identifier))) ;) (expression_statement "pbVar2 = pbVar7;" (assignment_expression "pbVar2 = pbVar7" identifier = identifier) ;) (do_statement "do {\n    pbVar5 = pbVar2;\n    uVar6 = uVar4 << 0x19;\n    uVar4 = uVar4 >> 7;\n    uVar6 = uVar6 | uVar3 >> 7;\n    bVar1 = (byte)uVar3;\n    *pbVar5 = bVar1 | 0x80;\n    uVar3 = uVar6;\n    pbVar2 = pbVar5 + 1;\n  } while (uVar4 != 0 || uVar6 != 0);" do (compound_statement "{\n    pbVar5 = pbVar2;\n    uVar6 = uVar4 << 0x19;\n    uVar4 = uVar4 >> 7;\n    uVar6 = uVar6 | uVar3 >> 7;\n    bVar1 = (byte)uVar3;\n    *pbVar5 = bVar1 | 0x80;\n    uVar3 = uVar6;\n    pbVar2 = pbVar5 + 1;\n  }" { (expression_statement "pbVar5 = pbVar2;" (assignment_expression "pbVar5 = pbVar2" identifier = identifier) ;) (expression_statement "uVar6 = uVar4 << 0x19;" (assignment_expression "uVar6 = uVar4 << 0x19" identifier = (binary_expression "uVar4 << 0x19" identifier << number_literal)) ;) (expression_statement "uVar4 = uVar4 >> 7;" (assignment_expression "uVar4 = uVar4 >> 7" identifier = (binary_expression "uVar4 >> 7" identifier >> number_literal)) ;) (expression_statement "uVar6 = uVar6 | uVar3 >> 7;" (assignment_expression "uVar6 = uVar6 | uVar3 >> 7" identifier = (binary_expression "uVar6 | uVar3 >> 7" identifier | (binary_expression "uVar3 >> 7" identifier >> number_literal))) ;) (expression_statement "bVar1 = (byte)uVar3;" (assignment_expression "bVar1 = (byte)uVar3" identifier = (cast_expression "(byte)uVar3" ( (type_descriptor "byte" type_identifier) ) identifier)) ;) (expression_statement "*pbVar5 = bVar1 | 0x80;" (assignment_expression "*pbVar5 = bVar1 | 0x80" (pointer_expression "*pbVar5" * identifier) = (binary_expression "bVar1 | 0x80" identifier | number_literal)) ;) (expression_statement "uVar3 = uVar6;" (assignment_expression "uVar3 = uVar6" identifier = identifier) ;) (expression_statement "pbVar2 = pbVar5 + 1;" (assignment_expression "pbVar2 = pbVar5 + 1" identifier = (binary_expression "pbVar5 + 1" identifier + number_literal)) ;) }) while (parenthesized_expression "(uVar4 != 0 || uVar6 != 0)" ( (binary_expression "uVar4 != 0 || uVar6 != 0" (binary_expression "uVar4 != 0" identifier != number_literal) || (binary_expression "uVar6 != 0" identifier != number_literal)) )) ;) (expression_statement "*pbVar5 = bVar1 & 0x7f;" (assignment_expression "*pbVar5 = bVar1 & 0x7f" (pointer_expression "*pbVar5" * identifier) = (binary_expression "bVar1 & 0x7f" identifier & number_literal)) ;) (expression_statement "*param_1 = (int)(pbVar5 + 1 + (*param_1 - (int)pbVar7));" (assignment_expression "*param_1 = (int)(pbVar5 + 1 + (*param_1 - (int)pbVar7))" (pointer_expression "*param_1" * identifier) = (cast_expression "(int)(pbVar5 + 1 + (*param_1 - (int)pbVar7))" ( (type_descriptor "int" primitive_type) ) (parenthesized_expression "(pbVar5 + 1 + (*param_1 - (int)pbVar7))" ( (binary_expression "pbVar5 + 1 + (*param_1 - (int)pbVar7)" (binary_expression "pbVar5 + 1" identifier + number_literal) + (parenthesized_expression "(*param_1 - (int)pbVar7)" ( (binary_expression "*param_1 - (int)pbVar7" (pointer_expression "*param_1" * identifier) - (cast_expression "(int)pbVar7" ( (type_descriptor "int" primitive_type) ) identifier)) ))) )))) ;) (expression_statement "*param_3 = param_5;" (assignment_expression "*param_3 = param_5" (pointer_expression "*param_3" * identifier) = identifier) ;) (expression_statement "param_3[1] = param_6;" (assignment_expression "param_3[1] = param_6" (subscript_expression "param_3[1]" identifier [ number_literal ]) = identifier) ;) (expression_statement "*param_4 = 1;" (assignment_expression "*param_4 = 1" (pointer_expression "*param_4" * identifier) = number_literal) ;) (return_statement "return;" return ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE (pointer_declarator * IDENT)) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE (pointer_declarator * IDENT)) , (parameter_declaration TYPE (pointer_declarator * IDENT)) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (expression_statement (assignment_expression IDENT = (subscript_expression IDENT [ LIT ])) ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT == LIT) )) || (parenthesized_expression ( (binary_expression (pointer_expression * IDENT) == LIT) ))) )) (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression IDENT - IDENT)) ;) (expression_statement (assignment_expression IDENT = (binary_expression (parenthesized_expression ( (binary_expression IDENT - (pointer_expression * IDENT)) )) - (call_expression (parenthesized_expression ( IDENT )) (argument_list ( (binary_expression IDENT < IDENT) ))))) ;) }) (else_clause else (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression IDENT - IDENT)) ;) (expression_statement (assignment_expression IDENT = (binary_expression (parenthesized_expression ( (binary_expression (pointer_expression * IDENT) - IDENT) )) - (call_expression (parenthesized_expression ( IDENT )) (argument_list ( (binary_expression IDENT < IDENT) ))))) ;) }))) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (pointer_expression * IDENT))) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (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 IDENT | (binary_expression IDENT >> LIT))) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE) ) IDENT)) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = (binary_expression IDENT | LIT)) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) }) while (parenthesized_expression ( (binary_expression (binary_expression IDENT != LIT) || (binary_expression IDENT != LIT)) )) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = (binary_expression IDENT & LIT)) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = (cast_expression ( (type_descriptor TYPE) ) (parenthesized_expression ( (binary_expression (binary_expression IDENT + LIT) + (parenthesized_expression ( (binary_expression (pointer_expression * IDENT) - (cast_expression ( (type_descriptor TYPE) ) IDENT)) ))) )))) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = IDENT) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = IDENT) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = LIT) ;) (return_statement return ;) })))
(function_definition "void FUN_00021f28(int *param_1,int param_2,int *param_3,int *param_4,int param_5,uint param_6)\n\n{\n  byte bVar1;\n  byte *pbVar2;\n  uint uVar3;\n  uint uVar4;\n  byte *pbVar5;\n  uint uVar6;\n  byte *pbVar7;\n  \n  uVar4 = param_3[1];\n  if ((param_2 == 0) || (*param_4 == 0)) {\n    uVar3 = param_6 - uVar4;\n    uVar4 = (param_5 - *param_3) - (uint)(param_6 < uVar3);\n  }\n  else {\n    uVar3 = uVar4 - param_6;\n    uVar4 = (*param_3 - param_5) - (uint)(uVar4 < uVar3);\n  }\n  pbVar7 = (byte *)*param_1;\n  pbVar2 = pbVar7;\n  do {\n    pbVar5 = pbVar2;\n    uVar6 = uVar4 << 0x19;\n    uVar4 = uVar4 >> 7;\n    uVar6 = uVar6 | uVar3 >> 7;\n    bVar1 = (byte)uVar3;\n    *pbVar5 = bVar1 | 0x80;\n    uVar3 = uVar6;\n    pbVar2 = pbVar5 + 1;\n  } while (uVar4 != 0 || uVar6 != 0);\n  *pbVar5 = bVar1 & 0x7f;\n  *param_1 = (int)(pbVar5 + 1 + (*param_1 - (int)pbVar7));\n  *param_3 = param_5;\n  param_3[1] = param_6;\n  *param_4 = 1;\n  return;\n}" (primitive_type "void") (function_declarator "FUN_00021f28(int *param_1,int param_2,int *param_3,int *param_4,int param_5,uint param_6)" (identifier "FUN_00021f28") (parameter_list "(int *param_1,int param_2,int *param_3,int *param_4,int param_5,uint param_6)" (( "(") (parameter_declaration "int *param_1" (primitive_type "int") (pointer_declarator "*param_1" (* "*") (identifier "param_1"))) (, ",") (parameter_declaration "int param_2" (primitive_type "int") (identifier "param_2")) (, ",") (parameter_declaration "int *param_3" (primitive_type "int") (pointer_declarator "*param_3" (* "*") (identifier "param_3"))) (, ",") (parameter_declaration "int *param_4" (primitive_type "int") (pointer_declarator "*param_4" (* "*") (identifier "param_4"))) (, ",") (parameter_declaration "int param_5" (primitive_type "int") (identifier "param_5")) (, ",") (parameter_declaration "uint param_6" (type_identifier "uint") (identifier "param_6")) () ")"))) (compound_statement "{\n  byte bVar1;\n  byte *pbVar2;\n  uint uVar3;\n  uint uVar4;\n  byte *pbVar5;\n  uint uVar6;\n  byte *pbVar7;\n  \n  uVar4 = param_3[1];\n  if ((param_2 == 0) || (*param_4 == 0)) {\n    uVar3 = param_6 - uVar4;\n    uVar4 = (param_5 - *param_3) - (uint)(param_6 < uVar3);\n  }\n  else {\n    uVar3 = uVar4 - param_6;\n    uVar4 = (*param_3 - param_5) - (uint)(uVar4 < uVar3);\n  }\n  pbVar7 = (byte *)*param_1;\n  pbVar2 = pbVar7;\n  do {\n    pbVar5 = pbVar2;\n    uVar6 = uVar4 << 0x19;\n    uVar4 = uVar4 >> 7;\n    uVar6 = uVar6 | uVar3 >> 7;\n    bVar1 = (byte)uVar3;\n    *pbVar5 = bVar1 | 0x80;\n    uVar3 = uVar6;\n    pbVar2 = pbVar5 + 1;\n  } while (uVar4 != 0 || uVar6 != 0);\n  *pbVar5 = bVar1 & 0x7f;\n  *param_1 = (int)(pbVar5 + 1 + (*param_1 - (int)pbVar7));\n  *param_3 = param_5;\n  param_3[1] = param_6;\n  *param_4 = 1;\n  return;\n}" ({ "{") (declaration "byte bVar1;" (type_identifier "byte") (identifier "bVar1") (; ";")) (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 "byte *pbVar5;" (type_identifier "byte") (pointer_declarator "*pbVar5" (* "*") (identifier "pbVar5")) (; ";")) (declaration "uint uVar6;" (type_identifier "uint") (identifier "uVar6") (; ";")) (declaration "byte *pbVar7;" (type_identifier "byte") (pointer_declarator "*pbVar7" (* "*") (identifier "pbVar7")) (; ";")) (expression_statement "uVar4 = param_3[1];" (assignment_expression "uVar4 = param_3[1]" (identifier "uVar4") (= "=") (subscript_expression "param_3[1]" (identifier "param_3") ([ "[") (number_literal "1") (] "]"))) (; ";")) (if_statement "if ((param_2 == 0) || (*param_4 == 0)) {\n    uVar3 = param_6 - uVar4;\n    uVar4 = (param_5 - *param_3) - (uint)(param_6 < uVar3);\n  }\n  else {\n    uVar3 = uVar4 - param_6;\n    uVar4 = (*param_3 - param_5) - (uint)(uVar4 < uVar3);\n  }" (if "if") (parenthesized_expression "((param_2 == 0) || (*param_4 == 0))" (( "(") (binary_expression "(param_2 == 0) || (*param_4 == 0)" (parenthesized_expression "(param_2 == 0)" (( "(") (binary_expression "param_2 == 0" (identifier "param_2") (== "==") (number_literal "0")) () ")")) (|| "||") (parenthesized_expression "(*param_4 == 0)" (( "(") (binary_expression "*param_4 == 0" (pointer_expression "*param_4" (* "*") (identifier "param_4")) (== "==") (number_literal "0")) () ")"))) () ")")) (compound_statement "{\n    uVar3 = param_6 - uVar4;\n    uVar4 = (param_5 - *param_3) - (uint)(param_6 < uVar3);\n  }" ({ "{") (expression_statement "uVar3 = param_6 - uVar4;" (assignment_expression "uVar3 = param_6 - uVar4" (identifier "uVar3") (= "=") (binary_expression "param_6 - uVar4" (identifier "param_6") (- "-") (identifier "uVar4"))) (; ";")) (expression_statement "uVar4 = (param_5 - *param_3) - (uint)(param_6 < uVar3);" (assignment_expression "uVar4 = (param_5 - *param_3) - (uint)(param_6 < uVar3)" (identifier "uVar4") (= "=") (binary_expression "(param_5 - *param_3) - (uint)(param_6 < uVar3)" (parenthesized_expression "(param_5 - *param_3)" (( "(") (binary_expression "param_5 - *param_3" (identifier "param_5") (- "-") (pointer_expression "*param_3" (* "*") (identifier "param_3"))) () ")")) (- "-") (call_expression "(uint)(param_6 < uVar3)" (parenthesized_expression "(uint)" (( "(") (identifier "uint") () ")")) (argument_list "(param_6 < uVar3)" (( "(") (binary_expression "param_6 < uVar3" (identifier "param_6") (< "<") (identifier "uVar3")) () ")"))))) (; ";")) (} "}")) (else_clause "else {\n    uVar3 = uVar4 - param_6;\n    uVar4 = (*param_3 - param_5) - (uint)(uVar4 < uVar3);\n  }" (else "else") (compound_statement "{\n    uVar3 = uVar4 - param_6;\n    uVar4 = (*param_3 - param_5) - (uint)(uVar4 < uVar3);\n  }" ({ "{") (expression_statement "uVar3 = uVar4 - param_6;" (assignment_expression "uVar3 = uVar4 - param_6" (identifier "uVar3") (= "=") (binary_expression "uVar4 - param_6" (identifier "uVar4") (- "-") (identifier "param_6"))) (; ";")) (expression_statement "uVar4 = (*param_3 - param_5) - (uint)(uVar4 < uVar3);" (assignment_expression "uVar4 = (*param_3 - param_5) - (uint)(uVar4 < uVar3)" (identifier "uVar4") (= "=") (binary_expression "(*param_3 - param_5) - (uint)(uVar4 < uVar3)" (parenthesized_expression "(*param_3 - param_5)" (( "(") (binary_expression "*param_3 - param_5" (pointer_expression "*param_3" (* "*") (identifier "param_3")) (- "-") (identifier "param_5")) () ")")) (- "-") (call_expression "(uint)(uVar4 < uVar3)" (parenthesized_expression "(uint)" (( "(") (identifier "uint") () ")")) (argument_list "(uVar4 < uVar3)" (( "(") (binary_expression "uVar4 < uVar3" (identifier "uVar4") (< "<") (identifier "uVar3")) () ")"))))) (; ";")) (} "}")))) (expression_statement "pbVar7 = (byte *)*param_1;" (assignment_expression "pbVar7 = (byte *)*param_1" (identifier "pbVar7") (= "=") (cast_expression "(byte *)*param_1" (( "(") (type_descriptor "byte *" (type_identifier "byte") (abstract_pointer_declarator "*" (* "*"))) () ")") (pointer_expression "*param_1" (* "*") (identifier "param_1")))) (; ";")) (expression_statement "pbVar2 = pbVar7;" (assignment_expression "pbVar2 = pbVar7" (identifier "pbVar2") (= "=") (identifier "pbVar7")) (; ";")) (do_statement "do {\n    pbVar5 = pbVar2;\n    uVar6 = uVar4 << 0x19;\n    uVar4 = uVar4 >> 7;\n    uVar6 = uVar6 | uVar3 >> 7;\n    bVar1 = (byte)uVar3;\n    *pbVar5 = bVar1 | 0x80;\n    uVar3 = uVar6;\n    pbVar2 = pbVar5 + 1;\n  } while (uVar4 != 0 || uVar6 != 0);" (do "do") (compound_statement "{\n    pbVar5 = pbVar2;\n    uVar6 = uVar4 << 0x19;\n    uVar4 = uVar4 >> 7;\n    uVar6 = uVar6 | uVar3 >> 7;\n    bVar1 = (byte)uVar3;\n    *pbVar5 = bVar1 | 0x80;\n    uVar3 = uVar6;\n    pbVar2 = pbVar5 + 1;\n  }" ({ "{") (expression_statement "pbVar5 = pbVar2;" (assignment_expression "pbVar5 = pbVar2" (identifier "pbVar5") (= "=") (identifier "pbVar2")) (; ";")) (expression_statement "uVar6 = uVar4 << 0x19;" (assignment_expression "uVar6 = uVar4 << 0x19" (identifier "uVar6") (= "=") (binary_expression "uVar4 << 0x19" (identifier "uVar4") (<< "<<") (number_literal "0x19"))) (; ";")) (expression_statement "uVar4 = uVar4 >> 7;" (assignment_expression "uVar4 = uVar4 >> 7" (identifier "uVar4") (= "=") (binary_expression "uVar4 >> 7" (identifier "uVar4") (>> ">>") (number_literal "7"))) (; ";")) (expression_statement "uVar6 = uVar6 | uVar3 >> 7;" (assignment_expression "uVar6 = uVar6 | uVar3 >> 7" (identifier "uVar6") (= "=") (binary_expression "uVar6 | uVar3 >> 7" (identifier "uVar6") (| "|") (binary_expression "uVar3 >> 7" (identifier "uVar3") (>> ">>") (number_literal "7")))) (; ";")) (expression_statement "bVar1 = (byte)uVar3;" (assignment_expression "bVar1 = (byte)uVar3" (identifier "bVar1") (= "=") (cast_expression "(byte)uVar3" (( "(") (type_descriptor "byte" (type_identifier "byte")) () ")") (identifier "uVar3"))) (; ";")) (expression_statement "*pbVar5 = bVar1 | 0x80;" (assignment_expression "*pbVar5 = bVar1 | 0x80" (pointer_expression "*pbVar5" (* "*") (identifier "pbVar5")) (= "=") (binary_expression "bVar1 | 0x80" (identifier "bVar1") (| "|") (number_literal "0x80"))) (; ";")) (expression_statement "uVar3 = uVar6;" (assignment_expression "uVar3 = uVar6" (identifier "uVar3") (= "=") (identifier "uVar6")) (; ";")) (expression_statement "pbVar2 = pbVar5 + 1;" (assignment_expression "pbVar2 = pbVar5 + 1" (identifier "pbVar2") (= "=") (binary_expression "pbVar5 + 1" (identifier "pbVar5") (+ "+") (number_literal "1"))) (; ";")) (} "}")) (while "while") (parenthesized_expression "(uVar4 != 0 || uVar6 != 0)" (( "(") (binary_expression "uVar4 != 0 || uVar6 != 0" (binary_expression "uVar4 != 0" (identifier "uVar4") (!= "!=") (number_literal "0")) (|| "||") (binary_expression "uVar6 != 0" (identifier "uVar6") (!= "!=") (number_literal "0"))) () ")")) (; ";")) (expression_statement "*pbVar5 = bVar1 & 0x7f;" (assignment_expression "*pbVar5 = bVar1 & 0x7f" (pointer_expression "*pbVar5" (* "*") (identifier "pbVar5")) (= "=") (binary_expression "bVar1 & 0x7f" (identifier "bVar1") (& "&") (number_literal "0x7f"))) (; ";")) (expression_statement "*param_1 = (int)(pbVar5 + 1 + (*param_1 - (int)pbVar7));" (assignment_expression "*param_1 = (int)(pbVar5 + 1 + (*param_1 - (int)pbVar7))" (pointer_expression "*param_1" (* "*") (identifier "param_1")) (= "=") (cast_expression "(int)(pbVar5 + 1 + (*param_1 - (int)pbVar7))" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (parenthesized_expression "(pbVar5 + 1 + (*param_1 - (int)pbVar7))" (( "(") (binary_expression "pbVar5 + 1 + (*param_1 - (int)pbVar7)" (binary_expression "pbVar5 + 1" (identifier "pbVar5") (+ "+") (number_literal "1")) (+ "+") (parenthesized_expression "(*param_1 - (int)pbVar7)" (( "(") (binary_expression "*param_1 - (int)pbVar7" (pointer_expression "*param_1" (* "*") (identifier "param_1")) (- "-") (cast_expression "(int)pbVar7" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "pbVar7"))) () ")"))) () ")")))) (; ";")) (expression_statement "*param_3 = param_5;" (assignment_expression "*param_3 = param_5" (pointer_expression "*param_3" (* "*") (identifier "param_3")) (= "=") (identifier "param_5")) (; ";")) (expression_statement "param_3[1] = param_6;" (assignment_expression "param_3[1] = param_6" (subscript_expression "param_3[1]" (identifier "param_3") ([ "[") (number_literal "1") (] "]")) (= "=") (identifier "param_6")) (; ";")) (expression_statement "*param_4 = 1;" (assignment_expression "*param_4 = 1" (pointer_expression "*param_4" (* "*") (identifier "param_4")) (= "=") (number_literal "1")) (; ";")) (return_statement "return;" (return "return") (; ";")) (} "}")))

void function_1(char **pp,int var_2,type_1 *var_1,int *pbFirst,
                        type_1 iVal)

{
  type_2 var_6;
  type_2 *pbVar2;
  type_3 var_3;
  type_3 var_4;
  type_2 *var_7;
  type_3 var_5;
  type_2 *pbVar7;
  
  var_3 = (type_3)*var_1;
  if ((var_2 == 0) || (*pbFirst == 0)) {
    var_4 = iVal._4_4_ - var_3;
    var_3 = (iVal._0_4_ - *(int *)var_1) - (type_3)(iVal._4_4_ < var_4);
  }
  else {
    var_4 = var_3 - iVal._4_4_;
    var_3 = (*(int *)var_1 - iVal._0_4_) - (type_3)(var_3 < var_4);
  }
  pbVar7 = (type_2 *)*pp;
  pbVar2 = pbVar7;
  do {
    var_7 = pbVar2;
    var_5 = var_3 << 0x19;
    var_3 = var_3 >> 7;
    var_5 = var_5 | var_4 >> 7;
    var_6 = (type_2)var_4;
    *var_7 = var_6 | 0x80;
    var_4 = var_5;
    pbVar2 = var_7 + 1;
  } while (var_3 != 0 || var_5 != 0);
  *var_7 = var_6 & 0x7f;
  *pp = *pp + ((int)(var_7 + 1) - (int)pbVar7);
  *var_1 = iVal;
  *pbFirst = 1;
  return;
}


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

void MASKED(int *param_1,int param_2,int *param_3,int *param_4,int param_5,uint param_6)

{
  byte bVar1;
  byte *pbVar2;
  uint uVar3;
  uint uVar4;
  byte *pbVar5;
  uint uVar6;
  byte *pbVar7;
  
  uVar4 = param_3[1];
  if ((param_2 == 0) || (*param_4 == 0)) {
    uVar3 = param_6 - uVar4;
    uVar4 = (param_5 - *param_3) - (uint)(param_6 < uVar3);
  }
  else {
    uVar3 = uVar4 - param_6;
    uVar4 = (*param_3 - param_5) - (uint)(uVar4 < uVar3);
  }
  pbVar7 = (byte *)*param_1;
  pbVar2 = pbVar7;
  do {
    pbVar5 = pbVar2;
    uVar6 = uVar4 << 0x19;
    uVar4 = uVar4 >> 7;
    uVar6 = uVar6 | uVar3 >> 7;
    bVar1 = (byte)uVar3;
    *pbVar5 = bVar1 | 0x80;
    uVar3 = uVar6;
    pbVar2 = pbVar5 + 1;
  } while (uVar4 != 0 || uVar6 != 0);
  *pbVar5 = bVar1 & 0x7f;
  *param_1 = (int)(pbVar5 + 1 + (*param_1 - (int)pbVar7));
  *param_3 = param_5;
  param_3[1] = param_6;
  *param_4 = 1;
  return;
}

