
int __regparm3 sqlite3BtreeSecureDelete(Btree *p,int newFlag)

{
  u16 *puVar1;
  int *piVar2;
  ushort uVar3;
  int iVar4;
  
  if (p == (Btree *)0x0) {
    return 0;
  }
  if (p->sharable != '\0') {
    sqlite3BtreeEnter(p);
  }
  uVar3 = p->pBt->btsFlags;
  if (-1 < newFlag) {
    p->pBt->btsFlags = uVar3 & 0xfff3;
    puVar1 = &p->pBt->btsFlags;
    *puVar1 = *puVar1 | (ushort)(newFlag << 2);
    uVar3 = p->pBt->btsFlags;
  }
  iVar4 = (int)(uVar3 & 0xc) >> 2;
  if (p->sharable != '\0') {
    piVar2 = &p->wantToLock;
    *piVar2 = *piVar2 + -1;
    if (*piVar2 == 0) {
      sqlite3BtreeLeave(p);
      return iVar4;
    }
  }
  return iVar4;
}



int __regparm3 FUN_00048ce0(int param_1,int param_2)

{
  ushort *puVar1;
  int *piVar2;
  ushort uVar3;
  int iVar4;
  
  if (param_1 == 0) {
    return 0;
  }
  if (*(char *)(param_1 + 9) != '\0') {
    FUN_00048b40();
  }
  uVar3 = *(ushort *)(*(int *)(param_1 + 4) + 0x16);
  if (-1 < param_2) {
    *(ushort *)(*(int *)(param_1 + 4) + 0x16) = uVar3 & 0xfff3;
    puVar1 = (ushort *)(*(int *)(param_1 + 4) + 0x16);
    *puVar1 = *puVar1 | (ushort)(param_2 << 2);
    uVar3 = *(ushort *)(*(int *)(param_1 + 4) + 0x16);
  }
  iVar4 = (int)(uVar3 & 0xc) >> 2;
  if (*(char *)(param_1 + 9) != '\0') {
    piVar2 = (int *)(param_1 + 0xc);
    *piVar2 = *piVar2 + -1;
    if (*piVar2 == 0) {
      FUN_00048bd0();
      return iVar4;
    }
  }
  return iVar4;
}


