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

size_t __regparm3 move_mbleft(char *buf,size_t pos)

{
  char *__s;
  char cVar1;
  int iVar2;
  uint uVar3;
  uint uVar4;
  
  if (pos < 4) {
    uVar4 = 0;
  }
  else if ((-0x41 < buf[pos - 1]) ||
          (((uVar4 = pos - 2, buf[pos - 2] < -0x40 && (uVar4 = pos - 3, buf[pos - 3] < -0x40)) &&
           (uVar4 = pos - 4, buf[pos - 4] < -0x40)))) {
    uVar4 = pos - 1;
    goto LAB_0001762e;
  }
  if (pos <= uVar4) {
    return uVar4;
  }
LAB_0001762e:
  __s = buf + uVar4;
  cVar1 = *__s;
  while( true ) {
    if (cVar1 < '\0') {
      iVar2 = mblen(__s,6);
      if (iVar2 < 1) {
        iVar2 = 1;
      }
      uVar3 = iVar2 + uVar4;
    }
    else {
      uVar3 = uVar4 + 1;
    }
    if (pos <= uVar3) break;
    __s = buf + uVar3;
    cVar1 = *__s;
    uVar4 = uVar3;
  }
  return uVar4;
}



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

uint __regparm3 FUN_00017600(int param_1,uint param_2)

{
  char *__s;
  char cVar1;
  int iVar2;
  uint uVar3;
  uint uVar4;
  
  if (param_2 < 4) {
    uVar4 = 0;
  }
  else {
    iVar2 = param_1 + param_2;
    if ((-0x41 < *(char *)(iVar2 + -1)) ||
       (((uVar4 = param_2 - 2, *(char *)(iVar2 + -2) < -0x40 &&
         (uVar4 = param_2 - 3, *(char *)(iVar2 + -3) < -0x40)) &&
        (uVar4 = param_2 - 4, *(char *)(iVar2 + -4) < -0x40)))) {
      uVar4 = param_2 - 1;
      goto LAB_0001762e;
    }
  }
  if (param_2 <= uVar4) {
    return uVar4;
  }
LAB_0001762e:
  __s = (char *)(param_1 + uVar4);
  cVar1 = *__s;
  while( true ) {
    if (cVar1 < '\0') {
      iVar2 = mblen(__s,6);
      if (iVar2 < 1) {
        iVar2 = 1;
      }
      uVar3 = iVar2 + uVar4;
    }
    else {
      uVar3 = uVar4 + 1;
    }
    if (param_2 <= uVar3) break;
    __s = (char *)(param_1 + uVar3);
    cVar1 = *__s;
    uVar4 = uVar3;
  }
  return uVar4;
}


