xunge/DecIR huggingface dataset:
/* Type definitions */
typedef int uint8_t;
typedef int uint32_t;

/* Variables and functions */
uint32_t unpad(uint8_t *data, uint32_t data_len) {
  return data_len - data[data_len - 1];
}


x86 assembly (clang, -O0):
<unpad>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    -0x8(%rbp),%rcx
mov    -0xc(%rbp),%edx
sub    $0x1,%edx
movslq %edx,%rdx
sub    (%rcx,%rdx,4),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<unpad>:
movslq %esi,%rax
mov    -0x4(%rdi,%rax,4),%ecx
sub    %ecx,%eax
ret

LLVM IR (-O0):
define i32 @unpad(i32* %0, i32 %1) {
%3 = alloca i32*
%4 = alloca i32
store i32* %0, i32** %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = load i32*, i32** %3
%7 = load i32, i32* %4
%8 = sub nsw i32 %7, 1
%9 = sext i32 %8 to i64
%10 = getelementptr inbounds i32, i32* %6, i64 %9
%11 = load i32, i32* %10
%12 = sub nsw i32 %5, %11
ret i32 %12
}

LLVM IR (-O2):
define i32 @unpad(i32* nocapture %0, i32 %1) {
%3 = add nsw i32 %1, -1
%4 = sext i32 %3 to i64
%5 = getelementptr inbounds i32, i32* %0, i64 %4
%6 = load i32, i32* %5
%7 = sub nsw i32 %1, %6
ret i32 %7
}
/* Variables and functions */
int f(int);
int main() {
  int x;
  x = 10;
  return f(x);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0xa,-0x8(%rbp)
mov    -0x8(%rbp),%edi
call   1030 <f@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
mov    $0xa,%edi
jmp    1030 <f@plt>

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @f(i32 10)
ret i32 %1
}
const char *SuperFoo() { return "Hello World"; }


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

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

LLVM IR (-O0):
@.str = [12 x i8] c"Hello World\00"
define i8* @SuperFoo() {
ret i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [12 x i8] c"Hello World\00"
define i8* @SuperFoo() {
ret i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0)
}
/* Type definitions */
typedef int /*<<< orphan*/ uint64_t;

/* Variables and functions */
int /*<<< orphan*/ byteswap64(int /*<<< orphan*/);
scalar_t__ little_endianess();
uint64_t htonll_util(uint64_t input) {
  if (little_endianess()) {
    return byteswap64(input);
  } else {
    return input;
  }
}


x86 assembly (clang, -O0):
<htonll_util>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    $0x0,%al
call   1030 <little_endianess@plt>
cmp    $0x0,%rax
je     114c <htonll_util+0x2c>
mov    -0x8(%rbp),%edi
call   1040 <byteswap64@plt>
mov    %eax,-0x4(%rbp)
jmp    1152 <htonll_util+0x32>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<htonll_util>:
push   %rbx
mov    %edi,%ebx
xor    %eax,%eax
call   1030 <little_endianess@plt>
test   %rax,%rax
je     1137 <htonll_util+0x17>
mov    %ebx,%edi
pop    %rbx
jmp    1040 <byteswap64@plt>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @htonll_util(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = call i64 (...) @little_endianess()
%5 = icmp ne i64 %4, 0
br i1 %5, label %6, label %9
6: ; preds = %1
%7 = load i32, i32* %3
%8 = call i32 @byteswap64(i32 %7)
store i32 %8, i32* %2
br label %11
9: ; preds = %1
%10 = load i32, i32* %3
store i32 %10, i32* %2
br label %11
11: ; preds = %9, %6
%12 = load i32, i32* %2
ret i32 %12
}

LLVM IR (-O2):
define i32 @htonll_util(i32 %0) {
%2 = tail call i64 (...) @little_endianess()
%3 = icmp eq i64 %2, 0
br i1 %3, label %6, label %4
4: ; preds = %1
%5 = tail call i32 @byteswap64(i32 %0)
br label %6
6: ; preds = %1, %4
%7 = phi i32 [ %5, %4 ], [ %0, %1 ]
ret i32 %7
}
/* Variables and functions */
double atan(double);
double SDL_atan(double x) { return atan(x); }


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

x86 assembly (clang, -O2):
<SDL_atan>:
jmp    1030 <atan@plt>

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

LLVM IR (-O2):
define double @SDL_atan(double %0) {
%2 = tail call double @atan(double %0)
ret double %2
}
__attribute__((no, noclone)) unsigned __int128 t174_3sub(signed __int128 y) {
  unsigned __int128 r;
  if (__builtin_sub_overflow((signed __int128)(-5), y, &r))
    bar();
  return r;
}


x86 assembly (clang, -O0):
<t174_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),%rsi
mov    %rsi,%rax
sar    $0x3f,%rax
mov    $0xfffffffffffffffb,%rdx
sub    %rcx,%rdx
mov    $0xffffffffffffffff,%r9
mov    %r9,%rcx
sbb    %rsi,%rcx
mov    %r9,%r8
sbb    %rax,%r8
sbb    %rax,%r9
mov    %r8d,%eax
and    $0x1,%eax
mov    %eax,%esi
mov    %rsi,%rax
neg    %rax
mov    %rax,%rdi
xor    %r9,%rdi
xor    %r8,%rax
or     %rdi,%rax
or     %rsi,%rax
setne  %al
mov    %rdx,-0x40(%rbp)
mov    %rcx,-0x38(%rbp)
test   $0x1,%al
jne    1194 <t174_3sub+0x84>
jmp    119b <t174_3sub+0x8b>
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):
<t174_3sub>:
push   %r14
push   %rbx
push   %rax
mov    $0xfffffffffffffffb,%r14
sub    %rdi,%r14
mov    $0xffffffffffffffff,%rbx
sbb    %rsi,%rbx
cmp    $0xfffffffffffffffc,%rdi
sbb    $0xffffffffffffffff,%rsi
jl     1139 <t174_3sub+0x29>
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 } @t174_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 = sext i128 %11 to i129
%13 = call { i129, i1 } @llvm.ssub.with.overflow.i129(i129 -5, i129 %12)
%14 = extractvalue { i129, i1 } %13, 1
%15 = extractvalue { i129, i1 } %13, 0
%16 = trunc i129 %15 to i128
%17 = zext i128 %16 to i129
%18 = icmp ne i129 %15, %17
%19 = or i1 %14, %18
store i128 %16, i128* %6
br i1 %19, label %20, label %22
20: ; preds = %2
%21 = call i32 (...) @bar()
br label %22
22: ; preds = %20, %2
%23 = load i128, i128* %6
store i128 %23, i128* %3
%24 = bitcast i128* %3 to { i64, i64 }*
%25 = load { i64, i64 }, { i64, i64 }* %24
ret { i64, i64 } %25
}

