
int GetNextUTFCode(char *text,uint *octets)

{
  uint *puVar1;
  int iVar2;
  byte *pbVar3;
  int *piVar4;
  uint uVar5;
  int iVar6;
  uint uVar7;
  uint *puVar8;
  uint *puVar9;
  int unaff_EDI;
  undefined8 uVar10;
  
  uVar10 = __x86_get_pc_thunk_di();
  piVar4 = (int *)((ulonglong)uVar10 >> 0x20);
  pbVar3 = (byte *)uVar10;
  *piVar4 = 1;
  if (pbVar3 == (byte *)0x0) {
    piVar4 = __errno_location();
    *piVar4 = 0x16;
  }
  else {
    uVar7 = (uint)*pbVar3;
    iVar6 = 0;
    uVar5 = uVar7;
    puVar8 = (uint *)(unaff_EDI + 0x129c69);
    if ((*pbVar3 & 0x80) != 0) {
      do {
        iVar2 = iVar6 + 1;
        if ((((pbVar3[iVar2] ^ 0x80) & 0xc0) != 0) || (0x10ffff < (int)uVar5)) goto LAB_0019fbb8;
        iVar6 = iVar6 + 1;
        puVar9 = puVar8 + 4;
        uVar5 = uVar5 << 6 | (uint)(pbVar3[iVar2] ^ 0x80);
        if (iVar6 == 6) goto LAB_0019fbb8;
        puVar1 = puVar8 + 5;
        puVar8 = puVar9;
      } while ((*puVar9 & uVar7) != *puVar1);
    }
    iVar2 = unaff_EDI + 0x129c69 + iVar6 * 0x10;
    uVar5 = *(uint *)(iVar2 + 8) & uVar5;
    if (*(int *)(iVar2 + 0xc) <= (int)uVar5) {
      *piVar4 = iVar6 + 1;
      return uVar5;
    }
LAB_0019fbb8:
    piVar4 = __errno_location();
    *piVar4 = 0x54;
  }
  return -1;
}



uint FUN_0019fb10(void)

{
  uint *puVar1;
  int iVar2;
  byte *pbVar3;
  int *piVar4;
  uint uVar5;
  int iVar6;
  uint uVar7;
  uint *puVar8;
  uint *puVar9;
  int unaff_EDI;
  undefined8 uVar10;
  
  uVar10 = FUN_0004c803();
  piVar4 = (int *)((ulonglong)uVar10 >> 0x20);
  pbVar3 = (byte *)uVar10;
  *piVar4 = 1;
  if (pbVar3 == (byte *)0x0) {
    piVar4 = __errno_location();
    *piVar4 = 0x16;
  }
  else {
    uVar7 = (uint)*pbVar3;
    iVar6 = 0;
    uVar5 = uVar7;
    puVar8 = (uint *)(unaff_EDI + 0x129c69);
    if ((*pbVar3 & 0x80) != 0) {
      do {
        iVar2 = iVar6 + 1;
        if ((((pbVar3[iVar2] ^ 0x80) & 0xc0) != 0) || (0x10ffff < (int)uVar5)) goto LAB_0019fbb8;
        iVar6 = iVar6 + 1;
        puVar9 = puVar8 + 4;
        uVar5 = uVar5 << 6 | (uint)(pbVar3[iVar2] ^ 0x80);
        if (iVar6 == 6) goto LAB_0019fbb8;
        puVar1 = puVar8 + 5;
        puVar8 = puVar9;
      } while ((*puVar9 & uVar7) != *puVar1);
    }
    iVar2 = unaff_EDI + 0x129c69 + iVar6 * 0x10;
    uVar5 = *(uint *)(iVar2 + 8) & uVar5;
    if (*(int *)(iVar2 + 0xc) <= (int)uVar5) {
      *piVar4 = iVar6 + 1;
      return uVar5;
    }
LAB_0019fbb8:
    piVar4 = __errno_location();
    *piVar4 = 0x54;
  }
  return 0xffffffff;
}


