xunge/DecIR huggingface dataset:
char *skip_white(char *sin) {
  char *s;
  for (s = sin; (*s == ' ') || (*s == '\t'); s++)
    ;
  return (s);
}


x86 assembly (clang, -O0):
<skip_white>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movsbl (%rax),%ecx
mov    $0x1,%al
cmp    $0x20,%ecx
mov    %al,-0x11(%rbp)
je     1135 <skip_white+0x35>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x9,%eax
sete   %al
mov    %al,-0x11(%rbp)
mov    -0x11(%rbp),%al
test   $0x1,%al
jne    1145 <skip_white+0x45>
jmp    115b <skip_white+0x5b>
jmp    114a <skip_white+0x4a>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1110 <skip_white+0x10>
mov    -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<skip_white>:
mov    %rdi,%rax
jmp    1114 <skip_white+0x14>
cs nopw 0x0(%rax,%rax,1)
nop
add    $0x1,%rax
movzbl (%rax),%ecx
cmp    $0x20,%cl
je     1110 <skip_white+0x10>
cmp    $0x9,%cl
je     1110 <skip_white+0x10>
ret

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

LLVM IR (-O2):
define i8* @skip_white(i8* %0) {
br label %2
2: ; preds = %5, %1
%3 = phi i8* [ %0, %1 ], [ %6, %5 ]
%4 = load i8, i8* %3
switch i8 %4, label %7 [
i8 32, label %5
i8 9, label %5
]
5: ; preds = %2, %2
%6 = getelementptr inbounds i8, i8* %3, i64 1
br label %2
7: ; preds = %2
ret i8* %3
}
int test5(int e) { return ~e & 1; }


x86 assembly (clang, -O0):
<test5>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
xor    $0xffffffff,%eax
and    $0x1,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test5>:
mov    %edi,%eax
not    %eax
and    $0x1,%eax
ret

LLVM IR (-O0):
define i32 @test5(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = xor i32 %3, -1
%5 = and i32 %4, 1
ret i32 %5
}

