#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 */
struct MIMEH_header_info {
  int dummy;
};

/* Variables and functions */
int MIMEH_is_valid_header_prefix(char *, char *);
scalar_t__ isspace(char);
int MIMEH_parse_contenttype_linear_EXPERIMENT(char *header_name,
                                              char *header_value,
                                              struct MIMEH_header_info *hinfo) {
  char *chv = header_value;
  char *chn = header_name;
  int boundary_found = 0;
  while (isspace(*chn))
    chn++;
  if (MIMEH_is_valid_header_prefix(chn, "content-type") == 0)
    return 0;
  while (*chv) {
    while (isspace(*chv))
      chv++;
    if ((boundary_found == 0) &&
        (MIMEH_is_valid_header_prefix(chv, "boundary") == 1)) {
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<MIMEH_parse_contenttype_linear_EXPERIMENT>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x30(%rbp)
movl   $0x0,-0x34(%rbp)
mov    -0x30(%rbp),%rax
movsbl (%rax),%edi
call   1040 <isspace@plt>
cmp    $0x0,%rax
je     1172 <MIMEH_parse_contenttype_linear_EXPERIMENT+0x52>
mov    -0x30(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x30(%rbp)
jmp    114b <MIMEH_parse_contenttype_linear_EXPERIMENT+0x2b>
mov    -0x30(%rbp),%rdi
lea    0xe83(%rip),%rsi
call   1030 <MIMEH_is_valid_header_prefix@plt>
cmp    $0x0,%eax
jne    1197 <MIMEH_parse_contenttype_linear_EXPERIMENT+0x77>
movl   $0x0,-0x4(%rbp)
jmp    1209 <MIMEH_parse_contenttype_linear_EXPERIMENT+0xe9>
jmp    119c <MIMEH_parse_contenttype_linear_EXPERIMENT+0x7c>
mov    -0x28(%rbp),%rax
cmpb   $0x0,(%rax)
je     1202 <MIMEH_parse_contenttype_linear_EXPERIMENT+0xe2>
jmp    11ae <MIMEH_parse_contenttype_linear_EXPERIMENT+0x8e>
mov    -0x28(%rbp),%rax
movsbl (%rax),%edi
call   1040 <isspace@plt>
cmp    $0x0,%rax
je     11d5 <MIMEH_parse_contenttype_linear_EXPERIMENT+0xb5>
mov    -0x28(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x28(%rbp)
jmp    11ae <MIMEH_parse_contenttype_linear_EXPERIMENT+0x8e>
cmpl   $0x0,-0x34(%rbp)
jne    11fd <MIMEH_parse_contenttype_linear_EXPERIMENT+0xdd>
mov    -0x28(%rbp),%rdi
lea    0xe23(%rip),%rsi
call   1030 <MIMEH_is_valid_header_prefix@plt>
cmp    $0x1,%eax
jne    11fd <MIMEH_parse_contenttype_linear_EXPERIMENT+0xdd>
jmp    11fd <MIMEH_parse_contenttype_linear_EXPERIMENT+0xdd>
jmp    119c <MIMEH_parse_contenttype_linear_EXPERIMENT+0x7c>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<MIMEH_parse_contenttype_linear_EXPERIMENT>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %rdi,%r14
add    $0xffffffffffffffff,%r14
xchg   %ax,%ax
movsbl 0x1(%r14),%edi
add    $0x1,%r14
call   1040 <isspace@plt>
test   %rax,%rax
jne    1130 <MIMEH_parse_contenttype_linear_EXPERIMENT+0x10>
lea    0xeb6(%rip),%rsi
mov    %r14,%rdi
call   1030 <MIMEH_is_valid_header_prefix@plt>
test   %eax,%eax
je     11a4 <MIMEH_parse_contenttype_linear_EXPERIMENT+0x84>
mov    (%rbx),%al
test   %al,%al
je     11a4 <MIMEH_parse_contenttype_linear_EXPERIMENT+0x84>
lea    0xeaa(%rip),%r14
jmp    1181 <MIMEH_parse_contenttype_linear_EXPERIMENT+0x61>
cs nopw 0x0(%rax,%rax,1)
nop
mov    %rbx,%rdi
mov    %r14,%rsi
call   1030 <MIMEH_is_valid_header_prefix@plt>
mov    (%rbx),%al
test   %al,%al
je     11a4 <MIMEH_parse_contenttype_linear_EXPERIMENT+0x84>
movsbl %al,%edi
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
call   1040 <isspace@plt>
test   %rax,%rax
je     1170 <MIMEH_parse_contenttype_linear_EXPERIMENT+0x50>
movsbl 0x1(%rbx),%edi
add    $0x1,%rbx
jmp    1190 <MIMEH_parse_contenttype_linear_EXPERIMENT+0x70>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
%struct.MIMEH_header_info = type { i32 }
@.str = [13 x i8] c"content-type\00"
@.str.1 = [9 x i8] c"boundary\00"
define i32 @MIMEH_parse_contenttype_linear_EXPERIMENT(i8* %0, i8* %1, %struct.MIMEH_header_info* %2) {
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca %struct.MIMEH_header_info*
%8 = alloca i8*
%9 = alloca i8*
%10 = alloca i32
store i8* %0, i8** %5
store i8* %1, i8** %6
store %struct.MIMEH_header_info* %2, %struct.MIMEH_header_info** %7
%11 = load i8*, i8** %6
store i8* %11, i8** %8
%12 = load i8*, i8** %5
store i8* %12, i8** %9
store i32 0, i32* %10
br label %13
13: ; preds = %18, %3
%14 = load i8*, i8** %9
%15 = load i8, i8* %14
%16 = call i64 @isspace(i8 signext %15)
%17 = icmp ne i64 %16, 0
br i1 %17, label %18, label %21
18: ; preds = %13
%19 = load i8*, i8** %9
%20 = getelementptr inbounds i8, i8* %19, i32 1
store i8* %20, i8** %9
br label %13
21: ; preds = %13
%22 = load i8*, i8** %9
%23 = call i32 @MIMEH_is_valid_header_prefix(i8* %22, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
%24 = icmp eq i32 %23, 0
br i1 %24, label %25, label %26
25: ; preds = %21
store i32 0, i32* %4
br label %50
26: ; preds = %21
br label %27
27: ; preds = %48, %26
%28 = load i8*, i8** %8
%29 = load i8, i8* %28
%30 = icmp ne i8 %29, 0
br i1 %30, label %31, label %49
31: ; preds = %27
br label %32
32: ; preds = %37, %31
%33 = load i8*, i8** %8
%34 = load i8, i8* %33
%35 = call i64 @isspace(i8 signext %34)
%36 = icmp ne i64 %35, 0
br i1 %36, label %37, label %40
37: ; preds = %32
%38 = load i8*, i8** %8
%39 = getelementptr inbounds i8, i8* %38, i32 1
store i8* %39, i8** %8
br label %32
40: ; preds = %32
%41 = load i32, i32* %10
%42 = icmp eq i32 %41, 0
br i1 %42, label %43, label %48
43: ; preds = %40
%44 = load i8*, i8** %8
%45 = call i32 @MIMEH_is_valid_header_prefix(i8* %44, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0))
%46 = icmp eq i32 %45, 1
br i1 %46, label %47, label %48
47: ; preds = %43
br label %48
48: ; preds = %47, %43, %40
br label %27
49: ; preds = %27
store i32 0, i32* %4
br label %50
50: ; preds = %49, %25
%51 = load i32, i32* %4
ret i32 %51
}

LLVM IR (-O2):
%struct.MIMEH_header_info = type { i32 }
@.str = [13 x i8] c"content-type\00"
@.str.1 = [9 x i8] c"boundary\00"
define i32 @MIMEH_parse_contenttype_linear_EXPERIMENT(i8* %0, i8* %1, %struct.MIMEH_header_info* nocapture readnone %2) {
br label %4
4: ; preds = %4, %3
%5 = phi i8* [ %0, %3 ], [ %9, %4 ]
%6 = load i8, i8* %5
%7 = tail call i64 @isspace(i8 signext %6)
%8 = icmp eq i64 %7, 0
%9 = getelementptr inbounds i8, i8* %5, i64 1
br i1 %8, label %10, label %4
10: ; preds = %4
%11 = tail call i32 @MIMEH_is_valid_header_prefix(i8* %5, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
%12 = icmp eq i32 %11, 0
br i1 %12, label %32, label %13
13: ; preds = %10
%14 = load i8, i8* %1
%15 = icmp eq i8 %14, 0
br i1 %15, label %32, label %16
16: ; preds = %13, %27
%17 = phi i8 [ %30, %27 ], [ %14, %13 ]
%18 = phi i8* [ %28, %27 ], [ %1, %13 ]
%19 = tail call i64 @isspace(i8 signext %17)
%20 = icmp eq i64 %19, 0
br i1 %20, label %27, label %21
21: ; preds = %16, %21
%22 = phi i8* [ %23, %21 ], [ %18, %16 ]
%23 = getelementptr inbounds i8, i8* %22, i64 1
%24 = load i8, i8* %23
%25 = tail call i64 @isspace(i8 signext %24)
%26 = icmp eq i64 %25, 0
br i1 %26, label %27, label %21
27: ; preds = %21, %16
%28 = phi i8* [ %18, %16 ], [ %23, %21 ]
%29 = tail call i32 @MIMEH_is_valid_header_prefix(i8* %28, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0))
%30 = load i8, i8* %28
%31 = icmp eq i8 %30, 0
br i1 %31, label %32, label %16
32: ; preds = %27, %13, %10
ret i32 0
}