xunge/DecIR huggingface dataset:
/* Variables and functions */
double _suntime_get_time(double, double, double, int, int, int,
                         int /*<<< orphan*/);
double suntime_get_sunset_utc(double latitude, double longitude, double zenith,
                              int year, int month, int day) {
  return _suntime_get_time(latitude, longitude, zenith, year, month, day, 0);
}


x86 assembly (clang, -O0):
<suntime_get_sunset_utc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
mov    %edi,-0x1c(%rbp)
mov    %esi,-0x20(%rbp)
mov    %edx,-0x24(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
movsd  -0x18(%rbp),%xmm2
mov    -0x1c(%rbp),%edi
mov    -0x20(%rbp),%esi
mov    -0x24(%rbp),%edx
xor    %ecx,%ecx
call   1030 <_suntime_get_time@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<suntime_get_sunset_utc>:
xor    %ecx,%ecx
jmp    1030 <_suntime_get_time@plt>

LLVM IR (-O0):
define double @suntime_get_sunset_utc(double %0, double %1, double %2, i32 %3, i32 %4, i32 %5) {
%7 = alloca double
%8 = alloca double
%9 = alloca double
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
store double %0, double* %7
store double %1, double* %8
store double %2, double* %9
store i32 %3, i32* %10
store i32 %4, i32* %11
store i32 %5, i32* %12
%13 = load double, double* %7
%14 = load double, double* %8
%15 = load double, double* %9
%16 = load i32, i32* %10
%17 = load i32, i32* %11
%18 = load i32, i32* %12
%19 = call double @_suntime_get_time(double %13, double %14, double %15, i32 %16, i32 %17, i32 %18, i32 0)
ret double %19
}

LLVM IR (-O2):
define double @suntime_get_sunset_utc(double %0, double %1, double %2, i32 %3, i32 %4, i32 %5) {
%7 = tail call double @_suntime_get_time(double %0, double %1, double %2, i32 %3, i32 %4, i32 %5, i32 0)
ret double %7
}
int array_remove() { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @array_remove() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ Sys_Error(char *);
char *strdup(char const *);
char *Sys_strdup(const char *src) {
  char *p = strdup(src);
  if (!p)
    Sys_Error("Sys_strdup: Not enough memory free");
  return p;
}


x86 assembly (clang, -O0):
<Sys_strdup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <strdup@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1150 <Sys_strdup+0x30>
lea    0xeb5(%rip),%rdi
call   1030 <Sys_Error@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Sys_strdup>:
push   %rbx
call   1040 <strdup@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    113a <Sys_strdup+0x1a>
lea    0xecb(%rip),%rdi
call   1030 <Sys_Error@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [35 x i8] c"Sys_strdup: Not enough memory free\00"
define i8* @Sys_strdup(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i8* @strdup(i8* %4)
store i8* %5, i8** %3
%6 = load i8*, i8** %3
%7 = icmp ne i8* %6, null
br i1 %7, label %10, label %8
8: ; preds = %1
%9 = call i32 @Sys_Error(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0))
br label %10
10: ; preds = %8, %1
%11 = load i8*, i8** %3
ret i8* %11
}

LLVM IR (-O2):
@.str = [35 x i8] c"Sys_strdup: Not enough memory free\00"
define noalias i8* @Sys_strdup(i8* nocapture %0) {
%2 = tail call i8* @strdup(i8* %0)
%3 = icmp eq i8* %2, null
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i32 @Sys_Error(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0))
br label %6
6: ; preds = %4, %1
ret i8* %2
}
/* Type definitions */
struct list_head {
  int dummy;
};

/* Variables and functions */
scalar_t__ __VERIFIER_nondet_int();
int /*<<< orphan*/ insert_top(struct list_head *);
void create_top(struct list_head *top) {
  int c = 0;
  do {
    insert_top(top);
    c = c + 1;
  } while (c < 3 && __VERIFIER_nondet_int());
}


x86 assembly (clang, -O0):
<create_top>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <insert_top@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
xor    %eax,%eax
cmpl   $0x3,-0xc(%rbp)
mov    %al,-0xd(%rbp)
jge    1165 <create_top+0x45>
mov    $0x0,%al
call   1040 <__VERIFIER_nondet_int@plt>
cmp    $0x0,%rax
setne  %al
mov    %al,-0xd(%rbp)
mov    -0xd(%rbp),%al
test   $0x1,%al
jne    1133 <create_top+0x13>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<create_top>:
push   %rbx
mov    %rdi,%rbx
call   1030 <insert_top@plt>
xor    %eax,%eax
call   1040 <__VERIFIER_nondet_int@plt>
test   %rax,%rax
je     1152 <create_top+0x32>
mov    %rbx,%rdi
call   1030 <insert_top@plt>
xor    %eax,%eax
call   1040 <__VERIFIER_nondet_int@plt>
test   %rax,%rax
je     1152 <create_top+0x32>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <insert_top@plt>
pop    %rbx
ret

LLVM IR (-O0):
%struct.list_head = type { i32 }
define void @create_top(%struct.list_head* %0) {
%2 = alloca %struct.list_head*
%3 = alloca i32
store %struct.list_head* %0, %struct.list_head** %2
store i32 0, i32* %3
br label %4
4: ; preds = %15, %1
%5 = load %struct.list_head*, %struct.list_head** %2
%6 = call i32 @insert_top(%struct.list_head* %5)
%7 = load i32, i32* %3
%8 = add nsw i32 %7, 1
store i32 %8, i32* %3
br label %9
9: ; preds = %4
%10 = load i32, i32* %3
%11 = icmp slt i32 %10, 3
br i1 %11, label %12, label %15
12: ; preds = %9
%13 = call i64 (...) @__VERIFIER_nondet_int()
%14 = icmp ne i64 %13, 0
br label %15
15: ; preds = %12, %9
%16 = phi i1 [ false, %9 ], [ %14, %12 ]
br i1 %16, label %4, label %17
17: ; preds = %15
ret void
}

