
wchar_t der_length_utf8_string(wchar_t *in,ulong noctets,ulong *outlen)

{
  wchar_t *pwVar1;
  uint uVar2;
  wchar_t wVar3;
  ulong uVar4;
  ulong uVar5;
  ulong uVar6;
  ulong uVar7;
  ulong uVar8;
  ulong uVar9;
  
  if (in == (wchar_t *)0x0) {
                    /* WARNING: Subroutine does not return */
    crypt_argchk("in != NULL","src/pk/asn1/der/utf8/der_length_utf8_string.c",0x45);
  }
  if (outlen == (ulong *)0x0) {
                    /* WARNING: Subroutine does not return */
    crypt_argchk("outlen != NULL","src/pk/asn1/der/utf8/der_length_utf8_string.c",0x46);
  }
  uVar4 = 0;
  uVar9 = 0;
  if (noctets == 0) {
    uVar4 = 2;
  }
  else {
    uVar2 = (uint)noctets & 3;
    if ((noctets & 3) == 0) goto LAB_00177ea1;
    if (uVar2 != 1) {
      if (uVar2 != 2) {
        wVar3 = der_utf8_valid_char(*in);
        if (wVar3 == L'\0') {
          return L'\x10';
        }
        uVar9 = 1;
        uVar4 = der_utf8_charsize(*in);
      }
      wVar3 = der_utf8_valid_char(in[uVar9]);
      if (wVar3 == L'\0') {
        return L'\x10';
      }
      pwVar1 = in + uVar9;
      uVar9 = uVar9 + 1;
      uVar5 = der_utf8_charsize(*pwVar1);
      uVar4 = uVar4 + uVar5;
    }
    wVar3 = der_utf8_valid_char(in[uVar9]);
    if (wVar3 == L'\0') {
      return L'\x10';
    }
    uVar5 = der_utf8_charsize(in[uVar9]);
    uVar4 = uVar4 + uVar5;
    for (uVar9 = uVar9 + 1; noctets != uVar9; uVar9 = uVar9 + 4) {
LAB_00177ea1:
      wVar3 = der_utf8_valid_char(in[uVar9]);
      if (wVar3 == L'\0') {
        return L'\x10';
      }
      uVar5 = der_utf8_charsize(in[uVar9]);
      wVar3 = der_utf8_valid_char(in[uVar9 + 1]);
      if (wVar3 == L'\0') {
        return L'\x10';
      }
      uVar6 = der_utf8_charsize(in[uVar9 + 1]);
      wVar3 = der_utf8_valid_char(in[uVar9 + 2]);
      if (wVar3 == L'\0') {
        return L'\x10';
      }
      uVar7 = der_utf8_charsize(in[uVar9 + 2]);
      wVar3 = der_utf8_valid_char(in[uVar9 + 3]);
      if (wVar3 == L'\0') {
        return L'\x10';
      }
      uVar8 = der_utf8_charsize(in[uVar9 + 3]);
      uVar4 = uVar4 + uVar5 + uVar6 + uVar7 + uVar8;
    }
    if (uVar4 < 0x80) {
      uVar4 = uVar4 + 2;
    }
    else {
      if (uVar4 < 0x100) {
        *outlen = uVar4 + 3;
        return L'\0';
      }
      if (uVar4 < 0x10000) {
        *outlen = uVar4 + 4;
        return L'\0';
      }
      if (0xffffff < uVar4) {
        return L'\x10';
      }
      uVar4 = uVar4 + 5;
    }
  }
  *outlen = uVar4;
  return L'\0';
}



undefined8 der_length_utf8_string(undefined4 *param_1,ulong param_2,long *param_3)

{
  undefined4 *puVar1;
  uint uVar2;
  int iVar3;
  ulong uVar4;
  long lVar5;
  long lVar6;
  long lVar7;
  long lVar8;
  ulong uVar9;
  
  if (param_1 == (undefined4 *)0x0) {
                    /* WARNING: Subroutine does not return */
    crypt_argchk("in != NULL","src/pk/asn1/der/utf8/der_length_utf8_string.c",0x45);
  }
  if (param_3 == (long *)0x0) {
                    /* WARNING: Subroutine does not return */
    crypt_argchk("outlen != NULL","src/pk/asn1/der/utf8/der_length_utf8_string.c",0x46);
  }
  uVar4 = 0;
  uVar9 = 0;
  if (param_2 == 0) {
    lVar5 = 2;
  }
  else {
    uVar2 = (uint)param_2 & 3;
    if ((param_2 & 3) == 0) goto LAB_00177ea1;
    if (uVar2 != 1) {
      if (uVar2 != 2) {
        iVar3 = der_utf8_valid_char(*param_1);
        if (iVar3 == 0) {
          return 0x10;
        }
        uVar9 = 1;
        uVar4 = der_utf8_charsize(*param_1);
      }
      iVar3 = der_utf8_valid_char(param_1[uVar9]);
      if (iVar3 == 0) {
        return 0x10;
      }
      puVar1 = param_1 + uVar9;
      uVar9 = uVar9 + 1;
      lVar5 = der_utf8_charsize(*puVar1);
      uVar4 = uVar4 + lVar5;
    }
    iVar3 = der_utf8_valid_char(param_1[uVar9]);
    if (iVar3 == 0) {
      return 0x10;
    }
    lVar5 = der_utf8_charsize(param_1[uVar9]);
    uVar4 = uVar4 + lVar5;
    for (uVar9 = uVar9 + 1; param_2 != uVar9; uVar9 = uVar9 + 4) {
LAB_00177ea1:
      iVar3 = der_utf8_valid_char(param_1[uVar9]);
      if (iVar3 == 0) {
        return 0x10;
      }
      lVar5 = der_utf8_charsize(param_1[uVar9]);
      iVar3 = der_utf8_valid_char(param_1[uVar9 + 1]);
      if (iVar3 == 0) {
        return 0x10;
      }
      lVar6 = der_utf8_charsize(param_1[uVar9 + 1]);
      iVar3 = der_utf8_valid_char(param_1[uVar9 + 2]);
      if (iVar3 == 0) {
        return 0x10;
      }
      lVar7 = der_utf8_charsize(param_1[uVar9 + 2]);
      iVar3 = der_utf8_valid_char(param_1[uVar9 + 3]);
      if (iVar3 == 0) {
        return 0x10;
      }
      lVar8 = der_utf8_charsize(param_1[uVar9 + 3]);
      uVar4 = uVar4 + lVar5 + lVar6 + lVar7 + lVar8;
    }
    if (uVar4 < 0x80) {
      lVar5 = uVar4 + 2;
    }
    else {
      if (uVar4 < 0x100) {
        *param_3 = uVar4 + 3;
        return 0;
      }
      if (uVar4 < 0x10000) {
        *param_3 = uVar4 + 4;
        return 0;
      }
      if (0xffffff < uVar4) {
        return 0x10;
      }
      lVar5 = uVar4 + 5;
    }
  }
  *param_3 = lVar5;
  return 0;
}


PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x8
TEST RDI,RDI
JZ 0x00177fae
MOV R14,RDX
TEST RDX,RDX
JZ 0x00177fc6
MOV R13,RSI
XOR EBP,EBP
XOR EBX,EBX
TEST RSI,RSI
JZ 0x00177fa7
MOV RAX,RSI
MOV R12,RDI
AND EAX,0x3
JZ 0x00177ea1
CMP RAX,0x1
JZ 0x00177e7b
CMP RAX,0x2
JZ 0x00177e5a
MOV EDI,dword ptr [RDI]
CALL 0x00113930
TEST EAX,EAX
JZ 0x00177f48
MOV EDI,dword ptr [R12]
MOV EBX,0x1
CALL 0x00113c90
MOV RBP,RAX
MOV EDI,dword ptr [R12 + RBX*0x4]
CALL 0x00113930
TEST EAX,EAX
JZ 0x00177f48
MOV EDI,dword ptr [R12 + RBX*0x4]
ADD RBX,0x1
CALL 0x00113c90
ADD RBP,RAX
MOV EDI,dword ptr [R12 + RBX*0x4]
CALL 0x00113930
TEST EAX,EAX
JZ 0x00177f48
MOV EDI,dword ptr [R12 + RBX*0x4]
ADD RBX,0x1
CALL 0x00113c90
ADD RBP,RAX
CMP R13,RBX
JZ 0x00177f1e
MOV EDI,dword ptr [R12 + RBX*0x4]
CALL 0x00113930
TEST EAX,EAX
JZ 0x00177f48
MOV EDI,dword ptr [R12 + RBX*0x4]
LEA R15,[RBX + 0x1]
CALL 0x00113c90
MOV EDI,dword ptr [R12 + R15*0x4]
ADD RBP,RAX
CALL 0x00113930
TEST EAX,EAX
JZ 0x00177f48
MOV EDI,dword ptr [R12 + R15*0x4]
LEA R15,[RBX + 0x2]
CALL 0x00113c90
MOV EDI,dword ptr [R12 + R15*0x4]
ADD RBP,RAX
CALL 0x00113930
TEST EAX,EAX
JZ 0x00177f48
MOV EDI,dword ptr [R12 + R15*0x4]
LEA R15,[RBX + 0x3]
CALL 0x00113c90
MOV EDI,dword ptr [R12 + R15*0x4]
ADD RBP,RAX
CALL 0x00113930
TEST EAX,EAX
JZ 0x00177f48
MOV EDI,dword ptr [R12 + R15*0x4]
ADD RBX,0x4
CALL 0x00113c90
ADD RBP,RAX
CMP R13,RBX
JNZ 0x00177ea1
CMP RBP,0x7f
JBE 0x00177f80
CMP RBP,0xff
JBE 0x00177f60
CMP RBP,0xffff
JA 0x00177f98
ADD RBP,0x4
XOR EAX,EAX
MOV qword ptr [R14],RBP
JMP 0x00177f4d
MOV EAX,0x10
ADD RSP,0x8
POP RBX
POP RBP
POP R12
POP R13
POP R14
POP R15
RET
ADD RBP,0x3
XOR EAX,EAX
MOV qword ptr [R14],RBP
ADD RSP,0x8
POP RBX
POP RBP
POP R12
POP R13
POP R14
POP R15
RET
ADD RBP,0x2
MOV qword ptr [R14],RBP
ADD RSP,0x8
XOR EAX,EAX
POP RBX
POP RBP
POP R12
POP R13
POP R14
POP R15
RET
CMP RBP,0xffffff
JA 0x00177f48
ADD RBP,0x5
JMP 0x00177f84
MOV EBP,0x2
JMP 0x00177f84
MOV EDX,0x45
LEA RSI,[0x1c4238]
LEA RDI,[0x1a8790]
CALL 0x00114270
MOV EDX,0x46
LEA RSI,[0x1c4238]
LEA RDI,[0x1ae804]
CALL 0x00114270
(translation_unit "undefined8 der_length_utf8_string(undefined4 *param_1,ulong param_2,long *param_3)\n\n{\n  undefined4 *puVar1;\n  uint uVar2;\n  int iVar3;\n  ulong uVar4;\n  long lVar5;\n  long lVar6;\n  long lVar7;\n  long lVar8;\n  ulong uVar9;\n  \n  if (param_1 == (undefined4 *)0x0) {\n                    /* WARNING: Subroutine does not return */\n    crypt_argchk("in != NULL","src/pk/asn1/der/utf8/der_length_utf8_string.c",0x45);\n  }\n  if (param_3 == (long *)0x0) {\n                    /* WARNING: Subroutine does not return */\n    crypt_argchk("outlen != NULL","src/pk/asn1/der/utf8/der_length_utf8_string.c",0x46);\n  }\n  uVar4 = 0;\n  uVar9 = 0;\n  if (param_2 == 0) {\n    lVar5 = 2;\n  }\n  else {\n    uVar2 = (uint)param_2 & 3;\n    if ((param_2 & 3) == 0) goto LAB_00177ea1;\n    if (uVar2 != 1) {\n      if (uVar2 != 2) {\n        iVar3 = der_utf8_valid_char(*param_1);\n        if (iVar3 == 0) {\n          return 0x10;\n        }\n        uVar9 = 1;\n        uVar4 = der_utf8_charsize(*param_1);\n      }\n      iVar3 = der_utf8_valid_char(param_1[uVar9]);\n      if (iVar3 == 0) {\n        return 0x10;\n      }\n      puVar1 = param_1 + uVar9;\n      uVar9 = uVar9 + 1;\n      lVar5 = der_utf8_charsize(*puVar1);\n      uVar4 = uVar4 + lVar5;\n    }\n    iVar3 = der_utf8_valid_char(param_1[uVar9]);\n    if (iVar3 == 0) {\n      return 0x10;\n    }\n    lVar5 = der_utf8_charsize(param_1[uVar9]);\n    uVar4 = uVar4 + lVar5;\n    for (uVar9 = uVar9 + 1; param_2 != uVar9; uVar9 = uVar9 + 4) {\nLAB_00177ea1:\n      iVar3 = der_utf8_valid_char(param_1[uVar9]);\n      if (iVar3 == 0) {\n        return 0x10;\n      }\n      lVar5 = der_utf8_charsize(param_1[uVar9]);\n      iVar3 = der_utf8_valid_char(param_1[uVar9 + 1]);\n      if (iVar3 == 0) {\n        return 0x10;\n      }\n      lVar6 = der_utf8_charsize(param_1[uVar9 + 1]);\n      iVar3 = der_utf8_valid_char(param_1[uVar9 + 2]);\n      if (iVar3 == 0) {\n        return 0x10;\n      }\n      lVar7 = der_utf8_charsize(param_1[uVar9 + 2]);\n      iVar3 = der_utf8_valid_char(param_1[uVar9 + 3]);\n      if (iVar3 == 0) {\n        return 0x10;\n      }\n      lVar8 = der_utf8_charsize(param_1[uVar9 + 3]);\n      uVar4 = uVar4 + lVar5 + lVar6 + lVar7 + lVar8;\n    }\n    if (uVar4 < 0x80) {\n      lVar5 = uVar4 + 2;\n    }\n    else {\n      if (uVar4 < 0x100) {\n        *param_3 = uVar4 + 3;\n        return 0;\n      }\n      if (uVar4 < 0x10000) {\n        *param_3 = uVar4 + 4;\n        return 0;\n      }\n      if (0xffffff < uVar4) {\n        return 0x10;\n      }\n      lVar5 = uVar4 + 5;\n    }\n  }\n  *param_3 = lVar5;\n  return 0;\n}\n\n" (function_definition "undefined8 der_length_utf8_string(undefined4 *param_1,ulong param_2,long *param_3)\n\n{\n  undefined4 *puVar1;\n  uint uVar2;\n  int iVar3;\n  ulong uVar4;\n  long lVar5;\n  long lVar6;\n  long lVar7;\n  long lVar8;\n  ulong uVar9;\n  \n  if (param_1 == (undefined4 *)0x0) {\n                    /* WARNING: Subroutine does not return */\n    crypt_argchk("in != NULL","src/pk/asn1/der/utf8/der_length_utf8_string.c",0x45);\n  }\n  if (param_3 == (long *)0x0) {\n                    /* WARNING: Subroutine does not return */\n    crypt_argchk("outlen != NULL","src/pk/asn1/der/utf8/der_length_utf8_string.c",0x46);\n  }\n  uVar4 = 0;\n  uVar9 = 0;\n  if (param_2 == 0) {\n    lVar5 = 2;\n  }\n  else {\n    uVar2 = (uint)param_2 & 3;\n    if ((param_2 & 3) == 0) goto LAB_00177ea1;\n    if (uVar2 != 1) {\n      if (uVar2 != 2) {\n        iVar3 = der_utf8_valid_char(*param_1);\n        if (iVar3 == 0) {\n          return 0x10;\n        }\n        uVar9 = 1;\n        uVar4 = der_utf8_charsize(*param_1);\n      }\n      iVar3 = der_utf8_valid_char(param_1[uVar9]);\n      if (iVar3 == 0) {\n        return 0x10;\n      }\n      puVar1 = param_1 + uVar9;\n      uVar9 = uVar9 + 1;\n      lVar5 = der_utf8_charsize(*puVar1);\n      uVar4 = uVar4 + lVar5;\n    }\n    iVar3 = der_utf8_valid_char(param_1[uVar9]);\n    if (iVar3 == 0) {\n      return 0x10;\n    }\n    lVar5 = der_utf8_charsize(param_1[uVar9]);\n    uVar4 = uVar4 + lVar5;\n    for (uVar9 = uVar9 + 1; param_2 != uVar9; uVar9 = uVar9 + 4) {\nLAB_00177ea1:\n      iVar3 = der_utf8_valid_char(param_1[uVar9]);\n      if (iVar3 == 0) {\n        return 0x10;\n      }\n      lVar5 = der_utf8_charsize(param_1[uVar9]);\n      iVar3 = der_utf8_valid_char(param_1[uVar9 + 1]);\n      if (iVar3 == 0) {\n        return 0x10;\n      }\n      lVar6 = der_utf8_charsize(param_1[uVar9 + 1]);\n      iVar3 = der_utf8_valid_char(param_1[uVar9 + 2]);\n      if (iVar3 == 0) {\n        return 0x10;\n      }\n      lVar7 = der_utf8_charsize(param_1[uVar9 + 2]);\n      iVar3 = der_utf8_valid_char(param_1[uVar9 + 3]);\n      if (iVar3 == 0) {\n        return 0x10;\n      }\n      lVar8 = der_utf8_charsize(param_1[uVar9 + 3]);\n      uVar4 = uVar4 + lVar5 + lVar6 + lVar7 + lVar8;\n    }\n    if (uVar4 < 0x80) {\n      lVar5 = uVar4 + 2;\n    }\n    else {\n      if (uVar4 < 0x100) {\n        *param_3 = uVar4 + 3;\n        return 0;\n      }\n      if (uVar4 < 0x10000) {\n        *param_3 = uVar4 + 4;\n        return 0;\n      }\n      if (0xffffff < uVar4) {\n        return 0x10;\n      }\n      lVar5 = uVar4 + 5;\n    }\n  }\n  *param_3 = lVar5;\n  return 0;\n}" type_identifier (function_declarator "der_length_utf8_string(undefined4 *param_1,ulong param_2,long *param_3)" identifier (parameter_list "(undefined4 *param_1,ulong param_2,long *param_3)" ( (parameter_declaration "undefined4 *param_1" type_identifier (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "ulong param_2" type_identifier identifier) , (parameter_declaration "long *param_3" (sized_type_specifier "long" long) (pointer_declarator "*param_3" * identifier)) ))) (compound_statement "{\n  undefined4 *puVar1;\n  uint uVar2;\n  int iVar3;\n  ulong uVar4;\n  long lVar5;\n  long lVar6;\n  long lVar7;\n  long lVar8;\n  ulong uVar9;\n  \n  if (param_1 == (undefined4 *)0x0) {\n                    /* WARNING: Subroutine does not return */\n    crypt_argchk("in != NULL","src/pk/asn1/der/utf8/der_length_utf8_string.c",0x45);\n  }\n  if (param_3 == (long *)0x0) {\n                    /* WARNING: Subroutine does not return */\n    crypt_argchk("outlen != NULL","src/pk/asn1/der/utf8/der_length_utf8_string.c",0x46);\n  }\n  uVar4 = 0;\n  uVar9 = 0;\n  if (param_2 == 0) {\n    lVar5 = 2;\n  }\n  else {\n    uVar2 = (uint)param_2 & 3;\n    if ((param_2 & 3) == 0) goto LAB_00177ea1;\n    if (uVar2 != 1) {\n      if (uVar2 != 2) {\n        iVar3 = der_utf8_valid_char(*param_1);\n        if (iVar3 == 0) {\n          return 0x10;\n        }\n        uVar9 = 1;\n        uVar4 = der_utf8_charsize(*param_1);\n      }\n      iVar3 = der_utf8_valid_char(param_1[uVar9]);\n      if (iVar3 == 0) {\n        return 0x10;\n      }\n      puVar1 = param_1 + uVar9;\n      uVar9 = uVar9 + 1;\n      lVar5 = der_utf8_charsize(*puVar1);\n      uVar4 = uVar4 + lVar5;\n    }\n    iVar3 = der_utf8_valid_char(param_1[uVar9]);\n    if (iVar3 == 0) {\n      return 0x10;\n    }\n    lVar5 = der_utf8_charsize(param_1[uVar9]);\n    uVar4 = uVar4 + lVar5;\n    for (uVar9 = uVar9 + 1; param_2 != uVar9; uVar9 = uVar9 + 4) {\nLAB_00177ea1:\n      iVar3 = der_utf8_valid_char(param_1[uVar9]);\n      if (iVar3 == 0) {\n        return 0x10;\n      }\n      lVar5 = der_utf8_charsize(param_1[uVar9]);\n      iVar3 = der_utf8_valid_char(param_1[uVar9 + 1]);\n      if (iVar3 == 0) {\n        return 0x10;\n      }\n      lVar6 = der_utf8_charsize(param_1[uVar9 + 1]);\n      iVar3 = der_utf8_valid_char(param_1[uVar9 + 2]);\n      if (iVar3 == 0) {\n        return 0x10;\n      }\n      lVar7 = der_utf8_charsize(param_1[uVar9 + 2]);\n      iVar3 = der_utf8_valid_char(param_1[uVar9 + 3]);\n      if (iVar3 == 0) {\n        return 0x10;\n      }\n      lVar8 = der_utf8_charsize(param_1[uVar9 + 3]);\n      uVar4 = uVar4 + lVar5 + lVar6 + lVar7 + lVar8;\n    }\n    if (uVar4 < 0x80) {\n      lVar5 = uVar4 + 2;\n    }\n    else {\n      if (uVar4 < 0x100) {\n        *param_3 = uVar4 + 3;\n        return 0;\n      }\n      if (uVar4 < 0x10000) {\n        *param_3 = uVar4 + 4;\n        return 0;\n      }\n      if (0xffffff < uVar4) {\n        return 0x10;\n      }\n      lVar5 = uVar4 + 5;\n    }\n  }\n  *param_3 = lVar5;\n  return 0;\n}" { (declaration "undefined4 *puVar1;" type_identifier (pointer_declarator "*puVar1" * identifier) ;) (declaration "uint uVar2;" type_identifier identifier ;) (declaration "int iVar3;" primitive_type identifier ;) (declaration "ulong uVar4;" type_identifier identifier ;) (declaration "long lVar5;" (sized_type_specifier "long" long) identifier ;) (declaration "long lVar6;" (sized_type_specifier "long" long) identifier ;) (declaration "long lVar7;" (sized_type_specifier "long" long) identifier ;) (declaration "long lVar8;" (sized_type_specifier "long" long) identifier ;) (declaration "ulong uVar9;" type_identifier identifier ;) (if_statement "if (param_1 == (undefined4 *)0x0) {\n                    /* WARNING: Subroutine does not return */\n    crypt_argchk("in != NULL","src/pk/asn1/der/utf8/der_length_utf8_string.c",0x45);\n  }" if (parenthesized_expression "(param_1 == (undefined4 *)0x0)" ( (binary_expression "param_1 == (undefined4 *)0x0" identifier == (cast_expression "(undefined4 *)0x0" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n                    /* WARNING: Subroutine does not return */\n    crypt_argchk("in != NULL","src/pk/asn1/der/utf8/der_length_utf8_string.c",0x45);\n  }" { comment (expression_statement "crypt_argchk("in != NULL","src/pk/asn1/der/utf8/der_length_utf8_string.c",0x45);" (call_expression "crypt_argchk("in != NULL","src/pk/asn1/der/utf8/der_length_utf8_string.c",0x45)" identifier (argument_list "("in != NULL","src/pk/asn1/der/utf8/der_length_utf8_string.c",0x45)" ( (string_literal ""in != NULL"" " string_content ") , (string_literal ""src/pk/asn1/der/utf8/der_length_utf8_string.c"" " string_content ") , number_literal ))) ;) })) (if_statement "if (param_3 == (long *)0x0) {\n                    /* WARNING: Subroutine does not return */\n    crypt_argchk("outlen != NULL","src/pk/asn1/der/utf8/der_length_utf8_string.c",0x46);\n  }" if (parenthesized_expression "(param_3 == (long *)0x0)" ( (binary_expression "param_3 == (long *)0x0" identifier == (cast_expression "(long *)0x0" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n                    /* WARNING: Subroutine does not return */\n    crypt_argchk("outlen != NULL","src/pk/asn1/der/utf8/der_length_utf8_string.c",0x46);\n  }" { comment (expression_statement "crypt_argchk("outlen != NULL","src/pk/asn1/der/utf8/der_length_utf8_string.c",0x46);" (call_expression "crypt_argchk("outlen != NULL","src/pk/asn1/der/utf8/der_length_utf8_string.c",0x46)" identifier (argument_list "("outlen != NULL","src/pk/asn1/der/utf8/der_length_utf8_string.c",0x46)" ( (string_literal ""outlen != NULL"" " string_content ") , (string_literal ""src/pk/asn1/der/utf8/der_length_utf8_string.c"" " string_content ") , number_literal ))) ;) })) (expression_statement "uVar4 = 0;" (assignment_expression "uVar4 = 0" identifier = number_literal) ;) (expression_statement "uVar9 = 0;" (assignment_expression "uVar9 = 0" identifier = number_literal) ;) (if_statement "if (param_2 == 0) {\n    lVar5 = 2;\n  }\n  else {\n    uVar2 = (uint)param_2 & 3;\n    if ((param_2 & 3) == 0) goto LAB_00177ea1;\n    if (uVar2 != 1) {\n      if (uVar2 != 2) {\n        iVar3 = der_utf8_valid_char(*param_1);\n        if (iVar3 == 0) {\n          return 0x10;\n        }\n        uVar9 = 1;\n        uVar4 = der_utf8_charsize(*param_1);\n      }\n      iVar3 = der_utf8_valid_char(param_1[uVar9]);\n      if (iVar3 == 0) {\n        return 0x10;\n      }\n      puVar1 = param_1 + uVar9;\n      uVar9 = uVar9 + 1;\n      lVar5 = der_utf8_charsize(*puVar1);\n      uVar4 = uVar4 + lVar5;\n    }\n    iVar3 = der_utf8_valid_char(param_1[uVar9]);\n    if (iVar3 == 0) {\n      return 0x10;\n    }\n    lVar5 = der_utf8_charsize(param_1[uVar9]);\n    uVar4 = uVar4 + lVar5;\n    for (uVar9 = uVar9 + 1; param_2 != uVar9; uVar9 = uVar9 + 4) {\nLAB_00177ea1:\n      iVar3 = der_utf8_valid_char(param_1[uVar9]);\n      if (iVar3 == 0) {\n        return 0x10;\n      }\n      lVar5 = der_utf8_charsize(param_1[uVar9]);\n      iVar3 = der_utf8_valid_char(param_1[uVar9 + 1]);\n      if (iVar3 == 0) {\n        return 0x10;\n      }\n      lVar6 = der_utf8_charsize(param_1[uVar9 + 1]);\n      iVar3 = der_utf8_valid_char(param_1[uVar9 + 2]);\n      if (iVar3 == 0) {\n        return 0x10;\n      }\n      lVar7 = der_utf8_charsize(param_1[uVar9 + 2]);\n      iVar3 = der_utf8_valid_char(param_1[uVar9 + 3]);\n      if (iVar3 == 0) {\n        return 0x10;\n      }\n      lVar8 = der_utf8_charsize(param_1[uVar9 + 3]);\n      uVar4 = uVar4 + lVar5 + lVar6 + lVar7 + lVar8;\n    }\n    if (uVar4 < 0x80) {\n      lVar5 = uVar4 + 2;\n    }\n    else {\n      if (uVar4 < 0x100) {\n        *param_3 = uVar4 + 3;\n        return 0;\n      }\n      if (uVar4 < 0x10000) {\n        *param_3 = uVar4 + 4;\n        return 0;\n      }\n      if (0xffffff < uVar4) {\n        return 0x10;\n      }\n      lVar5 = uVar4 + 5;\n    }\n  }" if (parenthesized_expression "(param_2 == 0)" ( (binary_expression "param_2 == 0" identifier == number_literal) )) (compound_statement "{\n    lVar5 = 2;\n  }" { (expression_statement "lVar5 = 2;" (assignment_expression "lVar5 = 2" identifier = number_literal) ;) }) (else_clause "else {\n    uVar2 = (uint)param_2 & 3;\n    if ((param_2 & 3) == 0) goto LAB_00177ea1;\n    if (uVar2 != 1) {\n      if (uVar2 != 2) {\n        iVar3 = der_utf8_valid_char(*param_1);\n        if (iVar3 == 0) {\n          return 0x10;\n        }\n        uVar9 = 1;\n        uVar4 = der_utf8_charsize(*param_1);\n      }\n      iVar3 = der_utf8_valid_char(param_1[uVar9]);\n      if (iVar3 == 0) {\n        return 0x10;\n      }\n      puVar1 = param_1 + uVar9;\n      uVar9 = uVar9 + 1;\n      lVar5 = der_utf8_charsize(*puVar1);\n      uVar4 = uVar4 + lVar5;\n    }\n    iVar3 = der_utf8_valid_char(param_1[uVar9]);\n    if (iVar3 == 0) {\n      return 0x10;\n    }\n    lVar5 = der_utf8_charsize(param_1[uVar9]);\n    uVar4 = uVar4 + lVar5;\n    for (uVar9 = uVar9 + 1; param_2 != uVar9; uVar9 = uVar9 + 4) {\nLAB_00177ea1:\n      iVar3 = der_utf8_valid_char(param_1[uVar9]);\n      if (iVar3 == 0) {\n        return 0x10;\n      }\n      lVar5 = der_utf8_charsize(param_1[uVar9]);\n      iVar3 = der_utf8_valid_char(param_1[uVar9 + 1]);\n      if (iVar3 == 0) {\n        return 0x10;\n      }\n      lVar6 = der_utf8_charsize(param_1[uVar9 + 1]);\n      iVar3 = der_utf8_valid_char(param_1[uVar9 + 2]);\n      if (iVar3 == 0) {\n        return 0x10;\n      }\n      lVar7 = der_utf8_charsize(param_1[uVar9 + 2]);\n      iVar3 = der_utf8_valid_char(param_1[uVar9 + 3]);\n      if (iVar3 == 0) {\n        return 0x10;\n      }\n      lVar8 = der_utf8_charsize(param_1[uVar9 + 3]);\n      uVar4 = uVar4 + lVar5 + lVar6 + lVar7 + lVar8;\n    }\n    if (uVar4 < 0x80) {\n      lVar5 = uVar4 + 2;\n    }\n    else {\n      if (uVar4 < 0x100) {\n        *param_3 = uVar4 + 3;\n        return 0;\n      }\n      if (uVar4 < 0x10000) {\n        *param_3 = uVar4 + 4;\n        return 0;\n      }\n      if (0xffffff < uVar4) {\n        return 0x10;\n      }\n      lVar5 = uVar4 + 5;\n    }\n  }" else (compound_statement "{\n    uVar2 = (uint)param_2 & 3;\n    if ((param_2 & 3) == 0) goto LAB_00177ea1;\n    if (uVar2 != 1) {\n      if (uVar2 != 2) {\n        iVar3 = der_utf8_valid_char(*param_1);\n        if (iVar3 == 0) {\n          return 0x10;\n        }\n        uVar9 = 1;\n        uVar4 = der_utf8_charsize(*param_1);\n      }\n      iVar3 = der_utf8_valid_char(param_1[uVar9]);\n      if (iVar3 == 0) {\n        return 0x10;\n      }\n      puVar1 = param_1 + uVar9;\n      uVar9 = uVar9 + 1;\n      lVar5 = der_utf8_charsize(*puVar1);\n      uVar4 = uVar4 + lVar5;\n    }\n    iVar3 = der_utf8_valid_char(param_1[uVar9]);\n    if (iVar3 == 0) {\n      return 0x10;\n    }\n    lVar5 = der_utf8_charsize(param_1[uVar9]);\n    uVar4 = uVar4 + lVar5;\n    for (uVar9 = uVar9 + 1; param_2 != uVar9; uVar9 = uVar9 + 4) {\nLAB_00177ea1:\n      iVar3 = der_utf8_valid_char(param_1[uVar9]);\n      if (iVar3 == 0) {\n        return 0x10;\n      }\n      lVar5 = der_utf8_charsize(param_1[uVar9]);\n      iVar3 = der_utf8_valid_char(param_1[uVar9 + 1]);\n      if (iVar3 == 0) {\n        return 0x10;\n      }\n      lVar6 = der_utf8_charsize(param_1[uVar9 + 1]);\n      iVar3 = der_utf8_valid_char(param_1[uVar9 + 2]);\n      if (iVar3 == 0) {\n        return 0x10;\n      }\n      lVar7 = der_utf8_charsize(param_1[uVar9 + 2]);\n      iVar3 = der_utf8_valid_char(param_1[uVar9 + 3]);\n      if (iVar3 == 0) {\n        return 0x10;\n      }\n      lVar8 = der_utf8_charsize(param_1[uVar9 + 3]);\n      uVar4 = uVar4 + lVar5 + lVar6 + lVar7 + lVar8;\n    }\n    if (uVar4 < 0x80) {\n      lVar5 = uVar4 + 2;\n    }\n    else {\n      if (uVar4 < 0x100) {\n        *param_3 = uVar4 + 3;\n        return 0;\n      }\n      if (uVar4 < 0x10000) {\n        *param_3 = uVar4 + 4;\n        return 0;\n      }\n      if (0xffffff < uVar4) {\n        return 0x10;\n      }\n      lVar5 = uVar4 + 5;\n    }\n  }" { (expression_statement "uVar2 = (uint)param_2 & 3;" (assignment_expression "uVar2 = (uint)param_2 & 3" identifier = (binary_expression "(uint)param_2 & 3" (cast_expression "(uint)param_2" ( (type_descriptor "uint" type_identifier) ) identifier) & number_literal)) ;) (if_statement "if ((param_2 & 3) == 0) goto LAB_00177ea1;" if (parenthesized_expression "((param_2 & 3) == 0)" ( (binary_expression "(param_2 & 3) == 0" (parenthesized_expression "(param_2 & 3)" ( (binary_expression "param_2 & 3" identifier & number_literal) )) == number_literal) )) (goto_statement "goto LAB_00177ea1;" goto statement_identifier ;)) (if_statement "if (uVar2 != 1) {\n      if (uVar2 != 2) {\n        iVar3 = der_utf8_valid_char(*param_1);\n        if (iVar3 == 0) {\n          return 0x10;\n        }\n        uVar9 = 1;\n        uVar4 = der_utf8_charsize(*param_1);\n      }\n      iVar3 = der_utf8_valid_char(param_1[uVar9]);\n      if (iVar3 == 0) {\n        return 0x10;\n      }\n      puVar1 = param_1 + uVar9;\n      uVar9 = uVar9 + 1;\n      lVar5 = der_utf8_charsize(*puVar1);\n      uVar4 = uVar4 + lVar5;\n    }" if (parenthesized_expression "(uVar2 != 1)" ( (binary_expression "uVar2 != 1" identifier != number_literal) )) (compound_statement "{\n      if (uVar2 != 2) {\n        iVar3 = der_utf8_valid_char(*param_1);\n        if (iVar3 == 0) {\n          return 0x10;\n        }\n        uVar9 = 1;\n        uVar4 = der_utf8_charsize(*param_1);\n      }\n      iVar3 = der_utf8_valid_char(param_1[uVar9]);\n      if (iVar3 == 0) {\n        return 0x10;\n      }\n      puVar1 = param_1 + uVar9;\n      uVar9 = uVar9 + 1;\n      lVar5 = der_utf8_charsize(*puVar1);\n      uVar4 = uVar4 + lVar5;\n    }" { (if_statement "if (uVar2 != 2) {\n        iVar3 = der_utf8_valid_char(*param_1);\n        if (iVar3 == 0) {\n          return 0x10;\n        }\n        uVar9 = 1;\n        uVar4 = der_utf8_charsize(*param_1);\n      }" if (parenthesized_expression "(uVar2 != 2)" ( (binary_expression "uVar2 != 2" identifier != number_literal) )) (compound_statement "{\n        iVar3 = der_utf8_valid_char(*param_1);\n        if (iVar3 == 0) {\n          return 0x10;\n        }\n        uVar9 = 1;\n        uVar4 = der_utf8_charsize(*param_1);\n      }" { (expression_statement "iVar3 = der_utf8_valid_char(*param_1);" (assignment_expression "iVar3 = der_utf8_valid_char(*param_1)" identifier = (call_expression "der_utf8_valid_char(*param_1)" identifier (argument_list "(*param_1)" ( (pointer_expression "*param_1" * identifier) )))) ;) (if_statement "if (iVar3 == 0) {\n          return 0x10;\n        }" if (parenthesized_expression "(iVar3 == 0)" ( (binary_expression "iVar3 == 0" identifier == number_literal) )) (compound_statement "{\n          return 0x10;\n        }" { (return_statement "return 0x10;" return number_literal ;) })) (expression_statement "uVar9 = 1;" (assignment_expression "uVar9 = 1" identifier = number_literal) ;) (expression_statement "uVar4 = der_utf8_charsize(*param_1);" (assignment_expression "uVar4 = der_utf8_charsize(*param_1)" identifier = (call_expression "der_utf8_charsize(*param_1)" identifier (argument_list "(*param_1)" ( (pointer_expression "*param_1" * identifier) )))) ;) })) (expression_statement "iVar3 = der_utf8_valid_char(param_1[uVar9]);" (assignment_expression "iVar3 = der_utf8_valid_char(param_1[uVar9])" identifier = (call_expression "der_utf8_valid_char(param_1[uVar9])" identifier (argument_list "(param_1[uVar9])" ( (subscript_expression "param_1[uVar9]" identifier [ identifier ]) )))) ;) (if_statement "if (iVar3 == 0) {\n        return 0x10;\n      }" if (parenthesized_expression "(iVar3 == 0)" ( (binary_expression "iVar3 == 0" identifier == number_literal) )) (compound_statement "{\n        return 0x10;\n      }" { (return_statement "return 0x10;" return number_literal ;) })) (expression_statement "puVar1 = param_1 + uVar9;" (assignment_expression "puVar1 = param_1 + uVar9" identifier = (binary_expression "param_1 + uVar9" identifier + identifier)) ;) (expression_statement "uVar9 = uVar9 + 1;" (assignment_expression "uVar9 = uVar9 + 1" identifier = (binary_expression "uVar9 + 1" identifier + number_literal)) ;) (expression_statement "lVar5 = der_utf8_charsize(*puVar1);" (assignment_expression "lVar5 = der_utf8_charsize(*puVar1)" identifier = (call_expression "der_utf8_charsize(*puVar1)" identifier (argument_list "(*puVar1)" ( (pointer_expression "*puVar1" * identifier) )))) ;) (expression_statement "uVar4 = uVar4 + lVar5;" (assignment_expression "uVar4 = uVar4 + lVar5" identifier = (binary_expression "uVar4 + lVar5" identifier + identifier)) ;) })) (expression_statement "iVar3 = der_utf8_valid_char(param_1[uVar9]);" (assignment_expression "iVar3 = der_utf8_valid_char(param_1[uVar9])" identifier = (call_expression "der_utf8_valid_char(param_1[uVar9])" identifier (argument_list "(param_1[uVar9])" ( (subscript_expression "param_1[uVar9]" identifier [ identifier ]) )))) ;) (if_statement "if (iVar3 == 0) {\n      return 0x10;\n    }" if (parenthesized_expression "(iVar3 == 0)" ( (binary_expression "iVar3 == 0" identifier == number_literal) )) (compound_statement "{\n      return 0x10;\n    }" { (return_statement "return 0x10;" return number_literal ;) })) (expression_statement "lVar5 = der_utf8_charsize(param_1[uVar9]);" (assignment_expression "lVar5 = der_utf8_charsize(param_1[uVar9])" identifier = (call_expression "der_utf8_charsize(param_1[uVar9])" identifier (argument_list "(param_1[uVar9])" ( (subscript_expression "param_1[uVar9]" identifier [ identifier ]) )))) ;) (expression_statement "uVar4 = uVar4 + lVar5;" (assignment_expression "uVar4 = uVar4 + lVar5" identifier = (binary_expression "uVar4 + lVar5" identifier + identifier)) ;) (for_statement "for (uVar9 = uVar9 + 1; param_2 != uVar9; uVar9 = uVar9 + 4) {\nLAB_00177ea1:\n      iVar3 = der_utf8_valid_char(param_1[uVar9]);\n      if (iVar3 == 0) {\n        return 0x10;\n      }\n      lVar5 = der_utf8_charsize(param_1[uVar9]);\n      iVar3 = der_utf8_valid_char(param_1[uVar9 + 1]);\n      if (iVar3 == 0) {\n        return 0x10;\n      }\n      lVar6 = der_utf8_charsize(param_1[uVar9 + 1]);\n      iVar3 = der_utf8_valid_char(param_1[uVar9 + 2]);\n      if (iVar3 == 0) {\n        return 0x10;\n      }\n      lVar7 = der_utf8_charsize(param_1[uVar9 + 2]);\n      iVar3 = der_utf8_valid_char(param_1[uVar9 + 3]);\n      if (iVar3 == 0) {\n        return 0x10;\n      }\n      lVar8 = der_utf8_charsize(param_1[uVar9 + 3]);\n      uVar4 = uVar4 + lVar5 + lVar6 + lVar7 + lVar8;\n    }" for ( (assignment_expression "uVar9 = uVar9 + 1" identifier = (binary_expression "uVar9 + 1" identifier + number_literal)) ; (binary_expression "param_2 != uVar9" identifier != identifier) ; (assignment_expression "uVar9 = uVar9 + 4" identifier = (binary_expression "uVar9 + 4" identifier + number_literal)) ) (compound_statement "{\nLAB_00177ea1:\n      iVar3 = der_utf8_valid_char(param_1[uVar9]);\n      if (iVar3 == 0) {\n        return 0x10;\n      }\n      lVar5 = der_utf8_charsize(param_1[uVar9]);\n      iVar3 = der_utf8_valid_char(param_1[uVar9 + 1]);\n      if (iVar3 == 0) {\n        return 0x10;\n      }\n      lVar6 = der_utf8_charsize(param_1[uVar9 + 1]);\n      iVar3 = der_utf8_valid_char(param_1[uVar9 + 2]);\n      if (iVar3 == 0) {\n        return 0x10;\n      }\n      lVar7 = der_utf8_charsize(param_1[uVar9 + 2]);\n      iVar3 = der_utf8_valid_char(param_1[uVar9 + 3]);\n      if (iVar3 == 0) {\n        return 0x10;\n      }\n      lVar8 = der_utf8_charsize(param_1[uVar9 + 3]);\n      uVar4 = uVar4 + lVar5 + lVar6 + lVar7 + lVar8;\n    }" { (labeled_statement "LAB_00177ea1:\n      iVar3 = der_utf8_valid_char(param_1[uVar9]);" statement_identifier : (expression_statement "iVar3 = der_utf8_valid_char(param_1[uVar9]);" (assignment_expression "iVar3 = der_utf8_valid_char(param_1[uVar9])" identifier = (call_expression "der_utf8_valid_char(param_1[uVar9])" identifier (argument_list "(param_1[uVar9])" ( (subscript_expression "param_1[uVar9]" identifier [ identifier ]) )))) ;)) (if_statement "if (iVar3 == 0) {\n        return 0x10;\n      }" if (parenthesized_expression "(iVar3 == 0)" ( (binary_expression "iVar3 == 0" identifier == number_literal) )) (compound_statement "{\n        return 0x10;\n      }" { (return_statement "return 0x10;" return number_literal ;) })) (expression_statement "lVar5 = der_utf8_charsize(param_1[uVar9]);" (assignment_expression "lVar5 = der_utf8_charsize(param_1[uVar9])" identifier = (call_expression "der_utf8_charsize(param_1[uVar9])" identifier (argument_list "(param_1[uVar9])" ( (subscript_expression "param_1[uVar9]" identifier [ identifier ]) )))) ;) (expression_statement "iVar3 = der_utf8_valid_char(param_1[uVar9 + 1]);" (assignment_expression "iVar3 = der_utf8_valid_char(param_1[uVar9 + 1])" identifier = (call_expression "der_utf8_valid_char(param_1[uVar9 + 1])" identifier (argument_list "(param_1[uVar9 + 1])" ( (subscript_expression "param_1[uVar9 + 1]" identifier [ (binary_expression "uVar9 + 1" identifier + number_literal) ]) )))) ;) (if_statement "if (iVar3 == 0) {\n        return 0x10;\n      }" if (parenthesized_expression "(iVar3 == 0)" ( (binary_expression "iVar3 == 0" identifier == number_literal) )) (compound_statement "{\n        return 0x10;\n      }" { (return_statement "return 0x10;" return number_literal ;) })) (expression_statement "lVar6 = der_utf8_charsize(param_1[uVar9 + 1]);" (assignment_expression "lVar6 = der_utf8_charsize(param_1[uVar9 + 1])" identifier = (call_expression "der_utf8_charsize(param_1[uVar9 + 1])" identifier (argument_list "(param_1[uVar9 + 1])" ( (subscript_expression "param_1[uVar9 + 1]" identifier [ (binary_expression "uVar9 + 1" identifier + number_literal) ]) )))) ;) (expression_statement "iVar3 = der_utf8_valid_char(param_1[uVar9 + 2]);" (assignment_expression "iVar3 = der_utf8_valid_char(param_1[uVar9 + 2])" identifier = (call_expression "der_utf8_valid_char(param_1[uVar9 + 2])" identifier (argument_list "(param_1[uVar9 + 2])" ( (subscript_expression "param_1[uVar9 + 2]" identifier [ (binary_expression "uVar9 + 2" identifier + number_literal) ]) )))) ;) (if_statement "if (iVar3 == 0) {\n        return 0x10;\n      }" if (parenthesized_expression "(iVar3 == 0)" ( (binary_expression "iVar3 == 0" identifier == number_literal) )) (compound_statement "{\n        return 0x10;\n      }" { (return_statement "return 0x10;" return number_literal ;) })) (expression_statement "lVar7 = der_utf8_charsize(param_1[uVar9 + 2]);" (assignment_expression "lVar7 = der_utf8_charsize(param_1[uVar9 + 2])" identifier = (call_expression "der_utf8_charsize(param_1[uVar9 + 2])" identifier (argument_list "(param_1[uVar9 + 2])" ( (subscript_expression "param_1[uVar9 + 2]" identifier [ (binary_expression "uVar9 + 2" identifier + number_literal) ]) )))) ;) (expression_statement "iVar3 = der_utf8_valid_char(param_1[uVar9 + 3]);" (assignment_expression "iVar3 = der_utf8_valid_char(param_1[uVar9 + 3])" identifier = (call_expression "der_utf8_valid_char(param_1[uVar9 + 3])" identifier (argument_list "(param_1[uVar9 + 3])" ( (subscript_expression "param_1[uVar9 + 3]" identifier [ (binary_expression "uVar9 + 3" identifier + number_literal) ]) )))) ;) (if_statement "if (iVar3 == 0) {\n        return 0x10;\n      }" if (parenthesized_expression "(iVar3 == 0)" ( (binary_expression "iVar3 == 0" identifier == number_literal) )) (compound_statement "{\n        return 0x10;\n      }" { (return_statement "return 0x10;" return number_literal ;) })) (expression_statement "lVar8 = der_utf8_charsize(param_1[uVar9 + 3]);" (assignment_expression "lVar8 = der_utf8_charsize(param_1[uVar9 + 3])" identifier = (call_expression "der_utf8_charsize(param_1[uVar9 + 3])" identifier (argument_list "(param_1[uVar9 + 3])" ( (subscript_expression "param_1[uVar9 + 3]" identifier [ (binary_expression "uVar9 + 3" identifier + number_literal) ]) )))) ;) (expression_statement "uVar4 = uVar4 + lVar5 + lVar6 + lVar7 + lVar8;" (assignment_expression "uVar4 = uVar4 + lVar5 + lVar6 + lVar7 + lVar8" identifier = (binary_expression "uVar4 + lVar5 + lVar6 + lVar7 + lVar8" (binary_expression "uVar4 + lVar5 + lVar6 + lVar7" (binary_expression "uVar4 + lVar5 + lVar6" (binary_expression "uVar4 + lVar5" identifier + identifier) + identifier) + identifier) + identifier)) ;) })) (if_statement "if (uVar4 < 0x80) {\n      lVar5 = uVar4 + 2;\n    }\n    else {\n      if (uVar4 < 0x100) {\n        *param_3 = uVar4 + 3;\n        return 0;\n      }\n      if (uVar4 < 0x10000) {\n        *param_3 = uVar4 + 4;\n        return 0;\n      }\n      if (0xffffff < uVar4) {\n        return 0x10;\n      }\n      lVar5 = uVar4 + 5;\n    }" if (parenthesized_expression "(uVar4 < 0x80)" ( (binary_expression "uVar4 < 0x80" identifier < number_literal) )) (compound_statement "{\n      lVar5 = uVar4 + 2;\n    }" { (expression_statement "lVar5 = uVar4 + 2;" (assignment_expression "lVar5 = uVar4 + 2" identifier = (binary_expression "uVar4 + 2" identifier + number_literal)) ;) }) (else_clause "else {\n      if (uVar4 < 0x100) {\n        *param_3 = uVar4 + 3;\n        return 0;\n      }\n      if (uVar4 < 0x10000) {\n        *param_3 = uVar4 + 4;\n        return 0;\n      }\n      if (0xffffff < uVar4) {\n        return 0x10;\n      }\n      lVar5 = uVar4 + 5;\n    }" else (compound_statement "{\n      if (uVar4 < 0x100) {\n        *param_3 = uVar4 + 3;\n        return 0;\n      }\n      if (uVar4 < 0x10000) {\n        *param_3 = uVar4 + 4;\n        return 0;\n      }\n      if (0xffffff < uVar4) {\n        return 0x10;\n      }\n      lVar5 = uVar4 + 5;\n    }" { (if_statement "if (uVar4 < 0x100) {\n        *param_3 = uVar4 + 3;\n        return 0;\n      }" if (parenthesized_expression "(uVar4 < 0x100)" ( (binary_expression "uVar4 < 0x100" identifier < number_literal) )) (compound_statement "{\n        *param_3 = uVar4 + 3;\n        return 0;\n      }" { (expression_statement "*param_3 = uVar4 + 3;" (assignment_expression "*param_3 = uVar4 + 3" (pointer_expression "*param_3" * identifier) = (binary_expression "uVar4 + 3" identifier + number_literal)) ;) (return_statement "return 0;" return number_literal ;) })) (if_statement "if (uVar4 < 0x10000) {\n        *param_3 = uVar4 + 4;\n        return 0;\n      }" if (parenthesized_expression "(uVar4 < 0x10000)" ( (binary_expression "uVar4 < 0x10000" identifier < number_literal) )) (compound_statement "{\n        *param_3 = uVar4 + 4;\n        return 0;\n      }" { (expression_statement "*param_3 = uVar4 + 4;" (assignment_expression "*param_3 = uVar4 + 4" (pointer_expression "*param_3" * identifier) = (binary_expression "uVar4 + 4" identifier + number_literal)) ;) (return_statement "return 0;" return number_literal ;) })) (if_statement "if (0xffffff < uVar4) {\n        return 0x10;\n      }" if (parenthesized_expression "(0xffffff < uVar4)" ( (binary_expression "0xffffff < uVar4" number_literal < identifier) )) (compound_statement "{\n        return 0x10;\n      }" { (return_statement "return 0x10;" return number_literal ;) })) (expression_statement "lVar5 = uVar4 + 5;" (assignment_expression "lVar5 = uVar4 + 5" identifier = (binary_expression "uVar4 + 5" identifier + number_literal)) ;) }))) }))) (expression_statement "*param_3 = lVar5;" (assignment_expression "*param_3 = lVar5" (pointer_expression "*param_3" * identifier) = identifier) ;) (return_statement "return 0;" return number_literal ;) })))
(translation_unit "wchar_t der_length_utf8_string(wchar_t *in,ulong noctets,ulong *outlen)\n\n{\n  wchar_t *pwVar1;\n  uint uVar2;\n  wchar_t wVar3;\n  ulong uVar4;\n  ulong uVar5;\n  ulong uVar6;\n  ulong uVar7;\n  ulong uVar8;\n  ulong uVar9;\n  \n  if (in == (wchar_t *)0x0) {\n                    /* WARNING: Subroutine does not return */\n    crypt_argchk("in != NULL","src/pk/asn1/der/utf8/der_length_utf8_string.c",0x45);\n  }\n  if (outlen == (ulong *)0x0) {\n                    /* WARNING: Subroutine does not return */\n    crypt_argchk("outlen != NULL","src/pk/asn1/der/utf8/der_length_utf8_string.c",0x46);\n  }\n  uVar4 = 0;\n  uVar9 = 0;\n  if (noctets == 0) {\n    uVar4 = 2;\n  }\n  else {\n    uVar2 = (uint)noctets & 3;\n    if ((noctets & 3) == 0) goto LAB_00177ea1;\n    if (uVar2 != 1) {\n      if (uVar2 != 2) {\n        wVar3 = der_utf8_valid_char(*in);\n        if (wVar3 == L'\0') {\n          return L'\x10';\n        }\n        uVar9 = 1;\n        uVar4 = der_utf8_charsize(*in);\n      }\n      wVar3 = der_utf8_valid_char(in[uVar9]);\n      if (wVar3 == L'\0') {\n        return L'\x10';\n      }\n      pwVar1 = in + uVar9;\n      uVar9 = uVar9 + 1;\n      uVar5 = der_utf8_charsize(*pwVar1);\n      uVar4 = uVar4 + uVar5;\n    }\n    wVar3 = der_utf8_valid_char(in[uVar9]);\n    if (wVar3 == L'\0') {\n      return L'\x10';\n    }\n    uVar5 = der_utf8_charsize(in[uVar9]);\n    uVar4 = uVar4 + uVar5;\n    for (uVar9 = uVar9 + 1; noctets != uVar9; uVar9 = uVar9 + 4) {\nLAB_00177ea1:\n      wVar3 = der_utf8_valid_char(in[uVar9]);\n      if (wVar3 == L'\0') {\n        return L'\x10';\n      }\n      uVar5 = der_utf8_charsize(in[uVar9]);\n      wVar3 = der_utf8_valid_char(in[uVar9 + 1]);\n      if (wVar3 == L'\0') {\n        return L'\x10';\n      }\n      uVar6 = der_utf8_charsize(in[uVar9 + 1]);\n      wVar3 = der_utf8_valid_char(in[uVar9 + 2]);\n      if (wVar3 == L'\0') {\n        return L'\x10';\n      }\n      uVar7 = der_utf8_charsize(in[uVar9 + 2]);\n      wVar3 = der_utf8_valid_char(in[uVar9 + 3]);\n      if (wVar3 == L'\0') {\n        return L'\x10';\n      }\n      uVar8 = der_utf8_charsize(in[uVar9 + 3]);\n      uVar4 = uVar4 + uVar5 + uVar6 + uVar7 + uVar8;\n    }\n    if (uVar4 < 0x80) {\n      uVar4 = uVar4 + 2;\n    }\n    else {\n      if (uVar4 < 0x100) {\n        *outlen = uVar4 + 3;\n        return L'\0';\n      }\n      if (uVar4 < 0x10000) {\n        *outlen = uVar4 + 4;\n        return L'\0';\n      }\n      if (0xffffff < uVar4) {\n        return L'\x10';\n      }\n      uVar4 = uVar4 + 5;\n    }\n  }\n  *outlen = uVar4;\n  return L'\0';\n}\n\n" (function_definition "wchar_t der_length_utf8_string(wchar_t *in,ulong noctets,ulong *outlen)\n\n{\n  wchar_t *pwVar1;\n  uint uVar2;\n  wchar_t wVar3;\n  ulong uVar4;\n  ulong uVar5;\n  ulong uVar6;\n  ulong uVar7;\n  ulong uVar8;\n  ulong uVar9;\n  \n  if (in == (wchar_t *)0x0) {\n                    /* WARNING: Subroutine does not return */\n    crypt_argchk("in != NULL","src/pk/asn1/der/utf8/der_length_utf8_string.c",0x45);\n  }\n  if (outlen == (ulong *)0x0) {\n                    /* WARNING: Subroutine does not return */\n    crypt_argchk("outlen != NULL","src/pk/asn1/der/utf8/der_length_utf8_string.c",0x46);\n  }\n  uVar4 = 0;\n  uVar9 = 0;\n  if (noctets == 0) {\n    uVar4 = 2;\n  }\n  else {\n    uVar2 = (uint)noctets & 3;\n    if ((noctets & 3) == 0) goto LAB_00177ea1;\n    if (uVar2 != 1) {\n      if (uVar2 != 2) {\n        wVar3 = der_utf8_valid_char(*in);\n        if (wVar3 == L'\0') {\n          return L'\x10';\n        }\n        uVar9 = 1;\n        uVar4 = der_utf8_charsize(*in);\n      }\n      wVar3 = der_utf8_valid_char(in[uVar9]);\n      if (wVar3 == L'\0') {\n        return L'\x10';\n      }\n      pwVar1 = in + uVar9;\n      uVar9 = uVar9 + 1;\n      uVar5 = der_utf8_charsize(*pwVar1);\n      uVar4 = uVar4 + uVar5;\n    }\n    wVar3 = der_utf8_valid_char(in[uVar9]);\n    if (wVar3 == L'\0') {\n      return L'\x10';\n    }\n    uVar5 = der_utf8_charsize(in[uVar9]);\n    uVar4 = uVar4 + uVar5;\n    for (uVar9 = uVar9 + 1; noctets != uVar9; uVar9 = uVar9 + 4) {\nLAB_00177ea1:\n      wVar3 = der_utf8_valid_char(in[uVar9]);\n      if (wVar3 == L'\0') {\n        return L'\x10';\n      }\n      uVar5 = der_utf8_charsize(in[uVar9]);\n      wVar3 = der_utf8_valid_char(in[uVar9 + 1]);\n      if (wVar3 == L'\0') {\n        return L'\x10';\n      }\n      uVar6 = der_utf8_charsize(in[uVar9 + 1]);\n      wVar3 = der_utf8_valid_char(in[uVar9 + 2]);\n      if (wVar3 == L'\0') {\n        return L'\x10';\n      }\n      uVar7 = der_utf8_charsize(in[uVar9 + 2]);\n      wVar3 = der_utf8_valid_char(in[uVar9 + 3]);\n      if (wVar3 == L'\0') {\n        return L'\x10';\n      }\n      uVar8 = der_utf8_charsize(in[uVar9 + 3]);\n      uVar4 = uVar4 + uVar5 + uVar6 + uVar7 + uVar8;\n    }\n    if (uVar4 < 0x80) {\n      uVar4 = uVar4 + 2;\n    }\n    else {\n      if (uVar4 < 0x100) {\n        *outlen = uVar4 + 3;\n        return L'\0';\n      }\n      if (uVar4 < 0x10000) {\n        *outlen = uVar4 + 4;\n        return L'\0';\n      }\n      if (0xffffff < uVar4) {\n        return L'\x10';\n      }\n      uVar4 = uVar4 + 5;\n    }\n  }\n  *outlen = uVar4;\n  return L'\0';\n}" type_identifier (function_declarator "der_length_utf8_string(wchar_t *in,ulong noctets,ulong *outlen)" identifier (parameter_list "(wchar_t *in,ulong noctets,ulong *outlen)" ( (parameter_declaration "wchar_t *in" type_identifier (pointer_declarator "*in" * identifier)) , (parameter_declaration "ulong noctets" type_identifier identifier) , (parameter_declaration "ulong *outlen" type_identifier (pointer_declarator "*outlen" * identifier)) ))) (compound_statement "{\n  wchar_t *pwVar1;\n  uint uVar2;\n  wchar_t wVar3;\n  ulong uVar4;\n  ulong uVar5;\n  ulong uVar6;\n  ulong uVar7;\n  ulong uVar8;\n  ulong uVar9;\n  \n  if (in == (wchar_t *)0x0) {\n                    /* WARNING: Subroutine does not return */\n    crypt_argchk("in != NULL","src/pk/asn1/der/utf8/der_length_utf8_string.c",0x45);\n  }\n  if (outlen == (ulong *)0x0) {\n                    /* WARNING: Subroutine does not return */\n    crypt_argchk("outlen != NULL","src/pk/asn1/der/utf8/der_length_utf8_string.c",0x46);\n  }\n  uVar4 = 0;\n  uVar9 = 0;\n  if (noctets == 0) {\n    uVar4 = 2;\n  }\n  else {\n    uVar2 = (uint)noctets & 3;\n    if ((noctets & 3) == 0) goto LAB_00177ea1;\n    if (uVar2 != 1) {\n      if (uVar2 != 2) {\n        wVar3 = der_utf8_valid_char(*in);\n        if (wVar3 == L'\0') {\n          return L'\x10';\n        }\n        uVar9 = 1;\n        uVar4 = der_utf8_charsize(*in);\n      }\n      wVar3 = der_utf8_valid_char(in[uVar9]);\n      if (wVar3 == L'\0') {\n        return L'\x10';\n      }\n      pwVar1 = in + uVar9;\n      uVar9 = uVar9 + 1;\n      uVar5 = der_utf8_charsize(*pwVar1);\n      uVar4 = uVar4 + uVar5;\n    }\n    wVar3 = der_utf8_valid_char(in[uVar9]);\n    if (wVar3 == L'\0') {\n      return L'\x10';\n    }\n    uVar5 = der_utf8_charsize(in[uVar9]);\n    uVar4 = uVar4 + uVar5;\n    for (uVar9 = uVar9 + 1; noctets != uVar9; uVar9 = uVar9 + 4) {\nLAB_00177ea1:\n      wVar3 = der_utf8_valid_char(in[uVar9]);\n      if (wVar3 == L'\0') {\n        return L'\x10';\n      }\n      uVar5 = der_utf8_charsize(in[uVar9]);\n      wVar3 = der_utf8_valid_char(in[uVar9 + 1]);\n      if (wVar3 == L'\0') {\n        return L'\x10';\n      }\n      uVar6 = der_utf8_charsize(in[uVar9 + 1]);\n      wVar3 = der_utf8_valid_char(in[uVar9 + 2]);\n      if (wVar3 == L'\0') {\n        return L'\x10';\n      }\n      uVar7 = der_utf8_charsize(in[uVar9 + 2]);\n      wVar3 = der_utf8_valid_char(in[uVar9 + 3]);\n      if (wVar3 == L'\0') {\n        return L'\x10';\n      }\n      uVar8 = der_utf8_charsize(in[uVar9 + 3]);\n      uVar4 = uVar4 + uVar5 + uVar6 + uVar7 + uVar8;\n    }\n    if (uVar4 < 0x80) {\n      uVar4 = uVar4 + 2;\n    }\n    else {\n      if (uVar4 < 0x100) {\n        *outlen = uVar4 + 3;\n        return L'\0';\n      }\n      if (uVar4 < 0x10000) {\n        *outlen = uVar4 + 4;\n        return L'\0';\n      }\n      if (0xffffff < uVar4) {\n        return L'\x10';\n      }\n      uVar4 = uVar4 + 5;\n    }\n  }\n  *outlen = uVar4;\n  return L'\0';\n}" { (declaration "wchar_t *pwVar1;" type_identifier (pointer_declarator "*pwVar1" * identifier) ;) (declaration "uint uVar2;" type_identifier identifier ;) (declaration "wchar_t wVar3;" type_identifier identifier ;) (declaration "ulong uVar4;" type_identifier identifier ;) (declaration "ulong uVar5;" type_identifier identifier ;) (declaration "ulong uVar6;" type_identifier identifier ;) (declaration "ulong uVar7;" type_identifier identifier ;) (declaration "ulong uVar8;" type_identifier identifier ;) (declaration "ulong uVar9;" type_identifier identifier ;) (if_statement "if (in == (wchar_t *)0x0) {\n                    /* WARNING: Subroutine does not return */\n    crypt_argchk("in != NULL","src/pk/asn1/der/utf8/der_length_utf8_string.c",0x45);\n  }" if (parenthesized_expression "(in == (wchar_t *)0x0)" ( (binary_expression "in == (wchar_t *)0x0" identifier == (cast_expression "(wchar_t *)0x0" ( (type_descriptor "wchar_t *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n                    /* WARNING: Subroutine does not return */\n    crypt_argchk("in != NULL","src/pk/asn1/der/utf8/der_length_utf8_string.c",0x45);\n  }" { comment (expression_statement "crypt_argchk("in != NULL","src/pk/asn1/der/utf8/der_length_utf8_string.c",0x45);" (call_expression "crypt_argchk("in != NULL","src/pk/asn1/der/utf8/der_length_utf8_string.c",0x45)" identifier (argument_list "("in != NULL","src/pk/asn1/der/utf8/der_length_utf8_string.c",0x45)" ( (string_literal ""in != NULL"" " string_content ") , (string_literal ""src/pk/asn1/der/utf8/der_length_utf8_string.c"" " string_content ") , number_literal ))) ;) })) (if_statement "if (outlen == (ulong *)0x0) {\n                    /* WARNING: Subroutine does not return */\n    crypt_argchk("outlen != NULL","src/pk/asn1/der/utf8/der_length_utf8_string.c",0x46);\n  }" if (parenthesized_expression "(outlen == (ulong *)0x0)" ( (binary_expression "outlen == (ulong *)0x0" identifier == (cast_expression "(ulong *)0x0" ( (type_descriptor "ulong *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n                    /* WARNING: Subroutine does not return */\n    crypt_argchk("outlen != NULL","src/pk/asn1/der/utf8/der_length_utf8_string.c",0x46);\n  }" { comment (expression_statement "crypt_argchk("outlen != NULL","src/pk/asn1/der/utf8/der_length_utf8_string.c",0x46);" (call_expression "crypt_argchk("outlen != NULL","src/pk/asn1/der/utf8/der_length_utf8_string.c",0x46)" identifier (argument_list "("outlen != NULL","src/pk/asn1/der/utf8/der_length_utf8_string.c",0x46)" ( (string_literal ""outlen != NULL"" " string_content ") , (string_literal ""src/pk/asn1/der/utf8/der_length_utf8_string.c"" " string_content ") , number_literal ))) ;) })) (expression_statement "uVar4 = 0;" (assignment_expression "uVar4 = 0" identifier = number_literal) ;) (expression_statement "uVar9 = 0;" (assignment_expression "uVar9 = 0" identifier = number_literal) ;) (if_statement "if (noctets == 0) {\n    uVar4 = 2;\n  }\n  else {\n    uVar2 = (uint)noctets & 3;\n    if ((noctets & 3) == 0) goto LAB_00177ea1;\n    if (uVar2 != 1) {\n      if (uVar2 != 2) {\n        wVar3 = der_utf8_valid_char(*in);\n        if (wVar3 == L'\0') {\n          return L'\x10';\n        }\n        uVar9 = 1;\n        uVar4 = der_utf8_charsize(*in);\n      }\n      wVar3 = der_utf8_valid_char(in[uVar9]);\n      if (wVar3 == L'\0') {\n        return L'\x10';\n      }\n      pwVar1 = in + uVar9;\n      uVar9 = uVar9 + 1;\n      uVar5 = der_utf8_charsize(*pwVar1);\n      uVar4 = uVar4 + uVar5;\n    }\n    wVar3 = der_utf8_valid_char(in[uVar9]);\n    if (wVar3 == L'\0') {\n      return L'\x10';\n    }\n    uVar5 = der_utf8_charsize(in[uVar9]);\n    uVar4 = uVar4 + uVar5;\n    for (uVar9 = uVar9 + 1; noctets != uVar9; uVar9 = uVar9 + 4) {\nLAB_00177ea1:\n      wVar3 = der_utf8_valid_char(in[uVar9]);\n      if (wVar3 == L'\0') {\n        return L'\x10';\n      }\n      uVar5 = der_utf8_charsize(in[uVar9]);\n      wVar3 = der_utf8_valid_char(in[uVar9 + 1]);\n      if (wVar3 == L'\0') {\n        return L'\x10';\n      }\n      uVar6 = der_utf8_charsize(in[uVar9 + 1]);\n      wVar3 = der_utf8_valid_char(in[uVar9 + 2]);\n      if (wVar3 == L'\0') {\n        return L'\x10';\n      }\n      uVar7 = der_utf8_charsize(in[uVar9 + 2]);\n      wVar3 = der_utf8_valid_char(in[uVar9 + 3]);\n      if (wVar3 == L'\0') {\n        return L'\x10';\n      }\n      uVar8 = der_utf8_charsize(in[uVar9 + 3]);\n      uVar4 = uVar4 + uVar5 + uVar6 + uVar7 + uVar8;\n    }\n    if (uVar4 < 0x80) {\n      uVar4 = uVar4 + 2;\n    }\n    else {\n      if (uVar4 < 0x100) {\n        *outlen = uVar4 + 3;\n        return L'\0';\n      }\n      if (uVar4 < 0x10000) {\n        *outlen = uVar4 + 4;\n        return L'\0';\n      }\n      if (0xffffff < uVar4) {\n        return L'\x10';\n      }\n      uVar4 = uVar4 + 5;\n    }\n  }" if (parenthesized_expression "(noctets == 0)" ( (binary_expression "noctets == 0" identifier == number_literal) )) (compound_statement "{\n    uVar4 = 2;\n  }" { (expression_statement "uVar4 = 2;" (assignment_expression "uVar4 = 2" identifier = number_literal) ;) }) (else_clause "else {\n    uVar2 = (uint)noctets & 3;\n    if ((noctets & 3) == 0) goto LAB_00177ea1;\n    if (uVar2 != 1) {\n      if (uVar2 != 2) {\n        wVar3 = der_utf8_valid_char(*in);\n        if (wVar3 == L'\0') {\n          return L'\x10';\n        }\n        uVar9 = 1;\n        uVar4 = der_utf8_charsize(*in);\n      }\n      wVar3 = der_utf8_valid_char(in[uVar9]);\n      if (wVar3 == L'\0') {\n        return L'\x10';\n      }\n      pwVar1 = in + uVar9;\n      uVar9 = uVar9 + 1;\n      uVar5 = der_utf8_charsize(*pwVar1);\n      uVar4 = uVar4 + uVar5;\n    }\n    wVar3 = der_utf8_valid_char(in[uVar9]);\n    if (wVar3 == L'\0') {\n      return L'\x10';\n    }\n    uVar5 = der_utf8_charsize(in[uVar9]);\n    uVar4 = uVar4 + uVar5;\n    for (uVar9 = uVar9 + 1; noctets != uVar9; uVar9 = uVar9 + 4) {\nLAB_00177ea1:\n      wVar3 = der_utf8_valid_char(in[uVar9]);\n      if (wVar3 == L'\0') {\n        return L'\x10';\n      }\n      uVar5 = der_utf8_charsize(in[uVar9]);\n      wVar3 = der_utf8_valid_char(in[uVar9 + 1]);\n      if (wVar3 == L'\0') {\n        return L'\x10';\n      }\n      uVar6 = der_utf8_charsize(in[uVar9 + 1]);\n      wVar3 = der_utf8_valid_char(in[uVar9 + 2]);\n      if (wVar3 == L'\0') {\n        return L'\x10';\n      }\n      uVar7 = der_utf8_charsize(in[uVar9 + 2]);\n      wVar3 = der_utf8_valid_char(in[uVar9 + 3]);\n      if (wVar3 == L'\0') {\n        return L'\x10';\n      }\n      uVar8 = der_utf8_charsize(in[uVar9 + 3]);\n      uVar4 = uVar4 + uVar5 + uVar6 + uVar7 + uVar8;\n    }\n    if (uVar4 < 0x80) {\n      uVar4 = uVar4 + 2;\n    }\n    else {\n      if (uVar4 < 0x100) {\n        *outlen = uVar4 + 3;\n        return L'\0';\n      }\n      if (uVar4 < 0x10000) {\n        *outlen = uVar4 + 4;\n        return L'\0';\n      }\n      if (0xffffff < uVar4) {\n        return L'\x10';\n      }\n      uVar4 = uVar4 + 5;\n    }\n  }" else (compound_statement "{\n    uVar2 = (uint)noctets & 3;\n    if ((noctets & 3) == 0) goto LAB_00177ea1;\n    if (uVar2 != 1) {\n      if (uVar2 != 2) {\n        wVar3 = der_utf8_valid_char(*in);\n        if (wVar3 == L'\0') {\n          return L'\x10';\n        }\n        uVar9 = 1;\n        uVar4 = der_utf8_charsize(*in);\n      }\n      wVar3 = der_utf8_valid_char(in[uVar9]);\n      if (wVar3 == L'\0') {\n        return L'\x10';\n      }\n      pwVar1 = in + uVar9;\n      uVar9 = uVar9 + 1;\n      uVar5 = der_utf8_charsize(*pwVar1);\n      uVar4 = uVar4 + uVar5;\n    }\n    wVar3 = der_utf8_valid_char(in[uVar9]);\n    if (wVar3 == L'\0') {\n      return L'\x10';\n    }\n    uVar5 = der_utf8_charsize(in[uVar9]);\n    uVar4 = uVar4 + uVar5;\n    for (uVar9 = uVar9 + 1; noctets != uVar9; uVar9 = uVar9 + 4) {\nLAB_00177ea1:\n      wVar3 = der_utf8_valid_char(in[uVar9]);\n      if (wVar3 == L'\0') {\n        return L'\x10';\n      }\n      uVar5 = der_utf8_charsize(in[uVar9]);\n      wVar3 = der_utf8_valid_char(in[uVar9 + 1]);\n      if (wVar3 == L'\0') {\n        return L'\x10';\n      }\n      uVar6 = der_utf8_charsize(in[uVar9 + 1]);\n      wVar3 = der_utf8_valid_char(in[uVar9 + 2]);\n      if (wVar3 == L'\0') {\n        return L'\x10';\n      }\n      uVar7 = der_utf8_charsize(in[uVar9 + 2]);\n      wVar3 = der_utf8_valid_char(in[uVar9 + 3]);\n      if (wVar3 == L'\0') {\n        return L'\x10';\n      }\n      uVar8 = der_utf8_charsize(in[uVar9 + 3]);\n      uVar4 = uVar4 + uVar5 + uVar6 + uVar7 + uVar8;\n    }\n    if (uVar4 < 0x80) {\n      uVar4 = uVar4 + 2;\n    }\n    else {\n      if (uVar4 < 0x100) {\n        *outlen = uVar4 + 3;\n        return L'\0';\n      }\n      if (uVar4 < 0x10000) {\n        *outlen = uVar4 + 4;\n        return L'\0';\n      }\n      if (0xffffff < uVar4) {\n        return L'\x10';\n      }\n      uVar4 = uVar4 + 5;\n    }\n  }" { (expression_statement "uVar2 = (uint)noctets & 3;" (assignment_expression "uVar2 = (uint)noctets & 3" identifier = (binary_expression "(uint)noctets & 3" (cast_expression "(uint)noctets" ( (type_descriptor "uint" type_identifier) ) identifier) & number_literal)) ;) (if_statement "if ((noctets & 3) == 0) goto LAB_00177ea1;" if (parenthesized_expression "((noctets & 3) == 0)" ( (binary_expression "(noctets & 3) == 0" (parenthesized_expression "(noctets & 3)" ( (binary_expression "noctets & 3" identifier & number_literal) )) == number_literal) )) (goto_statement "goto LAB_00177ea1;" goto statement_identifier ;)) (if_statement "if (uVar2 != 1) {\n      if (uVar2 != 2) {\n        wVar3 = der_utf8_valid_char(*in);\n        if (wVar3 == L'\0') {\n          return L'\x10';\n        }\n        uVar9 = 1;\n        uVar4 = der_utf8_charsize(*in);\n      }\n      wVar3 = der_utf8_valid_char(in[uVar9]);\n      if (wVar3 == L'\0') {\n        return L'\x10';\n      }\n      pwVar1 = in + uVar9;\n      uVar9 = uVar9 + 1;\n      uVar5 = der_utf8_charsize(*pwVar1);\n      uVar4 = uVar4 + uVar5;\n    }" if (parenthesized_expression "(uVar2 != 1)" ( (binary_expression "uVar2 != 1" identifier != number_literal) )) (compound_statement "{\n      if (uVar2 != 2) {\n        wVar3 = der_utf8_valid_char(*in);\n        if (wVar3 == L'\0') {\n          return L'\x10';\n        }\n        uVar9 = 1;\n        uVar4 = der_utf8_charsize(*in);\n      }\n      wVar3 = der_utf8_valid_char(in[uVar9]);\n      if (wVar3 == L'\0') {\n        return L'\x10';\n      }\n      pwVar1 = in + uVar9;\n      uVar9 = uVar9 + 1;\n      uVar5 = der_utf8_charsize(*pwVar1);\n      uVar4 = uVar4 + uVar5;\n    }" { (if_statement "if (uVar2 != 2) {\n        wVar3 = der_utf8_valid_char(*in);\n        if (wVar3 == L'\0') {\n          return L'\x10';\n        }\n        uVar9 = 1;\n        uVar4 = der_utf8_charsize(*in);\n      }" if (parenthesized_expression "(uVar2 != 2)" ( (binary_expression "uVar2 != 2" identifier != number_literal) )) (compound_statement "{\n        wVar3 = der_utf8_valid_char(*in);\n        if (wVar3 == L'\0') {\n          return L'\x10';\n        }\n        uVar9 = 1;\n        uVar4 = der_utf8_charsize(*in);\n      }" { (expression_statement "wVar3 = der_utf8_valid_char(*in);" (assignment_expression "wVar3 = der_utf8_valid_char(*in)" identifier = (call_expression "der_utf8_valid_char(*in)" identifier (argument_list "(*in)" ( (pointer_expression "*in" * identifier) )))) ;) (if_statement "if (wVar3 == L'\0') {\n          return L'\x10';\n        }" if (parenthesized_expression "(wVar3 == L'\0')" ( (binary_expression "wVar3 == L'\0'" identifier == (char_literal "L'\0'" L' escape_sequence ')) )) (compound_statement "{\n          return L'\x10';\n        }" { (return_statement "return L'\x10';" return (char_literal "L'\x10'" L' escape_sequence ') ;) })) (expression_statement "uVar9 = 1;" (assignment_expression "uVar9 = 1" identifier = number_literal) ;) (expression_statement "uVar4 = der_utf8_charsize(*in);" (assignment_expression "uVar4 = der_utf8_charsize(*in)" identifier = (call_expression "der_utf8_charsize(*in)" identifier (argument_list "(*in)" ( (pointer_expression "*in" * identifier) )))) ;) })) (expression_statement "wVar3 = der_utf8_valid_char(in[uVar9]);" (assignment_expression "wVar3 = der_utf8_valid_char(in[uVar9])" identifier = (call_expression "der_utf8_valid_char(in[uVar9])" identifier (argument_list "(in[uVar9])" ( (subscript_expression "in[uVar9]" identifier [ identifier ]) )))) ;) (if_statement "if (wVar3 == L'\0') {\n        return L'\x10';\n      }" if (parenthesized_expression "(wVar3 == L'\0')" ( (binary_expression "wVar3 == L'\0'" identifier == (char_literal "L'\0'" L' escape_sequence ')) )) (compound_statement "{\n        return L'\x10';\n      }" { (return_statement "return L'\x10';" return (char_literal "L'\x10'" L' escape_sequence ') ;) })) (expression_statement "pwVar1 = in + uVar9;" (assignment_expression "pwVar1 = in + uVar9" identifier = (binary_expression "in + uVar9" identifier + identifier)) ;) (expression_statement "uVar9 = uVar9 + 1;" (assignment_expression "uVar9 = uVar9 + 1" identifier = (binary_expression "uVar9 + 1" identifier + number_literal)) ;) (expression_statement "uVar5 = der_utf8_charsize(*pwVar1);" (assignment_expression "uVar5 = der_utf8_charsize(*pwVar1)" identifier = (call_expression "der_utf8_charsize(*pwVar1)" identifier (argument_list "(*pwVar1)" ( (pointer_expression "*pwVar1" * identifier) )))) ;) (expression_statement "uVar4 = uVar4 + uVar5;" (assignment_expression "uVar4 = uVar4 + uVar5" identifier = (binary_expression "uVar4 + uVar5" identifier + identifier)) ;) })) (expression_statement "wVar3 = der_utf8_valid_char(in[uVar9]);" (assignment_expression "wVar3 = der_utf8_valid_char(in[uVar9])" identifier = (call_expression "der_utf8_valid_char(in[uVar9])" identifier (argument_list "(in[uVar9])" ( (subscript_expression "in[uVar9]" identifier [ identifier ]) )))) ;) (if_statement "if (wVar3 == L'\0') {\n      return L'\x10';\n    }" if (parenthesized_expression "(wVar3 == L'\0')" ( (binary_expression "wVar3 == L'\0'" identifier == (char_literal "L'\0'" L' escape_sequence ')) )) (compound_statement "{\n      return L'\x10';\n    }" { (return_statement "return L'\x10';" return (char_literal "L'\x10'" L' escape_sequence ') ;) })) (expression_statement "uVar5 = der_utf8_charsize(in[uVar9]);" (assignment_expression "uVar5 = der_utf8_charsize(in[uVar9])" identifier = (call_expression "der_utf8_charsize(in[uVar9])" identifier (argument_list "(in[uVar9])" ( (subscript_expression "in[uVar9]" identifier [ identifier ]) )))) ;) (expression_statement "uVar4 = uVar4 + uVar5;" (assignment_expression "uVar4 = uVar4 + uVar5" identifier = (binary_expression "uVar4 + uVar5" identifier + identifier)) ;) (for_statement "for (uVar9 = uVar9 + 1; noctets != uVar9; uVar9 = uVar9 + 4) {\nLAB_00177ea1:\n      wVar3 = der_utf8_valid_char(in[uVar9]);\n      if (wVar3 == L'\0') {\n        return L'\x10';\n      }\n      uVar5 = der_utf8_charsize(in[uVar9]);\n      wVar3 = der_utf8_valid_char(in[uVar9 + 1]);\n      if (wVar3 == L'\0') {\n        return L'\x10';\n      }\n      uVar6 = der_utf8_charsize(in[uVar9 + 1]);\n      wVar3 = der_utf8_valid_char(in[uVar9 + 2]);\n      if (wVar3 == L'\0') {\n        return L'\x10';\n      }\n      uVar7 = der_utf8_charsize(in[uVar9 + 2]);\n      wVar3 = der_utf8_valid_char(in[uVar9 + 3]);\n      if (wVar3 == L'\0') {\n        return L'\x10';\n      }\n      uVar8 = der_utf8_charsize(in[uVar9 + 3]);\n      uVar4 = uVar4 + uVar5 + uVar6 + uVar7 + uVar8;\n    }" for ( (assignment_expression "uVar9 = uVar9 + 1" identifier = (binary_expression "uVar9 + 1" identifier + number_literal)) ; (binary_expression "noctets != uVar9" identifier != identifier) ; (assignment_expression "uVar9 = uVar9 + 4" identifier = (binary_expression "uVar9 + 4" identifier + number_literal)) ) (compound_statement "{\nLAB_00177ea1:\n      wVar3 = der_utf8_valid_char(in[uVar9]);\n      if (wVar3 == L'\0') {\n        return L'\x10';\n      }\n      uVar5 = der_utf8_charsize(in[uVar9]);\n      wVar3 = der_utf8_valid_char(in[uVar9 + 1]);\n      if (wVar3 == L'\0') {\n        return L'\x10';\n      }\n      uVar6 = der_utf8_charsize(in[uVar9 + 1]);\n      wVar3 = der_utf8_valid_char(in[uVar9 + 2]);\n      if (wVar3 == L'\0') {\n        return L'\x10';\n      }\n      uVar7 = der_utf8_charsize(in[uVar9 + 2]);\n      wVar3 = der_utf8_valid_char(in[uVar9 + 3]);\n      if (wVar3 == L'\0') {\n        return L'\x10';\n      }\n      uVar8 = der_utf8_charsize(in[uVar9 + 3]);\n      uVar4 = uVar4 + uVar5 + uVar6 + uVar7 + uVar8;\n    }" { (labeled_statement "LAB_00177ea1:\n      wVar3 = der_utf8_valid_char(in[uVar9]);" statement_identifier : (expression_statement "wVar3 = der_utf8_valid_char(in[uVar9]);" (assignment_expression "wVar3 = der_utf8_valid_char(in[uVar9])" identifier = (call_expression "der_utf8_valid_char(in[uVar9])" identifier (argument_list "(in[uVar9])" ( (subscript_expression "in[uVar9]" identifier [ identifier ]) )))) ;)) (if_statement "if (wVar3 == L'\0') {\n        return L'\x10';\n      }" if (parenthesized_expression "(wVar3 == L'\0')" ( (binary_expression "wVar3 == L'\0'" identifier == (char_literal "L'\0'" L' escape_sequence ')) )) (compound_statement "{\n        return L'\x10';\n      }" { (return_statement "return L'\x10';" return (char_literal "L'\x10'" L' escape_sequence ') ;) })) (expression_statement "uVar5 = der_utf8_charsize(in[uVar9]);" (assignment_expression "uVar5 = der_utf8_charsize(in[uVar9])" identifier = (call_expression "der_utf8_charsize(in[uVar9])" identifier (argument_list "(in[uVar9])" ( (subscript_expression "in[uVar9]" identifier [ identifier ]) )))) ;) (expression_statement "wVar3 = der_utf8_valid_char(in[uVar9 + 1]);" (assignment_expression "wVar3 = der_utf8_valid_char(in[uVar9 + 1])" identifier = (call_expression "der_utf8_valid_char(in[uVar9 + 1])" identifier (argument_list "(in[uVar9 + 1])" ( (subscript_expression "in[uVar9 + 1]" identifier [ (binary_expression "uVar9 + 1" identifier + number_literal) ]) )))) ;) (if_statement "if (wVar3 == L'\0') {\n        return L'\x10';\n      }" if (parenthesized_expression "(wVar3 == L'\0')" ( (binary_expression "wVar3 == L'\0'" identifier == (char_literal "L'\0'" L' escape_sequence ')) )) (compound_statement "{\n        return L'\x10';\n      }" { (return_statement "return L'\x10';" return (char_literal "L'\x10'" L' escape_sequence ') ;) })) (expression_statement "uVar6 = der_utf8_charsize(in[uVar9 + 1]);" (assignment_expression "uVar6 = der_utf8_charsize(in[uVar9 + 1])" identifier = (call_expression "der_utf8_charsize(in[uVar9 + 1])" identifier (argument_list "(in[uVar9 + 1])" ( (subscript_expression "in[uVar9 + 1]" identifier [ (binary_expression "uVar9 + 1" identifier + number_literal) ]) )))) ;) (expression_statement "wVar3 = der_utf8_valid_char(in[uVar9 + 2]);" (assignment_expression "wVar3 = der_utf8_valid_char(in[uVar9 + 2])" identifier = (call_expression "der_utf8_valid_char(in[uVar9 + 2])" identifier (argument_list "(in[uVar9 + 2])" ( (subscript_expression "in[uVar9 + 2]" identifier [ (binary_expression "uVar9 + 2" identifier + number_literal) ]) )))) ;) (if_statement "if (wVar3 == L'\0') {\n        return L'\x10';\n      }" if (parenthesized_expression "(wVar3 == L'\0')" ( (binary_expression "wVar3 == L'\0'" identifier == (char_literal "L'\0'" L' escape_sequence ')) )) (compound_statement "{\n        return L'\x10';\n      }" { (return_statement "return L'\x10';" return (char_literal "L'\x10'" L' escape_sequence ') ;) })) (expression_statement "uVar7 = der_utf8_charsize(in[uVar9 + 2]);" (assignment_expression "uVar7 = der_utf8_charsize(in[uVar9 + 2])" identifier = (call_expression "der_utf8_charsize(in[uVar9 + 2])" identifier (argument_list "(in[uVar9 + 2])" ( (subscript_expression "in[uVar9 + 2]" identifier [ (binary_expression "uVar9 + 2" identifier + number_literal) ]) )))) ;) (expression_statement "wVar3 = der_utf8_valid_char(in[uVar9 + 3]);" (assignment_expression "wVar3 = der_utf8_valid_char(in[uVar9 + 3])" identifier = (call_expression "der_utf8_valid_char(in[uVar9 + 3])" identifier (argument_list "(in[uVar9 + 3])" ( (subscript_expression "in[uVar9 + 3]" identifier [ (binary_expression "uVar9 + 3" identifier + number_literal) ]) )))) ;) (if_statement "if (wVar3 == L'\0') {\n        return L'\x10';\n      }" if (parenthesized_expression "(wVar3 == L'\0')" ( (binary_expression "wVar3 == L'\0'" identifier == (char_literal "L'\0'" L' escape_sequence ')) )) (compound_statement "{\n        return L'\x10';\n      }" { (return_statement "return L'\x10';" return (char_literal "L'\x10'" L' escape_sequence ') ;) })) (expression_statement "uVar8 = der_utf8_charsize(in[uVar9 + 3]);" (assignment_expression "uVar8 = der_utf8_charsize(in[uVar9 + 3])" identifier = (call_expression "der_utf8_charsize(in[uVar9 + 3])" identifier (argument_list "(in[uVar9 + 3])" ( (subscript_expression "in[uVar9 + 3]" identifier [ (binary_expression "uVar9 + 3" identifier + number_literal) ]) )))) ;) (expression_statement "uVar4 = uVar4 + uVar5 + uVar6 + uVar7 + uVar8;" (assignment_expression "uVar4 = uVar4 + uVar5 + uVar6 + uVar7 + uVar8" identifier = (binary_expression "uVar4 + uVar5 + uVar6 + uVar7 + uVar8" (binary_expression "uVar4 + uVar5 + uVar6 + uVar7" (binary_expression "uVar4 + uVar5 + uVar6" (binary_expression "uVar4 + uVar5" identifier + identifier) + identifier) + identifier) + identifier)) ;) })) (if_statement "if (uVar4 < 0x80) {\n      uVar4 = uVar4 + 2;\n    }\n    else {\n      if (uVar4 < 0x100) {\n        *outlen = uVar4 + 3;\n        return L'\0';\n      }\n      if (uVar4 < 0x10000) {\n        *outlen = uVar4 + 4;\n        return L'\0';\n      }\n      if (0xffffff < uVar4) {\n        return L'\x10';\n      }\n      uVar4 = uVar4 + 5;\n    }" if (parenthesized_expression "(uVar4 < 0x80)" ( (binary_expression "uVar4 < 0x80" identifier < number_literal) )) (compound_statement "{\n      uVar4 = uVar4 + 2;\n    }" { (expression_statement "uVar4 = uVar4 + 2;" (assignment_expression "uVar4 = uVar4 + 2" identifier = (binary_expression "uVar4 + 2" identifier + number_literal)) ;) }) (else_clause "else {\n      if (uVar4 < 0x100) {\n        *outlen = uVar4 + 3;\n        return L'\0';\n      }\n      if (uVar4 < 0x10000) {\n        *outlen = uVar4 + 4;\n        return L'\0';\n      }\n      if (0xffffff < uVar4) {\n        return L'\x10';\n      }\n      uVar4 = uVar4 + 5;\n    }" else (compound_statement "{\n      if (uVar4 < 0x100) {\n        *outlen = uVar4 + 3;\n        return L'\0';\n      }\n      if (uVar4 < 0x10000) {\n        *outlen = uVar4 + 4;\n        return L'\0';\n      }\n      if (0xffffff < uVar4) {\n        return L'\x10';\n      }\n      uVar4 = uVar4 + 5;\n    }" { (if_statement "if (uVar4 < 0x100) {\n        *outlen = uVar4 + 3;\n        return L'\0';\n      }" if (parenthesized_expression "(uVar4 < 0x100)" ( (binary_expression "uVar4 < 0x100" identifier < number_literal) )) (compound_statement "{\n        *outlen = uVar4 + 3;\n        return L'\0';\n      }" { (expression_statement "*outlen = uVar4 + 3;" (assignment_expression "*outlen = uVar4 + 3" (pointer_expression "*outlen" * identifier) = (binary_expression "uVar4 + 3" identifier + number_literal)) ;) (return_statement "return L'\0';" return (char_literal "L'\0'" L' escape_sequence ') ;) })) (if_statement "if (uVar4 < 0x10000) {\n        *outlen = uVar4 + 4;\n        return L'\0';\n      }" if (parenthesized_expression "(uVar4 < 0x10000)" ( (binary_expression "uVar4 < 0x10000" identifier < number_literal) )) (compound_statement "{\n        *outlen = uVar4 + 4;\n        return L'\0';\n      }" { (expression_statement "*outlen = uVar4 + 4;" (assignment_expression "*outlen = uVar4 + 4" (pointer_expression "*outlen" * identifier) = (binary_expression "uVar4 + 4" identifier + number_literal)) ;) (return_statement "return L'\0';" return (char_literal "L'\0'" L' escape_sequence ') ;) })) (if_statement "if (0xffffff < uVar4) {\n        return L'\x10';\n      }" if (parenthesized_expression "(0xffffff < uVar4)" ( (binary_expression "0xffffff < uVar4" number_literal < identifier) )) (compound_statement "{\n        return L'\x10';\n      }" { (return_statement "return L'\x10';" return (char_literal "L'\x10'" L' escape_sequence ') ;) })) (expression_statement "uVar4 = uVar4 + 5;" (assignment_expression "uVar4 = uVar4 + 5" identifier = (binary_expression "uVar4 + 5" identifier + number_literal)) ;) }))) }))) (expression_statement "*outlen = uVar4;" (assignment_expression "*outlen = uVar4" (pointer_expression "*outlen" * identifier) = identifier) ;) (return_statement "return L'\0';" return (char_literal "L'\0'" L' escape_sequence ') ;) })))
(translation_unit "undefined8 der_length_utf8_string(undefined4 *param_1,ulong param_2,long *param_3)\n\n{\n  undefined4 *puVar1;\n  uint uVar2;\n  int iVar3;\n  ulong uVar4;\n  long lVar5;\n  long lVar6;\n  long lVar7;\n  long lVar8;\n  ulong uVar9;\n  \n  if (param_1 == (undefined4 *)0x0) {\n                    \n    crypt_argchk("in != NULL","src/pk/asn1/der/utf8/der_length_utf8_string.c",0x45);\n  }\n  if (param_3 == (long *)0x0) {\n                    \n    crypt_argchk("outlen != NULL","src/pk/asn1/der/utf8/der_length_utf8_string.c",0x46);\n  }\n  uVar4 = 0;\n  uVar9 = 0;\n  if (param_2 == 0) {\n    lVar5 = 2;\n  }\n  else {\n    uVar2 = (uint)param_2 & 3;\n    if ((param_2 & 3) == 0) goto LAB_00177ea1;\n    if (uVar2 != 1) {\n      if (uVar2 != 2) {\n        iVar3 = der_utf8_valid_char(*param_1);\n        if (iVar3 == 0) {\n          return 0x10;\n        }\n        uVar9 = 1;\n        uVar4 = der_utf8_charsize(*param_1);\n      }\n      iVar3 = der_utf8_valid_char(param_1[uVar9]);\n      if (iVar3 == 0) {\n        return 0x10;\n      }\n      puVar1 = param_1 + uVar9;\n      uVar9 = uVar9 + 1;\n      lVar5 = der_utf8_charsize(*puVar1);\n      uVar4 = uVar4 + lVar5;\n    }\n    iVar3 = der_utf8_valid_char(param_1[uVar9]);\n    if (iVar3 == 0) {\n      return 0x10;\n    }\n    lVar5 = der_utf8_charsize(param_1[uVar9]);\n    uVar4 = uVar4 + lVar5;\n    for (uVar9 = uVar9 + 1; param_2 != uVar9; uVar9 = uVar9 + 4) {\nLAB_00177ea1:\n      iVar3 = der_utf8_valid_char(param_1[uVar9]);\n      if (iVar3 == 0) {\n        return 0x10;\n      }\n      lVar5 = der_utf8_charsize(param_1[uVar9]);\n      iVar3 = der_utf8_valid_char(param_1[uVar9 + 1]);\n      if (iVar3 == 0) {\n        return 0x10;\n      }\n      lVar6 = der_utf8_charsize(param_1[uVar9 + 1]);\n      iVar3 = der_utf8_valid_char(param_1[uVar9 + 2]);\n      if (iVar3 == 0) {\n        return 0x10;\n      }\n      lVar7 = der_utf8_charsize(param_1[uVar9 + 2]);\n      iVar3 = der_utf8_valid_char(param_1[uVar9 + 3]);\n      if (iVar3 == 0) {\n        return 0x10;\n      }\n      lVar8 = der_utf8_charsize(param_1[uVar9 + 3]);\n      uVar4 = uVar4 + lVar5 + lVar6 + lVar7 + lVar8;\n    }\n    if (uVar4 < 0x80) {\n      lVar5 = uVar4 + 2;\n    }\n    else {\n      if (uVar4 < 0x100) {\n        *param_3 = uVar4 + 3;\n        return 0;\n      }\n      if (uVar4 < 0x10000) {\n        *param_3 = uVar4 + 4;\n        return 0;\n      }\n      if (0xffffff < uVar4) {\n        return 0x10;\n      }\n      lVar5 = uVar4 + 5;\n    }\n  }\n  *param_3 = lVar5;\n  return 0;\n}\n\n" (function_definition "undefined8 der_length_utf8_string(undefined4 *param_1,ulong param_2,long *param_3)\n\n{\n  undefined4 *puVar1;\n  uint uVar2;\n  int iVar3;\n  ulong uVar4;\n  long lVar5;\n  long lVar6;\n  long lVar7;\n  long lVar8;\n  ulong uVar9;\n  \n  if (param_1 == (undefined4 *)0x0) {\n                    \n    crypt_argchk("in != NULL","src/pk/asn1/der/utf8/der_length_utf8_string.c",0x45);\n  }\n  if (param_3 == (long *)0x0) {\n                    \n    crypt_argchk("outlen != NULL","src/pk/asn1/der/utf8/der_length_utf8_string.c",0x46);\n  }\n  uVar4 = 0;\n  uVar9 = 0;\n  if (param_2 == 0) {\n    lVar5 = 2;\n  }\n  else {\n    uVar2 = (uint)param_2 & 3;\n    if ((param_2 & 3) == 0) goto LAB_00177ea1;\n    if (uVar2 != 1) {\n      if (uVar2 != 2) {\n        iVar3 = der_utf8_valid_char(*param_1);\n        if (iVar3 == 0) {\n          return 0x10;\n        }\n        uVar9 = 1;\n        uVar4 = der_utf8_charsize(*param_1);\n      }\n      iVar3 = der_utf8_valid_char(param_1[uVar9]);\n      if (iVar3 == 0) {\n        return 0x10;\n      }\n      puVar1 = param_1 + uVar9;\n      uVar9 = uVar9 + 1;\n      lVar5 = der_utf8_charsize(*puVar1);\n      uVar4 = uVar4 + lVar5;\n    }\n    iVar3 = der_utf8_valid_char(param_1[uVar9]);\n    if (iVar3 == 0) {\n      return 0x10;\n    }\n    lVar5 = der_utf8_charsize(param_1[uVar9]);\n    uVar4 = uVar4 + lVar5;\n    for (uVar9 = uVar9 + 1; param_2 != uVar9; uVar9 = uVar9 + 4) {\nLAB_00177ea1:\n      iVar3 = der_utf8_valid_char(param_1[uVar9]);\n      if (iVar3 == 0) {\n        return 0x10;\n      }\n      lVar5 = der_utf8_charsize(param_1[uVar9]);\n      iVar3 = der_utf8_valid_char(param_1[uVar9 + 1]);\n      if (iVar3 == 0) {\n        return 0x10;\n      }\n      lVar6 = der_utf8_charsize(param_1[uVar9 + 1]);\n      iVar3 = der_utf8_valid_char(param_1[uVar9 + 2]);\n      if (iVar3 == 0) {\n        return 0x10;\n      }\n      lVar7 = der_utf8_charsize(param_1[uVar9 + 2]);\n      iVar3 = der_utf8_valid_char(param_1[uVar9 + 3]);\n      if (iVar3 == 0) {\n        return 0x10;\n      }\n      lVar8 = der_utf8_charsize(param_1[uVar9 + 3]);\n      uVar4 = uVar4 + lVar5 + lVar6 + lVar7 + lVar8;\n    }\n    if (uVar4 < 0x80) {\n      lVar5 = uVar4 + 2;\n    }\n    else {\n      if (uVar4 < 0x100) {\n        *param_3 = uVar4 + 3;\n        return 0;\n      }\n      if (uVar4 < 0x10000) {\n        *param_3 = uVar4 + 4;\n        return 0;\n      }\n      if (0xffffff < uVar4) {\n        return 0x10;\n      }\n      lVar5 = uVar4 + 5;\n    }\n  }\n  *param_3 = lVar5;\n  return 0;\n}" type_identifier (function_declarator "der_length_utf8_string(undefined4 *param_1,ulong param_2,long *param_3)" identifier (parameter_list "(undefined4 *param_1,ulong param_2,long *param_3)" ( (parameter_declaration "undefined4 *param_1" type_identifier (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "ulong param_2" type_identifier identifier) , (parameter_declaration "long *param_3" (sized_type_specifier "long" long) (pointer_declarator "*param_3" * identifier)) ))) (compound_statement "{\n  undefined4 *puVar1;\n  uint uVar2;\n  int iVar3;\n  ulong uVar4;\n  long lVar5;\n  long lVar6;\n  long lVar7;\n  long lVar8;\n  ulong uVar9;\n  \n  if (param_1 == (undefined4 *)0x0) {\n                    \n    crypt_argchk("in != NULL","src/pk/asn1/der/utf8/der_length_utf8_string.c",0x45);\n  }\n  if (param_3 == (long *)0x0) {\n                    \n    crypt_argchk("outlen != NULL","src/pk/asn1/der/utf8/der_length_utf8_string.c",0x46);\n  }\n  uVar4 = 0;\n  uVar9 = 0;\n  if (param_2 == 0) {\n    lVar5 = 2;\n  }\n  else {\n    uVar2 = (uint)param_2 & 3;\n    if ((param_2 & 3) == 0) goto LAB_00177ea1;\n    if (uVar2 != 1) {\n      if (uVar2 != 2) {\n        iVar3 = der_utf8_valid_char(*param_1);\n        if (iVar3 == 0) {\n          return 0x10;\n        }\n        uVar9 = 1;\n        uVar4 = der_utf8_charsize(*param_1);\n      }\n      iVar3 = der_utf8_valid_char(param_1[uVar9]);\n      if (iVar3 == 0) {\n        return 0x10;\n      }\n      puVar1 = param_1 + uVar9;\n      uVar9 = uVar9 + 1;\n      lVar5 = der_utf8_charsize(*puVar1);\n      uVar4 = uVar4 + lVar5;\n    }\n    iVar3 = der_utf8_valid_char(param_1[uVar9]);\n    if (iVar3 == 0) {\n      return 0x10;\n    }\n    lVar5 = der_utf8_charsize(param_1[uVar9]);\n    uVar4 = uVar4 + lVar5;\n    for (uVar9 = uVar9 + 1; param_2 != uVar9; uVar9 = uVar9 + 4) {\nLAB_00177ea1:\n      iVar3 = der_utf8_valid_char(param_1[uVar9]);\n      if (iVar3 == 0) {\n        return 0x10;\n      }\n      lVar5 = der_utf8_charsize(param_1[uVar9]);\n      iVar3 = der_utf8_valid_char(param_1[uVar9 + 1]);\n      if (iVar3 == 0) {\n        return 0x10;\n      }\n      lVar6 = der_utf8_charsize(param_1[uVar9 + 1]);\n      iVar3 = der_utf8_valid_char(param_1[uVar9 + 2]);\n      if (iVar3 == 0) {\n        return 0x10;\n      }\n      lVar7 = der_utf8_charsize(param_1[uVar9 + 2]);\n      iVar3 = der_utf8_valid_char(param_1[uVar9 + 3]);\n      if (iVar3 == 0) {\n        return 0x10;\n      }\n      lVar8 = der_utf8_charsize(param_1[uVar9 + 3]);\n      uVar4 = uVar4 + lVar5 + lVar6 + lVar7 + lVar8;\n    }\n    if (uVar4 < 0x80) {\n      lVar5 = uVar4 + 2;\n    }\n    else {\n      if (uVar4 < 0x100) {\n        *param_3 = uVar4 + 3;\n        return 0;\n      }\n      if (uVar4 < 0x10000) {\n        *param_3 = uVar4 + 4;\n        return 0;\n      }\n      if (0xffffff < uVar4) {\n        return 0x10;\n      }\n      lVar5 = uVar4 + 5;\n    }\n  }\n  *param_3 = lVar5;\n  return 0;\n}" { (declaration "undefined4 *puVar1;" type_identifier (pointer_declarator "*puVar1" * identifier) ;) (declaration "uint uVar2;" type_identifier identifier ;) (declaration "int iVar3;" primitive_type identifier ;) (declaration "ulong uVar4;" type_identifier identifier ;) (declaration "long lVar5;" (sized_type_specifier "long" long) identifier ;) (declaration "long lVar6;" (sized_type_specifier "long" long) identifier ;) (declaration "long lVar7;" (sized_type_specifier "long" long) identifier ;) (declaration "long lVar8;" (sized_type_specifier "long" long) identifier ;) (declaration "ulong uVar9;" type_identifier identifier ;) (if_statement "if (param_1 == (undefined4 *)0x0) {\n                    \n    crypt_argchk("in != NULL","src/pk/asn1/der/utf8/der_length_utf8_string.c",0x45);\n  }" if (parenthesized_expression "(param_1 == (undefined4 *)0x0)" ( (binary_expression "param_1 == (undefined4 *)0x0" identifier == (cast_expression "(undefined4 *)0x0" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n                    \n    crypt_argchk("in != NULL","src/pk/asn1/der/utf8/der_length_utf8_string.c",0x45);\n  }" { (expression_statement "crypt_argchk("in != NULL","src/pk/asn1/der/utf8/der_length_utf8_string.c",0x45);" (call_expression "crypt_argchk("in != NULL","src/pk/asn1/der/utf8/der_length_utf8_string.c",0x45)" identifier (argument_list "("in != NULL","src/pk/asn1/der/utf8/der_length_utf8_string.c",0x45)" ( (string_literal ""in != NULL"" " string_content ") , (string_literal ""src/pk/asn1/der/utf8/der_length_utf8_string.c"" " string_content ") , number_literal ))) ;) })) (if_statement "if (param_3 == (long *)0x0) {\n                    \n    crypt_argchk("outlen != NULL","src/pk/asn1/der/utf8/der_length_utf8_string.c",0x46);\n  }" if (parenthesized_expression "(param_3 == (long *)0x0)" ( (binary_expression "param_3 == (long *)0x0" identifier == (cast_expression "(long *)0x0" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n                    \n    crypt_argchk("outlen != NULL","src/pk/asn1/der/utf8/der_length_utf8_string.c",0x46);\n  }" { (expression_statement "crypt_argchk("outlen != NULL","src/pk/asn1/der/utf8/der_length_utf8_string.c",0x46);" (call_expression "crypt_argchk("outlen != NULL","src/pk/asn1/der/utf8/der_length_utf8_string.c",0x46)" identifier (argument_list "("outlen != NULL","src/pk/asn1/der/utf8/der_length_utf8_string.c",0x46)" ( (string_literal ""outlen != NULL"" " string_content ") , (string_literal ""src/pk/asn1/der/utf8/der_length_utf8_string.c"" " string_content ") , number_literal ))) ;) })) (expression_statement "uVar4 = 0;" (assignment_expression "uVar4 = 0" identifier = number_literal) ;) (expression_statement "uVar9 = 0;" (assignment_expression "uVar9 = 0" identifier = number_literal) ;) (if_statement "if (param_2 == 0) {\n    lVar5 = 2;\n  }\n  else {\n    uVar2 = (uint)param_2 & 3;\n    if ((param_2 & 3) == 0) goto LAB_00177ea1;\n    if (uVar2 != 1) {\n      if (uVar2 != 2) {\n        iVar3 = der_utf8_valid_char(*param_1);\n        if (iVar3 == 0) {\n          return 0x10;\n        }\n        uVar9 = 1;\n        uVar4 = der_utf8_charsize(*param_1);\n      }\n      iVar3 = der_utf8_valid_char(param_1[uVar9]);\n      if (iVar3 == 0) {\n        return 0x10;\n      }\n      puVar1 = param_1 + uVar9;\n      uVar9 = uVar9 + 1;\n      lVar5 = der_utf8_charsize(*puVar1);\n      uVar4 = uVar4 + lVar5;\n    }\n    iVar3 = der_utf8_valid_char(param_1[uVar9]);\n    if (iVar3 == 0) {\n      return 0x10;\n    }\n    lVar5 = der_utf8_charsize(param_1[uVar9]);\n    uVar4 = uVar4 + lVar5;\n    for (uVar9 = uVar9 + 1; param_2 != uVar9; uVar9 = uVar9 + 4) {\nLAB_00177ea1:\n      iVar3 = der_utf8_valid_char(param_1[uVar9]);\n      if (iVar3 == 0) {\n        return 0x10;\n      }\n      lVar5 = der_utf8_charsize(param_1[uVar9]);\n      iVar3 = der_utf8_valid_char(param_1[uVar9 + 1]);\n      if (iVar3 == 0) {\n        return 0x10;\n      }\n      lVar6 = der_utf8_charsize(param_1[uVar9 + 1]);\n      iVar3 = der_utf8_valid_char(param_1[uVar9 + 2]);\n      if (iVar3 == 0) {\n        return 0x10;\n      }\n      lVar7 = der_utf8_charsize(param_1[uVar9 + 2]);\n      iVar3 = der_utf8_valid_char(param_1[uVar9 + 3]);\n      if (iVar3 == 0) {\n        return 0x10;\n      }\n      lVar8 = der_utf8_charsize(param_1[uVar9 + 3]);\n      uVar4 = uVar4 + lVar5 + lVar6 + lVar7 + lVar8;\n    }\n    if (uVar4 < 0x80) {\n      lVar5 = uVar4 + 2;\n    }\n    else {\n      if (uVar4 < 0x100) {\n        *param_3 = uVar4 + 3;\n        return 0;\n      }\n      if (uVar4 < 0x10000) {\n        *param_3 = uVar4 + 4;\n        return 0;\n      }\n      if (0xffffff < uVar4) {\n        return 0x10;\n      }\n      lVar5 = uVar4 + 5;\n    }\n  }" if (parenthesized_expression "(param_2 == 0)" ( (binary_expression "param_2 == 0" identifier == number_literal) )) (compound_statement "{\n    lVar5 = 2;\n  }" { (expression_statement "lVar5 = 2;" (assignment_expression "lVar5 = 2" identifier = number_literal) ;) }) (else_clause "else {\n    uVar2 = (uint)param_2 & 3;\n    if ((param_2 & 3) == 0) goto LAB_00177ea1;\n    if (uVar2 != 1) {\n      if (uVar2 != 2) {\n        iVar3 = der_utf8_valid_char(*param_1);\n        if (iVar3 == 0) {\n          return 0x10;\n        }\n        uVar9 = 1;\n        uVar4 = der_utf8_charsize(*param_1);\n      }\n      iVar3 = der_utf8_valid_char(param_1[uVar9]);\n      if (iVar3 == 0) {\n        return 0x10;\n      }\n      puVar1 = param_1 + uVar9;\n      uVar9 = uVar9 + 1;\n      lVar5 = der_utf8_charsize(*puVar1);\n      uVar4 = uVar4 + lVar5;\n    }\n    iVar3 = der_utf8_valid_char(param_1[uVar9]);\n    if (iVar3 == 0) {\n      return 0x10;\n    }\n    lVar5 = der_utf8_charsize(param_1[uVar9]);\n    uVar4 = uVar4 + lVar5;\n    for (uVar9 = uVar9 + 1; param_2 != uVar9; uVar9 = uVar9 + 4) {\nLAB_00177ea1:\n      iVar3 = der_utf8_valid_char(param_1[uVar9]);\n      if (iVar3 == 0) {\n        return 0x10;\n      }\n      lVar5 = der_utf8_charsize(param_1[uVar9]);\n      iVar3 = der_utf8_valid_char(param_1[uVar9 + 1]);\n      if (iVar3 == 0) {\n        return 0x10;\n      }\n      lVar6 = der_utf8_charsize(param_1[uVar9 + 1]);\n      iVar3 = der_utf8_valid_char(param_1[uVar9 + 2]);\n      if (iVar3 == 0) {\n        return 0x10;\n      }\n      lVar7 = der_utf8_charsize(param_1[uVar9 + 2]);\n      iVar3 = der_utf8_valid_char(param_1[uVar9 + 3]);\n      if (iVar3 == 0) {\n        return 0x10;\n      }\n      lVar8 = der_utf8_charsize(param_1[uVar9 + 3]);\n      uVar4 = uVar4 + lVar5 + lVar6 + lVar7 + lVar8;\n    }\n    if (uVar4 < 0x80) {\n      lVar5 = uVar4 + 2;\n    }\n    else {\n      if (uVar4 < 0x100) {\n        *param_3 = uVar4 + 3;\n        return 0;\n      }\n      if (uVar4 < 0x10000) {\n        *param_3 = uVar4 + 4;\n        return 0;\n      }\n      if (0xffffff < uVar4) {\n        return 0x10;\n      }\n      lVar5 = uVar4 + 5;\n    }\n  }" else (compound_statement "{\n    uVar2 = (uint)param_2 & 3;\n    if ((param_2 & 3) == 0) goto LAB_00177ea1;\n    if (uVar2 != 1) {\n      if (uVar2 != 2) {\n        iVar3 = der_utf8_valid_char(*param_1);\n        if (iVar3 == 0) {\n          return 0x10;\n        }\n        uVar9 = 1;\n        uVar4 = der_utf8_charsize(*param_1);\n      }\n      iVar3 = der_utf8_valid_char(param_1[uVar9]);\n      if (iVar3 == 0) {\n        return 0x10;\n      }\n      puVar1 = param_1 + uVar9;\n      uVar9 = uVar9 + 1;\n      lVar5 = der_utf8_charsize(*puVar1);\n      uVar4 = uVar4 + lVar5;\n    }\n    iVar3 = der_utf8_valid_char(param_1[uVar9]);\n    if (iVar3 == 0) {\n      return 0x10;\n    }\n    lVar5 = der_utf8_charsize(param_1[uVar9]);\n    uVar4 = uVar4 + lVar5;\n    for (uVar9 = uVar9 + 1; param_2 != uVar9; uVar9 = uVar9 + 4) {\nLAB_00177ea1:\n      iVar3 = der_utf8_valid_char(param_1[uVar9]);\n      if (iVar3 == 0) {\n        return 0x10;\n      }\n      lVar5 = der_utf8_charsize(param_1[uVar9]);\n      iVar3 = der_utf8_valid_char(param_1[uVar9 + 1]);\n      if (iVar3 == 0) {\n        return 0x10;\n      }\n      lVar6 = der_utf8_charsize(param_1[uVar9 + 1]);\n      iVar3 = der_utf8_valid_char(param_1[uVar9 + 2]);\n      if (iVar3 == 0) {\n        return 0x10;\n      }\n      lVar7 = der_utf8_charsize(param_1[uVar9 + 2]);\n      iVar3 = der_utf8_valid_char(param_1[uVar9 + 3]);\n      if (iVar3 == 0) {\n        return 0x10;\n      }\n      lVar8 = der_utf8_charsize(param_1[uVar9 + 3]);\n      uVar4 = uVar4 + lVar5 + lVar6 + lVar7 + lVar8;\n    }\n    if (uVar4 < 0x80) {\n      lVar5 = uVar4 + 2;\n    }\n    else {\n      if (uVar4 < 0x100) {\n        *param_3 = uVar4 + 3;\n        return 0;\n      }\n      if (uVar4 < 0x10000) {\n        *param_3 = uVar4 + 4;\n        return 0;\n      }\n      if (0xffffff < uVar4) {\n        return 0x10;\n      }\n      lVar5 = uVar4 + 5;\n    }\n  }" { (expression_statement "uVar2 = (uint)param_2 & 3;" (assignment_expression "uVar2 = (uint)param_2 & 3" identifier = (binary_expression "(uint)param_2 & 3" (cast_expression "(uint)param_2" ( (type_descriptor "uint" type_identifier) ) identifier) & number_literal)) ;) (if_statement "if ((param_2 & 3) == 0) goto LAB_00177ea1;" if (parenthesized_expression "((param_2 & 3) == 0)" ( (binary_expression "(param_2 & 3) == 0" (parenthesized_expression "(param_2 & 3)" ( (binary_expression "param_2 & 3" identifier & number_literal) )) == number_literal) )) (goto_statement "goto LAB_00177ea1;" goto statement_identifier ;)) (if_statement "if (uVar2 != 1) {\n      if (uVar2 != 2) {\n        iVar3 = der_utf8_valid_char(*param_1);\n        if (iVar3 == 0) {\n          return 0x10;\n        }\n        uVar9 = 1;\n        uVar4 = der_utf8_charsize(*param_1);\n      }\n      iVar3 = der_utf8_valid_char(param_1[uVar9]);\n      if (iVar3 == 0) {\n        return 0x10;\n      }\n      puVar1 = param_1 + uVar9;\n      uVar9 = uVar9 + 1;\n      lVar5 = der_utf8_charsize(*puVar1);\n      uVar4 = uVar4 + lVar5;\n    }" if (parenthesized_expression "(uVar2 != 1)" ( (binary_expression "uVar2 != 1" identifier != number_literal) )) (compound_statement "{\n      if (uVar2 != 2) {\n        iVar3 = der_utf8_valid_char(*param_1);\n        if (iVar3 == 0) {\n          return 0x10;\n        }\n        uVar9 = 1;\n        uVar4 = der_utf8_charsize(*param_1);\n      }\n      iVar3 = der_utf8_valid_char(param_1[uVar9]);\n      if (iVar3 == 0) {\n        return 0x10;\n      }\n      puVar1 = param_1 + uVar9;\n      uVar9 = uVar9 + 1;\n      lVar5 = der_utf8_charsize(*puVar1);\n      uVar4 = uVar4 + lVar5;\n    }" { (if_statement "if (uVar2 != 2) {\n        iVar3 = der_utf8_valid_char(*param_1);\n        if (iVar3 == 0) {\n          return 0x10;\n        }\n        uVar9 = 1;\n        uVar4 = der_utf8_charsize(*param_1);\n      }" if (parenthesized_expression "(uVar2 != 2)" ( (binary_expression "uVar2 != 2" identifier != number_literal) )) (compound_statement "{\n        iVar3 = der_utf8_valid_char(*param_1);\n        if (iVar3 == 0) {\n          return 0x10;\n        }\n        uVar9 = 1;\n        uVar4 = der_utf8_charsize(*param_1);\n      }" { (expression_statement "iVar3 = der_utf8_valid_char(*param_1);" (assignment_expression "iVar3 = der_utf8_valid_char(*param_1)" identifier = (call_expression "der_utf8_valid_char(*param_1)" identifier (argument_list "(*param_1)" ( (pointer_expression "*param_1" * identifier) )))) ;) (if_statement "if (iVar3 == 0) {\n          return 0x10;\n        }" if (parenthesized_expression "(iVar3 == 0)" ( (binary_expression "iVar3 == 0" identifier == number_literal) )) (compound_statement "{\n          return 0x10;\n        }" { (return_statement "return 0x10;" return number_literal ;) })) (expression_statement "uVar9 = 1;" (assignment_expression "uVar9 = 1" identifier = number_literal) ;) (expression_statement "uVar4 = der_utf8_charsize(*param_1);" (assignment_expression "uVar4 = der_utf8_charsize(*param_1)" identifier = (call_expression "der_utf8_charsize(*param_1)" identifier (argument_list "(*param_1)" ( (pointer_expression "*param_1" * identifier) )))) ;) })) (expression_statement "iVar3 = der_utf8_valid_char(param_1[uVar9]);" (assignment_expression "iVar3 = der_utf8_valid_char(param_1[uVar9])" identifier = (call_expression "der_utf8_valid_char(param_1[uVar9])" identifier (argument_list "(param_1[uVar9])" ( (subscript_expression "param_1[uVar9]" identifier [ identifier ]) )))) ;) (if_statement "if (iVar3 == 0) {\n        return 0x10;\n      }" if (parenthesized_expression "(iVar3 == 0)" ( (binary_expression "iVar3 == 0" identifier == number_literal) )) (compound_statement "{\n        return 0x10;\n      }" { (return_statement "return 0x10;" return number_literal ;) })) (expression_statement "puVar1 = param_1 + uVar9;" (assignment_expression "puVar1 = param_1 + uVar9" identifier = (binary_expression "param_1 + uVar9" identifier + identifier)) ;) (expression_statement "uVar9 = uVar9 + 1;" (assignment_expression "uVar9 = uVar9 + 1" identifier = (binary_expression "uVar9 + 1" identifier + number_literal)) ;) (expression_statement "lVar5 = der_utf8_charsize(*puVar1);" (assignment_expression "lVar5 = der_utf8_charsize(*puVar1)" identifier = (call_expression "der_utf8_charsize(*puVar1)" identifier (argument_list "(*puVar1)" ( (pointer_expression "*puVar1" * identifier) )))) ;) (expression_statement "uVar4 = uVar4 + lVar5;" (assignment_expression "uVar4 = uVar4 + lVar5" identifier = (binary_expression "uVar4 + lVar5" identifier + identifier)) ;) })) (expression_statement "iVar3 = der_utf8_valid_char(param_1[uVar9]);" (assignment_expression "iVar3 = der_utf8_valid_char(param_1[uVar9])" identifier = (call_expression "der_utf8_valid_char(param_1[uVar9])" identifier (argument_list "(param_1[uVar9])" ( (subscript_expression "param_1[uVar9]" identifier [ identifier ]) )))) ;) (if_statement "if (iVar3 == 0) {\n      return 0x10;\n    }" if (parenthesized_expression "(iVar3 == 0)" ( (binary_expression "iVar3 == 0" identifier == number_literal) )) (compound_statement "{\n      return 0x10;\n    }" { (return_statement "return 0x10;" return number_literal ;) })) (expression_statement "lVar5 = der_utf8_charsize(param_1[uVar9]);" (assignment_expression "lVar5 = der_utf8_charsize(param_1[uVar9])" identifier = (call_expression "der_utf8_charsize(param_1[uVar9])" identifier (argument_list "(param_1[uVar9])" ( (subscript_expression "param_1[uVar9]" identifier [ identifier ]) )))) ;) (expression_statement "uVar4 = uVar4 + lVar5;" (assignment_expression "uVar4 = uVar4 + lVar5" identifier = (binary_expression "uVar4 + lVar5" identifier + identifier)) ;) (for_statement "for (uVar9 = uVar9 + 1; param_2 != uVar9; uVar9 = uVar9 + 4) {\nLAB_00177ea1:\n      iVar3 = der_utf8_valid_char(param_1[uVar9]);\n      if (iVar3 == 0) {\n        return 0x10;\n      }\n      lVar5 = der_utf8_charsize(param_1[uVar9]);\n      iVar3 = der_utf8_valid_char(param_1[uVar9 + 1]);\n      if (iVar3 == 0) {\n        return 0x10;\n      }\n      lVar6 = der_utf8_charsize(param_1[uVar9 + 1]);\n      iVar3 = der_utf8_valid_char(param_1[uVar9 + 2]);\n      if (iVar3 == 0) {\n        return 0x10;\n      }\n      lVar7 = der_utf8_charsize(param_1[uVar9 + 2]);\n      iVar3 = der_utf8_valid_char(param_1[uVar9 + 3]);\n      if (iVar3 == 0) {\n        return 0x10;\n      }\n      lVar8 = der_utf8_charsize(param_1[uVar9 + 3]);\n      uVar4 = uVar4 + lVar5 + lVar6 + lVar7 + lVar8;\n    }" for ( (assignment_expression "uVar9 = uVar9 + 1" identifier = (binary_expression "uVar9 + 1" identifier + number_literal)) ; (binary_expression "param_2 != uVar9" identifier != identifier) ; (assignment_expression "uVar9 = uVar9 + 4" identifier = (binary_expression "uVar9 + 4" identifier + number_literal)) ) (compound_statement "{\nLAB_00177ea1:\n      iVar3 = der_utf8_valid_char(param_1[uVar9]);\n      if (iVar3 == 0) {\n        return 0x10;\n      }\n      lVar5 = der_utf8_charsize(param_1[uVar9]);\n      iVar3 = der_utf8_valid_char(param_1[uVar9 + 1]);\n      if (iVar3 == 0) {\n        return 0x10;\n      }\n      lVar6 = der_utf8_charsize(param_1[uVar9 + 1]);\n      iVar3 = der_utf8_valid_char(param_1[uVar9 + 2]);\n      if (iVar3 == 0) {\n        return 0x10;\n      }\n      lVar7 = der_utf8_charsize(param_1[uVar9 + 2]);\n      iVar3 = der_utf8_valid_char(param_1[uVar9 + 3]);\n      if (iVar3 == 0) {\n        return 0x10;\n      }\n      lVar8 = der_utf8_charsize(param_1[uVar9 + 3]);\n      uVar4 = uVar4 + lVar5 + lVar6 + lVar7 + lVar8;\n    }" { (labeled_statement "LAB_00177ea1:\n      iVar3 = der_utf8_valid_char(param_1[uVar9]);" statement_identifier : (expression_statement "iVar3 = der_utf8_valid_char(param_1[uVar9]);" (assignment_expression "iVar3 = der_utf8_valid_char(param_1[uVar9])" identifier = (call_expression "der_utf8_valid_char(param_1[uVar9])" identifier (argument_list "(param_1[uVar9])" ( (subscript_expression "param_1[uVar9]" identifier [ identifier ]) )))) ;)) (if_statement "if (iVar3 == 0) {\n        return 0x10;\n      }" if (parenthesized_expression "(iVar3 == 0)" ( (binary_expression "iVar3 == 0" identifier == number_literal) )) (compound_statement "{\n        return 0x10;\n      }" { (return_statement "return 0x10;" return number_literal ;) })) (expression_statement "lVar5 = der_utf8_charsize(param_1[uVar9]);" (assignment_expression "lVar5 = der_utf8_charsize(param_1[uVar9])" identifier = (call_expression "der_utf8_charsize(param_1[uVar9])" identifier (argument_list "(param_1[uVar9])" ( (subscript_expression "param_1[uVar9]" identifier [ identifier ]) )))) ;) (expression_statement "iVar3 = der_utf8_valid_char(param_1[uVar9 + 1]);" (assignment_expression "iVar3 = der_utf8_valid_char(param_1[uVar9 + 1])" identifier = (call_expression "der_utf8_valid_char(param_1[uVar9 + 1])" identifier (argument_list "(param_1[uVar9 + 1])" ( (subscript_expression "param_1[uVar9 + 1]" identifier [ (binary_expression "uVar9 + 1" identifier + number_literal) ]) )))) ;) (if_statement "if (iVar3 == 0) {\n        return 0x10;\n      }" if (parenthesized_expression "(iVar3 == 0)" ( (binary_expression "iVar3 == 0" identifier == number_literal) )) (compound_statement "{\n        return 0x10;\n      }" { (return_statement "return 0x10;" return number_literal ;) })) (expression_statement "lVar6 = der_utf8_charsize(param_1[uVar9 + 1]);" (assignment_expression "lVar6 = der_utf8_charsize(param_1[uVar9 + 1])" identifier = (call_expression "der_utf8_charsize(param_1[uVar9 + 1])" identifier (argument_list "(param_1[uVar9 + 1])" ( (subscript_expression "param_1[uVar9 + 1]" identifier [ (binary_expression "uVar9 + 1" identifier + number_literal) ]) )))) ;) (expression_statement "iVar3 = der_utf8_valid_char(param_1[uVar9 + 2]);" (assignment_expression "iVar3 = der_utf8_valid_char(param_1[uVar9 + 2])" identifier = (call_expression "der_utf8_valid_char(param_1[uVar9 + 2])" identifier (argument_list "(param_1[uVar9 + 2])" ( (subscript_expression "param_1[uVar9 + 2]" identifier [ (binary_expression "uVar9 + 2" identifier + number_literal) ]) )))) ;) (if_statement "if (iVar3 == 0) {\n        return 0x10;\n      }" if (parenthesized_expression "(iVar3 == 0)" ( (binary_expression "iVar3 == 0" identifier == number_literal) )) (compound_statement "{\n        return 0x10;\n      }" { (return_statement "return 0x10;" return number_literal ;) })) (expression_statement "lVar7 = der_utf8_charsize(param_1[uVar9 + 2]);" (assignment_expression "lVar7 = der_utf8_charsize(param_1[uVar9 + 2])" identifier = (call_expression "der_utf8_charsize(param_1[uVar9 + 2])" identifier (argument_list "(param_1[uVar9 + 2])" ( (subscript_expression "param_1[uVar9 + 2]" identifier [ (binary_expression "uVar9 + 2" identifier + number_literal) ]) )))) ;) (expression_statement "iVar3 = der_utf8_valid_char(param_1[uVar9 + 3]);" (assignment_expression "iVar3 = der_utf8_valid_char(param_1[uVar9 + 3])" identifier = (call_expression "der_utf8_valid_char(param_1[uVar9 + 3])" identifier (argument_list "(param_1[uVar9 + 3])" ( (subscript_expression "param_1[uVar9 + 3]" identifier [ (binary_expression "uVar9 + 3" identifier + number_literal) ]) )))) ;) (if_statement "if (iVar3 == 0) {\n        return 0x10;\n      }" if (parenthesized_expression "(iVar3 == 0)" ( (binary_expression "iVar3 == 0" identifier == number_literal) )) (compound_statement "{\n        return 0x10;\n      }" { (return_statement "return 0x10;" return number_literal ;) })) (expression_statement "lVar8 = der_utf8_charsize(param_1[uVar9 + 3]);" (assignment_expression "lVar8 = der_utf8_charsize(param_1[uVar9 + 3])" identifier = (call_expression "der_utf8_charsize(param_1[uVar9 + 3])" identifier (argument_list "(param_1[uVar9 + 3])" ( (subscript_expression "param_1[uVar9 + 3]" identifier [ (binary_expression "uVar9 + 3" identifier + number_literal) ]) )))) ;) (expression_statement "uVar4 = uVar4 + lVar5 + lVar6 + lVar7 + lVar8;" (assignment_expression "uVar4 = uVar4 + lVar5 + lVar6 + lVar7 + lVar8" identifier = (binary_expression "uVar4 + lVar5 + lVar6 + lVar7 + lVar8" (binary_expression "uVar4 + lVar5 + lVar6 + lVar7" (binary_expression "uVar4 + lVar5 + lVar6" (binary_expression "uVar4 + lVar5" identifier + identifier) + identifier) + identifier) + identifier)) ;) })) (if_statement "if (uVar4 < 0x80) {\n      lVar5 = uVar4 + 2;\n    }\n    else {\n      if (uVar4 < 0x100) {\n        *param_3 = uVar4 + 3;\n        return 0;\n      }\n      if (uVar4 < 0x10000) {\n        *param_3 = uVar4 + 4;\n        return 0;\n      }\n      if (0xffffff < uVar4) {\n        return 0x10;\n      }\n      lVar5 = uVar4 + 5;\n    }" if (parenthesized_expression "(uVar4 < 0x80)" ( (binary_expression "uVar4 < 0x80" identifier < number_literal) )) (compound_statement "{\n      lVar5 = uVar4 + 2;\n    }" { (expression_statement "lVar5 = uVar4 + 2;" (assignment_expression "lVar5 = uVar4 + 2" identifier = (binary_expression "uVar4 + 2" identifier + number_literal)) ;) }) (else_clause "else {\n      if (uVar4 < 0x100) {\n        *param_3 = uVar4 + 3;\n        return 0;\n      }\n      if (uVar4 < 0x10000) {\n        *param_3 = uVar4 + 4;\n        return 0;\n      }\n      if (0xffffff < uVar4) {\n        return 0x10;\n      }\n      lVar5 = uVar4 + 5;\n    }" else (compound_statement "{\n      if (uVar4 < 0x100) {\n        *param_3 = uVar4 + 3;\n        return 0;\n      }\n      if (uVar4 < 0x10000) {\n        *param_3 = uVar4 + 4;\n        return 0;\n      }\n      if (0xffffff < uVar4) {\n        return 0x10;\n      }\n      lVar5 = uVar4 + 5;\n    }" { (if_statement "if (uVar4 < 0x100) {\n        *param_3 = uVar4 + 3;\n        return 0;\n      }" if (parenthesized_expression "(uVar4 < 0x100)" ( (binary_expression "uVar4 < 0x100" identifier < number_literal) )) (compound_statement "{\n        *param_3 = uVar4 + 3;\n        return 0;\n      }" { (expression_statement "*param_3 = uVar4 + 3;" (assignment_expression "*param_3 = uVar4 + 3" (pointer_expression "*param_3" * identifier) = (binary_expression "uVar4 + 3" identifier + number_literal)) ;) (return_statement "return 0;" return number_literal ;) })) (if_statement "if (uVar4 < 0x10000) {\n        *param_3 = uVar4 + 4;\n        return 0;\n      }" if (parenthesized_expression "(uVar4 < 0x10000)" ( (binary_expression "uVar4 < 0x10000" identifier < number_literal) )) (compound_statement "{\n        *param_3 = uVar4 + 4;\n        return 0;\n      }" { (expression_statement "*param_3 = uVar4 + 4;" (assignment_expression "*param_3 = uVar4 + 4" (pointer_expression "*param_3" * identifier) = (binary_expression "uVar4 + 4" identifier + number_literal)) ;) (return_statement "return 0;" return number_literal ;) })) (if_statement "if (0xffffff < uVar4) {\n        return 0x10;\n      }" if (parenthesized_expression "(0xffffff < uVar4)" ( (binary_expression "0xffffff < uVar4" number_literal < identifier) )) (compound_statement "{\n        return 0x10;\n      }" { (return_statement "return 0x10;" return number_literal ;) })) (expression_statement "lVar5 = uVar4 + 5;" (assignment_expression "lVar5 = uVar4 + 5" identifier = (binary_expression "uVar4 + 5" identifier + number_literal)) ;) }))) }))) (expression_statement "*param_3 = lVar5;" (assignment_expression "*param_3 = lVar5" (pointer_expression "*param_3" * identifier) = identifier) ;) (return_statement "return 0;" return number_literal ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE (pointer_declarator * IDENT)) , (parameter_declaration TYPE IDENT) , (parameter_declaration (sized_type_specifier long) (pointer_declarator * IDENT)) ))) (compound_statement { (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration (sized_type_specifier long) IDENT ;) (declaration (sized_type_specifier long) IDENT ;) (declaration (sized_type_specifier long) IDENT ;) (declaration (sized_type_specifier long) IDENT ;) (declaration TYPE IDENT ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( (string_literal " string_content ") , (string_literal " string_content ") , LIT ))) ;) })) (if_statement if (parenthesized_expression ( (binary_expression IDENT == (cast_expression ( (type_descriptor (sized_type_specifier long) (abstract_pointer_declarator *)) ) LIT)) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( (string_literal " string_content ") , (string_literal " string_content ") , LIT ))) ;) })) (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = LIT) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) }) (else_clause else (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) & LIT)) ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT & LIT) )) == LIT) )) (goto_statement goto statement_identifier ;)) (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( (pointer_expression * IDENT) )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (return_statement return LIT ;) })) (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( (pointer_expression * IDENT) )))) ;) })) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( (subscript_expression IDENT [ IDENT ]) )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (return_statement return LIT ;) })) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + IDENT)) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( (pointer_expression * IDENT) )))) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + IDENT)) ;) })) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( (subscript_expression IDENT [ IDENT ]) )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (return_statement return LIT ;) })) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( (subscript_expression IDENT [ IDENT ]) )))) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + IDENT)) ;) (for_statement for ( (assignment_expression IDENT = (binary_expression IDENT + LIT)) ; (binary_expression IDENT != IDENT) ; (assignment_expression IDENT = (binary_expression IDENT + LIT)) ) (compound_statement { (labeled_statement statement_identifier : (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( (subscript_expression IDENT [ IDENT ]) )))) ;)) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (return_statement return LIT ;) })) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( (subscript_expression IDENT [ IDENT ]) )))) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( (subscript_expression IDENT [ (binary_expression IDENT + LIT) ]) )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (return_statement return LIT ;) })) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( (subscript_expression IDENT [ (binary_expression IDENT + LIT) ]) )))) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( (subscript_expression IDENT [ (binary_expression IDENT + LIT) ]) )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (return_statement return LIT ;) })) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( (subscript_expression IDENT [ (binary_expression IDENT + LIT) ]) )))) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( (subscript_expression IDENT [ (binary_expression IDENT + LIT) ]) )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (return_statement return LIT ;) })) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( (subscript_expression IDENT [ (binary_expression IDENT + LIT) ]) )))) ;) (expression_statement (assignment_expression IDENT = (binary_expression (binary_expression (binary_expression (binary_expression IDENT + IDENT) + IDENT) + IDENT) + IDENT)) ;) })) (if_statement if (parenthesized_expression ( (binary_expression IDENT < LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) }) (else_clause else (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression IDENT < LIT) )) (compound_statement { (expression_statement (assignment_expression (pointer_expression * IDENT) = (binary_expression IDENT + LIT)) ;) (return_statement return LIT ;) })) (if_statement if (parenthesized_expression ( (binary_expression IDENT < LIT) )) (compound_statement { (expression_statement (assignment_expression (pointer_expression * IDENT) = (binary_expression IDENT + LIT)) ;) (return_statement return LIT ;) })) (if_statement if (parenthesized_expression ( (binary_expression LIT < IDENT) )) (compound_statement { (return_statement return LIT ;) })) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) }))) }))) (expression_statement (assignment_expression (pointer_expression * IDENT) = IDENT) ;) (return_statement return LIT ;) })))
(function_definition "undefined8 der_length_utf8_string(undefined4 *param_1,ulong param_2,long *param_3)\n\n{\n  undefined4 *puVar1;\n  uint uVar2;\n  int iVar3;\n  ulong uVar4;\n  long lVar5;\n  long lVar6;\n  long lVar7;\n  long lVar8;\n  ulong uVar9;\n  \n  if (param_1 == (undefined4 *)0x0) {\n                    \n    crypt_argchk("in != NULL","src/pk/asn1/der/utf8/der_length_utf8_string.c",0x45);\n  }\n  if (param_3 == (long *)0x0) {\n                    \n    crypt_argchk("outlen != NULL","src/pk/asn1/der/utf8/der_length_utf8_string.c",0x46);\n  }\n  uVar4 = 0;\n  uVar9 = 0;\n  if (param_2 == 0) {\n    lVar5 = 2;\n  }\n  else {\n    uVar2 = (uint)param_2 & 3;\n    if ((param_2 & 3) == 0) goto LAB_00177ea1;\n    if (uVar2 != 1) {\n      if (uVar2 != 2) {\n        iVar3 = der_utf8_valid_char(*param_1);\n        if (iVar3 == 0) {\n          return 0x10;\n        }\n        uVar9 = 1;\n        uVar4 = der_utf8_charsize(*param_1);\n      }\n      iVar3 = der_utf8_valid_char(param_1[uVar9]);\n      if (iVar3 == 0) {\n        return 0x10;\n      }\n      puVar1 = param_1 + uVar9;\n      uVar9 = uVar9 + 1;\n      lVar5 = der_utf8_charsize(*puVar1);\n      uVar4 = uVar4 + lVar5;\n    }\n    iVar3 = der_utf8_valid_char(param_1[uVar9]);\n    if (iVar3 == 0) {\n      return 0x10;\n    }\n    lVar5 = der_utf8_charsize(param_1[uVar9]);\n    uVar4 = uVar4 + lVar5;\n    for (uVar9 = uVar9 + 1; param_2 != uVar9; uVar9 = uVar9 + 4) {\nLAB_00177ea1:\n      iVar3 = der_utf8_valid_char(param_1[uVar9]);\n      if (iVar3 == 0) {\n        return 0x10;\n      }\n      lVar5 = der_utf8_charsize(param_1[uVar9]);\n      iVar3 = der_utf8_valid_char(param_1[uVar9 + 1]);\n      if (iVar3 == 0) {\n        return 0x10;\n      }\n      lVar6 = der_utf8_charsize(param_1[uVar9 + 1]);\n      iVar3 = der_utf8_valid_char(param_1[uVar9 + 2]);\n      if (iVar3 == 0) {\n        return 0x10;\n      }\n      lVar7 = der_utf8_charsize(param_1[uVar9 + 2]);\n      iVar3 = der_utf8_valid_char(param_1[uVar9 + 3]);\n      if (iVar3 == 0) {\n        return 0x10;\n      }\n      lVar8 = der_utf8_charsize(param_1[uVar9 + 3]);\n      uVar4 = uVar4 + lVar5 + lVar6 + lVar7 + lVar8;\n    }\n    if (uVar4 < 0x80) {\n      lVar5 = uVar4 + 2;\n    }\n    else {\n      if (uVar4 < 0x100) {\n        *param_3 = uVar4 + 3;\n        return 0;\n      }\n      if (uVar4 < 0x10000) {\n        *param_3 = uVar4 + 4;\n        return 0;\n      }\n      if (0xffffff < uVar4) {\n        return 0x10;\n      }\n      lVar5 = uVar4 + 5;\n    }\n  }\n  *param_3 = lVar5;\n  return 0;\n}" (type_identifier "undefined8") (function_declarator "der_length_utf8_string(undefined4 *param_1,ulong param_2,long *param_3)" (identifier "der_length_utf8_string") (parameter_list "(undefined4 *param_1,ulong param_2,long *param_3)" (( "(") (parameter_declaration "undefined4 *param_1" (type_identifier "undefined4") (pointer_declarator "*param_1" (* "*") (identifier "param_1"))) (, ",") (parameter_declaration "ulong param_2" (type_identifier "ulong") (identifier "param_2")) (, ",") (parameter_declaration "long *param_3" (sized_type_specifier "long" (long "long")) (pointer_declarator "*param_3" (* "*") (identifier "param_3"))) () ")"))) (compound_statement "{\n  undefined4 *puVar1;\n  uint uVar2;\n  int iVar3;\n  ulong uVar4;\n  long lVar5;\n  long lVar6;\n  long lVar7;\n  long lVar8;\n  ulong uVar9;\n  \n  if (param_1 == (undefined4 *)0x0) {\n                    \n    crypt_argchk("in != NULL","src/pk/asn1/der/utf8/der_length_utf8_string.c",0x45);\n  }\n  if (param_3 == (long *)0x0) {\n                    \n    crypt_argchk("outlen != NULL","src/pk/asn1/der/utf8/der_length_utf8_string.c",0x46);\n  }\n  uVar4 = 0;\n  uVar9 = 0;\n  if (param_2 == 0) {\n    lVar5 = 2;\n  }\n  else {\n    uVar2 = (uint)param_2 & 3;\n    if ((param_2 & 3) == 0) goto LAB_00177ea1;\n    if (uVar2 != 1) {\n      if (uVar2 != 2) {\n        iVar3 = der_utf8_valid_char(*param_1);\n        if (iVar3 == 0) {\n          return 0x10;\n        }\n        uVar9 = 1;\n        uVar4 = der_utf8_charsize(*param_1);\n      }\n      iVar3 = der_utf8_valid_char(param_1[uVar9]);\n      if (iVar3 == 0) {\n        return 0x10;\n      }\n      puVar1 = param_1 + uVar9;\n      uVar9 = uVar9 + 1;\n      lVar5 = der_utf8_charsize(*puVar1);\n      uVar4 = uVar4 + lVar5;\n    }\n    iVar3 = der_utf8_valid_char(param_1[uVar9]);\n    if (iVar3 == 0) {\n      return 0x10;\n    }\n    lVar5 = der_utf8_charsize(param_1[uVar9]);\n    uVar4 = uVar4 + lVar5;\n    for (uVar9 = uVar9 + 1; param_2 != uVar9; uVar9 = uVar9 + 4) {\nLAB_00177ea1:\n      iVar3 = der_utf8_valid_char(param_1[uVar9]);\n      if (iVar3 == 0) {\n        return 0x10;\n      }\n      lVar5 = der_utf8_charsize(param_1[uVar9]);\n      iVar3 = der_utf8_valid_char(param_1[uVar9 + 1]);\n      if (iVar3 == 0) {\n        return 0x10;\n      }\n      lVar6 = der_utf8_charsize(param_1[uVar9 + 1]);\n      iVar3 = der_utf8_valid_char(param_1[uVar9 + 2]);\n      if (iVar3 == 0) {\n        return 0x10;\n      }\n      lVar7 = der_utf8_charsize(param_1[uVar9 + 2]);\n      iVar3 = der_utf8_valid_char(param_1[uVar9 + 3]);\n      if (iVar3 == 0) {\n        return 0x10;\n      }\n      lVar8 = der_utf8_charsize(param_1[uVar9 + 3]);\n      uVar4 = uVar4 + lVar5 + lVar6 + lVar7 + lVar8;\n    }\n    if (uVar4 < 0x80) {\n      lVar5 = uVar4 + 2;\n    }\n    else {\n      if (uVar4 < 0x100) {\n        *param_3 = uVar4 + 3;\n        return 0;\n      }\n      if (uVar4 < 0x10000) {\n        *param_3 = uVar4 + 4;\n        return 0;\n      }\n      if (0xffffff < uVar4) {\n        return 0x10;\n      }\n      lVar5 = uVar4 + 5;\n    }\n  }\n  *param_3 = lVar5;\n  return 0;\n}" ({ "{") (declaration "undefined4 *puVar1;" (type_identifier "undefined4") (pointer_declarator "*puVar1" (* "*") (identifier "puVar1")) (; ";")) (declaration "uint uVar2;" (type_identifier "uint") (identifier "uVar2") (; ";")) (declaration "int iVar3;" (primitive_type "int") (identifier "iVar3") (; ";")) (declaration "ulong uVar4;" (type_identifier "ulong") (identifier "uVar4") (; ";")) (declaration "long lVar5;" (sized_type_specifier "long" (long "long")) (identifier "lVar5") (; ";")) (declaration "long lVar6;" (sized_type_specifier "long" (long "long")) (identifier "lVar6") (; ";")) (declaration "long lVar7;" (sized_type_specifier "long" (long "long")) (identifier "lVar7") (; ";")) (declaration "long lVar8;" (sized_type_specifier "long" (long "long")) (identifier "lVar8") (; ";")) (declaration "ulong uVar9;" (type_identifier "ulong") (identifier "uVar9") (; ";")) (if_statement "if (param_1 == (undefined4 *)0x0) {\n                    \n    crypt_argchk("in != NULL","src/pk/asn1/der/utf8/der_length_utf8_string.c",0x45);\n  }" (if "if") (parenthesized_expression "(param_1 == (undefined4 *)0x0)" (( "(") (binary_expression "param_1 == (undefined4 *)0x0" (identifier "param_1") (== "==") (cast_expression "(undefined4 *)0x0" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\n                    \n    crypt_argchk("in != NULL","src/pk/asn1/der/utf8/der_length_utf8_string.c",0x45);\n  }" ({ "{") (expression_statement "crypt_argchk("in != NULL","src/pk/asn1/der/utf8/der_length_utf8_string.c",0x45);" (call_expression "crypt_argchk("in != NULL","src/pk/asn1/der/utf8/der_length_utf8_string.c",0x45)" (identifier "crypt_argchk") (argument_list "("in != NULL","src/pk/asn1/der/utf8/der_length_utf8_string.c",0x45)" (( "(") (string_literal ""in != NULL"" (" """) (string_content "in != NULL") (" """)) (, ",") (string_literal ""src/pk/asn1/der/utf8/der_length_utf8_string.c"" (" """) (string_content "src/pk/asn1/der/utf8/der_length_utf8_string.c") (" """)) (, ",") (number_literal "0x45") () ")"))) (; ";")) (} "}"))) (if_statement "if (param_3 == (long *)0x0) {\n                    \n    crypt_argchk("outlen != NULL","src/pk/asn1/der/utf8/der_length_utf8_string.c",0x46);\n  }" (if "if") (parenthesized_expression "(param_3 == (long *)0x0)" (( "(") (binary_expression "param_3 == (long *)0x0" (identifier "param_3") (== "==") (cast_expression "(long *)0x0" (( "(") (type_descriptor "long *" (sized_type_specifier "long" (long "long")) (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\n                    \n    crypt_argchk("outlen != NULL","src/pk/asn1/der/utf8/der_length_utf8_string.c",0x46);\n  }" ({ "{") (expression_statement "crypt_argchk("outlen != NULL","src/pk/asn1/der/utf8/der_length_utf8_string.c",0x46);" (call_expression "crypt_argchk("outlen != NULL","src/pk/asn1/der/utf8/der_length_utf8_string.c",0x46)" (identifier "crypt_argchk") (argument_list "("outlen != NULL","src/pk/asn1/der/utf8/der_length_utf8_string.c",0x46)" (( "(") (string_literal ""outlen != NULL"" (" """) (string_content "outlen != NULL") (" """)) (, ",") (string_literal ""src/pk/asn1/der/utf8/der_length_utf8_string.c"" (" """) (string_content "src/pk/asn1/der/utf8/der_length_utf8_string.c") (" """)) (, ",") (number_literal "0x46") () ")"))) (; ";")) (} "}"))) (expression_statement "uVar4 = 0;" (assignment_expression "uVar4 = 0" (identifier "uVar4") (= "=") (number_literal "0")) (; ";")) (expression_statement "uVar9 = 0;" (assignment_expression "uVar9 = 0" (identifier "uVar9") (= "=") (number_literal "0")) (; ";")) (if_statement "if (param_2 == 0) {\n    lVar5 = 2;\n  }\n  else {\n    uVar2 = (uint)param_2 & 3;\n    if ((param_2 & 3) == 0) goto LAB_00177ea1;\n    if (uVar2 != 1) {\n      if (uVar2 != 2) {\n        iVar3 = der_utf8_valid_char(*param_1);\n        if (iVar3 == 0) {\n          return 0x10;\n        }\n        uVar9 = 1;\n        uVar4 = der_utf8_charsize(*param_1);\n      }\n      iVar3 = der_utf8_valid_char(param_1[uVar9]);\n      if (iVar3 == 0) {\n        return 0x10;\n      }\n      puVar1 = param_1 + uVar9;\n      uVar9 = uVar9 + 1;\n      lVar5 = der_utf8_charsize(*puVar1);\n      uVar4 = uVar4 + lVar5;\n    }\n    iVar3 = der_utf8_valid_char(param_1[uVar9]);\n    if (iVar3 == 0) {\n      return 0x10;\n    }\n    lVar5 = der_utf8_charsize(param_1[uVar9]);\n    uVar4 = uVar4 + lVar5;\n    for (uVar9 = uVar9 + 1; param_2 != uVar9; uVar9 = uVar9 + 4) {\nLAB_00177ea1:\n      iVar3 = der_utf8_valid_char(param_1[uVar9]);\n      if (iVar3 == 0) {\n        return 0x10;\n      }\n      lVar5 = der_utf8_charsize(param_1[uVar9]);\n      iVar3 = der_utf8_valid_char(param_1[uVar9 + 1]);\n      if (iVar3 == 0) {\n        return 0x10;\n      }\n      lVar6 = der_utf8_charsize(param_1[uVar9 + 1]);\n      iVar3 = der_utf8_valid_char(param_1[uVar9 + 2]);\n      if (iVar3 == 0) {\n        return 0x10;\n      }\n      lVar7 = der_utf8_charsize(param_1[uVar9 + 2]);\n      iVar3 = der_utf8_valid_char(param_1[uVar9 + 3]);\n      if (iVar3 == 0) {\n        return 0x10;\n      }\n      lVar8 = der_utf8_charsize(param_1[uVar9 + 3]);\n      uVar4 = uVar4 + lVar5 + lVar6 + lVar7 + lVar8;\n    }\n    if (uVar4 < 0x80) {\n      lVar5 = uVar4 + 2;\n    }\n    else {\n      if (uVar4 < 0x100) {\n        *param_3 = uVar4 + 3;\n        return 0;\n      }\n      if (uVar4 < 0x10000) {\n        *param_3 = uVar4 + 4;\n        return 0;\n      }\n      if (0xffffff < uVar4) {\n        return 0x10;\n      }\n      lVar5 = uVar4 + 5;\n    }\n  }" (if "if") (parenthesized_expression "(param_2 == 0)" (( "(") (binary_expression "param_2 == 0" (identifier "param_2") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n    lVar5 = 2;\n  }" ({ "{") (expression_statement "lVar5 = 2;" (assignment_expression "lVar5 = 2" (identifier "lVar5") (= "=") (number_literal "2")) (; ";")) (} "}")) (else_clause "else {\n    uVar2 = (uint)param_2 & 3;\n    if ((param_2 & 3) == 0) goto LAB_00177ea1;\n    if (uVar2 != 1) {\n      if (uVar2 != 2) {\n        iVar3 = der_utf8_valid_char(*param_1);\n        if (iVar3 == 0) {\n          return 0x10;\n        }\n        uVar9 = 1;\n        uVar4 = der_utf8_charsize(*param_1);\n      }\n      iVar3 = der_utf8_valid_char(param_1[uVar9]);\n      if (iVar3 == 0) {\n        return 0x10;\n      }\n      puVar1 = param_1 + uVar9;\n      uVar9 = uVar9 + 1;\n      lVar5 = der_utf8_charsize(*puVar1);\n      uVar4 = uVar4 + lVar5;\n    }\n    iVar3 = der_utf8_valid_char(param_1[uVar9]);\n    if (iVar3 == 0) {\n      return 0x10;\n    }\n    lVar5 = der_utf8_charsize(param_1[uVar9]);\n    uVar4 = uVar4 + lVar5;\n    for (uVar9 = uVar9 + 1; param_2 != uVar9; uVar9 = uVar9 + 4) {\nLAB_00177ea1:\n      iVar3 = der_utf8_valid_char(param_1[uVar9]);\n      if (iVar3 == 0) {\n        return 0x10;\n      }\n      lVar5 = der_utf8_charsize(param_1[uVar9]);\n      iVar3 = der_utf8_valid_char(param_1[uVar9 + 1]);\n      if (iVar3 == 0) {\n        return 0x10;\n      }\n      lVar6 = der_utf8_charsize(param_1[uVar9 + 1]);\n      iVar3 = der_utf8_valid_char(param_1[uVar9 + 2]);\n      if (iVar3 == 0) {\n        return 0x10;\n      }\n      lVar7 = der_utf8_charsize(param_1[uVar9 + 2]);\n      iVar3 = der_utf8_valid_char(param_1[uVar9 + 3]);\n      if (iVar3 == 0) {\n        return 0x10;\n      }\n      lVar8 = der_utf8_charsize(param_1[uVar9 + 3]);\n      uVar4 = uVar4 + lVar5 + lVar6 + lVar7 + lVar8;\n    }\n    if (uVar4 < 0x80) {\n      lVar5 = uVar4 + 2;\n    }\n    else {\n      if (uVar4 < 0x100) {\n        *param_3 = uVar4 + 3;\n        return 0;\n      }\n      if (uVar4 < 0x10000) {\n        *param_3 = uVar4 + 4;\n        return 0;\n      }\n      if (0xffffff < uVar4) {\n        return 0x10;\n      }\n      lVar5 = uVar4 + 5;\n    }\n  }" (else "else") (compound_statement "{\n    uVar2 = (uint)param_2 & 3;\n    if ((param_2 & 3) == 0) goto LAB_00177ea1;\n    if (uVar2 != 1) {\n      if (uVar2 != 2) {\n        iVar3 = der_utf8_valid_char(*param_1);\n        if (iVar3 == 0) {\n          return 0x10;\n        }\n        uVar9 = 1;\n        uVar4 = der_utf8_charsize(*param_1);\n      }\n      iVar3 = der_utf8_valid_char(param_1[uVar9]);\n      if (iVar3 == 0) {\n        return 0x10;\n      }\n      puVar1 = param_1 + uVar9;\n      uVar9 = uVar9 + 1;\n      lVar5 = der_utf8_charsize(*puVar1);\n      uVar4 = uVar4 + lVar5;\n    }\n    iVar3 = der_utf8_valid_char(param_1[uVar9]);\n    if (iVar3 == 0) {\n      return 0x10;\n    }\n    lVar5 = der_utf8_charsize(param_1[uVar9]);\n    uVar4 = uVar4 + lVar5;\n    for (uVar9 = uVar9 + 1; param_2 != uVar9; uVar9 = uVar9 + 4) {\nLAB_00177ea1:\n      iVar3 = der_utf8_valid_char(param_1[uVar9]);\n      if (iVar3 == 0) {\n        return 0x10;\n      }\n      lVar5 = der_utf8_charsize(param_1[uVar9]);\n      iVar3 = der_utf8_valid_char(param_1[uVar9 + 1]);\n      if (iVar3 == 0) {\n        return 0x10;\n      }\n      lVar6 = der_utf8_charsize(param_1[uVar9 + 1]);\n      iVar3 = der_utf8_valid_char(param_1[uVar9 + 2]);\n      if (iVar3 == 0) {\n        return 0x10;\n      }\n      lVar7 = der_utf8_charsize(param_1[uVar9 + 2]);\n      iVar3 = der_utf8_valid_char(param_1[uVar9 + 3]);\n      if (iVar3 == 0) {\n        return 0x10;\n      }\n      lVar8 = der_utf8_charsize(param_1[uVar9 + 3]);\n      uVar4 = uVar4 + lVar5 + lVar6 + lVar7 + lVar8;\n    }\n    if (uVar4 < 0x80) {\n      lVar5 = uVar4 + 2;\n    }\n    else {\n      if (uVar4 < 0x100) {\n        *param_3 = uVar4 + 3;\n        return 0;\n      }\n      if (uVar4 < 0x10000) {\n        *param_3 = uVar4 + 4;\n        return 0;\n      }\n      if (0xffffff < uVar4) {\n        return 0x10;\n      }\n      lVar5 = uVar4 + 5;\n    }\n  }" ({ "{") (expression_statement "uVar2 = (uint)param_2 & 3;" (assignment_expression "uVar2 = (uint)param_2 & 3" (identifier "uVar2") (= "=") (binary_expression "(uint)param_2 & 3" (cast_expression "(uint)param_2" (( "(") (type_descriptor "uint" (type_identifier "uint")) () ")") (identifier "param_2")) (& "&") (number_literal "3"))) (; ";")) (if_statement "if ((param_2 & 3) == 0) goto LAB_00177ea1;" (if "if") (parenthesized_expression "((param_2 & 3) == 0)" (( "(") (binary_expression "(param_2 & 3) == 0" (parenthesized_expression "(param_2 & 3)" (( "(") (binary_expression "param_2 & 3" (identifier "param_2") (& "&") (number_literal "3")) () ")")) (== "==") (number_literal "0")) () ")")) (goto_statement "goto LAB_00177ea1;" (goto "goto") (statement_identifier "LAB_00177ea1") (; ";"))) (if_statement "if (uVar2 != 1) {\n      if (uVar2 != 2) {\n        iVar3 = der_utf8_valid_char(*param_1);\n        if (iVar3 == 0) {\n          return 0x10;\n        }\n        uVar9 = 1;\n        uVar4 = der_utf8_charsize(*param_1);\n      }\n      iVar3 = der_utf8_valid_char(param_1[uVar9]);\n      if (iVar3 == 0) {\n        return 0x10;\n      }\n      puVar1 = param_1 + uVar9;\n      uVar9 = uVar9 + 1;\n      lVar5 = der_utf8_charsize(*puVar1);\n      uVar4 = uVar4 + lVar5;\n    }" (if "if") (parenthesized_expression "(uVar2 != 1)" (( "(") (binary_expression "uVar2 != 1" (identifier "uVar2") (!= "!=") (number_literal "1")) () ")")) (compound_statement "{\n      if (uVar2 != 2) {\n        iVar3 = der_utf8_valid_char(*param_1);\n        if (iVar3 == 0) {\n          return 0x10;\n        }\n        uVar9 = 1;\n        uVar4 = der_utf8_charsize(*param_1);\n      }\n      iVar3 = der_utf8_valid_char(param_1[uVar9]);\n      if (iVar3 == 0) {\n        return 0x10;\n      }\n      puVar1 = param_1 + uVar9;\n      uVar9 = uVar9 + 1;\n      lVar5 = der_utf8_charsize(*puVar1);\n      uVar4 = uVar4 + lVar5;\n    }" ({ "{") (if_statement "if (uVar2 != 2) {\n        iVar3 = der_utf8_valid_char(*param_1);\n        if (iVar3 == 0) {\n          return 0x10;\n        }\n        uVar9 = 1;\n        uVar4 = der_utf8_charsize(*param_1);\n      }" (if "if") (parenthesized_expression "(uVar2 != 2)" (( "(") (binary_expression "uVar2 != 2" (identifier "uVar2") (!= "!=") (number_literal "2")) () ")")) (compound_statement "{\n        iVar3 = der_utf8_valid_char(*param_1);\n        if (iVar3 == 0) {\n          return 0x10;\n        }\n        uVar9 = 1;\n        uVar4 = der_utf8_charsize(*param_1);\n      }" ({ "{") (expression_statement "iVar3 = der_utf8_valid_char(*param_1);" (assignment_expression "iVar3 = der_utf8_valid_char(*param_1)" (identifier "iVar3") (= "=") (call_expression "der_utf8_valid_char(*param_1)" (identifier "der_utf8_valid_char") (argument_list "(*param_1)" (( "(") (pointer_expression "*param_1" (* "*") (identifier "param_1")) () ")")))) (; ";")) (if_statement "if (iVar3 == 0) {\n          return 0x10;\n        }" (if "if") (parenthesized_expression "(iVar3 == 0)" (( "(") (binary_expression "iVar3 == 0" (identifier "iVar3") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n          return 0x10;\n        }" ({ "{") (return_statement "return 0x10;" (return "return") (number_literal "0x10") (; ";")) (} "}"))) (expression_statement "uVar9 = 1;" (assignment_expression "uVar9 = 1" (identifier "uVar9") (= "=") (number_literal "1")) (; ";")) (expression_statement "uVar4 = der_utf8_charsize(*param_1);" (assignment_expression "uVar4 = der_utf8_charsize(*param_1)" (identifier "uVar4") (= "=") (call_expression "der_utf8_charsize(*param_1)" (identifier "der_utf8_charsize") (argument_list "(*param_1)" (( "(") (pointer_expression "*param_1" (* "*") (identifier "param_1")) () ")")))) (; ";")) (} "}"))) (expression_statement "iVar3 = der_utf8_valid_char(param_1[uVar9]);" (assignment_expression "iVar3 = der_utf8_valid_char(param_1[uVar9])" (identifier "iVar3") (= "=") (call_expression "der_utf8_valid_char(param_1[uVar9])" (identifier "der_utf8_valid_char") (argument_list "(param_1[uVar9])" (( "(") (subscript_expression "param_1[uVar9]" (identifier "param_1") ([ "[") (identifier "uVar9") (] "]")) () ")")))) (; ";")) (if_statement "if (iVar3 == 0) {\n        return 0x10;\n      }" (if "if") (parenthesized_expression "(iVar3 == 0)" (( "(") (binary_expression "iVar3 == 0" (identifier "iVar3") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n        return 0x10;\n      }" ({ "{") (return_statement "return 0x10;" (return "return") (number_literal "0x10") (; ";")) (} "}"))) (expression_statement "puVar1 = param_1 + uVar9;" (assignment_expression "puVar1 = param_1 + uVar9" (identifier "puVar1") (= "=") (binary_expression "param_1 + uVar9" (identifier "param_1") (+ "+") (identifier "uVar9"))) (; ";")) (expression_statement "uVar9 = uVar9 + 1;" (assignment_expression "uVar9 = uVar9 + 1" (identifier "uVar9") (= "=") (binary_expression "uVar9 + 1" (identifier "uVar9") (+ "+") (number_literal "1"))) (; ";")) (expression_statement "lVar5 = der_utf8_charsize(*puVar1);" (assignment_expression "lVar5 = der_utf8_charsize(*puVar1)" (identifier "lVar5") (= "=") (call_expression "der_utf8_charsize(*puVar1)" (identifier "der_utf8_charsize") (argument_list "(*puVar1)" (( "(") (pointer_expression "*puVar1" (* "*") (identifier "puVar1")) () ")")))) (; ";")) (expression_statement "uVar4 = uVar4 + lVar5;" (assignment_expression "uVar4 = uVar4 + lVar5" (identifier "uVar4") (= "=") (binary_expression "uVar4 + lVar5" (identifier "uVar4") (+ "+") (identifier "lVar5"))) (; ";")) (} "}"))) (expression_statement "iVar3 = der_utf8_valid_char(param_1[uVar9]);" (assignment_expression "iVar3 = der_utf8_valid_char(param_1[uVar9])" (identifier "iVar3") (= "=") (call_expression "der_utf8_valid_char(param_1[uVar9])" (identifier "der_utf8_valid_char") (argument_list "(param_1[uVar9])" (( "(") (subscript_expression "param_1[uVar9]" (identifier "param_1") ([ "[") (identifier "uVar9") (] "]")) () ")")))) (; ";")) (if_statement "if (iVar3 == 0) {\n      return 0x10;\n    }" (if "if") (parenthesized_expression "(iVar3 == 0)" (( "(") (binary_expression "iVar3 == 0" (identifier "iVar3") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n      return 0x10;\n    }" ({ "{") (return_statement "return 0x10;" (return "return") (number_literal "0x10") (; ";")) (} "}"))) (expression_statement "lVar5 = der_utf8_charsize(param_1[uVar9]);" (assignment_expression "lVar5 = der_utf8_charsize(param_1[uVar9])" (identifier "lVar5") (= "=") (call_expression "der_utf8_charsize(param_1[uVar9])" (identifier "der_utf8_charsize") (argument_list "(param_1[uVar9])" (( "(") (subscript_expression "param_1[uVar9]" (identifier "param_1") ([ "[") (identifier "uVar9") (] "]")) () ")")))) (; ";")) (expression_statement "uVar4 = uVar4 + lVar5;" (assignment_expression "uVar4 = uVar4 + lVar5" (identifier "uVar4") (= "=") (binary_expression "uVar4 + lVar5" (identifier "uVar4") (+ "+") (identifier "lVar5"))) (; ";")) (for_statement "for (uVar9 = uVar9 + 1; param_2 != uVar9; uVar9 = uVar9 + 4) {\nLAB_00177ea1:\n      iVar3 = der_utf8_valid_char(param_1[uVar9]);\n      if (iVar3 == 0) {\n        return 0x10;\n      }\n      lVar5 = der_utf8_charsize(param_1[uVar9]);\n      iVar3 = der_utf8_valid_char(param_1[uVar9 + 1]);\n      if (iVar3 == 0) {\n        return 0x10;\n      }\n      lVar6 = der_utf8_charsize(param_1[uVar9 + 1]);\n      iVar3 = der_utf8_valid_char(param_1[uVar9 + 2]);\n      if (iVar3 == 0) {\n        return 0x10;\n      }\n      lVar7 = der_utf8_charsize(param_1[uVar9 + 2]);\n      iVar3 = der_utf8_valid_char(param_1[uVar9 + 3]);\n      if (iVar3 == 0) {\n        return 0x10;\n      }\n      lVar8 = der_utf8_charsize(param_1[uVar9 + 3]);\n      uVar4 = uVar4 + lVar5 + lVar6 + lVar7 + lVar8;\n    }" (for "for") (( "(") (assignment_expression "uVar9 = uVar9 + 1" (identifier "uVar9") (= "=") (binary_expression "uVar9 + 1" (identifier "uVar9") (+ "+") (number_literal "1"))) (; ";") (binary_expression "param_2 != uVar9" (identifier "param_2") (!= "!=") (identifier "uVar9")) (; ";") (assignment_expression "uVar9 = uVar9 + 4" (identifier "uVar9") (= "=") (binary_expression "uVar9 + 4" (identifier "uVar9") (+ "+") (number_literal "4"))) () ")") (compound_statement "{\nLAB_00177ea1:\n      iVar3 = der_utf8_valid_char(param_1[uVar9]);\n      if (iVar3 == 0) {\n        return 0x10;\n      }\n      lVar5 = der_utf8_charsize(param_1[uVar9]);\n      iVar3 = der_utf8_valid_char(param_1[uVar9 + 1]);\n      if (iVar3 == 0) {\n        return 0x10;\n      }\n      lVar6 = der_utf8_charsize(param_1[uVar9 + 1]);\n      iVar3 = der_utf8_valid_char(param_1[uVar9 + 2]);\n      if (iVar3 == 0) {\n        return 0x10;\n      }\n      lVar7 = der_utf8_charsize(param_1[uVar9 + 2]);\n      iVar3 = der_utf8_valid_char(param_1[uVar9 + 3]);\n      if (iVar3 == 0) {\n        return 0x10;\n      }\n      lVar8 = der_utf8_charsize(param_1[uVar9 + 3]);\n      uVar4 = uVar4 + lVar5 + lVar6 + lVar7 + lVar8;\n    }" ({ "{") (labeled_statement "LAB_00177ea1:\n      iVar3 = der_utf8_valid_char(param_1[uVar9]);" (statement_identifier "LAB_00177ea1") (: ":") (expression_statement "iVar3 = der_utf8_valid_char(param_1[uVar9]);" (assignment_expression "iVar3 = der_utf8_valid_char(param_1[uVar9])" (identifier "iVar3") (= "=") (call_expression "der_utf8_valid_char(param_1[uVar9])" (identifier "der_utf8_valid_char") (argument_list "(param_1[uVar9])" (( "(") (subscript_expression "param_1[uVar9]" (identifier "param_1") ([ "[") (identifier "uVar9") (] "]")) () ")")))) (; ";"))) (if_statement "if (iVar3 == 0) {\n        return 0x10;\n      }" (if "if") (parenthesized_expression "(iVar3 == 0)" (( "(") (binary_expression "iVar3 == 0" (identifier "iVar3") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n        return 0x10;\n      }" ({ "{") (return_statement "return 0x10;" (return "return") (number_literal "0x10") (; ";")) (} "}"))) (expression_statement "lVar5 = der_utf8_charsize(param_1[uVar9]);" (assignment_expression "lVar5 = der_utf8_charsize(param_1[uVar9])" (identifier "lVar5") (= "=") (call_expression "der_utf8_charsize(param_1[uVar9])" (identifier "der_utf8_charsize") (argument_list "(param_1[uVar9])" (( "(") (subscript_expression "param_1[uVar9]" (identifier "param_1") ([ "[") (identifier "uVar9") (] "]")) () ")")))) (; ";")) (expression_statement "iVar3 = der_utf8_valid_char(param_1[uVar9 + 1]);" (assignment_expression "iVar3 = der_utf8_valid_char(param_1[uVar9 + 1])" (identifier "iVar3") (= "=") (call_expression "der_utf8_valid_char(param_1[uVar9 + 1])" (identifier "der_utf8_valid_char") (argument_list "(param_1[uVar9 + 1])" (( "(") (subscript_expression "param_1[uVar9 + 1]" (identifier "param_1") ([ "[") (binary_expression "uVar9 + 1" (identifier "uVar9") (+ "+") (number_literal "1")) (] "]")) () ")")))) (; ";")) (if_statement "if (iVar3 == 0) {\n        return 0x10;\n      }" (if "if") (parenthesized_expression "(iVar3 == 0)" (( "(") (binary_expression "iVar3 == 0" (identifier "iVar3") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n        return 0x10;\n      }" ({ "{") (return_statement "return 0x10;" (return "return") (number_literal "0x10") (; ";")) (} "}"))) (expression_statement "lVar6 = der_utf8_charsize(param_1[uVar9 + 1]);" (assignment_expression "lVar6 = der_utf8_charsize(param_1[uVar9 + 1])" (identifier "lVar6") (= "=") (call_expression "der_utf8_charsize(param_1[uVar9 + 1])" (identifier "der_utf8_charsize") (argument_list "(param_1[uVar9 + 1])" (( "(") (subscript_expression "param_1[uVar9 + 1]" (identifier "param_1") ([ "[") (binary_expression "uVar9 + 1" (identifier "uVar9") (+ "+") (number_literal "1")) (] "]")) () ")")))) (; ";")) (expression_statement "iVar3 = der_utf8_valid_char(param_1[uVar9 + 2]);" (assignment_expression "iVar3 = der_utf8_valid_char(param_1[uVar9 + 2])" (identifier "iVar3") (= "=") (call_expression "der_utf8_valid_char(param_1[uVar9 + 2])" (identifier "der_utf8_valid_char") (argument_list "(param_1[uVar9 + 2])" (( "(") (subscript_expression "param_1[uVar9 + 2]" (identifier "param_1") ([ "[") (binary_expression "uVar9 + 2" (identifier "uVar9") (+ "+") (number_literal "2")) (] "]")) () ")")))) (; ";")) (if_statement "if (iVar3 == 0) {\n        return 0x10;\n      }" (if "if") (parenthesized_expression "(iVar3 == 0)" (( "(") (binary_expression "iVar3 == 0" (identifier "iVar3") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n        return 0x10;\n      }" ({ "{") (return_statement "return 0x10;" (return "return") (number_literal "0x10") (; ";")) (} "}"))) (expression_statement "lVar7 = der_utf8_charsize(param_1[uVar9 + 2]);" (assignment_expression "lVar7 = der_utf8_charsize(param_1[uVar9 + 2])" (identifier "lVar7") (= "=") (call_expression "der_utf8_charsize(param_1[uVar9 + 2])" (identifier "der_utf8_charsize") (argument_list "(param_1[uVar9 + 2])" (( "(") (subscript_expression "param_1[uVar9 + 2]" (identifier "param_1") ([ "[") (binary_expression "uVar9 + 2" (identifier "uVar9") (+ "+") (number_literal "2")) (] "]")) () ")")))) (; ";")) (expression_statement "iVar3 = der_utf8_valid_char(param_1[uVar9 + 3]);" (assignment_expression "iVar3 = der_utf8_valid_char(param_1[uVar9 + 3])" (identifier "iVar3") (= "=") (call_expression "der_utf8_valid_char(param_1[uVar9 + 3])" (identifier "der_utf8_valid_char") (argument_list "(param_1[uVar9 + 3])" (( "(") (subscript_expression "param_1[uVar9 + 3]" (identifier "param_1") ([ "[") (binary_expression "uVar9 + 3" (identifier "uVar9") (+ "+") (number_literal "3")) (] "]")) () ")")))) (; ";")) (if_statement "if (iVar3 == 0) {\n        return 0x10;\n      }" (if "if") (parenthesized_expression "(iVar3 == 0)" (( "(") (binary_expression "iVar3 == 0" (identifier "iVar3") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n        return 0x10;\n      }" ({ "{") (return_statement "return 0x10;" (return "return") (number_literal "0x10") (; ";")) (} "}"))) (expression_statement "lVar8 = der_utf8_charsize(param_1[uVar9 + 3]);" (assignment_expression "lVar8 = der_utf8_charsize(param_1[uVar9 + 3])" (identifier "lVar8") (= "=") (call_expression "der_utf8_charsize(param_1[uVar9 + 3])" (identifier "der_utf8_charsize") (argument_list "(param_1[uVar9 + 3])" (( "(") (subscript_expression "param_1[uVar9 + 3]" (identifier "param_1") ([ "[") (binary_expression "uVar9 + 3" (identifier "uVar9") (+ "+") (number_literal "3")) (] "]")) () ")")))) (; ";")) (expression_statement "uVar4 = uVar4 + lVar5 + lVar6 + lVar7 + lVar8;" (assignment_expression "uVar4 = uVar4 + lVar5 + lVar6 + lVar7 + lVar8" (identifier "uVar4") (= "=") (binary_expression "uVar4 + lVar5 + lVar6 + lVar7 + lVar8" (binary_expression "uVar4 + lVar5 + lVar6 + lVar7" (binary_expression "uVar4 + lVar5 + lVar6" (binary_expression "uVar4 + lVar5" (identifier "uVar4") (+ "+") (identifier "lVar5")) (+ "+") (identifier "lVar6")) (+ "+") (identifier "lVar7")) (+ "+") (identifier "lVar8"))) (; ";")) (} "}"))) (if_statement "if (uVar4 < 0x80) {\n      lVar5 = uVar4 + 2;\n    }\n    else {\n      if (uVar4 < 0x100) {\n        *param_3 = uVar4 + 3;\n        return 0;\n      }\n      if (uVar4 < 0x10000) {\n        *param_3 = uVar4 + 4;\n        return 0;\n      }\n      if (0xffffff < uVar4) {\n        return 0x10;\n      }\n      lVar5 = uVar4 + 5;\n    }" (if "if") (parenthesized_expression "(uVar4 < 0x80)" (( "(") (binary_expression "uVar4 < 0x80" (identifier "uVar4") (< "<") (number_literal "0x80")) () ")")) (compound_statement "{\n      lVar5 = uVar4 + 2;\n    }" ({ "{") (expression_statement "lVar5 = uVar4 + 2;" (assignment_expression "lVar5 = uVar4 + 2" (identifier "lVar5") (= "=") (binary_expression "uVar4 + 2" (identifier "uVar4") (+ "+") (number_literal "2"))) (; ";")) (} "}")) (else_clause "else {\n      if (uVar4 < 0x100) {\n        *param_3 = uVar4 + 3;\n        return 0;\n      }\n      if (uVar4 < 0x10000) {\n        *param_3 = uVar4 + 4;\n        return 0;\n      }\n      if (0xffffff < uVar4) {\n        return 0x10;\n      }\n      lVar5 = uVar4 + 5;\n    }" (else "else") (compound_statement "{\n      if (uVar4 < 0x100) {\n        *param_3 = uVar4 + 3;\n        return 0;\n      }\n      if (uVar4 < 0x10000) {\n        *param_3 = uVar4 + 4;\n        return 0;\n      }\n      if (0xffffff < uVar4) {\n        return 0x10;\n      }\n      lVar5 = uVar4 + 5;\n    }" ({ "{") (if_statement "if (uVar4 < 0x100) {\n        *param_3 = uVar4 + 3;\n        return 0;\n      }" (if "if") (parenthesized_expression "(uVar4 < 0x100)" (( "(") (binary_expression "uVar4 < 0x100" (identifier "uVar4") (< "<") (number_literal "0x100")) () ")")) (compound_statement "{\n        *param_3 = uVar4 + 3;\n        return 0;\n      }" ({ "{") (expression_statement "*param_3 = uVar4 + 3;" (assignment_expression "*param_3 = uVar4 + 3" (pointer_expression "*param_3" (* "*") (identifier "param_3")) (= "=") (binary_expression "uVar4 + 3" (identifier "uVar4") (+ "+") (number_literal "3"))) (; ";")) (return_statement "return 0;" (return "return") (number_literal "0") (; ";")) (} "}"))) (if_statement "if (uVar4 < 0x10000) {\n        *param_3 = uVar4 + 4;\n        return 0;\n      }" (if "if") (parenthesized_expression "(uVar4 < 0x10000)" (( "(") (binary_expression "uVar4 < 0x10000" (identifier "uVar4") (< "<") (number_literal "0x10000")) () ")")) (compound_statement "{\n        *param_3 = uVar4 + 4;\n        return 0;\n      }" ({ "{") (expression_statement "*param_3 = uVar4 + 4;" (assignment_expression "*param_3 = uVar4 + 4" (pointer_expression "*param_3" (* "*") (identifier "param_3")) (= "=") (binary_expression "uVar4 + 4" (identifier "uVar4") (+ "+") (number_literal "4"))) (; ";")) (return_statement "return 0;" (return "return") (number_literal "0") (; ";")) (} "}"))) (if_statement "if (0xffffff < uVar4) {\n        return 0x10;\n      }" (if "if") (parenthesized_expression "(0xffffff < uVar4)" (( "(") (binary_expression "0xffffff < uVar4" (number_literal "0xffffff") (< "<") (identifier "uVar4")) () ")")) (compound_statement "{\n        return 0x10;\n      }" ({ "{") (return_statement "return 0x10;" (return "return") (number_literal "0x10") (; ";")) (} "}"))) (expression_statement "lVar5 = uVar4 + 5;" (assignment_expression "lVar5 = uVar4 + 5" (identifier "lVar5") (= "=") (binary_expression "uVar4 + 5" (identifier "uVar4") (+ "+") (number_literal "5"))) (; ";")) (} "}")))) (} "}")))) (expression_statement "*param_3 = lVar5;" (assignment_expression "*param_3 = lVar5" (pointer_expression "*param_3" (* "*") (identifier "param_3")) (= "=") (identifier "lVar5")) (; ";")) (return_statement "return 0;" (return "return") (number_literal "0") (; ";")) (} "}")))

