#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 */
scalar_t__ memcmp(unsigned char *, char *, int);
unsigned char *memstr(unsigned char const *, size_t const, unsigned char *,
                      int);
int /*<<< orphan*/ strchr(char *, int);
unsigned char *find_http_req(const unsigned char *data, const size_t len,
                             unsigned char **http, size_t *httplen) {
  unsigned char *req, *le, *blankline, *hosthdr;
  if (len < 40)
    return (unsigned char *)data;
  if (!(req = memstr(data, len, (unsigned char *)"GET ", 4)))
    if (!(req = memstr(data, len, (unsigned char *)"POST ", 5)))
      return (unsigned char *)(data + len - 4);
  if (!(le = memstr(req + 4, (len - (data - (req + 4))),
                    (unsigned char *)"\r\n", 2))) {
    if ((len - (data - (req + 4))) > 16384)
      return (unsigned char *)(req + 4);
    else
      return (unsigned char *)req;
  }
  if (le < req + 5)
    return le + 2;
  if (memcmp(le - 9, " HTTP/1.", 8) || !strchr("01", (int)*(le - 1)))
    return le + 2;
  if (!(blankline = memstr(le + 2, (len - (data - (le + 2))),
                           (unsigned char *)"\r\n\r\n", 4))) {
    if ((len - (data - (le + 2))) > 16384)
      return (unsigned char *)(data + len - 4);
    else
      return req;
  }
  if (memcmp(req + 4, "http://", 7) == 0 && memcmp(req + 5, "http://", 7) == 0)
    goto found;
  if (!(hosthdr =
            memstr(le, blankline - le + 2, (unsigned char *)"\r\nHost: ", 8))) {
    return blankline + 4;
  }
found:
  *http = req;
  *httplen = blankline - req;
  return blankline + 4;
}