PUSH EBP
PUSH EDI
PUSH ESI
PUSH EBX
CALL 0x00015680
ADD EBX,0x635c7
SUB ESP,0xc
CMP EDX,0x3
JBE 0x00017628
LEA ECX,[EAX + EDX*0x1]
CMP byte ptr [ECX + -0x1],0xc0
JL 0x00017680
LEA ESI,[EDX + -0x1]
JMP 0x0001762e
XOR ESI,ESI
CMP EDX,ESI
JBE 0x00017670
MOV EBP,EAX
MOV EDI,EDX
LEA EAX,[EBP + ESI*0x1]
CMP byte ptr [EAX],0x0
JS 0x00017652
LEA ESI,[ESI]
NOP
LEA EAX,[ESI + 0x1]
CMP EDI,EAX
JBE 0x00017670
MOV ESI,EAX
LEA EAX,[EBP + ESI*0x1]
CMP byte ptr [EAX],0x0
JNS 0x00017640
SUB ESP,0x8
PUSH 0x6
PUSH EAX
CALL 0x000133e0
ADD ESP,0x10
MOV ECX,0x1
TEST EAX,EAX
CMOVLE EAX,ECX
ADD EAX,ESI
CMP EDI,EAX
JA 0x00017647
ADD ESP,0xc
MOV EAX,ESI
POP EBX
POP ESI
POP EDI
POP EBP
RET
CMP byte ptr [ECX + -0x2],0xc0
LEA ESI,[EDX + -0x2]
JGE 0x0001762a
CMP byte ptr [ECX + -0x3],0xc0
LEA ESI,[EDX + -0x3]
JGE 0x0001762a
CMP byte ptr [ECX + -0x4],0xc0
LEA ESI,[EDX + -0x4]
JGE 0x0001762a
JMP 0x00017620
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nuint __regparm3 FUN_00017600(int param_1,uint param_2)\n\n{\n  char *__s;\n  char cVar1;\n  int iVar2;\n  uint uVar3;\n  uint uVar4;\n  \n  if (param_2 < 4) {\n    uVar4 = 0;\n  }\n  else {\n    iVar2 = param_1 + param_2;\n    if ((-0x41 < *(char *)(iVar2 + -1)) ||\n       (((uVar4 = param_2 - 2, *(char *)(iVar2 + -2) < -0x40 &&\n         (uVar4 = param_2 - 3, *(char *)(iVar2 + -3) < -0x40)) &&\n        (uVar4 = param_2 - 4, *(char *)(iVar2 + -4) < -0x40)))) {\n      uVar4 = param_2 - 1;\n      goto LAB_0001762e;\n    }\n  }\n  if (param_2 <= uVar4) {\n    return uVar4;\n  }\nLAB_0001762e:\n  __s = (char *)(param_1 + uVar4);\n  cVar1 = *__s;\n  while( true ) {\n    if (cVar1 < '\0') {\n      iVar2 = mblen(__s,6);\n      if (iVar2 < 1) {\n        iVar2 = 1;\n      }\n      uVar3 = iVar2 + uVar4;\n    }\n    else {\n      uVar3 = uVar4 + 1;\n    }\n    if (param_2 <= uVar3) break;\n    __s = (char *)(param_1 + uVar3);\n    cVar1 = *__s;\n    uVar4 = uVar3;\n  }\n  return uVar4;\n}\n\n" comment (function_definition "uint __regparm3 FUN_00017600(int param_1,uint param_2)\n\n{\n  char *__s;\n  char cVar1;\n  int iVar2;\n  uint uVar3;\n  uint uVar4;\n  \n  if (param_2 < 4) {\n    uVar4 = 0;\n  }\n  else {\n    iVar2 = param_1 + param_2;\n    if ((-0x41 < *(char *)(iVar2 + -1)) ||\n       (((uVar4 = param_2 - 2, *(char *)(iVar2 + -2) < -0x40 &&\n         (uVar4 = param_2 - 3, *(char *)(iVar2 + -3) < -0x40)) &&\n        (uVar4 = param_2 - 4, *(char *)(iVar2 + -4) < -0x40)))) {\n      uVar4 = param_2 - 1;\n      goto LAB_0001762e;\n    }\n  }\n  if (param_2 <= uVar4) {\n    return uVar4;\n  }\nLAB_0001762e:\n  __s = (char *)(param_1 + uVar4);\n  cVar1 = *__s;\n  while( true ) {\n    if (cVar1 < '\0') {\n      iVar2 = mblen(__s,6);\n      if (iVar2 < 1) {\n        iVar2 = 1;\n      }\n      uVar3 = iVar2 + uVar4;\n    }\n    else {\n      uVar3 = uVar4 + 1;\n    }\n    if (param_2 <= uVar3) break;\n    __s = (char *)(param_1 + uVar3);\n    cVar1 = *__s;\n    uVar4 = uVar3;\n  }\n  return uVar4;\n}" type_identifier (ERROR "__regparm3" identifier) (function_declarator "FUN_00017600(int param_1,uint param_2)" identifier (parameter_list "(int param_1,uint param_2)" ( (parameter_declaration "int param_1" primitive_type identifier) , (parameter_declaration "uint param_2" type_identifier identifier) ))) (compound_statement "{\n  char *__s;\n  char cVar1;\n  int iVar2;\n  uint uVar3;\n  uint uVar4;\n  \n  if (param_2 < 4) {\n    uVar4 = 0;\n  }\n  else {\n    iVar2 = param_1 + param_2;\n    if ((-0x41 < *(char *)(iVar2 + -1)) ||\n       (((uVar4 = param_2 - 2, *(char *)(iVar2 + -2) < -0x40 &&\n         (uVar4 = param_2 - 3, *(char *)(iVar2 + -3) < -0x40)) &&\n        (uVar4 = param_2 - 4, *(char *)(iVar2 + -4) < -0x40)))) {\n      uVar4 = param_2 - 1;\n      goto LAB_0001762e;\n    }\n  }\n  if (param_2 <= uVar4) {\n    return uVar4;\n  }\nLAB_0001762e:\n  __s = (char *)(param_1 + uVar4);\n  cVar1 = *__s;\n  while( true ) {\n    if (cVar1 < '\0') {\n      iVar2 = mblen(__s,6);\n      if (iVar2 < 1) {\n        iVar2 = 1;\n      }\n      uVar3 = iVar2 + uVar4;\n    }\n    else {\n      uVar3 = uVar4 + 1;\n    }\n    if (param_2 <= uVar3) break;\n    __s = (char *)(param_1 + uVar3);\n    cVar1 = *__s;\n    uVar4 = uVar3;\n  }\n  return uVar4;\n}" { (declaration "char *__s;" primitive_type (pointer_declarator "*__s" * identifier) ;) (declaration "char cVar1;" primitive_type identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "uint uVar3;" type_identifier identifier ;) (declaration "uint uVar4;" type_identifier identifier ;) (if_statement "if (param_2 < 4) {\n    uVar4 = 0;\n  }\n  else {\n    iVar2 = param_1 + param_2;\n    if ((-0x41 < *(char *)(iVar2 + -1)) ||\n       (((uVar4 = param_2 - 2, *(char *)(iVar2 + -2) < -0x40 &&\n         (uVar4 = param_2 - 3, *(char *)(iVar2 + -3) < -0x40)) &&\n        (uVar4 = param_2 - 4, *(char *)(iVar2 + -4) < -0x40)))) {\n      uVar4 = param_2 - 1;\n      goto LAB_0001762e;\n    }\n  }" if (parenthesized_expression "(param_2 < 4)" ( (binary_expression "param_2 < 4" identifier < number_literal) )) (compound_statement "{\n    uVar4 = 0;\n  }" { (expression_statement "uVar4 = 0;" (assignment_expression "uVar4 = 0" identifier = number_literal) ;) }) (else_clause "else {\n    iVar2 = param_1 + param_2;\n    if ((-0x41 < *(char *)(iVar2 + -1)) ||\n       (((uVar4 = param_2 - 2, *(char *)(iVar2 + -2) < -0x40 &&\n         (uVar4 = param_2 - 3, *(char *)(iVar2 + -3) < -0x40)) &&\n        (uVar4 = param_2 - 4, *(char *)(iVar2 + -4) < -0x40)))) {\n      uVar4 = param_2 - 1;\n      goto LAB_0001762e;\n    }\n  }" else (compound_statement "{\n    iVar2 = param_1 + param_2;\n    if ((-0x41 < *(char *)(iVar2 + -1)) ||\n       (((uVar4 = param_2 - 2, *(char *)(iVar2 + -2) < -0x40 &&\n         (uVar4 = param_2 - 3, *(char *)(iVar2 + -3) < -0x40)) &&\n        (uVar4 = param_2 - 4, *(char *)(iVar2 + -4) < -0x40)))) {\n      uVar4 = param_2 - 1;\n      goto LAB_0001762e;\n    }\n  }" { (expression_statement "iVar2 = param_1 + param_2;" (assignment_expression "iVar2 = param_1 + param_2" identifier = (binary_expression "param_1 + param_2" identifier + identifier)) ;) (if_statement "if ((-0x41 < *(char *)(iVar2 + -1)) ||\n       (((uVar4 = param_2 - 2, *(char *)(iVar2 + -2) < -0x40 &&\n         (uVar4 = param_2 - 3, *(char *)(iVar2 + -3) < -0x40)) &&\n        (uVar4 = param_2 - 4, *(char *)(iVar2 + -4) < -0x40)))) {\n      uVar4 = param_2 - 1;\n      goto LAB_0001762e;\n    }" if (parenthesized_expression "((-0x41 < *(char *)(iVar2 + -1)) ||\n       (((uVar4 = param_2 - 2, *(char *)(iVar2 + -2) < -0x40 &&\n         (uVar4 = param_2 - 3, *(char *)(iVar2 + -3) < -0x40)) &&\n        (uVar4 = param_2 - 4, *(char *)(iVar2 + -4) < -0x40))))" ( (binary_expression "(-0x41 < *(char *)(iVar2 + -1)) ||\n       (((uVar4 = param_2 - 2, *(char *)(iVar2 + -2) < -0x40 &&\n         (uVar4 = param_2 - 3, *(char *)(iVar2 + -3) < -0x40)) &&\n        (uVar4 = param_2 - 4, *(char *)(iVar2 + -4) < -0x40)))" (parenthesized_expression "(-0x41 < *(char *)(iVar2 + -1))" ( (binary_expression "-0x41 < *(char *)(iVar2 + -1)" number_literal < (pointer_expression "*(char *)(iVar2 + -1)" * (cast_expression "(char *)(iVar2 + -1)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar2 + -1)" ( (binary_expression "iVar2 + -1" identifier + number_literal) ))))) )) || (parenthesized_expression "(((uVar4 = param_2 - 2, *(char *)(iVar2 + -2) < -0x40 &&\n         (uVar4 = param_2 - 3, *(char *)(iVar2 + -3) < -0x40)) &&\n        (uVar4 = param_2 - 4, *(char *)(iVar2 + -4) < -0x40)))" ( (parenthesized_expression "((uVar4 = param_2 - 2, *(char *)(iVar2 + -2) < -0x40 &&\n         (uVar4 = param_2 - 3, *(char *)(iVar2 + -3) < -0x40)) &&\n        (uVar4 = param_2 - 4, *(char *)(iVar2 + -4) < -0x40))" ( (binary_expression "(uVar4 = param_2 - 2, *(char *)(iVar2 + -2) < -0x40 &&\n         (uVar4 = param_2 - 3, *(char *)(iVar2 + -3) < -0x40)) &&\n        (uVar4 = param_2 - 4, *(char *)(iVar2 + -4) < -0x40)" (parenthesized_expression "(uVar4 = param_2 - 2, *(char *)(iVar2 + -2) < -0x40 &&\n         (uVar4 = param_2 - 3, *(char *)(iVar2 + -3) < -0x40))" ( (comma_expression "uVar4 = param_2 - 2, *(char *)(iVar2 + -2) < -0x40 &&\n         (uVar4 = param_2 - 3, *(char *)(iVar2 + -3) < -0x40)" (assignment_expression "uVar4 = param_2 - 2" identifier = (binary_expression "param_2 - 2" identifier - number_literal)) , (binary_expression "*(char *)(iVar2 + -2) < -0x40 &&\n         (uVar4 = param_2 - 3, *(char *)(iVar2 + -3) < -0x40)" (binary_expression "*(char *)(iVar2 + -2) < -0x40" (pointer_expression "*(char *)(iVar2 + -2)" * (cast_expression "(char *)(iVar2 + -2)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar2 + -2)" ( (binary_expression "iVar2 + -2" identifier + number_literal) )))) < number_literal) && (parenthesized_expression "(uVar4 = param_2 - 3, *(char *)(iVar2 + -3) < -0x40)" ( (comma_expression "uVar4 = param_2 - 3, *(char *)(iVar2 + -3) < -0x40" (assignment_expression "uVar4 = param_2 - 3" identifier = (binary_expression "param_2 - 3" identifier - number_literal)) , (binary_expression "*(char *)(iVar2 + -3) < -0x40" (pointer_expression "*(char *)(iVar2 + -3)" * (cast_expression "(char *)(iVar2 + -3)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar2 + -3)" ( (binary_expression "iVar2 + -3" identifier + number_literal) )))) < number_literal)) )))) )) && (parenthesized_expression "(uVar4 = param_2 - 4, *(char *)(iVar2 + -4) < -0x40)" ( (comma_expression "uVar4 = param_2 - 4, *(char *)(iVar2 + -4) < -0x40" (assignment_expression "uVar4 = param_2 - 4" identifier = (binary_expression "param_2 - 4" identifier - number_literal)) , (binary_expression "*(char *)(iVar2 + -4) < -0x40" (pointer_expression "*(char *)(iVar2 + -4)" * (cast_expression "(char *)(iVar2 + -4)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar2 + -4)" ( (binary_expression "iVar2 + -4" identifier + number_literal) )))) < number_literal)) ))) )) ))) )) (compound_statement "{\n      uVar4 = param_2 - 1;\n      goto LAB_0001762e;\n    }" { (expression_statement "uVar4 = param_2 - 1;" (assignment_expression "uVar4 = param_2 - 1" identifier = (binary_expression "param_2 - 1" identifier - number_literal)) ;) (goto_statement "goto LAB_0001762e;" goto statement_identifier ;) })) }))) (if_statement "if (param_2 <= uVar4) {\n    return uVar4;\n  }" if (parenthesized_expression "(param_2 <= uVar4)" ( (binary_expression "param_2 <= uVar4" identifier <= identifier) )) (compound_statement "{\n    return uVar4;\n  }" { (return_statement "return uVar4;" return identifier ;) })) (labeled_statement "LAB_0001762e:\n  __s = (char *)(param_1 + uVar4);" statement_identifier : (expression_statement "__s = (char *)(param_1 + uVar4);" (assignment_expression "__s = (char *)(param_1 + uVar4)" identifier = (cast_expression "(char *)(param_1 + uVar4)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + uVar4)" ( (binary_expression "param_1 + uVar4" identifier + identifier) )))) ;)) (expression_statement "cVar1 = *__s;" (assignment_expression "cVar1 = *__s" identifier = (pointer_expression "*__s" * identifier)) ;) (while_statement "while( true ) {\n    if (cVar1 < '\0') {\n      iVar2 = mblen(__s,6);\n      if (iVar2 < 1) {\n        iVar2 = 1;\n      }\n      uVar3 = iVar2 + uVar4;\n    }\n    else {\n      uVar3 = uVar4 + 1;\n    }\n    if (param_2 <= uVar3) break;\n    __s = (char *)(param_1 + uVar3);\n    cVar1 = *__s;\n    uVar4 = uVar3;\n  }" while (parenthesized_expression "( true )" ( true )) (compound_statement "{\n    if (cVar1 < '\0') {\n      iVar2 = mblen(__s,6);\n      if (iVar2 < 1) {\n        iVar2 = 1;\n      }\n      uVar3 = iVar2 + uVar4;\n    }\n    else {\n      uVar3 = uVar4 + 1;\n    }\n    if (param_2 <= uVar3) break;\n    __s = (char *)(param_1 + uVar3);\n    cVar1 = *__s;\n    uVar4 = uVar3;\n  }" { (if_statement "if (cVar1 < '\0') {\n      iVar2 = mblen(__s,6);\n      if (iVar2 < 1) {\n        iVar2 = 1;\n      }\n      uVar3 = iVar2 + uVar4;\n    }\n    else {\n      uVar3 = uVar4 + 1;\n    }" if (parenthesized_expression "(cVar1 < '\0')" ( (binary_expression "cVar1 < '\0'" identifier < (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\n      iVar2 = mblen(__s,6);\n      if (iVar2 < 1) {\n        iVar2 = 1;\n      }\n      uVar3 = iVar2 + uVar4;\n    }" { (expression_statement "iVar2 = mblen(__s,6);" (assignment_expression "iVar2 = mblen(__s,6)" identifier = (call_expression "mblen(__s,6)" identifier (argument_list "(__s,6)" ( identifier , number_literal )))) ;) (if_statement "if (iVar2 < 1) {\n        iVar2 = 1;\n      }" if (parenthesized_expression "(iVar2 < 1)" ( (binary_expression "iVar2 < 1" identifier < number_literal) )) (compound_statement "{\n        iVar2 = 1;\n      }" { (expression_statement "iVar2 = 1;" (assignment_expression "iVar2 = 1" identifier = number_literal) ;) })) (expression_statement "uVar3 = iVar2 + uVar4;" (assignment_expression "uVar3 = iVar2 + uVar4" identifier = (binary_expression "iVar2 + uVar4" identifier + identifier)) ;) }) (else_clause "else {\n      uVar3 = uVar4 + 1;\n    }" else (compound_statement "{\n      uVar3 = uVar4 + 1;\n    }" { (expression_statement "uVar3 = uVar4 + 1;" (assignment_expression "uVar3 = uVar4 + 1" identifier = (binary_expression "uVar4 + 1" identifier + number_literal)) ;) }))) (if_statement "if (param_2 <= uVar3) break;" if (parenthesized_expression "(param_2 <= uVar3)" ( (binary_expression "param_2 <= uVar3" identifier <= identifier) )) (break_statement "break;" break ;)) (expression_statement "__s = (char *)(param_1 + uVar3);" (assignment_expression "__s = (char *)(param_1 + uVar3)" identifier = (cast_expression "(char *)(param_1 + uVar3)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + uVar3)" ( (binary_expression "param_1 + uVar3" identifier + identifier) )))) ;) (expression_statement "cVar1 = *__s;" (assignment_expression "cVar1 = *__s" identifier = (pointer_expression "*__s" * identifier)) ;) (expression_statement "uVar4 = uVar3;" (assignment_expression "uVar4 = uVar3" identifier = identifier) ;) })) (return_statement "return uVar4;" return identifier ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nsize_t __regparm3 move_mbleft(char *buf,size_t pos)\n\n{\n  char *__s;\n  char cVar1;\n  int iVar2;\n  uint uVar3;\n  uint uVar4;\n  \n  if (pos < 4) {\n    uVar4 = 0;\n  }\n  else if ((-0x41 < buf[pos - 1]) ||\n          (((uVar4 = pos - 2, buf[pos - 2] < -0x40 && (uVar4 = pos - 3, buf[pos - 3] < -0x40)) &&\n           (uVar4 = pos - 4, buf[pos - 4] < -0x40)))) {\n    uVar4 = pos - 1;\n    goto LAB_0001762e;\n  }\n  if (pos <= uVar4) {\n    return uVar4;\n  }\nLAB_0001762e:\n  __s = buf + uVar4;\n  cVar1 = *__s;\n  while( true ) {\n    if (cVar1 < '\0') {\n      iVar2 = mblen(__s,6);\n      if (iVar2 < 1) {\n        iVar2 = 1;\n      }\n      uVar3 = iVar2 + uVar4;\n    }\n    else {\n      uVar3 = uVar4 + 1;\n    }\n    if (pos <= uVar3) break;\n    __s = buf + uVar3;\n    cVar1 = *__s;\n    uVar4 = uVar3;\n  }\n  return uVar4;\n}\n\n" comment (function_definition "size_t __regparm3 move_mbleft(char *buf,size_t pos)\n\n{\n  char *__s;\n  char cVar1;\n  int iVar2;\n  uint uVar3;\n  uint uVar4;\n  \n  if (pos < 4) {\n    uVar4 = 0;\n  }\n  else if ((-0x41 < buf[pos - 1]) ||\n          (((uVar4 = pos - 2, buf[pos - 2] < -0x40 && (uVar4 = pos - 3, buf[pos - 3] < -0x40)) &&\n           (uVar4 = pos - 4, buf[pos - 4] < -0x40)))) {\n    uVar4 = pos - 1;\n    goto LAB_0001762e;\n  }\n  if (pos <= uVar4) {\n    return uVar4;\n  }\nLAB_0001762e:\n  __s = buf + uVar4;\n  cVar1 = *__s;\n  while( true ) {\n    if (cVar1 < '\0') {\n      iVar2 = mblen(__s,6);\n      if (iVar2 < 1) {\n        iVar2 = 1;\n      }\n      uVar3 = iVar2 + uVar4;\n    }\n    else {\n      uVar3 = uVar4 + 1;\n    }\n    if (pos <= uVar3) break;\n    __s = buf + uVar3;\n    cVar1 = *__s;\n    uVar4 = uVar3;\n  }\n  return uVar4;\n}" primitive_type (ERROR "__regparm3" identifier) (function_declarator "move_mbleft(char *buf,size_t pos)" identifier (parameter_list "(char *buf,size_t pos)" ( (parameter_declaration "char *buf" primitive_type (pointer_declarator "*buf" * identifier)) , (parameter_declaration "size_t pos" primitive_type identifier) ))) (compound_statement "{\n  char *__s;\n  char cVar1;\n  int iVar2;\n  uint uVar3;\n  uint uVar4;\n  \n  if (pos < 4) {\n    uVar4 = 0;\n  }\n  else if ((-0x41 < buf[pos - 1]) ||\n          (((uVar4 = pos - 2, buf[pos - 2] < -0x40 && (uVar4 = pos - 3, buf[pos - 3] < -0x40)) &&\n           (uVar4 = pos - 4, buf[pos - 4] < -0x40)))) {\n    uVar4 = pos - 1;\n    goto LAB_0001762e;\n  }\n  if (pos <= uVar4) {\n    return uVar4;\n  }\nLAB_0001762e:\n  __s = buf + uVar4;\n  cVar1 = *__s;\n  while( true ) {\n    if (cVar1 < '\0') {\n      iVar2 = mblen(__s,6);\n      if (iVar2 < 1) {\n        iVar2 = 1;\n      }\n      uVar3 = iVar2 + uVar4;\n    }\n    else {\n      uVar3 = uVar4 + 1;\n    }\n    if (pos <= uVar3) break;\n    __s = buf + uVar3;\n    cVar1 = *__s;\n    uVar4 = uVar3;\n  }\n  return uVar4;\n}" { (declaration "char *__s;" primitive_type (pointer_declarator "*__s" * identifier) ;) (declaration "char cVar1;" primitive_type identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "uint uVar3;" type_identifier identifier ;) (declaration "uint uVar4;" type_identifier identifier ;) (if_statement "if (pos < 4) {\n    uVar4 = 0;\n  }\n  else if ((-0x41 < buf[pos - 1]) ||\n          (((uVar4 = pos - 2, buf[pos - 2] < -0x40 && (uVar4 = pos - 3, buf[pos - 3] < -0x40)) &&\n           (uVar4 = pos - 4, buf[pos - 4] < -0x40)))) {\n    uVar4 = pos - 1;\n    goto LAB_0001762e;\n  }" if (parenthesized_expression "(pos < 4)" ( (binary_expression "pos < 4" identifier < number_literal) )) (compound_statement "{\n    uVar4 = 0;\n  }" { (expression_statement "uVar4 = 0;" (assignment_expression "uVar4 = 0" identifier = number_literal) ;) }) (else_clause "else if ((-0x41 < buf[pos - 1]) ||\n          (((uVar4 = pos - 2, buf[pos - 2] < -0x40 && (uVar4 = pos - 3, buf[pos - 3] < -0x40)) &&\n           (uVar4 = pos - 4, buf[pos - 4] < -0x40)))) {\n    uVar4 = pos - 1;\n    goto LAB_0001762e;\n  }" else (if_statement "if ((-0x41 < buf[pos - 1]) ||\n          (((uVar4 = pos - 2, buf[pos - 2] < -0x40 && (uVar4 = pos - 3, buf[pos - 3] < -0x40)) &&\n           (uVar4 = pos - 4, buf[pos - 4] < -0x40)))) {\n    uVar4 = pos - 1;\n    goto LAB_0001762e;\n  }" if (parenthesized_expression "((-0x41 < buf[pos - 1]) ||\n          (((uVar4 = pos - 2, buf[pos - 2] < -0x40 && (uVar4 = pos - 3, buf[pos - 3] < -0x40)) &&\n           (uVar4 = pos - 4, buf[pos - 4] < -0x40))))" ( (binary_expression "(-0x41 < buf[pos - 1]) ||\n          (((uVar4 = pos - 2, buf[pos - 2] < -0x40 && (uVar4 = pos - 3, buf[pos - 3] < -0x40)) &&\n           (uVar4 = pos - 4, buf[pos - 4] < -0x40)))" (parenthesized_expression "(-0x41 < buf[pos - 1])" ( (binary_expression "-0x41 < buf[pos - 1]" number_literal < (subscript_expression "buf[pos - 1]" identifier [ (binary_expression "pos - 1" identifier - number_literal) ])) )) || (parenthesized_expression "(((uVar4 = pos - 2, buf[pos - 2] < -0x40 && (uVar4 = pos - 3, buf[pos - 3] < -0x40)) &&\n           (uVar4 = pos - 4, buf[pos - 4] < -0x40)))" ( (parenthesized_expression "((uVar4 = pos - 2, buf[pos - 2] < -0x40 && (uVar4 = pos - 3, buf[pos - 3] < -0x40)) &&\n           (uVar4 = pos - 4, buf[pos - 4] < -0x40))" ( (binary_expression "(uVar4 = pos - 2, buf[pos - 2] < -0x40 && (uVar4 = pos - 3, buf[pos - 3] < -0x40)) &&\n           (uVar4 = pos - 4, buf[pos - 4] < -0x40)" (parenthesized_expression "(uVar4 = pos - 2, buf[pos - 2] < -0x40 && (uVar4 = pos - 3, buf[pos - 3] < -0x40))" ( (comma_expression "uVar4 = pos - 2, buf[pos - 2] < -0x40 && (uVar4 = pos - 3, buf[pos - 3] < -0x40)" (assignment_expression "uVar4 = pos - 2" identifier = (binary_expression "pos - 2" identifier - number_literal)) , (binary_expression "buf[pos - 2] < -0x40 && (uVar4 = pos - 3, buf[pos - 3] < -0x40)" (binary_expression "buf[pos - 2] < -0x40" (subscript_expression "buf[pos - 2]" identifier [ (binary_expression "pos - 2" identifier - number_literal) ]) < number_literal) && (parenthesized_expression "(uVar4 = pos - 3, buf[pos - 3] < -0x40)" ( (comma_expression "uVar4 = pos - 3, buf[pos - 3] < -0x40" (assignment_expression "uVar4 = pos - 3" identifier = (binary_expression "pos - 3" identifier - number_literal)) , (binary_expression "buf[pos - 3] < -0x40" (subscript_expression "buf[pos - 3]" identifier [ (binary_expression "pos - 3" identifier - number_literal) ]) < number_literal)) )))) )) && (parenthesized_expression "(uVar4 = pos - 4, buf[pos - 4] < -0x40)" ( (comma_expression "uVar4 = pos - 4, buf[pos - 4] < -0x40" (assignment_expression "uVar4 = pos - 4" identifier = (binary_expression "pos - 4" identifier - number_literal)) , (binary_expression "buf[pos - 4] < -0x40" (subscript_expression "buf[pos - 4]" identifier [ (binary_expression "pos - 4" identifier - number_literal) ]) < number_literal)) ))) )) ))) )) (compound_statement "{\n    uVar4 = pos - 1;\n    goto LAB_0001762e;\n  }" { (expression_statement "uVar4 = pos - 1;" (assignment_expression "uVar4 = pos - 1" identifier = (binary_expression "pos - 1" identifier - number_literal)) ;) (goto_statement "goto LAB_0001762e;" goto statement_identifier ;) })))) (if_statement "if (pos <= uVar4) {\n    return uVar4;\n  }" if (parenthesized_expression "(pos <= uVar4)" ( (binary_expression "pos <= uVar4" identifier <= identifier) )) (compound_statement "{\n    return uVar4;\n  }" { (return_statement "return uVar4;" return identifier ;) })) (labeled_statement "LAB_0001762e:\n  __s = buf + uVar4;" statement_identifier : (expression_statement "__s = buf + uVar4;" (assignment_expression "__s = buf + uVar4" identifier = (binary_expression "buf + uVar4" identifier + identifier)) ;)) (expression_statement "cVar1 = *__s;" (assignment_expression "cVar1 = *__s" identifier = (pointer_expression "*__s" * identifier)) ;) (while_statement "while( true ) {\n    if (cVar1 < '\0') {\n      iVar2 = mblen(__s,6);\n      if (iVar2 < 1) {\n        iVar2 = 1;\n      }\n      uVar3 = iVar2 + uVar4;\n    }\n    else {\n      uVar3 = uVar4 + 1;\n    }\n    if (pos <= uVar3) break;\n    __s = buf + uVar3;\n    cVar1 = *__s;\n    uVar4 = uVar3;\n  }" while (parenthesized_expression "( true )" ( true )) (compound_statement "{\n    if (cVar1 < '\0') {\n      iVar2 = mblen(__s,6);\n      if (iVar2 < 1) {\n        iVar2 = 1;\n      }\n      uVar3 = iVar2 + uVar4;\n    }\n    else {\n      uVar3 = uVar4 + 1;\n    }\n    if (pos <= uVar3) break;\n    __s = buf + uVar3;\n    cVar1 = *__s;\n    uVar4 = uVar3;\n  }" { (if_statement "if (cVar1 < '\0') {\n      iVar2 = mblen(__s,6);\n      if (iVar2 < 1) {\n        iVar2 = 1;\n      }\n      uVar3 = iVar2 + uVar4;\n    }\n    else {\n      uVar3 = uVar4 + 1;\n    }" if (parenthesized_expression "(cVar1 < '\0')" ( (binary_expression "cVar1 < '\0'" identifier < (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\n      iVar2 = mblen(__s,6);\n      if (iVar2 < 1) {\n        iVar2 = 1;\n      }\n      uVar3 = iVar2 + uVar4;\n    }" { (expression_statement "iVar2 = mblen(__s,6);" (assignment_expression "iVar2 = mblen(__s,6)" identifier = (call_expression "mblen(__s,6)" identifier (argument_list "(__s,6)" ( identifier , number_literal )))) ;) (if_statement "if (iVar2 < 1) {\n        iVar2 = 1;\n      }" if (parenthesized_expression "(iVar2 < 1)" ( (binary_expression "iVar2 < 1" identifier < number_literal) )) (compound_statement "{\n        iVar2 = 1;\n      }" { (expression_statement "iVar2 = 1;" (assignment_expression "iVar2 = 1" identifier = number_literal) ;) })) (expression_statement "uVar3 = iVar2 + uVar4;" (assignment_expression "uVar3 = iVar2 + uVar4" identifier = (binary_expression "iVar2 + uVar4" identifier + identifier)) ;) }) (else_clause "else {\n      uVar3 = uVar4 + 1;\n    }" else (compound_statement "{\n      uVar3 = uVar4 + 1;\n    }" { (expression_statement "uVar3 = uVar4 + 1;" (assignment_expression "uVar3 = uVar4 + 1" identifier = (binary_expression "uVar4 + 1" identifier + number_literal)) ;) }))) (if_statement "if (pos <= uVar3) break;" if (parenthesized_expression "(pos <= uVar3)" ( (binary_expression "pos <= uVar3" identifier <= identifier) )) (break_statement "break;" break ;)) (expression_statement "__s = buf + uVar3;" (assignment_expression "__s = buf + uVar3" identifier = (binary_expression "buf + uVar3" identifier + identifier)) ;) (expression_statement "cVar1 = *__s;" (assignment_expression "cVar1 = *__s" identifier = (pointer_expression "*__s" * identifier)) ;) (expression_statement "uVar4 = uVar3;" (assignment_expression "uVar4 = uVar3" identifier = identifier) ;) })) (return_statement "return uVar4;" return identifier ;) })))
(translation_unit "uint __regparm3 FUN_00017600(int param_1,uint param_2)\n\n{\n  char *__s;\n  char cVar1;\n  int iVar2;\n  uint uVar3;\n  uint uVar4;\n  \n  if (param_2 < 4) {\n    uVar4 = 0;\n  }\n  else {\n    iVar2 = param_1 + param_2;\n    if ((-0x41 < *(char *)(iVar2 + -1)) ||\n       (((uVar4 = param_2 - 2, *(char *)(iVar2 + -2) < -0x40 &&\n         (uVar4 = param_2 - 3, *(char *)(iVar2 + -3) < -0x40)) &&\n        (uVar4 = param_2 - 4, *(char *)(iVar2 + -4) < -0x40)))) {\n      uVar4 = param_2 - 1;\n      goto LAB_0001762e;\n    }\n  }\n  if (param_2 <= uVar4) {\n    return uVar4;\n  }\nLAB_0001762e:\n  __s = (char *)(param_1 + uVar4);\n  cVar1 = *__s;\n  while( true ) {\n    if (cVar1 < '\0') {\n      iVar2 = mblen(__s,6);\n      if (iVar2 < 1) {\n        iVar2 = 1;\n      }\n      uVar3 = iVar2 + uVar4;\n    }\n    else {\n      uVar3 = uVar4 + 1;\n    }\n    if (param_2 <= uVar3) break;\n    __s = (char *)(param_1 + uVar3);\n    cVar1 = *__s;\n    uVar4 = uVar3;\n  }\n  return uVar4;\n}\n\n" (function_definition "uint __regparm3 FUN_00017600(int param_1,uint param_2)\n\n{\n  char *__s;\n  char cVar1;\n  int iVar2;\n  uint uVar3;\n  uint uVar4;\n  \n  if (param_2 < 4) {\n    uVar4 = 0;\n  }\n  else {\n    iVar2 = param_1 + param_2;\n    if ((-0x41 < *(char *)(iVar2 + -1)) ||\n       (((uVar4 = param_2 - 2, *(char *)(iVar2 + -2) < -0x40 &&\n         (uVar4 = param_2 - 3, *(char *)(iVar2 + -3) < -0x40)) &&\n        (uVar4 = param_2 - 4, *(char *)(iVar2 + -4) < -0x40)))) {\n      uVar4 = param_2 - 1;\n      goto LAB_0001762e;\n    }\n  }\n  if (param_2 <= uVar4) {\n    return uVar4;\n  }\nLAB_0001762e:\n  __s = (char *)(param_1 + uVar4);\n  cVar1 = *__s;\n  while( true ) {\n    if (cVar1 < '\0') {\n      iVar2 = mblen(__s,6);\n      if (iVar2 < 1) {\n        iVar2 = 1;\n      }\n      uVar3 = iVar2 + uVar4;\n    }\n    else {\n      uVar3 = uVar4 + 1;\n    }\n    if (param_2 <= uVar3) break;\n    __s = (char *)(param_1 + uVar3);\n    cVar1 = *__s;\n    uVar4 = uVar3;\n  }\n  return uVar4;\n}" type_identifier (ERROR "__regparm3" identifier) (function_declarator "FUN_00017600(int param_1,uint param_2)" identifier (parameter_list "(int param_1,uint param_2)" ( (parameter_declaration "int param_1" primitive_type identifier) , (parameter_declaration "uint param_2" type_identifier identifier) ))) (compound_statement "{\n  char *__s;\n  char cVar1;\n  int iVar2;\n  uint uVar3;\n  uint uVar4;\n  \n  if (param_2 < 4) {\n    uVar4 = 0;\n  }\n  else {\n    iVar2 = param_1 + param_2;\n    if ((-0x41 < *(char *)(iVar2 + -1)) ||\n       (((uVar4 = param_2 - 2, *(char *)(iVar2 + -2) < -0x40 &&\n         (uVar4 = param_2 - 3, *(char *)(iVar2 + -3) < -0x40)) &&\n        (uVar4 = param_2 - 4, *(char *)(iVar2 + -4) < -0x40)))) {\n      uVar4 = param_2 - 1;\n      goto LAB_0001762e;\n    }\n  }\n  if (param_2 <= uVar4) {\n    return uVar4;\n  }\nLAB_0001762e:\n  __s = (char *)(param_1 + uVar4);\n  cVar1 = *__s;\n  while( true ) {\n    if (cVar1 < '\0') {\n      iVar2 = mblen(__s,6);\n      if (iVar2 < 1) {\n        iVar2 = 1;\n      }\n      uVar3 = iVar2 + uVar4;\n    }\n    else {\n      uVar3 = uVar4 + 1;\n    }\n    if (param_2 <= uVar3) break;\n    __s = (char *)(param_1 + uVar3);\n    cVar1 = *__s;\n    uVar4 = uVar3;\n  }\n  return uVar4;\n}" { (declaration "char *__s;" primitive_type (pointer_declarator "*__s" * identifier) ;) (declaration "char cVar1;" primitive_type identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "uint uVar3;" type_identifier identifier ;) (declaration "uint uVar4;" type_identifier identifier ;) (if_statement "if (param_2 < 4) {\n    uVar4 = 0;\n  }\n  else {\n    iVar2 = param_1 + param_2;\n    if ((-0x41 < *(char *)(iVar2 + -1)) ||\n       (((uVar4 = param_2 - 2, *(char *)(iVar2 + -2) < -0x40 &&\n         (uVar4 = param_2 - 3, *(char *)(iVar2 + -3) < -0x40)) &&\n        (uVar4 = param_2 - 4, *(char *)(iVar2 + -4) < -0x40)))) {\n      uVar4 = param_2 - 1;\n      goto LAB_0001762e;\n    }\n  }" if (parenthesized_expression "(param_2 < 4)" ( (binary_expression "param_2 < 4" identifier < number_literal) )) (compound_statement "{\n    uVar4 = 0;\n  }" { (expression_statement "uVar4 = 0;" (assignment_expression "uVar4 = 0" identifier = number_literal) ;) }) (else_clause "else {\n    iVar2 = param_1 + param_2;\n    if ((-0x41 < *(char *)(iVar2 + -1)) ||\n       (((uVar4 = param_2 - 2, *(char *)(iVar2 + -2) < -0x40 &&\n         (uVar4 = param_2 - 3, *(char *)(iVar2 + -3) < -0x40)) &&\n        (uVar4 = param_2 - 4, *(char *)(iVar2 + -4) < -0x40)))) {\n      uVar4 = param_2 - 1;\n      goto LAB_0001762e;\n    }\n  }" else (compound_statement "{\n    iVar2 = param_1 + param_2;\n    if ((-0x41 < *(char *)(iVar2 + -1)) ||\n       (((uVar4 = param_2 - 2, *(char *)(iVar2 + -2) < -0x40 &&\n         (uVar4 = param_2 - 3, *(char *)(iVar2 + -3) < -0x40)) &&\n        (uVar4 = param_2 - 4, *(char *)(iVar2 + -4) < -0x40)))) {\n      uVar4 = param_2 - 1;\n      goto LAB_0001762e;\n    }\n  }" { (expression_statement "iVar2 = param_1 + param_2;" (assignment_expression "iVar2 = param_1 + param_2" identifier = (binary_expression "param_1 + param_2" identifier + identifier)) ;) (if_statement "if ((-0x41 < *(char *)(iVar2 + -1)) ||\n       (((uVar4 = param_2 - 2, *(char *)(iVar2 + -2) < -0x40 &&\n         (uVar4 = param_2 - 3, *(char *)(iVar2 + -3) < -0x40)) &&\n        (uVar4 = param_2 - 4, *(char *)(iVar2 + -4) < -0x40)))) {\n      uVar4 = param_2 - 1;\n      goto LAB_0001762e;\n    }" if (parenthesized_expression "((-0x41 < *(char *)(iVar2 + -1)) ||\n       (((uVar4 = param_2 - 2, *(char *)(iVar2 + -2) < -0x40 &&\n         (uVar4 = param_2 - 3, *(char *)(iVar2 + -3) < -0x40)) &&\n        (uVar4 = param_2 - 4, *(char *)(iVar2 + -4) < -0x40))))" ( (binary_expression "(-0x41 < *(char *)(iVar2 + -1)) ||\n       (((uVar4 = param_2 - 2, *(char *)(iVar2 + -2) < -0x40 &&\n         (uVar4 = param_2 - 3, *(char *)(iVar2 + -3) < -0x40)) &&\n        (uVar4 = param_2 - 4, *(char *)(iVar2 + -4) < -0x40)))" (parenthesized_expression "(-0x41 < *(char *)(iVar2 + -1))" ( (binary_expression "-0x41 < *(char *)(iVar2 + -1)" number_literal < (pointer_expression "*(char *)(iVar2 + -1)" * (cast_expression "(char *)(iVar2 + -1)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar2 + -1)" ( (binary_expression "iVar2 + -1" identifier + number_literal) ))))) )) || (parenthesized_expression "(((uVar4 = param_2 - 2, *(char *)(iVar2 + -2) < -0x40 &&\n         (uVar4 = param_2 - 3, *(char *)(iVar2 + -3) < -0x40)) &&\n        (uVar4 = param_2 - 4, *(char *)(iVar2 + -4) < -0x40)))" ( (parenthesized_expression "((uVar4 = param_2 - 2, *(char *)(iVar2 + -2) < -0x40 &&\n         (uVar4 = param_2 - 3, *(char *)(iVar2 + -3) < -0x40)) &&\n        (uVar4 = param_2 - 4, *(char *)(iVar2 + -4) < -0x40))" ( (binary_expression "(uVar4 = param_2 - 2, *(char *)(iVar2 + -2) < -0x40 &&\n         (uVar4 = param_2 - 3, *(char *)(iVar2 + -3) < -0x40)) &&\n        (uVar4 = param_2 - 4, *(char *)(iVar2 + -4) < -0x40)" (parenthesized_expression "(uVar4 = param_2 - 2, *(char *)(iVar2 + -2) < -0x40 &&\n         (uVar4 = param_2 - 3, *(char *)(iVar2 + -3) < -0x40))" ( (comma_expression "uVar4 = param_2 - 2, *(char *)(iVar2 + -2) < -0x40 &&\n         (uVar4 = param_2 - 3, *(char *)(iVar2 + -3) < -0x40)" (assignment_expression "uVar4 = param_2 - 2" identifier = (binary_expression "param_2 - 2" identifier - number_literal)) , (binary_expression "*(char *)(iVar2 + -2) < -0x40 &&\n         (uVar4 = param_2 - 3, *(char *)(iVar2 + -3) < -0x40)" (binary_expression "*(char *)(iVar2 + -2) < -0x40" (pointer_expression "*(char *)(iVar2 + -2)" * (cast_expression "(char *)(iVar2 + -2)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar2 + -2)" ( (binary_expression "iVar2 + -2" identifier + number_literal) )))) < number_literal) && (parenthesized_expression "(uVar4 = param_2 - 3, *(char *)(iVar2 + -3) < -0x40)" ( (comma_expression "uVar4 = param_2 - 3, *(char *)(iVar2 + -3) < -0x40" (assignment_expression "uVar4 = param_2 - 3" identifier = (binary_expression "param_2 - 3" identifier - number_literal)) , (binary_expression "*(char *)(iVar2 + -3) < -0x40" (pointer_expression "*(char *)(iVar2 + -3)" * (cast_expression "(char *)(iVar2 + -3)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar2 + -3)" ( (binary_expression "iVar2 + -3" identifier + number_literal) )))) < number_literal)) )))) )) && (parenthesized_expression "(uVar4 = param_2 - 4, *(char *)(iVar2 + -4) < -0x40)" ( (comma_expression "uVar4 = param_2 - 4, *(char *)(iVar2 + -4) < -0x40" (assignment_expression "uVar4 = param_2 - 4" identifier = (binary_expression "param_2 - 4" identifier - number_literal)) , (binary_expression "*(char *)(iVar2 + -4) < -0x40" (pointer_expression "*(char *)(iVar2 + -4)" * (cast_expression "(char *)(iVar2 + -4)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar2 + -4)" ( (binary_expression "iVar2 + -4" identifier + number_literal) )))) < number_literal)) ))) )) ))) )) (compound_statement "{\n      uVar4 = param_2 - 1;\n      goto LAB_0001762e;\n    }" { (expression_statement "uVar4 = param_2 - 1;" (assignment_expression "uVar4 = param_2 - 1" identifier = (binary_expression "param_2 - 1" identifier - number_literal)) ;) (goto_statement "goto LAB_0001762e;" goto statement_identifier ;) })) }))) (if_statement "if (param_2 <= uVar4) {\n    return uVar4;\n  }" if (parenthesized_expression "(param_2 <= uVar4)" ( (binary_expression "param_2 <= uVar4" identifier <= identifier) )) (compound_statement "{\n    return uVar4;\n  }" { (return_statement "return uVar4;" return identifier ;) })) (labeled_statement "LAB_0001762e:\n  __s = (char *)(param_1 + uVar4);" statement_identifier : (expression_statement "__s = (char *)(param_1 + uVar4);" (assignment_expression "__s = (char *)(param_1 + uVar4)" identifier = (cast_expression "(char *)(param_1 + uVar4)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + uVar4)" ( (binary_expression "param_1 + uVar4" identifier + identifier) )))) ;)) (expression_statement "cVar1 = *__s;" (assignment_expression "cVar1 = *__s" identifier = (pointer_expression "*__s" * identifier)) ;) (while_statement "while( true ) {\n    if (cVar1 < '\0') {\n      iVar2 = mblen(__s,6);\n      if (iVar2 < 1) {\n        iVar2 = 1;\n      }\n      uVar3 = iVar2 + uVar4;\n    }\n    else {\n      uVar3 = uVar4 + 1;\n    }\n    if (param_2 <= uVar3) break;\n    __s = (char *)(param_1 + uVar3);\n    cVar1 = *__s;\n    uVar4 = uVar3;\n  }" while (parenthesized_expression "( true )" ( true )) (compound_statement "{\n    if (cVar1 < '\0') {\n      iVar2 = mblen(__s,6);\n      if (iVar2 < 1) {\n        iVar2 = 1;\n      }\n      uVar3 = iVar2 + uVar4;\n    }\n    else {\n      uVar3 = uVar4 + 1;\n    }\n    if (param_2 <= uVar3) break;\n    __s = (char *)(param_1 + uVar3);\n    cVar1 = *__s;\n    uVar4 = uVar3;\n  }" { (if_statement "if (cVar1 < '\0') {\n      iVar2 = mblen(__s,6);\n      if (iVar2 < 1) {\n        iVar2 = 1;\n      }\n      uVar3 = iVar2 + uVar4;\n    }\n    else {\n      uVar3 = uVar4 + 1;\n    }" if (parenthesized_expression "(cVar1 < '\0')" ( (binary_expression "cVar1 < '\0'" identifier < (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\n      iVar2 = mblen(__s,6);\n      if (iVar2 < 1) {\n        iVar2 = 1;\n      }\n      uVar3 = iVar2 + uVar4;\n    }" { (expression_statement "iVar2 = mblen(__s,6);" (assignment_expression "iVar2 = mblen(__s,6)" identifier = (call_expression "mblen(__s,6)" identifier (argument_list "(__s,6)" ( identifier , number_literal )))) ;) (if_statement "if (iVar2 < 1) {\n        iVar2 = 1;\n      }" if (parenthesized_expression "(iVar2 < 1)" ( (binary_expression "iVar2 < 1" identifier < number_literal) )) (compound_statement "{\n        iVar2 = 1;\n      }" { (expression_statement "iVar2 = 1;" (assignment_expression "iVar2 = 1" identifier = number_literal) ;) })) (expression_statement "uVar3 = iVar2 + uVar4;" (assignment_expression "uVar3 = iVar2 + uVar4" identifier = (binary_expression "iVar2 + uVar4" identifier + identifier)) ;) }) (else_clause "else {\n      uVar3 = uVar4 + 1;\n    }" else (compound_statement "{\n      uVar3 = uVar4 + 1;\n    }" { (expression_statement "uVar3 = uVar4 + 1;" (assignment_expression "uVar3 = uVar4 + 1" identifier = (binary_expression "uVar4 + 1" identifier + number_literal)) ;) }))) (if_statement "if (param_2 <= uVar3) break;" if (parenthesized_expression "(param_2 <= uVar3)" ( (binary_expression "param_2 <= uVar3" identifier <= identifier) )) (break_statement "break;" break ;)) (expression_statement "__s = (char *)(param_1 + uVar3);" (assignment_expression "__s = (char *)(param_1 + uVar3)" identifier = (cast_expression "(char *)(param_1 + uVar3)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + uVar3)" ( (binary_expression "param_1 + uVar3" identifier + identifier) )))) ;) (expression_statement "cVar1 = *__s;" (assignment_expression "cVar1 = *__s" identifier = (pointer_expression "*__s" * identifier)) ;) (expression_statement "uVar4 = uVar3;" (assignment_expression "uVar4 = uVar3" identifier = identifier) ;) })) (return_statement "return uVar4;" return identifier ;) })))
(translation_unit (function_definition TYPE (ERROR IDENT) (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT < LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) }) (else_clause else (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression IDENT + IDENT)) ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression LIT < (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) )) || (parenthesized_expression ( (parenthesized_expression ( (binary_expression (parenthesized_expression ( (comma_expression (assignment_expression IDENT = (binary_expression IDENT - LIT)) , (binary_expression (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) < LIT) && (parenthesized_expression ( (comma_expression (assignment_expression IDENT = (binary_expression IDENT - LIT)) , (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) < LIT)) )))) )) && (parenthesized_expression ( (comma_expression (assignment_expression IDENT = (binary_expression IDENT - LIT)) , (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) < LIT)) ))) )) ))) )) (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression IDENT - LIT)) ;) (goto_statement goto statement_identifier ;) })) }))) (if_statement if (parenthesized_expression ( (binary_expression IDENT <= IDENT) )) (compound_statement { (return_statement return IDENT ;) })) (labeled_statement statement_identifier : (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + IDENT) )))) ;)) (expression_statement (assignment_expression IDENT = (pointer_expression * IDENT)) ;) (while_statement while (parenthesized_expression ( BOOL )) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression IDENT < (char_literal ' escape_sequence ')) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , LIT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT < LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) })) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + IDENT)) ;) }) (else_clause else (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) }))) (if_statement if (parenthesized_expression ( (binary_expression IDENT <= IDENT) )) (break_statement break ;)) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + IDENT) )))) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * IDENT)) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) })) (return_statement return IDENT ;) })))
(function_definition "uint __regparm3 FUN_00017600(int param_1,uint param_2)\n\n{\n  char *__s;\n  char cVar1;\n  int iVar2;\n  uint uVar3;\n  uint uVar4;\n  \n  if (param_2 < 4) {\n    uVar4 = 0;\n  }\n  else {\n    iVar2 = param_1 + param_2;\n    if ((-0x41 < *(char *)(iVar2 + -1)) ||\n       (((uVar4 = param_2 - 2, *(char *)(iVar2 + -2) < -0x40 &&\n         (uVar4 = param_2 - 3, *(char *)(iVar2 + -3) < -0x40)) &&\n        (uVar4 = param_2 - 4, *(char *)(iVar2 + -4) < -0x40)))) {\n      uVar4 = param_2 - 1;\n      goto LAB_0001762e;\n    }\n  }\n  if (param_2 <= uVar4) {\n    return uVar4;\n  }\nLAB_0001762e:\n  __s = (char *)(param_1 + uVar4);\n  cVar1 = *__s;\n  while( true ) {\n    if (cVar1 < '\0') {\n      iVar2 = mblen(__s,6);\n      if (iVar2 < 1) {\n        iVar2 = 1;\n      }\n      uVar3 = iVar2 + uVar4;\n    }\n    else {\n      uVar3 = uVar4 + 1;\n    }\n    if (param_2 <= uVar3) break;\n    __s = (char *)(param_1 + uVar3);\n    cVar1 = *__s;\n    uVar4 = uVar3;\n  }\n  return uVar4;\n}" (type_identifier "uint") (ERROR "__regparm3" (identifier "__regparm3")) (function_declarator "FUN_00017600(int param_1,uint param_2)" (identifier "FUN_00017600") (parameter_list "(int param_1,uint param_2)" (( "(") (parameter_declaration "int param_1" (primitive_type "int") (identifier "param_1")) (, ",") (parameter_declaration "uint param_2" (type_identifier "uint") (identifier "param_2")) () ")"))) (compound_statement "{\n  char *__s;\n  char cVar1;\n  int iVar2;\n  uint uVar3;\n  uint uVar4;\n  \n  if (param_2 < 4) {\n    uVar4 = 0;\n  }\n  else {\n    iVar2 = param_1 + param_2;\n    if ((-0x41 < *(char *)(iVar2 + -1)) ||\n       (((uVar4 = param_2 - 2, *(char *)(iVar2 + -2) < -0x40 &&\n         (uVar4 = param_2 - 3, *(char *)(iVar2 + -3) < -0x40)) &&\n        (uVar4 = param_2 - 4, *(char *)(iVar2 + -4) < -0x40)))) {\n      uVar4 = param_2 - 1;\n      goto LAB_0001762e;\n    }\n  }\n  if (param_2 <= uVar4) {\n    return uVar4;\n  }\nLAB_0001762e:\n  __s = (char *)(param_1 + uVar4);\n  cVar1 = *__s;\n  while( true ) {\n    if (cVar1 < '\0') {\n      iVar2 = mblen(__s,6);\n      if (iVar2 < 1) {\n        iVar2 = 1;\n      }\n      uVar3 = iVar2 + uVar4;\n    }\n    else {\n      uVar3 = uVar4 + 1;\n    }\n    if (param_2 <= uVar3) break;\n    __s = (char *)(param_1 + uVar3);\n    cVar1 = *__s;\n    uVar4 = uVar3;\n  }\n  return uVar4;\n}" ({ "{") (declaration "char *__s;" (primitive_type "char") (pointer_declarator "*__s" (* "*") (identifier "__s")) (; ";")) (declaration "char cVar1;" (primitive_type "char") (identifier "cVar1") (; ";")) (declaration "int iVar2;" (primitive_type "int") (identifier "iVar2") (; ";")) (declaration "uint uVar3;" (type_identifier "uint") (identifier "uVar3") (; ";")) (declaration "uint uVar4;" (type_identifier "uint") (identifier "uVar4") (; ";")) (if_statement "if (param_2 < 4) {\n    uVar4 = 0;\n  }\n  else {\n    iVar2 = param_1 + param_2;\n    if ((-0x41 < *(char *)(iVar2 + -1)) ||\n       (((uVar4 = param_2 - 2, *(char *)(iVar2 + -2) < -0x40 &&\n         (uVar4 = param_2 - 3, *(char *)(iVar2 + -3) < -0x40)) &&\n        (uVar4 = param_2 - 4, *(char *)(iVar2 + -4) < -0x40)))) {\n      uVar4 = param_2 - 1;\n      goto LAB_0001762e;\n    }\n  }" (if "if") (parenthesized_expression "(param_2 < 4)" (( "(") (binary_expression "param_2 < 4" (identifier "param_2") (< "<") (number_literal "4")) () ")")) (compound_statement "{\n    uVar4 = 0;\n  }" ({ "{") (expression_statement "uVar4 = 0;" (assignment_expression "uVar4 = 0" (identifier "uVar4") (= "=") (number_literal "0")) (; ";")) (} "}")) (else_clause "else {\n    iVar2 = param_1 + param_2;\n    if ((-0x41 < *(char *)(iVar2 + -1)) ||\n       (((uVar4 = param_2 - 2, *(char *)(iVar2 + -2) < -0x40 &&\n         (uVar4 = param_2 - 3, *(char *)(iVar2 + -3) < -0x40)) &&\n        (uVar4 = param_2 - 4, *(char *)(iVar2 + -4) < -0x40)))) {\n      uVar4 = param_2 - 1;\n      goto LAB_0001762e;\n    }\n  }" (else "else") (compound_statement "{\n    iVar2 = param_1 + param_2;\n    if ((-0x41 < *(char *)(iVar2 + -1)) ||\n       (((uVar4 = param_2 - 2, *(char *)(iVar2 + -2) < -0x40 &&\n         (uVar4 = param_2 - 3, *(char *)(iVar2 + -3) < -0x40)) &&\n        (uVar4 = param_2 - 4, *(char *)(iVar2 + -4) < -0x40)))) {\n      uVar4 = param_2 - 1;\n      goto LAB_0001762e;\n    }\n  }" ({ "{") (expression_statement "iVar2 = param_1 + param_2;" (assignment_expression "iVar2 = param_1 + param_2" (identifier "iVar2") (= "=") (binary_expression "param_1 + param_2" (identifier "param_1") (+ "+") (identifier "param_2"))) (; ";")) (if_statement "if ((-0x41 < *(char *)(iVar2 + -1)) ||\n       (((uVar4 = param_2 - 2, *(char *)(iVar2 + -2) < -0x40 &&\n         (uVar4 = param_2 - 3, *(char *)(iVar2 + -3) < -0x40)) &&\n        (uVar4 = param_2 - 4, *(char *)(iVar2 + -4) < -0x40)))) {\n      uVar4 = param_2 - 1;\n      goto LAB_0001762e;\n    }" (if "if") (parenthesized_expression "((-0x41 < *(char *)(iVar2 + -1)) ||\n       (((uVar4 = param_2 - 2, *(char *)(iVar2 + -2) < -0x40 &&\n         (uVar4 = param_2 - 3, *(char *)(iVar2 + -3) < -0x40)) &&\n        (uVar4 = param_2 - 4, *(char *)(iVar2 + -4) < -0x40))))" (( "(") (binary_expression "(-0x41 < *(char *)(iVar2 + -1)) ||\n       (((uVar4 = param_2 - 2, *(char *)(iVar2 + -2) < -0x40 &&\n         (uVar4 = param_2 - 3, *(char *)(iVar2 + -3) < -0x40)) &&\n        (uVar4 = param_2 - 4, *(char *)(iVar2 + -4) < -0x40)))" (parenthesized_expression "(-0x41 < *(char *)(iVar2 + -1))" (( "(") (binary_expression "-0x41 < *(char *)(iVar2 + -1)" (number_literal "-0x41") (< "<") (pointer_expression "*(char *)(iVar2 + -1)" (* "*") (cast_expression "(char *)(iVar2 + -1)" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar2 + -1)" (( "(") (binary_expression "iVar2 + -1" (identifier "iVar2") (+ "+") (number_literal "-1")) () ")"))))) () ")")) (|| "||") (parenthesized_expression "(((uVar4 = param_2 - 2, *(char *)(iVar2 + -2) < -0x40 &&\n         (uVar4 = param_2 - 3, *(char *)(iVar2 + -3) < -0x40)) &&\n        (uVar4 = param_2 - 4, *(char *)(iVar2 + -4) < -0x40)))" (( "(") (parenthesized_expression "((uVar4 = param_2 - 2, *(char *)(iVar2 + -2) < -0x40 &&\n         (uVar4 = param_2 - 3, *(char *)(iVar2 + -3) < -0x40)) &&\n        (uVar4 = param_2 - 4, *(char *)(iVar2 + -4) < -0x40))" (( "(") (binary_expression "(uVar4 = param_2 - 2, *(char *)(iVar2 + -2) < -0x40 &&\n         (uVar4 = param_2 - 3, *(char *)(iVar2 + -3) < -0x40)) &&\n        (uVar4 = param_2 - 4, *(char *)(iVar2 + -4) < -0x40)" (parenthesized_expression "(uVar4 = param_2 - 2, *(char *)(iVar2 + -2) < -0x40 &&\n         (uVar4 = param_2 - 3, *(char *)(iVar2 + -3) < -0x40))" (( "(") (comma_expression "uVar4 = param_2 - 2, *(char *)(iVar2 + -2) < -0x40 &&\n         (uVar4 = param_2 - 3, *(char *)(iVar2 + -3) < -0x40)" (assignment_expression "uVar4 = param_2 - 2" (identifier "uVar4") (= "=") (binary_expression "param_2 - 2" (identifier "param_2") (- "-") (number_literal "2"))) (, ",") (binary_expression "*(char *)(iVar2 + -2) < -0x40 &&\n         (uVar4 = param_2 - 3, *(char *)(iVar2 + -3) < -0x40)" (binary_expression "*(char *)(iVar2 + -2) < -0x40" (pointer_expression "*(char *)(iVar2 + -2)" (* "*") (cast_expression "(char *)(iVar2 + -2)" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar2 + -2)" (( "(") (binary_expression "iVar2 + -2" (identifier "iVar2") (+ "+") (number_literal "-2")) () ")")))) (< "<") (number_literal "-0x40")) (&& "&&") (parenthesized_expression "(uVar4 = param_2 - 3, *(char *)(iVar2 + -3) < -0x40)" (( "(") (comma_expression "uVar4 = param_2 - 3, *(char *)(iVar2 + -3) < -0x40" (assignment_expression "uVar4 = param_2 - 3" (identifier "uVar4") (= "=") (binary_expression "param_2 - 3" (identifier "param_2") (- "-") (number_literal "3"))) (, ",") (binary_expression "*(char *)(iVar2 + -3) < -0x40" (pointer_expression "*(char *)(iVar2 + -3)" (* "*") (cast_expression "(char *)(iVar2 + -3)" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar2 + -3)" (( "(") (binary_expression "iVar2 + -3" (identifier "iVar2") (+ "+") (number_literal "-3")) () ")")))) (< "<") (number_literal "-0x40"))) () ")")))) () ")")) (&& "&&") (parenthesized_expression "(uVar4 = param_2 - 4, *(char *)(iVar2 + -4) < -0x40)" (( "(") (comma_expression "uVar4 = param_2 - 4, *(char *)(iVar2 + -4) < -0x40" (assignment_expression "uVar4 = param_2 - 4" (identifier "uVar4") (= "=") (binary_expression "param_2 - 4" (identifier "param_2") (- "-") (number_literal "4"))) (, ",") (binary_expression "*(char *)(iVar2 + -4) < -0x40" (pointer_expression "*(char *)(iVar2 + -4)" (* "*") (cast_expression "(char *)(iVar2 + -4)" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar2 + -4)" (( "(") (binary_expression "iVar2 + -4" (identifier "iVar2") (+ "+") (number_literal "-4")) () ")")))) (< "<") (number_literal "-0x40"))) () ")"))) () ")")) () ")"))) () ")")) (compound_statement "{\n      uVar4 = param_2 - 1;\n      goto LAB_0001762e;\n    }" ({ "{") (expression_statement "uVar4 = param_2 - 1;" (assignment_expression "uVar4 = param_2 - 1" (identifier "uVar4") (= "=") (binary_expression "param_2 - 1" (identifier "param_2") (- "-") (number_literal "1"))) (; ";")) (goto_statement "goto LAB_0001762e;" (goto "goto") (statement_identifier "LAB_0001762e") (; ";")) (} "}"))) (} "}")))) (if_statement "if (param_2 <= uVar4) {\n    return uVar4;\n  }" (if "if") (parenthesized_expression "(param_2 <= uVar4)" (( "(") (binary_expression "param_2 <= uVar4" (identifier "param_2") (<= "<=") (identifier "uVar4")) () ")")) (compound_statement "{\n    return uVar4;\n  }" ({ "{") (return_statement "return uVar4;" (return "return") (identifier "uVar4") (; ";")) (} "}"))) (labeled_statement "LAB_0001762e:\n  __s = (char *)(param_1 + uVar4);" (statement_identifier "LAB_0001762e") (: ":") (expression_statement "__s = (char *)(param_1 + uVar4);" (assignment_expression "__s = (char *)(param_1 + uVar4)" (identifier "__s") (= "=") (cast_expression "(char *)(param_1 + uVar4)" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + uVar4)" (( "(") (binary_expression "param_1 + uVar4" (identifier "param_1") (+ "+") (identifier "uVar4")) () ")")))) (; ";"))) (expression_statement "cVar1 = *__s;" (assignment_expression "cVar1 = *__s" (identifier "cVar1") (= "=") (pointer_expression "*__s" (* "*") (identifier "__s"))) (; ";")) (while_statement "while( true ) {\n    if (cVar1 < '\0') {\n      iVar2 = mblen(__s,6);\n      if (iVar2 < 1) {\n        iVar2 = 1;\n      }\n      uVar3 = iVar2 + uVar4;\n    }\n    else {\n      uVar3 = uVar4 + 1;\n    }\n    if (param_2 <= uVar3) break;\n    __s = (char *)(param_1 + uVar3);\n    cVar1 = *__s;\n    uVar4 = uVar3;\n  }" (while "while") (parenthesized_expression "( true )" (( "(") (true "true") () ")")) (compound_statement "{\n    if (cVar1 < '\0') {\n      iVar2 = mblen(__s,6);\n      if (iVar2 < 1) {\n        iVar2 = 1;\n      }\n      uVar3 = iVar2 + uVar4;\n    }\n    else {\n      uVar3 = uVar4 + 1;\n    }\n    if (param_2 <= uVar3) break;\n    __s = (char *)(param_1 + uVar3);\n    cVar1 = *__s;\n    uVar4 = uVar3;\n  }" ({ "{") (if_statement "if (cVar1 < '\0') {\n      iVar2 = mblen(__s,6);\n      if (iVar2 < 1) {\n        iVar2 = 1;\n      }\n      uVar3 = iVar2 + uVar4;\n    }\n    else {\n      uVar3 = uVar4 + 1;\n    }" (if "if") (parenthesized_expression "(cVar1 < '\0')" (( "(") (binary_expression "cVar1 < '\0'" (identifier "cVar1") (< "<") (char_literal "'\0'" (' "'") (escape_sequence "\0") (' "'"))) () ")")) (compound_statement "{\n      iVar2 = mblen(__s,6);\n      if (iVar2 < 1) {\n        iVar2 = 1;\n      }\n      uVar3 = iVar2 + uVar4;\n    }" ({ "{") (expression_statement "iVar2 = mblen(__s,6);" (assignment_expression "iVar2 = mblen(__s,6)" (identifier "iVar2") (= "=") (call_expression "mblen(__s,6)" (identifier "mblen") (argument_list "(__s,6)" (( "(") (identifier "__s") (, ",") (number_literal "6") () ")")))) (; ";")) (if_statement "if (iVar2 < 1) {\n        iVar2 = 1;\n      }" (if "if") (parenthesized_expression "(iVar2 < 1)" (( "(") (binary_expression "iVar2 < 1" (identifier "iVar2") (< "<") (number_literal "1")) () ")")) (compound_statement "{\n        iVar2 = 1;\n      }" ({ "{") (expression_statement "iVar2 = 1;" (assignment_expression "iVar2 = 1" (identifier "iVar2") (= "=") (number_literal "1")) (; ";")) (} "}"))) (expression_statement "uVar3 = iVar2 + uVar4;" (assignment_expression "uVar3 = iVar2 + uVar4" (identifier "uVar3") (= "=") (binary_expression "iVar2 + uVar4" (identifier "iVar2") (+ "+") (identifier "uVar4"))) (; ";")) (} "}")) (else_clause "else {\n      uVar3 = uVar4 + 1;\n    }" (else "else") (compound_statement "{\n      uVar3 = uVar4 + 1;\n    }" ({ "{") (expression_statement "uVar3 = uVar4 + 1;" (assignment_expression "uVar3 = uVar4 + 1" (identifier "uVar3") (= "=") (binary_expression "uVar4 + 1" (identifier "uVar4") (+ "+") (number_literal "1"))) (; ";")) (} "}")))) (if_statement "if (param_2 <= uVar3) break;" (if "if") (parenthesized_expression "(param_2 <= uVar3)" (( "(") (binary_expression "param_2 <= uVar3" (identifier "param_2") (<= "<=") (identifier "uVar3")) () ")")) (break_statement "break;" (break "break") (; ";"))) (expression_statement "__s = (char *)(param_1 + uVar3);" (assignment_expression "__s = (char *)(param_1 + uVar3)" (identifier "__s") (= "=") (cast_expression "(char *)(param_1 + uVar3)" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + uVar3)" (( "(") (binary_expression "param_1 + uVar3" (identifier "param_1") (+ "+") (identifier "uVar3")) () ")")))) (; ";")) (expression_statement "cVar1 = *__s;" (assignment_expression "cVar1 = *__s" (identifier "cVar1") (= "=") (pointer_expression "*__s" (* "*") (identifier "__s"))) (; ";")) (expression_statement "uVar4 = uVar3;" (assignment_expression "uVar4 = uVar3" (identifier "uVar4") (= "=") (identifier "uVar3")) (; ";")) (} "}"))) (return_statement "return uVar4;" (return "return") (identifier "uVar4") (; ";")) (} "}")))

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

