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

reg_errcode_t __regparm3 clean_state_log_if_needed(re_match_context_t *mctx,Idx next_state_log_idx)

{
  int iVar1;
  int iVar2;
  reg_errcode_t rVar3;
  
  iVar1 = mctx->state_log_top;
  iVar2 = (mctx->input).bufs_len;
  if ((((next_state_log_idx < iVar2) || ((mctx->input).len <= iVar2)) &&
      ((iVar2 = (mctx->input).valid_len, next_state_log_idx < iVar2 || ((mctx->input).len <= iVar2))
      )) || (rVar3 = extend_buffers(mctx,next_state_log_idx + 1), rVar3 == _REG_NOERROR)) {
    if (iVar1 < next_state_log_idx) {
      memset(mctx->state_log + iVar1 + 1,0,(next_state_log_idx - iVar1) * 4);
      mctx->state_log_top = next_state_log_idx;
    }
    rVar3 = _REG_NOERROR;
  }
  return rVar3;
}



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

int __regparm3 FUN_000181e0(int param_1,int param_2)

{
  int iVar1;
  int iVar2;
  
  iVar1 = *(int *)(param_1 + 0x68);
  if ((((param_2 < *(int *)(param_1 + 0x24)) ||
       (*(int *)(param_1 + 0x30) <= *(int *)(param_1 + 0x24))) &&
      ((param_2 < *(int *)(param_1 + 0x1c) || (*(int *)(param_1 + 0x30) <= *(int *)(param_1 + 0x1c))
       ))) || (iVar2 = FUN_000180c0(param_1,param_2 + 1), iVar2 == 0)) {
    if (iVar1 < param_2) {
      memset((void *)(*(int *)(param_1 + 100) + 4 + iVar1 * 4),0,(param_2 - iVar1) * 4);
      *(int *)(param_1 + 0x68) = param_2;
    }
    iVar2 = 0;
  }
  return iVar2;
}


