#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*/ strcmp(char const *, char *);
int sc_for_req_header(const char *header_name, unsigned short *sc) {
  switch (header_name[0]) {
  case 'a':
    if ('c' == header_name[1] && 'c' == header_name[2] &&
        'e' == header_name[3] && 'p' == header_name[4] &&
        't' == header_name[5]) {
      if ('-' == header_name[6]) {
        if (!strcmp(header_name + 7, "charset")) {
          *sc = (unsigned short)0xA002;
        } else if (!strcmp(header_name + 7, "encoding")) {
          *sc = (unsigned short)0xA003;
        } else if (!strcmp(header_name + 7, "language")) {
          *sc = (unsigned short)0xA004;
        } else {
          return (0);
        }
      } else if ('\0' == header_name[6]) {
        *sc = (unsigned short)0xA001;
      } else {
        return (0);
      }
    } else if (!strcmp(header_name, "authorization")) {
      *sc = (unsigned short)0xA005;
    } else {
      return (0);
    }
    break;
  case 'c':
    if (!strcmp(header_name, "cookie")) {
      *sc = (unsigned short)0xA009;
    } else if (!strcmp(header_name, "connection")) {
      *sc = (unsigned short)0xA006;
    } else if (!strcmp(header_name, "content-type")) {
      *sc = (unsigned short)0xA007;
    } else if (!strcmp(header_name, "content-length")) {
      *sc = (unsigned short)0xA008;
    } else if (!strcmp(header_name, "cookie2")) {
      *sc = (unsigned short)0xA00A;
    } else {
      return (0);
    }
    break;
  case 'h':
    if (!strcmp(header_name, "host")) {
      *sc = (unsigned short)0xA00B;
    } else {
      return (0);
    }
    break;
  case 'p':
    if (!strcmp(header_name, "pragma")) {
      *sc = (unsigned short)0xA00C;
    } else {
      return (0);
    }
    break;
  case 'r':
    if (!strcmp(header_name, "referer")) {
      *sc = (unsigned short)0xA00D;
    } else {
      return (0);
    }
    break;
  case 'u':
    if (!strcmp(header_name, "user-agent")) {
      *sc = (unsigned short)0xA00E;
    } else {
      return (0);
    }
    break;
  default:
    return (0);
  }
  return (1);
}