LLVM IR (-O2):
%struct.list_head = type { i32 }
define void @create_top(%struct.list_head* %0) {
%2 = tail call i32 @insert_top(%struct.list_head* %0)
%3 = tail call i64 (...) @__VERIFIER_nondet_int()
%4 = icmp eq i64 %3, 0
br i1 %4, label %11, label %5
5: ; preds = %1
%6 = tail call i32 @insert_top(%struct.list_head* %0)
%7 = tail call i64 (...) @__VERIFIER_nondet_int()
%8 = icmp eq i64 %7, 0
br i1 %8, label %11, label %9
9: ; preds = %5
%10 = tail call i32 @insert_top(%struct.list_head* %0)
br label %11
11: ; preds = %9, %5, %1
ret void
}
void gakkgakkgakkgakk(void) {}


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

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

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

LLVM IR (-O2):
define void @gakkgakkgakkgakk() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(char *);
void nr_free_matrix(double **m, long nrl, long nrh, long ncl, long nch) {
  free((char *)(m[nrl] + ncl - 1));
  free((char *)(m + nrl - 1));
}


x86 assembly (clang, -O0):
<nr_free_matrix>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
mov    -0x20(%rbp),%rax
shl    $0x3,%rax
add    %rax,%rdi
add    $0xfffffffffffffff8,%rdi
call   1030 <free@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rax
shl    $0x3,%rax
add    %rax,%rdi
add    $0xfffffffffffffff8,%rdi
call   1030 <free@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<nr_free_matrix>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
mov    (%rdi,%rsi,8),%rax
lea    (%rax,%rcx,8),%rdi
add    $0xfffffffffffffff8,%rdi
call   1030 <free@plt>
lea    (%rbx,%r14,8),%rdi
add    $0xfffffffffffffff8,%rdi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <free@plt>

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

