
reg_errcode_t clean_state_log_if_needed(re_match_context_t *mctx,Idx next_state_log_idx)

{
  long lVar1;
  long lVar2;
  reg_errcode_t rVar3;
  
  lVar1 = mctx->state_log_top;
  lVar2 = (mctx->input).bufs_len;
  if ((((lVar2 <= next_state_log_idx) && (lVar2 < (mctx->input).len)) ||
      ((lVar2 = (mctx->input).valid_len, lVar2 <= next_state_log_idx && (lVar2 < (mctx->input).len))
      )) && (rVar3 = extend_buffers(mctx,(int)next_state_log_idx + L'\x01'), rVar3 != _REG_NOERROR))
  {
    return rVar3;
  }
  if (lVar1 < next_state_log_idx) {
    memset(mctx->state_log + lVar1 + 1,0,(next_state_log_idx - lVar1) * 8);
    mctx->state_log_top = next_state_log_idx;
  }
  return _REG_NOERROR;
}



undefined8 FUN_001102a0(long param_1,long param_2)

{
  long lVar1;
  undefined8 uVar2;
  
  lVar1 = *(long *)(param_1 + 0xc0);
  if ((((*(long *)(param_1 + 0x40) <= param_2) &&
       (*(long *)(param_1 + 0x40) < *(long *)(param_1 + 0x58))) ||
      ((*(long *)(param_1 + 0x30) <= param_2 &&
       (*(long *)(param_1 + 0x30) < *(long *)(param_1 + 0x58))))) &&
     (uVar2 = FUN_001101d3(param_1,(int)param_2 + 1), (int)uVar2 != 0)) {
    return uVar2;
  }
  if (lVar1 < param_2) {
    memset((void *)(*(long *)(param_1 + 0xb8) + 8 + lVar1 * 8),0,(param_2 - lVar1) * 8);
    *(long *)(param_1 + 0xc0) = param_2;
  }
  return 0;
}


