xunge/DecIR huggingface dataset:
void ioctl_reset() {}


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

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

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

LLVM IR (-O2):
define void @ioctl_reset() {
ret void
}
double min(double a, double b) { return (a < b ? a : b); }


x86 assembly (clang, -O0):
<min>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm1
movsd  -0x10(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jbe    1131 <min+0x31>
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
jmp    113b <min+0x3b>
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<min>:
minsd  %xmm1,%xmm0
ret

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

LLVM IR (-O2):
define double @min(double %0, double %1) {
%3 = fcmp olt double %0, %1
%4 = select i1 %3, double %0, double %1
ret double %4
}
/* Type definitions */
struct monCommand {
  int dummy;
};

/* Variables and functions */
int _addcommand(struct monCommand *, char *);
int /*<<< orphan*/ monLock();
int /*<<< orphan*/ monUnlock();
int mon_addcommand(struct monCommand *cmdlist, char *cmdlvl) {
  int ret;
  monLock();
  ret = _addcommand(cmdlist, cmdlvl);
  monUnlock();
  return (ret);
}


x86 assembly (clang, -O0):
<mon_addcommand>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x0,%al
call   1040 <monLock@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <_addcommand@plt>
mov    %eax,-0x14(%rbp)
mov    $0x0,%al
call   1050 <monUnlock@plt>
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mon_addcommand>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
xor    %eax,%eax
call   1040 <monLock@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
call   1030 <_addcommand@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   1050 <monUnlock@plt>
mov    %ebx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
%struct.monCommand = type { i32 }
define i32 @mon_addcommand(%struct.monCommand* %0, i8* %1) {
%3 = alloca %struct.monCommand*
%4 = alloca i8*
%5 = alloca i32
store %struct.monCommand* %0, %struct.monCommand** %3
store i8* %1, i8** %4
%6 = call i32 (...) @monLock()
%7 = load %struct.monCommand*, %struct.monCommand** %3
%8 = load i8*, i8** %4
%9 = call i32 @_addcommand(%struct.monCommand* %7, i8* %8)
store i32 %9, i32* %5
%10 = call i32 (...) @monUnlock()
%11 = load i32, i32* %5
ret i32 %11
}

LLVM IR (-O2):
%struct.monCommand = type { i32 }
define i32 @mon_addcommand(%struct.monCommand* %0, i8* %1) {
%3 = tail call i32 (...) @monLock()
%4 = tail call i32 @_addcommand(%struct.monCommand* %0, i8* %1)
%5 = tail call i32 (...) @monUnlock()
ret i32 %4
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int /*<<< orphan*/ int8_t;

/* Variables and functions */
int /*<<< orphan*/ hd44780_display_on_off_control(int /*<<< orphan*/);
int8_t dmd_ctrl_display(uint8_t control) {
  return (hd44780_display_on_off_control(control));
}


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

x86 assembly (clang, -O2):
<dmd_ctrl_display>:
jmp    1030 <hd44780_display_on_off_control@plt>

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

LLVM IR (-O2):
define i32 @dmd_ctrl_display(i32 %0) {
%2 = tail call i32 @hd44780_display_on_off_control(i32 %0)
ret i32 %2
}
void GB_ISGT_f_FP32(float *z, const float *x, const float *y) {
  (*z) = ((*x) > (*y));
}


x86 assembly (clang, -O0):
<GB_ISGT_f_FP32>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x10(%rbp),%rax
movss  (%rax),%xmm0
mov    -0x18(%rbp),%rax
ucomiss (%rax),%xmm0
seta   %al
and    $0x1,%al
movzbl %al,%eax
cvtsi2ss %eax,%xmm0
mov    -0x8(%rbp),%rax
movss  %xmm0,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<GB_ISGT_f_FP32>:
movss  (%rdx),%xmm0
cmpltss (%rsi),%xmm0
movss  0xeef(%rip),%xmm1
andps  %xmm0,%xmm1
movss  %xmm1,(%rdi)
ret

LLVM IR (-O0):
define void @GB_ISGT_f_FP32(float* %0, float* %1, float* %2) {
%4 = alloca float*
%5 = alloca float*
%6 = alloca float*
store float* %0, float** %4
store float* %1, float** %5
store float* %2, float** %6
%7 = load float*, float** %5
%8 = load float, float* %7
%9 = load float*, float** %6
%10 = load float, float* %9
%11 = fcmp ogt float %8, %10
%12 = zext i1 %11 to i32
%13 = sitofp i32 %12 to float
%14 = load float*, float** %4
store float %13, float* %14
ret void
}

LLVM IR (-O2):
define void @GB_ISGT_f_FP32(float* nocapture writeonly %0, float* nocapture %1, float* nocapture %2) {
%4 = load float, float* %1
%5 = load float, float* %2
%6 = fcmp ogt float %4, %5
%7 = uitofp i1 %6 to float
store float %7, float* %0
ret void
}
int has_feat_debug(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @has_feat_debug() {
ret i32 0
}
__attribute__((always_)) void copy_from_user_page(struct vm_area_struct *vma,
                                                  struct page *page,
                                                  unsigned long vaddr,
                                                  void *dst, const void *src,
                                                  unsigned long len) {
  __builtin_memcpy(dst, src, len);
}


x86 assembly (clang, -O0):
<copy_from_user_page>:
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    %r9,-0x30(%rbp)
mov    -0x20(%rbp),%rdi
mov    -0x28(%rbp),%rsi
mov    -0x30(%rbp),%rdx
call   1030 <memcpy@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<copy_from_user_page>:
mov    %r9,%rdx
mov    %r8,%rsi
mov    %rcx,%rdi
jmp    1030 <memcpy@plt>

LLVM IR (-O0):
%struct.vm_area_struct = type opaque
%struct.page = type opaque
define void @copy_from_user_page(%struct.vm_area_struct* %0, %struct.page* %1, i64 %2, i8* %3, i8* %4, i64 %5) {
%7 = alloca %struct.vm_area_struct*
%8 = alloca %struct.page*
%9 = alloca i64
%10 = alloca i8*
%11 = alloca i8*
%12 = alloca i64
store %struct.vm_area_struct* %0, %struct.vm_area_struct** %7
store %struct.page* %1, %struct.page** %8
store i64 %2, i64* %9
store i8* %3, i8** %10
store i8* %4, i8** %11
store i64 %5, i64* %12
%13 = load i8*, i8** %10
%14 = load i8*, i8** %11
%15 = load i64, i64* %12
ret void
}

LLVM IR (-O2):
%struct.vm_area_struct = type opaque
%struct.page = type opaque
define void @copy_from_user_page(%struct.vm_area_struct* nocapture readnone %0, %struct.page* nocapture readnone %1, i64 %2, i8* nocapture writeonly %3, i8* nocapture %4, i64 %5) {
tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 1 %3, i8* align 1 %4, i64 %5, i1 false)
ret void
}
void subr(int *a) {
#pragma acc data deviceptr(a)
#pragma acc parallel
  a[0] += 1.0;
}


x86 assembly (clang, -O0):
<subr>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
cvtsi2sdl (%rax),%xmm0
movsd  0xee8(%rip),%xmm1
addsd  %xmm1,%xmm0
cvttsd2si %xmm0,%ecx
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<subr>:
addl   $0x1,(%rdi)
ret

LLVM IR (-O0):
define void @subr(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = getelementptr inbounds i32, i32* %3, i64 0
%5 = load i32, i32* %4
%6 = sitofp i32 %5 to double
%7 = fadd double %6, 1.000000e+00
%8 = fptosi double %7 to i32
store i32 %8, i32* %4
ret void
}

LLVM IR (-O2):
define void @subr(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = add i32 %2, 1
store i32 %3, i32* %0
ret void
}
int f(int s, int c) {
  int a1, a2, a3, x1, x2, x3, x;
  a1 = 2 * s;
  x1 = c + a1;
  a2 = 4 * s;
  x2 = c + a2;
  a3 = 6 * s;
  x3 = c + a3;
  x = x1 + x2 + x3;
  return x;
}


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
shl    $0x1,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
add    -0xc(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x4(%rbp),%eax
shl    $0x2,%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%eax
add    -0x10(%rbp),%eax
mov    %eax,-0x1c(%rbp)
imul   $0x6,-0x4(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%eax
add    -0x14(%rbp),%eax
mov    %eax,-0x20(%rbp)
mov    -0x18(%rbp),%eax
add    -0x1c(%rbp),%eax
add    -0x20(%rbp),%eax
mov    %eax,-0x24(%rbp)
mov    -0x24(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<f>:
lea    (%rsi,%rsi,2),%eax
lea    (%rdi,%rdi,2),%ecx
lea    (%rax,%rcx,4),%eax
ret

LLVM IR (-O0):
define i32 @f(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%12 = load i32, i32* %3
%13 = mul nsw i32 2, %12
store i32 %13, i32* %5
%14 = load i32, i32* %4
%15 = load i32, i32* %5
%16 = add nsw i32 %14, %15
store i32 %16, i32* %8
%17 = load i32, i32* %3
%18 = mul nsw i32 4, %17
store i32 %18, i32* %6
%19 = load i32, i32* %4
%20 = load i32, i32* %6
%21 = add nsw i32 %19, %20
store i32 %21, i32* %9
%22 = load i32, i32* %3
%23 = mul nsw i32 6, %22
store i32 %23, i32* %7
%24 = load i32, i32* %4
%25 = load i32, i32* %7
%26 = add nsw i32 %24, %25
store i32 %26, i32* %10
%27 = load i32, i32* %8
%28 = load i32, i32* %9
%29 = add nsw i32 %27, %28
%30 = load i32, i32* %10
%31 = add nsw i32 %29, %30
store i32 %31, i32* %11
%32 = load i32, i32* %11
ret i32 %32
}

LLVM IR (-O2):
define i32 @f(i32 %0, i32 %1) {
%3 = mul i32 %1, 3
%4 = mul i32 %0, 12
%5 = add i32 %3, %4
ret i32 %5
}
__attribute__((no, noclone)) signed __int128 t111_3sub(signed __int128 y) {
  signed __int128 r;
  if (__builtin_sub_overflow(
          (signed __int128)((
              (signed __int128)(((unsigned __int128)1 << (16 * 8 - 1)) - 1))),
          y, &r))
    bar();
  return r;
}


x86 assembly (clang, -O0):
<t111_3sub>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %rdi,-0x20(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x20(%rbp),%rax
mov    -0x18(%rbp),%rcx
mov    %rcx,-0x28(%rbp)
mov    %rax,-0x30(%rbp)
mov    -0x30(%rbp),%rcx
mov    -0x28(%rbp),%rax
movabs $0x7fffffffffffffff,%rdx
ff ff 7f
sub    %rax,%rdx
seto   %al
not    %rcx
mov    %rdx,-0x38(%rbp)
mov    %rcx,-0x40(%rbp)
test   $0x1,%al
jne    1160 <t111_3sub+0x50>
jmp    1167 <t111_3sub+0x57>
mov    $0x0,%al
call   1030 <bar@plt>
mov    -0x40(%rbp),%rax
mov    -0x38(%rbp),%rcx
mov    %rcx,-0x8(%rbp)
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    -0x8(%rbp),%rdx
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<t111_3sub>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
not    %r14
movabs $0x7fffffffffffffff,%rbx
ff ff 7f
sub    %rsi,%rbx
jno    1130 <t111_3sub+0x20>
xor    %eax,%eax
call   1030 <bar@plt>
mov    %r14,%rax
mov    %rbx,%rdx
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define { i64, i64 } @t111_3sub(i64 %0, i64 %1) {
%3 = alloca i128
%4 = alloca i128
%5 = alloca i128
%6 = alloca i128
%7 = bitcast i128* %4 to { i64, i64 }*
%8 = getelementptr inbounds { i64, i64 }, { i64, i64 }* %7, i32 0, i32 0
store i64 %0, i64* %8
%9 = getelementptr inbounds { i64, i64 }, { i64, i64 }* %7, i32 0, i32 1
store i64 %1, i64* %9
%10 = load i128, i128* %4
store i128 %10, i128* %5
%11 = load i128, i128* %5
%12 = call { i128, i1 } @llvm.ssub.with.overflow.i128(i128 170141183460469231731687303715884105727, i128 %11)
%13 = extractvalue { i128, i1 } %12, 1
%14 = extractvalue { i128, i1 } %12, 0
store i128 %14, i128* %6
br i1 %13, label %15, label %17
15: ; preds = %2
%16 = call i32 (...) @bar()
br label %17
17: ; preds = %15, %2
%18 = load i128, i128* %6
store i128 %18, i128* %3
%19 = bitcast i128* %3 to { i64, i64 }*
%20 = load { i64, i64 }, { i64, i64 }* %19
ret { i64, i64 } %20
}

LLVM IR (-O2):
define { i64, i64 } @t111_3sub(i64 %0, i64 %1) {
%3 = zext i64 %1 to i128
%4 = shl nuw i128 %3, 64
%5 = zext i64 %0 to i128
%6 = or i128 %4, %5
%7 = tail call { i128, i1 } @llvm.ssub.with.overflow.i128(i128 170141183460469231731687303715884105727, i128 %6)
%8 = extractvalue { i128, i1 } %7, 1
%9 = extractvalue { i128, i1 } %7, 0
br i1 %8, label %10, label %12
10: ; preds = %2
%11 = tail call i32 (...) @bar()
br label %12
12: ; preds = %10, %2
%13 = trunc i128 %9 to i64
%14 = lshr i128 %9, 64
%15 = trunc i128 %14 to i64
%16 = insertvalue { i64, i64 } poison, i64 %13, 0
%17 = insertvalue { i64, i64 } %16, i64 %15, 1
ret { i64, i64 } %17
}
unsigned long print_queue_status() { return 0; }


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

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

LLVM IR (-O0):
define i64 @print_queue_status() {
ret i64 0
}

LLVM IR (-O2):
define i64 @print_queue_status() {
ret i64 0
}
void gtk_tree_view_column_new() {}


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

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

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

LLVM IR (-O2):
define void @gtk_tree_view_column_new() {
ret void
}
/* Variables and functions */
int do_it(char);
int /*<<< orphan*/ print_menu();
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ scanf(char *, char *);
void menu() {
  int done = 0;
  char choice;
  while (!done) {
    print_menu();
    scanf(" %c", &choice);
    printf("\n\n");
    done = do_it(choice);
  }
}


x86 assembly (clang, -O0):
<menu>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
setne  %al
xor    $0xff,%al
test   $0x1,%al
jne    1165 <menu+0x25>
jmp    1199 <menu+0x59>
mov    $0x0,%al
call   1040 <print_menu@plt>
lea    0xe8d(%rip),%rdi
lea    -0x5(%rbp),%rsi
call   1060 <scanf@plt>
lea    0xe81(%rip),%rdi
call   1030 <printf@plt>
movsbl -0x5(%rbp),%edi
call   1050 <do_it@plt>
mov    %eax,-0x4(%rbp)
jmp    114f <menu+0xf>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<menu>:
push   %r15
push   %r14
push   %rbx
sub    $0x10,%rsp
lea    0xeb0(%rip),%r14
lea    0xf(%rsp),%r15
lea    0xea8(%rip),%rbx
nopl   0x0(%rax)
xor    %eax,%eax
call   1040 <print_menu@plt>
mov    %r14,%rdi
mov    %r15,%rsi
call   1060 <scanf@plt>
mov    %rbx,%rdi
call   1030 <puts@plt>
movsbl 0xf(%rsp),%edi
call   1050 <do_it@plt>
test   %eax,%eax
je     1160 <menu+0x20>
add    $0x10,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c" %c\00"
@str = [2 x i8] c"\0A\00"
define void @menu() {
%1 = alloca i8
br label %2
2: ; preds = %0, %2
%3 = call i32 (...) @print_menu()
%4 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %1)
%5 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([2 x i8], [2 x i8]* @str, i64 0, i64 0))
%6 = load i8, i8* %1
%7 = call i32 @do_it(i8 signext %6)
%8 = icmp eq i32 %7, 0
br i1 %8, label %2, label %9
9: ; preds = %2
ret void
}
double JHKeyframeAnimationFunctionEaseOutQuart(double t, double b, double c,
                                               double d) {
  return -c * ((t = t / d - 1) * t * t * t - 1) + b;
}


x86 assembly (clang, -O0):
<JHKeyframeAnimationFunctionEaseOutQuart>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  %xmm3,-0x20(%rbp)
movsd  -0x18(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  -0x8(%rbp),%xmm2
divsd  -0x20(%rbp),%xmm2
movsd  0xec2(%rip),%xmm1
subsd  %xmm1,%xmm2
movsd  %xmm2,-0x8(%rbp)
mulsd  -0x8(%rbp),%xmm2
mulsd  -0x8(%rbp),%xmm2
movsd  -0x8(%rbp),%xmm1
mulsd  %xmm1,%xmm2
movsd  0xe96(%rip),%xmm1
addsd  %xmm1,%xmm2
movsd  -0x10(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<JHKeyframeAnimationFunctionEaseOutQuart>:
divsd  %xmm3,%xmm0
movsd  0xef4(%rip),%xmm3
addsd  %xmm3,%xmm0
movapd %xmm0,%xmm4
mulsd  %xmm0,%xmm4
mulsd  %xmm0,%xmm4
mulsd  %xmm0,%xmm4
addsd  %xmm3,%xmm4
mulsd  %xmm2,%xmm4
subsd  %xmm4,%xmm1
movapd %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @JHKeyframeAnimationFunctionEaseOutQuart(double %0, double %1, double %2, double %3) {
%5 = alloca double
%6 = alloca double
%7 = alloca double
%8 = alloca double
store double %0, double* %5
store double %1, double* %6
store double %2, double* %7
store double %3, double* %8
%9 = load double, double* %7
%10 = fneg double %9
%11 = load double, double* %5
%12 = load double, double* %8
%13 = fdiv double %11, %12
%14 = fsub double %13, 1.000000e+00
store double %14, double* %5
%15 = load double, double* %5
%16 = fmul double %14, %15
%17 = load double, double* %5
%18 = fmul double %16, %17
%19 = load double, double* %5
%20 = call double @llvm.fmuladd.f64(double %18, double %19, double -1.000000e+00)
%21 = load double, double* %6
%22 = call double @llvm.fmuladd.f64(double %10, double %20, double %21)
ret double %22
}

LLVM IR (-O2):
define double @JHKeyframeAnimationFunctionEaseOutQuart(double %0, double %1, double %2, double %3) {
%5 = fneg double %2
%6 = fdiv double %0, %3
%7 = fadd double %6, -1.000000e+00
%8 = fmul double %7, %7
%9 = fmul double %7, %8
%10 = tail call double @llvm.fmuladd.f64(double %9, double %7, double -1.000000e+00)
%11 = tail call double @llvm.fmuladd.f64(double %5, double %10, double %1)
ret double %11
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int EXIT_SUCCESS;
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, char const *);
int /*<<< orphan*/ *stderr;
int /*<<< orphan*/ *stdout;
void helpAndLeave(const char *progname, int status) {
  FILE *stream = stderr;
  if (status == EXIT_SUCCESS) {
    stream = stdout;
  }
  fprintf(stream, "Usage: %s [num_its]\n", progname);
  exit(status);
}


x86 assembly (clang, -O0):
<helpAndLeave>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    0x2eaa(%rip),%rax
mov    (%rax),%rax
mov    %rax,-0x18(%rbp)
mov    -0xc(%rbp),%eax
mov    0x2e89(%rip),%rcx
cmp    (%rcx),%eax
jne    115d <helpAndLeave+0x3d>
mov    0x2e82(%rip),%rax
mov    (%rax),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x8(%rbp),%rdx
lea    0xe94(%rip),%rsi
call   1030 <fprintf@plt>
mov    -0xc(%rbp),%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<helpAndLeave>:
push   %rbx
mov    %esi,%ebx
mov    %rdi,%rdx
mov    0x2ea3(%rip),%rax
cmp    %esi,(%rax)
jne    113a <helpAndLeave+0x1a>
mov    0x2ea0(%rip),%rax
jmp    1141 <helpAndLeave+0x21>
mov    0x2e9f(%rip),%rax
mov    (%rax),%rdi
lea    0xeb5(%rip),%rsi
call   1030 <fprintf@plt>
mov    %ebx,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32* null
@EXIT_SUCCESS = global i32 0
@stdout = global i32* null
@.str = [21 x i8] c"Usage: %s [num_its]\0A\00"
define void @helpAndLeave(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** @stderr
store i32* %6, i32** %5
%7 = load i32, i32* %4
%8 = load i32, i32* @EXIT_SUCCESS
%9 = icmp eq i32 %7, %8
br i1 %9, label %10, label %12
10: ; preds = %2
%11 = load i32*, i32** @stdout
store i32* %11, i32** %5
br label %12
12: ; preds = %10, %2
%13 = load i32*, i32** %5
%14 = load i8*, i8** %3
%15 = call i32 @fprintf(i32* %13, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i8* %14)
%16 = load i32, i32* %4
%17 = call i32 @exit(i32 %16)
unreachable
}

LLVM IR (-O2):
@stderr = global i32* null
@EXIT_SUCCESS = global i32 0
@stdout = global i32* null
@.str = [21 x i8] c"Usage: %s [num_its]\0A\00"
define void @helpAndLeave(i8* %0, i32 %1) {
%3 = load i32, i32* @EXIT_SUCCESS
%4 = icmp eq i32 %3, %1
%5 = load i32*, i32** @stdout
%6 = load i32*, i32** @stderr
%7 = select i1 %4, i32* %5, i32* %6
%8 = tail call i32 @fprintf(i32* %7, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i8* %0)
%9 = tail call i32 @exit(i32 %1)
unreachable
}
/* Variables and functions */
int rand();
void randomize(int a[]) {
  int i;
  for (i = 0; i < 1024; i++)
    a[i] = (rand() << 16);
}


x86 assembly (clang, -O0):
<randomize>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x400,-0xc(%rbp)
jge    1155 <randomize+0x45>
mov    $0x0,%al
call   1030 <rand@plt>
mov    %eax,%edx
shl    $0x10,%edx
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1123 <randomize+0x13>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<randomize>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
xor    %ebx,%ebx
nopl   0x0(%rax)
xor    %eax,%eax
call   1030 <rand@plt>
shl    $0x10,%eax
mov    %eax,(%r14,%rbx,4)
add    $0x1,%rbx
cmp    $0x400,%rbx
jne    1120 <randomize+0x10>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define void @randomize(i32* %0) {
%2 = alloca i32*
%3 = alloca i32
store i32* %0, i32** %2
store i32 0, i32* %3
br label %4
4: ; preds = %14, %1
%5 = load i32, i32* %3
%6 = icmp slt i32 %5, 1024
br i1 %6, label %7, label %17
7: ; preds = %4
%8 = call i32 (...) @rand()
%9 = shl i32 %8, 16
%10 = load i32*, i32** %2
%11 = load i32, i32* %3
%12 = sext i32 %11 to i64
%13 = getelementptr inbounds i32, i32* %10, i64 %12
store i32 %9, i32* %13
br label %14
14: ; preds = %7
%15 = load i32, i32* %3
%16 = add nsw i32 %15, 1
store i32 %16, i32* %3
br label %4
17: ; preds = %4
ret void
}

LLVM IR (-O2):
define void @randomize(i32* nocapture writeonly %0) {
br label %2
2: ; preds = %1, %2
%3 = phi i64 [ 0, %1 ], [ %7, %2 ]
%4 = tail call i32 (...) @rand()
%5 = shl i32 %4, 16
%6 = getelementptr inbounds i32, i32* %0, i64 %3
store i32 %5, i32* %6
%7 = add nuw nsw i64 %3, 1
%8 = icmp eq i64 %7, 1024
br i1 %8, label %9, label %2
9: ; preds = %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char const *, char *);
void libsfp_printname_default(void *udata, const char *name) {
  printf("%-32s %s", name, ": ");
}


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

x86 assembly (clang, -O2):
<libsfp_printname_default>:
lea    0xee9(%rip),%rdi
lea    0xeeb(%rip),%rdx
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [9 x i8] c"%-32s %s\00"
@.str.1 = [3 x i8] c": \00"
define void @libsfp_printname_default(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %4
%6 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i8* %5, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [9 x i8] c"%-32s %s\00"
@.str.1 = [3 x i8] c": \00"
define void @libsfp_printname_default(i8* nocapture readnone %0, i8* %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i8* %1, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ _exit(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, int);
int /*<<< orphan*/ stderr;
int vfork();
int main() {
  int r = vfork();
  fprintf(stderr, "vfork():%d\n", r);
  _exit(0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
call   1050 <vfork@plt>
mov    %eax,-0x8(%rbp)
mov    0x2e92(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%edx
lea    0xea6(%rip),%rsi
call   1040 <fprintf@plt>
xor    %edi,%edi
call   1030 <_exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rax
call   1050 <vfork@plt>
mov    0x2ea3(%rip),%rcx
mov    (%rcx),%edi
lea    0xeba(%rip),%rsi
mov    %eax,%edx
call   1040 <fprintf@plt>
xor    %edi,%edi
call   1030 <_exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [12 x i8] c"vfork():%d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
%3 = call i32 @vfork()
store i32 %3, i32* %2
%4 = load i32, i32* @stderr
%5 = load i32, i32* %2
%6 = call i32 @fprintf(i32 %4, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 %5)
%7 = call i32 @_exit(i32 0)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [12 x i8] c"vfork():%d\0A\00"
define i32 @main() {
%1 = call i32 @vfork()
%2 = load i32, i32* @stderr
%3 = call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 %1)
%4 = call i32 @_exit(i32 0)
unreachable
}
/* Variables and functions */
int EXIT_SUCCESS;
int /*<<< orphan*/ init(int *, char ***);
int main(int argc, char **argv) {
  init(&argc, &argv);
  return EXIT_SUCCESS;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    -0x8(%rbp),%rdi
lea    -0x10(%rbp),%rsi
call   1030 <init@plt>
mov    0x2ea6(%rip),%rax
mov    (%rax),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
mov    %edi,0xc(%rsp)
mov    %rsi,0x10(%rsp)
lea    0xc(%rsp),%rdi
lea    0x10(%rsp),%rsi
call   1030 <init@plt>
mov    0x2ead(%rip),%rax
mov    (%rax),%eax
add    $0x18,%rsp
ret

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

LLVM IR (-O2):
@EXIT_SUCCESS = global i32 0
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
store i32 %0, i32* %3
store i8** %1, i8*** %4
%5 = call i32 @init(i32* %3, i8*** %4)
%6 = load i32, i32* @EXIT_SUCCESS
ret i32 %6
}
int is_blktrace(const char *fname, int *need_swap) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @is_blktrace(i8* nocapture readnone %0, i32* nocapture readnone %1) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main(int argc, char **argv) {
  printf("I am plain C.\n");
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [15 x i8] c"I am plain C.\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [14 x i8] c"I am plain C.\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int _rdpkru_u32();
unsigned extern rdpku_test(void) { return _rdpkru_u32(); }


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

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

LLVM IR (-O0):
define i32 @rdpku_test() {
%1 = call i32 (...) @_rdpkru_u32()
ret i32 %1
}

LLVM IR (-O2):
define i32 @rdpku_test() {
%1 = tail call i32 (...) @_rdpkru_u32()
ret i32 %1
}
unsigned int _hrt_align_down(unsigned int a, unsigned int b) {
  return a - (a % b);
}


x86 assembly (clang, -O0):
<_hrt_align_down>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x4(%rbp),%eax
xor    %edx,%edx
divl   -0x8(%rbp)
mov    -0xc(%rbp),%eax
sub    %edx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<_hrt_align_down>:
mov    %edi,%eax
xor    %edx,%edx
div    %esi
sub    %edx,%edi
mov    %edi,%eax
ret

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

LLVM IR (-O2):
define i32 @_hrt_align_down(i32 %0, i32 %1) {
%3 = urem i32 %0, %1
%4 = sub i32 %0, %3
ret i32 %4
}
void testClosureSBSrV(void (*closure)(short, char, short), short a1, char a2,
                      short a3) {
  (*closure)(a1, a2, a3);
}


x86 assembly (clang, -O0):
<testClosureSBSrV>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %cx,%ax
mov    %dl,%cl
mov    %si,%dx
mov    %rdi,-0x8(%rbp)
mov    %dx,-0xa(%rbp)
mov    %cl,-0xb(%rbp)
mov    %ax,-0xe(%rbp)
mov    -0x8(%rbp),%rax
mov    -0xa(%rbp),%dx
mov    -0xb(%rbp),%cl
movswl %dx,%edi
movsbl %cl,%esi
movswl -0xe(%rbp),%edx
call   *%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<testClosureSBSrV>:
mov    %rdi,%rax
mov    %esi,%edi
mov    %edx,%esi
mov    %ecx,%edx
jmp    *%rax

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

LLVM IR (-O2):
define void @testClosureSBSrV(void (i16, i8, i16)* nocapture %0, i16 signext %1, i8 signext %2, i16 signext %3) {
tail call void %0(i16 signext %1, i8 signext %2, i16 signext %3)
ret void
}
int stackFull() { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @stackFull() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ fflush(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ stdout;
void initArray2(void) {
  printf("initArray2\n");
  fflush(stdout);
}


x86 assembly (clang, -O0):
<initArray2>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
mov    0x2ea9(%rip),%rax
mov    (%rax),%edi
call   1040 <fflush@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<initArray2>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <puts@plt>
mov    0x2eac(%rip),%rax
mov    (%rax),%edi
pop    %rax
jmp    1040 <fflush@plt>

LLVM IR (-O0):
@.str = [12 x i8] c"initArray2\0A\00"
@stdout = global i32 0
define void @initArray2() {
%1 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
%2 = load i32, i32* @stdout
%3 = call i32 @fflush(i32 %2)
ret void
}

LLVM IR (-O2):
@stdout = global i32 0
@str = [11 x i8] c"initArray2\00"
define void @initArray2() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @str, i64 0, i64 0))
%2 = load i32, i32* @stdout
%3 = tail call i32 @fflush(i32 %2)
ret void
}
/* Variables and functions */
scalar_t__ malloc(size_t);
void *ft_memalloc(size_t size) {
  void *ptr;
  ptr = NULL;
  ptr = (void *)malloc(size);
  if (ptr == NULL)
    return (NULL);
  return (ptr);
}


x86 assembly (clang, -O0):
<ft_memalloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
movq   $0x0,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <malloc@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    1149 <ft_memalloc+0x39>
movq   $0x0,-0x8(%rbp)
jmp    1151 <ft_memalloc+0x41>
mov    -0x18(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_memalloc>:
jmp    1030 <malloc@plt>

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

LLVM IR (-O2):
define i8* @ft_memalloc(i64 %0) {
%2 = tail call i64 @malloc(i64 %0)
%3 = inttoptr i64 %2 to i8*
ret i8* %3
}
void testfunc_00(const short *ap, short *bp) {
  bp[100] = ap[15];
  bp[200] = ap[50];
  bp[900] = ap[71];
  bp[0] = ap[25];
}


x86 assembly (clang, -O0):
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    0x1e(%rax),%cx
mov    -0x10(%rbp),%rax
mov    %cx,0xc8(%rax)
mov    -0x8(%rbp),%rax
mov    0x64(%rax),%cx
mov    -0x10(%rbp),%rax
mov    %cx,0x190(%rax)
mov    -0x8(%rbp),%rax
mov    0x8e(%rax),%cx
mov    -0x10(%rbp),%rax
mov    %cx,0x708(%rax)
mov    -0x8(%rbp),%rax
mov    0x32(%rax),%cx
mov    -0x10(%rbp),%rax
mov    %cx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
movzwl 0x1e(%rdi),%eax
mov    %ax,0xc8(%rsi)
movzwl 0x64(%rdi),%eax
mov    %ax,0x190(%rsi)
movzwl 0x8e(%rdi),%eax
mov    %ax,0x708(%rsi)
movzwl 0x32(%rdi),%eax
mov    %ax,(%rsi)
ret

LLVM IR (-O0):
define void @testfunc_00(i16* %0, i16* %1) {
%3 = alloca i16*
%4 = alloca i16*
store i16* %0, i16** %3
store i16* %1, i16** %4
%5 = load i16*, i16** %3
%6 = getelementptr inbounds i16, i16* %5, i64 15
%7 = load i16, i16* %6
%8 = load i16*, i16** %4
%9 = getelementptr inbounds i16, i16* %8, i64 100
store i16 %7, i16* %9
%10 = load i16*, i16** %3
%11 = getelementptr inbounds i16, i16* %10, i64 50
%12 = load i16, i16* %11
%13 = load i16*, i16** %4
%14 = getelementptr inbounds i16, i16* %13, i64 200
store i16 %12, i16* %14
%15 = load i16*, i16** %3
%16 = getelementptr inbounds i16, i16* %15, i64 71
%17 = load i16, i16* %16
%18 = load i16*, i16** %4
%19 = getelementptr inbounds i16, i16* %18, i64 900
store i16 %17, i16* %19
%20 = load i16*, i16** %3
%21 = getelementptr inbounds i16, i16* %20, i64 25
%22 = load i16, i16* %21
%23 = load i16*, i16** %4
%24 = getelementptr inbounds i16, i16* %23, i64 0
store i16 %22, i16* %24
ret void
}

LLVM IR (-O2):
define void @testfunc_00(i16* nocapture %0, i16* nocapture writeonly %1) {
%3 = getelementptr inbounds i16, i16* %0, i64 15
%4 = load i16, i16* %3
%5 = getelementptr inbounds i16, i16* %1, i64 100
store i16 %4, i16* %5
%6 = getelementptr inbounds i16, i16* %0, i64 50
%7 = load i16, i16* %6
%8 = getelementptr inbounds i16, i16* %1, i64 200
store i16 %7, i16* %8
%9 = getelementptr inbounds i16, i16* %0, i64 71
%10 = load i16, i16* %9
%11 = getelementptr inbounds i16, i16* %1, i64 900
store i16 %10, i16* %11
%12 = getelementptr inbounds i16, i16* %0, i64 25
%13 = load i16, i16* %12
store i16 %13, i16* %1
ret void
}
short union_ok(int *param) {
  union {
    int *a;
    short *b;
  } u;
  u.a = param;
  short *p = u.b;
  return *p;
}


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

x86 assembly (clang, -O2):
<union_ok>:
movzwl (%rdi),%eax
ret

LLVM IR (-O0):
%union.anon = type { i32* }
define signext i16 @union_ok(i32* %0) {
%2 = alloca i32*
%3 = alloca %union.anon
%4 = alloca i16*
store i32* %0, i32** %2
%5 = load i32*, i32** %2
%6 = bitcast %union.anon* %3 to i32**
store i32* %5, i32** %6
%7 = bitcast %union.anon* %3 to i16**
%8 = load i16*, i16** %7
store i16* %8, i16** %4
%9 = load i16*, i16** %4
%10 = load i16, i16* %9
ret i16 %10
}

LLVM IR (-O2):
define signext i16 @union_ok(i32* nocapture %0) {
%2 = bitcast i32* %0 to i16*
%3 = load i16, i16* %2
ret i16 %3
}
/* Variables and functions */
int foo(int, int);
int /*<<< orphan*/ printf(char *);
int main(void) {
  int res;
  res = foo(44, 22);
  if (res >= 0) {
    printf("Hello world!\n");
  } else {
    printf("Will never show up.\n");
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x2c,%edi
mov    $0x16,%esi
call   1040 <foo@plt>
mov    %eax,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jl     115c <main+0x3c>
lea    0xeae(%rip),%rdi
call   1030 <printf@plt>
jmp    1168 <main+0x48>
lea    0xeab(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x2c,%edi
mov    $0x16,%esi
call   1040 <foo@plt>
test   %eax,%eax
lea    0xedb(%rip),%rax
lea    0xec0(%rip),%rdi
cmovns %rax,%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [14 x i8] c"Hello world!\0A\00"
@.str.1 = [21 x i8] c"Will never show up.\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
%3 = call i32 @foo(i32 44, i32 22)
store i32 %3, i32* %2
%4 = load i32, i32* %2
%5 = icmp sge i32 %4, 0
br i1 %5, label %6, label %8
6: ; preds = %0
%7 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
br label %10
8: ; preds = %0
%9 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.1, i64 0, i64 0))
br label %10
10: ; preds = %8, %6
ret i32 0
}

LLVM IR (-O2):
@str = [20 x i8] c"Will never show up.\00"
@str.2 = [13 x i8] c"Hello world!\00"
define i32 @main() {
%1 = tail call i32 @foo(i32 44, i32 22)
%2 = icmp sgt i32 %1, -1
%3 = select i1 %2, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @str.2, i64 0, i64 0), i8* getelementptr inbounds ([20 x i8], [20 x i8]* @str, i64 0, i64 0)
%4 = tail call i32 @puts(i8* dereferenceable(1) %3)
ret i32 0
}
/* Type definitions */
typedef unsigned long long __u64;

/* Variables and functions */
__u64 hea_get_u64_bits(__u64 val, int start, int end) {
  return ((((__u64)(val)) & ((~0ULL << (63 - (end))) & (~0ULL >> (start)))) >>
          (63 - (end)));
}


x86 assembly (clang, -O0):
<hea_get_u64_bits>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    $0x3f,%ecx
sub    -0x10(%rbp),%ecx
mov    %ecx,%ecx
mov    $0xffffffffffffffff,%rdx
shl    %cl,%rdx
mov    %rdx,-0x18(%rbp)
mov    -0xc(%rbp),%ecx
mov    $0xffffffffffffffff,%rdx
shr    %cl,%rdx
mov    -0x18(%rbp),%rcx
and    %rdx,%rcx
and    %rcx,%rax
mov    $0x3f,%ecx
sub    -0x10(%rbp),%ecx
mov    %ecx,%ecx
shr    %cl,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<hea_get_u64_bits>:
mov    %esi,%ecx
mov    %rdi,%rax
shl    %cl,%rax
mov    $0x3f,%sil
shr    %cl,%rax
sub    %dl,%sil
mov    %esi,%ecx
shr    %cl,%rax
shl    %cl,%rax
shr    %cl,%rax
ret

LLVM IR (-O0):
define i64 @hea_get_u64_bits(i64 %0, i32 %1, i32 %2) {
%4 = alloca i64
%5 = alloca i32
%6 = alloca i32
store i64 %0, i64* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load i64, i64* %4
%8 = load i32, i32* %6
%9 = sub nsw i32 63, %8
%10 = zext i32 %9 to i64
%11 = shl i64 -1, %10
%12 = load i32, i32* %5
%13 = zext i32 %12 to i64
%14 = lshr i64 -1, %13
%15 = and i64 %11, %14
%16 = and i64 %7, %15
%17 = load i32, i32* %6
%18 = sub nsw i32 63, %17
%19 = zext i32 %18 to i64
%20 = lshr i64 %16, %19
ret i64 %20
}

LLVM IR (-O2):
define i64 @hea_get_u64_bits(i64 %0, i32 %1, i32 %2) {
%4 = sub nsw i32 63, %2
%5 = zext i32 %4 to i64
%6 = shl nsw i64 -1, %5
%7 = zext i32 %1 to i64
%8 = lshr i64 -1, %7
%9 = and i64 %8, %0
%10 = and i64 %9, %6
%11 = lshr i64 %10, %5
ret i64 %11
}
void gfx_set_clip_region(int tx, int ty, int bx, int by) {}


x86 assembly (clang, -O0):
<gfx_set_clip_region>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @gfx_set_clip_region(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i32 %0, i32* %5
store i32 %1, i32* %6
store i32 %2, i32* %7
store i32 %3, i32* %8
ret void
}

LLVM IR (-O2):
define void @gfx_set_clip_region(i32 %0, i32 %1, i32 %2, i32 %3) {
ret void
}
/* Type definitions */
typedef int int64_t;

/* Variables and functions */
int64_t parse_int64t(const char *source, char end_char) {
  int64_t ret = 0;
  while (*source != end_char) {
    ret = ret * 10 + (*source - '0');
    source++;
  }
  return ret;
}


x86 assembly (clang, -O0):
<parse_int64t>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %rdi,-0x8(%rbp)
mov    %al,-0x9(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
movsbl -0x9(%rbp),%ecx
cmp    %ecx,%eax
je     114c <parse_int64t+0x4c>
imul   $0xa,-0x10(%rbp),%eax
mov    -0x8(%rbp),%rcx
movsbl (%rcx),%ecx
sub    $0x30,%ecx
add    %ecx,%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    1115 <parse_int64t+0x15>
mov    -0x10(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<parse_int64t>:
mov    (%rdi),%cl
xor    %eax,%eax
cmp    %sil,%cl
je     1128 <parse_int64t+0x28>
add    $0x1,%rdi
xor    %eax,%eax
nop
movsbl %cl,%ecx
lea    (%rax,%rax,4),%eax
lea    (%rcx,%rax,2),%eax
add    $0xffffffd0,%eax
movzbl (%rdi),%ecx
add    $0x1,%rdi
cmp    %sil,%cl
jne    1110 <parse_int64t+0x10>
ret

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

LLVM IR (-O2):
define i32 @parse_int64t(i8* nocapture %0, i8 signext %1) {
%3 = load i8, i8* %0
%4 = icmp eq i8 %3, %1
br i1 %4, label %16, label %5
5: ; preds = %2, %5
%6 = phi i8 [ %14, %5 ], [ %3, %2 ]
%7 = phi i32 [ %12, %5 ], [ 0, %2 ]
%8 = phi i8* [ %13, %5 ], [ %0, %2 ]
%9 = sext i8 %6 to i32
%10 = mul nsw i32 %7, 10
%11 = add i32 %10, -48
%12 = add i32 %11, %9
%13 = getelementptr inbounds i8, i8* %8, i64 1
%14 = load i8, i8* %13
%15 = icmp eq i8 %14, %1
br i1 %15, label %16, label %5
16: ; preds = %5, %2
%17 = phi i32 [ 0, %2 ], [ %12, %5 ]
ret i32 %17
}
int main() {
  int i = 3;
  int *j;
  int **k;
  j = &i;
  k = &j;
  printf("%u %u %d \n", k, *k, **k);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x3,-0x8(%rbp)
lea    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
lea    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rsi
mov    -0x18(%rbp),%rax
mov    (%rax),%rdx
mov    -0x18(%rbp),%rax
mov    (%rax),%rax
mov    (%rax),%ecx
lea    0xeaf(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
movl   $0x3,0xc(%rsp)
lea    0xc(%rsp),%rdx
mov    %rdx,0x10(%rsp)
lea    0xed3(%rip),%rdi
lea    0x10(%rsp),%rsi
mov    $0x3,%ecx
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

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

LLVM IR (-O2):
@.str = [11 x i8] c"%u %u %d \0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32*
%3 = bitcast i32* %1 to i8*
store i32 3, i32* %1
%4 = bitcast i32** %2 to i8*
store i32* %1, i32** %2
%5 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i32** %2, i32* %1, i32 3)
ret i32 0
}
f() {
  struct {
    int x : 18;
    int y : 14;
  } foo;
  foo.x = 10;
  foo.y = 20;
  return foo.y;
}


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
mov    -0x8(%rbp),%eax
and    $0xfffc0000,%eax
or     $0xa,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
and    $0x3ffff,%eax
or     $0x500000,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
sar    $0x12,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.anon = type { i32 }
define i32 @f() {
%1 = alloca %struct.anon
%2 = bitcast %struct.anon* %1 to i32*
%3 = load i32, i32* %2
%4 = and i32 %3, -262144
%5 = or i32 %4, 10
store i32 %5, i32* %2
%6 = bitcast %struct.anon* %1 to i32*
%7 = load i32, i32* %6
%8 = and i32 %7, 262143
%9 = or i32 %8, 5242880
store i32 %9, i32* %6
%10 = bitcast %struct.anon* %1 to i32*
%11 = load i32, i32* %10
%12 = ashr i32 %11, 18
ret i32 %12
}

LLVM IR (-O2):
define i32 @f() {
ret i32 20
}
__attribute__((unused)) void compiletime_assert_unsignedsize(int h) {
  switch (h) {
  case 0:
  case (sizeof(unsigned) == 4): {
  }
  }
}


x86 assembly (clang, -O0):
<compiletime_assert_unsignedsize>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
sub    $0x1,%eax
ja     111d <compiletime_assert_unsignedsize+0x1d>
jmp    1118 <compiletime_assert_unsignedsize+0x18>
jmp    111d <compiletime_assert_unsignedsize+0x1d>
pop    %rbp
ret

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

LLVM IR (-O0):
define void @compiletime_assert_unsignedsize(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
switch i32 %3, label %5 [
i32 0, label %4
i32 1, label %4
]
4: ; preds = %1, %1
br label %5
5: ; preds = %4, %1
ret void
}

LLVM IR (-O2):
define void @compiletime_assert_unsignedsize(i32 %0) {
ret void
}