size_t __regparm3 function_1(char *var_3,size_t var_1)

{
  char *__s;
  char var_4;
  int var_6;
  type_1 var_7;
  type_1 var_2;
  
  if (var_1 < 4) {
    var_2 = 0;
  }
  else if ((-0x41 < var_3[var_1 - 1]) ||
          (((var_2 = var_1 - 2, var_3[var_1 - 2] < -0x40 && (var_2 = var_1 - 3, var_3[var_1 - 3] < -0x40)) &&
           (var_2 = var_1 - 4, var_3[var_1 - 4] < -0x40)))) {
    var_2 = var_1 - 1;
    goto LAB_0001762e;
  }
  if (var_1 <= var_2) {
    return var_2;
  }
LAB_0001762e:
  __s = var_3 + var_2;
  var_4 = *__s;
  while( true ) {
    if (var_4 < '\0') {
      var_6 = var_5(__s,6);
      if (var_6 < 1) {
        var_6 = 1;
      }
      var_7 = var_6 + var_2;
    }
    else {
      var_7 = var_2 + 1;
    }
    if (var_1 <= var_7) break;
    __s = var_3 + var_7;
    var_4 = *__s;
    var_2 = var_7;
  }
  return var_2;
}


(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: (type_identifier) declarator: (identifier)))) body: (compound_statement (declaration type: (primitive_type) declarator: (pointer_declarator declarator: (identifier))) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (type_identifier) declarator: (identifier)) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (number_literal)))) alternative: (else_clause (compound_statement (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (identifier)))) (if_statement condition: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_expression left: (number_literal) right: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))))) right: (parenthesized_expression (parenthesized_expression (binary_expression left: (parenthesized_expression (comma_expression left: (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal))) right: (binary_expression left: (binary_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) right: (number_literal)) right: (parenthesized_expression (comma_expression left: (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal))) 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: (number_literal))))))) right: (parenthesized_expression (comma_expression left: (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal))) 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: (number_literal))))))))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal)))) (goto_statement label: (statement_identifier))))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))) consequence: (compound_statement (return_statement (identifier)))) (labeled_statement label: (statement_identifier) (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: (identifier))))))) (expression_statement (assignment_expression left: (identifier) right: (pointer_expression argument: (identifier)))) (while_statement condition: (parenthesized_expression (true)) body: (compound_statement (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (char_literal (escape_sequence)))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (identifier) (number_literal))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (number_literal))))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (identifier))))) alternative: (else_clause (compound_statement (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal))))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))) consequence: (break_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: (identifier)))))) (expression_statement (assignment_expression left: (identifier) right: (pointer_expression argument: (identifier)))) (expression_statement (assignment_expression left: (identifier) right: (identifier))))) (return_statement (identifier)))))

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

