xunge/DecIR huggingface dataset:
char *eat_space_end(char *p, char *pend) {
  for (; (p < pend) && (*p == ' ' || *p == '\t'); p++)
    ;
  return p;
}


x86 assembly (clang, -O0):
<eat_space_end>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rcx
xor    %eax,%eax
cmp    -0x10(%rbp),%rcx
mov    %al,-0x11(%rbp)
jae    114a <eat_space_end+0x4a>
mov    -0x8(%rbp),%rax
movsbl (%rax),%ecx
mov    $0x1,%al
cmp    $0x20,%ecx
mov    %al,-0x12(%rbp)
je     1144 <eat_space_end+0x44>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x9,%eax
sete   %al
mov    %al,-0x12(%rbp)
mov    -0x12(%rbp),%al
mov    %al,-0x11(%rbp)
mov    -0x11(%rbp),%al
test   $0x1,%al
jne    115a <eat_space_end+0x5a>
jmp    1170 <eat_space_end+0x70>
jmp    115f <eat_space_end+0x5f>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    110c <eat_space_end+0xc>
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<eat_space_end>:
mov    %rdi,%rax
cmp    %rsi,%rdi
jae    1127 <eat_space_end+0x27>
mov    %rsi,%rcx
sub    %rax,%rcx
jmp    111a <eat_space_end+0x1a>
add    $0x1,%rax
add    $0xffffffffffffffff,%rcx
je     1128 <eat_space_end+0x28>
movzbl (%rax),%edx
cmp    $0x20,%dl
je     1110 <eat_space_end+0x10>
cmp    $0x9,%dl
je     1110 <eat_space_end+0x10>
ret
mov    %rsi,%rax
ret

LLVM IR (-O0):
define i8* @eat_space_end(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
br label %5
5: ; preds = %24, %2
%6 = load i8*, i8** %3
%7 = load i8*, i8** %4
%8 = icmp ult i8* %6, %7
br i1 %8, label %9, label %21
9: ; preds = %5
%10 = load i8*, i8** %3
%11 = load i8, i8* %10
%12 = sext i8 %11 to i32
%13 = icmp eq i32 %12, 32
br i1 %13, label %19, label %14
14: ; preds = %9
%15 = load i8*, i8** %3
%16 = load i8, i8* %15
%17 = sext i8 %16 to i32
%18 = icmp eq i32 %17, 9
br label %19
19: ; preds = %14, %9
%20 = phi i1 [ true, %9 ], [ %18, %14 ]
br label %21
21: ; preds = %19, %5
%22 = phi i1 [ false, %5 ], [ %20, %19 ]
br i1 %22, label %23, label %27
23: ; preds = %21
br label %24
24: ; preds = %23
%25 = load i8*, i8** %3
%26 = getelementptr inbounds i8, i8* %25, i32 1
store i8* %26, i8** %3
br label %5
27: ; preds = %21
%28 = load i8*, i8** %3
ret i8* %28
}

