xunge/DecIR huggingface dataset:
/* Type definitions */
struct mod_random {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ free(struct mod_random *);
void random_free(void *arg) {
  struct mod_random *data = arg;
  free(data);
}


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

x86 assembly (clang, -O2):
<random_free>:
jmp    1030 <free@plt>

LLVM IR (-O0):
%struct.mod_random = type { i32 }
define void @random_free(i8* %0) {
%2 = alloca i8*
%3 = alloca %struct.mod_random*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = bitcast i8* %4 to %struct.mod_random*
store %struct.mod_random* %5, %struct.mod_random** %3
%6 = load %struct.mod_random*, %struct.mod_random** %3
%7 = call i32 @free(%struct.mod_random* %6)
ret void
}

LLVM IR (-O2):
%struct.mod_random = type { i32 }
define void @random_free(i8* nocapture %0) {
%2 = bitcast i8* %0 to %struct.mod_random*
%3 = tail call i32 @free(%struct.mod_random* %2)
ret void
}
/* Variables and functions */
int syscall(int, int, unsigned int, unsigned int);
int fsmount(int fsfd, unsigned int flags, unsigned int ms_flags) {
  return syscall(-1, fsfd, flags, ms_flags);
}


x86 assembly (clang, -O0):
<fsmount>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x4(%rbp),%esi
mov    -0x8(%rbp),%edx
mov    -0xc(%rbp),%ecx
mov    $0xffffffff,%edi
call   1030 <syscall@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fsmount>:
mov    %edx,%ecx
mov    %esi,%edx
mov    %edi,%esi
mov    $0xffffffff,%edi
jmp    1030 <syscall@plt>

LLVM IR (-O0):
define i32 @fsmount(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 = load i32, i32* %6
%10 = call i32 @syscall(i32 -1, i32 %7, i32 %8, i32 %9)
ret i32 %10
}

LLVM IR (-O2):
define i32 @fsmount(i32 %0, i32 %1, i32 %2) {
%4 = tail call i32 @syscall(i32 -1, i32 %0, i32 %1, i32 %2)
ret i32 %4
}
long long tm(long long a, long long b) { return (b == 0) ? 0 : (a % b); }


x86 assembly (clang, -O0):
<tm>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1124 <tm+0x24>
xor    %eax,%eax
mov    %eax,%edx
mov    %rdx,-0x18(%rbp)
jmp    1132 <tm+0x32>
mov    -0x8(%rbp),%rax
cqto
idivq  -0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x18(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<tm>:
test   %rsi,%rsi
je     111d <tm+0x1d>
mov    %rdi,%rax
or     %rsi,%rax
shr    $0x20,%rax
je     1120 <tm+0x20>
mov    %rdi,%rax
cqto
idiv   %rsi
mov    %rdx,%rax
ret
xor    %eax,%eax
ret
mov    %edi,%eax
xor    %edx,%edx
div    %esi
mov    %edx,%eax
ret

LLVM IR (-O0):
define i64 @tm(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%5 = load i64, i64* %4
%6 = icmp eq i64 %5, 0
br i1 %6, label %7, label %8
7: ; preds = %2
br label %12
8: ; preds = %2
%9 = load i64, i64* %3
%10 = load i64, i64* %4
%11 = srem i64 %9, %10
br label %12
12: ; preds = %8, %7
%13 = phi i64 [ 0, %7 ], [ %11, %8 ]
ret i64 %13
}

LLVM IR (-O2):
define i64 @tm(i64 %0, i64 %1) {
%3 = icmp eq i64 %1, 0
br i1 %3, label %6, label %4
4: ; preds = %2
%5 = srem i64 %0, %1
br label %6
6: ; preds = %2, %4
%7 = phi i64 [ %5, %4 ], [ 0, %2 ]
ret i64 %7
}
/* Variables and functions */
int foo(int, int);
int __attribute__((no)) bar(int a, int b) { return 1 + foo(a, b); }


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

x86 assembly (clang, -O2):
<bar>:
push   %rax
call   1030 <foo@plt>
add    $0x1,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @bar(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = load i32, i32* %4
%7 = call i32 @foo(i32 %5, i32 %6)
%8 = add nsw i32 1, %7
ret i32 %8
}

LLVM IR (-O2):
define i32 @bar(i32 %0, i32 %1) {
%3 = tail call i32 @foo(i32 %0, i32 %1)
%4 = add nsw i32 %3, 1
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ gc_init_heap(long);
int /*<<< orphan*/ gc_start_collector();
void Cyc_heap_init(long heap_size) {
  gc_init_heap(heap_size);
  gc_start_collector();
}


x86 assembly (clang, -O0):
<Cyc_heap_init>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <gc_init_heap@plt>
mov    $0x0,%al
call   1040 <gc_start_collector@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define void @Cyc_heap_init(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = call i32 @gc_init_heap(i64 %3)
%5 = call i32 (...) @gc_start_collector()
ret void
}

LLVM IR (-O2):
define void @Cyc_heap_init(i64 %0) {
%2 = tail call i32 @gc_init_heap(i64 %0)
%3 = tail call i32 (...) @gc_start_collector()
ret void
}
/* Variables and functions */
char const *errorPop();
const char *server_error_pop() { return errorPop(); }


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

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

LLVM IR (-O0):
define i8* @server_error_pop() {
%1 = call i8* (...) @errorPop()
ret i8* %1
}

LLVM IR (-O2):
define i8* @server_error_pop() {
%1 = tail call i8* (...) @errorPop()
ret i8* %1
}
void rop3_144_0_0(unsigned char *D, unsigned char S, unsigned char T) {
  unsigned char stk1;
  unsigned char stk2;
  stk2 = *D ^ S;
  stk2 = ~stk2;
  stk1 = T & stk2;
  *D = stk1;
}


x86 assembly (clang, -O0):
<rop3_144_0_0>:
push   %rbp
mov    %rsp,%rbp
mov    %dl,%al
mov    %sil,%cl
mov    %rdi,-0x8(%rbp)
mov    %cl,-0x9(%rbp)
mov    %al,-0xa(%rbp)
mov    -0x8(%rbp),%rax
movzbl (%rax),%eax
movzbl -0x9(%rbp),%ecx
xor    %ecx,%eax
mov    %al,-0xc(%rbp)
movzbl -0xc(%rbp),%eax
xor    $0xffffffff,%eax
mov    %al,-0xc(%rbp)
movzbl -0xa(%rbp),%eax
movzbl -0xc(%rbp),%ecx
and    %ecx,%eax
mov    %al,-0xb(%rbp)
mov    -0xb(%rbp),%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<rop3_144_0_0>:
xor    (%rdi),%sil
not    %sil
and    %dl,%sil
mov    %sil,(%rdi)
ret

LLVM IR (-O0):
define void @rop3_144_0_0(i8* %0, i8 zeroext %1, i8 zeroext %2) {
%4 = alloca i8*
%5 = alloca i8
%6 = alloca i8
%7 = alloca i8
%8 = alloca i8
store i8* %0, i8** %4
store i8 %1, i8* %5
store i8 %2, i8* %6
%9 = load i8*, i8** %4
%10 = load i8, i8* %9
%11 = zext i8 %10 to i32
%12 = load i8, i8* %5
%13 = zext i8 %12 to i32
%14 = xor i32 %11, %13
%15 = trunc i32 %14 to i8
store i8 %15, i8* %8
%16 = load i8, i8* %8
%17 = zext i8 %16 to i32
%18 = xor i32 %17, -1
%19 = trunc i32 %18 to i8
store i8 %19, i8* %8
%20 = load i8, i8* %6
%21 = zext i8 %20 to i32
%22 = load i8, i8* %8
%23 = zext i8 %22 to i32
%24 = and i32 %21, %23
%25 = trunc i32 %24 to i8
store i8 %25, i8* %7
%26 = load i8, i8* %7
%27 = load i8*, i8** %4
store i8 %26, i8* %27
ret void
}

LLVM IR (-O2):
define void @rop3_144_0_0(i8* nocapture %0, i8 zeroext %1, i8 zeroext %2) {
%4 = load i8, i8* %0
%5 = xor i8 %4, %1
%6 = xor i8 %5, -1
%7 = and i8 %6, %2
store i8 %7, i8* %0
ret void
}
/* Variables and functions */
int /*<<< orphan*/ sprintf(char *, char *, int const);
int /*<<< orphan*/ strcat(char *, char *);
void strcat_path_i(char *dest, const int src) {
  char src_c[60] = {0};
  sprintf(src_c, "%u", src);
  strcat(dest, src_c);
}


x86 assembly (clang, -O0):
<strcat_path_i>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
lea    -0x50(%rbp),%rdi
xor    %esi,%esi
mov    $0x3c,%edx
call   1030 <memset@plt>
lea    -0x50(%rbp),%rdi
mov    -0xc(%rbp),%edx
lea    0xea3(%rip),%rsi
call   1050 <sprintf@plt>
mov    -0x8(%rbp),%rdi
lea    -0x50(%rbp),%rsi
call   1040 <strcat@plt>
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strcat_path_i>:
push   %r14
push   %rbx
sub    $0x48,%rsp
mov    %esi,%edx
mov    %rdi,%rbx
xorps  %xmm0,%xmm0
movups %xmm0,0x2c(%rsp)
movaps %xmm0,0x20(%rsp)
movaps %xmm0,0x10(%rsp)
movaps %xmm0,(%rsp)
lea    0xeb7(%rip),%rsi
mov    %rsp,%r14
mov    %r14,%rdi
call   1040 <sprintf@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
call   1030 <strcat@plt>
add    $0x48,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%u\00"
define void @strcat_path_i(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
%5 = alloca [60 x i8]
store i8* %0, i8** %3
store i32 %1, i32* %4
%6 = bitcast [60 x i8]* %5 to i8*
%7 = getelementptr inbounds [60 x i8], [60 x i8]* %5, i64 0, i64 0
%8 = load i32, i32* %4
%9 = call i32 @sprintf(i8* %7, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %8)
%10 = load i8*, i8** %3
%11 = getelementptr inbounds [60 x i8], [60 x i8]* %5, i64 0, i64 0
%12 = call i32 @strcat(i8* %10, i8* %11)
ret void
}

LLVM IR (-O2):
@.str = [3 x i8] c"%u\00"
define void @strcat_path_i(i8* %0, i32 %1) {
%3 = alloca [60 x i8]
%4 = getelementptr inbounds [60 x i8], [60 x i8]* %3, i64 0, i64 0
%5 = call i32 @sprintf(i8* %4, i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %1)
%6 = call i32 @strcat(i8* %0, i8* %4)
ret void
}
void clear_bit(volatile unsigned long *addr, unsigned long bit) {
  __asm__ volatile("lock btr %1, %0" : "+m"(*addr) : "r"(bit) : "memory");
}


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

x86 assembly (clang, -O2):
<clear_bit>:
lock btr %rsi,(%rdi)
ret

LLVM IR (-O0):
define void @clear_bit(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
ret void
}

LLVM IR (-O2):
define void @clear_bit(i64* %0, i64 %1) {
tail call void asm sideeffect "lock btr $1, $0", "=*m,r,*m,~{memory},~{dirflag},~{fpsr},~{flags}"(i64* elementtype(i64) %0, i64 %1, i64* elementtype(i64) %0)
ret void
}
R0AX1(r0, r1, x0, x1, p0, p1) unsigned int r0, r1;
unsigned int *p0, *p1;
{
  if (r0 <= (((unsigned int *)11111111)[x1]))
    return 1;
  else
    return 0;
}


x86 assembly (clang, -O0):
<R0AX1>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
mov    %r8,-0x20(%rbp)
mov    %r9,-0x28(%rbp)
mov    -0x8(%rbp),%eax
movslq -0x14(%rbp),%rdx
mov    $0xa98ac7,%ecx
cmp    (%rcx,%rdx,4),%eax
ja     1139 <R0AX1+0x39>
movl   $0x1,-0x4(%rbp)
jmp    1140 <R0AX1+0x40>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<R0AX1>:
movslq %ecx,%rcx
xor    %eax,%eax
cmp    %edi,0xa98ac7(,%rcx,4)
setae  %al
ret

LLVM IR (-O0):
define i32 @R0AX1(i32 %0, i32 %1, i32 %2, i32 %3, i32* %4, i32* %5) {
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32*
%13 = alloca i32*
store i32 %0, i32* %8
store i32 %1, i32* %9
store i32 %2, i32* %10
store i32 %3, i32* %11
store i32* %4, i32** %12
store i32* %5, i32** %13
%14 = load i32, i32* %8
%15 = load i32, i32* %11
%16 = sext i32 %15 to i64
%17 = getelementptr inbounds i32, i32* inttoptr (i64 11111111 to i32*), i64 %16
%18 = load i32, i32* %17
%19 = icmp ule i32 %14, %18
br i1 %19, label %20, label %21
20: ; preds = %6
store i32 1, i32* %7
br label %22
21: ; preds = %6
store i32 0, i32* %7
br label %22
22: ; preds = %21, %20
%23 = load i32, i32* %7
ret i32 %23
}

LLVM IR (-O2):
define i32 @R0AX1(i32 %0, i32 %1, i32 %2, i32 %3, i32* nocapture readnone %4, i32* nocapture readnone %5) {
%7 = sext i32 %3 to i64
%8 = getelementptr inbounds i32, i32* inttoptr (i64 11111111 to i32*), i64 %7
%9 = load i32, i32* %8
%10 = icmp uge i32 %9, %0
%11 = zext i1 %10 to i32
ret i32 %11
}
int bar() {
  int x = 4;
  return x;
}


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

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

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

LLVM IR (-O2):
define i32 @bar() {
ret i32 4
}
void *memcpy(void *dst, const void *src, unsigned long len) {
  asm volatile("rep movsb\n\t"
               : "+D"(dst), "+S"(src), "+c"(len)
               :
               : "cc", "memory");
  return dst;
}


x86 assembly (clang, -O0):
<memcpy>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rcx
rep movsb %ds:(%rsi),%es:(%rdi)
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rcx,-0x18(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<memcpy>:
mov    %rdx,%rcx
rep movsb %ds:(%rsi),%es:(%rdi)
mov    %rdi,%rax
ret

LLVM IR (-O0):
define i8* @memcpy(i8* %0, i8* %1, i64 %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i64
store i8* %0, i8** %4
store i8* %1, i8** %5
store i64 %2, i64* %6
%7 = load i8*, i8** %4
%8 = load i8*, i8** %5
%9 = load i64, i64* %6
%10 = call { i8*, i8*, i64 } asm sideeffect "rep movsb\0A\09", "={di},={si},={cx},0,1,2,~{cc},~{memory},~{dirflag},~{fpsr},~{flags}"(i8* %7, i8* %8, i64 %9)
%11 = extractvalue { i8*, i8*, i64 } %10, 0
%12 = extractvalue { i8*, i8*, i64 } %10, 1
%13 = extractvalue { i8*, i8*, i64 } %10, 2
store i8* %11, i8** %4
store i8* %12, i8** %5
store i64 %13, i64* %6
%14 = load i8*, i8** %4
ret i8* %14
}

LLVM IR (-O2):
define i8* @memcpy(i8* %0, i8* %1, i64 %2) {
%4 = tail call { i8*, i8*, i64 } asm sideeffect "rep movsb\0A\09", "={di},={si},={cx},0,1,2,~{cc},~{memory},~{dirflag},~{fpsr},~{flags}"(i8* %0, i8* %1, i64 %2)
%5 = extractvalue { i8*, i8*, i64 } %4, 0
ret i8* %5
}
/* Variables and functions */
int isdigit(char);
int printf(char *, int);
int main(void) { return printf("%d\n", isdigit('5')); }


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x35,%edi
call   1030 <isdigit@plt>
mov    %eax,%esi
lea    0xebe(%rip),%rdi
call   1040 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x35,%edi
call   1030 <isdigit@plt>
lea    0xece(%rip),%rdi
mov    %eax,%esi
pop    %rax
jmp    1040 <printf@plt>

LLVM IR (-O0):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @isdigit(i8 signext 53)
%3 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %2)
ret i32 %3
}

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = tail call i32 @isdigit(i8 signext 53)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ initGraphFromFile(char *);
int /*<<< orphan*/ printGraph();
int /*<<< orphan*/ printVertex();
int /*<<< orphan*/ printf(char *);
int main(int argc, char const *argv[]) {
  initGraphFromFile("dummy_path.txt");
  printf("Vertex\n");
  printVertex();
  printf("Graph\n");
  printGraph();
  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)
lea    0xea3(%rip),%rdi
call   1050 <initGraphFromFile@plt>
lea    0xea6(%rip),%rdi
call   1030 <printf@plt>
mov    $0x0,%al
call   1040 <printVertex@plt>
lea    0xe9b(%rip),%rdi
call   1030 <printf@plt>
mov    $0x0,%al
call   1060 <printGraph@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xeb8(%rip),%rdi
call   1050 <initGraphFromFile@plt>
lea    0xebb(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
call   1040 <printVertex@plt>
lea    0xeaf(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
call   1060 <printGraph@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [15 x i8] c"dummy_path.txt\00"
@.str.1 = [8 x i8] c"Vertex\0A\00"
@.str.2 = [7 x i8] c"Graph\0A\00"
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 @initGraphFromFile(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
%7 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0))
%8 = call i32 (...) @printVertex()
%9 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0))
%10 = call i32 (...) @printGraph()
ret i32 0
}

