#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 /*<<< orphan*/ deleteOption(char *, char *, char *, char *);
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ getOption(char *, char *, char *, char *, char **, int *);
int /*<<< orphan*/ headOption(char *, char *, char *, char *);
int /*<<< orphan*/ notAnOption(char *);
int /*<<< orphan*/ notImplementedOption(char *, char *, char *);
scalar_t__ strcmp(char *, char *);
int defineRequest(char *stream, char *requestoption, char *connection,
                  char *contenttype, char *requestitem, char **body,
                  int *size) {
  if (strcmp(requestoption, "") == 0) {
    notAnOption(stream);
  } else if (strcmp(requestoption, "OPTIONS") == 0) {
    notImplementedOption(stream, connection, contenttype);
  } else if (strcmp(requestoption, "GET") == 0) {
    getOption(stream, connection, contenttype, requestitem, body, size);
    return 1;
  } else if (strcmp(requestoption, "HEAD") == 0) {
    headOption(stream, connection, contenttype, requestitem);
  } else if (strcmp(requestoption, "POST") == 0) {
    notImplementedOption(stream, connection, contenttype);
  } else if (strcmp(requestoption, "PUT") == 0) {
    notImplementedOption(stream, connection, contenttype);
  } else if (strcmp(requestoption, "DELETE") == 0) {
    deleteOption(stream, connection, contenttype, requestitem);
  } else if (strcmp(requestoption, "TRACE") == 0) {
    notImplementedOption(stream, connection, contenttype);
  } else if (strcmp(requestoption, "CONNECT") == 0) {
    notImplementedOption(stream, connection, contenttype);
  } else if (strcmp(requestoption, "END") == 0) {
    exit(0);
  } else {
    notAnOption(stream);
  }
  return 0;
}


