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

int _rl_get_char_len(char *src,mbstate_t *ps)

{
  size_t sVar1;
  size_t __n;
  
  sVar1 = strlen(src);
  if (((_rl_utf8locale != 0) && (sVar1 != 0)) && (-1 < *src)) {
    return (uint)(*src != '\0');
  }
  __n = __ctype_get_mb_cur_max();
  if (sVar1 < __n) {
    __n = sVar1;
  }
  if (ps == (mbstate_t *)0x0) {
    sVar1 = __mbrlen(src,__n,(mbstate_t *)0x0);
    if (sVar1 == 0xfffffffe) {
      sVar1 = 0xfffffffe;
    }
    else if (sVar1 == 0xffffffff) {
      sVar1 = 0xffffffff;
    }
  }
  else {
    sVar1 = mbrtowc((wchar_t *)0x0,src,__n,(mbstate_t *)ps);
    if (sVar1 == 0xfffffffe) {
      ps->__count = 0;
      sVar1 = 0xfffffffe;
      (ps->__value).__wch = 0;
    }
    else if (sVar1 == 0xffffffff) {
      ps->__count = 0;
      sVar1 = 0xffffffff;
      (ps->__value).__wch = 0;
    }
  }
  return sVar1;
}



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

uint _rl_get_char_len(char *param_1,mbstate_t *param_2)

{
  size_t sVar1;
  size_t __n;
  uint uVar2;
  
  sVar1 = strlen(param_1);
  if (((_rl_utf8locale != 0) && (sVar1 != 0)) && (-1 < *param_1)) {
    return (uint)(*param_1 != '\0');
  }
  __n = __ctype_get_mb_cur_max();
  if (sVar1 < __n) {
    __n = sVar1;
  }
  if (param_2 == (mbstate_t *)0x0) {
    uVar2 = __mbrlen(param_1,__n,(mbstate_t *)0x0);
    if (uVar2 == 0xfffffffe) {
      uVar2 = 0xfffffffe;
    }
    else if (uVar2 == 0xffffffff) {
      uVar2 = 0xffffffff;
    }
  }
  else {
    uVar2 = mbrtowc((wchar_t *)0x0,param_1,__n,param_2);
    if (uVar2 == 0xfffffffe) {
      param_2->__count = 0;
      uVar2 = 0xfffffffe;
      (param_2->__value).__wch = 0;
    }
    else if (uVar2 == 0xffffffff) {
      param_2->__count = 0;
      uVar2 = 0xffffffff;
      (param_2->__value).__wch = 0;
    }
  }
  return uVar2;
}


