#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 */
int bigobject_rfc3986_segment(const char **str, char forbid, int empty) {
  const char *cur = NULL;
  int ret = 0;
  if (str == NULL) {
    ret = -1;
    goto out;
  }
  cur = *str;
  if (!((((((*(cur) >= 'a') && (*(cur) <= 'z')) ||
           ((*(cur) >= 'A') && (*(cur) <= 'Z')))) ||
         (((*(cur) >= '0') && (*(cur) <= '9'))) || ((*(cur) == '-')) ||
         ((*(cur) == '.')) || ((*(cur) == '_')) || ((*(cur) == '~'))) ||
        ((*(cur) == '%') &&
         ((((*(cur + 1) >= '0') && (*(cur + 1) <= '9')) ||
           ((*(cur + 1) >= 'a') && (*(cur + 1) <= 'f')) ||
           ((*(cur + 1) >= 'A') && (*(cur + 1) <= 'F')))) &&
         ((((*(cur + 2) >= '0') && (*(cur + 2) <= '9')) ||
           ((*(cur + 2) >= 'a') && (*(cur + 2) <= 'f')) ||
           ((*(cur + 2) >= 'A') && (*(cur + 2) <= 'F'))))) ||
        (((*(cur) == '!')) || ((*(cur) == '$')) || ((*(cur) == '&')) ||
         ((*(cur) == '(')) || ((*(cur) == ')')) || ((*(cur) == '*')) ||
         ((*(cur) == '+')) || ((*(cur) == ',')) || ((*(cur) == ';')) ||
         ((*(cur) == '=')) || ((*(cur) == '\''))) ||
        ((*(cur) == ':')) || ((*(cur) == '@')))) {
    if (!empty)
      ret = 1;
    goto out;
  }
  while (((((((*(cur) >= 'a') && (*(cur) <= 'z')) ||
             ((*(cur) >= 'A') && (*(cur) <= 'Z')))) ||
           (((*(cur) >= '0') && (*(cur) <= '9'))) || ((*(cur) == '-')) ||
           ((*(cur) == '.')) || ((*(cur) == '_')) || ((*(cur) == '~'))) ||
          ((*(cur) == '%') &&
           ((((*(cur + 1) >= '0') && (*(cur + 1) <= '9')) ||
             ((*(cur + 1) >= 'a') && (*(cur + 1) <= 'f')) ||
             ((*(cur + 1) >= 'A') && (*(cur + 1) <= 'F')))) &&
           ((((*(cur + 2) >= '0') && (*(cur + 2) <= '9')) ||
             ((*(cur + 2) >= 'a') && (*(cur + 2) <= 'f')) ||
             ((*(cur + 2) >= 'A') && (*(cur + 2) <= 'F'))))) ||
          (((*(cur) == '!')) || ((*(cur) == '$')) || ((*(cur) == '&')) ||
           ((*(cur) == '(')) || ((*(cur) == ')')) || ((*(cur) == '*')) ||
           ((*(cur) == '+')) || ((*(cur) == ',')) || ((*(cur) == ';')) ||
           ((*(cur) == '=')) || ((*(cur) == '\''))) ||
          ((*(cur) == ':')) || ((*(cur) == '@'))) &&
         (*cur != forbid))
    ((*cur == '%') ? cur += 3 : cur++);
  *str = cur;
out:
  return ret;
}