type_1 function_1(type_1 *var_1,type_2 var_4,type_2 *var_3)

{
  type_1 *pwVar1;
  type_3 var_5;
  type_1 var_7;
  type_2 var_10;
  type_2 var_11;
  type_2 var_12;
  type_2 var_13;
  type_2 var_14;
  type_2 var_9;
  
  if (var_1 == (type_1 *)0x0) {
                    /* WARNING: Subroutine does not return */
    var_2("in != NULL","src/pk/asn1/der/utf8/der_length_utf8_string.c",0x45);
  }
  if (var_3 == (type_2 *)0x0) {
                    /* WARNING: Subroutine does not return */
    var_2("outlen != NULL","src/pk/asn1/der/utf8/der_length_utf8_string.c",0x46);
  }
  var_10 = 0;
  var_9 = 0;
  if (var_4 == 0) {
    var_10 = 2;
  }
  else {
    var_5 = (type_3)var_4 & 3;
    if ((var_4 & 3) == 0) goto LAB_00177ea1;
    if (var_5 != 1) {
      if (var_5 != 2) {
        var_7 = var_6(*var_1);
        if (var_7 == L'\0') {
          return L'\x10';
        }
        var_9 = 1;
        var_10 = var_8(*var_1);
      }
      var_7 = var_6(var_1[var_9]);
      if (var_7 == L'\0') {
        return L'\x10';
      }
      pwVar1 = var_1 + var_9;
      var_9 = var_9 + 1;
      var_11 = var_8(*pwVar1);
      var_10 = var_10 + var_11;
    }
    var_7 = var_6(var_1[var_9]);
    if (var_7 == L'\0') {
      return L'\x10';
    }
    var_11 = var_8(var_1[var_9]);
    var_10 = var_10 + var_11;
    for (var_9 = var_9 + 1; var_4 != var_9; var_9 = var_9 + 4) {
LAB_00177ea1:
      var_7 = var_6(var_1[var_9]);
      if (var_7 == L'\0') {
        return L'\x10';
      }
      var_11 = var_8(var_1[var_9]);
      var_7 = var_6(var_1[var_9 + 1]);
      if (var_7 == L'\0') {
        return L'\x10';
      }
      var_12 = var_8(var_1[var_9 + 1]);
      var_7 = var_6(var_1[var_9 + 2]);
      if (var_7 == L'\0') {
        return L'\x10';
      }
      var_13 = var_8(var_1[var_9 + 2]);
      var_7 = var_6(var_1[var_9 + 3]);
      if (var_7 == L'\0') {
        return L'\x10';
      }
      var_14 = var_8(var_1[var_9 + 3]);
      var_10 = var_10 + var_11 + var_12 + var_13 + var_14;
    }
    if (var_10 < 0x80) {
      var_10 = var_10 + 2;
    }
    else {
      if (var_10 < 0x100) {
        *var_3 = var_10 + 3;
        return L'\0';
      }
      if (var_10 < 0x10000) {
        *var_3 = var_10 + 4;
        return L'\0';
      }
      if (0xffffff < var_10) {
        return L'\x10';
      }
      var_10 = var_10 + 5;
    }
  }
  *var_3 = var_10;
  return L'\0';
}


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

