xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void func2(int *p1) {
  if (*p1)
    printf("func2\n");
}


x86 assembly (clang, -O0):
<func2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
cmpl   $0x0,(%rax)
je     1135 <func2+0x25>
lea    0xed0(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<func2>:
cmpl   $0x0,(%rdi)
je     1121 <func2+0x11>
lea    0xee4(%rip),%rdi
jmp    1030 <puts@plt>
ret

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

LLVM IR (-O2):
@str = [6 x i8] c"func2\00"
define void @func2(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = icmp eq i32 %2, 0
br i1 %3, label %6, label %4
4: ; preds = %1
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @str, i64 0, i64 0))
br label %6
6: ; preds = %4, %1
ret void
}
void _k_heap_init(void) {}


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

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

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

LLVM IR (-O2):
define void @_k_heap_init() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ time_(int, long *);
void clock_readtime_processtime(long *t) { time_(15, t); }


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

x86 assembly (clang, -O2):
<clock_readtime_processtime>:
mov    %rdi,%rsi
mov    $0xf,%edi
jmp    1030 <time_@plt>

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

LLVM IR (-O2):
define void @clock_readtime_processtime(i64* %0) {
%2 = tail call i32 @time_(i32 15, i64* %0)
ret void
}
void functiondef1() {}


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

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

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

LLVM IR (-O2):
define void @functiondef1() {
ret void
}
void HSetLineWidth(int w) {}


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

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

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

LLVM IR (-O2):
define void @HSetLineWidth(i32 %0) {
ret void
}
/* Variables and functions */
long double logl(long);
long double atanhl(long double x) { return .5L * logl((1.L + x) / (1.L - x)); }


x86 assembly (clang, -O0):
<atanhl>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
fldt   0x10(%rbp)
fstpt  -0x10(%rbp)
fldt   -0x10(%rbp)
fld1
fld    %st(1)
fadd   %st(1),%st
fxch   %st(1)
fsubp  %st,%st(2)
fdivp  %st,%st(1)
fnstcw -0x1a(%rbp)
movzwl -0x1a(%rbp),%eax
or     $0xc00,%eax
mov    %ax,-0x1c(%rbp)
fldcw  -0x1c(%rbp)
fistpll -0x18(%rbp)
fldcw  -0x1a(%rbp)
mov    -0x18(%rbp),%rdi
call   1030 <logl@plt>
flds   0xeab(%rip)
fmulp  %st,%st(1)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<atanhl>:
sub    $0x18,%rsp
fldt   0x20(%rsp)
fld1
fld    %st(1)
fadd   %st(1),%st
fxch   %st(1)
fsubp  %st,%st(2)
fdivp  %st,%st(1)
fnstcw 0xc(%rsp)
movzwl 0xc(%rsp),%eax
or     $0xc00,%eax
mov    %ax,0xe(%rsp)
fldcw  0xe(%rsp)
fistpll 0x10(%rsp)
fldcw  0xc(%rsp)
mov    0x10(%rsp),%rdi
call   1030 <logl@plt>
fmuls  0xead(%rip)
add    $0x18,%rsp
ret

LLVM IR (-O0):
define x86_fp80 @atanhl(x86_fp80 %0) {
%2 = alloca x86_fp80
store x86_fp80 %0, x86_fp80* %2
%3 = load x86_fp80, x86_fp80* %2
%4 = fadd x86_fp80 0xK3FFF8000000000000000, %3
%5 = load x86_fp80, x86_fp80* %2
%6 = fsub x86_fp80 0xK3FFF8000000000000000, %5
%7 = fdiv x86_fp80 %4, %6
%8 = fptosi x86_fp80 %7 to i64
%9 = call x86_fp80 @logl(i64 %8)
%10 = fmul x86_fp80 0xK3FFE8000000000000000, %9
ret x86_fp80 %10
}

LLVM IR (-O2):
define x86_fp80 @atanhl(x86_fp80 %0) {
%2 = fadd x86_fp80 %0, 0xK3FFF8000000000000000
%3 = fsub x86_fp80 0xK3FFF8000000000000000, %0
%4 = fdiv x86_fp80 %2, %3
%5 = fptosi x86_fp80 %4 to i64
%6 = tail call x86_fp80 @logl(i64 %5)
%7 = fmul x86_fp80 %6, 0xK3FFE8000000000000000
ret x86_fp80 %7
}
/* Variables and functions */
int __jiqnnt(long double);
int intr_wrap_412(long double p1) { return __jiqnnt(p1); }


x86 assembly (clang, -O0):
<intr_wrap_412>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
fldt   0x10(%rbp)
fstpt  -0x10(%rbp)
fldt   -0x10(%rbp)
mov    %rsp,%rax
fstpt  (%rax)
call   1030 <__jiqnnt@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<intr_wrap_412>:
jmp    1030 <__jiqnnt@plt>

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

LLVM IR (-O2):
define i32 @intr_wrap_412(x86_fp80 %0) {
%2 = tail call i32 @__jiqnnt(x86_fp80 %0)
ret i32 %2
}
/* Variables and functions */
scalar_t__ root(int);
int find(int p, int q) { return root(p) == root(q); }


