
int __regparm3
check_dst_limits_calc_pos
          (re_match_context_t *mctx,Idx limit,Idx subexp_idx,Idx from_node,Idx str_idx,Idx bkref_idx
          )

{
  int iVar1;
  int iVar2;
  uint boundaries;
  
  iVar2 = mctx->bkref_ents[limit].subexp_from;
  if (str_idx < iVar2) {
    return -1;
  }
  iVar1 = mctx->bkref_ents[limit].subexp_to;
  if (str_idx <= iVar1) {
    boundaries = (uint)(iVar2 == str_idx);
    if (iVar1 == str_idx) {
      boundaries = boundaries | 2;
    }
    else if (iVar2 != str_idx) {
      return 0;
    }
    iVar2 = check_dst_limits_calc_pos_1(mctx,boundaries,subexp_idx,from_node,bkref_idx);
    return iVar2;
  }
  return 1;
}



undefined8 __regparm2 FUN_00021890(int param_1,int param_2,undefined4 param_3,int param_4)

{
  int *piVar1;
  int iVar2;
  uint uVar3;
  undefined4 uVar4;
  undefined8 uVar5;
  
  uVar3 = *(int *)(param_1 + 0x74) + param_2 * 0x14;
  iVar2 = *(int *)(uVar3 + 8);
  if (param_4 < iVar2) {
    uVar4 = 0xffffffff;
  }
  else {
    piVar1 = (int *)(uVar3 + 0xc);
    if (*piVar1 < param_4) {
      return CONCAT44(uVar3,1);
    }
    uVar3 = (uint)(iVar2 == param_4);
    if ((*piVar1 == param_4) || (uVar4 = 0, iVar2 == param_4)) {
      uVar5 = FUN_000216d0();
      return uVar5;
    }
  }
  return CONCAT44(uVar3,uVar4);
}


