
void sqlite3RowSetInsert(RowSet *p,i64 rowid)

{
  RowSetEntry *pRVar1;
  RowSetEntry *pRVar2;
  
  pRVar2 = rowSetEntryAlloc(p);
  if (pRVar2 != (RowSetEntry *)0x0) {
    pRVar2->v = rowid;
    pRVar2->pRight = (RowSetEntry *)0x0;
    pRVar1 = p->pLast;
    if (pRVar1 == (RowSetEntry *)0x0) {
      p->pEntry = pRVar2;
    }
    else {
      if (rowid <= pRVar1->v) {
        p->rsFlags = p->rsFlags & 0xfffe;
      }
      pRVar1->pRight = pRVar2;
    }
    p->pLast = pRVar2;
  }
  return;
}



void FUN_0012c2e2(long param_1,long param_2)

{
  long *plVar1;
  long *plVar2;
  
  plVar2 = (long *)FUN_0012c298();
  if (plVar2 != (long *)0x0) {
    *plVar2 = param_2;
    plVar2[1] = 0;
    plVar1 = *(long **)(param_1 + 0x18);
    if (plVar1 == (long *)0x0) {
      *(long **)(param_1 + 0x10) = plVar2;
    }
    else {
      if (param_2 <= *plVar1) {
        *(ushort *)(param_1 + 0x32) = *(ushort *)(param_1 + 0x32) & 0xfffe;
      }
      plVar1[1] = (long)plVar2;
    }
    *(long **)(param_1 + 0x18) = plVar2;
  }
  return;
}