x86 assembly (clang, -O0):
<find_http_req>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    %rcx,-0x28(%rbp)
cmpq   $0x28,-0x18(%rbp)
jae    1160 <find_http_req+0x30>
mov    -0x10(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    13f9 <find_http_req+0x2c9>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
lea    0xe91(%rip),%rdx
mov    $0x4,%ecx
call   1040 <memstr@plt>
mov    %rax,-0x30(%rbp)
cmp    $0x0,%rax
jne    11c8 <find_http_req+0x98>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
lea    0xe6f(%rip),%rdx
mov    $0x5,%ecx
call   1040 <memstr@plt>
mov    %rax,-0x30(%rbp)
cmp    $0x0,%rax
jne    11c3 <find_http_req+0x93>
mov    -0x10(%rbp),%rax
add    -0x18(%rbp),%rax
add    $0xfffffffffffffffc,%rax
mov    %rax,-0x8(%rbp)
jmp    13f9 <find_http_req+0x2c9>
jmp    11c8 <find_http_req+0x98>
mov    -0x30(%rbp),%rdi
add    $0x4,%rdi
mov    -0x18(%rbp),%rsi
mov    -0x10(%rbp),%rax
mov    -0x30(%rbp),%rcx
add    $0x4,%rcx
sub    %rcx,%rax
sub    %rax,%rsi
lea    0xe2c(%rip),%rdx
mov    $0x2,%ecx
call   1040 <memstr@plt>
mov    %rax,-0x38(%rbp)
cmp    $0x0,%rax
jne    1245 <find_http_req+0x115>
mov    -0x18(%rbp),%rax
mov    -0x10(%rbp),%rcx
mov    -0x30(%rbp),%rdx
add    $0x4,%rdx
sub    %rdx,%rcx
sub    %rcx,%rax
cmp    $0x4000,%rax
jbe    1238 <find_http_req+0x108>
mov    -0x30(%rbp),%rax
add    $0x4,%rax
mov    %rax,-0x8(%rbp)
jmp    13f9 <find_http_req+0x2c9>
mov    -0x30(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    13f9 <find_http_req+0x2c9>
mov    -0x38(%rbp),%rax
mov    -0x30(%rbp),%rcx
add    $0x5,%rcx
cmp    %rcx,%rax
jae    126b <find_http_req+0x13b>
mov    -0x38(%rbp),%rax
add    $0x2,%rax
mov    %rax,-0x8(%rbp)
jmp    13f9 <find_http_req+0x2c9>
mov    -0x38(%rbp),%rdi
add    $0xfffffffffffffff7,%rdi
lea    0xd91(%rip),%rsi
mov    $0x8,%edx
call   1050 <memcmp@plt>
cmp    $0x0,%rax
jne    12ab <find_http_req+0x17b>
mov    -0x38(%rbp),%rax
movzbl -0x1(%rax),%esi
lea    0xd77(%rip),%rdi
call   1030 <strchr@plt>
cmp    $0x0,%eax
jne    12bc <find_http_req+0x18c>
mov    -0x38(%rbp),%rax
add    $0x2,%rax
mov    %rax,-0x8(%rbp)
jmp    13f9 <find_http_req+0x2c9>
mov    -0x38(%rbp),%rdi
add    $0x2,%rdi
mov    -0x18(%rbp),%rsi
mov    -0x10(%rbp),%rax
mov    -0x38(%rbp),%rcx
add    $0x2,%rcx
sub    %rcx,%rax
sub    %rax,%rsi
lea    0xd36(%rip),%rdx
mov    $0x4,%ecx
call   1040 <memstr@plt>
mov    %rax,-0x40(%rbp)
cmp    $0x0,%rax
jne    133d <find_http_req+0x20d>
mov    -0x18(%rbp),%rax
mov    -0x10(%rbp),%rcx
mov    -0x38(%rbp),%rdx
add    $0x2,%rdx
sub    %rdx,%rcx
sub    %rcx,%rax
cmp    $0x4000,%rax
jbe    1330 <find_http_req+0x200>
mov    -0x10(%rbp),%rax
add    -0x18(%rbp),%rax
add    $0xfffffffffffffffc,%rax
mov    %rax,-0x8(%rbp)
jmp    13f9 <find_http_req+0x2c9>
mov    -0x30(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    13f9 <find_http_req+0x2c9>
mov    -0x30(%rbp),%rdi
add    $0x4,%rdi
lea    0xcd0(%rip),%rsi
mov    $0x7,%edx
call   1050 <memcmp@plt>
cmp    $0x0,%rax
jne    1388 <find_http_req+0x258>
mov    -0x30(%rbp),%rdi
add    $0x5,%rdi
lea    0xcad(%rip),%rsi
mov    $0x7,%edx
call   1050 <memcmp@plt>
cmp    $0x0,%rax
jne    1388 <find_http_req+0x258>
jmp    13d0 <find_http_req+0x2a0>
mov    -0x38(%rbp),%rdi
mov    -0x40(%rbp),%rsi
mov    -0x38(%rbp),%rax
sub    %rax,%rsi
add    $0x2,%rsi
lea    0xc82(%rip),%rdx
mov    $0x8,%ecx
call   1040 <memstr@plt>
mov    %rax,-0x48(%rbp)
cmp    $0x0,%rax
jne    13cb <find_http_req+0x29b>
mov    -0x40(%rbp),%rax
add    $0x4,%rax
mov    %rax,-0x8(%rbp)
jmp    13f9 <find_http_req+0x2c9>
jmp    13d0 <find_http_req+0x2a0>
mov    -0x30(%rbp),%rcx
mov    -0x20(%rbp),%rax
mov    %rcx,(%rax)
mov    -0x40(%rbp),%rcx
mov    -0x30(%rbp),%rax
sub    %rax,%rcx
mov    -0x28(%rbp),%rax
mov    %rcx,(%rax)
mov    -0x40(%rbp),%rax
add    $0x4,%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<find_http_req>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x28,%rsp
mov    %rdi,%r12
cmp    $0x28,%rsi
jae    114f <find_http_req+0x1f>
mov    %r12,%r13
jmp    12e1 <find_http_req+0x1b1>
mov    %rcx,%r14
mov    %rdx,%rbp
mov    %rsi,%rbx
lea    0xea1(%rip),%rdx
mov    %r12,%rdi
mov    $0x4,%ecx
call   1040 <memstr@plt>
mov    %rax,%r13
test   %rax,%rax
jne    1197 <find_http_req+0x67>
lea    0xe8a(%rip),%rdx
mov    %r12,%rdi
mov    %rbx,%rsi
mov    $0x5,%ecx
call   1040 <memstr@plt>
mov    %rax,%r13
test   %rax,%rax
je     12b5 <find_http_req+0x185>
mov    %rbp,0x18(%rsp)
mov    %r14,0x20(%rsp)
lea    0x4(%r13),%r14
mov    %r14,%rbp
sub    %r12,%rbp
add    %rbx,%rbp
lea    0xe64(%rip),%rdx
mov    %r14,%rdi
mov    %rbp,%rsi
mov    $0x2,%ecx
call   1040 <memstr@plt>
test   %rax,%rax
je     11fc <find_http_req+0xcc>
mov    %rax,%r15
lea    0x5(%r13),%rbp
cmp    %rbp,%rax
jb     11f0 <find_http_req+0xc0>
lea    -0x9(%r15),%rdi
lea    0xe2a(%rip),%rsi
mov    $0x8,%edx
call   1050 <memcmp@plt>
test   %rax,%rax
je     120c <find_http_req+0xdc>
add    $0x2,%r15
mov    %r15,%r13
jmp    12e1 <find_http_req+0x1b1>
cmp    $0x4001,%rbp
cmovae %r14,%r13
jmp    12e1 <find_http_req+0x1b1>
movzbl -0x1(%r15),%esi
lea    0xdfc(%rip),%rdi
call   1030 <strchr@plt>
test   %eax,%eax
je     11f0 <find_http_req+0xc0>
lea    0x2(%r15),%rdi
mov    %rdi,%rsi
sub    %r12,%rsi
add    %rbx,%rsi
lea    0xde2(%rip),%rdx
mov    %rsi,0x10(%rsp)
mov    $0x4,%ecx
call   1040 <memstr@plt>
mov    %rax,0x8(%rsp)
test   %rax,%rax
je     12aa <find_http_req+0x17a>
lea    0xdc7(%rip),%rsi
mov    %r14,%rdi
mov    $0x7,%edx
call   1050 <memcmp@plt>
test   %rax,%rax
jne    1280 <find_http_req+0x150>
lea    0xdae(%rip),%rsi
mov    %rbp,%rdi
mov    $0x7,%edx
call   1050 <memcmp@plt>
test   %rax,%rax
je     12bf <find_http_req+0x18f>
mov    0x8(%rsp),%rbx
mov    %rbx,%rsi
sub    %r15,%rsi
add    $0x2,%rsi
lea    0xd8e(%rip),%rdx
mov    %r15,%rdi
mov    $0x8,%ecx
call   1040 <memstr@plt>
test   %rax,%rax
jne    12c4 <find_http_req+0x194>
jmp    12da <find_http_req+0x1aa>
cmpq   $0x4001,0x10(%rsp)
jb     12e1 <find_http_req+0x1b1>
lea    (%r12,%rbx,1),%r13
add    $0xfffffffffffffffc,%r13
jmp    12e1 <find_http_req+0x1b1>
mov    0x8(%rsp),%rbx
mov    0x18(%rsp),%rax
mov    %r13,(%rax)
mov    %rbx,%rax
sub    %r13,%rax
mov    0x20(%rsp),%rcx
mov    %rax,(%rcx)
add    $0x4,%rbx
mov    %rbx,%r13
mov    %r13,%rax
add    $0x28,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [5 x i8] c"GET \00"
@.str.1 = [6 x i8] c"POST \00"
@.str.2 = [3 x i8] c"\0D\0A\00"
@.str.3 = [9 x i8] c" HTTP/1.\00"
@.str.4 = [3 x i8] c"01\00"
@.str.5 = [5 x i8] c"\0D\0A\0D\0A\00"
@.str.6 = [8 x i8] c"http://\00"
@.str.7 = [9 x i8] c"\0D\0AHost: \00"
define i8* @find_http_req(i8* %0, i64 %1, i8** %2, i64* %3) {
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i64
%8 = alloca i8**
%9 = alloca i64*
%10 = alloca i8*
%11 = alloca i8*
%12 = alloca i8*
%13 = alloca i8*
store i8* %0, i8** %6
store i64 %1, i64* %7
store i8** %2, i8*** %8
store i64* %3, i64** %9
%14 = load i64, i64* %7
%15 = icmp ult i64 %14, 40
br i1 %15, label %16, label %18
16: ; preds = %4
%17 = load i8*, i8** %6
store i8* %17, i8** %5
br label %151
18: ; preds = %4
%19 = load i8*, i8** %6
%20 = load i64, i64* %7
%21 = call i8* @memstr(i8* %19, i64 %20, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 4)
store i8* %21, i8** %10
%22 = icmp ne i8* %21, null
br i1 %22, label %34, label %23
23: ; preds = %18
%24 = load i8*, i8** %6
%25 = load i64, i64* %7
%26 = call i8* @memstr(i8* %24, i64 %25, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32 5)
store i8* %26, i8** %10
%27 = icmp ne i8* %26, null
br i1 %27, label %33, label %28
28: ; preds = %23
%29 = load i8*, i8** %6
%30 = load i64, i64* %7
%31 = getelementptr inbounds i8, i8* %29, i64 %30
%32 = getelementptr inbounds i8, i8* %31, i64 -4
store i8* %32, i8** %5
br label %151
33: ; preds = %23
br label %34
34: ; preds = %33, %18
%35 = load i8*, i8** %10
%36 = getelementptr inbounds i8, i8* %35, i64 4
%37 = load i64, i64* %7
%38 = load i8*, i8** %6
%39 = load i8*, i8** %10
%40 = getelementptr inbounds i8, i8* %39, i64 4
%41 = ptrtoint i8* %38 to i64
%42 = ptrtoint i8* %40 to i64
%43 = sub i64 %41, %42
%44 = sub i64 %37, %43
%45 = call i8* @memstr(i8* %36, i64 %44, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i32 2)
store i8* %45, i8** %11
%46 = icmp ne i8* %45, null
br i1 %46, label %62, label %47
47: ; preds = %34
%48 = load i64, i64* %7
%49 = load i8*, i8** %6
%50 = load i8*, i8** %10
%51 = getelementptr inbounds i8, i8* %50, i64 4
%52 = ptrtoint i8* %49 to i64
%53 = ptrtoint i8* %51 to i64
%54 = sub i64 %52, %53
%55 = sub i64 %48, %54
%56 = icmp ugt i64 %55, 16384
br i1 %56, label %57, label %60
57: ; preds = %47
%58 = load i8*, i8** %10
%59 = getelementptr inbounds i8, i8* %58, i64 4
store i8* %59, i8** %5
br label %151
60: ; preds = %47
%61 = load i8*, i8** %10
store i8* %61, i8** %5
br label %151
62: ; preds = %34
%63 = load i8*, i8** %11
%64 = load i8*, i8** %10
%65 = getelementptr inbounds i8, i8* %64, i64 5
%66 = icmp ult i8* %63, %65
br i1 %66, label %67, label %70
67: ; preds = %62
%68 = load i8*, i8** %11
%69 = getelementptr inbounds i8, i8* %68, i64 2
store i8* %69, i8** %5
br label %151
70: ; preds = %62
%71 = load i8*, i8** %11
%72 = getelementptr inbounds i8, i8* %71, i64 -9
%73 = call i64 @memcmp(i8* %72, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.3, i64 0, i64 0), i32 8)
%74 = icmp ne i64 %73, 0
br i1 %74, label %82, label %75
75: ; preds = %70
%76 = load i8*, i8** %11
%77 = getelementptr inbounds i8, i8* %76, i64 -1
%78 = load i8, i8* %77
%79 = zext i8 %78 to i32
%80 = call i32 @strchr(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0), i32 %79)
%81 = icmp ne i32 %80, 0
br i1 %81, label %85, label %82
82: ; preds = %75, %70
%83 = load i8*, i8** %11
%84 = getelementptr inbounds i8, i8* %83, i64 2
store i8* %84, i8** %5
br label %151
85: ; preds = %75
%86 = load i8*, i8** %11
%87 = getelementptr inbounds i8, i8* %86, i64 2
%88 = load i64, i64* %7
%89 = load i8*, i8** %6
%90 = load i8*, i8** %11
%91 = getelementptr inbounds i8, i8* %90, i64 2
%92 = ptrtoint i8* %89 to i64
%93 = ptrtoint i8* %91 to i64
%94 = sub i64 %92, %93
%95 = sub i64 %88, %94
%96 = call i8* @memstr(i8* %87, i64 %95, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.5, i64 0, i64 0), i32 4)
store i8* %96, i8** %12
%97 = icmp ne i8* %96, null
br i1 %97, label %115, label %98
98: ; preds = %85
%99 = load i64, i64* %7
%100 = load i8*, i8** %6
%101 = load i8*, i8** %11
%102 = getelementptr inbounds i8, i8* %101, i64 2
%103 = ptrtoint i8* %100 to i64
%104 = ptrtoint i8* %102 to i64
%105 = sub i64 %103, %104
%106 = sub i64 %99, %105
%107 = icmp ugt i64 %106, 16384
br i1 %107, label %108, label %113
108: ; preds = %98
%109 = load i8*, i8** %6
%110 = load i64, i64* %7
%111 = getelementptr inbounds i8, i8* %109, i64 %110
%112 = getelementptr inbounds i8, i8* %111, i64 -4
store i8* %112, i8** %5
br label %151
113: ; preds = %98
%114 = load i8*, i8** %10
store i8* %114, i8** %5
br label %151
115: ; preds = %85
%116 = load i8*, i8** %10
%117 = getelementptr inbounds i8, i8* %116, i64 4
%118 = call i64 @memcmp(i8* %117, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.6, i64 0, i64 0), i32 7)
%119 = icmp eq i64 %118, 0
br i1 %119, label %120, label %126
120: ; preds = %115
%121 = load i8*, i8** %10
%122 = getelementptr inbounds i8, i8* %121, i64 5
%123 = call i64 @memcmp(i8* %122, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.6, i64 0, i64 0), i32 7)
%124 = icmp eq i64 %123, 0
br i1 %124, label %125, label %126
125: ; preds = %120
br label %140
126: ; preds = %120, %115
%127 = load i8*, i8** %11
%128 = load i8*, i8** %12
%129 = load i8*, i8** %11
%130 = ptrtoint i8* %128 to i64
%131 = ptrtoint i8* %129 to i64
%132 = sub i64 %130, %131
%133 = add nsw i64 %132, 2
%134 = call i8* @memstr(i8* %127, i64 %133, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.7, i64 0, i64 0), i32 8)
store i8* %134, i8** %13
%135 = icmp ne i8* %134, null
br i1 %135, label %139, label %136
136: ; preds = %126
%137 = load i8*, i8** %12
%138 = getelementptr inbounds i8, i8* %137, i64 4
store i8* %138, i8** %5
br label %151
139: ; preds = %126
br label %140
140: ; preds = %139, %125
%141 = load i8*, i8** %10
%142 = load i8**, i8*** %8
store i8* %141, i8** %142
%143 = load i8*, i8** %12
%144 = load i8*, i8** %10
%145 = ptrtoint i8* %143 to i64
%146 = ptrtoint i8* %144 to i64
%147 = sub i64 %145, %146
%148 = load i64*, i64** %9
store i64 %147, i64* %148
%149 = load i8*, i8** %12
%150 = getelementptr inbounds i8, i8* %149, i64 4
store i8* %150, i8** %5
br label %151
151: ; preds = %140, %136, %113, %108, %82, %67, %60, %57, %28, %16
%152 = load i8*, i8** %5
ret i8* %152
}