LLVM IR (-O2):
define i32 @test5(i32 %0) {
%2 = and i32 %0, 1
%3 = xor i32 %2, 1
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ testList_1();
int /*<<< orphan*/ testList_2();
void testList() {
  testList_1();
  testList_2();
}


x86 assembly (clang, -O0):
<testList>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <testList_1@plt>
mov    $0x0,%al
call   1030 <testList_2@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<testList>:
push   %rax
xor    %eax,%eax
call   1040 <testList_1@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <testList_2@plt>

LLVM IR (-O0):
define void @testList() {
%1 = call i32 (...) @testList_1()
%2 = call i32 (...) @testList_2()
ret void
}

LLVM IR (-O2):
define void @testList() {
%1 = tail call i32 (...) @testList_1()
%2 = tail call i32 (...) @testList_2()
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;
struct file_object {
  int dummy;
};
typedef int /*<<< orphan*/ int32_t;

/* Variables and functions */
int /*<<< orphan*/ console_write(char *, int /*<<< orphan*/);
int32_t console_write_dev(struct file_object *file, char *buf, uint32_t count) {
  return console_write(buf, count);
}


x86 assembly (clang, -O0):
<console_write_dev>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x14(%rbp),%esi
call   1030 <console_write@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<console_write_dev>:
mov    %rsi,%rdi
mov    %edx,%esi
jmp    1030 <console_write@plt>

LLVM IR (-O0):
%struct.file_object = type { i32 }
define i32 @console_write_dev(%struct.file_object* %0, i8* %1, i32 %2) {
%4 = alloca %struct.file_object*
%5 = alloca i8*
%6 = alloca i32
store %struct.file_object* %0, %struct.file_object** %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%7 = load i8*, i8** %5
%8 = load i32, i32* %6
%9 = call i32 @console_write(i8* %7, i32 %8)
ret i32 %9
}

LLVM IR (-O2):
%struct.file_object = type { i32 }
define i32 @console_write_dev(%struct.file_object* nocapture readnone %0, i8* %1, i32 %2) {
%4 = tail call i32 @console_write(i8* %1, i32 %2)
ret i32 %4
}
__attribute__((unused)) float apply_policy(__attribute__((unused)) int core) {
  return 0.0;
}


x86 assembly (clang, -O0):
<apply_policy>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
xorps  %xmm0,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<apply_policy>:
xorps  %xmm0,%xmm0
ret

LLVM IR (-O0):
define float @apply_policy(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
ret float 0.000000e+00
}

LLVM IR (-O2):
define float @apply_policy(i32 %0) {
ret float 0.000000e+00
}
int main() {
  long salary;
  long *salary_ptr;
  salary = 50000;
  salary_ptr = &salary;
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movq   $0xc350,-0x10(%rbp)
lea    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i64
%3 = alloca i64*
store i32 0, i32* %1
store i64 50000, i64* %2
store i64* %2, i64** %3
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int pa_idxset_trivial_compare_func() {
  printf("NOT IMPLEMENTED:"
         "pa_idxset_trivial_compare_func"
         "\n");
}


x86 assembly (clang, -O0):
<pa_idxset_trivial_compare_func>:
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_idxset_trivial_compare_func>:
lea    0xee9(%rip),%rdi
jmp    1030 <puts@plt>

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

LLVM IR (-O2):
@str = [47 x i8] c"NOT IMPLEMENTED:pa_idxset_trivial_compare_func\00"
define i32 @pa_idxset_trivial_compare_func() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([47 x i8], [47 x i8]* @str, i64 0, i64 0))
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ server(int);
int main(int argc, char const *argv[]) {
  server(8021);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x1f55,%edi
call   1030 <server@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x1f55,%edi
call   1030 <server@plt>
xor    %eax,%eax
pop    %rcx
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 = call i32 @server(i32 8021)
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @server(i32 8021)
ret i32 0
}
char test_73_0(char *mem) { return __atomic_nand_fetch(mem + 4, -1, 4); }


x86 assembly (clang, -O0):
<test_73_0>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x4,%rcx
mov    %rcx,-0x18(%rbp)
movb   $0xff,-0x9(%rbp)
mov    -0x9(%rbp),%cl
mov    %cl,-0xc(%rbp)
mov    0x4(%rax),%al
mov    %al,-0xb(%rbp)
mov    -0xb(%rbp),%al
mov    -0x18(%rbp),%rcx
mov    -0xc(%rbp),%sil
mov    %al,%dl
and    %sil,%dl
mov    %dl,-0x1a(%rbp)
not    %dl
lock cmpxchg %dl,(%rcx)
sete   %cl
mov    %al,-0x19(%rbp)
test   $0x1,%cl
mov    %al,-0xb(%rbp)
jne    1157 <test_73_0+0x57>
jmp    1127 <test_73_0+0x27>
mov    -0xc(%rbp),%cl
mov    -0x19(%rbp),%al
and    %cl,%al
xor    $0xff,%al
mov    %al,-0xa(%rbp)
movsbl -0xa(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_73_0>:
mov    0x4(%rdi),%al
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    %eax,%ecx
not    %cl
lock cmpxchg %cl,0x4(%rdi)
jne    1110 <test_73_0+0x10>
not    %al
ret

LLVM IR (-O0):
define signext i8 @test_73_0(i8* %0) {
%2 = alloca i8*
%3 = alloca i8
%4 = alloca i8
store i8* %0, i8** %2
%5 = load i8*, i8** %2
%6 = getelementptr inbounds i8, i8* %5, i64 4
store i8 -1, i8* %3
%7 = load i8, i8* %3
%8 = atomicrmw nand i8* %6, i8 %7 acq_rel
%9 = and i8 %8, %7
%10 = xor i8 %9, -1
store i8 %10, i8* %4
%11 = load i8, i8* %4
ret i8 %11
}

LLVM IR (-O2):
define signext i8 @test_73_0(i8* nocapture %0) {
%2 = getelementptr inbounds i8, i8* %0, i64 4
%3 = atomicrmw nand i8* %2, i8 -1 acq_rel
%4 = xor i8 %3, -1
ret i8 %4
}
int g(int i) { return 0; }


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

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

LLVM IR (-O0):
define i32 @g(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
ret i32 0
}

LLVM IR (-O2):
define i32 @g(i32 %0) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isspace(int);
void t_isspace_0x60() {
  Assert_real((isspace(96) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_isspace.c",
              485, ("isspace should be 0 for `"));
}


x86 assembly (clang, -O0):
<t_isspace_0x60>:
push   %rbp
mov    %rsp,%rbp
mov    $0x60,%edi
call   1030 <isspace@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xebf(%rip),%rsi
mov    $0x1e5,%edx
lea    0xf5b(%rip),%rcx
call   1040 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_isspace_0x60>:
push   %rax
mov    $0x60,%edi
call   1030 <isspace@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x1e5,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

LLVM IR (-O0):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isspace.c\00"
@.str.1 = [26 x i8] c"isspace should be 0 for `\00"
define void @t_isspace_0x60() {
%1 = call i64 @isspace(i32 96)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 485, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isspace.c\00"
@.str.1 = [26 x i8] c"isspace should be 0 for `\00"
define void @t_isspace_0x60() {
%1 = tail call i64 @isspace(i32 96)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 485, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ wint_t;
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ ungetwc(int /*<<< orphan*/, int /*<<< orphan*/ *);
void uninitvar_ungetwc(void) {
  wint_t c;
  FILE *stream;
  (void)ungetwc(c, stream);
}


x86 assembly (clang, -O0):
<uninitvar_ungetwc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1030 <ungetwc@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<uninitvar_ungetwc>:
jmp    1030 <ungetwc@plt>

LLVM IR (-O0):
define void @uninitvar_ungetwc() {
%1 = alloca i32
%2 = alloca i32*
%3 = load i32, i32* %1
%4 = load i32*, i32** %2
%5 = call i32 @ungetwc(i32 %3, i32* %4)
ret void
}

LLVM IR (-O2):
define void @uninitvar_ungetwc() {
%1 = tail call i32 @ungetwc(i32 undef, i32* undef)
ret void
}
int openssl_init_fork_handlers(void) { return 0; }


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

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

LLVM IR (-O0):
define i32 @openssl_init_fork_handlers() {
ret i32 0
}

LLVM IR (-O2):
define i32 @openssl_init_fork_handlers() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ console_put_char(char);
int _write(int file, char *ptr, int len) {
  int i;
  for (i = 0; i < len; i++, ptr++) {
    console_put_char(*ptr);
  }
  return i;
}


x86 assembly (clang, -O0):
<_write>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
movl   $0x0,-0x18(%rbp)
mov    -0x18(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    115b <_write+0x4b>
mov    -0x10(%rbp),%rax
movsbl (%rax),%edi
call   1030 <console_put_char@plt>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1129 <_write+0x19>
mov    -0x18(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_write>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
test   %edx,%edx
jle    1144 <_write+0x34>
mov    %edx,%r14d
mov    %rsi,%r15
mov    %edx,%ebp
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nop
movsbl (%r15,%rbx,1),%edi
call   1030 <console_put_char@plt>
add    $0x1,%rbx
cmp    %ebx,%ebp
jne    1130 <_write+0x20>
jmp    1147 <_write+0x37>
xor    %r14d,%r14d
mov    %r14d,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define i32 @_write(i32 %0, i8* %1, i32 %2) {
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i32
%7 = alloca i32
store i32 %0, i32* %4
store i8* %1, i8** %5
store i32 %2, i32* %6
store i32 0, i32* %7
br label %8
8: ; preds = %16, %3
%9 = load i32, i32* %7
%10 = load i32, i32* %6
%11 = icmp slt i32 %9, %10
br i1 %11, label %12, label %21
12: ; preds = %8
%13 = load i8*, i8** %5
%14 = load i8, i8* %13
%15 = call i32 @console_put_char(i8 signext %14)
br label %16
16: ; preds = %12
%17 = load i32, i32* %7
%18 = add nsw i32 %17, 1
store i32 %18, i32* %7
%19 = load i8*, i8** %5
%20 = getelementptr inbounds i8, i8* %19, i32 1
store i8* %20, i8** %5
br label %8
21: ; preds = %8
%22 = load i32, i32* %7
ret i32 %22
}

LLVM IR (-O2):
define i32 @_write(i32 %0, i8* nocapture %1, i32 %2) {
%4 = icmp sgt i32 %2, 0
br i1 %4, label %5, label %13
5: ; preds = %3, %5
%6 = phi i32 [ %10, %5 ], [ 0, %3 ]
%7 = phi i8* [ %11, %5 ], [ %1, %3 ]
%8 = load i8, i8* %7
%9 = tail call i32 @console_put_char(i8 signext %8)
%10 = add nuw nsw i32 %6, 1
%11 = getelementptr inbounds i8, i8* %7, i64 1
%12 = icmp eq i32 %10, %2
br i1 %12, label %13, label %5
13: ; preds = %5, %3
%14 = phi i32 [ 0, %3 ], [ %2, %5 ]
ret i32 %14
}
/* Variables and functions */
int EXIT_FAILURE;
scalar_t__ EXIT_SUCCESS;
scalar_t__ ft_putchar(char);
int ft_putmemchar(void *, size_t);
int ft_putmemcharl(void *ptr, size_t n) {
  int ret;
  ret = ft_putmemchar(ptr, n);
  ret = ft_putchar('\n') == EXIT_SUCCESS ? ret : EXIT_FAILURE;
  return (ret);
}


x86 assembly (clang, -O0):
<ft_putmemcharl>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1040 <ft_putmemchar@plt>
mov    %eax,-0x14(%rbp)
mov    $0xa,%edi
call   1030 <ft_putchar@plt>
mov    0x2e87(%rip),%rcx
cmp    (%rcx),%rax
jne    1165 <ft_putmemcharl+0x45>
mov    -0x14(%rbp),%eax
mov    %eax,-0x18(%rbp)
jmp    1171 <ft_putmemcharl+0x51>
mov    0x2e74(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x18(%rbp)
mov    -0x18(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_putmemcharl>:
push   %rbx
call   1040 <ft_putmemchar@plt>
mov    %eax,%ebx
mov    $0xa,%edi
call   1030 <ft_putchar@plt>
mov    0x2e9f(%rip),%rcx
cmp    (%rcx),%rax
je     1147 <ft_putmemcharl+0x27>
mov    0x2e9b(%rip),%rax
mov    (%rax),%ebx
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
@EXIT_SUCCESS = global i64 0
@EXIT_FAILURE = global i32 0
define i32 @ft_putmemcharl(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
%5 = alloca i32
store i8* %0, i8** %3
store i64 %1, i64* %4
%6 = load i8*, i8** %3
%7 = load i64, i64* %4
%8 = call i32 @ft_putmemchar(i8* %6, i64 %7)
store i32 %8, i32* %5
%9 = call i64 @ft_putchar(i8 signext 10)
%10 = load i64, i64* @EXIT_SUCCESS
%11 = icmp eq i64 %9, %10
br i1 %11, label %12, label %14
12: ; preds = %2
%13 = load i32, i32* %5
br label %16
14: ; preds = %2
%15 = load i32, i32* @EXIT_FAILURE
br label %16
16: ; preds = %14, %12
%17 = phi i32 [ %13, %12 ], [ %15, %14 ]
store i32 %17, i32* %5
%18 = load i32, i32* %5
ret i32 %18
}

LLVM IR (-O2):
@EXIT_SUCCESS = global i64 0
@EXIT_FAILURE = global i32 0
define i32 @ft_putmemcharl(i8* %0, i64 %1) {
%3 = tail call i32 @ft_putmemchar(i8* %0, i64 %1)
%4 = tail call i64 @ft_putchar(i8 signext 10)
%5 = load i64, i64* @EXIT_SUCCESS
%6 = icmp eq i64 %4, %5
%7 = load i32, i32* @EXIT_FAILURE
%8 = select i1 %6, i32 %3, i32 %7
ret i32 %8
}
/* Type definitions */
struct __sk_buff {
  int mark;
};

/* Variables and functions */
int /*<<< orphan*/ act_update_drop_map();
__attribute__((section("action-mark"), used)) int
act_mark_main(struct __sk_buff *skb) {
  if (skb->mark == 0xcafe) {
    act_update_drop_map();
    return 2;
  }
  return (-1);
}


x86 assembly (clang, -O0):
<act_mark_main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
cmpl   $0xcafe,(%rax)
jne    113f <act_mark_main+0x2f>
mov    $0x0,%al
call   1030 <act_update_drop_map@plt>
movl   $0x2,-0x4(%rbp)
jmp    1146 <act_mark_main+0x36>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<act_mark_main>:
push   %rax
mov    $0xffffffff,%eax
cmpl   $0xcafe,(%rdi)
jne    112a <act_mark_main+0x1a>
xor    %eax,%eax
call   1030 <act_update_drop_map@plt>
mov    $0x2,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.__sk_buff = type { i32 }
@llvm.compiler.used = appending global [1 x i8*] [i8* bitcast (i32 (%struct.__sk_buff*)* @act_mark_main to i8*)], section "llvm.metadata"
define i32 @act_mark_main(%struct.__sk_buff* %0) section "action-mark" {
%2 = alloca i32
%3 = alloca %struct.__sk_buff*
store %struct.__sk_buff* %0, %struct.__sk_buff** %3
%4 = load %struct.__sk_buff*, %struct.__sk_buff** %3
%5 = getelementptr inbounds %struct.__sk_buff, %struct.__sk_buff* %4, i32 0, i32 0
%6 = load i32, i32* %5
%7 = icmp eq i32 %6, 51966
br i1 %7, label %8, label %10
8: ; preds = %1
%9 = call i32 (...) @act_update_drop_map()
store i32 2, i32* %2
br label %11
10: ; preds = %1
store i32 -1, i32* %2
br label %11
11: ; preds = %10, %8
%12 = load i32, i32* %2
ret i32 %12
}

LLVM IR (-O2):
%struct.__sk_buff = type { i32 }
@llvm.compiler.used = appending global [1 x i8*] [i8* bitcast (i32 (%struct.__sk_buff*)* @act_mark_main to i8*)], section "llvm.metadata"
define i32 @act_mark_main(%struct.__sk_buff* nocapture %0) section "action-mark" {
%2 = getelementptr inbounds %struct.__sk_buff, %struct.__sk_buff* %0, i64 0, i32 0
%3 = load i32, i32* %2
%4 = icmp eq i32 %3, 51966
br i1 %4, label %5, label %7
5: ; preds = %1
%6 = tail call i32 (...) @act_update_drop_map()
br label %7
7: ; preds = %1, %5
%8 = phi i32 [ 2, %5 ], [ -1, %1 ]
ret i32 %8
}
/* Variables and functions */
int DB_PrintString(char *);
int /*<<< orphan*/ myitoa(int, char *, int);
int DB_PrintNum(int number) {
  char string[100];
  int count;
  myitoa(number, &string[0], 10);
  count = DB_PrintString(&string[0]);
  return (count);
}


x86 assembly (clang, -O0):
<DB_PrintNum>:
push   %rbp
mov    %rsp,%rbp
sub    $0x80,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
lea    -0x70(%rbp),%rsi
mov    $0xa,%edx
call   1040 <myitoa@plt>
lea    -0x70(%rbp),%rdi
call   1030 <DB_PrintString@plt>
mov    %eax,-0x74(%rbp)
mov    -0x74(%rbp),%eax
add    $0x80,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<DB_PrintNum>:
push   %rbx
sub    $0x70,%rsp
mov    %rsp,%rbx
mov    %rbx,%rsi
mov    $0xa,%edx
call   1040 <myitoa@plt>
mov    %rbx,%rdi
call   1030 <DB_PrintString@plt>
add    $0x70,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define i32 @DB_PrintNum(i32 %0) {
%2 = alloca i32
%3 = alloca [100 x i8]
%4 = alloca i32
store i32 %0, i32* %2
%5 = load i32, i32* %2
%6 = getelementptr inbounds [100 x i8], [100 x i8]* %3, i64 0, i64 0
%7 = call i32 @myitoa(i32 %5, i8* %6, i32 10)
%8 = getelementptr inbounds [100 x i8], [100 x i8]* %3, i64 0, i64 0
%9 = call i32 @DB_PrintString(i8* %8)
store i32 %9, i32* %4
%10 = load i32, i32* %4
ret i32 %10
}

LLVM IR (-O2):
define i32 @DB_PrintNum(i32 %0) {
%2 = alloca [100 x i8]
%3 = getelementptr inbounds [100 x i8], [100 x i8]* %2, i64 0, i64 0
%4 = call i32 @myitoa(i32 %0, i8* %3, i32 10)
%5 = call i32 @DB_PrintString(i8* %3)
ret i32 %5
}
int compareDouble(const void *a, const void *b) {
  return (int)(*(double *)a - *(double *)b);
}


x86 assembly (clang, -O0):
<compareDouble>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x10(%rbp),%rax
subsd  (%rax),%xmm0
cvttsd2si %xmm0,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<compareDouble>:
movsd  (%rdi),%xmm0
subsd  (%rsi),%xmm0
cvttsd2si %xmm0,%eax
ret

LLVM IR (-O0):
define i32 @compareDouble(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %3
%6 = bitcast i8* %5 to double*
%7 = load double, double* %6
%8 = load i8*, i8** %4
%9 = bitcast i8* %8 to double*
%10 = load double, double* %9
%11 = fsub double %7, %10
%12 = fptosi double %11 to i32
ret i32 %12
}

LLVM IR (-O2):
define i32 @compareDouble(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to double*
%4 = load double, double* %3
%5 = bitcast i8* %1 to double*
%6 = load double, double* %5
%7 = fsub double %4, %6
%8 = fptosi double %7 to i32
ret i32 %8
}
void gdk_event_get_state() {}


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

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

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

LLVM IR (-O2):
define void @gdk_event_get_state() {
ret void
}
/* Variables and functions */
void *MyAlloc(size_t);
void *SzAlloc(void *p, size_t size) {
  p = p;
  return MyAlloc(size);
}


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

x86 assembly (clang, -O2):
<SzAlloc>:
mov    %rsi,%rdi
jmp    1030 <MyAlloc@plt>

LLVM IR (-O0):
define i8* @SzAlloc(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
store i8* %0, i8** %3
store i64 %1, i64* %4
%5 = load i8*, i8** %3
store i8* %5, i8** %3
%6 = load i64, i64* %4
%7 = call i8* @MyAlloc(i64 %6)
ret i8* %7
}

LLVM IR (-O2):
define i8* @SzAlloc(i8* nocapture readnone %0, i64 %1) {
%3 = tail call i8* @MyAlloc(i64 %1)
ret i8* %3
}
int test_imm_40uint16_mem(unsigned short *val) {
  return ((*val) & (0x40 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_40uint16_mem>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movzwl (%rax),%edx
and    $0x40,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_40uint16_mem>:
testb  $0x40,(%rdi)
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_40uint16_mem(i16* %0) {
%2 = alloca i16*
store i16* %0, i16** %2
%3 = load i16*, i16** %2
%4 = load i16, i16* %3
%5 = zext i16 %4 to i32
%6 = and i32 %5, 64
%7 = icmp ne i32 %6, 0
%8 = zext i1 %7 to i64
%9 = select i1 %7, i32 -20, i32 -40
ret i32 %9
}

LLVM IR (-O2):
define i32 @test_imm_40uint16_mem(i16* nocapture %0) {
%2 = load i16, i16* %0
%3 = and i16 %2, 64
%4 = icmp eq i16 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
int main(void) {
  int x;
  return x == (1 && x);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
mov    -0x8(%rbp),%eax
cmpl   $0x0,-0x8(%rbp)
setne  %cl
and    $0x1,%cl
movzbl %cl,%ecx
cmp    %ecx,%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
int cltrack_set_caps(void) {
  int ret = 0;
  return ret;
}


x86 assembly (clang, -O0):
<cltrack_set_caps>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @cltrack_set_caps() {
%1 = alloca i32
store i32 0, i32* %1
%2 = load i32, i32* %1
ret i32 %2
}

LLVM IR (-O2):
define i32 @cltrack_set_caps() {
ret i32 0
}
void foo140() {}


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

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

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

LLVM IR (-O2):
define void @foo140() {
ret void
}
void list_null_deallocator(void *data) {}


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

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

LLVM IR (-O0):
define void @list_null_deallocator(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
ret void
}

LLVM IR (-O2):
define void @list_null_deallocator(i8* nocapture %0) {
ret void
}
int timing_init() { return 0; }


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

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

LLVM IR (-O0):
define i32 @timing_init() {
ret i32 0
}

LLVM IR (-O2):
define i32 @timing_init() {
ret i32 0
}
/* Variables and functions */
int declare_fun_2(int, int);
int declare_use_2(int x, int y) {
  int a = 1;
  int b = 2;
  int c = 0;
  c = declare_fun_2(a, b);
  return c;
}


x86 assembly (clang, -O0):
<declare_use_2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
movl   $0x1,-0xc(%rbp)
movl   $0x2,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0xc(%rbp),%edi
mov    -0x10(%rbp),%esi
call   1030 <declare_fun_2@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<declare_use_2>:
mov    $0x1,%edi
mov    $0x2,%esi
jmp    1030 <declare_fun_2@plt>

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

LLVM IR (-O2):
define i32 @declare_use_2(i32 %0, i32 %1) {
%3 = tail call i32 @declare_fun_2(i32 1, i32 2)
ret i32 %3
}
/* Variables and functions */
double exp(double);
double laguerre_gauss_ptr(double x) { return 3.0 * x * exp(-1.1 * x); }


x86 assembly (clang, -O0):
<laguerre_gauss_ptr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  0xee3(%rip),%xmm0
mulsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  0xec9(%rip),%xmm0
mulsd  -0x8(%rbp),%xmm0
call   1030 <exp@plt>
movaps %xmm0,%xmm1
movsd  -0x10(%rbp),%xmm0
mulsd  %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<laguerre_gauss_ptr>:
push   %rax
movsd  0xee7(%rip),%xmm1
mulsd  %xmm0,%xmm1
movsd  %xmm1,(%rsp)
mulsd  0xede(%rip),%xmm0
call   1030 <exp@plt>
mulsd  (%rsp),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @laguerre_gauss_ptr(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fmul double 3.000000e+00, %3
%5 = load double, double* %2
%6 = fmul double -1.100000e+00, %5
%7 = call double @exp(double %6)
%8 = fmul double %4, %7
ret double %8
}

LLVM IR (-O2):
define double @laguerre_gauss_ptr(double %0) {
%2 = fmul double %0, 3.000000e+00
%3 = fmul double %0, -1.100000e+00
%4 = tail call double @exp(double %3)
%5 = fmul double %2, %4
ret double %5
}
int payloadlen(unsigned char byte) { return 1 << ((byte & 0x30) >> 4); }


x86 assembly (clang, -O0):
<payloadlen>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%ecx
and    $0x30,%ecx
sar    $0x4,%ecx
mov    $0x1,%eax
shl    %cl,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<payloadlen>:
mov    %edi,%ecx
shr    $0x4,%cl
and    $0x3,%cl
mov    $0x1,%eax
shl    %cl,%eax
ret

LLVM IR (-O0):
define i32 @payloadlen(i8 zeroext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = zext i8 %3 to i32
%5 = and i32 %4, 48
%6 = ashr i32 %5, 4
%7 = shl i32 1, %6
ret i32 %7
}

LLVM IR (-O2):
define i32 @payloadlen(i8 zeroext %0) {
%2 = lshr i8 %0, 4
%3 = and i8 %2, 3
%4 = zext i8 %3 to i32
%5 = shl nuw nsw i32 1, %4
ret i32 %5
}
/* Variables and functions */
scalar_t__ isspace(int);
char *skip_ws(char *string) {
  int c;
  while (isspace(c = *string))
    string++;
  return (string);
}


x86 assembly (clang, -O0):
<skip_ws>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%edi
mov    %edi,-0xc(%rbp)
call   1030 <isspace@plt>
cmp    $0x0,%rax
je     1146 <skip_ws+0x36>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    111c <skip_ws+0xc>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<skip_ws>:
push   %rbx
mov    %rdi,%rbx
add    $0xffffffffffffffff,%rbx
nopl   0x0(%rax,%rax,1)
movsbl 0x1(%rbx),%edi
add    $0x1,%rbx
call   1030 <isspace@plt>
test   %rax,%rax
jne    1120 <skip_ws+0x10>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
define i8* @skip_ws(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
br label %4
4: ; preds = %10, %1
%5 = load i8*, i8** %2
%6 = load i8, i8* %5
%7 = sext i8 %6 to i32
store i32 %7, i32* %3
%8 = call i64 @isspace(i32 %7)
%9 = icmp ne i64 %8, 0
br i1 %9, label %10, label %13
10: ; preds = %4
%11 = load i8*, i8** %2
%12 = getelementptr inbounds i8, i8* %11, i32 1
store i8* %12, i8** %2
br label %4
13: ; preds = %4
%14 = load i8*, i8** %2
ret i8* %14
}

LLVM IR (-O2):
define i8* @skip_ws(i8* %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i8* [ %0, %1 ], [ %8, %2 ]
%4 = load i8, i8* %3
%5 = sext i8 %4 to i32
%6 = tail call i64 @isspace(i32 %5)
%7 = icmp eq i64 %6, 0
%8 = getelementptr inbounds i8, i8* %3, i64 1
br i1 %7, label %9, label %2
9: ; preds = %2
ret i8* %3
}
/* Variables and functions */
int /*<<< orphan*/ __analyzer_eval(int);
int /*<<< orphan*/ might_write_to(int *);
void test_16e(int i) {
  int j;
  j = i;
  __analyzer_eval(j == i);
  might_write_to(&j);
  __analyzer_eval(j == i);
}


x86 assembly (clang, -O0):
<test_16e>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0x4(%rbp),%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <__analyzer_eval@plt>
lea    -0x8(%rbp),%rdi
call   1040 <might_write_to@plt>
mov    -0x8(%rbp),%eax
cmp    -0x4(%rbp),%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <__analyzer_eval@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_16e>:
push   %rbx
sub    $0x10,%rsp
mov    %edi,%ebx
mov    %edi,0xc(%rsp)
mov    $0x1,%edi
call   1030 <__analyzer_eval@plt>
lea    0xc(%rsp),%rdi
call   1040 <might_write_to@plt>
xor    %edi,%edi
cmp    %ebx,0xc(%rsp)
sete   %dil
call   1030 <__analyzer_eval@plt>
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define void @test_16e(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = load i32, i32* %2
store i32 %4, i32* %3
%5 = load i32, i32* %3
%6 = load i32, i32* %2
%7 = icmp eq i32 %5, %6
%8 = zext i1 %7 to i32
%9 = call i32 @__analyzer_eval(i32 %8)
%10 = call i32 @might_write_to(i32* %3)
%11 = load i32, i32* %3
%12 = load i32, i32* %2
%13 = icmp eq i32 %11, %12
%14 = zext i1 %13 to i32
%15 = call i32 @__analyzer_eval(i32 %14)
ret void
}

LLVM IR (-O2):
define void @test_16e(i32 %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
store i32 %0, i32* %2
%4 = tail call i32 @__analyzer_eval(i32 1)
%5 = call i32 @might_write_to(i32* %2)
%6 = load i32, i32* %2
%7 = icmp eq i32 %6, %0
%8 = zext i1 %7 to i32
%9 = call i32 @__analyzer_eval(i32 %8)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ led_driver_panic();
void HardFault_Handler(void) {
  led_driver_panic();
  while (1) {
  }
}


x86 assembly (clang, -O0):
<HardFault_Handler>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <led_driver_panic@plt>
jmp    111b <HardFault_Handler+0xb>

x86 assembly (clang, -O2):
<HardFault_Handler>:
push   %rax
xor    %eax,%eax
call   1030 <led_driver_panic@plt>
nopl   0x0(%rax,%rax,1)
jmp    1120 <HardFault_Handler+0x10>

LLVM IR (-O0):
define void @HardFault_Handler() {
%1 = call i32 (...) @led_driver_panic()
br label %2
2: ; preds = %0, %2
br label %2
}

LLVM IR (-O2):
define void @HardFault_Handler() {
%1 = tail call i32 (...) @led_driver_panic()
br label %2
2: ; preds = %0, %2
br label %2
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void *realloc(void *, size_t);
void *avro_default_allocator(void *ud, void *ptr, size_t osize, size_t nsize) {
  (void)ud;
  ;
  (void)osize;
  ;
  if (nsize == 0) {
    free(ptr);
    return NULL;
  } else {
    return realloc(ptr, nsize);
  }
}


x86 assembly (clang, -O0):
<avro_default_allocator>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    %rcx,-0x28(%rbp)
cmpq   $0x0,-0x28(%rbp)
jne    1159 <avro_default_allocator+0x39>
mov    -0x18(%rbp),%rdi
call   1030 <free@plt>
movq   $0x0,-0x8(%rbp)
jmp    116a <avro_default_allocator+0x4a>
mov    -0x18(%rbp),%rdi
mov    -0x28(%rbp),%rsi
call   1040 <realloc@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<avro_default_allocator>:
mov    %rsi,%rdi
test   %rcx,%rcx
je     1130 <avro_default_allocator+0x10>
mov    %rcx,%rsi
jmp    1040 <realloc@plt>
push   %rax
call   1030 <free@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i8* @avro_default_allocator(i8* %0, i8* %1, i64 %2, i64 %3) {
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i64
%9 = alloca i64
store i8* %0, i8** %6
store i8* %1, i8** %7
store i64 %2, i64* %8
store i64 %3, i64* %9
%10 = load i8*, i8** %6
%11 = load i64, i64* %8
%12 = load i64, i64* %9
%13 = icmp eq i64 %12, 0
br i1 %13, label %14, label %17
14: ; preds = %4
%15 = load i8*, i8** %7
%16 = call i32 @free(i8* %15)
store i8* null, i8** %5
br label %21
17: ; preds = %4
%18 = load i8*, i8** %7
%19 = load i64, i64* %9
%20 = call i8* @realloc(i8* %18, i64 %19)
store i8* %20, i8** %5
br label %21
21: ; preds = %17, %14
%22 = load i8*, i8** %5
ret i8* %22
}

LLVM IR (-O2):
define noalias i8* @avro_default_allocator(i8* nocapture readnone %0, i8* nocapture %1, i64 %2, i64 %3) {
%5 = icmp eq i64 %3, 0
br i1 %5, label %6, label %8
6: ; preds = %4
%7 = tail call i32 @free(i8* %1)
br label %10
8: ; preds = %4
%9 = tail call i8* @realloc(i8* %1, i64 %3)
br label %10
10: ; preds = %8, %6
%11 = phi i8* [ null, %6 ], [ %9, %8 ]
ret i8* %11
}
void test36_Blink3_targetInit__I() {}


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

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

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

LLVM IR (-O2):
define void @test36_Blink3_targetInit__I() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ do_uninit_read(int *);
void uninit_test4(int *val_p) { do_uninit_read(val_p); }


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

x86 assembly (clang, -O2):
<uninit_test4>:
jmp    1030 <do_uninit_read@plt>

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

LLVM IR (-O2):
define void @uninit_test4(i32* %0) {
%2 = tail call i32 @do_uninit_read(i32* %0)
ret void
}
/* Type definitions */
typedef scalar_t__ int_least16_t;

/* Variables and functions */
bool SHAREMIND_SET_KEY_LESS_THAN_int_least16_t(int_least16_t const k1,
                                               int_least16_t const k2) {
  return k1 < k2;
}


x86 assembly (clang, -O0):
<SHAREMIND_SET_KEY_LESS_THAN_int_least16_t>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
cmp    -0x10(%rbp),%rax
setl   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<SHAREMIND_SET_KEY_LESS_THAN_int_least16_t>:
xor    %eax,%eax
cmp    %rsi,%rdi
setl   %al
ret

LLVM IR (-O0):
define i32 @SHAREMIND_SET_KEY_LESS_THAN_int_least16_t(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 = load i64, i64* %4
%7 = icmp slt i64 %5, %6
%8 = zext i1 %7 to i32
ret i32 %8
}

LLVM IR (-O2):
define i32 @SHAREMIND_SET_KEY_LESS_THAN_int_least16_t(i64 %0, i64 %1) {
%3 = icmp slt i64 %0, %1
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Type definitions */
typedef int const uint32_t;

/* Variables and functions */
const uint32_t parity(uint32_t x, uint32_t y, uint32_t z) {
  return ((x ^ y) ^ z);
}


x86 assembly (clang, -O0):
<parity>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x4(%rbp),%eax
xor    -0x8(%rbp),%eax
xor    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<parity>:
mov    %edi,%eax
xor    %esi,%eax
xor    %edx,%eax
ret

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

LLVM IR (-O2):
define i32 @parity(i32 %0, i32 %1, i32 %2) {
%4 = xor i32 %1, %0
%5 = xor i32 %4, %2
ret i32 %5
}
int sort_compare_ints_asc(const void *a, const void *b) {
  return *(const int *)a - *(const int *)b;
}


x86 assembly (clang, -O0):
<sort_compare_ints_asc>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
mov    -0x10(%rbp),%rcx
sub    (%rcx),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<sort_compare_ints_asc>:
mov    (%rdi),%eax
sub    (%rsi),%eax
ret

LLVM IR (-O0):
define i32 @sort_compare_ints_asc(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %3
%6 = bitcast i8* %5 to i32*
%7 = load i32, i32* %6
%8 = load i8*, i8** %4
%9 = bitcast i8* %8 to i32*
%10 = load i32, i32* %9
%11 = sub nsw i32 %7, %10
ret i32 %11
}

LLVM IR (-O2):
define i32 @sort_compare_ints_asc(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i32*
%4 = load i32, i32* %3
%5 = bitcast i8* %1 to i32*
%6 = load i32, i32* %5
%7 = sub nsw i32 %4, %6
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ alloc_may_be_big_Bad();
void call_to_alloc_may_be_big_Good() { alloc_may_be_big_Bad(); }


x86 assembly (clang, -O0):
<call_to_alloc_may_be_big_Good>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <alloc_may_be_big_Bad@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<call_to_alloc_may_be_big_Good>:
xor    %eax,%eax
jmp    1030 <alloc_may_be_big_Bad@plt>

LLVM IR (-O0):
define void @call_to_alloc_may_be_big_Good() {
%1 = call i32 (...) @alloc_may_be_big_Bad()
ret void
}

LLVM IR (-O2):
define void @call_to_alloc_may_be_big_Good() {
%1 = tail call i32 (...) @alloc_may_be_big_Bad()
ret void
}
struct dns_packet *dns_cache_query(struct dns_packet *query,
                                   struct dns_cache *cache, int *error) {
  return 0;
}


x86 assembly (clang, -O0):
<dns_cache_query>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.dns_packet = type opaque
%struct.dns_cache = type opaque
define %struct.dns_packet* @dns_cache_query(%struct.dns_packet* %0, %struct.dns_cache* %1, i32* %2) {
%4 = alloca %struct.dns_packet*
%5 = alloca %struct.dns_cache*
%6 = alloca i32*
store %struct.dns_packet* %0, %struct.dns_packet** %4
store %struct.dns_cache* %1, %struct.dns_cache** %5
store i32* %2, i32** %6
ret %struct.dns_packet* null
}

LLVM IR (-O2):
%struct.dns_packet = type opaque
%struct.dns_cache = type opaque
define noalias %struct.dns_packet* @dns_cache_query(%struct.dns_packet* nocapture readnone %0, %struct.dns_cache* nocapture readnone %1, i32* nocapture readnone %2) {
ret %struct.dns_packet* null
}
void av_dynarray_add_nofree() {}


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

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

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

LLVM IR (-O2):
define void @av_dynarray_add_nofree() {
ret void
}
int llama_version_major(void) { return 0; }


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

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

LLVM IR (-O0):
define i32 @llama_version_major() {
ret i32 0
}

LLVM IR (-O2):
define i32 @llama_version_major() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ fixdiv(int /*<<< orphan*/, int /*<<< orphan*/);
int fixtoi(int /*<<< orphan*/);
int /*<<< orphan*/ itofix(int);
int foo(int n) { return fixtoi(fixdiv(itofix(512), itofix(n))); }


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x200,%edi
call   1040 <itofix@plt>
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%edi
call   1040 <itofix@plt>
mov    -0x8(%rbp),%edi
mov    %eax,%esi
call   1030 <fixdiv@plt>
mov    %eax,%edi
call   1050 <fixtoi@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebx
mov    $0x200,%edi
call   1040 <itofix@plt>
mov    %eax,%ebp
mov    %ebx,%edi
call   1040 <itofix@plt>
mov    %ebp,%edi
mov    %eax,%esi
call   1030 <fixdiv@plt>
mov    %eax,%edi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1050 <fixtoi@plt>

LLVM IR (-O0):
define i32 @foo(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @itofix(i32 512)
%4 = load i32, i32* %2
%5 = call i32 @itofix(i32 %4)
%6 = call i32 @fixdiv(i32 %3, i32 %5)
%7 = call i32 @fixtoi(i32 %6)
ret i32 %7
}

LLVM IR (-O2):
define i32 @foo(i32 %0) {
%2 = tail call i32 @itofix(i32 512)
%3 = tail call i32 @itofix(i32 %0)
%4 = tail call i32 @fixdiv(i32 %2, i32 %3)
%5 = tail call i32 @fixtoi(i32 %4)
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
void _Exit(int status) { exit(status); }


x86 assembly (clang, -O0):
<_Exit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <exit@plt>

x86 assembly (clang, -O2):
<_Exit>:
push   %rax
call   1030 <exit@plt>

LLVM IR (-O0):
define void @_Exit(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @exit(i32 %3)
unreachable
}

LLVM IR (-O2):
define void @_Exit(i32 %0) {
%2 = tail call i32 @exit(i32 %0)
unreachable
}
/* Variables and functions */
int isdigit(unsigned char);
int Is_A_Format(const char *string) {
  return isdigit((unsigned char)string[0]);
}


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

x86 assembly (clang, -O2):
<Is_A_Format>:
movzbl (%rdi),%edi
jmp    1030 <isdigit@plt>

LLVM IR (-O0):
define i32 @Is_A_Format(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = getelementptr inbounds i8, i8* %3, i64 0
%5 = load i8, i8* %4
%6 = call i32 @isdigit(i8 zeroext %5)
ret i32 %6
}

LLVM IR (-O2):
define i32 @Is_A_Format(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = tail call i32 @isdigit(i8 zeroext %2)
ret i32 %3
}
void done_making_trace_files(void) {}


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

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

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

LLVM IR (-O2):
define void @done_making_trace_files() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ stop_all_traces();
void exit_trace(int status) {
  stop_all_traces();
  exit(status);
}


x86 assembly (clang, -O0):
<exit_trace>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x0,%al
call   1030 <stop_all_traces@plt>
mov    -0x4(%rbp),%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<exit_trace>:
push   %rbx
mov    %edi,%ebx
xor    %eax,%eax
call   1030 <stop_all_traces@plt>
mov    %ebx,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
define void @exit_trace(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 (...) @stop_all_traces()
%4 = load i32, i32* %2
%5 = call i32 @exit(i32 %4)
unreachable
}

LLVM IR (-O2):
define void @exit_trace(i32 %0) {
%2 = tail call i32 (...) @stop_all_traces()
%3 = tail call i32 @exit(i32 %0)
unreachable
}