uint __regparm3 MASKED(int param_1,uint param_2)

{
  char *__s;
  char cVar1;
  int iVar2;
  uint uVar3;
  uint uVar4;
  
  if (param_2 < 4) {
    uVar4 = 0;
  }
  else {
    iVar2 = param_1 + param_2;
    if ((-0x41 < *(char *)(iVar2 + -1)) ||
       (((uVar4 = param_2 - 2, *(char *)(iVar2 + -2) < -0x40 &&
         (uVar4 = param_2 - 3, *(char *)(iVar2 + -3) < -0x40)) &&
        (uVar4 = param_2 - 4, *(char *)(iVar2 + -4) < -0x40)))) {
      uVar4 = param_2 - 1;
      goto LAB_0001762e;
    }
  }
  if (param_2 <= uVar4) {
    return uVar4;
  }
LAB_0001762e:
  __s = (char *)(param_1 + uVar4);
  cVar1 = *__s;
  while( true ) {
    if (cVar1 < '\0') {
      iVar2 = mblen(__s,6);
      if (iVar2 < 1) {
        iVar2 = 1;
      }
      uVar3 = iVar2 + uVar4;
    }
    else {
      uVar3 = uVar4 + 1;
    }
    if (param_2 <= uVar3) break;
    __s = (char *)(param_1 + uVar3);
    cVar1 = *__s;
    uVar4 = uVar3;
  }
  return uVar4;
}