LLVM IR (-O2):
define i8* @eat_space_end(i8* %0, i8* readnone %1) {
%3 = icmp ult i8* %0, %1
br i1 %3, label %4, label %15
4: ; preds = %2
%5 = ptrtoint i8* %1 to i64
%6 = ptrtoint i8* %0 to i64
%7 = sub i64 %5, %6
%8 = getelementptr i8, i8* %0, i64 %7
br label %9
9: ; preds = %4, %12
%10 = phi i8* [ %13, %12 ], [ %0, %4 ]
%11 = load i8, i8* %10
switch i8 %11, label %15 [
i8 32, label %12
i8 9, label %12
]
12: ; preds = %9, %9
%13 = getelementptr inbounds i8, i8* %10, i64 1
%14 = icmp eq i8* %13, %8
br i1 %14, label %15, label %9
15: ; preds = %12, %9, %2
%16 = phi i8* [ %0, %2 ], [ %10, %9 ], [ %8, %12 ]
ret i8* %16
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ *fopen(char *, char *);
FILE *trebleft_arquivo_ttreble(void) { return fopen("/etc/ttreble.cnf", "rb"); }


x86 assembly (clang, -O0):
<trebleft_arquivo_ttreble>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
lea    0xeef(%rip),%rsi
call   1030 <fopen@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<trebleft_arquivo_ttreble>:
lea    0xee9(%rip),%rdi
lea    0xef3(%rip),%rsi
jmp    1030 <fopen@plt>

LLVM IR (-O0):
@.str = [17 x i8] c"/etc/ttreble.cnf\00"
@.str.1 = [3 x i8] c"rb\00"
define i32* @trebleft_arquivo_ttreble() {
%1 = call i32* @fopen(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
ret i32* %1
}

LLVM IR (-O2):
@.str = [17 x i8] c"/etc/ttreble.cnf\00"
@.str.1 = [3 x i8] c"rb\00"
define noalias i32* @trebleft_arquivo_ttreble() {
%1 = tail call i32* @fopen(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
ret i32* %1
}
/* Variables and functions */
int get_dev_random_seed();
int get_time_seed();
scalar_t__ has_dev_urandom();
int json_c_get_random_seed() {
  if (has_dev_urandom())
    return get_dev_random_seed();
  return get_time_seed();
}


x86 assembly (clang, -O0):
<json_c_get_random_seed>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <has_dev_urandom@plt>
cmp    $0x0,%rax
je     1158 <json_c_get_random_seed+0x28>
mov    $0x0,%al
call   1050 <get_dev_random_seed@plt>
mov    %eax,-0x4(%rbp)
jmp    1162 <json_c_get_random_seed+0x32>
mov    $0x0,%al
call   1040 <get_time_seed@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<json_c_get_random_seed>:
push   %rax
xor    %eax,%eax
call   1030 <has_dev_urandom@plt>
test   %rax,%rax
je     1145 <json_c_get_random_seed+0x15>
xor    %eax,%eax
pop    %rcx
jmp    1050 <get_dev_random_seed@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <get_time_seed@plt>

LLVM IR (-O0):
define i32 @json_c_get_random_seed() {
%1 = alloca i32
%2 = call i64 (...) @has_dev_urandom()
%3 = icmp ne i64 %2, 0
br i1 %3, label %4, label %6
4: ; preds = %0
%5 = call i32 (...) @get_dev_random_seed()
store i32 %5, i32* %1
br label %8
6: ; preds = %0
%7 = call i32 (...) @get_time_seed()
store i32 %7, i32* %1
br label %8
8: ; preds = %6, %4
%9 = load i32, i32* %1
ret i32 %9
}

LLVM IR (-O2):
define i32 @json_c_get_random_seed() {
%1 = tail call i64 (...) @has_dev_urandom()
%2 = icmp eq i64 %1, 0
br i1 %2, label %5, label %3
3: ; preds = %0
%4 = tail call i32 (...) @get_dev_random_seed()
br label %7
5: ; preds = %0
%6 = tail call i32 (...) @get_time_seed()
br label %7
7: ; preds = %5, %3
%8 = phi i32 [ %4, %3 ], [ %6, %5 ]
ret i32 %8
}
const char *dd_pbl_ios_gc_user_id() { return 0; }


x86 assembly (clang, -O0):
<dd_pbl_ios_gc_user_id>:
push   %rbp
mov    %rsp,%rbp
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<dd_pbl_ios_gc_user_id>:
xor    %eax,%eax
ret

LLVM IR (-O0):
define i8* @dd_pbl_ios_gc_user_id() {
ret i8* null
}

LLVM IR (-O2):
define noalias i8* @dd_pbl_ios_gc_user_id() {
ret i8* null
}
/* Variables and functions */
int /*<<< orphan*/ fputs(char *, int /*<<< orphan*/);
int /*<<< orphan*/ stderr;
int call_omp_get_max_threads() {
  fputs("WARNING: OpenMP not enabled: call_omp_get_max_threads\n", stderr);
  return 1;
}


x86 assembly (clang, -O0):
<call_omp_get_max_threads>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ec5(%rip),%rax
mov    (%rax),%esi
lea    0xedc(%rip),%rdi
call   1030 <fputs@plt>
mov    $0x1,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<call_omp_get_max_threads>:
push   %rax
mov    0x2ec8(%rip),%rax
mov    (%rax),%esi
lea    0xedf(%rip),%rdi
call   1030 <fputs@plt>
mov    $0x1,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [55 x i8] c"WARNING: OpenMP not enabled: call_omp_get_max_threads\0A\00"
@stderr = global i32 0
define i32 @call_omp_get_max_threads() {
%1 = load i32, i32* @stderr
%2 = call i32 @fputs(i8* getelementptr inbounds ([55 x i8], [55 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i32 1
}

LLVM IR (-O2):
@.str = [55 x i8] c"WARNING: OpenMP not enabled: call_omp_get_max_threads\0A\00"
@stderr = global i32 0
define i32 @call_omp_get_max_threads() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fputs(i8* getelementptr inbounds ([55 x i8], [55 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ ask_about_save_and_redisplay();
int /*<<< orphan*/ displayMessageAndWaitForKey(char *);
int /*<<< orphan*/ findFile();
int /*<<< orphan*/ openFile();
int /*<<< orphan*/ readFile();
void find_file(void) {
  if (!ask_about_save_and_redisplay())
    return;
  if (!findFile()) {
    displayMessageAndWaitForKey("No such file or directory");
    return;
  }
  openFile();
  readFile();
}


x86 assembly (clang, -O0):
<find_file>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1060 <ask_about_save_and_redisplay@plt>
cmp    $0x0,%eax
jne    1169 <find_file+0x19>
jmp    1198 <find_file+0x48>
mov    $0x0,%al
call   1030 <findFile@plt>
cmp    $0x0,%eax
jne    118a <find_file+0x3a>
lea    0xe80(%rip),%rdi
call   1050 <displayMessageAndWaitForKey@plt>
jmp    1198 <find_file+0x48>
mov    $0x0,%al
call   1040 <openFile@plt>
mov    $0x0,%al
call   1070 <readFile@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<find_file>:
push   %rax
xor    %eax,%eax
call   1060 <ask_about_save_and_redisplay@plt>
test   %eax,%eax
je     1176 <find_file+0x26>
xor    %eax,%eax
call   1030 <findFile@plt>
test   %eax,%eax
je     1178 <find_file+0x28>
xor    %eax,%eax
call   1040 <openFile@plt>
xor    %eax,%eax
pop    %rcx
jmp    1070 <readFile@plt>
pop    %rax
ret
lea    0xe81(%rip),%rdi
pop    %rax
jmp    1050 <displayMessageAndWaitForKey@plt>

LLVM IR (-O0):
@.str = [26 x i8] c"No such file or directory\00"
define void @find_file() {
%1 = call i32 (...) @ask_about_save_and_redisplay()
%2 = icmp ne i32 %1, 0
br i1 %2, label %4, label %3
3: ; preds = %0
br label %12
4: ; preds = %0
%5 = call i32 (...) @findFile()
%6 = icmp ne i32 %5, 0
br i1 %6, label %9, label %7
7: ; preds = %4
%8 = call i32 @displayMessageAndWaitForKey(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
br label %12
9: ; preds = %4
%10 = call i32 (...) @openFile()
%11 = call i32 (...) @readFile()
br label %12
12: ; preds = %9, %7, %3
ret void
}

LLVM IR (-O2):
@.str = [26 x i8] c"No such file or directory\00"
define void @find_file() {
%1 = tail call i32 (...) @ask_about_save_and_redisplay()
%2 = icmp eq i32 %1, 0
br i1 %2, label %11, label %3
3: ; preds = %0
%4 = tail call i32 (...) @findFile()
%5 = icmp eq i32 %4, 0
br i1 %5, label %6, label %8
6: ; preds = %3
%7 = tail call i32 @displayMessageAndWaitForKey(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
br label %11
8: ; preds = %3
%9 = tail call i32 (...) @openFile()
%10 = tail call i32 (...) @readFile()
br label %11
11: ; preds = %0, %8, %6
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ scanf(char *, char **);
int /*<<< orphan*/ strrev(char *);
int /*<<< orphan*/ topre(int /*<<< orphan*/);
int main() {
  char infix[100], postfix[100], exp[100];
  printf("\nenter the infix expression :");
  scanf("%s", &infix);
  topre(strrev(infix));
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x150,%rsp
lea    0xeae(%rip),%rdi
call   1030 <printf@plt>
lea    -0x70(%rbp),%rsi
lea    0xebc(%rip),%rdi
call   1040 <scanf@plt>
lea    -0x70(%rbp),%rdi
call   1050 <strrev@plt>
mov    %eax,%edi
call   1060 <topre@plt>
xor    %eax,%eax
add    $0x150,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x70,%rsp
lea    0xeb4(%rip),%rdi
call   1030 <printf@plt>
lea    0xec6(%rip),%rdi
mov    %rsp,%rbx
mov    %rbx,%rsi
call   1040 <scanf@plt>
mov    %rbx,%rdi
call   1050 <strrev@plt>
mov    %eax,%edi
call   1060 <topre@plt>
xor    %eax,%eax
add    $0x70,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [30 x i8] c"\0Aenter the infix expression :\00"
@.str.1 = [3 x i8] c"%s\00"
define i32 @main() {
%1 = alloca [100 x i8]
%2 = alloca [100 x i8]
%3 = alloca [100 x i8]
%4 = call i32 @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0))
%5 = bitcast [100 x i8]* %1 to i8**
%6 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8** %5)
%7 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 0, i64 0
%8 = call i32 @strrev(i8* %7)
%9 = call i32 @topre(i32 %8)
ret i32 0
}

LLVM IR (-O2):
@.str = [30 x i8] c"\0Aenter the infix expression :\00"
@.str.1 = [3 x i8] c"%s\00"
define i32 @main() {
%1 = alloca [100 x i8]
%2 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 0, i64 0
%3 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0))
%4 = bitcast [100 x i8]* %1 to i8**
%5 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8** %4)
%6 = call i32 @strrev(i8* %2)
%7 = call i32 @topre(i32 %6)
ret i32 0
}
int Leap(int year) {
  if (((year % 4 == 0) && (year % 100 != 0)) || (year % 400 == 0))
    return 1;
  else
    return 0;
}


x86 assembly (clang, -O0):
<Leap>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    $0x4,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    112f <Leap+0x2f>
mov    -0x8(%rbp),%eax
mov    $0x64,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    1143 <Leap+0x43>
mov    -0x8(%rbp),%eax
mov    $0x190,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    114f <Leap+0x4f>
movl   $0x1,-0x4(%rbp)
jmp    1156 <Leap+0x56>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<Leap>:
test   $0x3,%dil
sete   %al
imul   $0xc28f5c29,%edi,%ecx
add    $0x51eb850,%ecx
mov    %ecx,%edx
ror    $0x2,%edx
cmp    $0x28f5c29,%edx
setae  %dl
and    %al,%dl
ror    $0x4,%ecx
cmp    $0xa3d70b,%ecx
setb   %al
or     %dl,%al
movzbl %al,%eax
ret

LLVM IR (-O0):
define i32 @Leap(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = srem i32 %4, 4
%6 = icmp eq i32 %5, 0
br i1 %6, label %7, label %11
7: ; preds = %1
%8 = load i32, i32* %3
%9 = srem i32 %8, 100
%10 = icmp ne i32 %9, 0
br i1 %10, label %15, label %11
11: ; preds = %7, %1
%12 = load i32, i32* %3
%13 = srem i32 %12, 400
%14 = icmp eq i32 %13, 0
br i1 %14, label %15, label %16
15: ; preds = %11, %7
store i32 1, i32* %2
br label %17
16: ; preds = %11
store i32 0, i32* %2
br label %17
17: ; preds = %16, %15
%18 = load i32, i32* %2
ret i32 %18
}

LLVM IR (-O2):
define i32 @Leap(i32 %0) {
%2 = and i32 %0, 3
%3 = icmp eq i32 %2, 0
%4 = srem i32 %0, 100
%5 = icmp ne i32 %4, 0
%6 = and i1 %3, %5
%7 = srem i32 %0, 400
%8 = icmp eq i32 %7, 0
%9 = or i1 %8, %6
%10 = zext i1 %9 to i32
ret i32 %10
}
/* Variables and functions */
int /*<<< orphan*/ __arch_atomic_inc(long *);
void sas_atomic_inc(long int *p) { __arch_atomic_inc(p); }


x86 assembly (clang, -O0):
<sas_atomic_inc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <__arch_atomic_inc@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sas_atomic_inc>:
jmp    1030 <__arch_atomic_inc@plt>

LLVM IR (-O0):
define void @sas_atomic_inc(i64* %0) {
%2 = alloca i64*
store i64* %0, i64** %2
%3 = load i64*, i64** %2
%4 = call i32 @__arch_atomic_inc(i64* %3)
ret void
}

LLVM IR (-O2):
define void @sas_atomic_inc(i64* %0) {
%2 = tail call i32 @__arch_atomic_inc(i64* %0)
ret void
}
int bsr(int v) {
  unsigned int res;
  int i;
  for (i = 31, res = (1 << 31); i; i--, res >>= 1) {
    if (v & res) {
      return i;
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<bsr>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
movl   $0x1f,-0x10(%rbp)
movl   $0x80000000,-0xc(%rbp)
cmpl   $0x0,-0x10(%rbp)
je     1155 <bsr+0x55>
mov    -0x8(%rbp),%eax
and    -0xc(%rbp),%eax
cmp    $0x0,%eax
je     1139 <bsr+0x39>
mov    -0x10(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    115c <bsr+0x5c>
jmp    113e <bsr+0x3e>
mov    -0x10(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%eax
shr    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1115 <bsr+0x15>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<bsr>:
test   %edi,%edi
js     1123 <bsr+0x23>
mov    $0x80000000,%ecx
mov    $0x1f,%eax
xchg   %ax,%ax
mov    %eax,%edx
lea    -0x1(%rdx),%eax
cmp    $0x1,%edx
je     1122 <bsr+0x22>
shr    %ecx
mov    %ecx,%edx
and    %edi,%edx
je     1110 <bsr+0x10>
ret
mov    $0x1f,%eax
ret

LLVM IR (-O0):
define i32 @bsr(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %3
store i32 31, i32* %5
store i32 -2147483648, i32* %4
br label %6
6: ; preds = %17, %1
%7 = load i32, i32* %5
%8 = icmp ne i32 %7, 0
br i1 %8, label %9, label %22
9: ; preds = %6
%10 = load i32, i32* %3
%11 = load i32, i32* %4
%12 = and i32 %10, %11
%13 = icmp ne i32 %12, 0
br i1 %13, label %14, label %16
14: ; preds = %9
%15 = load i32, i32* %5
store i32 %15, i32* %2
br label %23
16: ; preds = %9
br label %17
17: ; preds = %16
%18 = load i32, i32* %5
%19 = add nsw i32 %18, -1
store i32 %19, i32* %5
%20 = load i32, i32* %4
%21 = lshr i32 %20, 1
store i32 %21, i32* %4
br label %6
22: ; preds = %6
store i32 0, i32* %2
br label %23
23: ; preds = %22, %14
%24 = load i32, i32* %2
ret i32 %24
}

LLVM IR (-O2):
define i32 @bsr(i32 %0) {
%2 = icmp sgt i32 %0, -1
br i1 %2, label %3, label %12
3: ; preds = %1, %3
%4 = phi i32 [ %6, %3 ], [ 31, %1 ]
%5 = phi i32 [ %7, %3 ], [ -2147483648, %1 ]
%6 = add nsw i32 %4, -1
%7 = lshr i32 %5, 1
%8 = icmp ne i32 %6, 0
%9 = and i32 %7, %0
%10 = icmp eq i32 %9, 0
%11 = select i1 %8, i1 %10, i1 false
br i1 %11, label %3, label %12
12: ; preds = %3, %1
%13 = phi i32 [ 31, %1 ], [ %6, %3 ]
ret i32 %13
}
/* Variables and functions */
int putc(int, int /*<<< orphan*/);
int /*<<< orphan*/ stdout;
int putchar(int character) { return putc(character, stdout); }


x86 assembly (clang, -O0):
<putchar>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
mov    0x2ebb(%rip),%rax
mov    (%rax),%esi
call   1030 <putc@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<putchar>:
mov    0x2ec9(%rip),%rax
mov    (%rax),%esi
jmp    1030 <putc@plt>

LLVM IR (-O0):
@stdout = global i32 0
define i32 @putchar(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = load i32, i32* @stdout
%5 = call i32 @putc(i32 %3, i32 %4)
ret i32 %5
}

LLVM IR (-O2):
@stdout = global i32 0
define i32 @putchar(i32 %0) {
%2 = load i32, i32* @stdout
%3 = tail call i32 @putc(i32 %0, i32 %2)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ putchar(int);
void a_0_53(void) {
  {
    putchar(((((125)))));
    putchar(((((10)))));
  }
}


x86 assembly (clang, -O0):
<a_0_53>:
push   %rbp
mov    %rsp,%rbp
mov    $0x7d,%edi
call   1030 <putchar@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<a_0_53>:
push   %rax
mov    $0x7d,%edi
call   1030 <putchar@plt>
mov    $0xa,%edi
pop    %rax
jmp    1030 <putchar@plt>

LLVM IR (-O0):
define void @a_0_53() {
%1 = call i32 @putchar(i32 125)
%2 = call i32 @putchar(i32 10)
ret void
}

LLVM IR (-O2):
define void @a_0_53() {
%1 = tail call i32 @putchar(i32 125)
%2 = tail call i32 @putchar(i32 10)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ mode_t;

/* Variables and functions */
int O_CREAT;
int /*<<< orphan*/ assert(int);
int open(char const *, int, int /*<<< orphan*/);
int do_create(const char *path, int oflag, mode_t mode) {
  int fd = open(path, O_CREAT | oflag, mode);
  assert(fd >= 0);
  return fd;
}


x86 assembly (clang, -O0):
<do_create>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    0x2ebb(%rip),%rax
mov    (%rax),%esi
or     -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
call   1040 <open@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
setge  %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<do_create>:
push   %rbx
mov    0x2ed0(%rip),%rax
or     (%rax),%esi
call   1040 <open@plt>
mov    %eax,%ebx
mov    %eax,%edi
not    %edi
shr    $0x1f,%edi
call   1030 <assert@plt>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
@O_CREAT = global i32 0
define i32 @do_create(i8* %0, i32 %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
store i8* %0, i8** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%8 = load i8*, i8** %4
%9 = load i32, i32* @O_CREAT
%10 = load i32, i32* %5
%11 = or i32 %9, %10
%12 = load i32, i32* %6
%13 = call i32 @open(i8* %8, i32 %11, i32 %12)
store i32 %13, i32* %7
%14 = load i32, i32* %7
%15 = icmp sge i32 %14, 0
%16 = zext i1 %15 to i32
%17 = call i32 @assert(i32 %16)
%18 = load i32, i32* %7
ret i32 %18
}

LLVM IR (-O2):
@O_CREAT = global i32 0
define i32 @do_create(i8* nocapture %0, i32 %1, i32 %2) {
%4 = load i32, i32* @O_CREAT
%5 = or i32 %4, %1
%6 = tail call i32 @open(i8* %0, i32 %5, i32 %2)
%7 = xor i32 %6, -1
%8 = lshr i32 %7, 31
%9 = tail call i32 @assert(i32 %8)
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ scanf(char *, int *);
int /*<<< orphan*/ webHandler();
int main(void) {
  for (;;) {
    webHandler();
    int input;
    scanf("%d", &input);
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <webHandler@plt>
lea    0xec3(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
jmp    112f <main+0xf>

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
lea    0xed5(%rip),%r14
lea    0x4(%rsp),%rbx
xor    %eax,%eax
call   1030 <webHandler@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
call   1040 <scanf@plt>
jmp    1130 <main+0x10>

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
br label %3
3: ; preds = %3, %0
%4 = call i32 (...) @webHandler()
%5 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %2)
br label %3
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
br label %3
3: ; preds = %3, %0
%4 = call i32 (...) @webHandler()
%5 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
br label %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int pa_memblockq_get_tlength() {
  printf("NOT IMPLEMENTED:"
         "pa_memblockq_get_tlength"
         "\n");
}


x86 assembly (clang, -O0):
<pa_memblockq_get_tlength>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xee1(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pa_memblockq_get_tlength>:
lea    0xee9(%rip),%rdi
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [42 x i8] c"NOT IMPLEMENTED:pa_memblockq_get_tlength\0A\00"
define i32 @pa_memblockq_get_tlength() {
%1 = alloca i32
%2 = call i32 @printf(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* %1
ret i32 %3
}

LLVM IR (-O2):
@str = [41 x i8] c"NOT IMPLEMENTED:pa_memblockq_get_tlength\00"
define i32 @pa_memblockq_get_tlength() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([41 x i8], [41 x i8]* @str, i64 0, i64 0))
ret i32 undef
}
void all_threads_signalled(void) {}


x86 assembly (clang, -O0):
<all_threads_signalled>:
push   %rbp
mov    %rsp,%rbp
pop    %rbp
ret

x86 assembly (clang, -O2):
<all_threads_signalled>:
ret

LLVM IR (-O0):
define void @all_threads_signalled() {
ret void
}

LLVM IR (-O2):
define void @all_threads_signalled() {
ret void
}
int main(int argc, char **argv) {
  argc++ == 1;
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = load i32, i32* %4
%7 = add nsw i32 %6, 1
store i32 %7, i32* %4
%8 = icmp eq i32 %6, 1
%9 = zext i1 %8 to i32
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
ret i32 0
}
void RTSgBufSegArrayCreate(void) {}


x86 assembly (clang, -O0):
<RTSgBufSegArrayCreate>:
push   %rbp
mov    %rsp,%rbp
pop    %rbp
ret

x86 assembly (clang, -O2):
<RTSgBufSegArrayCreate>:
ret

LLVM IR (-O0):
define void @RTSgBufSegArrayCreate() {
ret void
}

LLVM IR (-O2):
define void @RTSgBufSegArrayCreate() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ set_io_bit(int, int /*<<< orphan*/);
void TOSH_MAKE_RADIO_CSN_OUTPUT() { set_io_bit(-3, 0); }


x86 assembly (clang, -O0):
<TOSH_MAKE_RADIO_CSN_OUTPUT>:
push   %rbp
mov    %rsp,%rbp
mov    $0xfffffffd,%edi
xor    %esi,%esi
call   1030 <set_io_bit@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<TOSH_MAKE_RADIO_CSN_OUTPUT>:
mov    $0xfffffffd,%edi
xor    %esi,%esi
jmp    1030 <set_io_bit@plt>

LLVM IR (-O0):
define void @TOSH_MAKE_RADIO_CSN_OUTPUT() {
%1 = call i32 @set_io_bit(i32 -3, i32 0)
ret void
}

LLVM IR (-O2):
define void @TOSH_MAKE_RADIO_CSN_OUTPUT() {
%1 = tail call i32 @set_io_bit(i32 -3, i32 0)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *);
void gen_footers(FILE *of) { fprintf(of, "#endif /*__DSPTABLES_H__*/\n"); }


x86 assembly (clang, -O0):
<gen_footers>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xed9(%rip),%rsi
call   1030 <fprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gen_footers>:
mov    %rdi,%rcx
lea    0xee6(%rip),%rdi
mov    $0x1b,%esi
mov    $0x1,%edx
jmp    1030 <fwrite@plt>

LLVM IR (-O0):
@.str = [28 x i8] c"#endif /*__DSPTABLES_H__*/\0A\00"
define void @gen_footers(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = call i32 @fprintf(i32* %3, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [28 x i8] c"#endif /*__DSPTABLES_H__*/\0A\00"
define void @gen_footers(i32* nocapture %0) {
%2 = tail call i64 @fwrite(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0), i64 27, i64 1, i32* %0)
ret void
}
/* Type definitions */
typedef int int32_t;

/* Variables and functions */
void cast_float_to_int_Bad_FN() {
  char arr[10];
  float x = 15000000000.0;
  int32_t y = (int32_t)x;
  if (y < 10) {
    arr[y] = 0;
  }
}


x86 assembly (clang, -O0):
<cast_float_to_int_Bad_FN>:
push   %rbp
mov    %rsp,%rbp
movss  0xef4(%rip),%xmm0
movss  %xmm0,-0x10(%rbp)
cvttss2si -0x10(%rbp),%eax
mov    %eax,-0x14(%rbp)
cmpl   $0xa,-0x14(%rbp)
jge    112c <cast_float_to_int_Bad_FN+0x2c>
movslq -0x14(%rbp),%rax
movb   $0x0,-0xa(%rbp,%rax,1)
pop    %rbp
ret

x86 assembly (clang, -O2):
<cast_float_to_int_Bad_FN>:
ret

LLVM IR (-O0):
define void @cast_float_to_int_Bad_FN() {
%1 = alloca [10 x i8]
%2 = alloca float
%3 = alloca i32
store float 0x420BF08EC0000000, float* %2
%4 = load float, float* %2
%5 = fptosi float %4 to i32
store i32 %5, i32* %3
%6 = load i32, i32* %3
%7 = icmp slt i32 %6, 10
br i1 %7, label %8, label %12
8: ; preds = %0
%9 = load i32, i32* %3
%10 = sext i32 %9 to i64
%11 = getelementptr inbounds [10 x i8], [10 x i8]* %1, i64 0, i64 %10
store i8 0, i8* %11
br label %12
12: ; preds = %8, %0
ret void
}

LLVM IR (-O2):
define void @cast_float_to_int_Bad_FN() {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;
struct hle_t {
  int dummy;
};

/* Variables and functions */
void SEGMENT(struct hle_t *UNUSED_hle __attribute__((__unused__)),
             uint32_t UNUSED_w1 __attribute__((__unused__)),
             uint32_t UNUSED_w2 __attribute__((__unused__))) {}


x86 assembly (clang, -O0):
<SEGMENT>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
pop    %rbp
ret

x86 assembly (clang, -O2):
<SEGMENT>:
ret

LLVM IR (-O0):
%struct.hle_t = type { i32 }
define void @SEGMENT(%struct.hle_t* %0, i32 %1, i32 %2) {
%4 = alloca %struct.hle_t*
%5 = alloca i32
%6 = alloca i32
store %struct.hle_t* %0, %struct.hle_t** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
ret void
}

LLVM IR (-O2):
%struct.hle_t = type { i32 }
define void @SEGMENT(%struct.hle_t* nocapture %0, i32 %1, i32 %2) {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ pthread_t;

/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ perror(char *);
scalar_t__ pthread_join(int /*<<< orphan*/, void **);
void *wait_thread(pthread_t id) {
  void *retval;
  if (pthread_join(id, &retval) != 0) {
    perror("pthread_join");
    exit(-1);
  }
  return (retval);
}


x86 assembly (clang, -O0):
<wait_thread>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
lea    -0x10(%rbp),%rsi
call   1050 <pthread_join@plt>
cmp    $0x0,%rax
je     1167 <wait_thread+0x37>
lea    0xea8(%rip),%rdi
call   1030 <perror@plt>
mov    $0xffffffff,%edi
call   1040 <exit@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<wait_thread>:
push   %rax
mov    %rsp,%rsi
call   1050 <pthread_join@plt>
test   %rax,%rax
jne    1144 <wait_thread+0x14>
mov    (%rsp),%rax
pop    %rcx
ret
lea    0xeb5(%rip),%rdi
call   1030 <perror@plt>
mov    $0xffffffff,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [13 x i8] c"pthread_join\00"
define i8* @wait_thread(i32 %0) {
%2 = alloca i32
%3 = alloca i8*
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = call i64 @pthread_join(i32 %4, i8** %3)
%6 = icmp ne i64 %5, 0
br i1 %6, label %7, label %10
7: ; preds = %1
%8 = call i32 @perror(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
%9 = call i32 @exit(i32 -1)
unreachable
10: ; preds = %1
%11 = load i8*, i8** %3
ret i8* %11
}

LLVM IR (-O2):
@.str = [13 x i8] c"pthread_join\00"
define i8* @wait_thread(i32 %0) {
%2 = alloca i8*
%3 = bitcast i8** %2 to i8*
%4 = call i64 @pthread_join(i32 %0, i8** %2)
%5 = icmp eq i64 %4, 0
br i1 %5, label %9, label %6
6: ; preds = %1
%7 = call i32 @perror(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
%8 = call i32 @exit(i32 -1)
unreachable
9: ; preds = %1
%10 = load i8*, i8** %2
ret i8* %10
}
/* Variables and functions */
int /*<<< orphan*/ system(char *);
int main() {
  system("less +F log-2017-06-09.log");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeda(%rip),%rdi
call   1030 <system@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <system@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [27 x i8] c"less +F log-2017-06-09.log\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @system(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [27 x i8] c"less +F log-2017-06-09.log\00"
define i32 @main() {
%1 = tail call i32 @system(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int f(int);
int g(int x) {
  if (x <= 0)
    return 0;
  else
    return f(x - 1) + f(x - 2);
}


x86 assembly (clang, -O0):
<g>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jg     1131 <g+0x21>
movl   $0x0,-0x4(%rbp)
jmp    1154 <g+0x44>
mov    -0x8(%rbp),%edi
sub    $0x1,%edi
call   1030 <f@plt>
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%edi
sub    $0x2,%edi
call   1030 <f@plt>
mov    %eax,%ecx
mov    -0xc(%rbp),%eax
add    %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<g>:
test   %edi,%edi
jle    1136 <g+0x26>
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebx
lea    -0x1(%rbx),%edi
call   1030 <f@plt>
mov    %eax,%ebp
add    $0xfffffffe,%ebx
mov    %ebx,%edi
call   1030 <f@plt>
add    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @g(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = icmp sle i32 %4, 0
br i1 %5, label %6, label %7
6: ; preds = %1
store i32 0, i32* %2
br label %15
7: ; preds = %1
%8 = load i32, i32* %3
%9 = sub nsw i32 %8, 1
%10 = call i32 @f(i32 %9)
%11 = load i32, i32* %3
%12 = sub nsw i32 %11, 2
%13 = call i32 @f(i32 %12)
%14 = add nsw i32 %10, %13
store i32 %14, i32* %2
br label %15
15: ; preds = %7, %6
%16 = load i32, i32* %2
ret i32 %16
}

LLVM IR (-O2):
define i32 @g(i32 %0) {
%2 = icmp slt i32 %0, 1
br i1 %2, label %9, label %3
3: ; preds = %1
%4 = add nsw i32 %0, -1
%5 = tail call i32 @f(i32 %4)
%6 = add nsw i32 %0, -2
%7 = tail call i32 @f(i32 %6)
%8 = add nsw i32 %7, %5
br label %9
9: ; preds = %1, %3
%10 = phi i32 [ %8, %3 ], [ 0, %1 ]
ret i32 %10
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void test_pass(int temp) { printf("Test passed!\n"); }


x86 assembly (clang, -O0):
<test_pass>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
lea    0xede(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_pass>:
lea    0xee9(%rip),%rdi
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [14 x i8] c"Test passed!\0A\00"
define void @test_pass(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [13 x i8] c"Test passed!\00"
define void @test_pass(i32 %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ __coverity_tainted_data_sink__(char const *);
int setenv(const char *key, const char *value, int overwrite) {
  __coverity_tainted_data_sink__(key);
  __coverity_tainted_data_sink__(value);
}


x86 assembly (clang, -O0):
<setenv>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %edx,-0x1c(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <__coverity_tainted_data_sink__@plt>
mov    -0x18(%rbp),%rdi
call   1030 <__coverity_tainted_data_sink__@plt>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<setenv>:
push   %rbx
mov    %rsi,%rbx
call   1030 <__coverity_tainted_data_sink__@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <__coverity_tainted_data_sink__@plt>

LLVM IR (-O0):
define i32 @setenv(i8* %0, i8* %1, i32 %2) {
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i32
store i8* %0, i8** %5
store i8* %1, i8** %6
store i32 %2, i32* %7
%8 = load i8*, i8** %5
%9 = call i32 @__coverity_tainted_data_sink__(i8* %8)
%10 = load i8*, i8** %6
%11 = call i32 @__coverity_tainted_data_sink__(i8* %10)
%12 = load i32, i32* %4
ret i32 %12
}

LLVM IR (-O2):
define i32 @setenv(i8* %0, i8* %1, i32 %2) {
%4 = tail call i32 @__coverity_tainted_data_sink__(i8* %0)
%5 = tail call i32 @__coverity_tainted_data_sink__(i8* %1)
ret i32 undef
}
void yy_2_InlineContentChoice(char *yytext, int yyleng) {
  ;
  ;
}


x86 assembly (clang, -O0):
<yy_2_InlineContentChoice>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
pop    %rbp
ret

x86 assembly (clang, -O2):
<yy_2_InlineContentChoice>:
ret

LLVM IR (-O0):
define void @yy_2_InlineContentChoice(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
ret void
}

LLVM IR (-O2):
define void @yy_2_InlineContentChoice(i8* nocapture %0, i32 %1) {
ret void
}
/* Variables and functions */
int ReadLine(int const, char *, size_t const, size_t *);
int /*<<< orphan*/ WriteToSocket(int const, char *, size_t);
int HandleConnection(const int slave) {
  char readbuf[1025];
  size_t bytesRead;
  const size_t buflen = 1024;
  int retval;
  retval = ReadLine(slave, readbuf, buflen, &bytesRead);
  if (retval == 0)
    WriteToSocket(slave, readbuf, bytesRead);
  return retval;
}


x86 assembly (clang, -O0):
<HandleConnection>:
push   %rbp
mov    %rsp,%rbp
sub    $0x430,%rsp
mov    %edi,-0x4(%rbp)
movq   $0x400,-0x420(%rbp)
mov    -0x4(%rbp),%edi
lea    -0x410(%rbp),%rsi
mov    $0x400,%edx
lea    -0x418(%rbp),%rcx
call   1030 <ReadLine@plt>
mov    %eax,-0x424(%rbp)
cmpl   $0x0,-0x424(%rbp)
jne    117d <HandleConnection+0x5d>
mov    -0x4(%rbp),%edi
lea    -0x410(%rbp),%rsi
mov    -0x418(%rbp),%rdx
call   1040 <WriteToSocket@plt>
mov    -0x424(%rbp),%eax
add    $0x430,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<HandleConnection>:
push   %rbp
push   %rbx
sub    $0x418,%rsp
mov    %edi,%ebx
lea    0x10(%rsp),%rsi
lea    0x8(%rsp),%rcx
mov    $0x400,%edx
call   1030 <ReadLine@plt>
mov    %eax,%ebp
test   %eax,%eax
jne    1156 <HandleConnection+0x36>
mov    0x8(%rsp),%rdx
lea    0x10(%rsp),%rsi
mov    %ebx,%edi
call   1040 <WriteToSocket@plt>
mov    %ebp,%eax
add    $0x418,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @HandleConnection(i32 %0) {
%2 = alloca i32
%3 = alloca [1025 x i8]
%4 = alloca i64
%5 = alloca i64
%6 = alloca i32
store i32 %0, i32* %2
store i64 1024, i64* %5
%7 = load i32, i32* %2
%8 = getelementptr inbounds [1025 x i8], [1025 x i8]* %3, i64 0, i64 0
%9 = call i32 @ReadLine(i32 %7, i8* %8, i64 1024, i64* %4)
store i32 %9, i32* %6
%10 = load i32, i32* %6
%11 = icmp eq i32 %10, 0
br i1 %11, label %12, label %17
12: ; preds = %1
%13 = load i32, i32* %2
%14 = getelementptr inbounds [1025 x i8], [1025 x i8]* %3, i64 0, i64 0
%15 = load i64, i64* %4
%16 = call i32 @WriteToSocket(i32 %13, i8* %14, i64 %15)
br label %17
17: ; preds = %12, %1
%18 = load i32, i32* %6
ret i32 %18
}

LLVM IR (-O2):
define i32 @HandleConnection(i32 %0) {
%2 = alloca [1025 x i8]
%3 = alloca i64
%4 = getelementptr inbounds [1025 x i8], [1025 x i8]* %2, i64 0, i64 0
%5 = bitcast i64* %3 to i8*
%6 = call i32 @ReadLine(i32 %0, i8* %4, i64 1024, i64* %3)
%7 = icmp eq i32 %6, 0
br i1 %7, label %8, label %11
8: ; preds = %1
%9 = load i64, i64* %3
%10 = call i32 @WriteToSocket(i32 %0, i8* %4, i64 %9)
br label %11
11: ; preds = %8, %1
ret i32 %6
}
long long int highBit(long long int n) {
  n |= (n >> 1);
  n |= (n >> 2);
  n |= (n >> 4);
  n |= (n >> 8);
  n |= (n >> 16);
  n |= (n >> 32);
  return n - (n >> 1);
}


x86 assembly (clang, -O0):
<highBit>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
sar    $0x1,%rax
or     -0x8(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
sar    $0x2,%rax
or     -0x8(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
sar    $0x4,%rax
or     -0x8(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
sar    $0x8,%rax
or     -0x8(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
sar    $0x10,%rax
or     -0x8(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
sar    $0x20,%rax
or     -0x8(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    -0x8(%rbp),%rcx
sar    $0x1,%rcx
sub    %rcx,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<highBit>:
mov    %rdi,%rax
sar    %rax
or     %rdi,%rax
mov    %rax,%rcx
sar    $0x2,%rcx
or     %rax,%rcx
mov    %rcx,%rax
sar    $0x4,%rax
or     %rcx,%rax
mov    %rax,%rcx
sar    $0x8,%rcx
or     %rax,%rcx
mov    %rcx,%rdx
sar    $0x10,%rdx
or     %rcx,%rdx
mov    %rdx,%rax
sar    $0x20,%rax
or     %rdx,%rax
mov    %rax,%rcx
sar    %rcx
sub    %rcx,%rax
ret

LLVM IR (-O0):
define i64 @highBit(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = ashr i64 %3, 1
%5 = load i64, i64* %2
%6 = or i64 %5, %4
store i64 %6, i64* %2
%7 = load i64, i64* %2
%8 = ashr i64 %7, 2
%9 = load i64, i64* %2
%10 = or i64 %9, %8
store i64 %10, i64* %2
%11 = load i64, i64* %2
%12 = ashr i64 %11, 4
%13 = load i64, i64* %2
%14 = or i64 %13, %12
store i64 %14, i64* %2
%15 = load i64, i64* %2
%16 = ashr i64 %15, 8
%17 = load i64, i64* %2
%18 = or i64 %17, %16
store i64 %18, i64* %2
%19 = load i64, i64* %2
%20 = ashr i64 %19, 16
%21 = load i64, i64* %2
%22 = or i64 %21, %20
store i64 %22, i64* %2
%23 = load i64, i64* %2
%24 = ashr i64 %23, 32
%25 = load i64, i64* %2
%26 = or i64 %25, %24
store i64 %26, i64* %2
%27 = load i64, i64* %2
%28 = load i64, i64* %2
%29 = ashr i64 %28, 1
%30 = sub nsw i64 %27, %29
ret i64 %30
}

LLVM IR (-O2):
define i64 @highBit(i64 %0) {
%2 = ashr i64 %0, 1
%3 = or i64 %2, %0
%4 = ashr i64 %3, 2
%5 = or i64 %4, %3
%6 = ashr i64 %5, 4
%7 = or i64 %6, %5
%8 = ashr i64 %7, 8
%9 = or i64 %8, %7
%10 = ashr i64 %9, 16
%11 = or i64 %10, %9
%12 = ashr i64 %11, 32
%13 = or i64 %12, %11
%14 = ashr i64 %13, 1
%15 = sub nsw i64 %13, %14
ret i64 %15
}
/* Variables and functions */
int /*<<< orphan*/ activateOverthrower();
int /*<<< orphan*/ deactivateOverthrower();
void *mallocMemsetFree();
int /*<<< orphan*/ pauseOverthrower(int /*<<< orphan*/);
int /*<<< orphan*/ resumeOverthrower();
void *somePureCFunction() {
  mallocMemsetFree();
  activateOverthrower();
  pauseOverthrower(0);
  mallocMemsetFree();
  resumeOverthrower();
  void *ptr = mallocMemsetFree();
  deactivateOverthrower();
  return ptr;
}


x86 assembly (clang, -O0):
<somePureCFunction>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1040 <mallocMemsetFree@plt>
mov    $0x0,%al
call   1030 <activateOverthrower@plt>
xor    %edi,%edi
call   1060 <pauseOverthrower@plt>
mov    $0x0,%al
call   1040 <mallocMemsetFree@plt>
mov    $0x0,%al
call   1050 <resumeOverthrower@plt>
mov    $0x0,%al
call   1040 <mallocMemsetFree@plt>
mov    %rax,-0x8(%rbp)
mov    $0x0,%al
call   1070 <deactivateOverthrower@plt>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<somePureCFunction>:
push   %rbx
xor    %eax,%eax
call   1040 <mallocMemsetFree@plt>
xor    %eax,%eax
call   1030 <activateOverthrower@plt>
xor    %edi,%edi
call   1060 <pauseOverthrower@plt>
xor    %eax,%eax
call   1040 <mallocMemsetFree@plt>
xor    %eax,%eax
call   1050 <resumeOverthrower@plt>
xor    %eax,%eax
call   1040 <mallocMemsetFree@plt>
mov    %rax,%rbx
xor    %eax,%eax
call   1070 <deactivateOverthrower@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
define i8* @somePureCFunction() {
%1 = alloca i8*
%2 = call i8* (...) @mallocMemsetFree()
%3 = call i32 (...) @activateOverthrower()
%4 = call i32 @pauseOverthrower(i32 0)
%5 = call i8* (...) @mallocMemsetFree()
%6 = call i32 (...) @resumeOverthrower()
%7 = call i8* (...) @mallocMemsetFree()
store i8* %7, i8** %1
%8 = call i32 (...) @deactivateOverthrower()
%9 = load i8*, i8** %1
ret i8* %9
}

LLVM IR (-O2):
define i8* @somePureCFunction() {
%1 = tail call i8* (...) @mallocMemsetFree()
%2 = tail call i32 (...) @activateOverthrower()
%3 = tail call i32 @pauseOverthrower(i32 0)
%4 = tail call i8* (...) @mallocMemsetFree()
%5 = tail call i32 (...) @resumeOverthrower()
%6 = tail call i8* (...) @mallocMemsetFree()
%7 = tail call i32 (...) @deactivateOverthrower()
ret i8* %6
}
int fun831() { return 831; }


x86 assembly (clang, -O0):
<fun831>:
push   %rbp
mov    %rsp,%rbp
mov    $0x33f,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<fun831>:
mov    $0x33f,%eax
ret

LLVM IR (-O0):
define i32 @fun831() {
ret i32 831
}

LLVM IR (-O2):
define i32 @fun831() {
ret i32 831
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int baud_encode(int bps) {
  switch (bps) {}
  printf("Unknown baud\n");
  return -1;
}


x86 assembly (clang, -O0):
<baud_encode>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
lea    0xede(%rip),%rdi
call   1030 <printf@plt>
mov    $0xffffffff,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<baud_encode>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <puts@plt>
mov    $0xffffffff,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [14 x i8] c"Unknown baud\0A\00"
define i32 @baud_encode(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
switch i32 %3, label %4 [
]
4: ; preds = %1
%5 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
ret i32 -1
}

LLVM IR (-O2):
@str = [13 x i8] c"Unknown baud\00"
define i32 @baud_encode(i32 %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @str, i64 0, i64 0))
ret i32 -1
}
/* Type definitions */
typedef scalar_t__ int32_t;

/* Variables and functions */
scalar_t__ sqrt(double);
int32_t inorm(int32_t a, int32_t b) {
  return sqrt((double)a * (double)a + (double)b * (double)b);
}


x86 assembly (clang, -O0):
<inorm>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cvtsi2sdq -0x8(%rbp),%xmm0
cvtsi2sdq -0x8(%rbp),%xmm2
cvtsi2sdq -0x10(%rbp),%xmm1
cvtsi2sdq -0x10(%rbp),%xmm3
mulsd  %xmm3,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
call   1030 <sqrt@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<inorm>:
cvtsi2sd %rdi,%xmm0
cvtsi2sd %rsi,%xmm1
mulsd  %xmm1,%xmm1
mulsd  %xmm0,%xmm0
addsd  %xmm1,%xmm0
jmp    1030 <sqrt@plt>

LLVM IR (-O0):
define i64 @inorm(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%5 = load i64, i64* %3
%6 = sitofp i64 %5 to double
%7 = load i64, i64* %3
%8 = sitofp i64 %7 to double
%9 = load i64, i64* %4
%10 = sitofp i64 %9 to double
%11 = load i64, i64* %4
%12 = sitofp i64 %11 to double
%13 = fmul double %10, %12
%14 = call double @llvm.fmuladd.f64(double %6, double %8, double %13)
%15 = call i64 @sqrt(double %14)
ret i64 %15
}

LLVM IR (-O2):
define i64 @inorm(i64 %0, i64 %1) {
%3 = sitofp i64 %0 to double
%4 = sitofp i64 %1 to double
%5 = fmul double %4, %4
%6 = tail call double @llvm.fmuladd.f64(double %3, double %3, double %5)
%7 = tail call i64 @sqrt(double %6)
ret i64 %7
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
int /*<<< orphan*/ send(int, char *, scalar_t__, int /*<<< orphan*/);
scalar_t__ strlen(char *);
void send_msg(int clientfd, char *msg) {
  printf("Writing to Socket: %s\n", msg);
  send(clientfd, msg, strlen(msg) + 1, 0);
}


x86 assembly (clang, -O0):
<send_msg>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rsi
lea    0xeb6(%rip),%rdi
call   1050 <printf@plt>
mov    -0x4(%rbp),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <strlen@plt>
mov    -0x1c(%rbp),%edi
mov    -0x18(%rbp),%rsi
mov    %rax,%rdx
add    $0x1,%rdx
xor    %ecx,%ecx
call   1040 <send@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<send_msg>:
push   %rbp
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %edi,%ebp
lea    0xec1(%rip),%rdi
call   1050 <printf@plt>
mov    %rbx,%rdi
call   1030 <strlen@plt>
lea    0x1(%rax),%rdx
mov    %ebp,%edi
mov    %rbx,%rsi
xor    %ecx,%ecx
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1040 <send@plt>

LLVM IR (-O0):
@.str = [23 x i8] c"Writing to Socket: %s\0A\00"
define void @send_msg(i32 %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
store i32 %0, i32* %3
store i8* %1, i8** %4
%5 = load i8*, i8** %4
%6 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i8* %5)
%7 = load i32, i32* %3
%8 = load i8*, i8** %4
%9 = load i8*, i8** %4
%10 = call i64 @strlen(i8* %9)
%11 = add nsw i64 %10, 1
%12 = call i32 @send(i32 %7, i8* %8, i64 %11, i32 0)
ret void
}

LLVM IR (-O2):
@.str = [23 x i8] c"Writing to Socket: %s\0A\00"
define void @send_msg(i32 %0, i8* %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i8* %1)
%4 = tail call i64 @strlen(i8* dereferenceable(1) %1)
%5 = add nsw i64 %4, 1
%6 = tail call i32 @send(i32 %0, i8* %1, i64 %5, i32 0)
ret void
}