LLVM IR (-O2):
@.str = [15 x i8] c"dummy_path.txt\00"
@str = [7 x i8] c"Vertex\00"
@str.3 = [6 x i8] c"Graph\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @initGraphFromFile(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @str, i64 0, i64 0))
%5 = tail call i32 (...) @printVertex()
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @str.3, i64 0, i64 0))
%7 = tail call i32 (...) @printGraph()
ret i32 0
}
int target_test_empty_block(unsigned *data, unsigned nwords) {
  while (nwords--)
    if (*data++ != 0xFFFFFFFF)
      return 0;
  return 1;
}


x86 assembly (clang, -O0):
<target_test_empty_block>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    %eax,%ecx
add    $0xffffffff,%ecx
mov    %ecx,-0x14(%rbp)
cmp    $0x0,%eax
je     1148 <target_test_empty_block+0x48>
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x4,%rcx
mov    %rcx,-0x10(%rbp)
cmpl   $0xffffffff,(%rax)
je     1143 <target_test_empty_block+0x43>
movl   $0x0,-0x4(%rbp)
jmp    114f <target_test_empty_block+0x4f>
jmp    110b <target_test_empty_block+0xb>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<target_test_empty_block>:
mov    %esi,%eax
xor    %ecx,%ecx
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
cmp    %ecx,%eax
je     1121 <target_test_empty_block+0x21>
cmpl   $0xffffffff,(%rdi,%rcx,4)
lea    0x1(%rcx),%rcx
je     1110 <target_test_empty_block+0x10>
xor    %eax,%eax
ret
mov    $0x1,%eax
ret

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