x86 assembly (clang, -O0):
<defineRequest>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    0x10(%rbp),%rax
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    %rcx,-0x28(%rbp)
mov    %r8,-0x30(%rbp)
mov    %r9,-0x38(%rbp)
mov    -0x18(%rbp),%rdi
lea    0xe71(%rip),%rsi
call   1050 <strcmp@plt>
cmp    $0x0,%rax
jne    11bc <defineRequest+0x4c>
mov    -0x10(%rbp),%rdi
call   1060 <notAnOption@plt>
jmp    13ae <defineRequest+0x23e>
mov    -0x18(%rbp),%rdi
lea    0xe39(%rip),%rsi
call   1050 <strcmp@plt>
cmp    $0x0,%rax
jne    11ec <defineRequest+0x7c>
mov    -0x10(%rbp),%rdi
mov    -0x20(%rbp),%rsi
mov    -0x28(%rbp),%rdx
call   1080 <notImplementedOption@plt>
jmp    13a9 <defineRequest+0x239>
mov    -0x18(%rbp),%rdi
lea    0xe11(%rip),%rsi
call   1050 <strcmp@plt>
cmp    $0x0,%rax
jne    122f <defineRequest+0xbf>
mov    -0x10(%rbp),%rdi
mov    -0x20(%rbp),%rsi
mov    -0x28(%rbp),%rdx
mov    -0x30(%rbp),%rcx
mov    -0x38(%rbp),%r8
mov    0x10(%rbp),%r9
call   1040 <getOption@plt>
movl   $0x1,-0x4(%rbp)
jmp    13b5 <defineRequest+0x245>
mov    -0x18(%rbp),%rdi
lea    0xdd2(%rip),%rsi
call   1050 <strcmp@plt>
cmp    $0x0,%rax
jne    1263 <defineRequest+0xf3>
mov    -0x10(%rbp),%rdi
mov    -0x20(%rbp),%rsi
mov    -0x28(%rbp),%rdx
mov    -0x30(%rbp),%rcx
call   1070 <headOption@plt>
jmp    139f <defineRequest+0x22f>
mov    -0x18(%rbp),%rdi
lea    0xda3(%rip),%rsi
call   1050 <strcmp@plt>
cmp    $0x0,%rax
jne    1293 <defineRequest+0x123>
mov    -0x10(%rbp),%rdi
mov    -0x20(%rbp),%rsi
mov    -0x28(%rbp),%rdx
call   1080 <notImplementedOption@plt>
jmp    139a <defineRequest+0x22a>
mov    -0x18(%rbp),%rdi
lea    0xd78(%rip),%rsi
call   1050 <strcmp@plt>
cmp    $0x0,%rax
jne    12c3 <defineRequest+0x153>
mov    -0x10(%rbp),%rdi
mov    -0x20(%rbp),%rsi
mov    -0x28(%rbp),%rdx
call   1080 <notImplementedOption@plt>
jmp    1395 <defineRequest+0x225>
mov    -0x18(%rbp),%rdi
lea    0xd4c(%rip),%rsi
call   1050 <strcmp@plt>
cmp    $0x0,%rax
jne    12f7 <defineRequest+0x187>
mov    -0x10(%rbp),%rdi
mov    -0x20(%rbp),%rsi
mov    -0x28(%rbp),%rdx
mov    -0x30(%rbp),%rcx
call   1030 <deleteOption@plt>
jmp    1390 <defineRequest+0x220>
mov    -0x18(%rbp),%rdi
lea    0xd1f(%rip),%rsi
call   1050 <strcmp@plt>
cmp    $0x0,%rax
jne    1327 <defineRequest+0x1b7>
mov    -0x10(%rbp),%rdi
mov    -0x20(%rbp),%rsi
mov    -0x28(%rbp),%rdx
call   1080 <notImplementedOption@plt>
jmp    138b <defineRequest+0x21b>
mov    -0x18(%rbp),%rdi
lea    0xcf5(%rip),%rsi
call   1050 <strcmp@plt>
cmp    $0x0,%rax
jne    1357 <defineRequest+0x1e7>
mov    -0x10(%rbp),%rdi
mov    -0x20(%rbp),%rsi
mov    -0x28(%rbp),%rdx
call   1080 <notImplementedOption@plt>
jmp    1386 <defineRequest+0x216>
mov    -0x18(%rbp),%rdi
lea    0xccd(%rip),%rsi
call   1050 <strcmp@plt>
cmp    $0x0,%rax
jne    1378 <defineRequest+0x208>
xor    %edi,%edi
call   1090 <exit@plt>
mov    -0x10(%rbp),%rdi
call   1060 <notAnOption@plt>
jmp    1386 <defineRequest+0x216>
jmp    138b <defineRequest+0x21b>
jmp    1390 <defineRequest+0x220>
jmp    1395 <defineRequest+0x225>
jmp    139a <defineRequest+0x22a>
jmp    139f <defineRequest+0x22f>
jmp    13a4 <defineRequest+0x234>
jmp    13a9 <defineRequest+0x239>
jmp    13ae <defineRequest+0x23e>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<defineRequest>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
mov    %r9,%rbp
mov    %r8,%r13
mov    %rcx,%r14
mov    %rdx,%r15
mov    %rsi,%rbx
mov    %rdi,%r12
lea    0xe7c(%rip),%rsi
mov    %rbx,%rdi
call   1050 <strcmp@plt>
test   %rax,%rax
je     1269 <defineRequest+0xf9>
lea    0xe54(%rip),%rsi
mov    %rbx,%rdi
call   1050 <strcmp@plt>
test   %rax,%rax
je     1273 <defineRequest+0x103>
lea    0xe44(%rip),%rsi
mov    %rbx,%rdi
call   1050 <strcmp@plt>
test   %rax,%rax
je     1283 <defineRequest+0x113>
lea    0xe30(%rip),%rsi
mov    %rbx,%rdi
call   1050 <strcmp@plt>
test   %rax,%rax
je     12a3 <defineRequest+0x133>
lea    0xe1d(%rip),%rsi
mov    %rbx,%rdi
call   1050 <strcmp@plt>
test   %rax,%rax
je     1273 <defineRequest+0x103>
lea    0xe0e(%rip),%rsi
mov    %rbx,%rdi
call   1050 <strcmp@plt>
test   %rax,%rax
je     1273 <defineRequest+0x103>
lea    0xdfe(%rip),%rsi
mov    %rbx,%rdi
call   1050 <strcmp@plt>
test   %rax,%rax
je     12c5 <defineRequest+0x155>
lea    0xded(%rip),%rsi
mov    %rbx,%rdi
call   1050 <strcmp@plt>
test   %rax,%rax
je     1273 <defineRequest+0x103>
lea    0xddf(%rip),%rsi
mov    %rbx,%rdi
call   1050 <strcmp@plt>
test   %rax,%rax
je     1273 <defineRequest+0x103>
lea    0xdd3(%rip),%rsi
mov    %rbx,%rdi
call   1050 <strcmp@plt>
test   %rax,%rax
je     12d8 <defineRequest+0x168>
mov    %r12,%rdi
call   1060 <notAnOption@plt>
jmp    12b4 <defineRequest+0x144>
mov    %r12,%rdi
mov    %r15,%rsi
mov    %r14,%rdx
call   1080 <notImplementedOption@plt>
jmp    12b4 <defineRequest+0x144>
mov    0x40(%rsp),%r9
mov    %r12,%rdi
mov    %r15,%rsi
mov    %r14,%rdx
mov    %r13,%rcx
mov    %rbp,%r8
call   1040 <getOption@plt>
mov    $0x1,%eax
jmp    12b6 <defineRequest+0x146>
mov    %r12,%rdi
mov    %r15,%rsi
mov    %r14,%rdx
mov    %r13,%rcx
call   1070 <headOption@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
mov    %r12,%rdi
mov    %r15,%rsi
mov    %r14,%rdx
mov    %r13,%rcx
call   1030 <deleteOption@plt>
jmp    12b4 <defineRequest+0x144>
xor    %edi,%edi
call   1090 <exit@plt>