LLVM IR (-O2):
@.str = [5 x i8] c"GET \00"
@.str.1 = [6 x i8] c"POST \00"
@.str.2 = [3 x i8] c"\0D\0A\00"
@.str.3 = [9 x i8] c" HTTP/1.\00"
@.str.4 = [3 x i8] c"01\00"
@.str.5 = [5 x i8] c"\0D\0A\0D\0A\00"
@.str.6 = [8 x i8] c"http://\00"
@.str.7 = [9 x i8] c"\0D\0AHost: \00"
define i8* @find_http_req(i8* %0, i64 %1, i8** nocapture writeonly %2, i64* nocapture writeonly %3) {
%5 = icmp ult i64 %1, 40
br i1 %5, label %78, label %6
6: ; preds = %4
%7 = tail call i8* @memstr(i8* %0, i64 %1, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 4)
%8 = icmp eq i8* %7, null
br i1 %8, label %9, label %15
9: ; preds = %6
%10 = tail call i8* @memstr(i8* %0, i64 %1, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32 5)
%11 = icmp eq i8* %10, null
br i1 %11, label %12, label %15
12: ; preds = %9
%13 = getelementptr inbounds i8, i8* %0, i64 %1
%14 = getelementptr inbounds i8, i8* %13, i64 -4
br label %78
15: ; preds = %9, %6
%16 = phi i8* [ %7, %6 ], [ %10, %9 ]
%17 = getelementptr inbounds i8, i8* %16, i64 4
%18 = ptrtoint i8* %0 to i64
%19 = ptrtoint i8* %17 to i64
%20 = sub i64 %19, %18
%21 = add i64 %20, %1
%22 = tail call i8* @memstr(i8* %17, i64 %21, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i32 2)
%23 = icmp eq i8* %22, null
br i1 %23, label %24, label %27
24: ; preds = %15
%25 = icmp ugt i64 %21, 16384
%26 = select i1 %25, i8* %17, i8* %16
br label %78
27: ; preds = %15
%28 = getelementptr inbounds i8, i8* %16, i64 5
%29 = icmp ult i8* %22, %28
br i1 %29, label %30, label %32
30: ; preds = %27
%31 = getelementptr inbounds i8, i8* %22, i64 2
br label %78
32: ; preds = %27
%33 = getelementptr inbounds i8, i8* %22, i64 -9
%34 = tail call i64 @memcmp(i8* %33, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.3, i64 0, i64 0), i32 8)
%35 = icmp eq i64 %34, 0
br i1 %35, label %36, label %42
36: ; preds = %32
%37 = getelementptr inbounds i8, i8* %22, i64 -1
%38 = load i8, i8* %37
%39 = zext i8 %38 to i32
%40 = tail call i32 @strchr(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0), i32 %39)
%41 = icmp eq i32 %40, 0
br i1 %41, label %42, label %44
42: ; preds = %36, %32
%43 = getelementptr inbounds i8, i8* %22, i64 2
br label %78
44: ; preds = %36
%45 = getelementptr inbounds i8, i8* %22, i64 2
%46 = ptrtoint i8* %45 to i64
%47 = sub i64 %46, %18
%48 = add i64 %47, %1
%49 = tail call i8* @memstr(i8* %45, i64 %48, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.5, i64 0, i64 0), i32 4)
%50 = icmp eq i8* %49, null
br i1 %50, label %51, label %56
51: ; preds = %44
%52 = icmp ugt i64 %48, 16384
br i1 %52, label %53, label %78
53: ; preds = %51
%54 = getelementptr inbounds i8, i8* %0, i64 %1
%55 = getelementptr inbounds i8, i8* %54, i64 -4
br label %78
56: ; preds = %44
%57 = tail call i64 @memcmp(i8* %17, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.6, i64 0, i64 0), i32 7)
%58 = icmp eq i64 %57, 0
br i1 %58, label %59, label %64
59: ; preds = %56
%60 = tail call i64 @memcmp(i8* %28, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.6, i64 0, i64 0), i32 7)
%61 = icmp eq i64 %60, 0
br i1 %61, label %62, label %64
62: ; preds = %59
%63 = ptrtoint i8* %49 to i64
br label %73
64: ; preds = %59, %56
%65 = ptrtoint i8* %49 to i64
%66 = ptrtoint i8* %22 to i64
%67 = sub i64 2, %66
%68 = add i64 %67, %65
%69 = tail call i8* @memstr(i8* %22, i64 %68, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.7, i64 0, i64 0), i32 8)
%70 = icmp eq i8* %69, null
br i1 %70, label %71, label %73
71: ; preds = %64
%72 = getelementptr inbounds i8, i8* %49, i64 4
br label %78
73: ; preds = %62, %64
%74 = phi i64 [ %63, %62 ], [ %65, %64 ]
store i8* %16, i8** %2
%75 = ptrtoint i8* %16 to i64
%76 = sub i64 %74, %75
store i64 %76, i64* %3
%77 = getelementptr inbounds i8, i8* %49, i64 4
br label %78
78: ; preds = %51, %24, %4, %73, %71, %53, %42, %30, %12
%79 = phi i8* [ %31, %30 ], [ %43, %42 ], [ %77, %73 ], [ %72, %71 ], [ %55, %53 ], [ %14, %12 ], [ %0, %4 ], [ %26, %24 ], [ %16, %51 ]
ret i8* %79
}