PUSH EBP
PUSH EDI
PUSH ESI
PUSH EBX
CALL 0x00031ed0
ADD EBX,0x5f947
SUB ESP,0x18
MOV EDI,dword ptr [ESP + 0x2c]
MOV ESI,dword ptr [ESP + 0x30]
PUSH EDI
CALL 0x0002f760
ADD ESP,0x10
MOV EBP,EAX
MOV EAX,dword ptr [EBX + 0x8b2c]
TEST EAX,EAX
JZ 0x000ea700
TEST EBP,EBP
JZ 0x000ea700
CMP byte ptr [EDI],0x0
JS 0x000ea700
SETNZ AL
ADD ESP,0xc
POP EBX
MOVZX EAX,AL
POP ESI
POP EDI
POP EBP
RET
CALL 0x0002f520
CMP EAX,EBP
CMOVA EAX,EBP
TEST ESI,ESI
JZ 0x000ea730
PUSH ESI
PUSH EAX
PUSH EDI
PUSH 0x0
CALL 0x0002f5b0
ADD ESP,0x10
CMP EAX,-0x2
JZ 0x000ea764
CMP EAX,-0x1
JZ 0x000ea750
ADD ESP,0xc
POP EBX
POP ESI
POP EDI
POP EBP
RET
SUB ESP,0x4
PUSH 0x0
PUSH EAX
PUSH EDI
CALL 0x0002f960
ADD ESP,0x10
CMP EAX,-0x2
JZ 0x000ea778
CMP EAX,-0x1
JNZ 0x000ea725
MOV EAX,0xffffffff
JMP 0x000ea725
MOV dword ptr [ESI],0x0
MOV EAX,0xffffffff
MOV dword ptr [ESI + 0x4],0x0
JMP 0x000ea725
MOV dword ptr [ESI],0x0
MOV EAX,0xfffffffe
MOV dword ptr [ESI + 0x4],0x0
JMP 0x000ea725
MOV EAX,0xfffffffe
JMP 0x000ea725
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nuint _rl_get_char_len(char *param_1,mbstate_t *param_2)\n\n{\n  size_t sVar1;\n  size_t __n;\n  uint uVar2;\n  \n  sVar1 = strlen(param_1);\n  if (((_rl_utf8locale != 0) && (sVar1 != 0)) && (-1 < *param_1)) {\n    return (uint)(*param_1 != '\0');\n  }\n  __n = __ctype_get_mb_cur_max();\n  if (sVar1 < __n) {\n    __n = sVar1;\n  }\n  if (param_2 == (mbstate_t *)0x0) {\n    uVar2 = __mbrlen(param_1,__n,(mbstate_t *)0x0);\n    if (uVar2 == 0xfffffffe) {\n      uVar2 = 0xfffffffe;\n    }\n    else if (uVar2 == 0xffffffff) {\n      uVar2 = 0xffffffff;\n    }\n  }\n  else {\n    uVar2 = mbrtowc((wchar_t *)0x0,param_1,__n,param_2);\n    if (uVar2 == 0xfffffffe) {\n      param_2->__count = 0;\n      uVar2 = 0xfffffffe;\n      (param_2->__value).__wch = 0;\n    }\n    else if (uVar2 == 0xffffffff) {\n      param_2->__count = 0;\n      uVar2 = 0xffffffff;\n      (param_2->__value).__wch = 0;\n    }\n  }\n  return uVar2;\n}\n\n" comment (function_definition "uint _rl_get_char_len(char *param_1,mbstate_t *param_2)\n\n{\n  size_t sVar1;\n  size_t __n;\n  uint uVar2;\n  \n  sVar1 = strlen(param_1);\n  if (((_rl_utf8locale != 0) && (sVar1 != 0)) && (-1 < *param_1)) {\n    return (uint)(*param_1 != '\0');\n  }\n  __n = __ctype_get_mb_cur_max();\n  if (sVar1 < __n) {\n    __n = sVar1;\n  }\n  if (param_2 == (mbstate_t *)0x0) {\n    uVar2 = __mbrlen(param_1,__n,(mbstate_t *)0x0);\n    if (uVar2 == 0xfffffffe) {\n      uVar2 = 0xfffffffe;\n    }\n    else if (uVar2 == 0xffffffff) {\n      uVar2 = 0xffffffff;\n    }\n  }\n  else {\n    uVar2 = mbrtowc((wchar_t *)0x0,param_1,__n,param_2);\n    if (uVar2 == 0xfffffffe) {\n      param_2->__count = 0;\n      uVar2 = 0xfffffffe;\n      (param_2->__value).__wch = 0;\n    }\n    else if (uVar2 == 0xffffffff) {\n      param_2->__count = 0;\n      uVar2 = 0xffffffff;\n      (param_2->__value).__wch = 0;\n    }\n  }\n  return uVar2;\n}" type_identifier (function_declarator "_rl_get_char_len(char *param_1,mbstate_t *param_2)" identifier (parameter_list "(char *param_1,mbstate_t *param_2)" ( (parameter_declaration "char *param_1" primitive_type (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "mbstate_t *param_2" type_identifier (pointer_declarator "*param_2" * identifier)) ))) (compound_statement "{\n  size_t sVar1;\n  size_t __n;\n  uint uVar2;\n  \n  sVar1 = strlen(param_1);\n  if (((_rl_utf8locale != 0) && (sVar1 != 0)) && (-1 < *param_1)) {\n    return (uint)(*param_1 != '\0');\n  }\n  __n = __ctype_get_mb_cur_max();\n  if (sVar1 < __n) {\n    __n = sVar1;\n  }\n  if (param_2 == (mbstate_t *)0x0) {\n    uVar2 = __mbrlen(param_1,__n,(mbstate_t *)0x0);\n    if (uVar2 == 0xfffffffe) {\n      uVar2 = 0xfffffffe;\n    }\n    else if (uVar2 == 0xffffffff) {\n      uVar2 = 0xffffffff;\n    }\n  }\n  else {\n    uVar2 = mbrtowc((wchar_t *)0x0,param_1,__n,param_2);\n    if (uVar2 == 0xfffffffe) {\n      param_2->__count = 0;\n      uVar2 = 0xfffffffe;\n      (param_2->__value).__wch = 0;\n    }\n    else if (uVar2 == 0xffffffff) {\n      param_2->__count = 0;\n      uVar2 = 0xffffffff;\n      (param_2->__value).__wch = 0;\n    }\n  }\n  return uVar2;\n}" { (declaration "size_t sVar1;" primitive_type identifier ;) (declaration "size_t __n;" primitive_type identifier ;) (declaration "uint uVar2;" type_identifier identifier ;) (expression_statement "sVar1 = strlen(param_1);" (assignment_expression "sVar1 = strlen(param_1)" identifier = (call_expression "strlen(param_1)" identifier (argument_list "(param_1)" ( identifier )))) ;) (if_statement "if (((_rl_utf8locale != 0) && (sVar1 != 0)) && (-1 < *param_1)) {\n    return (uint)(*param_1 != '\0');\n  }" if (parenthesized_expression "(((_rl_utf8locale != 0) && (sVar1 != 0)) && (-1 < *param_1))" ( (binary_expression "((_rl_utf8locale != 0) && (sVar1 != 0)) && (-1 < *param_1)" (parenthesized_expression "((_rl_utf8locale != 0) && (sVar1 != 0))" ( (binary_expression "(_rl_utf8locale != 0) && (sVar1 != 0)" (parenthesized_expression "(_rl_utf8locale != 0)" ( (binary_expression "_rl_utf8locale != 0" identifier != number_literal) )) && (parenthesized_expression "(sVar1 != 0)" ( (binary_expression "sVar1 != 0" identifier != number_literal) ))) )) && (parenthesized_expression "(-1 < *param_1)" ( (binary_expression "-1 < *param_1" number_literal < (pointer_expression "*param_1" * identifier)) ))) )) (compound_statement "{\n    return (uint)(*param_1 != '\0');\n  }" { (return_statement "return (uint)(*param_1 != '\0');" return (call_expression "(uint)(*param_1 != '\0')" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(*param_1 != '\0')" ( (binary_expression "*param_1 != '\0'" (pointer_expression "*param_1" * identifier) != (char_literal "'\0'" ' escape_sequence ')) ))) ;) })) (expression_statement "__n = __ctype_get_mb_cur_max();" (assignment_expression "__n = __ctype_get_mb_cur_max()" identifier = (call_expression "__ctype_get_mb_cur_max()" identifier (argument_list "()" ( )))) ;) (if_statement "if (sVar1 < __n) {\n    __n = sVar1;\n  }" if (parenthesized_expression "(sVar1 < __n)" ( (binary_expression "sVar1 < __n" identifier < identifier) )) (compound_statement "{\n    __n = sVar1;\n  }" { (expression_statement "__n = sVar1;" (assignment_expression "__n = sVar1" identifier = identifier) ;) })) (if_statement "if (param_2 == (mbstate_t *)0x0) {\n    uVar2 = __mbrlen(param_1,__n,(mbstate_t *)0x0);\n    if (uVar2 == 0xfffffffe) {\n      uVar2 = 0xfffffffe;\n    }\n    else if (uVar2 == 0xffffffff) {\n      uVar2 = 0xffffffff;\n    }\n  }\n  else {\n    uVar2 = mbrtowc((wchar_t *)0x0,param_1,__n,param_2);\n    if (uVar2 == 0xfffffffe) {\n      param_2->__count = 0;\n      uVar2 = 0xfffffffe;\n      (param_2->__value).__wch = 0;\n    }\n    else if (uVar2 == 0xffffffff) {\n      param_2->__count = 0;\n      uVar2 = 0xffffffff;\n      (param_2->__value).__wch = 0;\n    }\n  }" if (parenthesized_expression "(param_2 == (mbstate_t *)0x0)" ( (binary_expression "param_2 == (mbstate_t *)0x0" identifier == (cast_expression "(mbstate_t *)0x0" ( (type_descriptor "mbstate_t *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    uVar2 = __mbrlen(param_1,__n,(mbstate_t *)0x0);\n    if (uVar2 == 0xfffffffe) {\n      uVar2 = 0xfffffffe;\n    }\n    else if (uVar2 == 0xffffffff) {\n      uVar2 = 0xffffffff;\n    }\n  }" { (expression_statement "uVar2 = __mbrlen(param_1,__n,(mbstate_t *)0x0);" (assignment_expression "uVar2 = __mbrlen(param_1,__n,(mbstate_t *)0x0)" identifier = (call_expression "__mbrlen(param_1,__n,(mbstate_t *)0x0)" identifier (argument_list "(param_1,__n,(mbstate_t *)0x0)" ( identifier , identifier , (cast_expression "(mbstate_t *)0x0" ( (type_descriptor "mbstate_t *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal) )))) ;) (if_statement "if (uVar2 == 0xfffffffe) {\n      uVar2 = 0xfffffffe;\n    }\n    else if (uVar2 == 0xffffffff) {\n      uVar2 = 0xffffffff;\n    }" if (parenthesized_expression "(uVar2 == 0xfffffffe)" ( (binary_expression "uVar2 == 0xfffffffe" identifier == number_literal) )) (compound_statement "{\n      uVar2 = 0xfffffffe;\n    }" { (expression_statement "uVar2 = 0xfffffffe;" (assignment_expression "uVar2 = 0xfffffffe" identifier = number_literal) ;) }) (else_clause "else if (uVar2 == 0xffffffff) {\n      uVar2 = 0xffffffff;\n    }" else (if_statement "if (uVar2 == 0xffffffff) {\n      uVar2 = 0xffffffff;\n    }" if (parenthesized_expression "(uVar2 == 0xffffffff)" ( (binary_expression "uVar2 == 0xffffffff" identifier == number_literal) )) (compound_statement "{\n      uVar2 = 0xffffffff;\n    }" { (expression_statement "uVar2 = 0xffffffff;" (assignment_expression "uVar2 = 0xffffffff" identifier = number_literal) ;) })))) }) (else_clause "else {\n    uVar2 = mbrtowc((wchar_t *)0x0,param_1,__n,param_2);\n    if (uVar2 == 0xfffffffe) {\n      param_2->__count = 0;\n      uVar2 = 0xfffffffe;\n      (param_2->__value).__wch = 0;\n    }\n    else if (uVar2 == 0xffffffff) {\n      param_2->__count = 0;\n      uVar2 = 0xffffffff;\n      (param_2->__value).__wch = 0;\n    }\n  }" else (compound_statement "{\n    uVar2 = mbrtowc((wchar_t *)0x0,param_1,__n,param_2);\n    if (uVar2 == 0xfffffffe) {\n      param_2->__count = 0;\n      uVar2 = 0xfffffffe;\n      (param_2->__value).__wch = 0;\n    }\n    else if (uVar2 == 0xffffffff) {\n      param_2->__count = 0;\n      uVar2 = 0xffffffff;\n      (param_2->__value).__wch = 0;\n    }\n  }" { (expression_statement "uVar2 = mbrtowc((wchar_t *)0x0,param_1,__n,param_2);" (assignment_expression "uVar2 = mbrtowc((wchar_t *)0x0,param_1,__n,param_2)" identifier = (call_expression "mbrtowc((wchar_t *)0x0,param_1,__n,param_2)" identifier (argument_list "((wchar_t *)0x0,param_1,__n,param_2)" ( (cast_expression "(wchar_t *)0x0" ( (type_descriptor "wchar_t *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal) , identifier , identifier , identifier )))) ;) (if_statement "if (uVar2 == 0xfffffffe) {\n      param_2->__count = 0;\n      uVar2 = 0xfffffffe;\n      (param_2->__value).__wch = 0;\n    }\n    else if (uVar2 == 0xffffffff) {\n      param_2->__count = 0;\n      uVar2 = 0xffffffff;\n      (param_2->__value).__wch = 0;\n    }" if (parenthesized_expression "(uVar2 == 0xfffffffe)" ( (binary_expression "uVar2 == 0xfffffffe" identifier == number_literal) )) (compound_statement "{\n      param_2->__count = 0;\n      uVar2 = 0xfffffffe;\n      (param_2->__value).__wch = 0;\n    }" { (expression_statement "param_2->__count = 0;" (assignment_expression "param_2->__count = 0" (field_expression "param_2->__count" identifier -> field_identifier) = number_literal) ;) (expression_statement "uVar2 = 0xfffffffe;" (assignment_expression "uVar2 = 0xfffffffe" identifier = number_literal) ;) (expression_statement "(param_2->__value).__wch = 0;" (assignment_expression "(param_2->__value).__wch = 0" (field_expression "(param_2->__value).__wch" (parenthesized_expression "(param_2->__value)" ( (field_expression "param_2->__value" identifier -> field_identifier) )) . field_identifier) = number_literal) ;) }) (else_clause "else if (uVar2 == 0xffffffff) {\n      param_2->__count = 0;\n      uVar2 = 0xffffffff;\n      (param_2->__value).__wch = 0;\n    }" else (if_statement "if (uVar2 == 0xffffffff) {\n      param_2->__count = 0;\n      uVar2 = 0xffffffff;\n      (param_2->__value).__wch = 0;\n    }" if (parenthesized_expression "(uVar2 == 0xffffffff)" ( (binary_expression "uVar2 == 0xffffffff" identifier == number_literal) )) (compound_statement "{\n      param_2->__count = 0;\n      uVar2 = 0xffffffff;\n      (param_2->__value).__wch = 0;\n    }" { (expression_statement "param_2->__count = 0;" (assignment_expression "param_2->__count = 0" (field_expression "param_2->__count" identifier -> field_identifier) = number_literal) ;) (expression_statement "uVar2 = 0xffffffff;" (assignment_expression "uVar2 = 0xffffffff" identifier = number_literal) ;) (expression_statement "(param_2->__value).__wch = 0;" (assignment_expression "(param_2->__value).__wch = 0" (field_expression "(param_2->__value).__wch" (parenthesized_expression "(param_2->__value)" ( (field_expression "param_2->__value" identifier -> field_identifier) )) . field_identifier) = number_literal) ;) })))) }))) (return_statement "return uVar2;" return identifier ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n/* WARNING: Unknown calling convention */\n\nint _rl_get_char_len(char *src,mbstate_t *ps)\n\n{\n  size_t sVar1;\n  size_t __n;\n  \n  sVar1 = strlen(src);\n  if (((_rl_utf8locale != 0) && (sVar1 != 0)) && (-1 < *src)) {\n    return (uint)(*src != '\0');\n  }\n  __n = __ctype_get_mb_cur_max();\n  if (sVar1 < __n) {\n    __n = sVar1;\n  }\n  if (ps == (mbstate_t *)0x0) {\n    sVar1 = __mbrlen(src,__n,(mbstate_t *)0x0);\n    if (sVar1 == 0xfffffffe) {\n      sVar1 = 0xfffffffe;\n    }\n    else if (sVar1 == 0xffffffff) {\n      sVar1 = 0xffffffff;\n    }\n  }\n  else {\n    sVar1 = mbrtowc((wchar_t *)0x0,src,__n,(mbstate_t *)ps);\n    if (sVar1 == 0xfffffffe) {\n      ps->__count = 0;\n      sVar1 = 0xfffffffe;\n      (ps->__value).__wch = 0;\n    }\n    else if (sVar1 == 0xffffffff) {\n      ps->__count = 0;\n      sVar1 = 0xffffffff;\n      (ps->__value).__wch = 0;\n    }\n  }\n  return sVar1;\n}\n\n" comment comment (function_definition "int _rl_get_char_len(char *src,mbstate_t *ps)\n\n{\n  size_t sVar1;\n  size_t __n;\n  \n  sVar1 = strlen(src);\n  if (((_rl_utf8locale != 0) && (sVar1 != 0)) && (-1 < *src)) {\n    return (uint)(*src != '\0');\n  }\n  __n = __ctype_get_mb_cur_max();\n  if (sVar1 < __n) {\n    __n = sVar1;\n  }\n  if (ps == (mbstate_t *)0x0) {\n    sVar1 = __mbrlen(src,__n,(mbstate_t *)0x0);\n    if (sVar1 == 0xfffffffe) {\n      sVar1 = 0xfffffffe;\n    }\n    else if (sVar1 == 0xffffffff) {\n      sVar1 = 0xffffffff;\n    }\n  }\n  else {\n    sVar1 = mbrtowc((wchar_t *)0x0,src,__n,(mbstate_t *)ps);\n    if (sVar1 == 0xfffffffe) {\n      ps->__count = 0;\n      sVar1 = 0xfffffffe;\n      (ps->__value).__wch = 0;\n    }\n    else if (sVar1 == 0xffffffff) {\n      ps->__count = 0;\n      sVar1 = 0xffffffff;\n      (ps->__value).__wch = 0;\n    }\n  }\n  return sVar1;\n}" primitive_type (function_declarator "_rl_get_char_len(char *src,mbstate_t *ps)" identifier (parameter_list "(char *src,mbstate_t *ps)" ( (parameter_declaration "char *src" primitive_type (pointer_declarator "*src" * identifier)) , (parameter_declaration "mbstate_t *ps" type_identifier (pointer_declarator "*ps" * identifier)) ))) (compound_statement "{\n  size_t sVar1;\n  size_t __n;\n  \n  sVar1 = strlen(src);\n  if (((_rl_utf8locale != 0) && (sVar1 != 0)) && (-1 < *src)) {\n    return (uint)(*src != '\0');\n  }\n  __n = __ctype_get_mb_cur_max();\n  if (sVar1 < __n) {\n    __n = sVar1;\n  }\n  if (ps == (mbstate_t *)0x0) {\n    sVar1 = __mbrlen(src,__n,(mbstate_t *)0x0);\n    if (sVar1 == 0xfffffffe) {\n      sVar1 = 0xfffffffe;\n    }\n    else if (sVar1 == 0xffffffff) {\n      sVar1 = 0xffffffff;\n    }\n  }\n  else {\n    sVar1 = mbrtowc((wchar_t *)0x0,src,__n,(mbstate_t *)ps);\n    if (sVar1 == 0xfffffffe) {\n      ps->__count = 0;\n      sVar1 = 0xfffffffe;\n      (ps->__value).__wch = 0;\n    }\n    else if (sVar1 == 0xffffffff) {\n      ps->__count = 0;\n      sVar1 = 0xffffffff;\n      (ps->__value).__wch = 0;\n    }\n  }\n  return sVar1;\n}" { (declaration "size_t sVar1;" primitive_type identifier ;) (declaration "size_t __n;" primitive_type identifier ;) (expression_statement "sVar1 = strlen(src);" (assignment_expression "sVar1 = strlen(src)" identifier = (call_expression "strlen(src)" identifier (argument_list "(src)" ( identifier )))) ;) (if_statement "if (((_rl_utf8locale != 0) && (sVar1 != 0)) && (-1 < *src)) {\n    return (uint)(*src != '\0');\n  }" if (parenthesized_expression "(((_rl_utf8locale != 0) && (sVar1 != 0)) && (-1 < *src))" ( (binary_expression "((_rl_utf8locale != 0) && (sVar1 != 0)) && (-1 < *src)" (parenthesized_expression "((_rl_utf8locale != 0) && (sVar1 != 0))" ( (binary_expression "(_rl_utf8locale != 0) && (sVar1 != 0)" (parenthesized_expression "(_rl_utf8locale != 0)" ( (binary_expression "_rl_utf8locale != 0" identifier != number_literal) )) && (parenthesized_expression "(sVar1 != 0)" ( (binary_expression "sVar1 != 0" identifier != number_literal) ))) )) && (parenthesized_expression "(-1 < *src)" ( (binary_expression "-1 < *src" number_literal < (pointer_expression "*src" * identifier)) ))) )) (compound_statement "{\n    return (uint)(*src != '\0');\n  }" { (return_statement "return (uint)(*src != '\0');" return (call_expression "(uint)(*src != '\0')" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(*src != '\0')" ( (binary_expression "*src != '\0'" (pointer_expression "*src" * identifier) != (char_literal "'\0'" ' escape_sequence ')) ))) ;) })) (expression_statement "__n = __ctype_get_mb_cur_max();" (assignment_expression "__n = __ctype_get_mb_cur_max()" identifier = (call_expression "__ctype_get_mb_cur_max()" identifier (argument_list "()" ( )))) ;) (if_statement "if (sVar1 < __n) {\n    __n = sVar1;\n  }" if (parenthesized_expression "(sVar1 < __n)" ( (binary_expression "sVar1 < __n" identifier < identifier) )) (compound_statement "{\n    __n = sVar1;\n  }" { (expression_statement "__n = sVar1;" (assignment_expression "__n = sVar1" identifier = identifier) ;) })) (if_statement "if (ps == (mbstate_t *)0x0) {\n    sVar1 = __mbrlen(src,__n,(mbstate_t *)0x0);\n    if (sVar1 == 0xfffffffe) {\n      sVar1 = 0xfffffffe;\n    }\n    else if (sVar1 == 0xffffffff) {\n      sVar1 = 0xffffffff;\n    }\n  }\n  else {\n    sVar1 = mbrtowc((wchar_t *)0x0,src,__n,(mbstate_t *)ps);\n    if (sVar1 == 0xfffffffe) {\n      ps->__count = 0;\n      sVar1 = 0xfffffffe;\n      (ps->__value).__wch = 0;\n    }\n    else if (sVar1 == 0xffffffff) {\n      ps->__count = 0;\n      sVar1 = 0xffffffff;\n      (ps->__value).__wch = 0;\n    }\n  }" if (parenthesized_expression "(ps == (mbstate_t *)0x0)" ( (binary_expression "ps == (mbstate_t *)0x0" identifier == (cast_expression "(mbstate_t *)0x0" ( (type_descriptor "mbstate_t *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    sVar1 = __mbrlen(src,__n,(mbstate_t *)0x0);\n    if (sVar1 == 0xfffffffe) {\n      sVar1 = 0xfffffffe;\n    }\n    else if (sVar1 == 0xffffffff) {\n      sVar1 = 0xffffffff;\n    }\n  }" { (expression_statement "sVar1 = __mbrlen(src,__n,(mbstate_t *)0x0);" (assignment_expression "sVar1 = __mbrlen(src,__n,(mbstate_t *)0x0)" identifier = (call_expression "__mbrlen(src,__n,(mbstate_t *)0x0)" identifier (argument_list "(src,__n,(mbstate_t *)0x0)" ( identifier , identifier , (cast_expression "(mbstate_t *)0x0" ( (type_descriptor "mbstate_t *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal) )))) ;) (if_statement "if (sVar1 == 0xfffffffe) {\n      sVar1 = 0xfffffffe;\n    }\n    else if (sVar1 == 0xffffffff) {\n      sVar1 = 0xffffffff;\n    }" if (parenthesized_expression "(sVar1 == 0xfffffffe)" ( (binary_expression "sVar1 == 0xfffffffe" identifier == number_literal) )) (compound_statement "{\n      sVar1 = 0xfffffffe;\n    }" { (expression_statement "sVar1 = 0xfffffffe;" (assignment_expression "sVar1 = 0xfffffffe" identifier = number_literal) ;) }) (else_clause "else if (sVar1 == 0xffffffff) {\n      sVar1 = 0xffffffff;\n    }" else (if_statement "if (sVar1 == 0xffffffff) {\n      sVar1 = 0xffffffff;\n    }" if (parenthesized_expression "(sVar1 == 0xffffffff)" ( (binary_expression "sVar1 == 0xffffffff" identifier == number_literal) )) (compound_statement "{\n      sVar1 = 0xffffffff;\n    }" { (expression_statement "sVar1 = 0xffffffff;" (assignment_expression "sVar1 = 0xffffffff" identifier = number_literal) ;) })))) }) (else_clause "else {\n    sVar1 = mbrtowc((wchar_t *)0x0,src,__n,(mbstate_t *)ps);\n    if (sVar1 == 0xfffffffe) {\n      ps->__count = 0;\n      sVar1 = 0xfffffffe;\n      (ps->__value).__wch = 0;\n    }\n    else if (sVar1 == 0xffffffff) {\n      ps->__count = 0;\n      sVar1 = 0xffffffff;\n      (ps->__value).__wch = 0;\n    }\n  }" else (compound_statement "{\n    sVar1 = mbrtowc((wchar_t *)0x0,src,__n,(mbstate_t *)ps);\n    if (sVar1 == 0xfffffffe) {\n      ps->__count = 0;\n      sVar1 = 0xfffffffe;\n      (ps->__value).__wch = 0;\n    }\n    else if (sVar1 == 0xffffffff) {\n      ps->__count = 0;\n      sVar1 = 0xffffffff;\n      (ps->__value).__wch = 0;\n    }\n  }" { (expression_statement "sVar1 = mbrtowc((wchar_t *)0x0,src,__n,(mbstate_t *)ps);" (assignment_expression "sVar1 = mbrtowc((wchar_t *)0x0,src,__n,(mbstate_t *)ps)" identifier = (call_expression "mbrtowc((wchar_t *)0x0,src,__n,(mbstate_t *)ps)" identifier (argument_list "((wchar_t *)0x0,src,__n,(mbstate_t *)ps)" ( (cast_expression "(wchar_t *)0x0" ( (type_descriptor "wchar_t *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal) , identifier , identifier , (cast_expression "(mbstate_t *)ps" ( (type_descriptor "mbstate_t *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier) )))) ;) (if_statement "if (sVar1 == 0xfffffffe) {\n      ps->__count = 0;\n      sVar1 = 0xfffffffe;\n      (ps->__value).__wch = 0;\n    }\n    else if (sVar1 == 0xffffffff) {\n      ps->__count = 0;\n      sVar1 = 0xffffffff;\n      (ps->__value).__wch = 0;\n    }" if (parenthesized_expression "(sVar1 == 0xfffffffe)" ( (binary_expression "sVar1 == 0xfffffffe" identifier == number_literal) )) (compound_statement "{\n      ps->__count = 0;\n      sVar1 = 0xfffffffe;\n      (ps->__value).__wch = 0;\n    }" { (expression_statement "ps->__count = 0;" (assignment_expression "ps->__count = 0" (field_expression "ps->__count" identifier -> field_identifier) = number_literal) ;) (expression_statement "sVar1 = 0xfffffffe;" (assignment_expression "sVar1 = 0xfffffffe" identifier = number_literal) ;) (expression_statement "(ps->__value).__wch = 0;" (assignment_expression "(ps->__value).__wch = 0" (field_expression "(ps->__value).__wch" (parenthesized_expression "(ps->__value)" ( (field_expression "ps->__value" identifier -> field_identifier) )) . field_identifier) = number_literal) ;) }) (else_clause "else if (sVar1 == 0xffffffff) {\n      ps->__count = 0;\n      sVar1 = 0xffffffff;\n      (ps->__value).__wch = 0;\n    }" else (if_statement "if (sVar1 == 0xffffffff) {\n      ps->__count = 0;\n      sVar1 = 0xffffffff;\n      (ps->__value).__wch = 0;\n    }" if (parenthesized_expression "(sVar1 == 0xffffffff)" ( (binary_expression "sVar1 == 0xffffffff" identifier == number_literal) )) (compound_statement "{\n      ps->__count = 0;\n      sVar1 = 0xffffffff;\n      (ps->__value).__wch = 0;\n    }" { (expression_statement "ps->__count = 0;" (assignment_expression "ps->__count = 0" (field_expression "ps->__count" identifier -> field_identifier) = number_literal) ;) (expression_statement "sVar1 = 0xffffffff;" (assignment_expression "sVar1 = 0xffffffff" identifier = number_literal) ;) (expression_statement "(ps->__value).__wch = 0;" (assignment_expression "(ps->__value).__wch = 0" (field_expression "(ps->__value).__wch" (parenthesized_expression "(ps->__value)" ( (field_expression "ps->__value" identifier -> field_identifier) )) . field_identifier) = number_literal) ;) })))) }))) (return_statement "return sVar1;" return identifier ;) })))
(translation_unit "uint _rl_get_char_len(char *param_1,mbstate_t *param_2)\n\n{\n  size_t sVar1;\n  size_t __n;\n  uint uVar2;\n  \n  sVar1 = strlen(param_1);\n  if (((_rl_utf8locale != 0) && (sVar1 != 0)) && (-1 < *param_1)) {\n    return (uint)(*param_1 != '\0');\n  }\n  __n = __ctype_get_mb_cur_max();\n  if (sVar1 < __n) {\n    __n = sVar1;\n  }\n  if (param_2 == (mbstate_t *)0x0) {\n    uVar2 = __mbrlen(param_1,__n,(mbstate_t *)0x0);\n    if (uVar2 == 0xfffffffe) {\n      uVar2 = 0xfffffffe;\n    }\n    else if (uVar2 == 0xffffffff) {\n      uVar2 = 0xffffffff;\n    }\n  }\n  else {\n    uVar2 = mbrtowc((wchar_t *)0x0,param_1,__n,param_2);\n    if (uVar2 == 0xfffffffe) {\n      param_2->__count = 0;\n      uVar2 = 0xfffffffe;\n      (param_2->__value).__wch = 0;\n    }\n    else if (uVar2 == 0xffffffff) {\n      param_2->__count = 0;\n      uVar2 = 0xffffffff;\n      (param_2->__value).__wch = 0;\n    }\n  }\n  return uVar2;\n}\n\n" (function_definition "uint _rl_get_char_len(char *param_1,mbstate_t *param_2)\n\n{\n  size_t sVar1;\n  size_t __n;\n  uint uVar2;\n  \n  sVar1 = strlen(param_1);\n  if (((_rl_utf8locale != 0) && (sVar1 != 0)) && (-1 < *param_1)) {\n    return (uint)(*param_1 != '\0');\n  }\n  __n = __ctype_get_mb_cur_max();\n  if (sVar1 < __n) {\n    __n = sVar1;\n  }\n  if (param_2 == (mbstate_t *)0x0) {\n    uVar2 = __mbrlen(param_1,__n,(mbstate_t *)0x0);\n    if (uVar2 == 0xfffffffe) {\n      uVar2 = 0xfffffffe;\n    }\n    else if (uVar2 == 0xffffffff) {\n      uVar2 = 0xffffffff;\n    }\n  }\n  else {\n    uVar2 = mbrtowc((wchar_t *)0x0,param_1,__n,param_2);\n    if (uVar2 == 0xfffffffe) {\n      param_2->__count = 0;\n      uVar2 = 0xfffffffe;\n      (param_2->__value).__wch = 0;\n    }\n    else if (uVar2 == 0xffffffff) {\n      param_2->__count = 0;\n      uVar2 = 0xffffffff;\n      (param_2->__value).__wch = 0;\n    }\n  }\n  return uVar2;\n}" type_identifier (function_declarator "_rl_get_char_len(char *param_1,mbstate_t *param_2)" identifier (parameter_list "(char *param_1,mbstate_t *param_2)" ( (parameter_declaration "char *param_1" primitive_type (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "mbstate_t *param_2" type_identifier (pointer_declarator "*param_2" * identifier)) ))) (compound_statement "{\n  size_t sVar1;\n  size_t __n;\n  uint uVar2;\n  \n  sVar1 = strlen(param_1);\n  if (((_rl_utf8locale != 0) && (sVar1 != 0)) && (-1 < *param_1)) {\n    return (uint)(*param_1 != '\0');\n  }\n  __n = __ctype_get_mb_cur_max();\n  if (sVar1 < __n) {\n    __n = sVar1;\n  }\n  if (param_2 == (mbstate_t *)0x0) {\n    uVar2 = __mbrlen(param_1,__n,(mbstate_t *)0x0);\n    if (uVar2 == 0xfffffffe) {\n      uVar2 = 0xfffffffe;\n    }\n    else if (uVar2 == 0xffffffff) {\n      uVar2 = 0xffffffff;\n    }\n  }\n  else {\n    uVar2 = mbrtowc((wchar_t *)0x0,param_1,__n,param_2);\n    if (uVar2 == 0xfffffffe) {\n      param_2->__count = 0;\n      uVar2 = 0xfffffffe;\n      (param_2->__value).__wch = 0;\n    }\n    else if (uVar2 == 0xffffffff) {\n      param_2->__count = 0;\n      uVar2 = 0xffffffff;\n      (param_2->__value).__wch = 0;\n    }\n  }\n  return uVar2;\n}" { (declaration "size_t sVar1;" primitive_type identifier ;) (declaration "size_t __n;" primitive_type identifier ;) (declaration "uint uVar2;" type_identifier identifier ;) (expression_statement "sVar1 = strlen(param_1);" (assignment_expression "sVar1 = strlen(param_1)" identifier = (call_expression "strlen(param_1)" identifier (argument_list "(param_1)" ( identifier )))) ;) (if_statement "if (((_rl_utf8locale != 0) && (sVar1 != 0)) && (-1 < *param_1)) {\n    return (uint)(*param_1 != '\0');\n  }" if (parenthesized_expression "(((_rl_utf8locale != 0) && (sVar1 != 0)) && (-1 < *param_1))" ( (binary_expression "((_rl_utf8locale != 0) && (sVar1 != 0)) && (-1 < *param_1)" (parenthesized_expression "((_rl_utf8locale != 0) && (sVar1 != 0))" ( (binary_expression "(_rl_utf8locale != 0) && (sVar1 != 0)" (parenthesized_expression "(_rl_utf8locale != 0)" ( (binary_expression "_rl_utf8locale != 0" identifier != number_literal) )) && (parenthesized_expression "(sVar1 != 0)" ( (binary_expression "sVar1 != 0" identifier != number_literal) ))) )) && (parenthesized_expression "(-1 < *param_1)" ( (binary_expression "-1 < *param_1" number_literal < (pointer_expression "*param_1" * identifier)) ))) )) (compound_statement "{\n    return (uint)(*param_1 != '\0');\n  }" { (return_statement "return (uint)(*param_1 != '\0');" return (call_expression "(uint)(*param_1 != '\0')" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(*param_1 != '\0')" ( (binary_expression "*param_1 != '\0'" (pointer_expression "*param_1" * identifier) != (char_literal "'\0'" ' escape_sequence ')) ))) ;) })) (expression_statement "__n = __ctype_get_mb_cur_max();" (assignment_expression "__n = __ctype_get_mb_cur_max()" identifier = (call_expression "__ctype_get_mb_cur_max()" identifier (argument_list "()" ( )))) ;) (if_statement "if (sVar1 < __n) {\n    __n = sVar1;\n  }" if (parenthesized_expression "(sVar1 < __n)" ( (binary_expression "sVar1 < __n" identifier < identifier) )) (compound_statement "{\n    __n = sVar1;\n  }" { (expression_statement "__n = sVar1;" (assignment_expression "__n = sVar1" identifier = identifier) ;) })) (if_statement "if (param_2 == (mbstate_t *)0x0) {\n    uVar2 = __mbrlen(param_1,__n,(mbstate_t *)0x0);\n    if (uVar2 == 0xfffffffe) {\n      uVar2 = 0xfffffffe;\n    }\n    else if (uVar2 == 0xffffffff) {\n      uVar2 = 0xffffffff;\n    }\n  }\n  else {\n    uVar2 = mbrtowc((wchar_t *)0x0,param_1,__n,param_2);\n    if (uVar2 == 0xfffffffe) {\n      param_2->__count = 0;\n      uVar2 = 0xfffffffe;\n      (param_2->__value).__wch = 0;\n    }\n    else if (uVar2 == 0xffffffff) {\n      param_2->__count = 0;\n      uVar2 = 0xffffffff;\n      (param_2->__value).__wch = 0;\n    }\n  }" if (parenthesized_expression "(param_2 == (mbstate_t *)0x0)" ( (binary_expression "param_2 == (mbstate_t *)0x0" identifier == (cast_expression "(mbstate_t *)0x0" ( (type_descriptor "mbstate_t *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    uVar2 = __mbrlen(param_1,__n,(mbstate_t *)0x0);\n    if (uVar2 == 0xfffffffe) {\n      uVar2 = 0xfffffffe;\n    }\n    else if (uVar2 == 0xffffffff) {\n      uVar2 = 0xffffffff;\n    }\n  }" { (expression_statement "uVar2 = __mbrlen(param_1,__n,(mbstate_t *)0x0);" (assignment_expression "uVar2 = __mbrlen(param_1,__n,(mbstate_t *)0x0)" identifier = (call_expression "__mbrlen(param_1,__n,(mbstate_t *)0x0)" identifier (argument_list "(param_1,__n,(mbstate_t *)0x0)" ( identifier , identifier , (cast_expression "(mbstate_t *)0x0" ( (type_descriptor "mbstate_t *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal) )))) ;) (if_statement "if (uVar2 == 0xfffffffe) {\n      uVar2 = 0xfffffffe;\n    }\n    else if (uVar2 == 0xffffffff) {\n      uVar2 = 0xffffffff;\n    }" if (parenthesized_expression "(uVar2 == 0xfffffffe)" ( (binary_expression "uVar2 == 0xfffffffe" identifier == number_literal) )) (compound_statement "{\n      uVar2 = 0xfffffffe;\n    }" { (expression_statement "uVar2 = 0xfffffffe;" (assignment_expression "uVar2 = 0xfffffffe" identifier = number_literal) ;) }) (else_clause "else if (uVar2 == 0xffffffff) {\n      uVar2 = 0xffffffff;\n    }" else (if_statement "if (uVar2 == 0xffffffff) {\n      uVar2 = 0xffffffff;\n    }" if (parenthesized_expression "(uVar2 == 0xffffffff)" ( (binary_expression "uVar2 == 0xffffffff" identifier == number_literal) )) (compound_statement "{\n      uVar2 = 0xffffffff;\n    }" { (expression_statement "uVar2 = 0xffffffff;" (assignment_expression "uVar2 = 0xffffffff" identifier = number_literal) ;) })))) }) (else_clause "else {\n    uVar2 = mbrtowc((wchar_t *)0x0,param_1,__n,param_2);\n    if (uVar2 == 0xfffffffe) {\n      param_2->__count = 0;\n      uVar2 = 0xfffffffe;\n      (param_2->__value).__wch = 0;\n    }\n    else if (uVar2 == 0xffffffff) {\n      param_2->__count = 0;\n      uVar2 = 0xffffffff;\n      (param_2->__value).__wch = 0;\n    }\n  }" else (compound_statement "{\n    uVar2 = mbrtowc((wchar_t *)0x0,param_1,__n,param_2);\n    if (uVar2 == 0xfffffffe) {\n      param_2->__count = 0;\n      uVar2 = 0xfffffffe;\n      (param_2->__value).__wch = 0;\n    }\n    else if (uVar2 == 0xffffffff) {\n      param_2->__count = 0;\n      uVar2 = 0xffffffff;\n      (param_2->__value).__wch = 0;\n    }\n  }" { (expression_statement "uVar2 = mbrtowc((wchar_t *)0x0,param_1,__n,param_2);" (assignment_expression "uVar2 = mbrtowc((wchar_t *)0x0,param_1,__n,param_2)" identifier = (call_expression "mbrtowc((wchar_t *)0x0,param_1,__n,param_2)" identifier (argument_list "((wchar_t *)0x0,param_1,__n,param_2)" ( (cast_expression "(wchar_t *)0x0" ( (type_descriptor "wchar_t *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal) , identifier , identifier , identifier )))) ;) (if_statement "if (uVar2 == 0xfffffffe) {\n      param_2->__count = 0;\n      uVar2 = 0xfffffffe;\n      (param_2->__value).__wch = 0;\n    }\n    else if (uVar2 == 0xffffffff) {\n      param_2->__count = 0;\n      uVar2 = 0xffffffff;\n      (param_2->__value).__wch = 0;\n    }" if (parenthesized_expression "(uVar2 == 0xfffffffe)" ( (binary_expression "uVar2 == 0xfffffffe" identifier == number_literal) )) (compound_statement "{\n      param_2->__count = 0;\n      uVar2 = 0xfffffffe;\n      (param_2->__value).__wch = 0;\n    }" { (expression_statement "param_2->__count = 0;" (assignment_expression "param_2->__count = 0" (field_expression "param_2->__count" identifier -> field_identifier) = number_literal) ;) (expression_statement "uVar2 = 0xfffffffe;" (assignment_expression "uVar2 = 0xfffffffe" identifier = number_literal) ;) (expression_statement "(param_2->__value).__wch = 0;" (assignment_expression "(param_2->__value).__wch = 0" (field_expression "(param_2->__value).__wch" (parenthesized_expression "(param_2->__value)" ( (field_expression "param_2->__value" identifier -> field_identifier) )) . field_identifier) = number_literal) ;) }) (else_clause "else if (uVar2 == 0xffffffff) {\n      param_2->__count = 0;\n      uVar2 = 0xffffffff;\n      (param_2->__value).__wch = 0;\n    }" else (if_statement "if (uVar2 == 0xffffffff) {\n      param_2->__count = 0;\n      uVar2 = 0xffffffff;\n      (param_2->__value).__wch = 0;\n    }" if (parenthesized_expression "(uVar2 == 0xffffffff)" ( (binary_expression "uVar2 == 0xffffffff" identifier == number_literal) )) (compound_statement "{\n      param_2->__count = 0;\n      uVar2 = 0xffffffff;\n      (param_2->__value).__wch = 0;\n    }" { (expression_statement "param_2->__count = 0;" (assignment_expression "param_2->__count = 0" (field_expression "param_2->__count" identifier -> field_identifier) = number_literal) ;) (expression_statement "uVar2 = 0xffffffff;" (assignment_expression "uVar2 = 0xffffffff" identifier = number_literal) ;) (expression_statement "(param_2->__value).__wch = 0;" (assignment_expression "(param_2->__value).__wch = 0" (field_expression "(param_2->__value).__wch" (parenthesized_expression "(param_2->__value)" ( (field_expression "param_2->__value" identifier -> field_identifier) )) . field_identifier) = number_literal) ;) })))) }))) (return_statement "return uVar2;" return identifier ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE (pointer_declarator * IDENT)) , (parameter_declaration TYPE (pointer_declarator * IDENT)) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT != LIT) )) && (parenthesized_expression ( (binary_expression IDENT != LIT) ))) )) && (parenthesized_expression ( (binary_expression LIT < (pointer_expression * IDENT)) ))) )) (compound_statement { (return_statement return (call_expression (parenthesized_expression ( IDENT )) (argument_list ( (binary_expression (pointer_expression * IDENT) != (char_literal ' escape_sequence ')) ))) ;) })) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT < IDENT) )) (compound_statement { (expression_statement (assignment_expression IDENT = IDENT) ;) })) (if_statement if (parenthesized_expression ( (binary_expression IDENT == (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , IDENT , (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT) )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) }) (else_clause else (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 = (call_expression IDENT (argument_list ( (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT) , IDENT , IDENT , IDENT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (assignment_expression (field_expression IDENT -> field_identifier) = LIT) ;) (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression (field_expression (parenthesized_expression ( (field_expression IDENT -> field_identifier) )) . field_identifier) = LIT) ;) }) (else_clause else (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (assignment_expression (field_expression IDENT -> field_identifier) = LIT) ;) (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression (field_expression (parenthesized_expression ( (field_expression IDENT -> field_identifier) )) . field_identifier) = LIT) ;) })))) }))) (return_statement return IDENT ;) })))
(function_definition "uint _rl_get_char_len(char *param_1,mbstate_t *param_2)\n\n{\n  size_t sVar1;\n  size_t __n;\n  uint uVar2;\n  \n  sVar1 = strlen(param_1);\n  if (((_rl_utf8locale != 0) && (sVar1 != 0)) && (-1 < *param_1)) {\n    return (uint)(*param_1 != '\0');\n  }\n  __n = __ctype_get_mb_cur_max();\n  if (sVar1 < __n) {\n    __n = sVar1;\n  }\n  if (param_2 == (mbstate_t *)0x0) {\n    uVar2 = __mbrlen(param_1,__n,(mbstate_t *)0x0);\n    if (uVar2 == 0xfffffffe) {\n      uVar2 = 0xfffffffe;\n    }\n    else if (uVar2 == 0xffffffff) {\n      uVar2 = 0xffffffff;\n    }\n  }\n  else {\n    uVar2 = mbrtowc((wchar_t *)0x0,param_1,__n,param_2);\n    if (uVar2 == 0xfffffffe) {\n      param_2->__count = 0;\n      uVar2 = 0xfffffffe;\n      (param_2->__value).__wch = 0;\n    }\n    else if (uVar2 == 0xffffffff) {\n      param_2->__count = 0;\n      uVar2 = 0xffffffff;\n      (param_2->__value).__wch = 0;\n    }\n  }\n  return uVar2;\n}" (type_identifier "uint") (function_declarator "_rl_get_char_len(char *param_1,mbstate_t *param_2)" (identifier "_rl_get_char_len") (parameter_list "(char *param_1,mbstate_t *param_2)" (( "(") (parameter_declaration "char *param_1" (primitive_type "char") (pointer_declarator "*param_1" (* "*") (identifier "param_1"))) (, ",") (parameter_declaration "mbstate_t *param_2" (type_identifier "mbstate_t") (pointer_declarator "*param_2" (* "*") (identifier "param_2"))) () ")"))) (compound_statement "{\n  size_t sVar1;\n  size_t __n;\n  uint uVar2;\n  \n  sVar1 = strlen(param_1);\n  if (((_rl_utf8locale != 0) && (sVar1 != 0)) && (-1 < *param_1)) {\n    return (uint)(*param_1 != '\0');\n  }\n  __n = __ctype_get_mb_cur_max();\n  if (sVar1 < __n) {\n    __n = sVar1;\n  }\n  if (param_2 == (mbstate_t *)0x0) {\n    uVar2 = __mbrlen(param_1,__n,(mbstate_t *)0x0);\n    if (uVar2 == 0xfffffffe) {\n      uVar2 = 0xfffffffe;\n    }\n    else if (uVar2 == 0xffffffff) {\n      uVar2 = 0xffffffff;\n    }\n  }\n  else {\n    uVar2 = mbrtowc((wchar_t *)0x0,param_1,__n,param_2);\n    if (uVar2 == 0xfffffffe) {\n      param_2->__count = 0;\n      uVar2 = 0xfffffffe;\n      (param_2->__value).__wch = 0;\n    }\n    else if (uVar2 == 0xffffffff) {\n      param_2->__count = 0;\n      uVar2 = 0xffffffff;\n      (param_2->__value).__wch = 0;\n    }\n  }\n  return uVar2;\n}" ({ "{") (declaration "size_t sVar1;" (primitive_type "size_t") (identifier "sVar1") (; ";")) (declaration "size_t __n;" (primitive_type "size_t") (identifier "__n") (; ";")) (declaration "uint uVar2;" (type_identifier "uint") (identifier "uVar2") (; ";")) (expression_statement "sVar1 = strlen(param_1);" (assignment_expression "sVar1 = strlen(param_1)" (identifier "sVar1") (= "=") (call_expression "strlen(param_1)" (identifier "strlen") (argument_list "(param_1)" (( "(") (identifier "param_1") () ")")))) (; ";")) (if_statement "if (((_rl_utf8locale != 0) && (sVar1 != 0)) && (-1 < *param_1)) {\n    return (uint)(*param_1 != '\0');\n  }" (if "if") (parenthesized_expression "(((_rl_utf8locale != 0) && (sVar1 != 0)) && (-1 < *param_1))" (( "(") (binary_expression "((_rl_utf8locale != 0) && (sVar1 != 0)) && (-1 < *param_1)" (parenthesized_expression "((_rl_utf8locale != 0) && (sVar1 != 0))" (( "(") (binary_expression "(_rl_utf8locale != 0) && (sVar1 != 0)" (parenthesized_expression "(_rl_utf8locale != 0)" (( "(") (binary_expression "_rl_utf8locale != 0" (identifier "_rl_utf8locale") (!= "!=") (number_literal "0")) () ")")) (&& "&&") (parenthesized_expression "(sVar1 != 0)" (( "(") (binary_expression "sVar1 != 0" (identifier "sVar1") (!= "!=") (number_literal "0")) () ")"))) () ")")) (&& "&&") (parenthesized_expression "(-1 < *param_1)" (( "(") (binary_expression "-1 < *param_1" (number_literal "-1") (< "<") (pointer_expression "*param_1" (* "*") (identifier "param_1"))) () ")"))) () ")")) (compound_statement "{\n    return (uint)(*param_1 != '\0');\n  }" ({ "{") (return_statement "return (uint)(*param_1 != '\0');" (return "return") (call_expression "(uint)(*param_1 != '\0')" (parenthesized_expression "(uint)" (( "(") (identifier "uint") () ")")) (argument_list "(*param_1 != '\0')" (( "(") (binary_expression "*param_1 != '\0'" (pointer_expression "*param_1" (* "*") (identifier "param_1")) (!= "!=") (char_literal "'\0'" (' "'") (escape_sequence "\0") (' "'"))) () ")"))) (; ";")) (} "}"))) (expression_statement "__n = __ctype_get_mb_cur_max();" (assignment_expression "__n = __ctype_get_mb_cur_max()" (identifier "__n") (= "=") (call_expression "__ctype_get_mb_cur_max()" (identifier "__ctype_get_mb_cur_max") (argument_list "()" (( "(") () ")")))) (; ";")) (if_statement "if (sVar1 < __n) {\n    __n = sVar1;\n  }" (if "if") (parenthesized_expression "(sVar1 < __n)" (( "(") (binary_expression "sVar1 < __n" (identifier "sVar1") (< "<") (identifier "__n")) () ")")) (compound_statement "{\n    __n = sVar1;\n  }" ({ "{") (expression_statement "__n = sVar1;" (assignment_expression "__n = sVar1" (identifier "__n") (= "=") (identifier "sVar1")) (; ";")) (} "}"))) (if_statement "if (param_2 == (mbstate_t *)0x0) {\n    uVar2 = __mbrlen(param_1,__n,(mbstate_t *)0x0);\n    if (uVar2 == 0xfffffffe) {\n      uVar2 = 0xfffffffe;\n    }\n    else if (uVar2 == 0xffffffff) {\n      uVar2 = 0xffffffff;\n    }\n  }\n  else {\n    uVar2 = mbrtowc((wchar_t *)0x0,param_1,__n,param_2);\n    if (uVar2 == 0xfffffffe) {\n      param_2->__count = 0;\n      uVar2 = 0xfffffffe;\n      (param_2->__value).__wch = 0;\n    }\n    else if (uVar2 == 0xffffffff) {\n      param_2->__count = 0;\n      uVar2 = 0xffffffff;\n      (param_2->__value).__wch = 0;\n    }\n  }" (if "if") (parenthesized_expression "(param_2 == (mbstate_t *)0x0)" (( "(") (binary_expression "param_2 == (mbstate_t *)0x0" (identifier "param_2") (== "==") (cast_expression "(mbstate_t *)0x0" (( "(") (type_descriptor "mbstate_t *" (type_identifier "mbstate_t") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\n    uVar2 = __mbrlen(param_1,__n,(mbstate_t *)0x0);\n    if (uVar2 == 0xfffffffe) {\n      uVar2 = 0xfffffffe;\n    }\n    else if (uVar2 == 0xffffffff) {\n      uVar2 = 0xffffffff;\n    }\n  }" ({ "{") (expression_statement "uVar2 = __mbrlen(param_1,__n,(mbstate_t *)0x0);" (assignment_expression "uVar2 = __mbrlen(param_1,__n,(mbstate_t *)0x0)" (identifier "uVar2") (= "=") (call_expression "__mbrlen(param_1,__n,(mbstate_t *)0x0)" (identifier "__mbrlen") (argument_list "(param_1,__n,(mbstate_t *)0x0)" (( "(") (identifier "param_1") (, ",") (identifier "__n") (, ",") (cast_expression "(mbstate_t *)0x0" (( "(") (type_descriptor "mbstate_t *" (type_identifier "mbstate_t") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0")) () ")")))) (; ";")) (if_statement "if (uVar2 == 0xfffffffe) {\n      uVar2 = 0xfffffffe;\n    }\n    else if (uVar2 == 0xffffffff) {\n      uVar2 = 0xffffffff;\n    }" (if "if") (parenthesized_expression "(uVar2 == 0xfffffffe)" (( "(") (binary_expression "uVar2 == 0xfffffffe" (identifier "uVar2") (== "==") (number_literal "0xfffffffe")) () ")")) (compound_statement "{\n      uVar2 = 0xfffffffe;\n    }" ({ "{") (expression_statement "uVar2 = 0xfffffffe;" (assignment_expression "uVar2 = 0xfffffffe" (identifier "uVar2") (= "=") (number_literal "0xfffffffe")) (; ";")) (} "}")) (else_clause "else if (uVar2 == 0xffffffff) {\n      uVar2 = 0xffffffff;\n    }" (else "else") (if_statement "if (uVar2 == 0xffffffff) {\n      uVar2 = 0xffffffff;\n    }" (if "if") (parenthesized_expression "(uVar2 == 0xffffffff)" (( "(") (binary_expression "uVar2 == 0xffffffff" (identifier "uVar2") (== "==") (number_literal "0xffffffff")) () ")")) (compound_statement "{\n      uVar2 = 0xffffffff;\n    }" ({ "{") (expression_statement "uVar2 = 0xffffffff;" (assignment_expression "uVar2 = 0xffffffff" (identifier "uVar2") (= "=") (number_literal "0xffffffff")) (; ";")) (} "}"))))) (} "}")) (else_clause "else {\n    uVar2 = mbrtowc((wchar_t *)0x0,param_1,__n,param_2);\n    if (uVar2 == 0xfffffffe) {\n      param_2->__count = 0;\n      uVar2 = 0xfffffffe;\n      (param_2->__value).__wch = 0;\n    }\n    else if (uVar2 == 0xffffffff) {\n      param_2->__count = 0;\n      uVar2 = 0xffffffff;\n      (param_2->__value).__wch = 0;\n    }\n  }" (else "else") (compound_statement "{\n    uVar2 = mbrtowc((wchar_t *)0x0,param_1,__n,param_2);\n    if (uVar2 == 0xfffffffe) {\n      param_2->__count = 0;\n      uVar2 = 0xfffffffe;\n      (param_2->__value).__wch = 0;\n    }\n    else if (uVar2 == 0xffffffff) {\n      param_2->__count = 0;\n      uVar2 = 0xffffffff;\n      (param_2->__value).__wch = 0;\n    }\n  }" ({ "{") (expression_statement "uVar2 = mbrtowc((wchar_t *)0x0,param_1,__n,param_2);" (assignment_expression "uVar2 = mbrtowc((wchar_t *)0x0,param_1,__n,param_2)" (identifier "uVar2") (= "=") (call_expression "mbrtowc((wchar_t *)0x0,param_1,__n,param_2)" (identifier "mbrtowc") (argument_list "((wchar_t *)0x0,param_1,__n,param_2)" (( "(") (cast_expression "(wchar_t *)0x0" (( "(") (type_descriptor "wchar_t *" (type_identifier "wchar_t") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0")) (, ",") (identifier "param_1") (, ",") (identifier "__n") (, ",") (identifier "param_2") () ")")))) (; ";")) (if_statement "if (uVar2 == 0xfffffffe) {\n      param_2->__count = 0;\n      uVar2 = 0xfffffffe;\n      (param_2->__value).__wch = 0;\n    }\n    else if (uVar2 == 0xffffffff) {\n      param_2->__count = 0;\n      uVar2 = 0xffffffff;\n      (param_2->__value).__wch = 0;\n    }" (if "if") (parenthesized_expression "(uVar2 == 0xfffffffe)" (( "(") (binary_expression "uVar2 == 0xfffffffe" (identifier "uVar2") (== "==") (number_literal "0xfffffffe")) () ")")) (compound_statement "{\n      param_2->__count = 0;\n      uVar2 = 0xfffffffe;\n      (param_2->__value).__wch = 0;\n    }" ({ "{") (expression_statement "param_2->__count = 0;" (assignment_expression "param_2->__count = 0" (field_expression "param_2->__count" (identifier "param_2") (-> "->") (field_identifier "__count")) (= "=") (number_literal "0")) (; ";")) (expression_statement "uVar2 = 0xfffffffe;" (assignment_expression "uVar2 = 0xfffffffe" (identifier "uVar2") (= "=") (number_literal "0xfffffffe")) (; ";")) (expression_statement "(param_2->__value).__wch = 0;" (assignment_expression "(param_2->__value).__wch = 0" (field_expression "(param_2->__value).__wch" (parenthesized_expression "(param_2->__value)" (( "(") (field_expression "param_2->__value" (identifier "param_2") (-> "->") (field_identifier "__value")) () ")")) (. ".") (field_identifier "__wch")) (= "=") (number_literal "0")) (; ";")) (} "}")) (else_clause "else if (uVar2 == 0xffffffff) {\n      param_2->__count = 0;\n      uVar2 = 0xffffffff;\n      (param_2->__value).__wch = 0;\n    }" (else "else") (if_statement "if (uVar2 == 0xffffffff) {\n      param_2->__count = 0;\n      uVar2 = 0xffffffff;\n      (param_2->__value).__wch = 0;\n    }" (if "if") (parenthesized_expression "(uVar2 == 0xffffffff)" (( "(") (binary_expression "uVar2 == 0xffffffff" (identifier "uVar2") (== "==") (number_literal "0xffffffff")) () ")")) (compound_statement "{\n      param_2->__count = 0;\n      uVar2 = 0xffffffff;\n      (param_2->__value).__wch = 0;\n    }" ({ "{") (expression_statement "param_2->__count = 0;" (assignment_expression "param_2->__count = 0" (field_expression "param_2->__count" (identifier "param_2") (-> "->") (field_identifier "__count")) (= "=") (number_literal "0")) (; ";")) (expression_statement "uVar2 = 0xffffffff;" (assignment_expression "uVar2 = 0xffffffff" (identifier "uVar2") (= "=") (number_literal "0xffffffff")) (; ";")) (expression_statement "(param_2->__value).__wch = 0;" (assignment_expression "(param_2->__value).__wch = 0" (field_expression "(param_2->__value).__wch" (parenthesized_expression "(param_2->__value)" (( "(") (field_expression "param_2->__value" (identifier "param_2") (-> "->") (field_identifier "__value")) () ")")) (. ".") (field_identifier "__wch")) (= "=") (number_literal "0")) (; ";")) (} "}"))))) (} "}")))) (return_statement "return uVar2;" (return "return") (identifier "uVar2") (; ";")) (} "}")))

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

int function_1(char *src,type_1 *var_6)

{
  size_t var_3;
  size_t var_5;
  
  var_3 = var_1(src);
  if (((var_2 != 0) && (var_3 != 0)) && (-1 < *src)) {
    return (uint)(*src != '\0');
  }
  var_5 = var_4();
  if (var_3 < var_5) {
    var_5 = var_3;
  }
  if (var_6 == (type_1 *)0x0) {
    var_3 = var_7(src,var_5,(type_1 *)0x0);
    if (var_3 == 0xfffffffe) {
      var_3 = 0xfffffffe;
    }
    else if (var_3 == 0xffffffff) {
      var_3 = 0xffffffff;
    }
  }
  else {
    var_3 = var_8((type_2 *)0x0,src,var_5,(type_1 *)var_6);
    if (var_3 == 0xfffffffe) {
      var_6->__count = 0;
      var_3 = 0xfffffffe;
      (var_6->__value).__wch = 0;
    }
    else if (var_3 == 0xffffffff) {
      var_6->__count = 0;
      var_3 = 0xffffffff;
      (var_6->__value).__wch = 0;
    }
  }
  return var_3;
}


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

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

uint MASKED(char *param_1,mbstate_t *param_2)

{
  size_t sVar1;
  size_t __n;
  uint uVar2;
  
  sVar1 = strlen(param_1);
  if (((_rl_utf8locale != 0) && (sVar1 != 0)) && (-1 < *param_1)) {
    return (uint)(*param_1 != '\0');
  }
  __n = __ctype_get_mb_cur_max();
  if (sVar1 < __n) {
    __n = sVar1;
  }
  if (param_2 == (mbstate_t *)0x0) {
    uVar2 = __mbrlen(param_1,__n,(mbstate_t *)0x0);
    if (uVar2 == 0xfffffffe) {
      uVar2 = 0xfffffffe;
    }
    else if (uVar2 == 0xffffffff) {
      uVar2 = 0xffffffff;
    }
  }
  else {
    uVar2 = mbrtowc((wchar_t *)0x0,param_1,__n,param_2);
    if (uVar2 == 0xfffffffe) {
      param_2->__count = 0;
      uVar2 = 0xfffffffe;
      (param_2->__value).__wch = 0;
    }
    else if (uVar2 == 0xffffffff) {
      param_2->__count = 0;
      uVar2 = 0xffffffff;
      (param_2->__value).__wch = 0;
    }
  }
  return uVar2;
}