PUSH RBP
PUSH RBX
SUB RSP,0x8
MOV RBX,RDI
MOV RBP,RSI
CALL 0x0012c298
TEST RAX,RAX
JZ 0x0012c31e
MOV qword ptr [RAX],RBP
MOV qword ptr [RAX + 0x8],0x0
MOV RDX,qword ptr [RBX + 0x18]
TEST RDX,RDX
JZ 0x0012c325
CMP qword ptr [RDX],RBP
JL 0x0012c316
AND word ptr [RBX + 0x32],0xfffe
MOV qword ptr [RDX + 0x8],RAX
MOV qword ptr [RBX + 0x18],RAX
ADD RSP,0x8
POP RBX
POP RBP
RET
MOV qword ptr [RBX + 0x10],RAX
JMP 0x0012c31a
(translation_unit "void FUN_0012c2e2(long param_1,long param_2)\n\n{\n  long *plVar1;\n  long *plVar2;\n  \n  plVar2 = (long *)FUN_0012c298();\n  if (plVar2 != (long *)0x0) {\n    *plVar2 = param_2;\n    plVar2[1] = 0;\n    plVar1 = *(long **)(param_1 + 0x18);\n    if (plVar1 == (long *)0x0) {\n      *(long **)(param_1 + 0x10) = plVar2;\n    }\n    else {\n      if (param_2 <= *plVar1) {\n        *(ushort *)(param_1 + 0x32) = *(ushort *)(param_1 + 0x32) & 0xfffe;\n      }\n      plVar1[1] = (long)plVar2;\n    }\n    *(long **)(param_1 + 0x18) = plVar2;\n  }\n  return;\n}\n\n" (function_definition "void FUN_0012c2e2(long param_1,long param_2)\n\n{\n  long *plVar1;\n  long *plVar2;\n  \n  plVar2 = (long *)FUN_0012c298();\n  if (plVar2 != (long *)0x0) {\n    *plVar2 = param_2;\n    plVar2[1] = 0;\n    plVar1 = *(long **)(param_1 + 0x18);\n    if (plVar1 == (long *)0x0) {\n      *(long **)(param_1 + 0x10) = plVar2;\n    }\n    else {\n      if (param_2 <= *plVar1) {\n        *(ushort *)(param_1 + 0x32) = *(ushort *)(param_1 + 0x32) & 0xfffe;\n      }\n      plVar1[1] = (long)plVar2;\n    }\n    *(long **)(param_1 + 0x18) = plVar2;\n  }\n  return;\n}" primitive_type (function_declarator "FUN_0012c2e2(long param_1,long param_2)" identifier (parameter_list "(long param_1,long param_2)" ( (parameter_declaration "long param_1" (sized_type_specifier "long" long) identifier) , (parameter_declaration "long param_2" (sized_type_specifier "long" long) identifier) ))) (compound_statement "{\n  long *plVar1;\n  long *plVar2;\n  \n  plVar2 = (long *)FUN_0012c298();\n  if (plVar2 != (long *)0x0) {\n    *plVar2 = param_2;\n    plVar2[1] = 0;\n    plVar1 = *(long **)(param_1 + 0x18);\n    if (plVar1 == (long *)0x0) {\n      *(long **)(param_1 + 0x10) = plVar2;\n    }\n    else {\n      if (param_2 <= *plVar1) {\n        *(ushort *)(param_1 + 0x32) = *(ushort *)(param_1 + 0x32) & 0xfffe;\n      }\n      plVar1[1] = (long)plVar2;\n    }\n    *(long **)(param_1 + 0x18) = plVar2;\n  }\n  return;\n}" { (declaration "long *plVar1;" (sized_type_specifier "long" long) (pointer_declarator "*plVar1" * identifier) ;) (declaration "long *plVar2;" (sized_type_specifier "long" long) (pointer_declarator "*plVar2" * identifier) ;) (expression_statement "plVar2 = (long *)FUN_0012c298();" (assignment_expression "plVar2 = (long *)FUN_0012c298()" identifier = (cast_expression "(long *)FUN_0012c298()" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_0012c298()" identifier (argument_list "()" ( ))))) ;) (if_statement "if (plVar2 != (long *)0x0) {\n    *plVar2 = param_2;\n    plVar2[1] = 0;\n    plVar1 = *(long **)(param_1 + 0x18);\n    if (plVar1 == (long *)0x0) {\n      *(long **)(param_1 + 0x10) = plVar2;\n    }\n    else {\n      if (param_2 <= *plVar1) {\n        *(ushort *)(param_1 + 0x32) = *(ushort *)(param_1 + 0x32) & 0xfffe;\n      }\n      plVar1[1] = (long)plVar2;\n    }\n    *(long **)(param_1 + 0x18) = plVar2;\n  }" if (parenthesized_expression "(plVar2 != (long *)0x0)" ( (binary_expression "plVar2 != (long *)0x0" identifier != (cast_expression "(long *)0x0" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    *plVar2 = param_2;\n    plVar2[1] = 0;\n    plVar1 = *(long **)(param_1 + 0x18);\n    if (plVar1 == (long *)0x0) {\n      *(long **)(param_1 + 0x10) = plVar2;\n    }\n    else {\n      if (param_2 <= *plVar1) {\n        *(ushort *)(param_1 + 0x32) = *(ushort *)(param_1 + 0x32) & 0xfffe;\n      }\n      plVar1[1] = (long)plVar2;\n    }\n    *(long **)(param_1 + 0x18) = plVar2;\n  }" { (expression_statement "*plVar2 = param_2;" (assignment_expression "*plVar2 = param_2" (pointer_expression "*plVar2" * identifier) = identifier) ;) (expression_statement "plVar2[1] = 0;" (assignment_expression "plVar2[1] = 0" (subscript_expression "plVar2[1]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "plVar1 = *(long **)(param_1 + 0x18);" (assignment_expression "plVar1 = *(long **)(param_1 + 0x18)" identifier = (pointer_expression "*(long **)(param_1 + 0x18)" * (cast_expression "(long **)(param_1 + 0x18)" ( (type_descriptor "long **" (sized_type_specifier "long" long) (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_1 + 0x18)" ( (binary_expression "param_1 + 0x18" identifier + number_literal) ))))) ;) (if_statement "if (plVar1 == (long *)0x0) {\n      *(long **)(param_1 + 0x10) = plVar2;\n    }\n    else {\n      if (param_2 <= *plVar1) {\n        *(ushort *)(param_1 + 0x32) = *(ushort *)(param_1 + 0x32) & 0xfffe;\n      }\n      plVar1[1] = (long)plVar2;\n    }" if (parenthesized_expression "(plVar1 == (long *)0x0)" ( (binary_expression "plVar1 == (long *)0x0" identifier == (cast_expression "(long *)0x0" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n      *(long **)(param_1 + 0x10) = plVar2;\n    }" { (expression_statement "*(long **)(param_1 + 0x10) = plVar2;" (assignment_expression "*(long **)(param_1 + 0x10) = plVar2" (pointer_expression "*(long **)(param_1 + 0x10)" * (cast_expression "(long **)(param_1 + 0x10)" ( (type_descriptor "long **" (sized_type_specifier "long" long) (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_1 + 0x10)" ( (binary_expression "param_1 + 0x10" identifier + number_literal) )))) = identifier) ;) }) (else_clause "else {\n      if (param_2 <= *plVar1) {\n        *(ushort *)(param_1 + 0x32) = *(ushort *)(param_1 + 0x32) & 0xfffe;\n      }\n      plVar1[1] = (long)plVar2;\n    }" else (compound_statement "{\n      if (param_2 <= *plVar1) {\n        *(ushort *)(param_1 + 0x32) = *(ushort *)(param_1 + 0x32) & 0xfffe;\n      }\n      plVar1[1] = (long)plVar2;\n    }" { (if_statement "if (param_2 <= *plVar1) {\n        *(ushort *)(param_1 + 0x32) = *(ushort *)(param_1 + 0x32) & 0xfffe;\n      }" if (parenthesized_expression "(param_2 <= *plVar1)" ( (binary_expression "param_2 <= *plVar1" identifier <= (pointer_expression "*plVar1" * identifier)) )) (compound_statement "{\n        *(ushort *)(param_1 + 0x32) = *(ushort *)(param_1 + 0x32) & 0xfffe;\n      }" { (expression_statement "*(ushort *)(param_1 + 0x32) = *(ushort *)(param_1 + 0x32) & 0xfffe;" (assignment_expression "*(ushort *)(param_1 + 0x32) = *(ushort *)(param_1 + 0x32) & 0xfffe" (pointer_expression "*(ushort *)(param_1 + 0x32)" * (cast_expression "(ushort *)(param_1 + 0x32)" ( (type_descriptor "ushort *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x32)" ( (binary_expression "param_1 + 0x32" identifier + number_literal) )))) = (binary_expression "*(ushort *)(param_1 + 0x32) & 0xfffe" (pointer_expression "*(ushort *)(param_1 + 0x32)" * (cast_expression "(ushort *)(param_1 + 0x32)" ( (type_descriptor "ushort *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x32)" ( (binary_expression "param_1 + 0x32" identifier + number_literal) )))) & number_literal)) ;) })) (expression_statement "plVar1[1] = (long)plVar2;" (assignment_expression "plVar1[1] = (long)plVar2" (subscript_expression "plVar1[1]" identifier [ number_literal ]) = (cast_expression "(long)plVar2" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier)) ;) }))) (expression_statement "*(long **)(param_1 + 0x18) = plVar2;" (assignment_expression "*(long **)(param_1 + 0x18) = plVar2" (pointer_expression "*(long **)(param_1 + 0x18)" * (cast_expression "(long **)(param_1 + 0x18)" ( (type_descriptor "long **" (sized_type_specifier "long" long) (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_1 + 0x18)" ( (binary_expression "param_1 + 0x18" identifier + number_literal) )))) = identifier) ;) })) (return_statement "return;" return ;) })))
(translation_unit "void sqlite3RowSetInsert(RowSet *p,i64 rowid)\n\n{\n  RowSetEntry *pRVar1;\n  RowSetEntry *pRVar2;\n  \n  pRVar2 = rowSetEntryAlloc(p);\n  if (pRVar2 != (RowSetEntry *)0x0) {\n    pRVar2->v = rowid;\n    pRVar2->pRight = (RowSetEntry *)0x0;\n    pRVar1 = p->pLast;\n    if (pRVar1 == (RowSetEntry *)0x0) {\n      p->pEntry = pRVar2;\n    }\n    else {\n      if (rowid <= pRVar1->v) {\n        p->rsFlags = p->rsFlags & 0xfffe;\n      }\n      pRVar1->pRight = pRVar2;\n    }\n    p->pLast = pRVar2;\n  }\n  return;\n}\n\n" (function_definition "void sqlite3RowSetInsert(RowSet *p,i64 rowid)\n\n{\n  RowSetEntry *pRVar1;\n  RowSetEntry *pRVar2;\n  \n  pRVar2 = rowSetEntryAlloc(p);\n  if (pRVar2 != (RowSetEntry *)0x0) {\n    pRVar2->v = rowid;\n    pRVar2->pRight = (RowSetEntry *)0x0;\n    pRVar1 = p->pLast;\n    if (pRVar1 == (RowSetEntry *)0x0) {\n      p->pEntry = pRVar2;\n    }\n    else {\n      if (rowid <= pRVar1->v) {\n        p->rsFlags = p->rsFlags & 0xfffe;\n      }\n      pRVar1->pRight = pRVar2;\n    }\n    p->pLast = pRVar2;\n  }\n  return;\n}" primitive_type (function_declarator "sqlite3RowSetInsert(RowSet *p,i64 rowid)" identifier (parameter_list "(RowSet *p,i64 rowid)" ( (parameter_declaration "RowSet *p" type_identifier (pointer_declarator "*p" * identifier)) , (parameter_declaration "i64 rowid" type_identifier identifier) ))) (compound_statement "{\n  RowSetEntry *pRVar1;\n  RowSetEntry *pRVar2;\n  \n  pRVar2 = rowSetEntryAlloc(p);\n  if (pRVar2 != (RowSetEntry *)0x0) {\n    pRVar2->v = rowid;\n    pRVar2->pRight = (RowSetEntry *)0x0;\n    pRVar1 = p->pLast;\n    if (pRVar1 == (RowSetEntry *)0x0) {\n      p->pEntry = pRVar2;\n    }\n    else {\n      if (rowid <= pRVar1->v) {\n        p->rsFlags = p->rsFlags & 0xfffe;\n      }\n      pRVar1->pRight = pRVar2;\n    }\n    p->pLast = pRVar2;\n  }\n  return;\n}" { (declaration "RowSetEntry *pRVar1;" type_identifier (pointer_declarator "*pRVar1" * identifier) ;) (declaration "RowSetEntry *pRVar2;" type_identifier (pointer_declarator "*pRVar2" * identifier) ;) (expression_statement "pRVar2 = rowSetEntryAlloc(p);" (assignment_expression "pRVar2 = rowSetEntryAlloc(p)" identifier = (call_expression "rowSetEntryAlloc(p)" identifier (argument_list "(p)" ( identifier )))) ;) (if_statement "if (pRVar2 != (RowSetEntry *)0x0) {\n    pRVar2->v = rowid;\n    pRVar2->pRight = (RowSetEntry *)0x0;\n    pRVar1 = p->pLast;\n    if (pRVar1 == (RowSetEntry *)0x0) {\n      p->pEntry = pRVar2;\n    }\n    else {\n      if (rowid <= pRVar1->v) {\n        p->rsFlags = p->rsFlags & 0xfffe;\n      }\n      pRVar1->pRight = pRVar2;\n    }\n    p->pLast = pRVar2;\n  }" if (parenthesized_expression "(pRVar2 != (RowSetEntry *)0x0)" ( (binary_expression "pRVar2 != (RowSetEntry *)0x0" identifier != (cast_expression "(RowSetEntry *)0x0" ( (type_descriptor "RowSetEntry *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    pRVar2->v = rowid;\n    pRVar2->pRight = (RowSetEntry *)0x0;\n    pRVar1 = p->pLast;\n    if (pRVar1 == (RowSetEntry *)0x0) {\n      p->pEntry = pRVar2;\n    }\n    else {\n      if (rowid <= pRVar1->v) {\n        p->rsFlags = p->rsFlags & 0xfffe;\n      }\n      pRVar1->pRight = pRVar2;\n    }\n    p->pLast = pRVar2;\n  }" { (expression_statement "pRVar2->v = rowid;" (assignment_expression "pRVar2->v = rowid" (field_expression "pRVar2->v" identifier -> field_identifier) = identifier) ;) (expression_statement "pRVar2->pRight = (RowSetEntry *)0x0;" (assignment_expression "pRVar2->pRight = (RowSetEntry *)0x0" (field_expression "pRVar2->pRight" identifier -> field_identifier) = (cast_expression "(RowSetEntry *)0x0" ( (type_descriptor "RowSetEntry *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) ;) (expression_statement "pRVar1 = p->pLast;" (assignment_expression "pRVar1 = p->pLast" identifier = (field_expression "p->pLast" identifier -> field_identifier)) ;) (if_statement "if (pRVar1 == (RowSetEntry *)0x0) {\n      p->pEntry = pRVar2;\n    }\n    else {\n      if (rowid <= pRVar1->v) {\n        p->rsFlags = p->rsFlags & 0xfffe;\n      }\n      pRVar1->pRight = pRVar2;\n    }" if (parenthesized_expression "(pRVar1 == (RowSetEntry *)0x0)" ( (binary_expression "pRVar1 == (RowSetEntry *)0x0" identifier == (cast_expression "(RowSetEntry *)0x0" ( (type_descriptor "RowSetEntry *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n      p->pEntry = pRVar2;\n    }" { (expression_statement "p->pEntry = pRVar2;" (assignment_expression "p->pEntry = pRVar2" (field_expression "p->pEntry" identifier -> field_identifier) = identifier) ;) }) (else_clause "else {\n      if (rowid <= pRVar1->v) {\n        p->rsFlags = p->rsFlags & 0xfffe;\n      }\n      pRVar1->pRight = pRVar2;\n    }" else (compound_statement "{\n      if (rowid <= pRVar1->v) {\n        p->rsFlags = p->rsFlags & 0xfffe;\n      }\n      pRVar1->pRight = pRVar2;\n    }" { (if_statement "if (rowid <= pRVar1->v) {\n        p->rsFlags = p->rsFlags & 0xfffe;\n      }" if (parenthesized_expression "(rowid <= pRVar1->v)" ( (binary_expression "rowid <= pRVar1->v" identifier <= (field_expression "pRVar1->v" identifier -> field_identifier)) )) (compound_statement "{\n        p->rsFlags = p->rsFlags & 0xfffe;\n      }" { (expression_statement "p->rsFlags = p->rsFlags & 0xfffe;" (assignment_expression "p->rsFlags = p->rsFlags & 0xfffe" (field_expression "p->rsFlags" identifier -> field_identifier) = (binary_expression "p->rsFlags & 0xfffe" (field_expression "p->rsFlags" identifier -> field_identifier) & number_literal)) ;) })) (expression_statement "pRVar1->pRight = pRVar2;" (assignment_expression "pRVar1->pRight = pRVar2" (field_expression "pRVar1->pRight" identifier -> field_identifier) = identifier) ;) }))) (expression_statement "p->pLast = pRVar2;" (assignment_expression "p->pLast = pRVar2" (field_expression "p->pLast" identifier -> field_identifier) = identifier) ;) })) (return_statement "return;" return ;) })))
(translation_unit "void FUN_0012c2e2(long param_1,long param_2)\n\n{\n  long *plVar1;\n  long *plVar2;\n  \n  plVar2 = (long *)FUN_0012c298();\n  if (plVar2 != (long *)0x0) {\n    *plVar2 = param_2;\n    plVar2[1] = 0;\n    plVar1 = *(long **)(param_1 + 0x18);\n    if (plVar1 == (long *)0x0) {\n      *(long **)(param_1 + 0x10) = plVar2;\n    }\n    else {\n      if (param_2 <= *plVar1) {\n        *(ushort *)(param_1 + 0x32) = *(ushort *)(param_1 + 0x32) & 0xfffe;\n      }\n      plVar1[1] = (long)plVar2;\n    }\n    *(long **)(param_1 + 0x18) = plVar2;\n  }\n  return;\n}\n\n" (function_definition "void FUN_0012c2e2(long param_1,long param_2)\n\n{\n  long *plVar1;\n  long *plVar2;\n  \n  plVar2 = (long *)FUN_0012c298();\n  if (plVar2 != (long *)0x0) {\n    *plVar2 = param_2;\n    plVar2[1] = 0;\n    plVar1 = *(long **)(param_1 + 0x18);\n    if (plVar1 == (long *)0x0) {\n      *(long **)(param_1 + 0x10) = plVar2;\n    }\n    else {\n      if (param_2 <= *plVar1) {\n        *(ushort *)(param_1 + 0x32) = *(ushort *)(param_1 + 0x32) & 0xfffe;\n      }\n      plVar1[1] = (long)plVar2;\n    }\n    *(long **)(param_1 + 0x18) = plVar2;\n  }\n  return;\n}" primitive_type (function_declarator "FUN_0012c2e2(long param_1,long param_2)" identifier (parameter_list "(long param_1,long param_2)" ( (parameter_declaration "long param_1" (sized_type_specifier "long" long) identifier) , (parameter_declaration "long param_2" (sized_type_specifier "long" long) identifier) ))) (compound_statement "{\n  long *plVar1;\n  long *plVar2;\n  \n  plVar2 = (long *)FUN_0012c298();\n  if (plVar2 != (long *)0x0) {\n    *plVar2 = param_2;\n    plVar2[1] = 0;\n    plVar1 = *(long **)(param_1 + 0x18);\n    if (plVar1 == (long *)0x0) {\n      *(long **)(param_1 + 0x10) = plVar2;\n    }\n    else {\n      if (param_2 <= *plVar1) {\n        *(ushort *)(param_1 + 0x32) = *(ushort *)(param_1 + 0x32) & 0xfffe;\n      }\n      plVar1[1] = (long)plVar2;\n    }\n    *(long **)(param_1 + 0x18) = plVar2;\n  }\n  return;\n}" { (declaration "long *plVar1;" (sized_type_specifier "long" long) (pointer_declarator "*plVar1" * identifier) ;) (declaration "long *plVar2;" (sized_type_specifier "long" long) (pointer_declarator "*plVar2" * identifier) ;) (expression_statement "plVar2 = (long *)FUN_0012c298();" (assignment_expression "plVar2 = (long *)FUN_0012c298()" identifier = (cast_expression "(long *)FUN_0012c298()" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_0012c298()" identifier (argument_list "()" ( ))))) ;) (if_statement "if (plVar2 != (long *)0x0) {\n    *plVar2 = param_2;\n    plVar2[1] = 0;\n    plVar1 = *(long **)(param_1 + 0x18);\n    if (plVar1 == (long *)0x0) {\n      *(long **)(param_1 + 0x10) = plVar2;\n    }\n    else {\n      if (param_2 <= *plVar1) {\n        *(ushort *)(param_1 + 0x32) = *(ushort *)(param_1 + 0x32) & 0xfffe;\n      }\n      plVar1[1] = (long)plVar2;\n    }\n    *(long **)(param_1 + 0x18) = plVar2;\n  }" if (parenthesized_expression "(plVar2 != (long *)0x0)" ( (binary_expression "plVar2 != (long *)0x0" identifier != (cast_expression "(long *)0x0" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    *plVar2 = param_2;\n    plVar2[1] = 0;\n    plVar1 = *(long **)(param_1 + 0x18);\n    if (plVar1 == (long *)0x0) {\n      *(long **)(param_1 + 0x10) = plVar2;\n    }\n    else {\n      if (param_2 <= *plVar1) {\n        *(ushort *)(param_1 + 0x32) = *(ushort *)(param_1 + 0x32) & 0xfffe;\n      }\n      plVar1[1] = (long)plVar2;\n    }\n    *(long **)(param_1 + 0x18) = plVar2;\n  }" { (expression_statement "*plVar2 = param_2;" (assignment_expression "*plVar2 = param_2" (pointer_expression "*plVar2" * identifier) = identifier) ;) (expression_statement "plVar2[1] = 0;" (assignment_expression "plVar2[1] = 0" (subscript_expression "plVar2[1]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "plVar1 = *(long **)(param_1 + 0x18);" (assignment_expression "plVar1 = *(long **)(param_1 + 0x18)" identifier = (pointer_expression "*(long **)(param_1 + 0x18)" * (cast_expression "(long **)(param_1 + 0x18)" ( (type_descriptor "long **" (sized_type_specifier "long" long) (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_1 + 0x18)" ( (binary_expression "param_1 + 0x18" identifier + number_literal) ))))) ;) (if_statement "if (plVar1 == (long *)0x0) {\n      *(long **)(param_1 + 0x10) = plVar2;\n    }\n    else {\n      if (param_2 <= *plVar1) {\n        *(ushort *)(param_1 + 0x32) = *(ushort *)(param_1 + 0x32) & 0xfffe;\n      }\n      plVar1[1] = (long)plVar2;\n    }" if (parenthesized_expression "(plVar1 == (long *)0x0)" ( (binary_expression "plVar1 == (long *)0x0" identifier == (cast_expression "(long *)0x0" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n      *(long **)(param_1 + 0x10) = plVar2;\n    }" { (expression_statement "*(long **)(param_1 + 0x10) = plVar2;" (assignment_expression "*(long **)(param_1 + 0x10) = plVar2" (pointer_expression "*(long **)(param_1 + 0x10)" * (cast_expression "(long **)(param_1 + 0x10)" ( (type_descriptor "long **" (sized_type_specifier "long" long) (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_1 + 0x10)" ( (binary_expression "param_1 + 0x10" identifier + number_literal) )))) = identifier) ;) }) (else_clause "else {\n      if (param_2 <= *plVar1) {\n        *(ushort *)(param_1 + 0x32) = *(ushort *)(param_1 + 0x32) & 0xfffe;\n      }\n      plVar1[1] = (long)plVar2;\n    }" else (compound_statement "{\n      if (param_2 <= *plVar1) {\n        *(ushort *)(param_1 + 0x32) = *(ushort *)(param_1 + 0x32) & 0xfffe;\n      }\n      plVar1[1] = (long)plVar2;\n    }" { (if_statement "if (param_2 <= *plVar1) {\n        *(ushort *)(param_1 + 0x32) = *(ushort *)(param_1 + 0x32) & 0xfffe;\n      }" if (parenthesized_expression "(param_2 <= *plVar1)" ( (binary_expression "param_2 <= *plVar1" identifier <= (pointer_expression "*plVar1" * identifier)) )) (compound_statement "{\n        *(ushort *)(param_1 + 0x32) = *(ushort *)(param_1 + 0x32) & 0xfffe;\n      }" { (expression_statement "*(ushort *)(param_1 + 0x32) = *(ushort *)(param_1 + 0x32) & 0xfffe;" (assignment_expression "*(ushort *)(param_1 + 0x32) = *(ushort *)(param_1 + 0x32) & 0xfffe" (pointer_expression "*(ushort *)(param_1 + 0x32)" * (cast_expression "(ushort *)(param_1 + 0x32)" ( (type_descriptor "ushort *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x32)" ( (binary_expression "param_1 + 0x32" identifier + number_literal) )))) = (binary_expression "*(ushort *)(param_1 + 0x32) & 0xfffe" (pointer_expression "*(ushort *)(param_1 + 0x32)" * (cast_expression "(ushort *)(param_1 + 0x32)" ( (type_descriptor "ushort *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x32)" ( (binary_expression "param_1 + 0x32" identifier + number_literal) )))) & number_literal)) ;) })) (expression_statement "plVar1[1] = (long)plVar2;" (assignment_expression "plVar1[1] = (long)plVar2" (subscript_expression "plVar1[1]" identifier [ number_literal ]) = (cast_expression "(long)plVar2" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier)) ;) }))) (expression_statement "*(long **)(param_1 + 0x18) = plVar2;" (assignment_expression "*(long **)(param_1 + 0x18) = plVar2" (pointer_expression "*(long **)(param_1 + 0x18)" * (cast_expression "(long **)(param_1 + 0x18)" ( (type_descriptor "long **" (sized_type_specifier "long" long) (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_1 + 0x18)" ( (binary_expression "param_1 + 0x18" identifier + number_literal) )))) = identifier) ;) })) (return_statement "return;" return ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration (sized_type_specifier long) IDENT) , (parameter_declaration (sized_type_specifier long) IDENT) ))) (compound_statement { (declaration (sized_type_specifier long) (pointer_declarator * IDENT) ;) (declaration (sized_type_specifier long) (pointer_declarator * IDENT) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor (sized_type_specifier long) (abstract_pointer_declarator *)) ) (call_expression IDENT (argument_list ( ))))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != (cast_expression ( (type_descriptor (sized_type_specifier long) (abstract_pointer_declarator *)) ) LIT)) )) (compound_statement { (expression_statement (assignment_expression (pointer_expression * IDENT) = IDENT) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = LIT) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor (sized_type_specifier long) (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == (cast_expression ( (type_descriptor (sized_type_specifier long) (abstract_pointer_declarator *)) ) LIT)) )) (compound_statement { (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor (sized_type_specifier long) (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = IDENT) ;) }) (else_clause else (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression IDENT <= (pointer_expression * IDENT)) )) (compound_statement { (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) & LIT)) ;) })) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = (cast_expression ( (type_descriptor (sized_type_specifier long)) ) IDENT)) ;) }))) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor (sized_type_specifier long) (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = IDENT) ;) })) (return_statement return ;) })))
(function_definition "void FUN_0012c2e2(long param_1,long param_2)\n\n{\n  long *plVar1;\n  long *plVar2;\n  \n  plVar2 = (long *)FUN_0012c298();\n  if (plVar2 != (long *)0x0) {\n    *plVar2 = param_2;\n    plVar2[1] = 0;\n    plVar1 = *(long **)(param_1 + 0x18);\n    if (plVar1 == (long *)0x0) {\n      *(long **)(param_1 + 0x10) = plVar2;\n    }\n    else {\n      if (param_2 <= *plVar1) {\n        *(ushort *)(param_1 + 0x32) = *(ushort *)(param_1 + 0x32) & 0xfffe;\n      }\n      plVar1[1] = (long)plVar2;\n    }\n    *(long **)(param_1 + 0x18) = plVar2;\n  }\n  return;\n}" (primitive_type "void") (function_declarator "FUN_0012c2e2(long param_1,long param_2)" (identifier "FUN_0012c2e2") (parameter_list "(long param_1,long param_2)" (( "(") (parameter_declaration "long param_1" (sized_type_specifier "long" (long "long")) (identifier "param_1")) (, ",") (parameter_declaration "long param_2" (sized_type_specifier "long" (long "long")) (identifier "param_2")) () ")"))) (compound_statement "{\n  long *plVar1;\n  long *plVar2;\n  \n  plVar2 = (long *)FUN_0012c298();\n  if (plVar2 != (long *)0x0) {\n    *plVar2 = param_2;\n    plVar2[1] = 0;\n    plVar1 = *(long **)(param_1 + 0x18);\n    if (plVar1 == (long *)0x0) {\n      *(long **)(param_1 + 0x10) = plVar2;\n    }\n    else {\n      if (param_2 <= *plVar1) {\n        *(ushort *)(param_1 + 0x32) = *(ushort *)(param_1 + 0x32) & 0xfffe;\n      }\n      plVar1[1] = (long)plVar2;\n    }\n    *(long **)(param_1 + 0x18) = plVar2;\n  }\n  return;\n}" ({ "{") (declaration "long *plVar1;" (sized_type_specifier "long" (long "long")) (pointer_declarator "*plVar1" (* "*") (identifier "plVar1")) (; ";")) (declaration "long *plVar2;" (sized_type_specifier "long" (long "long")) (pointer_declarator "*plVar2" (* "*") (identifier "plVar2")) (; ";")) (expression_statement "plVar2 = (long *)FUN_0012c298();" (assignment_expression "plVar2 = (long *)FUN_0012c298()" (identifier "plVar2") (= "=") (cast_expression "(long *)FUN_0012c298()" (( "(") (type_descriptor "long *" (sized_type_specifier "long" (long "long")) (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "FUN_0012c298()" (identifier "FUN_0012c298") (argument_list "()" (( "(") () ")"))))) (; ";")) (if_statement "if (plVar2 != (long *)0x0) {\n    *plVar2 = param_2;\n    plVar2[1] = 0;\n    plVar1 = *(long **)(param_1 + 0x18);\n    if (plVar1 == (long *)0x0) {\n      *(long **)(param_1 + 0x10) = plVar2;\n    }\n    else {\n      if (param_2 <= *plVar1) {\n        *(ushort *)(param_1 + 0x32) = *(ushort *)(param_1 + 0x32) & 0xfffe;\n      }\n      plVar1[1] = (long)plVar2;\n    }\n    *(long **)(param_1 + 0x18) = plVar2;\n  }" (if "if") (parenthesized_expression "(plVar2 != (long *)0x0)" (( "(") (binary_expression "plVar2 != (long *)0x0" (identifier "plVar2") (!= "!=") (cast_expression "(long *)0x0" (( "(") (type_descriptor "long *" (sized_type_specifier "long" (long "long")) (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\n    *plVar2 = param_2;\n    plVar2[1] = 0;\n    plVar1 = *(long **)(param_1 + 0x18);\n    if (plVar1 == (long *)0x0) {\n      *(long **)(param_1 + 0x10) = plVar2;\n    }\n    else {\n      if (param_2 <= *plVar1) {\n        *(ushort *)(param_1 + 0x32) = *(ushort *)(param_1 + 0x32) & 0xfffe;\n      }\n      plVar1[1] = (long)plVar2;\n    }\n    *(long **)(param_1 + 0x18) = plVar2;\n  }" ({ "{") (expression_statement "*plVar2 = param_2;" (assignment_expression "*plVar2 = param_2" (pointer_expression "*plVar2" (* "*") (identifier "plVar2")) (= "=") (identifier "param_2")) (; ";")) (expression_statement "plVar2[1] = 0;" (assignment_expression "plVar2[1] = 0" (subscript_expression "plVar2[1]" (identifier "plVar2") ([ "[") (number_literal "1") (] "]")) (= "=") (number_literal "0")) (; ";")) (expression_statement "plVar1 = *(long **)(param_1 + 0x18);" (assignment_expression "plVar1 = *(long **)(param_1 + 0x18)" (identifier "plVar1") (= "=") (pointer_expression "*(long **)(param_1 + 0x18)" (* "*") (cast_expression "(long **)(param_1 + 0x18)" (( "(") (type_descriptor "long **" (sized_type_specifier "long" (long "long")) (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(param_1 + 0x18)" (( "(") (binary_expression "param_1 + 0x18" (identifier "param_1") (+ "+") (number_literal "0x18")) () ")"))))) (; ";")) (if_statement "if (plVar1 == (long *)0x0) {\n      *(long **)(param_1 + 0x10) = plVar2;\n    }\n    else {\n      if (param_2 <= *plVar1) {\n        *(ushort *)(param_1 + 0x32) = *(ushort *)(param_1 + 0x32) & 0xfffe;\n      }\n      plVar1[1] = (long)plVar2;\n    }" (if "if") (parenthesized_expression "(plVar1 == (long *)0x0)" (( "(") (binary_expression "plVar1 == (long *)0x0" (identifier "plVar1") (== "==") (cast_expression "(long *)0x0" (( "(") (type_descriptor "long *" (sized_type_specifier "long" (long "long")) (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\n      *(long **)(param_1 + 0x10) = plVar2;\n    }" ({ "{") (expression_statement "*(long **)(param_1 + 0x10) = plVar2;" (assignment_expression "*(long **)(param_1 + 0x10) = plVar2" (pointer_expression "*(long **)(param_1 + 0x10)" (* "*") (cast_expression "(long **)(param_1 + 0x10)" (( "(") (type_descriptor "long **" (sized_type_specifier "long" (long "long")) (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(param_1 + 0x10)" (( "(") (binary_expression "param_1 + 0x10" (identifier "param_1") (+ "+") (number_literal "0x10")) () ")")))) (= "=") (identifier "plVar2")) (; ";")) (} "}")) (else_clause "else {\n      if (param_2 <= *plVar1) {\n        *(ushort *)(param_1 + 0x32) = *(ushort *)(param_1 + 0x32) & 0xfffe;\n      }\n      plVar1[1] = (long)plVar2;\n    }" (else "else") (compound_statement "{\n      if (param_2 <= *plVar1) {\n        *(ushort *)(param_1 + 0x32) = *(ushort *)(param_1 + 0x32) & 0xfffe;\n      }\n      plVar1[1] = (long)plVar2;\n    }" ({ "{") (if_statement "if (param_2 <= *plVar1) {\n        *(ushort *)(param_1 + 0x32) = *(ushort *)(param_1 + 0x32) & 0xfffe;\n      }" (if "if") (parenthesized_expression "(param_2 <= *plVar1)" (( "(") (binary_expression "param_2 <= *plVar1" (identifier "param_2") (<= "<=") (pointer_expression "*plVar1" (* "*") (identifier "plVar1"))) () ")")) (compound_statement "{\n        *(ushort *)(param_1 + 0x32) = *(ushort *)(param_1 + 0x32) & 0xfffe;\n      }" ({ "{") (expression_statement "*(ushort *)(param_1 + 0x32) = *(ushort *)(param_1 + 0x32) & 0xfffe;" (assignment_expression "*(ushort *)(param_1 + 0x32) = *(ushort *)(param_1 + 0x32) & 0xfffe" (pointer_expression "*(ushort *)(param_1 + 0x32)" (* "*") (cast_expression "(ushort *)(param_1 + 0x32)" (( "(") (type_descriptor "ushort *" (type_identifier "ushort") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x32)" (( "(") (binary_expression "param_1 + 0x32" (identifier "param_1") (+ "+") (number_literal "0x32")) () ")")))) (= "=") (binary_expression "*(ushort *)(param_1 + 0x32) & 0xfffe" (pointer_expression "*(ushort *)(param_1 + 0x32)" (* "*") (cast_expression "(ushort *)(param_1 + 0x32)" (( "(") (type_descriptor "ushort *" (type_identifier "ushort") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x32)" (( "(") (binary_expression "param_1 + 0x32" (identifier "param_1") (+ "+") (number_literal "0x32")) () ")")))) (& "&") (number_literal "0xfffe"))) (; ";")) (} "}"))) (expression_statement "plVar1[1] = (long)plVar2;" (assignment_expression "plVar1[1] = (long)plVar2" (subscript_expression "plVar1[1]" (identifier "plVar1") ([ "[") (number_literal "1") (] "]")) (= "=") (cast_expression "(long)plVar2" (( "(") (type_descriptor "long" (sized_type_specifier "long" (long "long"))) () ")") (identifier "plVar2"))) (; ";")) (} "}")))) (expression_statement "*(long **)(param_1 + 0x18) = plVar2;" (assignment_expression "*(long **)(param_1 + 0x18) = plVar2" (pointer_expression "*(long **)(param_1 + 0x18)" (* "*") (cast_expression "(long **)(param_1 + 0x18)" (( "(") (type_descriptor "long **" (sized_type_specifier "long" (long "long")) (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(param_1 + 0x18)" (( "(") (binary_expression "param_1 + 0x18" (identifier "param_1") (+ "+") (number_literal "0x18")) () ")")))) (= "=") (identifier "plVar2")) (; ";")) (} "}"))) (return_statement "return;" (return "return") (; ";")) (} "}")))

void function_1(type_1 *p,type_2 var_4)

{
  type_3 *var_3;
  type_3 *var_2;
  
  var_2 = var_1(p);
  if (var_2 != (type_3 *)0x0) {
    var_2->v = var_4;
    var_2->pRight = (type_3 *)0x0;
    var_3 = p->pLast;
    if (var_3 == (type_3 *)0x0) {
      p->pEntry = var_2;
    }
    else {
      if (var_4 <= var_3->v) {
        p->rsFlags = p->rsFlags & 0xfffe;
      }
      var_3->pRight = var_2;
    }
    p->pLast = var_2;
  }
  return;
}


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

void MASKED(long param_1,long param_2)

{
  long *plVar1;
  long *plVar2;
  
  plVar2 = (long *)FUN_0012c298();
  if (plVar2 != (long *)0x0) {
    *plVar2 = param_2;
    plVar2[1] = 0;
    plVar1 = *(long **)(param_1 + 0x18);
    if (plVar1 == (long *)0x0) {
      *(long **)(param_1 + 0x10) = plVar2;
    }
    else {
      if (param_2 <= *plVar1) {
        *(ushort *)(param_1 + 0x32) = *(ushort *)(param_1 + 0x32) & 0xfffe;
      }
      plVar1[1] = (long)plVar2;
    }
    *(long **)(param_1 + 0x18) = plVar2;
  }
  return;
}

