xunge/DecIR huggingface dataset:
int test_imm_2Cint64_highword_mem(long long *val) {
  return ((*val >> 32) & (0x2C << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_2Cint64_highword_mem>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rdx
sar    $0x20,%rdx
and    $0x2c,%rdx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%rdx
cmovne %ecx,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @test_imm_2Cint64_highword_mem(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = and i64 %2, 188978561024
%4 = icmp eq i64 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
void gtk_paint_shadow_gap() {}


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

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

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

LLVM IR (-O2):
define void @gtk_paint_shadow_gap() {
ret void
}
int param_set_file(char *fn) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @param_set_file(i8* nocapture readnone %0) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ panic(char *);
void device_availibility_fault(void) {
  panic("exception(fault): device not available");
}


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

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

LLVM IR (-O0):
@.str = [39 x i8] c"exception(fault): device not available\00"
define void @device_availibility_fault() {
%1 = call i32 @panic(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [39 x i8] c"exception(fault): device not available\00"
define void @device_availibility_fault() {
%1 = tail call i32 @panic(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ scanf(char *, int *);
int /*<<< orphan*/ system(char *);
main() {
  int X;
  scanf("%d", &X);
  printf("%d minutos\n", 60 * X / 30);
  system("pause");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeba(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1050 <scanf@plt>
imul   $0x3c,-0x8(%rbp),%eax
mov    $0x1e,%ecx
cltd
idiv   %ecx
mov    %eax,%esi
lea    0xe9f(%rip),%rdi
call   1040 <printf@plt>
lea    0xe9f(%rip),%rdi
call   1030 <system@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@.str.1 = [12 x i8] c"%d minutos\0A\00"
@.str.2 = [6 x i8] c"pause\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 = shl nsw i32 %4, 1
%6 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0), i32 %5)
%7 = call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0))
ret i32 0
}
void SSL_CTX_new(void) {}


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

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

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

LLVM IR (-O2):
define void @SSL_CTX_new() {
ret void
}
/* Variables and functions */
scalar_t__ malloc(int);
double *nl_dmatrix_create(size_t m, size_t n) {
  double *A = (double *)malloc(sizeof(double) * n * m);
  return A;
}


x86 assembly (clang, -O0):
<nl_dmatrix_create>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
shl    $0x3,%rax
imul   -0x8(%rbp),%rax
mov    %eax,%edi
call   1030 <malloc@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<nl_dmatrix_create>:
imul   %esi,%edi
shl    $0x3,%edi
jmp    1030 <malloc@plt>

LLVM IR (-O0):
define double* @nl_dmatrix_create(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
%5 = alloca double*
store i64 %0, i64* %3
store i64 %1, i64* %4
%6 = load i64, i64* %4
%7 = mul i64 8, %6
%8 = load i64, i64* %3
%9 = mul i64 %7, %8
%10 = trunc i64 %9 to i32
%11 = call i64 @malloc(i32 %10)
%12 = inttoptr i64 %11 to double*
store double* %12, double** %5
%13 = load double*, double** %5
ret double* %13
}

LLVM IR (-O2):
define double* @nl_dmatrix_create(i64 %0, i64 %1) {
%3 = shl i64 %0, 3
%4 = mul i64 %3, %1
%5 = trunc i64 %4 to i32
%6 = tail call i64 @malloc(i32 %5)
%7 = inttoptr i64 %6 to double*
ret double* %7
}
/* Variables and functions */
int /*<<< orphan*/ sprintf(char *, char *, int);
int strlen(char *);
int count_digits(int value) {
  char tmp[32];
  sprintf(tmp, "%d", value);
  return strlen(tmp);
}


x86 assembly (clang, -O0):
<count_digits>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
lea    -0x30(%rbp),%rdi
mov    -0x4(%rbp),%edx
lea    0xec7(%rip),%rsi
call   1040 <sprintf@plt>
lea    -0x30(%rbp),%rdi
call   1030 <strlen@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<count_digits>:
push   %rbx
sub    $0x20,%rsp
mov    %edi,%edx
lea    0xed2(%rip),%rsi
mov    %rsp,%rbx
mov    %rbx,%rdi
call   1040 <sprintf@plt>
mov    %rbx,%rdi
call   1030 <strlen@plt>
add    $0x20,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
define i32 @count_digits(i32 %0) {
%2 = alloca i32
%3 = alloca [32 x i8]
store i32 %0, i32* %2
%4 = getelementptr inbounds [32 x i8], [32 x i8]* %3, i64 0, i64 0
%5 = load i32, i32* %2
%6 = call i32 @sprintf(i8* %4, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %5)
%7 = getelementptr inbounds [32 x i8], [32 x i8]* %3, i64 0, i64 0
%8 = call i32 @strlen(i8* %7)
ret i32 %8
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
define i32 @count_digits(i32 %0) {
%2 = alloca [32 x i8]
%3 = getelementptr inbounds [32 x i8], [32 x i8]* %2, i64 0, i64 0
%4 = call i32 @sprintf(i8* %3, i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %0)
%5 = call i32 @strlen(i8* %3)
ret i32 %5
}
OP(fd, fb) { op_fb(); }


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 <op_fb@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<OP>:
xor    %eax,%eax
jmp    1030 <op_fb@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 (...) @op_fb()
%7 = load i32, i32* %3
ret i32 %7
}

LLVM IR (-O2):
define i32 @OP(i32 %0, i32 %1) {
%3 = tail call i32 (...) @op_fb()
ret i32 undef
}
/* Variables and functions */
int getbegy(int /*<<< orphan*/);
int /*<<< orphan*/ stdscr;
int t_getbegy() { return getbegy(stdscr); }


x86 assembly (clang, -O0):
<t_getbegy>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ecd(%rip),%rax
mov    (%rax),%edi
call   1030 <getbegy@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_getbegy>:
mov    0x2ed1(%rip),%rax
mov    (%rax),%edi
jmp    1030 <getbegy@plt>

LLVM IR (-O0):
@stdscr = global i32 0
define i32 @t_getbegy() {
%1 = load i32, i32* @stdscr
%2 = call i32 @getbegy(i32 %1)
ret i32 %2
}

LLVM IR (-O2):
@stdscr = global i32 0
define i32 @t_getbegy() {
%1 = load i32, i32* @stdscr
%2 = tail call i32 @getbegy(i32 %1)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ bar(int);
void foo(void) {
  int i;
#pragma omp parallel for default(none)
  for (i = 0; i < 10; i++)
    bar(i);
}


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
cmpl   $0xa,-0x4(%rbp)
jge    113f <foo+0x2f>
mov    -0x4(%rbp),%edi
call   1030 <bar@plt>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    111f <foo+0xf>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo>:
push   %rax
xor    %edi,%edi
call   1030 <bar@plt>
mov    $0x1,%edi
call   1030 <bar@plt>
mov    $0x2,%edi
call   1030 <bar@plt>
mov    $0x3,%edi
call   1030 <bar@plt>
mov    $0x4,%edi
call   1030 <bar@plt>
mov    $0x5,%edi
call   1030 <bar@plt>
mov    $0x6,%edi
call   1030 <bar@plt>
mov    $0x7,%edi
call   1030 <bar@plt>
mov    $0x8,%edi
call   1030 <bar@plt>
mov    $0x9,%edi
pop    %rax
jmp    1030 <bar@plt>

LLVM IR (-O0):
define void @foo() {
%1 = alloca i32
store i32 0, i32* %1
br label %2
2: ; preds = %8, %0
%3 = load i32, i32* %1
%4 = icmp slt i32 %3, 10
br i1 %4, label %5, label %11
5: ; preds = %2
%6 = load i32, i32* %1
%7 = call i32 @bar(i32 %6)
br label %8
8: ; preds = %5
%9 = load i32, i32* %1
%10 = add nsw i32 %9, 1
store i32 %10, i32* %1
br label %2
11: ; preds = %2
ret void
}

LLVM IR (-O2):
define void @foo() {
%1 = tail call i32 @bar(i32 0)
%2 = tail call i32 @bar(i32 1)
%3 = tail call i32 @bar(i32 2)
%4 = tail call i32 @bar(i32 3)
%5 = tail call i32 @bar(i32 4)
%6 = tail call i32 @bar(i32 5)
%7 = tail call i32 @bar(i32 6)
%8 = tail call i32 @bar(i32 7)
%9 = tail call i32 @bar(i32 8)
%10 = tail call i32 @bar(i32 9)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main() { printf("Bonjour la classe...\n"); }


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

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

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

LLVM IR (-O2):
@str = [21 x i8] c"Bonjour la classe...\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ Display;
typedef int /*<<< orphan*/ Atom;

/* Variables and functions */
int /*<<< orphan*/ XInternAtom(int /*<<< orphan*/ *, char *,
                               int /*<<< orphan*/);
void useXlib(char **names, Display *display) {
  Atom atoms[500];
  for (int i = 0; i < 500; i++) {
    atoms[i] = XInternAtom(display, names[i], 0);
  }
}


x86 assembly (clang, -O0):
<useXlib>:
push   %rbp
mov    %rsp,%rbp
sub    $0x7f0,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x7e4(%rbp)
cmpl   $0x1f4,-0x7e4(%rbp)
jge    117b <useXlib+0x6b>
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rax
movslq -0x7e4(%rbp),%rcx
mov    (%rax,%rcx,8),%rsi
xor    %edx,%edx
call   1030 <XInternAtom@plt>
mov    %eax,%ecx
movslq -0x7e4(%rbp),%rax
mov    %ecx,-0x7e0(%rbp,%rax,4)
mov    -0x7e4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x7e4(%rbp)
jmp    112d <useXlib+0x1d>
add    $0x7f0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<useXlib>:
push   %r15
push   %r14
push   %rbx
mov    %rsi,%r14
mov    %rdi,%r15
xor    %ebx,%ebx
nopl   (%rax)
mov    (%r15,%rbx,8),%rsi
mov    %r14,%rdi
xor    %edx,%edx
call   1030 <XInternAtom@plt>
add    $0x1,%rbx
cmp    $0x1f4,%rbx
jne    1120 <useXlib+0x10>
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
define void @useXlib(i8** nocapture %0, i32* %1) {
br label %4
3: ; preds = %4
ret void
4: ; preds = %2, %4
%5 = phi i64 [ 0, %2 ], [ %9, %4 ]
%6 = getelementptr inbounds i8*, i8** %0, i64 %5
%7 = load i8*, i8** %6
%8 = tail call i32 @XInternAtom(i32* %1, i8* %7, i32 0)
%9 = add nuw nsw i64 %5, 1
%10 = icmp eq i64 %9, 500
br i1 %10, label %3, label %4
}
/* Variables and functions */
int /*<<< orphan*/ Z_Free(void *);
void BotImport_FreeMemory(void *ptr) { Z_Free(ptr); }


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

x86 assembly (clang, -O2):
<BotImport_FreeMemory>:
jmp    1030 <Z_Free@plt>

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

LLVM IR (-O2):
define void @BotImport_FreeMemory(i8* %0) {
%2 = tail call i32 @Z_Free(i8* %0)
ret void
}
void RTLogLoggerV(void) {}


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

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

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

LLVM IR (-O2):
define void @RTLogLoggerV() {
ret void
}
int returnMinOnes(int timeCode) { return timeCode % 10; }


x86 assembly (clang, -O0):
<returnMinOnes>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %edx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<returnMinOnes>:
movslq %edi,%rax
imul   $0x66666667,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
sar    $0x22,%rcx
add    %edx,%ecx
add    %ecx,%ecx
lea    (%rcx,%rcx,4),%ecx
sub    %ecx,%eax
ret

LLVM IR (-O0):
define i32 @returnMinOnes(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = srem i32 %3, 10
ret i32 %4
}

LLVM IR (-O2):
define i32 @returnMinOnes(i32 %0) {
%2 = srem i32 %0, 10
ret i32 %2
}
void hpgDeleteParticles(void *data) {}


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

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

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

LLVM IR (-O2):
define void @hpgDeleteParticles(i8* nocapture %0) {
ret void
}
/* Type definitions */
struct mainwindow {
  int dummy;
};

/* Variables and functions */
int prev_item(struct mainwindow *);
int handle_prev(struct mainwindow *mw) { return prev_item(mw); }


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

x86 assembly (clang, -O2):
<handle_prev>:
jmp    1030 <prev_item@plt>

LLVM IR (-O0):
%struct.mainwindow = type { i32 }
define i32 @handle_prev(%struct.mainwindow* %0) {
%2 = alloca %struct.mainwindow*
store %struct.mainwindow* %0, %struct.mainwindow** %2
%3 = load %struct.mainwindow*, %struct.mainwindow** %2
%4 = call i32 @prev_item(%struct.mainwindow* %3)
ret i32 %4
}

LLVM IR (-O2):
%struct.mainwindow = type { i32 }
define i32 @handle_prev(%struct.mainwindow* %0) {
%2 = tail call i32 @prev_item(%struct.mainwindow* %0)
ret i32 %2
}
void console_reinit(void) {}


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

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

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

LLVM IR (-O2):
define void @console_reinit() {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int feof(int /*<<< orphan*/ *);
int c_feof(void *stream) { return feof((FILE *)stream); }


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

x86 assembly (clang, -O2):
<c_feof>:
jmp    1030 <feof@plt>

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

LLVM IR (-O2):
define i32 @c_feof(i8* nocapture %0) {
%2 = bitcast i8* %0 to i32*
%3 = tail call i32 @feof(i32* %2)
ret i32 %3
}
__attribute__((always_)) void sti(void) { __asm__ __volatile__("sti"); }


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

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

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

LLVM IR (-O2):
define void @sti() {
tail call void asm sideeffect "sti", "~{dirflag},~{fpsr},~{flags}"()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ ArbitraryPrecision_n(int, int);
int EXIT_SUCCESS;
int main(void) {
  ArbitraryPrecision_n(2, 4000);
  return EXIT_SUCCESS;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x2,%edi
mov    $0xfa0,%esi
call   1030 <ArbitraryPrecision_n@plt>
mov    0x2eab(%rip),%rax
mov    (%rax),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x2,%edi
mov    $0xfa0,%esi
call   1030 <ArbitraryPrecision_n@plt>
mov    0x2eb9(%rip),%rax
mov    (%rax),%eax
pop    %rcx
ret

LLVM IR (-O0):
@EXIT_SUCCESS = global i32 0
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @ArbitraryPrecision_n(i32 2, i32 4000)
%3 = load i32, i32* @EXIT_SUCCESS
ret i32 %3
}

LLVM IR (-O2):
@EXIT_SUCCESS = global i32 0
define i32 @main() {
%1 = tail call i32 @ArbitraryPrecision_n(i32 2, i32 4000)
%2 = load i32, i32* @EXIT_SUCCESS
ret i32 %2
}
const char *Pointer_Definition(void) {
  return "struct Pointer {\n"
         "  void (*ref)(var, var);\n"
         "  var (*deref)(var);\n"
         "};\n";
}


x86 assembly (clang, -O0):
<Pointer_Definition>:
push   %rbp
mov    %rsp,%rbp
lea    0xef5(%rip),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<Pointer_Definition>:
lea    0xef9(%rip),%rax
ret

LLVM IR (-O0):
@.str = [67 x i8] c"struct Pointer {\0A void (*ref)(var, var);\0A var (*deref)(var);\0A};\0A\00"
define i8* @Pointer_Definition() {
ret i8* getelementptr inbounds ([67 x i8], [67 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [67 x i8] c"struct Pointer {\0A void (*ref)(var, var);\0A var (*deref)(var);\0A};\0A\00"
define i8* @Pointer_Definition() {
ret i8* getelementptr inbounds ([67 x i8], [67 x i8]* @.str, i64 0, i64 0)
}
long long longlong_ignoring_signedshort(long long x, signed short y) {
  return x;
}


x86 assembly (clang, -O0):
<longlong_ignoring_signedshort>:
push   %rbp
mov    %rsp,%rbp
mov    %si,%ax
mov    %rdi,-0x8(%rbp)
mov    %ax,-0xa(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<longlong_ignoring_signedshort>:
mov    %rdi,%rax
ret

LLVM IR (-O0):
define i64 @longlong_ignoring_signedshort(i64 %0, i16 signext %1) {
%3 = alloca i64
%4 = alloca i16
store i64 %0, i64* %3
store i16 %1, i16* %4
%5 = load i64, i64* %3
ret i64 %5
}

LLVM IR (-O2):
define i64 @longlong_ignoring_signedshort(i64 returned %0, i16 signext %1) {
ret i64 %0
}
int _monitor_cmd_exit(char *argv[], int argc) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @_monitor_cmd_exit(i8** nocapture readnone %0, i32 %1) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char const *);
void usage(const char *progname) {
  printf("Usage: %s [EAL args] -- -n <node_id>\n\n", progname);
}


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

x86 assembly (clang, -O2):
<usage>:
mov    %rdi,%rsi
lea    0xee6(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [39 x i8] c"Usage: %s [EAL args] -- -n <node_id>\0A\0A\00"
define void @usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @printf(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str, i64 0, i64 0), i8* %3)
ret void
}

LLVM IR (-O2):
@.str = [39 x i8] c"Usage: %s [EAL args] -- -n <node_id>\0A\0A\00"
define void @usage(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
/* Variables and functions */
char *strrchr(char const *, char);
const char *FS_FileExtension(const char *in) {
  const char *out = strrchr(in, '.');
  return (out ? out : "");
}


x86 assembly (clang, -O0):
<FS_FileExtension>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x2e,%esi
call   1030 <strrchr@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     1146 <FS_FileExtension+0x36>
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
jmp    1156 <FS_FileExtension+0x46>
lea    0xeb3(%rip),%rax
mov    %rax,-0x18(%rbp)
jmp    1156 <FS_FileExtension+0x46>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<FS_FileExtension>:
push   %rax
mov    $0x2e,%esi
call   1030 <strrchr@plt>
test   %rax,%rax
lea    0xedb(%rip),%rcx
cmove  %rcx,%rax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [1 x i8] zeroinitializer
define i8* @FS_FileExtension(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i8* @strrchr(i8* %4, i8 signext 46)
store i8* %5, i8** %3
%6 = load i8*, i8** %3
%7 = icmp ne i8* %6, null
br i1 %7, label %8, label %10
8: ; preds = %1
%9 = load i8*, i8** %3
br label %11
10: ; preds = %1
br label %11
11: ; preds = %10, %8
%12 = phi i8* [ %9, %8 ], [ getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0), %10 ]
ret i8* %12
}

LLVM IR (-O2):
@.str = [1 x i8] zeroinitializer
define i8* @FS_FileExtension(i8* %0) {
%2 = tail call i8* @strrchr(i8* dereferenceable(1) %0, i8 signext 46)
%3 = icmp eq i8* %2, null
%4 = select i1 %3, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0), i8* %2
ret i8* %4
}
/* Variables and functions */
int /*<<< orphan*/ ADC8(int /*<<< orphan*/);
int /*<<< orphan*/ Immediate8(int);
void Op69M1(void) { ADC8(Immediate8(1)); }


x86 assembly (clang, -O0):
<Op69M1>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1,%edi
call   1030 <Immediate8@plt>
mov    %eax,%edi
call   1040 <ADC8@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<Op69M1>:
push   %rax
mov    $0x1,%edi
call   1030 <Immediate8@plt>
mov    %eax,%edi
pop    %rax
jmp    1040 <ADC8@plt>

LLVM IR (-O0):
define void @Op69M1() {
%1 = call i32 @Immediate8(i32 1)
%2 = call i32 @ADC8(i32 %1)
ret void
}

LLVM IR (-O2):
define void @Op69M1() {
%1 = tail call i32 @Immediate8(i32 1)
%2 = tail call i32 @ADC8(i32 %1)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int dvbfe_enum_delsys(int fd, uint32_t *len, uint8_t *data) { return 0; }


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

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

LLVM IR (-O0):
define i32 @dvbfe_enum_delsys(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
ret i32 0
}

LLVM IR (-O2):
define i32 @dvbfe_enum_delsys(i32 %0, i32* nocapture readnone %1, i32* nocapture readnone %2) {
ret i32 0
}
/* Type definitions */
typedef scalar_t__ uint32_t;
struct timespec {
  scalar_t__ tv_nsec;
};

/* Variables and functions */
int /*<<< orphan*/ CLOCK_MONOTONIC;
int /*<<< orphan*/ clock_gettime(int /*<<< orphan*/, struct timespec *);
void init_lfsrandom32(uint32_t *r) {
  struct timespec now;
  clock_gettime(CLOCK_MONOTONIC, &now);
  *r = (uint32_t)now.tv_nsec;
}


x86 assembly (clang, -O0):
<init_lfsrandom32>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ec5(%rip),%rax
mov    (%rax),%edi
lea    -0x10(%rbp),%rsi
call   1030 <clock_gettime@plt>
mov    -0x10(%rbp),%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<init_lfsrandom32>:
push   %rbx
sub    $0x10,%rsp
mov    %rdi,%rbx
mov    0x2ec9(%rip),%rax
mov    (%rax),%edi
lea    0x8(%rsp),%rsi
call   1030 <clock_gettime@plt>
mov    0x8(%rsp),%rax
mov    %rax,(%rbx)
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
%struct.timespec = type { i64 }
@CLOCK_MONOTONIC = global i32 0
define void @init_lfsrandom32(i64* %0) {
%2 = alloca i64*
%3 = alloca %struct.timespec
store i64* %0, i64** %2
%4 = load i32, i32* @CLOCK_MONOTONIC
%5 = call i32 @clock_gettime(i32 %4, %struct.timespec* %3)
%6 = getelementptr inbounds %struct.timespec, %struct.timespec* %3, i32 0, i32 0
%7 = load i64, i64* %6
%8 = load i64*, i64** %2
store i64 %7, i64* %8
ret void
}

LLVM IR (-O2):
%struct.timespec = type { i64 }
@CLOCK_MONOTONIC = global i32 0
define void @init_lfsrandom32(i64* nocapture writeonly %0) {
%2 = alloca %struct.timespec
%3 = bitcast %struct.timespec* %2 to i8*
%4 = load i32, i32* @CLOCK_MONOTONIC
%5 = call i32 @clock_gettime(i32 %4, %struct.timespec* %2)
%6 = getelementptr inbounds %struct.timespec, %struct.timespec* %2, i64 0, i32 0
%7 = load i64, i64* %6
store i64 %7, i64* %0
ret void
}
/* Variables and functions */
int /*<<< orphan*/ putc(char, int /*<<< orphan*/);
int /*<<< orphan*/ stderr;
int main() {
  putc('!', stderr);
  putc('\n', stderr);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ec5(%rip),%rax
mov    (%rax),%esi
mov    $0x21,%edi
call   1030 <putc@plt>
mov    0x2eb2(%rip),%rax
mov    (%rax),%esi
mov    $0xa,%edi
call   1030 <putc@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    0x2ec8(%rip),%rbx
mov    (%rbx),%esi
mov    $0x21,%edi
call   1030 <putc@plt>
mov    (%rbx),%esi
mov    $0xa,%edi
call   1030 <putc@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@stderr = global i32 0
define i32 @main() {
%1 = load i32, i32* @stderr
%2 = call i32 @putc(i8 signext 33, i32 %1)
%3 = load i32, i32* @stderr
%4 = call i32 @putc(i8 signext 10, i32 %3)
ret i32 0
}

LLVM IR (-O2):
@stderr = global i32 0
define i32 @main() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @putc(i8 signext 33, i32 %1)
%3 = load i32, i32* @stderr
%4 = tail call i32 @putc(i8 signext 10, i32 %3)
ret i32 0
}
int do_225() { return 225; }


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

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

LLVM IR (-O0):
define i32 @do_225() {
ret i32 225
}

LLVM IR (-O2):
define i32 @do_225() {
ret i32 225
}
void XtPeekEvent() {}


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

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

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

LLVM IR (-O2):
define void @XtPeekEvent() {
ret void
}
/* Variables and functions */
int adpcm_decode_mono(unsigned char *, short *, int);
int adpcm_decode_stereo(unsigned char *, short *, int);
int adpcm_decode(unsigned char *indata, short *outdata, int len, int channels) {
  if (channels == 2) {
    return adpcm_decode_stereo(indata, outdata, len);
  }
  return adpcm_decode_mono(indata, outdata, len);
}


x86 assembly (clang, -O0):
<adpcm_decode>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %edx,-0x1c(%rbp)
mov    %ecx,-0x20(%rbp)
cmpl   $0x2,-0x20(%rbp)
jne    1158 <adpcm_decode+0x38>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    -0x1c(%rbp),%edx
call   1040 <adpcm_decode_stereo@plt>
mov    %eax,-0x4(%rbp)
jmp    116b <adpcm_decode+0x4b>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    -0x1c(%rbp),%edx
call   1030 <adpcm_decode_mono@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<adpcm_decode>:
cmp    $0x2,%ecx
jne    112a <adpcm_decode+0xa>
jmp    1040 <adpcm_decode_stereo@plt>
jmp    1030 <adpcm_decode_mono@plt>

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

LLVM IR (-O2):
define i32 @adpcm_decode(i8* %0, i16* %1, i32 %2, i32 %3) {
%5 = icmp eq i32 %3, 2
br i1 %5, label %6, label %8
6: ; preds = %4
%7 = tail call i32 @adpcm_decode_stereo(i8* %0, i16* %1, i32 %2)
br label %10
8: ; preds = %4
%9 = tail call i32 @adpcm_decode_mono(i8* %0, i16* %1, i32 %2)
br label %10
10: ; preds = %8, %6
%11 = phi i32 [ %7, %6 ], [ %9, %8 ]
ret i32 %11
}
/* Variables and functions */
int /*<<< orphan*/ e_cmp();
int /*<<< orphan*/ e_zp();
void e_cmp_zp() {
  e_zp();
  e_cmp();
}


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

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

LLVM IR (-O0):
define void @e_cmp_zp() {
%1 = call i32 (...) @e_zp()
%2 = call i32 (...) @e_cmp()
ret void
}

LLVM IR (-O2):
define void @e_cmp_zp() {
%1 = tail call i32 (...) @e_zp()
%2 = tail call i32 (...) @e_cmp()
ret void
}
int xen_dbgp_reset_prep(struct usb_hcd *hcd) { return 1; }


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

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

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

LLVM IR (-O2):
%struct.usb_hcd = type opaque
define i32 @xen_dbgp_reset_prep(%struct.usb_hcd* nocapture readnone %0) {
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ m4x4_scale(int /*<<< orphan*/, float, float, float);
int /*<<< orphan*/ matrixstack_head();
void matrixstack_scale(float x, float y) {
  m4x4_scale(matrixstack_head(), x, y, 0.0f);
}


x86 assembly (clang, -O0):
<matrixstack_scale>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
mov    $0x0,%al
call   1040 <matrixstack_head@plt>
mov    %eax,%edi
movss  -0x4(%rbp),%xmm0
movss  -0x8(%rbp),%xmm1
xorps  %xmm2,%xmm2
call   1030 <m4x4_scale@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<matrixstack_scale>:
push   %rax
movss  %xmm1,0x4(%rsp)
movss  %xmm0,(%rsp)
xor    %eax,%eax
call   1040 <matrixstack_head@plt>
xorps  %xmm2,%xmm2
mov    %eax,%edi
movss  (%rsp),%xmm0
movss  0x4(%rsp),%xmm1
pop    %rax
jmp    1030 <m4x4_scale@plt>

LLVM IR (-O0):
define void @matrixstack_scale(float %0, float %1) {
%3 = alloca float
%4 = alloca float
store float %0, float* %3
store float %1, float* %4
%5 = call i32 (...) @matrixstack_head()
%6 = load float, float* %3
%7 = load float, float* %4
%8 = call i32 @m4x4_scale(i32 %5, float %6, float %7, float 0.000000e+00)
ret void
}

LLVM IR (-O2):
define void @matrixstack_scale(float %0, float %1) {
%3 = tail call i32 (...) @matrixstack_head()
%4 = tail call i32 @m4x4_scale(i32 %3, float %0, float %1, float 0.000000e+00)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ set_warn_handler(void *);
int /*<<< orphan*/ warn_err();
void die_err() {
  set_warn_handler(((void *)0));
  warn_err();
  exit(EXIT_FAILURE);
}


x86 assembly (clang, -O0):
<die_err>:
push   %rbp
mov    %rsp,%rbp
xor    %eax,%eax
mov    %eax,%edi
call   1030 <set_warn_handler@plt>
mov    $0x0,%al
call   1050 <warn_err@plt>
mov    0x2e95(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<die_err>:
push   %rax
xor    %edi,%edi
call   1030 <set_warn_handler@plt>
xor    %eax,%eax
call   1050 <warn_err@plt>
mov    0x2e9a(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@EXIT_FAILURE = global i32 0
define void @die_err() {
%1 = call i32 @set_warn_handler(i8* null)
%2 = call i32 (...) @warn_err()
%3 = load i32, i32* @EXIT_FAILURE
%4 = call i32 @exit(i32 %3)
unreachable
}

LLVM IR (-O2):
@EXIT_FAILURE = global i32 0
define void @die_err() {
%1 = tail call i32 @set_warn_handler(i8* null)
%2 = tail call i32 (...) @warn_err()
%3 = load i32, i32* @EXIT_FAILURE
%4 = tail call i32 @exit(i32 %3)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int);
void go_up(int n) { printf("%c[%dA", 0x1B, n); }


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

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

LLVM IR (-O0):
@.str = [7 x i8] c"%c[%dA\00"
define void @go_up(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 27, i32 %3)
ret void
}

LLVM IR (-O2):
@.str = [7 x i8] c"%c[%dA\00"
define void @go_up(i32 %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 27, i32 %0)
ret void
}
void bfqg_stats_update_io_add(struct bfq_group *bfqg, struct bfq_queue *bfqq,
                              int rw) {}


x86 assembly (clang, -O0):
<bfqg_stats_update_io_add>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
pop    %rbp
ret

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

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

LLVM IR (-O2):
%struct.bfq_group = type opaque
%struct.bfq_queue = type opaque
define void @bfqg_stats_update_io_add(%struct.bfq_group* nocapture %0, %struct.bfq_queue* nocapture %1, i32 %2) {
ret void
}
/* Type definitions */
typedef int uint64_t;
typedef scalar_t__ rax;

/* Variables and functions */
int /*<<< orphan*/ cpuid(int, int *, int *, int *, int *);
bool cpuid_therm_stat_readout() {
  uint64_t rax, rbx, rcx, rdx;
  int leaf = 6;
  cpuid(leaf, &rax, &rbx, &rcx, &rdx);
  if ((((uint64_t)(rax) &
        ((((uint64_t)1 << (((0)) - ((0)) + 1)) - 1) << ((0)))) >>
       (0)) == 1) {
    return true;
  } else {
    return false;
  }
}


x86 assembly (clang, -O0):
<cpuid_therm_stat_readout>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x6,-0x18(%rbp)
mov    -0x18(%rbp),%edi
lea    -0x8(%rbp),%rsi
lea    -0xc(%rbp),%rdx
lea    -0x10(%rbp),%rcx
lea    -0x14(%rbp),%r8
call   1030 <cpuid@plt>
mov    -0x8(%rbp),%eax
and    $0x1,%eax
sar    $0x0,%eax
cmp    $0x1,%eax
jne    1155 <cpuid_therm_stat_readout+0x45>
movl   $0x1,-0x4(%rbp)
jmp    115c <cpuid_therm_stat_readout+0x4c>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cpuid_therm_stat_readout>:
sub    $0x18,%rsp
lea    0x8(%rsp),%rsi
lea    0x14(%rsp),%rdx
lea    0x10(%rsp),%rcx
lea    0xc(%rsp),%r8
mov    $0x6,%edi
call   1030 <cpuid@plt>
mov    0x8(%rsp),%eax
and    $0x1,%eax
add    $0x18,%rsp
ret

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

LLVM IR (-O2):
define i32 @cpuid_therm_stat_readout() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = bitcast i32* %1 to i8*
%6 = bitcast i32* %2 to i8*
%7 = bitcast i32* %3 to i8*
%8 = bitcast i32* %4 to i8*
%9 = call i32 @cpuid(i32 6, i32* %1, i32* %2, i32* %3, i32* %4)
%10 = load i32, i32* %1
%11 = and i32 %10, 1
ret i32 %11
}
/* Variables and functions */
int /*<<< orphan*/ ss_sort(int *, int *, int *, int *);
void workload(int a[2048], int b[2048]) {
#pragma HLS INTERFACE m_axi offset = slave port = a bundle = gmem
#pragma HLS INTERFACE m_axi offset = slave port = b bundle = gmem
#pragma HLS INTERFACE s_axilite port = a bundle = control
#pragma HLS INTERFACE s_axilite port = b bundle = control
#pragma HLS INTERFACE s_axilite port = return bundle = control
  int bucket[512 * 4 + 1], sum[512 * 4 / 16];
  ss_sort(a, b, bucket, sum);
  return;
}


x86 assembly (clang, -O0):
<workload>:
push   %rbp
mov    %rsp,%rbp
sub    $0x2220,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
lea    -0x2020(%rbp),%rdx
lea    -0x2220(%rbp),%rcx
call   1030 <ss_sort@plt>
add    $0x2220,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<workload>:
sub    $0x2208,%rsp
lea    0x200(%rsp),%rdx
mov    %rsp,%rcx
call   1030 <ss_sort@plt>
add    $0x2208,%rsp
ret

LLVM IR (-O0):
define void @workload(i32* %0, i32* %1) {
%3 = alloca i32*
%4 = alloca i32*
%5 = alloca [2049 x i32]
%6 = alloca [128 x i32]
store i32* %0, i32** %3
store i32* %1, i32** %4
%7 = load i32*, i32** %3
%8 = load i32*, i32** %4
%9 = getelementptr inbounds [2049 x i32], [2049 x i32]* %5, i64 0, i64 0
%10 = getelementptr inbounds [128 x i32], [128 x i32]* %6, i64 0, i64 0
%11 = call i32 @ss_sort(i32* %7, i32* %8, i32* %9, i32* %10)
ret void
}

LLVM IR (-O2):
define void @workload(i32* %0, i32* %1) {
%3 = alloca [2049 x i32]
%4 = alloca [128 x i32]
%5 = bitcast [2049 x i32]* %3 to i8*
%6 = bitcast [128 x i32]* %4 to i8*
%7 = getelementptr inbounds [2049 x i32], [2049 x i32]* %3, i64 0, i64 0
%8 = getelementptr inbounds [128 x i32], [128 x i32]* %4, i64 0, i64 0
%9 = call i32 @ss_sort(i32* %0, i32* %1, i32* %7, i32* %8)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ maxHeapFilterDown(int *, int, int);
void buildMaxHeap(int array[], int size) {
  int index;
  for (index = size / 2 - 1; index >= 0; index--) {
    maxHeapFilterDown(array, index, size);
  }
}


x86 assembly (clang, -O0):
<buildMaxHeap>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
sub    $0x1,%eax
mov    %eax,-0x10(%rbp)
cmpl   $0x0,-0x10(%rbp)
jl     1157 <buildMaxHeap+0x47>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%esi
mov    -0xc(%rbp),%edx
call   1030 <maxHeapFilterDown@plt>
mov    -0x10(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x10(%rbp)
jmp    1130 <buildMaxHeap+0x20>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<buildMaxHeap>:
push   %rbp
push   %r14
push   %rbx
cmp    $0x2,%esi
jl     1145 <buildMaxHeap+0x35>
mov    %esi,%ebp
mov    %rdi,%r14
mov    %esi,%ebx
shr    %ebx
add    $0x1,%ebx
cs nopw 0x0(%rax,%rax,1)
nop
lea    -0x2(%rbx),%esi
mov    %r14,%rdi
mov    %ebp,%edx
call   1030 <maxHeapFilterDown@plt>
add    $0xffffffff,%ebx
cmp    $0x1,%ebx
ja     1130 <buildMaxHeap+0x20>
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
define void @buildMaxHeap(i32* %0, i32 %1) {
%3 = alloca i32*
%4 = alloca i32
%5 = alloca i32
store i32* %0, i32** %3
store i32 %1, i32* %4
%6 = load i32, i32* %4
%7 = sdiv i32 %6, 2
%8 = sub nsw i32 %7, 1
store i32 %8, i32* %5
br label %9
9: ; preds = %17, %2
%10 = load i32, i32* %5
%11 = icmp sge i32 %10, 0
br i1 %11, label %12, label %20
12: ; preds = %9
%13 = load i32*, i32** %3
%14 = load i32, i32* %5
%15 = load i32, i32* %4
%16 = call i32 @maxHeapFilterDown(i32* %13, i32 %14, i32 %15)
br label %17
17: ; preds = %12
%18 = load i32, i32* %5
%19 = add nsw i32 %18, -1
store i32 %19, i32* %5
br label %9
20: ; preds = %9
ret void
}

LLVM IR (-O2):
define void @buildMaxHeap(i32* %0, i32 %1) {
%3 = icmp sgt i32 %1, 1
br i1 %3, label %4, label %11
4: ; preds = %2
%5 = lshr i32 %1, 1
br label %6
6: ; preds = %4, %6
%7 = phi i32 [ %8, %6 ], [ %5, %4 ]
%8 = add nsw i32 %7, -1
%9 = tail call i32 @maxHeapFilterDown(i32* %0, i32 %8, i32 %1)
%10 = icmp ugt i32 %7, 1
br i1 %10, label %6, label %11
11: ; preds = %6, %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main() {
  int abc;
  printf("Hello World\n");
  return 0;
}


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

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

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

LLVM IR (-O2):
@str = [12 x i8] c"Hello World\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void *realloc(void *, size_t);
void *realloc_safe(void *ptr, size_t size) {
  void *nptr;
  nptr = realloc(ptr, size);
  if (nptr == NULL)
    free(ptr);
  return nptr;
}


x86 assembly (clang, -O0):
<realloc_safe>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1040 <realloc@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    1155 <realloc_safe+0x35>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<realloc_safe>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
call   1040 <realloc@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    113c <realloc_safe+0x1c>
mov    %r14,%rdi
call   1030 <free@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define noalias i8* @realloc_safe(i8* nocapture %0, i64 %1) {
%3 = tail call i8* @realloc(i8* %0, i64 %1)
%4 = icmp eq i8* %3, null
br i1 %4, label %5, label %7
5: ; preds = %2
%6 = tail call i32 @free(i8* %0)
br label %7
7: ; preds = %5, %2
ret i8* %3
}
void NAME_CONSTRAINTS_free(void) {}


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

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

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

LLVM IR (-O2):
define void @NAME_CONSTRAINTS_free() {
ret void
}
char *fn2() {
  static char *pb[5] = {"B001", "B002", "B003"};
  return *(pb + 1);
}


x86 assembly (clang, -O0):
<fn2>:
push   %rbp
mov    %rsp,%rbp
mov    0x2f2d(%rip),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<fn2>:
lea    0xef9(%rip),%rax
ret

LLVM IR (-O0):
@fn2.pb = internal global [5 x i8*] [i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i32 0, i32 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i32 0, i32 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i32 0, i32 0), i8* null, i8* null]
@.str = [5 x i8] c"B001\00"
@.str.1 = [5 x i8] c"B002\00"
@.str.2 = [5 x i8] c"B003\00"
define i8* @fn2() {
%1 = load i8*, i8** getelementptr inbounds ([5 x i8*], [5 x i8*]* @fn2.pb, i64 0, i64 1)
ret i8* %1
}

LLVM IR (-O2):
@.str.1 = [5 x i8] c"B002\00"
define i8* @fn2() {
ret i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0)
}