#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 */
typedef int /*<<< orphan*/ version;

/* Variables and functions */
int /*<<< orphan*/ error(int);
char *strchr(char const *, char);
scalar_t__ strcmp(char *, char *);
int /*<<< orphan*/ strcpy(char *, char *);
scalar_t__ strncmp(char *, char *, int);
int /*<<< orphan*/ strncpy(char *, char const *, int);
char *strrchr(char const *, char);
char *strstr(char const *, char *);
bool parse(const char *line, char *abs_path, char *query) {
  char *firstSpace = strchr(line, ' ');
  if (firstSpace == NULL) {
    error(400);
    return false;
  }
  int methodSize = (int)(firstSpace - line);
  char method[methodSize + 1];
  strncpy(method, line, methodSize);
  method[methodSize] = '\0';
  if (strcmp(method, "GET")) {
    error(405);
    return false;
  }
  char *secondSpace = strrchr(line, ' ');
  int requestSize = (int)(secondSpace - firstSpace - 1);
  char request[requestSize + 1];
  strncpy(request, firstSpace + 1, requestSize);
  request[requestSize] = '\0';
  if (strncmp(request, "/", 1) != 0) {
    error(501);
    return false;
  }
  if (strchr(request, '"') != NULL) {
    error(400);
    return false;
  }
  const char *clrf = strstr(line, "\r\n");
  if (clrf == NULL) {
    error(400);
    return false;
  }
  char version[clrf - secondSpace + 2 + 1];
  strncpy(version, secondSpace + 1, clrf - secondSpace + 2);
  version[sizeof(version) - 1] = '\0';
  if (strcmp(version, "HTTP/1.1\r\n") != 0) {
    error(505);
    return false;
  }
  if (strchr(request, '?') != NULL) {
    char *queryBegins = strchr(line, '?');
    strncpy(abs_path, firstSpace + 1, queryBegins - firstSpace - 1);
    abs_path[queryBegins - firstSpace - 1] = '\0';
    strncpy(query, queryBegins + 1, secondSpace - queryBegins);
    query[secondSpace - queryBegins] = '\0';
  } else {
    query = NULL;
    strcpy(abs_path, request);
  }
  return true;
}


