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

uint __regparm3 reg_lookup_internal(char *s,reg_class class)

{
  uint uVar1;
  void *pvVar2;
  uint uVar3;
  
  pvVar2 = hash_find(reg_names_hash,s);
  if (pvVar2 != (void *)0x0) {
    uVar1 = (int)pvVar2 - 1;
    uVar3 = 0xffffffff;
    if ((uVar1 % 3 == class) &&
       ((riscv_opts.rve == 0 || uVar1 != (uVar1 / 3) * 3 || (uVar1 < 0x30)))) {
      uVar3 = uVar1 / 3;
    }
    return uVar3;
  }
  return 0xffffffff;
}



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

uint __regparm3 FUN_0003f4c0(undefined4 param_1,uint param_2)

{
  uint uVar1;
  int iVar2;
  uint uVar3;
  
  iVar2 = FUN_00023b80(DAT_00074c3c,param_1);
  if (iVar2 != 0) {
    uVar1 = iVar2 - 1;
    uVar3 = 0xffffffff;
    if ((uVar1 % 3 == param_2) &&
       ((DAT_0006c4f8 == 0 || uVar1 != (uVar1 / 3) * 3 || (uVar1 < 0x30)))) {
      uVar3 = uVar1 / 3;
    }
    return uVar3;
  }
  return 0xffffffff;
}


