xunge/DecIR huggingface dataset:
void rop3_41_0_0(unsigned char *D, unsigned char S, unsigned char T) {
  unsigned char stk1;
  unsigned char stk2;
  unsigned char stk3;
  unsigned char stk4;
  stk4 = T & S;
  stk3 = *D | stk4;
  stk2 = S ^ stk3;
  stk1 = T ^ stk2;
  stk1 = ~stk1;
  *D = stk1;
}


x86 assembly (clang, -O0):
<rop3_41_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)
movzbl -0xa(%rbp),%eax
movzbl -0x9(%rbp),%ecx
and    %ecx,%eax
mov    %al,-0xe(%rbp)
mov    -0x8(%rbp),%rax
movzbl (%rax),%eax
movzbl -0xe(%rbp),%ecx
or     %ecx,%eax
mov    %al,-0xd(%rbp)
movzbl -0x9(%rbp),%eax
movzbl -0xd(%rbp),%ecx
xor    %ecx,%eax
mov    %al,-0xc(%rbp)
movzbl -0xa(%rbp),%eax
movzbl -0xc(%rbp),%ecx
xor    %ecx,%eax
mov    %al,-0xb(%rbp)
movzbl -0xb(%rbp),%eax
xor    $0xffffffff,%eax
mov    %al,-0xb(%rbp)
mov    -0xb(%rbp),%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<rop3_41_0_0>:
mov    %edx,%eax
and    %sil,%al
or     (%rdi),%al
xor    %dl,%sil
xor    %al,%sil
not    %sil
mov    %sil,(%rdi)
ret

LLVM IR (-O0):
define void @rop3_41_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
%9 = alloca i8
%10 = alloca i8
store i8* %0, i8** %4
store i8 %1, i8* %5
store i8 %2, i8* %6
%11 = load i8, i8* %6
%12 = zext i8 %11 to i32
%13 = load i8, i8* %5
%14 = zext i8 %13 to i32
%15 = and i32 %12, %14
%16 = trunc i32 %15 to i8
store i8 %16, i8* %10
%17 = load i8*, i8** %4
%18 = load i8, i8* %17
%19 = zext i8 %18 to i32
%20 = load i8, i8* %10
%21 = zext i8 %20 to i32
%22 = or i32 %19, %21
%23 = trunc i32 %22 to i8
store i8 %23, i8* %9
%24 = load i8, i8* %5
%25 = zext i8 %24 to i32
%26 = load i8, i8* %9
%27 = zext i8 %26 to i32
%28 = xor i32 %25, %27
%29 = trunc i32 %28 to i8
store i8 %29, i8* %8
%30 = load i8, i8* %6
%31 = zext i8 %30 to i32
%32 = load i8, i8* %8
%33 = zext i8 %32 to i32
%34 = xor i32 %31, %33
%35 = trunc i32 %34 to i8
store i8 %35, i8* %7
%36 = load i8, i8* %7
%37 = zext i8 %36 to i32
%38 = xor i32 %37, -1
%39 = trunc i32 %38 to i8
store i8 %39, i8* %7
%40 = load i8, i8* %7
%41 = load i8*, i8** %4
store i8 %40, i8* %41
ret void
}

LLVM IR (-O2):
define void @rop3_41_0_0(i8* nocapture %0, i8 zeroext %1, i8 zeroext %2) {
%4 = and i8 %2, %1
%5 = load i8, i8* %0
%6 = or i8 %5, %4
%7 = xor i8 %1, %2
%8 = xor i8 %7, %6
%9 = xor i8 %8, -1
store i8 %9, i8* %0
ret void
}
/* Variables and functions */
int EOF;
int getchar();
int /*<<< orphan*/ printf(char *, long);
void main() {
  long count = 0;
  int c;
  while ((c = getchar()) != EOF) {
    ++count;
    printf("%ld\n", count);
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movq   $0x0,-0x8(%rbp)
mov    $0x0,%al
call   1040 <getchar@plt>
mov    %eax,-0xc(%rbp)
mov    0x2ea7(%rip),%rcx
cmp    (%rcx),%eax
je     116a <main+0x4a>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xea0(%rip),%rdi
call   1030 <printf@plt>
jmp    1130 <main+0x10>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %rbx
xor    %eax,%eax
call   1040 <getchar@plt>
mov    0x2eb5(%rip),%r15
cmp    (%r15),%eax
je     116b <main+0x4b>
mov    $0x1,%ebx
lea    0xebc(%rip),%r14
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    %r14,%rdi
mov    %rbx,%rsi
call   1030 <printf@plt>
xor    %eax,%eax
call   1040 <getchar@plt>
add    $0x1,%rbx
cmp    (%r15),%eax
jne    1150 <main+0x30>
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@EOF = global i32 0
@.str = [5 x i8] c"%ld\0A\00"
define void @main() {
%1 = alloca i64
%2 = alloca i32
store i64 0, i64* %1
br label %3
3: ; preds = %7, %0
%4 = call i32 (...) @getchar()
store i32 %4, i32* %2
%5 = load i32, i32* @EOF
%6 = icmp ne i32 %4, %5
br i1 %6, label %7, label %12
7: ; preds = %3
%8 = load i64, i64* %1
%9 = add nsw i64 %8, 1
store i64 %9, i64* %1
%10 = load i64, i64* %1
%11 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i64 %10)
br label %3
12: ; preds = %3
ret void
}

LLVM IR (-O2):
@EOF = global i32 0
@.str = [5 x i8] c"%ld\0A\00"
define void @main() {
%1 = tail call i32 (...) @getchar()
%2 = load i32, i32* @EOF
%3 = icmp eq i32 %1, %2
br i1 %3, label %11, label %4
4: ; preds = %0, %4
%5 = phi i64 [ %6, %4 ], [ 0, %0 ]
%6 = add nuw nsw i64 %5, 1
%7 = tail call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i64 %6)
%8 = tail call i32 (...) @getchar()
%9 = load i32, i32* @EOF
%10 = icmp eq i32 %8, %9
br i1 %10, label %11, label %4
11: ; preds = %4, %0
ret void
}
/* Variables and functions */
scalar_t__ ceil(int /*<<< orphan*/);
int /*<<< orphan*/ my_log2(double);
int num_hex_chars(int max_int) {
  int num_bits = (int)ceil(my_log2((double)max_int));
  return (num_bits + 3) / 4;
}