PUSH EBP
PUSH EDI
CALL 0x0004c803
ADD EDI,0x2394e9
PUSH ESI
PUSH EBX
SUB ESP,0x1c
MOV dword ptr [EDX],0x1
MOV dword ptr [ESP + 0xc],EDX
MOV dword ptr [ESP + 0x8],EDI
MOV EDI,EAX
TEST EAX,EAX
JZ 0x0019fbd4
MOVZX EBP,byte ptr [EAX]
MOV ECX,0x80
XOR EBX,EBX
MOV EAX,dword ptr [ESP + 0x8]
AND ECX,EBP
MOV EDX,EBP
LEA ESI,[EAX + 0xffef0780]
XOR EAX,EAX
CMP ECX,EAX
JZ 0x0019fb89
MOVSX EAX,byte ptr [EDI + EBX*0x1 + 0x1]
XOR AL,0x80
MOVZX ECX,AL
TEST AL,0xc0
JNZ 0x0019fbb8
CMP EDX,0x10ffff
JG 0x0019fbb8
SHL EDX,0x6
ADD EBX,0x1
ADD ESI,0x10
OR EDX,ECX
CMP EBX,0x6
JZ 0x0019fbb8
MOV ECX,dword ptr [ESI]
MOV EAX,dword ptr [ESI + 0x4]
AND ECX,EBP
CMP ECX,EAX
JNZ 0x0019fb58
MOV EDI,dword ptr [ESP + 0x8]
MOV EAX,EBX
SHL EAX,0x4
LEA ECX,[EDI + EAX*0x1 + 0xffef0780]
MOV EAX,dword ptr [ECX + 0x8]
AND EAX,EDX
CMP dword ptr [ECX + 0xc],EAX
JG 0x0019fbb8
MOV EDI,dword ptr [ESP + 0xc]
ADD EBX,0x1
MOV dword ptr [EDI],EBX
ADD ESP,0x1c
POP EBX
POP ESI
POP EDI
POP EBP
RET
MOV EBX,dword ptr [ESP + 0x8]
CALL 0x000305f0
MOV dword ptr [EAX],0x54
MOV EAX,0xffffffff
ADD ESP,0x1c
POP EBX
POP ESI
POP EDI
POP EBP
RET
MOV EBX,dword ptr [ESP + 0x8]
CALL 0x000305f0
MOV dword ptr [EAX],0x16
MOV EAX,0xffffffff
JMP 0x0019fbcc
(translation_unit "uint FUN_0019fb10(void)\n\n{\n  uint *puVar1;\n  int iVar2;\n  byte *pbVar3;\n  int *piVar4;\n  uint uVar5;\n  int iVar6;\n  uint uVar7;\n  uint *puVar8;\n  uint *puVar9;\n  int unaff_EDI;\n  undefined8 uVar10;\n  \n  uVar10 = FUN_0004c803();\n  piVar4 = (int *)((ulonglong)uVar10 >> 0x20);\n  pbVar3 = (byte *)uVar10;\n  *piVar4 = 1;\n  if (pbVar3 == (byte *)0x0) {\n    piVar4 = __errno_location();\n    *piVar4 = 0x16;\n  }\n  else {\n    uVar7 = (uint)*pbVar3;\n    iVar6 = 0;\n    uVar5 = uVar7;\n    puVar8 = (uint *)(unaff_EDI + 0x129c69);\n    if ((*pbVar3 & 0x80) != 0) {\n      do {\n        iVar2 = iVar6 + 1;\n        if ((((pbVar3[iVar2] ^ 0x80) & 0xc0) != 0) || (0x10ffff < (int)uVar5)) goto LAB_0019fbb8;\n        iVar6 = iVar6 + 1;\n        puVar9 = puVar8 + 4;\n        uVar5 = uVar5 << 6 | (uint)(pbVar3[iVar2] ^ 0x80);\n        if (iVar6 == 6) goto LAB_0019fbb8;\n        puVar1 = puVar8 + 5;\n        puVar8 = puVar9;\n      } while ((*puVar9 & uVar7) != *puVar1);\n    }\n    iVar2 = unaff_EDI + 0x129c69 + iVar6 * 0x10;\n    uVar5 = *(uint *)(iVar2 + 8) & uVar5;\n    if (*(int *)(iVar2 + 0xc) <= (int)uVar5) {\n      *piVar4 = iVar6 + 1;\n      return uVar5;\n    }\nLAB_0019fbb8:\n    piVar4 = __errno_location();\n    *piVar4 = 0x54;\n  }\n  return 0xffffffff;\n}\n\n" (function_definition "uint FUN_0019fb10(void)\n\n{\n  uint *puVar1;\n  int iVar2;\n  byte *pbVar3;\n  int *piVar4;\n  uint uVar5;\n  int iVar6;\n  uint uVar7;\n  uint *puVar8;\n  uint *puVar9;\n  int unaff_EDI;\n  undefined8 uVar10;\n  \n  uVar10 = FUN_0004c803();\n  piVar4 = (int *)((ulonglong)uVar10 >> 0x20);\n  pbVar3 = (byte *)uVar10;\n  *piVar4 = 1;\n  if (pbVar3 == (byte *)0x0) {\n    piVar4 = __errno_location();\n    *piVar4 = 0x16;\n  }\n  else {\n    uVar7 = (uint)*pbVar3;\n    iVar6 = 0;\n    uVar5 = uVar7;\n    puVar8 = (uint *)(unaff_EDI + 0x129c69);\n    if ((*pbVar3 & 0x80) != 0) {\n      do {\n        iVar2 = iVar6 + 1;\n        if ((((pbVar3[iVar2] ^ 0x80) & 0xc0) != 0) || (0x10ffff < (int)uVar5)) goto LAB_0019fbb8;\n        iVar6 = iVar6 + 1;\n        puVar9 = puVar8 + 4;\n        uVar5 = uVar5 << 6 | (uint)(pbVar3[iVar2] ^ 0x80);\n        if (iVar6 == 6) goto LAB_0019fbb8;\n        puVar1 = puVar8 + 5;\n        puVar8 = puVar9;\n      } while ((*puVar9 & uVar7) != *puVar1);\n    }\n    iVar2 = unaff_EDI + 0x129c69 + iVar6 * 0x10;\n    uVar5 = *(uint *)(iVar2 + 8) & uVar5;\n    if (*(int *)(iVar2 + 0xc) <= (int)uVar5) {\n      *piVar4 = iVar6 + 1;\n      return uVar5;\n    }\nLAB_0019fbb8:\n    piVar4 = __errno_location();\n    *piVar4 = 0x54;\n  }\n  return 0xffffffff;\n}" type_identifier (function_declarator "FUN_0019fb10(void)" identifier (parameter_list "(void)" ( (parameter_declaration "void" primitive_type) ))) (compound_statement "{\n  uint *puVar1;\n  int iVar2;\n  byte *pbVar3;\n  int *piVar4;\n  uint uVar5;\n  int iVar6;\n  uint uVar7;\n  uint *puVar8;\n  uint *puVar9;\n  int unaff_EDI;\n  undefined8 uVar10;\n  \n  uVar10 = FUN_0004c803();\n  piVar4 = (int *)((ulonglong)uVar10 >> 0x20);\n  pbVar3 = (byte *)uVar10;\n  *piVar4 = 1;\n  if (pbVar3 == (byte *)0x0) {\n    piVar4 = __errno_location();\n    *piVar4 = 0x16;\n  }\n  else {\n    uVar7 = (uint)*pbVar3;\n    iVar6 = 0;\n    uVar5 = uVar7;\n    puVar8 = (uint *)(unaff_EDI + 0x129c69);\n    if ((*pbVar3 & 0x80) != 0) {\n      do {\n        iVar2 = iVar6 + 1;\n        if ((((pbVar3[iVar2] ^ 0x80) & 0xc0) != 0) || (0x10ffff < (int)uVar5)) goto LAB_0019fbb8;\n        iVar6 = iVar6 + 1;\n        puVar9 = puVar8 + 4;\n        uVar5 = uVar5 << 6 | (uint)(pbVar3[iVar2] ^ 0x80);\n        if (iVar6 == 6) goto LAB_0019fbb8;\n        puVar1 = puVar8 + 5;\n        puVar8 = puVar9;\n      } while ((*puVar9 & uVar7) != *puVar1);\n    }\n    iVar2 = unaff_EDI + 0x129c69 + iVar6 * 0x10;\n    uVar5 = *(uint *)(iVar2 + 8) & uVar5;\n    if (*(int *)(iVar2 + 0xc) <= (int)uVar5) {\n      *piVar4 = iVar6 + 1;\n      return uVar5;\n    }\nLAB_0019fbb8:\n    piVar4 = __errno_location();\n    *piVar4 = 0x54;\n  }\n  return 0xffffffff;\n}" { (declaration "uint *puVar1;" type_identifier (pointer_declarator "*puVar1" * identifier) ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "byte *pbVar3;" type_identifier (pointer_declarator "*pbVar3" * identifier) ;) (declaration "int *piVar4;" primitive_type (pointer_declarator "*piVar4" * identifier) ;) (declaration "uint uVar5;" type_identifier identifier ;) (declaration "int iVar6;" primitive_type identifier ;) (declaration "uint uVar7;" type_identifier identifier ;) (declaration "uint *puVar8;" type_identifier (pointer_declarator "*puVar8" * identifier) ;) (declaration "uint *puVar9;" type_identifier (pointer_declarator "*puVar9" * identifier) ;) (declaration "int unaff_EDI;" primitive_type identifier ;) (declaration "undefined8 uVar10;" type_identifier identifier ;) (expression_statement "uVar10 = FUN_0004c803();" (assignment_expression "uVar10 = FUN_0004c803()" identifier = (call_expression "FUN_0004c803()" identifier (argument_list "()" ( )))) ;) (expression_statement "piVar4 = (int *)((ulonglong)uVar10 >> 0x20);" (assignment_expression "piVar4 = (int *)((ulonglong)uVar10 >> 0x20)" identifier = (cast_expression "(int *)((ulonglong)uVar10 >> 0x20)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((ulonglong)uVar10 >> 0x20)" ( (binary_expression "(ulonglong)uVar10 >> 0x20" (cast_expression "(ulonglong)uVar10" ( (type_descriptor "ulonglong" type_identifier) ) identifier) >> number_literal) )))) ;) (expression_statement "pbVar3 = (byte *)uVar10;" (assignment_expression "pbVar3 = (byte *)uVar10" identifier = (cast_expression "(byte *)uVar10" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) ;) (expression_statement "*piVar4 = 1;" (assignment_expression "*piVar4 = 1" (pointer_expression "*piVar4" * identifier) = number_literal) ;) (if_statement "if (pbVar3 == (byte *)0x0) {\n    piVar4 = __errno_location();\n    *piVar4 = 0x16;\n  }\n  else {\n    uVar7 = (uint)*pbVar3;\n    iVar6 = 0;\n    uVar5 = uVar7;\n    puVar8 = (uint *)(unaff_EDI + 0x129c69);\n    if ((*pbVar3 & 0x80) != 0) {\n      do {\n        iVar2 = iVar6 + 1;\n        if ((((pbVar3[iVar2] ^ 0x80) & 0xc0) != 0) || (0x10ffff < (int)uVar5)) goto LAB_0019fbb8;\n        iVar6 = iVar6 + 1;\n        puVar9 = puVar8 + 4;\n        uVar5 = uVar5 << 6 | (uint)(pbVar3[iVar2] ^ 0x80);\n        if (iVar6 == 6) goto LAB_0019fbb8;\n        puVar1 = puVar8 + 5;\n        puVar8 = puVar9;\n      } while ((*puVar9 & uVar7) != *puVar1);\n    }\n    iVar2 = unaff_EDI + 0x129c69 + iVar6 * 0x10;\n    uVar5 = *(uint *)(iVar2 + 8) & uVar5;\n    if (*(int *)(iVar2 + 0xc) <= (int)uVar5) {\n      *piVar4 = iVar6 + 1;\n      return uVar5;\n    }\nLAB_0019fbb8:\n    piVar4 = __errno_location();\n    *piVar4 = 0x54;\n  }" if (parenthesized_expression "(pbVar3 == (byte *)0x0)" ( (binary_expression "pbVar3 == (byte *)0x0" identifier == (cast_expression "(byte *)0x0" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    piVar4 = __errno_location();\n    *piVar4 = 0x16;\n  }" { (expression_statement "piVar4 = __errno_location();" (assignment_expression "piVar4 = __errno_location()" identifier = (call_expression "__errno_location()" identifier (argument_list "()" ( )))) ;) (expression_statement "*piVar4 = 0x16;" (assignment_expression "*piVar4 = 0x16" (pointer_expression "*piVar4" * identifier) = number_literal) ;) }) (else_clause "else {\n    uVar7 = (uint)*pbVar3;\n    iVar6 = 0;\n    uVar5 = uVar7;\n    puVar8 = (uint *)(unaff_EDI + 0x129c69);\n    if ((*pbVar3 & 0x80) != 0) {\n      do {\n        iVar2 = iVar6 + 1;\n        if ((((pbVar3[iVar2] ^ 0x80) & 0xc0) != 0) || (0x10ffff < (int)uVar5)) goto LAB_0019fbb8;\n        iVar6 = iVar6 + 1;\n        puVar9 = puVar8 + 4;\n        uVar5 = uVar5 << 6 | (uint)(pbVar3[iVar2] ^ 0x80);\n        if (iVar6 == 6) goto LAB_0019fbb8;\n        puVar1 = puVar8 + 5;\n        puVar8 = puVar9;\n      } while ((*puVar9 & uVar7) != *puVar1);\n    }\n    iVar2 = unaff_EDI + 0x129c69 + iVar6 * 0x10;\n    uVar5 = *(uint *)(iVar2 + 8) & uVar5;\n    if (*(int *)(iVar2 + 0xc) <= (int)uVar5) {\n      *piVar4 = iVar6 + 1;\n      return uVar5;\n    }\nLAB_0019fbb8:\n    piVar4 = __errno_location();\n    *piVar4 = 0x54;\n  }" else (compound_statement "{\n    uVar7 = (uint)*pbVar3;\n    iVar6 = 0;\n    uVar5 = uVar7;\n    puVar8 = (uint *)(unaff_EDI + 0x129c69);\n    if ((*pbVar3 & 0x80) != 0) {\n      do {\n        iVar2 = iVar6 + 1;\n        if ((((pbVar3[iVar2] ^ 0x80) & 0xc0) != 0) || (0x10ffff < (int)uVar5)) goto LAB_0019fbb8;\n        iVar6 = iVar6 + 1;\n        puVar9 = puVar8 + 4;\n        uVar5 = uVar5 << 6 | (uint)(pbVar3[iVar2] ^ 0x80);\n        if (iVar6 == 6) goto LAB_0019fbb8;\n        puVar1 = puVar8 + 5;\n        puVar8 = puVar9;\n      } while ((*puVar9 & uVar7) != *puVar1);\n    }\n    iVar2 = unaff_EDI + 0x129c69 + iVar6 * 0x10;\n    uVar5 = *(uint *)(iVar2 + 8) & uVar5;\n    if (*(int *)(iVar2 + 0xc) <= (int)uVar5) {\n      *piVar4 = iVar6 + 1;\n      return uVar5;\n    }\nLAB_0019fbb8:\n    piVar4 = __errno_location();\n    *piVar4 = 0x54;\n  }" { (expression_statement "uVar7 = (uint)*pbVar3;" (assignment_expression "uVar7 = (uint)*pbVar3" identifier = (binary_expression "(uint)*pbVar3" (parenthesized_expression "(uint)" ( identifier )) * identifier)) ;) (expression_statement "iVar6 = 0;" (assignment_expression "iVar6 = 0" identifier = number_literal) ;) (expression_statement "uVar5 = uVar7;" (assignment_expression "uVar5 = uVar7" identifier = identifier) ;) (expression_statement "puVar8 = (uint *)(unaff_EDI + 0x129c69);" (assignment_expression "puVar8 = (uint *)(unaff_EDI + 0x129c69)" identifier = (cast_expression "(uint *)(unaff_EDI + 0x129c69)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(unaff_EDI + 0x129c69)" ( (binary_expression "unaff_EDI + 0x129c69" identifier + number_literal) )))) ;) (if_statement "if ((*pbVar3 & 0x80) != 0) {\n      do {\n        iVar2 = iVar6 + 1;\n        if ((((pbVar3[iVar2] ^ 0x80) & 0xc0) != 0) || (0x10ffff < (int)uVar5)) goto LAB_0019fbb8;\n        iVar6 = iVar6 + 1;\n        puVar9 = puVar8 + 4;\n        uVar5 = uVar5 << 6 | (uint)(pbVar3[iVar2] ^ 0x80);\n        if (iVar6 == 6) goto LAB_0019fbb8;\n        puVar1 = puVar8 + 5;\n        puVar8 = puVar9;\n      } while ((*puVar9 & uVar7) != *puVar1);\n    }" if (parenthesized_expression "((*pbVar3 & 0x80) != 0)" ( (binary_expression "(*pbVar3 & 0x80) != 0" (parenthesized_expression "(*pbVar3 & 0x80)" ( (binary_expression "*pbVar3 & 0x80" (pointer_expression "*pbVar3" * identifier) & number_literal) )) != number_literal) )) (compound_statement "{\n      do {\n        iVar2 = iVar6 + 1;\n        if ((((pbVar3[iVar2] ^ 0x80) & 0xc0) != 0) || (0x10ffff < (int)uVar5)) goto LAB_0019fbb8;\n        iVar6 = iVar6 + 1;\n        puVar9 = puVar8 + 4;\n        uVar5 = uVar5 << 6 | (uint)(pbVar3[iVar2] ^ 0x80);\n        if (iVar6 == 6) goto LAB_0019fbb8;\n        puVar1 = puVar8 + 5;\n        puVar8 = puVar9;\n      } while ((*puVar9 & uVar7) != *puVar1);\n    }" { (do_statement "do {\n        iVar2 = iVar6 + 1;\n        if ((((pbVar3[iVar2] ^ 0x80) & 0xc0) != 0) || (0x10ffff < (int)uVar5)) goto LAB_0019fbb8;\n        iVar6 = iVar6 + 1;\n        puVar9 = puVar8 + 4;\n        uVar5 = uVar5 << 6 | (uint)(pbVar3[iVar2] ^ 0x80);\n        if (iVar6 == 6) goto LAB_0019fbb8;\n        puVar1 = puVar8 + 5;\n        puVar8 = puVar9;\n      } while ((*puVar9 & uVar7) != *puVar1);" do (compound_statement "{\n        iVar2 = iVar6 + 1;\n        if ((((pbVar3[iVar2] ^ 0x80) & 0xc0) != 0) || (0x10ffff < (int)uVar5)) goto LAB_0019fbb8;\n        iVar6 = iVar6 + 1;\n        puVar9 = puVar8 + 4;\n        uVar5 = uVar5 << 6 | (uint)(pbVar3[iVar2] ^ 0x80);\n        if (iVar6 == 6) goto LAB_0019fbb8;\n        puVar1 = puVar8 + 5;\n        puVar8 = puVar9;\n      }" { (expression_statement "iVar2 = iVar6 + 1;" (assignment_expression "iVar2 = iVar6 + 1" identifier = (binary_expression "iVar6 + 1" identifier + number_literal)) ;) (if_statement "if ((((pbVar3[iVar2] ^ 0x80) & 0xc0) != 0) || (0x10ffff < (int)uVar5)) goto LAB_0019fbb8;" if (parenthesized_expression "((((pbVar3[iVar2] ^ 0x80) & 0xc0) != 0) || (0x10ffff < (int)uVar5))" ( (binary_expression "(((pbVar3[iVar2] ^ 0x80) & 0xc0) != 0) || (0x10ffff < (int)uVar5)" (parenthesized_expression "(((pbVar3[iVar2] ^ 0x80) & 0xc0) != 0)" ( (binary_expression "((pbVar3[iVar2] ^ 0x80) & 0xc0) != 0" (parenthesized_expression "((pbVar3[iVar2] ^ 0x80) & 0xc0)" ( (binary_expression "(pbVar3[iVar2] ^ 0x80) & 0xc0" (parenthesized_expression "(pbVar3[iVar2] ^ 0x80)" ( (binary_expression "pbVar3[iVar2] ^ 0x80" (subscript_expression "pbVar3[iVar2]" identifier [ identifier ]) ^ number_literal) )) & number_literal) )) != number_literal) )) || (parenthesized_expression "(0x10ffff < (int)uVar5)" ( (binary_expression "0x10ffff < (int)uVar5" number_literal < (cast_expression "(int)uVar5" ( (type_descriptor "int" primitive_type) ) identifier)) ))) )) (goto_statement "goto LAB_0019fbb8;" goto statement_identifier ;)) (expression_statement "iVar6 = iVar6 + 1;" (assignment_expression "iVar6 = iVar6 + 1" identifier = (binary_expression "iVar6 + 1" identifier + number_literal)) ;) (expression_statement "puVar9 = puVar8 + 4;" (assignment_expression "puVar9 = puVar8 + 4" identifier = (binary_expression "puVar8 + 4" identifier + number_literal)) ;) (expression_statement "uVar5 = uVar5 << 6 | (uint)(pbVar3[iVar2] ^ 0x80);" (assignment_expression "uVar5 = uVar5 << 6 | (uint)(pbVar3[iVar2] ^ 0x80)" identifier = (binary_expression "uVar5 << 6 | (uint)(pbVar3[iVar2] ^ 0x80)" (binary_expression "uVar5 << 6" identifier << number_literal) | (call_expression "(uint)(pbVar3[iVar2] ^ 0x80)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(pbVar3[iVar2] ^ 0x80)" ( (binary_expression "pbVar3[iVar2] ^ 0x80" (subscript_expression "pbVar3[iVar2]" identifier [ identifier ]) ^ number_literal) ))))) ;) (if_statement "if (iVar6 == 6) goto LAB_0019fbb8;" if (parenthesized_expression "(iVar6 == 6)" ( (binary_expression "iVar6 == 6" identifier == number_literal) )) (goto_statement "goto LAB_0019fbb8;" goto statement_identifier ;)) (expression_statement "puVar1 = puVar8 + 5;" (assignment_expression "puVar1 = puVar8 + 5" identifier = (binary_expression "puVar8 + 5" identifier + number_literal)) ;) (expression_statement "puVar8 = puVar9;" (assignment_expression "puVar8 = puVar9" identifier = identifier) ;) }) while (parenthesized_expression "((*puVar9 & uVar7) != *puVar1)" ( (binary_expression "(*puVar9 & uVar7) != *puVar1" (parenthesized_expression "(*puVar9 & uVar7)" ( (binary_expression "*puVar9 & uVar7" (pointer_expression "*puVar9" * identifier) & identifier) )) != (pointer_expression "*puVar1" * identifier)) )) ;) })) (expression_statement "iVar2 = unaff_EDI + 0x129c69 + iVar6 * 0x10;" (assignment_expression "iVar2 = unaff_EDI + 0x129c69 + iVar6 * 0x10" identifier = (binary_expression "unaff_EDI + 0x129c69 + iVar6 * 0x10" (binary_expression "unaff_EDI + 0x129c69" identifier + number_literal) + (binary_expression "iVar6 * 0x10" identifier * number_literal))) ;) (expression_statement "uVar5 = *(uint *)(iVar2 + 8) & uVar5;" (assignment_expression "uVar5 = *(uint *)(iVar2 + 8) & uVar5" identifier = (binary_expression "*(uint *)(iVar2 + 8) & uVar5" (pointer_expression "*(uint *)(iVar2 + 8)" * (cast_expression "(uint *)(iVar2 + 8)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar2 + 8)" ( (binary_expression "iVar2 + 8" identifier + number_literal) )))) & identifier)) ;) (if_statement "if (*(int *)(iVar2 + 0xc) <= (int)uVar5) {\n      *piVar4 = iVar6 + 1;\n      return uVar5;\n    }" if (parenthesized_expression "(*(int *)(iVar2 + 0xc) <= (int)uVar5)" ( (binary_expression "*(int *)(iVar2 + 0xc) <= (int)uVar5" (pointer_expression "*(int *)(iVar2 + 0xc)" * (cast_expression "(int *)(iVar2 + 0xc)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar2 + 0xc)" ( (binary_expression "iVar2 + 0xc" identifier + number_literal) )))) <= (cast_expression "(int)uVar5" ( (type_descriptor "int" primitive_type) ) identifier)) )) (compound_statement "{\n      *piVar4 = iVar6 + 1;\n      return uVar5;\n    }" { (expression_statement "*piVar4 = iVar6 + 1;" (assignment_expression "*piVar4 = iVar6 + 1" (pointer_expression "*piVar4" * identifier) = (binary_expression "iVar6 + 1" identifier + number_literal)) ;) (return_statement "return uVar5;" return identifier ;) })) (labeled_statement "LAB_0019fbb8:\n    piVar4 = __errno_location();" statement_identifier : (expression_statement "piVar4 = __errno_location();" (assignment_expression "piVar4 = __errno_location()" identifier = (call_expression "__errno_location()" identifier (argument_list "()" ( )))) ;)) (expression_statement "*piVar4 = 0x54;" (assignment_expression "*piVar4 = 0x54" (pointer_expression "*piVar4" * identifier) = number_literal) ;) }))) (return_statement "return 0xffffffff;" return number_literal ;) })))
(translation_unit "int GetNextUTFCode(char *text,uint *octets)\n\n{\n  uint *puVar1;\n  int iVar2;\n  byte *pbVar3;\n  int *piVar4;\n  uint uVar5;\n  int iVar6;\n  uint uVar7;\n  uint *puVar8;\n  uint *puVar9;\n  int unaff_EDI;\n  undefined8 uVar10;\n  \n  uVar10 = __x86_get_pc_thunk_di();\n  piVar4 = (int *)((ulonglong)uVar10 >> 0x20);\n  pbVar3 = (byte *)uVar10;\n  *piVar4 = 1;\n  if (pbVar3 == (byte *)0x0) {\n    piVar4 = __errno_location();\n    *piVar4 = 0x16;\n  }\n  else {\n    uVar7 = (uint)*pbVar3;\n    iVar6 = 0;\n    uVar5 = uVar7;\n    puVar8 = (uint *)(unaff_EDI + 0x129c69);\n    if ((*pbVar3 & 0x80) != 0) {\n      do {\n        iVar2 = iVar6 + 1;\n        if ((((pbVar3[iVar2] ^ 0x80) & 0xc0) != 0) || (0x10ffff < (int)uVar5)) goto LAB_0019fbb8;\n        iVar6 = iVar6 + 1;\n        puVar9 = puVar8 + 4;\n        uVar5 = uVar5 << 6 | (uint)(pbVar3[iVar2] ^ 0x80);\n        if (iVar6 == 6) goto LAB_0019fbb8;\n        puVar1 = puVar8 + 5;\n        puVar8 = puVar9;\n      } while ((*puVar9 & uVar7) != *puVar1);\n    }\n    iVar2 = unaff_EDI + 0x129c69 + iVar6 * 0x10;\n    uVar5 = *(uint *)(iVar2 + 8) & uVar5;\n    if (*(int *)(iVar2 + 0xc) <= (int)uVar5) {\n      *piVar4 = iVar6 + 1;\n      return uVar5;\n    }\nLAB_0019fbb8:\n    piVar4 = __errno_location();\n    *piVar4 = 0x54;\n  }\n  return -1;\n}\n\n" (function_definition "int GetNextUTFCode(char *text,uint *octets)\n\n{\n  uint *puVar1;\n  int iVar2;\n  byte *pbVar3;\n  int *piVar4;\n  uint uVar5;\n  int iVar6;\n  uint uVar7;\n  uint *puVar8;\n  uint *puVar9;\n  int unaff_EDI;\n  undefined8 uVar10;\n  \n  uVar10 = __x86_get_pc_thunk_di();\n  piVar4 = (int *)((ulonglong)uVar10 >> 0x20);\n  pbVar3 = (byte *)uVar10;\n  *piVar4 = 1;\n  if (pbVar3 == (byte *)0x0) {\n    piVar4 = __errno_location();\n    *piVar4 = 0x16;\n  }\n  else {\n    uVar7 = (uint)*pbVar3;\n    iVar6 = 0;\n    uVar5 = uVar7;\n    puVar8 = (uint *)(unaff_EDI + 0x129c69);\n    if ((*pbVar3 & 0x80) != 0) {\n      do {\n        iVar2 = iVar6 + 1;\n        if ((((pbVar3[iVar2] ^ 0x80) & 0xc0) != 0) || (0x10ffff < (int)uVar5)) goto LAB_0019fbb8;\n        iVar6 = iVar6 + 1;\n        puVar9 = puVar8 + 4;\n        uVar5 = uVar5 << 6 | (uint)(pbVar3[iVar2] ^ 0x80);\n        if (iVar6 == 6) goto LAB_0019fbb8;\n        puVar1 = puVar8 + 5;\n        puVar8 = puVar9;\n      } while ((*puVar9 & uVar7) != *puVar1);\n    }\n    iVar2 = unaff_EDI + 0x129c69 + iVar6 * 0x10;\n    uVar5 = *(uint *)(iVar2 + 8) & uVar5;\n    if (*(int *)(iVar2 + 0xc) <= (int)uVar5) {\n      *piVar4 = iVar6 + 1;\n      return uVar5;\n    }\nLAB_0019fbb8:\n    piVar4 = __errno_location();\n    *piVar4 = 0x54;\n  }\n  return -1;\n}" primitive_type (function_declarator "GetNextUTFCode(char *text,uint *octets)" identifier (parameter_list "(char *text,uint *octets)" ( (parameter_declaration "char *text" primitive_type (pointer_declarator "*text" * identifier)) , (parameter_declaration "uint *octets" type_identifier (pointer_declarator "*octets" * identifier)) ))) (compound_statement "{\n  uint *puVar1;\n  int iVar2;\n  byte *pbVar3;\n  int *piVar4;\n  uint uVar5;\n  int iVar6;\n  uint uVar7;\n  uint *puVar8;\n  uint *puVar9;\n  int unaff_EDI;\n  undefined8 uVar10;\n  \n  uVar10 = __x86_get_pc_thunk_di();\n  piVar4 = (int *)((ulonglong)uVar10 >> 0x20);\n  pbVar3 = (byte *)uVar10;\n  *piVar4 = 1;\n  if (pbVar3 == (byte *)0x0) {\n    piVar4 = __errno_location();\n    *piVar4 = 0x16;\n  }\n  else {\n    uVar7 = (uint)*pbVar3;\n    iVar6 = 0;\n    uVar5 = uVar7;\n    puVar8 = (uint *)(unaff_EDI + 0x129c69);\n    if ((*pbVar3 & 0x80) != 0) {\n      do {\n        iVar2 = iVar6 + 1;\n        if ((((pbVar3[iVar2] ^ 0x80) & 0xc0) != 0) || (0x10ffff < (int)uVar5)) goto LAB_0019fbb8;\n        iVar6 = iVar6 + 1;\n        puVar9 = puVar8 + 4;\n        uVar5 = uVar5 << 6 | (uint)(pbVar3[iVar2] ^ 0x80);\n        if (iVar6 == 6) goto LAB_0019fbb8;\n        puVar1 = puVar8 + 5;\n        puVar8 = puVar9;\n      } while ((*puVar9 & uVar7) != *puVar1);\n    }\n    iVar2 = unaff_EDI + 0x129c69 + iVar6 * 0x10;\n    uVar5 = *(uint *)(iVar2 + 8) & uVar5;\n    if (*(int *)(iVar2 + 0xc) <= (int)uVar5) {\n      *piVar4 = iVar6 + 1;\n      return uVar5;\n    }\nLAB_0019fbb8:\n    piVar4 = __errno_location();\n    *piVar4 = 0x54;\n  }\n  return -1;\n}" { (declaration "uint *puVar1;" type_identifier (pointer_declarator "*puVar1" * identifier) ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "byte *pbVar3;" type_identifier (pointer_declarator "*pbVar3" * identifier) ;) (declaration "int *piVar4;" primitive_type (pointer_declarator "*piVar4" * identifier) ;) (declaration "uint uVar5;" type_identifier identifier ;) (declaration "int iVar6;" primitive_type identifier ;) (declaration "uint uVar7;" type_identifier identifier ;) (declaration "uint *puVar8;" type_identifier (pointer_declarator "*puVar8" * identifier) ;) (declaration "uint *puVar9;" type_identifier (pointer_declarator "*puVar9" * identifier) ;) (declaration "int unaff_EDI;" primitive_type identifier ;) (declaration "undefined8 uVar10;" type_identifier identifier ;) (expression_statement "uVar10 = __x86_get_pc_thunk_di();" (assignment_expression "uVar10 = __x86_get_pc_thunk_di()" identifier = (call_expression "__x86_get_pc_thunk_di()" identifier (argument_list "()" ( )))) ;) (expression_statement "piVar4 = (int *)((ulonglong)uVar10 >> 0x20);" (assignment_expression "piVar4 = (int *)((ulonglong)uVar10 >> 0x20)" identifier = (cast_expression "(int *)((ulonglong)uVar10 >> 0x20)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((ulonglong)uVar10 >> 0x20)" ( (binary_expression "(ulonglong)uVar10 >> 0x20" (cast_expression "(ulonglong)uVar10" ( (type_descriptor "ulonglong" type_identifier) ) identifier) >> number_literal) )))) ;) (expression_statement "pbVar3 = (byte *)uVar10;" (assignment_expression "pbVar3 = (byte *)uVar10" identifier = (cast_expression "(byte *)uVar10" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) ;) (expression_statement "*piVar4 = 1;" (assignment_expression "*piVar4 = 1" (pointer_expression "*piVar4" * identifier) = number_literal) ;) (if_statement "if (pbVar3 == (byte *)0x0) {\n    piVar4 = __errno_location();\n    *piVar4 = 0x16;\n  }\n  else {\n    uVar7 = (uint)*pbVar3;\n    iVar6 = 0;\n    uVar5 = uVar7;\n    puVar8 = (uint *)(unaff_EDI + 0x129c69);\n    if ((*pbVar3 & 0x80) != 0) {\n      do {\n        iVar2 = iVar6 + 1;\n        if ((((pbVar3[iVar2] ^ 0x80) & 0xc0) != 0) || (0x10ffff < (int)uVar5)) goto LAB_0019fbb8;\n        iVar6 = iVar6 + 1;\n        puVar9 = puVar8 + 4;\n        uVar5 = uVar5 << 6 | (uint)(pbVar3[iVar2] ^ 0x80);\n        if (iVar6 == 6) goto LAB_0019fbb8;\n        puVar1 = puVar8 + 5;\n        puVar8 = puVar9;\n      } while ((*puVar9 & uVar7) != *puVar1);\n    }\n    iVar2 = unaff_EDI + 0x129c69 + iVar6 * 0x10;\n    uVar5 = *(uint *)(iVar2 + 8) & uVar5;\n    if (*(int *)(iVar2 + 0xc) <= (int)uVar5) {\n      *piVar4 = iVar6 + 1;\n      return uVar5;\n    }\nLAB_0019fbb8:\n    piVar4 = __errno_location();\n    *piVar4 = 0x54;\n  }" if (parenthesized_expression "(pbVar3 == (byte *)0x0)" ( (binary_expression "pbVar3 == (byte *)0x0" identifier == (cast_expression "(byte *)0x0" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    piVar4 = __errno_location();\n    *piVar4 = 0x16;\n  }" { (expression_statement "piVar4 = __errno_location();" (assignment_expression "piVar4 = __errno_location()" identifier = (call_expression "__errno_location()" identifier (argument_list "()" ( )))) ;) (expression_statement "*piVar4 = 0x16;" (assignment_expression "*piVar4 = 0x16" (pointer_expression "*piVar4" * identifier) = number_literal) ;) }) (else_clause "else {\n    uVar7 = (uint)*pbVar3;\n    iVar6 = 0;\n    uVar5 = uVar7;\n    puVar8 = (uint *)(unaff_EDI + 0x129c69);\n    if ((*pbVar3 & 0x80) != 0) {\n      do {\n        iVar2 = iVar6 + 1;\n        if ((((pbVar3[iVar2] ^ 0x80) & 0xc0) != 0) || (0x10ffff < (int)uVar5)) goto LAB_0019fbb8;\n        iVar6 = iVar6 + 1;\n        puVar9 = puVar8 + 4;\n        uVar5 = uVar5 << 6 | (uint)(pbVar3[iVar2] ^ 0x80);\n        if (iVar6 == 6) goto LAB_0019fbb8;\n        puVar1 = puVar8 + 5;\n        puVar8 = puVar9;\n      } while ((*puVar9 & uVar7) != *puVar1);\n    }\n    iVar2 = unaff_EDI + 0x129c69 + iVar6 * 0x10;\n    uVar5 = *(uint *)(iVar2 + 8) & uVar5;\n    if (*(int *)(iVar2 + 0xc) <= (int)uVar5) {\n      *piVar4 = iVar6 + 1;\n      return uVar5;\n    }\nLAB_0019fbb8:\n    piVar4 = __errno_location();\n    *piVar4 = 0x54;\n  }" else (compound_statement "{\n    uVar7 = (uint)*pbVar3;\n    iVar6 = 0;\n    uVar5 = uVar7;\n    puVar8 = (uint *)(unaff_EDI + 0x129c69);\n    if ((*pbVar3 & 0x80) != 0) {\n      do {\n        iVar2 = iVar6 + 1;\n        if ((((pbVar3[iVar2] ^ 0x80) & 0xc0) != 0) || (0x10ffff < (int)uVar5)) goto LAB_0019fbb8;\n        iVar6 = iVar6 + 1;\n        puVar9 = puVar8 + 4;\n        uVar5 = uVar5 << 6 | (uint)(pbVar3[iVar2] ^ 0x80);\n        if (iVar6 == 6) goto LAB_0019fbb8;\n        puVar1 = puVar8 + 5;\n        puVar8 = puVar9;\n      } while ((*puVar9 & uVar7) != *puVar1);\n    }\n    iVar2 = unaff_EDI + 0x129c69 + iVar6 * 0x10;\n    uVar5 = *(uint *)(iVar2 + 8) & uVar5;\n    if (*(int *)(iVar2 + 0xc) <= (int)uVar5) {\n      *piVar4 = iVar6 + 1;\n      return uVar5;\n    }\nLAB_0019fbb8:\n    piVar4 = __errno_location();\n    *piVar4 = 0x54;\n  }" { (expression_statement "uVar7 = (uint)*pbVar3;" (assignment_expression "uVar7 = (uint)*pbVar3" identifier = (binary_expression "(uint)*pbVar3" (parenthesized_expression "(uint)" ( identifier )) * identifier)) ;) (expression_statement "iVar6 = 0;" (assignment_expression "iVar6 = 0" identifier = number_literal) ;) (expression_statement "uVar5 = uVar7;" (assignment_expression "uVar5 = uVar7" identifier = identifier) ;) (expression_statement "puVar8 = (uint *)(unaff_EDI + 0x129c69);" (assignment_expression "puVar8 = (uint *)(unaff_EDI + 0x129c69)" identifier = (cast_expression "(uint *)(unaff_EDI + 0x129c69)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(unaff_EDI + 0x129c69)" ( (binary_expression "unaff_EDI + 0x129c69" identifier + number_literal) )))) ;) (if_statement "if ((*pbVar3 & 0x80) != 0) {\n      do {\n        iVar2 = iVar6 + 1;\n        if ((((pbVar3[iVar2] ^ 0x80) & 0xc0) != 0) || (0x10ffff < (int)uVar5)) goto LAB_0019fbb8;\n        iVar6 = iVar6 + 1;\n        puVar9 = puVar8 + 4;\n        uVar5 = uVar5 << 6 | (uint)(pbVar3[iVar2] ^ 0x80);\n        if (iVar6 == 6) goto LAB_0019fbb8;\n        puVar1 = puVar8 + 5;\n        puVar8 = puVar9;\n      } while ((*puVar9 & uVar7) != *puVar1);\n    }" if (parenthesized_expression "((*pbVar3 & 0x80) != 0)" ( (binary_expression "(*pbVar3 & 0x80) != 0" (parenthesized_expression "(*pbVar3 & 0x80)" ( (binary_expression "*pbVar3 & 0x80" (pointer_expression "*pbVar3" * identifier) & number_literal) )) != number_literal) )) (compound_statement "{\n      do {\n        iVar2 = iVar6 + 1;\n        if ((((pbVar3[iVar2] ^ 0x80) & 0xc0) != 0) || (0x10ffff < (int)uVar5)) goto LAB_0019fbb8;\n        iVar6 = iVar6 + 1;\n        puVar9 = puVar8 + 4;\n        uVar5 = uVar5 << 6 | (uint)(pbVar3[iVar2] ^ 0x80);\n        if (iVar6 == 6) goto LAB_0019fbb8;\n        puVar1 = puVar8 + 5;\n        puVar8 = puVar9;\n      } while ((*puVar9 & uVar7) != *puVar1);\n    }" { (do_statement "do {\n        iVar2 = iVar6 + 1;\n        if ((((pbVar3[iVar2] ^ 0x80) & 0xc0) != 0) || (0x10ffff < (int)uVar5)) goto LAB_0019fbb8;\n        iVar6 = iVar6 + 1;\n        puVar9 = puVar8 + 4;\n        uVar5 = uVar5 << 6 | (uint)(pbVar3[iVar2] ^ 0x80);\n        if (iVar6 == 6) goto LAB_0019fbb8;\n        puVar1 = puVar8 + 5;\n        puVar8 = puVar9;\n      } while ((*puVar9 & uVar7) != *puVar1);" do (compound_statement "{\n        iVar2 = iVar6 + 1;\n        if ((((pbVar3[iVar2] ^ 0x80) & 0xc0) != 0) || (0x10ffff < (int)uVar5)) goto LAB_0019fbb8;\n        iVar6 = iVar6 + 1;\n        puVar9 = puVar8 + 4;\n        uVar5 = uVar5 << 6 | (uint)(pbVar3[iVar2] ^ 0x80);\n        if (iVar6 == 6) goto LAB_0019fbb8;\n        puVar1 = puVar8 + 5;\n        puVar8 = puVar9;\n      }" { (expression_statement "iVar2 = iVar6 + 1;" (assignment_expression "iVar2 = iVar6 + 1" identifier = (binary_expression "iVar6 + 1" identifier + number_literal)) ;) (if_statement "if ((((pbVar3[iVar2] ^ 0x80) & 0xc0) != 0) || (0x10ffff < (int)uVar5)) goto LAB_0019fbb8;" if (parenthesized_expression "((((pbVar3[iVar2] ^ 0x80) & 0xc0) != 0) || (0x10ffff < (int)uVar5))" ( (binary_expression "(((pbVar3[iVar2] ^ 0x80) & 0xc0) != 0) || (0x10ffff < (int)uVar5)" (parenthesized_expression "(((pbVar3[iVar2] ^ 0x80) & 0xc0) != 0)" ( (binary_expression "((pbVar3[iVar2] ^ 0x80) & 0xc0) != 0" (parenthesized_expression "((pbVar3[iVar2] ^ 0x80) & 0xc0)" ( (binary_expression "(pbVar3[iVar2] ^ 0x80) & 0xc0" (parenthesized_expression "(pbVar3[iVar2] ^ 0x80)" ( (binary_expression "pbVar3[iVar2] ^ 0x80" (subscript_expression "pbVar3[iVar2]" identifier [ identifier ]) ^ number_literal) )) & number_literal) )) != number_literal) )) || (parenthesized_expression "(0x10ffff < (int)uVar5)" ( (binary_expression "0x10ffff < (int)uVar5" number_literal < (cast_expression "(int)uVar5" ( (type_descriptor "int" primitive_type) ) identifier)) ))) )) (goto_statement "goto LAB_0019fbb8;" goto statement_identifier ;)) (expression_statement "iVar6 = iVar6 + 1;" (assignment_expression "iVar6 = iVar6 + 1" identifier = (binary_expression "iVar6 + 1" identifier + number_literal)) ;) (expression_statement "puVar9 = puVar8 + 4;" (assignment_expression "puVar9 = puVar8 + 4" identifier = (binary_expression "puVar8 + 4" identifier + number_literal)) ;) (expression_statement "uVar5 = uVar5 << 6 | (uint)(pbVar3[iVar2] ^ 0x80);" (assignment_expression "uVar5 = uVar5 << 6 | (uint)(pbVar3[iVar2] ^ 0x80)" identifier = (binary_expression "uVar5 << 6 | (uint)(pbVar3[iVar2] ^ 0x80)" (binary_expression "uVar5 << 6" identifier << number_literal) | (call_expression "(uint)(pbVar3[iVar2] ^ 0x80)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(pbVar3[iVar2] ^ 0x80)" ( (binary_expression "pbVar3[iVar2] ^ 0x80" (subscript_expression "pbVar3[iVar2]" identifier [ identifier ]) ^ number_literal) ))))) ;) (if_statement "if (iVar6 == 6) goto LAB_0019fbb8;" if (parenthesized_expression "(iVar6 == 6)" ( (binary_expression "iVar6 == 6" identifier == number_literal) )) (goto_statement "goto LAB_0019fbb8;" goto statement_identifier ;)) (expression_statement "puVar1 = puVar8 + 5;" (assignment_expression "puVar1 = puVar8 + 5" identifier = (binary_expression "puVar8 + 5" identifier + number_literal)) ;) (expression_statement "puVar8 = puVar9;" (assignment_expression "puVar8 = puVar9" identifier = identifier) ;) }) while (parenthesized_expression "((*puVar9 & uVar7) != *puVar1)" ( (binary_expression "(*puVar9 & uVar7) != *puVar1" (parenthesized_expression "(*puVar9 & uVar7)" ( (binary_expression "*puVar9 & uVar7" (pointer_expression "*puVar9" * identifier) & identifier) )) != (pointer_expression "*puVar1" * identifier)) )) ;) })) (expression_statement "iVar2 = unaff_EDI + 0x129c69 + iVar6 * 0x10;" (assignment_expression "iVar2 = unaff_EDI + 0x129c69 + iVar6 * 0x10" identifier = (binary_expression "unaff_EDI + 0x129c69 + iVar6 * 0x10" (binary_expression "unaff_EDI + 0x129c69" identifier + number_literal) + (binary_expression "iVar6 * 0x10" identifier * number_literal))) ;) (expression_statement "uVar5 = *(uint *)(iVar2 + 8) & uVar5;" (assignment_expression "uVar5 = *(uint *)(iVar2 + 8) & uVar5" identifier = (binary_expression "*(uint *)(iVar2 + 8) & uVar5" (pointer_expression "*(uint *)(iVar2 + 8)" * (cast_expression "(uint *)(iVar2 + 8)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar2 + 8)" ( (binary_expression "iVar2 + 8" identifier + number_literal) )))) & identifier)) ;) (if_statement "if (*(int *)(iVar2 + 0xc) <= (int)uVar5) {\n      *piVar4 = iVar6 + 1;\n      return uVar5;\n    }" if (parenthesized_expression "(*(int *)(iVar2 + 0xc) <= (int)uVar5)" ( (binary_expression "*(int *)(iVar2 + 0xc) <= (int)uVar5" (pointer_expression "*(int *)(iVar2 + 0xc)" * (cast_expression "(int *)(iVar2 + 0xc)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar2 + 0xc)" ( (binary_expression "iVar2 + 0xc" identifier + number_literal) )))) <= (cast_expression "(int)uVar5" ( (type_descriptor "int" primitive_type) ) identifier)) )) (compound_statement "{\n      *piVar4 = iVar6 + 1;\n      return uVar5;\n    }" { (expression_statement "*piVar4 = iVar6 + 1;" (assignment_expression "*piVar4 = iVar6 + 1" (pointer_expression "*piVar4" * identifier) = (binary_expression "iVar6 + 1" identifier + number_literal)) ;) (return_statement "return uVar5;" return identifier ;) })) (labeled_statement "LAB_0019fbb8:\n    piVar4 = __errno_location();" statement_identifier : (expression_statement "piVar4 = __errno_location();" (assignment_expression "piVar4 = __errno_location()" identifier = (call_expression "__errno_location()" identifier (argument_list "()" ( )))) ;)) (expression_statement "*piVar4 = 0x54;" (assignment_expression "*piVar4 = 0x54" (pointer_expression "*piVar4" * identifier) = number_literal) ;) }))) (return_statement "return -1;" return number_literal ;) })))
(translation_unit "uint FUN_0019fb10(void)\n\n{\n  uint *puVar1;\n  int iVar2;\n  byte *pbVar3;\n  int *piVar4;\n  uint uVar5;\n  int iVar6;\n  uint uVar7;\n  uint *puVar8;\n  uint *puVar9;\n  int unaff_EDI;\n  undefined8 uVar10;\n  \n  uVar10 = FUN_0004c803();\n  piVar4 = (int *)((ulonglong)uVar10 >> 0x20);\n  pbVar3 = (byte *)uVar10;\n  *piVar4 = 1;\n  if (pbVar3 == (byte *)0x0) {\n    piVar4 = __errno_location();\n    *piVar4 = 0x16;\n  }\n  else {\n    uVar7 = (uint)*pbVar3;\n    iVar6 = 0;\n    uVar5 = uVar7;\n    puVar8 = (uint *)(unaff_EDI + 0x129c69);\n    if ((*pbVar3 & 0x80) != 0) {\n      do {\n        iVar2 = iVar6 + 1;\n        if ((((pbVar3[iVar2] ^ 0x80) & 0xc0) != 0) || (0x10ffff < (int)uVar5)) goto LAB_0019fbb8;\n        iVar6 = iVar6 + 1;\n        puVar9 = puVar8 + 4;\n        uVar5 = uVar5 << 6 | (uint)(pbVar3[iVar2] ^ 0x80);\n        if (iVar6 == 6) goto LAB_0019fbb8;\n        puVar1 = puVar8 + 5;\n        puVar8 = puVar9;\n      } while ((*puVar9 & uVar7) != *puVar1);\n    }\n    iVar2 = unaff_EDI + 0x129c69 + iVar6 * 0x10;\n    uVar5 = *(uint *)(iVar2 + 8) & uVar5;\n    if (*(int *)(iVar2 + 0xc) <= (int)uVar5) {\n      *piVar4 = iVar6 + 1;\n      return uVar5;\n    }\nLAB_0019fbb8:\n    piVar4 = __errno_location();\n    *piVar4 = 0x54;\n  }\n  return 0xffffffff;\n}\n\n" (function_definition "uint FUN_0019fb10(void)\n\n{\n  uint *puVar1;\n  int iVar2;\n  byte *pbVar3;\n  int *piVar4;\n  uint uVar5;\n  int iVar6;\n  uint uVar7;\n  uint *puVar8;\n  uint *puVar9;\n  int unaff_EDI;\n  undefined8 uVar10;\n  \n  uVar10 = FUN_0004c803();\n  piVar4 = (int *)((ulonglong)uVar10 >> 0x20);\n  pbVar3 = (byte *)uVar10;\n  *piVar4 = 1;\n  if (pbVar3 == (byte *)0x0) {\n    piVar4 = __errno_location();\n    *piVar4 = 0x16;\n  }\n  else {\n    uVar7 = (uint)*pbVar3;\n    iVar6 = 0;\n    uVar5 = uVar7;\n    puVar8 = (uint *)(unaff_EDI + 0x129c69);\n    if ((*pbVar3 & 0x80) != 0) {\n      do {\n        iVar2 = iVar6 + 1;\n        if ((((pbVar3[iVar2] ^ 0x80) & 0xc0) != 0) || (0x10ffff < (int)uVar5)) goto LAB_0019fbb8;\n        iVar6 = iVar6 + 1;\n        puVar9 = puVar8 + 4;\n        uVar5 = uVar5 << 6 | (uint)(pbVar3[iVar2] ^ 0x80);\n        if (iVar6 == 6) goto LAB_0019fbb8;\n        puVar1 = puVar8 + 5;\n        puVar8 = puVar9;\n      } while ((*puVar9 & uVar7) != *puVar1);\n    }\n    iVar2 = unaff_EDI + 0x129c69 + iVar6 * 0x10;\n    uVar5 = *(uint *)(iVar2 + 8) & uVar5;\n    if (*(int *)(iVar2 + 0xc) <= (int)uVar5) {\n      *piVar4 = iVar6 + 1;\n      return uVar5;\n    }\nLAB_0019fbb8:\n    piVar4 = __errno_location();\n    *piVar4 = 0x54;\n  }\n  return 0xffffffff;\n}" type_identifier (function_declarator "FUN_0019fb10(void)" identifier (parameter_list "(void)" ( (parameter_declaration "void" primitive_type) ))) (compound_statement "{\n  uint *puVar1;\n  int iVar2;\n  byte *pbVar3;\n  int *piVar4;\n  uint uVar5;\n  int iVar6;\n  uint uVar7;\n  uint *puVar8;\n  uint *puVar9;\n  int unaff_EDI;\n  undefined8 uVar10;\n  \n  uVar10 = FUN_0004c803();\n  piVar4 = (int *)((ulonglong)uVar10 >> 0x20);\n  pbVar3 = (byte *)uVar10;\n  *piVar4 = 1;\n  if (pbVar3 == (byte *)0x0) {\n    piVar4 = __errno_location();\n    *piVar4 = 0x16;\n  }\n  else {\n    uVar7 = (uint)*pbVar3;\n    iVar6 = 0;\n    uVar5 = uVar7;\n    puVar8 = (uint *)(unaff_EDI + 0x129c69);\n    if ((*pbVar3 & 0x80) != 0) {\n      do {\n        iVar2 = iVar6 + 1;\n        if ((((pbVar3[iVar2] ^ 0x80) & 0xc0) != 0) || (0x10ffff < (int)uVar5)) goto LAB_0019fbb8;\n        iVar6 = iVar6 + 1;\n        puVar9 = puVar8 + 4;\n        uVar5 = uVar5 << 6 | (uint)(pbVar3[iVar2] ^ 0x80);\n        if (iVar6 == 6) goto LAB_0019fbb8;\n        puVar1 = puVar8 + 5;\n        puVar8 = puVar9;\n      } while ((*puVar9 & uVar7) != *puVar1);\n    }\n    iVar2 = unaff_EDI + 0x129c69 + iVar6 * 0x10;\n    uVar5 = *(uint *)(iVar2 + 8) & uVar5;\n    if (*(int *)(iVar2 + 0xc) <= (int)uVar5) {\n      *piVar4 = iVar6 + 1;\n      return uVar5;\n    }\nLAB_0019fbb8:\n    piVar4 = __errno_location();\n    *piVar4 = 0x54;\n  }\n  return 0xffffffff;\n}" { (declaration "uint *puVar1;" type_identifier (pointer_declarator "*puVar1" * identifier) ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "byte *pbVar3;" type_identifier (pointer_declarator "*pbVar3" * identifier) ;) (declaration "int *piVar4;" primitive_type (pointer_declarator "*piVar4" * identifier) ;) (declaration "uint uVar5;" type_identifier identifier ;) (declaration "int iVar6;" primitive_type identifier ;) (declaration "uint uVar7;" type_identifier identifier ;) (declaration "uint *puVar8;" type_identifier (pointer_declarator "*puVar8" * identifier) ;) (declaration "uint *puVar9;" type_identifier (pointer_declarator "*puVar9" * identifier) ;) (declaration "int unaff_EDI;" primitive_type identifier ;) (declaration "undefined8 uVar10;" type_identifier identifier ;) (expression_statement "uVar10 = FUN_0004c803();" (assignment_expression "uVar10 = FUN_0004c803()" identifier = (call_expression "FUN_0004c803()" identifier (argument_list "()" ( )))) ;) (expression_statement "piVar4 = (int *)((ulonglong)uVar10 >> 0x20);" (assignment_expression "piVar4 = (int *)((ulonglong)uVar10 >> 0x20)" identifier = (cast_expression "(int *)((ulonglong)uVar10 >> 0x20)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((ulonglong)uVar10 >> 0x20)" ( (binary_expression "(ulonglong)uVar10 >> 0x20" (cast_expression "(ulonglong)uVar10" ( (type_descriptor "ulonglong" type_identifier) ) identifier) >> number_literal) )))) ;) (expression_statement "pbVar3 = (byte *)uVar10;" (assignment_expression "pbVar3 = (byte *)uVar10" identifier = (cast_expression "(byte *)uVar10" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) ;) (expression_statement "*piVar4 = 1;" (assignment_expression "*piVar4 = 1" (pointer_expression "*piVar4" * identifier) = number_literal) ;) (if_statement "if (pbVar3 == (byte *)0x0) {\n    piVar4 = __errno_location();\n    *piVar4 = 0x16;\n  }\n  else {\n    uVar7 = (uint)*pbVar3;\n    iVar6 = 0;\n    uVar5 = uVar7;\n    puVar8 = (uint *)(unaff_EDI + 0x129c69);\n    if ((*pbVar3 & 0x80) != 0) {\n      do {\n        iVar2 = iVar6 + 1;\n        if ((((pbVar3[iVar2] ^ 0x80) & 0xc0) != 0) || (0x10ffff < (int)uVar5)) goto LAB_0019fbb8;\n        iVar6 = iVar6 + 1;\n        puVar9 = puVar8 + 4;\n        uVar5 = uVar5 << 6 | (uint)(pbVar3[iVar2] ^ 0x80);\n        if (iVar6 == 6) goto LAB_0019fbb8;\n        puVar1 = puVar8 + 5;\n        puVar8 = puVar9;\n      } while ((*puVar9 & uVar7) != *puVar1);\n    }\n    iVar2 = unaff_EDI + 0x129c69 + iVar6 * 0x10;\n    uVar5 = *(uint *)(iVar2 + 8) & uVar5;\n    if (*(int *)(iVar2 + 0xc) <= (int)uVar5) {\n      *piVar4 = iVar6 + 1;\n      return uVar5;\n    }\nLAB_0019fbb8:\n    piVar4 = __errno_location();\n    *piVar4 = 0x54;\n  }" if (parenthesized_expression "(pbVar3 == (byte *)0x0)" ( (binary_expression "pbVar3 == (byte *)0x0" identifier == (cast_expression "(byte *)0x0" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    piVar4 = __errno_location();\n    *piVar4 = 0x16;\n  }" { (expression_statement "piVar4 = __errno_location();" (assignment_expression "piVar4 = __errno_location()" identifier = (call_expression "__errno_location()" identifier (argument_list "()" ( )))) ;) (expression_statement "*piVar4 = 0x16;" (assignment_expression "*piVar4 = 0x16" (pointer_expression "*piVar4" * identifier) = number_literal) ;) }) (else_clause "else {\n    uVar7 = (uint)*pbVar3;\n    iVar6 = 0;\n    uVar5 = uVar7;\n    puVar8 = (uint *)(unaff_EDI + 0x129c69);\n    if ((*pbVar3 & 0x80) != 0) {\n      do {\n        iVar2 = iVar6 + 1;\n        if ((((pbVar3[iVar2] ^ 0x80) & 0xc0) != 0) || (0x10ffff < (int)uVar5)) goto LAB_0019fbb8;\n        iVar6 = iVar6 + 1;\n        puVar9 = puVar8 + 4;\n        uVar5 = uVar5 << 6 | (uint)(pbVar3[iVar2] ^ 0x80);\n        if (iVar6 == 6) goto LAB_0019fbb8;\n        puVar1 = puVar8 + 5;\n        puVar8 = puVar9;\n      } while ((*puVar9 & uVar7) != *puVar1);\n    }\n    iVar2 = unaff_EDI + 0x129c69 + iVar6 * 0x10;\n    uVar5 = *(uint *)(iVar2 + 8) & uVar5;\n    if (*(int *)(iVar2 + 0xc) <= (int)uVar5) {\n      *piVar4 = iVar6 + 1;\n      return uVar5;\n    }\nLAB_0019fbb8:\n    piVar4 = __errno_location();\n    *piVar4 = 0x54;\n  }" else (compound_statement "{\n    uVar7 = (uint)*pbVar3;\n    iVar6 = 0;\n    uVar5 = uVar7;\n    puVar8 = (uint *)(unaff_EDI + 0x129c69);\n    if ((*pbVar3 & 0x80) != 0) {\n      do {\n        iVar2 = iVar6 + 1;\n        if ((((pbVar3[iVar2] ^ 0x80) & 0xc0) != 0) || (0x10ffff < (int)uVar5)) goto LAB_0019fbb8;\n        iVar6 = iVar6 + 1;\n        puVar9 = puVar8 + 4;\n        uVar5 = uVar5 << 6 | (uint)(pbVar3[iVar2] ^ 0x80);\n        if (iVar6 == 6) goto LAB_0019fbb8;\n        puVar1 = puVar8 + 5;\n        puVar8 = puVar9;\n      } while ((*puVar9 & uVar7) != *puVar1);\n    }\n    iVar2 = unaff_EDI + 0x129c69 + iVar6 * 0x10;\n    uVar5 = *(uint *)(iVar2 + 8) & uVar5;\n    if (*(int *)(iVar2 + 0xc) <= (int)uVar5) {\n      *piVar4 = iVar6 + 1;\n      return uVar5;\n    }\nLAB_0019fbb8:\n    piVar4 = __errno_location();\n    *piVar4 = 0x54;\n  }" { (expression_statement "uVar7 = (uint)*pbVar3;" (assignment_expression "uVar7 = (uint)*pbVar3" identifier = (binary_expression "(uint)*pbVar3" (parenthesized_expression "(uint)" ( identifier )) * identifier)) ;) (expression_statement "iVar6 = 0;" (assignment_expression "iVar6 = 0" identifier = number_literal) ;) (expression_statement "uVar5 = uVar7;" (assignment_expression "uVar5 = uVar7" identifier = identifier) ;) (expression_statement "puVar8 = (uint *)(unaff_EDI + 0x129c69);" (assignment_expression "puVar8 = (uint *)(unaff_EDI + 0x129c69)" identifier = (cast_expression "(uint *)(unaff_EDI + 0x129c69)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(unaff_EDI + 0x129c69)" ( (binary_expression "unaff_EDI + 0x129c69" identifier + number_literal) )))) ;) (if_statement "if ((*pbVar3 & 0x80) != 0) {\n      do {\n        iVar2 = iVar6 + 1;\n        if ((((pbVar3[iVar2] ^ 0x80) & 0xc0) != 0) || (0x10ffff < (int)uVar5)) goto LAB_0019fbb8;\n        iVar6 = iVar6 + 1;\n        puVar9 = puVar8 + 4;\n        uVar5 = uVar5 << 6 | (uint)(pbVar3[iVar2] ^ 0x80);\n        if (iVar6 == 6) goto LAB_0019fbb8;\n        puVar1 = puVar8 + 5;\n        puVar8 = puVar9;\n      } while ((*puVar9 & uVar7) != *puVar1);\n    }" if (parenthesized_expression "((*pbVar3 & 0x80) != 0)" ( (binary_expression "(*pbVar3 & 0x80) != 0" (parenthesized_expression "(*pbVar3 & 0x80)" ( (binary_expression "*pbVar3 & 0x80" (pointer_expression "*pbVar3" * identifier) & number_literal) )) != number_literal) )) (compound_statement "{\n      do {\n        iVar2 = iVar6 + 1;\n        if ((((pbVar3[iVar2] ^ 0x80) & 0xc0) != 0) || (0x10ffff < (int)uVar5)) goto LAB_0019fbb8;\n        iVar6 = iVar6 + 1;\n        puVar9 = puVar8 + 4;\n        uVar5 = uVar5 << 6 | (uint)(pbVar3[iVar2] ^ 0x80);\n        if (iVar6 == 6) goto LAB_0019fbb8;\n        puVar1 = puVar8 + 5;\n        puVar8 = puVar9;\n      } while ((*puVar9 & uVar7) != *puVar1);\n    }" { (do_statement "do {\n        iVar2 = iVar6 + 1;\n        if ((((pbVar3[iVar2] ^ 0x80) & 0xc0) != 0) || (0x10ffff < (int)uVar5)) goto LAB_0019fbb8;\n        iVar6 = iVar6 + 1;\n        puVar9 = puVar8 + 4;\n        uVar5 = uVar5 << 6 | (uint)(pbVar3[iVar2] ^ 0x80);\n        if (iVar6 == 6) goto LAB_0019fbb8;\n        puVar1 = puVar8 + 5;\n        puVar8 = puVar9;\n      } while ((*puVar9 & uVar7) != *puVar1);" do (compound_statement "{\n        iVar2 = iVar6 + 1;\n        if ((((pbVar3[iVar2] ^ 0x80) & 0xc0) != 0) || (0x10ffff < (int)uVar5)) goto LAB_0019fbb8;\n        iVar6 = iVar6 + 1;\n        puVar9 = puVar8 + 4;\n        uVar5 = uVar5 << 6 | (uint)(pbVar3[iVar2] ^ 0x80);\n        if (iVar6 == 6) goto LAB_0019fbb8;\n        puVar1 = puVar8 + 5;\n        puVar8 = puVar9;\n      }" { (expression_statement "iVar2 = iVar6 + 1;" (assignment_expression "iVar2 = iVar6 + 1" identifier = (binary_expression "iVar6 + 1" identifier + number_literal)) ;) (if_statement "if ((((pbVar3[iVar2] ^ 0x80) & 0xc0) != 0) || (0x10ffff < (int)uVar5)) goto LAB_0019fbb8;" if (parenthesized_expression "((((pbVar3[iVar2] ^ 0x80) & 0xc0) != 0) || (0x10ffff < (int)uVar5))" ( (binary_expression "(((pbVar3[iVar2] ^ 0x80) & 0xc0) != 0) || (0x10ffff < (int)uVar5)" (parenthesized_expression "(((pbVar3[iVar2] ^ 0x80) & 0xc0) != 0)" ( (binary_expression "((pbVar3[iVar2] ^ 0x80) & 0xc0) != 0" (parenthesized_expression "((pbVar3[iVar2] ^ 0x80) & 0xc0)" ( (binary_expression "(pbVar3[iVar2] ^ 0x80) & 0xc0" (parenthesized_expression "(pbVar3[iVar2] ^ 0x80)" ( (binary_expression "pbVar3[iVar2] ^ 0x80" (subscript_expression "pbVar3[iVar2]" identifier [ identifier ]) ^ number_literal) )) & number_literal) )) != number_literal) )) || (parenthesized_expression "(0x10ffff < (int)uVar5)" ( (binary_expression "0x10ffff < (int)uVar5" number_literal < (cast_expression "(int)uVar5" ( (type_descriptor "int" primitive_type) ) identifier)) ))) )) (goto_statement "goto LAB_0019fbb8;" goto statement_identifier ;)) (expression_statement "iVar6 = iVar6 + 1;" (assignment_expression "iVar6 = iVar6 + 1" identifier = (binary_expression "iVar6 + 1" identifier + number_literal)) ;) (expression_statement "puVar9 = puVar8 + 4;" (assignment_expression "puVar9 = puVar8 + 4" identifier = (binary_expression "puVar8 + 4" identifier + number_literal)) ;) (expression_statement "uVar5 = uVar5 << 6 | (uint)(pbVar3[iVar2] ^ 0x80);" (assignment_expression "uVar5 = uVar5 << 6 | (uint)(pbVar3[iVar2] ^ 0x80)" identifier = (binary_expression "uVar5 << 6 | (uint)(pbVar3[iVar2] ^ 0x80)" (binary_expression "uVar5 << 6" identifier << number_literal) | (call_expression "(uint)(pbVar3[iVar2] ^ 0x80)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(pbVar3[iVar2] ^ 0x80)" ( (binary_expression "pbVar3[iVar2] ^ 0x80" (subscript_expression "pbVar3[iVar2]" identifier [ identifier ]) ^ number_literal) ))))) ;) (if_statement "if (iVar6 == 6) goto LAB_0019fbb8;" if (parenthesized_expression "(iVar6 == 6)" ( (binary_expression "iVar6 == 6" identifier == number_literal) )) (goto_statement "goto LAB_0019fbb8;" goto statement_identifier ;)) (expression_statement "puVar1 = puVar8 + 5;" (assignment_expression "puVar1 = puVar8 + 5" identifier = (binary_expression "puVar8 + 5" identifier + number_literal)) ;) (expression_statement "puVar8 = puVar9;" (assignment_expression "puVar8 = puVar9" identifier = identifier) ;) }) while (parenthesized_expression "((*puVar9 & uVar7) != *puVar1)" ( (binary_expression "(*puVar9 & uVar7) != *puVar1" (parenthesized_expression "(*puVar9 & uVar7)" ( (binary_expression "*puVar9 & uVar7" (pointer_expression "*puVar9" * identifier) & identifier) )) != (pointer_expression "*puVar1" * identifier)) )) ;) })) (expression_statement "iVar2 = unaff_EDI + 0x129c69 + iVar6 * 0x10;" (assignment_expression "iVar2 = unaff_EDI + 0x129c69 + iVar6 * 0x10" identifier = (binary_expression "unaff_EDI + 0x129c69 + iVar6 * 0x10" (binary_expression "unaff_EDI + 0x129c69" identifier + number_literal) + (binary_expression "iVar6 * 0x10" identifier * number_literal))) ;) (expression_statement "uVar5 = *(uint *)(iVar2 + 8) & uVar5;" (assignment_expression "uVar5 = *(uint *)(iVar2 + 8) & uVar5" identifier = (binary_expression "*(uint *)(iVar2 + 8) & uVar5" (pointer_expression "*(uint *)(iVar2 + 8)" * (cast_expression "(uint *)(iVar2 + 8)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar2 + 8)" ( (binary_expression "iVar2 + 8" identifier + number_literal) )))) & identifier)) ;) (if_statement "if (*(int *)(iVar2 + 0xc) <= (int)uVar5) {\n      *piVar4 = iVar6 + 1;\n      return uVar5;\n    }" if (parenthesized_expression "(*(int *)(iVar2 + 0xc) <= (int)uVar5)" ( (binary_expression "*(int *)(iVar2 + 0xc) <= (int)uVar5" (pointer_expression "*(int *)(iVar2 + 0xc)" * (cast_expression "(int *)(iVar2 + 0xc)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar2 + 0xc)" ( (binary_expression "iVar2 + 0xc" identifier + number_literal) )))) <= (cast_expression "(int)uVar5" ( (type_descriptor "int" primitive_type) ) identifier)) )) (compound_statement "{\n      *piVar4 = iVar6 + 1;\n      return uVar5;\n    }" { (expression_statement "*piVar4 = iVar6 + 1;" (assignment_expression "*piVar4 = iVar6 + 1" (pointer_expression "*piVar4" * identifier) = (binary_expression "iVar6 + 1" identifier + number_literal)) ;) (return_statement "return uVar5;" return identifier ;) })) (labeled_statement "LAB_0019fbb8:\n    piVar4 = __errno_location();" statement_identifier : (expression_statement "piVar4 = __errno_location();" (assignment_expression "piVar4 = __errno_location()" identifier = (call_expression "__errno_location()" identifier (argument_list "()" ( )))) ;)) (expression_statement "*piVar4 = 0x54;" (assignment_expression "*piVar4 = 0x54" (pointer_expression "*piVar4" * identifier) = number_literal) ;) }))) (return_statement "return 0xffffffff;" return number_literal ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE) ))) (compound_statement { (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( )))) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) >> LIT) )))) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = LIT) ;) (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 ( )))) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = LIT) ;) }) (else_clause else (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression (parenthesized_expression ( IDENT )) * IDENT)) ;) (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression (pointer_expression * IDENT) & LIT) )) != LIT) )) (compound_statement { (do_statement do (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression (subscript_expression IDENT [ IDENT ]) ^ LIT) )) & LIT) )) != LIT) )) || (parenthesized_expression ( (binary_expression LIT < (cast_expression ( (type_descriptor TYPE) ) IDENT)) ))) )) (goto_statement goto statement_identifier ;)) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (expression_statement (assignment_expression IDENT = (binary_expression (binary_expression IDENT << LIT) | (call_expression (parenthesized_expression ( IDENT )) (argument_list ( (binary_expression (subscript_expression IDENT [ IDENT ]) ^ LIT) ))))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (goto_statement goto statement_identifier ;)) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) }) while (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression (pointer_expression * IDENT) & IDENT) )) != (pointer_expression * IDENT)) )) ;) })) (expression_statement (assignment_expression IDENT = (binary_expression (binary_expression IDENT + LIT) + (binary_expression IDENT * LIT))) ;) (expression_statement (assignment_expression IDENT = (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) & IDENT)) ;) (if_statement if (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) <= (cast_expression ( (type_descriptor TYPE) ) IDENT)) )) (compound_statement { (expression_statement (assignment_expression (pointer_expression * IDENT) = (binary_expression IDENT + LIT)) ;) (return_statement return IDENT ;) })) (labeled_statement statement_identifier : (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( )))) ;)) (expression_statement (assignment_expression (pointer_expression * IDENT) = LIT) ;) }))) (return_statement return LIT ;) })))
(function_definition "uint FUN_0019fb10(void)\n\n{\n  uint *puVar1;\n  int iVar2;\n  byte *pbVar3;\n  int *piVar4;\n  uint uVar5;\n  int iVar6;\n  uint uVar7;\n  uint *puVar8;\n  uint *puVar9;\n  int unaff_EDI;\n  undefined8 uVar10;\n  \n  uVar10 = FUN_0004c803();\n  piVar4 = (int *)((ulonglong)uVar10 >> 0x20);\n  pbVar3 = (byte *)uVar10;\n  *piVar4 = 1;\n  if (pbVar3 == (byte *)0x0) {\n    piVar4 = __errno_location();\n    *piVar4 = 0x16;\n  }\n  else {\n    uVar7 = (uint)*pbVar3;\n    iVar6 = 0;\n    uVar5 = uVar7;\n    puVar8 = (uint *)(unaff_EDI + 0x129c69);\n    if ((*pbVar3 & 0x80) != 0) {\n      do {\n        iVar2 = iVar6 + 1;\n        if ((((pbVar3[iVar2] ^ 0x80) & 0xc0) != 0) || (0x10ffff < (int)uVar5)) goto LAB_0019fbb8;\n        iVar6 = iVar6 + 1;\n        puVar9 = puVar8 + 4;\n        uVar5 = uVar5 << 6 | (uint)(pbVar3[iVar2] ^ 0x80);\n        if (iVar6 == 6) goto LAB_0019fbb8;\n        puVar1 = puVar8 + 5;\n        puVar8 = puVar9;\n      } while ((*puVar9 & uVar7) != *puVar1);\n    }\n    iVar2 = unaff_EDI + 0x129c69 + iVar6 * 0x10;\n    uVar5 = *(uint *)(iVar2 + 8) & uVar5;\n    if (*(int *)(iVar2 + 0xc) <= (int)uVar5) {\n      *piVar4 = iVar6 + 1;\n      return uVar5;\n    }\nLAB_0019fbb8:\n    piVar4 = __errno_location();\n    *piVar4 = 0x54;\n  }\n  return 0xffffffff;\n}" (type_identifier "uint") (function_declarator "FUN_0019fb10(void)" (identifier "FUN_0019fb10") (parameter_list "(void)" (( "(") (parameter_declaration "void" (primitive_type "void")) () ")"))) (compound_statement "{\n  uint *puVar1;\n  int iVar2;\n  byte *pbVar3;\n  int *piVar4;\n  uint uVar5;\n  int iVar6;\n  uint uVar7;\n  uint *puVar8;\n  uint *puVar9;\n  int unaff_EDI;\n  undefined8 uVar10;\n  \n  uVar10 = FUN_0004c803();\n  piVar4 = (int *)((ulonglong)uVar10 >> 0x20);\n  pbVar3 = (byte *)uVar10;\n  *piVar4 = 1;\n  if (pbVar3 == (byte *)0x0) {\n    piVar4 = __errno_location();\n    *piVar4 = 0x16;\n  }\n  else {\n    uVar7 = (uint)*pbVar3;\n    iVar6 = 0;\n    uVar5 = uVar7;\n    puVar8 = (uint *)(unaff_EDI + 0x129c69);\n    if ((*pbVar3 & 0x80) != 0) {\n      do {\n        iVar2 = iVar6 + 1;\n        if ((((pbVar3[iVar2] ^ 0x80) & 0xc0) != 0) || (0x10ffff < (int)uVar5)) goto LAB_0019fbb8;\n        iVar6 = iVar6 + 1;\n        puVar9 = puVar8 + 4;\n        uVar5 = uVar5 << 6 | (uint)(pbVar3[iVar2] ^ 0x80);\n        if (iVar6 == 6) goto LAB_0019fbb8;\n        puVar1 = puVar8 + 5;\n        puVar8 = puVar9;\n      } while ((*puVar9 & uVar7) != *puVar1);\n    }\n    iVar2 = unaff_EDI + 0x129c69 + iVar6 * 0x10;\n    uVar5 = *(uint *)(iVar2 + 8) & uVar5;\n    if (*(int *)(iVar2 + 0xc) <= (int)uVar5) {\n      *piVar4 = iVar6 + 1;\n      return uVar5;\n    }\nLAB_0019fbb8:\n    piVar4 = __errno_location();\n    *piVar4 = 0x54;\n  }\n  return 0xffffffff;\n}" ({ "{") (declaration "uint *puVar1;" (type_identifier "uint") (pointer_declarator "*puVar1" (* "*") (identifier "puVar1")) (; ";")) (declaration "int iVar2;" (primitive_type "int") (identifier "iVar2") (; ";")) (declaration "byte *pbVar3;" (type_identifier "byte") (pointer_declarator "*pbVar3" (* "*") (identifier "pbVar3")) (; ";")) (declaration "int *piVar4;" (primitive_type "int") (pointer_declarator "*piVar4" (* "*") (identifier "piVar4")) (; ";")) (declaration "uint uVar5;" (type_identifier "uint") (identifier "uVar5") (; ";")) (declaration "int iVar6;" (primitive_type "int") (identifier "iVar6") (; ";")) (declaration "uint uVar7;" (type_identifier "uint") (identifier "uVar7") (; ";")) (declaration "uint *puVar8;" (type_identifier "uint") (pointer_declarator "*puVar8" (* "*") (identifier "puVar8")) (; ";")) (declaration "uint *puVar9;" (type_identifier "uint") (pointer_declarator "*puVar9" (* "*") (identifier "puVar9")) (; ";")) (declaration "int unaff_EDI;" (primitive_type "int") (identifier "unaff_EDI") (; ";")) (declaration "undefined8 uVar10;" (type_identifier "undefined8") (identifier "uVar10") (; ";")) (expression_statement "uVar10 = FUN_0004c803();" (assignment_expression "uVar10 = FUN_0004c803()" (identifier "uVar10") (= "=") (call_expression "FUN_0004c803()" (identifier "FUN_0004c803") (argument_list "()" (( "(") () ")")))) (; ";")) (expression_statement "piVar4 = (int *)((ulonglong)uVar10 >> 0x20);" (assignment_expression "piVar4 = (int *)((ulonglong)uVar10 >> 0x20)" (identifier "piVar4") (= "=") (cast_expression "(int *)((ulonglong)uVar10 >> 0x20)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "((ulonglong)uVar10 >> 0x20)" (( "(") (binary_expression "(ulonglong)uVar10 >> 0x20" (cast_expression "(ulonglong)uVar10" (( "(") (type_descriptor "ulonglong" (type_identifier "ulonglong")) () ")") (identifier "uVar10")) (>> ">>") (number_literal "0x20")) () ")")))) (; ";")) (expression_statement "pbVar3 = (byte *)uVar10;" (assignment_expression "pbVar3 = (byte *)uVar10" (identifier "pbVar3") (= "=") (cast_expression "(byte *)uVar10" (( "(") (type_descriptor "byte *" (type_identifier "byte") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "uVar10"))) (; ";")) (expression_statement "*piVar4 = 1;" (assignment_expression "*piVar4 = 1" (pointer_expression "*piVar4" (* "*") (identifier "piVar4")) (= "=") (number_literal "1")) (; ";")) (if_statement "if (pbVar3 == (byte *)0x0) {\n    piVar4 = __errno_location();\n    *piVar4 = 0x16;\n  }\n  else {\n    uVar7 = (uint)*pbVar3;\n    iVar6 = 0;\n    uVar5 = uVar7;\n    puVar8 = (uint *)(unaff_EDI + 0x129c69);\n    if ((*pbVar3 & 0x80) != 0) {\n      do {\n        iVar2 = iVar6 + 1;\n        if ((((pbVar3[iVar2] ^ 0x80) & 0xc0) != 0) || (0x10ffff < (int)uVar5)) goto LAB_0019fbb8;\n        iVar6 = iVar6 + 1;\n        puVar9 = puVar8 + 4;\n        uVar5 = uVar5 << 6 | (uint)(pbVar3[iVar2] ^ 0x80);\n        if (iVar6 == 6) goto LAB_0019fbb8;\n        puVar1 = puVar8 + 5;\n        puVar8 = puVar9;\n      } while ((*puVar9 & uVar7) != *puVar1);\n    }\n    iVar2 = unaff_EDI + 0x129c69 + iVar6 * 0x10;\n    uVar5 = *(uint *)(iVar2 + 8) & uVar5;\n    if (*(int *)(iVar2 + 0xc) <= (int)uVar5) {\n      *piVar4 = iVar6 + 1;\n      return uVar5;\n    }\nLAB_0019fbb8:\n    piVar4 = __errno_location();\n    *piVar4 = 0x54;\n  }" (if "if") (parenthesized_expression "(pbVar3 == (byte *)0x0)" (( "(") (binary_expression "pbVar3 == (byte *)0x0" (identifier "pbVar3") (== "==") (cast_expression "(byte *)0x0" (( "(") (type_descriptor "byte *" (type_identifier "byte") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\n    piVar4 = __errno_location();\n    *piVar4 = 0x16;\n  }" ({ "{") (expression_statement "piVar4 = __errno_location();" (assignment_expression "piVar4 = __errno_location()" (identifier "piVar4") (= "=") (call_expression "__errno_location()" (identifier "__errno_location") (argument_list "()" (( "(") () ")")))) (; ";")) (expression_statement "*piVar4 = 0x16;" (assignment_expression "*piVar4 = 0x16" (pointer_expression "*piVar4" (* "*") (identifier "piVar4")) (= "=") (number_literal "0x16")) (; ";")) (} "}")) (else_clause "else {\n    uVar7 = (uint)*pbVar3;\n    iVar6 = 0;\n    uVar5 = uVar7;\n    puVar8 = (uint *)(unaff_EDI + 0x129c69);\n    if ((*pbVar3 & 0x80) != 0) {\n      do {\n        iVar2 = iVar6 + 1;\n        if ((((pbVar3[iVar2] ^ 0x80) & 0xc0) != 0) || (0x10ffff < (int)uVar5)) goto LAB_0019fbb8;\n        iVar6 = iVar6 + 1;\n        puVar9 = puVar8 + 4;\n        uVar5 = uVar5 << 6 | (uint)(pbVar3[iVar2] ^ 0x80);\n        if (iVar6 == 6) goto LAB_0019fbb8;\n        puVar1 = puVar8 + 5;\n        puVar8 = puVar9;\n      } while ((*puVar9 & uVar7) != *puVar1);\n    }\n    iVar2 = unaff_EDI + 0x129c69 + iVar6 * 0x10;\n    uVar5 = *(uint *)(iVar2 + 8) & uVar5;\n    if (*(int *)(iVar2 + 0xc) <= (int)uVar5) {\n      *piVar4 = iVar6 + 1;\n      return uVar5;\n    }\nLAB_0019fbb8:\n    piVar4 = __errno_location();\n    *piVar4 = 0x54;\n  }" (else "else") (compound_statement "{\n    uVar7 = (uint)*pbVar3;\n    iVar6 = 0;\n    uVar5 = uVar7;\n    puVar8 = (uint *)(unaff_EDI + 0x129c69);\n    if ((*pbVar3 & 0x80) != 0) {\n      do {\n        iVar2 = iVar6 + 1;\n        if ((((pbVar3[iVar2] ^ 0x80) & 0xc0) != 0) || (0x10ffff < (int)uVar5)) goto LAB_0019fbb8;\n        iVar6 = iVar6 + 1;\n        puVar9 = puVar8 + 4;\n        uVar5 = uVar5 << 6 | (uint)(pbVar3[iVar2] ^ 0x80);\n        if (iVar6 == 6) goto LAB_0019fbb8;\n        puVar1 = puVar8 + 5;\n        puVar8 = puVar9;\n      } while ((*puVar9 & uVar7) != *puVar1);\n    }\n    iVar2 = unaff_EDI + 0x129c69 + iVar6 * 0x10;\n    uVar5 = *(uint *)(iVar2 + 8) & uVar5;\n    if (*(int *)(iVar2 + 0xc) <= (int)uVar5) {\n      *piVar4 = iVar6 + 1;\n      return uVar5;\n    }\nLAB_0019fbb8:\n    piVar4 = __errno_location();\n    *piVar4 = 0x54;\n  }" ({ "{") (expression_statement "uVar7 = (uint)*pbVar3;" (assignment_expression "uVar7 = (uint)*pbVar3" (identifier "uVar7") (= "=") (binary_expression "(uint)*pbVar3" (parenthesized_expression "(uint)" (( "(") (identifier "uint") () ")")) (* "*") (identifier "pbVar3"))) (; ";")) (expression_statement "iVar6 = 0;" (assignment_expression "iVar6 = 0" (identifier "iVar6") (= "=") (number_literal "0")) (; ";")) (expression_statement "uVar5 = uVar7;" (assignment_expression "uVar5 = uVar7" (identifier "uVar5") (= "=") (identifier "uVar7")) (; ";")) (expression_statement "puVar8 = (uint *)(unaff_EDI + 0x129c69);" (assignment_expression "puVar8 = (uint *)(unaff_EDI + 0x129c69)" (identifier "puVar8") (= "=") (cast_expression "(uint *)(unaff_EDI + 0x129c69)" (( "(") (type_descriptor "uint *" (type_identifier "uint") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(unaff_EDI + 0x129c69)" (( "(") (binary_expression "unaff_EDI + 0x129c69" (identifier "unaff_EDI") (+ "+") (number_literal "0x129c69")) () ")")))) (; ";")) (if_statement "if ((*pbVar3 & 0x80) != 0) {\n      do {\n        iVar2 = iVar6 + 1;\n        if ((((pbVar3[iVar2] ^ 0x80) & 0xc0) != 0) || (0x10ffff < (int)uVar5)) goto LAB_0019fbb8;\n        iVar6 = iVar6 + 1;\n        puVar9 = puVar8 + 4;\n        uVar5 = uVar5 << 6 | (uint)(pbVar3[iVar2] ^ 0x80);\n        if (iVar6 == 6) goto LAB_0019fbb8;\n        puVar1 = puVar8 + 5;\n        puVar8 = puVar9;\n      } while ((*puVar9 & uVar7) != *puVar1);\n    }" (if "if") (parenthesized_expression "((*pbVar3 & 0x80) != 0)" (( "(") (binary_expression "(*pbVar3 & 0x80) != 0" (parenthesized_expression "(*pbVar3 & 0x80)" (( "(") (binary_expression "*pbVar3 & 0x80" (pointer_expression "*pbVar3" (* "*") (identifier "pbVar3")) (& "&") (number_literal "0x80")) () ")")) (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n      do {\n        iVar2 = iVar6 + 1;\n        if ((((pbVar3[iVar2] ^ 0x80) & 0xc0) != 0) || (0x10ffff < (int)uVar5)) goto LAB_0019fbb8;\n        iVar6 = iVar6 + 1;\n        puVar9 = puVar8 + 4;\n        uVar5 = uVar5 << 6 | (uint)(pbVar3[iVar2] ^ 0x80);\n        if (iVar6 == 6) goto LAB_0019fbb8;\n        puVar1 = puVar8 + 5;\n        puVar8 = puVar9;\n      } while ((*puVar9 & uVar7) != *puVar1);\n    }" ({ "{") (do_statement "do {\n        iVar2 = iVar6 + 1;\n        if ((((pbVar3[iVar2] ^ 0x80) & 0xc0) != 0) || (0x10ffff < (int)uVar5)) goto LAB_0019fbb8;\n        iVar6 = iVar6 + 1;\n        puVar9 = puVar8 + 4;\n        uVar5 = uVar5 << 6 | (uint)(pbVar3[iVar2] ^ 0x80);\n        if (iVar6 == 6) goto LAB_0019fbb8;\n        puVar1 = puVar8 + 5;\n        puVar8 = puVar9;\n      } while ((*puVar9 & uVar7) != *puVar1);" (do "do") (compound_statement "{\n        iVar2 = iVar6 + 1;\n        if ((((pbVar3[iVar2] ^ 0x80) & 0xc0) != 0) || (0x10ffff < (int)uVar5)) goto LAB_0019fbb8;\n        iVar6 = iVar6 + 1;\n        puVar9 = puVar8 + 4;\n        uVar5 = uVar5 << 6 | (uint)(pbVar3[iVar2] ^ 0x80);\n        if (iVar6 == 6) goto LAB_0019fbb8;\n        puVar1 = puVar8 + 5;\n        puVar8 = puVar9;\n      }" ({ "{") (expression_statement "iVar2 = iVar6 + 1;" (assignment_expression "iVar2 = iVar6 + 1" (identifier "iVar2") (= "=") (binary_expression "iVar6 + 1" (identifier "iVar6") (+ "+") (number_literal "1"))) (; ";")) (if_statement "if ((((pbVar3[iVar2] ^ 0x80) & 0xc0) != 0) || (0x10ffff < (int)uVar5)) goto LAB_0019fbb8;" (if "if") (parenthesized_expression "((((pbVar3[iVar2] ^ 0x80) & 0xc0) != 0) || (0x10ffff < (int)uVar5))" (( "(") (binary_expression "(((pbVar3[iVar2] ^ 0x80) & 0xc0) != 0) || (0x10ffff < (int)uVar5)" (parenthesized_expression "(((pbVar3[iVar2] ^ 0x80) & 0xc0) != 0)" (( "(") (binary_expression "((pbVar3[iVar2] ^ 0x80) & 0xc0) != 0" (parenthesized_expression "((pbVar3[iVar2] ^ 0x80) & 0xc0)" (( "(") (binary_expression "(pbVar3[iVar2] ^ 0x80) & 0xc0" (parenthesized_expression "(pbVar3[iVar2] ^ 0x80)" (( "(") (binary_expression "pbVar3[iVar2] ^ 0x80" (subscript_expression "pbVar3[iVar2]" (identifier "pbVar3") ([ "[") (identifier "iVar2") (] "]")) (^ "^") (number_literal "0x80")) () ")")) (& "&") (number_literal "0xc0")) () ")")) (!= "!=") (number_literal "0")) () ")")) (|| "||") (parenthesized_expression "(0x10ffff < (int)uVar5)" (( "(") (binary_expression "0x10ffff < (int)uVar5" (number_literal "0x10ffff") (< "<") (cast_expression "(int)uVar5" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "uVar5"))) () ")"))) () ")")) (goto_statement "goto LAB_0019fbb8;" (goto "goto") (statement_identifier "LAB_0019fbb8") (; ";"))) (expression_statement "iVar6 = iVar6 + 1;" (assignment_expression "iVar6 = iVar6 + 1" (identifier "iVar6") (= "=") (binary_expression "iVar6 + 1" (identifier "iVar6") (+ "+") (number_literal "1"))) (; ";")) (expression_statement "puVar9 = puVar8 + 4;" (assignment_expression "puVar9 = puVar8 + 4" (identifier "puVar9") (= "=") (binary_expression "puVar8 + 4" (identifier "puVar8") (+ "+") (number_literal "4"))) (; ";")) (expression_statement "uVar5 = uVar5 << 6 | (uint)(pbVar3[iVar2] ^ 0x80);" (assignment_expression "uVar5 = uVar5 << 6 | (uint)(pbVar3[iVar2] ^ 0x80)" (identifier "uVar5") (= "=") (binary_expression "uVar5 << 6 | (uint)(pbVar3[iVar2] ^ 0x80)" (binary_expression "uVar5 << 6" (identifier "uVar5") (<< "<<") (number_literal "6")) (| "|") (call_expression "(uint)(pbVar3[iVar2] ^ 0x80)" (parenthesized_expression "(uint)" (( "(") (identifier "uint") () ")")) (argument_list "(pbVar3[iVar2] ^ 0x80)" (( "(") (binary_expression "pbVar3[iVar2] ^ 0x80" (subscript_expression "pbVar3[iVar2]" (identifier "pbVar3") ([ "[") (identifier "iVar2") (] "]")) (^ "^") (number_literal "0x80")) () ")"))))) (; ";")) (if_statement "if (iVar6 == 6) goto LAB_0019fbb8;" (if "if") (parenthesized_expression "(iVar6 == 6)" (( "(") (binary_expression "iVar6 == 6" (identifier "iVar6") (== "==") (number_literal "6")) () ")")) (goto_statement "goto LAB_0019fbb8;" (goto "goto") (statement_identifier "LAB_0019fbb8") (; ";"))) (expression_statement "puVar1 = puVar8 + 5;" (assignment_expression "puVar1 = puVar8 + 5" (identifier "puVar1") (= "=") (binary_expression "puVar8 + 5" (identifier "puVar8") (+ "+") (number_literal "5"))) (; ";")) (expression_statement "puVar8 = puVar9;" (assignment_expression "puVar8 = puVar9" (identifier "puVar8") (= "=") (identifier "puVar9")) (; ";")) (} "}")) (while "while") (parenthesized_expression "((*puVar9 & uVar7) != *puVar1)" (( "(") (binary_expression "(*puVar9 & uVar7) != *puVar1" (parenthesized_expression "(*puVar9 & uVar7)" (( "(") (binary_expression "*puVar9 & uVar7" (pointer_expression "*puVar9" (* "*") (identifier "puVar9")) (& "&") (identifier "uVar7")) () ")")) (!= "!=") (pointer_expression "*puVar1" (* "*") (identifier "puVar1"))) () ")")) (; ";")) (} "}"))) (expression_statement "iVar2 = unaff_EDI + 0x129c69 + iVar6 * 0x10;" (assignment_expression "iVar2 = unaff_EDI + 0x129c69 + iVar6 * 0x10" (identifier "iVar2") (= "=") (binary_expression "unaff_EDI + 0x129c69 + iVar6 * 0x10" (binary_expression "unaff_EDI + 0x129c69" (identifier "unaff_EDI") (+ "+") (number_literal "0x129c69")) (+ "+") (binary_expression "iVar6 * 0x10" (identifier "iVar6") (* "*") (number_literal "0x10")))) (; ";")) (expression_statement "uVar5 = *(uint *)(iVar2 + 8) & uVar5;" (assignment_expression "uVar5 = *(uint *)(iVar2 + 8) & uVar5" (identifier "uVar5") (= "=") (binary_expression "*(uint *)(iVar2 + 8) & uVar5" (pointer_expression "*(uint *)(iVar2 + 8)" (* "*") (cast_expression "(uint *)(iVar2 + 8)" (( "(") (type_descriptor "uint *" (type_identifier "uint") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar2 + 8)" (( "(") (binary_expression "iVar2 + 8" (identifier "iVar2") (+ "+") (number_literal "8")) () ")")))) (& "&") (identifier "uVar5"))) (; ";")) (if_statement "if (*(int *)(iVar2 + 0xc) <= (int)uVar5) {\n      *piVar4 = iVar6 + 1;\n      return uVar5;\n    }" (if "if") (parenthesized_expression "(*(int *)(iVar2 + 0xc) <= (int)uVar5)" (( "(") (binary_expression "*(int *)(iVar2 + 0xc) <= (int)uVar5" (pointer_expression "*(int *)(iVar2 + 0xc)" (* "*") (cast_expression "(int *)(iVar2 + 0xc)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar2 + 0xc)" (( "(") (binary_expression "iVar2 + 0xc" (identifier "iVar2") (+ "+") (number_literal "0xc")) () ")")))) (<= "<=") (cast_expression "(int)uVar5" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "uVar5"))) () ")")) (compound_statement "{\n      *piVar4 = iVar6 + 1;\n      return uVar5;\n    }" ({ "{") (expression_statement "*piVar4 = iVar6 + 1;" (assignment_expression "*piVar4 = iVar6 + 1" (pointer_expression "*piVar4" (* "*") (identifier "piVar4")) (= "=") (binary_expression "iVar6 + 1" (identifier "iVar6") (+ "+") (number_literal "1"))) (; ";")) (return_statement "return uVar5;" (return "return") (identifier "uVar5") (; ";")) (} "}"))) (labeled_statement "LAB_0019fbb8:\n    piVar4 = __errno_location();" (statement_identifier "LAB_0019fbb8") (: ":") (expression_statement "piVar4 = __errno_location();" (assignment_expression "piVar4 = __errno_location()" (identifier "piVar4") (= "=") (call_expression "__errno_location()" (identifier "__errno_location") (argument_list "()" (( "(") () ")")))) (; ";"))) (expression_statement "*piVar4 = 0x54;" (assignment_expression "*piVar4 = 0x54" (pointer_expression "*piVar4" (* "*") (identifier "piVar4")) (= "=") (number_literal "0x54")) (; ";")) (} "}")))) (return_statement "return 0xffffffff;" (return "return") (number_literal "0xffffffff") (; ";")) (} "}")))

int function_1(char *text,type_1 *octets)

{
  type_1 *puVar1;
  int var_9;
  type_2 *var_2;
  int *piVar4;
  type_1 var_7;
  int var_5;
  type_1 var_8;
  type_1 *var_6;
  type_1 *puVar9;
  int var_4;
  type_3 uVar10;
  
  uVar10 = var_1();
  piVar4 = (int *)((type_4)uVar10 >> 0x20);
  var_2 = (type_2 *)uVar10;
  *piVar4 = 1;
  if (var_2 == (type_2 *)0x0) {
    piVar4 = var_3();
    *piVar4 = 0x16;
  }
  else {
    var_8 = (type_1)*var_2;
    var_5 = 0;
    var_7 = var_8;
    var_6 = (type_1 *)(var_4 + 0x129c69);
    if ((*var_2 & 0x80) != 0) {
      do {
        var_9 = var_5 + 1;
        if ((((var_2[var_9] ^ 0x80) & 0xc0) != 0) || (0x10ffff < (int)var_7)) goto LAB_0019fbb8;
        var_5 = var_5 + 1;
        puVar9 = var_6 + 4;
        var_7 = var_7 << 6 | (type_1)(var_2[var_9] ^ 0x80);
        if (var_5 == 6) goto LAB_0019fbb8;
        puVar1 = var_6 + 5;
        var_6 = puVar9;
      } while ((*puVar9 & var_8) != *puVar1);
    }
    var_9 = var_4 + 0x129c69 + var_5 * 0x10;
    var_7 = *(type_1 *)(var_9 + 8) & var_7;
    if (*(int *)(var_9 + 0xc) <= (int)var_7) {
      *piVar4 = var_5 + 1;
      return var_7;
    }
LAB_0019fbb8:
    piVar4 = var_3();
    *piVar4 = 0x54;
  }
  return -1;
}


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

uint MASKED(void)

{
  uint *puVar1;
  int iVar2;
  byte *pbVar3;
  int *piVar4;
  uint uVar5;
  int iVar6;
  uint uVar7;
  uint *puVar8;
  uint *puVar9;
  int unaff_EDI;
  undefined8 uVar10;
  
  uVar10 = FUN_0004c803();
  piVar4 = (int *)((ulonglong)uVar10 >> 0x20);
  pbVar3 = (byte *)uVar10;
  *piVar4 = 1;
  if (pbVar3 == (byte *)0x0) {
    piVar4 = __errno_location();
    *piVar4 = 0x16;
  }
  else {
    uVar7 = (uint)*pbVar3;
    iVar6 = 0;
    uVar5 = uVar7;
    puVar8 = (uint *)(unaff_EDI + 0x129c69);
    if ((*pbVar3 & 0x80) != 0) {
      do {
        iVar2 = iVar6 + 1;
        if ((((pbVar3[iVar2] ^ 0x80) & 0xc0) != 0) || (0x10ffff < (int)uVar5)) goto LAB_0019fbb8;
        iVar6 = iVar6 + 1;
        puVar9 = puVar8 + 4;
        uVar5 = uVar5 << 6 | (uint)(pbVar3[iVar2] ^ 0x80);
        if (iVar6 == 6) goto LAB_0019fbb8;
        puVar1 = puVar8 + 5;
        puVar8 = puVar9;
      } while ((*puVar9 & uVar7) != *puVar1);
    }
    iVar2 = unaff_EDI + 0x129c69 + iVar6 * 0x10;
    uVar5 = *(uint *)(iVar2 + 8) & uVar5;
    if (*(int *)(iVar2 + 0xc) <= (int)uVar5) {
      *piVar4 = iVar6 + 1;
      return uVar5;
    }
LAB_0019fbb8:
    piVar4 = __errno_location();
    *piVar4 = 0x54;
  }
  return 0xffffffff;
}

