#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 */
char *MIMEH_strcasestr(char *, char *);
int MIMEH_check_ct(char *q) {
  char *p = q;
  p++;
  if (*p != '\0' && MIMEH_strcasestr(p, "Content-Type:") == p)
    return 1;
  p++;
  if (*p != '\0' && MIMEH_strcasestr(p, "Content-Type:") == p)
    return 1;
  return 0;
}


x86 assembly (clang, -O0):
<MIMEH_check_ct>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     1166 <MIMEH_check_ct+0x56>
mov    -0x18(%rbp),%rdi
lea    0xeb5(%rip),%rsi
call   1030 <MIMEH_strcasestr@plt>
cmp    -0x18(%rbp),%rax
jne    1166 <MIMEH_check_ct+0x56>
movl   $0x1,-0x4(%rbp)
jmp    11af <MIMEH_check_ct+0x9f>
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     11a8 <MIMEH_check_ct+0x98>
mov    -0x18(%rbp),%rdi
lea    0xe73(%rip),%rsi
call   1030 <MIMEH_strcasestr@plt>
cmp    -0x18(%rbp),%rax
jne    11a8 <MIMEH_check_ct+0x98>
movl   $0x1,-0x4(%rbp)
jmp    11af <MIMEH_check_ct+0x9f>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<MIMEH_check_ct>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
cmpb   $0x0,0x1(%rdi)
je     1135 <MIMEH_check_ct+0x25>
lea    0x1(%rbx),%r14
lea    0xed8(%rip),%rsi
mov    %r14,%rdi
call   1030 <MIMEH_strcasestr@plt>
cmp    %r14,%rax
je     1157 <MIMEH_check_ct+0x47>
cmpb   $0x0,0x2(%rbx)
je     1153 <MIMEH_check_ct+0x43>
add    $0x2,%rbx
lea    0xeba(%rip),%rsi
mov    %rbx,%rdi
call   1030 <MIMEH_strcasestr@plt>
cmp    %rbx,%rax
je     1157 <MIMEH_check_ct+0x47>
xor    %eax,%eax
jmp    115c <MIMEH_check_ct+0x4c>
mov    $0x1,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [14 x i8] c"Content-Type:\00"
define i32 @MIMEH_check_ct(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
%5 = load i8*, i8** %3
store i8* %5, i8** %4
%6 = load i8*, i8** %4
%7 = getelementptr inbounds i8, i8* %6, i32 1
store i8* %7, i8** %4
%8 = load i8*, i8** %4
%9 = load i8, i8* %8
%10 = sext i8 %9 to i32
%11 = icmp ne i32 %10, 0
br i1 %11, label %12, label %18
12: ; preds = %1
%13 = load i8*, i8** %4
%14 = call i8* @MIMEH_strcasestr(i8* %13, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
%15 = load i8*, i8** %4
%16 = icmp eq i8* %14, %15
br i1 %16, label %17, label %18
17: ; preds = %12
store i32 1, i32* %2
br label %32
18: ; preds = %12, %1
%19 = load i8*, i8** %4
%20 = getelementptr inbounds i8, i8* %19, i32 1
store i8* %20, i8** %4
%21 = load i8*, i8** %4
%22 = load i8, i8* %21
%23 = sext i8 %22 to i32
%24 = icmp ne i32 %23, 0
br i1 %24, label %25, label %31
25: ; preds = %18
%26 = load i8*, i8** %4
%27 = call i8* @MIMEH_strcasestr(i8* %26, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
%28 = load i8*, i8** %4
%29 = icmp eq i8* %27, %28
br i1 %29, label %30, label %31
30: ; preds = %25
store i32 1, i32* %2
br label %32
31: ; preds = %25, %18
store i32 0, i32* %2
br label %32
32: ; preds = %31, %30, %17
%33 = load i32, i32* %2
ret i32 %33
}

LLVM IR (-O2):
@.str = [14 x i8] c"Content-Type:\00"
define i32 @MIMEH_check_ct(i8* %0) {
%2 = getelementptr inbounds i8, i8* %0, i64 1
%3 = load i8, i8* %2
%4 = icmp eq i8 %3, 0
br i1 %4, label %8, label %5
5: ; preds = %1
%6 = tail call i8* @MIMEH_strcasestr(i8* %2, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
%7 = icmp eq i8* %6, %2
br i1 %7, label %16, label %8
8: ; preds = %5, %1
%9 = getelementptr inbounds i8, i8* %0, i64 2
%10 = load i8, i8* %9
%11 = icmp eq i8 %10, 0
br i1 %11, label %15, label %12
12: ; preds = %8
%13 = tail call i8* @MIMEH_strcasestr(i8* %9, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
%14 = icmp eq i8* %13, %9
br i1 %14, label %16, label %15
15: ; preds = %12, %8
br label %16
16: ; preds = %12, %5, %15
%17 = phi i32 [ 0, %15 ], [ 1, %5 ], [ 1, %12 ]
ret i32 %17
}