PUSH EBP
PUSH EDI
MOV EDI,EDX
PUSH ESI
MOV ESI,EAX
PUSH EBX
CALL 0x00011b40
ADD EBX,0x16e13
SUB ESP,0xc
MOV EBP,dword ptr [EAX + 0x68]
MOV EAX,dword ptr [EAX + 0x24]
CMP EAX,EDX
JG 0x00018230
CMP EAX,dword ptr [ESI + 0x30]
JGE 0x00018230
SUB ESP,0x8
LEA EAX,[EDI + 0x1]
PUSH EAX
PUSH ESI
CALL 0x000180c0
ADD ESP,0x10
TEST EAX,EAX
JNZ 0x0001821f
CMP EBP,EDI
JL 0x00018240
XOR EAX,EAX
ADD ESP,0xc
POP EBX
POP ESI
POP EDI
POP EBP
RET
MOV EAX,dword ptr [ESI + 0x1c]
CMP EAX,EDI
JG 0x00018219
CMP EAX,dword ptr [ESI + 0x30]
JGE 0x00018219
JMP 0x00018205
MOV EDX,dword ptr [ESI + 0x64]
MOV EAX,EDI
SUB ESP,0x4
SUB EAX,EBP
SHL EAX,0x2
LEA EDX,[EDX + EBP*0x4 + 0x4]
PUSH EAX
PUSH 0x0
PUSH EDX
CALL 0x00011290
MOV dword ptr [ESI + 0x68],EDI
ADD ESP,0x10
JMP 0x0001821d
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nint __regparm3 FUN_000181e0(int param_1,int param_2)\n\n{\n  int iVar1;\n  int iVar2;\n  \n  iVar1 = *(int *)(param_1 + 0x68);\n  if ((((param_2 < *(int *)(param_1 + 0x24)) ||\n       (*(int *)(param_1 + 0x30) <= *(int *)(param_1 + 0x24))) &&\n      ((param_2 < *(int *)(param_1 + 0x1c) || (*(int *)(param_1 + 0x30) <= *(int *)(param_1 + 0x1c))\n       ))) || (iVar2 = FUN_000180c0(param_1,param_2 + 1), iVar2 == 0)) {\n    if (iVar1 < param_2) {\n      memset((void *)(*(int *)(param_1 + 100) + 4 + iVar1 * 4),0,(param_2 - iVar1) * 4);\n      *(int *)(param_1 + 0x68) = param_2;\n    }\n    iVar2 = 0;\n  }\n  return iVar2;\n}\n\n" comment (function_definition "int __regparm3 FUN_000181e0(int param_1,int param_2)\n\n{\n  int iVar1;\n  int iVar2;\n  \n  iVar1 = *(int *)(param_1 + 0x68);\n  if ((((param_2 < *(int *)(param_1 + 0x24)) ||\n       (*(int *)(param_1 + 0x30) <= *(int *)(param_1 + 0x24))) &&\n      ((param_2 < *(int *)(param_1 + 0x1c) || (*(int *)(param_1 + 0x30) <= *(int *)(param_1 + 0x1c))\n       ))) || (iVar2 = FUN_000180c0(param_1,param_2 + 1), iVar2 == 0)) {\n    if (iVar1 < param_2) {\n      memset((void *)(*(int *)(param_1 + 100) + 4 + iVar1 * 4),0,(param_2 - iVar1) * 4);\n      *(int *)(param_1 + 0x68) = param_2;\n    }\n    iVar2 = 0;\n  }\n  return iVar2;\n}" primitive_type (ERROR "__regparm3" identifier) (function_declarator "FUN_000181e0(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  int iVar1;\n  int iVar2;\n  \n  iVar1 = *(int *)(param_1 + 0x68);\n  if ((((param_2 < *(int *)(param_1 + 0x24)) ||\n       (*(int *)(param_1 + 0x30) <= *(int *)(param_1 + 0x24))) &&\n      ((param_2 < *(int *)(param_1 + 0x1c) || (*(int *)(param_1 + 0x30) <= *(int *)(param_1 + 0x1c))\n       ))) || (iVar2 = FUN_000180c0(param_1,param_2 + 1), iVar2 == 0)) {\n    if (iVar1 < param_2) {\n      memset((void *)(*(int *)(param_1 + 100) + 4 + iVar1 * 4),0,(param_2 - iVar1) * 4);\n      *(int *)(param_1 + 0x68) = param_2;\n    }\n    iVar2 = 0;\n  }\n  return iVar2;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (expression_statement "iVar1 = *(int *)(param_1 + 0x68);" (assignment_expression "iVar1 = *(int *)(param_1 + 0x68)" identifier = (pointer_expression "*(int *)(param_1 + 0x68)" * (cast_expression "(int *)(param_1 + 0x68)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x68)" ( (binary_expression "param_1 + 0x68" identifier + number_literal) ))))) ;) (if_statement "if ((((param_2 < *(int *)(param_1 + 0x24)) ||\n       (*(int *)(param_1 + 0x30) <= *(int *)(param_1 + 0x24))) &&\n      ((param_2 < *(int *)(param_1 + 0x1c) || (*(int *)(param_1 + 0x30) <= *(int *)(param_1 + 0x1c))\n       ))) || (iVar2 = FUN_000180c0(param_1,param_2 + 1), iVar2 == 0)) {\n    if (iVar1 < param_2) {\n      memset((void *)(*(int *)(param_1 + 100) + 4 + iVar1 * 4),0,(param_2 - iVar1) * 4);\n      *(int *)(param_1 + 0x68) = param_2;\n    }\n    iVar2 = 0;\n  }" if (parenthesized_expression "((((param_2 < *(int *)(param_1 + 0x24)) ||\n       (*(int *)(param_1 + 0x30) <= *(int *)(param_1 + 0x24))) &&\n      ((param_2 < *(int *)(param_1 + 0x1c) || (*(int *)(param_1 + 0x30) <= *(int *)(param_1 + 0x1c))\n       ))) || (iVar2 = FUN_000180c0(param_1,param_2 + 1), iVar2 == 0))" ( (binary_expression "(((param_2 < *(int *)(param_1 + 0x24)) ||\n       (*(int *)(param_1 + 0x30) <= *(int *)(param_1 + 0x24))) &&\n      ((param_2 < *(int *)(param_1 + 0x1c) || (*(int *)(param_1 + 0x30) <= *(int *)(param_1 + 0x1c))\n       ))) || (iVar2 = FUN_000180c0(param_1,param_2 + 1), iVar2 == 0)" (parenthesized_expression "(((param_2 < *(int *)(param_1 + 0x24)) ||\n       (*(int *)(param_1 + 0x30) <= *(int *)(param_1 + 0x24))) &&\n      ((param_2 < *(int *)(param_1 + 0x1c) || (*(int *)(param_1 + 0x30) <= *(int *)(param_1 + 0x1c))\n       )))" ( (binary_expression "((param_2 < *(int *)(param_1 + 0x24)) ||\n       (*(int *)(param_1 + 0x30) <= *(int *)(param_1 + 0x24))) &&\n      ((param_2 < *(int *)(param_1 + 0x1c) || (*(int *)(param_1 + 0x30) <= *(int *)(param_1 + 0x1c))\n       ))" (parenthesized_expression "((param_2 < *(int *)(param_1 + 0x24)) ||\n       (*(int *)(param_1 + 0x30) <= *(int *)(param_1 + 0x24)))" ( (binary_expression "(param_2 < *(int *)(param_1 + 0x24)) ||\n       (*(int *)(param_1 + 0x30) <= *(int *)(param_1 + 0x24))" (parenthesized_expression "(param_2 < *(int *)(param_1 + 0x24))" ( (binary_expression "param_2 < *(int *)(param_1 + 0x24)" identifier < (pointer_expression "*(int *)(param_1 + 0x24)" * (cast_expression "(int *)(param_1 + 0x24)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x24)" ( (binary_expression "param_1 + 0x24" identifier + number_literal) ))))) )) || (parenthesized_expression "(*(int *)(param_1 + 0x30) <= *(int *)(param_1 + 0x24))" ( (binary_expression "*(int *)(param_1 + 0x30) <= *(int *)(param_1 + 0x24)" (pointer_expression "*(int *)(param_1 + 0x30)" * (cast_expression "(int *)(param_1 + 0x30)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x30)" ( (binary_expression "param_1 + 0x30" identifier + number_literal) )))) <= (pointer_expression "*(int *)(param_1 + 0x24)" * (cast_expression "(int *)(param_1 + 0x24)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x24)" ( (binary_expression "param_1 + 0x24" identifier + number_literal) ))))) ))) )) && (parenthesized_expression "((param_2 < *(int *)(param_1 + 0x1c) || (*(int *)(param_1 + 0x30) <= *(int *)(param_1 + 0x1c))\n       ))" ( (parenthesized_expression "(param_2 < *(int *)(param_1 + 0x1c) || (*(int *)(param_1 + 0x30) <= *(int *)(param_1 + 0x1c))\n       )" ( (binary_expression "param_2 < *(int *)(param_1 + 0x1c) || (*(int *)(param_1 + 0x30) <= *(int *)(param_1 + 0x1c))" (binary_expression "param_2 < *(int *)(param_1 + 0x1c)" identifier < (pointer_expression "*(int *)(param_1 + 0x1c)" * (cast_expression "(int *)(param_1 + 0x1c)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x1c)" ( (binary_expression "param_1 + 0x1c" identifier + number_literal) ))))) || (parenthesized_expression "(*(int *)(param_1 + 0x30) <= *(int *)(param_1 + 0x1c))" ( (binary_expression "*(int *)(param_1 + 0x30) <= *(int *)(param_1 + 0x1c)" (pointer_expression "*(int *)(param_1 + 0x30)" * (cast_expression "(int *)(param_1 + 0x30)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x30)" ( (binary_expression "param_1 + 0x30" identifier + number_literal) )))) <= (pointer_expression "*(int *)(param_1 + 0x1c)" * (cast_expression "(int *)(param_1 + 0x1c)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x1c)" ( (binary_expression "param_1 + 0x1c" identifier + number_literal) ))))) ))) )) ))) )) || (parenthesized_expression "(iVar2 = FUN_000180c0(param_1,param_2 + 1), iVar2 == 0)" ( (comma_expression "iVar2 = FUN_000180c0(param_1,param_2 + 1), iVar2 == 0" (assignment_expression "iVar2 = FUN_000180c0(param_1,param_2 + 1)" identifier = (call_expression "FUN_000180c0(param_1,param_2 + 1)" identifier (argument_list "(param_1,param_2 + 1)" ( identifier , (binary_expression "param_2 + 1" identifier + number_literal) )))) , (binary_expression "iVar2 == 0" identifier == number_literal)) ))) )) (compound_statement "{\n    if (iVar1 < param_2) {\n      memset((void *)(*(int *)(param_1 + 100) + 4 + iVar1 * 4),0,(param_2 - iVar1) * 4);\n      *(int *)(param_1 + 0x68) = param_2;\n    }\n    iVar2 = 0;\n  }" { (if_statement "if (iVar1 < param_2) {\n      memset((void *)(*(int *)(param_1 + 100) + 4 + iVar1 * 4),0,(param_2 - iVar1) * 4);\n      *(int *)(param_1 + 0x68) = param_2;\n    }" if (parenthesized_expression "(iVar1 < param_2)" ( (binary_expression "iVar1 < param_2" identifier < identifier) )) (compound_statement "{\n      memset((void *)(*(int *)(param_1 + 100) + 4 + iVar1 * 4),0,(param_2 - iVar1) * 4);\n      *(int *)(param_1 + 0x68) = param_2;\n    }" { (expression_statement "memset((void *)(*(int *)(param_1 + 100) + 4 + iVar1 * 4),0,(param_2 - iVar1) * 4);" (call_expression "memset((void *)(*(int *)(param_1 + 100) + 4 + iVar1 * 4),0,(param_2 - iVar1) * 4)" identifier (argument_list "((void *)(*(int *)(param_1 + 100) + 4 + iVar1 * 4),0,(param_2 - iVar1) * 4)" ( (cast_expression "(void *)(*(int *)(param_1 + 100) + 4 + iVar1 * 4)" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*(int *)(param_1 + 100) + 4 + iVar1 * 4)" ( (binary_expression "*(int *)(param_1 + 100) + 4 + iVar1 * 4" (binary_expression "*(int *)(param_1 + 100) + 4" (pointer_expression "*(int *)(param_1 + 100)" * (cast_expression "(int *)(param_1 + 100)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 100)" ( (binary_expression "param_1 + 100" identifier + number_literal) )))) + number_literal) + (binary_expression "iVar1 * 4" identifier * number_literal)) ))) , number_literal , (binary_expression "(param_2 - iVar1) * 4" (parenthesized_expression "(param_2 - iVar1)" ( (binary_expression "param_2 - iVar1" identifier - identifier) )) * number_literal) ))) ;) (expression_statement "*(int *)(param_1 + 0x68) = param_2;" (assignment_expression "*(int *)(param_1 + 0x68) = param_2" (pointer_expression "*(int *)(param_1 + 0x68)" * (cast_expression "(int *)(param_1 + 0x68)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x68)" ( (binary_expression "param_1 + 0x68" identifier + number_literal) )))) = identifier) ;) })) (expression_statement "iVar2 = 0;" (assignment_expression "iVar2 = 0" identifier = number_literal) ;) })) (return_statement "return iVar2;" return identifier ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nreg_errcode_t __regparm3 clean_state_log_if_needed(re_match_context_t *mctx,Idx next_state_log_idx)\n\n{\n  int iVar1;\n  int iVar2;\n  reg_errcode_t rVar3;\n  \n  iVar1 = mctx->state_log_top;\n  iVar2 = (mctx->input).bufs_len;\n  if ((((next_state_log_idx < iVar2) || ((mctx->input).len <= iVar2)) &&\n      ((iVar2 = (mctx->input).valid_len, next_state_log_idx < iVar2 || ((mctx->input).len <= iVar2))\n      )) || (rVar3 = extend_buffers(mctx,next_state_log_idx + 1), rVar3 == _REG_NOERROR)) {\n    if (iVar1 < next_state_log_idx) {\n      memset(mctx->state_log + iVar1 + 1,0,(next_state_log_idx - iVar1) * 4);\n      mctx->state_log_top = next_state_log_idx;\n    }\n    rVar3 = _REG_NOERROR;\n  }\n  return rVar3;\n}\n\n" comment (function_definition "reg_errcode_t __regparm3 clean_state_log_if_needed(re_match_context_t *mctx,Idx next_state_log_idx)\n\n{\n  int iVar1;\n  int iVar2;\n  reg_errcode_t rVar3;\n  \n  iVar1 = mctx->state_log_top;\n  iVar2 = (mctx->input).bufs_len;\n  if ((((next_state_log_idx < iVar2) || ((mctx->input).len <= iVar2)) &&\n      ((iVar2 = (mctx->input).valid_len, next_state_log_idx < iVar2 || ((mctx->input).len <= iVar2))\n      )) || (rVar3 = extend_buffers(mctx,next_state_log_idx + 1), rVar3 == _REG_NOERROR)) {\n    if (iVar1 < next_state_log_idx) {\n      memset(mctx->state_log + iVar1 + 1,0,(next_state_log_idx - iVar1) * 4);\n      mctx->state_log_top = next_state_log_idx;\n    }\n    rVar3 = _REG_NOERROR;\n  }\n  return rVar3;\n}" type_identifier (ERROR "__regparm3" identifier) (function_declarator "clean_state_log_if_needed(re_match_context_t *mctx,Idx next_state_log_idx)" identifier (parameter_list "(re_match_context_t *mctx,Idx next_state_log_idx)" ( (parameter_declaration "re_match_context_t *mctx" type_identifier (pointer_declarator "*mctx" * identifier)) , (parameter_declaration "Idx next_state_log_idx" type_identifier identifier) ))) (compound_statement "{\n  int iVar1;\n  int iVar2;\n  reg_errcode_t rVar3;\n  \n  iVar1 = mctx->state_log_top;\n  iVar2 = (mctx->input).bufs_len;\n  if ((((next_state_log_idx < iVar2) || ((mctx->input).len <= iVar2)) &&\n      ((iVar2 = (mctx->input).valid_len, next_state_log_idx < iVar2 || ((mctx->input).len <= iVar2))\n      )) || (rVar3 = extend_buffers(mctx,next_state_log_idx + 1), rVar3 == _REG_NOERROR)) {\n    if (iVar1 < next_state_log_idx) {\n      memset(mctx->state_log + iVar1 + 1,0,(next_state_log_idx - iVar1) * 4);\n      mctx->state_log_top = next_state_log_idx;\n    }\n    rVar3 = _REG_NOERROR;\n  }\n  return rVar3;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "reg_errcode_t rVar3;" type_identifier identifier ;) (expression_statement "iVar1 = mctx->state_log_top;" (assignment_expression "iVar1 = mctx->state_log_top" identifier = (field_expression "mctx->state_log_top" identifier -> field_identifier)) ;) (expression_statement "iVar2 = (mctx->input).bufs_len;" (assignment_expression "iVar2 = (mctx->input).bufs_len" identifier = (field_expression "(mctx->input).bufs_len" (parenthesized_expression "(mctx->input)" ( (field_expression "mctx->input" identifier -> field_identifier) )) . field_identifier)) ;) (if_statement "if ((((next_state_log_idx < iVar2) || ((mctx->input).len <= iVar2)) &&\n      ((iVar2 = (mctx->input).valid_len, next_state_log_idx < iVar2 || ((mctx->input).len <= iVar2))\n      )) || (rVar3 = extend_buffers(mctx,next_state_log_idx + 1), rVar3 == _REG_NOERROR)) {\n    if (iVar1 < next_state_log_idx) {\n      memset(mctx->state_log + iVar1 + 1,0,(next_state_log_idx - iVar1) * 4);\n      mctx->state_log_top = next_state_log_idx;\n    }\n    rVar3 = _REG_NOERROR;\n  }" if (parenthesized_expression "((((next_state_log_idx < iVar2) || ((mctx->input).len <= iVar2)) &&\n      ((iVar2 = (mctx->input).valid_len, next_state_log_idx < iVar2 || ((mctx->input).len <= iVar2))\n      )) || (rVar3 = extend_buffers(mctx,next_state_log_idx + 1), rVar3 == _REG_NOERROR))" ( (binary_expression "(((next_state_log_idx < iVar2) || ((mctx->input).len <= iVar2)) &&\n      ((iVar2 = (mctx->input).valid_len, next_state_log_idx < iVar2 || ((mctx->input).len <= iVar2))\n      )) || (rVar3 = extend_buffers(mctx,next_state_log_idx + 1), rVar3 == _REG_NOERROR)" (parenthesized_expression "(((next_state_log_idx < iVar2) || ((mctx->input).len <= iVar2)) &&\n      ((iVar2 = (mctx->input).valid_len, next_state_log_idx < iVar2 || ((mctx->input).len <= iVar2))\n      ))" ( (binary_expression "((next_state_log_idx < iVar2) || ((mctx->input).len <= iVar2)) &&\n      ((iVar2 = (mctx->input).valid_len, next_state_log_idx < iVar2 || ((mctx->input).len <= iVar2))\n      )" (parenthesized_expression "((next_state_log_idx < iVar2) || ((mctx->input).len <= iVar2))" ( (binary_expression "(next_state_log_idx < iVar2) || ((mctx->input).len <= iVar2)" (parenthesized_expression "(next_state_log_idx < iVar2)" ( (binary_expression "next_state_log_idx < iVar2" identifier < identifier) )) || (parenthesized_expression "((mctx->input).len <= iVar2)" ( (binary_expression "(mctx->input).len <= iVar2" (field_expression "(mctx->input).len" (parenthesized_expression "(mctx->input)" ( (field_expression "mctx->input" identifier -> field_identifier) )) . field_identifier) <= identifier) ))) )) && (parenthesized_expression "((iVar2 = (mctx->input).valid_len, next_state_log_idx < iVar2 || ((mctx->input).len <= iVar2))\n      )" ( (parenthesized_expression "(iVar2 = (mctx->input).valid_len, next_state_log_idx < iVar2 || ((mctx->input).len <= iVar2))" ( (comma_expression "iVar2 = (mctx->input).valid_len, next_state_log_idx < iVar2 || ((mctx->input).len <= iVar2)" (assignment_expression "iVar2 = (mctx->input).valid_len" identifier = (field_expression "(mctx->input).valid_len" (parenthesized_expression "(mctx->input)" ( (field_expression "mctx->input" identifier -> field_identifier) )) . field_identifier)) , (binary_expression "next_state_log_idx < iVar2 || ((mctx->input).len <= iVar2)" (binary_expression "next_state_log_idx < iVar2" identifier < identifier) || (parenthesized_expression "((mctx->input).len <= iVar2)" ( (binary_expression "(mctx->input).len <= iVar2" (field_expression "(mctx->input).len" (parenthesized_expression "(mctx->input)" ( (field_expression "mctx->input" identifier -> field_identifier) )) . field_identifier) <= identifier) )))) )) ))) )) || (parenthesized_expression "(rVar3 = extend_buffers(mctx,next_state_log_idx + 1), rVar3 == _REG_NOERROR)" ( (comma_expression "rVar3 = extend_buffers(mctx,next_state_log_idx + 1), rVar3 == _REG_NOERROR" (assignment_expression "rVar3 = extend_buffers(mctx,next_state_log_idx + 1)" identifier = (call_expression "extend_buffers(mctx,next_state_log_idx + 1)" identifier (argument_list "(mctx,next_state_log_idx + 1)" ( identifier , (binary_expression "next_state_log_idx + 1" identifier + number_literal) )))) , (binary_expression "rVar3 == _REG_NOERROR" identifier == identifier)) ))) )) (compound_statement "{\n    if (iVar1 < next_state_log_idx) {\n      memset(mctx->state_log + iVar1 + 1,0,(next_state_log_idx - iVar1) * 4);\n      mctx->state_log_top = next_state_log_idx;\n    }\n    rVar3 = _REG_NOERROR;\n  }" { (if_statement "if (iVar1 < next_state_log_idx) {\n      memset(mctx->state_log + iVar1 + 1,0,(next_state_log_idx - iVar1) * 4);\n      mctx->state_log_top = next_state_log_idx;\n    }" if (parenthesized_expression "(iVar1 < next_state_log_idx)" ( (binary_expression "iVar1 < next_state_log_idx" identifier < identifier) )) (compound_statement "{\n      memset(mctx->state_log + iVar1 + 1,0,(next_state_log_idx - iVar1) * 4);\n      mctx->state_log_top = next_state_log_idx;\n    }" { (expression_statement "memset(mctx->state_log + iVar1 + 1,0,(next_state_log_idx - iVar1) * 4);" (call_expression "memset(mctx->state_log + iVar1 + 1,0,(next_state_log_idx - iVar1) * 4)" identifier (argument_list "(mctx->state_log + iVar1 + 1,0,(next_state_log_idx - iVar1) * 4)" ( (binary_expression "mctx->state_log + iVar1 + 1" (binary_expression "mctx->state_log + iVar1" (field_expression "mctx->state_log" identifier -> field_identifier) + identifier) + number_literal) , number_literal , (binary_expression "(next_state_log_idx - iVar1) * 4" (parenthesized_expression "(next_state_log_idx - iVar1)" ( (binary_expression "next_state_log_idx - iVar1" identifier - identifier) )) * number_literal) ))) ;) (expression_statement "mctx->state_log_top = next_state_log_idx;" (assignment_expression "mctx->state_log_top = next_state_log_idx" (field_expression "mctx->state_log_top" identifier -> field_identifier) = identifier) ;) })) (expression_statement "rVar3 = _REG_NOERROR;" (assignment_expression "rVar3 = _REG_NOERROR" identifier = identifier) ;) })) (return_statement "return rVar3;" return identifier ;) })))
(translation_unit "int __regparm3 FUN_000181e0(int param_1,int param_2)\n\n{\n  int iVar1;\n  int iVar2;\n  \n  iVar1 = *(int *)(param_1 + 0x68);\n  if ((((param_2 < *(int *)(param_1 + 0x24)) ||\n       (*(int *)(param_1 + 0x30) <= *(int *)(param_1 + 0x24))) &&\n      ((param_2 < *(int *)(param_1 + 0x1c) || (*(int *)(param_1 + 0x30) <= *(int *)(param_1 + 0x1c))\n       ))) || (iVar2 = FUN_000180c0(param_1,param_2 + 1), iVar2 == 0)) {\n    if (iVar1 < param_2) {\n      memset((void *)(*(int *)(param_1 + 100) + 4 + iVar1 * 4),0,(param_2 - iVar1) * 4);\n      *(int *)(param_1 + 0x68) = param_2;\n    }\n    iVar2 = 0;\n  }\n  return iVar2;\n}\n\n" (function_definition "int __regparm3 FUN_000181e0(int param_1,int param_2)\n\n{\n  int iVar1;\n  int iVar2;\n  \n  iVar1 = *(int *)(param_1 + 0x68);\n  if ((((param_2 < *(int *)(param_1 + 0x24)) ||\n       (*(int *)(param_1 + 0x30) <= *(int *)(param_1 + 0x24))) &&\n      ((param_2 < *(int *)(param_1 + 0x1c) || (*(int *)(param_1 + 0x30) <= *(int *)(param_1 + 0x1c))\n       ))) || (iVar2 = FUN_000180c0(param_1,param_2 + 1), iVar2 == 0)) {\n    if (iVar1 < param_2) {\n      memset((void *)(*(int *)(param_1 + 100) + 4 + iVar1 * 4),0,(param_2 - iVar1) * 4);\n      *(int *)(param_1 + 0x68) = param_2;\n    }\n    iVar2 = 0;\n  }\n  return iVar2;\n}" primitive_type (ERROR "__regparm3" identifier) (function_declarator "FUN_000181e0(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  int iVar1;\n  int iVar2;\n  \n  iVar1 = *(int *)(param_1 + 0x68);\n  if ((((param_2 < *(int *)(param_1 + 0x24)) ||\n       (*(int *)(param_1 + 0x30) <= *(int *)(param_1 + 0x24))) &&\n      ((param_2 < *(int *)(param_1 + 0x1c) || (*(int *)(param_1 + 0x30) <= *(int *)(param_1 + 0x1c))\n       ))) || (iVar2 = FUN_000180c0(param_1,param_2 + 1), iVar2 == 0)) {\n    if (iVar1 < param_2) {\n      memset((void *)(*(int *)(param_1 + 100) + 4 + iVar1 * 4),0,(param_2 - iVar1) * 4);\n      *(int *)(param_1 + 0x68) = param_2;\n    }\n    iVar2 = 0;\n  }\n  return iVar2;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (expression_statement "iVar1 = *(int *)(param_1 + 0x68);" (assignment_expression "iVar1 = *(int *)(param_1 + 0x68)" identifier = (pointer_expression "*(int *)(param_1 + 0x68)" * (cast_expression "(int *)(param_1 + 0x68)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x68)" ( (binary_expression "param_1 + 0x68" identifier + number_literal) ))))) ;) (if_statement "if ((((param_2 < *(int *)(param_1 + 0x24)) ||\n       (*(int *)(param_1 + 0x30) <= *(int *)(param_1 + 0x24))) &&\n      ((param_2 < *(int *)(param_1 + 0x1c) || (*(int *)(param_1 + 0x30) <= *(int *)(param_1 + 0x1c))\n       ))) || (iVar2 = FUN_000180c0(param_1,param_2 + 1), iVar2 == 0)) {\n    if (iVar1 < param_2) {\n      memset((void *)(*(int *)(param_1 + 100) + 4 + iVar1 * 4),0,(param_2 - iVar1) * 4);\n      *(int *)(param_1 + 0x68) = param_2;\n    }\n    iVar2 = 0;\n  }" if (parenthesized_expression "((((param_2 < *(int *)(param_1 + 0x24)) ||\n       (*(int *)(param_1 + 0x30) <= *(int *)(param_1 + 0x24))) &&\n      ((param_2 < *(int *)(param_1 + 0x1c) || (*(int *)(param_1 + 0x30) <= *(int *)(param_1 + 0x1c))\n       ))) || (iVar2 = FUN_000180c0(param_1,param_2 + 1), iVar2 == 0))" ( (binary_expression "(((param_2 < *(int *)(param_1 + 0x24)) ||\n       (*(int *)(param_1 + 0x30) <= *(int *)(param_1 + 0x24))) &&\n      ((param_2 < *(int *)(param_1 + 0x1c) || (*(int *)(param_1 + 0x30) <= *(int *)(param_1 + 0x1c))\n       ))) || (iVar2 = FUN_000180c0(param_1,param_2 + 1), iVar2 == 0)" (parenthesized_expression "(((param_2 < *(int *)(param_1 + 0x24)) ||\n       (*(int *)(param_1 + 0x30) <= *(int *)(param_1 + 0x24))) &&\n      ((param_2 < *(int *)(param_1 + 0x1c) || (*(int *)(param_1 + 0x30) <= *(int *)(param_1 + 0x1c))\n       )))" ( (binary_expression "((param_2 < *(int *)(param_1 + 0x24)) ||\n       (*(int *)(param_1 + 0x30) <= *(int *)(param_1 + 0x24))) &&\n      ((param_2 < *(int *)(param_1 + 0x1c) || (*(int *)(param_1 + 0x30) <= *(int *)(param_1 + 0x1c))\n       ))" (parenthesized_expression "((param_2 < *(int *)(param_1 + 0x24)) ||\n       (*(int *)(param_1 + 0x30) <= *(int *)(param_1 + 0x24)))" ( (binary_expression "(param_2 < *(int *)(param_1 + 0x24)) ||\n       (*(int *)(param_1 + 0x30) <= *(int *)(param_1 + 0x24))" (parenthesized_expression "(param_2 < *(int *)(param_1 + 0x24))" ( (binary_expression "param_2 < *(int *)(param_1 + 0x24)" identifier < (pointer_expression "*(int *)(param_1 + 0x24)" * (cast_expression "(int *)(param_1 + 0x24)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x24)" ( (binary_expression "param_1 + 0x24" identifier + number_literal) ))))) )) || (parenthesized_expression "(*(int *)(param_1 + 0x30) <= *(int *)(param_1 + 0x24))" ( (binary_expression "*(int *)(param_1 + 0x30) <= *(int *)(param_1 + 0x24)" (pointer_expression "*(int *)(param_1 + 0x30)" * (cast_expression "(int *)(param_1 + 0x30)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x30)" ( (binary_expression "param_1 + 0x30" identifier + number_literal) )))) <= (pointer_expression "*(int *)(param_1 + 0x24)" * (cast_expression "(int *)(param_1 + 0x24)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x24)" ( (binary_expression "param_1 + 0x24" identifier + number_literal) ))))) ))) )) && (parenthesized_expression "((param_2 < *(int *)(param_1 + 0x1c) || (*(int *)(param_1 + 0x30) <= *(int *)(param_1 + 0x1c))\n       ))" ( (parenthesized_expression "(param_2 < *(int *)(param_1 + 0x1c) || (*(int *)(param_1 + 0x30) <= *(int *)(param_1 + 0x1c))\n       )" ( (binary_expression "param_2 < *(int *)(param_1 + 0x1c) || (*(int *)(param_1 + 0x30) <= *(int *)(param_1 + 0x1c))" (binary_expression "param_2 < *(int *)(param_1 + 0x1c)" identifier < (pointer_expression "*(int *)(param_1 + 0x1c)" * (cast_expression "(int *)(param_1 + 0x1c)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x1c)" ( (binary_expression "param_1 + 0x1c" identifier + number_literal) ))))) || (parenthesized_expression "(*(int *)(param_1 + 0x30) <= *(int *)(param_1 + 0x1c))" ( (binary_expression "*(int *)(param_1 + 0x30) <= *(int *)(param_1 + 0x1c)" (pointer_expression "*(int *)(param_1 + 0x30)" * (cast_expression "(int *)(param_1 + 0x30)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x30)" ( (binary_expression "param_1 + 0x30" identifier + number_literal) )))) <= (pointer_expression "*(int *)(param_1 + 0x1c)" * (cast_expression "(int *)(param_1 + 0x1c)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x1c)" ( (binary_expression "param_1 + 0x1c" identifier + number_literal) ))))) ))) )) ))) )) || (parenthesized_expression "(iVar2 = FUN_000180c0(param_1,param_2 + 1), iVar2 == 0)" ( (comma_expression "iVar2 = FUN_000180c0(param_1,param_2 + 1), iVar2 == 0" (assignment_expression "iVar2 = FUN_000180c0(param_1,param_2 + 1)" identifier = (call_expression "FUN_000180c0(param_1,param_2 + 1)" identifier (argument_list "(param_1,param_2 + 1)" ( identifier , (binary_expression "param_2 + 1" identifier + number_literal) )))) , (binary_expression "iVar2 == 0" identifier == number_literal)) ))) )) (compound_statement "{\n    if (iVar1 < param_2) {\n      memset((void *)(*(int *)(param_1 + 100) + 4 + iVar1 * 4),0,(param_2 - iVar1) * 4);\n      *(int *)(param_1 + 0x68) = param_2;\n    }\n    iVar2 = 0;\n  }" { (if_statement "if (iVar1 < param_2) {\n      memset((void *)(*(int *)(param_1 + 100) + 4 + iVar1 * 4),0,(param_2 - iVar1) * 4);\n      *(int *)(param_1 + 0x68) = param_2;\n    }" if (parenthesized_expression "(iVar1 < param_2)" ( (binary_expression "iVar1 < param_2" identifier < identifier) )) (compound_statement "{\n      memset((void *)(*(int *)(param_1 + 100) + 4 + iVar1 * 4),0,(param_2 - iVar1) * 4);\n      *(int *)(param_1 + 0x68) = param_2;\n    }" { (expression_statement "memset((void *)(*(int *)(param_1 + 100) + 4 + iVar1 * 4),0,(param_2 - iVar1) * 4);" (call_expression "memset((void *)(*(int *)(param_1 + 100) + 4 + iVar1 * 4),0,(param_2 - iVar1) * 4)" identifier (argument_list "((void *)(*(int *)(param_1 + 100) + 4 + iVar1 * 4),0,(param_2 - iVar1) * 4)" ( (cast_expression "(void *)(*(int *)(param_1 + 100) + 4 + iVar1 * 4)" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*(int *)(param_1 + 100) + 4 + iVar1 * 4)" ( (binary_expression "*(int *)(param_1 + 100) + 4 + iVar1 * 4" (binary_expression "*(int *)(param_1 + 100) + 4" (pointer_expression "*(int *)(param_1 + 100)" * (cast_expression "(int *)(param_1 + 100)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 100)" ( (binary_expression "param_1 + 100" identifier + number_literal) )))) + number_literal) + (binary_expression "iVar1 * 4" identifier * number_literal)) ))) , number_literal , (binary_expression "(param_2 - iVar1) * 4" (parenthesized_expression "(param_2 - iVar1)" ( (binary_expression "param_2 - iVar1" identifier - identifier) )) * number_literal) ))) ;) (expression_statement "*(int *)(param_1 + 0x68) = param_2;" (assignment_expression "*(int *)(param_1 + 0x68) = param_2" (pointer_expression "*(int *)(param_1 + 0x68)" * (cast_expression "(int *)(param_1 + 0x68)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x68)" ( (binary_expression "param_1 + 0x68" identifier + number_literal) )))) = identifier) ;) })) (expression_statement "iVar2 = 0;" (assignment_expression "iVar2 = 0" identifier = number_literal) ;) })) (return_statement "return iVar2;" 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 IDENT ;) (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT < (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) )) || (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) <= (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ))) )) && (parenthesized_expression ( (parenthesized_expression ( (binary_expression (binary_expression IDENT < (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) || (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) <= (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ))) )) ))) )) || (parenthesized_expression ( (comma_expression (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , (binary_expression IDENT + LIT) )))) , (binary_expression IDENT == LIT)) ))) )) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression IDENT < IDENT) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) + LIT) + (binary_expression IDENT * LIT)) ))) , LIT , (binary_expression (parenthesized_expression ( (binary_expression IDENT - IDENT) )) * LIT) ))) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = IDENT) ;) })) (expression_statement (assignment_expression IDENT = LIT) ;) })) (return_statement return IDENT ;) })))
(function_definition "int __regparm3 FUN_000181e0(int param_1,int param_2)\n\n{\n  int iVar1;\n  int iVar2;\n  \n  iVar1 = *(int *)(param_1 + 0x68);\n  if ((((param_2 < *(int *)(param_1 + 0x24)) ||\n       (*(int *)(param_1 + 0x30) <= *(int *)(param_1 + 0x24))) &&\n      ((param_2 < *(int *)(param_1 + 0x1c) || (*(int *)(param_1 + 0x30) <= *(int *)(param_1 + 0x1c))\n       ))) || (iVar2 = FUN_000180c0(param_1,param_2 + 1), iVar2 == 0)) {\n    if (iVar1 < param_2) {\n      memset((void *)(*(int *)(param_1 + 100) + 4 + iVar1 * 4),0,(param_2 - iVar1) * 4);\n      *(int *)(param_1 + 0x68) = param_2;\n    }\n    iVar2 = 0;\n  }\n  return iVar2;\n}" (primitive_type "int") (ERROR "__regparm3" (identifier "__regparm3")) (function_declarator "FUN_000181e0(int param_1,int param_2)" (identifier "FUN_000181e0") (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  int iVar1;\n  int iVar2;\n  \n  iVar1 = *(int *)(param_1 + 0x68);\n  if ((((param_2 < *(int *)(param_1 + 0x24)) ||\n       (*(int *)(param_1 + 0x30) <= *(int *)(param_1 + 0x24))) &&\n      ((param_2 < *(int *)(param_1 + 0x1c) || (*(int *)(param_1 + 0x30) <= *(int *)(param_1 + 0x1c))\n       ))) || (iVar2 = FUN_000180c0(param_1,param_2 + 1), iVar2 == 0)) {\n    if (iVar1 < param_2) {\n      memset((void *)(*(int *)(param_1 + 100) + 4 + iVar1 * 4),0,(param_2 - iVar1) * 4);\n      *(int *)(param_1 + 0x68) = param_2;\n    }\n    iVar2 = 0;\n  }\n  return iVar2;\n}" ({ "{") (declaration "int iVar1;" (primitive_type "int") (identifier "iVar1") (; ";")) (declaration "int iVar2;" (primitive_type "int") (identifier "iVar2") (; ";")) (expression_statement "iVar1 = *(int *)(param_1 + 0x68);" (assignment_expression "iVar1 = *(int *)(param_1 + 0x68)" (identifier "iVar1") (= "=") (pointer_expression "*(int *)(param_1 + 0x68)" (* "*") (cast_expression "(int *)(param_1 + 0x68)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x68)" (( "(") (binary_expression "param_1 + 0x68" (identifier "param_1") (+ "+") (number_literal "0x68")) () ")"))))) (; ";")) (if_statement "if ((((param_2 < *(int *)(param_1 + 0x24)) ||\n       (*(int *)(param_1 + 0x30) <= *(int *)(param_1 + 0x24))) &&\n      ((param_2 < *(int *)(param_1 + 0x1c) || (*(int *)(param_1 + 0x30) <= *(int *)(param_1 + 0x1c))\n       ))) || (iVar2 = FUN_000180c0(param_1,param_2 + 1), iVar2 == 0)) {\n    if (iVar1 < param_2) {\n      memset((void *)(*(int *)(param_1 + 100) + 4 + iVar1 * 4),0,(param_2 - iVar1) * 4);\n      *(int *)(param_1 + 0x68) = param_2;\n    }\n    iVar2 = 0;\n  }" (if "if") (parenthesized_expression "((((param_2 < *(int *)(param_1 + 0x24)) ||\n       (*(int *)(param_1 + 0x30) <= *(int *)(param_1 + 0x24))) &&\n      ((param_2 < *(int *)(param_1 + 0x1c) || (*(int *)(param_1 + 0x30) <= *(int *)(param_1 + 0x1c))\n       ))) || (iVar2 = FUN_000180c0(param_1,param_2 + 1), iVar2 == 0))" (( "(") (binary_expression "(((param_2 < *(int *)(param_1 + 0x24)) ||\n       (*(int *)(param_1 + 0x30) <= *(int *)(param_1 + 0x24))) &&\n      ((param_2 < *(int *)(param_1 + 0x1c) || (*(int *)(param_1 + 0x30) <= *(int *)(param_1 + 0x1c))\n       ))) || (iVar2 = FUN_000180c0(param_1,param_2 + 1), iVar2 == 0)" (parenthesized_expression "(((param_2 < *(int *)(param_1 + 0x24)) ||\n       (*(int *)(param_1 + 0x30) <= *(int *)(param_1 + 0x24))) &&\n      ((param_2 < *(int *)(param_1 + 0x1c) || (*(int *)(param_1 + 0x30) <= *(int *)(param_1 + 0x1c))\n       )))" (( "(") (binary_expression "((param_2 < *(int *)(param_1 + 0x24)) ||\n       (*(int *)(param_1 + 0x30) <= *(int *)(param_1 + 0x24))) &&\n      ((param_2 < *(int *)(param_1 + 0x1c) || (*(int *)(param_1 + 0x30) <= *(int *)(param_1 + 0x1c))\n       ))" (parenthesized_expression "((param_2 < *(int *)(param_1 + 0x24)) ||\n       (*(int *)(param_1 + 0x30) <= *(int *)(param_1 + 0x24)))" (( "(") (binary_expression "(param_2 < *(int *)(param_1 + 0x24)) ||\n       (*(int *)(param_1 + 0x30) <= *(int *)(param_1 + 0x24))" (parenthesized_expression "(param_2 < *(int *)(param_1 + 0x24))" (( "(") (binary_expression "param_2 < *(int *)(param_1 + 0x24)" (identifier "param_2") (< "<") (pointer_expression "*(int *)(param_1 + 0x24)" (* "*") (cast_expression "(int *)(param_1 + 0x24)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x24)" (( "(") (binary_expression "param_1 + 0x24" (identifier "param_1") (+ "+") (number_literal "0x24")) () ")"))))) () ")")) (|| "||") (parenthesized_expression "(*(int *)(param_1 + 0x30) <= *(int *)(param_1 + 0x24))" (( "(") (binary_expression "*(int *)(param_1 + 0x30) <= *(int *)(param_1 + 0x24)" (pointer_expression "*(int *)(param_1 + 0x30)" (* "*") (cast_expression "(int *)(param_1 + 0x30)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x30)" (( "(") (binary_expression "param_1 + 0x30" (identifier "param_1") (+ "+") (number_literal "0x30")) () ")")))) (<= "<=") (pointer_expression "*(int *)(param_1 + 0x24)" (* "*") (cast_expression "(int *)(param_1 + 0x24)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x24)" (( "(") (binary_expression "param_1 + 0x24" (identifier "param_1") (+ "+") (number_literal "0x24")) () ")"))))) () ")"))) () ")")) (&& "&&") (parenthesized_expression "((param_2 < *(int *)(param_1 + 0x1c) || (*(int *)(param_1 + 0x30) <= *(int *)(param_1 + 0x1c))\n       ))" (( "(") (parenthesized_expression "(param_2 < *(int *)(param_1 + 0x1c) || (*(int *)(param_1 + 0x30) <= *(int *)(param_1 + 0x1c))\n       )" (( "(") (binary_expression "param_2 < *(int *)(param_1 + 0x1c) || (*(int *)(param_1 + 0x30) <= *(int *)(param_1 + 0x1c))" (binary_expression "param_2 < *(int *)(param_1 + 0x1c)" (identifier "param_2") (< "<") (pointer_expression "*(int *)(param_1 + 0x1c)" (* "*") (cast_expression "(int *)(param_1 + 0x1c)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x1c)" (( "(") (binary_expression "param_1 + 0x1c" (identifier "param_1") (+ "+") (number_literal "0x1c")) () ")"))))) (|| "||") (parenthesized_expression "(*(int *)(param_1 + 0x30) <= *(int *)(param_1 + 0x1c))" (( "(") (binary_expression "*(int *)(param_1 + 0x30) <= *(int *)(param_1 + 0x1c)" (pointer_expression "*(int *)(param_1 + 0x30)" (* "*") (cast_expression "(int *)(param_1 + 0x30)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x30)" (( "(") (binary_expression "param_1 + 0x30" (identifier "param_1") (+ "+") (number_literal "0x30")) () ")")))) (<= "<=") (pointer_expression "*(int *)(param_1 + 0x1c)" (* "*") (cast_expression "(int *)(param_1 + 0x1c)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x1c)" (( "(") (binary_expression "param_1 + 0x1c" (identifier "param_1") (+ "+") (number_literal "0x1c")) () ")"))))) () ")"))) () ")")) () ")"))) () ")")) (|| "||") (parenthesized_expression "(iVar2 = FUN_000180c0(param_1,param_2 + 1), iVar2 == 0)" (( "(") (comma_expression "iVar2 = FUN_000180c0(param_1,param_2 + 1), iVar2 == 0" (assignment_expression "iVar2 = FUN_000180c0(param_1,param_2 + 1)" (identifier "iVar2") (= "=") (call_expression "FUN_000180c0(param_1,param_2 + 1)" (identifier "FUN_000180c0") (argument_list "(param_1,param_2 + 1)" (( "(") (identifier "param_1") (, ",") (binary_expression "param_2 + 1" (identifier "param_2") (+ "+") (number_literal "1")) () ")")))) (, ",") (binary_expression "iVar2 == 0" (identifier "iVar2") (== "==") (number_literal "0"))) () ")"))) () ")")) (compound_statement "{\n    if (iVar1 < param_2) {\n      memset((void *)(*(int *)(param_1 + 100) + 4 + iVar1 * 4),0,(param_2 - iVar1) * 4);\n      *(int *)(param_1 + 0x68) = param_2;\n    }\n    iVar2 = 0;\n  }" ({ "{") (if_statement "if (iVar1 < param_2) {\n      memset((void *)(*(int *)(param_1 + 100) + 4 + iVar1 * 4),0,(param_2 - iVar1) * 4);\n      *(int *)(param_1 + 0x68) = param_2;\n    }" (if "if") (parenthesized_expression "(iVar1 < param_2)" (( "(") (binary_expression "iVar1 < param_2" (identifier "iVar1") (< "<") (identifier "param_2")) () ")")) (compound_statement "{\n      memset((void *)(*(int *)(param_1 + 100) + 4 + iVar1 * 4),0,(param_2 - iVar1) * 4);\n      *(int *)(param_1 + 0x68) = param_2;\n    }" ({ "{") (expression_statement "memset((void *)(*(int *)(param_1 + 100) + 4 + iVar1 * 4),0,(param_2 - iVar1) * 4);" (call_expression "memset((void *)(*(int *)(param_1 + 100) + 4 + iVar1 * 4),0,(param_2 - iVar1) * 4)" (identifier "memset") (argument_list "((void *)(*(int *)(param_1 + 100) + 4 + iVar1 * 4),0,(param_2 - iVar1) * 4)" (( "(") (cast_expression "(void *)(*(int *)(param_1 + 100) + 4 + iVar1 * 4)" (( "(") (type_descriptor "void *" (primitive_type "void") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(*(int *)(param_1 + 100) + 4 + iVar1 * 4)" (( "(") (binary_expression "*(int *)(param_1 + 100) + 4 + iVar1 * 4" (binary_expression "*(int *)(param_1 + 100) + 4" (pointer_expression "*(int *)(param_1 + 100)" (* "*") (cast_expression "(int *)(param_1 + 100)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 100)" (( "(") (binary_expression "param_1 + 100" (identifier "param_1") (+ "+") (number_literal "100")) () ")")))) (+ "+") (number_literal "4")) (+ "+") (binary_expression "iVar1 * 4" (identifier "iVar1") (* "*") (number_literal "4"))) () ")"))) (, ",") (number_literal "0") (, ",") (binary_expression "(param_2 - iVar1) * 4" (parenthesized_expression "(param_2 - iVar1)" (( "(") (binary_expression "param_2 - iVar1" (identifier "param_2") (- "-") (identifier "iVar1")) () ")")) (* "*") (number_literal "4")) () ")"))) (; ";")) (expression_statement "*(int *)(param_1 + 0x68) = param_2;" (assignment_expression "*(int *)(param_1 + 0x68) = param_2" (pointer_expression "*(int *)(param_1 + 0x68)" (* "*") (cast_expression "(int *)(param_1 + 0x68)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x68)" (( "(") (binary_expression "param_1 + 0x68" (identifier "param_1") (+ "+") (number_literal "0x68")) () ")")))) (= "=") (identifier "param_2")) (; ";")) (} "}"))) (expression_statement "iVar2 = 0;" (assignment_expression "iVar2 = 0" (identifier "iVar2") (= "=") (number_literal "0")) (; ";")) (} "}"))) (return_statement "return iVar2;" (return "return") (identifier "iVar2") (; ";")) (} "}")))

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