PUSH EBP
PUSH EDI
PUSH ESI
LEA ESI,[EDX + EDX*0x4]
PUSH EBX
SUB ESP,0x1c
MOV EDX,dword ptr [EAX + 0x74]
MOV EDI,dword ptr [ESP + 0x30]
MOV EBX,dword ptr [ESP + 0x34]
LEA EDX,[EDX + ESI*0x4]
MOV EBP,dword ptr [ESP + 0x38]
MOV ESI,dword ptr [EDX + 0x8]
MOV dword ptr [ESP + 0xc],EDI
CMP ESI,EBX
JG 0x00021910
MOV EDI,dword ptr [EDX + 0xc]
CMP EDI,EBX
JL 0x00021900
XOR EDX,EDX
CMP ESI,EBX
SETZ DL
CMP EDI,EBX
JZ 0x000218e0
XOR EDI,EDI
CMP ESI,EBX
JZ 0x000218e3
ADD ESP,0x1c
MOV EAX,EDI
POP EBX
POP ESI
POP EDI
POP EBP
RET
OR EDX,0x2
MOV ESI,dword ptr [ESP + 0xc]
MOV dword ptr [ESP + 0x34],EBP
MOV dword ptr [ESP + 0x30],ESI
ADD ESP,0x1c
POP EBX
POP ESI
POP EDI
POP EBP
JMP 0x000216d0
ADD ESP,0x1c
MOV EDI,0x1
POP EBX
MOV EAX,EDI
POP ESI
POP EDI
POP EBP
RET
MOV EDI,0xffffffff
JMP 0x000218cf
(translation_unit "undefined8 __regparm2 FUN_00021890(int param_1,int param_2,undefined4 param_3,int param_4)\n\n{\n  int *piVar1;\n  int iVar2;\n  uint uVar3;\n  undefined4 uVar4;\n  undefined8 uVar5;\n  \n  uVar3 = *(int *)(param_1 + 0x74) + param_2 * 0x14;\n  iVar2 = *(int *)(uVar3 + 8);\n  if (param_4 < iVar2) {\n    uVar4 = 0xffffffff;\n  }\n  else {\n    piVar1 = (int *)(uVar3 + 0xc);\n    if (*piVar1 < param_4) {\n      return CONCAT44(uVar3,1);\n    }\n    uVar3 = (uint)(iVar2 == param_4);\n    if ((*piVar1 == param_4) || (uVar4 = 0, iVar2 == param_4)) {\n      uVar5 = FUN_000216d0();\n      return uVar5;\n    }\n  }\n  return CONCAT44(uVar3,uVar4);\n}\n\n" (function_definition "undefined8 __regparm2 FUN_00021890(int param_1,int param_2,undefined4 param_3,int param_4)\n\n{\n  int *piVar1;\n  int iVar2;\n  uint uVar3;\n  undefined4 uVar4;\n  undefined8 uVar5;\n  \n  uVar3 = *(int *)(param_1 + 0x74) + param_2 * 0x14;\n  iVar2 = *(int *)(uVar3 + 8);\n  if (param_4 < iVar2) {\n    uVar4 = 0xffffffff;\n  }\n  else {\n    piVar1 = (int *)(uVar3 + 0xc);\n    if (*piVar1 < param_4) {\n      return CONCAT44(uVar3,1);\n    }\n    uVar3 = (uint)(iVar2 == param_4);\n    if ((*piVar1 == param_4) || (uVar4 = 0, iVar2 == param_4)) {\n      uVar5 = FUN_000216d0();\n      return uVar5;\n    }\n  }\n  return CONCAT44(uVar3,uVar4);\n}" type_identifier (ERROR "__regparm2" identifier) (function_declarator "FUN_00021890(int param_1,int param_2,undefined4 param_3,int param_4)" identifier (parameter_list "(int param_1,int param_2,undefined4 param_3,int param_4)" ( (parameter_declaration "int param_1" primitive_type identifier) , (parameter_declaration "int param_2" primitive_type identifier) , (parameter_declaration "undefined4 param_3" type_identifier identifier) , (parameter_declaration "int param_4" primitive_type identifier) ))) (compound_statement "{\n  int *piVar1;\n  int iVar2;\n  uint uVar3;\n  undefined4 uVar4;\n  undefined8 uVar5;\n  \n  uVar3 = *(int *)(param_1 + 0x74) + param_2 * 0x14;\n  iVar2 = *(int *)(uVar3 + 8);\n  if (param_4 < iVar2) {\n    uVar4 = 0xffffffff;\n  }\n  else {\n    piVar1 = (int *)(uVar3 + 0xc);\n    if (*piVar1 < param_4) {\n      return CONCAT44(uVar3,1);\n    }\n    uVar3 = (uint)(iVar2 == param_4);\n    if ((*piVar1 == param_4) || (uVar4 = 0, iVar2 == param_4)) {\n      uVar5 = FUN_000216d0();\n      return uVar5;\n    }\n  }\n  return CONCAT44(uVar3,uVar4);\n}" { (declaration "int *piVar1;" primitive_type (pointer_declarator "*piVar1" * identifier) ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "uint uVar3;" type_identifier identifier ;) (declaration "undefined4 uVar4;" type_identifier identifier ;) (declaration "undefined8 uVar5;" type_identifier identifier ;) (expression_statement "uVar3 = *(int *)(param_1 + 0x74) + param_2 * 0x14;" (assignment_expression "uVar3 = *(int *)(param_1 + 0x74) + param_2 * 0x14" identifier = (binary_expression "*(int *)(param_1 + 0x74) + param_2 * 0x14" (pointer_expression "*(int *)(param_1 + 0x74)" * (cast_expression "(int *)(param_1 + 0x74)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x74)" ( (binary_expression "param_1 + 0x74" identifier + number_literal) )))) + (binary_expression "param_2 * 0x14" identifier * number_literal))) ;) (expression_statement "iVar2 = *(int *)(uVar3 + 8);" (assignment_expression "iVar2 = *(int *)(uVar3 + 8)" identifier = (pointer_expression "*(int *)(uVar3 + 8)" * (cast_expression "(int *)(uVar3 + 8)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(uVar3 + 8)" ( (binary_expression "uVar3 + 8" identifier + number_literal) ))))) ;) (if_statement "if (param_4 < iVar2) {\n    uVar4 = 0xffffffff;\n  }\n  else {\n    piVar1 = (int *)(uVar3 + 0xc);\n    if (*piVar1 < param_4) {\n      return CONCAT44(uVar3,1);\n    }\n    uVar3 = (uint)(iVar2 == param_4);\n    if ((*piVar1 == param_4) || (uVar4 = 0, iVar2 == param_4)) {\n      uVar5 = FUN_000216d0();\n      return uVar5;\n    }\n  }" if (parenthesized_expression "(param_4 < iVar2)" ( (binary_expression "param_4 < iVar2" identifier < identifier) )) (compound_statement "{\n    uVar4 = 0xffffffff;\n  }" { (expression_statement "uVar4 = 0xffffffff;" (assignment_expression "uVar4 = 0xffffffff" identifier = number_literal) ;) }) (else_clause "else {\n    piVar1 = (int *)(uVar3 + 0xc);\n    if (*piVar1 < param_4) {\n      return CONCAT44(uVar3,1);\n    }\n    uVar3 = (uint)(iVar2 == param_4);\n    if ((*piVar1 == param_4) || (uVar4 = 0, iVar2 == param_4)) {\n      uVar5 = FUN_000216d0();\n      return uVar5;\n    }\n  }" else (compound_statement "{\n    piVar1 = (int *)(uVar3 + 0xc);\n    if (*piVar1 < param_4) {\n      return CONCAT44(uVar3,1);\n    }\n    uVar3 = (uint)(iVar2 == param_4);\n    if ((*piVar1 == param_4) || (uVar4 = 0, iVar2 == param_4)) {\n      uVar5 = FUN_000216d0();\n      return uVar5;\n    }\n  }" { (expression_statement "piVar1 = (int *)(uVar3 + 0xc);" (assignment_expression "piVar1 = (int *)(uVar3 + 0xc)" identifier = (cast_expression "(int *)(uVar3 + 0xc)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(uVar3 + 0xc)" ( (binary_expression "uVar3 + 0xc" identifier + number_literal) )))) ;) (if_statement "if (*piVar1 < param_4) {\n      return CONCAT44(uVar3,1);\n    }" if (parenthesized_expression "(*piVar1 < param_4)" ( (binary_expression "*piVar1 < param_4" (pointer_expression "*piVar1" * identifier) < identifier) )) (compound_statement "{\n      return CONCAT44(uVar3,1);\n    }" { (return_statement "return CONCAT44(uVar3,1);" return (call_expression "CONCAT44(uVar3,1)" identifier (argument_list "(uVar3,1)" ( identifier , number_literal ))) ;) })) (expression_statement "uVar3 = (uint)(iVar2 == param_4);" (assignment_expression "uVar3 = (uint)(iVar2 == param_4)" identifier = (call_expression "(uint)(iVar2 == param_4)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(iVar2 == param_4)" ( (binary_expression "iVar2 == param_4" identifier == identifier) )))) ;) (if_statement "if ((*piVar1 == param_4) || (uVar4 = 0, iVar2 == param_4)) {\n      uVar5 = FUN_000216d0();\n      return uVar5;\n    }" if (parenthesized_expression "((*piVar1 == param_4) || (uVar4 = 0, iVar2 == param_4))" ( (binary_expression "(*piVar1 == param_4) || (uVar4 = 0, iVar2 == param_4)" (parenthesized_expression "(*piVar1 == param_4)" ( (binary_expression "*piVar1 == param_4" (pointer_expression "*piVar1" * identifier) == identifier) )) || (parenthesized_expression "(uVar4 = 0, iVar2 == param_4)" ( (comma_expression "uVar4 = 0, iVar2 == param_4" (assignment_expression "uVar4 = 0" identifier = number_literal) , (binary_expression "iVar2 == param_4" identifier == identifier)) ))) )) (compound_statement "{\n      uVar5 = FUN_000216d0();\n      return uVar5;\n    }" { (expression_statement "uVar5 = FUN_000216d0();" (assignment_expression "uVar5 = FUN_000216d0()" identifier = (call_expression "FUN_000216d0()" identifier (argument_list "()" ( )))) ;) (return_statement "return uVar5;" return identifier ;) })) }))) (return_statement "return CONCAT44(uVar3,uVar4);" return (call_expression "CONCAT44(uVar3,uVar4)" identifier (argument_list "(uVar3,uVar4)" ( identifier , identifier ))) ;) })))
(translation_unit "int __regparm3\ncheck_dst_limits_calc_pos\n          (re_match_context_t *mctx,Idx limit,Idx subexp_idx,Idx from_node,Idx str_idx,Idx bkref_idx\n          )\n\n{\n  int iVar1;\n  int iVar2;\n  uint boundaries;\n  \n  iVar2 = mctx->bkref_ents[limit].subexp_from;\n  if (str_idx < iVar2) {\n    return -1;\n  }\n  iVar1 = mctx->bkref_ents[limit].subexp_to;\n  if (str_idx <= iVar1) {\n    boundaries = (uint)(iVar2 == str_idx);\n    if (iVar1 == str_idx) {\n      boundaries = boundaries | 2;\n    }\n    else if (iVar2 != str_idx) {\n      return 0;\n    }\n    iVar2 = check_dst_limits_calc_pos_1(mctx,boundaries,subexp_idx,from_node,bkref_idx);\n    return iVar2;\n  }\n  return 1;\n}\n\n" (function_definition "int __regparm3\ncheck_dst_limits_calc_pos\n          (re_match_context_t *mctx,Idx limit,Idx subexp_idx,Idx from_node,Idx str_idx,Idx bkref_idx\n          )\n\n{\n  int iVar1;\n  int iVar2;\n  uint boundaries;\n  \n  iVar2 = mctx->bkref_ents[limit].subexp_from;\n  if (str_idx < iVar2) {\n    return -1;\n  }\n  iVar1 = mctx->bkref_ents[limit].subexp_to;\n  if (str_idx <= iVar1) {\n    boundaries = (uint)(iVar2 == str_idx);\n    if (iVar1 == str_idx) {\n      boundaries = boundaries | 2;\n    }\n    else if (iVar2 != str_idx) {\n      return 0;\n    }\n    iVar2 = check_dst_limits_calc_pos_1(mctx,boundaries,subexp_idx,from_node,bkref_idx);\n    return iVar2;\n  }\n  return 1;\n}" primitive_type (ERROR "__regparm3" identifier) (function_declarator "check_dst_limits_calc_pos\n          (re_match_context_t *mctx,Idx limit,Idx subexp_idx,Idx from_node,Idx str_idx,Idx bkref_idx\n          )" identifier (parameter_list "(re_match_context_t *mctx,Idx limit,Idx subexp_idx,Idx from_node,Idx str_idx,Idx bkref_idx\n          )" ( (parameter_declaration "re_match_context_t *mctx" type_identifier (pointer_declarator "*mctx" * identifier)) , (parameter_declaration "Idx limit" type_identifier identifier) , (parameter_declaration "Idx subexp_idx" type_identifier identifier) , (parameter_declaration "Idx from_node" type_identifier identifier) , (parameter_declaration "Idx str_idx" type_identifier identifier) , (parameter_declaration "Idx bkref_idx" type_identifier identifier) ))) (compound_statement "{\n  int iVar1;\n  int iVar2;\n  uint boundaries;\n  \n  iVar2 = mctx->bkref_ents[limit].subexp_from;\n  if (str_idx < iVar2) {\n    return -1;\n  }\n  iVar1 = mctx->bkref_ents[limit].subexp_to;\n  if (str_idx <= iVar1) {\n    boundaries = (uint)(iVar2 == str_idx);\n    if (iVar1 == str_idx) {\n      boundaries = boundaries | 2;\n    }\n    else if (iVar2 != str_idx) {\n      return 0;\n    }\n    iVar2 = check_dst_limits_calc_pos_1(mctx,boundaries,subexp_idx,from_node,bkref_idx);\n    return iVar2;\n  }\n  return 1;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "uint boundaries;" type_identifier identifier ;) (expression_statement "iVar2 = mctx->bkref_ents[limit].subexp_from;" (assignment_expression "iVar2 = mctx->bkref_ents[limit].subexp_from" identifier = (field_expression "mctx->bkref_ents[limit].subexp_from" (subscript_expression "mctx->bkref_ents[limit]" (field_expression "mctx->bkref_ents" identifier -> field_identifier) [ identifier ]) . field_identifier)) ;) (if_statement "if (str_idx < iVar2) {\n    return -1;\n  }" if (parenthesized_expression "(str_idx < iVar2)" ( (binary_expression "str_idx < iVar2" identifier < identifier) )) (compound_statement "{\n    return -1;\n  }" { (return_statement "return -1;" return number_literal ;) })) (expression_statement "iVar1 = mctx->bkref_ents[limit].subexp_to;" (assignment_expression "iVar1 = mctx->bkref_ents[limit].subexp_to" identifier = (field_expression "mctx->bkref_ents[limit].subexp_to" (subscript_expression "mctx->bkref_ents[limit]" (field_expression "mctx->bkref_ents" identifier -> field_identifier) [ identifier ]) . field_identifier)) ;) (if_statement "if (str_idx <= iVar1) {\n    boundaries = (uint)(iVar2 == str_idx);\n    if (iVar1 == str_idx) {\n      boundaries = boundaries | 2;\n    }\n    else if (iVar2 != str_idx) {\n      return 0;\n    }\n    iVar2 = check_dst_limits_calc_pos_1(mctx,boundaries,subexp_idx,from_node,bkref_idx);\n    return iVar2;\n  }" if (parenthesized_expression "(str_idx <= iVar1)" ( (binary_expression "str_idx <= iVar1" identifier <= identifier) )) (compound_statement "{\n    boundaries = (uint)(iVar2 == str_idx);\n    if (iVar1 == str_idx) {\n      boundaries = boundaries | 2;\n    }\n    else if (iVar2 != str_idx) {\n      return 0;\n    }\n    iVar2 = check_dst_limits_calc_pos_1(mctx,boundaries,subexp_idx,from_node,bkref_idx);\n    return iVar2;\n  }" { (expression_statement "boundaries = (uint)(iVar2 == str_idx);" (assignment_expression "boundaries = (uint)(iVar2 == str_idx)" identifier = (call_expression "(uint)(iVar2 == str_idx)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(iVar2 == str_idx)" ( (binary_expression "iVar2 == str_idx" identifier == identifier) )))) ;) (if_statement "if (iVar1 == str_idx) {\n      boundaries = boundaries | 2;\n    }\n    else if (iVar2 != str_idx) {\n      return 0;\n    }" if (parenthesized_expression "(iVar1 == str_idx)" ( (binary_expression "iVar1 == str_idx" identifier == identifier) )) (compound_statement "{\n      boundaries = boundaries | 2;\n    }" { (expression_statement "boundaries = boundaries | 2;" (assignment_expression "boundaries = boundaries | 2" identifier = (binary_expression "boundaries | 2" identifier | number_literal)) ;) }) (else_clause "else if (iVar2 != str_idx) {\n      return 0;\n    }" else (if_statement "if (iVar2 != str_idx) {\n      return 0;\n    }" if (parenthesized_expression "(iVar2 != str_idx)" ( (binary_expression "iVar2 != str_idx" identifier != identifier) )) (compound_statement "{\n      return 0;\n    }" { (return_statement "return 0;" return number_literal ;) })))) (expression_statement "iVar2 = check_dst_limits_calc_pos_1(mctx,boundaries,subexp_idx,from_node,bkref_idx);" (assignment_expression "iVar2 = check_dst_limits_calc_pos_1(mctx,boundaries,subexp_idx,from_node,bkref_idx)" identifier = (call_expression "check_dst_limits_calc_pos_1(mctx,boundaries,subexp_idx,from_node,bkref_idx)" identifier (argument_list "(mctx,boundaries,subexp_idx,from_node,bkref_idx)" ( identifier , identifier , identifier , identifier , identifier )))) ;) (return_statement "return iVar2;" return identifier ;) })) (return_statement "return 1;" return number_literal ;) })))
(translation_unit "undefined8 __regparm2 FUN_00021890(int param_1,int param_2,undefined4 param_3,int param_4)\n\n{\n  int *piVar1;\n  int iVar2;\n  uint uVar3;\n  undefined4 uVar4;\n  undefined8 uVar5;\n  \n  uVar3 = *(int *)(param_1 + 0x74) + param_2 * 0x14;\n  iVar2 = *(int *)(uVar3 + 8);\n  if (param_4 < iVar2) {\n    uVar4 = 0xffffffff;\n  }\n  else {\n    piVar1 = (int *)(uVar3 + 0xc);\n    if (*piVar1 < param_4) {\n      return CONCAT44(uVar3,1);\n    }\n    uVar3 = (uint)(iVar2 == param_4);\n    if ((*piVar1 == param_4) || (uVar4 = 0, iVar2 == param_4)) {\n      uVar5 = FUN_000216d0();\n      return uVar5;\n    }\n  }\n  return CONCAT44(uVar3,uVar4);\n}\n\n" (function_definition "undefined8 __regparm2 FUN_00021890(int param_1,int param_2,undefined4 param_3,int param_4)\n\n{\n  int *piVar1;\n  int iVar2;\n  uint uVar3;\n  undefined4 uVar4;\n  undefined8 uVar5;\n  \n  uVar3 = *(int *)(param_1 + 0x74) + param_2 * 0x14;\n  iVar2 = *(int *)(uVar3 + 8);\n  if (param_4 < iVar2) {\n    uVar4 = 0xffffffff;\n  }\n  else {\n    piVar1 = (int *)(uVar3 + 0xc);\n    if (*piVar1 < param_4) {\n      return CONCAT44(uVar3,1);\n    }\n    uVar3 = (uint)(iVar2 == param_4);\n    if ((*piVar1 == param_4) || (uVar4 = 0, iVar2 == param_4)) {\n      uVar5 = FUN_000216d0();\n      return uVar5;\n    }\n  }\n  return CONCAT44(uVar3,uVar4);\n}" type_identifier (ERROR "__regparm2" identifier) (function_declarator "FUN_00021890(int param_1,int param_2,undefined4 param_3,int param_4)" identifier (parameter_list "(int param_1,int param_2,undefined4 param_3,int param_4)" ( (parameter_declaration "int param_1" primitive_type identifier) , (parameter_declaration "int param_2" primitive_type identifier) , (parameter_declaration "undefined4 param_3" type_identifier identifier) , (parameter_declaration "int param_4" primitive_type identifier) ))) (compound_statement "{\n  int *piVar1;\n  int iVar2;\n  uint uVar3;\n  undefined4 uVar4;\n  undefined8 uVar5;\n  \n  uVar3 = *(int *)(param_1 + 0x74) + param_2 * 0x14;\n  iVar2 = *(int *)(uVar3 + 8);\n  if (param_4 < iVar2) {\n    uVar4 = 0xffffffff;\n  }\n  else {\n    piVar1 = (int *)(uVar3 + 0xc);\n    if (*piVar1 < param_4) {\n      return CONCAT44(uVar3,1);\n    }\n    uVar3 = (uint)(iVar2 == param_4);\n    if ((*piVar1 == param_4) || (uVar4 = 0, iVar2 == param_4)) {\n      uVar5 = FUN_000216d0();\n      return uVar5;\n    }\n  }\n  return CONCAT44(uVar3,uVar4);\n}" { (declaration "int *piVar1;" primitive_type (pointer_declarator "*piVar1" * identifier) ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "uint uVar3;" type_identifier identifier ;) (declaration "undefined4 uVar4;" type_identifier identifier ;) (declaration "undefined8 uVar5;" type_identifier identifier ;) (expression_statement "uVar3 = *(int *)(param_1 + 0x74) + param_2 * 0x14;" (assignment_expression "uVar3 = *(int *)(param_1 + 0x74) + param_2 * 0x14" identifier = (binary_expression "*(int *)(param_1 + 0x74) + param_2 * 0x14" (pointer_expression "*(int *)(param_1 + 0x74)" * (cast_expression "(int *)(param_1 + 0x74)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x74)" ( (binary_expression "param_1 + 0x74" identifier + number_literal) )))) + (binary_expression "param_2 * 0x14" identifier * number_literal))) ;) (expression_statement "iVar2 = *(int *)(uVar3 + 8);" (assignment_expression "iVar2 = *(int *)(uVar3 + 8)" identifier = (pointer_expression "*(int *)(uVar3 + 8)" * (cast_expression "(int *)(uVar3 + 8)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(uVar3 + 8)" ( (binary_expression "uVar3 + 8" identifier + number_literal) ))))) ;) (if_statement "if (param_4 < iVar2) {\n    uVar4 = 0xffffffff;\n  }\n  else {\n    piVar1 = (int *)(uVar3 + 0xc);\n    if (*piVar1 < param_4) {\n      return CONCAT44(uVar3,1);\n    }\n    uVar3 = (uint)(iVar2 == param_4);\n    if ((*piVar1 == param_4) || (uVar4 = 0, iVar2 == param_4)) {\n      uVar5 = FUN_000216d0();\n      return uVar5;\n    }\n  }" if (parenthesized_expression "(param_4 < iVar2)" ( (binary_expression "param_4 < iVar2" identifier < identifier) )) (compound_statement "{\n    uVar4 = 0xffffffff;\n  }" { (expression_statement "uVar4 = 0xffffffff;" (assignment_expression "uVar4 = 0xffffffff" identifier = number_literal) ;) }) (else_clause "else {\n    piVar1 = (int *)(uVar3 + 0xc);\n    if (*piVar1 < param_4) {\n      return CONCAT44(uVar3,1);\n    }\n    uVar3 = (uint)(iVar2 == param_4);\n    if ((*piVar1 == param_4) || (uVar4 = 0, iVar2 == param_4)) {\n      uVar5 = FUN_000216d0();\n      return uVar5;\n    }\n  }" else (compound_statement "{\n    piVar1 = (int *)(uVar3 + 0xc);\n    if (*piVar1 < param_4) {\n      return CONCAT44(uVar3,1);\n    }\n    uVar3 = (uint)(iVar2 == param_4);\n    if ((*piVar1 == param_4) || (uVar4 = 0, iVar2 == param_4)) {\n      uVar5 = FUN_000216d0();\n      return uVar5;\n    }\n  }" { (expression_statement "piVar1 = (int *)(uVar3 + 0xc);" (assignment_expression "piVar1 = (int *)(uVar3 + 0xc)" identifier = (cast_expression "(int *)(uVar3 + 0xc)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(uVar3 + 0xc)" ( (binary_expression "uVar3 + 0xc" identifier + number_literal) )))) ;) (if_statement "if (*piVar1 < param_4) {\n      return CONCAT44(uVar3,1);\n    }" if (parenthesized_expression "(*piVar1 < param_4)" ( (binary_expression "*piVar1 < param_4" (pointer_expression "*piVar1" * identifier) < identifier) )) (compound_statement "{\n      return CONCAT44(uVar3,1);\n    }" { (return_statement "return CONCAT44(uVar3,1);" return (call_expression "CONCAT44(uVar3,1)" identifier (argument_list "(uVar3,1)" ( identifier , number_literal ))) ;) })) (expression_statement "uVar3 = (uint)(iVar2 == param_4);" (assignment_expression "uVar3 = (uint)(iVar2 == param_4)" identifier = (call_expression "(uint)(iVar2 == param_4)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(iVar2 == param_4)" ( (binary_expression "iVar2 == param_4" identifier == identifier) )))) ;) (if_statement "if ((*piVar1 == param_4) || (uVar4 = 0, iVar2 == param_4)) {\n      uVar5 = FUN_000216d0();\n      return uVar5;\n    }" if (parenthesized_expression "((*piVar1 == param_4) || (uVar4 = 0, iVar2 == param_4))" ( (binary_expression "(*piVar1 == param_4) || (uVar4 = 0, iVar2 == param_4)" (parenthesized_expression "(*piVar1 == param_4)" ( (binary_expression "*piVar1 == param_4" (pointer_expression "*piVar1" * identifier) == identifier) )) || (parenthesized_expression "(uVar4 = 0, iVar2 == param_4)" ( (comma_expression "uVar4 = 0, iVar2 == param_4" (assignment_expression "uVar4 = 0" identifier = number_literal) , (binary_expression "iVar2 == param_4" identifier == identifier)) ))) )) (compound_statement "{\n      uVar5 = FUN_000216d0();\n      return uVar5;\n    }" { (expression_statement "uVar5 = FUN_000216d0();" (assignment_expression "uVar5 = FUN_000216d0()" identifier = (call_expression "FUN_000216d0()" identifier (argument_list "()" ( )))) ;) (return_statement "return uVar5;" return identifier ;) })) }))) (return_statement "return CONCAT44(uVar3,uVar4);" return (call_expression "CONCAT44(uVar3,uVar4)" identifier (argument_list "(uVar3,uVar4)" ( identifier , identifier ))) ;) })))
(translation_unit (function_definition TYPE (ERROR IDENT) (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) + (binary_expression IDENT * LIT))) ;) (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 IDENT < IDENT) )) (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) }) (else_clause else (compound_statement { (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) ;) (if_statement if (parenthesized_expression ( (binary_expression (pointer_expression * IDENT) < IDENT) )) (compound_statement { (return_statement return (call_expression IDENT (argument_list ( IDENT , LIT ))) ;) })) (expression_statement (assignment_expression IDENT = (call_expression (parenthesized_expression ( IDENT )) (argument_list ( (binary_expression IDENT == IDENT) )))) ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression (pointer_expression * IDENT) == IDENT) )) || (parenthesized_expression ( (comma_expression (assignment_expression IDENT = LIT) , (binary_expression IDENT == IDENT)) ))) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( )))) ;) (return_statement return IDENT ;) })) }))) (return_statement return (call_expression IDENT (argument_list ( IDENT , IDENT ))) ;) })))
(function_definition "undefined8 __regparm2 FUN_00021890(int param_1,int param_2,undefined4 param_3,int param_4)\n\n{\n  int *piVar1;\n  int iVar2;\n  uint uVar3;\n  undefined4 uVar4;\n  undefined8 uVar5;\n  \n  uVar3 = *(int *)(param_1 + 0x74) + param_2 * 0x14;\n  iVar2 = *(int *)(uVar3 + 8);\n  if (param_4 < iVar2) {\n    uVar4 = 0xffffffff;\n  }\n  else {\n    piVar1 = (int *)(uVar3 + 0xc);\n    if (*piVar1 < param_4) {\n      return CONCAT44(uVar3,1);\n    }\n    uVar3 = (uint)(iVar2 == param_4);\n    if ((*piVar1 == param_4) || (uVar4 = 0, iVar2 == param_4)) {\n      uVar5 = FUN_000216d0();\n      return uVar5;\n    }\n  }\n  return CONCAT44(uVar3,uVar4);\n}" (type_identifier "undefined8") (ERROR "__regparm2" (identifier "__regparm2")) (function_declarator "FUN_00021890(int param_1,int param_2,undefined4 param_3,int param_4)" (identifier "FUN_00021890") (parameter_list "(int param_1,int param_2,undefined4 param_3,int param_4)" (( "(") (parameter_declaration "int param_1" (primitive_type "int") (identifier "param_1")) (, ",") (parameter_declaration "int param_2" (primitive_type "int") (identifier "param_2")) (, ",") (parameter_declaration "undefined4 param_3" (type_identifier "undefined4") (identifier "param_3")) (, ",") (parameter_declaration "int param_4" (primitive_type "int") (identifier "param_4")) () ")"))) (compound_statement "{\n  int *piVar1;\n  int iVar2;\n  uint uVar3;\n  undefined4 uVar4;\n  undefined8 uVar5;\n  \n  uVar3 = *(int *)(param_1 + 0x74) + param_2 * 0x14;\n  iVar2 = *(int *)(uVar3 + 8);\n  if (param_4 < iVar2) {\n    uVar4 = 0xffffffff;\n  }\n  else {\n    piVar1 = (int *)(uVar3 + 0xc);\n    if (*piVar1 < param_4) {\n      return CONCAT44(uVar3,1);\n    }\n    uVar3 = (uint)(iVar2 == param_4);\n    if ((*piVar1 == param_4) || (uVar4 = 0, iVar2 == param_4)) {\n      uVar5 = FUN_000216d0();\n      return uVar5;\n    }\n  }\n  return CONCAT44(uVar3,uVar4);\n}" ({ "{") (declaration "int *piVar1;" (primitive_type "int") (pointer_declarator "*piVar1" (* "*") (identifier "piVar1")) (; ";")) (declaration "int iVar2;" (primitive_type "int") (identifier "iVar2") (; ";")) (declaration "uint uVar3;" (type_identifier "uint") (identifier "uVar3") (; ";")) (declaration "undefined4 uVar4;" (type_identifier "undefined4") (identifier "uVar4") (; ";")) (declaration "undefined8 uVar5;" (type_identifier "undefined8") (identifier "uVar5") (; ";")) (expression_statement "uVar3 = *(int *)(param_1 + 0x74) + param_2 * 0x14;" (assignment_expression "uVar3 = *(int *)(param_1 + 0x74) + param_2 * 0x14" (identifier "uVar3") (= "=") (binary_expression "*(int *)(param_1 + 0x74) + param_2 * 0x14" (pointer_expression "*(int *)(param_1 + 0x74)" (* "*") (cast_expression "(int *)(param_1 + 0x74)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x74)" (( "(") (binary_expression "param_1 + 0x74" (identifier "param_1") (+ "+") (number_literal "0x74")) () ")")))) (+ "+") (binary_expression "param_2 * 0x14" (identifier "param_2") (* "*") (number_literal "0x14")))) (; ";")) (expression_statement "iVar2 = *(int *)(uVar3 + 8);" (assignment_expression "iVar2 = *(int *)(uVar3 + 8)" (identifier "iVar2") (= "=") (pointer_expression "*(int *)(uVar3 + 8)" (* "*") (cast_expression "(int *)(uVar3 + 8)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(uVar3 + 8)" (( "(") (binary_expression "uVar3 + 8" (identifier "uVar3") (+ "+") (number_literal "8")) () ")"))))) (; ";")) (if_statement "if (param_4 < iVar2) {\n    uVar4 = 0xffffffff;\n  }\n  else {\n    piVar1 = (int *)(uVar3 + 0xc);\n    if (*piVar1 < param_4) {\n      return CONCAT44(uVar3,1);\n    }\n    uVar3 = (uint)(iVar2 == param_4);\n    if ((*piVar1 == param_4) || (uVar4 = 0, iVar2 == param_4)) {\n      uVar5 = FUN_000216d0();\n      return uVar5;\n    }\n  }" (if "if") (parenthesized_expression "(param_4 < iVar2)" (( "(") (binary_expression "param_4 < iVar2" (identifier "param_4") (< "<") (identifier "iVar2")) () ")")) (compound_statement "{\n    uVar4 = 0xffffffff;\n  }" ({ "{") (expression_statement "uVar4 = 0xffffffff;" (assignment_expression "uVar4 = 0xffffffff" (identifier "uVar4") (= "=") (number_literal "0xffffffff")) (; ";")) (} "}")) (else_clause "else {\n    piVar1 = (int *)(uVar3 + 0xc);\n    if (*piVar1 < param_4) {\n      return CONCAT44(uVar3,1);\n    }\n    uVar3 = (uint)(iVar2 == param_4);\n    if ((*piVar1 == param_4) || (uVar4 = 0, iVar2 == param_4)) {\n      uVar5 = FUN_000216d0();\n      return uVar5;\n    }\n  }" (else "else") (compound_statement "{\n    piVar1 = (int *)(uVar3 + 0xc);\n    if (*piVar1 < param_4) {\n      return CONCAT44(uVar3,1);\n    }\n    uVar3 = (uint)(iVar2 == param_4);\n    if ((*piVar1 == param_4) || (uVar4 = 0, iVar2 == param_4)) {\n      uVar5 = FUN_000216d0();\n      return uVar5;\n    }\n  }" ({ "{") (expression_statement "piVar1 = (int *)(uVar3 + 0xc);" (assignment_expression "piVar1 = (int *)(uVar3 + 0xc)" (identifier "piVar1") (= "=") (cast_expression "(int *)(uVar3 + 0xc)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(uVar3 + 0xc)" (( "(") (binary_expression "uVar3 + 0xc" (identifier "uVar3") (+ "+") (number_literal "0xc")) () ")")))) (; ";")) (if_statement "if (*piVar1 < param_4) {\n      return CONCAT44(uVar3,1);\n    }" (if "if") (parenthesized_expression "(*piVar1 < param_4)" (( "(") (binary_expression "*piVar1 < param_4" (pointer_expression "*piVar1" (* "*") (identifier "piVar1")) (< "<") (identifier "param_4")) () ")")) (compound_statement "{\n      return CONCAT44(uVar3,1);\n    }" ({ "{") (return_statement "return CONCAT44(uVar3,1);" (return "return") (call_expression "CONCAT44(uVar3,1)" (identifier "CONCAT44") (argument_list "(uVar3,1)" (( "(") (identifier "uVar3") (, ",") (number_literal "1") () ")"))) (; ";")) (} "}"))) (expression_statement "uVar3 = (uint)(iVar2 == param_4);" (assignment_expression "uVar3 = (uint)(iVar2 == param_4)" (identifier "uVar3") (= "=") (call_expression "(uint)(iVar2 == param_4)" (parenthesized_expression "(uint)" (( "(") (identifier "uint") () ")")) (argument_list "(iVar2 == param_4)" (( "(") (binary_expression "iVar2 == param_4" (identifier "iVar2") (== "==") (identifier "param_4")) () ")")))) (; ";")) (if_statement "if ((*piVar1 == param_4) || (uVar4 = 0, iVar2 == param_4)) {\n      uVar5 = FUN_000216d0();\n      return uVar5;\n    }" (if "if") (parenthesized_expression "((*piVar1 == param_4) || (uVar4 = 0, iVar2 == param_4))" (( "(") (binary_expression "(*piVar1 == param_4) || (uVar4 = 0, iVar2 == param_4)" (parenthesized_expression "(*piVar1 == param_4)" (( "(") (binary_expression "*piVar1 == param_4" (pointer_expression "*piVar1" (* "*") (identifier "piVar1")) (== "==") (identifier "param_4")) () ")")) (|| "||") (parenthesized_expression "(uVar4 = 0, iVar2 == param_4)" (( "(") (comma_expression "uVar4 = 0, iVar2 == param_4" (assignment_expression "uVar4 = 0" (identifier "uVar4") (= "=") (number_literal "0")) (, ",") (binary_expression "iVar2 == param_4" (identifier "iVar2") (== "==") (identifier "param_4"))) () ")"))) () ")")) (compound_statement "{\n      uVar5 = FUN_000216d0();\n      return uVar5;\n    }" ({ "{") (expression_statement "uVar5 = FUN_000216d0();" (assignment_expression "uVar5 = FUN_000216d0()" (identifier "uVar5") (= "=") (call_expression "FUN_000216d0()" (identifier "FUN_000216d0") (argument_list "()" (( "(") () ")")))) (; ";")) (return_statement "return uVar5;" (return "return") (identifier "uVar5") (; ";")) (} "}"))) (} "}")))) (return_statement "return CONCAT44(uVar3,uVar4);" (return "return") (call_expression "CONCAT44(uVar3,uVar4)" (identifier "CONCAT44") (argument_list "(uVar3,uVar4)" (( "(") (identifier "uVar3") (, ",") (identifier "uVar4") () ")"))) (; ";")) (} "}")))