x86 assembly (clang, -O0):
<parse>:
push   %rbp
mov    %rsp,%rbp
sub    $0xa0,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    -0x10(%rbp),%rdi
mov    $0x20,%esi
call   1060 <strchr@plt>
mov    %rax,-0x28(%rbp)
cmpq   $0x0,-0x28(%rbp)
jne    11ca <parse+0x4a>
mov    $0x190,%edi
call   1090 <error@plt>
movl   $0x0,-0x4(%rbp)
jmp    14bd <parse+0x33d>
mov    -0x28(%rbp),%eax
mov    -0x10(%rbp),%ecx
sub    %ecx,%eax
mov    %eax,-0x2c(%rbp)
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %rsp,%rcx
mov    %rcx,-0x38(%rbp)
mov    %rax,%rcx
add    $0xf,%rcx
and    $0xfffffffffffffff0,%rcx
mov    %rsp,%rdi
sub    %rcx,%rdi
mov    %rdi,-0x80(%rbp)
mov    %rdi,%rsp
mov    %rax,-0x40(%rbp)
mov    -0x10(%rbp),%rsi
mov    -0x2c(%rbp),%edx
call   1030 <strncpy@plt>
mov    -0x80(%rbp),%rdi
movslq -0x2c(%rbp),%rax
movb   $0x0,(%rdi,%rax,1)
lea    0xde3(%rip),%rsi
call   1080 <strcmp@plt>
cmp    $0x0,%rax
je     1249 <parse+0xc9>
mov    $0x195,%edi
call   1090 <error@plt>
movl   $0x0,-0x4(%rbp)
movl   $0x1,-0x44(%rbp)
jmp    14b6 <parse+0x336>
mov    -0x10(%rbp),%rdi
mov    $0x20,%esi
call   1070 <strrchr@plt>
mov    %rax,-0x50(%rbp)
mov    -0x50(%rbp),%ecx
mov    -0x28(%rbp),%eax
not    %eax
add    %ecx,%eax
mov    %eax,-0x54(%rbp)
mov    -0x54(%rbp),%eax
add    $0x1,%eax
mov    %rax,%rcx
add    $0xf,%rcx
and    $0xfffffffffffffff0,%rcx
mov    %rsp,%rdi
sub    %rcx,%rdi
mov    %rdi,-0x88(%rbp)
mov    %rdi,%rsp
mov    %rax,-0x60(%rbp)
mov    -0x28(%rbp),%rsi
add    $0x1,%rsi
mov    -0x54(%rbp),%edx
call   1030 <strncpy@plt>
mov    -0x88(%rbp),%rdi
movslq -0x54(%rbp),%rax
movb   $0x0,(%rdi,%rax,1)
lea    0xd51(%rip),%rsi
mov    $0x1,%edx
call   1040 <strncmp@plt>
cmp    $0x0,%rax
je     12e4 <parse+0x164>
mov    $0x1f5,%edi
call   1090 <error@plt>
movl   $0x0,-0x4(%rbp)
movl   $0x1,-0x44(%rbp)
jmp    14b6 <parse+0x336>
mov    -0x88(%rbp),%rdi
mov    $0x22,%esi
call   1060 <strchr@plt>
cmp    $0x0,%rax
je     131c <parse+0x19c>
mov    $0x190,%edi
call   1090 <error@plt>
movl   $0x0,-0x4(%rbp)
movl   $0x1,-0x44(%rbp)
jmp    14b6 <parse+0x336>
mov    -0x10(%rbp),%rdi
lea    0xce7(%rip),%rsi
call   10a0 <strstr@plt>
mov    %rax,-0x68(%rbp)
cmpq   $0x0,-0x68(%rbp)
jne    1358 <parse+0x1d8>
mov    $0x190,%edi
call   1090 <error@plt>
movl   $0x0,-0x4(%rbp)
movl   $0x1,-0x44(%rbp)
jmp    14b6 <parse+0x336>
mov    -0x68(%rbp),%rcx
mov    -0x50(%rbp),%rax
sub    %rax,%rcx
mov    %rcx,%rax
add    $0x3,%rax
mov    %rax,-0x90(%rbp)
add    $0x12,%rcx
and    $0xfffffffffffffff0,%rcx
mov    %rsp,%rdi
sub    %rcx,%rdi
mov    %rdi,-0x98(%rbp)
mov    %rdi,%rsp
mov    %rax,-0x70(%rbp)
mov    -0x50(%rbp),%rsi
add    $0x1,%rsi
mov    -0x68(%rbp),%rax
mov    -0x50(%rbp),%rcx
sub    %rcx,%rax
add    $0x2,%rax
mov    %eax,%edx
call   1030 <strncpy@plt>
mov    -0x98(%rbp),%rdi
mov    -0x90(%rbp),%rax
sub    $0x1,%rax
movb   $0x0,(%rdi,%rax,1)
lea    0xc3e(%rip),%rsi
call   1080 <strcmp@plt>
cmp    $0x0,%rax
je     13f4 <parse+0x274>
mov    $0x1f9,%edi
call   1090 <error@plt>
movl   $0x0,-0x4(%rbp)
movl   $0x1,-0x44(%rbp)
jmp    14b6 <parse+0x336>
mov    -0x88(%rbp),%rdi
mov    $0x3f,%esi
call   1060 <strchr@plt>
cmp    $0x0,%rax
je     1490 <parse+0x310>
mov    -0x10(%rbp),%rdi
mov    $0x3f,%esi
call   1060 <strchr@plt>
mov    %rax,-0x78(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x28(%rbp),%rsi
add    $0x1,%rsi
mov    -0x78(%rbp),%rax
mov    -0x28(%rbp),%rcx
sub    %rcx,%rax
sub    $0x1,%rax
mov    %eax,%edx
call   1030 <strncpy@plt>
mov    -0x18(%rbp),%rax
mov    -0x78(%rbp),%rcx
mov    -0x28(%rbp),%rdx
sub    %rdx,%rcx
sub    $0x1,%rcx
movb   $0x0,(%rax,%rcx,1)
mov    -0x20(%rbp),%rdi
mov    -0x78(%rbp),%rsi
add    $0x1,%rsi
mov    -0x50(%rbp),%rax
mov    -0x78(%rbp),%rcx
sub    %rcx,%rax
mov    %eax,%edx
call   1030 <strncpy@plt>
mov    -0x20(%rbp),%rax
mov    -0x50(%rbp),%rcx
mov    -0x78(%rbp),%rdx
sub    %rdx,%rcx
movb   $0x0,(%rax,%rcx,1)
jmp    14a8 <parse+0x328>
mov    -0x88(%rbp),%rsi
movq   $0x0,-0x20(%rbp)
mov    -0x18(%rbp),%rdi
call   1050 <strcpy@plt>
movl   $0x1,-0x4(%rbp)
movl   $0x1,-0x44(%rbp)
mov    -0x38(%rbp),%rax
mov    %rax,%rsp
mov    -0x4(%rbp),%eax
mov    %rbp,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<parse>:
push   %rbp
mov    %rsp,%rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x28,%rsp
mov    %rdx,%r15
mov    %rsi,%rbx
mov    %rdi,%r12
mov    $0x20,%esi
call   1060 <strchr@plt>
test   %rax,%rax
je     120c <parse+0x8c>
mov    %rax,%r14
mov    %rbx,-0x40(%rbp)
mov    %r15,-0x50(%rbp)
mov    %rsp,%r15
mov    %rax,%r13
sub    %r12,%r13
lea    0x1(%r13),%eax
add    $0xf,%rax
and    $0xfffffffffffffff0,%rax
mov    %rsp,%rbx
sub    %rax,%rbx
mov    %rbx,%rsp
mov    %rbx,%rdi
mov    %r12,%rsi
mov    %r13d,%edx
call   1030 <strncpy@plt>
movslq %r13d,%rax
movb   $0x0,(%rax,%rbx,1)
lea    0xe12(%rip),%rsi
mov    %rbx,%rdi
call   1080 <strcmp@plt>
test   %rax,%rax
je     121d <parse+0x9d>
mov    $0x195,%edi
call   1090 <error@plt>
xor    %eax,%eax
jmp    12b0 <parse+0x130>
mov    $0x190,%edi
call   1090 <error@plt>
xor    %eax,%eax
jmp    12b3 <parse+0x133>
mov    %r15,-0x30(%rbp)
mov    %r12,%rdi
mov    $0x20,%esi
call   1070 <strrchr@plt>
mov    %r14,%rbx
not    %rbx
lea    (%rax,%rbx,1),%r15
mov    %rax,-0x38(%rbp)
sub    %r14d,%eax
add    $0xf,%rax
and    $0xfffffffffffffff0,%rax
mov    %rsp,%r13
sub    %rax,%r13
mov    %r13,%rsp
add    $0x1,%r14
mov    %r13,%rdi
mov    %r14,%rsi
mov    %r15d,%edx
call   1030 <strncpy@plt>
movslq %r15d,%rax
movb   $0x0,(%rax,%r13,1)
lea    0xd93(%rip),%rsi
mov    %r13,%rdi
mov    $0x1,%edx
call   1040 <strncmp@plt>
test   %rax,%rax
je     128a <parse+0x10a>
mov    $0x1f5,%edi
jmp    12a5 <parse+0x125>
mov    %rbx,-0x48(%rbp)
mov    %r13,%rdi
mov    $0x22,%esi
call   1060 <strchr@plt>
test   %rax,%rax
je     12c2 <parse+0x142>
mov    $0x190,%edi
call   1090 <error@plt>
xor    %eax,%eax
mov    -0x30(%rbp),%r15
mov    %r15,%rsp
lea    -0x28(%rbp),%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
lea    0xd45(%rip),%rsi
mov    %r12,%rdi
call   10a0 <strstr@plt>
test   %rax,%rax
je     12a0 <parse+0x120>
mov    -0x38(%rbp),%rcx
sub    %rcx,%rax
lea    0x2(%rax),%rdx
mov    %rax,%rbx
add    $0x12,%rax
and    $0xfffffffffffffff0,%rax
mov    %rsp,%r15
sub    %rax,%r15
mov    %r15,%rsp
lea    0x1(%rcx),%rsi
mov    %r15,%rdi
call   1030 <strncpy@plt>
movb   $0x0,0x2(%rbx,%r15,1)
lea    0xcf8(%rip),%rsi
mov    %r15,%rdi
call   1080 <strcmp@plt>
test   %rax,%rax
je     1322 <parse+0x1a2>
mov    $0x1f9,%edi
jmp    12a5 <parse+0x125>
mov    %r13,%rdi
mov    $0x3f,%esi
call   1060 <strchr@plt>
test   %rax,%rax
je     1385 <parse+0x205>
mov    %r12,%rdi
mov    $0x3f,%esi
call   1060 <strchr@plt>
mov    %rax,%r15
mov    -0x48(%rbp),%r13
add    %rax,%r13
mov    -0x40(%rbp),%r12
mov    %r12,%rdi
mov    %r14,%rsi
mov    %r13d,%edx
call   1030 <strncpy@plt>
movb   $0x0,(%r12,%r13,1)
mov    -0x38(%rbp),%rbx
sub    %r15,%rbx
add    $0x1,%r15
mov    -0x50(%rbp),%r14
mov    %r14,%rdi
mov    %r15,%rsi
mov    %ebx,%edx
call   1030 <strncpy@plt>
movb   $0x0,(%r14,%rbx,1)
jmp    1391 <parse+0x211>
mov    -0x40(%rbp),%rdi
mov    %r13,%rsi
call   1050 <strcpy@plt>
mov    $0x1,%eax
jmp    12ac <parse+0x12c>

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

LLVM IR (-O2):
@.str = [4 x i8] c"GET\00"
@.str.1 = [2 x i8] c"/\00"
@.str.2 = [3 x i8] c"\0D\0A\00"
@.str.3 = [11 x i8] c"HTTP/1.1\0D\0A\00"
define i32 @parse(i8* %0, i8* %1, i8* %2) {
%4 = tail call i8* @strchr(i8* dereferenceable(1) %0, i8 signext 32)
%5 = icmp eq i8* %4, null
br i1 %5, label %6, label %8
6: ; preds = %3
%7 = tail call i32 @error(i32 400)
br label %86
8: ; preds = %3
%9 = ptrtoint i8* %4 to i64
%10 = ptrtoint i8* %0 to i64
%11 = sub i64 %9, %10
%12 = trunc i64 %11 to i32
%13 = add i64 %11, 1
%14 = and i64 %13, 4294967295
%15 = tail call i8* @llvm.stacksave()
%16 = alloca i8, i64 %14
%17 = call i32 @strncpy(i8* %16, i8* %0, i32 %12)
%18 = shl i64 %11, 32
%19 = ashr exact i64 %18, 32
%20 = getelementptr inbounds i8, i8* %16, i64 %19
store i8 0, i8* %20
%21 = call i64 @strcmp(i8* %16, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%22 = icmp eq i64 %21, 0
br i1 %22, label %25, label %23
23: ; preds = %8
%24 = call i32 @error(i32 405)
br label %84
25: ; preds = %8
%26 = call i8* @strrchr(i8* dereferenceable(1) %0, i8 signext 32)
%27 = ptrtoint i8* %26 to i64
%28 = xor i64 %9, -1
%29 = add i64 %27, %28
%30 = trunc i64 %29 to i32
%31 = sub i64 %27, %9
%32 = and i64 %31, 4294967295
%33 = alloca i8, i64 %32
%34 = getelementptr inbounds i8, i8* %4, i64 1
%35 = call i32 @strncpy(i8* %33, i8* %34, i32 %30)
%36 = shl i64 %29, 32
%37 = ashr exact i64 %36, 32
%38 = getelementptr inbounds i8, i8* %33, i64 %37
store i8 0, i8* %38
%39 = call i64 @strncmp(i8* %33, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0), i32 1)
%40 = icmp eq i64 %39, 0
br i1 %40, label %43, label %41
41: ; preds = %25
%42 = call i32 @error(i32 501)
br label %84
43: ; preds = %25
%44 = call i8* @strchr(i8* %33, i8 signext 34)
%45 = icmp eq i8* %44, null
br i1 %45, label %48, label %46
46: ; preds = %43
%47 = call i32 @error(i32 400)
br label %84
48: ; preds = %43
%49 = call i8* @strstr(i8* dereferenceable(1) %0, i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0))
%50 = icmp eq i8* %49, null
br i1 %50, label %51, label %53
51: ; preds = %48
%52 = call i32 @error(i32 400)
br label %84
53: ; preds = %48
%54 = ptrtoint i8* %49 to i64
%55 = sub i64 %54, %27
%56 = add nsw i64 %55, 2
%57 = add nsw i64 %55, 3
%58 = alloca i8, i64 %57
%59 = getelementptr inbounds i8, i8* %26, i64 1
%60 = trunc i64 %56 to i32
%61 = call i32 @strncpy(i8* %58, i8* %59, i32 %60)
%62 = getelementptr inbounds i8, i8* %58, i64 %56
store i8 0, i8* %62
%63 = call i64 @strcmp(i8* %58, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.3, i64 0, i64 0))
%64 = icmp eq i64 %63, 0
br i1 %64, label %67, label %65
65: ; preds = %53
%66 = call i32 @error(i32 505)
br label %84
67: ; preds = %53
%68 = call i8* @strchr(i8* %33, i8 signext 63)
%69 = icmp eq i8* %68, null
br i1 %69, label %82, label %70
70: ; preds = %67
%71 = call i8* @strchr(i8* dereferenceable(1) %0, i8 signext 63)
%72 = ptrtoint i8* %71 to i64
%73 = add i64 %72, %28
%74 = trunc i64 %73 to i32
%75 = call i32 @strncpy(i8* %1, i8* %34, i32 %74)
%76 = getelementptr inbounds i8, i8* %1, i64 %73
store i8 0, i8* %76
%77 = getelementptr inbounds i8, i8* %71, i64 1
%78 = sub i64 %27, %72
%79 = trunc i64 %78 to i32
%80 = call i32 @strncpy(i8* %2, i8* %77, i32 %79)
%81 = getelementptr inbounds i8, i8* %2, i64 %78
store i8 0, i8* %81
br label %84
82: ; preds = %67
%83 = call i32 @strcpy(i8* %1, i8* %33)
br label %84
84: ; preds = %41, %46, %70, %82, %65, %51, %23
%85 = phi i32 [ 0, %23 ], [ 0, %41 ], [ 0, %46 ], [ 0, %51 ], [ 0, %65 ], [ 1, %82 ], [ 1, %70 ]
br label %86
86: ; preds = %84, %6
%87 = phi i32 [ 0, %6 ], [ %85, %84 ]
ret i32 %87
}