LLVM IR (-O2):
define i32 @target_test_empty_block(i32* nocapture %0, i32 %1) {
br label %3
3: ; preds = %7, %2
%4 = phi i32* [ %0, %2 ], [ %9, %7 ]
%5 = phi i32 [ %1, %2 ], [ %8, %7 ]
%6 = icmp eq i32 %5, 0
br i1 %6, label %12, label %7
7: ; preds = %3
%8 = add i32 %5, -1
%9 = getelementptr inbounds i32, i32* %4, i64 1
%10 = load i32, i32* %4
%11 = icmp eq i32 %10, -1
br i1 %11, label %3, label %12
12: ; preds = %3, %7
%13 = phi i32 [ 0, %7 ], [ 1, %3 ]
ret i32 %13
}
int lower(int c) { return c >= 'A' && c <= 'Z' ? c + 'a' - 'A' : c; }


x86 assembly (clang, -O0):
<lower>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
cmpl   $0x41,-0x4(%rbp)
jl     112c <lower+0x2c>
cmpl   $0x5a,-0x4(%rbp)
jg     112c <lower+0x2c>
mov    -0x4(%rbp),%eax
add    $0x61,%eax
sub    $0x41,%eax
mov    %eax,-0x8(%rbp)
jmp    1132 <lower+0x32>
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<lower>:
lea    -0x41(%rdi),%ecx
lea    0x20(%rdi),%eax
cmp    $0x1a,%ecx
cmovae %edi,%eax
ret