LLVM IR (-O2):
define { i64, i64 } @t174_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 = zext i128 %6 to i129
%8 = sub nuw i129 -5, %7
%9 = icmp sgt i128 %6, -5
br i1 %9, label %10, label %12
10: ; preds = %2
%11 = tail call i32 (...) @bar()
br label %12
12: ; preds = %10, %2
%13 = trunc i129 %8 to i64
%14 = lshr i129 %8, 64
%15 = trunc i129 %14 to i64
%16 = insertvalue { i64, i64 } poison, i64 %13, 0
%17 = insertvalue { i64, i64 } %16, i64 %15, 1
ret { i64, i64 } %17
}
int getPointer_BaseScreen(int *column, int *row) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @getPointer_BaseScreen(i32* nocapture readnone %0, i32* nocapture readnone %1) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ umfpack_dl_solve(long, long *, long *, double *, double *,
                                    double *, void *, double *, double *);
void umf4solr_(long *sys, long Ap[], long Ai[], double Ax[], double x[],
               double b[], void **Numeric, double Control[20],
               double Info[90]) {
  (void)umfpack_dl_solve(*sys, Ap, Ai, Ax, x, b, *Numeric, Control, Info);
}


x86 assembly (clang, -O0):
<umf4solr_>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
mov    0x20(%rbp),%rax
mov    0x18(%rbp),%rax
mov    0x10(%rbp),%rax
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    -0x8(%rbp),%rax
mov    (%rax),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    -0x28(%rbp),%r8
mov    -0x30(%rbp),%r9
mov    0x10(%rbp),%rax
mov    (%rax),%r11
mov    0x18(%rbp),%r10
mov    0x20(%rbp),%rax
mov    %r11,(%rsp)
mov    %r10,0x8(%rsp)
mov    %rax,0x10(%rsp)
call   1030 <umfpack_dl_solve@plt>
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<umf4solr_>:
sub    $0x18,%rsp
movups 0x28(%rsp),%xmm0
mov    0x20(%rsp),%rax
mov    (%rdi),%rdi
mov    (%rax),%rax
movups %xmm0,0x8(%rsp)
mov    %rax,(%rsp)
call   1030 <umfpack_dl_solve@plt>
add    $0x18,%rsp
ret

LLVM IR (-O0):
define void @umf4solr_(i64* %0, i64* %1, i64* %2, double* %3, double* %4, double* %5, i8** %6, double* %7, double* %8) {
%10 = alloca i64*
%11 = alloca i64*
%12 = alloca i64*
%13 = alloca double*
%14 = alloca double*
%15 = alloca double*
%16 = alloca i8**
%17 = alloca double*
%18 = alloca double*
store i64* %0, i64** %10
store i64* %1, i64** %11
store i64* %2, i64** %12
store double* %3, double** %13
store double* %4, double** %14
store double* %5, double** %15
store i8** %6, i8*** %16
store double* %7, double** %17
store double* %8, double** %18
%19 = load i64*, i64** %10
%20 = load i64, i64* %19
%21 = load i64*, i64** %11
%22 = load i64*, i64** %12
%23 = load double*, double** %13
%24 = load double*, double** %14
%25 = load double*, double** %15
%26 = load i8**, i8*** %16
%27 = load i8*, i8** %26
%28 = load double*, double** %17
%29 = load double*, double** %18
%30 = call i32 @umfpack_dl_solve(i64 %20, i64* %21, i64* %22, double* %23, double* %24, double* %25, i8* %27, double* %28, double* %29)
ret void
}

