xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ fast_copy(double *, double *, int);
int fht_double(double *, int);
int fht_double_oop(double *in, double *out, int log_n) {
  fast_copy(out, in, sizeof(double) << log_n);
  return fht_double(out, log_n);
}


x86 assembly (clang, -O0):
<fht_double_oop>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rsi
mov    -0x14(%rbp),%eax
mov    %eax,%ecx
mov    $0x8,%eax
shl    %cl,%rax
mov    %eax,%edx
call   1030 <fast_copy@plt>
mov    -0x10(%rbp),%rdi
mov    -0x14(%rbp),%esi
call   1040 <fht_double@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fht_double_oop>:
push   %rbp
push   %rbx
push   %rax
mov    %edx,%ebp
mov    %rsi,%rbx
mov    %rdi,%rsi
mov    $0x8,%edx
mov    %ebp,%ecx
shl    %cl,%rdx
mov    %rbx,%rdi
call   1030 <fast_copy@plt>
mov    %rbx,%rdi
mov    %ebp,%esi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1040 <fht_double@plt>

LLVM IR (-O0):
define i32 @fht_double_oop(double* %0, double* %1, i32 %2) {
%4 = alloca double*
%5 = alloca double*
%6 = alloca i32
store double* %0, double** %4
store double* %1, double** %5
store i32 %2, i32* %6
%7 = load double*, double** %5
%8 = load double*, double** %4
%9 = load i32, i32* %6
%10 = zext i32 %9 to i64
%11 = shl i64 8, %10
%12 = trunc i64 %11 to i32
%13 = call i32 @fast_copy(double* %7, double* %8, i32 %12)
%14 = load double*, double** %5
%15 = load i32, i32* %6
%16 = call i32 @fht_double(double* %14, i32 %15)
ret i32 %16
}

LLVM IR (-O2):
define i32 @fht_double_oop(double* %0, double* %1, i32 %2) {
%4 = zext i32 %2 to i64
%5 = shl i64 8, %4
%6 = trunc i64 %5 to i32
%7 = tail call i32 @fast_copy(double* %1, double* %0, i32 %6)
%8 = tail call i32 @fht_double(double* %1, i32 %2)
ret i32 %8
}
/* Type definitions */
typedef int /*<<< orphan*/ wchar_t;

/* Variables and functions */
int execute_keys_general_wrapper(int /*<<< orphan*/ const *, int,
                                 int /*<<< orphan*/, int);
int execute_keys_timed_out_no_remap(const wchar_t keys[]) {
  return execute_keys_general_wrapper(keys, 1, 0, 1);
}


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

x86 assembly (clang, -O2):
<execute_keys_timed_out_no_remap>:
mov    $0x1,%esi
xor    %edx,%edx
mov    $0x1,%ecx
jmp    1030 <execute_keys_general_wrapper@plt>

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

LLVM IR (-O2):
define i32 @execute_keys_timed_out_no_remap(i32* %0) {
%2 = tail call i32 @execute_keys_general_wrapper(i32* %0, i32 1, i32 0, i32 1)
ret i32 %2
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  unsigned long window;
};
typedef TYPE_1__ XExposeEvent;

/* Variables and functions */
void set_XExposeEvent_window(void *_p, unsigned long _v) {
  ((XExposeEvent *)_p)->window = (unsigned long)_v;
}


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

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

LLVM IR (-O0):
%struct.TYPE_2__ = type { i64 }
define void @set_XExposeEvent_window(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 = load i8*, i8** %3
%7 = bitcast i8* %6 to %struct.TYPE_2__*
%8 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %7, i32 0, i32 0
store i64 %5, i64* %8
ret void
}