PUSH ESI
MOV ESI,EDX
PUSH EBX
CALL 0x00015040
ADD EBX,0x2cb37
SUB ESP,0xc
PUSH EAX
PUSH dword ptr [EBX + 0x8c3c]
CALL 0x00023b80
ADD ESP,0x10
TEST EAX,EAX
JZ 0x0003f530
LEA ECX,[EAX + -0x1]
MOV EDX,0xaaaaaaab
MOV EAX,ECX
MUL EDX
SHR EDX,0x1
LEA EAX,[EDX + EDX*0x2]
MOV EDX,ECX
SUB EDX,EAX
MOV EAX,0xffffffff
CMP EDX,ESI
JNZ 0x0003f529
MOV EBX,dword ptr [EBX + 0x4f8]
TEST EBX,EBX
SETNZ BL
TEST EDX,EDX
SETZ DL
TEST BL,DL
JZ 0x0003f51c
CMP ECX,0x2f
JA 0x0003f529
MOV EAX,ECX
MOV EDX,0xaaaaaaab
MUL EDX
MOV EAX,EDX
SHR EAX,0x1
ADD ESP,0x4
POP EBX
POP ESI
RET
ADD ESP,0x4
MOV EAX,0xffffffff
POP EBX
POP ESI
RET
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nuint __regparm3 FUN_0003f4c0(undefined4 param_1,uint param_2)\n\n{\n  uint uVar1;\n  int iVar2;\n  uint uVar3;\n  \n  iVar2 = FUN_00023b80(DAT_00074c3c,param_1);\n  if (iVar2 != 0) {\n    uVar1 = iVar2 - 1;\n    uVar3 = 0xffffffff;\n    if ((uVar1 % 3 == param_2) &&\n       ((DAT_0006c4f8 == 0 || uVar1 != (uVar1 / 3) * 3 || (uVar1 < 0x30)))) {\n      uVar3 = uVar1 / 3;\n    }\n    return uVar3;\n  }\n  return 0xffffffff;\n}\n\n" comment (function_definition "uint __regparm3 FUN_0003f4c0(undefined4 param_1,uint param_2)\n\n{\n  uint uVar1;\n  int iVar2;\n  uint uVar3;\n  \n  iVar2 = FUN_00023b80(DAT_00074c3c,param_1);\n  if (iVar2 != 0) {\n    uVar1 = iVar2 - 1;\n    uVar3 = 0xffffffff;\n    if ((uVar1 % 3 == param_2) &&\n       ((DAT_0006c4f8 == 0 || uVar1 != (uVar1 / 3) * 3 || (uVar1 < 0x30)))) {\n      uVar3 = uVar1 / 3;\n    }\n    return uVar3;\n  }\n  return 0xffffffff;\n}" type_identifier (ERROR "__regparm3" identifier) (function_declarator "FUN_0003f4c0(undefined4 param_1,uint param_2)" identifier (parameter_list "(undefined4 param_1,uint param_2)" ( (parameter_declaration "undefined4 param_1" type_identifier identifier) , (parameter_declaration "uint param_2" type_identifier identifier) ))) (compound_statement "{\n  uint uVar1;\n  int iVar2;\n  uint uVar3;\n  \n  iVar2 = FUN_00023b80(DAT_00074c3c,param_1);\n  if (iVar2 != 0) {\n    uVar1 = iVar2 - 1;\n    uVar3 = 0xffffffff;\n    if ((uVar1 % 3 == param_2) &&\n       ((DAT_0006c4f8 == 0 || uVar1 != (uVar1 / 3) * 3 || (uVar1 < 0x30)))) {\n      uVar3 = uVar1 / 3;\n    }\n    return uVar3;\n  }\n  return 0xffffffff;\n}" { (declaration "uint uVar1;" type_identifier identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "uint uVar3;" type_identifier identifier ;) (expression_statement "iVar2 = FUN_00023b80(DAT_00074c3c,param_1);" (assignment_expression "iVar2 = FUN_00023b80(DAT_00074c3c,param_1)" identifier = (call_expression "FUN_00023b80(DAT_00074c3c,param_1)" identifier (argument_list "(DAT_00074c3c,param_1)" ( identifier , identifier )))) ;) (if_statement "if (iVar2 != 0) {\n    uVar1 = iVar2 - 1;\n    uVar3 = 0xffffffff;\n    if ((uVar1 % 3 == param_2) &&\n       ((DAT_0006c4f8 == 0 || uVar1 != (uVar1 / 3) * 3 || (uVar1 < 0x30)))) {\n      uVar3 = uVar1 / 3;\n    }\n    return uVar3;\n  }" if (parenthesized_expression "(iVar2 != 0)" ( (binary_expression "iVar2 != 0" identifier != number_literal) )) (compound_statement "{\n    uVar1 = iVar2 - 1;\n    uVar3 = 0xffffffff;\n    if ((uVar1 % 3 == param_2) &&\n       ((DAT_0006c4f8 == 0 || uVar1 != (uVar1 / 3) * 3 || (uVar1 < 0x30)))) {\n      uVar3 = uVar1 / 3;\n    }\n    return uVar3;\n  }" { (expression_statement "uVar1 = iVar2 - 1;" (assignment_expression "uVar1 = iVar2 - 1" identifier = (binary_expression "iVar2 - 1" identifier - number_literal)) ;) (expression_statement "uVar3 = 0xffffffff;" (assignment_expression "uVar3 = 0xffffffff" identifier = number_literal) ;) (if_statement "if ((uVar1 % 3 == param_2) &&\n       ((DAT_0006c4f8 == 0 || uVar1 != (uVar1 / 3) * 3 || (uVar1 < 0x30)))) {\n      uVar3 = uVar1 / 3;\n    }" if (parenthesized_expression "((uVar1 % 3 == param_2) &&\n       ((DAT_0006c4f8 == 0 || uVar1 != (uVar1 / 3) * 3 || (uVar1 < 0x30))))" ( (binary_expression "(uVar1 % 3 == param_2) &&\n       ((DAT_0006c4f8 == 0 || uVar1 != (uVar1 / 3) * 3 || (uVar1 < 0x30)))" (parenthesized_expression "(uVar1 % 3 == param_2)" ( (binary_expression "uVar1 % 3 == param_2" (binary_expression "uVar1 % 3" identifier % number_literal) == identifier) )) && (parenthesized_expression "((DAT_0006c4f8 == 0 || uVar1 != (uVar1 / 3) * 3 || (uVar1 < 0x30)))" ( (parenthesized_expression "(DAT_0006c4f8 == 0 || uVar1 != (uVar1 / 3) * 3 || (uVar1 < 0x30))" ( (binary_expression "DAT_0006c4f8 == 0 || uVar1 != (uVar1 / 3) * 3 || (uVar1 < 0x30)" (binary_expression "DAT_0006c4f8 == 0 || uVar1 != (uVar1 / 3) * 3" (binary_expression "DAT_0006c4f8 == 0" identifier == number_literal) || (binary_expression "uVar1 != (uVar1 / 3) * 3" identifier != (binary_expression "(uVar1 / 3) * 3" (parenthesized_expression "(uVar1 / 3)" ( (binary_expression "uVar1 / 3" identifier / number_literal) )) * number_literal))) || (parenthesized_expression "(uVar1 < 0x30)" ( (binary_expression "uVar1 < 0x30" identifier < number_literal) ))) )) ))) )) (compound_statement "{\n      uVar3 = uVar1 / 3;\n    }" { (expression_statement "uVar3 = uVar1 / 3;" (assignment_expression "uVar3 = uVar1 / 3" identifier = (binary_expression "uVar1 / 3" identifier / number_literal)) ;) })) (return_statement "return uVar3;" return identifier ;) })) (return_statement "return 0xffffffff;" return number_literal ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nuint __regparm3 reg_lookup_internal(char *s,reg_class class)\n\n{\n  uint uVar1;\n  void *pvVar2;\n  uint uVar3;\n  \n  pvVar2 = hash_find(reg_names_hash,s);\n  if (pvVar2 != (void *)0x0) {\n    uVar1 = (int)pvVar2 - 1;\n    uVar3 = 0xffffffff;\n    if ((uVar1 % 3 == class) &&\n       ((riscv_opts.rve == 0 || uVar1 != (uVar1 / 3) * 3 || (uVar1 < 0x30)))) {\n      uVar3 = uVar1 / 3;\n    }\n    return uVar3;\n  }\n  return 0xffffffff;\n}\n\n" comment (function_definition "uint __regparm3 reg_lookup_internal(char *s,reg_class class)\n\n{\n  uint uVar1;\n  void *pvVar2;\n  uint uVar3;\n  \n  pvVar2 = hash_find(reg_names_hash,s);\n  if (pvVar2 != (void *)0x0) {\n    uVar1 = (int)pvVar2 - 1;\n    uVar3 = 0xffffffff;\n    if ((uVar1 % 3 == class) &&\n       ((riscv_opts.rve == 0 || uVar1 != (uVar1 / 3) * 3 || (uVar1 < 0x30)))) {\n      uVar3 = uVar1 / 3;\n    }\n    return uVar3;\n  }\n  return 0xffffffff;\n}" type_identifier (ERROR "__regparm3" identifier) (function_declarator "reg_lookup_internal(char *s,reg_class class)" identifier (parameter_list "(char *s,reg_class class)" ( (parameter_declaration "char *s" primitive_type (pointer_declarator "*s" * identifier)) , (parameter_declaration "reg_class class" type_identifier identifier) ))) (compound_statement "{\n  uint uVar1;\n  void *pvVar2;\n  uint uVar3;\n  \n  pvVar2 = hash_find(reg_names_hash,s);\n  if (pvVar2 != (void *)0x0) {\n    uVar1 = (int)pvVar2 - 1;\n    uVar3 = 0xffffffff;\n    if ((uVar1 % 3 == class) &&\n       ((riscv_opts.rve == 0 || uVar1 != (uVar1 / 3) * 3 || (uVar1 < 0x30)))) {\n      uVar3 = uVar1 / 3;\n    }\n    return uVar3;\n  }\n  return 0xffffffff;\n}" { (declaration "uint uVar1;" type_identifier identifier ;) (declaration "void *pvVar2;" primitive_type (pointer_declarator "*pvVar2" * identifier) ;) (declaration "uint uVar3;" type_identifier identifier ;) (expression_statement "pvVar2 = hash_find(reg_names_hash,s);" (assignment_expression "pvVar2 = hash_find(reg_names_hash,s)" identifier = (call_expression "hash_find(reg_names_hash,s)" identifier (argument_list "(reg_names_hash,s)" ( identifier , identifier )))) ;) (if_statement "if (pvVar2 != (void *)0x0) {\n    uVar1 = (int)pvVar2 - 1;\n    uVar3 = 0xffffffff;\n    if ((uVar1 % 3 == class) &&\n       ((riscv_opts.rve == 0 || uVar1 != (uVar1 / 3) * 3 || (uVar1 < 0x30)))) {\n      uVar3 = uVar1 / 3;\n    }\n    return uVar3;\n  }" if (parenthesized_expression "(pvVar2 != (void *)0x0)" ( (binary_expression "pvVar2 != (void *)0x0" identifier != (cast_expression "(void *)0x0" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    uVar1 = (int)pvVar2 - 1;\n    uVar3 = 0xffffffff;\n    if ((uVar1 % 3 == class) &&\n       ((riscv_opts.rve == 0 || uVar1 != (uVar1 / 3) * 3 || (uVar1 < 0x30)))) {\n      uVar3 = uVar1 / 3;\n    }\n    return uVar3;\n  }" { (expression_statement "uVar1 = (int)pvVar2 - 1;" (assignment_expression "uVar1 = (int)pvVar2 - 1" identifier = (binary_expression "(int)pvVar2 - 1" (cast_expression "(int)pvVar2" ( (type_descriptor "int" primitive_type) ) identifier) - number_literal)) ;) (expression_statement "uVar3 = 0xffffffff;" (assignment_expression "uVar3 = 0xffffffff" identifier = number_literal) ;) (if_statement "if ((uVar1 % 3 == class) &&\n       ((riscv_opts.rve == 0 || uVar1 != (uVar1 / 3) * 3 || (uVar1 < 0x30)))) {\n      uVar3 = uVar1 / 3;\n    }" if (parenthesized_expression "((uVar1 % 3 == class) &&\n       ((riscv_opts.rve == 0 || uVar1 != (uVar1 / 3) * 3 || (uVar1 < 0x30))))" ( (binary_expression "(uVar1 % 3 == class) &&\n       ((riscv_opts.rve == 0 || uVar1 != (uVar1 / 3) * 3 || (uVar1 < 0x30)))" (parenthesized_expression "(uVar1 % 3 == class)" ( (binary_expression "uVar1 % 3 == class" (binary_expression "uVar1 % 3" identifier % number_literal) == identifier) )) && (parenthesized_expression "((riscv_opts.rve == 0 || uVar1 != (uVar1 / 3) * 3 || (uVar1 < 0x30)))" ( (parenthesized_expression "(riscv_opts.rve == 0 || uVar1 != (uVar1 / 3) * 3 || (uVar1 < 0x30))" ( (binary_expression "riscv_opts.rve == 0 || uVar1 != (uVar1 / 3) * 3 || (uVar1 < 0x30)" (binary_expression "riscv_opts.rve == 0 || uVar1 != (uVar1 / 3) * 3" (binary_expression "riscv_opts.rve == 0" (field_expression "riscv_opts.rve" identifier . field_identifier) == number_literal) || (binary_expression "uVar1 != (uVar1 / 3) * 3" identifier != (binary_expression "(uVar1 / 3) * 3" (parenthesized_expression "(uVar1 / 3)" ( (binary_expression "uVar1 / 3" identifier / number_literal) )) * number_literal))) || (parenthesized_expression "(uVar1 < 0x30)" ( (binary_expression "uVar1 < 0x30" identifier < number_literal) ))) )) ))) )) (compound_statement "{\n      uVar3 = uVar1 / 3;\n    }" { (expression_statement "uVar3 = uVar1 / 3;" (assignment_expression "uVar3 = uVar1 / 3" identifier = (binary_expression "uVar1 / 3" identifier / number_literal)) ;) })) (return_statement "return uVar3;" return identifier ;) })) (return_statement "return 0xffffffff;" return number_literal ;) })))
(translation_unit "uint __regparm3 FUN_0003f4c0(undefined4 param_1,uint param_2)\n\n{\n  uint uVar1;\n  int iVar2;\n  uint uVar3;\n  \n  iVar2 = FUN_00023b80(DAT_00074c3c,param_1);\n  if (iVar2 != 0) {\n    uVar1 = iVar2 - 1;\n    uVar3 = 0xffffffff;\n    if ((uVar1 % 3 == param_2) &&\n       ((DAT_0006c4f8 == 0 || uVar1 != (uVar1 / 3) * 3 || (uVar1 < 0x30)))) {\n      uVar3 = uVar1 / 3;\n    }\n    return uVar3;\n  }\n  return 0xffffffff;\n}\n\n" (function_definition "uint __regparm3 FUN_0003f4c0(undefined4 param_1,uint param_2)\n\n{\n  uint uVar1;\n  int iVar2;\n  uint uVar3;\n  \n  iVar2 = FUN_00023b80(DAT_00074c3c,param_1);\n  if (iVar2 != 0) {\n    uVar1 = iVar2 - 1;\n    uVar3 = 0xffffffff;\n    if ((uVar1 % 3 == param_2) &&\n       ((DAT_0006c4f8 == 0 || uVar1 != (uVar1 / 3) * 3 || (uVar1 < 0x30)))) {\n      uVar3 = uVar1 / 3;\n    }\n    return uVar3;\n  }\n  return 0xffffffff;\n}" type_identifier (ERROR "__regparm3" identifier) (function_declarator "FUN_0003f4c0(undefined4 param_1,uint param_2)" identifier (parameter_list "(undefined4 param_1,uint param_2)" ( (parameter_declaration "undefined4 param_1" type_identifier identifier) , (parameter_declaration "uint param_2" type_identifier identifier) ))) (compound_statement "{\n  uint uVar1;\n  int iVar2;\n  uint uVar3;\n  \n  iVar2 = FUN_00023b80(DAT_00074c3c,param_1);\n  if (iVar2 != 0) {\n    uVar1 = iVar2 - 1;\n    uVar3 = 0xffffffff;\n    if ((uVar1 % 3 == param_2) &&\n       ((DAT_0006c4f8 == 0 || uVar1 != (uVar1 / 3) * 3 || (uVar1 < 0x30)))) {\n      uVar3 = uVar1 / 3;\n    }\n    return uVar3;\n  }\n  return 0xffffffff;\n}" { (declaration "uint uVar1;" type_identifier identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "uint uVar3;" type_identifier identifier ;) (expression_statement "iVar2 = FUN_00023b80(DAT_00074c3c,param_1);" (assignment_expression "iVar2 = FUN_00023b80(DAT_00074c3c,param_1)" identifier = (call_expression "FUN_00023b80(DAT_00074c3c,param_1)" identifier (argument_list "(DAT_00074c3c,param_1)" ( identifier , identifier )))) ;) (if_statement "if (iVar2 != 0) {\n    uVar1 = iVar2 - 1;\n    uVar3 = 0xffffffff;\n    if ((uVar1 % 3 == param_2) &&\n       ((DAT_0006c4f8 == 0 || uVar1 != (uVar1 / 3) * 3 || (uVar1 < 0x30)))) {\n      uVar3 = uVar1 / 3;\n    }\n    return uVar3;\n  }" if (parenthesized_expression "(iVar2 != 0)" ( (binary_expression "iVar2 != 0" identifier != number_literal) )) (compound_statement "{\n    uVar1 = iVar2 - 1;\n    uVar3 = 0xffffffff;\n    if ((uVar1 % 3 == param_2) &&\n       ((DAT_0006c4f8 == 0 || uVar1 != (uVar1 / 3) * 3 || (uVar1 < 0x30)))) {\n      uVar3 = uVar1 / 3;\n    }\n    return uVar3;\n  }" { (expression_statement "uVar1 = iVar2 - 1;" (assignment_expression "uVar1 = iVar2 - 1" identifier = (binary_expression "iVar2 - 1" identifier - number_literal)) ;) (expression_statement "uVar3 = 0xffffffff;" (assignment_expression "uVar3 = 0xffffffff" identifier = number_literal) ;) (if_statement "if ((uVar1 % 3 == param_2) &&\n       ((DAT_0006c4f8 == 0 || uVar1 != (uVar1 / 3) * 3 || (uVar1 < 0x30)))) {\n      uVar3 = uVar1 / 3;\n    }" if (parenthesized_expression "((uVar1 % 3 == param_2) &&\n       ((DAT_0006c4f8 == 0 || uVar1 != (uVar1 / 3) * 3 || (uVar1 < 0x30))))" ( (binary_expression "(uVar1 % 3 == param_2) &&\n       ((DAT_0006c4f8 == 0 || uVar1 != (uVar1 / 3) * 3 || (uVar1 < 0x30)))" (parenthesized_expression "(uVar1 % 3 == param_2)" ( (binary_expression "uVar1 % 3 == param_2" (binary_expression "uVar1 % 3" identifier % number_literal) == identifier) )) && (parenthesized_expression "((DAT_0006c4f8 == 0 || uVar1 != (uVar1 / 3) * 3 || (uVar1 < 0x30)))" ( (parenthesized_expression "(DAT_0006c4f8 == 0 || uVar1 != (uVar1 / 3) * 3 || (uVar1 < 0x30))" ( (binary_expression "DAT_0006c4f8 == 0 || uVar1 != (uVar1 / 3) * 3 || (uVar1 < 0x30)" (binary_expression "DAT_0006c4f8 == 0 || uVar1 != (uVar1 / 3) * 3" (binary_expression "DAT_0006c4f8 == 0" identifier == number_literal) || (binary_expression "uVar1 != (uVar1 / 3) * 3" identifier != (binary_expression "(uVar1 / 3) * 3" (parenthesized_expression "(uVar1 / 3)" ( (binary_expression "uVar1 / 3" identifier / number_literal) )) * number_literal))) || (parenthesized_expression "(uVar1 < 0x30)" ( (binary_expression "uVar1 < 0x30" identifier < number_literal) ))) )) ))) )) (compound_statement "{\n      uVar3 = uVar1 / 3;\n    }" { (expression_statement "uVar3 = uVar1 / 3;" (assignment_expression "uVar3 = uVar1 / 3" identifier = (binary_expression "uVar1 / 3" identifier / number_literal)) ;) })) (return_statement "return uVar3;" return identifier ;) })) (return_statement "return 0xffffffff;" return number_literal ;) })))
(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 ;) (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , IDENT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression IDENT - LIT)) ;) (expression_statement (assignment_expression IDENT = LIT) ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression (binary_expression IDENT % LIT) == IDENT) )) && (parenthesized_expression ( (parenthesized_expression ( (binary_expression (binary_expression (binary_expression IDENT == LIT) || (binary_expression IDENT != (binary_expression (parenthesized_expression ( (binary_expression IDENT / LIT) )) * LIT))) || (parenthesized_expression ( (binary_expression IDENT < LIT) ))) )) ))) )) (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression IDENT / LIT)) ;) })) (return_statement return IDENT ;) })) (return_statement return LIT ;) })))
(function_definition "uint __regparm3 FUN_0003f4c0(undefined4 param_1,uint param_2)\n\n{\n  uint uVar1;\n  int iVar2;\n  uint uVar3;\n  \n  iVar2 = FUN_00023b80(DAT_00074c3c,param_1);\n  if (iVar2 != 0) {\n    uVar1 = iVar2 - 1;\n    uVar3 = 0xffffffff;\n    if ((uVar1 % 3 == param_2) &&\n       ((DAT_0006c4f8 == 0 || uVar1 != (uVar1 / 3) * 3 || (uVar1 < 0x30)))) {\n      uVar3 = uVar1 / 3;\n    }\n    return uVar3;\n  }\n  return 0xffffffff;\n}" (type_identifier "uint") (ERROR "__regparm3" (identifier "__regparm3")) (function_declarator "FUN_0003f4c0(undefined4 param_1,uint param_2)" (identifier "FUN_0003f4c0") (parameter_list "(undefined4 param_1,uint param_2)" (( "(") (parameter_declaration "undefined4 param_1" (type_identifier "undefined4") (identifier "param_1")) (, ",") (parameter_declaration "uint param_2" (type_identifier "uint") (identifier "param_2")) () ")"))) (compound_statement "{\n  uint uVar1;\n  int iVar2;\n  uint uVar3;\n  \n  iVar2 = FUN_00023b80(DAT_00074c3c,param_1);\n  if (iVar2 != 0) {\n    uVar1 = iVar2 - 1;\n    uVar3 = 0xffffffff;\n    if ((uVar1 % 3 == param_2) &&\n       ((DAT_0006c4f8 == 0 || uVar1 != (uVar1 / 3) * 3 || (uVar1 < 0x30)))) {\n      uVar3 = uVar1 / 3;\n    }\n    return uVar3;\n  }\n  return 0xffffffff;\n}" ({ "{") (declaration "uint uVar1;" (type_identifier "uint") (identifier "uVar1") (; ";")) (declaration "int iVar2;" (primitive_type "int") (identifier "iVar2") (; ";")) (declaration "uint uVar3;" (type_identifier "uint") (identifier "uVar3") (; ";")) (expression_statement "iVar2 = FUN_00023b80(DAT_00074c3c,param_1);" (assignment_expression "iVar2 = FUN_00023b80(DAT_00074c3c,param_1)" (identifier "iVar2") (= "=") (call_expression "FUN_00023b80(DAT_00074c3c,param_1)" (identifier "FUN_00023b80") (argument_list "(DAT_00074c3c,param_1)" (( "(") (identifier "DAT_00074c3c") (, ",") (identifier "param_1") () ")")))) (; ";")) (if_statement "if (iVar2 != 0) {\n    uVar1 = iVar2 - 1;\n    uVar3 = 0xffffffff;\n    if ((uVar1 % 3 == param_2) &&\n       ((DAT_0006c4f8 == 0 || uVar1 != (uVar1 / 3) * 3 || (uVar1 < 0x30)))) {\n      uVar3 = uVar1 / 3;\n    }\n    return uVar3;\n  }" (if "if") (parenthesized_expression "(iVar2 != 0)" (( "(") (binary_expression "iVar2 != 0" (identifier "iVar2") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n    uVar1 = iVar2 - 1;\n    uVar3 = 0xffffffff;\n    if ((uVar1 % 3 == param_2) &&\n       ((DAT_0006c4f8 == 0 || uVar1 != (uVar1 / 3) * 3 || (uVar1 < 0x30)))) {\n      uVar3 = uVar1 / 3;\n    }\n    return uVar3;\n  }" ({ "{") (expression_statement "uVar1 = iVar2 - 1;" (assignment_expression "uVar1 = iVar2 - 1" (identifier "uVar1") (= "=") (binary_expression "iVar2 - 1" (identifier "iVar2") (- "-") (number_literal "1"))) (; ";")) (expression_statement "uVar3 = 0xffffffff;" (assignment_expression "uVar3 = 0xffffffff" (identifier "uVar3") (= "=") (number_literal "0xffffffff")) (; ";")) (if_statement "if ((uVar1 % 3 == param_2) &&\n       ((DAT_0006c4f8 == 0 || uVar1 != (uVar1 / 3) * 3 || (uVar1 < 0x30)))) {\n      uVar3 = uVar1 / 3;\n    }" (if "if") (parenthesized_expression "((uVar1 % 3 == param_2) &&\n       ((DAT_0006c4f8 == 0 || uVar1 != (uVar1 / 3) * 3 || (uVar1 < 0x30))))" (( "(") (binary_expression "(uVar1 % 3 == param_2) &&\n       ((DAT_0006c4f8 == 0 || uVar1 != (uVar1 / 3) * 3 || (uVar1 < 0x30)))" (parenthesized_expression "(uVar1 % 3 == param_2)" (( "(") (binary_expression "uVar1 % 3 == param_2" (binary_expression "uVar1 % 3" (identifier "uVar1") (% "%") (number_literal "3")) (== "==") (identifier "param_2")) () ")")) (&& "&&") (parenthesized_expression "((DAT_0006c4f8 == 0 || uVar1 != (uVar1 / 3) * 3 || (uVar1 < 0x30)))" (( "(") (parenthesized_expression "(DAT_0006c4f8 == 0 || uVar1 != (uVar1 / 3) * 3 || (uVar1 < 0x30))" (( "(") (binary_expression "DAT_0006c4f8 == 0 || uVar1 != (uVar1 / 3) * 3 || (uVar1 < 0x30)" (binary_expression "DAT_0006c4f8 == 0 || uVar1 != (uVar1 / 3) * 3" (binary_expression "DAT_0006c4f8 == 0" (identifier "DAT_0006c4f8") (== "==") (number_literal "0")) (|| "||") (binary_expression "uVar1 != (uVar1 / 3) * 3" (identifier "uVar1") (!= "!=") (binary_expression "(uVar1 / 3) * 3" (parenthesized_expression "(uVar1 / 3)" (( "(") (binary_expression "uVar1 / 3" (identifier "uVar1") (/ "/") (number_literal "3")) () ")")) (* "*") (number_literal "3")))) (|| "||") (parenthesized_expression "(uVar1 < 0x30)" (( "(") (binary_expression "uVar1 < 0x30" (identifier "uVar1") (< "<") (number_literal "0x30")) () ")"))) () ")")) () ")"))) () ")")) (compound_statement "{\n      uVar3 = uVar1 / 3;\n    }" ({ "{") (expression_statement "uVar3 = uVar1 / 3;" (assignment_expression "uVar3 = uVar1 / 3" (identifier "uVar3") (= "=") (binary_expression "uVar1 / 3" (identifier "uVar1") (/ "/") (number_literal "3"))) (; ";")) (} "}"))) (return_statement "return uVar3;" (return "return") (identifier "uVar3") (; ";")) (} "}"))) (return_statement "return 0xffffffff;" (return "return") (number_literal "0xffffffff") (; ";")) (} "}")))

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

type_1 __regparm3 function_1(char *s,type_2 var_4)

{
  type_1 var_3;
  void *var_2;
  type_1 uVar3;
  
  var_2 = var_1(reg_names_hash,s);
  if (var_2 != (void *)0x0) {
    var_3 = (int)var_2 - 1;
    uVar3 = 0xffffffff;
    if ((var_3 % 3 == var_4) &&
       ((riscv_opts.rve == 0 || var_3 != (var_3 / 3) * 3 || (var_3 < 0x30)))) {
      uVar3 = var_3 / 3;
    }
    return uVar3;
  }
  return 0xffffffff;
}


(translation_unit (function_definition type: (type_identifier) (ERROR (identifier)) declarator: (function_declarator declarator: (identifier) parameters: (parameter_list (parameter_declaration type: (type_identifier) declarator: (identifier)) (parameter_declaration type: (type_identifier) declarator: (identifier)))) body: (compound_statement (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (type_identifier) declarator: (identifier)) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (identifier) (identifier))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal)))) (expression_statement (assignment_expression left: (identifier) right: (number_literal))) (if_statement condition: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_expression left: (binary_expression left: (identifier) right: (number_literal)) right: (identifier))) right: (parenthesized_expression (parenthesized_expression (binary_expression left: (binary_expression left: (binary_expression left: (identifier) right: (number_literal)) right: (binary_expression left: (identifier) right: (binary_expression left: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) right: (number_literal)))) right: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal)))))))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal)))))) (return_statement (identifier)))) (return_statement (number_literal)))))

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

uint __regparm3 MASKED(undefined4 param_1,uint param_2)

{
  uint uVar1;
  int iVar2;
  uint uVar3;
  
  iVar2 = FUN_00023b80(DAT_00074c3c,param_1);
  if (iVar2 != 0) {
    uVar1 = iVar2 - 1;
    uVar3 = 0xffffffff;
    if ((uVar1 % 3 == param_2) &&
       ((DAT_0006c4f8 == 0 || uVar1 != (uVar1 / 3) * 3 || (uVar1 < 0x30)))) {
      uVar3 = uVar1 / 3;
    }
    return uVar3;
  }
  return 0xffffffff;
}