LLVM IR (-O0):
define i32 @lower(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp sge i32 %3, 65
br i1 %4, label %5, label %12
5: ; preds = %1
%6 = load i32, i32* %2
%7 = icmp sle i32 %6, 90
br i1 %7, label %8, label %12
8: ; preds = %5
%9 = load i32, i32* %2
%10 = add nsw i32 %9, 97
%11 = sub nsw i32 %10, 65
br label %14
12: ; preds = %5, %1
%13 = load i32, i32* %2
br label %14
14: ; preds = %12, %8
%15 = phi i32 [ %11, %8 ], [ %13, %12 ]
ret i32 %15
}

LLVM IR (-O2):
define i32 @lower(i32 %0) {
%2 = add i32 %0, -65
%3 = icmp ult i32 %2, 26
%4 = add nsw i32 %0, 32
%5 = select i1 %3, i32 %4, i32 %0
ret i32 %5
}
int do_640() { return 640; }


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

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

LLVM IR (-O0):
define i32 @do_640() {
ret i32 640
}

LLVM IR (-O2):
define i32 @do_640() {
ret i32 640
}
void debugpins_init() {}


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

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

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

LLVM IR (-O2):
define void @debugpins_init() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int sum(int *, int);
int main() {
  int a[10] = {1, 2, 3, 4, 5, 6, 7};
  int b = sum(a, 7);
  printf("the sum is %d\n", b);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
lea    -0x30(%rbp),%rdi
lea    0xebd(%rip),%rsi
mov    $0x28,%edx
call   1040 <memcpy@plt>
lea    -0x30(%rbp),%rdi
mov    $0x7,%esi
call   1050 <sum@plt>
mov    %eax,-0x34(%rbp)
mov    -0x34(%rbp),%esi
lea    0xec0(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x28,%rsp
mov    0xef5(%rip),%rax
mov    %rax,0x20(%rsp)
movaps 0xed9(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0xebd(%rip),%xmm0
movaps %xmm0,(%rsp)
mov    %rsp,%rdi
mov    $0x7,%esi
call   1040 <sum@plt>
lea    0xecd(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x28,%rsp
ret

LLVM IR (-O0):
@__const.main.a = [10 x i32] [i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 0, i32 0, i32 0]
@.str = [15 x i8] c"the sum is %d\0A\00"
define i32 @main() {
%1 = alloca [10 x i32]
%2 = alloca i32
%3 = bitcast [10 x i32]* %1 to i8*
%4 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 0
%5 = call i32 @sum(i32* %4, i32 7)
store i32 %5, i32* %2
%6 = load i32, i32* %2
%7 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32 %6)
ret i32 0
}

LLVM IR (-O2):
@__const.main.a = [10 x i32] [i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 0, i32 0, i32 0]
@.str = [15 x i8] c"the sum is %d\0A\00"
define i32 @main() {
%1 = alloca [10 x i32]
%2 = bitcast [10 x i32]* %1 to i8*
%3 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 0
%4 = call i32 @sum(i32* %3, i32 7)
%5 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32 %4)
ret i32 0
}
int satub(int x) {
  if (x < 0) {
    return 0;
  } else if (x > 255) {
    return 255;
  } else {
    return x;
  }
}


x86 assembly (clang, -O0):
<satub>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jge    111d <satub+0x1d>
movl   $0x0,-0x4(%rbp)
jmp    113c <satub+0x3c>
cmpl   $0xff,-0x8(%rbp)
jle    1136 <satub+0x36>
movl   $0xff,-0x4(%rbp)
jmp    113c <satub+0x3c>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<satub>:
cmp    $0xff,%edi
mov    $0xff,%ecx
cmovl  %edi,%ecx
xor    %eax,%eax
test   %ecx,%ecx
cmovns %ecx,%eax
ret

LLVM IR (-O0):
define i32 @satub(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = icmp slt i32 %4, 0
br i1 %5, label %6, label %7
6: ; preds = %1
store i32 0, i32* %2
br label %13
7: ; preds = %1
%8 = load i32, i32* %3
%9 = icmp sgt i32 %8, 255
br i1 %9, label %10, label %11
10: ; preds = %7
store i32 255, i32* %2
br label %13
11: ; preds = %7
%12 = load i32, i32* %3
store i32 %12, i32* %2
br label %13
13: ; preds = %11, %10, %6
%14 = load i32, i32* %2
ret i32 %14
}

LLVM IR (-O2):
define i32 @satub(i32 %0) {
%2 = icmp slt i32 %0, 255
%3 = select i1 %2, i32 %0, i32 255
%4 = icmp sgt i32 %3, 0
%5 = select i1 %4, i32 %3, i32 0
ret i32 %5
}
long double _max(long double a, long double b) {
  if (a < b)
    return b;
  else
    return a;
}


x86 assembly (clang, -O0):
<_max>:
push   %rbp
mov    %rsp,%rbp
fldt   0x20(%rbp)
fldt   0x10(%rbp)
fstpt  -0x20(%rbp)
fstpt  -0x30(%rbp)
fldt   -0x20(%rbp)
fldt   -0x30(%rbp)
fucomip %st(1),%st
fstp   %st(0)
jbe    1130 <_max+0x30>
jmp    1125 <_max+0x25>
fldt   -0x30(%rbp)
fstpt  -0x10(%rbp)
jmp    1136 <_max+0x36>
fldt   -0x20(%rbp)
fstpt  -0x10(%rbp)
fldt   -0x10(%rbp)
pop    %rbp
ret

x86 assembly (clang, -O2):
<_max>:
fldt   0x8(%rsp)
fldt   0x18(%rsp)
fucomi %st(1),%st
fxch   %st(1)
fcmovnbe %st(1),%st
fstp   %st(1)
ret

LLVM IR (-O0):
define x86_fp80 @_max(x86_fp80 %0, x86_fp80 %1) {
%3 = alloca x86_fp80
%4 = alloca x86_fp80
%5 = alloca x86_fp80
store x86_fp80 %0, x86_fp80* %4
store x86_fp80 %1, x86_fp80* %5
%6 = load x86_fp80, x86_fp80* %4
%7 = load x86_fp80, x86_fp80* %5
%8 = fcmp olt x86_fp80 %6, %7
br i1 %8, label %9, label %11
9: ; preds = %2
%10 = load x86_fp80, x86_fp80* %5
store x86_fp80 %10, x86_fp80* %3
br label %13
11: ; preds = %2
%12 = load x86_fp80, x86_fp80* %4
store x86_fp80 %12, x86_fp80* %3
br label %13
13: ; preds = %11, %9
%14 = load x86_fp80, x86_fp80* %3
ret x86_fp80 %14
}

LLVM IR (-O2):
define x86_fp80 @_max(x86_fp80 %0, x86_fp80 %1) {
%3 = fcmp olt x86_fp80 %0, %1
%4 = select i1 %3, x86_fp80 %1, x86_fp80 %0
ret x86_fp80 %4
}
/* Variables and functions */
int rand();
int myrng(unsigned char *dst, int len, void *dat) {
  int x;
  for (x = 0; x < len; x++)
    dst[x] = rand() & 0xFF;
  return len;
}


x86 assembly (clang, -O0):
<myrng>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    115d <myrng+0x4d>
mov    $0x0,%al
call   1030 <rand@plt>
and    $0xff,%eax
mov    %al,%dl
mov    -0x8(%rbp),%rax
movslq -0x1c(%rbp),%rcx
mov    %dl,(%rax,%rcx,1)
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    112a <myrng+0x1a>
mov    -0xc(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<myrng>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %esi,%r14d
test   %esi,%esi
jle    1144 <myrng+0x34>
mov    %rdi,%r15
mov    %r14d,%ebp
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
xor    %eax,%eax
call   1030 <rand@plt>
mov    %al,(%r15,%rbx,1)
add    $0x1,%rbx
cmp    %rbx,%rbp
jne    1130 <myrng+0x20>
mov    %r14d,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @myrng(i8* nocapture writeonly %0, i32 returned %1, i8* nocapture readnone %2) {
%4 = icmp sgt i32 %1, 0
br i1 %4, label %5, label %14
5: ; preds = %3
%6 = zext i32 %1 to i64
br label %7
7: ; preds = %5, %7
%8 = phi i64 [ 0, %5 ], [ %12, %7 ]
%9 = tail call i32 (...) @rand()
%10 = trunc i32 %9 to i8
%11 = getelementptr inbounds i8, i8* %0, i64 %8
store i8 %10, i8* %11
%12 = add nuw nsw i64 %8, 1
%13 = icmp eq i64 %12, %6
br i1 %13, label %14, label %7
14: ; preds = %7, %3
ret i32 %1
}
/* Variables and functions */
int /*<<< orphan*/ deviceIf_emptyFbuffer();
void twoDsim_emptyFbuffer(void) { deviceIf_emptyFbuffer(); }


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

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

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

LLVM IR (-O2):
define void @twoDsim_emptyFbuffer() {
%1 = tail call i32 (...) @deviceIf_emptyFbuffer()
ret void
}
void testMiscCharDevicerDriver() {}


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

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

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

LLVM IR (-O2):
define void @testMiscCharDevicerDriver() {
ret void
}
int dl_iterate_phdr(void *callback, void *data) {
  (void)callback;
  (void)data;
  return -1;
}


x86 assembly (clang, -O0):
<dl_iterate_phdr>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0xffffffff,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @dl_iterate_phdr(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 = load i8*, i8** %4
ret i32 -1
}

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


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

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

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

LLVM IR (-O2):
define void @gdk_add_client_message_filter() {
ret void
}
/* Variables and functions */
char **splitlinesn(char *, int /*<<< orphan*/ *);
char **splitlines(char *input) { return splitlinesn(input, NULL); }


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

x86 assembly (clang, -O2):
<splitlines>:
xor    %esi,%esi
jmp    1030 <splitlinesn@plt>

LLVM IR (-O0):
define i8** @splitlines(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i8** @splitlinesn(i8* %3, i32* null)
ret i8** %4
}

LLVM IR (-O2):
define i8** @splitlines(i8* %0) {
%2 = tail call i8** @splitlinesn(i8* %0, i32* null)
ret i8** %2
}
void renderTable(void) {}


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

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

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

LLVM IR (-O2):
define void @renderTable() {
ret void
}
BOOST_AUTO_TEST_CASE(sin) { TESTCASE1(sin, 0, 0); }


x86 assembly (clang, -O0):
<BOOST_AUTO_TEST_CASE>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%edi
xor    %edx,%edx
mov    %edx,%esi
mov    $0x0,%al
call   1030 <TESTCASE1@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<BOOST_AUTO_TEST_CASE>:
xor    %esi,%esi
xor    %edx,%edx
xor    %eax,%eax
jmp    1030 <TESTCASE1@plt>

LLVM IR (-O0):
define i32 @BOOST_AUTO_TEST_CASE(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = call i32 (i32, i32, i32, ...) bitcast (i32 (...)* @TESTCASE1 to i32 (i32, i32, i32, ...)*)(i32 %4, i32 0, i32 0)
%6 = load i32, i32* %2
ret i32 %6
}

LLVM IR (-O2):
define i32 @BOOST_AUTO_TEST_CASE(i32 %0) {
%2 = tail call i32 (i32, i32, i32, ...) bitcast (i32 (...)* @TESTCASE1 to i32 (i32, i32, i32, ...)*)(i32 %0, i32 0, i32 0)
ret i32 undef
}
void DMA_INT0_IRQHandler(void) {
  while (1) {
  }
}


x86 assembly (clang, -O0):
<DMA_INT0_IRQHandler>:
push   %rbp
mov    %rsp,%rbp
jmp    1109 <DMA_INT0_IRQHandler+0x9>
jmp    1109 <DMA_INT0_IRQHandler+0x9>

x86 assembly (clang, -O2):
<DMA_INT0_IRQHandler>:
jmp    1100 <DMA_INT0_IRQHandler>

LLVM IR (-O0):
define void @DMA_INT0_IRQHandler() {
br label %1
1: ; preds = %0, %1
br label %1
}

LLVM IR (-O2):
define void @DMA_INT0_IRQHandler() {
br label %1
1: ; preds = %0, %1
br label %1
}
void yy_1_XmlReferenceAutoCorrect(char *yytext, int yyleng) {
  ;
  ;
}


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

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

LLVM IR (-O0):
define void @yy_1_XmlReferenceAutoCorrect(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_1_XmlReferenceAutoCorrect(i8* nocapture %0, i32 %1) {
ret void
}
void J400ToARGBRow_SSE2() {}


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

x86 assembly (clang, -O2):
ret

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

LLVM IR (-O2):
define void @J400ToARGBRow_SSE2() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ test_get_allocation();
int main() {
  test_get_allocation();
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <test_get_allocation@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @test_get_allocation()
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @test_get_allocation()
ret i32 0
}
void setBreak(int *context, int brk) { *(context + 8) = brk; }


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

x86 assembly (clang, -O2):
<setBreak>:
mov    %esi,0x20(%rdi)
ret

LLVM IR (-O0):
define void @setBreak(i32* %0, i32 %1) {
%3 = alloca i32*
%4 = alloca i32
store i32* %0, i32** %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = load i32*, i32** %3
%7 = getelementptr inbounds i32, i32* %6, i64 8
store i32 %5, i32* %7
ret void
}

LLVM IR (-O2):
define void @setBreak(i32* nocapture writeonly %0, i32 %1) {
%3 = getelementptr inbounds i32, i32* %0, i64 8
store i32 %1, i32* %3
ret void
}
/* Type definitions */
typedef int uint8_t;
typedef int uint32_t;

/* Variables and functions */
int main(int argc, char **argv) {
  uint32_t x = 0x01234567;
  return ((*((const uint8_t *)(&x))) == 0x67);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x1234567,-0x14(%rbp)
cmpl   $0x67,-0x14(%rbp)
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(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 19088743, i32* %6
%7 = load i32, i32* %6
%8 = icmp eq i32 %7, 103
%9 = zext i1 %8 to i32
ret i32 %9
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
ret i32 0
}
int main() {
  int a[1][2][3][4][3][2][1], b;
  b = a[0][1][2][3] + 2;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x1d0,%rsp
lea    -0x240(%rbp),%rax
add    $0x120,%rax
add    $0xc0,%rax
add    $0x48,%rax
add    $0x10,%rax
mov    %eax,-0x244(%rbp)
xor    %eax,%eax
add    $0x1d0,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca [1 x [2 x [3 x [4 x [3 x [2 x [1 x i32]]]]]]]
%2 = alloca i32
%3 = getelementptr inbounds [1 x [2 x [3 x [4 x [3 x [2 x [1 x i32]]]]]]], [1 x [2 x [3 x [4 x [3 x [2 x [1 x i32]]]]]]]* %1, i64 0, i64 0
%4 = getelementptr inbounds [2 x [3 x [4 x [3 x [2 x [1 x i32]]]]]], [2 x [3 x [4 x [3 x [2 x [1 x i32]]]]]]* %3, i64 0, i64 1
%5 = getelementptr inbounds [3 x [4 x [3 x [2 x [1 x i32]]]]], [3 x [4 x [3 x [2 x [1 x i32]]]]]* %4, i64 0, i64 2
%6 = getelementptr inbounds [4 x [3 x [2 x [1 x i32]]]], [4 x [3 x [2 x [1 x i32]]]]* %5, i64 0, i64 3
%7 = getelementptr inbounds [3 x [2 x [1 x i32]]], [3 x [2 x [1 x i32]]]* %6, i64 0, i64 0
%8 = getelementptr inbounds [2 x [1 x i32]], [2 x [1 x i32]]* %7, i64 2
%9 = ptrtoint [2 x [1 x i32]]* %8 to i32
store i32 %9, i32* %2
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
/* Variables and functions */
double __nv_y1(double);
double y1(double __a) { return __nv_y1(__a); }


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

x86 assembly (clang, -O2):
<y1>:
jmp    1030 <__nv_y1@plt>

LLVM IR (-O0):
define double @y1(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = call double @__nv_y1(double %3)
ret double %4
}

LLVM IR (-O2):
define double @y1(double %0) {
%2 = tail call double @__nv_y1(double %0)
ret double %2
}
/* Variables and functions */
int /*<<< orphan*/ print_multichar(char, int);
int /*<<< orphan*/ print_str(char *);
int strlen(char *);
int printf_str(char str[], int width) {
  int len = strlen(str);
  if (width > len) {
    print_multichar(' ', width - len);
  }
  print_str(str);
  return (width > len) ? width : len;
}


x86 assembly (clang, -O0):
<printf_str>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x10(%rbp),%eax
jle    1167 <printf_str+0x37>
mov    -0xc(%rbp),%esi
sub    -0x10(%rbp),%esi
mov    $0x20,%edi
call   1050 <print_multichar@plt>
mov    -0x8(%rbp),%rdi
call   1040 <print_str@plt>
mov    -0xc(%rbp),%eax
cmp    -0x10(%rbp),%eax
jle    1187 <printf_str+0x57>
mov    -0xc(%rbp),%eax
mov    %eax,-0x14(%rbp)
jmp    118d <printf_str+0x5d>
mov    -0x10(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<printf_str>:
push   %rbp
push   %r14
push   %rbx
mov    %esi,%ebx
mov    %rdi,%r14
call   1030 <strlen@plt>
mov    %eax,%ebp
cmp    %ebx,%eax
jge    1154 <printf_str+0x24>
mov    %ebx,%esi
sub    %ebp,%esi
mov    $0x20,%edi
call   1050 <print_multichar@plt>
mov    %ebx,%ebp
mov    %r14,%rdi
call   1040 <print_str@plt>
mov    %ebp,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
define i32 @printf_str(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
%5 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%6 = load i8*, i8** %3
%7 = call i32 @strlen(i8* %6)
store i32 %7, i32* %5
%8 = load i32, i32* %4
%9 = load i32, i32* %5
%10 = icmp sgt i32 %8, %9
br i1 %10, label %11, label %16
11: ; preds = %2
%12 = load i32, i32* %4
%13 = load i32, i32* %5
%14 = sub nsw i32 %12, %13
%15 = call i32 @print_multichar(i8 signext 32, i32 %14)
br label %16
16: ; preds = %11, %2
%17 = load i8*, i8** %3
%18 = call i32 @print_str(i8* %17)
%19 = load i32, i32* %4
%20 = load i32, i32* %5
%21 = icmp sgt i32 %19, %20
br i1 %21, label %22, label %24
22: ; preds = %16
%23 = load i32, i32* %4
br label %26
24: ; preds = %16
%25 = load i32, i32* %5
br label %26
26: ; preds = %24, %22
%27 = phi i32 [ %23, %22 ], [ %25, %24 ]
ret i32 %27
}

LLVM IR (-O2):
define i32 @printf_str(i8* %0, i32 %1) {
%3 = tail call i32 @strlen(i8* %0)
%4 = icmp slt i32 %3, %1
br i1 %4, label %5, label %8
5: ; preds = %2
%6 = sub nsw i32 %1, %3
%7 = tail call i32 @print_multichar(i8 signext 32, i32 %6)
br label %8
8: ; preds = %5, %2
%9 = phi i32 [ %1, %5 ], [ %3, %2 ]
%10 = tail call i32 @print_str(i8* %0)
ret i32 %9
}
void BN_mod_lshift(void) {}


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

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

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

LLVM IR (-O2):
define void @BN_mod_lshift() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *);
int shmdt(void *);
void detachS_M(void *shmp) {
  if (shmdt(shmp) == -1) {
    printf("detach S_M failed!\n");
    exit(1);
  }
}


x86 assembly (clang, -O0):
<detachS_M>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <shmdt@plt>
cmp    $0xffffffff,%eax
jne    1164 <detachS_M+0x34>
lea    0xeab(%rip),%rdi
call   1040 <printf@plt>
mov    $0x1,%edi
call   1050 <exit@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<detachS_M>:
push   %rax
call   1040 <shmdt@plt>
cmp    $0xffffffff,%eax
je     113d <detachS_M+0xd>
pop    %rax
ret
lea    0xebc(%rip),%rdi
call   1030 <puts@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [20 x i8] c"detach S_M failed!\0A\00"
define void @detachS_M(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @shmdt(i8* %3)
%5 = icmp eq i32 %4, -1
br i1 %5, label %6, label %9
6: ; preds = %1
%7 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
%8 = call i32 @exit(i32 1)
unreachable
9: ; preds = %1
ret void
}

LLVM IR (-O2):
@str = [19 x i8] c"detach S_M failed!\00"
define void @detachS_M(i8* %0) {
%2 = tail call i32 @shmdt(i8* %0)
%3 = icmp eq i32 %2, -1
br i1 %3, label %4, label %7
4: ; preds = %1
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @str, i64 0, i64 0))
%6 = tail call i32 @exit(i32 1)
unreachable
7: ; preds = %1
ret void
}
int foo(int x[]) { return x[0]; }


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

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

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

LLVM IR (-O2):
define i32 @foo(i32* nocapture %0) {
%2 = load i32, i32* %0
ret i32 %2
}
/* Variables and functions */
char *g_DUMMY_popup_promptdialog(int win_id, char *title, char *question,
                                 char *text) {
  win_id = win_id;
  title = title;
  question = question;
  text = text;
  return NULL;
}


x86 assembly (clang, -O0):
<g_DUMMY_popup_promptdialog>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x20(%rbp),%rax
mov    %rax,-0x20(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define noalias i8* @g_DUMMY_popup_promptdialog(i32 %0, i8* nocapture readnone %1, i8* nocapture readnone %2, i8* nocapture readnone %3) {
ret i8* null
}
void autonomous14() {}


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

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

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

LLVM IR (-O2):
define void @autonomous14() {
ret void
}
/* Variables and functions */
void **malloc(int);
void **createHolder(int sock, char *s, int len) {
  void **holder;
  holder = malloc(sizeof(void *) * 3);
  holder[0] = (int *)sock;
  holder[1] = (char *)s;
  holder[2] = (int *)len;
  return holder;
}


x86 assembly (clang, -O0):
<createHolder>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    $0x18,%edi
call   1030 <malloc@plt>
mov    %rax,-0x20(%rbp)
movslq -0x4(%rbp),%rcx
mov    -0x20(%rbp),%rax
mov    %rcx,(%rax)
mov    -0x10(%rbp),%rcx
mov    -0x20(%rbp),%rax
mov    %rcx,0x8(%rax)
movslq -0x14(%rbp),%rcx
mov    -0x20(%rbp),%rax
mov    %rcx,0x10(%rax)
mov    -0x20(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<createHolder>:
push   %rbp
push   %r14
push   %rbx
mov    %edx,%r14d
mov    %rsi,%rbx
mov    %edi,%ebp
mov    $0x18,%edi
call   1030 <malloc@plt>
movslq %ebp,%rcx
mov    %rcx,(%rax)
mov    %rbx,0x8(%rax)
movslq %r14d,%rcx
mov    %rcx,0x10(%rax)
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
define i8** @createHolder(i32 %0, i8* %1, i32 %2) {
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i32
%7 = alloca i8**
store i32 %0, i32* %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%8 = call i8** @malloc(i32 24)
store i8** %8, i8*** %7
%9 = load i32, i32* %4
%10 = sext i32 %9 to i64
%11 = inttoptr i64 %10 to i32*
%12 = bitcast i32* %11 to i8*
%13 = load i8**, i8*** %7
%14 = getelementptr inbounds i8*, i8** %13, i64 0
store i8* %12, i8** %14
%15 = load i8*, i8** %5
%16 = load i8**, i8*** %7
%17 = getelementptr inbounds i8*, i8** %16, i64 1
store i8* %15, i8** %17
%18 = load i32, i32* %6
%19 = sext i32 %18 to i64
%20 = inttoptr i64 %19 to i32*
%21 = bitcast i32* %20 to i8*
%22 = load i8**, i8*** %7
%23 = getelementptr inbounds i8*, i8** %22, i64 2
store i8* %21, i8** %23
%24 = load i8**, i8*** %7
ret i8** %24
}

LLVM IR (-O2):
define noalias i8** @createHolder(i32 %0, i8* %1, i32 %2) {
%4 = tail call i8** @malloc(i32 24)
%5 = sext i32 %0 to i64
%6 = inttoptr i64 %5 to i8*
store i8* %6, i8** %4
%7 = getelementptr inbounds i8*, i8** %4, i64 1
store i8* %1, i8** %7
%8 = sext i32 %2 to i64
%9 = inttoptr i64 %8 to i8*
%10 = getelementptr inbounds i8*, i8** %4, i64 2
store i8* %9, i8** %10
ret i8** %4
}
int GCD(int a, int b) {
  if (a == 0)
    return b;
  return GCD(b % a, a);
}


x86 assembly (clang, -O0):
<GCD>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
cmpl   $0x0,-0x8(%rbp)
jne    1133 <GCD+0x23>
mov    -0xc(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1147 <GCD+0x37>
mov    -0xc(%rbp),%eax
cltd
idivl  -0x8(%rbp)
mov    %edx,%edi
mov    -0x8(%rbp),%esi
call   1030 <GCD@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<GCD>:
mov    %esi,%eax
test   %edi,%edi
je     111d <GCD+0x1d>
mov    %edi,%edx
nopl   0x0(%rax,%rax,1)
mov    %edx,%ecx
cltd
idiv   %ecx
mov    %ecx,%eax
test   %edx,%edx
jne    1110 <GCD+0x10>
mov    %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @GCD(i32 %0, i32 %1) {
%3 = icmp eq i32 %0, 0
br i1 %3, label %9, label %4
4: ; preds = %2, %4
%5 = phi i32 [ %6, %4 ], [ %1, %2 ]
%6 = phi i32 [ %7, %4 ], [ %0, %2 ]
%7 = srem i32 %5, %6
%8 = icmp eq i32 %7, 0
br i1 %8, label %9, label %4
9: ; preds = %4, %2
%10 = phi i32 [ %1, %2 ], [ %6, %4 ]
ret i32 %10
}