undefined8 MASKED(undefined4 *param_1,ulong param_2,long *param_3)

{
  undefined4 *puVar1;
  uint uVar2;
  int iVar3;
  ulong uVar4;
  long lVar5;
  long lVar6;
  long lVar7;
  long lVar8;
  ulong uVar9;
  
  if (param_1 == (undefined4 *)0x0) {
                    /* WARNING: Subroutine does not return */
    crypt_argchk("in != NULL","src/pk/asn1/der/utf8/MASKED.c",0x45);
  }
  if (param_3 == (long *)0x0) {
                    /* WARNING: Subroutine does not return */
    crypt_argchk("outlen != NULL","src/pk/asn1/der/utf8/MASKED.c",0x46);
  }
  uVar4 = 0;
  uVar9 = 0;
  if (param_2 == 0) {
    lVar5 = 2;
  }
  else {
    uVar2 = (uint)param_2 & 3;
    if ((param_2 & 3) == 0) goto LAB_00177ea1;
    if (uVar2 != 1) {
      if (uVar2 != 2) {
        iVar3 = der_utf8_valid_char(*param_1);
        if (iVar3 == 0) {
          return 0x10;
        }
        uVar9 = 1;
        uVar4 = der_utf8_charsize(*param_1);
      }
      iVar3 = der_utf8_valid_char(param_1[uVar9]);
      if (iVar3 == 0) {
        return 0x10;
      }
      puVar1 = param_1 + uVar9;
      uVar9 = uVar9 + 1;
      lVar5 = der_utf8_charsize(*puVar1);
      uVar4 = uVar4 + lVar5;
    }
    iVar3 = der_utf8_valid_char(param_1[uVar9]);
    if (iVar3 == 0) {
      return 0x10;
    }
    lVar5 = der_utf8_charsize(param_1[uVar9]);
    uVar4 = uVar4 + lVar5;
    for (uVar9 = uVar9 + 1; param_2 != uVar9; uVar9 = uVar9 + 4) {
LAB_00177ea1:
      iVar3 = der_utf8_valid_char(param_1[uVar9]);
      if (iVar3 == 0) {
        return 0x10;
      }
      lVar5 = der_utf8_charsize(param_1[uVar9]);
      iVar3 = der_utf8_valid_char(param_1[uVar9 + 1]);
      if (iVar3 == 0) {
        return 0x10;
      }
      lVar6 = der_utf8_charsize(param_1[uVar9 + 1]);
      iVar3 = der_utf8_valid_char(param_1[uVar9 + 2]);
      if (iVar3 == 0) {
        return 0x10;
      }
      lVar7 = der_utf8_charsize(param_1[uVar9 + 2]);
      iVar3 = der_utf8_valid_char(param_1[uVar9 + 3]);
      if (iVar3 == 0) {
        return 0x10;
      }
      lVar8 = der_utf8_charsize(param_1[uVar9 + 3]);
      uVar4 = uVar4 + lVar5 + lVar6 + lVar7 + lVar8;
    }
    if (uVar4 < 0x80) {
      lVar5 = uVar4 + 2;
    }
    else {
      if (uVar4 < 0x100) {
        *param_3 = uVar4 + 3;
        return 0;
      }
      if (uVar4 < 0x10000) {
        *param_3 = uVar4 + 4;
        return 0;
      }
      if (0xffffff < uVar4) {
        return 0x10;
      }
      lVar5 = uVar4 + 5;
    }
  }
  *param_3 = lVar5;
  return 0;
}

