
int moveToRightmost(BtCursor *pCur)

{
  int iVar1;
  MemPage *pMVar2;
  u32 newPgno;
  
  do {
    pMVar2 = pCur->pPage;
    if (pMVar2->leaf != '\0') {
      pCur->ix = pMVar2->nCell - 1;
      return 0;
    }
    newPgno = *(u32 *)(pMVar2->aData + pMVar2->hdrOffset + 8);
    pCur->ix = pMVar2->nCell;
    iVar1 = moveToChild(pCur,newPgno);
  } while (iVar1 == 0);
  return iVar1;
}



int FUN_0008dc9c(int param_1)

{
  int iVar1;
  undefined4 uVar2;
  
  do {
    iVar1 = *(int *)(param_1 + 0x74);
    if (*(char *)(iVar1 + 8) != '\0') {
      *(short *)(param_1 + 0x46) = *(short *)(iVar1 + 0x16) + -1;
      return 0;
    }
    uVar2 = *(undefined4 *)(*(int *)(iVar1 + 0x38) + (uint)*(byte *)(iVar1 + 9) + 8);
    *(short *)(param_1 + 0x46) = *(short *)(iVar1 + 0x16);
    iVar1 = FUN_0008dbc4(param_1,uVar2);
  } while (iVar1 == 0);
  return iVar1;
}