PUSH R12
PUSH RBP
PUSH RBX
MOV RBX,RDI
MOV RBP,RSI
MOV R12,qword ptr [RDI + 0xc0]
MOV RAX,qword ptr [RDI + 0x40]
CMP RAX,RSI
JG 0x001102c0
CMP RAX,qword ptr [RDI + 0x58]
JL 0x001102cf
MOV RAX,qword ptr [RBX + 0x30]
CMP RAX,RBP
JG 0x001102de
CMP RAX,qword ptr [RBX + 0x58]
JGE 0x001102de
LEA ESI,[RBP + 0x1]
MOV RDI,RBX
CALL 0x001101d3
TEST EAX,EAX
JNZ 0x001102e8
MOV EAX,0x0
CMP R12,RBP
JL 0x001102ed
POP RBX
POP RBP
POP R12
RET
MOV RDX,RBP
SUB RDX,R12
SHL RDX,0x3
MOV RAX,qword ptr [RBX + 0xb8]
LEA RDI,[RAX + R12*0x8 + 0x8]
MOV ESI,0x0
CALL 0x00103270
MOV qword ptr [RBX + 0xc0],RBP
MOV EAX,0x0
JMP 0x001102e8
(translation_unit "undefined8 FUN_001102a0(long param_1,long param_2)\n\n{\n  long lVar1;\n  undefined8 uVar2;\n  \n  lVar1 = *(long *)(param_1 + 0xc0);\n  if ((((*(long *)(param_1 + 0x40) <= param_2) &&\n       (*(long *)(param_1 + 0x40) < *(long *)(param_1 + 0x58))) ||\n      ((*(long *)(param_1 + 0x30) <= param_2 &&\n       (*(long *)(param_1 + 0x30) < *(long *)(param_1 + 0x58))))) &&\n     (uVar2 = FUN_001101d3(param_1,(int)param_2 + 1), (int)uVar2 != 0)) {\n    return uVar2;\n  }\n  if (lVar1 < param_2) {\n    memset((void *)(*(long *)(param_1 + 0xb8) + 8 + lVar1 * 8),0,(param_2 - lVar1) * 8);\n    *(long *)(param_1 + 0xc0) = param_2;\n  }\n  return 0;\n}\n\n" (function_definition "undefined8 FUN_001102a0(long param_1,long param_2)\n\n{\n  long lVar1;\n  undefined8 uVar2;\n  \n  lVar1 = *(long *)(param_1 + 0xc0);\n  if ((((*(long *)(param_1 + 0x40) <= param_2) &&\n       (*(long *)(param_1 + 0x40) < *(long *)(param_1 + 0x58))) ||\n      ((*(long *)(param_1 + 0x30) <= param_2 &&\n       (*(long *)(param_1 + 0x30) < *(long *)(param_1 + 0x58))))) &&\n     (uVar2 = FUN_001101d3(param_1,(int)param_2 + 1), (int)uVar2 != 0)) {\n    return uVar2;\n  }\n  if (lVar1 < param_2) {\n    memset((void *)(*(long *)(param_1 + 0xb8) + 8 + lVar1 * 8),0,(param_2 - lVar1) * 8);\n    *(long *)(param_1 + 0xc0) = param_2;\n  }\n  return 0;\n}" type_identifier (function_declarator "FUN_001102a0(long param_1,long param_2)" identifier (parameter_list "(long param_1,long param_2)" ( (parameter_declaration "long param_1" (sized_type_specifier "long" long) identifier) , (parameter_declaration "long param_2" (sized_type_specifier "long" long) identifier) ))) (compound_statement "{\n  long lVar1;\n  undefined8 uVar2;\n  \n  lVar1 = *(long *)(param_1 + 0xc0);\n  if ((((*(long *)(param_1 + 0x40) <= param_2) &&\n       (*(long *)(param_1 + 0x40) < *(long *)(param_1 + 0x58))) ||\n      ((*(long *)(param_1 + 0x30) <= param_2 &&\n       (*(long *)(param_1 + 0x30) < *(long *)(param_1 + 0x58))))) &&\n     (uVar2 = FUN_001101d3(param_1,(int)param_2 + 1), (int)uVar2 != 0)) {\n    return uVar2;\n  }\n  if (lVar1 < param_2) {\n    memset((void *)(*(long *)(param_1 + 0xb8) + 8 + lVar1 * 8),0,(param_2 - lVar1) * 8);\n    *(long *)(param_1 + 0xc0) = param_2;\n  }\n  return 0;\n}" { (declaration "long lVar1;" (sized_type_specifier "long" long) identifier ;) (declaration "undefined8 uVar2;" type_identifier identifier ;) (expression_statement "lVar1 = *(long *)(param_1 + 0xc0);" (assignment_expression "lVar1 = *(long *)(param_1 + 0xc0)" identifier = (pointer_expression "*(long *)(param_1 + 0xc0)" * (cast_expression "(long *)(param_1 + 0xc0)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0xc0)" ( (binary_expression "param_1 + 0xc0" identifier + number_literal) ))))) ;) (if_statement "if ((((*(long *)(param_1 + 0x40) <= param_2) &&\n       (*(long *)(param_1 + 0x40) < *(long *)(param_1 + 0x58))) ||\n      ((*(long *)(param_1 + 0x30) <= param_2 &&\n       (*(long *)(param_1 + 0x30) < *(long *)(param_1 + 0x58))))) &&\n     (uVar2 = FUN_001101d3(param_1,(int)param_2 + 1), (int)uVar2 != 0)) {\n    return uVar2;\n  }" if (parenthesized_expression "((((*(long *)(param_1 + 0x40) <= param_2) &&\n       (*(long *)(param_1 + 0x40) < *(long *)(param_1 + 0x58))) ||\n      ((*(long *)(param_1 + 0x30) <= param_2 &&\n       (*(long *)(param_1 + 0x30) < *(long *)(param_1 + 0x58))))) &&\n     (uVar2 = FUN_001101d3(param_1,(int)param_2 + 1), (int)uVar2 != 0))" ( (binary_expression "(((*(long *)(param_1 + 0x40) <= param_2) &&\n       (*(long *)(param_1 + 0x40) < *(long *)(param_1 + 0x58))) ||\n      ((*(long *)(param_1 + 0x30) <= param_2 &&\n       (*(long *)(param_1 + 0x30) < *(long *)(param_1 + 0x58))))) &&\n     (uVar2 = FUN_001101d3(param_1,(int)param_2 + 1), (int)uVar2 != 0)" (parenthesized_expression "(((*(long *)(param_1 + 0x40) <= param_2) &&\n       (*(long *)(param_1 + 0x40) < *(long *)(param_1 + 0x58))) ||\n      ((*(long *)(param_1 + 0x30) <= param_2 &&\n       (*(long *)(param_1 + 0x30) < *(long *)(param_1 + 0x58)))))" ( (binary_expression "((*(long *)(param_1 + 0x40) <= param_2) &&\n       (*(long *)(param_1 + 0x40) < *(long *)(param_1 + 0x58))) ||\n      ((*(long *)(param_1 + 0x30) <= param_2 &&\n       (*(long *)(param_1 + 0x30) < *(long *)(param_1 + 0x58))))" (parenthesized_expression "((*(long *)(param_1 + 0x40) <= param_2) &&\n       (*(long *)(param_1 + 0x40) < *(long *)(param_1 + 0x58)))" ( (binary_expression "(*(long *)(param_1 + 0x40) <= param_2) &&\n       (*(long *)(param_1 + 0x40) < *(long *)(param_1 + 0x58))" (parenthesized_expression "(*(long *)(param_1 + 0x40) <= param_2)" ( (binary_expression "*(long *)(param_1 + 0x40) <= param_2" (pointer_expression "*(long *)(param_1 + 0x40)" * (cast_expression "(long *)(param_1 + 0x40)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x40)" ( (binary_expression "param_1 + 0x40" identifier + number_literal) )))) <= identifier) )) && (parenthesized_expression "(*(long *)(param_1 + 0x40) < *(long *)(param_1 + 0x58))" ( (binary_expression "*(long *)(param_1 + 0x40) < *(long *)(param_1 + 0x58)" (pointer_expression "*(long *)(param_1 + 0x40)" * (cast_expression "(long *)(param_1 + 0x40)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x40)" ( (binary_expression "param_1 + 0x40" identifier + number_literal) )))) < (pointer_expression "*(long *)(param_1 + 0x58)" * (cast_expression "(long *)(param_1 + 0x58)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x58)" ( (binary_expression "param_1 + 0x58" identifier + number_literal) ))))) ))) )) || (parenthesized_expression "((*(long *)(param_1 + 0x30) <= param_2 &&\n       (*(long *)(param_1 + 0x30) < *(long *)(param_1 + 0x58))))" ( (parenthesized_expression "(*(long *)(param_1 + 0x30) <= param_2 &&\n       (*(long *)(param_1 + 0x30) < *(long *)(param_1 + 0x58)))" ( (binary_expression "*(long *)(param_1 + 0x30) <= param_2 &&\n       (*(long *)(param_1 + 0x30) < *(long *)(param_1 + 0x58))" (binary_expression "*(long *)(param_1 + 0x30) <= param_2" (pointer_expression "*(long *)(param_1 + 0x30)" * (cast_expression "(long *)(param_1 + 0x30)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x30)" ( (binary_expression "param_1 + 0x30" identifier + number_literal) )))) <= identifier) && (parenthesized_expression "(*(long *)(param_1 + 0x30) < *(long *)(param_1 + 0x58))" ( (binary_expression "*(long *)(param_1 + 0x30) < *(long *)(param_1 + 0x58)" (pointer_expression "*(long *)(param_1 + 0x30)" * (cast_expression "(long *)(param_1 + 0x30)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x30)" ( (binary_expression "param_1 + 0x30" identifier + number_literal) )))) < (pointer_expression "*(long *)(param_1 + 0x58)" * (cast_expression "(long *)(param_1 + 0x58)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x58)" ( (binary_expression "param_1 + 0x58" identifier + number_literal) ))))) ))) )) ))) )) && (parenthesized_expression "(uVar2 = FUN_001101d3(param_1,(int)param_2 + 1), (int)uVar2 != 0)" ( (comma_expression "uVar2 = FUN_001101d3(param_1,(int)param_2 + 1), (int)uVar2 != 0" (assignment_expression "uVar2 = FUN_001101d3(param_1,(int)param_2 + 1)" identifier = (call_expression "FUN_001101d3(param_1,(int)param_2 + 1)" identifier (argument_list "(param_1,(int)param_2 + 1)" ( identifier , (binary_expression "(int)param_2 + 1" (cast_expression "(int)param_2" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal) )))) , (binary_expression "(int)uVar2 != 0" (cast_expression "(int)uVar2" ( (type_descriptor "int" primitive_type) ) identifier) != number_literal)) ))) )) (compound_statement "{\n    return uVar2;\n  }" { (return_statement "return uVar2;" return identifier ;) })) (if_statement "if (lVar1 < param_2) {\n    memset((void *)(*(long *)(param_1 + 0xb8) + 8 + lVar1 * 8),0,(param_2 - lVar1) * 8);\n    *(long *)(param_1 + 0xc0) = param_2;\n  }" if (parenthesized_expression "(lVar1 < param_2)" ( (binary_expression "lVar1 < param_2" identifier < identifier) )) (compound_statement "{\n    memset((void *)(*(long *)(param_1 + 0xb8) + 8 + lVar1 * 8),0,(param_2 - lVar1) * 8);\n    *(long *)(param_1 + 0xc0) = param_2;\n  }" { (expression_statement "memset((void *)(*(long *)(param_1 + 0xb8) + 8 + lVar1 * 8),0,(param_2 - lVar1) * 8);" (call_expression "memset((void *)(*(long *)(param_1 + 0xb8) + 8 + lVar1 * 8),0,(param_2 - lVar1) * 8)" identifier (argument_list "((void *)(*(long *)(param_1 + 0xb8) + 8 + lVar1 * 8),0,(param_2 - lVar1) * 8)" ( (cast_expression "(void *)(*(long *)(param_1 + 0xb8) + 8 + lVar1 * 8)" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*(long *)(param_1 + 0xb8) + 8 + lVar1 * 8)" ( (binary_expression "*(long *)(param_1 + 0xb8) + 8 + lVar1 * 8" (binary_expression "*(long *)(param_1 + 0xb8) + 8" (pointer_expression "*(long *)(param_1 + 0xb8)" * (cast_expression "(long *)(param_1 + 0xb8)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0xb8)" ( (binary_expression "param_1 + 0xb8" identifier + number_literal) )))) + number_literal) + (binary_expression "lVar1 * 8" identifier * number_literal)) ))) , number_literal , (binary_expression "(param_2 - lVar1) * 8" (parenthesized_expression "(param_2 - lVar1)" ( (binary_expression "param_2 - lVar1" identifier - identifier) )) * number_literal) ))) ;) (expression_statement "*(long *)(param_1 + 0xc0) = param_2;" (assignment_expression "*(long *)(param_1 + 0xc0) = param_2" (pointer_expression "*(long *)(param_1 + 0xc0)" * (cast_expression "(long *)(param_1 + 0xc0)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0xc0)" ( (binary_expression "param_1 + 0xc0" identifier + number_literal) )))) = identifier) ;) })) (return_statement "return 0;" return number_literal ;) })))
(translation_unit "reg_errcode_t clean_state_log_if_needed(re_match_context_t *mctx,Idx next_state_log_idx)\n\n{\n  long lVar1;\n  long lVar2;\n  reg_errcode_t rVar3;\n  \n  lVar1 = mctx->state_log_top;\n  lVar2 = (mctx->input).bufs_len;\n  if ((((lVar2 <= next_state_log_idx) && (lVar2 < (mctx->input).len)) ||\n      ((lVar2 = (mctx->input).valid_len, lVar2 <= next_state_log_idx && (lVar2 < (mctx->input).len))\n      )) && (rVar3 = extend_buffers(mctx,(int)next_state_log_idx + L'\x01'), rVar3 != _REG_NOERROR))\n  {\n    return rVar3;\n  }\n  if (lVar1 < next_state_log_idx) {\n    memset(mctx->state_log + lVar1 + 1,0,(next_state_log_idx - lVar1) * 8);\n    mctx->state_log_top = next_state_log_idx;\n  }\n  return _REG_NOERROR;\n}\n\n" (function_definition "reg_errcode_t clean_state_log_if_needed(re_match_context_t *mctx,Idx next_state_log_idx)\n\n{\n  long lVar1;\n  long lVar2;\n  reg_errcode_t rVar3;\n  \n  lVar1 = mctx->state_log_top;\n  lVar2 = (mctx->input).bufs_len;\n  if ((((lVar2 <= next_state_log_idx) && (lVar2 < (mctx->input).len)) ||\n      ((lVar2 = (mctx->input).valid_len, lVar2 <= next_state_log_idx && (lVar2 < (mctx->input).len))\n      )) && (rVar3 = extend_buffers(mctx,(int)next_state_log_idx + L'\x01'), rVar3 != _REG_NOERROR))\n  {\n    return rVar3;\n  }\n  if (lVar1 < next_state_log_idx) {\n    memset(mctx->state_log + lVar1 + 1,0,(next_state_log_idx - lVar1) * 8);\n    mctx->state_log_top = next_state_log_idx;\n  }\n  return _REG_NOERROR;\n}" type_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  long lVar1;\n  long lVar2;\n  reg_errcode_t rVar3;\n  \n  lVar1 = mctx->state_log_top;\n  lVar2 = (mctx->input).bufs_len;\n  if ((((lVar2 <= next_state_log_idx) && (lVar2 < (mctx->input).len)) ||\n      ((lVar2 = (mctx->input).valid_len, lVar2 <= next_state_log_idx && (lVar2 < (mctx->input).len))\n      )) && (rVar3 = extend_buffers(mctx,(int)next_state_log_idx + L'\x01'), rVar3 != _REG_NOERROR))\n  {\n    return rVar3;\n  }\n  if (lVar1 < next_state_log_idx) {\n    memset(mctx->state_log + lVar1 + 1,0,(next_state_log_idx - lVar1) * 8);\n    mctx->state_log_top = next_state_log_idx;\n  }\n  return _REG_NOERROR;\n}" { (declaration "long lVar1;" (sized_type_specifier "long" long) identifier ;) (declaration "long lVar2;" (sized_type_specifier "long" long) identifier ;) (declaration "reg_errcode_t rVar3;" type_identifier identifier ;) (expression_statement "lVar1 = mctx->state_log_top;" (assignment_expression "lVar1 = mctx->state_log_top" identifier = (field_expression "mctx->state_log_top" identifier -> field_identifier)) ;) (expression_statement "lVar2 = (mctx->input).bufs_len;" (assignment_expression "lVar2 = (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 ((((lVar2 <= next_state_log_idx) && (lVar2 < (mctx->input).len)) ||\n      ((lVar2 = (mctx->input).valid_len, lVar2 <= next_state_log_idx && (lVar2 < (mctx->input).len))\n      )) && (rVar3 = extend_buffers(mctx,(int)next_state_log_idx + L'\x01'), rVar3 != _REG_NOERROR))\n  {\n    return rVar3;\n  }" if (parenthesized_expression "((((lVar2 <= next_state_log_idx) && (lVar2 < (mctx->input).len)) ||\n      ((lVar2 = (mctx->input).valid_len, lVar2 <= next_state_log_idx && (lVar2 < (mctx->input).len))\n      )) && (rVar3 = extend_buffers(mctx,(int)next_state_log_idx + L'\x01'), rVar3 != _REG_NOERROR))" ( (binary_expression "(((lVar2 <= next_state_log_idx) && (lVar2 < (mctx->input).len)) ||\n      ((lVar2 = (mctx->input).valid_len, lVar2 <= next_state_log_idx && (lVar2 < (mctx->input).len))\n      )) && (rVar3 = extend_buffers(mctx,(int)next_state_log_idx + L'\x01'), rVar3 != _REG_NOERROR)" (parenthesized_expression "(((lVar2 <= next_state_log_idx) && (lVar2 < (mctx->input).len)) ||\n      ((lVar2 = (mctx->input).valid_len, lVar2 <= next_state_log_idx && (lVar2 < (mctx->input).len))\n      ))" ( (binary_expression "((lVar2 <= next_state_log_idx) && (lVar2 < (mctx->input).len)) ||\n      ((lVar2 = (mctx->input).valid_len, lVar2 <= next_state_log_idx && (lVar2 < (mctx->input).len))\n      )" (parenthesized_expression "((lVar2 <= next_state_log_idx) && (lVar2 < (mctx->input).len))" ( (binary_expression "(lVar2 <= next_state_log_idx) && (lVar2 < (mctx->input).len)" (parenthesized_expression "(lVar2 <= next_state_log_idx)" ( (binary_expression "lVar2 <= next_state_log_idx" identifier <= identifier) )) && (parenthesized_expression "(lVar2 < (mctx->input).len)" ( (binary_expression "lVar2 < (mctx->input).len" identifier < (field_expression "(mctx->input).len" (parenthesized_expression "(mctx->input)" ( (field_expression "mctx->input" identifier -> field_identifier) )) . field_identifier)) ))) )) || (parenthesized_expression "((lVar2 = (mctx->input).valid_len, lVar2 <= next_state_log_idx && (lVar2 < (mctx->input).len))\n      )" ( (parenthesized_expression "(lVar2 = (mctx->input).valid_len, lVar2 <= next_state_log_idx && (lVar2 < (mctx->input).len))" ( (comma_expression "lVar2 = (mctx->input).valid_len, lVar2 <= next_state_log_idx && (lVar2 < (mctx->input).len)" (assignment_expression "lVar2 = (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 "lVar2 <= next_state_log_idx && (lVar2 < (mctx->input).len)" (binary_expression "lVar2 <= next_state_log_idx" identifier <= identifier) && (parenthesized_expression "(lVar2 < (mctx->input).len)" ( (binary_expression "lVar2 < (mctx->input).len" identifier < (field_expression "(mctx->input).len" (parenthesized_expression "(mctx->input)" ( (field_expression "mctx->input" identifier -> field_identifier) )) . field_identifier)) )))) )) ))) )) && (parenthesized_expression "(rVar3 = extend_buffers(mctx,(int)next_state_log_idx + L'\x01'), rVar3 != _REG_NOERROR)" ( (comma_expression "rVar3 = extend_buffers(mctx,(int)next_state_log_idx + L'\x01'), rVar3 != _REG_NOERROR" (assignment_expression "rVar3 = extend_buffers(mctx,(int)next_state_log_idx + L'\x01')" identifier = (call_expression "extend_buffers(mctx,(int)next_state_log_idx + L'\x01')" identifier (argument_list "(mctx,(int)next_state_log_idx + L'\x01')" ( identifier , (binary_expression "(int)next_state_log_idx + L'\x01'" (cast_expression "(int)next_state_log_idx" ( (type_descriptor "int" primitive_type) ) identifier) + (char_literal "L'\x01'" L' escape_sequence ')) )))) , (binary_expression "rVar3 != _REG_NOERROR" identifier != identifier)) ))) )) (compound_statement "{\n    return rVar3;\n  }" { (return_statement "return rVar3;" return identifier ;) })) (if_statement "if (lVar1 < next_state_log_idx) {\n    memset(mctx->state_log + lVar1 + 1,0,(next_state_log_idx - lVar1) * 8);\n    mctx->state_log_top = next_state_log_idx;\n  }" if (parenthesized_expression "(lVar1 < next_state_log_idx)" ( (binary_expression "lVar1 < next_state_log_idx" identifier < identifier) )) (compound_statement "{\n    memset(mctx->state_log + lVar1 + 1,0,(next_state_log_idx - lVar1) * 8);\n    mctx->state_log_top = next_state_log_idx;\n  }" { (expression_statement "memset(mctx->state_log + lVar1 + 1,0,(next_state_log_idx - lVar1) * 8);" (call_expression "memset(mctx->state_log + lVar1 + 1,0,(next_state_log_idx - lVar1) * 8)" identifier (argument_list "(mctx->state_log + lVar1 + 1,0,(next_state_log_idx - lVar1) * 8)" ( (binary_expression "mctx->state_log + lVar1 + 1" (binary_expression "mctx->state_log + lVar1" (field_expression "mctx->state_log" identifier -> field_identifier) + identifier) + number_literal) , number_literal , (binary_expression "(next_state_log_idx - lVar1) * 8" (parenthesized_expression "(next_state_log_idx - lVar1)" ( (binary_expression "next_state_log_idx - lVar1" 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) ;) })) (return_statement "return _REG_NOERROR;" return identifier ;) })))
(translation_unit "undefined8 FUN_001102a0(long param_1,long param_2)\n\n{\n  long lVar1;\n  undefined8 uVar2;\n  \n  lVar1 = *(long *)(param_1 + 0xc0);\n  if ((((*(long *)(param_1 + 0x40) <= param_2) &&\n       (*(long *)(param_1 + 0x40) < *(long *)(param_1 + 0x58))) ||\n      ((*(long *)(param_1 + 0x30) <= param_2 &&\n       (*(long *)(param_1 + 0x30) < *(long *)(param_1 + 0x58))))) &&\n     (uVar2 = FUN_001101d3(param_1,(int)param_2 + 1), (int)uVar2 != 0)) {\n    return uVar2;\n  }\n  if (lVar1 < param_2) {\n    memset((void *)(*(long *)(param_1 + 0xb8) + 8 + lVar1 * 8),0,(param_2 - lVar1) * 8);\n    *(long *)(param_1 + 0xc0) = param_2;\n  }\n  return 0;\n}\n\n" (function_definition "undefined8 FUN_001102a0(long param_1,long param_2)\n\n{\n  long lVar1;\n  undefined8 uVar2;\n  \n  lVar1 = *(long *)(param_1 + 0xc0);\n  if ((((*(long *)(param_1 + 0x40) <= param_2) &&\n       (*(long *)(param_1 + 0x40) < *(long *)(param_1 + 0x58))) ||\n      ((*(long *)(param_1 + 0x30) <= param_2 &&\n       (*(long *)(param_1 + 0x30) < *(long *)(param_1 + 0x58))))) &&\n     (uVar2 = FUN_001101d3(param_1,(int)param_2 + 1), (int)uVar2 != 0)) {\n    return uVar2;\n  }\n  if (lVar1 < param_2) {\n    memset((void *)(*(long *)(param_1 + 0xb8) + 8 + lVar1 * 8),0,(param_2 - lVar1) * 8);\n    *(long *)(param_1 + 0xc0) = param_2;\n  }\n  return 0;\n}" type_identifier (function_declarator "FUN_001102a0(long param_1,long param_2)" identifier (parameter_list "(long param_1,long param_2)" ( (parameter_declaration "long param_1" (sized_type_specifier "long" long) identifier) , (parameter_declaration "long param_2" (sized_type_specifier "long" long) identifier) ))) (compound_statement "{\n  long lVar1;\n  undefined8 uVar2;\n  \n  lVar1 = *(long *)(param_1 + 0xc0);\n  if ((((*(long *)(param_1 + 0x40) <= param_2) &&\n       (*(long *)(param_1 + 0x40) < *(long *)(param_1 + 0x58))) ||\n      ((*(long *)(param_1 + 0x30) <= param_2 &&\n       (*(long *)(param_1 + 0x30) < *(long *)(param_1 + 0x58))))) &&\n     (uVar2 = FUN_001101d3(param_1,(int)param_2 + 1), (int)uVar2 != 0)) {\n    return uVar2;\n  }\n  if (lVar1 < param_2) {\n    memset((void *)(*(long *)(param_1 + 0xb8) + 8 + lVar1 * 8),0,(param_2 - lVar1) * 8);\n    *(long *)(param_1 + 0xc0) = param_2;\n  }\n  return 0;\n}" { (declaration "long lVar1;" (sized_type_specifier "long" long) identifier ;) (declaration "undefined8 uVar2;" type_identifier identifier ;) (expression_statement "lVar1 = *(long *)(param_1 + 0xc0);" (assignment_expression "lVar1 = *(long *)(param_1 + 0xc0)" identifier = (pointer_expression "*(long *)(param_1 + 0xc0)" * (cast_expression "(long *)(param_1 + 0xc0)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0xc0)" ( (binary_expression "param_1 + 0xc0" identifier + number_literal) ))))) ;) (if_statement "if ((((*(long *)(param_1 + 0x40) <= param_2) &&\n       (*(long *)(param_1 + 0x40) < *(long *)(param_1 + 0x58))) ||\n      ((*(long *)(param_1 + 0x30) <= param_2 &&\n       (*(long *)(param_1 + 0x30) < *(long *)(param_1 + 0x58))))) &&\n     (uVar2 = FUN_001101d3(param_1,(int)param_2 + 1), (int)uVar2 != 0)) {\n    return uVar2;\n  }" if (parenthesized_expression "((((*(long *)(param_1 + 0x40) <= param_2) &&\n       (*(long *)(param_1 + 0x40) < *(long *)(param_1 + 0x58))) ||\n      ((*(long *)(param_1 + 0x30) <= param_2 &&\n       (*(long *)(param_1 + 0x30) < *(long *)(param_1 + 0x58))))) &&\n     (uVar2 = FUN_001101d3(param_1,(int)param_2 + 1), (int)uVar2 != 0))" ( (binary_expression "(((*(long *)(param_1 + 0x40) <= param_2) &&\n       (*(long *)(param_1 + 0x40) < *(long *)(param_1 + 0x58))) ||\n      ((*(long *)(param_1 + 0x30) <= param_2 &&\n       (*(long *)(param_1 + 0x30) < *(long *)(param_1 + 0x58))))) &&\n     (uVar2 = FUN_001101d3(param_1,(int)param_2 + 1), (int)uVar2 != 0)" (parenthesized_expression "(((*(long *)(param_1 + 0x40) <= param_2) &&\n       (*(long *)(param_1 + 0x40) < *(long *)(param_1 + 0x58))) ||\n      ((*(long *)(param_1 + 0x30) <= param_2 &&\n       (*(long *)(param_1 + 0x30) < *(long *)(param_1 + 0x58)))))" ( (binary_expression "((*(long *)(param_1 + 0x40) <= param_2) &&\n       (*(long *)(param_1 + 0x40) < *(long *)(param_1 + 0x58))) ||\n      ((*(long *)(param_1 + 0x30) <= param_2 &&\n       (*(long *)(param_1 + 0x30) < *(long *)(param_1 + 0x58))))" (parenthesized_expression "((*(long *)(param_1 + 0x40) <= param_2) &&\n       (*(long *)(param_1 + 0x40) < *(long *)(param_1 + 0x58)))" ( (binary_expression "(*(long *)(param_1 + 0x40) <= param_2) &&\n       (*(long *)(param_1 + 0x40) < *(long *)(param_1 + 0x58))" (parenthesized_expression "(*(long *)(param_1 + 0x40) <= param_2)" ( (binary_expression "*(long *)(param_1 + 0x40) <= param_2" (pointer_expression "*(long *)(param_1 + 0x40)" * (cast_expression "(long *)(param_1 + 0x40)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x40)" ( (binary_expression "param_1 + 0x40" identifier + number_literal) )))) <= identifier) )) && (parenthesized_expression "(*(long *)(param_1 + 0x40) < *(long *)(param_1 + 0x58))" ( (binary_expression "*(long *)(param_1 + 0x40) < *(long *)(param_1 + 0x58)" (pointer_expression "*(long *)(param_1 + 0x40)" * (cast_expression "(long *)(param_1 + 0x40)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x40)" ( (binary_expression "param_1 + 0x40" identifier + number_literal) )))) < (pointer_expression "*(long *)(param_1 + 0x58)" * (cast_expression "(long *)(param_1 + 0x58)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x58)" ( (binary_expression "param_1 + 0x58" identifier + number_literal) ))))) ))) )) || (parenthesized_expression "((*(long *)(param_1 + 0x30) <= param_2 &&\n       (*(long *)(param_1 + 0x30) < *(long *)(param_1 + 0x58))))" ( (parenthesized_expression "(*(long *)(param_1 + 0x30) <= param_2 &&\n       (*(long *)(param_1 + 0x30) < *(long *)(param_1 + 0x58)))" ( (binary_expression "*(long *)(param_1 + 0x30) <= param_2 &&\n       (*(long *)(param_1 + 0x30) < *(long *)(param_1 + 0x58))" (binary_expression "*(long *)(param_1 + 0x30) <= param_2" (pointer_expression "*(long *)(param_1 + 0x30)" * (cast_expression "(long *)(param_1 + 0x30)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x30)" ( (binary_expression "param_1 + 0x30" identifier + number_literal) )))) <= identifier) && (parenthesized_expression "(*(long *)(param_1 + 0x30) < *(long *)(param_1 + 0x58))" ( (binary_expression "*(long *)(param_1 + 0x30) < *(long *)(param_1 + 0x58)" (pointer_expression "*(long *)(param_1 + 0x30)" * (cast_expression "(long *)(param_1 + 0x30)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x30)" ( (binary_expression "param_1 + 0x30" identifier + number_literal) )))) < (pointer_expression "*(long *)(param_1 + 0x58)" * (cast_expression "(long *)(param_1 + 0x58)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x58)" ( (binary_expression "param_1 + 0x58" identifier + number_literal) ))))) ))) )) ))) )) && (parenthesized_expression "(uVar2 = FUN_001101d3(param_1,(int)param_2 + 1), (int)uVar2 != 0)" ( (comma_expression "uVar2 = FUN_001101d3(param_1,(int)param_2 + 1), (int)uVar2 != 0" (assignment_expression "uVar2 = FUN_001101d3(param_1,(int)param_2 + 1)" identifier = (call_expression "FUN_001101d3(param_1,(int)param_2 + 1)" identifier (argument_list "(param_1,(int)param_2 + 1)" ( identifier , (binary_expression "(int)param_2 + 1" (cast_expression "(int)param_2" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal) )))) , (binary_expression "(int)uVar2 != 0" (cast_expression "(int)uVar2" ( (type_descriptor "int" primitive_type) ) identifier) != number_literal)) ))) )) (compound_statement "{\n    return uVar2;\n  }" { (return_statement "return uVar2;" return identifier ;) })) (if_statement "if (lVar1 < param_2) {\n    memset((void *)(*(long *)(param_1 + 0xb8) + 8 + lVar1 * 8),0,(param_2 - lVar1) * 8);\n    *(long *)(param_1 + 0xc0) = param_2;\n  }" if (parenthesized_expression "(lVar1 < param_2)" ( (binary_expression "lVar1 < param_2" identifier < identifier) )) (compound_statement "{\n    memset((void *)(*(long *)(param_1 + 0xb8) + 8 + lVar1 * 8),0,(param_2 - lVar1) * 8);\n    *(long *)(param_1 + 0xc0) = param_2;\n  }" { (expression_statement "memset((void *)(*(long *)(param_1 + 0xb8) + 8 + lVar1 * 8),0,(param_2 - lVar1) * 8);" (call_expression "memset((void *)(*(long *)(param_1 + 0xb8) + 8 + lVar1 * 8),0,(param_2 - lVar1) * 8)" identifier (argument_list "((void *)(*(long *)(param_1 + 0xb8) + 8 + lVar1 * 8),0,(param_2 - lVar1) * 8)" ( (cast_expression "(void *)(*(long *)(param_1 + 0xb8) + 8 + lVar1 * 8)" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*(long *)(param_1 + 0xb8) + 8 + lVar1 * 8)" ( (binary_expression "*(long *)(param_1 + 0xb8) + 8 + lVar1 * 8" (binary_expression "*(long *)(param_1 + 0xb8) + 8" (pointer_expression "*(long *)(param_1 + 0xb8)" * (cast_expression "(long *)(param_1 + 0xb8)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0xb8)" ( (binary_expression "param_1 + 0xb8" identifier + number_literal) )))) + number_literal) + (binary_expression "lVar1 * 8" identifier * number_literal)) ))) , number_literal , (binary_expression "(param_2 - lVar1) * 8" (parenthesized_expression "(param_2 - lVar1)" ( (binary_expression "param_2 - lVar1" identifier - identifier) )) * number_literal) ))) ;) (expression_statement "*(long *)(param_1 + 0xc0) = param_2;" (assignment_expression "*(long *)(param_1 + 0xc0) = param_2" (pointer_expression "*(long *)(param_1 + 0xc0)" * (cast_expression "(long *)(param_1 + 0xc0)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0xc0)" ( (binary_expression "param_1 + 0xc0" identifier + number_literal) )))) = identifier) ;) })) (return_statement "return 0;" return number_literal ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration (sized_type_specifier long) IDENT) , (parameter_declaration (sized_type_specifier long) IDENT) ))) (compound_statement { (declaration (sized_type_specifier long) IDENT ;) (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor (sized_type_specifier long) (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 (pointer_expression * (cast_expression ( (type_descriptor (sized_type_specifier long) (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) <= IDENT) )) && (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor (sized_type_specifier long) (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) < (pointer_expression * (cast_expression ( (type_descriptor (sized_type_specifier long) (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ))) )) || (parenthesized_expression ( (parenthesized_expression ( (binary_expression (binary_expression (pointer_expression * (cast_expression ( (type_descriptor (sized_type_specifier long) (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) <= IDENT) && (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor (sized_type_specifier long) (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) < (pointer_expression * (cast_expression ( (type_descriptor (sized_type_specifier long) (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ))) )) ))) )) && (parenthesized_expression ( (comma_expression (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) + LIT) )))) , (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) != LIT)) ))) )) (compound_statement { (return_statement return IDENT ;) })) (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 (sized_type_specifier long) (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 (sized_type_specifier long) (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = IDENT) ;) })) (return_statement return LIT ;) })))
(function_definition "undefined8 FUN_001102a0(long param_1,long param_2)\n\n{\n  long lVar1;\n  undefined8 uVar2;\n  \n  lVar1 = *(long *)(param_1 + 0xc0);\n  if ((((*(long *)(param_1 + 0x40) <= param_2) &&\n       (*(long *)(param_1 + 0x40) < *(long *)(param_1 + 0x58))) ||\n      ((*(long *)(param_1 + 0x30) <= param_2 &&\n       (*(long *)(param_1 + 0x30) < *(long *)(param_1 + 0x58))))) &&\n     (uVar2 = FUN_001101d3(param_1,(int)param_2 + 1), (int)uVar2 != 0)) {\n    return uVar2;\n  }\n  if (lVar1 < param_2) {\n    memset((void *)(*(long *)(param_1 + 0xb8) + 8 + lVar1 * 8),0,(param_2 - lVar1) * 8);\n    *(long *)(param_1 + 0xc0) = param_2;\n  }\n  return 0;\n}" (type_identifier "undefined8") (function_declarator "FUN_001102a0(long param_1,long param_2)" (identifier "FUN_001102a0") (parameter_list "(long param_1,long param_2)" (( "(") (parameter_declaration "long param_1" (sized_type_specifier "long" (long "long")) (identifier "param_1")) (, ",") (parameter_declaration "long param_2" (sized_type_specifier "long" (long "long")) (identifier "param_2")) () ")"))) (compound_statement "{\n  long lVar1;\n  undefined8 uVar2;\n  \n  lVar1 = *(long *)(param_1 + 0xc0);\n  if ((((*(long *)(param_1 + 0x40) <= param_2) &&\n       (*(long *)(param_1 + 0x40) < *(long *)(param_1 + 0x58))) ||\n      ((*(long *)(param_1 + 0x30) <= param_2 &&\n       (*(long *)(param_1 + 0x30) < *(long *)(param_1 + 0x58))))) &&\n     (uVar2 = FUN_001101d3(param_1,(int)param_2 + 1), (int)uVar2 != 0)) {\n    return uVar2;\n  }\n  if (lVar1 < param_2) {\n    memset((void *)(*(long *)(param_1 + 0xb8) + 8 + lVar1 * 8),0,(param_2 - lVar1) * 8);\n    *(long *)(param_1 + 0xc0) = param_2;\n  }\n  return 0;\n}" ({ "{") (declaration "long lVar1;" (sized_type_specifier "long" (long "long")) (identifier "lVar1") (; ";")) (declaration "undefined8 uVar2;" (type_identifier "undefined8") (identifier "uVar2") (; ";")) (expression_statement "lVar1 = *(long *)(param_1 + 0xc0);" (assignment_expression "lVar1 = *(long *)(param_1 + 0xc0)" (identifier "lVar1") (= "=") (pointer_expression "*(long *)(param_1 + 0xc0)" (* "*") (cast_expression "(long *)(param_1 + 0xc0)" (( "(") (type_descriptor "long *" (sized_type_specifier "long" (long "long")) (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0xc0)" (( "(") (binary_expression "param_1 + 0xc0" (identifier "param_1") (+ "+") (number_literal "0xc0")) () ")"))))) (; ";")) (if_statement "if ((((*(long *)(param_1 + 0x40) <= param_2) &&\n       (*(long *)(param_1 + 0x40) < *(long *)(param_1 + 0x58))) ||\n      ((*(long *)(param_1 + 0x30) <= param_2 &&\n       (*(long *)(param_1 + 0x30) < *(long *)(param_1 + 0x58))))) &&\n     (uVar2 = FUN_001101d3(param_1,(int)param_2 + 1), (int)uVar2 != 0)) {\n    return uVar2;\n  }" (if "if") (parenthesized_expression "((((*(long *)(param_1 + 0x40) <= param_2) &&\n       (*(long *)(param_1 + 0x40) < *(long *)(param_1 + 0x58))) ||\n      ((*(long *)(param_1 + 0x30) <= param_2 &&\n       (*(long *)(param_1 + 0x30) < *(long *)(param_1 + 0x58))))) &&\n     (uVar2 = FUN_001101d3(param_1,(int)param_2 + 1), (int)uVar2 != 0))" (( "(") (binary_expression "(((*(long *)(param_1 + 0x40) <= param_2) &&\n       (*(long *)(param_1 + 0x40) < *(long *)(param_1 + 0x58))) ||\n      ((*(long *)(param_1 + 0x30) <= param_2 &&\n       (*(long *)(param_1 + 0x30) < *(long *)(param_1 + 0x58))))) &&\n     (uVar2 = FUN_001101d3(param_1,(int)param_2 + 1), (int)uVar2 != 0)" (parenthesized_expression "(((*(long *)(param_1 + 0x40) <= param_2) &&\n       (*(long *)(param_1 + 0x40) < *(long *)(param_1 + 0x58))) ||\n      ((*(long *)(param_1 + 0x30) <= param_2 &&\n       (*(long *)(param_1 + 0x30) < *(long *)(param_1 + 0x58)))))" (( "(") (binary_expression "((*(long *)(param_1 + 0x40) <= param_2) &&\n       (*(long *)(param_1 + 0x40) < *(long *)(param_1 + 0x58))) ||\n      ((*(long *)(param_1 + 0x30) <= param_2 &&\n       (*(long *)(param_1 + 0x30) < *(long *)(param_1 + 0x58))))" (parenthesized_expression "((*(long *)(param_1 + 0x40) <= param_2) &&\n       (*(long *)(param_1 + 0x40) < *(long *)(param_1 + 0x58)))" (( "(") (binary_expression "(*(long *)(param_1 + 0x40) <= param_2) &&\n       (*(long *)(param_1 + 0x40) < *(long *)(param_1 + 0x58))" (parenthesized_expression "(*(long *)(param_1 + 0x40) <= param_2)" (( "(") (binary_expression "*(long *)(param_1 + 0x40) <= param_2" (pointer_expression "*(long *)(param_1 + 0x40)" (* "*") (cast_expression "(long *)(param_1 + 0x40)" (( "(") (type_descriptor "long *" (sized_type_specifier "long" (long "long")) (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x40)" (( "(") (binary_expression "param_1 + 0x40" (identifier "param_1") (+ "+") (number_literal "0x40")) () ")")))) (<= "<=") (identifier "param_2")) () ")")) (&& "&&") (parenthesized_expression "(*(long *)(param_1 + 0x40) < *(long *)(param_1 + 0x58))" (( "(") (binary_expression "*(long *)(param_1 + 0x40) < *(long *)(param_1 + 0x58)" (pointer_expression "*(long *)(param_1 + 0x40)" (* "*") (cast_expression "(long *)(param_1 + 0x40)" (( "(") (type_descriptor "long *" (sized_type_specifier "long" (long "long")) (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x40)" (( "(") (binary_expression "param_1 + 0x40" (identifier "param_1") (+ "+") (number_literal "0x40")) () ")")))) (< "<") (pointer_expression "*(long *)(param_1 + 0x58)" (* "*") (cast_expression "(long *)(param_1 + 0x58)" (( "(") (type_descriptor "long *" (sized_type_specifier "long" (long "long")) (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x58)" (( "(") (binary_expression "param_1 + 0x58" (identifier "param_1") (+ "+") (number_literal "0x58")) () ")"))))) () ")"))) () ")")) (|| "||") (parenthesized_expression "((*(long *)(param_1 + 0x30) <= param_2 &&\n       (*(long *)(param_1 + 0x30) < *(long *)(param_1 + 0x58))))" (( "(") (parenthesized_expression "(*(long *)(param_1 + 0x30) <= param_2 &&\n       (*(long *)(param_1 + 0x30) < *(long *)(param_1 + 0x58)))" (( "(") (binary_expression "*(long *)(param_1 + 0x30) <= param_2 &&\n       (*(long *)(param_1 + 0x30) < *(long *)(param_1 + 0x58))" (binary_expression "*(long *)(param_1 + 0x30) <= param_2" (pointer_expression "*(long *)(param_1 + 0x30)" (* "*") (cast_expression "(long *)(param_1 + 0x30)" (( "(") (type_descriptor "long *" (sized_type_specifier "long" (long "long")) (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x30)" (( "(") (binary_expression "param_1 + 0x30" (identifier "param_1") (+ "+") (number_literal "0x30")) () ")")))) (<= "<=") (identifier "param_2")) (&& "&&") (parenthesized_expression "(*(long *)(param_1 + 0x30) < *(long *)(param_1 + 0x58))" (( "(") (binary_expression "*(long *)(param_1 + 0x30) < *(long *)(param_1 + 0x58)" (pointer_expression "*(long *)(param_1 + 0x30)" (* "*") (cast_expression "(long *)(param_1 + 0x30)" (( "(") (type_descriptor "long *" (sized_type_specifier "long" (long "long")) (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x30)" (( "(") (binary_expression "param_1 + 0x30" (identifier "param_1") (+ "+") (number_literal "0x30")) () ")")))) (< "<") (pointer_expression "*(long *)(param_1 + 0x58)" (* "*") (cast_expression "(long *)(param_1 + 0x58)" (( "(") (type_descriptor "long *" (sized_type_specifier "long" (long "long")) (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x58)" (( "(") (binary_expression "param_1 + 0x58" (identifier "param_1") (+ "+") (number_literal "0x58")) () ")"))))) () ")"))) () ")")) () ")"))) () ")")) (&& "&&") (parenthesized_expression "(uVar2 = FUN_001101d3(param_1,(int)param_2 + 1), (int)uVar2 != 0)" (( "(") (comma_expression "uVar2 = FUN_001101d3(param_1,(int)param_2 + 1), (int)uVar2 != 0" (assignment_expression "uVar2 = FUN_001101d3(param_1,(int)param_2 + 1)" (identifier "uVar2") (= "=") (call_expression "FUN_001101d3(param_1,(int)param_2 + 1)" (identifier "FUN_001101d3") (argument_list "(param_1,(int)param_2 + 1)" (( "(") (identifier "param_1") (, ",") (binary_expression "(int)param_2 + 1" (cast_expression "(int)param_2" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "param_2")) (+ "+") (number_literal "1")) () ")")))) (, ",") (binary_expression "(int)uVar2 != 0" (cast_expression "(int)uVar2" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "uVar2")) (!= "!=") (number_literal "0"))) () ")"))) () ")")) (compound_statement "{\n    return uVar2;\n  }" ({ "{") (return_statement "return uVar2;" (return "return") (identifier "uVar2") (; ";")) (} "}"))) (if_statement "if (lVar1 < param_2) {\n    memset((void *)(*(long *)(param_1 + 0xb8) + 8 + lVar1 * 8),0,(param_2 - lVar1) * 8);\n    *(long *)(param_1 + 0xc0) = param_2;\n  }" (if "if") (parenthesized_expression "(lVar1 < param_2)" (( "(") (binary_expression "lVar1 < param_2" (identifier "lVar1") (< "<") (identifier "param_2")) () ")")) (compound_statement "{\n    memset((void *)(*(long *)(param_1 + 0xb8) + 8 + lVar1 * 8),0,(param_2 - lVar1) * 8);\n    *(long *)(param_1 + 0xc0) = param_2;\n  }" ({ "{") (expression_statement "memset((void *)(*(long *)(param_1 + 0xb8) + 8 + lVar1 * 8),0,(param_2 - lVar1) * 8);" (call_expression "memset((void *)(*(long *)(param_1 + 0xb8) + 8 + lVar1 * 8),0,(param_2 - lVar1) * 8)" (identifier "memset") (argument_list "((void *)(*(long *)(param_1 + 0xb8) + 8 + lVar1 * 8),0,(param_2 - lVar1) * 8)" (( "(") (cast_expression "(void *)(*(long *)(param_1 + 0xb8) + 8 + lVar1 * 8)" (( "(") (type_descriptor "void *" (primitive_type "void") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(*(long *)(param_1 + 0xb8) + 8 + lVar1 * 8)" (( "(") (binary_expression "*(long *)(param_1 + 0xb8) + 8 + lVar1 * 8" (binary_expression "*(long *)(param_1 + 0xb8) + 8" (pointer_expression "*(long *)(param_1 + 0xb8)" (* "*") (cast_expression "(long *)(param_1 + 0xb8)" (( "(") (type_descriptor "long *" (sized_type_specifier "long" (long "long")) (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0xb8)" (( "(") (binary_expression "param_1 + 0xb8" (identifier "param_1") (+ "+") (number_literal "0xb8")) () ")")))) (+ "+") (number_literal "8")) (+ "+") (binary_expression "lVar1 * 8" (identifier "lVar1") (* "*") (number_literal "8"))) () ")"))) (, ",") (number_literal "0") (, ",") (binary_expression "(param_2 - lVar1) * 8" (parenthesized_expression "(param_2 - lVar1)" (( "(") (binary_expression "param_2 - lVar1" (identifier "param_2") (- "-") (identifier "lVar1")) () ")")) (* "*") (number_literal "8")) () ")"))) (; ";")) (expression_statement "*(long *)(param_1 + 0xc0) = param_2;" (assignment_expression "*(long *)(param_1 + 0xc0) = param_2" (pointer_expression "*(long *)(param_1 + 0xc0)" (* "*") (cast_expression "(long *)(param_1 + 0xc0)" (( "(") (type_descriptor "long *" (sized_type_specifier "long" (long "long")) (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0xc0)" (( "(") (binary_expression "param_1 + 0xc0" (identifier "param_1") (+ "+") (number_literal "0xc0")) () ")")))) (= "=") (identifier "param_2")) (; ";")) (} "}"))) (return_statement "return 0;" (return "return") (number_literal "0") (; ";")) (} "}")))

type_1 function_1(type_2 *mctx,type_3 var_2)

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


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

undefined8 MASKED(long param_1,long param_2)

{
  long lVar1;
  undefined8 uVar2;
  
  lVar1 = *(long *)(param_1 + 0xc0);
  if ((((*(long *)(param_1 + 0x40) <= param_2) &&
       (*(long *)(param_1 + 0x40) < *(long *)(param_1 + 0x58))) ||
      ((*(long *)(param_1 + 0x30) <= param_2 &&
       (*(long *)(param_1 + 0x30) < *(long *)(param_1 + 0x58))))) &&
     (uVar2 = FUN_001101d3(param_1,(int)param_2 + 1), (int)uVar2 != 0)) {
    return uVar2;
  }
  if (lVar1 < param_2) {
    memset((void *)(*(long *)(param_1 + 0xb8) + 8 + lVar1 * 8),0,(param_2 - lVar1) * 8);
    *(long *)(param_1 + 0xc0) = param_2;
  }
  return 0;
}