LLVM IR (-O2):
define void @nr_free_matrix(double** nocapture %0, i64 %1, i64 %2, i64 %3, i64 %4) {
%6 = getelementptr inbounds double*, double** %0, i64 %1
%7 = load double*, double** %6
%8 = getelementptr inbounds double, double* %7, i64 %3
%9 = getelementptr inbounds double, double* %8, i64 -1
%10 = bitcast double* %9 to i8*
%11 = tail call i32 @free(i8* %10)
%12 = getelementptr inbounds double*, double** %6, i64 -1
%13 = bitcast double** %12 to i8*
%14 = tail call i32 @free(i8* %13)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ ORA_();
int /*<<< orphan*/ c64_memAbsoluteAddrX();
void ORA_absx(void) {
  c64_memAbsoluteAddrX();
  ORA_();
}


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

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

LLVM IR (-O0):
define void @ORA_absx() {
%1 = call i32 (...) @c64_memAbsoluteAddrX()
%2 = call i32 (...) @ORA_()
ret void
}

LLVM IR (-O2):
define void @ORA_absx() {
%1 = tail call i32 (...) @c64_memAbsoluteAddrX()
%2 = tail call i32 (...) @ORA_()
ret void
}
int *foo(const int size) {
  int a[10];
  return a;
}


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

x86 assembly (clang, -O2):
<foo>:
lea    -0x28(%rsp),%rax
ret

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

LLVM IR (-O2):
define noalias i32* @foo(i32 %0) {
%2 = alloca [10 x i32]
%3 = bitcast [10 x i32]* %2 to i8*
%4 = getelementptr inbounds [10 x i32], [10 x i32]* %2, i64 0, i64 0
ret i32* %4
}
/* Variables and functions */
char tolower(char);
char *strlwr(char *str) {
  char *p = str;
  while (*p) {
    *p = tolower(*p);
    p++;
  }
  return (str);
}


x86 assembly (clang, -O0):
<strlwr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
cmpb   $0x0,(%rax)
je     1156 <strlwr+0x46>
mov    -0x10(%rbp),%rax
movsbl (%rax),%edi
call   1030 <tolower@plt>
mov    %al,%cl
mov    -0x10(%rbp),%rax
mov    %cl,(%rax)
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1124 <strlwr+0x14>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strlwr>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
mov    (%rdi),%al
test   %al,%al
je     1146 <strlwr+0x36>
lea    0x1(%r14),%rbx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
movsbl %al,%edi
call   1030 <tolower@plt>
mov    %al,-0x1(%rbx)
movzbl (%rbx),%eax
add    $0x1,%rbx
test   %al,%al
jne    1130 <strlwr+0x20>
mov    %r14,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define i8* @strlwr(i8* returned %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %11, label %4
4: ; preds = %1, %4
%5 = phi i8 [ %9, %4 ], [ %2, %1 ]
%6 = phi i8* [ %8, %4 ], [ %0, %1 ]
%7 = tail call signext i8 @tolower(i8 signext %5)
store i8 %7, i8* %6
%8 = getelementptr inbounds i8, i8* %6, i64 1
%9 = load i8, i8* %8
%10 = icmp eq i8 %9, 0
br i1 %10, label %11, label %4
11: ; preds = %4, %1
ret i8* %0
}
int test_imm_61uint64_midword_reg(unsigned long long val) {
  return ((val >> 16) & (0x61 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_61uint64_midword_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdx
shr    $0x10,%rdx
and    $0x61,%rdx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%rdx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_61uint64_midword_reg>:
test   $0x610000,%edi
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_61uint64_midword_reg(i64 %0) {
%2 = and i64 %0, 6356992
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ STDOUT_FILENO;
int /*<<< orphan*/ fflush(int /*<<< orphan*/);
int /*<<< orphan*/ fsync(int /*<<< orphan*/);
int /*<<< orphan*/ stdout;
void flushLog() {
  fflush(stdout);
  fsync(STDOUT_FILENO);
}


x86 assembly (clang, -O0):
<flushLog>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ead(%rip),%rax
mov    (%rax),%edi
call   1030 <fflush@plt>
mov    0x2eb7(%rip),%rax
mov    (%rax),%edi
call   1040 <fsync@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<flushLog>:
push   %rax
mov    0x2eb0(%rip),%rax
mov    (%rax),%edi
call   1030 <fflush@plt>
mov    0x2eba(%rip),%rax
mov    (%rax),%edi
pop    %rax
jmp    1040 <fsync@plt>

LLVM IR (-O0):
@stdout = global i32 0
@STDOUT_FILENO = global i32 0
define void @flushLog() {
%1 = load i32, i32* @stdout
%2 = call i32 @fflush(i32 %1)
%3 = load i32, i32* @STDOUT_FILENO
%4 = call i32 @fsync(i32 %3)
ret void
}

LLVM IR (-O2):
@stdout = global i32 0
@STDOUT_FILENO = global i32 0
define void @flushLog() {
%1 = load i32, i32* @stdout
%2 = tail call i32 @fflush(i32 %1)
%3 = load i32, i32* @STDOUT_FILENO
%4 = tail call i32 @fsync(i32 %3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ stb__realloc_raw(void *, int /*<<< orphan*/);
void stb__nptr_free(void *p) { stb__realloc_raw(p, 0); }


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

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

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

LLVM IR (-O2):
define void @stb__nptr_free(i8* %0) {
%2 = tail call i32 @stb__realloc_raw(i8* %0, i32 0)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ int32_t;

/* Variables and functions */
int safe_atoi(char const *, int *);
int safe_atoi32(const char *s, int32_t *ret_i) {
  struct _assert_struct_2 {
    char x[(sizeof(int32_t) == sizeof(int)) ? 0 : -1];
  };
  return safe_atoi(s, (int *)ret_i);
}


x86 assembly (clang, -O0):
<safe_atoi32>:
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 <safe_atoi@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<safe_atoi32>:
jmp    1030 <safe_atoi@plt>

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

LLVM IR (-O2):
define i32 @safe_atoi32(i8* %0, i32* %1) {
%3 = tail call i32 @safe_atoi(i8* %0, i32* %1)
ret i32 %3
}
/* Type definitions */
typedef int /*<<< orphan*/ GLuint;

/* Variables and functions */
int /*<<< orphan*/ check_shader(int /*<<< orphan*/);
int /*<<< orphan*/ glCompileShader(int /*<<< orphan*/);
int /*<<< orphan*/ glCreateShader(int);
int /*<<< orphan*/ glShaderSource(int /*<<< orphan*/, int, char const **,
                                  int /*<<< orphan*/ *);
GLuint build_shader(const char *src, int type) {
  GLuint sh = glCreateShader(type);
  glShaderSource(sh, 1, &src, NULL);
  glCompileShader(sh);
  (check_shader(sh));
  return sh;
}


x86 assembly (clang, -O0):
<build_shader>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%edi
call   1060 <glCreateShader@plt>
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%edi
mov    $0x1,%esi
lea    -0x8(%rbp),%rdx
xor    %eax,%eax
mov    %eax,%ecx
call   1030 <glShaderSource@plt>
mov    -0x10(%rbp),%edi
call   1040 <glCompileShader@plt>
mov    -0x10(%rbp),%edi
call   1050 <check_shader@plt>
mov    -0x10(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<build_shader>:
push   %rbx
sub    $0x10,%rsp
mov    %rdi,0x8(%rsp)
mov    %esi,%edi
call   1060 <glCreateShader@plt>
mov    %eax,%ebx
lea    0x8(%rsp),%rdx
mov    %eax,%edi
mov    $0x1,%esi
xor    %ecx,%ecx
call   1030 <glShaderSource@plt>
mov    %ebx,%edi
call   1040 <glCompileShader@plt>
mov    %ebx,%edi
call   1050 <check_shader@plt>
mov    %ebx,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define i32 @build_shader(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
%5 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%6 = load i32, i32* %4
%7 = call i32 @glCreateShader(i32 %6)
store i32 %7, i32* %5
%8 = load i32, i32* %5
%9 = call i32 @glShaderSource(i32 %8, i32 1, i8** %3, i32* null)
%10 = load i32, i32* %5
%11 = call i32 @glCompileShader(i32 %10)
%12 = load i32, i32* %5
%13 = call i32 @check_shader(i32 %12)
%14 = load i32, i32* %5
ret i32 %14
}

LLVM IR (-O2):
define i32 @build_shader(i8* %0, i32 %1) {
%3 = alloca i8*
store i8* %0, i8** %3
%4 = tail call i32 @glCreateShader(i32 %1)
%5 = call i32 @glShaderSource(i32 %4, i32 1, i8** %3, i32* null)
%6 = call i32 @glCompileShader(i32 %4)
%7 = call i32 @check_shader(i32 %4)
ret i32 %4
}
int string_list_empty(const char **list) { return !list || !list[0]; }


x86 assembly (clang, -O0):
<string_list_empty>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    $0x1,%al
cmpq   $0x0,-0x8(%rbp)
mov    %al,-0x9(%rbp)
je     1128 <string_list_empty+0x28>
mov    -0x8(%rbp),%rax
cmpq   $0x0,(%rax)
setne  %al
xor    $0xff,%al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<string_list_empty>:
test   %rdi,%rdi
je     110f <string_list_empty+0xf>
xor    %eax,%eax
cmpq   $0x0,(%rdi)
sete   %al
ret
mov    $0x1,%eax
ret

LLVM IR (-O0):
define i32 @string_list_empty(i8** %0) {
%2 = alloca i8**
store i8** %0, i8*** %2
%3 = load i8**, i8*** %2
%4 = icmp ne i8** %3, null
br i1 %4, label %5, label %11
5: ; preds = %1
%6 = load i8**, i8*** %2
%7 = getelementptr inbounds i8*, i8** %6, i64 0
%8 = load i8*, i8** %7
%9 = icmp ne i8* %8, null
%10 = xor i1 %9, true
br label %11
11: ; preds = %5, %1
%12 = phi i1 [ true, %1 ], [ %10, %5 ]
%13 = zext i1 %12 to i32
ret i32 %13
}

LLVM IR (-O2):
define i32 @string_list_empty(i8** %0) {
%2 = icmp eq i8** %0, null
br i1 %2, label %7, label %3
3: ; preds = %1
%4 = load i8*, i8** %0
%5 = icmp eq i8* %4, null
%6 = zext i1 %5 to i32
br label %7
7: ; preds = %3, %1
%8 = phi i32 [ 1, %1 ], [ %6, %3 ]
ret i32 %8
}
unsigned int _check_times(unsigned x, unsigned y) {
  unsigned long long whole_ans =
      ((unsigned long long)x) * ((unsigned long long)y);
  unsigned word_ans = (unsigned)whole_ans;
  if (word_ans < whole_ans || word_ans > (1 << 28))
    (_throw_badalloc_fn("/scratch/repos/new/home/jordi_armengol_estape/"
                        "c-scraper/outputs/2022-01-22/02-19-57/repos/FauxFaux/"
                        "cyclone/refs/heads/master/bin/genfiles/tcutil.c",
                        284));
  return word_ans;
}


x86 assembly (clang, -O0):
<_check_times>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x8(%rbp),%ecx
imul   %rcx,%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x10(%rbp),%rax
jb     114d <_check_times+0x3d>
cmpl   $0x10000000,-0x14(%rbp)
jbe    1160 <_check_times+0x50>
lea    0xeac(%rip),%rdi
mov    $0x11c,%esi
mov    $0x0,%al
call   1030 <_throw_badalloc_fn@plt>
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_check_times>:
push   %rbx
mov    %edi,%eax
mul    %esi
mov    %eax,%ebx
jo     1121 <_check_times+0x11>
cmp    $0x10000001,%ebx
jb     1134 <_check_times+0x24>
lea    0xed8(%rip),%rdi
mov    $0x11c,%esi
xor    %eax,%eax
call   1030 <_throw_badalloc_fn@plt>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [147 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/FauxFaux/cyclone/refs/heads/master/bin/genfiles/tcutil.c\00"
define i32 @_check_times(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i64
%6 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%7 = load i32, i32* %3
%8 = zext i32 %7 to i64
%9 = load i32, i32* %4
%10 = zext i32 %9 to i64
%11 = mul i64 %8, %10
store i64 %11, i64* %5
%12 = load i64, i64* %5
%13 = trunc i64 %12 to i32
store i32 %13, i32* %6
%14 = load i32, i32* %6
%15 = zext i32 %14 to i64
%16 = load i64, i64* %5
%17 = icmp ult i64 %15, %16
br i1 %17, label %21, label %18
18: ; preds = %2
%19 = load i32, i32* %6
%20 = icmp ugt i32 %19, 268435456
br i1 %20, label %21, label %23
21: ; preds = %18, %2
%22 = call i32 (i8*, i32, ...) bitcast (i32 (...)* @_throw_badalloc_fn to i32 (i8*, i32, ...)*)(i8* getelementptr inbounds ([147 x i8], [147 x i8]* @.str, i64 0, i64 0), i32 284)
br label %23
23: ; preds = %21, %18
%24 = load i32, i32* %6
ret i32 %24
}

LLVM IR (-O2):
@.str = [147 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/FauxFaux/cyclone/refs/heads/master/bin/genfiles/tcutil.c\00"
define i32 @_check_times(i32 %0, i32 %1) {
%3 = tail call { i32, i1 } @llvm.umul.with.overflow.i32(i32 %0, i32 %1)
%4 = extractvalue { i32, i1 } %3, 0
%5 = extractvalue { i32, i1 } %3, 1
%6 = icmp ugt i32 %4, 268435456
%7 = or i1 %5, %6
br i1 %7, label %8, label %10
8: ; preds = %2
%9 = tail call i32 (i8*, i32, ...) bitcast (i32 (...)* @_throw_badalloc_fn to i32 (i8*, i32, ...)*)(i8* getelementptr inbounds ([147 x i8], [147 x i8]* @.str, i64 0, i64 0), i32 284)
br label %10
10: ; preds = %2, %8
ret i32 %4
}
void gtk_tree_model_filter_convert_path_to_child_path() {}


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

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

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

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

/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ strdup(char *);
int /*<<< orphan*/ submod_setres(int, int /*<<< orphan*/);
void void_test(struct cmd *command, void *workspace) {
  printf("inside void c code\n");
  submod_setres(1, strdup("void()"));
}


x86 assembly (clang, -O0):
<void_test>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xeb9(%rip),%rdi
call   1030 <printf@plt>
lea    0xec1(%rip),%rdi
call   1050 <strdup@plt>
mov    %eax,%esi
mov    $0x1,%edi
call   1040 <submod_setres@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<void_test>:
push   %rax
lea    0xecf(%rip),%rdi
call   1030 <puts@plt>
lea    0xebc(%rip),%rdi
call   1050 <strdup@plt>
mov    $0x1,%edi
mov    %eax,%esi
pop    %rax
jmp    1040 <submod_setres@plt>

LLVM IR (-O0):
%struct.cmd = type { i32 }
@.str = [20 x i8] c"inside void c code\0A\00"
@.str.1 = [7 x i8] c"void()\00"
define void @void_test(%struct.cmd* %0, i8* %1) {
%3 = alloca %struct.cmd*
%4 = alloca i8*
store %struct.cmd* %0, %struct.cmd** %3
store i8* %1, i8** %4
%5 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
%6 = call i32 @strdup(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0))
%7 = call i32 @submod_setres(i32 1, i32 %6)
ret void
}

LLVM IR (-O2):
%struct.cmd = type { i32 }
@.str.1 = [7 x i8] c"void()\00"
@str = [19 x i8] c"inside void c code\00"
define void @void_test(%struct.cmd* nocapture readnone %0, i8* nocapture readnone %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @str, i64 0, i64 0))
%4 = tail call i32 @strdup(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0))
%5 = tail call i32 @submod_setres(i32 1, i32 %4)
ret void
}
char copy_char(const char _val) { return _val; }


x86 assembly (clang, -O0):
<copy_char>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<copy_char>:
mov    %edi,%eax
ret

LLVM IR (-O0):
define signext i8 @copy_char(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
ret i8 %3
}

LLVM IR (-O2):
define signext i8 @copy_char(i8 returned signext %0) {
ret i8 %0
}
/* Variables and functions */
int _ada_use_c2phc(int, int *, int *, double *);
int sweep_get_indices_numerically(int *idx) {
  int fail, *b;
  double *c;
  fail = _ada_use_c2phc(615, idx, b, c);
  return fail;
}


x86 assembly (clang, -O0):
<sweep_get_indices_numerically>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    $0x267,%edi
call   1030 <_ada_use_c2phc@plt>
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sweep_get_indices_numerically>:
mov    %rdi,%rsi
mov    $0x267,%edi
jmp    1030 <_ada_use_c2phc@plt>

LLVM IR (-O0):
define i32 @sweep_get_indices_numerically(i32* %0) {
%2 = alloca i32*
%3 = alloca i32
%4 = alloca i32*
%5 = alloca double*
store i32* %0, i32** %2
%6 = load i32*, i32** %2
%7 = load i32*, i32** %4
%8 = load double*, double** %5
%9 = call i32 @_ada_use_c2phc(i32 615, i32* %6, i32* %7, double* %8)
store i32 %9, i32* %3
%10 = load i32, i32* %3
ret i32 %10
}

LLVM IR (-O2):
define i32 @sweep_get_indices_numerically(i32* %0) {
%2 = tail call i32 @_ada_use_c2phc(i32 615, i32* %0, i32* undef, double* undef)
ret i32 %2
}
/* Variables and functions */
int EOF;
int fgetc(int /*<<< orphan*/);
int /*<<< orphan*/ stdin;
void fflush_(void) {
  int c;
  while ((c = fgetc(stdin)) != EOF && c != '\n') {
  }
}


x86 assembly (clang, -O0):
<fflush_>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    0x2ec9(%rip),%rax
mov    (%rax),%edi
call   1030 <fgetc@plt>
mov    %eax,%ecx
mov    %ecx,-0x4(%rbp)
xor    %eax,%eax
mov    0x2eac(%rip),%rdx
cmp    (%rdx),%ecx
mov    %al,-0x5(%rbp)
je     1149 <fflush_+0x39>
cmpl   $0xa,-0x4(%rbp)
setne  %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
test   $0x1,%al
jne    1159 <fflush_+0x49>
jmp    115e <fflush_+0x4e>
jmp    1118 <fflush_+0x8>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fflush_>:
push   %r14
push   %rbx
push   %rax
mov    0x2ecd(%rip),%r14
mov    0x2ebe(%rip),%rbx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    (%r14),%edi
call   1030 <fgetc@plt>
cmp    $0xa,%eax
je     1141 <fflush_+0x31>
cmp    (%rbx),%eax
jne    1130 <fflush_+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@stdin = global i32 0
@EOF = global i32 0
define void @fflush_() {
%1 = alloca i32
br label %2
2: ; preds = %12, %0
%3 = load i32, i32* @stdin
%4 = call i32 @fgetc(i32 %3)
store i32 %4, i32* %1
%5 = load i32, i32* @EOF
%6 = icmp ne i32 %4, %5
br i1 %6, label %7, label %10
7: ; preds = %2
%8 = load i32, i32* %1
%9 = icmp ne i32 %8, 10
br label %10
10: ; preds = %7, %2
%11 = phi i1 [ false, %2 ], [ %9, %7 ]
br i1 %11, label %12, label %13
12: ; preds = %10
br label %2
13: ; preds = %10
ret void
}

LLVM IR (-O2):
@stdin = global i32 0
@EOF = global i32 0
define void @fflush_() {
br label %1
1: ; preds = %1, %0
%2 = load i32, i32* @stdin
%3 = tail call i32 @fgetc(i32 %2)
%4 = load i32, i32* @EOF
%5 = icmp ne i32 %3, %4
%6 = icmp ne i32 %3, 10
%7 = and i1 %6, %5
br i1 %7, label %1, label %8
8: ; preds = %1
ret void
}
float areac(float r) {
  float z;
  z = 3.14 * r * r;
  return z;
}


x86 assembly (clang, -O0):
<areac>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
cvtss2sd %xmm0,%xmm1
movsd  0xee6(%rip),%xmm0
mulsd  %xmm1,%xmm0
movss  -0x4(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
mulsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x8(%rbp)
movss  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<areac>:
cvtss2sd %xmm0,%xmm0
movsd  0xef4(%rip),%xmm1
mulsd  %xmm0,%xmm1
mulsd  %xmm0,%xmm1
xorps  %xmm0,%xmm0
cvtsd2ss %xmm1,%xmm0
ret

LLVM IR (-O0):
define float @areac(float %0) {
%2 = alloca float
%3 = alloca float
store float %0, float* %2
%4 = load float, float* %2
%5 = fpext float %4 to double
%6 = fmul double 3.140000e+00, %5
%7 = load float, float* %2
%8 = fpext float %7 to double
%9 = fmul double %6, %8
%10 = fptrunc double %9 to float
store float %10, float* %3
%11 = load float, float* %3
ret float %11
}

LLVM IR (-O2):
define float @areac(float %0) {
%2 = fpext float %0 to double
%3 = fmul double %2, 3.140000e+00
%4 = fmul double %3, %2
%5 = fptrunc double %4 to float
ret float %5
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void link_udp_destroy() { printf("Executing link_stop_destroy\n"); }


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

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

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

LLVM IR (-O2):
@str = [28 x i8] c"Executing link_stop_destroy\00"
define void @link_udp_destroy() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ lseek(int, long, int /*<<< orphan*/);
int write(int, char *, int);
int bwrite(int fd, char *buf, int blk) {
  int i;
  lseek(fd, (long)blk << 10, 0);
  if (write(fd, buf, 1024) != 1024) {
    return (0);
  }
  return (1);
}


x86 assembly (clang, -O0):
<bwrite>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x8(%rbp),%edi
movslq -0x14(%rbp),%rsi
shl    $0xa,%rsi
xor    %edx,%edx
call   1040 <lseek@plt>
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    $0x400,%edx
call   1030 <write@plt>
cmp    $0x400,%eax
je     116c <bwrite+0x4c>
movl   $0x0,-0x4(%rbp)
jmp    1173 <bwrite+0x53>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bwrite>:
push   %rbp
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %edi,%ebp
movslq %edx,%rsi
shl    $0xa,%rsi
xor    %edx,%edx
call   1040 <lseek@plt>
mov    %ebp,%edi
mov    %rbx,%rsi
mov    $0x400,%edx
call   1030 <write@plt>
xor    %ecx,%ecx
cmp    $0x400,%eax
sete   %cl
mov    %ecx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @bwrite(i32 %0, i8* %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i8*
%7 = alloca i32
%8 = alloca i32
store i32 %0, i32* %5
store i8* %1, i8** %6
store i32 %2, i32* %7
%9 = load i32, i32* %5
%10 = load i32, i32* %7
%11 = sext i32 %10 to i64
%12 = shl i64 %11, 10
%13 = call i32 @lseek(i32 %9, i64 %12, i32 0)
%14 = load i32, i32* %5
%15 = load i8*, i8** %6
%16 = call i32 @write(i32 %14, i8* %15, i32 1024)
%17 = icmp ne i32 %16, 1024
br i1 %17, label %18, label %19
18: ; preds = %3
store i32 0, i32* %4
br label %20
19: ; preds = %3
store i32 1, i32* %4
br label %20
20: ; preds = %19, %18
%21 = load i32, i32* %4
ret i32 %21
}

LLVM IR (-O2):
define i32 @bwrite(i32 %0, i8* nocapture %1, i32 %2) {
%4 = sext i32 %2 to i64
%5 = shl nsw i64 %4, 10
%6 = tail call i32 @lseek(i32 %0, i64 %5, i32 0)
%7 = tail call i32 @write(i32 %0, i8* %1, i32 1024)
%8 = icmp eq i32 %7, 1024
%9 = zext i1 %8 to i32
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ Putl(int, int);
extern void SetDrawFlags(int dir) { Putl(0x28, dir); }


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

x86 assembly (clang, -O2):
<SetDrawFlags>:
mov    %edi,%esi
mov    $0x28,%edi
jmp    1030 <Putl@plt>

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

LLVM IR (-O2):
define void @SetDrawFlags(i32 %0) {
%2 = tail call i32 @Putl(i32 40, i32 %0)
ret void
}
float real_add_func(float *r1, float *r2) { return (*r1 + *r2); }


x86 assembly (clang, -O0):
<real_add_func>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movss  (%rax),%xmm0
mov    -0x10(%rbp),%rax
addss  (%rax),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<real_add_func>:
movss  (%rdi),%xmm0
addss  (%rsi),%xmm0
ret

LLVM IR (-O0):
define float @real_add_func(float* %0, float* %1) {
%3 = alloca float*
%4 = alloca float*
store float* %0, float** %3
store float* %1, float** %4
%5 = load float*, float** %3
%6 = load float, float* %5
%7 = load float*, float** %4
%8 = load float, float* %7
%9 = fadd float %6, %8
ret float %9
}

LLVM IR (-O2):
define float @real_add_func(float* nocapture %0, float* nocapture %1) {
%3 = load float, float* %0
%4 = load float, float* %1
%5 = fadd float %3, %4
ret float %5
}
/* Variables and functions */
int /*<<< orphan*/ __error_exit(char *);
void *realloc(void *, size_t);
void *check_realloc(void *ptr, size_t size) {
  void *p;
  p = realloc(ptr, size);
  if (p == NULL) {
    __error_exit("memory allocation failed!\n");
  }
  return p;
}


x86 assembly (clang, -O0):
<check_realloc>:
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   1030 <realloc@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    1158 <check_realloc+0x38>
lea    0xead(%rip),%rdi
call   1040 <__error_exit@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<check_realloc>:
push   %rbx
call   1030 <realloc@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    113a <check_realloc+0x1a>
lea    0xecb(%rip),%rdi
call   1040 <__error_exit@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [27 x i8] c"memory allocation failed!\0A\00"
define i8* @check_realloc(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 %13
11: ; preds = %2
%12 = call i32 @__error_exit(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0))
br label %13
13: ; preds = %11, %2
%14 = load i8*, i8** %5
ret i8* %14
}

LLVM IR (-O2):
@.str = [27 x i8] c"memory allocation failed!\0A\00"
define noalias i8* @check_realloc(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 @__error_exit(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0))
br label %7
7: ; preds = %5, %2
ret i8* %3
}
__attribute__((__naked__)) void SGVObjcMsgSendSuper2StretTrampolineObjc(void) {
  asm volatile("addq $"
               "8"
               ", "
               "%%rsi"
               "\n\t"
               "jmp "
               "_objc_msgSendSuper2_stret"
               "\n\t"
               :
               :
               : "rsi", "rdi");
}


x86 assembly (clang, -O0):
<SGVObjcMsgSendSuper2StretTrampolineObjc>:
add    $0x8,%rsi
jmp    1030 <_objc_msgSendSuper2_stret@plt>

x86 assembly (clang, -O2):
<SGVObjcMsgSendSuper2StretTrampolineObjc>:
add    $0x8,%rsi
jmp    1030 <_objc_msgSendSuper2_stret@plt>

LLVM IR (-O0):
define void @SGVObjcMsgSendSuper2StretTrampolineObjc() {
unreachable
}

LLVM IR (-O2):
define void @SGVObjcMsgSendSuper2StretTrampolineObjc() {
tail call void asm sideeffect "addq $$8, %rsi\0A\09jmp _objc_msgSendSuper2_stret\0A\09", "~{rsi},~{rdi},~{dirflag},~{fpsr},~{flags}"()
unreachable
}
int testn(int a, unsigned int n) { return !!(a & (1 << n)); }


x86 assembly (clang, -O0):
<testn>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x8(%rbp),%ecx
mov    $0x1,%edx
shl    %cl,%edx
mov    %edx,%ecx
and    %ecx,%eax
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<testn>:
mov    %esi,%ecx
mov    %edi,%eax
shr    %cl,%eax
and    $0x1,%eax
ret

LLVM IR (-O0):
define i32 @testn(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = load i32, i32* %4
%7 = shl i32 1, %6
%8 = and i32 %5, %7
%9 = icmp ne i32 %8, 0
%10 = xor i1 %9, true
%11 = xor i1 %10, true
%12 = zext i1 %11 to i32
ret i32 %12
}

LLVM IR (-O2):
define i32 @testn(i32 %0, i32 %1) {
%3 = lshr i32 %0, %1
%4 = and i32 %3, 1
ret i32 %4
}
/* Type definitions */
typedef int /*<<< orphan*/ int32_t;

/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ setbuf(int /*<<< orphan*/, int /*<<< orphan*/ *);
int /*<<< orphan*/ stdout;
int /*<<< orphan*/ test_1_2();
int32_t main(void) {
  setbuf(stdout, NULL);
  printf("Performing CTR tests...\n");
  test_1_2();
  printf("All CTR tests succeeded!\n\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    0x2e9a(%rip),%rax
mov    (%rax),%edi
xor    %eax,%eax
mov    %eax,%esi
call   1030 <setbuf@plt>
lea    0xea8(%rip),%rdi
call   1040 <printf@plt>
mov    $0x0,%al
call   1050 <test_1_2@plt>
lea    0xeae(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    0x2ea8(%rip),%rax
mov    (%rax),%edi
xor    %esi,%esi
call   1040 <setbuf@plt>
lea    0xeb8(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
call   1050 <test_1_2@plt>
lea    0xebd(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@stdout = global i32 0
@.str = [25 x i8] c"Performing CTR tests...\0A\00"
@.str.1 = [27 x i8] c"All CTR tests succeeded!\0A\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = load i32, i32* @stdout
%3 = call i32 @setbuf(i32 %2, i32* null)
%4 = call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0))
%5 = call i32 (...) @test_1_2()
%6 = call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@stdout = global i32 0
@str = [24 x i8] c"Performing CTR tests...\00"
@str.2 = [26 x i8] c"All CTR tests succeeded!\0A\00"
define i32 @main() {
%1 = load i32, i32* @stdout
%2 = tail call i32 @setbuf(i32 %1, i32* null)
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @str, i64 0, i64 0))
%4 = tail call i32 (...) @test_1_2()
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @str.2, i64 0, i64 0))
ret i32 0
}
__attribute__((visibility("default"))) void ViStatusChanged(void) {}


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

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

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

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

/* Variables and functions */
int parse_clustal_alignment(int /*<<< orphan*/ *, char ***, char ***, int);
int parse_aln_clustal(FILE *fp, char ***names, char ***aln, char **id,
                      char **structure, int verbosity) {
  if (id)
    *id = NULL;
  if (structure)
    *structure = NULL;
  return parse_clustal_alignment(fp, names, aln, verbosity);
}


x86 assembly (clang, -O0):
<parse_aln_clustal>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9d,-0x2c(%rbp)
cmpq   $0x0,-0x20(%rbp)
je     1146 <parse_aln_clustal+0x36>
mov    -0x20(%rbp),%rax
movq   $0x0,(%rax)
cmpq   $0x0,-0x28(%rbp)
je     115c <parse_aln_clustal+0x4c>
mov    -0x28(%rbp),%rax
movq   $0x0,(%rax)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x2c(%rbp),%ecx
call   1030 <parse_clustal_alignment@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<parse_aln_clustal>:
test   %rcx,%rcx
je     111c <parse_aln_clustal+0xc>
movq   $0x0,(%rcx)
test   %r8,%r8
je     1128 <parse_aln_clustal+0x18>
movq   $0x0,(%r8)
mov    %r9d,%ecx
jmp    1030 <parse_clustal_alignment@plt>

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

LLVM IR (-O2):
define i32 @parse_aln_clustal(i32* %0, i8*** %1, i8*** %2, i8** writeonly %3, i8** writeonly %4, i32 %5) {
%7 = icmp eq i8** %3, null
br i1 %7, label %9, label %8
8: ; preds = %6
store i8* null, i8** %3
br label %9
9: ; preds = %8, %6
%10 = icmp eq i8** %4, null
br i1 %10, label %12, label %11
11: ; preds = %9
store i8* null, i8** %4
br label %12
12: ; preds = %11, %9
%13 = tail call i32 @parse_clustal_alignment(i32* %0, i8*** %1, i8*** %2, i32 %5)
ret i32 %13
}
/* Variables and functions */
int /*<<< orphan*/ ubsan_report_overflow(void *, void *, void *, char *,
                                         char *);
void __ubsan_handle_sub_overflow(void *data_raw, void *lhs_raw, void *rhs_raw) {
  ubsan_report_overflow(data_raw, lhs_raw, rhs_raw, "sub", "-");
}


x86 assembly (clang, -O0):
<__ubsan_handle_sub_overflow>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
lea    0xec9(%rip),%rcx
lea    0xec6(%rip),%r8
call   1030 <ubsan_report_overflow@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__ubsan_handle_sub_overflow>:
lea    0xee9(%rip),%rcx
lea    0xee6(%rip),%r8
jmp    1030 <ubsan_report_overflow@plt>

LLVM IR (-O0):
@.str = [4 x i8] c"sub\00"
@.str.1 = [2 x i8] c"-\00"
define void @__ubsan_handle_sub_overflow(i8* %0, i8* %1, i8* %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i8*
store i8* %0, i8** %4
store i8* %1, i8** %5
store i8* %2, i8** %6
%7 = load i8*, i8** %4
%8 = load i8*, i8** %5
%9 = load i8*, i8** %6
%10 = call i32 @ubsan_report_overflow(i8* %7, i8* %8, i8* %9, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"sub\00"
@.str.1 = [2 x i8] c"-\00"
define void @__ubsan_handle_sub_overflow(i8* %0, i8* %1, i8* %2) {
%4 = tail call i32 @ubsan_report_overflow(i8* %0, i8* %1, i8* %2, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
ret void
}
void RAWToRGB24Row_NEON() {}


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

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

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

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


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

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

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

LLVM IR (-O2):
define i32 @frame_2() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int, int);
int main(void) {
  struct date {
    int month;
    int day;
    int year;
  };
  struct date today, *date_ptr;
  date_ptr = &today;
  date_ptr->month = 11;
  date_ptr->day = 16;
  date_ptr->year = 2015;
  printf("Today's date is %i/%i/%.2i.\n", date_ptr->month, date_ptr->day,
         date_ptr->year % 100);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
movl   $0xb,(%rax)
mov    -0x18(%rbp),%rax
movl   $0x10,0x4(%rax)
mov    -0x18(%rbp),%rax
movl   $0x7df,0x8(%rax)
mov    -0x18(%rbp),%rax
mov    (%rax),%esi
mov    -0x18(%rbp),%rax
mov    0x4(%rax),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x18(%rbp),%rax
mov    0x8(%rax),%eax
mov    $0x64,%ecx
cltd
idiv   %ecx
mov    %edx,%ecx
mov    -0x1c(%rbp),%edx
lea    0xe8e(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rdi
mov    $0xb,%esi
mov    $0x10,%edx
mov    $0xf,%ecx
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.date = type { i32, i32, i32 }
@.str = [29 x i8] c"Today's date is %i/%i/%.2i.\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca %struct.date
%3 = alloca %struct.date*
store i32 0, i32* %1
store %struct.date* %2, %struct.date** %3
%4 = load %struct.date*, %struct.date** %3
%5 = getelementptr inbounds %struct.date, %struct.date* %4, i32 0, i32 0
store i32 11, i32* %5
%6 = load %struct.date*, %struct.date** %3
%7 = getelementptr inbounds %struct.date, %struct.date* %6, i32 0, i32 1
store i32 16, i32* %7
%8 = load %struct.date*, %struct.date** %3
%9 = getelementptr inbounds %struct.date, %struct.date* %8, i32 0, i32 2
store i32 2015, i32* %9
%10 = load %struct.date*, %struct.date** %3
%11 = getelementptr inbounds %struct.date, %struct.date* %10, i32 0, i32 0
%12 = load i32, i32* %11
%13 = load %struct.date*, %struct.date** %3
%14 = getelementptr inbounds %struct.date, %struct.date* %13, i32 0, i32 1
%15 = load i32, i32* %14
%16 = load %struct.date*, %struct.date** %3
%17 = getelementptr inbounds %struct.date, %struct.date* %16, i32 0, i32 2
%18 = load i32, i32* %17
%19 = srem i32 %18, 100
%20 = call i32 @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0), i32 %12, i32 %15, i32 %19)
ret i32 0
}

LLVM IR (-O2):
%struct.date = type { i32, i32, i32 }
@.str = [29 x i8] c"Today's date is %i/%i/%.2i.\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0), i32 11, i32 16, i32 15)
ret i32 0
}