lui gp,0x11
addiu gp,gp,-0x537c
addu gp,gp,t9
addiu sp,sp,-0x28
sw s1,0x20(sp)
sw gp,0x10(sp)
sw s0,0x1c(sp)
or s0,a0,zero
sw ra,0x24(sp)
lw s1,-0x7d44(gp)
b 0x0008dcf4
_addiu s1,s1,-0x243c
lbu a1,0x9(v1)
or t9,s1,zero
lw v0,0x38(v1)
addu v0,v0,a1
lwl a1,0x8(v0)
lwr a1,0xb(v0)
bal 0x0008dbc4
_sh a2,0x46(s0)
bne v0,zero,0x0008dd18
_lw ra,0x24(sp)
lw v1,0x74(s0)
or a0,s0,zero
lbu v0,0x8(v1)
beq v0,zero,0x0008dccc
_lhu a2,0x16(v1)
addiu a2,a2,-0x1
or v0,zero,zero
sh a2,0x46(s0)
lw ra,0x24(sp)
lw s1,0x20(sp)
lw s0,0x1c(sp)
jr ra
_addiu sp,sp,0x28
(translation_unit "int FUN_0008dc9c(int param_1)\n\n{\n  int iVar1;\n  undefined4 uVar2;\n  \n  do {\n    iVar1 = *(int *)(param_1 + 0x74);\n    if (*(char *)(iVar1 + 8) != '\0') {\n      *(short *)(param_1 + 0x46) = *(short *)(iVar1 + 0x16) + -1;\n      return 0;\n    }\n    uVar2 = *(undefined4 *)(*(int *)(iVar1 + 0x38) + (uint)*(byte *)(iVar1 + 9) + 8);\n    *(short *)(param_1 + 0x46) = *(short *)(iVar1 + 0x16);\n    iVar1 = FUN_0008dbc4(param_1,uVar2);\n  } while (iVar1 == 0);\n  return iVar1;\n}\n\n" (function_definition "int FUN_0008dc9c(int param_1)\n\n{\n  int iVar1;\n  undefined4 uVar2;\n  \n  do {\n    iVar1 = *(int *)(param_1 + 0x74);\n    if (*(char *)(iVar1 + 8) != '\0') {\n      *(short *)(param_1 + 0x46) = *(short *)(iVar1 + 0x16) + -1;\n      return 0;\n    }\n    uVar2 = *(undefined4 *)(*(int *)(iVar1 + 0x38) + (uint)*(byte *)(iVar1 + 9) + 8);\n    *(short *)(param_1 + 0x46) = *(short *)(iVar1 + 0x16);\n    iVar1 = FUN_0008dbc4(param_1,uVar2);\n  } while (iVar1 == 0);\n  return iVar1;\n}" primitive_type (function_declarator "FUN_0008dc9c(int param_1)" identifier (parameter_list "(int param_1)" ( (parameter_declaration "int param_1" primitive_type identifier) ))) (compound_statement "{\n  int iVar1;\n  undefined4 uVar2;\n  \n  do {\n    iVar1 = *(int *)(param_1 + 0x74);\n    if (*(char *)(iVar1 + 8) != '\0') {\n      *(short *)(param_1 + 0x46) = *(short *)(iVar1 + 0x16) + -1;\n      return 0;\n    }\n    uVar2 = *(undefined4 *)(*(int *)(iVar1 + 0x38) + (uint)*(byte *)(iVar1 + 9) + 8);\n    *(short *)(param_1 + 0x46) = *(short *)(iVar1 + 0x16);\n    iVar1 = FUN_0008dbc4(param_1,uVar2);\n  } while (iVar1 == 0);\n  return iVar1;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "undefined4 uVar2;" type_identifier identifier ;) (do_statement "do {\n    iVar1 = *(int *)(param_1 + 0x74);\n    if (*(char *)(iVar1 + 8) != '\0') {\n      *(short *)(param_1 + 0x46) = *(short *)(iVar1 + 0x16) + -1;\n      return 0;\n    }\n    uVar2 = *(undefined4 *)(*(int *)(iVar1 + 0x38) + (uint)*(byte *)(iVar1 + 9) + 8);\n    *(short *)(param_1 + 0x46) = *(short *)(iVar1 + 0x16);\n    iVar1 = FUN_0008dbc4(param_1,uVar2);\n  } while (iVar1 == 0);" do (compound_statement "{\n    iVar1 = *(int *)(param_1 + 0x74);\n    if (*(char *)(iVar1 + 8) != '\0') {\n      *(short *)(param_1 + 0x46) = *(short *)(iVar1 + 0x16) + -1;\n      return 0;\n    }\n    uVar2 = *(undefined4 *)(*(int *)(iVar1 + 0x38) + (uint)*(byte *)(iVar1 + 9) + 8);\n    *(short *)(param_1 + 0x46) = *(short *)(iVar1 + 0x16);\n    iVar1 = FUN_0008dbc4(param_1,uVar2);\n  }" { (expression_statement "iVar1 = *(int *)(param_1 + 0x74);" (assignment_expression "iVar1 = *(int *)(param_1 + 0x74)" identifier = (pointer_expression "*(int *)(param_1 + 0x74)" * (cast_expression "(int *)(param_1 + 0x74)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x74)" ( (binary_expression "param_1 + 0x74" identifier + number_literal) ))))) ;) (if_statement "if (*(char *)(iVar1 + 8) != '\0') {\n      *(short *)(param_1 + 0x46) = *(short *)(iVar1 + 0x16) + -1;\n      return 0;\n    }" if (parenthesized_expression "(*(char *)(iVar1 + 8) != '\0')" ( (binary_expression "*(char *)(iVar1 + 8) != '\0'" (pointer_expression "*(char *)(iVar1 + 8)" * (cast_expression "(char *)(iVar1 + 8)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 8)" ( (binary_expression "iVar1 + 8" identifier + number_literal) )))) != (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\n      *(short *)(param_1 + 0x46) = *(short *)(iVar1 + 0x16) + -1;\n      return 0;\n    }" { (expression_statement "*(short *)(param_1 + 0x46) = *(short *)(iVar1 + 0x16) + -1;" (assignment_expression "*(short *)(param_1 + 0x46) = *(short *)(iVar1 + 0x16) + -1" (pointer_expression "*(short *)(param_1 + 0x46)" * (cast_expression "(short *)(param_1 + 0x46)" ( (type_descriptor "short *" (sized_type_specifier "short" short) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x46)" ( (binary_expression "param_1 + 0x46" identifier + number_literal) )))) = (binary_expression "*(short *)(iVar1 + 0x16) + -1" (pointer_expression "*(short *)(iVar1 + 0x16)" * (cast_expression "(short *)(iVar1 + 0x16)" ( (type_descriptor "short *" (sized_type_specifier "short" short) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 0x16)" ( (binary_expression "iVar1 + 0x16" identifier + number_literal) )))) + number_literal)) ;) (return_statement "return 0;" return number_literal ;) })) (expression_statement "uVar2 = *(undefined4 *)(*(int *)(iVar1 + 0x38) + (uint)*(byte *)(iVar1 + 9) + 8);" (assignment_expression "uVar2 = *(undefined4 *)(*(int *)(iVar1 + 0x38) + (uint)*(byte *)(iVar1 + 9) + 8)" identifier = (pointer_expression "*(undefined4 *)(*(int *)(iVar1 + 0x38) + (uint)*(byte *)(iVar1 + 9) + 8)" * (cast_expression "(undefined4 *)(*(int *)(iVar1 + 0x38) + (uint)*(byte *)(iVar1 + 9) + 8)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*(int *)(iVar1 + 0x38) + (uint)*(byte *)(iVar1 + 9) + 8)" ( (binary_expression "*(int *)(iVar1 + 0x38) + (uint)*(byte *)(iVar1 + 9) + 8" (binary_expression "*(int *)(iVar1 + 0x38) + (uint)*(byte *)(iVar1 + 9)" (pointer_expression "*(int *)(iVar1 + 0x38)" * (cast_expression "(int *)(iVar1 + 0x38)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 0x38)" ( (binary_expression "iVar1 + 0x38" identifier + number_literal) )))) + (binary_expression "(uint)*(byte *)(iVar1 + 9)" (parenthesized_expression "(uint)" ( identifier )) * (cast_expression "(byte *)(iVar1 + 9)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 9)" ( (binary_expression "iVar1 + 9" identifier + number_literal) ))))) + number_literal) ))))) ;) (expression_statement "*(short *)(param_1 + 0x46) = *(short *)(iVar1 + 0x16);" (assignment_expression "*(short *)(param_1 + 0x46) = *(short *)(iVar1 + 0x16)" (pointer_expression "*(short *)(param_1 + 0x46)" * (cast_expression "(short *)(param_1 + 0x46)" ( (type_descriptor "short *" (sized_type_specifier "short" short) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x46)" ( (binary_expression "param_1 + 0x46" identifier + number_literal) )))) = (pointer_expression "*(short *)(iVar1 + 0x16)" * (cast_expression "(short *)(iVar1 + 0x16)" ( (type_descriptor "short *" (sized_type_specifier "short" short) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 0x16)" ( (binary_expression "iVar1 + 0x16" identifier + number_literal) ))))) ;) (expression_statement "iVar1 = FUN_0008dbc4(param_1,uVar2);" (assignment_expression "iVar1 = FUN_0008dbc4(param_1,uVar2)" identifier = (call_expression "FUN_0008dbc4(param_1,uVar2)" identifier (argument_list "(param_1,uVar2)" ( identifier , identifier )))) ;) }) while (parenthesized_expression "(iVar1 == 0)" ( (binary_expression "iVar1 == 0" identifier == number_literal) )) ;) (return_statement "return iVar1;" return identifier ;) })))
(translation_unit "int moveToRightmost(BtCursor *pCur)\n\n{\n  int iVar1;\n  MemPage *pMVar2;\n  u32 newPgno;\n  \n  do {\n    pMVar2 = pCur->pPage;\n    if (pMVar2->leaf != '\0') {\n      pCur->ix = pMVar2->nCell - 1;\n      return 0;\n    }\n    newPgno = *(u32 *)(pMVar2->aData + pMVar2->hdrOffset + 8);\n    pCur->ix = pMVar2->nCell;\n    iVar1 = moveToChild(pCur,newPgno);\n  } while (iVar1 == 0);\n  return iVar1;\n}\n\n" (function_definition "int moveToRightmost(BtCursor *pCur)\n\n{\n  int iVar1;\n  MemPage *pMVar2;\n  u32 newPgno;\n  \n  do {\n    pMVar2 = pCur->pPage;\n    if (pMVar2->leaf != '\0') {\n      pCur->ix = pMVar2->nCell - 1;\n      return 0;\n    }\n    newPgno = *(u32 *)(pMVar2->aData + pMVar2->hdrOffset + 8);\n    pCur->ix = pMVar2->nCell;\n    iVar1 = moveToChild(pCur,newPgno);\n  } while (iVar1 == 0);\n  return iVar1;\n}" primitive_type (function_declarator "moveToRightmost(BtCursor *pCur)" identifier (parameter_list "(BtCursor *pCur)" ( (parameter_declaration "BtCursor *pCur" type_identifier (pointer_declarator "*pCur" * identifier)) ))) (compound_statement "{\n  int iVar1;\n  MemPage *pMVar2;\n  u32 newPgno;\n  \n  do {\n    pMVar2 = pCur->pPage;\n    if (pMVar2->leaf != '\0') {\n      pCur->ix = pMVar2->nCell - 1;\n      return 0;\n    }\n    newPgno = *(u32 *)(pMVar2->aData + pMVar2->hdrOffset + 8);\n    pCur->ix = pMVar2->nCell;\n    iVar1 = moveToChild(pCur,newPgno);\n  } while (iVar1 == 0);\n  return iVar1;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "MemPage *pMVar2;" type_identifier (pointer_declarator "*pMVar2" * identifier) ;) (declaration "u32 newPgno;" type_identifier identifier ;) (do_statement "do {\n    pMVar2 = pCur->pPage;\n    if (pMVar2->leaf != '\0') {\n      pCur->ix = pMVar2->nCell - 1;\n      return 0;\n    }\n    newPgno = *(u32 *)(pMVar2->aData + pMVar2->hdrOffset + 8);\n    pCur->ix = pMVar2->nCell;\n    iVar1 = moveToChild(pCur,newPgno);\n  } while (iVar1 == 0);" do (compound_statement "{\n    pMVar2 = pCur->pPage;\n    if (pMVar2->leaf != '\0') {\n      pCur->ix = pMVar2->nCell - 1;\n      return 0;\n    }\n    newPgno = *(u32 *)(pMVar2->aData + pMVar2->hdrOffset + 8);\n    pCur->ix = pMVar2->nCell;\n    iVar1 = moveToChild(pCur,newPgno);\n  }" { (expression_statement "pMVar2 = pCur->pPage;" (assignment_expression "pMVar2 = pCur->pPage" identifier = (field_expression "pCur->pPage" identifier -> field_identifier)) ;) (if_statement "if (pMVar2->leaf != '\0') {\n      pCur->ix = pMVar2->nCell - 1;\n      return 0;\n    }" if (parenthesized_expression "(pMVar2->leaf != '\0')" ( (binary_expression "pMVar2->leaf != '\0'" (field_expression "pMVar2->leaf" identifier -> field_identifier) != (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\n      pCur->ix = pMVar2->nCell - 1;\n      return 0;\n    }" { (expression_statement "pCur->ix = pMVar2->nCell - 1;" (assignment_expression "pCur->ix = pMVar2->nCell - 1" (field_expression "pCur->ix" identifier -> field_identifier) = (binary_expression "pMVar2->nCell - 1" (field_expression "pMVar2->nCell" identifier -> field_identifier) - number_literal)) ;) (return_statement "return 0;" return number_literal ;) })) (expression_statement "newPgno = *(u32 *)(pMVar2->aData + pMVar2->hdrOffset + 8);" (assignment_expression "newPgno = *(u32 *)(pMVar2->aData + pMVar2->hdrOffset + 8)" identifier = (pointer_expression "*(u32 *)(pMVar2->aData + pMVar2->hdrOffset + 8)" * (cast_expression "(u32 *)(pMVar2->aData + pMVar2->hdrOffset + 8)" ( (type_descriptor "u32 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(pMVar2->aData + pMVar2->hdrOffset + 8)" ( (binary_expression "pMVar2->aData + pMVar2->hdrOffset + 8" (binary_expression "pMVar2->aData + pMVar2->hdrOffset" (field_expression "pMVar2->aData" identifier -> field_identifier) + (field_expression "pMVar2->hdrOffset" identifier -> field_identifier)) + number_literal) ))))) ;) (expression_statement "pCur->ix = pMVar2->nCell;" (assignment_expression "pCur->ix = pMVar2->nCell" (field_expression "pCur->ix" identifier -> field_identifier) = (field_expression "pMVar2->nCell" identifier -> field_identifier)) ;) (expression_statement "iVar1 = moveToChild(pCur,newPgno);" (assignment_expression "iVar1 = moveToChild(pCur,newPgno)" identifier = (call_expression "moveToChild(pCur,newPgno)" identifier (argument_list "(pCur,newPgno)" ( identifier , identifier )))) ;) }) while (parenthesized_expression "(iVar1 == 0)" ( (binary_expression "iVar1 == 0" identifier == number_literal) )) ;) (return_statement "return iVar1;" return identifier ;) })))
(translation_unit "int FUN_0008dc9c(int param_1)\n\n{\n  int iVar1;\n  undefined4 uVar2;\n  \n  do {\n    iVar1 = *(int *)(param_1 + 0x74);\n    if (*(char *)(iVar1 + 8) != '\0') {\n      *(short *)(param_1 + 0x46) = *(short *)(iVar1 + 0x16) + -1;\n      return 0;\n    }\n    uVar2 = *(undefined4 *)(*(int *)(iVar1 + 0x38) + (uint)*(byte *)(iVar1 + 9) + 8);\n    *(short *)(param_1 + 0x46) = *(short *)(iVar1 + 0x16);\n    iVar1 = FUN_0008dbc4(param_1,uVar2);\n  } while (iVar1 == 0);\n  return iVar1;\n}\n\n" (function_definition "int FUN_0008dc9c(int param_1)\n\n{\n  int iVar1;\n  undefined4 uVar2;\n  \n  do {\n    iVar1 = *(int *)(param_1 + 0x74);\n    if (*(char *)(iVar1 + 8) != '\0') {\n      *(short *)(param_1 + 0x46) = *(short *)(iVar1 + 0x16) + -1;\n      return 0;\n    }\n    uVar2 = *(undefined4 *)(*(int *)(iVar1 + 0x38) + (uint)*(byte *)(iVar1 + 9) + 8);\n    *(short *)(param_1 + 0x46) = *(short *)(iVar1 + 0x16);\n    iVar1 = FUN_0008dbc4(param_1,uVar2);\n  } while (iVar1 == 0);\n  return iVar1;\n}" primitive_type (function_declarator "FUN_0008dc9c(int param_1)" identifier (parameter_list "(int param_1)" ( (parameter_declaration "int param_1" primitive_type identifier) ))) (compound_statement "{\n  int iVar1;\n  undefined4 uVar2;\n  \n  do {\n    iVar1 = *(int *)(param_1 + 0x74);\n    if (*(char *)(iVar1 + 8) != '\0') {\n      *(short *)(param_1 + 0x46) = *(short *)(iVar1 + 0x16) + -1;\n      return 0;\n    }\n    uVar2 = *(undefined4 *)(*(int *)(iVar1 + 0x38) + (uint)*(byte *)(iVar1 + 9) + 8);\n    *(short *)(param_1 + 0x46) = *(short *)(iVar1 + 0x16);\n    iVar1 = FUN_0008dbc4(param_1,uVar2);\n  } while (iVar1 == 0);\n  return iVar1;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "undefined4 uVar2;" type_identifier identifier ;) (do_statement "do {\n    iVar1 = *(int *)(param_1 + 0x74);\n    if (*(char *)(iVar1 + 8) != '\0') {\n      *(short *)(param_1 + 0x46) = *(short *)(iVar1 + 0x16) + -1;\n      return 0;\n    }\n    uVar2 = *(undefined4 *)(*(int *)(iVar1 + 0x38) + (uint)*(byte *)(iVar1 + 9) + 8);\n    *(short *)(param_1 + 0x46) = *(short *)(iVar1 + 0x16);\n    iVar1 = FUN_0008dbc4(param_1,uVar2);\n  } while (iVar1 == 0);" do (compound_statement "{\n    iVar1 = *(int *)(param_1 + 0x74);\n    if (*(char *)(iVar1 + 8) != '\0') {\n      *(short *)(param_1 + 0x46) = *(short *)(iVar1 + 0x16) + -1;\n      return 0;\n    }\n    uVar2 = *(undefined4 *)(*(int *)(iVar1 + 0x38) + (uint)*(byte *)(iVar1 + 9) + 8);\n    *(short *)(param_1 + 0x46) = *(short *)(iVar1 + 0x16);\n    iVar1 = FUN_0008dbc4(param_1,uVar2);\n  }" { (expression_statement "iVar1 = *(int *)(param_1 + 0x74);" (assignment_expression "iVar1 = *(int *)(param_1 + 0x74)" identifier = (pointer_expression "*(int *)(param_1 + 0x74)" * (cast_expression "(int *)(param_1 + 0x74)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x74)" ( (binary_expression "param_1 + 0x74" identifier + number_literal) ))))) ;) (if_statement "if (*(char *)(iVar1 + 8) != '\0') {\n      *(short *)(param_1 + 0x46) = *(short *)(iVar1 + 0x16) + -1;\n      return 0;\n    }" if (parenthesized_expression "(*(char *)(iVar1 + 8) != '\0')" ( (binary_expression "*(char *)(iVar1 + 8) != '\0'" (pointer_expression "*(char *)(iVar1 + 8)" * (cast_expression "(char *)(iVar1 + 8)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 8)" ( (binary_expression "iVar1 + 8" identifier + number_literal) )))) != (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\n      *(short *)(param_1 + 0x46) = *(short *)(iVar1 + 0x16) + -1;\n      return 0;\n    }" { (expression_statement "*(short *)(param_1 + 0x46) = *(short *)(iVar1 + 0x16) + -1;" (assignment_expression "*(short *)(param_1 + 0x46) = *(short *)(iVar1 + 0x16) + -1" (pointer_expression "*(short *)(param_1 + 0x46)" * (cast_expression "(short *)(param_1 + 0x46)" ( (type_descriptor "short *" (sized_type_specifier "short" short) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x46)" ( (binary_expression "param_1 + 0x46" identifier + number_literal) )))) = (binary_expression "*(short *)(iVar1 + 0x16) + -1" (pointer_expression "*(short *)(iVar1 + 0x16)" * (cast_expression "(short *)(iVar1 + 0x16)" ( (type_descriptor "short *" (sized_type_specifier "short" short) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 0x16)" ( (binary_expression "iVar1 + 0x16" identifier + number_literal) )))) + number_literal)) ;) (return_statement "return 0;" return number_literal ;) })) (expression_statement "uVar2 = *(undefined4 *)(*(int *)(iVar1 + 0x38) + (uint)*(byte *)(iVar1 + 9) + 8);" (assignment_expression "uVar2 = *(undefined4 *)(*(int *)(iVar1 + 0x38) + (uint)*(byte *)(iVar1 + 9) + 8)" identifier = (pointer_expression "*(undefined4 *)(*(int *)(iVar1 + 0x38) + (uint)*(byte *)(iVar1 + 9) + 8)" * (cast_expression "(undefined4 *)(*(int *)(iVar1 + 0x38) + (uint)*(byte *)(iVar1 + 9) + 8)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*(int *)(iVar1 + 0x38) + (uint)*(byte *)(iVar1 + 9) + 8)" ( (binary_expression "*(int *)(iVar1 + 0x38) + (uint)*(byte *)(iVar1 + 9) + 8" (binary_expression "*(int *)(iVar1 + 0x38) + (uint)*(byte *)(iVar1 + 9)" (pointer_expression "*(int *)(iVar1 + 0x38)" * (cast_expression "(int *)(iVar1 + 0x38)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 0x38)" ( (binary_expression "iVar1 + 0x38" identifier + number_literal) )))) + (binary_expression "(uint)*(byte *)(iVar1 + 9)" (parenthesized_expression "(uint)" ( identifier )) * (cast_expression "(byte *)(iVar1 + 9)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 9)" ( (binary_expression "iVar1 + 9" identifier + number_literal) ))))) + number_literal) ))))) ;) (expression_statement "*(short *)(param_1 + 0x46) = *(short *)(iVar1 + 0x16);" (assignment_expression "*(short *)(param_1 + 0x46) = *(short *)(iVar1 + 0x16)" (pointer_expression "*(short *)(param_1 + 0x46)" * (cast_expression "(short *)(param_1 + 0x46)" ( (type_descriptor "short *" (sized_type_specifier "short" short) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x46)" ( (binary_expression "param_1 + 0x46" identifier + number_literal) )))) = (pointer_expression "*(short *)(iVar1 + 0x16)" * (cast_expression "(short *)(iVar1 + 0x16)" ( (type_descriptor "short *" (sized_type_specifier "short" short) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 0x16)" ( (binary_expression "iVar1 + 0x16" identifier + number_literal) ))))) ;) (expression_statement "iVar1 = FUN_0008dbc4(param_1,uVar2);" (assignment_expression "iVar1 = FUN_0008dbc4(param_1,uVar2)" identifier = (call_expression "FUN_0008dbc4(param_1,uVar2)" identifier (argument_list "(param_1,uVar2)" ( identifier , identifier )))) ;) }) while (parenthesized_expression "(iVar1 == 0)" ( (binary_expression "iVar1 == 0" identifier == number_literal) )) ;) (return_statement "return iVar1;" return identifier ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (do_statement do (compound_statement { (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (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 (pointer_expression * (cast_expression ( (type_descriptor (sized_type_specifier short) (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = (binary_expression (pointer_expression * (cast_expression ( (type_descriptor (sized_type_specifier short) (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) + LIT)) ;) (return_statement return LIT ;) })) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) + (binary_expression (parenthesized_expression ( IDENT )) * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) + LIT) ))))) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor (sized_type_specifier short) (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = (pointer_expression * (cast_expression ( (type_descriptor (sized_type_specifier short) (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , IDENT )))) ;) }) while (parenthesized_expression ( (binary_expression IDENT == LIT) )) ;) (return_statement return IDENT ;) })))
(function_definition "int FUN_0008dc9c(int param_1)\n\n{\n  int iVar1;\n  undefined4 uVar2;\n  \n  do {\n    iVar1 = *(int *)(param_1 + 0x74);\n    if (*(char *)(iVar1 + 8) != '\0') {\n      *(short *)(param_1 + 0x46) = *(short *)(iVar1 + 0x16) + -1;\n      return 0;\n    }\n    uVar2 = *(undefined4 *)(*(int *)(iVar1 + 0x38) + (uint)*(byte *)(iVar1 + 9) + 8);\n    *(short *)(param_1 + 0x46) = *(short *)(iVar1 + 0x16);\n    iVar1 = FUN_0008dbc4(param_1,uVar2);\n  } while (iVar1 == 0);\n  return iVar1;\n}" (primitive_type "int") (function_declarator "FUN_0008dc9c(int param_1)" (identifier "FUN_0008dc9c") (parameter_list "(int param_1)" (( "(") (parameter_declaration "int param_1" (primitive_type "int") (identifier "param_1")) () ")"))) (compound_statement "{\n  int iVar1;\n  undefined4 uVar2;\n  \n  do {\n    iVar1 = *(int *)(param_1 + 0x74);\n    if (*(char *)(iVar1 + 8) != '\0') {\n      *(short *)(param_1 + 0x46) = *(short *)(iVar1 + 0x16) + -1;\n      return 0;\n    }\n    uVar2 = *(undefined4 *)(*(int *)(iVar1 + 0x38) + (uint)*(byte *)(iVar1 + 9) + 8);\n    *(short *)(param_1 + 0x46) = *(short *)(iVar1 + 0x16);\n    iVar1 = FUN_0008dbc4(param_1,uVar2);\n  } while (iVar1 == 0);\n  return iVar1;\n}" ({ "{") (declaration "int iVar1;" (primitive_type "int") (identifier "iVar1") (; ";")) (declaration "undefined4 uVar2;" (type_identifier "undefined4") (identifier "uVar2") (; ";")) (do_statement "do {\n    iVar1 = *(int *)(param_1 + 0x74);\n    if (*(char *)(iVar1 + 8) != '\0') {\n      *(short *)(param_1 + 0x46) = *(short *)(iVar1 + 0x16) + -1;\n      return 0;\n    }\n    uVar2 = *(undefined4 *)(*(int *)(iVar1 + 0x38) + (uint)*(byte *)(iVar1 + 9) + 8);\n    *(short *)(param_1 + 0x46) = *(short *)(iVar1 + 0x16);\n    iVar1 = FUN_0008dbc4(param_1,uVar2);\n  } while (iVar1 == 0);" (do "do") (compound_statement "{\n    iVar1 = *(int *)(param_1 + 0x74);\n    if (*(char *)(iVar1 + 8) != '\0') {\n      *(short *)(param_1 + 0x46) = *(short *)(iVar1 + 0x16) + -1;\n      return 0;\n    }\n    uVar2 = *(undefined4 *)(*(int *)(iVar1 + 0x38) + (uint)*(byte *)(iVar1 + 9) + 8);\n    *(short *)(param_1 + 0x46) = *(short *)(iVar1 + 0x16);\n    iVar1 = FUN_0008dbc4(param_1,uVar2);\n  }" ({ "{") (expression_statement "iVar1 = *(int *)(param_1 + 0x74);" (assignment_expression "iVar1 = *(int *)(param_1 + 0x74)" (identifier "iVar1") (= "=") (pointer_expression "*(int *)(param_1 + 0x74)" (* "*") (cast_expression "(int *)(param_1 + 0x74)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x74)" (( "(") (binary_expression "param_1 + 0x74" (identifier "param_1") (+ "+") (number_literal "0x74")) () ")"))))) (; ";")) (if_statement "if (*(char *)(iVar1 + 8) != '\0') {\n      *(short *)(param_1 + 0x46) = *(short *)(iVar1 + 0x16) + -1;\n      return 0;\n    }" (if "if") (parenthesized_expression "(*(char *)(iVar1 + 8) != '\0')" (( "(") (binary_expression "*(char *)(iVar1 + 8) != '\0'" (pointer_expression "*(char *)(iVar1 + 8)" (* "*") (cast_expression "(char *)(iVar1 + 8)" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar1 + 8)" (( "(") (binary_expression "iVar1 + 8" (identifier "iVar1") (+ "+") (number_literal "8")) () ")")))) (!= "!=") (char_literal "'\0'" (' "'") (escape_sequence "\0") (' "'"))) () ")")) (compound_statement "{\n      *(short *)(param_1 + 0x46) = *(short *)(iVar1 + 0x16) + -1;\n      return 0;\n    }" ({ "{") (expression_statement "*(short *)(param_1 + 0x46) = *(short *)(iVar1 + 0x16) + -1;" (assignment_expression "*(short *)(param_1 + 0x46) = *(short *)(iVar1 + 0x16) + -1" (pointer_expression "*(short *)(param_1 + 0x46)" (* "*") (cast_expression "(short *)(param_1 + 0x46)" (( "(") (type_descriptor "short *" (sized_type_specifier "short" (short "short")) (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x46)" (( "(") (binary_expression "param_1 + 0x46" (identifier "param_1") (+ "+") (number_literal "0x46")) () ")")))) (= "=") (binary_expression "*(short *)(iVar1 + 0x16) + -1" (pointer_expression "*(short *)(iVar1 + 0x16)" (* "*") (cast_expression "(short *)(iVar1 + 0x16)" (( "(") (type_descriptor "short *" (sized_type_specifier "short" (short "short")) (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar1 + 0x16)" (( "(") (binary_expression "iVar1 + 0x16" (identifier "iVar1") (+ "+") (number_literal "0x16")) () ")")))) (+ "+") (number_literal "-1"))) (; ";")) (return_statement "return 0;" (return "return") (number_literal "0") (; ";")) (} "}"))) (expression_statement "uVar2 = *(undefined4 *)(*(int *)(iVar1 + 0x38) + (uint)*(byte *)(iVar1 + 9) + 8);" (assignment_expression "uVar2 = *(undefined4 *)(*(int *)(iVar1 + 0x38) + (uint)*(byte *)(iVar1 + 9) + 8)" (identifier "uVar2") (= "=") (pointer_expression "*(undefined4 *)(*(int *)(iVar1 + 0x38) + (uint)*(byte *)(iVar1 + 9) + 8)" (* "*") (cast_expression "(undefined4 *)(*(int *)(iVar1 + 0x38) + (uint)*(byte *)(iVar1 + 9) + 8)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(*(int *)(iVar1 + 0x38) + (uint)*(byte *)(iVar1 + 9) + 8)" (( "(") (binary_expression "*(int *)(iVar1 + 0x38) + (uint)*(byte *)(iVar1 + 9) + 8" (binary_expression "*(int *)(iVar1 + 0x38) + (uint)*(byte *)(iVar1 + 9)" (pointer_expression "*(int *)(iVar1 + 0x38)" (* "*") (cast_expression "(int *)(iVar1 + 0x38)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar1 + 0x38)" (( "(") (binary_expression "iVar1 + 0x38" (identifier "iVar1") (+ "+") (number_literal "0x38")) () ")")))) (+ "+") (binary_expression "(uint)*(byte *)(iVar1 + 9)" (parenthesized_expression "(uint)" (( "(") (identifier "uint") () ")")) (* "*") (cast_expression "(byte *)(iVar1 + 9)" (( "(") (type_descriptor "byte *" (type_identifier "byte") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar1 + 9)" (( "(") (binary_expression "iVar1 + 9" (identifier "iVar1") (+ "+") (number_literal "9")) () ")"))))) (+ "+") (number_literal "8")) () ")"))))) (; ";")) (expression_statement "*(short *)(param_1 + 0x46) = *(short *)(iVar1 + 0x16);" (assignment_expression "*(short *)(param_1 + 0x46) = *(short *)(iVar1 + 0x16)" (pointer_expression "*(short *)(param_1 + 0x46)" (* "*") (cast_expression "(short *)(param_1 + 0x46)" (( "(") (type_descriptor "short *" (sized_type_specifier "short" (short "short")) (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x46)" (( "(") (binary_expression "param_1 + 0x46" (identifier "param_1") (+ "+") (number_literal "0x46")) () ")")))) (= "=") (pointer_expression "*(short *)(iVar1 + 0x16)" (* "*") (cast_expression "(short *)(iVar1 + 0x16)" (( "(") (type_descriptor "short *" (sized_type_specifier "short" (short "short")) (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar1 + 0x16)" (( "(") (binary_expression "iVar1 + 0x16" (identifier "iVar1") (+ "+") (number_literal "0x16")) () ")"))))) (; ";")) (expression_statement "iVar1 = FUN_0008dbc4(param_1,uVar2);" (assignment_expression "iVar1 = FUN_0008dbc4(param_1,uVar2)" (identifier "iVar1") (= "=") (call_expression "FUN_0008dbc4(param_1,uVar2)" (identifier "FUN_0008dbc4") (argument_list "(param_1,uVar2)" (( "(") (identifier "param_1") (, ",") (identifier "uVar2") () ")")))) (; ";")) (} "}")) (while "while") (parenthesized_expression "(iVar1 == 0)" (( "(") (binary_expression "iVar1 == 0" (identifier "iVar1") (== "==") (number_literal "0")) () ")")) (; ";")) (return_statement "return iVar1;" (return "return") (identifier "iVar1") (; ";")) (} "}")))
(translation_unit (function_definition type: (primitive_type) declarator: (function_declarator declarator: (identifier) parameters: (parameter_list (parameter_declaration type: (primitive_type) declarator: (identifier)))) body: (compound_statement (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (type_identifier) declarator: (identifier)) (do_statement body: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (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))))))) (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: (pointer_expression argument: (cast_expression type: (type_descriptor type: (sized_type_specifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) right: (binary_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (sized_type_specifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) right: (number_literal)))) (return_statement (number_literal)))) (expression_statement (assignment_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: (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: (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)))))) right: (number_literal))))))) (expression_statement (assignment_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (sized_type_specifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) right: (pointer_expression argument: (cast_expression type: (type_descriptor type: (sized_type_specifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (identifier) (identifier)))))) condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal)))) (return_statement (identifier)))))

int MASKED(int param_1)

{
  int iVar1;
  undefined4 uVar2;
  
  do {
    iVar1 = *(int *)(param_1 + 0x74);
    if (*(char *)(iVar1 + 8) != '\0') {
      *(short *)(param_1 + 0x46) = *(short *)(iVar1 + 0x16) + -1;
      return 0;
    }
    uVar2 = *(undefined4 *)(*(int *)(iVar1 + 0x38) + (uint)*(byte *)(iVar1 + 9) + 8);
    *(short *)(param_1 + 0x46) = *(short *)(iVar1 + 0x16);
    iVar1 = FUN_0008dbc4(param_1,uVar2);
  } while (iVar1 == 0);
  return iVar1;
}

