
/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */
/* WARNING: Unknown calling convention */

int i_ring_pop(I_ring *ir)

{
  uint uVar1;
  _Bool _Var2;
  int iVar3;
  
  _Var2 = i_ring_empty(ir);
  if (_Var2) {
                    /* WARNING: Subroutine does not return */
    abort();
  }
  uVar1 = ir->ir_front;
  iVar3 = ir->ir_data[uVar1];
  ir->ir_data[uVar1] = ir->ir_default_val;
  if (uVar1 != ir->ir_back) {
    ir->ir_front = uVar1 + 3 & 3;
    return iVar3;
  }
  ir->ir_empty = true;
  return iVar3;
}



/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */

undefined4 FUN_0001d0f0(int param_1)

{
  undefined4 *puVar1;
  int iVar2;
  char cVar3;
  undefined4 uVar4;
  
  cVar3 = FUN_0001d0a0(param_1);
  if (cVar3 != '\0') {
                    /* WARNING: Subroutine does not return */
    abort();
  }
  iVar2 = *(int *)(param_1 + 0x14);
  puVar1 = (undefined4 *)(param_1 + iVar2 * 4);
  uVar4 = *puVar1;
  *puVar1 = *(undefined4 *)(param_1 + 0x10);
  if (iVar2 != *(int *)(param_1 + 0x18)) {
    *(uint *)(param_1 + 0x14) = iVar2 + 3U & 3;
    return uVar4;
  }
  *(undefined1 *)(param_1 + 0x1c) = 1;
  return uVar4;
}