LLVM IR (-O2):
define void @set_XExposeEvent_window(i8* nocapture writeonly %0, i64 %1) {
%3 = bitcast i8* %0 to i64*
store i64 %1, i64* %3
ret void
}
/* Type definitions */
struct ringbuf {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ rbuf_putc(struct ringbuf *, char);
void rbuf_print(struct ringbuf *r, const char *s) {
  char c;
  while ((c = *s++))
    rbuf_putc(r, c);
}


x86 assembly (clang, -O0):
<rbuf_print>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x10(%rbp)
mov    (%rax),%al
mov    %al,-0x11(%rbp)
cmp    $0x0,%al
je     114e <rbuf_print+0x3e>
mov    -0x8(%rbp),%rdi
movsbl -0x11(%rbp),%esi
call   1030 <rbuf_putc@plt>
jmp    1120 <rbuf_print+0x10>
add    $0x20,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
%struct.ringbuf = type { i32 }
define void @rbuf_print(%struct.ringbuf* %0, i8* nocapture %1) {
%3 = load i8, i8* %1
%4 = icmp eq i8 %3, 0
br i1 %4, label %12, label %5
5: ; preds = %2, %5
%6 = phi i8 [ %10, %5 ], [ %3, %2 ]
%7 = phi i8* [ %8, %5 ], [ %1, %2 ]
%8 = getelementptr inbounds i8, i8* %7, i64 1
%9 = tail call i32 @rbuf_putc(%struct.ringbuf* %0, i8 signext %6)
%10 = load i8, i8* %8
%11 = icmp eq i8 %10, 0
br i1 %11, label %12, label %5
12: ; preds = %5, %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int, int);
int /*<<< orphan*/ scanf(char *, int *, int *, int *);
int dec_hex() {
  int r, g, b;
  scanf("%d, %d, %d", &r, &g, &b);
  printf("#%x%x%x", r, g, b);
  return 0;
}


x86 assembly (clang, -O0):
<dec_hex>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xed1(%rip),%rdi
lea    -0x4(%rbp),%rsi
lea    -0x8(%rbp),%rdx
lea    -0xc(%rbp),%rcx
call   1040 <scanf@plt>
mov    -0x4(%rbp),%esi
mov    -0x8(%rbp),%edx
mov    -0xc(%rbp),%ecx
lea    0xebb(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dec_hex>:
sub    $0x18,%rsp
lea    0xed5(%rip),%rdi
lea    0x14(%rsp),%rsi
lea    0x10(%rsp),%rdx
lea    0xc(%rsp),%rcx
call   1040 <scanf@plt>
mov    0x14(%rsp),%esi
mov    0x10(%rsp),%edx
mov    0xc(%rsp),%ecx
lea    0xeb9(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

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

LLVM IR (-O2):
@.str = [11 x i8] c"%d, %d, %d\00"
@.str.1 = [8 x i8] c"#%x%x%x\00"
define i32 @dec_hex() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = bitcast i32* %1 to i8*
%5 = bitcast i32* %2 to i8*
%6 = bitcast i32* %3 to i8*
%7 = call i32 @scanf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i32* %1, i32* %2, i32* %3)
%8 = load i32, i32* %1
%9 = load i32, i32* %2
%10 = load i32, i32* %3
%11 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), i32 %8, i32 %9, i32 %10)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stdout;
void usage() {
  fprintf(stdout, "Unpack/integrity check tool for WebUI firmware.\n"
                  "Usage: uiextract [-cx] <input file> -o <output dir>\n"
                  "\t-c <file>        perform integrity check of <file>\n"
                  "\t-x <file>        extract <file>. Default destination is "
                  "current working dir\n"
                  "\t-o <output dir>  output to <output dir>\n");
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ec5(%rip),%rax
mov    (%rax),%edi
lea    0xedc(%rip),%rsi
call   1030 <fprintf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<usage>:
mov    0x2ec9(%rip),%rax
mov    (%rax),%edi
lea    0xee0(%rip),%rsi
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stdout = global i32 0
@.str = [271 x i8] c"Unpack/integrity check tool for WebUI firmware.\0AUsage: uiextract [-cx] <input file> -o <output dir>\0A\09-c <file> perform integrity check of <file>\0A\09-x <file> extract <file>. Default destination is current working dir\0A\09-o <output dir> output to <output dir>\0A\00"
define void @usage() {
%1 = load i32, i32* @stdout
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([271 x i8], [271 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@stdout = global i32 0
@.str = [271 x i8] c"Unpack/integrity check tool for WebUI firmware.\0AUsage: uiextract [-cx] <input file> -o <output dir>\0A\09-c <file> perform integrity check of <file>\0A\09-x <file> extract <file>. Default destination is current working dir\0A\09-o <output dir> output to <output dir>\0A\00"
define void @usage() {
%1 = load i32, i32* @stdout
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([271 x i8], [271 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int sqrt(double);
double trianglePerimeter(double side1, double side2) {
  int side3 = sqrt(side1 * side1 + side2 * side2);
  return side1 + side2 + side3;
}


x86 assembly (clang, -O0):
<trianglePerimeter>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  -0x8(%rbp),%xmm2
movsd  -0x10(%rbp),%xmm1
mulsd  -0x10(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
call   1030 <sqrt@plt>
mov    %eax,-0x14(%rbp)
movsd  -0x8(%rbp),%xmm0
addsd  -0x10(%rbp),%xmm0
cvtsi2sdl -0x14(%rbp),%xmm1
addsd  %xmm1,%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<trianglePerimeter>:
sub    $0x18,%rsp
movsd  %xmm1,0x10(%rsp)
movsd  %xmm0,0x8(%rsp)
movapd %xmm1,%xmm2
mulsd  %xmm1,%xmm2
mulsd  %xmm0,%xmm0
addsd  %xmm2,%xmm0
call   1030 <sqrt@plt>
movsd  0x8(%rsp),%xmm1
addsd  0x10(%rsp),%xmm1
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
addsd  %xmm1,%xmm0
add    $0x18,%rsp
ret

LLVM IR (-O0):
define double @trianglePerimeter(double %0, double %1) {
%3 = alloca double
%4 = alloca double
%5 = alloca i32
store double %0, double* %3
store double %1, double* %4
%6 = load double, double* %3
%7 = load double, double* %3
%8 = load double, double* %4
%9 = load double, double* %4
%10 = fmul double %8, %9
%11 = call double @llvm.fmuladd.f64(double %6, double %7, double %10)
%12 = call i32 @sqrt(double %11)
store i32 %12, i32* %5
%13 = load double, double* %3
%14 = load double, double* %4
%15 = fadd double %13, %14
%16 = load i32, i32* %5
%17 = sitofp i32 %16 to double
%18 = fadd double %15, %17
ret double %18
}

LLVM IR (-O2):
define double @trianglePerimeter(double %0, double %1) {
%3 = fmul double %1, %1
%4 = tail call double @llvm.fmuladd.f64(double %0, double %0, double %3)
%5 = tail call i32 @sqrt(double %4)
%6 = fadd double %0, %1
%7 = sitofp i32 %5 to double
%8 = fadd double %6, %7
ret double %8
}
char *stpcpy(char *dst, const char *src) {
  while ((*dst++ = *src++))
    ;
  return (dst - 1);
}


x86 assembly (clang, -O0):
<stpcpy>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x10(%rbp)
mov    (%rax),%al
mov    -0x8(%rbp),%rcx
mov    %rcx,%rdx
add    $0x1,%rdx
mov    %rdx,-0x8(%rbp)
mov    %al,(%rcx)
cmp    $0x0,%al
je     113b <stpcpy+0x3b>
jmp    110c <stpcpy+0xc>
mov    -0x8(%rbp),%rax
add    $0xffffffffffffffff,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<stpcpy>:
mov    %rdi,%rax
add    $0xffffffffffffffff,%rax
nopw   0x0(%rax,%rax,1)
movzbl (%rsi),%ecx
add    $0x1,%rsi
mov    %cl,0x1(%rax)
add    $0x1,%rax
test   %cl,%cl
jne    1110 <stpcpy+0x10>
ret

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

LLVM IR (-O2):
define i8* @stpcpy(i8* writeonly %0, i8* nocapture %1) {
br label %3
3: ; preds = %3, %2
%4 = phi i8* [ %0, %2 ], [ %8, %3 ]
%5 = phi i8* [ %1, %2 ], [ %6, %3 ]
%6 = getelementptr inbounds i8, i8* %5, i64 1
%7 = load i8, i8* %5
%8 = getelementptr inbounds i8, i8* %4, i64 1
store i8 %7, i8* %4
%9 = icmp eq i8 %7, 0
br i1 %9, label %10, label %3
10: ; preds = %3
ret i8* %4
}
/* Variables and functions */
double __nv_exp(double);
double exp(double __a) { return __nv_exp(__a); }


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

x86 assembly (clang, -O2):
<exp>:
jmp    1030 <__nv_exp@plt>

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

LLVM IR (-O2):
define double @exp(double %0) {
%2 = tail call double @__nv_exp(double %0)
ret double %2
}
int countLWS(const char *pRead) {
  const char *pStart = pRead;
  while (*pRead == ' ' || *pRead == '\t') {
    pRead++;
  }
  return pRead - pStart;
}


x86 assembly (clang, -O0):
<countLWS>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%ecx
mov    $0x1,%al
cmp    $0x20,%ecx
mov    %al,-0x11(%rbp)
je     1135 <countLWS+0x35>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x9,%eax
sete   %al
mov    %al,-0x11(%rbp)
mov    -0x11(%rbp),%al
test   $0x1,%al
jne    1145 <countLWS+0x45>
jmp    1156 <countLWS+0x56>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    1110 <countLWS+0x10>
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%rcx
sub    %rcx,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<countLWS>:
xor    %eax,%eax
jmp    1114 <countLWS+0x14>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
add    $0x1,%rax
movzbl (%rdi,%rax,1),%ecx
cmp    $0x20,%cl
je     1110 <countLWS+0x10>
cmp    $0x9,%cl
je     1110 <countLWS+0x10>
ret

LLVM IR (-O0):
define i32 @countLWS(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
store i8* %4, i8** %3
br label %5
5: ; preds = %17, %1
%6 = load i8*, i8** %2
%7 = load i8, i8* %6
%8 = sext i8 %7 to i32
%9 = icmp eq i32 %8, 32
br i1 %9, label %15, label %10
10: ; preds = %5
%11 = load i8*, i8** %2
%12 = load i8, i8* %11
%13 = sext i8 %12 to i32
%14 = icmp eq i32 %13, 9
br label %15
15: ; preds = %10, %5
%16 = phi i1 [ true, %5 ], [ %14, %10 ]
br i1 %16, label %17, label %20
17: ; preds = %15
%18 = load i8*, i8** %2
%19 = getelementptr inbounds i8, i8* %18, i32 1
store i8* %19, i8** %2
br label %5
20: ; preds = %15
%21 = load i8*, i8** %2
%22 = load i8*, i8** %3
%23 = ptrtoint i8* %21 to i64
%24 = ptrtoint i8* %22 to i64
%25 = sub i64 %23, %24
%26 = trunc i64 %25 to i32
ret i32 %26
}

LLVM IR (-O2):
define i32 @countLWS(i8* %0) {
br label %2
2: ; preds = %5, %1
%3 = phi i8* [ %0, %1 ], [ %6, %5 ]
%4 = load i8, i8* %3
switch i8 %4, label %7 [
i8 32, label %5
i8 9, label %5
]
5: ; preds = %2, %2
%6 = getelementptr inbounds i8, i8* %3, i64 1
br label %2
7: ; preds = %2
%8 = ptrtoint i8* %3 to i64
%9 = ptrtoint i8* %0 to i64
%10 = sub i64 %8, %9
%11 = trunc i64 %10 to i32
ret i32 %11
}
__attribute__((always_)) int disable_nonboot_cpus(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @disable_nonboot_cpus() {
ret i32 0
}
/* Forward declarations */
typedef struct TYPE_4__ TYPE_2__;
typedef struct TYPE_3__ TYPE_1__;

/* Type definitions */
struct TYPE_3__ {
  unsigned long serial;
};
struct TYPE_4__ {
  TYPE_1__ xcirculate;
};
typedef TYPE_2__ XEvent;

/* Variables and functions */
void set_XEvent_xcirculate_serial(void *_p, unsigned long _v) {
  ((XEvent *)_p)->xcirculate.serial = (unsigned long)_v;
}


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

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

LLVM IR (-O0):
%struct.TYPE_4__ = type { %struct.TYPE_3__ }
%struct.TYPE_3__ = type { i64 }
define void @set_XEvent_xcirculate_serial(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 = load i8*, i8** %3
%7 = bitcast i8* %6 to %struct.TYPE_4__*
%8 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %7, i32 0, i32 0
%9 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %8, i32 0, i32 0
store i64 %5, i64* %9
ret void
}

LLVM IR (-O2):
define void @set_XEvent_xcirculate_serial(i8* nocapture writeonly %0, i64 %1) {
%3 = bitcast i8* %0 to i64*
store i64 %1, i64* %3
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, ...);
void fucked_swap(int a, int b) {
  printf("entering this, it is %d (%p) %d (%p)\n", a, &a, b, &b);
  int temp = a;
  a = b;
  b = temp;
  printf("exiting this, it is %d %d\n", a, b);
}


x86 assembly (clang, -O0):
<fucked_swap>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%esi
mov    -0x8(%rbp),%ecx
lea    0xed5(%rip),%rdi
lea    -0x4(%rbp),%rdx
lea    -0x8(%rbp),%r8
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%esi
mov    -0x8(%rbp),%edx
lea    0xecd(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fucked_swap>:
push   %rax
mov    %esi,%ecx
mov    %edi,%esi
mov    %edi,0x4(%rsp)
mov    %ecx,(%rsp)
lea    0xedd(%rip),%rdi
lea    0x4(%rsp),%rdx
mov    %rsp,%r8
xor    %eax,%eax
call   1030 <printf@plt>
mov    0x4(%rsp),%edx
mov    (%rsp),%esi
mov    %esi,0x4(%rsp)
mov    %edx,(%rsp)
lea    0xedf(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
pop    %rax
ret

LLVM IR (-O0):
@.str = [38 x i8] c"entering this, it is %d (%p) %d (%p)\0A\00"
@.str.1 = [27 x i8] c"exiting this, it is %d %d\0A\00"
define void @fucked_swap(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%6 = load i32, i32* %3
%7 = load i32, i32* %4
%8 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str, i64 0, i64 0), i32 %6, i32* %3, i32 %7, i32* %4)
%9 = load i32, i32* %3
store i32 %9, i32* %5
%10 = load i32, i32* %4
store i32 %10, i32* %3
%11 = load i32, i32* %5
store i32 %11, i32* %4
%12 = load i32, i32* %3
%13 = load i32, i32* %4
%14 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0), i32 %12, i32 %13)
ret void
}

LLVM IR (-O2):
@.str = [38 x i8] c"entering this, it is %d (%p) %d (%p)\0A\00"
@.str.1 = [27 x i8] c"exiting this, it is %d %d\0A\00"
define void @fucked_swap(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str, i64 0, i64 0), i32 %0, i32* %3, i32 %1, i32* %4)
%6 = load i32, i32* %3
%7 = load i32, i32* %4
store i32 %7, i32* %3
store i32 %6, i32* %4
%8 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0), i32 %7, i32 %6)
ret void
}
/* Variables and functions */
int comb_(int, int);
int /*<<< orphan*/ printf(char *, int);
int main(void) {
  printf("%d", comb_(10, 9));
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0xa,%edi
mov    $0x9,%esi
call   1030 <comb_@plt>
lea    0xec9(%rip),%rdi
mov    %eax,%esi
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
define i32 @main() {
%1 = tail call i32 @comb_(i32 10, i32 9)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i32 0
}
int linSearch(int x, int *v, int len) {
  int i;
  for (i = 0; i < len; i++) {
    if (v[i] == x) {
      return 1;
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<linSearch>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
movl   $0x0,-0x18(%rbp)
mov    -0x18(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    1154 <linSearch+0x54>
mov    -0x10(%rbp),%rax
movslq -0x18(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
cmp    -0x8(%rbp),%eax
jne    1141 <linSearch+0x41>
movl   $0x1,-0x4(%rbp)
jmp    115b <linSearch+0x5b>
jmp    1146 <linSearch+0x46>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    1115 <linSearch+0x15>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<linSearch>:
test   %edx,%edx
jle    111e <linSearch+0x1e>
mov    %edx,%eax
xor    %ecx,%ecx
nopl   0x0(%rax,%rax,1)
cmp    %edi,(%rsi,%rcx,4)
je     1121 <linSearch+0x21>
add    $0x1,%rcx
cmp    %rcx,%rax
jne    1110 <linSearch+0x10>
xor    %eax,%eax
ret
mov    $0x1,%eax
ret

LLVM IR (-O0):
define i32 @linSearch(i32 %0, i32* %1, i32 %2) {
%4 = alloca i32
%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 0, i32* %8
br label %9
9: ; preds = %23, %3
%10 = load i32, i32* %8
%11 = load i32, i32* %7
%12 = icmp slt i32 %10, %11
br i1 %12, label %13, label %26
13: ; preds = %9
%14 = load i32*, i32** %6
%15 = load i32, i32* %8
%16 = sext i32 %15 to i64
%17 = getelementptr inbounds i32, i32* %14, i64 %16
%18 = load i32, i32* %17
%19 = load i32, i32* %5
%20 = icmp eq i32 %18, %19
br i1 %20, label %21, label %22
21: ; preds = %13
store i32 1, i32* %4
br label %27
22: ; preds = %13
br label %23
23: ; preds = %22
%24 = load i32, i32* %8
%25 = add nsw i32 %24, 1
store i32 %25, i32* %8
br label %9
26: ; preds = %9
store i32 0, i32* %4
br label %27
27: ; preds = %26, %21
%28 = load i32, i32* %4
ret i32 %28
}

LLVM IR (-O2):
define i32 @linSearch(i32 %0, i32* nocapture %1, i32 %2) {
%4 = icmp sgt i32 %2, 0
br i1 %4, label %5, label %15
5: ; preds = %3
%6 = zext i32 %2 to i64
br label %9
7: ; preds = %9
%8 = icmp eq i64 %14, %6
br i1 %8, label %15, label %9
9: ; preds = %5, %7
%10 = phi i64 [ 0, %5 ], [ %14, %7 ]
%11 = getelementptr inbounds i32, i32* %1, i64 %10
%12 = load i32, i32* %11
%13 = icmp eq i32 %12, %0
%14 = add nuw nsw i64 %10, 1
br i1 %13, label %15, label %7
15: ; preds = %9, %7, %3
%16 = phi i32 [ 0, %3 ], [ 0, %7 ], [ 1, %9 ]
ret i32 %16
}
/* Variables and functions */
char *malloc(scalar_t__);
int /*<<< orphan*/ strcpy(char *, char *);
scalar_t__ strlen(char *);
char *copy_string(char *orig) {
  if (orig == NULL)
    return NULL;
  char *ret = malloc(strlen(orig) + 1);
  strcpy(ret, orig);
  return ret;
}


x86 assembly (clang, -O0):
<copy_string>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1154 <copy_string+0x24>
movq   $0x0,-0x8(%rbp)
jmp    1182 <copy_string+0x52>
mov    -0x10(%rbp),%rdi
call   1040 <strlen@plt>
mov    %rax,%rdi
add    $0x1,%rdi
call   1050 <malloc@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <strcpy@plt>
mov    -0x18(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<copy_string>:
push   %r14
push   %rbx
push   %rax
test   %rdi,%rdi
je     115a <copy_string+0x2a>
mov    %rdi,%rbx
call   1040 <strlen@plt>
lea    0x1(%rax),%rdi
call   1050 <malloc@plt>
mov    %rax,%r14
mov    %rax,%rdi
mov    %rbx,%rsi
call   1030 <strcpy@plt>
jmp    115d <copy_string+0x2d>
xor    %r14d,%r14d
mov    %r14,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i8* @copy_string(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
%5 = load i8*, i8** %3
%6 = icmp eq i8* %5, null
br i1 %6, label %7, label %8
7: ; preds = %1
store i8* null, i8** %2
br label %17
8: ; preds = %1
%9 = load i8*, i8** %3
%10 = call i64 @strlen(i8* %9)
%11 = add nsw i64 %10, 1
%12 = call i8* @malloc(i64 %11)
store i8* %12, i8** %4
%13 = load i8*, i8** %4
%14 = load i8*, i8** %3
%15 = call i32 @strcpy(i8* %13, i8* %14)
%16 = load i8*, i8** %4
store i8* %16, i8** %2
br label %17
17: ; preds = %8, %7
%18 = load i8*, i8** %2
ret i8* %18
}

LLVM IR (-O2):
define i8* @copy_string(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %8, label %3
3: ; preds = %1
%4 = tail call i64 @strlen(i8* %0)
%5 = add nsw i64 %4, 1
%6 = tail call i8* @malloc(i64 %5)
%7 = tail call i32 @strcpy(i8* %6, i8* %0)
br label %8
8: ; preds = %1, %3
%9 = phi i8* [ %6, %3 ], [ null, %1 ]
ret i8* %9
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
char *findLine(int /*<<< orphan*/ *, char *);
int /*<<< orphan*/ sprintf(char *, char *, char *);
char *parse_subject(FILE *plr_file) {
  static char subj[1000];
  char *txt = findLine(plr_file, "Subj:");
  sprintf(subj, "%s", (txt == NULL) ? "(null)" : txt);
  return (subj);
}


x86 assembly (clang, -O0):
<parse_subject>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xec9(%rip),%rsi
call   1040 <findLine@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    115b <parse_subject+0x3b>
lea    0xeb7(%rip),%rax
mov    %rax,-0x18(%rbp)
jmp    1163 <parse_subject+0x43>
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdx
lea    0x2ed2(%rip),%rdi
lea    0xe91(%rip),%rsi
call   1030 <sprintf@plt>
lea    0x2ebf(%rip),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<parse_subject>:
push   %rax
lea    0xed8(%rip),%rsi
call   1040 <findLine@plt>
test   %rax,%rax
lea    0xecf(%rip),%rsi
cmovne %rax,%rsi
lea    0x2efe(%rip),%rdi
pop    %rax
jmp    1030 <strcpy@plt>

LLVM IR (-O0):
@parse_subject.subj = internal global [1000 x i8] zeroinitializer
@.str = [6 x i8] c"Subj:\00"
@.str.1 = [3 x i8] c"%s\00"
@.str.2 = [7 x i8] c"(null)\00"
define i8* @parse_subject(i32* %0) {
%2 = alloca i32*
%3 = alloca i8*
store i32* %0, i32** %2
%4 = load i32*, i32** %2
%5 = call i8* @findLine(i32* %4, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
store i8* %5, i8** %3
%6 = load i8*, i8** %3
%7 = icmp eq i8* %6, null
br i1 %7, label %8, label %9
8: ; preds = %1
br label %11
9: ; preds = %1
%10 = load i8*, i8** %3
br label %11
11: ; preds = %9, %8
%12 = phi i8* [ getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0), %8 ], [ %10, %9 ]
%13 = call i32 @sprintf(i8* getelementptr inbounds ([1000 x i8], [1000 x i8]* @parse_subject.subj, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %12)
ret i8* getelementptr inbounds ([1000 x i8], [1000 x i8]* @parse_subject.subj, i64 0, i64 0)
}

LLVM IR (-O2):
@parse_subject.subj = internal global [1000 x i8] zeroinitializer
@.str = [6 x i8] c"Subj:\00"
@.str.2 = [7 x i8] c"(null)\00"
define i8* @parse_subject(i32* %0) {
%2 = tail call i8* @findLine(i32* %0, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%3 = icmp eq i8* %2, null
%4 = select i1 %3, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0), i8* %2
%5 = tail call i8* @strcpy(i8* dereferenceable(1) getelementptr inbounds ([1000 x i8], [1000 x i8]* @parse_subject.subj, i64 0, i64 0), i8* dereferenceable(1) %4)
ret i8* getelementptr inbounds ([1000 x i8], [1000 x i8]* @parse_subject.subj, i64 0, i64 0)
}
/* Type definitions */
struct test_list {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ put_crlf();
int /*<<< orphan*/ reset_init();
void menu_reset_init(struct test_list *test, int *state, int *ch) {
  reset_init();
  put_crlf();
}


x86 assembly (clang, -O0):
<menu_reset_init>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    $0x0,%al
call   1030 <reset_init@plt>
mov    $0x0,%al
call   1040 <put_crlf@plt>
add    $0x20,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.test_list = type { i32 }
define void @menu_reset_init(%struct.test_list* %0, i32* %1, i32* %2) {
%4 = alloca %struct.test_list*
%5 = alloca i32*
%6 = alloca i32*
store %struct.test_list* %0, %struct.test_list** %4
store i32* %1, i32** %5
store i32* %2, i32** %6
%7 = call i32 (...) @reset_init()
%8 = call i32 (...) @put_crlf()
ret void
}

LLVM IR (-O2):
%struct.test_list = type { i32 }
define void @menu_reset_init(%struct.test_list* nocapture readnone %0, i32* nocapture readnone %1, i32* nocapture readnone %2) {
%4 = tail call i32 (...) @reset_init()
%5 = tail call i32 (...) @put_crlf()
ret void
}
/* Type definitions */
typedef int int32_t;

/* Variables and functions */
int /*<<< orphan*/ foo();
__attribute__((visibility("hidden"))) int32_t bar(void) {
  foo();
  return 1234;
}


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

x86 assembly (clang, -O2):
<bar>:
push   %rax
xor    %eax,%eax
call   1030 <foo@plt>
mov    $0x4d2,%eax
pop    %rcx
ret

LLVM IR (-O0):
define hidden i32 @bar() {
%1 = call i32 (...) @foo()
ret i32 1234
}

LLVM IR (-O2):
define hidden i32 @bar() {
%1 = tail call i32 (...) @foo()
ret i32 1234
}
/* Variables and functions */
double atof(char *);
int /*<<< orphan*/ printf(char *, double);
int main(int argc, char *argv[]) {
  char s[8] = "1234.45";
  double d;
  d = atof(s);
  printf("%f", d);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0xeca(%rip),%rax
mov    %rax,-0x18(%rbp)
lea    -0x18(%rbp),%rdi
call   1030 <atof@plt>
movsd  %xmm0,-0x20(%rbp)
movsd  -0x20(%rbp),%xmm0
lea    0xeb4(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
@__const.main.s = [8 x i8] c"1234.45\00"
@.str = [3 x i8] c"%f\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call double @atof(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @__const.main.s, i64 0, i64 0))
%4 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), double %3)
ret i32 0
}
/* Variables and functions */
int checker_read_unsigned_long_long(int, char const *, int,
                                    unsigned long long *);
int checker_read_out_unsigned_long_long(const char *name, int eof_error_flag,
                                        unsigned long long *p_val) {
  return checker_read_unsigned_long_long(1, name, eof_error_flag, p_val);
}


x86 assembly (clang, -O0):
<checker_read_out_unsigned_long_long>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rsi
mov    -0xc(%rbp),%edx
mov    -0x18(%rbp),%rcx
mov    $0x1,%edi
call   1030 <checker_read_unsigned_long_long@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<checker_read_out_unsigned_long_long>:
mov    %rdx,%rcx
mov    %esi,%edx
mov    %rdi,%rsi
mov    $0x1,%edi
jmp    1030 <checker_read_unsigned_long_long@plt>

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

LLVM IR (-O2):
define i32 @checker_read_out_unsigned_long_long(i8* %0, i32 %1, i64* %2) {
%4 = tail call i32 @checker_read_unsigned_long_long(i32 1, i8* %0, i32 %1, i64* %2)
ret i32 %4
}
/* Variables and functions */
double sqrt(int /*<<< orphan*/);
int /*<<< orphan*/ val_r(double);
double dv_dtau(double tau) {
  double r_sq = sqrt(val_r(tau));
  return r_sq / (1. + r_sq);
}


x86 assembly (clang, -O0):
<dv_dtau>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1030 <val_r@plt>
mov    %eax,%edi
call   1040 <sqrt@plt>
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  0xeb0(%rip),%xmm1
addsd  -0x10(%rbp),%xmm1
divsd  %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dv_dtau>:
push   %rax
call   1030 <val_r@plt>
mov    %eax,%edi
call   1040 <sqrt@plt>
movsd  0xecb(%rip),%xmm1
addsd  %xmm0,%xmm1
divsd  %xmm1,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @dv_dtau(double %0) {
%2 = alloca double
%3 = alloca double
store double %0, double* %2
%4 = load double, double* %2
%5 = call i32 @val_r(double %4)
%6 = call double @sqrt(i32 %5)
store double %6, double* %3
%7 = load double, double* %3
%8 = load double, double* %3
%9 = fadd double 1.000000e+00, %8
%10 = fdiv double %7, %9
ret double %10
}

LLVM IR (-O2):
define double @dv_dtau(double %0) {
%2 = tail call i32 @val_r(double %0)
%3 = tail call double @sqrt(i32 %2)
%4 = fadd double %3, 1.000000e+00
%5 = fdiv double %3, %4
ret double %5
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void wipefree(void *ptr) {
  if (ptr != NULL) {
    free(ptr);
  }
}


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

x86 assembly (clang, -O2):
<wipefree>:
test   %rdi,%rdi
je     111a <wipefree+0xa>
jmp    1030 <free@plt>
ret

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

LLVM IR (-O2):
define void @wipefree(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = tail call i32 @free(i8* %0)
br label %5
5: ; preds = %3, %1
ret void
}
double LSKeyframeAnimationFunctionEaseOutQuint(double t, double b, double c,
                                               double d) {
  return c * ((t = t / d - 1) * t * t * t * t + 1) + b;
}


x86 assembly (clang, -O0):
<LSKeyframeAnimationFunctionEaseOutQuint>:
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
movsd  -0x8(%rbp),%xmm2
divsd  -0x20(%rbp),%xmm2
movsd  0xed1(%rip),%xmm1
subsd  %xmm1,%xmm2
movsd  %xmm2,-0x8(%rbp)
mulsd  -0x8(%rbp),%xmm2
mulsd  -0x8(%rbp),%xmm2
mulsd  -0x8(%rbp),%xmm2
movsd  -0x8(%rbp),%xmm1
mulsd  %xmm1,%xmm2
movsd  0xea8(%rip),%xmm1
addsd  %xmm1,%xmm2
movsd  -0x10(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
pop    %rbp
ret

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

LLVM IR (-O0):
define double @LSKeyframeAnimationFunctionEaseOutQuint(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 = load double, double* %5
%11 = load double, double* %8
%12 = fdiv double %10, %11
%13 = fsub double %12, 1.000000e+00
store double %13, double* %5
%14 = load double, double* %5
%15 = fmul double %13, %14
%16 = load double, double* %5
%17 = fmul double %15, %16
%18 = load double, double* %5
%19 = fmul double %17, %18
%20 = load double, double* %5
%21 = call double @llvm.fmuladd.f64(double %19, double %20, double 1.000000e+00)
%22 = load double, double* %6
%23 = call double @llvm.fmuladd.f64(double %9, double %21, double %22)
ret double %23
}

LLVM IR (-O2):
define double @LSKeyframeAnimationFunctionEaseOutQuint(double %0, double %1, double %2, double %3) {
%5 = fdiv double %0, %3
%6 = fadd double %5, -1.000000e+00
%7 = fmul double %6, %6
%8 = fmul double %6, %7
%9 = fmul double %6, %8
%10 = tail call double @llvm.fmuladd.f64(double %9, double %6, double 1.000000e+00)
%11 = tail call double @llvm.fmuladd.f64(double %2, double %10, double %1)
ret double %11
}
/* Variables and functions */
int /*<<< orphan*/ test_text_wrap();
void test_text() { test_text_wrap(); }


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

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

LLVM IR (-O0):
define void @test_text() {
%1 = call i32 (...) @test_text_wrap()
ret void
}

LLVM IR (-O2):
define void @test_text() {
%1 = tail call i32 (...) @test_text_wrap()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ my_exit(int *);
void EGS_EXIT__(int *status) { my_exit(status); }


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

x86 assembly (clang, -O2):
<EGS_EXIT__>:
jmp    1030 <my_exit@plt>

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

LLVM IR (-O2):
define void @EGS_EXIT__(i32* %0) {
%2 = tail call i32 @my_exit(i32* %0)
ret void
}
char *_stpcpy_chk(char *__dest, const char *__src) {
  return __builtin___stpcpy_chk(__dest, __src,
                                __builtin_object_size(__dest, 2 > 1));
}


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

x86 assembly (clang, -O2):
<_stpcpy_chk>:
jmp    1030 <stpcpy@plt>

LLVM IR (-O0):
define i8* @_stpcpy_chk(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %3
%6 = load i8*, i8** %4
%7 = load i8*, i8** %3
%8 = call i64 @llvm.objectsize.i64.p0i8(i8* %7, i1 false, i1 true, i1 false)
%9 = call i8* @__stpcpy_chk(i8* %5, i8* %6, i64 %8)
ret i8* %9
}

LLVM IR (-O2):
define i8* @_stpcpy_chk(i8* %0, i8* %1) {
%3 = tail call i8* @stpcpy(i8* %0, i8* %1)
ret i8* %3
}
/* Type definitions */
struct node {
  int dummy;
};

/* Variables and functions */
void init(struct node **head) { *head = NULL; }


x86 assembly (clang, -O0):
<init>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movq   $0x0,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<init>:
movq   $0x0,(%rdi)
ret

LLVM IR (-O0):
%struct.node = type { i32 }
define void @init(%struct.node** %0) {
%2 = alloca %struct.node**
store %struct.node** %0, %struct.node*** %2
%3 = load %struct.node**, %struct.node*** %2
store %struct.node* null, %struct.node** %3
ret void
}

LLVM IR (-O2):
%struct.node = type { i32 }
define void @init(%struct.node** nocapture writeonly %0) {
store %struct.node* null, %struct.node** %0
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ va_list;

/* Variables and functions */
int /*<<< orphan*/ free(void *);
int /*<<< orphan*/ *strstr(void *, char *);
int ev_db_final(void *key, void *data, va_list ap) {
  free(data);
  if (strstr(key, "::") != NULL)
    free(key);
  return 0;
}


x86 assembly (clang, -O0):
<ev_db_final>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <free@plt>
mov    -0x8(%rbp),%rdi
lea    0xeb9(%rip),%rsi
call   1040 <strstr@plt>
cmp    $0x0,%rax
je     115f <ev_db_final+0x3f>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ev_db_final>:
push   %rbx
mov    %rdi,%rbx
mov    %rsi,%rdi
call   1030 <free@plt>
lea    0xecd(%rip),%rsi
mov    %rbx,%rdi
call   1040 <strstr@plt>
test   %rax,%rax
je     1148 <ev_db_final+0x28>
mov    %rbx,%rdi
call   1030 <free@plt>
xor    %eax,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"::\00"
define i32 @ev_db_final(i8* %0, i8* nocapture %1, i32 %2) {
%4 = tail call i32 @free(i8* %1)
%5 = tail call i32* @strstr(i8* dereferenceable(1) %0, i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%6 = icmp eq i32* %5, null
br i1 %6, label %9, label %7
7: ; preds = %3
%8 = tail call i32 @free(i8* %0)
br label %9
9: ; preds = %7, %3
ret i32 0
}
/* Type definitions */
struct section_list {
  int dummy;
};

/* Variables and functions */
scalar_t__ genlist_new();
struct section_list *section_list_new(void) {
  return (struct section_list *)genlist_new();
}


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

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

LLVM IR (-O0):
%struct.section_list = type { i32 }
define %struct.section_list* @section_list_new() {
%1 = call i64 (...) @genlist_new()
%2 = inttoptr i64 %1 to %struct.section_list*
ret %struct.section_list* %2
}

LLVM IR (-O2):
%struct.section_list = type { i32 }
define %struct.section_list* @section_list_new() {
%1 = tail call i64 (...) @genlist_new()
%2 = inttoptr i64 %1 to %struct.section_list*
ret %struct.section_list* %2
}
double cnorm(_Complex double z) {
  double re = creal(z);
  double im = cimag(z);
  return re * re + im * im;
}


x86 assembly (clang, -O0):
<cnorm>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x10(%rbp)
movsd  %xmm1,-0x8(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x18(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm2
movsd  -0x20(%rbp),%xmm1
mulsd  -0x20(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<cnorm>:
mulsd  %xmm1,%xmm1
mulsd  %xmm0,%xmm0
addsd  %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @cnorm(double %0, double %1) {
%3 = alloca { double, double }
%4 = alloca double
%5 = alloca double
%6 = getelementptr inbounds { double, double }, { double, double }* %3, i32 0, i32 0
store double %0, double* %6
%7 = getelementptr inbounds { double, double }, { double, double }* %3, i32 0, i32 1
store double %1, double* %7
%8 = getelementptr inbounds { double, double }, { double, double }* %3, i32 0, i32 0
%9 = load double, double* %8
%10 = getelementptr inbounds { double, double }, { double, double }* %3, i32 0, i32 1
%11 = load double, double* %10
store double %9, double* %4
%12 = getelementptr inbounds { double, double }, { double, double }* %3, i32 0, i32 0
%13 = load double, double* %12
%14 = getelementptr inbounds { double, double }, { double, double }* %3, i32 0, i32 1
%15 = load double, double* %14
store double %15, double* %5
%16 = load double, double* %4
%17 = load double, double* %4
%18 = load double, double* %5
%19 = load double, double* %5
%20 = fmul double %18, %19
%21 = call double @llvm.fmuladd.f64(double %16, double %17, double %20)
ret double %21
}

LLVM IR (-O2):
define double @cnorm(double %0, double %1) {
%3 = fmul double %1, %1
%4 = tail call double @llvm.fmuladd.f64(double %0, double %0, double %3)
ret double %4
}