xunge/DecIR huggingface dataset:
float foo(float a, float b, double c, float d, double e, float f) {
  e -= d;
  d *= e;
  return e + d;
}


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movsd  %xmm2,-0x10(%rbp)
movss  %xmm3,-0x14(%rbp)
movsd  %xmm4,-0x20(%rbp)
movss  %xmm5,-0x24(%rbp)
movss  -0x14(%rbp),%xmm0
cvtss2sd %xmm0,%xmm1
movsd  -0x20(%rbp),%xmm0
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x20(%rbp),%xmm1
movss  -0x14(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
mulsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x14(%rbp)
movsd  -0x20(%rbp),%xmm0
movss  -0x14(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
addsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo>:
cvtss2sd %xmm3,%xmm0
subsd  %xmm0,%xmm4
mulsd  %xmm4,%xmm0
cvtsd2ss %xmm0,%xmm0
cvtss2sd %xmm0,%xmm0
addsd  %xmm4,%xmm0
cvtsd2ss %xmm0,%xmm0
ret

LLVM IR (-O0):
define float @foo(float %0, float %1, double %2, float %3, double %4, float %5) {
%7 = alloca float
%8 = alloca float
%9 = alloca double
%10 = alloca float
%11 = alloca double
%12 = alloca float
store float %0, float* %7
store float %1, float* %8
store double %2, double* %9
store float %3, float* %10
store double %4, double* %11
store float %5, float* %12
%13 = load float, float* %10
%14 = fpext float %13 to double
%15 = load double, double* %11
%16 = fsub double %15, %14
store double %16, double* %11
%17 = load double, double* %11
%18 = load float, float* %10
%19 = fpext float %18 to double
%20 = fmul double %19, %17
%21 = fptrunc double %20 to float
store float %21, float* %10
%22 = load double, double* %11
%23 = load float, float* %10
%24 = fpext float %23 to double
%25 = fadd double %22, %24
%26 = fptrunc double %25 to float
ret float %26
}

LLVM IR (-O2):
define float @foo(float %0, float %1, double %2, float %3, double %4, float %5) {
%7 = fpext float %3 to double
%8 = fsub double %4, %7
%9 = fmul double %8, %7
%10 = fptrunc double %9 to float
%11 = fpext float %10 to double
%12 = fadd double %8, %11
%13 = fptrunc double %12 to float
ret float %13
}
/* Type definitions */
typedef int u_long;
typedef int id;

/* Variables and functions */
int /*<<< orphan*/ LogSetMaskLocal();
void log_DiscardLocal(int id, u_long *mask) {
  if (id >= (1) && id <= (22)) {
    *mask &= ~(1 << ((id)-1));
    LogSetMaskLocal();
  }
}


x86 assembly (clang, -O0):
<log_DiscardLocal>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x1,-0x4(%rbp)
jl     1154 <log_DiscardLocal+0x44>
cmpl   $0x16,-0x4(%rbp)
jg     1154 <log_DiscardLocal+0x44>
mov    -0x4(%rbp),%ecx
sub    $0x1,%ecx
mov    $0x1,%eax
shl    %cl,%eax
mov    %eax,%ecx
xor    $0xffffffff,%ecx
mov    -0x10(%rbp),%rax
and    (%rax),%ecx
mov    %ecx,(%rax)
mov    $0x0,%al
call   1030 <LogSetMaskLocal@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<log_DiscardLocal>:
add    $0xffffffff,%edi
cmp    $0x15,%edi
ja     112a <log_DiscardLocal+0x1a>
mov    $0xfffffffe,%eax
mov    %edi,%ecx
rol    %cl,%eax
and    %eax,(%rsi)
xor    %eax,%eax
jmp    1030 <LogSetMaskLocal@plt>
ret

LLVM IR (-O0):
define void @log_DiscardLocal(i32 %0, i32* %1) {
%3 = alloca i32
%4 = alloca i32*
store i32 %0, i32* %3
store i32* %1, i32** %4
%5 = load i32, i32* %3
%6 = icmp sge i32 %5, 1
br i1 %6, label %7, label %19
7: ; preds = %2
%8 = load i32, i32* %3
%9 = icmp sle i32 %8, 22
br i1 %9, label %10, label %19
10: ; preds = %7
%11 = load i32, i32* %3
%12 = sub nsw i32 %11, 1
%13 = shl i32 1, %12
%14 = xor i32 %13, -1
%15 = load i32*, i32** %4
%16 = load i32, i32* %15
%17 = and i32 %16, %14
store i32 %17, i32* %15
%18 = call i32 (...) @LogSetMaskLocal()
br label %19
19: ; preds = %10, %7, %2
ret void
}

LLVM IR (-O2):
define void @log_DiscardLocal(i32 %0, i32* nocapture %1) {
%3 = add i32 %0, -1
%4 = icmp ult i32 %3, 22
br i1 %4, label %5, label %11
5: ; preds = %2
%6 = shl nuw nsw i32 1, %3
%7 = xor i32 %6, -1
%8 = load i32, i32* %1
%9 = and i32 %8, %7
store i32 %9, i32* %1
%10 = tail call i32 (...) @LogSetMaskLocal()
br label %11
11: ; preds = %5, %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ system(char *);
void pauza(void) { system("pause"); }


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

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

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

LLVM IR (-O2):
@.str = [6 x i8] c"pause\00"
define void @pauza() {
%1 = tail call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ updatecursor();
int /*<<< orphan*/ vcputs0(char *);
void vcputs(char *s) {
  vcputs0(s);
  updatecursor();
}


x86 assembly (clang, -O0):
<vcputs>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <vcputs0@plt>
mov    $0x0,%al
call   1030 <updatecursor@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define void @vcputs(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @vcputs0(i8* %3)
%5 = call i32 (...) @updatecursor()
ret void
}

LLVM IR (-O2):
define void @vcputs(i8* %0) {
%2 = tail call i32 @vcputs0(i8* %0)
%3 = tail call i32 (...) @updatecursor()
ret void
}
/* Forward declarations */
typedef struct TYPE_3__ TYPE_1__;

/* Type definitions */
struct TYPE_3__ {
  int /*<<< orphan*/ error_code;
};
typedef TYPE_1__ XErrorEvent;
typedef int /*<<< orphan*/ Display;

/* Variables and functions */
int /*<<< orphan*/ XGetErrorText(int /*<<< orphan*/ *, int /*<<< orphan*/,
                                 char *, int);
int /*<<< orphan*/ printf(char *, char *);
int defaultErrorHandler(Display *d, XErrorEvent *ev) {
  char buffer[1000];
  XGetErrorText(d, ev->error_code, buffer, 1000);
  printf("Error: %s\n", buffer);
  return 0;
}


x86 assembly (clang, -O0):
<defaultErrorHandler>:
push   %rbp
mov    %rsp,%rbp
sub    $0x400,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rax
mov    (%rax),%esi
lea    -0x400(%rbp),%rdx
mov    $0x3e8,%ecx
call   1040 <XGetErrorText@plt>
lea    -0x400(%rbp),%rsi
lea    0xea4(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x400,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<defaultErrorHandler>:
push   %rbx
sub    $0x3f0,%rsp
mov    (%rsi),%esi
mov    %rsp,%rbx
mov    %rbx,%rdx
mov    $0x3e8,%ecx
call   1040 <XGetErrorText@plt>
lea    0xebf(%rip),%rdi
mov    %rbx,%rsi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x3f0,%rsp
pop    %rbx
ret

LLVM IR (-O0):
%struct.TYPE_3__ = type { i32 }
@.str = [11 x i8] c"Error: %s\0A\00"
define i32 @defaultErrorHandler(i32* %0, %struct.TYPE_3__* %1) {
%3 = alloca i32*
%4 = alloca %struct.TYPE_3__*
%5 = alloca [1000 x i8]
store i32* %0, i32** %3
store %struct.TYPE_3__* %1, %struct.TYPE_3__** %4
%6 = load i32*, i32** %3
%7 = load %struct.TYPE_3__*, %struct.TYPE_3__** %4
%8 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %7, i32 0, i32 0
%9 = load i32, i32* %8
%10 = getelementptr inbounds [1000 x i8], [1000 x i8]* %5, i64 0, i64 0
%11 = call i32 @XGetErrorText(i32* %6, i32 %9, i8* %10, i32 1000)
%12 = getelementptr inbounds [1000 x i8], [1000 x i8]* %5, i64 0, i64 0
%13 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* %12)
ret i32 0
}

LLVM IR (-O2):
%struct.TYPE_3__ = type { i32 }
@.str = [11 x i8] c"Error: %s\0A\00"
define i32 @defaultErrorHandler(i32* %0, %struct.TYPE_3__* nocapture %1) {
%3 = alloca [1000 x i8]
%4 = getelementptr inbounds [1000 x i8], [1000 x i8]* %3, i64 0, i64 0
%5 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %1, i64 0, i32 0
%6 = load i32, i32* %5
%7 = call i32 @XGetErrorText(i32* %0, i32 %6, i8* %4, i32 1000)
%8 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* %4)
ret i32 0
}
void watchDogFeed(void) {}


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

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

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

LLVM IR (-O2):
define void @watchDogFeed() {
ret void
}
void func() { static int my_static_local; }


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

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

LLVM IR (-O0):
@func.my_static_local = internal global i32 0
define void @func() {
ret void
}

LLVM IR (-O2):
define void @func() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ test_graph_traversals();
void run_tests() { test_graph_traversals(); }


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

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

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

LLVM IR (-O2):
define void @run_tests() {
%1 = tail call i32 (...) @test_graph_traversals()
ret void
}
unsigned short SIO1readCtrl16(void) { return 0; }


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

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

LLVM IR (-O0):
define zeroext i16 @SIO1readCtrl16() {
ret i16 0
}

LLVM IR (-O2):
define zeroext i16 @SIO1readCtrl16() {
ret i16 0
}
/* Variables and functions */
int /*<<< orphan*/ _exit(int);
int /*<<< orphan*/ printf(char *, char *);
int Child(void *arg) {
  char x[32] = {0};
  printf("Child:  %p\n", x);
  _exit(1);
}


x86 assembly (clang, -O0):
<Child>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
lea    -0x30(%rbp),%rdi
xor    %esi,%esi
mov    $0x20,%edx
call   1050 <memset@plt>
lea    -0x30(%rbp),%rsi
lea    0xea9(%rip),%rdi
call   1040 <printf@plt>
mov    $0x1,%edi
call   1030 <_exit@plt>

x86 assembly (clang, -O2):
<Child>:
sub    $0x28,%rsp
xorps  %xmm0,%xmm0
movaps %xmm0,0x10(%rsp)
movaps %xmm0,(%rsp)
lea    0xec9(%rip),%rdi
mov    %rsp,%rsi
call   1040 <printf@plt>
mov    $0x1,%edi
call   1030 <_exit@plt>

LLVM IR (-O0):
@.str = [12 x i8] c"Child: %p\0A\00"
define i32 @Child(i8* %0) {
%2 = alloca i8*
%3 = alloca [32 x i8]
store i8* %0, i8** %2
%4 = bitcast [32 x i8]* %3 to i8*
%5 = getelementptr inbounds [32 x i8], [32 x i8]* %3, i64 0, i64 0
%6 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* %5)
%7 = call i32 @_exit(i32 1)
unreachable
}

LLVM IR (-O2):
@.str = [12 x i8] c"Child: %p\0A\00"
define i32 @Child(i8* nocapture readnone %0) {
%2 = alloca [32 x i8]
%3 = getelementptr inbounds [32 x i8], [32 x i8]* %2, i64 0, i64 0
%4 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* %3)
%5 = call i32 @_exit(i32 1)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ codeln(char *);
int /*<<< orphan*/ comment(char *);
void commentln(char *s) {
  comment(s);
  codeln("");
}


x86 assembly (clang, -O0):
<commentln>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <comment@plt>
lea    0xec4(%rip),%rdi
call   1040 <codeln@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<commentln>:
push   %rax
call   1030 <comment@plt>
lea    0xed3(%rip),%rdi
pop    %rax
jmp    1040 <codeln@plt>

LLVM IR (-O0):
@.str = [1 x i8] zeroinitializer
define void @commentln(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @comment(i8* %3)
%5 = call i32 @codeln(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [1 x i8] zeroinitializer
define void @commentln(i8* %0) {
%2 = tail call i32 @comment(i8* %0)
%3 = tail call i32 @codeln(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Run();
int /*<<< orphan*/ ScanCommandLine(int, char **);
main(int argc, char **argv) {
  ScanCommandLine(argc, argv);
  Run();
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1040 <ScanCommandLine@plt>
mov    $0x0,%al
call   1030 <Run@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
call   1040 <ScanCommandLine@plt>
xor    %eax,%eax
call   1030 <Run@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @main(i32 %0, i8** %1) {
%3 = tail call i32 @ScanCommandLine(i32 %0, i8** %1)
%4 = tail call i32 (...) @Run()
ret i32 0
}
/* Type definitions */
struct crk5_exl_proc {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ free(struct crk5_exl_proc *);
void crk5_exl_proc_delete(struct crk5_exl_proc *exl) {
  if (!exl)
    return;
  free(exl);
}


x86 assembly (clang, -O0):
<crk5_exl_proc_delete>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    112c <crk5_exl_proc_delete+0x1c>
jmp    1135 <crk5_exl_proc_delete+0x25>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
%struct.crk5_exl_proc = type { i32 }
define void @crk5_exl_proc_delete(%struct.crk5_exl_proc* %0) {
%2 = icmp eq %struct.crk5_exl_proc* %0, null
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = tail call i32 @free(%struct.crk5_exl_proc* %0)
br label %5
5: ; preds = %1, %3
ret void
}
/* Type definitions */
typedef int pid_t;

/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int wait(int *);
void sig_child(int signo) {
  pid_t pid;
  int state;
  pid = wait(&state);
  printf("child pid[%d] terminated.\n", pid);
}


x86 assembly (clang, -O0):
<sig_child>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
lea    -0xc(%rbp),%rdi
call   1040 <wait@plt>
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%esi
lea    0xebf(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sig_child>:
push   %rax
lea    0x4(%rsp),%rdi
call   1040 <wait@plt>
lea    0xece(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
pop    %rax
ret

LLVM IR (-O0):
@.str = [27 x i8] c"child pid[%d] terminated.\0A\00"
define void @sig_child(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %2
%5 = call i32 @wait(i32* %4)
store i32 %5, i32* %3
%6 = load i32, i32* %3
%7 = call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0), i32 %6)
ret void
}

LLVM IR (-O2):
@.str = [27 x i8] c"child pid[%d] terminated.\0A\00"
define void @sig_child(i32 %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
%4 = call i32 @wait(i32* %2)
%5 = call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0), i32 %4)
ret void
}
/* Variables and functions */
double acos(double);
double ml_acos(double x) { return acos(x); }


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

x86 assembly (clang, -O2):
<ml_acos>:
jmp    1030 <acos@plt>

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

LLVM IR (-O2):
define double @ml_acos(double %0) {
%2 = tail call double @acos(double %0)
ret double %2
}
/* Variables and functions */
int yogrt_get_interval2();
int iyogrt_get_interval2__(void) { return yogrt_get_interval2(); }


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

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

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

LLVM IR (-O2):
define i32 @iyogrt_get_interval2__() {
%1 = tail call i32 (...) @yogrt_get_interval2()
ret i32 %1
}
int test_imm_34int64_highword_mem(long long *val) {
  return ((*val >> 32) & (0x34 << 0)) ? -20 : -40;
}


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

x86 assembly (clang, -O2):
<test_imm_34int64_highword_mem>:
testb  $0x34,0x4(%rdi)
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_34int64_highword_mem(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = and i64 %2, 223338299392
%4 = icmp eq i64 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
int /*<<< orphan*/ ASSERT(int);
void ADCSequenceOverflowClear(uint32_t ui32Base, uint32_t ui32SequenceNum) {
  ASSERT((ui32Base == 0x40038000) || (ui32Base == 0x40039000));
  ASSERT(ui32SequenceNum < 4);
  (*((volatile uint32_t *)(ui32Base + 0x00000010))) = 1 << ui32SequenceNum;
}


x86 assembly (clang, -O0):
<ADCSequenceOverflowClear>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    $0x1,%al
cmpl   $0x40038000,-0x4(%rbp)
mov    %al,-0x9(%rbp)
je     113d <ADCSequenceOverflowClear+0x2d>
cmpl   $0x40039000,-0x4(%rbp)
sete   %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
and    $0x1,%al
movzbl %al,%edi
call   1030 <ASSERT@plt>
cmpl   $0x4,-0x8(%rbp)
setl   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <ASSERT@plt>
mov    -0x8(%rbp),%ecx
mov    $0x1,%eax
shl    %cl,%eax
mov    %eax,%ecx
mov    -0x4(%rbp),%eax
add    $0x10,%eax
cltq
mov    %ecx,(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ADCSequenceOverflowClear>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
mov    %edi,%eax
and    $0xffffefff,%eax
xor    %edi,%edi
cmp    $0x40038000,%eax
sete   %dil
call   1030 <ASSERT@plt>
xor    %edi,%edi
cmp    $0x4,%ebx
setl   %dil
call   1030 <ASSERT@plt>
mov    $0x1,%eax
mov    %ebx,%ecx
shl    %cl,%eax
movslq %ebp,%rcx
mov    %eax,0x10(%rcx)
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define void @ADCSequenceOverflowClear(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = icmp eq i32 %5, 1073971200
br i1 %6, label %10, label %7
7: ; preds = %2
%8 = load i32, i32* %3
%9 = icmp eq i32 %8, 1073975296
br label %10
10: ; preds = %7, %2
%11 = phi i1 [ true, %2 ], [ %9, %7 ]
%12 = zext i1 %11 to i32
%13 = call i32 @ASSERT(i32 %12)
%14 = load i32, i32* %4
%15 = icmp slt i32 %14, 4
%16 = zext i1 %15 to i32
%17 = call i32 @ASSERT(i32 %16)
%18 = load i32, i32* %4
%19 = shl i32 1, %18
%20 = load i32, i32* %3
%21 = add nsw i32 %20, 16
%22 = sext i32 %21 to i64
%23 = inttoptr i64 %22 to i32*
store volatile i32 %19, i32* %23
ret void
}

LLVM IR (-O2):
define void @ADCSequenceOverflowClear(i32 %0, i32 %1) {
%3 = and i32 %0, -4097
%4 = icmp eq i32 %3, 1073971200
%5 = zext i1 %4 to i32
%6 = tail call i32 @ASSERT(i32 %5)
%7 = icmp slt i32 %1, 4
%8 = zext i1 %7 to i32
%9 = tail call i32 @ASSERT(i32 %8)
%10 = shl nuw i32 1, %1
%11 = add nsw i32 %0, 16
%12 = sext i32 %11 to i64
%13 = inttoptr i64 %12 to i32*
store volatile i32 %10, i32* %13
ret void
}
/* Variables and functions */
int /*<<< orphan*/ i430hx_write(int /*<<< orphan*/, int, int,
                                int /*<<< orphan*/ *);
void i430hx_pci_reset(void) { i430hx_write(0, 0x59, 0xf, NULL); }


x86 assembly (clang, -O0):
<i430hx_pci_reset>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
mov    $0x59,%esi
mov    $0xf,%edx
xor    %eax,%eax
mov    %eax,%ecx
call   1030 <i430hx_write@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<i430hx_pci_reset>:
xor    %edi,%edi
mov    $0x59,%esi
mov    $0xf,%edx
xor    %ecx,%ecx
jmp    1030 <i430hx_write@plt>

LLVM IR (-O0):
define void @i430hx_pci_reset() {
%1 = call i32 @i430hx_write(i32 0, i32 89, i32 15, i32* null)
ret void
}

LLVM IR (-O2):
define void @i430hx_pci_reset() {
%1 = tail call i32 @i430hx_write(i32 0, i32 89, i32 15, i32* null)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ ZLIBH_compress(char *, char const *, int);
size_t FIO_ZLIBH_compress(void *dst, size_t dstSize, const void *src,
                          size_t srcSize) {
  (void)dstSize;
  return (size_t)ZLIBH_compress((char *)dst, (const char *)src, (int)srcSize);
}


x86 assembly (clang, -O0):
<FIO_ZLIBH_compress>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    -0x20(%rbp),%rax
mov    %eax,%edx
call   1030 <ZLIBH_compress@plt>
cltq
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<FIO_ZLIBH_compress>:
push   %rax
mov    %rdx,%rsi
mov    %ecx,%edx
call   1030 <ZLIBH_compress@plt>
cltq
pop    %rcx
ret

LLVM IR (-O0):
define i64 @FIO_ZLIBH_compress(i8* %0, i64 %1, i8* %2, i64 %3) {
%5 = alloca i8*
%6 = alloca i64
%7 = alloca i8*
%8 = alloca i64
store i8* %0, i8** %5
store i64 %1, i64* %6
store i8* %2, i8** %7
store i64 %3, i64* %8
%9 = load i64, i64* %6
%10 = load i8*, i8** %5
%11 = load i8*, i8** %7
%12 = load i64, i64* %8
%13 = trunc i64 %12 to i32
%14 = call i32 @ZLIBH_compress(i8* %10, i8* %11, i32 %13)
%15 = sext i32 %14 to i64
ret i64 %15
}

LLVM IR (-O2):
define i64 @FIO_ZLIBH_compress(i8* %0, i64 %1, i8* %2, i64 %3) {
%5 = trunc i64 %3 to i32
%6 = tail call i32 @ZLIBH_compress(i8* %0, i8* %2, i32 %5)
%7 = sext i32 %6 to i64
ret i64 %7
}
/* Variables and functions */
int /*<<< orphan*/ exit_failure(char const *);
void *realloc(void *, size_t);
void *critrealloc(void *ptr, size_t size, const char *err) {
  ptr = realloc(ptr, size);
  if (!ptr)
    exit_failure(err);
  return ptr;
}


x86 assembly (clang, -O0):
<critrealloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <realloc@plt>
mov    %rax,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    1159 <critrealloc+0x39>
mov    -0x18(%rbp),%rdi
call   1040 <exit_failure@plt>
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<critrealloc>:
push   %r14
push   %rbx
push   %rax
mov    %rdx,%r14
call   1030 <realloc@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    113c <critrealloc+0x1c>
mov    %r14,%rdi
call   1040 <exit_failure@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define noalias i8* @critrealloc(i8* nocapture %0, i64 %1, i8* %2) {
%4 = tail call i8* @realloc(i8* %0, i64 %1)
%5 = icmp eq i8* %4, null
br i1 %5, label %6, label %8
6: ; preds = %3
%7 = tail call i32 @exit_failure(i8* %2)
br label %8
8: ; preds = %6, %3
ret i8* %4
}
/* Variables and functions */
int ioctl(int, unsigned int, unsigned long);
int unix_ioctl(int fd, unsigned int cmd, unsigned long arg) {
  int ret;
  ret = ioctl(fd, cmd, arg);
  return ret;
}


x86 assembly (clang, -O0):
<unix_ioctl>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    -0x10(%rbp),%rdx
call   1030 <ioctl@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<unix_ioctl>:
jmp    1030 <ioctl@plt>

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

LLVM IR (-O2):
define i32 @unix_ioctl(i32 %0, i32 %1, i64 %2) {
%4 = tail call i32 @ioctl(i32 %0, i32 %1, i64 %2)
ret i32 %4
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ SEEK_END;
int /*<<< orphan*/ SEEK_SET;
int /*<<< orphan*/ fseek(int /*<<< orphan*/ *, int, int /*<<< orphan*/);
int ftell(int /*<<< orphan*/ *);
int file_size(FILE *f) {
  int save_pos, size_of_file;
  save_pos = ftell(f);
  fseek(f, 0L, SEEK_END);
  size_of_file = ftell(f);
  fseek(f, save_pos, SEEK_SET);
  return size_of_file;
}


x86 assembly (clang, -O0):
<file_size>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <ftell@plt>
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    0x2ea5(%rip),%rax
mov    (%rax),%edx
xor    %esi,%esi
call   1040 <fseek@plt>
mov    -0x8(%rbp),%rdi
call   1030 <ftell@plt>
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    0x2e72(%rip),%rax
mov    (%rax),%edx
call   1040 <fseek@plt>
mov    -0x10(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<file_size>:
push   %rbp
push   %r14
push   %rbx
mov    %rdi,%rbx
call   1030 <ftell@plt>
mov    %eax,%r14d
mov    0x2eb2(%rip),%rax
mov    (%rax),%edx
mov    %rbx,%rdi
xor    %esi,%esi
call   1040 <fseek@plt>
mov    %rbx,%rdi
call   1030 <ftell@plt>
mov    %eax,%ebp
mov    0x2e85(%rip),%rax
mov    (%rax),%edx
mov    %rbx,%rdi
mov    %r14d,%esi
call   1040 <fseek@plt>
mov    %ebp,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
@SEEK_END = global i32 0
@SEEK_SET = global i32 0
define i32 @file_size(i32* %0) {
%2 = alloca i32*
%3 = alloca i32
%4 = alloca i32
store i32* %0, i32** %2
%5 = load i32*, i32** %2
%6 = call i32 @ftell(i32* %5)
store i32 %6, i32* %3
%7 = load i32*, i32** %2
%8 = load i32, i32* @SEEK_END
%9 = call i32 @fseek(i32* %7, i32 0, i32 %8)
%10 = load i32*, i32** %2
%11 = call i32 @ftell(i32* %10)
store i32 %11, i32* %4
%12 = load i32*, i32** %2
%13 = load i32, i32* %3
%14 = load i32, i32* @SEEK_SET
%15 = call i32 @fseek(i32* %12, i32 %13, i32 %14)
%16 = load i32, i32* %4
ret i32 %16
}

LLVM IR (-O2):
@SEEK_END = global i32 0
@SEEK_SET = global i32 0
define i32 @file_size(i32* nocapture %0) {
%2 = tail call i32 @ftell(i32* %0)
%3 = load i32, i32* @SEEK_END
%4 = tail call i32 @fseek(i32* %0, i32 0, i32 %3)
%5 = tail call i32 @ftell(i32* %0)
%6 = load i32, i32* @SEEK_SET
%7 = tail call i32 @fseek(i32* %0, i32 %2, i32 %6)
ret i32 %5
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
unsigned char *md5_file(unsigned char *, int /*<<< orphan*/ *);
unsigned char *hash_file_md5(unsigned char *out, FILE *fp) {
  return md5_file(out, fp);
}


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

x86 assembly (clang, -O2):
<hash_file_md5>:
jmp    1030 <md5_file@plt>

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

LLVM IR (-O2):
define i8* @hash_file_md5(i8* %0, i32* %1) {
%3 = tail call i8* @md5_file(i8* %0, i32* %1)
ret i8* %3
}
/* Variables and functions */
int /*<<< orphan*/ colad_tests();
int /*<<< orphan*/ colae_tests();
int /*<<< orphan*/ pilad_tests();
int /*<<< orphan*/ pilae_tests();
int /*<<< orphan*/ printf(char *);
int main() {
  printf("Starting tests\n");
  pilad_tests();
  pilae_tests();
  colad_tests();
  colae_tests();
  printf("All tests passed\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xe9a(%rip),%rdi
call   1050 <printf@plt>
mov    $0x0,%al
call   1030 <pilad_tests@plt>
mov    $0x0,%al
call   1060 <pilae_tests@plt>
mov    $0x0,%al
call   1040 <colad_tests@plt>
mov    $0x0,%al
call   1070 <colae_tests@plt>
lea    0xe82(%rip),%rdi
call   1050 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xea8(%rip),%rdi
call   1050 <puts@plt>
xor    %eax,%eax
call   1030 <pilad_tests@plt>
xor    %eax,%eax
call   1060 <pilae_tests@plt>
xor    %eax,%eax
call   1040 <colad_tests@plt>
xor    %eax,%eax
call   1070 <colae_tests@plt>
lea    0xe8f(%rip),%rdi
call   1050 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [16 x i8] c"Starting tests\0A\00"
@.str.1 = [18 x i8] c"All tests passed\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
%3 = call i32 (...) @pilad_tests()
%4 = call i32 (...) @pilae_tests()
%5 = call i32 (...) @colad_tests()
%6 = call i32 (...) @colae_tests()
%7 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [15 x i8] c"Starting tests\00"
@str.2 = [17 x i8] c"All tests passed\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 (...) @pilad_tests()
%3 = tail call i32 (...) @pilae_tests()
%4 = tail call i32 (...) @colad_tests()
%5 = tail call i32 (...) @colae_tests()
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @str.2, i64 0, i64 0))
ret i32 0
}
void fa174(void) {
P0A:
  goto P0A;
  ({
    P01A:
      goto P01A;
      ({
        P012A:
          goto P012A;
          0;
      });
    P01B:
      goto P01B;
      ({
        P013A:
          goto P013A;
          0;
      });
    P01C:
      goto P01C;
      0;
  });
a:
  ({
    P02A:
      goto P02A;
      ({
        P024A:
          goto P024A;
          0;
      });
    P02B:
      goto P02B;
      ({
        P025A:
          goto P025A;
          0;
      });
    P02C:
      goto P02C;
      0;
  });
p0C:
  goto p0C;
  goto a;
P0C:
  goto P0C;
  0;
P0D:
  goto P0D;
}


x86 assembly (clang, -O0):
<fa174>:
push   %rbp
mov    %rsp,%rbp
jmp    1104 <fa174+0x4>

x86 assembly (clang, -O2):
<fa174>:
jmp    1100 <fa174>

LLVM IR (-O0):
define void @fa174() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
br label %7
7: ; preds = %7, %0
br label %7
8: ; No predecessors!
br label %9
9: ; preds = %9, %8
br label %9
10: ; No predecessors!
br label %11
11: ; preds = %11, %10
br label %11
12: ; preds = %12
br label %12
13: ; No predecessors!
br label %14
14: ; preds = %14, %13
br label %14
15: ; preds = %15
br label %15
16: ; No predecessors!
br label %17
17: ; preds = %17, %16
br label %17
18: ; No predecessors!
br label %19
19: ; preds = %19, %18
br label %19
20: ; preds = %20
br label %20
21: ; No predecessors!
br label %22
22: ; preds = %22, %21
br label %22
23: ; preds = %23
br label %23
24: ; preds = %24
br label %24
25: ; preds = %25
br label %25
26: ; preds = %26
br label %26
}

LLVM IR (-O2):
define void @fa174() {
br label %1
1: ; preds = %1, %0
br label %1
}
float vec3_norm(const float a[3]) { return sqrt(vec3_norm2(a)); }


x86 assembly (clang, -O0):
<vec3_norm>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x0,%al
call   1030 <vec3_norm2@plt>
cvtsi2sd %eax,%xmm0
call   1040 <sqrt@plt>
cvtsd2ss %xmm0,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<vec3_norm>:
push   %rax
xor    %eax,%eax
call   1030 <vec3_norm2@plt>
cvtsi2sd %eax,%xmm0
xorpd  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jb     113c <vec3_norm+0x1c>
sqrtsd %xmm0,%xmm0
jmp    1141 <vec3_norm+0x21>
call   1040 <sqrt@plt>
cvtsd2ss %xmm0,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define float @vec3_norm(float* %0) {
%2 = alloca float*
store float* %0, float** %2
%3 = load float*, float** %2
%4 = call i32 (float*, ...) bitcast (i32 (...)* @vec3_norm2 to i32 (float*, ...)*)(float* %3)
%5 = sitofp i32 %4 to double
%6 = call double @sqrt(double %5)
%7 = fptrunc double %6 to float
ret float %7
}

LLVM IR (-O2):
define float @vec3_norm(float* %0) {
%2 = tail call i32 (float*, ...) bitcast (i32 (...)* @vec3_norm2 to i32 (float*, ...)*)(float* %0)
%3 = sitofp i32 %2 to double
%4 = tail call double @sqrt(double %3)
%5 = fptrunc double %4 to float
ret float %5
}
int test_imm_57uint64_midword_mem(unsigned long long *val) {
  return ((*val >> 16) & (0x57 << 0)) ? -20 : -40;
}


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

x86 assembly (clang, -O2):
<test_imm_57uint64_midword_mem>:
testb  $0x57,0x2(%rdi)
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_57uint64_midword_mem(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = and i64 %2, 5701632
%4 = icmp eq i64 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Type definitions */
struct timeval {
  scalar_t__ tv_usec;
  scalar_t__ tv_sec;
};

/* Variables and functions */
int /*<<< orphan*/ gettimeofday(struct timeval *, void *);
extern long long sys_millis() {
  struct timeval t;
  gettimeofday(&t, ((void *)0));
  return 1000LL * (long long)t.tv_sec + (long long)t.tv_usec / 1000LL;
}


x86 assembly (clang, -O0):
<sys_millis>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
lea    -0x10(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1030 <gettimeofday@plt>
imul   $0x3e8,-0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    $0x3e8,%ecx
cqto
idiv   %rcx
mov    %rax,%rcx
mov    -0x18(%rbp),%rax
add    %rcx,%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sys_millis>:
sub    $0x18,%rsp
lea    0x8(%rsp),%rdi
xor    %esi,%esi
call   1030 <gettimeofday@plt>
imul   $0x3e8,0x10(%rsp),%rcx
movabs $0x20c49ba5e353f7cf,%rax
9b c4 20
imulq  0x8(%rsp)
mov    %rdx,%rax
shr    $0x3f,%rax
sar    $0x7,%rdx
add    %rdx,%rax
add    %rcx,%rax
add    $0x18,%rsp
ret

LLVM IR (-O0):
%struct.timeval = type { i64, i64 }
define i64 @sys_millis() {
%1 = alloca %struct.timeval
%2 = call i32 @gettimeofday(%struct.timeval* %1, i8* null)
%3 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i32 0, i32 1
%4 = load i64, i64* %3
%5 = mul nsw i64 1000, %4
%6 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i32 0, i32 0
%7 = load i64, i64* %6
%8 = sdiv i64 %7, 1000
%9 = add nsw i64 %5, %8
ret i64 %9
}

LLVM IR (-O2):
%struct.timeval = type { i64, i64 }
define i64 @sys_millis() {
%1 = alloca %struct.timeval
%2 = bitcast %struct.timeval* %1 to i8*
%3 = call i32 @gettimeofday(%struct.timeval* %1, i8* null)
%4 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 1
%5 = load i64, i64* %4
%6 = mul nsw i64 %5, 1000
%7 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 0
%8 = load i64, i64* %7
%9 = sdiv i64 %8, 1000
%10 = add nsw i64 %9, %6
ret i64 %10
}
/* Variables and functions */
int abs(int);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, int *);
int main(void) {
  int x;
  int d;
  printf("x: ");
  scanf("%d", &x);
  d = abs(x);
  printf("d = %d\n", d);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeba(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xeb0(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1050 <scanf@plt>
mov    -0x8(%rbp),%edi
call   1030 <abs@plt>
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%esi
lea    0xe95(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xece(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1040 <scanf@plt>
mov    0x4(%rsp),%eax
mov    %eax,%esi
neg    %esi
cmovs  %eax,%esi
lea    0xeb5(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c"x: \00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [8 x i8] c"d = %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%5 = load i32, i32* %1
%6 = call i32 @llvm.abs.i32(i32 %5, i1 true)
%7 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0), i32 %6)
ret i32 0
}
/* Variables and functions */
int getofield(int, int);
scalar_t__ inlist(int, int);
int hasadjective(int obj, int adjective) {
  while (obj) {
    if (inlist(getofield(obj, 4), adjective))
      return (1);
    obj = getofield(obj, 0);
  }
  return (0);
}


x86 assembly (clang, -O0):
<hasadjective>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
cmpl   $0x0,-0x8(%rbp)
je     1177 <hasadjective+0x57>
mov    -0x8(%rbp),%edi
mov    $0x4,%esi
call   1030 <getofield@plt>
mov    %eax,%edi
mov    -0xc(%rbp),%esi
call   1040 <inlist@plt>
cmp    $0x0,%rax
je     1165 <hasadjective+0x45>
movl   $0x1,-0x4(%rbp)
jmp    117e <hasadjective+0x5e>
mov    -0x8(%rbp),%edi
xor    %esi,%esi
call   1030 <getofield@plt>
mov    %eax,-0x8(%rbp)
jmp    112e <hasadjective+0xe>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<hasadjective>:
push   %rbp
push   %r14
push   %rbx
test   %edi,%edi
je     115c <hasadjective+0x3c>
mov    %esi,%r14d
mov    %edi,%ebp
xor    %ebx,%ebx
nop
mov    %ebp,%edi
mov    $0x4,%esi
call   1030 <getofield@plt>
mov    %eax,%edi
mov    %r14d,%esi
call   1040 <inlist@plt>
test   %rax,%rax
jne    1160 <hasadjective+0x40>
mov    %ebp,%edi
xor    %esi,%esi
call   1030 <getofield@plt>
mov    %eax,%ebp
test   %eax,%eax
jne    1130 <hasadjective+0x10>
jmp    1165 <hasadjective+0x45>
xor    %ebx,%ebx
jmp    1165 <hasadjective+0x45>
mov    $0x1,%ebx
mov    %ebx,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @hasadjective(i32 %0, i32 %1) {
%3 = icmp eq i32 %0, 0
br i1 %3, label %12, label %4
4: ; preds = %2, %9
%5 = phi i32 [ %10, %9 ], [ %0, %2 ]
%6 = tail call i32 @getofield(i32 %5, i32 4)
%7 = tail call i64 @inlist(i32 %6, i32 %1)
%8 = icmp eq i64 %7, 0
br i1 %8, label %9, label %12
9: ; preds = %4
%10 = tail call i32 @getofield(i32 %5, i32 0)
%11 = icmp eq i32 %10, 0
br i1 %11, label %12, label %4
12: ; preds = %4, %9, %2
%13 = phi i32 [ 0, %2 ], [ 0, %9 ], [ 1, %4 ]
ret i32 %13
}
void gtk_plug_new_for_display() {}


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

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

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

LLVM IR (-O2):
define void @gtk_plug_new_for_display() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ hdrv_buf_fl_deinit();
int /*<<< orphan*/ net_buf_fl_deinit();
void sys_buf_deinit() {
  net_buf_fl_deinit();
  hdrv_buf_fl_deinit();
}


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

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

LLVM IR (-O0):
define void @sys_buf_deinit() {
%1 = call i32 (...) @net_buf_fl_deinit()
%2 = call i32 (...) @hdrv_buf_fl_deinit()
ret void
}

LLVM IR (-O2):
define void @sys_buf_deinit() {
%1 = tail call i32 (...) @net_buf_fl_deinit()
%2 = tail call i32 (...) @hdrv_buf_fl_deinit()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void active_vector_normal_free(void *data, size_t len) { free(data); }


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

x86 assembly (clang, -O2):
<active_vector_normal_free>:
jmp    1030 <free@plt>

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

LLVM IR (-O2):
define void @active_vector_normal_free(i8* nocapture %0, i64 %1) {
%3 = tail call i32 @free(i8* %0)
ret void
}
void fn417E() { return; }


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

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

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

LLVM IR (-O2):
define void @fn417E() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(char *);
char *get_simple_uid(char *);
int /*<<< orphan*/ write(char *, char *, char *);
void function_auname(char *auname) {
  char *uid = get_simple_uid(auname);
  write("ganttproject.gan", " resource-id=\"%s\"", uid);
  free(uid);
}


x86 assembly (clang, -O0):
<function_auname>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1050 <get_simple_uid@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdx
lea    0xeac(%rip),%rdi
lea    0xeb6(%rip),%rsi
call   1040 <write@plt>
mov    -0x10(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<function_auname>:
push   %rbx
call   1050 <get_simple_uid@plt>
mov    %rax,%rbx
lea    0xec0(%rip),%rdi
lea    0xeca(%rip),%rsi
mov    %rax,%rdx
call   1040 <write@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <free@plt>

LLVM IR (-O0):
@.str = [17 x i8] c"ganttproject.gan\00"
@.str.1 = [18 x i8] c" resource-id=\22%s\22\00"
define void @function_auname(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i8* @get_simple_uid(i8* %4)
store i8* %5, i8** %3
%6 = load i8*, i8** %3
%7 = call i32 @write(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.1, i64 0, i64 0), i8* %6)
%8 = load i8*, i8** %3
%9 = call i32 @free(i8* %8)
ret void
}

LLVM IR (-O2):
@.str = [17 x i8] c"ganttproject.gan\00"
@.str.1 = [18 x i8] c" resource-id=\22%s\22\00"
define void @function_auname(i8* %0) {
%2 = tail call i8* @get_simple_uid(i8* %0)
%3 = tail call i32 @write(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.1, i64 0, i64 0), i8* %2)
%4 = tail call i32 @free(i8* %2)
ret void
}
/* Variables and functions */
int U_WMRCORENONE_get(char *);
int U_WMRA9_get(void) { return U_WMRCORENONE_get("U_WMRA9"); }


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

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

LLVM IR (-O0):
@.str = [8 x i8] c"U_WMRA9\00"
define i32 @U_WMRA9_get() {
%1 = call i32 @U_WMRCORENONE_get(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
ret i32 %1
}

LLVM IR (-O2):
@.str = [8 x i8] c"U_WMRA9\00"
define i32 @U_WMRA9_get() {
%1 = tail call i32 @U_WMRCORENONE_get(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
ret i32 %1
}
d(x) { return x < 0 ? 0 : x > 20 ? 20 : x; }


x86 assembly (clang, -O0):
<d>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
jge    111b <d+0x1b>
xor    %eax,%eax
mov    %eax,-0x8(%rbp)
jmp    113e <d+0x3e>
cmpl   $0x14,-0x4(%rbp)
jle    1132 <d+0x32>
mov    $0x14,%eax
mov    %eax,-0xc(%rbp)
jmp    1138 <d+0x38>
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<d>:
cmp    $0x14,%edi
mov    $0x14,%ecx
cmovl  %edi,%ecx
xor    %eax,%eax
test   %ecx,%ecx
cmovns %ecx,%eax
ret

LLVM IR (-O0):
define i32 @d(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp slt i32 %3, 0
br i1 %4, label %5, label %6
5: ; preds = %1
br label %14
6: ; preds = %1
%7 = load i32, i32* %2
%8 = icmp sgt i32 %7, 20
br i1 %8, label %9, label %10
9: ; preds = %6
br label %12
10: ; preds = %6
%11 = load i32, i32* %2
br label %12
12: ; preds = %10, %9
%13 = phi i32 [ 20, %9 ], [ %11, %10 ]
br label %14
14: ; preds = %12, %5
%15 = phi i32 [ 0, %5 ], [ %13, %12 ]
ret i32 %15
}

LLVM IR (-O2):
define i32 @d(i32 %0) {
%2 = icmp slt i32 %0, 20
%3 = select i1 %2, i32 %0, i32 20
%4 = icmp sgt i32 %3, 0
%5 = select i1 %4, i32 %3, i32 0
ret i32 %5
}