type_1 __regparm3 function_1(type_2 *mctx,type_3 var_1)

{
  int var_6;
  int var_2;
  type_1 var_4;
  
  var_6 = mctx->state_log_top;
  var_2 = (mctx->input).bufs_len;
  if ((((var_1 < var_2) || ((mctx->input).len <= var_2)) &&
      ((var_2 = (mctx->input).valid_len, var_1 < var_2 || ((mctx->input).len <= var_2))
      )) || (var_4 = var_3(mctx,var_1 + 1), var_4 == var_5)) {
    if (var_6 < var_1) {
      var_7(mctx->state_log + var_6 + 1,0,(var_1 - var_6) * 4);
      mctx->state_log_top = var_1;
    }
    var_4 = var_5;
  }
  return var_4;
}


(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: (primitive_type) declarator: (identifier)) (declaration type: (primitive_type) declarator: (identifier)) (expression_statement (assignment_expression left: (identifier) right: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))))) (if_statement condition: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_expression left: (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))))))) right: (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: (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: (parenthesized_expression (parenthesized_expression (binary_expression left: (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)))))) right: (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: (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: (parenthesized_expression (comma_expression left: (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (identifier) (binary_expression left: (identifier) right: (number_literal))))) right: (binary_expression left: (identifier) right: (number_literal)))))) consequence: (compound_statement (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))) consequence: (compound_statement (expression_statement (call_expression function: (identifier) arguments: (argument_list (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (binary_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) right: (number_literal)) right: (binary_expression left: (identifier) right: (number_literal))))) (number_literal) (binary_expression left: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))) right: (number_literal))))) (expression_statement (assignment_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: (identifier))))) (expression_statement (assignment_expression left: (identifier) right: (number_literal))))) (return_statement (identifier)))))

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

int __regparm3 MASKED(int param_1,int param_2)

{
  int iVar1;
  int iVar2;
  
  iVar1 = *(int *)(param_1 + 0x68);
  if ((((param_2 < *(int *)(param_1 + 0x24)) ||
       (*(int *)(param_1 + 0x30) <= *(int *)(param_1 + 0x24))) &&
      ((param_2 < *(int *)(param_1 + 0x1c) || (*(int *)(param_1 + 0x30) <= *(int *)(param_1 + 0x1c))
       ))) || (iVar2 = FUN_000180c0(param_1,param_2 + 1), iVar2 == 0)) {
    if (iVar1 < param_2) {
      memset((void *)(*(int *)(param_1 + 100) + 4 + iVar1 * 4),0,(param_2 - iVar1) * 4);
      *(int *)(param_1 + 0x68) = param_2;
    }
    iVar2 = 0;
  }
  return iVar2;
}