x86 assembly (clang, -O0):
<sc_for_req_header>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
add    $0xffffff9f,%eax
mov    %eax,%ecx
mov    %rcx,-0x20(%rbp)
sub    $0x14,%eax
ja     14a2 <sc_for_req_header+0x392>
mov    -0x20(%rbp),%rax
lea    0xebc(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
mov    -0x10(%rbp),%rax
movsbl 0x1(%rax),%ecx
mov    $0x63,%eax
cmp    %ecx,%eax
jne    129d <sc_for_req_header+0x18d>
mov    -0x10(%rbp),%rax
movsbl 0x2(%rax),%ecx
mov    $0x63,%eax
cmp    %ecx,%eax
jne    129d <sc_for_req_header+0x18d>
mov    -0x10(%rbp),%rax
movsbl 0x3(%rax),%ecx
mov    $0x65,%eax
cmp    %ecx,%eax
jne    129d <sc_for_req_header+0x18d>
mov    -0x10(%rbp),%rax
movsbl 0x4(%rax),%ecx
mov    $0x70,%eax
cmp    %ecx,%eax
jne    129d <sc_for_req_header+0x18d>
mov    -0x10(%rbp),%rax
movsbl 0x5(%rax),%ecx
mov    $0x74,%eax
cmp    %ecx,%eax
jne    129d <sc_for_req_header+0x18d>
mov    -0x10(%rbp),%rax
movsbl 0x6(%rax),%ecx
mov    $0x2d,%eax
cmp    %ecx,%eax
jne    1267 <sc_for_req_header+0x157>
mov    -0x10(%rbp),%rdi
add    $0x7,%rdi
lea    0xe7a(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%eax
jne    11f6 <sc_for_req_header+0xe6>
mov    -0x18(%rbp),%rax
movw   $0xa002,(%rax)
jmp    1262 <sc_for_req_header+0x152>
mov    -0x10(%rbp),%rdi
add    $0x7,%rdi
lea    0xe57(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%eax
jne    1221 <sc_for_req_header+0x111>
mov    -0x18(%rbp),%rax
movw   $0xa003,(%rax)
jmp    125d <sc_for_req_header+0x14d>
mov    -0x10(%rbp),%rdi
add    $0x7,%rdi
lea    0xe35(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%eax
jne    124c <sc_for_req_header+0x13c>
mov    -0x18(%rbp),%rax
movw   $0xa004,(%rax)
jmp    1258 <sc_for_req_header+0x148>
movl   $0x0,-0x4(%rbp)
jmp    14b5 <sc_for_req_header+0x3a5>
jmp    125d <sc_for_req_header+0x14d>
jmp    1262 <sc_for_req_header+0x152>
jmp    1298 <sc_for_req_header+0x188>
mov    -0x10(%rbp),%rax
movsbl 0x6(%rax),%ecx
xor    %eax,%eax
cmp    %ecx,%eax
jne    1287 <sc_for_req_header+0x177>
mov    -0x18(%rbp),%rax
movw   $0xa001,(%rax)
jmp    1293 <sc_for_req_header+0x183>
movl   $0x0,-0x4(%rbp)
jmp    14b5 <sc_for_req_header+0x3a5>
jmp    1298 <sc_for_req_header+0x188>
jmp    12d5 <sc_for_req_header+0x1c5>
mov    -0x10(%rbp),%rdi
lea    0xdc6(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%eax
jne    12c4 <sc_for_req_header+0x1b4>
mov    -0x18(%rbp),%rax
movw   $0xa005,(%rax)
jmp    12d0 <sc_for_req_header+0x1c0>
movl   $0x0,-0x4(%rbp)
jmp    14b5 <sc_for_req_header+0x3a5>
jmp    12d5 <sc_for_req_header+0x1c5>
jmp    14ae <sc_for_req_header+0x39e>
mov    -0x10(%rbp),%rdi
lea    0xd97(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%eax
jne    1301 <sc_for_req_header+0x1f1>
mov    -0x18(%rbp),%rax
movw   $0xa009,(%rax)
jmp    13bd <sc_for_req_header+0x2ad>
mov    -0x10(%rbp),%rdi
lea    0xd77(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%eax
jne    1328 <sc_for_req_header+0x218>
mov    -0x18(%rbp),%rax
movw   $0xa006,(%rax)
jmp    13b8 <sc_for_req_header+0x2a8>
mov    -0x10(%rbp),%rdi
lea    0xd5b(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%eax
jne    134f <sc_for_req_header+0x23f>
mov    -0x18(%rbp),%rax
movw   $0xa007,(%rax)
jmp    13b3 <sc_for_req_header+0x2a3>
mov    -0x10(%rbp),%rdi
lea    0xd41(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%eax
jne    1376 <sc_for_req_header+0x266>
mov    -0x18(%rbp),%rax
movw   $0xa008,(%rax)
jmp    13ae <sc_for_req_header+0x29e>
mov    -0x10(%rbp),%rdi
lea    0xd29(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%eax
jne    139d <sc_for_req_header+0x28d>
mov    -0x18(%rbp),%rax
movw   $0xa00a,(%rax)
jmp    13a9 <sc_for_req_header+0x299>
movl   $0x0,-0x4(%rbp)
jmp    14b5 <sc_for_req_header+0x3a5>
jmp    13ae <sc_for_req_header+0x29e>
jmp    13b3 <sc_for_req_header+0x2a3>
jmp    13b8 <sc_for_req_header+0x2a8>
jmp    13bd <sc_for_req_header+0x2ad>
jmp    14ae <sc_for_req_header+0x39e>
mov    -0x10(%rbp),%rdi
lea    0xce5(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%eax
jne    13e9 <sc_for_req_header+0x2d9>
mov    -0x18(%rbp),%rax
movw   $0xa00b,(%rax)
jmp    13f5 <sc_for_req_header+0x2e5>
movl   $0x0,-0x4(%rbp)
jmp    14b5 <sc_for_req_header+0x3a5>
jmp    14ae <sc_for_req_header+0x39e>
mov    -0x10(%rbp),%rdi
lea    0xcb2(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%eax
jne    1421 <sc_for_req_header+0x311>
mov    -0x18(%rbp),%rax
movw   $0xa00c,(%rax)
jmp    142d <sc_for_req_header+0x31d>
movl   $0x0,-0x4(%rbp)
jmp    14b5 <sc_for_req_header+0x3a5>
jmp    14ae <sc_for_req_header+0x39e>
mov    -0x10(%rbp),%rdi
lea    0xc81(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%eax
jne    1459 <sc_for_req_header+0x349>
mov    -0x18(%rbp),%rax
movw   $0xa00d,(%rax)
jmp    1465 <sc_for_req_header+0x355>
movl   $0x0,-0x4(%rbp)
jmp    14b5 <sc_for_req_header+0x3a5>
jmp    14ae <sc_for_req_header+0x39e>
mov    -0x10(%rbp),%rdi
lea    0xc51(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%eax
jne    1491 <sc_for_req_header+0x381>
mov    -0x18(%rbp),%rax
movw   $0xa00e,(%rax)
jmp    149d <sc_for_req_header+0x38d>
movl   $0x0,-0x4(%rbp)
jmp    14b5 <sc_for_req_header+0x3a5>
jmp    14ae <sc_for_req_header+0x39e>
movl   $0x0,-0x4(%rbp)
jmp    14b5 <sc_for_req_header+0x3a5>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sc_for_req_header>:
push   %rbp
push   %r14
push   %rbx
movsbl (%rdi),%eax
xor    %ebp,%ebp
add    $0xffffff9f,%eax
cmp    $0x14,%eax
ja     12ee <sc_for_req_header+0x1de>
mov    %rsi,%r14
mov    %rdi,%rbx
lea    0xece(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
cmpb   $0x63,0x1(%rbx)
jne    12b6 <sc_for_req_header+0x1a6>
cmpb   $0x63,0x2(%rbx)
jne    12b6 <sc_for_req_header+0x1a6>
cmpb   $0x65,0x3(%rbx)
jne    12b6 <sc_for_req_header+0x1a6>
cmpb   $0x70,0x4(%rbx)
jne    12b6 <sc_for_req_header+0x1a6>
cmpb   $0x74,0x5(%rbx)
jne    12b6 <sc_for_req_header+0x1a6>
mov    0x6(%rbx),%al
test   %al,%al
je     12f5 <sc_for_req_header+0x1e5>
cmp    $0x2d,%al
jne    12ee <sc_for_req_header+0x1de>
add    $0x7,%rbx
lea    0xec9(%rip),%rsi
mov    %rbx,%rdi
call   1030 <strcmp@plt>
test   %eax,%eax
je     12fb <sc_for_req_header+0x1eb>
lea    0xeba(%rip),%rsi
mov    %rbx,%rdi
call   1030 <strcmp@plt>
test   %eax,%eax
je     1301 <sc_for_req_header+0x1f1>
lea    0xeac(%rip),%rsi
mov    %rbx,%rdi
call   1030 <strcmp@plt>
test   %eax,%eax
jne    12ee <sc_for_req_header+0x1de>
mov    $0xa004,%ax
jmp    12e5 <sc_for_req_header+0x1d5>
lea    0xea3(%rip),%rsi
mov    %rbx,%rdi
call   1030 <strcmp@plt>
test   %eax,%eax
je     12cf <sc_for_req_header+0x1bf>
lea    0xe93(%rip),%rsi
mov    %rbx,%rdi
call   1030 <strcmp@plt>
test   %eax,%eax
je     12d5 <sc_for_req_header+0x1c5>
lea    0xe87(%rip),%rsi
mov    %rbx,%rdi
call   1030 <strcmp@plt>
test   %eax,%eax
je     12db <sc_for_req_header+0x1cb>
lea    0xe7d(%rip),%rsi
mov    %rbx,%rdi
call   1030 <strcmp@plt>
test   %eax,%eax
je     12e1 <sc_for_req_header+0x1d1>
lea    0xe75(%rip),%rsi
mov    %rbx,%rdi
call   1030 <strcmp@plt>
test   %eax,%eax
jne    12ee <sc_for_req_header+0x1de>
mov    $0xa00a,%ax
jmp    12e5 <sc_for_req_header+0x1d5>
lea    0xe5d(%rip),%rsi
mov    %rbx,%rdi
call   1030 <strcmp@plt>
test   %eax,%eax
jne    12ee <sc_for_req_header+0x1de>
mov    $0xa00b,%ax
jmp    12e5 <sc_for_req_header+0x1d5>
lea    0xe45(%rip),%rsi
mov    %rbx,%rdi
call   1030 <strcmp@plt>
test   %eax,%eax
jne    12ee <sc_for_req_header+0x1de>
mov    $0xa00c,%ax
jmp    12e5 <sc_for_req_header+0x1d5>
lea    0xe33(%rip),%rsi
mov    %rbx,%rdi
call   1030 <strcmp@plt>
test   %eax,%eax
jne    12ee <sc_for_req_header+0x1de>
mov    $0xa00d,%ax
jmp    12e5 <sc_for_req_header+0x1d5>
lea    0xe22(%rip),%rsi
mov    %rbx,%rdi
call   1030 <strcmp@plt>
test   %eax,%eax
jne    12ee <sc_for_req_header+0x1de>
mov    $0xa00e,%ax
jmp    12e5 <sc_for_req_header+0x1d5>
lea    0xdb1(%rip),%rsi
mov    %rbx,%rdi
call   1030 <strcmp@plt>
test   %eax,%eax
jne    12ee <sc_for_req_header+0x1de>
mov    $0xa005,%ax
jmp    12e5 <sc_for_req_header+0x1d5>
mov    $0xa009,%ax
jmp    12e5 <sc_for_req_header+0x1d5>
mov    $0xa006,%ax
jmp    12e5 <sc_for_req_header+0x1d5>
mov    $0xa007,%ax
jmp    12e5 <sc_for_req_header+0x1d5>
mov    $0xa008,%ax
mov    %ax,(%r14)
mov    $0x1,%ebp
mov    %ebp,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret
mov    $0xa001,%ax
jmp    12e5 <sc_for_req_header+0x1d5>
mov    $0xa002,%ax
jmp    12e5 <sc_for_req_header+0x1d5>
mov    $0xa003,%ax
jmp    12e5 <sc_for_req_header+0x1d5>

LLVM IR (-O0):
@.str = [8 x i8] c"charset\00"
@.str.1 = [9 x i8] c"encoding\00"
@.str.2 = [9 x i8] c"language\00"
@.str.3 = [14 x i8] c"authorization\00"
@.str.4 = [7 x i8] c"cookie\00"
@.str.5 = [11 x i8] c"connection\00"
@.str.6 = [13 x i8] c"content-type\00"
@.str.7 = [15 x i8] c"content-length\00"
@.str.8 = [8 x i8] c"cookie2\00"
@.str.9 = [5 x i8] c"host\00"
@.str.10 = [7 x i8] c"pragma\00"
@.str.11 = [8 x i8] c"referer\00"
@.str.12 = [11 x i8] c"user-agent\00"
define i32 @sc_for_req_header(i8* %0, i16* %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i16*
store i8* %0, i8** %4
store i16* %1, i16** %5
%6 = load i8*, i8** %4
%7 = getelementptr inbounds i8, i8* %6, i64 0
%8 = load i8, i8* %7
%9 = sext i8 %8 to i32
switch i32 %9, label %159 [
i32 97, label %10
i32 99, label %91
i32 104, label %127
i32 112, label %135
i32 114, label %143
i32 117, label %151
]
10: ; preds = %2
%11 = load i8*, i8** %4
%12 = getelementptr inbounds i8, i8* %11, i64 1
%13 = load i8, i8* %12
%14 = sext i8 %13 to i32
%15 = icmp eq i32 99, %14
br i1 %15, label %16, label %82
16: ; preds = %10
%17 = load i8*, i8** %4
%18 = getelementptr inbounds i8, i8* %17, i64 2
%19 = load i8, i8* %18
%20 = sext i8 %19 to i32
%21 = icmp eq i32 99, %20
br i1 %21, label %22, label %82
22: ; preds = %16
%23 = load i8*, i8** %4
%24 = getelementptr inbounds i8, i8* %23, i64 3
%25 = load i8, i8* %24
%26 = sext i8 %25 to i32
%27 = icmp eq i32 101, %26
br i1 %27, label %28, label %82
28: ; preds = %22
%29 = load i8*, i8** %4
%30 = getelementptr inbounds i8, i8* %29, i64 4
%31 = load i8, i8* %30
%32 = sext i8 %31 to i32
%33 = icmp eq i32 112, %32
br i1 %33, label %34, label %82
34: ; preds = %28
%35 = load i8*, i8** %4
%36 = getelementptr inbounds i8, i8* %35, i64 5
%37 = load i8, i8* %36
%38 = sext i8 %37 to i32
%39 = icmp eq i32 116, %38
br i1 %39, label %40, label %82
40: ; preds = %34
%41 = load i8*, i8** %4
%42 = getelementptr inbounds i8, i8* %41, i64 6
%43 = load i8, i8* %42
%44 = sext i8 %43 to i32
%45 = icmp eq i32 45, %44
br i1 %45, label %46, label %71
46: ; preds = %40
%47 = load i8*, i8** %4
%48 = getelementptr inbounds i8, i8* %47, i64 7
%49 = call i32 @strcmp(i8* %48, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
%50 = icmp ne i32 %49, 0
br i1 %50, label %53, label %51
51: ; preds = %46
%52 = load i16*, i16** %5
store i16 -24574, i16* %52
br label %70
53: ; preds = %46
%54 = load i8*, i8** %4
%55 = getelementptr inbounds i8, i8* %54, i64 7
%56 = call i32 @strcmp(i8* %55, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0))
%57 = icmp ne i32 %56, 0
br i1 %57, label %60, label %58
58: ; preds = %53
%59 = load i16*, i16** %5
store i16 -24573, i16* %59
br label %69
60: ; preds = %53
%61 = load i8*, i8** %4
%62 = getelementptr inbounds i8, i8* %61, i64 7
%63 = call i32 @strcmp(i8* %62, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0))
%64 = icmp ne i32 %63, 0
br i1 %64, label %67, label %65
65: ; preds = %60
%66 = load i16*, i16** %5
store i16 -24572, i16* %66
br label %68
67: ; preds = %60
store i32 0, i32* %3
br label %161
68: ; preds = %65
br label %69
69: ; preds = %68, %58
br label %70
70: ; preds = %69, %51
br label %81
71: ; preds = %40
%72 = load i8*, i8** %4
%73 = getelementptr inbounds i8, i8* %72, i64 6
%74 = load i8, i8* %73
%75 = sext i8 %74 to i32
%76 = icmp eq i32 0, %75
br i1 %76, label %77, label %79
77: ; preds = %71
%78 = load i16*, i16** %5
store i16 -24575, i16* %78
br label %80
79: ; preds = %71
store i32 0, i32* %3
br label %161
80: ; preds = %77
br label %81
81: ; preds = %80, %70
br label %90
82: ; preds = %34, %28, %22, %16, %10
%83 = load i8*, i8** %4
%84 = call i32 @strcmp(i8* %83, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.3, i64 0, i64 0))
%85 = icmp ne i32 %84, 0
br i1 %85, label %88, label %86
86: ; preds = %82
%87 = load i16*, i16** %5
store i16 -24571, i16* %87
br label %89
88: ; preds = %82
store i32 0, i32* %3
br label %161
89: ; preds = %86
br label %90
90: ; preds = %89, %81
br label %160
91: ; preds = %2
%92 = load i8*, i8** %4
%93 = call i32 @strcmp(i8* %92, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.4, i64 0, i64 0))
%94 = icmp ne i32 %93, 0
br i1 %94, label %97, label %95
95: ; preds = %91
%96 = load i16*, i16** %5
store i16 -24567, i16* %96
br label %126
97: ; preds = %91
%98 = load i8*, i8** %4
%99 = call i32 @strcmp(i8* %98, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.5, i64 0, i64 0))
%100 = icmp ne i32 %99, 0
br i1 %100, label %103, label %101
101: ; preds = %97
%102 = load i16*, i16** %5
store i16 -24570, i16* %102
br label %125
103: ; preds = %97
%104 = load i8*, i8** %4
%105 = call i32 @strcmp(i8* %104, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.6, i64 0, i64 0))
%106 = icmp ne i32 %105, 0
br i1 %106, label %109, label %107
107: ; preds = %103
%108 = load i16*, i16** %5
store i16 -24569, i16* %108
br label %124
109: ; preds = %103
%110 = load i8*, i8** %4
%111 = call i32 @strcmp(i8* %110, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.7, i64 0, i64 0))
%112 = icmp ne i32 %111, 0
br i1 %112, label %115, label %113
113: ; preds = %109
%114 = load i16*, i16** %5
store i16 -24568, i16* %114
br label %123
115: ; preds = %109
%116 = load i8*, i8** %4
%117 = call i32 @strcmp(i8* %116, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.8, i64 0, i64 0))
%118 = icmp ne i32 %117, 0
br i1 %118, label %121, label %119
119: ; preds = %115
%120 = load i16*, i16** %5
store i16 -24566, i16* %120
br label %122
121: ; preds = %115
store i32 0, i32* %3
br label %161
122: ; preds = %119
br label %123
123: ; preds = %122, %113
br label %124
124: ; preds = %123, %107
br label %125
125: ; preds = %124, %101
br label %126
126: ; preds = %125, %95
br label %160
127: ; preds = %2
%128 = load i8*, i8** %4
%129 = call i32 @strcmp(i8* %128, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.9, i64 0, i64 0))
%130 = icmp ne i32 %129, 0
br i1 %130, label %133, label %131
131: ; preds = %127
%132 = load i16*, i16** %5
store i16 -24565, i16* %132
br label %134
133: ; preds = %127
store i32 0, i32* %3
br label %161
134: ; preds = %131
br label %160
135: ; preds = %2
%136 = load i8*, i8** %4
%137 = call i32 @strcmp(i8* %136, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.10, i64 0, i64 0))
%138 = icmp ne i32 %137, 0
br i1 %138, label %141, label %139
139: ; preds = %135
%140 = load i16*, i16** %5
store i16 -24564, i16* %140
br label %142
141: ; preds = %135
store i32 0, i32* %3
br label %161
142: ; preds = %139
br label %160
143: ; preds = %2
%144 = load i8*, i8** %4
%145 = call i32 @strcmp(i8* %144, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.11, i64 0, i64 0))
%146 = icmp ne i32 %145, 0
br i1 %146, label %149, label %147
147: ; preds = %143
%148 = load i16*, i16** %5
store i16 -24563, i16* %148
br label %150
149: ; preds = %143
store i32 0, i32* %3
br label %161
150: ; preds = %147
br label %160
151: ; preds = %2
%152 = load i8*, i8** %4
%153 = call i32 @strcmp(i8* %152, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.12, i64 0, i64 0))
%154 = icmp ne i32 %153, 0
br i1 %154, label %157, label %155
155: ; preds = %151
%156 = load i16*, i16** %5
store i16 -24562, i16* %156
br label %158
157: ; preds = %151
store i32 0, i32* %3
br label %161
158: ; preds = %155
br label %160
159: ; preds = %2
store i32 0, i32* %3
br label %161
160: ; preds = %158, %150, %142, %134, %126, %90
store i32 1, i32* %3
br label %161
161: ; preds = %160, %159, %157, %149, %141, %133, %121, %88, %79, %67
%162 = load i32, i32* %3
ret i32 %162
}

LLVM IR (-O2):
@.str = [8 x i8] c"charset\00"
@.str.1 = [9 x i8] c"encoding\00"
@.str.2 = [9 x i8] c"language\00"
@.str.3 = [14 x i8] c"authorization\00"
@.str.4 = [7 x i8] c"cookie\00"
@.str.5 = [11 x i8] c"connection\00"
@.str.6 = [13 x i8] c"content-type\00"
@.str.7 = [15 x i8] c"content-length\00"
@.str.8 = [8 x i8] c"cookie2\00"
@.str.9 = [5 x i8] c"host\00"
@.str.10 = [7 x i8] c"pragma\00"
@.str.11 = [8 x i8] c"referer\00"
@.str.12 = [11 x i8] c"user-agent\00"
define i32 @sc_for_req_header(i8* nocapture %0, i16* nocapture writeonly %1) {
%3 = load i8, i8* %0
%4 = sext i8 %3 to i32
switch i32 %4, label %70 [
i32 97, label %5
i32 99, label %41
i32 104, label %56
i32 112, label %59
i32 114, label %62
i32 117, label %65
]
5: ; preds = %2
%6 = getelementptr inbounds i8, i8* %0, i64 1
%7 = load i8, i8* %6
%8 = icmp eq i8 %7, 99
br i1 %8, label %9, label %38
9: ; preds = %5
%10 = getelementptr inbounds i8, i8* %0, i64 2
%11 = load i8, i8* %10
%12 = icmp eq i8 %11, 99
br i1 %12, label %13, label %38
13: ; preds = %9
%14 = getelementptr inbounds i8, i8* %0, i64 3
%15 = load i8, i8* %14
%16 = icmp eq i8 %15, 101
br i1 %16, label %17, label %38
17: ; preds = %13
%18 = getelementptr inbounds i8, i8* %0, i64 4
%19 = load i8, i8* %18
%20 = icmp eq i8 %19, 112
br i1 %20, label %21, label %38
21: ; preds = %17
%22 = getelementptr inbounds i8, i8* %0, i64 5
%23 = load i8, i8* %22
%24 = icmp eq i8 %23, 116
br i1 %24, label %25, label %38
25: ; preds = %21
%26 = getelementptr inbounds i8, i8* %0, i64 6
%27 = load i8, i8* %26
switch i8 %27, label %70 [
i8 45, label %28
i8 0, label %68
]
28: ; preds = %25
%29 = getelementptr inbounds i8, i8* %0, i64 7
%30 = tail call i32 @strcmp(i8* %29, i8* dereferenceable(8) getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
%31 = icmp eq i32 %30, 0
br i1 %31, label %68, label %32
32: ; preds = %28
%33 = tail call i32 @strcmp(i8* %29, i8* dereferenceable(9) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0))
%34 = icmp eq i32 %33, 0
br i1 %34, label %68, label %35
35: ; preds = %32
%36 = tail call i32 @strcmp(i8* %29, i8* dereferenceable(9) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0))
%37 = icmp eq i32 %36, 0
br i1 %37, label %68, label %70
38: ; preds = %21, %17, %13, %9, %5
%39 = tail call i32 @strcmp(i8* %0, i8* dereferenceable(14) getelementptr inbounds ([14 x i8], [14 x i8]* @.str.3, i64 0, i64 0))
%40 = icmp eq i32 %39, 0
br i1 %40, label %68, label %70
41: ; preds = %2
%42 = tail call i32 @strcmp(i8* %0, i8* dereferenceable(7) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.4, i64 0, i64 0))
%43 = icmp eq i32 %42, 0
br i1 %43, label %68, label %44
44: ; preds = %41
%45 = tail call i32 @strcmp(i8* %0, i8* dereferenceable(11) getelementptr inbounds ([11 x i8], [11 x i8]* @.str.5, i64 0, i64 0))
%46 = icmp eq i32 %45, 0
br i1 %46, label %68, label %47
47: ; preds = %44
%48 = tail call i32 @strcmp(i8* %0, i8* dereferenceable(13) getelementptr inbounds ([13 x i8], [13 x i8]* @.str.6, i64 0, i64 0))
%49 = icmp eq i32 %48, 0
br i1 %49, label %68, label %50
50: ; preds = %47
%51 = tail call i32 @strcmp(i8* %0, i8* dereferenceable(15) getelementptr inbounds ([15 x i8], [15 x i8]* @.str.7, i64 0, i64 0))
%52 = icmp eq i32 %51, 0
br i1 %52, label %68, label %53
53: ; preds = %50
%54 = tail call i32 @strcmp(i8* %0, i8* dereferenceable(8) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.8, i64 0, i64 0))
%55 = icmp eq i32 %54, 0
br i1 %55, label %68, label %70
56: ; preds = %2
%57 = tail call i32 @strcmp(i8* %0, i8* dereferenceable(5) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.9, i64 0, i64 0))
%58 = icmp eq i32 %57, 0
br i1 %58, label %68, label %70
59: ; preds = %2
%60 = tail call i32 @strcmp(i8* %0, i8* dereferenceable(7) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.10, i64 0, i64 0))
%61 = icmp eq i32 %60, 0
br i1 %61, label %68, label %70
62: ; preds = %2
%63 = tail call i32 @strcmp(i8* %0, i8* dereferenceable(8) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.11, i64 0, i64 0))
%64 = icmp eq i32 %63, 0
br i1 %64, label %68, label %70
65: ; preds = %2
%66 = tail call i32 @strcmp(i8* %0, i8* dereferenceable(11) getelementptr inbounds ([11 x i8], [11 x i8]* @.str.12, i64 0, i64 0))
%67 = icmp eq i32 %66, 0
br i1 %67, label %68, label %70
68: ; preds = %65, %62, %59, %56, %53, %50, %47, %44, %41, %38, %25, %35, %32, %28
%69 = phi i16 [ -24574, %28 ], [ -24573, %32 ], [ -24572, %35 ], [ -24575, %25 ], [ -24571, %38 ], [ -24567, %41 ], [ -24570, %44 ], [ -24569, %47 ], [ -24568, %50 ], [ -24566, %53 ], [ -24565, %56 ], [ -24564, %59 ], [ -24563, %62 ], [ -24562, %65 ]
store i16 %69, i16* %1
br label %70
70: ; preds = %68, %2, %65, %62, %59, %56, %53, %38, %25, %35
%71 = phi i32 [ 0, %35 ], [ 0, %25 ], [ 0, %38 ], [ 0, %53 ], [ 0, %56 ], [ 0, %59 ], [ 0, %62 ], [ 0, %65 ], [ 0, %2 ], [ 1, %68 ]
ret i32 %71
}