LLVM IR (-O2):
define void @umf4solr_(i64* nocapture %0, i64* %1, i64* %2, double* %3, double* %4, double* %5, i8** nocapture %6, double* %7, double* %8) {
%10 = load i64, i64* %0
%11 = load i8*, i8** %6
%12 = tail call i32 @umfpack_dl_solve(i64 %10, i64* %1, i64* %2, double* %3, double* %4, double* %5, i8* %11, double* %7, double* %8)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ dlerror();
int /*<<< orphan*/ dlopen(char *, int);
void PyMPI_SCMPI_dlopen_libslurm(void) {
  (void)dlopen("libslurm.so", 0x00002 | 0x00100 | 0x00004);
  (void)dlerror();
}


x86 assembly (clang, -O0):
<PyMPI_SCMPI_dlopen_libslurm>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
mov    $0x106,%esi
call   1040 <dlopen@plt>
mov    $0x0,%al
call   1030 <dlerror@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<PyMPI_SCMPI_dlopen_libslurm>:
push   %rax
lea    0xed8(%rip),%rdi
mov    $0x106,%esi
call   1040 <dlopen@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <dlerror@plt>

LLVM IR (-O0):
@.str = [12 x i8] c"libslurm.so\00"
define void @PyMPI_SCMPI_dlopen_libslurm() {
%1 = call i32 @dlopen(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 262)
%2 = call i32 (...) @dlerror()
ret void
}

LLVM IR (-O2):
@.str = [12 x i8] c"libslurm.so\00"
define void @PyMPI_SCMPI_dlopen_libslurm() {
%1 = tail call i32 @dlopen(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 262)
%2 = tail call i32 (...) @dlerror()
ret void
}
void ff_hevc_put_hevc_uni_w_qpel_h64_8_sse4() {}


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

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

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

LLVM IR (-O2):
define void @ff_hevc_put_hevc_uni_w_qpel_h64_8_sse4() {
ret void
}
int find_dev_mask(int dev) {
  int mask = 1;
  int res = 0;
  while (mask < dev) {
    if (mask & dev)
      break;
    mask <<= 1;
  }
  return mask;
}


x86 assembly (clang, -O0):
<find_dev_mask>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x1,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    1143 <find_dev_mask+0x43>
mov    -0x8(%rbp),%eax
and    -0x4(%rbp),%eax
cmp    $0x0,%eax
je     1135 <find_dev_mask+0x35>
jmp    1143 <find_dev_mask+0x43>
mov    -0x8(%rbp),%eax
shl    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1115 <find_dev_mask+0x15>
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<find_dev_mask>:
mov    $0x1,%ecx
cs nopw 0x0(%rax,%rax,1)
nop
mov    %ecx,%eax
cmp    %edi,%ecx
jge    1121 <find_dev_mask+0x21>
mov    %eax,%edx
and    %edi,%edx
lea    (%rax,%rax,1),%ecx
test   %edx,%edx
je     1110 <find_dev_mask+0x10>
ret

LLVM IR (-O0):
define i32 @find_dev_mask(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %2
store i32 1, i32* %3
store i32 0, i32* %4
br label %5
5: ; preds = %15, %1
%6 = load i32, i32* %3
%7 = load i32, i32* %2
%8 = icmp slt i32 %6, %7
br i1 %8, label %9, label %18
9: ; preds = %5
%10 = load i32, i32* %3
%11 = load i32, i32* %2
%12 = and i32 %10, %11
%13 = icmp ne i32 %12, 0
br i1 %13, label %14, label %15
14: ; preds = %9
br label %18
15: ; preds = %9
%16 = load i32, i32* %3
%17 = shl i32 %16, 1
store i32 %17, i32* %3
br label %5
18: ; preds = %14, %5
%19 = load i32, i32* %3
ret i32 %19
}

LLVM IR (-O2):
define i32 @find_dev_mask(i32 %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i32 [ 1, %1 ], [ %8, %2 ]
%4 = icmp slt i32 %3, %0
%5 = and i32 %3, %0
%6 = icmp eq i32 %5, 0
%7 = and i1 %4, %6
%8 = shl i32 %3, 1
br i1 %7, label %2, label %9
9: ; preds = %2
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_SUCCESS;
int /*<<< orphan*/ attemptCleanExit(int /*<<< orphan*/);
void sigintHandler(int signum) { attemptCleanExit(EXIT_SUCCESS); }


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

x86 assembly (clang, -O2):
<sigintHandler>:
mov    0x2ec9(%rip),%rax
mov    (%rax),%edi
jmp    1030 <attemptCleanExit@plt>

LLVM IR (-O0):
@EXIT_SUCCESS = global i32 0
define void @sigintHandler(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* @EXIT_SUCCESS
%4 = call i32 @attemptCleanExit(i32 %3)
ret void
}

LLVM IR (-O2):
@EXIT_SUCCESS = global i32 0
define void @sigintHandler(i32 %0) {
%2 = load i32, i32* @EXIT_SUCCESS
%3 = tail call i32 @attemptCleanExit(i32 %2)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ const uint8_t;

/* Variables and functions */
uint8_t
rfcomm_event_incoming_connection_get_server_channel(const uint8_t *event) {
  return event[8];
}


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

x86 assembly (clang, -O2):
<rfcomm_event_incoming_connection_get_server_channel>:
mov    0x20(%rdi),%eax
ret

LLVM IR (-O0):
define i32 @rfcomm_event_incoming_connection_get_server_channel(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = getelementptr inbounds i32, i32* %3, i64 8
%5 = load i32, i32* %4
ret i32 %5
}

LLVM IR (-O2):
define i32 @rfcomm_event_incoming_connection_get_server_channel(i32* nocapture %0) {
%2 = getelementptr inbounds i32, i32* %0, i64 8
%3 = load i32, i32* %2
ret i32 %3
}
/* Type definitions */
typedef int /*<<< orphan*/ pthread_t;

/* Variables and functions */
int /*<<< orphan*/ pthread_self();
pthread_t fthread_self_() { return pthread_self(); }


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

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

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

LLVM IR (-O2):
define i32 @fthread_self_() {
%1 = tail call i32 (...) @pthread_self()
ret i32 %1
}
void swap(int *x, int *y) {
  int temp = 0;
  temp = *x;
  *x = *y;
  *y = temp;
}


x86 assembly (clang, -O0):
<swap>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x14(%rbp),%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<swap>:
mov    (%rdi),%eax
mov    (%rsi),%ecx
mov    %ecx,(%rdi)
mov    %eax,(%rsi)
ret

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

LLVM IR (-O2):
define void @swap(i32* nocapture %0, i32* nocapture %1) {
%3 = load i32, i32* %0
%4 = load i32, i32* %1
store i32 %4, i32* %0
store i32 %3, i32* %1
ret void
}
void QEIIntDisable(unsigned long ulBase, unsigned long ulIntFlags) {
  ;
  (*((volatile unsigned long *)(ulBase + 0x00000020))) &= ~(ulIntFlags);
}


x86 assembly (clang, -O0):
<QEIIntDisable>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rdx
xor    $0xffffffffffffffff,%rdx
mov    -0x8(%rbp),%rax
mov    0x20(%rax),%rcx
and    %rdx,%rcx
mov    %rcx,0x20(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<QEIIntDisable>:
not    %rsi
and    %rsi,0x20(%rdi)
ret

LLVM IR (-O0):
define void @QEIIntDisable(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%5 = load i64, i64* %4
%6 = xor i64 %5, -1
%7 = load i64, i64* %3
%8 = add i64 %7, 32
%9 = inttoptr i64 %8 to i64*
%10 = load volatile i64, i64* %9
%11 = and i64 %10, %6
store volatile i64 %11, i64* %9
ret void
}

LLVM IR (-O2):
define void @QEIIntDisable(i64 %0, i64 %1) {
%3 = xor i64 %1, -1
%4 = add i64 %0, 32
%5 = inttoptr i64 %4 to i64*
%6 = load volatile i64, i64* %5
%7 = and i64 %6, %3
store volatile i64 %7, i64* %5
ret void
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
main() {
  float a;
  double b;
  a = 1.25L;
  assert(a == 1.25);
  b = 1.250;
  assert(b == 1.25);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  0xee8(%rip),%xmm0
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xeca(%rip),%xmm1
ucomisd %xmm1,%xmm0
sete   %al
setnp  %cl
and    %cl,%al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
movsd  0xeac(%rip),%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  0xe9a(%rip),%xmm1
ucomisd %xmm1,%xmm0
sete   %al
setnp  %cl
and    %cl,%al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca float
%2 = alloca double
store float 1.250000e+00, float* %1
%3 = load float, float* %1
%4 = fpext float %3 to double
%5 = fcmp oeq double %4, 1.250000e+00
%6 = zext i1 %5 to i32
%7 = call i32 @assert(i32 %6)
store double 1.250000e+00, double* %2
%8 = load double, double* %2
%9 = fcmp oeq double %8, 1.250000e+00
%10 = zext i1 %9 to i32
%11 = call i32 @assert(i32 %10)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @assert(i32 1)
%2 = tail call i32 @assert(i32 1)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
void print(char *msg) { printf("|%s\n", msg); }


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

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

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

LLVM IR (-O2):
@.str = [5 x i8] c"|%s\0A\00"
define void @print(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
/* Variables and functions */
scalar_t__ strncmp(char const *, char *, int);
int endingInPossesiveS(const char *s, size_t length) {
  return (length >= 3 && strncmp(s + length - 2, "\'s", 2) == 0);
}


x86 assembly (clang, -O0):
<endingInPossesiveS>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
xor    %eax,%eax
cmpq   $0x3,-0x10(%rbp)
mov    %al,-0x11(%rbp)
jb     1157 <endingInPossesiveS+0x47>
mov    -0x8(%rbp),%rdi
add    -0x10(%rbp),%rdi
add    $0xfffffffffffffffe,%rdi
lea    0xebd(%rip),%rsi
mov    $0x2,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%rax
sete   %al
mov    %al,-0x11(%rbp)
mov    -0x11(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<endingInPossesiveS>:
xor    %eax,%eax
cmp    $0x3,%rsi
jb     1140 <endingInPossesiveS+0x30>
push   %rax
add    %rsi,%rdi
add    $0xfffffffffffffffe,%rdi
lea    0xed9(%rip),%rsi
mov    $0x2,%edx
call   1030 <strncmp@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
sete   %al
add    $0x8,%rsp
ret

LLVM IR (-O0):
@.str = [3 x i8] c"'s\00"
define i32 @endingInPossesiveS(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
store i8* %0, i8** %3
store i64 %1, i64* %4
%5 = load i64, i64* %4
%6 = icmp uge i64 %5, 3
br i1 %6, label %7, label %14
7: ; preds = %2
%8 = load i8*, i8** %3
%9 = load i64, i64* %4
%10 = getelementptr inbounds i8, i8* %8, i64 %9
%11 = getelementptr inbounds i8, i8* %10, i64 -2
%12 = call i64 @strncmp(i8* %11, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 2)
%13 = icmp eq i64 %12, 0
br label %14
14: ; preds = %7, %2
%15 = phi i1 [ false, %2 ], [ %13, %7 ]
%16 = zext i1 %15 to i32
ret i32 %16
}

LLVM IR (-O2):
@.str = [3 x i8] c"'s\00"
define i32 @endingInPossesiveS(i8* %0, i64 %1) {
%3 = icmp ugt i64 %1, 2
br i1 %3, label %4, label %10
4: ; preds = %2
%5 = getelementptr inbounds i8, i8* %0, i64 %1
%6 = getelementptr inbounds i8, i8* %5, i64 -2
%7 = tail call i64 @strncmp(i8* %6, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 2)
%8 = icmp eq i64 %7, 0
%9 = zext i1 %8 to i32
br label %10
10: ; preds = %4, %2
%11 = phi i32 [ 0, %2 ], [ %9, %4 ]
ret i32 %11
}
int test_imm_4Buint8_reg(unsigned char val) {
  return ((val) & (-0x4B << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_4Buint8_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%edx
and    $0xffffffb5,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @test_imm_4Buint8_reg(i8 zeroext %0) {
%2 = and i8 %0, -75
%3 = icmp eq i8 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Type definitions */
struct forth_instance {
  int dummy;
};

/* Variables and functions */
intptr_t st_pop(struct forth_instance *);
int /*<<< orphan*/ st_push(struct forth_instance *, intptr_t);
void mod(struct forth_instance *fi) {
  intptr_t tp;
  tp = st_pop(fi);
  st_push(fi, st_pop(fi) % tp);
}


x86 assembly (clang, -O0):
<mod>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <st_pop@plt>
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <st_pop@plt>
mov    -0x18(%rbp),%rdi
cqto
idivq  -0x10(%rbp)
mov    %rdx,%rsi
call   1040 <st_push@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mod>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
call   1030 <st_pop@plt>
mov    %rax,%r14
mov    %rbx,%rdi
call   1030 <st_pop@plt>
mov    %rax,%rcx
or     %r14,%rcx
shr    $0x20,%rcx
je     114a <mod+0x2a>
cqto
idiv   %r14
jmp    114f <mod+0x2f>
xor    %edx,%edx
div    %r14d
mov    %rbx,%rdi
mov    %rdx,%rsi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <st_push@plt>

LLVM IR (-O0):
%struct.forth_instance = type { i32 }
define void @mod(%struct.forth_instance* %0) {
%2 = alloca %struct.forth_instance*
%3 = alloca i64
store %struct.forth_instance* %0, %struct.forth_instance** %2
%4 = load %struct.forth_instance*, %struct.forth_instance** %2
%5 = call i64 @st_pop(%struct.forth_instance* %4)
store i64 %5, i64* %3
%6 = load %struct.forth_instance*, %struct.forth_instance** %2
%7 = load %struct.forth_instance*, %struct.forth_instance** %2
%8 = call i64 @st_pop(%struct.forth_instance* %7)
%9 = load i64, i64* %3
%10 = srem i64 %8, %9
%11 = call i32 @st_push(%struct.forth_instance* %6, i64 %10)
ret void
}

LLVM IR (-O2):
%struct.forth_instance = type { i32 }
define void @mod(%struct.forth_instance* %0) {
%2 = tail call i64 @st_pop(%struct.forth_instance* %0)
%3 = tail call i64 @st_pop(%struct.forth_instance* %0)
%4 = srem i64 %3, %2
%5 = tail call i32 @st_push(%struct.forth_instance* %0, i64 %4)
ret void
}
void glCompileShader(void) { return; }


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

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

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

LLVM IR (-O2):
define void @glCompileShader() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ LOG_DAEMON;
int /*<<< orphan*/ closelog();
int /*<<< orphan*/ openlog(char *, int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ tzset();
void log_reset(char *program_name) {
  closelog();
  tzset();
  openlog(program_name, 0, LOG_DAEMON);
}


x86 assembly (clang, -O0):
<log_reset>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x0,%al
call   1030 <closelog@plt>
mov    $0x0,%al
call   1040 <tzset@plt>
mov    -0x8(%rbp),%rdi
mov    0x2e93(%rip),%rax
mov    (%rax),%edx
xor    %esi,%esi
call   1050 <openlog@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<log_reset>:
push   %rbx
mov    %rdi,%rbx
xor    %eax,%eax
call   1030 <closelog@plt>
xor    %eax,%eax
call   1040 <tzset@plt>
mov    0x2e9f(%rip),%rax
mov    (%rax),%edx
mov    %rbx,%rdi
xor    %esi,%esi
pop    %rbx
jmp    1050 <openlog@plt>

LLVM IR (-O0):
@LOG_DAEMON = global i32 0
define void @log_reset(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 (...) @closelog()
%4 = call i32 (...) @tzset()
%5 = load i8*, i8** %2
%6 = load i32, i32* @LOG_DAEMON
%7 = call i32 @openlog(i8* %5, i32 0, i32 %6)
ret void
}

LLVM IR (-O2):
@LOG_DAEMON = global i32 0
define void @log_reset(i8* %0) {
%2 = tail call i32 (...) @closelog()
%3 = tail call i32 (...) @tzset()
%4 = load i32, i32* @LOG_DAEMON
%5 = tail call i32 @openlog(i8* %0, i32 0, i32 %4)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
int /*<<< orphan*/ strncpy(char *, char *, int);
int main(void) {
  char str[6] = "Victor";
  char str1[6] = {0};
  strncpy(str1, str, 10);
  printf("%s\n", str1);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    0xebb(%rip),%eax
mov    %eax,-0xa(%rbp)
mov    0xeb5(%rip),%ax
mov    %ax,-0x6(%rbp)
lea    -0x10(%rbp),%rdi
xor    %esi,%esi
mov    $0x6,%edx
call   1050 <memset@plt>
lea    -0x10(%rbp),%rdi
lea    -0xa(%rbp),%rsi
mov    $0xa,%edx
call   1030 <strncpy@plt>
lea    -0x10(%rbp),%rsi
lea    0xe86(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
movw   $0x726f,0xc(%rsp)
movl   $0x74636956,0x8(%rsp)
74
movw   $0x0,0x4(%rsp)
movl   $0x0,(%rsp)
mov    %rsp,%rbx
lea    0x8(%rsp),%rsi
mov    %rbx,%rdi
mov    $0xa,%edx
call   1030 <strncpy@plt>
lea    0xea8(%rip),%rdi
mov    %rbx,%rsi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

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

LLVM IR (-O2):
@__const.main.str = [6 x i8] c"Victor"
@.str = [4 x i8] c"%s\0A\00"
define i32 @main() {
%1 = alloca [6 x i8]
%2 = alloca [6 x i8]
%3 = getelementptr inbounds [6 x i8], [6 x i8]* %1, i64 0, i64 0
%4 = getelementptr inbounds [6 x i8], [6 x i8]* %2, i64 0, i64 0
%5 = call i32 @strncpy(i8* %4, i8* %3, i32 10)
%6 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %4)
ret i32 0
}
/* Variables and functions */
int *malloc(int);
void bug(char t) {
  int *array = malloc(1);
  array[1] = t;
}


x86 assembly (clang, -O0):
<bug>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    $0x1,%edi
call   1030 <malloc@plt>
mov    %rax,-0x10(%rbp)
movsbl -0x1(%rbp),%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,0x4(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bug>:
mov    $0x1,%edi
jmp    1030 <malloc@plt>

LLVM IR (-O0):
define void @bug(i8 signext %0) {
%2 = alloca i8
%3 = alloca i32*
store i8 %0, i8* %2
%4 = call i32* @malloc(i32 1)
store i32* %4, i32** %3
%5 = load i8, i8* %2
%6 = sext i8 %5 to i32
%7 = load i32*, i32** %3
%8 = getelementptr inbounds i32, i32* %7, i64 1
store i32 %6, i32* %8
ret void
}

LLVM IR (-O2):
define void @bug(i8 signext %0) {
%2 = tail call i32* @malloc(i32 1)
ret void
}
/* Variables and functions */
int test(int, int);
int main() { return test(6, 3) - 2; }


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

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x6,%edi
mov    $0x3,%esi
call   1030 <test@plt>
add    $0xfffffffe,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @test(i32 6, i32 3)
%3 = sub nsw i32 %2, 2
ret i32 %3
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @test(i32 6, i32 3)
%2 = add nsw i32 %1, -2
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ cblas_sswap(int const, float *, int const, float *,
                               int const);
void c_sswap(const int N, float *X, const int strideX, float *Y,
             const int strideY) {
  cblas_sswap(N, X, strideX, Y, strideY);
}


x86 assembly (clang, -O0):
<c_sswap>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8d,-0x24(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
mov    -0x20(%rbp),%rcx
mov    -0x24(%rbp),%r8d
call   1030 <cblas_sswap@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<c_sswap>:
jmp    1030 <cblas_sswap@plt>

LLVM IR (-O0):
define void @c_sswap(i32 %0, float* %1, i32 %2, float* %3, i32 %4) {
%6 = alloca i32
%7 = alloca float*
%8 = alloca i32
%9 = alloca float*
%10 = alloca i32
store i32 %0, i32* %6
store float* %1, float** %7
store i32 %2, i32* %8
store float* %3, float** %9
store i32 %4, i32* %10
%11 = load i32, i32* %6
%12 = load float*, float** %7
%13 = load i32, i32* %8
%14 = load float*, float** %9
%15 = load i32, i32* %10
%16 = call i32 @cblas_sswap(i32 %11, float* %12, i32 %13, float* %14, i32 %15)
ret void
}

LLVM IR (-O2):
define void @c_sswap(i32 %0, float* %1, i32 %2, float* %3, i32 %4) {
%6 = tail call i32 @cblas_sswap(i32 %0, float* %1, i32 %2, float* %3, i32 %4)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ LedHardware_Init();
int /*<<< orphan*/ LedModel_Init();
void LedConductor_Init() {
  LedModel_Init();
  LedHardware_Init();
}


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

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

LLVM IR (-O0):
define void @LedConductor_Init() {
%1 = call i32 (...) @LedModel_Init()
%2 = call i32 (...) @LedHardware_Init()
ret void
}

LLVM IR (-O2):
define void @LedConductor_Init() {
%1 = tail call i32 (...) @LedModel_Init()
%2 = tail call i32 (...) @LedHardware_Init()
ret void
}
void netsnmp_generic_delete_row(void *row) {}


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

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

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

LLVM IR (-O2):
define void @netsnmp_generic_delete_row(i8* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int);
int main() {
  long x, y;
  int a, b, c, d;
  x = 5;
  y = 6;
  a = 7;
  b = 8;
  c = x + a;
  d = y + b;
  printf("c=x+a=%d,d=y+b=%d\n", c, d);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
movq   $0x5,-0x10(%rbp)
movq   $0x6,-0x18(%rbp)
movl   $0x7,-0x1c(%rbp)
movl   $0x8,-0x20(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x1c(%rbp),%rcx
add    %rcx,%rax
mov    %eax,-0x24(%rbp)
mov    -0x18(%rbp),%rax
movslq -0x20(%rbp),%rcx
add    %rcx,%rax
mov    %eax,-0x28(%rbp)
mov    -0x24(%rbp),%esi
mov    -0x28(%rbp),%edx
lea    0xe9a(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [19 x i8] c"c=x+a=%d,d=y+b=%d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i64
%3 = alloca i64
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
store i32 0, i32* %1
store i64 5, i64* %2
store i64 6, i64* %3
store i32 7, i32* %4
store i32 8, i32* %5
%8 = load i64, i64* %2
%9 = load i32, i32* %4
%10 = sext i32 %9 to i64
%11 = add nsw i64 %8, %10
%12 = trunc i64 %11 to i32
store i32 %12, i32* %6
%13 = load i64, i64* %3
%14 = load i32, i32* %5
%15 = sext i32 %14 to i64
%16 = add nsw i64 %13, %15
%17 = trunc i64 %16 to i32
store i32 %17, i32* %7
%18 = load i32, i32* %6
%19 = load i32, i32* %7
%20 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i32 %18, i32 %19)
ret i32 0
}

LLVM IR (-O2):
@.str = [19 x i8] c"c=x+a=%d,d=y+b=%d\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i32 12, i32 14)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ tsb16(int /*<<< orphan*/);
int /*<<< orphan*/ zeropage();
void tsbZp16(void) { tsb16(zeropage()); }


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

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

LLVM IR (-O0):
define void @tsbZp16() {
%1 = call i32 (...) @zeropage()
%2 = call i32 @tsb16(i32 %1)
ret void
}

LLVM IR (-O2):
define void @tsbZp16() {
%1 = tail call i32 (...) @zeropage()
%2 = tail call i32 @tsb16(i32 %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ open_new_file();
int yywrap() {
  if (!open_new_file())
    return (1);
  return (0);
}


x86 assembly (clang, -O0):
<yywrap>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <open_new_file@plt>
cmp    $0x0,%eax
jne    1134 <yywrap+0x24>
movl   $0x1,-0x4(%rbp)
jmp    113b <yywrap+0x2b>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<yywrap>:
push   %rax
xor    %eax,%eax
call   1030 <open_new_file@plt>
xor    %ecx,%ecx
test   %eax,%eax
sete   %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @yywrap() {
%1 = alloca i32
%2 = call i32 (...) @open_new_file()
%3 = icmp ne i32 %2, 0
br i1 %3, label %5, label %4
4: ; preds = %0
store i32 1, i32* %1
br label %6
5: ; preds = %0
store i32 0, i32* %1
br label %6
6: ; preds = %5, %4
%7 = load i32, i32* %1
ret i32 %7
}

LLVM IR (-O2):
define i32 @yywrap() {
%1 = tail call i32 (...) @open_new_file()
%2 = icmp eq i32 %1, 0
%3 = zext i1 %2 to i32
ret i32 %3
}
void NOTICEREF_free(void) {}


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

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

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

LLVM IR (-O2):
define void @NOTICEREF_free() {
ret void
}
int weapontoint(char *weapon) {}


x86 assembly (clang, -O0):
<weapontoint>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @weapontoint(i8* nocapture readnone %0) {
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ putchar(char);
void printRecursiveAlphabet(char currentChar) {
  putchar(currentChar);
  putchar(' ');
  if (currentChar != 'z') {
    printRecursiveAlphabet(currentChar + 1);
  }
  putchar(0);
}


x86 assembly (clang, -O0):
<printRecursiveAlphabet>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%edi
call   1030 <putchar@plt>
mov    $0x20,%edi
call   1030 <putchar@plt>
movsbl -0x1(%rbp),%eax
cmp    $0x7a,%eax
je     115d <printRecursiveAlphabet+0x3d>
movsbl -0x1(%rbp),%eax
add    $0x1,%eax
movsbl %al,%edi
call   1040 <printRecursiveAlphabet@plt>
xor    %edi,%edi
call   1030 <putchar@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<printRecursiveAlphabet>:
push   %rbx
mov    %edi,%ebx
call   1030 <putchar@plt>
mov    $0x20,%edi
call   1030 <putchar@plt>
cmp    $0x7a,%bl
je     1142 <printRecursiveAlphabet+0x22>
lea    0x1(%rbx),%eax
movsbl %al,%edi
call   1040 <printRecursiveAlphabet@plt>
xor    %edi,%edi
pop    %rbx
jmp    1030 <putchar@plt>

LLVM IR (-O0):
define void @printRecursiveAlphabet(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = call i32 @putchar(i8 signext %3)
%5 = call i32 @putchar(i8 signext 32)
%6 = load i8, i8* %2
%7 = sext i8 %6 to i32
%8 = icmp ne i32 %7, 122
br i1 %8, label %9, label %14
9: ; preds = %1
%10 = load i8, i8* %2
%11 = sext i8 %10 to i32
%12 = add nsw i32 %11, 1
%13 = trunc i32 %12 to i8
br label %14
14: ; preds = %9, %1
%15 = call i32 @putchar(i8 signext 0)
ret void
}

LLVM IR (-O2):
define void @printRecursiveAlphabet(i8 signext %0) {
%2 = tail call i32 @putchar(i8 signext %0)
%3 = tail call i32 @putchar(i8 signext 32)
%4 = icmp eq i8 %0, 122
br i1 %4, label %7, label %5
5: ; preds = %1
%6 = add i8 %0, 1
tail call void @printRecursiveAlphabet(i8 signext %6)
br label %7
7: ; preds = %5, %1
%8 = tail call i32 @putchar(i8 signext 0)
ret void
}
long long ktime_to_us(const long long kt) { return kt / 1000; }


x86 assembly (clang, -O0):
<ktime_to_us>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    $0x3e8,%ecx
cqto
idiv   %rcx
pop    %rbp
ret

x86 assembly (clang, -O2):
<ktime_to_us>:
mov    %rdi,%rax
movabs $0x20c49ba5e353f7cf,%rcx
9b c4 20
imul   %rcx
mov    %rdx,%rax
shr    $0x3f,%rax
sar    $0x7,%rdx
add    %rdx,%rax
ret

LLVM IR (-O0):
define i64 @ktime_to_us(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = sdiv i64 %3, 1000
ret i64 %4
}

LLVM IR (-O2):
define i64 @ktime_to_us(i64 %0) {
%2 = sdiv i64 %0, 1000
ret i64 %2
}
/* Variables and functions */
double __nv_normcdf(double);
double normcdf(double __a) { return __nv_normcdf(__a); }


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

x86 assembly (clang, -O2):
<normcdf>:
jmp    1030 <__nv_normcdf@plt>

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

LLVM IR (-O2):
define double @normcdf(double %0) {
%2 = tail call double @__nv_normcdf(double %0)
ret double %2
}
void XtReleaseGC() {}


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

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

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

LLVM IR (-O2):
define void @XtReleaseGC() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ err(int, char *);
void *malloc(size_t);
__attribute__((malloc)) void *xmalloc(size_t sz) {
  void *p;
  if (!sz)
    return NULL;
  p = malloc(sz);
  if (!p)
    err(1, "malloc");
  return p;
}


x86 assembly (clang, -O0):
<xmalloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1144 <xmalloc+0x24>
movq   $0x0,-0x8(%rbp)
jmp    1175 <xmalloc+0x55>
mov    -0x10(%rbp),%rdi
call   1040 <malloc@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    116d <xmalloc+0x4d>
mov    $0x1,%edi
lea    0xe98(%rip),%rsi
call   1030 <err@plt>
mov    -0x18(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xmalloc>:
push   %rax
test   %rdi,%rdi
je     1143 <xmalloc+0x23>
call   1040 <malloc@plt>
test   %rax,%rax
je     1132 <xmalloc+0x12>
pop    %rcx
ret
lea    0xec7(%rip),%rsi
mov    $0x1,%edi
call   1030 <err@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [7 x i8] c"malloc\00"
define noalias i8* @xmalloc(i64 %0) {
%2 = alloca i8*
%3 = alloca i64
%4 = alloca i8*
store i64 %0, i64* %3
%5 = load i64, i64* %3
%6 = icmp ne i64 %5, 0
br i1 %6, label %8, label %7
7: ; preds = %1
store i8* null, i8** %2
br label %17
8: ; preds = %1
%9 = load i64, i64* %3
%10 = call i8* @malloc(i64 %9)
store i8* %10, i8** %4
%11 = load i8*, i8** %4
%12 = icmp ne i8* %11, null
br i1 %12, label %15, label %13
13: ; preds = %8
%14 = call i32 @err(i32 1, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
br label %15
15: ; preds = %13, %8
%16 = load i8*, i8** %4
store i8* %16, i8** %2
br label %17
17: ; preds = %15, %7
%18 = load i8*, i8** %2
ret i8* %18
}

LLVM IR (-O2):
@.str = [7 x i8] c"malloc\00"
define noalias i8* @xmalloc(i64 %0) {
%2 = icmp eq i64 %0, 0
br i1 %2, label %8, label %3
3: ; preds = %1
%4 = tail call i8* @malloc(i64 %0)
%5 = icmp eq i8* %4, null
br i1 %5, label %6, label %8
6: ; preds = %3
%7 = tail call i32 @err(i32 1, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
br label %8
8: ; preds = %3, %6, %1
%9 = phi i8* [ null, %1 ], [ null, %6 ], [ %4, %3 ]
ret i8* %9
}
void snd_media_stop_pipeline(struct snd_usb_substream *subs) {}


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

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

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

LLVM IR (-O2):
%struct.snd_usb_substream = type opaque
define void @snd_media_stop_pipeline(%struct.snd_usb_substream* nocapture %0) {
ret void
}
/* Type definitions */
typedef scalar_t__ time_t;

/* Variables and functions */
scalar_t__ time(int /*<<< orphan*/ *);
int sleep(int a) {
  const int delay = 1;
  static int count = 1;
  time_t current_time = time(NULL);
  while (current_time + delay > time(NULL))
    ;
  if (count++ > 10) {
    count = 1;
    return 1;
  } else
    return 0;
}


x86 assembly (clang, -O0):
<sleep>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x8(%rbp)
movl   $0x1,-0xc(%rbp)
xor    %eax,%eax
mov    %eax,%edi
call   1030 <time@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x20(%rbp)
xor    %eax,%eax
mov    %eax,%edi
call   1030 <time@plt>
mov    %rax,%rcx
mov    -0x20(%rbp),%rax
cmp    %rcx,%rax
jle    1159 <sleep+0x49>
jmp    112f <sleep+0x1f>
mov    0x2ec9(%rip),%eax
mov    %eax,%ecx
add    $0x1,%ecx
mov    %ecx,0x2ebe(%rip)
cmp    $0xa,%eax
jle    1189 <sleep+0x79>
movl   $0x1,0x2eab(%rip)
movl   $0x1,-0x4(%rbp)
jmp    1190 <sleep+0x80>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sleep>:
push   %rbx
xor    %edi,%edi
call   1030 <time@plt>
mov    %rax,%rbx
nopl   0x0(%rax,%rax,1)
xor    %edi,%edi
call   1030 <time@plt>
cmp    %rax,%rbx
jge    1120 <sleep+0x10>
mov    0x2ef6(%rip),%ecx
lea    0x1(%rcx),%edx
xor    %eax,%eax
cmp    $0xb,%ecx
setge  %al
mov    $0x1,%ecx
cmovl  %edx,%ecx
mov    %ecx,0x2edd(%rip)
pop    %rbx
ret

LLVM IR (-O0):
@sleep.count = internal global i32 1
define i32 @sleep(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i64
store i32 %0, i32* %3
store i32 1, i32* %4
%6 = call i64 @time(i32* null)
store i64 %6, i64* %5
br label %7
7: ; preds = %12, %1
%8 = load i64, i64* %5
%9 = add nsw i64 %8, 1
%10 = call i64 @time(i32* null)
%11 = icmp sgt i64 %9, %10
br i1 %11, label %12, label %13
12: ; preds = %7
br label %7
13: ; preds = %7
%14 = load i32, i32* @sleep.count
%15 = add nsw i32 %14, 1
store i32 %15, i32* @sleep.count
%16 = icmp sgt i32 %14, 10
br i1 %16, label %17, label %18
17: ; preds = %13
store i32 1, i32* @sleep.count
store i32 1, i32* %2
br label %19
18: ; preds = %13
store i32 0, i32* %2
br label %19
19: ; preds = %18, %17
%20 = load i32, i32* %2
ret i32 %20
}

LLVM IR (-O2):
@sleep.count = internal unnamed_addr global i32 1
define i32 @sleep(i32 %0) {
%2 = tail call i64 @time(i32* null)
br label %3
3: ; preds = %3, %1
%4 = tail call i64 @time(i32* null)
%5 = icmp slt i64 %2, %4
br i1 %5, label %6, label %3
6: ; preds = %3
%7 = load i32, i32* @sleep.count
%8 = add nsw i32 %7, 1
%9 = icmp sgt i32 %7, 10
%10 = select i1 %9, i32 1, i32 %8
store i32 %10, i32* @sleep.count
%11 = zext i1 %9 to i32
ret i32 %11
}
void gdbmach_breakpoint(void) { __asm__ __volatile__("int $3\n"); }


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

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

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

LLVM IR (-O2):
define void @gdbmach_breakpoint() {
tail call void asm sideeffect "int $$3\0A", "~{dirflag},~{fpsr},~{flags}"()
ret void
}