LLVM IR (-O0):
@.str = [1 x i8] zeroinitializer
@.str.1 = [8 x i8] c"OPTIONS\00"
@.str.2 = [4 x i8] c"GET\00"
@.str.3 = [5 x i8] c"HEAD\00"
@.str.4 = [5 x i8] c"POST\00"
@.str.5 = [4 x i8] c"PUT\00"
@.str.6 = [7 x i8] c"DELETE\00"
@.str.7 = [6 x i8] c"TRACE\00"
@.str.8 = [8 x i8] c"CONNECT\00"
@.str.9 = [4 x i8] c"END\00"
define i32 @defineRequest(i8* %0, i8* %1, i8* %2, i8* %3, i8* %4, i8** %5, i32* %6) {
%8 = alloca i32
%9 = alloca i8*
%10 = alloca i8*
%11 = alloca i8*
%12 = alloca i8*
%13 = alloca i8*
%14 = alloca i8**
%15 = alloca i32*
store i8* %0, i8** %9
store i8* %1, i8** %10
store i8* %2, i8** %11
store i8* %3, i8** %12
store i8* %4, i8** %13
store i8** %5, i8*** %14
store i32* %6, i32** %15
%16 = load i8*, i8** %10
%17 = call i64 @strcmp(i8* %16, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0))
%18 = icmp eq i64 %17, 0
br i1 %18, label %19, label %22
19: ; preds = %7
%20 = load i8*, i8** %9
%21 = call i32 @notAnOption(i8* %20)
br label %117
22: ; preds = %7
%23 = load i8*, i8** %10
%24 = call i64 @strcmp(i8* %23, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0))
%25 = icmp eq i64 %24, 0
br i1 %25, label %26, label %31
26: ; preds = %22
%27 = load i8*, i8** %9
%28 = load i8*, i8** %11
%29 = load i8*, i8** %12
%30 = call i32 @notImplementedOption(i8* %27, i8* %28, i8* %29)
br label %116
31: ; preds = %22
%32 = load i8*, i8** %10
%33 = call i64 @strcmp(i8* %32, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0))
%34 = icmp eq i64 %33, 0
br i1 %34, label %35, label %43
35: ; preds = %31
%36 = load i8*, i8** %9
%37 = load i8*, i8** %11
%38 = load i8*, i8** %12
%39 = load i8*, i8** %13
%40 = load i8**, i8*** %14
%41 = load i32*, i32** %15
%42 = call i32 @getOption(i8* %36, i8* %37, i8* %38, i8* %39, i8** %40, i32* %41)
store i32 1, i32* %8
br label %118
43: ; preds = %31
%44 = load i8*, i8** %10
%45 = call i64 @strcmp(i8* %44, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0))
%46 = icmp eq i64 %45, 0
br i1 %46, label %47, label %53
47: ; preds = %43
%48 = load i8*, i8** %9
%49 = load i8*, i8** %11
%50 = load i8*, i8** %12
%51 = load i8*, i8** %13
%52 = call i32 @headOption(i8* %48, i8* %49, i8* %50, i8* %51)
br label %114
53: ; preds = %43
%54 = load i8*, i8** %10
%55 = call i64 @strcmp(i8* %54, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0))
%56 = icmp eq i64 %55, 0
br i1 %56, label %57, label %62
57: ; preds = %53
%58 = load i8*, i8** %9
%59 = load i8*, i8** %11
%60 = load i8*, i8** %12
%61 = call i32 @notImplementedOption(i8* %58, i8* %59, i8* %60)
br label %113
62: ; preds = %53
%63 = load i8*, i8** %10
%64 = call i64 @strcmp(i8* %63, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.5, i64 0, i64 0))
%65 = icmp eq i64 %64, 0
br i1 %65, label %66, label %71
66: ; preds = %62
%67 = load i8*, i8** %9
%68 = load i8*, i8** %11
%69 = load i8*, i8** %12
%70 = call i32 @notImplementedOption(i8* %67, i8* %68, i8* %69)
br label %112
71: ; preds = %62
%72 = load i8*, i8** %10
%73 = call i64 @strcmp(i8* %72, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.6, i64 0, i64 0))
%74 = icmp eq i64 %73, 0
br i1 %74, label %75, label %81
75: ; preds = %71
%76 = load i8*, i8** %9
%77 = load i8*, i8** %11
%78 = load i8*, i8** %12
%79 = load i8*, i8** %13
%80 = call i32 @deleteOption(i8* %76, i8* %77, i8* %78, i8* %79)
br label %111
81: ; preds = %71
%82 = load i8*, i8** %10
%83 = call i64 @strcmp(i8* %82, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.7, i64 0, i64 0))
%84 = icmp eq i64 %83, 0
br i1 %84, label %85, label %90
85: ; preds = %81
%86 = load i8*, i8** %9
%87 = load i8*, i8** %11
%88 = load i8*, i8** %12
%89 = call i32 @notImplementedOption(i8* %86, i8* %87, i8* %88)
br label %110
90: ; preds = %81
%91 = load i8*, i8** %10
%92 = call i64 @strcmp(i8* %91, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.8, i64 0, i64 0))
%93 = icmp eq i64 %92, 0
br i1 %93, label %94, label %99
94: ; preds = %90
%95 = load i8*, i8** %9
%96 = load i8*, i8** %11
%97 = load i8*, i8** %12
%98 = call i32 @notImplementedOption(i8* %95, i8* %96, i8* %97)
br label %109
99: ; preds = %90
%100 = load i8*, i8** %10
%101 = call i64 @strcmp(i8* %100, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.9, i64 0, i64 0))
%102 = icmp eq i64 %101, 0
br i1 %102, label %103, label %105
103: ; preds = %99
%104 = call i32 @exit(i32 0)
unreachable
105: ; preds = %99
%106 = load i8*, i8** %9
%107 = call i32 @notAnOption(i8* %106)
br label %108
108: ; preds = %105
br label %109
109: ; preds = %108, %94
br label %110
110: ; preds = %109, %85
br label %111
111: ; preds = %110, %75
br label %112
112: ; preds = %111, %66
br label %113
113: ; preds = %112, %57
br label %114
114: ; preds = %113, %47
br label %115
115: ; preds = %114
br label %116
116: ; preds = %115, %26
br label %117
117: ; preds = %116, %19
store i32 0, i32* %8
br label %118
118: ; preds = %117, %35
%119 = load i32, i32* %8
ret i32 %119
}