x86 assembly (clang, -O0):
<bigobject_rfc3986_segment>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %rdi,-0x8(%rbp)
mov    %al,-0x9(%rbp)
mov    %edx,-0x10(%rbp)
movq   $0x0,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    1137 <bigobject_rfc3986_segment+0x37>
movl   $0xffffffff,-0x1c(%rbp)
jmp    165a <bigobject_rfc3986_segment+0x55a>
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x61,%eax
jl     1162 <bigobject_rfc3986_segment+0x62>
mov    -0x18(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x7a,%eax
jle    13a4 <bigobject_rfc3986_segment+0x2a4>
mov    -0x18(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x41,%eax
jl     1182 <bigobject_rfc3986_segment+0x82>
mov    -0x18(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x5a,%eax
jle    13a4 <bigobject_rfc3986_segment+0x2a4>
mov    -0x18(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x30,%eax
jl     11a2 <bigobject_rfc3986_segment+0xa2>
mov    -0x18(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x39,%eax
jle    13a4 <bigobject_rfc3986_segment+0x2a4>
mov    -0x18(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x2d,%eax
je     13a4 <bigobject_rfc3986_segment+0x2a4>
mov    -0x18(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x2e,%eax
je     13a4 <bigobject_rfc3986_segment+0x2a4>
mov    -0x18(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x5f,%eax
je     13a4 <bigobject_rfc3986_segment+0x2a4>
mov    -0x18(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x7e,%eax
je     13a4 <bigobject_rfc3986_segment+0x2a4>
mov    -0x18(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x25,%eax
jne    12be <bigobject_rfc3986_segment+0x1be>
mov    -0x18(%rbp),%rax
movsbl 0x1(%rax),%eax
cmp    $0x30,%eax
jl     1214 <bigobject_rfc3986_segment+0x114>
mov    -0x18(%rbp),%rax
movsbl 0x1(%rax),%eax
cmp    $0x39,%eax
jle    1258 <bigobject_rfc3986_segment+0x158>
mov    -0x18(%rbp),%rax
movsbl 0x1(%rax),%eax
cmp    $0x61,%eax
jl     1236 <bigobject_rfc3986_segment+0x136>
mov    -0x18(%rbp),%rax
movsbl 0x1(%rax),%eax
cmp    $0x66,%eax
jle    1258 <bigobject_rfc3986_segment+0x158>
mov    -0x18(%rbp),%rax
movsbl 0x1(%rax),%eax
cmp    $0x41,%eax
jl     12be <bigobject_rfc3986_segment+0x1be>
mov    -0x18(%rbp),%rax
movsbl 0x1(%rax),%eax
cmp    $0x46,%eax
jg     12be <bigobject_rfc3986_segment+0x1be>
mov    -0x18(%rbp),%rax
movsbl 0x2(%rax),%eax
cmp    $0x30,%eax
jl     127a <bigobject_rfc3986_segment+0x17a>
mov    -0x18(%rbp),%rax
movsbl 0x2(%rax),%eax
cmp    $0x39,%eax
jle    13a4 <bigobject_rfc3986_segment+0x2a4>
mov    -0x18(%rbp),%rax
movsbl 0x2(%rax),%eax
cmp    $0x61,%eax
jl     129c <bigobject_rfc3986_segment+0x19c>
mov    -0x18(%rbp),%rax
movsbl 0x2(%rax),%eax
cmp    $0x66,%eax
jle    13a4 <bigobject_rfc3986_segment+0x2a4>
mov    -0x18(%rbp),%rax
movsbl 0x2(%rax),%eax
cmp    $0x41,%eax
jl     12be <bigobject_rfc3986_segment+0x1be>
mov    -0x18(%rbp),%rax
movsbl 0x2(%rax),%eax
cmp    $0x46,%eax
jle    13a4 <bigobject_rfc3986_segment+0x2a4>
mov    -0x18(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x21,%eax
je     13a4 <bigobject_rfc3986_segment+0x2a4>
mov    -0x18(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x24,%eax
je     13a4 <bigobject_rfc3986_segment+0x2a4>
mov    -0x18(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x26,%eax
je     13a4 <bigobject_rfc3986_segment+0x2a4>
mov    -0x18(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x28,%eax
je     13a4 <bigobject_rfc3986_segment+0x2a4>
mov    -0x18(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x29,%eax
je     13a4 <bigobject_rfc3986_segment+0x2a4>
mov    -0x18(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x2a,%eax
je     13a4 <bigobject_rfc3986_segment+0x2a4>
mov    -0x18(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x2b,%eax
je     13a4 <bigobject_rfc3986_segment+0x2a4>
mov    -0x18(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x2c,%eax
je     13a4 <bigobject_rfc3986_segment+0x2a4>
mov    -0x18(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x3b,%eax
je     13a4 <bigobject_rfc3986_segment+0x2a4>
mov    -0x18(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x3d,%eax
je     13a4 <bigobject_rfc3986_segment+0x2a4>
mov    -0x18(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x27,%eax
je     13a4 <bigobject_rfc3986_segment+0x2a4>
mov    -0x18(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x3a,%eax
je     13a4 <bigobject_rfc3986_segment+0x2a4>
mov    -0x18(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x40,%eax
je     13a4 <bigobject_rfc3986_segment+0x2a4>
cmpl   $0x0,-0x10(%rbp)
jne    139f <bigobject_rfc3986_segment+0x29f>
movl   $0x1,-0x1c(%rbp)
jmp    165a <bigobject_rfc3986_segment+0x55a>
jmp    13a9 <bigobject_rfc3986_segment+0x2a9>
mov    -0x18(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x61,%eax
jl     13c9 <bigobject_rfc3986_segment+0x2c9>
mov    -0x18(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x7a,%eax
jle    15fa <bigobject_rfc3986_segment+0x4fa>
mov    -0x18(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x41,%eax
jl     13e9 <bigobject_rfc3986_segment+0x2e9>
mov    -0x18(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x5a,%eax
jle    15fa <bigobject_rfc3986_segment+0x4fa>
mov    -0x18(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x30,%eax
jl     1409 <bigobject_rfc3986_segment+0x309>
mov    -0x18(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x39,%eax
jle    15fa <bigobject_rfc3986_segment+0x4fa>
mov    -0x18(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x2d,%eax
je     15fa <bigobject_rfc3986_segment+0x4fa>
mov    -0x18(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x2e,%eax
je     15fa <bigobject_rfc3986_segment+0x4fa>
mov    -0x18(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x5f,%eax
je     15fa <bigobject_rfc3986_segment+0x4fa>
mov    -0x18(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x7e,%eax
je     15fa <bigobject_rfc3986_segment+0x4fa>
mov    -0x18(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x25,%eax
jne    1525 <bigobject_rfc3986_segment+0x425>
mov    -0x18(%rbp),%rax
movsbl 0x1(%rax),%eax
cmp    $0x30,%eax
jl     147b <bigobject_rfc3986_segment+0x37b>
mov    -0x18(%rbp),%rax
movsbl 0x1(%rax),%eax
cmp    $0x39,%eax
jle    14bf <bigobject_rfc3986_segment+0x3bf>
mov    -0x18(%rbp),%rax
movsbl 0x1(%rax),%eax
cmp    $0x61,%eax
jl     149d <bigobject_rfc3986_segment+0x39d>
mov    -0x18(%rbp),%rax
movsbl 0x1(%rax),%eax
cmp    $0x66,%eax
jle    14bf <bigobject_rfc3986_segment+0x3bf>
mov    -0x18(%rbp),%rax
movsbl 0x1(%rax),%eax
cmp    $0x41,%eax
jl     1525 <bigobject_rfc3986_segment+0x425>
mov    -0x18(%rbp),%rax
movsbl 0x1(%rax),%eax
cmp    $0x46,%eax
jg     1525 <bigobject_rfc3986_segment+0x425>
mov    -0x18(%rbp),%rax
movsbl 0x2(%rax),%eax
cmp    $0x30,%eax
jl     14e1 <bigobject_rfc3986_segment+0x3e1>
mov    -0x18(%rbp),%rax
movsbl 0x2(%rax),%eax
cmp    $0x39,%eax
jle    15fa <bigobject_rfc3986_segment+0x4fa>
mov    -0x18(%rbp),%rax
movsbl 0x2(%rax),%eax
cmp    $0x61,%eax
jl     1503 <bigobject_rfc3986_segment+0x403>
mov    -0x18(%rbp),%rax
movsbl 0x2(%rax),%eax
cmp    $0x66,%eax
jle    15fa <bigobject_rfc3986_segment+0x4fa>
mov    -0x18(%rbp),%rax
movsbl 0x2(%rax),%eax
cmp    $0x41,%eax
jl     1525 <bigobject_rfc3986_segment+0x425>
mov    -0x18(%rbp),%rax
movsbl 0x2(%rax),%eax
cmp    $0x46,%eax
jle    15fa <bigobject_rfc3986_segment+0x4fa>
mov    -0x18(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x21,%eax
je     15fa <bigobject_rfc3986_segment+0x4fa>
mov    -0x18(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x24,%eax
je     15fa <bigobject_rfc3986_segment+0x4fa>
mov    -0x18(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x26,%eax
je     15fa <bigobject_rfc3986_segment+0x4fa>
mov    -0x18(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x28,%eax
je     15fa <bigobject_rfc3986_segment+0x4fa>
mov    -0x18(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x29,%eax
je     15fa <bigobject_rfc3986_segment+0x4fa>
mov    -0x18(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x2a,%eax
je     15fa <bigobject_rfc3986_segment+0x4fa>
mov    -0x18(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x2b,%eax
je     15fa <bigobject_rfc3986_segment+0x4fa>
mov    -0x18(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x2c,%eax
je     15fa <bigobject_rfc3986_segment+0x4fa>
mov    -0x18(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x3b,%eax
je     15fa <bigobject_rfc3986_segment+0x4fa>
mov    -0x18(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x3d,%eax
je     15fa <bigobject_rfc3986_segment+0x4fa>
mov    -0x18(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x27,%eax
je     15fa <bigobject_rfc3986_segment+0x4fa>
mov    -0x18(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x3a,%eax
je     15fa <bigobject_rfc3986_segment+0x4fa>
mov    -0x18(%rbp),%rax
movsbl (%rax),%ecx
xor    %eax,%eax
cmp    $0x40,%ecx
mov    %al,-0x1d(%rbp)
jne    160d <bigobject_rfc3986_segment+0x50d>
mov    -0x18(%rbp),%rax
movsbl (%rax),%eax
movsbl -0x9(%rbp),%ecx
cmp    %ecx,%eax
setne  %al
mov    %al,-0x1d(%rbp)
mov    -0x1d(%rbp),%al
test   $0x1,%al
jne    161d <bigobject_rfc3986_segment+0x51d>
jmp    164f <bigobject_rfc3986_segment+0x54f>
mov    -0x18(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x25,%eax
jne    163e <bigobject_rfc3986_segment+0x53e>
mov    -0x18(%rbp),%rax
add    $0x3,%rax
mov    %rax,-0x18(%rbp)
jmp    164a <bigobject_rfc3986_segment+0x54a>
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
jmp    13a9 <bigobject_rfc3986_segment+0x2a9>
mov    -0x18(%rbp),%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,(%rax)
mov    -0x1c(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<bigobject_rfc3986_segment>:
test   %rdi,%rdi
je     11ea <bigobject_rfc3986_segment+0xea>
mov    (%rdi),%r11
mov    (%r11),%cl
mov    %ecx,%eax
and    $0xdf,%al
add    $0xbf,%al
cmp    $0x1a,%al
jb     1142 <bigobject_rfc3986_segment+0x42>
lea    -0x30(%rcx),%eax
cmp    $0xa,%al
jb     1142 <bigobject_rfc3986_segment+0x42>
lea    -0x21(%rcx),%r8d
cmp    $0x5d,%r8b
ja     124c <bigobject_rfc3986_segment+0x14c>
movzbl %r8b,%eax
lea    0xec7(%rip),%r8
movslq (%r8,%rax,4),%rax
add    %r8,%rax
jmp    *%rax
lea    0x102f(%rip),%r10
movabs $0x3f0000003f,%r8
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    %ecx,%eax
and    $0xdf,%al
add    $0xbf,%al
cmp    $0x1a,%al
jb     1185 <bigobject_rfc3986_segment+0x85>
lea    -0x30(%rcx),%eax
cmp    $0xa,%al
jb     1185 <bigobject_rfc3986_segment+0x85>
lea    -0x21(%rcx),%edx
cmp    $0x5d,%dl
ja     11e4 <bigobject_rfc3986_segment+0xe4>
movzbl %dl,%eax
movslq (%r10,%rax,4),%rax
add    %r10,%rax
jmp    *%rax
cmp    %sil,%cl
je     11e4 <bigobject_rfc3986_segment+0xe4>
xor    %eax,%eax
cmp    $0x25,%cl
sete   %al
movzbl 0x1(%r11,%rax,2),%ecx
lea    (%r11,%rax,2),%r11
add    $0x1,%r11
jmp    1160 <bigobject_rfc3986_segment+0x60>
movzbl 0x1(%r11),%edx
lea    -0x30(%rdx),%eax
cmp    $0xa,%al
jb     11bf <bigobject_rfc3986_segment+0xbf>
add    $0xbf,%dl
cmp    $0x25,%dl
ja     11e4 <bigobject_rfc3986_segment+0xe4>
movzbl %dl,%eax
bt     %rax,%r8
jae    11e4 <bigobject_rfc3986_segment+0xe4>
movzbl 0x2(%r11),%r9d
lea    -0x30(%r9),%eax
cmp    $0xa,%al
jb     1185 <bigobject_rfc3986_segment+0x85>
lea    -0x61(%r9),%eax
cmp    $0x6,%al
jb     1185 <bigobject_rfc3986_segment+0x85>
add    $0xb9,%r9b
cmp    $0xfa,%r9b
jb     11e4 <bigobject_rfc3986_segment+0xe4>
cmp    $0x25,%sil
jne    118a <bigobject_rfc3986_segment+0x8a>
mov    %r11,(%rdi)
xor    %eax,%eax
ret
mov    $0xffffffff,%eax
ret
mov    0x1(%r11),%r8b
lea    -0x30(%r8),%eax
cmp    $0xa,%al
jb     121a <bigobject_rfc3986_segment+0x11a>
add    $0xbf,%r8b
cmp    $0x25,%r8b
ja     124c <bigobject_rfc3986_segment+0x14c>
movzbl %r8b,%r8d
movabs $0x3f0000003f,%rax
bt     %r8,%rax
jae    124c <bigobject_rfc3986_segment+0x14c>
mov    0x2(%r11),%r8b
lea    -0x30(%r8),%eax
cmp    $0xa,%al
jb     1142 <bigobject_rfc3986_segment+0x42>
add    $0xbf,%r8b
cmp    $0x25,%r8b
ja     124c <bigobject_rfc3986_segment+0x14c>
movzbl %r8b,%r8d
movabs $0x3f0000003f,%rax
bt     %r8,%rax
jb     1142 <bigobject_rfc3986_segment+0x42>
xor    %eax,%eax
test   %edx,%edx
sete   %al
ret

LLVM IR (-O0):
define i32 @bigobject_rfc3986_segment(i8** %0, i8 signext %1, i32 %2) {
%4 = alloca i8**
%5 = alloca i8
%6 = alloca i32
%7 = alloca i8*
%8 = alloca i32
store i8** %0, i8*** %4
store i8 %1, i8* %5
store i32 %2, i32* %6
store i8* null, i8** %7
store i32 0, i32* %8
%9 = load i8**, i8*** %4
%10 = icmp eq i8** %9, null
br i1 %10, label %11, label %12
11: ; preds = %3
store i32 -1, i32* %8
br label %429
12: ; preds = %3
%13 = load i8**, i8*** %4
%14 = load i8*, i8** %13
store i8* %14, i8** %7
%15 = load i8*, i8** %7
%16 = load i8, i8* %15
%17 = sext i8 %16 to i32
%18 = icmp sge i32 %17, 97
br i1 %18, label %19, label %24
19: ; preds = %12
%20 = load i8*, i8** %7
%21 = load i8, i8* %20
%22 = sext i8 %21 to i32
%23 = icmp sle i32 %22, 122
br i1 %23, label %211, label %24
24: ; preds = %19, %12
%25 = load i8*, i8** %7
%26 = load i8, i8* %25
%27 = sext i8 %26 to i32
%28 = icmp sge i32 %27, 65
br i1 %28, label %29, label %34
29: ; preds = %24
%30 = load i8*, i8** %7
%31 = load i8, i8* %30
%32 = sext i8 %31 to i32
%33 = icmp sle i32 %32, 90
br i1 %33, label %211, label %34
34: ; preds = %29, %24
%35 = load i8*, i8** %7
%36 = load i8, i8* %35
%37 = sext i8 %36 to i32
%38 = icmp sge i32 %37, 48
br i1 %38, label %39, label %44
39: ; preds = %34
%40 = load i8*, i8** %7
%41 = load i8, i8* %40
%42 = sext i8 %41 to i32
%43 = icmp sle i32 %42, 57
br i1 %43, label %211, label %44
44: ; preds = %39, %34
%45 = load i8*, i8** %7
%46 = load i8, i8* %45
%47 = sext i8 %46 to i32
%48 = icmp eq i32 %47, 45
br i1 %48, label %211, label %49
49: ; preds = %44
%50 = load i8*, i8** %7
%51 = load i8, i8* %50
%52 = sext i8 %51 to i32
%53 = icmp eq i32 %52, 46
br i1 %53, label %211, label %54
54: ; preds = %49
%55 = load i8*, i8** %7
%56 = load i8, i8* %55
%57 = sext i8 %56 to i32
%58 = icmp eq i32 %57, 95
br i1 %58, label %211, label %59
59: ; preds = %54
%60 = load i8*, i8** %7
%61 = load i8, i8* %60
%62 = sext i8 %61 to i32
%63 = icmp eq i32 %62, 126
br i1 %63, label %211, label %64
64: ; preds = %59
%65 = load i8*, i8** %7
%66 = load i8, i8* %65
%67 = sext i8 %66 to i32
%68 = icmp eq i32 %67, 37
br i1 %68, label %69, label %141
69: ; preds = %64
%70 = load i8*, i8** %7
%71 = getelementptr inbounds i8, i8* %70, i64 1
%72 = load i8, i8* %71
%73 = sext i8 %72 to i32
%74 = icmp sge i32 %73, 48
br i1 %74, label %75, label %81
75: ; preds = %69
%76 = load i8*, i8** %7
%77 = getelementptr inbounds i8, i8* %76, i64 1
%78 = load i8, i8* %77
%79 = sext i8 %78 to i32
%80 = icmp sle i32 %79, 57
br i1 %80, label %105, label %81
81: ; preds = %75, %69
%82 = load i8*, i8** %7
%83 = getelementptr inbounds i8, i8* %82, i64 1
%84 = load i8, i8* %83
%85 = sext i8 %84 to i32
%86 = icmp sge i32 %85, 97
br i1 %86, label %87, label %93
87: ; preds = %81
%88 = load i8*, i8** %7
%89 = getelementptr inbounds i8, i8* %88, i64 1
%90 = load i8, i8* %89
%91 = sext i8 %90 to i32
%92 = icmp sle i32 %91, 102
br i1 %92, label %105, label %93
93: ; preds = %87, %81
%94 = load i8*, i8** %7
%95 = getelementptr inbounds i8, i8* %94, i64 1
%96 = load i8, i8* %95
%97 = sext i8 %96 to i32
%98 = icmp sge i32 %97, 65
br i1 %98, label %99, label %141
99: ; preds = %93
%100 = load i8*, i8** %7
%101 = getelementptr inbounds i8, i8* %100, i64 1
%102 = load i8, i8* %101
%103 = sext i8 %102 to i32
%104 = icmp sle i32 %103, 70
br i1 %104, label %105, label %141
105: ; preds = %99, %87, %75
%106 = load i8*, i8** %7
%107 = getelementptr inbounds i8, i8* %106, i64 2
%108 = load i8, i8* %107
%109 = sext i8 %108 to i32
%110 = icmp sge i32 %109, 48
br i1 %110, label %111, label %117
111: ; preds = %105
%112 = load i8*, i8** %7
%113 = getelementptr inbounds i8, i8* %112, i64 2
%114 = load i8, i8* %113
%115 = sext i8 %114 to i32
%116 = icmp sle i32 %115, 57
br i1 %116, label %211, label %117
117: ; preds = %111, %105
%118 = load i8*, i8** %7
%119 = getelementptr inbounds i8, i8* %118, i64 2
%120 = load i8, i8* %119
%121 = sext i8 %120 to i32
%122 = icmp sge i32 %121, 97
br i1 %122, label %123, label %129
123: ; preds = %117
%124 = load i8*, i8** %7
%125 = getelementptr inbounds i8, i8* %124, i64 2
%126 = load i8, i8* %125
%127 = sext i8 %126 to i32
%128 = icmp sle i32 %127, 102
br i1 %128, label %211, label %129
129: ; preds = %123, %117
%130 = load i8*, i8** %7
%131 = getelementptr inbounds i8, i8* %130, i64 2
%132 = load i8, i8* %131
%133 = sext i8 %132 to i32
%134 = icmp sge i32 %133, 65
br i1 %134, label %135, label %141
135: ; preds = %129
%136 = load i8*, i8** %7
%137 = getelementptr inbounds i8, i8* %136, i64 2
%138 = load i8, i8* %137
%139 = sext i8 %138 to i32
%140 = icmp sle i32 %139, 70
br i1 %140, label %211, label %141
141: ; preds = %135, %129, %99, %93, %64
%142 = load i8*, i8** %7
%143 = load i8, i8* %142
%144 = sext i8 %143 to i32
%145 = icmp eq i32 %144, 33
br i1 %145, label %211, label %146
146: ; preds = %141
%147 = load i8*, i8** %7
%148 = load i8, i8* %147
%149 = sext i8 %148 to i32
%150 = icmp eq i32 %149, 36
br i1 %150, label %211, label %151
151: ; preds = %146
%152 = load i8*, i8** %7
%153 = load i8, i8* %152
%154 = sext i8 %153 to i32
%155 = icmp eq i32 %154, 38
br i1 %155, label %211, label %156
156: ; preds = %151
%157 = load i8*, i8** %7
%158 = load i8, i8* %157
%159 = sext i8 %158 to i32
%160 = icmp eq i32 %159, 40
br i1 %160, label %211, label %161
161: ; preds = %156
%162 = load i8*, i8** %7
%163 = load i8, i8* %162
%164 = sext i8 %163 to i32
%165 = icmp eq i32 %164, 41
br i1 %165, label %211, label %166
166: ; preds = %161
%167 = load i8*, i8** %7
%168 = load i8, i8* %167
%169 = sext i8 %168 to i32
%170 = icmp eq i32 %169, 42
br i1 %170, label %211, label %171
171: ; preds = %166
%172 = load i8*, i8** %7
%173 = load i8, i8* %172
%174 = sext i8 %173 to i32
%175 = icmp eq i32 %174, 43
br i1 %175, label %211, label %176
176: ; preds = %171
%177 = load i8*, i8** %7
%178 = load i8, i8* %177
%179 = sext i8 %178 to i32
%180 = icmp eq i32 %179, 44
br i1 %180, label %211, label %181
181: ; preds = %176
%182 = load i8*, i8** %7
%183 = load i8, i8* %182
%184 = sext i8 %183 to i32
%185 = icmp eq i32 %184, 59
br i1 %185, label %211, label %186
186: ; preds = %181
%187 = load i8*, i8** %7
%188 = load i8, i8* %187
%189 = sext i8 %188 to i32
%190 = icmp eq i32 %189, 61
br i1 %190, label %211, label %191
191: ; preds = %186
%192 = load i8*, i8** %7
%193 = load i8, i8* %192
%194 = sext i8 %193 to i32
%195 = icmp eq i32 %194, 39
br i1 %195, label %211, label %196
196: ; preds = %191
%197 = load i8*, i8** %7
%198 = load i8, i8* %197
%199 = sext i8 %198 to i32
%200 = icmp eq i32 %199, 58
br i1 %200, label %211, label %201
201: ; preds = %196
%202 = load i8*, i8** %7
%203 = load i8, i8* %202
%204 = sext i8 %203 to i32
%205 = icmp eq i32 %204, 64
br i1 %205, label %211, label %206
206: ; preds = %201
%207 = load i32, i32* %6
%208 = icmp ne i32 %207, 0
br i1 %208, label %210, label %209
209: ; preds = %206
store i32 1, i32* %8
br label %210
210: ; preds = %209, %206
br label %429
211: ; preds = %201, %196, %191, %186, %181, %176, %171, %166, %161, %156, %151, %146, %141, %135, %123, %111, %59, %54, %49, %44, %39, %29, %19
br label %212
212: ; preds = %424, %211
%213 = load i8*, i8** %7
%214 = load i8, i8* %213
%215 = sext i8 %214 to i32
%216 = icmp sge i32 %215, 97
br i1 %216, label %217, label %222
217: ; preds = %212
%218 = load i8*, i8** %7
%219 = load i8, i8* %218
%220 = sext i8 %219 to i32
%221 = icmp sle i32 %220, 122
br i1 %221, label %404, label %222
222: ; preds = %217, %212
%223 = load i8*, i8** %7
%224 = load i8, i8* %223
%225 = sext i8 %224 to i32
%226 = icmp sge i32 %225, 65
br i1 %226, label %227, label %232
227: ; preds = %222
%228 = load i8*, i8** %7
%229 = load i8, i8* %228
%230 = sext i8 %229 to i32
%231 = icmp sle i32 %230, 90
br i1 %231, label %404, label %232
232: ; preds = %227, %222
%233 = load i8*, i8** %7
%234 = load i8, i8* %233
%235 = sext i8 %234 to i32
%236 = icmp sge i32 %235, 48
br i1 %236, label %237, label %242
237: ; preds = %232
%238 = load i8*, i8** %7
%239 = load i8, i8* %238
%240 = sext i8 %239 to i32
%241 = icmp sle i32 %240, 57
br i1 %241, label %404, label %242
242: ; preds = %237, %232
%243 = load i8*, i8** %7
%244 = load i8, i8* %243
%245 = sext i8 %244 to i32
%246 = icmp eq i32 %245, 45
br i1 %246, label %404, label %247
247: ; preds = %242
%248 = load i8*, i8** %7
%249 = load i8, i8* %248
%250 = sext i8 %249 to i32
%251 = icmp eq i32 %250, 46
br i1 %251, label %404, label %252
252: ; preds = %247
%253 = load i8*, i8** %7
%254 = load i8, i8* %253
%255 = sext i8 %254 to i32
%256 = icmp eq i32 %255, 95
br i1 %256, label %404, label %257
257: ; preds = %252
%258 = load i8*, i8** %7
%259 = load i8, i8* %258
%260 = sext i8 %259 to i32
%261 = icmp eq i32 %260, 126
br i1 %261, label %404, label %262
262: ; preds = %257
%263 = load i8*, i8** %7
%264 = load i8, i8* %263
%265 = sext i8 %264 to i32
%266 = icmp eq i32 %265, 37
br i1 %266, label %267, label %339
267: ; preds = %262
%268 = load i8*, i8** %7
%269 = getelementptr inbounds i8, i8* %268, i64 1
%270 = load i8, i8* %269
%271 = sext i8 %270 to i32
%272 = icmp sge i32 %271, 48
br i1 %272, label %273, label %279
273: ; preds = %267
%274 = load i8*, i8** %7
%275 = getelementptr inbounds i8, i8* %274, i64 1
%276 = load i8, i8* %275
%277 = sext i8 %276 to i32
%278 = icmp sle i32 %277, 57
br i1 %278, label %303, label %279
279: ; preds = %273, %267
%280 = load i8*, i8** %7
%281 = getelementptr inbounds i8, i8* %280, i64 1
%282 = load i8, i8* %281
%283 = sext i8 %282 to i32
%284 = icmp sge i32 %283, 97
br i1 %284, label %285, label %291
285: ; preds = %279
%286 = load i8*, i8** %7
%287 = getelementptr inbounds i8, i8* %286, i64 1
%288 = load i8, i8* %287
%289 = sext i8 %288 to i32
%290 = icmp sle i32 %289, 102
br i1 %290, label %303, label %291
291: ; preds = %285, %279
%292 = load i8*, i8** %7
%293 = getelementptr inbounds i8, i8* %292, i64 1
%294 = load i8, i8* %293
%295 = sext i8 %294 to i32
%296 = icmp sge i32 %295, 65
br i1 %296, label %297, label %339
297: ; preds = %291
%298 = load i8*, i8** %7
%299 = getelementptr inbounds i8, i8* %298, i64 1
%300 = load i8, i8* %299
%301 = sext i8 %300 to i32
%302 = icmp sle i32 %301, 70
br i1 %302, label %303, label %339
303: ; preds = %297, %285, %273
%304 = load i8*, i8** %7
%305 = getelementptr inbounds i8, i8* %304, i64 2
%306 = load i8, i8* %305
%307 = sext i8 %306 to i32
%308 = icmp sge i32 %307, 48
br i1 %308, label %309, label %315
309: ; preds = %303
%310 = load i8*, i8** %7
%311 = getelementptr inbounds i8, i8* %310, i64 2
%312 = load i8, i8* %311
%313 = sext i8 %312 to i32
%314 = icmp sle i32 %313, 57
br i1 %314, label %404, label %315
315: ; preds = %309, %303
%316 = load i8*, i8** %7
%317 = getelementptr inbounds i8, i8* %316, i64 2
%318 = load i8, i8* %317
%319 = sext i8 %318 to i32
%320 = icmp sge i32 %319, 97
br i1 %320, label %321, label %327
321: ; preds = %315
%322 = load i8*, i8** %7
%323 = getelementptr inbounds i8, i8* %322, i64 2
%324 = load i8, i8* %323
%325 = sext i8 %324 to i32
%326 = icmp sle i32 %325, 102
br i1 %326, label %404, label %327
327: ; preds = %321, %315
%328 = load i8*, i8** %7
%329 = getelementptr inbounds i8, i8* %328, i64 2
%330 = load i8, i8* %329
%331 = sext i8 %330 to i32
%332 = icmp sge i32 %331, 65
br i1 %332, label %333, label %339
333: ; preds = %327
%334 = load i8*, i8** %7
%335 = getelementptr inbounds i8, i8* %334, i64 2
%336 = load i8, i8* %335
%337 = sext i8 %336 to i32
%338 = icmp sle i32 %337, 70
br i1 %338, label %404, label %339
339: ; preds = %333, %327, %297, %291, %262
%340 = load i8*, i8** %7
%341 = load i8, i8* %340
%342 = sext i8 %341 to i32
%343 = icmp eq i32 %342, 33
br i1 %343, label %404, label %344
344: ; preds = %339
%345 = load i8*, i8** %7
%346 = load i8, i8* %345
%347 = sext i8 %346 to i32
%348 = icmp eq i32 %347, 36
br i1 %348, label %404, label %349
349: ; preds = %344
%350 = load i8*, i8** %7
%351 = load i8, i8* %350
%352 = sext i8 %351 to i32
%353 = icmp eq i32 %352, 38
br i1 %353, label %404, label %354
354: ; preds = %349
%355 = load i8*, i8** %7
%356 = load i8, i8* %355
%357 = sext i8 %356 to i32
%358 = icmp eq i32 %357, 40
br i1 %358, label %404, label %359
359: ; preds = %354
%360 = load i8*, i8** %7
%361 = load i8, i8* %360
%362 = sext i8 %361 to i32
%363 = icmp eq i32 %362, 41
br i1 %363, label %404, label %364
364: ; preds = %359
%365 = load i8*, i8** %7
%366 = load i8, i8* %365
%367 = sext i8 %366 to i32
%368 = icmp eq i32 %367, 42
br i1 %368, label %404, label %369
369: ; preds = %364
%370 = load i8*, i8** %7
%371 = load i8, i8* %370
%372 = sext i8 %371 to i32
%373 = icmp eq i32 %372, 43
br i1 %373, label %404, label %374
374: ; preds = %369
%375 = load i8*, i8** %7
%376 = load i8, i8* %375
%377 = sext i8 %376 to i32
%378 = icmp eq i32 %377, 44
br i1 %378, label %404, label %379
379: ; preds = %374
%380 = load i8*, i8** %7
%381 = load i8, i8* %380
%382 = sext i8 %381 to i32
%383 = icmp eq i32 %382, 59
br i1 %383, label %404, label %384
384: ; preds = %379
%385 = load i8*, i8** %7
%386 = load i8, i8* %385
%387 = sext i8 %386 to i32
%388 = icmp eq i32 %387, 61
br i1 %388, label %404, label %389
389: ; preds = %384
%390 = load i8*, i8** %7
%391 = load i8, i8* %390
%392 = sext i8 %391 to i32
%393 = icmp eq i32 %392, 39
br i1 %393, label %404, label %394
394: ; preds = %389
%395 = load i8*, i8** %7
%396 = load i8, i8* %395
%397 = sext i8 %396 to i32
%398 = icmp eq i32 %397, 58
br i1 %398, label %404, label %399
399: ; preds = %394
%400 = load i8*, i8** %7
%401 = load i8, i8* %400
%402 = sext i8 %401 to i32
%403 = icmp eq i32 %402, 64
br i1 %403, label %404, label %411
404: ; preds = %399, %394, %389, %384, %379, %374, %369, %364, %359, %354, %349, %344, %339, %333, %321, %309, %257, %252, %247, %242, %237, %227, %217
%405 = load i8*, i8** %7
%406 = load i8, i8* %405
%407 = sext i8 %406 to i32
%408 = load i8, i8* %5
%409 = sext i8 %408 to i32
%410 = icmp ne i32 %407, %409
br label %411
411: ; preds = %404, %399
%412 = phi i1 [ false, %399 ], [ %410, %404 ]
br i1 %412, label %413, label %426
413: ; preds = %411
%414 = load i8*, i8** %7
%415 = load i8, i8* %414
%416 = sext i8 %415 to i32
%417 = icmp eq i32 %416, 37
br i1 %417, label %418, label %421
418: ; preds = %413
%419 = load i8*, i8** %7
%420 = getelementptr inbounds i8, i8* %419, i64 3
store i8* %420, i8** %7
br label %424
421: ; preds = %413
%422 = load i8*, i8** %7
%423 = getelementptr inbounds i8, i8* %422, i32 1
store i8* %423, i8** %7
br label %424
424: ; preds = %421, %418
%425 = phi i8* [ %420, %418 ], [ %422, %421 ]
br label %212
426: ; preds = %411
%427 = load i8*, i8** %7
%428 = load i8**, i8*** %4
store i8* %427, i8** %428
br label %429
429: ; preds = %426, %210, %11
%430 = load i32, i32* %8
ret i32 %430
}

LLVM IR (-O2):
define i32 @bigobject_rfc3986_segment(i8** %0, i8 signext %1, i32 %2) {
%4 = icmp eq i8** %0, null
br i1 %4, label %71, label %5
5: ; preds = %3
%6 = load i8*, i8** %0
%7 = load i8, i8* %6
%8 = and i8 %7, -33
%9 = add i8 %8, -65
%10 = icmp ult i8 %9, 26
%11 = add i8 %7, -48
%12 = icmp ult i8 %11, 10
%13 = select i1 %10, i1 true, i1 %12
br i1 %13, label %32, label %14
14: ; preds = %5
switch i8 %7, label %29 [
i8 45, label %32
i8 46, label %32
i8 95, label %32
i8 126, label %32
i8 37, label %15
i8 33, label %32
i8 36, label %32
i8 38, label %32
i8 40, label %32
i8 41, label %32
i8 42, label %32
i8 43, label %32
i8 44, label %32
i8 59, label %32
i8 61, label %32
i8 39, label %32
i8 58, label %32
i8 64, label %32
]
15: ; preds = %14
%16 = getelementptr inbounds i8, i8* %6, i64 1
%17 = load i8, i8* %16
%18 = freeze i8 %17
%19 = add i8 %18, -48
%20 = icmp ult i8 %19, 10
br i1 %20, label %22, label %21
21: ; preds = %15
switch i8 %18, label %29 [
i8 102, label %22
i8 101, label %22
i8 100, label %22
i8 99, label %22
i8 98, label %22
i8 97, label %22
i8 70, label %22
i8 69, label %22
i8 68, label %22
i8 67, label %22
i8 66, label %22
i8 65, label %22
]
22: ; preds = %21, %21, %21, %21, %21, %21, %21, %21, %21, %21, %21, %21, %15
%23 = getelementptr inbounds i8, i8* %6, i64 2
%24 = load i8, i8* %23
%25 = freeze i8 %24
%26 = add i8 %25, -48
%27 = icmp ult i8 %26, 10
br i1 %27, label %32, label %28
28: ; preds = %22
switch i8 %25, label %29 [
i8 102, label %32
i8 101, label %32
i8 100, label %32
i8 99, label %32
i8 98, label %32
i8 97, label %32
i8 70, label %32
i8 69, label %32
i8 68, label %32
i8 67, label %32
i8 66, label %32
i8 65, label %32
]
29: ; preds = %28, %21, %14
%30 = icmp eq i32 %2, 0
%31 = zext i1 %30 to i32
br label %71
32: ; preds = %28, %28, %28, %28, %28, %28, %28, %28, %28, %28, %28, %28, %22, %14, %14, %14, %14, %14, %14, %14, %14, %14, %14, %14, %14, %14, %14, %14, %14, %14, %5
%33 = icmp eq i8 %1, 37
br label %34
34: ; preds = %65, %32
%35 = phi i8 [ %7, %32 ], [ %69, %65 ]
%36 = phi i8* [ %6, %32 ], [ %68, %65 ]
%37 = and i8 %35, -33
%38 = add i8 %37, -65
%39 = icmp ult i8 %38, 26
%40 = add i8 %35, -48
%41 = icmp ult i8 %40, 10
%42 = select i1 %39, i1 true, i1 %41
br i1 %42, label %63, label %43
43: ; preds = %34
switch i8 %35, label %70 [
i8 45, label %63
i8 46, label %63
i8 95, label %63
i8 126, label %63
i8 37, label %44
i8 33, label %63
i8 36, label %63
i8 38, label %63
i8 40, label %63
i8 41, label %63
i8 42, label %63
i8 43, label %63
i8 44, label %63
i8 59, label %63
i8 61, label %63
i8 39, label %63
i8 58, label %63
i8 64, label %63
]
44: ; preds = %43
%45 = getelementptr inbounds i8, i8* %36, i64 1
%46 = load i8, i8* %45
%47 = freeze i8 %46
%48 = add i8 %47, -48
%49 = icmp ult i8 %48, 10
br i1 %49, label %51, label %50
50: ; preds = %44
switch i8 %47, label %70 [
i8 102, label %51
i8 101, label %51
i8 100, label %51
i8 99, label %51
i8 98, label %51
i8 97, label %51
i8 70, label %51
i8 69, label %51
i8 68, label %51
i8 67, label %51
i8 66, label %51
i8 65, label %51
]
51: ; preds = %50, %50, %50, %50, %50, %50, %50, %50, %50, %50, %50, %50, %44
%52 = getelementptr inbounds i8, i8* %36, i64 2
%53 = load i8, i8* %52
%54 = add i8 %53, -48
%55 = icmp ult i8 %54, 10
%56 = add i8 %53, -97
%57 = icmp ult i8 %56, 6
%58 = or i1 %55, %57
br i1 %58, label %63, label %59
59: ; preds = %51
%60 = add i8 %53, -71
%61 = icmp ult i8 %60, -6
%62 = or i1 %61, %33
br i1 %62, label %70, label %65
63: ; preds = %43, %43, %43, %43, %43, %43, %43, %43, %43, %43, %43, %43, %43, %43, %43, %43, %43, %51, %34
%64 = icmp eq i8 %35, %1
br i1 %64, label %70, label %65
65: ; preds = %59, %63
%66 = icmp eq i8 %35, 37
%67 = select i1 %66, i64 3, i64 1
%68 = getelementptr inbounds i8, i8* %36, i64 %67
%69 = load i8, i8* %68
br label %34
70: ; preds = %50, %43, %59, %63
store i8* %36, i8** %0
br label %71
71: ; preds = %29, %3, %70
%72 = phi i32 [ 0, %70 ], [ -1, %3 ], [ %31, %29 ]
ret i32 %72
}