PUSH ESI
PUSH EBX
CALL 0x00012c10
ADD EBX,0x9f09
SUB ESP,0x10
MOV ESI,dword ptr [ESP + 0x1c]
PUSH ESI
CALL 0x0001d0a0
ADD ESP,0x10
TEST AL,AL
JNZ 0x00012598
MOV EDX,dword ptr [ESI + 0x14]
MOV EBX,dword ptr [ESI + 0x10]
LEA ECX,[ESI + EDX*0x4]
MOV EAX,dword ptr [ECX]
MOV dword ptr [ECX],EBX
CMP EDX,dword ptr [ESI + 0x18]
JZ 0x0001d140
ADD EDX,0x3
AND EDX,0x3
MOV dword ptr [ESI + 0x14],EDX
ADD ESP,0x4
POP EBX
POP ESI
RET
MOV byte ptr [ESI + 0x1c],0x1
ADD ESP,0x4
POP EBX
POP ESI
RET
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nundefined4 FUN_0001d0f0(int param_1)\n\n{\n  undefined4 *puVar1;\n  int iVar2;\n  char cVar3;\n  undefined4 uVar4;\n  \n  cVar3 = FUN_0001d0a0(param_1);\n  if (cVar3 != '\0') {\n                    /* WARNING: Subroutine does not return */\n    abort();\n  }\n  iVar2 = *(int *)(param_1 + 0x14);\n  puVar1 = (undefined4 *)(param_1 + iVar2 * 4);\n  uVar4 = *puVar1;\n  *puVar1 = *(undefined4 *)(param_1 + 0x10);\n  if (iVar2 != *(int *)(param_1 + 0x18)) {\n    *(uint *)(param_1 + 0x14) = iVar2 + 3U & 3;\n    return uVar4;\n  }\n  *(undefined1 *)(param_1 + 0x1c) = 1;\n  return uVar4;\n}\n\n" comment (function_definition "undefined4 FUN_0001d0f0(int param_1)\n\n{\n  undefined4 *puVar1;\n  int iVar2;\n  char cVar3;\n  undefined4 uVar4;\n  \n  cVar3 = FUN_0001d0a0(param_1);\n  if (cVar3 != '\0') {\n                    /* WARNING: Subroutine does not return */\n    abort();\n  }\n  iVar2 = *(int *)(param_1 + 0x14);\n  puVar1 = (undefined4 *)(param_1 + iVar2 * 4);\n  uVar4 = *puVar1;\n  *puVar1 = *(undefined4 *)(param_1 + 0x10);\n  if (iVar2 != *(int *)(param_1 + 0x18)) {\n    *(uint *)(param_1 + 0x14) = iVar2 + 3U & 3;\n    return uVar4;\n  }\n  *(undefined1 *)(param_1 + 0x1c) = 1;\n  return uVar4;\n}" type_identifier (function_declarator "FUN_0001d0f0(int param_1)" identifier (parameter_list "(int param_1)" ( (parameter_declaration "int param_1" primitive_type identifier) ))) (compound_statement "{\n  undefined4 *puVar1;\n  int iVar2;\n  char cVar3;\n  undefined4 uVar4;\n  \n  cVar3 = FUN_0001d0a0(param_1);\n  if (cVar3 != '\0') {\n                    /* WARNING: Subroutine does not return */\n    abort();\n  }\n  iVar2 = *(int *)(param_1 + 0x14);\n  puVar1 = (undefined4 *)(param_1 + iVar2 * 4);\n  uVar4 = *puVar1;\n  *puVar1 = *(undefined4 *)(param_1 + 0x10);\n  if (iVar2 != *(int *)(param_1 + 0x18)) {\n    *(uint *)(param_1 + 0x14) = iVar2 + 3U & 3;\n    return uVar4;\n  }\n  *(undefined1 *)(param_1 + 0x1c) = 1;\n  return uVar4;\n}" { (declaration "undefined4 *puVar1;" type_identifier (pointer_declarator "*puVar1" * identifier) ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "char cVar3;" primitive_type identifier ;) (declaration "undefined4 uVar4;" type_identifier identifier ;) (expression_statement "cVar3 = FUN_0001d0a0(param_1);" (assignment_expression "cVar3 = FUN_0001d0a0(param_1)" identifier = (call_expression "FUN_0001d0a0(param_1)" identifier (argument_list "(param_1)" ( identifier )))) ;) (if_statement "if (cVar3 != '\0') {\n                    /* WARNING: Subroutine does not return */\n    abort();\n  }" if (parenthesized_expression "(cVar3 != '\0')" ( (binary_expression "cVar3 != '\0'" identifier != (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\n                    /* WARNING: Subroutine does not return */\n    abort();\n  }" { comment (expression_statement "abort();" (call_expression "abort()" identifier (argument_list "()" ( ))) ;) })) (expression_statement "iVar2 = *(int *)(param_1 + 0x14);" (assignment_expression "iVar2 = *(int *)(param_1 + 0x14)" identifier = (pointer_expression "*(int *)(param_1 + 0x14)" * (cast_expression "(int *)(param_1 + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x14)" ( (binary_expression "param_1 + 0x14" identifier + number_literal) ))))) ;) (expression_statement "puVar1 = (undefined4 *)(param_1 + iVar2 * 4);" (assignment_expression "puVar1 = (undefined4 *)(param_1 + iVar2 * 4)" identifier = (cast_expression "(undefined4 *)(param_1 + iVar2 * 4)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + iVar2 * 4)" ( (binary_expression "param_1 + iVar2 * 4" identifier + (binary_expression "iVar2 * 4" identifier * number_literal)) )))) ;) (expression_statement "uVar4 = *puVar1;" (assignment_expression "uVar4 = *puVar1" identifier = (pointer_expression "*puVar1" * identifier)) ;) (expression_statement "*puVar1 = *(undefined4 *)(param_1 + 0x10);" (assignment_expression "*puVar1 = *(undefined4 *)(param_1 + 0x10)" (pointer_expression "*puVar1" * identifier) = (pointer_expression "*(undefined4 *)(param_1 + 0x10)" * (cast_expression "(undefined4 *)(param_1 + 0x10)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x10)" ( (binary_expression "param_1 + 0x10" identifier + number_literal) ))))) ;) (if_statement "if (iVar2 != *(int *)(param_1 + 0x18)) {\n    *(uint *)(param_1 + 0x14) = iVar2 + 3U & 3;\n    return uVar4;\n  }" if (parenthesized_expression "(iVar2 != *(int *)(param_1 + 0x18))" ( (binary_expression "iVar2 != *(int *)(param_1 + 0x18)" identifier != (pointer_expression "*(int *)(param_1 + 0x18)" * (cast_expression "(int *)(param_1 + 0x18)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x18)" ( (binary_expression "param_1 + 0x18" identifier + number_literal) ))))) )) (compound_statement "{\n    *(uint *)(param_1 + 0x14) = iVar2 + 3U & 3;\n    return uVar4;\n  }" { (expression_statement "*(uint *)(param_1 + 0x14) = iVar2 + 3U & 3;" (assignment_expression "*(uint *)(param_1 + 0x14) = iVar2 + 3U & 3" (pointer_expression "*(uint *)(param_1 + 0x14)" * (cast_expression "(uint *)(param_1 + 0x14)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x14)" ( (binary_expression "param_1 + 0x14" identifier + number_literal) )))) = (binary_expression "iVar2 + 3U & 3" (binary_expression "iVar2 + 3U" identifier + number_literal) & number_literal)) ;) (return_statement "return uVar4;" return identifier ;) })) (expression_statement "*(undefined1 *)(param_1 + 0x1c) = 1;" (assignment_expression "*(undefined1 *)(param_1 + 0x1c) = 1" (pointer_expression "*(undefined1 *)(param_1 + 0x1c)" * (cast_expression "(undefined1 *)(param_1 + 0x1c)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x1c)" ( (binary_expression "param_1 + 0x1c" identifier + number_literal) )))) = number_literal) ;) (return_statement "return uVar4;" return identifier ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n/* WARNING: Unknown calling convention */\n\nint i_ring_pop(I_ring *ir)\n\n{\n  uint uVar1;\n  _Bool _Var2;\n  int iVar3;\n  \n  _Var2 = i_ring_empty(ir);\n  if (_Var2) {\n                    /* WARNING: Subroutine does not return */\n    abort();\n  }\n  uVar1 = ir->ir_front;\n  iVar3 = ir->ir_data[uVar1];\n  ir->ir_data[uVar1] = ir->ir_default_val;\n  if (uVar1 != ir->ir_back) {\n    ir->ir_front = uVar1 + 3 & 3;\n    return iVar3;\n  }\n  ir->ir_empty = true;\n  return iVar3;\n}\n\n" comment comment (function_definition "int i_ring_pop(I_ring *ir)\n\n{\n  uint uVar1;\n  _Bool _Var2;\n  int iVar3;\n  \n  _Var2 = i_ring_empty(ir);\n  if (_Var2) {\n                    /* WARNING: Subroutine does not return */\n    abort();\n  }\n  uVar1 = ir->ir_front;\n  iVar3 = ir->ir_data[uVar1];\n  ir->ir_data[uVar1] = ir->ir_default_val;\n  if (uVar1 != ir->ir_back) {\n    ir->ir_front = uVar1 + 3 & 3;\n    return iVar3;\n  }\n  ir->ir_empty = true;\n  return iVar3;\n}" primitive_type (function_declarator "i_ring_pop(I_ring *ir)" identifier (parameter_list "(I_ring *ir)" ( (parameter_declaration "I_ring *ir" type_identifier (pointer_declarator "*ir" * identifier)) ))) (compound_statement "{\n  uint uVar1;\n  _Bool _Var2;\n  int iVar3;\n  \n  _Var2 = i_ring_empty(ir);\n  if (_Var2) {\n                    /* WARNING: Subroutine does not return */\n    abort();\n  }\n  uVar1 = ir->ir_front;\n  iVar3 = ir->ir_data[uVar1];\n  ir->ir_data[uVar1] = ir->ir_default_val;\n  if (uVar1 != ir->ir_back) {\n    ir->ir_front = uVar1 + 3 & 3;\n    return iVar3;\n  }\n  ir->ir_empty = true;\n  return iVar3;\n}" { (declaration "uint uVar1;" type_identifier identifier ;) (declaration "_Bool _Var2;" type_identifier identifier ;) (declaration "int iVar3;" primitive_type identifier ;) (expression_statement "_Var2 = i_ring_empty(ir);" (assignment_expression "_Var2 = i_ring_empty(ir)" identifier = (call_expression "i_ring_empty(ir)" identifier (argument_list "(ir)" ( identifier )))) ;) (if_statement "if (_Var2) {\n                    /* WARNING: Subroutine does not return */\n    abort();\n  }" if (parenthesized_expression "(_Var2)" ( identifier )) (compound_statement "{\n                    /* WARNING: Subroutine does not return */\n    abort();\n  }" { comment (expression_statement "abort();" (call_expression "abort()" identifier (argument_list "()" ( ))) ;) })) (expression_statement "uVar1 = ir->ir_front;" (assignment_expression "uVar1 = ir->ir_front" identifier = (field_expression "ir->ir_front" identifier -> field_identifier)) ;) (expression_statement "iVar3 = ir->ir_data[uVar1];" (assignment_expression "iVar3 = ir->ir_data[uVar1]" identifier = (subscript_expression "ir->ir_data[uVar1]" (field_expression "ir->ir_data" identifier -> field_identifier) [ identifier ])) ;) (expression_statement "ir->ir_data[uVar1] = ir->ir_default_val;" (assignment_expression "ir->ir_data[uVar1] = ir->ir_default_val" (subscript_expression "ir->ir_data[uVar1]" (field_expression "ir->ir_data" identifier -> field_identifier) [ identifier ]) = (field_expression "ir->ir_default_val" identifier -> field_identifier)) ;) (if_statement "if (uVar1 != ir->ir_back) {\n    ir->ir_front = uVar1 + 3 & 3;\n    return iVar3;\n  }" if (parenthesized_expression "(uVar1 != ir->ir_back)" ( (binary_expression "uVar1 != ir->ir_back" identifier != (field_expression "ir->ir_back" identifier -> field_identifier)) )) (compound_statement "{\n    ir->ir_front = uVar1 + 3 & 3;\n    return iVar3;\n  }" { (expression_statement "ir->ir_front = uVar1 + 3 & 3;" (assignment_expression "ir->ir_front = uVar1 + 3 & 3" (field_expression "ir->ir_front" identifier -> field_identifier) = (binary_expression "uVar1 + 3 & 3" (binary_expression "uVar1 + 3" identifier + number_literal) & number_literal)) ;) (return_statement "return iVar3;" return identifier ;) })) (expression_statement "ir->ir_empty = true;" (assignment_expression "ir->ir_empty = true" (field_expression "ir->ir_empty" identifier -> field_identifier) = true) ;) (return_statement "return iVar3;" return identifier ;) })))
(translation_unit "undefined4 FUN_0001d0f0(int param_1)\n\n{\n  undefined4 *puVar1;\n  int iVar2;\n  char cVar3;\n  undefined4 uVar4;\n  \n  cVar3 = FUN_0001d0a0(param_1);\n  if (cVar3 != '\0') {\n                    \n    abort();\n  }\n  iVar2 = *(int *)(param_1 + 0x14);\n  puVar1 = (undefined4 *)(param_1 + iVar2 * 4);\n  uVar4 = *puVar1;\n  *puVar1 = *(undefined4 *)(param_1 + 0x10);\n  if (iVar2 != *(int *)(param_1 + 0x18)) {\n    *(uint *)(param_1 + 0x14) = iVar2 + 3U & 3;\n    return uVar4;\n  }\n  *(undefined1 *)(param_1 + 0x1c) = 1;\n  return uVar4;\n}\n\n" (function_definition "undefined4 FUN_0001d0f0(int param_1)\n\n{\n  undefined4 *puVar1;\n  int iVar2;\n  char cVar3;\n  undefined4 uVar4;\n  \n  cVar3 = FUN_0001d0a0(param_1);\n  if (cVar3 != '\0') {\n                    \n    abort();\n  }\n  iVar2 = *(int *)(param_1 + 0x14);\n  puVar1 = (undefined4 *)(param_1 + iVar2 * 4);\n  uVar4 = *puVar1;\n  *puVar1 = *(undefined4 *)(param_1 + 0x10);\n  if (iVar2 != *(int *)(param_1 + 0x18)) {\n    *(uint *)(param_1 + 0x14) = iVar2 + 3U & 3;\n    return uVar4;\n  }\n  *(undefined1 *)(param_1 + 0x1c) = 1;\n  return uVar4;\n}" type_identifier (function_declarator "FUN_0001d0f0(int param_1)" identifier (parameter_list "(int param_1)" ( (parameter_declaration "int param_1" primitive_type identifier) ))) (compound_statement "{\n  undefined4 *puVar1;\n  int iVar2;\n  char cVar3;\n  undefined4 uVar4;\n  \n  cVar3 = FUN_0001d0a0(param_1);\n  if (cVar3 != '\0') {\n                    \n    abort();\n  }\n  iVar2 = *(int *)(param_1 + 0x14);\n  puVar1 = (undefined4 *)(param_1 + iVar2 * 4);\n  uVar4 = *puVar1;\n  *puVar1 = *(undefined4 *)(param_1 + 0x10);\n  if (iVar2 != *(int *)(param_1 + 0x18)) {\n    *(uint *)(param_1 + 0x14) = iVar2 + 3U & 3;\n    return uVar4;\n  }\n  *(undefined1 *)(param_1 + 0x1c) = 1;\n  return uVar4;\n}" { (declaration "undefined4 *puVar1;" type_identifier (pointer_declarator "*puVar1" * identifier) ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "char cVar3;" primitive_type identifier ;) (declaration "undefined4 uVar4;" type_identifier identifier ;) (expression_statement "cVar3 = FUN_0001d0a0(param_1);" (assignment_expression "cVar3 = FUN_0001d0a0(param_1)" identifier = (call_expression "FUN_0001d0a0(param_1)" identifier (argument_list "(param_1)" ( identifier )))) ;) (if_statement "if (cVar3 != '\0') {\n                    \n    abort();\n  }" if (parenthesized_expression "(cVar3 != '\0')" ( (binary_expression "cVar3 != '\0'" identifier != (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\n                    \n    abort();\n  }" { (expression_statement "abort();" (call_expression "abort()" identifier (argument_list "()" ( ))) ;) })) (expression_statement "iVar2 = *(int *)(param_1 + 0x14);" (assignment_expression "iVar2 = *(int *)(param_1 + 0x14)" identifier = (pointer_expression "*(int *)(param_1 + 0x14)" * (cast_expression "(int *)(param_1 + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x14)" ( (binary_expression "param_1 + 0x14" identifier + number_literal) ))))) ;) (expression_statement "puVar1 = (undefined4 *)(param_1 + iVar2 * 4);" (assignment_expression "puVar1 = (undefined4 *)(param_1 + iVar2 * 4)" identifier = (cast_expression "(undefined4 *)(param_1 + iVar2 * 4)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + iVar2 * 4)" ( (binary_expression "param_1 + iVar2 * 4" identifier + (binary_expression "iVar2 * 4" identifier * number_literal)) )))) ;) (expression_statement "uVar4 = *puVar1;" (assignment_expression "uVar4 = *puVar1" identifier = (pointer_expression "*puVar1" * identifier)) ;) (expression_statement "*puVar1 = *(undefined4 *)(param_1 + 0x10);" (assignment_expression "*puVar1 = *(undefined4 *)(param_1 + 0x10)" (pointer_expression "*puVar1" * identifier) = (pointer_expression "*(undefined4 *)(param_1 + 0x10)" * (cast_expression "(undefined4 *)(param_1 + 0x10)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x10)" ( (binary_expression "param_1 + 0x10" identifier + number_literal) ))))) ;) (if_statement "if (iVar2 != *(int *)(param_1 + 0x18)) {\n    *(uint *)(param_1 + 0x14) = iVar2 + 3U & 3;\n    return uVar4;\n  }" if (parenthesized_expression "(iVar2 != *(int *)(param_1 + 0x18))" ( (binary_expression "iVar2 != *(int *)(param_1 + 0x18)" identifier != (pointer_expression "*(int *)(param_1 + 0x18)" * (cast_expression "(int *)(param_1 + 0x18)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x18)" ( (binary_expression "param_1 + 0x18" identifier + number_literal) ))))) )) (compound_statement "{\n    *(uint *)(param_1 + 0x14) = iVar2 + 3U & 3;\n    return uVar4;\n  }" { (expression_statement "*(uint *)(param_1 + 0x14) = iVar2 + 3U & 3;" (assignment_expression "*(uint *)(param_1 + 0x14) = iVar2 + 3U & 3" (pointer_expression "*(uint *)(param_1 + 0x14)" * (cast_expression "(uint *)(param_1 + 0x14)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x14)" ( (binary_expression "param_1 + 0x14" identifier + number_literal) )))) = (binary_expression "iVar2 + 3U & 3" (binary_expression "iVar2 + 3U" identifier + number_literal) & number_literal)) ;) (return_statement "return uVar4;" return identifier ;) })) (expression_statement "*(undefined1 *)(param_1 + 0x1c) = 1;" (assignment_expression "*(undefined1 *)(param_1 + 0x1c) = 1" (pointer_expression "*(undefined1 *)(param_1 + 0x1c)" * (cast_expression "(undefined1 *)(param_1 + 0x1c)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x1c)" ( (binary_expression "param_1 + 0x1c" identifier + number_literal) )))) = number_literal) ;) (return_statement "return uVar4;" return identifier ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != (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 IDENT + LIT) ))))) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + (binary_expression IDENT * LIT)) )))) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * IDENT)) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) )) (compound_statement { (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = (binary_expression (binary_expression IDENT + LIT) & LIT)) ;) (return_statement return IDENT ;) })) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = LIT) ;) (return_statement return IDENT ;) })))
(function_definition "undefined4 FUN_0001d0f0(int param_1)\n\n{\n  undefined4 *puVar1;\n  int iVar2;\n  char cVar3;\n  undefined4 uVar4;\n  \n  cVar3 = FUN_0001d0a0(param_1);\n  if (cVar3 != '\0') {\n                    \n    abort();\n  }\n  iVar2 = *(int *)(param_1 + 0x14);\n  puVar1 = (undefined4 *)(param_1 + iVar2 * 4);\n  uVar4 = *puVar1;\n  *puVar1 = *(undefined4 *)(param_1 + 0x10);\n  if (iVar2 != *(int *)(param_1 + 0x18)) {\n    *(uint *)(param_1 + 0x14) = iVar2 + 3U & 3;\n    return uVar4;\n  }\n  *(undefined1 *)(param_1 + 0x1c) = 1;\n  return uVar4;\n}" (type_identifier "undefined4") (function_declarator "FUN_0001d0f0(int param_1)" (identifier "FUN_0001d0f0") (parameter_list "(int param_1)" (( "(") (parameter_declaration "int param_1" (primitive_type "int") (identifier "param_1")) () ")"))) (compound_statement "{\n  undefined4 *puVar1;\n  int iVar2;\n  char cVar3;\n  undefined4 uVar4;\n  \n  cVar3 = FUN_0001d0a0(param_1);\n  if (cVar3 != '\0') {\n                    \n    abort();\n  }\n  iVar2 = *(int *)(param_1 + 0x14);\n  puVar1 = (undefined4 *)(param_1 + iVar2 * 4);\n  uVar4 = *puVar1;\n  *puVar1 = *(undefined4 *)(param_1 + 0x10);\n  if (iVar2 != *(int *)(param_1 + 0x18)) {\n    *(uint *)(param_1 + 0x14) = iVar2 + 3U & 3;\n    return uVar4;\n  }\n  *(undefined1 *)(param_1 + 0x1c) = 1;\n  return uVar4;\n}" ({ "{") (declaration "undefined4 *puVar1;" (type_identifier "undefined4") (pointer_declarator "*puVar1" (* "*") (identifier "puVar1")) (; ";")) (declaration "int iVar2;" (primitive_type "int") (identifier "iVar2") (; ";")) (declaration "char cVar3;" (primitive_type "char") (identifier "cVar3") (; ";")) (declaration "undefined4 uVar4;" (type_identifier "undefined4") (identifier "uVar4") (; ";")) (expression_statement "cVar3 = FUN_0001d0a0(param_1);" (assignment_expression "cVar3 = FUN_0001d0a0(param_1)" (identifier "cVar3") (= "=") (call_expression "FUN_0001d0a0(param_1)" (identifier "FUN_0001d0a0") (argument_list "(param_1)" (( "(") (identifier "param_1") () ")")))) (; ";")) (if_statement "if (cVar3 != '\0') {\n                    \n    abort();\n  }" (if "if") (parenthesized_expression "(cVar3 != '\0')" (( "(") (binary_expression "cVar3 != '\0'" (identifier "cVar3") (!= "!=") (char_literal "'\0'" (' "'") (escape_sequence "\0") (' "'"))) () ")")) (compound_statement "{\n                    \n    abort();\n  }" ({ "{") (expression_statement "abort();" (call_expression "abort()" (identifier "abort") (argument_list "()" (( "(") () ")"))) (; ";")) (} "}"))) (expression_statement "iVar2 = *(int *)(param_1 + 0x14);" (assignment_expression "iVar2 = *(int *)(param_1 + 0x14)" (identifier "iVar2") (= "=") (pointer_expression "*(int *)(param_1 + 0x14)" (* "*") (cast_expression "(int *)(param_1 + 0x14)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x14)" (( "(") (binary_expression "param_1 + 0x14" (identifier "param_1") (+ "+") (number_literal "0x14")) () ")"))))) (; ";")) (expression_statement "puVar1 = (undefined4 *)(param_1 + iVar2 * 4);" (assignment_expression "puVar1 = (undefined4 *)(param_1 + iVar2 * 4)" (identifier "puVar1") (= "=") (cast_expression "(undefined4 *)(param_1 + iVar2 * 4)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + iVar2 * 4)" (( "(") (binary_expression "param_1 + iVar2 * 4" (identifier "param_1") (+ "+") (binary_expression "iVar2 * 4" (identifier "iVar2") (* "*") (number_literal "4"))) () ")")))) (; ";")) (expression_statement "uVar4 = *puVar1;" (assignment_expression "uVar4 = *puVar1" (identifier "uVar4") (= "=") (pointer_expression "*puVar1" (* "*") (identifier "puVar1"))) (; ";")) (expression_statement "*puVar1 = *(undefined4 *)(param_1 + 0x10);" (assignment_expression "*puVar1 = *(undefined4 *)(param_1 + 0x10)" (pointer_expression "*puVar1" (* "*") (identifier "puVar1")) (= "=") (pointer_expression "*(undefined4 *)(param_1 + 0x10)" (* "*") (cast_expression "(undefined4 *)(param_1 + 0x10)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x10)" (( "(") (binary_expression "param_1 + 0x10" (identifier "param_1") (+ "+") (number_literal "0x10")) () ")"))))) (; ";")) (if_statement "if (iVar2 != *(int *)(param_1 + 0x18)) {\n    *(uint *)(param_1 + 0x14) = iVar2 + 3U & 3;\n    return uVar4;\n  }" (if "if") (parenthesized_expression "(iVar2 != *(int *)(param_1 + 0x18))" (( "(") (binary_expression "iVar2 != *(int *)(param_1 + 0x18)" (identifier "iVar2") (!= "!=") (pointer_expression "*(int *)(param_1 + 0x18)" (* "*") (cast_expression "(int *)(param_1 + 0x18)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x18)" (( "(") (binary_expression "param_1 + 0x18" (identifier "param_1") (+ "+") (number_literal "0x18")) () ")"))))) () ")")) (compound_statement "{\n    *(uint *)(param_1 + 0x14) = iVar2 + 3U & 3;\n    return uVar4;\n  }" ({ "{") (expression_statement "*(uint *)(param_1 + 0x14) = iVar2 + 3U & 3;" (assignment_expression "*(uint *)(param_1 + 0x14) = iVar2 + 3U & 3" (pointer_expression "*(uint *)(param_1 + 0x14)" (* "*") (cast_expression "(uint *)(param_1 + 0x14)" (( "(") (type_descriptor "uint *" (type_identifier "uint") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x14)" (( "(") (binary_expression "param_1 + 0x14" (identifier "param_1") (+ "+") (number_literal "0x14")) () ")")))) (= "=") (binary_expression "iVar2 + 3U & 3" (binary_expression "iVar2 + 3U" (identifier "iVar2") (+ "+") (number_literal "3U")) (& "&") (number_literal "3"))) (; ";")) (return_statement "return uVar4;" (return "return") (identifier "uVar4") (; ";")) (} "}"))) (expression_statement "*(undefined1 *)(param_1 + 0x1c) = 1;" (assignment_expression "*(undefined1 *)(param_1 + 0x1c) = 1" (pointer_expression "*(undefined1 *)(param_1 + 0x1c)" (* "*") (cast_expression "(undefined1 *)(param_1 + 0x1c)" (( "(") (type_descriptor "undefined1 *" (type_identifier "undefined1") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x1c)" (( "(") (binary_expression "param_1 + 0x1c" (identifier "param_1") (+ "+") (number_literal "0x1c")) () ")")))) (= "=") (number_literal "1")) (; ";")) (return_statement "return uVar4;" (return "return") (identifier "uVar4") (; ";")) (} "}")))

/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */
/* WARNING: Unknown calling convention */

int function_1(type_1 *ir)

{
  type_2 var_3;
  type_3 _Var2;
  int iVar3;
  
  _Var2 = var_1(ir);
  if (_Var2) {
                    /* WARNING: Subroutine does not return */
    var_2();
  }
  var_3 = ir->ir_front;
  iVar3 = ir->ir_data[var_3];
  ir->ir_data[var_3] = ir->ir_default_val;
  if (var_3 != ir->ir_back) {
    ir->ir_front = var_3 + 3 & 3;
    return iVar3;
  }
  ir->ir_empty = true;
  return iVar3;
}


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

/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */

undefined4 MASKED(int param_1)

{
  undefined4 *puVar1;
  int iVar2;
  char cVar3;
  undefined4 uVar4;
  
  cVar3 = FUN_0001d0a0(param_1);
  if (cVar3 != '\0') {
                    /* WARNING: Subroutine does not return */
    abort();
  }
  iVar2 = *(int *)(param_1 + 0x14);
  puVar1 = (undefined4 *)(param_1 + iVar2 * 4);
  uVar4 = *puVar1;
  *puVar1 = *(undefined4 *)(param_1 + 0x10);
  if (iVar2 != *(int *)(param_1 + 0x18)) {
    *(uint *)(param_1 + 0x14) = iVar2 + 3U & 3;
    return uVar4;
  }
  *(undefined1 *)(param_1 + 0x1c) = 1;
  return uVar4;
}