LLVM IR (-O2):
@.str = [1 x i8] zeroinitializer
@.str.1 = [8 x i8] c"OPTIONS\00"
@.str.2 = [4 x i8] c"GET\00"
@.str.3 = [5 x i8] c"HEAD\00"
@.str.4 = [5 x i8] c"POST\00"
@.str.5 = [4 x i8] c"PUT\00"
@.str.6 = [7 x i8] c"DELETE\00"
@.str.7 = [6 x i8] c"TRACE\00"
@.str.8 = [8 x i8] c"CONNECT\00"
@.str.9 = [4 x i8] c"END\00"
define i32 @defineRequest(i8* %0, i8* %1, i8* %2, i8* %3, i8* %4, i8** %5, i32* %6) {
%8 = tail call i64 @strcmp(i8* %1, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0))
%9 = icmp eq i64 %8, 0
br i1 %9, label %10, label %12
10: ; preds = %7
%11 = tail call i32 @notAnOption(i8* %0)
br label %59
12: ; preds = %7
%13 = tail call i64 @strcmp(i8* %1, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0))
%14 = icmp eq i64 %13, 0
br i1 %14, label %15, label %17
15: ; preds = %12
%16 = tail call i32 @notImplementedOption(i8* %0, i8* %2, i8* %3)
br label %59
17: ; preds = %12
%18 = tail call i64 @strcmp(i8* %1, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0))
%19 = icmp eq i64 %18, 0
br i1 %19, label %20, label %22
20: ; preds = %17
%21 = tail call i32 @getOption(i8* %0, i8* %2, i8* %3, i8* %4, i8** %5, i32* %6)
br label %59
22: ; preds = %17
%23 = tail call i64 @strcmp(i8* %1, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0))
%24 = icmp eq i64 %23, 0
br i1 %24, label %25, label %27
25: ; preds = %22
%26 = tail call i32 @headOption(i8* %0, i8* %2, i8* %3, i8* %4)
br label %59
27: ; preds = %22
%28 = tail call i64 @strcmp(i8* %1, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0))
%29 = icmp eq i64 %28, 0
br i1 %29, label %30, label %32
30: ; preds = %27
%31 = tail call i32 @notImplementedOption(i8* %0, i8* %2, i8* %3)
br label %59
32: ; preds = %27
%33 = tail call i64 @strcmp(i8* %1, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.5, i64 0, i64 0))
%34 = icmp eq i64 %33, 0
br i1 %34, label %35, label %37
35: ; preds = %32
%36 = tail call i32 @notImplementedOption(i8* %0, i8* %2, i8* %3)
br label %59
37: ; preds = %32
%38 = tail call i64 @strcmp(i8* %1, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.6, i64 0, i64 0))
%39 = icmp eq i64 %38, 0
br i1 %39, label %40, label %42
40: ; preds = %37
%41 = tail call i32 @deleteOption(i8* %0, i8* %2, i8* %3, i8* %4)
br label %59
42: ; preds = %37
%43 = tail call i64 @strcmp(i8* %1, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.7, i64 0, i64 0))
%44 = icmp eq i64 %43, 0
br i1 %44, label %45, label %47
45: ; preds = %42
%46 = tail call i32 @notImplementedOption(i8* %0, i8* %2, i8* %3)
br label %59
47: ; preds = %42
%48 = tail call i64 @strcmp(i8* %1, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.8, i64 0, i64 0))
%49 = icmp eq i64 %48, 0
br i1 %49, label %50, label %52
50: ; preds = %47
%51 = tail call i32 @notImplementedOption(i8* %0, i8* %2, i8* %3)
br label %59
52: ; preds = %47
%53 = tail call i64 @strcmp(i8* %1, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.9, i64 0, i64 0))
%54 = icmp eq i64 %53, 0
br i1 %54, label %55, label %57
55: ; preds = %52
%56 = tail call i32 @exit(i32 0)
unreachable
57: ; preds = %52
%58 = tail call i32 @notAnOption(i8* %0)
br label %59
59: ; preds = %10, %30, %40, %50, %57, %45, %35, %25, %15, %20
%60 = phi i32 [ 1, %20 ], [ 0, %15 ], [ 0, %25 ], [ 0, %35 ], [ 0, %45 ], [ 0, %57 ], [ 0, %50 ], [ 0, %40 ], [ 0, %30 ], [ 0, %10 ]
ret i32 %60
}