int __regparm3
function_1
          (type_1 *mctx,type_2 limit,type_2 subexp_idx,type_2 from_node,type_2 var_1,type_2 bkref_idx
          )

{
  int var_3;
  int var_2;
  type_3 var_4;
  
  var_2 = mctx->bkref_ents[limit].subexp_from;
  if (var_1 < var_2) {
    return -1;
  }
  var_3 = mctx->bkref_ents[limit].subexp_to;
  if (var_1 <= var_3) {
    var_4 = (type_3)(var_2 == var_1);
    if (var_3 == var_1) {
      var_4 = var_4 | 2;
    }
    else if (var_2 != var_1) {
      return 0;
    }
    var_2 = var_5(mctx,var_4,subexp_idx,from_node,bkref_idx);
    return var_2;
  }
  return 1;
}


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

undefined8 __regparm2 MASKED(int param_1,int param_2,undefined4 param_3,int param_4)

{
  int *piVar1;
  int iVar2;
  uint uVar3;
  undefined4 uVar4;
  undefined8 uVar5;
  
  uVar3 = *(int *)(param_1 + 0x74) + param_2 * 0x14;
  iVar2 = *(int *)(uVar3 + 8);
  if (param_4 < iVar2) {
    uVar4 = 0xffffffff;
  }
  else {
    piVar1 = (int *)(uVar3 + 0xc);
    if (*piVar1 < param_4) {
      return CONCAT44(uVar3,1);
    }
    uVar3 = (uint)(iVar2 == param_4);
    if ((*piVar1 == param_4) || (uVar4 = 0, iVar2 == param_4)) {
      uVar5 = FUN_000216d0();
      return uVar5;
    }
  }
  return CONCAT44(uVar3,uVar4);
}

