#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */

/* Variables and functions */
unsigned int readNextArrayValue(char *, char **, char **, unsigned char *);
unsigned int readNextName(char *, char **, char **, unsigned int *);
unsigned int readNextValue(char *, char **, char **, unsigned char *);
unsigned int validateExpression(char *, unsigned char *);
unsigned int validateRegex(char *, char *);
unsigned int validateExpressionSequence(char *rule) {
  char *first;
  char *last;
  unsigned char type;
  unsigned char operator= 0;
  unsigned int hash;
  unsigned int result = readNextName(rule, &first, &last, &hash);
  if (result != 0) {
    return result;
  }
  switch (hash) {
  case 256037865:
    operator= 0x05;
    break;
  case 2488026869:
    operator= 0x06;
    break;
  case 507407960:
    operator= 0x03;
    break;
  case 3645344263:
    operator= 0x04;
    break;
  case 373481198:
    operator= 0x07;
    break;
  case 2605470202:
    operator= 0x08;
    break;
  case 576092554:
    operator= 0x14;
    break;
  case 1472564215:
    operator= 0x15;
    break;
  case 3261766877:
    operator= 0x16;
    break;
  case 3379504400:
    operator= 0x17;
    break;
  case 542787579:
    operator= 0x01;
    break;
  case 2350824890:
    operator= 0x02;
    break;
  case 3746487396:
  case 340911698:
    result = readNextValue(last, &first, &last, &type);
    if (type != 0x05) {
      return 102;
    }
    result = readNextArrayValue(first, &first, &last, &type);
    while (result == 0) {
      do {
        unsigned int result = validateExpressionSequence(first);
        if (result != 0) {
          return result;
        }
      } while (0);
      result = readNextArrayValue(last, &first, &last, &type);
    }
    return (result == 100 ? 0 : result);
  }
  if (operator== 0) {
    operator= 0x05;
    first = rule;
  } else {
    do {
      if (readNextValue(last, &first, &last, &type) != 0) {
        return readNextValue(last, &first, &last, &type);
      }
    } while (0);
    if (type != 0x06) {
      return 102;
    }
  }
  do {
    if (readNextName(first, &first, &last, &hash) != 0) {
      return readNextName(first, &first, &last, &hash);
    }
  } while (0);
  do {
    if (readNextValue(last, &first, &last, &type) != 0) {
      return readNextValue(last, &first, &last, &type);
    }
  } while (0);
  if (operator== 0x16 || operator== 0x17) {
    result = validateExpressionSequence(first);
    return result;
  }
  if (operator== 0x14 || operator== 0x15) {
    if (type != 0x01) {
      return 102;
    }
    do {
      unsigned int result = validateRegex(first, last);
      if (result != 0) {
        return result;
      }
    } while (0);
  }
  if (type == 0x05) {
    return 102;
  }
  if (type == 0x06) {
    unsigned char expressionType = 0;
    do {
      unsigned int result = validateExpression(first, &expressionType);
      if (result != 0) {
        return result;
      }
    } while (0);
  }
  return 0;
}