x86 assembly (clang, -O0):
<num_hex_chars>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cvtsi2sdl -0x4(%rbp),%xmm0
call   1040 <my_log2@plt>
mov    %eax,%edi
call   1030 <ceil@plt>
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0x3,%eax
mov    $0x4,%ecx
cltd
idiv   %ecx
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<num_hex_chars>:
push   %rax
cvtsi2sd %edi,%xmm0
call   1040 <my_log2@plt>
mov    %eax,%edi
call   1030 <ceil@plt>
lea    0x3(%rax),%ecx
add    $0x6,%eax
test   %ecx,%ecx
cmovns %ecx,%eax
sar    $0x2,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @num_hex_chars(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = sitofp i32 %4 to double
%6 = call i32 @my_log2(double %5)
%7 = call i64 @ceil(i32 %6)
%8 = trunc i64 %7 to i32
store i32 %8, i32* %3
%9 = load i32, i32* %3
%10 = add nsw i32 %9, 3
%11 = sdiv i32 %10, 4
ret i32 %11
}

LLVM IR (-O2):
define i32 @num_hex_chars(i32 %0) {
%2 = sitofp i32 %0 to double
%3 = tail call i32 @my_log2(double %2)
%4 = tail call i64 @ceil(i32 %3)
%5 = trunc i64 %4 to i32
%6 = add nsw i32 %5, 3
%7 = sdiv i32 %6, 4
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ A_BOLD;
int /*<<< orphan*/ attroff(int /*<<< orphan*/);
int /*<<< orphan*/ attron(int /*<<< orphan*/);
int /*<<< orphan*/ mvaddstr(int, int, char *);
int /*<<< orphan*/ refresh();
void highlight(int y, int x, char *str) {
  attron(A_BOLD);
  mvaddstr(y, x, str);
  attroff(A_BOLD);
  refresh();
}


x86 assembly (clang, -O0):
<highlight>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
mov    0x2e87(%rip),%rax
mov    (%rax),%edi
call   1040 <attron@plt>
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    -0x10(%rbp),%rdx
call   1060 <mvaddstr@plt>
mov    0x2e6a(%rip),%rax
mov    (%rax),%edi
call   1030 <attroff@plt>
mov    $0x0,%al
call   1050 <refresh@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<highlight>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %rdx,%r14
mov    %esi,%ebp
mov    %edi,%ebx
mov    0x2e8b(%rip),%r15
mov    (%r15),%edi
call   1040 <attron@plt>
mov    %ebx,%edi
mov    %ebp,%esi
mov    %r14,%rdx
call   1060 <mvaddstr@plt>
mov    (%r15),%edi
call   1030 <attroff@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
jmp    1050 <refresh@plt>

LLVM IR (-O0):
@A_BOLD = global i32 0
define void @highlight(i32 %0, i32 %1, i8* %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i8*
store i32 %0, i32* %4
store i32 %1, i32* %5
store i8* %2, i8** %6
%7 = load i32, i32* @A_BOLD
%8 = call i32 @attron(i32 %7)
%9 = load i32, i32* %4
%10 = load i32, i32* %5
%11 = load i8*, i8** %6
%12 = call i32 @mvaddstr(i32 %9, i32 %10, i8* %11)
%13 = load i32, i32* @A_BOLD
%14 = call i32 @attroff(i32 %13)
%15 = call i32 (...) @refresh()
ret void
}

LLVM IR (-O2):
@A_BOLD = global i32 0
define void @highlight(i32 %0, i32 %1, i8* %2) {
%4 = load i32, i32* @A_BOLD
%5 = tail call i32 @attron(i32 %4)
%6 = tail call i32 @mvaddstr(i32 %0, i32 %1, i8* %2)
%7 = load i32, i32* @A_BOLD
%8 = tail call i32 @attroff(i32 %7)
%9 = tail call i32 (...) @refresh()
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ siginfo_t;

/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void rthandler(int sig, siginfo_t *si, void *uc) {
  printf("Got signal %d\n", sig);
}


x86 assembly (clang, -O0):
<rthandler>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x4(%rbp),%esi
lea    0xed3(%rip),%rdi
call   1030 <printf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rthandler>:
mov    %edi,%esi
lea    0xee7(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [15 x i8] c"Got signal %d\0A\00"
define void @rthandler(i32 %0, i32* %1, i8* %2) {
%4 = alloca i32
%5 = alloca i32*
%6 = alloca i8*
store i32 %0, i32* %4
store i32* %1, i32** %5
store i8* %2, i8** %6
%7 = load i32, i32* %4
%8 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32 %7)
ret void
}

LLVM IR (-O2):
@.str = [15 x i8] c"Got signal %d\0A\00"
define void @rthandler(i32 %0, i32* nocapture readnone %1, i8* nocapture readnone %2) {
%4 = tail call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32 %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ auth_test();
int /*<<< orphan*/ decode_test();
int /*<<< orphan*/ decode_verify();
int stun_test(void) {
  decode_verify();
  decode_test();
  auth_test();
  return 0;
}


x86 assembly (clang, -O0):
<stun_test>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <decode_verify@plt>
mov    $0x0,%al
call   1050 <decode_test@plt>
mov    $0x0,%al
call   1030 <auth_test@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<stun_test>:
push   %rax
xor    %eax,%eax
call   1040 <decode_verify@plt>
xor    %eax,%eax
call   1050 <decode_test@plt>
xor    %eax,%eax
call   1030 <auth_test@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @stun_test() {
%1 = call i32 (...) @decode_verify()
%2 = call i32 (...) @decode_test()
%3 = call i32 (...) @auth_test()
ret i32 0
}

LLVM IR (-O2):
define i32 @stun_test() {
%1 = tail call i32 (...) @decode_verify()
%2 = tail call i32 (...) @decode_test()
%3 = tail call i32 (...) @auth_test()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ VIM_SIF_I2cWriteByte(unsigned char, unsigned char);
void SensorSetReg_SIV100A(unsigned short uAddr, unsigned short uVal) {
  VIM_SIF_I2cWriteByte((unsigned char)uAddr, (unsigned char)uVal);
}


x86 assembly (clang, -O0):
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %si,%ax
mov    %di,%cx
mov    %cx,-0x2(%rbp)
mov    %ax,-0x4(%rbp)
mov    -0x2(%rbp),%ax
mov    %al,%cl
mov    -0x4(%rbp),%ax
movzbl %cl,%edi
movzbl %al,%esi
call   1030 <VIM_SIF_I2cWriteByte@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
movzbl %dil,%edi
movzbl %sil,%esi
jmp    1030 <VIM_SIF_I2cWriteByte@plt>

LLVM IR (-O0):
define void @SensorSetReg_SIV100A(i16 zeroext %0, i16 zeroext %1) {
%3 = alloca i16
%4 = alloca i16
store i16 %0, i16* %3
store i16 %1, i16* %4
%5 = load i16, i16* %3
%6 = trunc i16 %5 to i8
%7 = load i16, i16* %4
%8 = trunc i16 %7 to i8
%9 = call i32 @VIM_SIF_I2cWriteByte(i8 zeroext %6, i8 zeroext %8)
ret void
}

LLVM IR (-O2):
define void @SensorSetReg_SIV100A(i16 zeroext %0, i16 zeroext %1) {
%3 = trunc i16 %0 to i8
%4 = trunc i16 %1 to i8
%5 = tail call i32 @VIM_SIF_I2cWriteByte(i8 zeroext %3, i8 zeroext %4)
ret void
}
int isblank(int c) { return c == ' ' || c == '\t' ? 1 : 0; }


x86 assembly (clang, -O0):
<isblank>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    $0x1,%al
cmpl   $0x20,-0x4(%rbp)
mov    %al,-0x5(%rbp)
je     1120 <isblank+0x20>
cmpl   $0x9,-0x4(%rbp)
sete   %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%dl
xor    %eax,%eax
mov    $0x1,%ecx
test   $0x1,%dl
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isblank>:
cmp    $0x20,%edi
sete   %al
cmp    $0x9,%edi
sete   %cl
or     %al,%cl
movzbl %cl,%eax
ret

LLVM IR (-O0):
define i32 @isblank(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp eq i32 %3, 32
br i1 %4, label %8, label %5
5: ; preds = %1
%6 = load i32, i32* %2
%7 = icmp eq i32 %6, 9
br label %8
8: ; preds = %5, %1
%9 = phi i1 [ true, %1 ], [ %7, %5 ]
%10 = zext i1 %9 to i64
%11 = select i1 %9, i32 1, i32 0
ret i32 %11
}

LLVM IR (-O2):
define i32 @isblank(i32 %0) {
%2 = icmp eq i32 %0, 32
%3 = icmp eq i32 %0, 9
%4 = or i1 %2, %3
%5 = zext i1 %4 to i32
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void func2(void) { printf("world\n"); }


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

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

LLVM IR (-O0):
@.str = [7 x i8] c"world\0A\00"
define void @func2() {
%1 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [6 x i8] c"world\00"
define void @func2() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void main() { printf("hello world\n"); }


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

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

LLVM IR (-O0):
@.str = [13 x i8] c"hello world\0A\00"
define void @main() {
%1 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [12 x i8] c"hello world\00"
define void @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @str, i64 0, i64 0))
ret void
}
void foo(void) { *(char *)"c" = 'x'; }


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
movb   $0x78,0xef5(%rip)
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [2 x i8] c"c\00"
define void @foo() {
store i8 120, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0)
ret void
}

LLVM IR (-O2):
define void @foo() {
ret void
}
/* Type definitions */
struct trusted_list {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ empty_hash_table(struct trusted_list **);
int /*<<< orphan*/ shm_free(struct trusted_list **);
void free_hash_table(struct trusted_list **table) {
  if (table) {
    empty_hash_table(table);
  }
  shm_free(table);
}


x86 assembly (clang, -O0):
<free_hash_table>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1140 <free_hash_table+0x20>
mov    -0x8(%rbp),%rdi
call   1030 <empty_hash_table@plt>
mov    -0x8(%rbp),%rdi
call   1040 <shm_free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<free_hash_table>:
push   %rbx
mov    %rdi,%rbx
test   %rdi,%rdi
je     1131 <free_hash_table+0x11>
mov    %rbx,%rdi
call   1030 <empty_hash_table@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1040 <shm_free@plt>

LLVM IR (-O0):
%struct.trusted_list = type { i32 }
define void @free_hash_table(%struct.trusted_list** %0) {
%2 = alloca %struct.trusted_list**
store %struct.trusted_list** %0, %struct.trusted_list*** %2
%3 = load %struct.trusted_list**, %struct.trusted_list*** %2
%4 = icmp ne %struct.trusted_list** %3, null
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load %struct.trusted_list**, %struct.trusted_list*** %2
%7 = call i32 @empty_hash_table(%struct.trusted_list** %6)
br label %8
8: ; preds = %5, %1
%9 = load %struct.trusted_list**, %struct.trusted_list*** %2
%10 = call i32 @shm_free(%struct.trusted_list** %9)
ret void
}

LLVM IR (-O2):
%struct.trusted_list = type { i32 }
define void @free_hash_table(%struct.trusted_list** %0) {
%2 = icmp eq %struct.trusted_list** %0, null
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = tail call i32 @empty_hash_table(%struct.trusted_list** %0)
br label %5
5: ; preds = %3, %1
%6 = tail call i32 @shm_free(%struct.trusted_list** %0)
ret void
}
/* Type definitions */
struct list_head {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ list_init_head(struct list_head *);
int /*<<< orphan*/ list_replace(struct list_head *, struct list_head *);
void list_replace_init(struct list_head *old_node, struct list_head *new_node) {
  list_replace(old_node, new_node);
  list_init_head(old_node);
}


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

x86 assembly (clang, -O2):
<list_replace_init>:
push   %rbx
mov    %rdi,%rbx
call   1040 <list_replace@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <list_init_head@plt>

LLVM IR (-O0):
%struct.list_head = type { i32 }
define void @list_replace_init(%struct.list_head* %0, %struct.list_head* %1) {
%3 = alloca %struct.list_head*
%4 = alloca %struct.list_head*
store %struct.list_head* %0, %struct.list_head** %3
store %struct.list_head* %1, %struct.list_head** %4
%5 = load %struct.list_head*, %struct.list_head** %3
%6 = load %struct.list_head*, %struct.list_head** %4
%7 = call i32 @list_replace(%struct.list_head* %5, %struct.list_head* %6)
%8 = load %struct.list_head*, %struct.list_head** %3
%9 = call i32 @list_init_head(%struct.list_head* %8)
ret void
}

LLVM IR (-O2):
%struct.list_head = type { i32 }
define void @list_replace_init(%struct.list_head* %0, %struct.list_head* %1) {
%3 = tail call i32 @list_replace(%struct.list_head* %0, %struct.list_head* %1)
%4 = tail call i32 @list_init_head(%struct.list_head* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ logspace(double *, int, double, double, int);
void log10space(double *x, int n, double x_min, double x_max) {
  logspace(x, n, x_min, x_max, 10);
}


x86 assembly (clang, -O0):
<log10space>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movsd  %xmm0,-0x18(%rbp)
movsd  %xmm1,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
movsd  -0x18(%rbp),%xmm0
movsd  -0x20(%rbp),%xmm1
mov    $0xa,%edx
call   1030 <logspace@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<log10space>:
mov    $0xa,%edx
jmp    1030 <logspace@plt>

LLVM IR (-O0):
define void @log10space(double* %0, i32 %1, double %2, double %3) {
%5 = alloca double*
%6 = alloca i32
%7 = alloca double
%8 = alloca double
store double* %0, double** %5
store i32 %1, i32* %6
store double %2, double* %7
store double %3, double* %8
%9 = load double*, double** %5
%10 = load i32, i32* %6
%11 = load double, double* %7
%12 = load double, double* %8
%13 = call i32 @logspace(double* %9, i32 %10, double %11, double %12, i32 10)
ret void
}

LLVM IR (-O2):
define void @log10space(double* %0, i32 %1, double %2, double %3) {
%5 = tail call i32 @logspace(double* %0, i32 %1, double %2, double %3, i32 10)
ret void
}
void pci_no_aer(void) {}


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

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

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

LLVM IR (-O2):
define void @pci_no_aer() {
ret void
}
int fmsg(s)
char *s;
{
  fatal(s);
  return (0);
}


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

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

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

LLVM IR (-O2):
define i32 @fmsg(i8* %0) {
%2 = tail call i32 (i8*, ...) bitcast (i32 (...)* @fatal to i32 (i8*, ...)*)(i8* %0)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ gmove_lc_32a3t_b();
int /*<<< orphan*/ gmove_lc_32a3t_b2();
int /*<<< orphan*/ gmove_lc_3a3t_b();
int /*<<< orphan*/ gmove_lc_3a3t_b_h();
int /*<<< orphan*/ gmove_lc_3a3t_bc();
int /*<<< orphan*/ gmove_lc_3a3t_c();
int /*<<< orphan*/ gmove_lc_3a3t_c_h();
int /*<<< orphan*/ gmove_lc_3a3t_gb();
int main() {
  gmove_lc_32a3t_b2();
  gmove_lc_32a3t_b();
  gmove_lc_3a3t_b();
  gmove_lc_3a3t_bc();
  gmove_lc_3a3t_b_h();
  gmove_lc_3a3t_c();
  gmove_lc_3a3t_c_h();
  gmove_lc_3a3t_gb();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1050 <gmove_lc_32a3t_b2@plt>
mov    $0x0,%al
call   1040 <gmove_lc_32a3t_b@plt>
mov    $0x0,%al
call   1030 <gmove_lc_3a3t_b@plt>
mov    $0x0,%al
call   1090 <gmove_lc_3a3t_bc@plt>
mov    $0x0,%al
call   10a0 <gmove_lc_3a3t_b_h@plt>
mov    $0x0,%al
call   1070 <gmove_lc_3a3t_c@plt>
mov    $0x0,%al
call   1080 <gmove_lc_3a3t_c_h@plt>
mov    $0x0,%al
call   1060 <gmove_lc_3a3t_gb@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1050 <gmove_lc_32a3t_b2@plt>
xor    %eax,%eax
call   1040 <gmove_lc_32a3t_b@plt>
xor    %eax,%eax
call   1030 <gmove_lc_3a3t_b@plt>
xor    %eax,%eax
call   1090 <gmove_lc_3a3t_bc@plt>
xor    %eax,%eax
call   10a0 <gmove_lc_3a3t_b_h@plt>
xor    %eax,%eax
call   1070 <gmove_lc_3a3t_c@plt>
xor    %eax,%eax
call   1080 <gmove_lc_3a3t_c_h@plt>
xor    %eax,%eax
call   1060 <gmove_lc_3a3t_gb@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @gmove_lc_32a3t_b2()
%3 = call i32 (...) @gmove_lc_32a3t_b()
%4 = call i32 (...) @gmove_lc_3a3t_b()
%5 = call i32 (...) @gmove_lc_3a3t_bc()
%6 = call i32 (...) @gmove_lc_3a3t_b_h()
%7 = call i32 (...) @gmove_lc_3a3t_c()
%8 = call i32 (...) @gmove_lc_3a3t_c_h()
%9 = call i32 (...) @gmove_lc_3a3t_gb()
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @gmove_lc_32a3t_b2()
%2 = tail call i32 (...) @gmove_lc_32a3t_b()
%3 = tail call i32 (...) @gmove_lc_3a3t_b()
%4 = tail call i32 (...) @gmove_lc_3a3t_bc()
%5 = tail call i32 (...) @gmove_lc_3a3t_b_h()
%6 = tail call i32 (...) @gmove_lc_3a3t_c()
%7 = tail call i32 (...) @gmove_lc_3a3t_c_h()
%8 = tail call i32 (...) @gmove_lc_3a3t_gb()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ psignal(int, char *);
void sigdown(int signo) {
  psignal(signo, "Shutting down, got signal");
  exit(0);
}


x86 assembly (clang, -O0):
<sigdown>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
lea    0xecb(%rip),%rsi
call   1040 <psignal@plt>
xor    %edi,%edi
call   1030 <exit@plt>

x86 assembly (clang, -O2):
<sigdown>:
push   %rax
lea    0xed8(%rip),%rsi
call   1040 <psignal@plt>
xor    %edi,%edi
call   1030 <exit@plt>

LLVM IR (-O0):
@.str = [26 x i8] c"Shutting down, got signal\00"
define void @sigdown(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @psignal(i32 %3, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
%5 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@.str = [26 x i8] c"Shutting down, got signal\00"
define void @sigdown(i32 %0) {
%2 = tail call i32 @psignal(i32 %0, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @exit(i32 0)
unreachable
}
/* Variables and functions */
double **getData(char *, int, int);
void readInMiniData(double ***trainingData, int minTestPicNum) {
  char trainingDataPath[100] = "../input/train.csv";
  int trainingPicNum = minTestPicNum;
  (*trainingData) = getData(trainingDataPath, trainingPicNum, 785);
}


x86 assembly (clang, -O0):
<readInMiniData>:
push   %rbp
mov    %rsp,%rbp
sub    $0x80,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
lea    -0x70(%rbp),%rdi
lea    0xec3(%rip),%rsi
mov    $0x64,%edx
call   1040 <memcpy@plt>
mov    -0xc(%rbp),%eax
mov    %eax,-0x74(%rbp)
lea    -0x70(%rbp),%rdi
mov    -0x74(%rbp),%esi
mov    $0x311,%edx
call   1030 <getData@plt>
mov    %rax,%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,(%rax)
add    $0x80,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<readInMiniData>:
push   %rbx
sub    $0x70,%rsp
mov    %rdi,%rbx
movaps 0xf31(%rip),%xmm0
movaps %xmm0,0x50(%rsp)
movaps 0xf15(%rip),%xmm0
movaps %xmm0,0x40(%rsp)
movaps 0xef9(%rip),%xmm0
movaps %xmm0,0x30(%rsp)
movaps 0xedd(%rip),%xmm0
movaps %xmm0,0x20(%rsp)
movaps 0xec1(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0xea5(%rip),%xmm0
movaps %xmm0,(%rsp)
movl   $0x0,0x60(%rsp)
mov    %rsp,%rdi
mov    $0x311,%edx
call   1030 <getData@plt>
mov    %rax,(%rbx)
add    $0x70,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@__const.readInMiniData.trainingDataPath = [100 x i8] c"../input/train.csv\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00"
define void @readInMiniData(double*** %0, i32 %1) {
%3 = alloca double***
%4 = alloca i32
%5 = alloca [100 x i8]
%6 = alloca i32
store double*** %0, double**** %3
store i32 %1, i32* %4
%7 = bitcast [100 x i8]* %5 to i8*
%8 = load i32, i32* %4
store i32 %8, i32* %6
%9 = getelementptr inbounds [100 x i8], [100 x i8]* %5, i64 0, i64 0
%10 = load i32, i32* %6
%11 = call double** @getData(i8* %9, i32 %10, i32 785)
%12 = load double***, double**** %3
store double** %11, double*** %12
ret void
}

LLVM IR (-O2):
@__const.readInMiniData.trainingDataPath = [100 x i8] c"../input/train.csv\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00"
define void @readInMiniData(double*** nocapture writeonly %0, i32 %1) {
%3 = alloca [100 x i8]
%4 = getelementptr inbounds [100 x i8], [100 x i8]* %3, i64 0, i64 0
%5 = call double** @getData(i8* %4, i32 %1, i32 785)
store double** %5, double*** %0
ret void
}
/* Variables and functions */
int /*<<< orphan*/ _PROCEDURE_LINKAGE_TABLE_();
void malloc() {
  _PROCEDURE_LINKAGE_TABLE_();
  return;
}


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

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

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

LLVM IR (-O2):
define void @malloc() {
%1 = tail call i32 (...) @_PROCEDURE_LINKAGE_TABLE_()
ret void
}
/* Variables and functions */
char *chrpos(char cChar, char *pcString) {
  while (*pcString) {
    if (cChar == *pcString)
      return pcString;
    else
      pcString++;
  }
  return NULL;
}


x86 assembly (clang, -O0):
<chrpos>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x9(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x18(%rbp),%rax
cmpb   $0x0,(%rax)
je     114c <chrpos+0x4c>
movsbl -0x9(%rbp),%eax
mov    -0x18(%rbp),%rcx
movsbl (%rcx),%ecx
cmp    %ecx,%eax
jne    113b <chrpos+0x3b>
mov    -0x18(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    1154 <chrpos+0x54>
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
jmp    110e <chrpos+0xe>
movq   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<chrpos>:
mov    (%rsi),%cl
test   %cl,%cl
je     1121 <chrpos+0x21>
mov    %rsi,%rax
nopl   0x0(%rax)
cmp    %dil,%cl
je     1123 <chrpos+0x23>
movzbl 0x1(%rax),%ecx
add    $0x1,%rax
test   %cl,%cl
jne    1110 <chrpos+0x10>
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i8* @chrpos(i8 signext %0, i8* %1) {
%3 = load i8, i8* %1
%4 = icmp eq i8 %3, 0
br i1 %4, label %13, label %5
5: ; preds = %2, %9
%6 = phi i8 [ %11, %9 ], [ %3, %2 ]
%7 = phi i8* [ %10, %9 ], [ %1, %2 ]
%8 = icmp eq i8 %6, %0
br i1 %8, label %13, label %9
9: ; preds = %5
%10 = getelementptr inbounds i8, i8* %7, i64 1
%11 = load i8, i8* %10
%12 = icmp eq i8 %11, 0
br i1 %12, label %13, label %5
13: ; preds = %5, %9, %2
%14 = phi i8* [ null, %2 ], [ null, %9 ], [ %7, %5 ]
ret i8* %14
}
/* Type definitions */
struct index_packet {
  int dummy;
};

/* Variables and functions */
int pgwrite_big_endian(unsigned char *, struct index_packet *);
int pgwrite_little_endian(unsigned char *, struct index_packet *);
int bitpack__pgwrite(unsigned char *page, struct index_packet *source,
                     int little_endian) {
  if (little_endian)
    return pgwrite_little_endian(page, source);
  else
    return pgwrite_big_endian(page, source);
}


x86 assembly (clang, -O0):
<bitpack__pgwrite>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %edx,-0x1c(%rbp)
cmpl   $0x0,-0x1c(%rbp)
je     1152 <bitpack__pgwrite+0x32>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1030 <pgwrite_little_endian@plt>
mov    %eax,-0x4(%rbp)
jmp    1162 <bitpack__pgwrite+0x42>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1040 <pgwrite_big_endian@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bitpack__pgwrite>:
test   %edx,%edx
je     1129 <bitpack__pgwrite+0x9>
jmp    1030 <pgwrite_little_endian@plt>
jmp    1040 <pgwrite_big_endian@plt>

LLVM IR (-O0):
%struct.index_packet = type { i32 }
define i32 @bitpack__pgwrite(i8* %0, %struct.index_packet* %1, i32 %2) {
%4 = alloca i32
%5 = alloca i8*
%6 = alloca %struct.index_packet*
%7 = alloca i32
store i8* %0, i8** %5
store %struct.index_packet* %1, %struct.index_packet** %6
store i32 %2, i32* %7
%8 = load i32, i32* %7
%9 = icmp ne i32 %8, 0
br i1 %9, label %10, label %14
10: ; preds = %3
%11 = load i8*, i8** %5
%12 = load %struct.index_packet*, %struct.index_packet** %6
%13 = call i32 @pgwrite_little_endian(i8* %11, %struct.index_packet* %12)
store i32 %13, i32* %4
br label %18
14: ; preds = %3
%15 = load i8*, i8** %5
%16 = load %struct.index_packet*, %struct.index_packet** %6
%17 = call i32 @pgwrite_big_endian(i8* %15, %struct.index_packet* %16)
store i32 %17, i32* %4
br label %18
18: ; preds = %14, %10
%19 = load i32, i32* %4
ret i32 %19
}

LLVM IR (-O2):
%struct.index_packet = type { i32 }
define i32 @bitpack__pgwrite(i8* %0, %struct.index_packet* %1, i32 %2) {
%4 = icmp eq i32 %2, 0
br i1 %4, label %7, label %5
5: ; preds = %3
%6 = tail call i32 @pgwrite_little_endian(i8* %0, %struct.index_packet* %1)
br label %9
7: ; preds = %3
%8 = tail call i32 @pgwrite_big_endian(i8* %0, %struct.index_packet* %1)
br label %9
9: ; preds = %7, %5
%10 = phi i32 [ %6, %5 ], [ %8, %7 ]
ret i32 %10
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
void main() {
  int x;
  {
    if (x <= 10) {
      assert((x / 3) <= 4);
      assert((x / 3) <= 3);
    }
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
cmpl   $0xa,-0x4(%rbp)
jg     1158 <main+0x48>
mov    -0x4(%rbp),%eax
mov    $0x3,%ecx
cltd
idiv   %ecx
cmp    $0x4,%eax
setle  %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
mov    -0x4(%rbp),%eax
mov    $0x3,%ecx
cltd
idiv   %ecx
cmp    $0x3,%eax
setle  %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x1,%edi
call   1030 <assert@plt>
mov    $0x1,%edi
pop    %rax
jmp    1030 <assert@plt>

LLVM IR (-O0):
define void @main() {
%1 = alloca i32
%2 = load i32, i32* %1
%3 = icmp sle i32 %2, 10
br i1 %3, label %4, label %15
4: ; preds = %0
%5 = load i32, i32* %1
%6 = sdiv i32 %5, 3
%7 = icmp sle i32 %6, 4
%8 = zext i1 %7 to i32
%9 = call i32 @assert(i32 %8)
%10 = load i32, i32* %1
%11 = sdiv i32 %10, 3
%12 = icmp sle i32 %11, 3
%13 = zext i1 %12 to i32
%14 = call i32 @assert(i32 %13)
br label %15
15: ; preds = %4, %0
ret void
}

LLVM IR (-O2):
define void @main() {
%1 = tail call i32 @assert(i32 1)
%2 = tail call i32 @assert(i32 1)
ret void
}
OP(ed, ad) { illegal_2(); }


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

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

LLVM IR (-O0):
define i32 @OP(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
%6 = call i32 (...) @illegal_2()
%7 = load i32, i32* %3
ret i32 %7
}

LLVM IR (-O2):
define i32 @OP(i32 %0, i32 %1) {
%3 = tail call i32 (...) @illegal_2()
ret i32 undef
}
/* Type definitions */
struct stat {
  int dummy;
};

/* Variables and functions */
int stat(char const *, struct stat *);
__attribute__((__weak__, __always___)) int
softboundcets_stat(const char *path, struct stat *buf) {
  return stat(path, buf);
}


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

x86 assembly (clang, -O2):
<softboundcets_stat>:
jmp    1030 <stat@plt>

LLVM IR (-O0):
%struct.stat = type { i32 }
define weak i32 @softboundcets_stat(i8* %0, %struct.stat* %1) {
%3 = alloca i8*
%4 = alloca %struct.stat*
store i8* %0, i8** %3
store %struct.stat* %1, %struct.stat** %4
%5 = load i8*, i8** %3
%6 = load %struct.stat*, %struct.stat** %4
%7 = call i32 @stat(i8* %5, %struct.stat* %6)
ret i32 %7
}

LLVM IR (-O2):
%struct.stat = type { i32 }
define weak i32 @softboundcets_stat(i8* %0, %struct.stat* %1) {
%3 = tail call i32 @stat(i8* %0, %struct.stat* %1)
ret i32 %3
}
void g_cclosure_marshal_VOID__POINTER() {}


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

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

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

LLVM IR (-O2):
define void @g_cclosure_marshal_VOID__POINTER() {
ret void
}
int dump_compressed(struct coredump_params *cprm) { return 0; }


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

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

LLVM IR (-O0):
%struct.coredump_params = type opaque
define i32 @dump_compressed(%struct.coredump_params* %0) {
%2 = alloca %struct.coredump_params*
store %struct.coredump_params* %0, %struct.coredump_params** %2
ret i32 0
}

LLVM IR (-O2):
%struct.coredump_params = type opaque
define i32 @dump_compressed(%struct.coredump_params* nocapture readnone %0) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ sprintf(char *, char *, char *);
scalar_t__ strlen(char *);
char *svz_malloc(scalar_t__);
char *dyn_create_symbol(char *description) {
  char *symbol;
  symbol = svz_malloc(strlen(description) + 1 +
                      strlen(""
                             "_server_definition"));
  sprintf(symbol,
          ""
          "%s_server_definition",
          description);
  return symbol;
}


x86 assembly (clang, -O0):
<dyn_create_symbol>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
lea    0xeae(%rip),%rdi
call   1030 <strlen@plt>
mov    -0x18(%rbp),%rdi
add    %rax,%rdi
call   1040 <svz_malloc@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rdx
lea    0xe88(%rip),%rsi
call   1050 <sprintf@plt>
mov    -0x10(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dyn_create_symbol>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
call   1030 <strlen@plt>
lea    0x13(%rax),%rdi
call   1040 <svz_malloc@plt>
mov    %rax,%rbx
lea    0xeb1(%rip),%rsi
mov    %rax,%rdi
mov    %r14,%rdx
call   1050 <sprintf@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [19 x i8] c"_server_definition\00"
@.str.1 = [21 x i8] c"%s_server_definition\00"
define i8* @dyn_create_symbol(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i64 @strlen(i8* %4)
%6 = add nsw i64 %5, 1
%7 = call i64 @strlen(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
%8 = add nsw i64 %6, %7
%9 = call i8* @svz_malloc(i64 %8)
store i8* %9, i8** %3
%10 = load i8*, i8** %3
%11 = load i8*, i8** %2
%12 = call i32 @sprintf(i8* %10, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.1, i64 0, i64 0), i8* %11)
%13 = load i8*, i8** %3
ret i8* %13
}

LLVM IR (-O2):
@.str.1 = [21 x i8] c"%s_server_definition\00"
define i8* @dyn_create_symbol(i8* %0) {
%2 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%3 = add nsw i64 %2, 19
%4 = tail call i8* @svz_malloc(i64 %3)
%5 = tail call i32 @sprintf(i8* dereferenceable(1) %4, i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @.str.1, i64 0, i64 0), i8* %0)
ret i8* %4
}
/* Variables and functions */
int /*<<< orphan*/ errno;
int /*<<< orphan*/ fatal_f(char *, char const *, int /*<<< orphan*/,
                           int /*<<< orphan*/);
int /*<<< orphan*/ strerror(int /*<<< orphan*/);
void errno_exit(const char *s) {
  fatal_f("%s error %d, %s\n", s, errno, strerror(errno));
}


x86 assembly (clang, -O0):
<errno_exit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    0x2ea5(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0xc(%rbp)
mov    0x2e99(%rip),%rax
mov    (%rax),%edi
call   1040 <strerror@plt>
mov    -0x18(%rbp),%rsi
mov    -0xc(%rbp),%edx
mov    %eax,%ecx
lea    0xea2(%rip),%rdi
call   1030 <fatal_f@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<errno_exit>:
push   %rbp
push   %rbx
push   %rax
mov    %rdi,%rbx
mov    0x2eb3(%rip),%rax
mov    (%rax),%ebp
mov    %ebp,%edi
call   1040 <strerror@plt>
lea    0xec3(%rip),%rdi
mov    %rbx,%rsi
mov    %ebp,%edx
mov    %eax,%ecx
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <fatal_f@plt>

LLVM IR (-O0):
@.str = [17 x i8] c"%s error %d, %s\0A\00"
@errno = global i32 0
define void @errno_exit(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = load i32, i32* @errno
%5 = load i32, i32* @errno
%6 = call i32 @strerror(i32 %5)
%7 = call i32 @fatal_f(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i8* %3, i32 %4, i32 %6)
ret void
}

LLVM IR (-O2):
@.str = [17 x i8] c"%s error %d, %s\0A\00"
@errno = global i32 0
define void @errno_exit(i8* %0) {
%2 = load i32, i32* @errno
%3 = tail call i32 @strerror(i32 %2)
%4 = tail call i32 @fatal_f(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i8* %0, i32 %2, i32 %3)
ret void
}
void gtk_action_group_set_translate_func() {}


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

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

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

LLVM IR (-O2):
define void @gtk_action_group_set_translate_func() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int n, i, k;
  scanf("%d", &n);
  i = n * n;
  k = i * n;
  printf("%d\n%d", i, k);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xecd(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
mov    -0x8(%rbp),%eax
imul   -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
imul   -0x8(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
lea    0xea0(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xedb(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1040 <scanf@plt>
mov    0x4(%rsp),%edx
mov    %edx,%esi
imul   %edx,%esi
imul   %esi,%edx
lea    0xebb(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
@.str.1 = [6 x i8] c"%d\0A%d\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 0, i32* %1
%5 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %2)
%6 = load i32, i32* %2
%7 = load i32, i32* %2
%8 = mul nsw i32 %6, %7
store i32 %8, i32* %3
%9 = load i32, i32* %3
%10 = load i32, i32* %2
%11 = mul nsw i32 %9, %10
store i32 %11, i32* %4
%12 = load i32, i32* %3
%13 = load i32, i32* %4
%14 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32 %12, i32 %13)
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@.str.1 = [6 x i8] c"%d\0A%d\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%4 = load i32, i32* %1
%5 = mul nsw i32 %4, %4
%6 = mul nsw i32 %5, %4
%7 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32 %5, i32 %6)
ret i32 0
}
void IN_MouseEvent(int mstate) {}


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

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

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

LLVM IR (-O2):
define void @IN_MouseEvent(i32 %0) {
ret void
}
int foo4() { return 1; }


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

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

LLVM IR (-O0):
define i32 @foo4() {
ret i32 1
}

LLVM IR (-O2):
define i32 @foo4() {
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ allocate_for_task(int);
int /*<<< orphan*/ create_task(char *, int);
int /*<<< orphan*/ puts(char *);
void load_shell(void) {
  allocate_for_task(1);
  puts("Loading Shell...");
  create_task("SHELL   BIN", 1);
  puts("OK\n\r");
}


x86 assembly (clang, -O0):
<load_shell>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1,%edi
call   1050 <allocate_for_task@plt>
lea    0xebb(%rip),%rdi
call   1030 <puts@plt>
lea    0xec0(%rip),%rdi
mov    $0x1,%esi
call   1040 <create_task@plt>
lea    0xebb(%rip),%rdi
call   1030 <puts@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<load_shell>:
push   %rax
mov    $0x1,%edi
call   1050 <allocate_for_task@plt>
lea    0xebe(%rip),%rdi
call   1030 <puts@plt>
lea    0xec3(%rip),%rdi
mov    $0x1,%esi
call   1040 <create_task@plt>
lea    0xebe(%rip),%rdi
pop    %rax
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [17 x i8] c"Loading Shell...\00"
@.str.1 = [12 x i8] c"SHELL BIN\00"
@.str.2 = [5 x i8] c"OK\0A\0D\00"
define void @load_shell() {
%1 = call i32 @allocate_for_task(i32 1)
%2 = call i32 @puts(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @create_task(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0), i32 1)
%4 = call i32 @puts(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [17 x i8] c"Loading Shell...\00"
@.str.1 = [12 x i8] c"SHELL BIN\00"
@.str.2 = [5 x i8] c"OK\0A\0D\00"
define void @load_shell() {
%1 = tail call i32 @allocate_for_task(i32 1)
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @create_task(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0), i32 1)
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0))
ret void
}
void getBits(unsigned char c, unsigned char *to) {
  unsigned j = 0;
  signed i;
  for (i = 7; i >= 0; i--) {
    to[j] = (((c) >> (i)) & 1);
    j++;
  }
}


x86 assembly (clang, -O0):
<getBits>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
movl   $0x7,-0x18(%rbp)
cmpl   $0x0,-0x18(%rbp)
jl     1155 <getBits+0x55>
movzbl -0x1(%rbp),%eax
mov    -0x18(%rbp),%ecx
sar    %cl,%eax
and    $0x1,%eax
mov    %al,%dl
mov    -0x10(%rbp),%rax
mov    -0x14(%rbp),%ecx
mov    %dl,(%rax,%rcx,1)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
mov    -0x18(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x18(%rbp)
jmp    111c <getBits+0x1c>
pop    %rbp
ret

x86 assembly (clang, -O2):
<getBits>:
mov    %edi,%eax
shr    $0x7,%al
mov    %al,(%rsi)
mov    %edi,%eax
shr    $0x6,%al
and    $0x1,%al
mov    %al,0x1(%rsi)
mov    %edi,%eax
shr    $0x5,%al
and    $0x1,%al
mov    %al,0x2(%rsi)
mov    %edi,%eax
shr    $0x4,%al
and    $0x1,%al
mov    %al,0x3(%rsi)
mov    %edi,%eax
shr    $0x3,%al
and    $0x1,%al
mov    %al,0x4(%rsi)
mov    %edi,%eax
shr    $0x2,%al
and    $0x1,%al
mov    %al,0x5(%rsi)
mov    %edi,%eax
shr    %al
and    $0x1,%al
mov    %al,0x6(%rsi)
and    $0x1,%dil
mov    %dil,0x7(%rsi)
ret

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

LLVM IR (-O2):
define void @getBits(i8 zeroext %0, i8* nocapture writeonly %1) {
%3 = lshr i8 %0, 7
store i8 %3, i8* %1
%4 = lshr i8 %0, 6
%5 = and i8 %4, 1
%6 = getelementptr inbounds i8, i8* %1, i64 1
store i8 %5, i8* %6
%7 = lshr i8 %0, 5
%8 = and i8 %7, 1
%9 = getelementptr inbounds i8, i8* %1, i64 2
store i8 %8, i8* %9
%10 = lshr i8 %0, 4
%11 = and i8 %10, 1
%12 = getelementptr inbounds i8, i8* %1, i64 3
store i8 %11, i8* %12
%13 = lshr i8 %0, 3
%14 = and i8 %13, 1
%15 = getelementptr inbounds i8, i8* %1, i64 4
store i8 %14, i8* %15
%16 = lshr i8 %0, 2
%17 = and i8 %16, 1
%18 = getelementptr inbounds i8, i8* %1, i64 5
store i8 %17, i8* %18
%19 = lshr i8 %0, 1
%20 = and i8 %19, 1
%21 = getelementptr inbounds i8, i8* %1, i64 6
store i8 %20, i8* %21
%22 = and i8 %0, 1
%23 = getelementptr inbounds i8, i8* %1, i64 7
store i8 %22, i8* %23
ret void
}
int f2iz(float a) { return (int)a; }


x86 assembly (clang, -O0):
<f2iz>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
cvttss2si -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<f2iz>:
cvttss2si %xmm0,%eax
ret

LLVM IR (-O0):
define i32 @f2iz(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = fptosi float %3 to i32
ret i32 %4
}

LLVM IR (-O2):
define i32 @f2iz(float %0) {
%2 = fptosi float %0 to i32
ret i32 %2
}
void fault_undefined() {
  while (1)
    ;
}


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

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

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

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