PUSH ESI
PUSH EBX
SUB ESP,0x4
TEST EAX,EAX
JZ 0x00048d50
CMP byte ptr [EAX + 0x9],0x0
MOV ESI,EDX
MOV EBX,EAX
JZ 0x00048cf8
CALL 0x00048b40
MOV EDX,dword ptr [EBX + 0x4]
MOVZX EAX,word ptr [EDX + 0x16]
TEST ESI,ESI
JS 0x00048d1b
AND EAX,0xfffffff3
SHL ESI,0x2
MOV word ptr [EDX + 0x16],AX
MOV EAX,dword ptr [EBX + 0x4]
OR word ptr [EAX + 0x16],SI
MOV EAX,dword ptr [EBX + 0x4]
MOVZX EAX,word ptr [EAX + 0x16]
AND EAX,0xc
SAR EAX,0x2
CMP byte ptr [EBX + 0x9],0x0
MOV ESI,EAX
JZ 0x00048d2f
SUB dword ptr [EBX + 0xc],0x1
JZ 0x00048d40
ADD ESP,0x4
MOV EAX,ESI
POP EBX
POP ESI
RET
MOV EAX,EBX
CALL 0x00048bd0
ADD ESP,0x4
MOV EAX,ESI
POP EBX
POP ESI
RET
XOR ESI,ESI
ADD ESP,0x4
MOV EAX,ESI
POP EBX
POP ESI
RET
(translation_unit "int __regparm3 FUN_00048ce0(int param_1,int param_2)\n\n{\n  ushort *puVar1;\n  int *piVar2;\n  ushort uVar3;\n  int iVar4;\n  \n  if (param_1 == 0) {\n    return 0;\n  }\n  if (*(char *)(param_1 + 9) != '\0') {\n    FUN_00048b40();\n  }\n  uVar3 = *(ushort *)(*(int *)(param_1 + 4) + 0x16);\n  if (-1 < param_2) {\n    *(ushort *)(*(int *)(param_1 + 4) + 0x16) = uVar3 & 0xfff3;\n    puVar1 = (ushort *)(*(int *)(param_1 + 4) + 0x16);\n    *puVar1 = *puVar1 | (ushort)(param_2 << 2);\n    uVar3 = *(ushort *)(*(int *)(param_1 + 4) + 0x16);\n  }\n  iVar4 = (int)(uVar3 & 0xc) >> 2;\n  if (*(char *)(param_1 + 9) != '\0') {\n    piVar2 = (int *)(param_1 + 0xc);\n    *piVar2 = *piVar2 + -1;\n    if (*piVar2 == 0) {\n      FUN_00048bd0();\n      return iVar4;\n    }\n  }\n  return iVar4;\n}\n\n" (function_definition "int __regparm3 FUN_00048ce0(int param_1,int param_2)\n\n{\n  ushort *puVar1;\n  int *piVar2;\n  ushort uVar3;\n  int iVar4;\n  \n  if (param_1 == 0) {\n    return 0;\n  }\n  if (*(char *)(param_1 + 9) != '\0') {\n    FUN_00048b40();\n  }\n  uVar3 = *(ushort *)(*(int *)(param_1 + 4) + 0x16);\n  if (-1 < param_2) {\n    *(ushort *)(*(int *)(param_1 + 4) + 0x16) = uVar3 & 0xfff3;\n    puVar1 = (ushort *)(*(int *)(param_1 + 4) + 0x16);\n    *puVar1 = *puVar1 | (ushort)(param_2 << 2);\n    uVar3 = *(ushort *)(*(int *)(param_1 + 4) + 0x16);\n  }\n  iVar4 = (int)(uVar3 & 0xc) >> 2;\n  if (*(char *)(param_1 + 9) != '\0') {\n    piVar2 = (int *)(param_1 + 0xc);\n    *piVar2 = *piVar2 + -1;\n    if (*piVar2 == 0) {\n      FUN_00048bd0();\n      return iVar4;\n    }\n  }\n  return iVar4;\n}" primitive_type (ERROR "__regparm3" identifier) (function_declarator "FUN_00048ce0(int param_1,int param_2)" identifier (parameter_list "(int param_1,int param_2)" ( (parameter_declaration "int param_1" primitive_type identifier) , (parameter_declaration "int param_2" primitive_type identifier) ))) (compound_statement "{\n  ushort *puVar1;\n  int *piVar2;\n  ushort uVar3;\n  int iVar4;\n  \n  if (param_1 == 0) {\n    return 0;\n  }\n  if (*(char *)(param_1 + 9) != '\0') {\n    FUN_00048b40();\n  }\n  uVar3 = *(ushort *)(*(int *)(param_1 + 4) + 0x16);\n  if (-1 < param_2) {\n    *(ushort *)(*(int *)(param_1 + 4) + 0x16) = uVar3 & 0xfff3;\n    puVar1 = (ushort *)(*(int *)(param_1 + 4) + 0x16);\n    *puVar1 = *puVar1 | (ushort)(param_2 << 2);\n    uVar3 = *(ushort *)(*(int *)(param_1 + 4) + 0x16);\n  }\n  iVar4 = (int)(uVar3 & 0xc) >> 2;\n  if (*(char *)(param_1 + 9) != '\0') {\n    piVar2 = (int *)(param_1 + 0xc);\n    *piVar2 = *piVar2 + -1;\n    if (*piVar2 == 0) {\n      FUN_00048bd0();\n      return iVar4;\n    }\n  }\n  return iVar4;\n}" { (declaration "ushort *puVar1;" type_identifier (pointer_declarator "*puVar1" * identifier) ;) (declaration "int *piVar2;" primitive_type (pointer_declarator "*piVar2" * identifier) ;) (declaration "ushort uVar3;" type_identifier identifier ;) (declaration "int iVar4;" primitive_type identifier ;) (if_statement "if (param_1 == 0) {\n    return 0;\n  }" if (parenthesized_expression "(param_1 == 0)" ( (binary_expression "param_1 == 0" identifier == number_literal) )) (compound_statement "{\n    return 0;\n  }" { (return_statement "return 0;" return number_literal ;) })) (if_statement "if (*(char *)(param_1 + 9) != '\0') {\n    FUN_00048b40();\n  }" if (parenthesized_expression "(*(char *)(param_1 + 9) != '\0')" ( (binary_expression "*(char *)(param_1 + 9) != '\0'" (pointer_expression "*(char *)(param_1 + 9)" * (cast_expression "(char *)(param_1 + 9)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 9)" ( (binary_expression "param_1 + 9" identifier + number_literal) )))) != (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\n    FUN_00048b40();\n  }" { (expression_statement "FUN_00048b40();" (call_expression "FUN_00048b40()" identifier (argument_list "()" ( ))) ;) })) (expression_statement "uVar3 = *(ushort *)(*(int *)(param_1 + 4) + 0x16);" (assignment_expression "uVar3 = *(ushort *)(*(int *)(param_1 + 4) + 0x16)" identifier = (pointer_expression "*(ushort *)(*(int *)(param_1 + 4) + 0x16)" * (cast_expression "(ushort *)(*(int *)(param_1 + 4) + 0x16)" ( (type_descriptor "ushort *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*(int *)(param_1 + 4) + 0x16)" ( (binary_expression "*(int *)(param_1 + 4) + 0x16" (pointer_expression "*(int *)(param_1 + 4)" * (cast_expression "(int *)(param_1 + 4)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 4)" ( (binary_expression "param_1 + 4" identifier + number_literal) )))) + number_literal) ))))) ;) (if_statement "if (-1 < param_2) {\n    *(ushort *)(*(int *)(param_1 + 4) + 0x16) = uVar3 & 0xfff3;\n    puVar1 = (ushort *)(*(int *)(param_1 + 4) + 0x16);\n    *puVar1 = *puVar1 | (ushort)(param_2 << 2);\n    uVar3 = *(ushort *)(*(int *)(param_1 + 4) + 0x16);\n  }" if (parenthesized_expression "(-1 < param_2)" ( (binary_expression "-1 < param_2" number_literal < identifier) )) (compound_statement "{\n    *(ushort *)(*(int *)(param_1 + 4) + 0x16) = uVar3 & 0xfff3;\n    puVar1 = (ushort *)(*(int *)(param_1 + 4) + 0x16);\n    *puVar1 = *puVar1 | (ushort)(param_2 << 2);\n    uVar3 = *(ushort *)(*(int *)(param_1 + 4) + 0x16);\n  }" { (expression_statement "*(ushort *)(*(int *)(param_1 + 4) + 0x16) = uVar3 & 0xfff3;" (assignment_expression "*(ushort *)(*(int *)(param_1 + 4) + 0x16) = uVar3 & 0xfff3" (pointer_expression "*(ushort *)(*(int *)(param_1 + 4) + 0x16)" * (cast_expression "(ushort *)(*(int *)(param_1 + 4) + 0x16)" ( (type_descriptor "ushort *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*(int *)(param_1 + 4) + 0x16)" ( (binary_expression "*(int *)(param_1 + 4) + 0x16" (pointer_expression "*(int *)(param_1 + 4)" * (cast_expression "(int *)(param_1 + 4)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 4)" ( (binary_expression "param_1 + 4" identifier + number_literal) )))) + number_literal) )))) = (binary_expression "uVar3 & 0xfff3" identifier & number_literal)) ;) (expression_statement "puVar1 = (ushort *)(*(int *)(param_1 + 4) + 0x16);" (assignment_expression "puVar1 = (ushort *)(*(int *)(param_1 + 4) + 0x16)" identifier = (cast_expression "(ushort *)(*(int *)(param_1 + 4) + 0x16)" ( (type_descriptor "ushort *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*(int *)(param_1 + 4) + 0x16)" ( (binary_expression "*(int *)(param_1 + 4) + 0x16" (pointer_expression "*(int *)(param_1 + 4)" * (cast_expression "(int *)(param_1 + 4)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 4)" ( (binary_expression "param_1 + 4" identifier + number_literal) )))) + number_literal) )))) ;) (expression_statement "*puVar1 = *puVar1 | (ushort)(param_2 << 2);" (assignment_expression "*puVar1 = *puVar1 | (ushort)(param_2 << 2)" (pointer_expression "*puVar1" * identifier) = (binary_expression "*puVar1 | (ushort)(param_2 << 2)" (pointer_expression "*puVar1" * identifier) | (call_expression "(ushort)(param_2 << 2)" (parenthesized_expression "(ushort)" ( identifier )) (argument_list "(param_2 << 2)" ( (binary_expression "param_2 << 2" identifier << number_literal) ))))) ;) (expression_statement "uVar3 = *(ushort *)(*(int *)(param_1 + 4) + 0x16);" (assignment_expression "uVar3 = *(ushort *)(*(int *)(param_1 + 4) + 0x16)" identifier = (pointer_expression "*(ushort *)(*(int *)(param_1 + 4) + 0x16)" * (cast_expression "(ushort *)(*(int *)(param_1 + 4) + 0x16)" ( (type_descriptor "ushort *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*(int *)(param_1 + 4) + 0x16)" ( (binary_expression "*(int *)(param_1 + 4) + 0x16" (pointer_expression "*(int *)(param_1 + 4)" * (cast_expression "(int *)(param_1 + 4)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 4)" ( (binary_expression "param_1 + 4" identifier + number_literal) )))) + number_literal) ))))) ;) })) (expression_statement "iVar4 = (int)(uVar3 & 0xc) >> 2;" (assignment_expression "iVar4 = (int)(uVar3 & 0xc) >> 2" identifier = (binary_expression "(int)(uVar3 & 0xc) >> 2" (cast_expression "(int)(uVar3 & 0xc)" ( (type_descriptor "int" primitive_type) ) (parenthesized_expression "(uVar3 & 0xc)" ( (binary_expression "uVar3 & 0xc" identifier & number_literal) ))) >> number_literal)) ;) (if_statement "if (*(char *)(param_1 + 9) != '\0') {\n    piVar2 = (int *)(param_1 + 0xc);\n    *piVar2 = *piVar2 + -1;\n    if (*piVar2 == 0) {\n      FUN_00048bd0();\n      return iVar4;\n    }\n  }" if (parenthesized_expression "(*(char *)(param_1 + 9) != '\0')" ( (binary_expression "*(char *)(param_1 + 9) != '\0'" (pointer_expression "*(char *)(param_1 + 9)" * (cast_expression "(char *)(param_1 + 9)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 9)" ( (binary_expression "param_1 + 9" identifier + number_literal) )))) != (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\n    piVar2 = (int *)(param_1 + 0xc);\n    *piVar2 = *piVar2 + -1;\n    if (*piVar2 == 0) {\n      FUN_00048bd0();\n      return iVar4;\n    }\n  }" { (expression_statement "piVar2 = (int *)(param_1 + 0xc);" (assignment_expression "piVar2 = (int *)(param_1 + 0xc)" identifier = (cast_expression "(int *)(param_1 + 0xc)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0xc)" ( (binary_expression "param_1 + 0xc" identifier + number_literal) )))) ;) (expression_statement "*piVar2 = *piVar2 + -1;" (assignment_expression "*piVar2 = *piVar2 + -1" (pointer_expression "*piVar2" * identifier) = (binary_expression "*piVar2 + -1" (pointer_expression "*piVar2" * identifier) + number_literal)) ;) (if_statement "if (*piVar2 == 0) {\n      FUN_00048bd0();\n      return iVar4;\n    }" if (parenthesized_expression "(*piVar2 == 0)" ( (binary_expression "*piVar2 == 0" (pointer_expression "*piVar2" * identifier) == number_literal) )) (compound_statement "{\n      FUN_00048bd0();\n      return iVar4;\n    }" { (expression_statement "FUN_00048bd0();" (call_expression "FUN_00048bd0()" identifier (argument_list "()" ( ))) ;) (return_statement "return iVar4;" return identifier ;) })) })) (return_statement "return iVar4;" return identifier ;) })))
(translation_unit "int __regparm3 sqlite3BtreeSecureDelete(Btree *p,int newFlag)\n\n{\n  u16 *puVar1;\n  int *piVar2;\n  ushort uVar3;\n  int iVar4;\n  \n  if (p == (Btree *)0x0) {\n    return 0;\n  }\n  if (p->sharable != '\0') {\n    sqlite3BtreeEnter(p);\n  }\n  uVar3 = p->pBt->btsFlags;\n  if (-1 < newFlag) {\n    p->pBt->btsFlags = uVar3 & 0xfff3;\n    puVar1 = &p->pBt->btsFlags;\n    *puVar1 = *puVar1 | (ushort)(newFlag << 2);\n    uVar3 = p->pBt->btsFlags;\n  }\n  iVar4 = (int)(uVar3 & 0xc) >> 2;\n  if (p->sharable != '\0') {\n    piVar2 = &p->wantToLock;\n    *piVar2 = *piVar2 + -1;\n    if (*piVar2 == 0) {\n      sqlite3BtreeLeave(p);\n      return iVar4;\n    }\n  }\n  return iVar4;\n}\n\n" (function_definition "int __regparm3 sqlite3BtreeSecureDelete(Btree *p,int newFlag)\n\n{\n  u16 *puVar1;\n  int *piVar2;\n  ushort uVar3;\n  int iVar4;\n  \n  if (p == (Btree *)0x0) {\n    return 0;\n  }\n  if (p->sharable != '\0') {\n    sqlite3BtreeEnter(p);\n  }\n  uVar3 = p->pBt->btsFlags;\n  if (-1 < newFlag) {\n    p->pBt->btsFlags = uVar3 & 0xfff3;\n    puVar1 = &p->pBt->btsFlags;\n    *puVar1 = *puVar1 | (ushort)(newFlag << 2);\n    uVar3 = p->pBt->btsFlags;\n  }\n  iVar4 = (int)(uVar3 & 0xc) >> 2;\n  if (p->sharable != '\0') {\n    piVar2 = &p->wantToLock;\n    *piVar2 = *piVar2 + -1;\n    if (*piVar2 == 0) {\n      sqlite3BtreeLeave(p);\n      return iVar4;\n    }\n  }\n  return iVar4;\n}" primitive_type (ERROR "__regparm3" identifier) (function_declarator "sqlite3BtreeSecureDelete(Btree *p,int newFlag)" identifier (parameter_list "(Btree *p,int newFlag)" ( (parameter_declaration "Btree *p" type_identifier (pointer_declarator "*p" * identifier)) , (parameter_declaration "int newFlag" primitive_type identifier) ))) (compound_statement "{\n  u16 *puVar1;\n  int *piVar2;\n  ushort uVar3;\n  int iVar4;\n  \n  if (p == (Btree *)0x0) {\n    return 0;\n  }\n  if (p->sharable != '\0') {\n    sqlite3BtreeEnter(p);\n  }\n  uVar3 = p->pBt->btsFlags;\n  if (-1 < newFlag) {\n    p->pBt->btsFlags = uVar3 & 0xfff3;\n    puVar1 = &p->pBt->btsFlags;\n    *puVar1 = *puVar1 | (ushort)(newFlag << 2);\n    uVar3 = p->pBt->btsFlags;\n  }\n  iVar4 = (int)(uVar3 & 0xc) >> 2;\n  if (p->sharable != '\0') {\n    piVar2 = &p->wantToLock;\n    *piVar2 = *piVar2 + -1;\n    if (*piVar2 == 0) {\n      sqlite3BtreeLeave(p);\n      return iVar4;\n    }\n  }\n  return iVar4;\n}" { (declaration "u16 *puVar1;" type_identifier (pointer_declarator "*puVar1" * identifier) ;) (declaration "int *piVar2;" primitive_type (pointer_declarator "*piVar2" * identifier) ;) (declaration "ushort uVar3;" type_identifier identifier ;) (declaration "int iVar4;" primitive_type identifier ;) (if_statement "if (p == (Btree *)0x0) {\n    return 0;\n  }" if (parenthesized_expression "(p == (Btree *)0x0)" ( (binary_expression "p == (Btree *)0x0" identifier == (cast_expression "(Btree *)0x0" ( (type_descriptor "Btree *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    return 0;\n  }" { (return_statement "return 0;" return number_literal ;) })) (if_statement "if (p->sharable != '\0') {\n    sqlite3BtreeEnter(p);\n  }" if (parenthesized_expression "(p->sharable != '\0')" ( (binary_expression "p->sharable != '\0'" (field_expression "p->sharable" identifier -> field_identifier) != (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\n    sqlite3BtreeEnter(p);\n  }" { (expression_statement "sqlite3BtreeEnter(p);" (call_expression "sqlite3BtreeEnter(p)" identifier (argument_list "(p)" ( identifier ))) ;) })) (expression_statement "uVar3 = p->pBt->btsFlags;" (assignment_expression "uVar3 = p->pBt->btsFlags" identifier = (field_expression "p->pBt->btsFlags" (field_expression "p->pBt" identifier -> field_identifier) -> field_identifier)) ;) (if_statement "if (-1 < newFlag) {\n    p->pBt->btsFlags = uVar3 & 0xfff3;\n    puVar1 = &p->pBt->btsFlags;\n    *puVar1 = *puVar1 | (ushort)(newFlag << 2);\n    uVar3 = p->pBt->btsFlags;\n  }" if (parenthesized_expression "(-1 < newFlag)" ( (binary_expression "-1 < newFlag" number_literal < identifier) )) (compound_statement "{\n    p->pBt->btsFlags = uVar3 & 0xfff3;\n    puVar1 = &p->pBt->btsFlags;\n    *puVar1 = *puVar1 | (ushort)(newFlag << 2);\n    uVar3 = p->pBt->btsFlags;\n  }" { (expression_statement "p->pBt->btsFlags = uVar3 & 0xfff3;" (assignment_expression "p->pBt->btsFlags = uVar3 & 0xfff3" (field_expression "p->pBt->btsFlags" (field_expression "p->pBt" identifier -> field_identifier) -> field_identifier) = (binary_expression "uVar3 & 0xfff3" identifier & number_literal)) ;) (expression_statement "puVar1 = &p->pBt->btsFlags;" (assignment_expression "puVar1 = &p->pBt->btsFlags" identifier = (pointer_expression "&p->pBt->btsFlags" & (field_expression "p->pBt->btsFlags" (field_expression "p->pBt" identifier -> field_identifier) -> field_identifier))) ;) (expression_statement "*puVar1 = *puVar1 | (ushort)(newFlag << 2);" (assignment_expression "*puVar1 = *puVar1 | (ushort)(newFlag << 2)" (pointer_expression "*puVar1" * identifier) = (binary_expression "*puVar1 | (ushort)(newFlag << 2)" (pointer_expression "*puVar1" * identifier) | (call_expression "(ushort)(newFlag << 2)" (parenthesized_expression "(ushort)" ( identifier )) (argument_list "(newFlag << 2)" ( (binary_expression "newFlag << 2" identifier << number_literal) ))))) ;) (expression_statement "uVar3 = p->pBt->btsFlags;" (assignment_expression "uVar3 = p->pBt->btsFlags" identifier = (field_expression "p->pBt->btsFlags" (field_expression "p->pBt" identifier -> field_identifier) -> field_identifier)) ;) })) (expression_statement "iVar4 = (int)(uVar3 & 0xc) >> 2;" (assignment_expression "iVar4 = (int)(uVar3 & 0xc) >> 2" identifier = (binary_expression "(int)(uVar3 & 0xc) >> 2" (cast_expression "(int)(uVar3 & 0xc)" ( (type_descriptor "int" primitive_type) ) (parenthesized_expression "(uVar3 & 0xc)" ( (binary_expression "uVar3 & 0xc" identifier & number_literal) ))) >> number_literal)) ;) (if_statement "if (p->sharable != '\0') {\n    piVar2 = &p->wantToLock;\n    *piVar2 = *piVar2 + -1;\n    if (*piVar2 == 0) {\n      sqlite3BtreeLeave(p);\n      return iVar4;\n    }\n  }" if (parenthesized_expression "(p->sharable != '\0')" ( (binary_expression "p->sharable != '\0'" (field_expression "p->sharable" identifier -> field_identifier) != (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\n    piVar2 = &p->wantToLock;\n    *piVar2 = *piVar2 + -1;\n    if (*piVar2 == 0) {\n      sqlite3BtreeLeave(p);\n      return iVar4;\n    }\n  }" { (expression_statement "piVar2 = &p->wantToLock;" (assignment_expression "piVar2 = &p->wantToLock" identifier = (pointer_expression "&p->wantToLock" & (field_expression "p->wantToLock" identifier -> field_identifier))) ;) (expression_statement "*piVar2 = *piVar2 + -1;" (assignment_expression "*piVar2 = *piVar2 + -1" (pointer_expression "*piVar2" * identifier) = (binary_expression "*piVar2 + -1" (pointer_expression "*piVar2" * identifier) + number_literal)) ;) (if_statement "if (*piVar2 == 0) {\n      sqlite3BtreeLeave(p);\n      return iVar4;\n    }" if (parenthesized_expression "(*piVar2 == 0)" ( (binary_expression "*piVar2 == 0" (pointer_expression "*piVar2" * identifier) == number_literal) )) (compound_statement "{\n      sqlite3BtreeLeave(p);\n      return iVar4;\n    }" { (expression_statement "sqlite3BtreeLeave(p);" (call_expression "sqlite3BtreeLeave(p)" identifier (argument_list "(p)" ( identifier ))) ;) (return_statement "return iVar4;" return identifier ;) })) })) (return_statement "return iVar4;" return identifier ;) })))
(translation_unit "int __regparm3 FUN_00048ce0(int param_1,int param_2)\n\n{\n  ushort *puVar1;\n  int *piVar2;\n  ushort uVar3;\n  int iVar4;\n  \n  if (param_1 == 0) {\n    return 0;\n  }\n  if (*(char *)(param_1 + 9) != '\0') {\n    FUN_00048b40();\n  }\n  uVar3 = *(ushort *)(*(int *)(param_1 + 4) + 0x16);\n  if (-1 < param_2) {\n    *(ushort *)(*(int *)(param_1 + 4) + 0x16) = uVar3 & 0xfff3;\n    puVar1 = (ushort *)(*(int *)(param_1 + 4) + 0x16);\n    *puVar1 = *puVar1 | (ushort)(param_2 << 2);\n    uVar3 = *(ushort *)(*(int *)(param_1 + 4) + 0x16);\n  }\n  iVar4 = (int)(uVar3 & 0xc) >> 2;\n  if (*(char *)(param_1 + 9) != '\0') {\n    piVar2 = (int *)(param_1 + 0xc);\n    *piVar2 = *piVar2 + -1;\n    if (*piVar2 == 0) {\n      FUN_00048bd0();\n      return iVar4;\n    }\n  }\n  return iVar4;\n}\n\n" (function_definition "int __regparm3 FUN_00048ce0(int param_1,int param_2)\n\n{\n  ushort *puVar1;\n  int *piVar2;\n  ushort uVar3;\n  int iVar4;\n  \n  if (param_1 == 0) {\n    return 0;\n  }\n  if (*(char *)(param_1 + 9) != '\0') {\n    FUN_00048b40();\n  }\n  uVar3 = *(ushort *)(*(int *)(param_1 + 4) + 0x16);\n  if (-1 < param_2) {\n    *(ushort *)(*(int *)(param_1 + 4) + 0x16) = uVar3 & 0xfff3;\n    puVar1 = (ushort *)(*(int *)(param_1 + 4) + 0x16);\n    *puVar1 = *puVar1 | (ushort)(param_2 << 2);\n    uVar3 = *(ushort *)(*(int *)(param_1 + 4) + 0x16);\n  }\n  iVar4 = (int)(uVar3 & 0xc) >> 2;\n  if (*(char *)(param_1 + 9) != '\0') {\n    piVar2 = (int *)(param_1 + 0xc);\n    *piVar2 = *piVar2 + -1;\n    if (*piVar2 == 0) {\n      FUN_00048bd0();\n      return iVar4;\n    }\n  }\n  return iVar4;\n}" primitive_type (ERROR "__regparm3" identifier) (function_declarator "FUN_00048ce0(int param_1,int param_2)" identifier (parameter_list "(int param_1,int param_2)" ( (parameter_declaration "int param_1" primitive_type identifier) , (parameter_declaration "int param_2" primitive_type identifier) ))) (compound_statement "{\n  ushort *puVar1;\n  int *piVar2;\n  ushort uVar3;\n  int iVar4;\n  \n  if (param_1 == 0) {\n    return 0;\n  }\n  if (*(char *)(param_1 + 9) != '\0') {\n    FUN_00048b40();\n  }\n  uVar3 = *(ushort *)(*(int *)(param_1 + 4) + 0x16);\n  if (-1 < param_2) {\n    *(ushort *)(*(int *)(param_1 + 4) + 0x16) = uVar3 & 0xfff3;\n    puVar1 = (ushort *)(*(int *)(param_1 + 4) + 0x16);\n    *puVar1 = *puVar1 | (ushort)(param_2 << 2);\n    uVar3 = *(ushort *)(*(int *)(param_1 + 4) + 0x16);\n  }\n  iVar4 = (int)(uVar3 & 0xc) >> 2;\n  if (*(char *)(param_1 + 9) != '\0') {\n    piVar2 = (int *)(param_1 + 0xc);\n    *piVar2 = *piVar2 + -1;\n    if (*piVar2 == 0) {\n      FUN_00048bd0();\n      return iVar4;\n    }\n  }\n  return iVar4;\n}" { (declaration "ushort *puVar1;" type_identifier (pointer_declarator "*puVar1" * identifier) ;) (declaration "int *piVar2;" primitive_type (pointer_declarator "*piVar2" * identifier) ;) (declaration "ushort uVar3;" type_identifier identifier ;) (declaration "int iVar4;" primitive_type identifier ;) (if_statement "if (param_1 == 0) {\n    return 0;\n  }" if (parenthesized_expression "(param_1 == 0)" ( (binary_expression "param_1 == 0" identifier == number_literal) )) (compound_statement "{\n    return 0;\n  }" { (return_statement "return 0;" return number_literal ;) })) (if_statement "if (*(char *)(param_1 + 9) != '\0') {\n    FUN_00048b40();\n  }" if (parenthesized_expression "(*(char *)(param_1 + 9) != '\0')" ( (binary_expression "*(char *)(param_1 + 9) != '\0'" (pointer_expression "*(char *)(param_1 + 9)" * (cast_expression "(char *)(param_1 + 9)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 9)" ( (binary_expression "param_1 + 9" identifier + number_literal) )))) != (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\n    FUN_00048b40();\n  }" { (expression_statement "FUN_00048b40();" (call_expression "FUN_00048b40()" identifier (argument_list "()" ( ))) ;) })) (expression_statement "uVar3 = *(ushort *)(*(int *)(param_1 + 4) + 0x16);" (assignment_expression "uVar3 = *(ushort *)(*(int *)(param_1 + 4) + 0x16)" identifier = (pointer_expression "*(ushort *)(*(int *)(param_1 + 4) + 0x16)" * (cast_expression "(ushort *)(*(int *)(param_1 + 4) + 0x16)" ( (type_descriptor "ushort *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*(int *)(param_1 + 4) + 0x16)" ( (binary_expression "*(int *)(param_1 + 4) + 0x16" (pointer_expression "*(int *)(param_1 + 4)" * (cast_expression "(int *)(param_1 + 4)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 4)" ( (binary_expression "param_1 + 4" identifier + number_literal) )))) + number_literal) ))))) ;) (if_statement "if (-1 < param_2) {\n    *(ushort *)(*(int *)(param_1 + 4) + 0x16) = uVar3 & 0xfff3;\n    puVar1 = (ushort *)(*(int *)(param_1 + 4) + 0x16);\n    *puVar1 = *puVar1 | (ushort)(param_2 << 2);\n    uVar3 = *(ushort *)(*(int *)(param_1 + 4) + 0x16);\n  }" if (parenthesized_expression "(-1 < param_2)" ( (binary_expression "-1 < param_2" number_literal < identifier) )) (compound_statement "{\n    *(ushort *)(*(int *)(param_1 + 4) + 0x16) = uVar3 & 0xfff3;\n    puVar1 = (ushort *)(*(int *)(param_1 + 4) + 0x16);\n    *puVar1 = *puVar1 | (ushort)(param_2 << 2);\n    uVar3 = *(ushort *)(*(int *)(param_1 + 4) + 0x16);\n  }" { (expression_statement "*(ushort *)(*(int *)(param_1 + 4) + 0x16) = uVar3 & 0xfff3;" (assignment_expression "*(ushort *)(*(int *)(param_1 + 4) + 0x16) = uVar3 & 0xfff3" (pointer_expression "*(ushort *)(*(int *)(param_1 + 4) + 0x16)" * (cast_expression "(ushort *)(*(int *)(param_1 + 4) + 0x16)" ( (type_descriptor "ushort *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*(int *)(param_1 + 4) + 0x16)" ( (binary_expression "*(int *)(param_1 + 4) + 0x16" (pointer_expression "*(int *)(param_1 + 4)" * (cast_expression "(int *)(param_1 + 4)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 4)" ( (binary_expression "param_1 + 4" identifier + number_literal) )))) + number_literal) )))) = (binary_expression "uVar3 & 0xfff3" identifier & number_literal)) ;) (expression_statement "puVar1 = (ushort *)(*(int *)(param_1 + 4) + 0x16);" (assignment_expression "puVar1 = (ushort *)(*(int *)(param_1 + 4) + 0x16)" identifier = (cast_expression "(ushort *)(*(int *)(param_1 + 4) + 0x16)" ( (type_descriptor "ushort *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*(int *)(param_1 + 4) + 0x16)" ( (binary_expression "*(int *)(param_1 + 4) + 0x16" (pointer_expression "*(int *)(param_1 + 4)" * (cast_expression "(int *)(param_1 + 4)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 4)" ( (binary_expression "param_1 + 4" identifier + number_literal) )))) + number_literal) )))) ;) (expression_statement "*puVar1 = *puVar1 | (ushort)(param_2 << 2);" (assignment_expression "*puVar1 = *puVar1 | (ushort)(param_2 << 2)" (pointer_expression "*puVar1" * identifier) = (binary_expression "*puVar1 | (ushort)(param_2 << 2)" (pointer_expression "*puVar1" * identifier) | (call_expression "(ushort)(param_2 << 2)" (parenthesized_expression "(ushort)" ( identifier )) (argument_list "(param_2 << 2)" ( (binary_expression "param_2 << 2" identifier << number_literal) ))))) ;) (expression_statement "uVar3 = *(ushort *)(*(int *)(param_1 + 4) + 0x16);" (assignment_expression "uVar3 = *(ushort *)(*(int *)(param_1 + 4) + 0x16)" identifier = (pointer_expression "*(ushort *)(*(int *)(param_1 + 4) + 0x16)" * (cast_expression "(ushort *)(*(int *)(param_1 + 4) + 0x16)" ( (type_descriptor "ushort *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*(int *)(param_1 + 4) + 0x16)" ( (binary_expression "*(int *)(param_1 + 4) + 0x16" (pointer_expression "*(int *)(param_1 + 4)" * (cast_expression "(int *)(param_1 + 4)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 4)" ( (binary_expression "param_1 + 4" identifier + number_literal) )))) + number_literal) ))))) ;) })) (expression_statement "iVar4 = (int)(uVar3 & 0xc) >> 2;" (assignment_expression "iVar4 = (int)(uVar3 & 0xc) >> 2" identifier = (binary_expression "(int)(uVar3 & 0xc) >> 2" (cast_expression "(int)(uVar3 & 0xc)" ( (type_descriptor "int" primitive_type) ) (parenthesized_expression "(uVar3 & 0xc)" ( (binary_expression "uVar3 & 0xc" identifier & number_literal) ))) >> number_literal)) ;) (if_statement "if (*(char *)(param_1 + 9) != '\0') {\n    piVar2 = (int *)(param_1 + 0xc);\n    *piVar2 = *piVar2 + -1;\n    if (*piVar2 == 0) {\n      FUN_00048bd0();\n      return iVar4;\n    }\n  }" if (parenthesized_expression "(*(char *)(param_1 + 9) != '\0')" ( (binary_expression "*(char *)(param_1 + 9) != '\0'" (pointer_expression "*(char *)(param_1 + 9)" * (cast_expression "(char *)(param_1 + 9)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 9)" ( (binary_expression "param_1 + 9" identifier + number_literal) )))) != (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\n    piVar2 = (int *)(param_1 + 0xc);\n    *piVar2 = *piVar2 + -1;\n    if (*piVar2 == 0) {\n      FUN_00048bd0();\n      return iVar4;\n    }\n  }" { (expression_statement "piVar2 = (int *)(param_1 + 0xc);" (assignment_expression "piVar2 = (int *)(param_1 + 0xc)" identifier = (cast_expression "(int *)(param_1 + 0xc)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0xc)" ( (binary_expression "param_1 + 0xc" identifier + number_literal) )))) ;) (expression_statement "*piVar2 = *piVar2 + -1;" (assignment_expression "*piVar2 = *piVar2 + -1" (pointer_expression "*piVar2" * identifier) = (binary_expression "*piVar2 + -1" (pointer_expression "*piVar2" * identifier) + number_literal)) ;) (if_statement "if (*piVar2 == 0) {\n      FUN_00048bd0();\n      return iVar4;\n    }" if (parenthesized_expression "(*piVar2 == 0)" ( (binary_expression "*piVar2 == 0" (pointer_expression "*piVar2" * identifier) == number_literal) )) (compound_statement "{\n      FUN_00048bd0();\n      return iVar4;\n    }" { (expression_statement "FUN_00048bd0();" (call_expression "FUN_00048bd0()" identifier (argument_list "()" ( ))) ;) (return_statement "return iVar4;" return identifier ;) })) })) (return_statement "return iVar4;" return identifier ;) })))
(translation_unit (function_definition TYPE (ERROR IDENT) (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (return_statement return 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 (call_expression IDENT (argument_list ( ))) ;) })) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) + LIT) ))))) ;) (if_statement if (parenthesized_expression ( (binary_expression LIT < IDENT) )) (compound_statement { (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) + LIT) )))) = (binary_expression IDENT & LIT)) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) + LIT) )))) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = (binary_expression (pointer_expression * IDENT) | (call_expression (parenthesized_expression ( IDENT )) (argument_list ( (binary_expression IDENT << LIT) ))))) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) + LIT) ))))) ;) })) (expression_statement (assignment_expression IDENT = (binary_expression (cast_expression ( (type_descriptor TYPE) ) (parenthesized_expression ( (binary_expression IDENT & LIT) ))) >> LIT)) ;) (if_statement if (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) != (char_literal ' escape_sequence ')) )) (compound_statement { (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = (binary_expression (pointer_expression * IDENT) + LIT)) ;) (if_statement if (parenthesized_expression ( (binary_expression (pointer_expression * IDENT) == LIT) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( ))) ;) (return_statement return IDENT ;) })) })) (return_statement return IDENT ;) })))
(function_definition "int __regparm3 FUN_00048ce0(int param_1,int param_2)\n\n{\n  ushort *puVar1;\n  int *piVar2;\n  ushort uVar3;\n  int iVar4;\n  \n  if (param_1 == 0) {\n    return 0;\n  }\n  if (*(char *)(param_1 + 9) != '\0') {\n    FUN_00048b40();\n  }\n  uVar3 = *(ushort *)(*(int *)(param_1 + 4) + 0x16);\n  if (-1 < param_2) {\n    *(ushort *)(*(int *)(param_1 + 4) + 0x16) = uVar3 & 0xfff3;\n    puVar1 = (ushort *)(*(int *)(param_1 + 4) + 0x16);\n    *puVar1 = *puVar1 | (ushort)(param_2 << 2);\n    uVar3 = *(ushort *)(*(int *)(param_1 + 4) + 0x16);\n  }\n  iVar4 = (int)(uVar3 & 0xc) >> 2;\n  if (*(char *)(param_1 + 9) != '\0') {\n    piVar2 = (int *)(param_1 + 0xc);\n    *piVar2 = *piVar2 + -1;\n    if (*piVar2 == 0) {\n      FUN_00048bd0();\n      return iVar4;\n    }\n  }\n  return iVar4;\n}" (primitive_type "int") (ERROR "__regparm3" (identifier "__regparm3")) (function_declarator "FUN_00048ce0(int param_1,int param_2)" (identifier "FUN_00048ce0") (parameter_list "(int param_1,int param_2)" (( "(") (parameter_declaration "int param_1" (primitive_type "int") (identifier "param_1")) (, ",") (parameter_declaration "int param_2" (primitive_type "int") (identifier "param_2")) () ")"))) (compound_statement "{\n  ushort *puVar1;\n  int *piVar2;\n  ushort uVar3;\n  int iVar4;\n  \n  if (param_1 == 0) {\n    return 0;\n  }\n  if (*(char *)(param_1 + 9) != '\0') {\n    FUN_00048b40();\n  }\n  uVar3 = *(ushort *)(*(int *)(param_1 + 4) + 0x16);\n  if (-1 < param_2) {\n    *(ushort *)(*(int *)(param_1 + 4) + 0x16) = uVar3 & 0xfff3;\n    puVar1 = (ushort *)(*(int *)(param_1 + 4) + 0x16);\n    *puVar1 = *puVar1 | (ushort)(param_2 << 2);\n    uVar3 = *(ushort *)(*(int *)(param_1 + 4) + 0x16);\n  }\n  iVar4 = (int)(uVar3 & 0xc) >> 2;\n  if (*(char *)(param_1 + 9) != '\0') {\n    piVar2 = (int *)(param_1 + 0xc);\n    *piVar2 = *piVar2 + -1;\n    if (*piVar2 == 0) {\n      FUN_00048bd0();\n      return iVar4;\n    }\n  }\n  return iVar4;\n}" ({ "{") (declaration "ushort *puVar1;" (type_identifier "ushort") (pointer_declarator "*puVar1" (* "*") (identifier "puVar1")) (; ";")) (declaration "int *piVar2;" (primitive_type "int") (pointer_declarator "*piVar2" (* "*") (identifier "piVar2")) (; ";")) (declaration "ushort uVar3;" (type_identifier "ushort") (identifier "uVar3") (; ";")) (declaration "int iVar4;" (primitive_type "int") (identifier "iVar4") (; ";")) (if_statement "if (param_1 == 0) {\n    return 0;\n  }" (if "if") (parenthesized_expression "(param_1 == 0)" (( "(") (binary_expression "param_1 == 0" (identifier "param_1") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n    return 0;\n  }" ({ "{") (return_statement "return 0;" (return "return") (number_literal "0") (; ";")) (} "}"))) (if_statement "if (*(char *)(param_1 + 9) != '\0') {\n    FUN_00048b40();\n  }" (if "if") (parenthesized_expression "(*(char *)(param_1 + 9) != '\0')" (( "(") (binary_expression "*(char *)(param_1 + 9) != '\0'" (pointer_expression "*(char *)(param_1 + 9)" (* "*") (cast_expression "(char *)(param_1 + 9)" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 9)" (( "(") (binary_expression "param_1 + 9" (identifier "param_1") (+ "+") (number_literal "9")) () ")")))) (!= "!=") (char_literal "'\0'" (' "'") (escape_sequence "\0") (' "'"))) () ")")) (compound_statement "{\n    FUN_00048b40();\n  }" ({ "{") (expression_statement "FUN_00048b40();" (call_expression "FUN_00048b40()" (identifier "FUN_00048b40") (argument_list "()" (( "(") () ")"))) (; ";")) (} "}"))) (expression_statement "uVar3 = *(ushort *)(*(int *)(param_1 + 4) + 0x16);" (assignment_expression "uVar3 = *(ushort *)(*(int *)(param_1 + 4) + 0x16)" (identifier "uVar3") (= "=") (pointer_expression "*(ushort *)(*(int *)(param_1 + 4) + 0x16)" (* "*") (cast_expression "(ushort *)(*(int *)(param_1 + 4) + 0x16)" (( "(") (type_descriptor "ushort *" (type_identifier "ushort") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(*(int *)(param_1 + 4) + 0x16)" (( "(") (binary_expression "*(int *)(param_1 + 4) + 0x16" (pointer_expression "*(int *)(param_1 + 4)" (* "*") (cast_expression "(int *)(param_1 + 4)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 4)" (( "(") (binary_expression "param_1 + 4" (identifier "param_1") (+ "+") (number_literal "4")) () ")")))) (+ "+") (number_literal "0x16")) () ")"))))) (; ";")) (if_statement "if (-1 < param_2) {\n    *(ushort *)(*(int *)(param_1 + 4) + 0x16) = uVar3 & 0xfff3;\n    puVar1 = (ushort *)(*(int *)(param_1 + 4) + 0x16);\n    *puVar1 = *puVar1 | (ushort)(param_2 << 2);\n    uVar3 = *(ushort *)(*(int *)(param_1 + 4) + 0x16);\n  }" (if "if") (parenthesized_expression "(-1 < param_2)" (( "(") (binary_expression "-1 < param_2" (number_literal "-1") (< "<") (identifier "param_2")) () ")")) (compound_statement "{\n    *(ushort *)(*(int *)(param_1 + 4) + 0x16) = uVar3 & 0xfff3;\n    puVar1 = (ushort *)(*(int *)(param_1 + 4) + 0x16);\n    *puVar1 = *puVar1 | (ushort)(param_2 << 2);\n    uVar3 = *(ushort *)(*(int *)(param_1 + 4) + 0x16);\n  }" ({ "{") (expression_statement "*(ushort *)(*(int *)(param_1 + 4) + 0x16) = uVar3 & 0xfff3;" (assignment_expression "*(ushort *)(*(int *)(param_1 + 4) + 0x16) = uVar3 & 0xfff3" (pointer_expression "*(ushort *)(*(int *)(param_1 + 4) + 0x16)" (* "*") (cast_expression "(ushort *)(*(int *)(param_1 + 4) + 0x16)" (( "(") (type_descriptor "ushort *" (type_identifier "ushort") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(*(int *)(param_1 + 4) + 0x16)" (( "(") (binary_expression "*(int *)(param_1 + 4) + 0x16" (pointer_expression "*(int *)(param_1 + 4)" (* "*") (cast_expression "(int *)(param_1 + 4)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 4)" (( "(") (binary_expression "param_1 + 4" (identifier "param_1") (+ "+") (number_literal "4")) () ")")))) (+ "+") (number_literal "0x16")) () ")")))) (= "=") (binary_expression "uVar3 & 0xfff3" (identifier "uVar3") (& "&") (number_literal "0xfff3"))) (; ";")) (expression_statement "puVar1 = (ushort *)(*(int *)(param_1 + 4) + 0x16);" (assignment_expression "puVar1 = (ushort *)(*(int *)(param_1 + 4) + 0x16)" (identifier "puVar1") (= "=") (cast_expression "(ushort *)(*(int *)(param_1 + 4) + 0x16)" (( "(") (type_descriptor "ushort *" (type_identifier "ushort") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(*(int *)(param_1 + 4) + 0x16)" (( "(") (binary_expression "*(int *)(param_1 + 4) + 0x16" (pointer_expression "*(int *)(param_1 + 4)" (* "*") (cast_expression "(int *)(param_1 + 4)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 4)" (( "(") (binary_expression "param_1 + 4" (identifier "param_1") (+ "+") (number_literal "4")) () ")")))) (+ "+") (number_literal "0x16")) () ")")))) (; ";")) (expression_statement "*puVar1 = *puVar1 | (ushort)(param_2 << 2);" (assignment_expression "*puVar1 = *puVar1 | (ushort)(param_2 << 2)" (pointer_expression "*puVar1" (* "*") (identifier "puVar1")) (= "=") (binary_expression "*puVar1 | (ushort)(param_2 << 2)" (pointer_expression "*puVar1" (* "*") (identifier "puVar1")) (| "|") (call_expression "(ushort)(param_2 << 2)" (parenthesized_expression "(ushort)" (( "(") (identifier "ushort") () ")")) (argument_list "(param_2 << 2)" (( "(") (binary_expression "param_2 << 2" (identifier "param_2") (<< "<<") (number_literal "2")) () ")"))))) (; ";")) (expression_statement "uVar3 = *(ushort *)(*(int *)(param_1 + 4) + 0x16);" (assignment_expression "uVar3 = *(ushort *)(*(int *)(param_1 + 4) + 0x16)" (identifier "uVar3") (= "=") (pointer_expression "*(ushort *)(*(int *)(param_1 + 4) + 0x16)" (* "*") (cast_expression "(ushort *)(*(int *)(param_1 + 4) + 0x16)" (( "(") (type_descriptor "ushort *" (type_identifier "ushort") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(*(int *)(param_1 + 4) + 0x16)" (( "(") (binary_expression "*(int *)(param_1 + 4) + 0x16" (pointer_expression "*(int *)(param_1 + 4)" (* "*") (cast_expression "(int *)(param_1 + 4)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 4)" (( "(") (binary_expression "param_1 + 4" (identifier "param_1") (+ "+") (number_literal "4")) () ")")))) (+ "+") (number_literal "0x16")) () ")"))))) (; ";")) (} "}"))) (expression_statement "iVar4 = (int)(uVar3 & 0xc) >> 2;" (assignment_expression "iVar4 = (int)(uVar3 & 0xc) >> 2" (identifier "iVar4") (= "=") (binary_expression "(int)(uVar3 & 0xc) >> 2" (cast_expression "(int)(uVar3 & 0xc)" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (parenthesized_expression "(uVar3 & 0xc)" (( "(") (binary_expression "uVar3 & 0xc" (identifier "uVar3") (& "&") (number_literal "0xc")) () ")"))) (>> ">>") (number_literal "2"))) (; ";")) (if_statement "if (*(char *)(param_1 + 9) != '\0') {\n    piVar2 = (int *)(param_1 + 0xc);\n    *piVar2 = *piVar2 + -1;\n    if (*piVar2 == 0) {\n      FUN_00048bd0();\n      return iVar4;\n    }\n  }" (if "if") (parenthesized_expression "(*(char *)(param_1 + 9) != '\0')" (( "(") (binary_expression "*(char *)(param_1 + 9) != '\0'" (pointer_expression "*(char *)(param_1 + 9)" (* "*") (cast_expression "(char *)(param_1 + 9)" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 9)" (( "(") (binary_expression "param_1 + 9" (identifier "param_1") (+ "+") (number_literal "9")) () ")")))) (!= "!=") (char_literal "'\0'" (' "'") (escape_sequence "\0") (' "'"))) () ")")) (compound_statement "{\n    piVar2 = (int *)(param_1 + 0xc);\n    *piVar2 = *piVar2 + -1;\n    if (*piVar2 == 0) {\n      FUN_00048bd0();\n      return iVar4;\n    }\n  }" ({ "{") (expression_statement "piVar2 = (int *)(param_1 + 0xc);" (assignment_expression "piVar2 = (int *)(param_1 + 0xc)" (identifier "piVar2") (= "=") (cast_expression "(int *)(param_1 + 0xc)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0xc)" (( "(") (binary_expression "param_1 + 0xc" (identifier "param_1") (+ "+") (number_literal "0xc")) () ")")))) (; ";")) (expression_statement "*piVar2 = *piVar2 + -1;" (assignment_expression "*piVar2 = *piVar2 + -1" (pointer_expression "*piVar2" (* "*") (identifier "piVar2")) (= "=") (binary_expression "*piVar2 + -1" (pointer_expression "*piVar2" (* "*") (identifier "piVar2")) (+ "+") (number_literal "-1"))) (; ";")) (if_statement "if (*piVar2 == 0) {\n      FUN_00048bd0();\n      return iVar4;\n    }" (if "if") (parenthesized_expression "(*piVar2 == 0)" (( "(") (binary_expression "*piVar2 == 0" (pointer_expression "*piVar2" (* "*") (identifier "piVar2")) (== "==") (number_literal "0")) () ")")) (compound_statement "{\n      FUN_00048bd0();\n      return iVar4;\n    }" ({ "{") (expression_statement "FUN_00048bd0();" (call_expression "FUN_00048bd0()" (identifier "FUN_00048bd0") (argument_list "()" (( "(") () ")"))) (; ";")) (return_statement "return iVar4;" (return "return") (identifier "iVar4") (; ";")) (} "}"))) (} "}"))) (return_statement "return iVar4;" (return "return") (identifier "iVar4") (; ";")) (} "}")))

int __regparm3 function_1(type_1 *var_1,int var_3)

{
  type_2 *puVar1;
  int *piVar2;
  type_3 var_4;
  int iVar4;
  
  if (var_1 == (type_1 *)0x0) {
    return 0;
  }
  if (var_1->sharable != '\0') {
    var_2(var_1);
  }
  var_4 = var_1->pBt->btsFlags;
  if (-1 < var_3) {
    var_1->pBt->btsFlags = var_4 & 0xfff3;
    puVar1 = &var_1->pBt->btsFlags;
    *puVar1 = *puVar1 | (type_3)(var_3 << 2);
    var_4 = var_1->pBt->btsFlags;
  }
  iVar4 = (int)(var_4 & 0xc) >> 2;
  if (var_1->sharable != '\0') {
    piVar2 = &var_1->wantToLock;
    *piVar2 = *piVar2 + -1;
    if (*piVar2 == 0) {
      var_5(var_1);
      return iVar4;
    }
  }
  return iVar4;
}


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

int __regparm3 MASKED(int param_1,int param_2)

{
  ushort *puVar1;
  int *piVar2;
  ushort uVar3;
  int iVar4;
  
  if (param_1 == 0) {
    return 0;
  }
  if (*(char *)(param_1 + 9) != '\0') {
    FUN_00048b40();
  }
  uVar3 = *(ushort *)(*(int *)(param_1 + 4) + 0x16);
  if (-1 < param_2) {
    *(ushort *)(*(int *)(param_1 + 4) + 0x16) = uVar3 & 0xfff3;
    puVar1 = (ushort *)(*(int *)(param_1 + 4) + 0x16);
    *puVar1 = *puVar1 | (ushort)(param_2 << 2);
    uVar3 = *(ushort *)(*(int *)(param_1 + 4) + 0x16);
  }
  iVar4 = (int)(uVar3 & 0xc) >> 2;
  if (*(char *)(param_1 + 9) != '\0') {
    piVar2 = (int *)(param_1 + 0xc);
    *piVar2 = *piVar2 + -1;
    if (*piVar2 == 0) {
      FUN_00048bd0();
      return iVar4;
    }
  }
  return iVar4;
}