x86 assembly (clang, -O0):
<validateExpressionSequence>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
mov    %rdi,-0x10(%rbp)
movb   $0x0,-0x22(%rbp)
mov    -0x10(%rbp),%rdi
lea    -0x18(%rbp),%rsi
lea    -0x20(%rbp),%rdx
lea    -0x28(%rbp),%rcx
call   1080 <readNextName@plt>
mov    %eax,-0x2c(%rbp)
cmpl   $0x0,-0x2c(%rbp)
je     119d <validateExpressionSequence+0x3d>
mov    -0x2c(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    15d9 <validateExpressionSequence+0x479>
mov    -0x28(%rbp),%eax
mov    %eax,-0x40(%rbp)
sub    $0x8c1ebdba,%eax
je     130d <validateExpressionSequence+0x1ad>
jmp    11b3 <validateExpressionSequence+0x53>
mov    -0x40(%rbp),%eax
sub    $0x944c46f5,%eax
je     12b3 <validateExpressionSequence+0x153>
jmp    11c6 <validateExpressionSequence+0x66>
mov    -0x40(%rbp),%eax
sub    $0x9b4c51fa,%eax
je     12d7 <validateExpressionSequence+0x177>
jmp    11d9 <validateExpressionSequence+0x79>
mov    -0x40(%rbp),%eax
sub    $0xc26a9cdd,%eax
je     12f2 <validateExpressionSequence+0x192>
jmp    11ec <validateExpressionSequence+0x8c>
mov    -0x40(%rbp),%eax
sub    $0xc96f2510,%eax
je     12fb <validateExpressionSequence+0x19b>
jmp    11ff <validateExpressionSequence+0x9f>
mov    -0x40(%rbp),%eax
sub    $0xd9478a07,%eax
je     12c5 <validateExpressionSequence+0x165>
jmp    1212 <validateExpressionSequence+0xb2>
mov    -0x40(%rbp),%eax
sub    $0xdf4edc64,%eax
je     1316 <validateExpressionSequence+0x1b6>
jmp    1225 <validateExpressionSequence+0xc5>
mov    -0x40(%rbp),%eax
sub    $0xf42d3e9,%eax
je     12aa <validateExpressionSequence+0x14a>
jmp    1238 <validateExpressionSequence+0xd8>
mov    -0x40(%rbp),%eax
sub    $0x1451e652,%eax
je     1316 <validateExpressionSequence+0x1b6>
jmp    124b <validateExpressionSequence+0xeb>
mov    -0x40(%rbp),%eax
sub    $0x1642deee,%eax
je     12ce <validateExpressionSequence+0x16e>
jmp    125e <validateExpressionSequence+0xfe>
mov    -0x40(%rbp),%eax
sub    $0x1e3e6e58,%eax
je     12bc <validateExpressionSequence+0x15c>
jmp    1271 <validateExpressionSequence+0x111>
mov    -0x40(%rbp),%eax
sub    $0x205a47fb,%eax
je     1304 <validateExpressionSequence+0x1a4>
jmp    1284 <validateExpressionSequence+0x124>
mov    -0x40(%rbp),%eax
sub    $0x2256798a,%eax
je     12e0 <validateExpressionSequence+0x180>
jmp    1297 <validateExpressionSequence+0x137>
mov    -0x40(%rbp),%eax
sub    $0x57c58bf7,%eax
je     12e9 <validateExpressionSequence+0x189>
jmp    13d6 <validateExpressionSequence+0x276>
movb   $0x5,-0x22(%rbp)
jmp    13d6 <validateExpressionSequence+0x276>
movb   $0x6,-0x22(%rbp)
jmp    13d6 <validateExpressionSequence+0x276>
movb   $0x3,-0x22(%rbp)
jmp    13d6 <validateExpressionSequence+0x276>
movb   $0x4,-0x22(%rbp)
jmp    13d6 <validateExpressionSequence+0x276>
movb   $0x7,-0x22(%rbp)
jmp    13d6 <validateExpressionSequence+0x276>
movb   $0x8,-0x22(%rbp)
jmp    13d6 <validateExpressionSequence+0x276>
movb   $0x14,-0x22(%rbp)
jmp    13d6 <validateExpressionSequence+0x276>
movb   $0x15,-0x22(%rbp)
jmp    13d6 <validateExpressionSequence+0x276>
movb   $0x16,-0x22(%rbp)
jmp    13d6 <validateExpressionSequence+0x276>
movb   $0x17,-0x22(%rbp)
jmp    13d6 <validateExpressionSequence+0x276>
movb   $0x1,-0x22(%rbp)
jmp    13d6 <validateExpressionSequence+0x276>
movb   $0x2,-0x22(%rbp)
jmp    13d6 <validateExpressionSequence+0x276>
mov    -0x20(%rbp),%rdi
lea    -0x18(%rbp),%rsi
lea    -0x20(%rbp),%rdx
lea    -0x21(%rbp),%rcx
call   1060 <readNextValue@plt>
mov    %eax,-0x2c(%rbp)
movzbl -0x21(%rbp),%eax
cmp    $0x5,%eax
je     1347 <validateExpressionSequence+0x1e7>
movl   $0x66,-0x4(%rbp)
jmp    15d9 <validateExpressionSequence+0x479>
mov    -0x18(%rbp),%rdi
lea    -0x18(%rbp),%rsi
lea    -0x20(%rbp),%rdx
lea    -0x21(%rbp),%rcx
call   1030 <readNextArrayValue@plt>
mov    %eax,-0x2c(%rbp)
cmpl   $0x0,-0x2c(%rbp)
jne    13b1 <validateExpressionSequence+0x251>
jmp    136e <validateExpressionSequence+0x20e>
mov    -0x18(%rbp),%rdi
call   1070 <validateExpressionSequence@plt>
mov    %eax,-0x30(%rbp)
cmpl   $0x0,-0x30(%rbp)
je     138f <validateExpressionSequence+0x22f>
mov    -0x30(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    15d9 <validateExpressionSequence+0x479>
jmp    1394 <validateExpressionSequence+0x234>
mov    -0x20(%rbp),%rdi
lea    -0x18(%rbp),%rsi
lea    -0x20(%rbp),%rdx
lea    -0x21(%rbp),%rcx
call   1030 <readNextArrayValue@plt>
mov    %eax,-0x2c(%rbp)
jmp    135f <validateExpressionSequence+0x1ff>
cmpl   $0x64,-0x2c(%rbp)
jne    13c5 <validateExpressionSequence+0x265>
xor    %eax,%eax
mov    %eax,-0x44(%rbp)
jmp    13cb <validateExpressionSequence+0x26b>
mov    -0x2c(%rbp),%eax
mov    %eax,-0x44(%rbp)
mov    -0x44(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    15d9 <validateExpressionSequence+0x479>
movzbl -0x22(%rbp),%eax
cmp    $0x0,%eax
jne    13f4 <validateExpressionSequence+0x294>
movb   $0x5,-0x22(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
jmp    1457 <validateExpressionSequence+0x2f7>
jmp    13f9 <validateExpressionSequence+0x299>
mov    -0x20(%rbp),%rdi
lea    -0x18(%rbp),%rsi
lea    -0x20(%rbp),%rdx
lea    -0x21(%rbp),%rcx
call   1060 <readNextValue@plt>
cmp    $0x0,%eax
je     1434 <validateExpressionSequence+0x2d4>
mov    -0x20(%rbp),%rdi
lea    -0x18(%rbp),%rsi
lea    -0x20(%rbp),%rdx
lea    -0x21(%rbp),%rcx
call   1060 <readNextValue@plt>
mov    %eax,-0x4(%rbp)
jmp    15d9 <validateExpressionSequence+0x479>
jmp    1439 <validateExpressionSequence+0x2d9>
movzbl -0x21(%rbp),%eax
cmp    $0x6,%eax
je     1452 <validateExpressionSequence+0x2f2>
movl   $0x66,-0x4(%rbp)
jmp    15d9 <validateExpressionSequence+0x479>
jmp    1457 <validateExpressionSequence+0x2f7>
jmp    145c <validateExpressionSequence+0x2fc>
mov    -0x18(%rbp),%rdi
lea    -0x18(%rbp),%rsi
lea    -0x20(%rbp),%rdx
lea    -0x28(%rbp),%rcx
call   1080 <readNextName@plt>
cmp    $0x0,%eax
je     1497 <validateExpressionSequence+0x337>
mov    -0x18(%rbp),%rdi
lea    -0x18(%rbp),%rsi
lea    -0x20(%rbp),%rdx
lea    -0x28(%rbp),%rcx
call   1080 <readNextName@plt>
mov    %eax,-0x4(%rbp)
jmp    15d9 <validateExpressionSequence+0x479>
jmp    149c <validateExpressionSequence+0x33c>
jmp    14a1 <validateExpressionSequence+0x341>
mov    -0x20(%rbp),%rdi
lea    -0x18(%rbp),%rsi
lea    -0x20(%rbp),%rdx
lea    -0x21(%rbp),%rcx
call   1060 <readNextValue@plt>
cmp    $0x0,%eax
je     14dc <validateExpressionSequence+0x37c>
mov    -0x20(%rbp),%rdi
lea    -0x18(%rbp),%rsi
lea    -0x20(%rbp),%rdx
lea    -0x21(%rbp),%rcx
call   1060 <readNextValue@plt>
mov    %eax,-0x4(%rbp)
jmp    15d9 <validateExpressionSequence+0x479>
jmp    14e1 <validateExpressionSequence+0x381>
movzbl -0x22(%rbp),%eax
cmp    $0x16,%eax
je     14fb <validateExpressionSequence+0x39b>
movzbl -0x22(%rbp),%eax
cmp    $0x17,%eax
jne    1512 <validateExpressionSequence+0x3b2>
mov    -0x18(%rbp),%rdi
call   1070 <validateExpressionSequence@plt>
mov    %eax,-0x2c(%rbp)
mov    -0x2c(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    15d9 <validateExpressionSequence+0x479>
movzbl -0x22(%rbp),%eax
cmp    $0x14,%eax
je     152c <validateExpressionSequence+0x3cc>
movzbl -0x22(%rbp),%eax
cmp    $0x15,%eax
jne    1579 <validateExpressionSequence+0x419>
movzbl -0x21(%rbp),%eax
cmp    $0x1,%eax
je     1545 <validateExpressionSequence+0x3e5>
movl   $0x66,-0x4(%rbp)
jmp    15d9 <validateExpressionSequence+0x479>
jmp    154a <validateExpressionSequence+0x3ea>
mov    -0x18(%rbp),%rdi
mov    -0x20(%rbp),%rsi
call   1050 <validateRegex@plt>
mov    %eax,-0x34(%rbp)
cmpl   $0x0,-0x34(%rbp)
je     156f <validateExpressionSequence+0x40f>
mov    -0x34(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    15d9 <validateExpressionSequence+0x479>
jmp    1574 <validateExpressionSequence+0x414>
jmp    1579 <validateExpressionSequence+0x419>
movzbl -0x21(%rbp),%eax
cmp    $0x5,%eax
jne    1592 <validateExpressionSequence+0x432>
movl   $0x66,-0x4(%rbp)
jmp    15d9 <validateExpressionSequence+0x479>
movzbl -0x21(%rbp),%eax
cmp    $0x6,%eax
jne    15d2 <validateExpressionSequence+0x472>
movb   $0x0,-0x35(%rbp)
mov    -0x18(%rbp),%rdi
lea    -0x35(%rbp),%rsi
call   1040 <validateExpression@plt>
mov    %eax,-0x3c(%rbp)
cmpl   $0x0,-0x3c(%rbp)
je     15c8 <validateExpressionSequence+0x468>
mov    -0x3c(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    15d9 <validateExpressionSequence+0x479>
jmp    15cd <validateExpressionSequence+0x46d>
jmp    15d2 <validateExpressionSequence+0x472>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<validateExpressionSequence>:
push   %rbp
push   %r15
push   %r14
push   %rbx
sub    $0x28,%rsp
mov    %rdi,%rbx
lea    0x10(%rsp),%rsi
lea    0x18(%rsp),%rdx
lea    0x24(%rsp),%rcx
call   1080 <readNextName@plt>
test   %eax,%eax
jne    13a2 <validateExpressionSequence+0x242>
mov    0x24(%rsp),%eax
cmp    $0xf42d3e8,%eax
jg     11c4 <validateExpressionSequence+0x64>
cmp    $0xc26a9cdc,%eax
jle    11f4 <validateExpressionSequence+0x94>
cmp    $0xd9478a06,%eax
jg     1242 <validateExpressionSequence+0xe2>
cmp    $0xc26a9cdd,%eax
je     12fa <validateExpressionSequence+0x19a>
cmp    $0xc96f2510,%eax
jne    1366 <validateExpressionSequence+0x206>
mov    $0x17,%bpl
jmp    131b <validateExpressionSequence+0x1bb>
cmp    $0x1e3e6e57,%eax
jle    121d <validateExpressionSequence+0xbd>
cmp    $0x22567989,%eax
jg     12e7 <validateExpressionSequence+0x187>
cmp    $0x1e3e6e58,%eax
je     12ff <validateExpressionSequence+0x19f>
cmp    $0x205a47fb,%eax
jne    1366 <validateExpressionSequence+0x206>
mov    $0x1,%bpl
jmp    131b <validateExpressionSequence+0x1bb>
cmp    $0x8c1ebdba,%eax
je     1304 <validateExpressionSequence+0x1a4>
cmp    $0x944c46f5,%eax
je     1309 <validateExpressionSequence+0x1a9>
cmp    $0x9b4c51fa,%eax
jne    1366 <validateExpressionSequence+0x206>
mov    $0x8,%bpl
jmp    131b <validateExpressionSequence+0x1bb>
cmp    $0xf42d3e9,%eax
je     130e <validateExpressionSequence+0x1ae>
cmp    $0x1451e652,%eax
je     1258 <validateExpressionSequence+0xf8>
cmp    $0x1642deee,%eax
jne    1366 <validateExpressionSequence+0x206>
mov    $0x7,%bpl
jmp    131b <validateExpressionSequence+0x1bb>
cmp    $0xd9478a07,%eax
je     1313 <validateExpressionSequence+0x1b3>
cmp    $0xdf4edc64,%eax
jne    1366 <validateExpressionSequence+0x206>
mov    0x18(%rsp),%rdi
lea    0x10(%rsp),%rsi
lea    0x18(%rsp),%rdx
lea    0xf(%rsp),%rcx
call   1060 <readNextValue@plt>
mov    $0x66,%eax
cmpb   $0x5,0xf(%rsp)
jne    13a2 <validateExpressionSequence+0x242>
mov    0x10(%rsp),%rdi
lea    0x10(%rsp),%rsi
lea    0x18(%rsp),%rdx
lea    0xf(%rsp),%rcx
call   1030 <readNextArrayValue@plt>
mov    %eax,%ecx
test   %eax,%eax
jne    12da <validateExpressionSequence+0x17a>
lea    0x10(%rsp),%r14
lea    0x18(%rsp),%r15
lea    0xf(%rsp),%rbx
mov    0x10(%rsp),%rdi
call   1070 <validateExpressionSequence@plt>
test   %eax,%eax
jne    13a2 <validateExpressionSequence+0x242>
mov    0x18(%rsp),%rdi
mov    %r14,%rsi
mov    %r15,%rdx
mov    %rbx,%rcx
call   1030 <readNextArrayValue@plt>
test   %eax,%eax
je     12af <validateExpressionSequence+0x14f>
mov    %eax,%ecx
xor    %eax,%eax
cmp    $0x64,%ecx
cmovne %ecx,%eax
jmp    13a2 <validateExpressionSequence+0x242>
cmp    $0x2256798a,%eax
je     1318 <validateExpressionSequence+0x1b8>
cmp    $0x57c58bf7,%eax
jne    1366 <validateExpressionSequence+0x206>
mov    $0x15,%bpl
jmp    131b <validateExpressionSequence+0x1bb>
mov    $0x16,%bpl
jmp    131b <validateExpressionSequence+0x1bb>
mov    $0x3,%bpl
jmp    131b <validateExpressionSequence+0x1bb>
mov    $0x2,%bpl
jmp    131b <validateExpressionSequence+0x1bb>
mov    $0x6,%bpl
jmp    131b <validateExpressionSequence+0x1bb>
mov    $0x5,%bpl
jmp    131b <validateExpressionSequence+0x1bb>
mov    $0x4,%bpl
jmp    131b <validateExpressionSequence+0x1bb>
mov    $0x14,%bpl
mov    0x18(%rsp),%rdi
lea    0x10(%rsp),%rsi
lea    0x18(%rsp),%rdx
lea    0xf(%rsp),%rcx
call   1060 <readNextValue@plt>
test   %eax,%eax
je     1353 <validateExpressionSequence+0x1f3>
mov    0x18(%rsp),%rdi
lea    0x10(%rsp),%rsi
lea    0x18(%rsp),%rdx
lea    0xf(%rsp),%rcx
call   1060 <readNextValue@plt>
jmp    13a2 <validateExpressionSequence+0x242>
mov    $0x66,%eax
cmpb   $0x6,0xf(%rsp)
jne    13a2 <validateExpressionSequence+0x242>
mov    0x10(%rsp),%rbx
jmp    136e <validateExpressionSequence+0x20e>
mov    %rbx,0x10(%rsp)
mov    $0x5,%bpl
lea    0x10(%rsp),%rsi
lea    0x18(%rsp),%rdx
lea    0x24(%rsp),%rcx
mov    %rbx,%rdi
call   1080 <readNextName@plt>
test   %eax,%eax
je     13ad <validateExpressionSequence+0x24d>
mov    0x10(%rsp),%rdi
lea    0x10(%rsp),%rsi
lea    0x18(%rsp),%rdx
lea    0x24(%rsp),%rcx
call   1080 <readNextName@plt>
add    $0x28,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret
mov    0x18(%rsp),%rdi
lea    0x10(%rsp),%rsi
lea    0x18(%rsp),%rdx
lea    0xf(%rsp),%rcx
call   1060 <readNextValue@plt>
test   %eax,%eax
jne    1338 <validateExpressionSequence+0x1d8>
and    $0x1e,%bpl
cmp    $0x14,%bpl
je     13ea <validateExpressionSequence+0x28a>
cmp    $0x16,%bpl
jne    1409 <validateExpressionSequence+0x2a9>
mov    0x10(%rsp),%rdi
call   1070 <validateExpressionSequence@plt>
jmp    13a2 <validateExpressionSequence+0x242>
mov    $0x66,%eax
cmpb   $0x1,0xf(%rsp)
jne    13a2 <validateExpressionSequence+0x242>
mov    0x10(%rsp),%rdi
mov    0x18(%rsp),%rsi
call   1050 <validateRegex@plt>
test   %eax,%eax
jne    13a2 <validateExpressionSequence+0x242>
mov    0xf(%rsp),%al
cmp    $0x5,%al
je     1438 <validateExpressionSequence+0x2d8>
cmp    $0x6,%al
jne    1431 <validateExpressionSequence+0x2d1>
movb   $0x0,0x23(%rsp)
mov    0x10(%rsp),%rdi
lea    0x23(%rsp),%rsi
call   1040 <validateExpression@plt>
test   %eax,%eax
jne    13a2 <validateExpressionSequence+0x242>
xor    %eax,%eax
jmp    13a2 <validateExpressionSequence+0x242>
mov    $0x66,%eax
jmp    13a2 <validateExpressionSequence+0x242>

LLVM IR (-O0):
define i32 @validateExpressionSequence(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i8
%7 = alloca i8
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i8
%13 = alloca i32
store i8* %0, i8** %3
store i8 0, i8* %7
%14 = load i8*, i8** %3
%15 = call i32 @readNextName(i8* %14, i8** %4, i8** %5, i32* %8)
store i32 %15, i32* %9
%16 = load i32, i32* %9
%17 = icmp ne i32 %16, 0
br i1 %17, label %18, label %20
18: ; preds = %1
%19 = load i32, i32* %9
store i32 %19, i32* %2
br label %162
20: ; preds = %1
%21 = load i32, i32* %8
switch i32 %21, label %67 [
i32 256037865, label %22
i32 -1806940427, label %23
i32 507407960, label %24
i32 -649623033, label %25
i32 373481198, label %26
i32 -1689497094, label %27
i32 576092554, label %28
i32 1472564215, label %29
i32 -1033200419, label %30
i32 -915462896, label %31
i32 542787579, label %32
i32 -1944142406, label %33
i32 -548479900, label %34
i32 340911698, label %34
]
22: ; preds = %20
store i8 5, i8* %7
br label %67
23: ; preds = %20
store i8 6, i8* %7
br label %67
24: ; preds = %20
store i8 3, i8* %7
br label %67
25: ; preds = %20
store i8 4, i8* %7
br label %67
26: ; preds = %20
store i8 7, i8* %7
br label %67
27: ; preds = %20
store i8 8, i8* %7
br label %67
28: ; preds = %20
store i8 20, i8* %7
br label %67
29: ; preds = %20
store i8 21, i8* %7
br label %67
30: ; preds = %20
store i8 22, i8* %7
br label %67
31: ; preds = %20
store i8 23, i8* %7
br label %67
32: ; preds = %20
store i8 1, i8* %7
br label %67
33: ; preds = %20
store i8 2, i8* %7
br label %67
34: ; preds = %20, %20
%35 = load i8*, i8** %5
%36 = call i32 @readNextValue(i8* %35, i8** %4, i8** %5, i8* %6)
store i32 %36, i32* %9
%37 = load i8, i8* %6
%38 = zext i8 %37 to i32
%39 = icmp ne i32 %38, 5
br i1 %39, label %40, label %41
40: ; preds = %34
store i32 102, i32* %2
br label %162
41: ; preds = %34
%42 = load i8*, i8** %4
%43 = call i32 @readNextArrayValue(i8* %42, i8** %4, i8** %5, i8* %6)
store i32 %43, i32* %9
br label %44
44: ; preds = %56, %41
%45 = load i32, i32* %9
%46 = icmp eq i32 %45, 0
br i1 %46, label %47, label %59
47: ; preds = %44
br label %48
48: ; preds = %47
%49 = load i8*, i8** %4
%50 = call i32 @validateExpressionSequence(i8* %49)
store i32 %50, i32* %10
%51 = load i32, i32* %10
%52 = icmp ne i32 %51, 0
br i1 %52, label %53, label %55
53: ; preds = %48
%54 = load i32, i32* %10
store i32 %54, i32* %2
br label %162
55: ; preds = %48
br label %56
56: ; preds = %55
%57 = load i8*, i8** %5
%58 = call i32 @readNextArrayValue(i8* %57, i8** %4, i8** %5, i8* %6)
store i32 %58, i32* %9
br label %44
59: ; preds = %44
%60 = load i32, i32* %9
%61 = icmp eq i32 %60, 100
br i1 %61, label %62, label %63
62: ; preds = %59
br label %65
63: ; preds = %59
%64 = load i32, i32* %9
br label %65
65: ; preds = %63, %62
%66 = phi i32 [ 0, %62 ], [ %64, %63 ]
store i32 %66, i32* %2
br label %162
67: ; preds = %20, %33, %32, %31, %30, %29, %28, %27, %26, %25, %24, %23, %22
%68 = load i8, i8* %7
%69 = zext i8 %68 to i32
%70 = icmp eq i32 %69, 0
br i1 %70, label %71, label %73
71: ; preds = %67
store i8 5, i8* %7
%72 = load i8*, i8** %3
store i8* %72, i8** %4
br label %88
73: ; preds = %67
br label %74
74: ; preds = %73
%75 = load i8*, i8** %5
%76 = call i32 @readNextValue(i8* %75, i8** %4, i8** %5, i8* %6)
%77 = icmp ne i32 %76, 0
br i1 %77, label %78, label %81
78: ; preds = %74
%79 = load i8*, i8** %5
%80 = call i32 @readNextValue(i8* %79, i8** %4, i8** %5, i8* %6)
store i32 %80, i32* %2
br label %162
81: ; preds = %74
br label %82
82: ; preds = %81
%83 = load i8, i8* %6
%84 = zext i8 %83 to i32
%85 = icmp ne i32 %84, 6
br i1 %85, label %86, label %87
86: ; preds = %82
store i32 102, i32* %2
br label %162
87: ; preds = %82
br label %88
88: ; preds = %87, %71
br label %89
89: ; preds = %88
%90 = load i8*, i8** %4
%91 = call i32 @readNextName(i8* %90, i8** %4, i8** %5, i32* %8)
%92 = icmp ne i32 %91, 0
br i1 %92, label %93, label %96
93: ; preds = %89
%94 = load i8*, i8** %4
%95 = call i32 @readNextName(i8* %94, i8** %4, i8** %5, i32* %8)
store i32 %95, i32* %2
br label %162
96: ; preds = %89
br label %97
97: ; preds = %96
br label %98
98: ; preds = %97
%99 = load i8*, i8** %5
%100 = call i32 @readNextValue(i8* %99, i8** %4, i8** %5, i8* %6)
%101 = icmp ne i32 %100, 0
br i1 %101, label %102, label %105
102: ; preds = %98
%103 = load i8*, i8** %5
%104 = call i32 @readNextValue(i8* %103, i8** %4, i8** %5, i8* %6)
store i32 %104, i32* %2
br label %162
105: ; preds = %98
br label %106
106: ; preds = %105
%107 = load i8, i8* %7
%108 = zext i8 %107 to i32
%109 = icmp eq i32 %108, 22
br i1 %109, label %114, label %110
110: ; preds = %106
%111 = load i8, i8* %7
%112 = zext i8 %111 to i32
%113 = icmp eq i32 %112, 23
br i1 %113, label %114, label %118
114: ; preds = %110, %106
%115 = load i8*, i8** %4
%116 = call i32 @validateExpressionSequence(i8* %115)
store i32 %116, i32* %9
%117 = load i32, i32* %9
store i32 %117, i32* %2
br label %162
118: ; preds = %110
%119 = load i8, i8* %7
%120 = zext i8 %119 to i32
%121 = icmp eq i32 %120, 20
br i1 %121, label %126, label %122
122: ; preds = %118
%123 = load i8, i8* %7
%124 = zext i8 %123 to i32
%125 = icmp eq i32 %124, 21
br i1 %125, label %126, label %142
126: ; preds = %122, %118
%127 = load i8, i8* %6
%128 = zext i8 %127 to i32
%129 = icmp ne i32 %128, 1
br i1 %129, label %130, label %131
130: ; preds = %126
store i32 102, i32* %2
br label %162
131: ; preds = %126
br label %132
132: ; preds = %131
%133 = load i8*, i8** %4
%134 = load i8*, i8** %5
%135 = call i32 @validateRegex(i8* %133, i8* %134)
store i32 %135, i32* %11
%136 = load i32, i32* %11
%137 = icmp ne i32 %136, 0
br i1 %137, label %138, label %140
138: ; preds = %132
%139 = load i32, i32* %11
store i32 %139, i32* %2
br label %162
140: ; preds = %132
br label %141
141: ; preds = %140
br label %142
142: ; preds = %141, %122
%143 = load i8, i8* %6
%144 = zext i8 %143 to i32
%145 = icmp eq i32 %144, 5
br i1 %145, label %146, label %147
146: ; preds = %142
store i32 102, i32* %2
br label %162
147: ; preds = %142
%148 = load i8, i8* %6
%149 = zext i8 %148 to i32
%150 = icmp eq i32 %149, 6
br i1 %150, label %151, label %161
151: ; preds = %147
store i8 0, i8* %12
br label %152
152: ; preds = %151
%153 = load i8*, i8** %4
%154 = call i32 @validateExpression(i8* %153, i8* %12)
store i32 %154, i32* %13
%155 = load i32, i32* %13
%156 = icmp ne i32 %155, 0
br i1 %156, label %157, label %159
157: ; preds = %152
%158 = load i32, i32* %13
store i32 %158, i32* %2
br label %162
159: ; preds = %152
br label %160
160: ; preds = %159
br label %161
161: ; preds = %160, %147
store i32 0, i32* %2
br label %162
162: ; preds = %161, %157, %146, %138, %130, %114, %102, %93, %86, %78, %65, %53, %40, %18
%163 = load i32, i32* %2
ret i32 %163
}

LLVM IR (-O2):
define i32 @validateExpressionSequence(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
%4 = alloca i8
%5 = alloca i32
%6 = alloca i8
%7 = bitcast i8** %2 to i8*
%8 = bitcast i8** %3 to i8*
%9 = bitcast i32* %5 to i8*
%10 = call i32 @readNextName(i8* %0, i8** %2, i8** %3, i32* %5)
%11 = icmp eq i32 %10, 0
br i1 %11, label %12, label %95
12: ; preds = %1
%13 = load i32, i32* %5
switch i32 %13, label %46 [
i32 256037865, label %47
i32 -1806940427, label %14
i32 507407960, label %15
i32 -649623033, label %16
i32 373481198, label %17
i32 -1689497094, label %18
i32 576092554, label %19
i32 1472564215, label %20
i32 -1033200419, label %21
i32 -915462896, label %22
i32 542787579, label %23
i32 -1944142406, label %24
i32 -548479900, label %25
i32 340911698, label %25
]
14: ; preds = %12
br label %47
15: ; preds = %12
br label %47
16: ; preds = %12
br label %47
17: ; preds = %12
br label %47
18: ; preds = %12
br label %47
19: ; preds = %12
br label %47
20: ; preds = %12
br label %47
21: ; preds = %12
br label %47
22: ; preds = %12
br label %47
23: ; preds = %12
br label %47
24: ; preds = %12
br label %47
25: ; preds = %12, %12
%26 = load i8*, i8** %3
%27 = call i32 @readNextValue(i8* %26, i8** %2, i8** %3, i8* %4)
%28 = load i8, i8* %4
%29 = icmp eq i8 %28, 5
br i1 %29, label %30, label %95
30: ; preds = %25
%31 = load i8*, i8** %2
%32 = call i32 @readNextArrayValue(i8* %31, i8** %2, i8** %3, i8* %4)
%33 = icmp eq i32 %32, 0
br i1 %33, label %34, label %42
34: ; preds = %30, %38
%35 = load i8*, i8** %2
%36 = call i32 @validateExpressionSequence(i8* %35)
%37 = icmp eq i32 %36, 0
br i1 %37, label %38, label %95
38: ; preds = %34
%39 = load i8*, i8** %3
%40 = call i32 @readNextArrayValue(i8* %39, i8** %2, i8** %3, i8* %4)
%41 = icmp eq i32 %40, 0
br i1 %41, label %34, label %42
42: ; preds = %38, %30
%43 = phi i32 [ %32, %30 ], [ %40, %38 ]
%44 = icmp eq i32 %43, 100
%45 = select i1 %44, i32 0, i32 %43
br label %95
46: ; preds = %12
store i8* %0, i8** %2
br label %60
47: ; preds = %12, %24, %23, %22, %21, %20, %19, %18, %17, %16, %15, %14
%48 = phi i8 [ 6, %14 ], [ 3, %15 ], [ 4, %16 ], [ 7, %17 ], [ 8, %18 ], [ 20, %19 ], [ 21, %20 ], [ 22, %21 ], [ 23, %22 ], [ 1, %23 ], [ 2, %24 ], [ 5, %12 ]
%49 = load i8*, i8** %3
%50 = call i32 @readNextValue(i8* %49, i8** %2, i8** %3, i8* %4)
%51 = icmp eq i32 %50, 0
br i1 %51, label %55, label %52
52: ; preds = %47
%53 = load i8*, i8** %3
%54 = call i32 @readNextValue(i8* %53, i8** %2, i8** %3, i8* %4)
br label %95
55: ; preds = %47
%56 = load i8, i8* %4
%57 = icmp eq i8 %56, 6
br i1 %57, label %58, label %95
58: ; preds = %55
%59 = load i8*, i8** %2
br label %60
60: ; preds = %58, %46
%61 = phi i8* [ %0, %46 ], [ %59, %58 ]
%62 = phi i8 [ 5, %46 ], [ %48, %58 ]
%63 = call i32 @readNextName(i8* %61, i8** %2, i8** %3, i32* %5)
%64 = icmp eq i32 %63, 0
br i1 %64, label %68, label %65
65: ; preds = %60
%66 = load i8*, i8** %2
%67 = call i32 @readNextName(i8* %66, i8** %2, i8** %3, i32* %5)
br label %95
68: ; preds = %60
%69 = load i8*, i8** %3
%70 = call i32 @readNextValue(i8* %69, i8** %2, i8** %3, i8* %4)
%71 = icmp eq i32 %70, 0
br i1 %71, label %75, label %72
72: ; preds = %68
%73 = load i8*, i8** %3
%74 = call i32 @readNextValue(i8* %73, i8** %2, i8** %3, i8* %4)
br label %95
75: ; preds = %68
%76 = and i8 %62, -2
switch i8 %76, label %88 [
i8 22, label %77
i8 20, label %80
]
77: ; preds = %75
%78 = load i8*, i8** %2
%79 = call i32 @validateExpressionSequence(i8* %78)
br label %95
80: ; preds = %75
%81 = load i8, i8* %4
%82 = icmp eq i8 %81, 1
br i1 %82, label %83, label %95
83: ; preds = %80
%84 = load i8*, i8** %2
%85 = load i8*, i8** %3
%86 = call i32 @validateRegex(i8* %84, i8* %85)
%87 = icmp eq i32 %86, 0
br i1 %87, label %88, label %95
88: ; preds = %75, %83
%89 = load i8, i8* %4
switch i8 %89, label %94 [
i8 5, label %95
i8 6, label %90
]
90: ; preds = %88
store i8 0, i8* %6
%91 = load i8*, i8** %2
%92 = call i32 @validateExpression(i8* %91, i8* %6)
%93 = icmp eq i32 %92, 0
br i1 %93, label %94, label %95
94: ; preds = %88, %90
br label %95
95: ; preds = %34, %88, %80, %55, %25, %1, %83, %90, %94, %77, %72, %65, %52, %42
%96 = phi i32 [ %67, %65 ], [ %74, %72 ], [ %79, %77 ], [ 0, %94 ], [ %92, %90 ], [ %86, %83 ], [ %54, %52 ], [ %45, %42 ], [ %10, %1 ], [ 102, %25 ], [ 102, %55 ], [ 102, %80 ], [ 102, %88 ], [ %36, %34 ]
ret i32 %96
}