x86 assembly (clang, -O0):
<find>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <root@plt>
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%edi
call   1030 <root@plt>
mov    %rax,%rcx
mov    -0x10(%rbp),%rax
cmp    %rcx,%rax
sete   %al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<find>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebp
call   1030 <root@plt>
mov    %rax,%rbx
mov    %ebp,%edi
call   1030 <root@plt>
xor    %ecx,%ecx
cmp    %rax,%rbx
sete   %cl
mov    %ecx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @find(i32 %0, i32 %1) {
%3 = tail call i64 @root(i32 %0)
%4 = tail call i64 @root(i32 %1)
%5 = icmp eq i64 %3, %4
%6 = zext i1 %5 to i32
ret i32 %6
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;
typedef scalar_t__ int64_t;

/* Variables and functions */
int /*<<< orphan*/ set_rounding(int /*<<< orphan*/ const *);
void cvt_s_l(const uint32_t *fcr31, const int64_t *source, float *dest) {
  set_rounding(fcr31);
  *dest = (float)*source;
}


x86 assembly (clang, -O0):
<cvt_s_l>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <set_rounding@plt>
mov    -0x10(%rbp),%rax
cvtsi2ssq (%rax),%xmm0
mov    -0x18(%rbp),%rax
movss  %xmm0,(%rax)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cvt_s_l>:
push   %r14
push   %rbx
push   %rax
mov    %rdx,%r14
mov    %rsi,%rbx
call   1030 <set_rounding@plt>
cvtsi2ssq (%rbx),%xmm0
movss  %xmm0,(%r14)
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define void @cvt_s_l(i32* %0, i64* %1, float* %2) {
%4 = alloca i32*
%5 = alloca i64*
%6 = alloca float*
store i32* %0, i32** %4
store i64* %1, i64** %5
store float* %2, float** %6
%7 = load i32*, i32** %4
%8 = call i32 @set_rounding(i32* %7)
%9 = load i64*, i64** %5
%10 = load i64, i64* %9
%11 = sitofp i64 %10 to float
%12 = load float*, float** %6
store float %11, float* %12
ret void
}

LLVM IR (-O2):
define void @cvt_s_l(i32* %0, i64* nocapture %1, float* nocapture writeonly %2) {
%4 = tail call i32 @set_rounding(i32* %0)
%5 = load i64, i64* %1
%6 = sitofp i64 %5 to float
store float %6, float* %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ puts(char *);
void main(void) {
  puts("Hello, world :-)\r\n");
  exit(0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1030 <puts@plt>
xor    %edi,%edi
call   1040 <exit@plt>

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

LLVM IR (-O0):
@.str = [19 x i8] c"Hello, world :-)\0D\0A\00"
define void @main() {
%1 = call i32 @puts(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@.str = [19 x i8] c"Hello, world :-)\0D\0A\00"
define void @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @exit(i32 0)
unreachable
}
char *langRomTypeKonamiKbdMast() { return "Konami Keyboard Master"; }


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

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

LLVM IR (-O0):
@.str = [23 x i8] c"Konami Keyboard Master\00"
define i8* @langRomTypeKonamiKbdMast() {
ret i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [23 x i8] c"Konami Keyboard Master\00"
define i8* @langRomTypeKonamiKbdMast() {
ret i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0)
}
/* Variables and functions */
int /*<<< orphan*/ gensym(char const *);
void *libpdreceive_new(int /*<<< orphan*/);
void *libpd_bind(const char *sym) { return libpdreceive_new(gensym(sym)); }


x86 assembly (clang, -O0):
<libpd_bind>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <gensym@plt>
mov    %eax,%edi
call   1040 <libpdreceive_new@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<libpd_bind>:
push   %rax
call   1030 <gensym@plt>
mov    %eax,%edi
pop    %rax
jmp    1040 <libpdreceive_new@plt>

LLVM IR (-O0):
define i8* @libpd_bind(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @gensym(i8* %3)
%5 = call i8* @libpdreceive_new(i32 %4)
ret i8* %5
}

LLVM IR (-O2):
define i8* @libpd_bind(i8* %0) {
%2 = tail call i32 @gensym(i8* %0)
%3 = tail call i8* @libpdreceive_new(i32 %2)
ret i8* %3
}
/* Variables and functions */
int /*<<< orphan*/ sort(int *, int /*<<< orphan*/, int);
int main() {
  int a[20] = {20, 19, 18, 17, 16, 15, 14, 13, 12, 11,
               10, 9,  8,  7,  6,  5,  4,  3,  2,  1};
  sort(a, 0, 20);
  return a[2];
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x60(%rbp),%rdi
lea    0xec6(%rip),%rsi
mov    $0x50,%edx
call   1040 <memcpy@plt>
lea    -0x60(%rbp),%rdi
xor    %esi,%esi
mov    $0x14,%edx
call   1030 <sort@plt>
mov    -0x58(%rbp),%eax
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x58,%rsp
movaps 0xf25(%rip),%xmm0
movaps %xmm0,0x40(%rsp)
movaps 0xf09(%rip),%xmm0
movaps %xmm0,0x30(%rsp)
movaps 0xeed(%rip),%xmm0
movaps %xmm0,0x20(%rsp)
movaps 0xed1(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0xeb5(%rip),%xmm0
movaps %xmm0,(%rsp)
mov    %rsp,%rdi
xor    %esi,%esi
mov    $0x14,%edx
call   1030 <sort@plt>
mov    0x8(%rsp),%eax
add    $0x58,%rsp
ret

LLVM IR (-O0):
@__const.main.a = [20 x i32] [i32 20, i32 19, i32 18, i32 17, i32 16, i32 15, i32 14, i32 13, i32 12, i32 11, i32 10, i32 9, i32 8, i32 7, i32 6, i32 5, i32 4, i32 3, i32 2, i32 1]
define i32 @main() {
%1 = alloca i32
%2 = alloca [20 x i32]
store i32 0, i32* %1
%3 = bitcast [20 x i32]* %2 to i8*
%4 = getelementptr inbounds [20 x i32], [20 x i32]* %2, i64 0, i64 0
%5 = call i32 @sort(i32* %4, i32 0, i32 20)
%6 = getelementptr inbounds [20 x i32], [20 x i32]* %2, i64 0, i64 2
%7 = load i32, i32* %6
ret i32 %7
}

LLVM IR (-O2):
@__const.main.a = [20 x i32] [i32 20, i32 19, i32 18, i32 17, i32 16, i32 15, i32 14, i32 13, i32 12, i32 11, i32 10, i32 9, i32 8, i32 7, i32 6, i32 5, i32 4, i32 3, i32 2, i32 1]
define i32 @main() {
%1 = alloca [20 x i32]
%2 = bitcast [20 x i32]* %1 to i8*
%3 = getelementptr inbounds [20 x i32], [20 x i32]* %1, i64 0, i64 0
%4 = call i32 @sort(i32* %3, i32 0, i32 20)
%5 = getelementptr inbounds [20 x i32], [20 x i32]* %1, i64 0, i64 2
%6 = load i32, i32* %5
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ CALC_appendString(char *);
void CALC_add5() { CALC_appendString("5"); }


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

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

LLVM IR (-O0):
@.str = [2 x i8] c"5\00"
define void @CALC_add5() {
%1 = call i32 @CALC_appendString(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [2 x i8] c"5\00"
define void @CALC_add5() {
%1 = tail call i32 @CALC_appendString(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
ret void
}
int true_action(const char *fileName, struct stat *statbuf, void *userData,
                int depth) {
  return 1;
}


x86 assembly (clang, -O0):
<true_action>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    $0x1,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.stat = type opaque
define i32 @true_action(i8* %0, %struct.stat* %1, i8* %2, i32 %3) {
%5 = alloca i8*
%6 = alloca %struct.stat*
%7 = alloca i8*
%8 = alloca i32
store i8* %0, i8** %5
store %struct.stat* %1, %struct.stat** %6
store i8* %2, i8** %7
store i32 %3, i32* %8
ret i32 1
}

LLVM IR (-O2):
%struct.stat = type opaque
define i32 @true_action(i8* nocapture readnone %0, %struct.stat* nocapture readnone %1, i8* nocapture readnone %2, i32 %3) {
ret i32 1
}
/* Variables and functions */
scalar_t__ ASRT_Int(int, int);
int /*<<< orphan*/ ASRT_Mark(char *, int, char *);
int test_UIntFail() {
  int x = 37;
  int y = 38;
  do {
    ASRT_Mark("/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/cohadar/c-learning/refs/heads/master/"
              "src/asrt_tests.c",
              223,
              "x"
              " == "
              "y");
    if (ASRT_Int(x, y)) {
      return 1;
    };
  } while (0);
  return 0;
}


x86 assembly (clang, -O0):
<test_UIntFail>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x25,-0x8(%rbp)
movl   $0x26,-0xc(%rbp)
lea    0xec3(%rip),%rdi
mov    $0xdf,%esi
lea    0xf47(%rip),%rdx
call   1030 <ASRT_Mark@plt>
mov    -0x8(%rbp),%edi
mov    -0xc(%rbp),%esi
call   1040 <ASRT_Int@plt>
cmp    $0x0,%rax
je     116f <test_UIntFail+0x4f>
movl   $0x1,-0x4(%rbp)
jmp    117b <test_UIntFail+0x5b>
jmp    1174 <test_UIntFail+0x54>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_UIntFail>:
push   %rax
lea    0xed8(%rip),%rdi
lea    0xf61(%rip),%rdx
mov    $0xdf,%esi
call   1030 <ASRT_Mark@plt>
mov    $0x25,%edi
mov    $0x26,%esi
call   1040 <ASRT_Int@plt>
xor    %ecx,%ecx
test   %rax,%rax
setne  %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [144 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/cohadar/c-learning/refs/heads/master/src/asrt_tests.c\00"
@.str.1 = [7 x i8] c"x == y\00"
define i32 @test_UIntFail() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 37, i32* %2
store i32 38, i32* %3
br label %4
4: ; preds = %0
%5 = call i32 @ASRT_Mark(i8* getelementptr inbounds ([144 x i8], [144 x i8]* @.str, i64 0, i64 0), i32 223, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0))
%6 = load i32, i32* %2
%7 = load i32, i32* %3
%8 = call i64 @ASRT_Int(i32 %6, i32 %7)
%9 = icmp ne i64 %8, 0
br i1 %9, label %10, label %11
10: ; preds = %4
store i32 1, i32* %1
br label %13
11: ; preds = %4
br label %12
12: ; preds = %11
store i32 0, i32* %1
br label %13
13: ; preds = %12, %10
%14 = load i32, i32* %1
ret i32 %14
}

LLVM IR (-O2):
@.str = [144 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/cohadar/c-learning/refs/heads/master/src/asrt_tests.c\00"
@.str.1 = [7 x i8] c"x == y\00"
define i32 @test_UIntFail() {
%1 = tail call i32 @ASRT_Mark(i8* getelementptr inbounds ([144 x i8], [144 x i8]* @.str, i64 0, i64 0), i32 223, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0))
%2 = tail call i64 @ASRT_Int(i32 37, i32 38)
%3 = icmp ne i64 %2, 0
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ assert(int);
void cpu_write_u32(unsigned char *p, uint32_t val) {
  assert(!"cpu_write_u32() not implemented");
}


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

x86 assembly (clang, -O2):
<cpu_write_u32>:
xor    %edi,%edi
jmp    1030 <assert@plt>

LLVM IR (-O0):
@.str = [32 x i8] c"cpu_write_u32() not implemented\00"
define void @cpu_write_u32(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = call i32 @assert(i32 0)
ret void
}

LLVM IR (-O2):
define void @cpu_write_u32(i8* nocapture readnone %0, i32 %1) {
%3 = tail call i32 @assert(i32 0)
ret void
}
/* Variables and functions */
char *getenv(const char *name) {
  (void)name;
  return NULL;
}


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

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

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

LLVM IR (-O2):
define noalias i8* @getenv(i8* nocapture readnone %0) {
ret i8* null
}
int test_imm_93int64_lowword_reg(long long val) {
  return ((val) & (0x93 << 0)) ? -20 : -40;
}


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

x86 assembly (clang, -O2):
<test_imm_93int64_lowword_reg>:
test   $0x93,%dil
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_93int64_lowword_reg(i64 %0) {
%2 = and i64 %0, 147
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
void anotherAutoFunction() {}


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

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

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

LLVM IR (-O2):
define void @anotherAutoFunction() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ qh_exit(int);
void qh_errexit(int exitcode, void *f, void *r) {
  f = r;
  qh_exit(exitcode);
}


x86 assembly (clang, -O0):
<qh_errexit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <qh_exit@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<qh_errexit>:
jmp    1030 <qh_exit@plt>

LLVM IR (-O0):
define void @qh_errexit(i32 %0, i8* %1, i8* %2) {
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i8*
store i32 %0, i32* %4
store i8* %1, i8** %5
store i8* %2, i8** %6
%7 = load i8*, i8** %6
store i8* %7, i8** %5
%8 = load i32, i32* %4
%9 = call i32 @qh_exit(i32 %8)
ret void
}

LLVM IR (-O2):
define void @qh_errexit(i32 %0, i8* nocapture readnone %1, i8* nocapture readnone %2) {
%4 = tail call i32 @qh_exit(i32 %0)
ret void
}
void GrOffScreen4BPPFlush(void *pvDisplayData) { ; }


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

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

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

LLVM IR (-O2):
define void @GrOffScreen4BPPFlush(i8* nocapture %0) {
ret void
}
char *langRomTypeTurborPcm() { return "Turbo-R PCM Chip"; }


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

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

LLVM IR (-O0):
@.str = [17 x i8] c"Turbo-R PCM Chip\00"
define i8* @langRomTypeTurborPcm() {
ret i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [17 x i8] c"Turbo-R PCM Chip\00"
define i8* @langRomTypeTurborPcm() {
ret i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0)
}
unsigned int get_u16(void *vd) {
  unsigned char *d = (unsigned char *)vd;
  return (d[0] << 8) | d[1];
}


x86 assembly (clang, -O0):
<get_u16>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movzbl (%rax),%eax
shl    $0x8,%eax
mov    -0x10(%rbp),%rcx
movzbl 0x1(%rcx),%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_u16>:
movzwl (%rdi),%eax
shl    $0x10,%eax
bswap  %eax
ret

LLVM IR (-O0):
define i32 @get_u16(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
store i8* %4, i8** %3
%5 = load i8*, i8** %3
%6 = getelementptr inbounds i8, i8* %5, i64 0
%7 = load i8, i8* %6
%8 = zext i8 %7 to i32
%9 = shl i32 %8, 8
%10 = load i8*, i8** %3
%11 = getelementptr inbounds i8, i8* %10, i64 1
%12 = load i8, i8* %11
%13 = zext i8 %12 to i32
%14 = or i32 %9, %13
ret i32 %14
}

LLVM IR (-O2):
define i32 @get_u16(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = zext i8 %2 to i32
%4 = shl nuw nsw i32 %3, 8
%5 = getelementptr inbounds i8, i8* %0, i64 1
%6 = load i8, i8* %5
%7 = zext i8 %6 to i32
%8 = or i32 %4, %7
ret i32 %8
}
void iwm_debugfs_exit(struct iwm_priv *iwm) {}


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

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

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

LLVM IR (-O2):
%struct.iwm_priv = type opaque
define void @iwm_debugfs_exit(%struct.iwm_priv* nocapture %0) {
ret void
}
/* Variables and functions */
int strlen(char *);
void _chomp(char *s) {
  int len = strlen(s);
  if (s[len - 1] == '\n')
    s[len - 1] = '\0';
}


x86 assembly (clang, -O0):
<_chomp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    -0xc(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0xa,%eax
jne    1153 <_chomp+0x43>
mov    -0x8(%rbp),%rax
mov    -0xc(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
movb   $0x0,(%rax,%rcx,1)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_chomp>:
push   %rbx
mov    %rdi,%rbx
call   1030 <strlen@plt>
cltq
cmpb   $0xa,-0x1(%rax,%rbx,1)
jne    1127 <_chomp+0x17>
movb   $0x0,-0x1(%rbx,%rax,1)
pop    %rbx
ret

LLVM IR (-O0):
define void @_chomp(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i32 @strlen(i8* %4)
store i32 %5, i32* %3
%6 = load i8*, i8** %2
%7 = load i32, i32* %3
%8 = sub nsw i32 %7, 1
%9 = sext i32 %8 to i64
%10 = getelementptr inbounds i8, i8* %6, i64 %9
%11 = load i8, i8* %10
%12 = sext i8 %11 to i32
%13 = icmp eq i32 %12, 10
br i1 %13, label %14, label %20
14: ; preds = %1
%15 = load i8*, i8** %2
%16 = load i32, i32* %3
%17 = sub nsw i32 %16, 1
%18 = sext i32 %17 to i64
%19 = getelementptr inbounds i8, i8* %15, i64 %18
store i8 0, i8* %19
br label %20
20: ; preds = %14, %1
ret void
}

LLVM IR (-O2):
define void @_chomp(i8* %0) {
%2 = tail call i32 @strlen(i8* %0)
%3 = add nsw i32 %2, -1
%4 = sext i32 %3 to i64
%5 = getelementptr inbounds i8, i8* %0, i64 %4
%6 = load i8, i8* %5
%7 = icmp eq i8 %6, 10
br i1 %7, label %8, label %9
8: ; preds = %1
store i8 0, i8* %5
br label %9
9: ; preds = %8, %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fileno(int /*<<< orphan*/);
unsigned char isatty(int /*<<< orphan*/);
int /*<<< orphan*/ stdin;
unsigned char T3D_IsInteractive(void) { return (isatty(fileno(stdin))); }


x86 assembly (clang, -O0):
<T3D_IsInteractive>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ebd(%rip),%rax
mov    (%rax),%edi
call   1040 <fileno@plt>
mov    %eax,%edi
call   1030 <isatty@plt>
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<T3D_IsInteractive>:
push   %rax
mov    0x2ec0(%rip),%rax
mov    (%rax),%edi
call   1040 <fileno@plt>
mov    %eax,%edi
pop    %rax
jmp    1030 <isatty@plt>

LLVM IR (-O0):
@stdin = global i32 0
define zeroext i8 @T3D_IsInteractive() {
%1 = load i32, i32* @stdin
%2 = call i32 @fileno(i32 %1)
%3 = call zeroext i8 @isatty(i32 %2)
ret i8 %3
}

LLVM IR (-O2):
@stdin = global i32 0
define zeroext i8 @T3D_IsInteractive() {
%1 = load i32, i32* @stdin
%2 = tail call i32 @fileno(i32 %1)
%3 = tail call zeroext i8 @isatty(i32 %2)
ret i8 %3
}
void get_16byte_key(unsigned long *output_key) {
  output_key[0] = 1;
  output_key[1] = 2;
  output_key[2] = 3;
  output_key[3] = 4;
}


x86 assembly (clang, -O0):
<get_16byte_key>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movq   $0x1,(%rax)
mov    -0x8(%rbp),%rax
movq   $0x2,0x8(%rax)
mov    -0x8(%rbp),%rax
movq   $0x3,0x10(%rax)
mov    -0x8(%rbp),%rax
movq   $0x4,0x18(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_16byte_key>:
movaps 0xef9(%rip),%xmm0
movups %xmm0,(%rdi)
movaps 0xeff(%rip),%xmm0
movups %xmm0,0x10(%rdi)
ret

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

LLVM IR (-O2):
define void @get_16byte_key(i64* nocapture writeonly %0) {
%2 = bitcast i64* %0 to <2 x i64>*
store <2 x i64> <i64 1, i64 2>, <2 x i64>* %2
%3 = getelementptr inbounds i64, i64* %0, i64 2
%4 = bitcast i64* %3 to <2 x i64>*
store <2 x i64> <i64 3, i64 4>, <2 x i64>* %4
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int print_version(void) {
  printf("sordi "
         "0.12.0"
         " <http://drobilla.net/software/sord>\n");
  printf("Copyright 2011-2013 David Robillard <http://drobilla.net>.\n"
         "License: <http://www.opensource.org/licenses/isc>\n"
         "This is free software; you are free to change and redistribute it."
         "\nThere is NO WARRANTY, to the extent permitted by law.\n");
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [50 x i8] c"sordi 0.12.0 <http://drobilla.net/software/sord>\0A\00"
@.str.1 = [231 x i8] c"Copyright 2011-2013 David Robillard <http://drobilla.net>.\0ALicense: <http://www.opensource.org/licenses/isc>\0AThis is free software; you are free to change and redistribute it.\0AThere is NO WARRANTY, to the extent permitted by law.\0A\00"
define i32 @print_version() {
%1 = call i32 @printf(i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @printf(i8* getelementptr inbounds ([231 x i8], [231 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [49 x i8] c"sordi 0.12.0 <http://drobilla.net/software/sord>\00"
@str.2 = [230 x i8] c"Copyright 2011-2013 David Robillard <http://drobilla.net>.\0ALicense: <http://www.opensource.org/licenses/isc>\0AThis is free software; you are free to change and redistribute it.\0AThere is NO WARRANTY, to the extent permitted by law.\00"
define i32 @print_version() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([49 x i8], [49 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([230 x i8], [230 x i8]* @str.2, i64 0, i64 0))
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
int /*<<< orphan*/ i2c_read(int /*<<< orphan*/, int /*<<< orphan*/, int,
                            int /*<<< orphan*/ *, int);
uint8_t i2c_reg_read(uint8_t addr, uint8_t reg) {
  uint8_t buf;
  i2c_read(addr, reg, 1, &buf, 1);
  return buf;
}


x86 assembly (clang, -O0):
<i2c_reg_read>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    $0x1,%r8d
lea    -0xc(%rbp),%rcx
mov    %r8d,%edx
call   1030 <i2c_read@plt>
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<i2c_reg_read>:
push   %rax
lea    0x4(%rsp),%rcx
mov    $0x1,%edx
mov    $0x1,%r8d
call   1030 <i2c_read@plt>
mov    0x4(%rsp),%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @i2c_reg_read(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* %3
%7 = load i32, i32* %4
%8 = call i32 @i2c_read(i32 %6, i32 %7, i32 1, i32* %5, i32 1)
%9 = load i32, i32* %5
ret i32 %9
}

LLVM IR (-O2):
define i32 @i2c_reg_read(i32 %0, i32 %1) {
%3 = alloca i32
%4 = bitcast i32* %3 to i8*
%5 = call i32 @i2c_read(i32 %0, i32 %1, i32 1, i32* %3, i32 1)
%6 = load i32, i32* %3
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ squeeze(char *, char);
int main(void) {
  squeeze("abc", 'c');
  return 0;
}


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

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

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

LLVM IR (-O2):
@.str = [4 x i8] c"abc\00"
define i32 @main() {
%1 = tail call i32 @squeeze(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8 signext 99)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void cmd_usage_get(void) { printf("usage: mdp get [-hrE] keyword ...\n"); }


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

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

LLVM IR (-O0):
@.str = [35 x i8] c"usage: mdp get [-hrE] keyword ...\0A\00"
define void @cmd_usage_get() {
%1 = call i32 @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [34 x i8] c"usage: mdp get [-hrE] keyword ...\00"
define void @cmd_usage_get() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([34 x i8], [34 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ die(char *);
void *malloc(size_t);
int /*<<< orphan*/ memset(void *, int /*<<< orphan*/, size_t);
void *xmalloc(size_t size) {
  void *ptr;
  ptr = malloc(size);
  if (!ptr)
    die("out of memory");
  memset(ptr, 0, size);
  return ptr;
}


x86 assembly (clang, -O0):
<xmalloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <malloc@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1160 <xmalloc+0x30>
lea    0xea5(%rip),%rdi
call   1050 <die@plt>
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rdx
xor    %esi,%esi
call   1030 <memset@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xmalloc>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
call   1040 <malloc@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    1150 <xmalloc+0x20>
lea    0xeb5(%rip),%rdi
call   1050 <die@plt>
mov    %rbx,%rdi
xor    %esi,%esi
mov    %r14,%rdx
call   1030 <memset@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [14 x i8] c"out of memory\00"
define i8* @xmalloc(i64 %0) {
%2 = alloca i64
%3 = alloca i8*
store i64 %0, i64* %2
%4 = load i64, i64* %2
%5 = call i8* @malloc(i64 %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 @die(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
br label %10
10: ; preds = %8, %1
%11 = load i8*, i8** %3
%12 = load i64, i64* %2
%13 = call i32 @memset(i8* %11, i32 0, i64 %12)
%14 = load i8*, i8** %3
ret i8* %14
}

LLVM IR (-O2):
@.str = [14 x i8] c"out of memory\00"
define i8* @xmalloc(i64 %0) {
%2 = tail call i8* @malloc(i64 %0)
%3 = icmp eq i8* %2, null
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i32 @die(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
br label %6
6: ; preds = %4, %1
%7 = tail call i32 @memset(i8* %2, i32 0, i64 %0)
ret i8* %2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void setlist_usage(void) {
  printf("-N set setlist --size size\n"
         "-A set setname[,before|after,setname]\n"
         "-D set setname\n"
         "-T set setname\n");
}


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

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

LLVM IR (-O0):
@.str = [96 x i8] c"-N set setlist --size size\0A-A set setname[,before|after,setname]\0A-D set setname\0A-T set setname\0A\00"
define void @setlist_usage() {
%1 = call i32 @printf(i8* getelementptr inbounds ([96 x i8], [96 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [95 x i8] c"-N set setlist --size size\0A-A set setname[,before|after,setname]\0A-D set setname\0A-T set setname\00"
define void @setlist_usage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([95 x i8], [95 x i8]* @str, i64 0, i64 0))
ret void
}
int f4(int x, unsigned y) {
  unsigned a = x;
  return a | y;
}


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

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

LLVM IR (-O0):
define i32 @f4(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* %3
store i32 %6, i32* %5
%7 = load i32, i32* %5
%8 = load i32, i32* %4
%9 = or i32 %7, %8
ret i32 %9
}

LLVM IR (-O2):
define i32 @f4(i32 %0, i32 %1) {
%3 = or i32 %1, %0
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void help() {
  printf(
      "Usage: checkmedia [OPTIONS] FILE\n"
      "\n"
      "Check SUSE installation media.\n"
      "\n"
      "Options:\n"
      "      --key-file FILE   Use public key in FILE for signature check.\n"
      "      --version         Show checkmedia version.\n"
      "  -v, --verbose         Show more detailed info.\n"
      "  -h, --help            Show this text.\n"
      "\n"
      "Usually checksums both over the whole ISO image and the installation\n"
      "partition are available.\n");
}


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

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

LLVM IR (-O0):
@.str = [377 x i8] c"Usage: checkmedia [OPTIONS] FILE\0A\0ACheck SUSE installation media.\0A\0AOptions:\0A --key-file FILE Use public key in FILE for signature check.\0A --version Show checkmedia version.\0A -v, --verbose Show more detailed info.\0A -h, --help Show this text.\0A\0AUsually checksums both over the whole ISO image and the installation\0Apartition are available.\0A\00"
define void @help() {
%1 = call i32 @printf(i8* getelementptr inbounds ([377 x i8], [377 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [376 x i8] c"Usage: checkmedia [OPTIONS] FILE\0A\0ACheck SUSE installation media.\0A\0AOptions:\0A --key-file FILE Use public key in FILE for signature check.\0A --version Show checkmedia version.\0A -v, --verbose Show more detailed info.\0A -h, --help Show this text.\0A\0AUsually checksums both over the whole ISO image and the installation\0Apartition are available.\00"
define void @help() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([376 x i8], [376 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
char *tokenParser(char *, char *, int /*<<< orphan*/, char *);
char *locuslinkParser(char *header) {
  return tokenParser(header, " ", 0, "locuslinkParser");
}


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

x86 assembly (clang, -O2):
<locuslinkParser>:
lea    0xee9(%rip),%rsi
lea    0xee4(%rip),%rcx
xor    %edx,%edx
jmp    1030 <tokenParser@plt>

LLVM IR (-O0):
@.str = [2 x i8] c" \00"
@.str.1 = [16 x i8] c"locuslinkParser\00"
define i8* @locuslinkParser(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i8* @tokenParser(i8* %3, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), i32 0, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0))
ret i8* %4
}

LLVM IR (-O2):
@.str = [2 x i8] c" \00"
@.str.1 = [16 x i8] c"locuslinkParser\00"
define i8* @locuslinkParser(i8* %0) {
%2 = tail call i8* @tokenParser(i8* %0, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), i32 0, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0))
ret i8* %2
}
void fd2doy(string, year, doy) char *string;
int *year;
double *doy;
{
  double dj;
  dj = fd2jd(string);
  jd2doy(dj, year, doy);
  return;
}


x86 assembly (clang, -O0):
<fd2doy>:
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    $0x0,%al
call   1030 <fd2jd@plt>
cvtsi2sd %eax,%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x20(%rbp),%xmm0
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    $0x1,%al
call   1040 <jd2doy@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fd2doy>:
push   %r14
push   %rbx
push   %rax
mov    %rdx,%r14
mov    %rsi,%rbx
xor    %eax,%eax
call   1030 <fd2jd@plt>
cvtsi2sd %eax,%xmm0
mov    %rbx,%rdi
mov    %r14,%rsi
mov    $0x1,%al
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <jd2doy@plt>

LLVM IR (-O0):
define void @fd2doy(i8* %0, i32* %1, double* %2) {
%4 = alloca i8*
%5 = alloca i32*
%6 = alloca double*
%7 = alloca double
store i8* %0, i8** %4
store i32* %1, i32** %5
store double* %2, double** %6
%8 = load i8*, i8** %4
%9 = call i32 (i8*, ...) bitcast (i32 (...)* @fd2jd to i32 (i8*, ...)*)(i8* %8)
%10 = sitofp i32 %9 to double
store double %10, double* %7
%11 = load double, double* %7
%12 = load i32*, i32** %5
%13 = load double*, double** %6
%14 = call i32 (double, i32*, double*, ...) bitcast (i32 (...)* @jd2doy to i32 (double, i32*, double*, ...)*)(double %11, i32* %12, double* %13)
ret void
}

LLVM IR (-O2):
define void @fd2doy(i8* %0, i32* %1, double* %2) {
%4 = tail call i32 (i8*, ...) bitcast (i32 (...)* @fd2jd to i32 (i8*, ...)*)(i8* %0)
%5 = sitofp i32 %4 to double
%6 = tail call i32 (double, i32*, double*, ...) bitcast (i32 (...)* @jd2doy to i32 (double, i32*, double*, ...)*)(double %5, i32* %1, double* %2)
ret void
}
void phantom_debug_register_stray_catch(void *a, int s, const char *n) {
  (void)a;
  (void)s;
  (void)n;
}


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

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

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

LLVM IR (-O2):
define void @phantom_debug_register_stray_catch(i8* nocapture %0, i32 %1, i8* nocapture %2) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ error(int, char *, char *, char *);
int /*<<< orphan*/ exit(int);
void unterminated_union(int lineno, char *line, char *cptr) {
  error(lineno, line, cptr, "unterminated %%union");
  exit(1);
}


x86 assembly (clang, -O0):
<unterminated_union>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
lea    0xebb(%rip),%rcx
call   1030 <error@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<unterminated_union>:
push   %rax
lea    0xed8(%rip),%rcx
call   1030 <error@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [21 x i8] c"unterminated %%union\00"
define void @unterminated_union(i32 %0, i8* %1, i8* %2) {
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i8*
store i32 %0, i32* %4
store i8* %1, i8** %5
store i8* %2, i8** %6
%7 = load i32, i32* %4
%8 = load i8*, i8** %5
%9 = load i8*, i8** %6
%10 = call i32 @error(i32 %7, i8* %8, i8* %9, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0))
%11 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@.str = [21 x i8] c"unterminated %%union\00"
define void @unterminated_union(i32 %0, i8* %1, i8* %2) {
%4 = tail call i32 @error(i32 %0, i8* %1, i8* %2, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0))
%5 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ free(void **);
void pointer_free(void ***ptr) {
  if (*ptr)
    free(*ptr);
}


x86 assembly (clang, -O0):
<pointer_free>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
cmpq   $0x0,(%rax)
je     1136 <pointer_free+0x26>
mov    -0x8(%rbp),%rax
mov    (%rax),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pointer_free>:
mov    (%rdi),%rdi
test   %rdi,%rdi
je     111d <pointer_free+0xd>
jmp    1030 <free@plt>
ret

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

LLVM IR (-O2):
define void @pointer_free(i8*** nocapture %0) {
%2 = load i8**, i8*** %0
%3 = icmp eq i8** %2, null
br i1 %3, label %6, label %4
4: ; preds = %1
%5 = tail call i32 @free(i8** %2)
br label %6
6: ; preds = %4, %1
ret void
}
int main() {
  if (0) {
    return 1;
  } else {
    return 2;
  }
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
ret i32 2
}
/* Variables and functions */
int /*<<< orphan*/ SEEK_END;
int /*<<< orphan*/ fflush(int /*<<< orphan*/);
int /*<<< orphan*/ fgets(char *, int, int /*<<< orphan*/);
int /*<<< orphan*/ fseek(int /*<<< orphan*/, int /*<<< orphan*/,
                         int /*<<< orphan*/);
int /*<<< orphan*/ stdin;
char readInput(char *pointer) {
  fgets(pointer, 100, stdin);
  fseek(stdin, 0, SEEK_END);
  fflush(stdin);
}


x86 assembly (clang, -O0):
<readInput>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    0x2e99(%rip),%rax
mov    (%rax),%edx
mov    $0x64,%esi
call   1030 <fgets@plt>
mov    0x2e86(%rip),%rax
mov    (%rax),%edi
mov    0x2e85(%rip),%rax
mov    (%rax),%edx
xor    %esi,%esi
call   1050 <fseek@plt>
mov    0x2e6d(%rip),%rax
mov    (%rax),%edi
call   1040 <fflush@plt>
movsbl -0x1(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<readInput>:
push   %rbx
mov    0x2ea8(%rip),%rbx
mov    (%rbx),%edx
mov    $0x64,%esi
call   1030 <fgets@plt>
mov    (%rbx),%edi
mov    0x2e9b(%rip),%rax
mov    (%rax),%edx
xor    %esi,%esi
call   1050 <fseek@plt>
mov    (%rbx),%edi
pop    %rbx
jmp    1040 <fflush@plt>

LLVM IR (-O0):
@stdin = global i32 0
@SEEK_END = global i32 0
define signext i8 @readInput(i8* %0) {
%2 = alloca i8
%3 = alloca i8*
store i8* %0, i8** %3
%4 = load i8*, i8** %3
%5 = load i32, i32* @stdin
%6 = call i32 @fgets(i8* %4, i32 100, i32 %5)
%7 = load i32, i32* @stdin
%8 = load i32, i32* @SEEK_END
%9 = call i32 @fseek(i32 %7, i32 0, i32 %8)
%10 = load i32, i32* @stdin
%11 = call i32 @fflush(i32 %10)
%12 = load i8, i8* %2
ret i8 %12
}

LLVM IR (-O2):
@stdin = global i32 0
@SEEK_END = global i32 0
define signext i8 @readInput(i8* %0) {
%2 = load i32, i32* @stdin
%3 = tail call i32 @fgets(i8* %0, i32 100, i32 %2)
%4 = load i32, i32* @stdin
%5 = load i32, i32* @SEEK_END
%6 = tail call i32 @fseek(i32 %4, i32 0, i32 %5)
%7 = load i32, i32* @stdin
%8 = tail call i32 @fflush(i32 %7)
ret i8 undef
}
/* Variables and functions */
int /*<<< orphan*/ NEDPositionHandle();
int /*<<< orphan*/ UAVObjRequestUpdate(int /*<<< orphan*/);
void NEDPositionRequestUpdate() { UAVObjRequestUpdate(NEDPositionHandle()); }


x86 assembly (clang, -O0):
<NEDPositionRequestUpdate>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <NEDPositionHandle@plt>
mov    %eax,%edi
call   1030 <UAVObjRequestUpdate@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<NEDPositionRequestUpdate>:
push   %rax
xor    %eax,%eax
call   1040 <NEDPositionHandle@plt>
mov    %eax,%edi
pop    %rax
jmp    1030 <UAVObjRequestUpdate@plt>

LLVM IR (-O0):
define void @NEDPositionRequestUpdate() {
%1 = call i32 (...) @NEDPositionHandle()
%2 = call i32 @UAVObjRequestUpdate(i32 %1)
ret void
}

LLVM IR (-O2):
define void @NEDPositionRequestUpdate() {
%1 = tail call i32 (...) @NEDPositionHandle()
%2 = tail call i32 @UAVObjRequestUpdate(i32 %1)
ret void
}