xunge/DecIR huggingface dataset:
double bcd_soft(double z, double r) {
  if (z > r)
    return z - r;
  if (z < -r)
    return z + r;
  return 0.0;
}


x86 assembly (clang, -O0):
<bcd_soft>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x10(%rbp)
movsd  %xmm1,-0x18(%rbp)
movsd  -0x10(%rbp),%xmm0
ucomisd -0x18(%rbp),%xmm0
jbe    1132 <bcd_soft+0x32>
movsd  -0x10(%rbp),%xmm0
subsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    1179 <bcd_soft+0x79>
movsd  -0x10(%rbp),%xmm1
movsd  -0x18(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
ucomisd %xmm1,%xmm0
jbe    1171 <bcd_soft+0x71>
movsd  -0x10(%rbp),%xmm0
addsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    1179 <bcd_soft+0x79>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<bcd_soft>:
ucomisd %xmm1,%xmm0
jbe    110c <bcd_soft+0xc>
subsd  %xmm1,%xmm0
jmp    1126 <bcd_soft+0x26>
movapd 0xeec(%rip),%xmm3
xorpd  %xmm1,%xmm3
xorpd  %xmm2,%xmm2
ucomisd %xmm0,%xmm3
jbe    112a <bcd_soft+0x2a>
addsd  %xmm1,%xmm0
movapd %xmm0,%xmm2
movapd %xmm2,%xmm0
ret

LLVM IR (-O0):
define double @bcd_soft(double %0, double %1) {
%3 = alloca double
%4 = alloca double
%5 = alloca double
store double %0, double* %4
store double %1, double* %5
%6 = load double, double* %4
%7 = load double, double* %5
%8 = fcmp ogt double %6, %7
br i1 %8, label %9, label %13
9: ; preds = %2
%10 = load double, double* %4
%11 = load double, double* %5
%12 = fsub double %10, %11
store double %12, double* %3
br label %23
13: ; preds = %2
%14 = load double, double* %4
%15 = load double, double* %5
%16 = fneg double %15
%17 = fcmp olt double %14, %16
br i1 %17, label %18, label %22
18: ; preds = %13
%19 = load double, double* %4
%20 = load double, double* %5
%21 = fadd double %19, %20
store double %21, double* %3
br label %23
22: ; preds = %13
store double 0.000000e+00, double* %3
br label %23
23: ; preds = %22, %18, %9
%24 = load double, double* %3
ret double %24
}

LLVM IR (-O2):
define double @bcd_soft(double %0, double %1) {
%3 = fcmp ogt double %0, %1
br i1 %3, label %4, label %6
4: ; preds = %2
%5 = fsub double %0, %1
br label %11
6: ; preds = %2
%7 = fneg double %1
%8 = fcmp ogt double %7, %0
br i1 %8, label %9, label %11
9: ; preds = %6
%10 = fadd double %0, %1
br label %11
11: ; preds = %6, %9, %4
%12 = phi double [ %5, %4 ], [ %10, %9 ], [ 0.000000e+00, %6 ]
ret double %12
}
int DaysInYear(int y) {
  return y % 4 == 0 && (y % 100 || (y % 400 == 0)) ? 366 : 365;
}


x86 assembly (clang, -O0):
<DaysInYear>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    $0x4,%ecx
cltd
idiv   %ecx
xor    %eax,%eax
cmp    $0x0,%edx
mov    %al,-0x5(%rbp)
jne    1153 <DaysInYear+0x53>
mov    -0x4(%rbp),%eax
mov    $0x64,%ecx
cltd
idiv   %ecx
mov    $0x1,%al
cmp    $0x0,%edx
mov    %al,-0x6(%rbp)
jne    114d <DaysInYear+0x4d>
mov    -0x4(%rbp),%eax
mov    $0x190,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
sete   %al
mov    %al,-0x6(%rbp)
mov    -0x6(%rbp),%al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%dl
mov    $0x16d,%eax
mov    $0x16e,%ecx
test   $0x1,%dl
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<DaysInYear>:
mov    $0x16d,%eax
test   $0x3,%dil
je     110c <DaysInYear+0xc>
ret
imul   $0xc28f5c29,%edi,%ecx
add    $0x51eb850,%ecx
mov    %ecx,%edx
ror    $0x2,%edx
mov    $0x16e,%eax
cmp    $0x28f5c28,%edx
ja     110b <DaysInYear+0xb>
ror    $0x4,%ecx
cmp    $0xa3d70b,%ecx
mov    $0x16d,%eax
adc    $0x0,%eax
ret

LLVM IR (-O0):
define i32 @DaysInYear(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = srem i32 %3, 4
%5 = icmp eq i32 %4, 0
br i1 %5, label %6, label %16
6: ; preds = %1
%7 = load i32, i32* %2
%8 = srem i32 %7, 100
%9 = icmp ne i32 %8, 0
br i1 %9, label %14, label %10
10: ; preds = %6
%11 = load i32, i32* %2
%12 = srem i32 %11, 400
%13 = icmp eq i32 %12, 0
br label %14
14: ; preds = %10, %6
%15 = phi i1 [ true, %6 ], [ %13, %10 ]
br label %16
16: ; preds = %14, %1
%17 = phi i1 [ false, %1 ], [ %15, %14 ]
%18 = zext i1 %17 to i64
%19 = select i1 %17, i32 366, i32 365
ret i32 %19
}

LLVM IR (-O2):
define i32 @DaysInYear(i32 %0) {
%2 = and i32 %0, 3
%3 = icmp eq i32 %2, 0
br i1 %3, label %4, label %11
4: ; preds = %1
%5 = srem i32 %0, 100
%6 = icmp eq i32 %5, 0
br i1 %6, label %7, label %11
7: ; preds = %4
%8 = srem i32 %0, 400
%9 = icmp eq i32 %8, 0
%10 = select i1 %9, i32 366, i32 365
br label %11
11: ; preds = %4, %7, %1
%12 = phi i32 [ 365, %1 ], [ 366, %4 ], [ %10, %7 ]
ret i32 %12
}
/* Type definitions */
struct view_chat {
  int dummy;
};
struct view {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ free(struct view_chat *);
void view_chat_free(struct view *v) { free((struct view_chat *)v); }


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

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

LLVM IR (-O0):
%struct.view = type { i32 }
%struct.view_chat = type { i32 }
define void @view_chat_free(%struct.view* %0) {
%2 = alloca %struct.view*
store %struct.view* %0, %struct.view** %2
%3 = load %struct.view*, %struct.view** %2
%4 = bitcast %struct.view* %3 to %struct.view_chat*
%5 = call i32 @free(%struct.view_chat* %4)
ret void
}

LLVM IR (-O2):
%struct.view = type { i32 }
%struct.view_chat = type { i32 }
define void @view_chat_free(%struct.view* nocapture %0) {
%2 = bitcast %struct.view* %0 to %struct.view_chat*
%3 = tail call i32 @free(%struct.view_chat* %2)
ret void
}
/* Variables and functions */
int errno;
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, int, char *);
scalar_t__ fsync(int);
int /*<<< orphan*/ stderr;
char *strerror(int);
int disk_sync(int fd) {
  if (fsync(fd) != 0) {
    fprintf(stderr, "disk sync erorr (%d:%s)\n", errno, strerror(errno));
    return -1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<disk_sync>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%edi
call   1040 <fsync@plt>
cmp    $0x0,%rax
je     1194 <disk_sync+0x64>
mov    0x2e8c(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x10(%rbp)
mov    0x2e78(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0xc(%rbp)
mov    0x2e6c(%rip),%rax
mov    (%rax),%edi
call   1050 <strerror@plt>
mov    -0x10(%rbp),%edi
mov    -0xc(%rbp),%edx
mov    %rax,%rcx
lea    0xe7d(%rip),%rsi
call   1030 <fprintf@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    119b <disk_sync+0x6b>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<disk_sync>:
push   %rbp
push   %rbx
push   %rax
call   1040 <fsync@plt>
test   %rax,%rax
je     1170 <disk_sync+0x40>
mov    0x2e9c(%rip),%rax
mov    (%rax),%ebx
mov    0x2e8b(%rip),%rax
mov    (%rax),%ebp
mov    %ebp,%edi
call   1050 <strerror@plt>
lea    0xea3(%rip),%rsi
mov    %ebx,%edi
mov    %ebp,%edx
mov    %rax,%rcx
call   1030 <fprintf@plt>
mov    $0xffffffff,%eax
jmp    1172 <disk_sync+0x42>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@stderr = global i32 0
@.str = [25 x i8] c"disk sync erorr (%d:%s)\0A\00"
@errno = global i32 0
define i32 @disk_sync(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = call i64 @fsync(i32 %4)
%6 = icmp ne i64 %5, 0
br i1 %6, label %7, label %13
7: ; preds = %1
%8 = load i32, i32* @stderr
%9 = load i32, i32* @errno
%10 = load i32, i32* @errno
%11 = call i8* @strerror(i32 %10)
%12 = call i32 @fprintf(i32 %8, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), i32 %9, i8* %11)
store i32 -1, i32* %2
br label %14
13: ; preds = %1
store i32 0, i32* %2
br label %14
14: ; preds = %13, %7
%15 = load i32, i32* %2
ret i32 %15
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [25 x i8] c"disk sync erorr (%d:%s)\0A\00"
@errno = global i32 0
define i32 @disk_sync(i32 %0) {
%2 = tail call i64 @fsync(i32 %0)
%3 = icmp eq i64 %2, 0
br i1 %3, label %9, label %4
4: ; preds = %1
%5 = load i32, i32* @stderr
%6 = load i32, i32* @errno
%7 = tail call i8* @strerror(i32 %6)
%8 = tail call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), i32 %6, i8* %7)
br label %9
9: ; preds = %1, %4
%10 = phi i32 [ -1, %4 ], [ 0, %1 ]
ret i32 %10
}
void pinModeSys(int pin, int mode) { return; }


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

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

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

LLVM IR (-O2):
define void @pinModeSys(i32 %0, i32 %1) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int exec_reboot(int instanceId) {
  printf("Rebooting\n");
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [11 x i8] c"Rebooting\0A\00"
define i32 @exec_reboot(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [10 x i8] c"Rebooting\00"
define i32 @exec_reboot(i32 %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @str, i64 0, i64 0))
ret i32 0
}
unsigned int perfctr_cstatus_nractrs(unsigned int cstatus) {
  return (cstatus & 0x7F);
}


x86 assembly (clang, -O0):
<perfctr_cstatus_nractrs>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
and    $0x7f,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<perfctr_cstatus_nractrs>:
mov    %edi,%eax
and    $0x7f,%eax
ret

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

LLVM IR (-O2):
define i32 @perfctr_cstatus_nractrs(i32 %0) {
%2 = and i32 %0, 127
ret i32 %2
}
void sscal(n, sa, sx, incx) int n, incx;
double sa, *sx;
{
  int i, nincx;
  if (n <= 0)
    return;
  nincx = n * incx;
  for (i = 0; i < nincx; i += incx)
    sx[i] *= sa;
}


x86 assembly (clang, -O0):
<sscal>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movsd  %xmm0,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %edx,-0x1c(%rbp)
cmpl   $0x0,-0x4(%rbp)
jg     1122 <sscal+0x22>
jmp    1164 <sscal+0x64>
mov    -0x4(%rbp),%eax
imul   -0x1c(%rbp),%eax
mov    %eax,-0x24(%rbp)
movl   $0x0,-0x20(%rbp)
mov    -0x20(%rbp),%eax
cmp    -0x24(%rbp),%eax
jge    1164 <sscal+0x64>
movsd  -0x10(%rbp),%xmm0
mov    -0x18(%rbp),%rax
movslq -0x20(%rbp),%rcx
mulsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x1c(%rbp),%eax
add    -0x20(%rbp),%eax
mov    %eax,-0x20(%rbp)
jmp    1133 <sscal+0x33>
pop    %rbp
ret

x86 assembly (clang, -O2):
<sscal>:
test   %edi,%edi
jle    1136 <sscal+0x36>
imul   %edx,%edi
test   %edi,%edi
jle    1136 <sscal+0x36>
movslq %edx,%rax
mov    %edi,%ecx
xor    %edx,%edx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movsd  (%rsi,%rdx,8),%xmm1
mulsd  %xmm0,%xmm1
movsd  %xmm1,(%rsi,%rdx,8)
add    %rax,%rdx
cmp    %rcx,%rdx
jl     1120 <sscal+0x20>
ret

LLVM IR (-O0):
define void @sscal(i32 %0, double %1, double* %2, i32 %3) {
%5 = alloca i32
%6 = alloca double
%7 = alloca double*
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
store i32 %0, i32* %5
store double %1, double* %6
store double* %2, double** %7
store i32 %3, i32* %8
%11 = load i32, i32* %5
%12 = icmp sle i32 %11, 0
br i1 %12, label %13, label %14
13: ; preds = %4
br label %34
14: ; preds = %4
%15 = load i32, i32* %5
%16 = load i32, i32* %8
%17 = mul nsw i32 %15, %16
store i32 %17, i32* %10
store i32 0, i32* %9
br label %18
18: ; preds = %30, %14
%19 = load i32, i32* %9
%20 = load i32, i32* %10
%21 = icmp slt i32 %19, %20
br i1 %21, label %22, label %34
22: ; preds = %18
%23 = load double, double* %6
%24 = load double*, double** %7
%25 = load i32, i32* %9
%26 = sext i32 %25 to i64
%27 = getelementptr inbounds double, double* %24, i64 %26
%28 = load double, double* %27
%29 = fmul double %28, %23
store double %29, double* %27
br label %30
30: ; preds = %22
%31 = load i32, i32* %8
%32 = load i32, i32* %9
%33 = add nsw i32 %32, %31
store i32 %33, i32* %9
br label %18
34: ; preds = %13, %18
ret void
}

LLVM IR (-O2):
define void @sscal(i32 %0, double %1, double* nocapture %2, i32 %3) {
%5 = icmp slt i32 %0, 1
br i1 %5, label %19, label %6
6: ; preds = %4
%7 = mul nsw i32 %3, %0
%8 = icmp sgt i32 %7, 0
br i1 %8, label %9, label %19
9: ; preds = %6
%10 = sext i32 %3 to i64
%11 = zext i32 %7 to i64
br label %12
12: ; preds = %9, %12
%13 = phi i64 [ 0, %9 ], [ %17, %12 ]
%14 = getelementptr inbounds double, double* %2, i64 %13
%15 = load double, double* %14
%16 = fmul double %15, %1
store double %16, double* %14
%17 = add i64 %13, %10
%18 = icmp slt i64 %17, %11
br i1 %18, label %12, label %19
19: ; preds = %12, %6, %4
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, unsigned int);
void *malloc(size_t);
int /*<<< orphan*/ stderr;
void *xmalloc(size_t size) {
  void *ptr = malloc(size);
  if (!ptr) {
    fprintf(stderr, "Out of memory, malloc failed tried to allocate %u bytes\n",
            (unsigned int)size);
    exit(1);
  }
  return ptr;
}


x86 assembly (clang, -O0):
<xmalloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <malloc@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1179 <xmalloc+0x49>
mov    0x2e85(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rax
mov    %eax,%edx
lea    0xe96(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1050 <exit@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xmalloc>:
push   %rbx
mov    %rdi,%rbx
call   1040 <malloc@plt>
test   %rax,%rax
je     1140 <xmalloc+0x10>
pop    %rbx
ret
mov    0x2e99(%rip),%rax
mov    (%rax),%edi
lea    0xeb0(%rip),%rsi
mov    %ebx,%edx
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [57 x i8] c"Out of memory, malloc failed tried to allocate %u bytes\0A\00"
define i8* @xmalloc(i64 %0) {
%2 = alloca i64
%3 = alloca i8*
store i64 %0, i64* %2
%4 = load i64, i64* %2
%5 = call i8* @malloc(i64 %4)
store i8* %5, i8** %3
%6 = load i8*, i8** %3
%7 = icmp ne i8* %6, null
br i1 %7, label %14, label %8
8: ; preds = %1
%9 = load i32, i32* @stderr
%10 = load i64, i64* %2
%11 = trunc i64 %10 to i32
%12 = call i32 @fprintf(i32 %9, i8* getelementptr inbounds ([57 x i8], [57 x i8]* @.str, i64 0, i64 0), i32 %11)
%13 = call i32 @exit(i32 1)
unreachable
14: ; preds = %1
%15 = load i8*, i8** %3
ret i8* %15
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [57 x i8] c"Out of memory, malloc failed tried to allocate %u bytes\0A\00"
define noalias i8* @xmalloc(i64 %0) {
%2 = tail call i8* @malloc(i64 %0)
%3 = icmp eq i8* %2, null
br i1 %3, label %4, label %9
4: ; preds = %1
%5 = load i32, i32* @stderr
%6 = trunc i64 %0 to i32
%7 = tail call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([57 x i8], [57 x i8]* @.str, i64 0, i64 0), i32 %6)
%8 = tail call i32 @exit(i32 1)
unreachable
9: ; preds = %1
ret i8* %2
}
/* Variables and functions */
int /*<<< orphan*/ scanf(char *, int *, int *);
int *read_slice_dimension() {
  static int loaf_dimension[2] = {0};
  scanf("%i %i", &loaf_dimension[0], &loaf_dimension[1]);
  return loaf_dimension;
}


x86 assembly (clang, -O0):
<read_slice_dimension>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
lea    0x2f0a(%rip),%rsi
mov    %rsi,%rdx
add    $0x4,%rdx
call   1030 <scanf@plt>
lea    0x2ef7(%rip),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<read_slice_dimension>:
push   %rbx
lea    0xee8(%rip),%rdi
lea    0x2f0d(%rip),%rbx
lea    0x2f0a(%rip),%rdx
mov    %rbx,%rsi
call   1030 <scanf@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@read_slice_dimension.loaf_dimension = internal global [2 x i32] zeroinitializer
@.str = [6 x i8] c"%i %i\00"
define i32* @read_slice_dimension() {
%1 = call i32 @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32* getelementptr inbounds ([2 x i32], [2 x i32]* @read_slice_dimension.loaf_dimension, i64 0, i64 0), i32* getelementptr inbounds ([2 x i32], [2 x i32]* @read_slice_dimension.loaf_dimension, i64 0, i64 1))
ret i32* getelementptr inbounds ([2 x i32], [2 x i32]* @read_slice_dimension.loaf_dimension, i64 0, i64 0)
}

LLVM IR (-O2):
@read_slice_dimension.loaf_dimension = internal global [2 x i32] zeroinitializer
@.str = [6 x i8] c"%i %i\00"
define i32* @read_slice_dimension() {
%1 = tail call i32 @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32* getelementptr inbounds ([2 x i32], [2 x i32]* @read_slice_dimension.loaf_dimension, i64 0, i64 0), i32* getelementptr inbounds ([2 x i32], [2 x i32]* @read_slice_dimension.loaf_dimension, i64 0, i64 1))
ret i32* getelementptr inbounds ([2 x i32], [2 x i32]* @read_slice_dimension.loaf_dimension, i64 0, i64 0)
}
void ft_striteri(char *str, void (*f)(unsigned int, char *)) {
  unsigned int i;
  if (!str || !f)
    return;
  i = 0;
  while (*str != '\0') {
    f(i, str);
    i++;
    str++;
  }
}


x86 assembly (clang, -O0):
<ft_striteri>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1126 <ft_striteri+0x26>
cmpq   $0x0,-0x10(%rbp)
jne    112b <ft_striteri+0x2b>
jmp    1169 <ft_striteri+0x69>
movl   $0x0,-0x14(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     1169 <ft_striteri+0x69>
mov    -0x10(%rbp),%rax
mov    -0x14(%rbp),%edi
mov    -0x8(%rbp),%rsi
call   *%rax
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    1132 <ft_striteri+0x32>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_striteri>:
push   %r15
push   %r14
push   %rbx
test   %rdi,%rdi
je     1135 <ft_striteri+0x35>
mov    %rsi,%r14
test   %rsi,%rsi
je     1135 <ft_striteri+0x35>
mov    %rdi,%r15
cmpb   $0x0,(%rdi)
je     1135 <ft_striteri+0x35>
xor    %ebx,%ebx
nopl   0x0(%rax)
lea    (%r15,%rbx,1),%rsi
mov    %ebx,%edi
call   *%r14
cmpb   $0x0,0x1(%r15,%rbx,1)
lea    0x1(%rbx),%rbx
jne    1120 <ft_striteri+0x20>
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
define void @ft_striteri(i8* %0, void (i32, i8*)* %1) {
%3 = icmp ne i8* %0, null
%4 = icmp ne void (i32, i8*)* %1, null
%5 = and i1 %3, %4
br i1 %5, label %6, label %16
6: ; preds = %2
%7 = load i8, i8* %0
%8 = icmp eq i8 %7, 0
br i1 %8, label %16, label %9
9: ; preds = %6, %9
%10 = phi i32 [ %12, %9 ], [ 0, %6 ]
%11 = phi i8* [ %13, %9 ], [ %0, %6 ]
tail call void %1(i32 %10, i8* %11)
%12 = add i32 %10, 1
%13 = getelementptr inbounds i8, i8* %11, i64 1
%14 = load i8, i8* %13
%15 = icmp eq i8 %14, 0
br i1 %15, label %16, label %9
16: ; preds = %9, %6, %2
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ __m128i;

/* Variables and functions */
void __attribute__((__always___, __nodebug__))
_mm_store_si128(__m128i *p, __m128i b) {
  *p = b;
}


x86 assembly (clang, -O0):
<_mm_store_si128>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<_mm_store_si128>:
mov    %esi,(%rdi)
ret

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

LLVM IR (-O2):
define void @_mm_store_si128(i32* nocapture writeonly %0, i32 %1) {
store i32 %1, i32* %0
ret void
}
/* Variables and functions */
int /*<<< orphan*/ bar();
int /*<<< orphan*/ printf(char *);
void foo() {
  printf("In foo()\n");
  bar();
}


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1040 <printf@plt>
mov    $0x0,%al
call   1030 <bar@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <bar@plt>

LLVM IR (-O0):
@.str = [10 x i8] c"In foo()\0A\00"
define void @foo() {
%1 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
%2 = call i32 (...) @bar()
ret void
}

LLVM IR (-O2):
@str = [9 x i8] c"In foo()\00"
define void @foo() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 (...) @bar()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ __ctype_init();
char **__environ;
int /*<<< orphan*/ __libc_init(int, char **, char **);
void init(int *data) {
  int argc = *data;
  char **argv = (void *)(data + 1);
  char **envp = &argv[argc + 1];
  __environ = envp;
  __libc_init(argc, argv, envp);
  __ctype_init();
}


x86 assembly (clang, -O0):
<init>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rax
add    $0x4,%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    -0xc(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
shl    $0x3,%rcx
add    %rcx,%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rcx
mov    0x2e94(%rip),%rax
mov    %rcx,(%rax)
mov    -0xc(%rbp),%edi
mov    -0x18(%rbp),%rsi
mov    -0x20(%rbp),%rdx
call   1040 <__libc_init@plt>
mov    $0x0,%al
call   1030 <__ctype_init@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<init>:
push   %rax
movslq (%rdi),%rax
lea    (%rdi,%rax,8),%rdx
add    $0xc,%rdx
lea    0x4(%rdi),%rsi
mov    0x2ec1(%rip),%rcx
mov    %rdx,(%rcx)
mov    %eax,%edi
call   1040 <__libc_init@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <__ctype_init@plt>

LLVM IR (-O0):
@__environ = global i8** null
define void @init(i32* %0) {
%2 = alloca i32*
%3 = alloca i32
%4 = alloca i8**
%5 = alloca i8**
store i32* %0, i32** %2
%6 = load i32*, i32** %2
%7 = load i32, i32* %6
store i32 %7, i32* %3
%8 = load i32*, i32** %2
%9 = getelementptr inbounds i32, i32* %8, i64 1
%10 = bitcast i32* %9 to i8*
%11 = bitcast i8* %10 to i8**
store i8** %11, i8*** %4
%12 = load i8**, i8*** %4
%13 = load i32, i32* %3
%14 = add nsw i32 %13, 1
%15 = sext i32 %14 to i64
%16 = getelementptr inbounds i8*, i8** %12, i64 %15
store i8** %16, i8*** %5
%17 = load i8**, i8*** %5
store i8** %17, i8*** @__environ
%18 = load i32, i32* %3
%19 = load i8**, i8*** %4
%20 = load i8**, i8*** %5
%21 = call i32 @__libc_init(i32 %18, i8** %19, i8** %20)
%22 = call i32 (...) @__ctype_init()
ret void
}

LLVM IR (-O2):
@__environ = global i8** null
define void @init(i32* %0) {
%2 = load i32, i32* %0
%3 = getelementptr inbounds i32, i32* %0, i64 1
%4 = bitcast i32* %3 to i8**
%5 = add nsw i32 %2, 1
%6 = sext i32 %5 to i64
%7 = getelementptr inbounds i8*, i8** %4, i64 %6
store i8** %7, i8*** @__environ
%8 = tail call i32 @__libc_init(i32 %2, i8** %4, i8** %7)
%9 = tail call i32 (...) @__ctype_init()
ret void
}
/* Variables and functions */
char *U_WMRCORENONE_set(char *);
char *U_WMRC0_set(void) { return U_WMRCORENONE_set("U_WMRC0"); }


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

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

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

LLVM IR (-O2):
@.str = [8 x i8] c"U_WMRC0\00"
define i8* @U_WMRC0_set() {
%1 = tail call i8* @U_WMRCORENONE_set(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
ret i8* %1
}
/* Variables and functions */
int /*<<< orphan*/ gmvwrite_face_data(int, char *, char *, char *);
void fgmvwrite_face_data_(int *nverts, char *nodeids, char *cellid1,
                          char *cellid2) {
  gmvwrite_face_data(*nverts, nodeids, cellid1, cellid2);
}


x86 assembly (clang, -O0):
<fgmvwrite_face_data_>:
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),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
call   1030 <gmvwrite_face_data@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fgmvwrite_face_data_>:
mov    (%rdi),%edi
jmp    1030 <gmvwrite_face_data@plt>

LLVM IR (-O0):
define void @fgmvwrite_face_data_(i32* %0, i8* %1, i8* %2, i8* %3) {
%5 = alloca i32*
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i8*
store i32* %0, i32** %5
store i8* %1, i8** %6
store i8* %2, i8** %7
store i8* %3, i8** %8
%9 = load i32*, i32** %5
%10 = load i32, i32* %9
%11 = load i8*, i8** %6
%12 = load i8*, i8** %7
%13 = load i8*, i8** %8
%14 = call i32 @gmvwrite_face_data(i32 %10, i8* %11, i8* %12, i8* %13)
ret void
}

LLVM IR (-O2):
define void @fgmvwrite_face_data_(i32* nocapture %0, i8* %1, i8* %2, i8* %3) {
%5 = load i32, i32* %0
%6 = tail call i32 @gmvwrite_face_data(i32 %5, i8* %1, i8* %2, i8* %3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ plug_sendf(char *, scalar_t__);
int /*<<< orphan*/ plug_timer_reg(scalar_t__, void (*)(void *),
                                  int /*<<< orphan*/ *);
scalar_t__ time(int /*<<< orphan*/ *);
void test_send_ping(void *t) {
  plug_sendf("PING :%d\r\n", time(NULL));
  plug_timer_reg(time(NULL) + 10 * 60, test_send_ping, NULL);
}


x86 assembly (clang, -O0):
<test_send_ping>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
xor    %eax,%eax
mov    %eax,%edi
call   1040 <time@plt>
mov    %rax,%rsi
lea    0xeb1(%rip),%rdi
call   1050 <plug_sendf@plt>
xor    %eax,%eax
mov    %eax,%edi
call   1040 <time@plt>
mov    %rax,%rdi
add    $0x258,%rdi
mov    0x2e7a(%rip),%rsi
xor    %eax,%eax
mov    %eax,%edx
call   1030 <plug_timer_reg@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_send_ping>:
push   %rax
xor    %edi,%edi
call   1040 <time@plt>
lea    0xec1(%rip),%rdi
mov    %rax,%rsi
call   1050 <plug_sendf@plt>
xor    %edi,%edi
call   1040 <time@plt>
lea    0x258(%rax),%rdi
mov    0x2e8c(%rip),%rsi
xor    %edx,%edx
pop    %rax
jmp    1030 <plug_timer_reg@plt>

LLVM IR (-O0):
@.str = [11 x i8] c"PING :%d\0D\0A\00"
define void @test_send_ping(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i64 @time(i32* null)
%4 = call i32 @plug_sendf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i64 %3)
%5 = call i64 @time(i32* null)
%6 = add nsw i64 %5, 600
%7 = call i32 @plug_timer_reg(i64 %6, void (i8*)* @test_send_ping, i32* null)
ret void
}

LLVM IR (-O2):
@.str = [11 x i8] c"PING :%d\0D\0A\00"
define void @test_send_ping(i8* nocapture readnone %0) {
%2 = tail call i64 @time(i32* null)
%3 = tail call i32 @plug_sendf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i64 %2)
%4 = tail call i64 @time(i32* null)
%5 = add nsw i64 %4, 600
%6 = tail call i32 @plug_timer_reg(i64 %5, void (i8*)* @test_send_ping, i32* null)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ list2calc(char *, int);
void GenerateBinaryCode(int nBits) { list2calc("", nBits); }


x86 assembly (clang, -O0):
<GenerateBinaryCode>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%esi
lea    0xedb(%rip),%rdi
call   1030 <list2calc@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<GenerateBinaryCode>:
mov    %edi,%esi
lea    0xee7(%rip),%rdi
jmp    1030 <list2calc@plt>

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

LLVM IR (-O2):
@.str = [1 x i8] zeroinitializer
define void @GenerateBinaryCode(i32 %0) {
%2 = tail call i32 @list2calc(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0), i32 %0)
ret void
}
int find_network_newline(char *buf, int inbuf) {
  int i;
  for (i = 0; i <= inbuf; i++) {
    if (buf[i] == '\n') {
      return i;
    }
  }
  return -1;
}


x86 assembly (clang, -O0):
<find_network_newline>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
movl   $0x0,-0x18(%rbp)
mov    -0x18(%rbp),%eax
cmp    -0x14(%rbp),%eax
jg     1151 <find_network_newline+0x51>
mov    -0x10(%rbp),%rax
movslq -0x18(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0xa,%eax
jne    113e <find_network_newline+0x3e>
mov    -0x18(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1158 <find_network_newline+0x58>
jmp    1143 <find_network_newline+0x43>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    1112 <find_network_newline+0x12>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<find_network_newline>:
mov    $0xffffffff,%eax
test   %esi,%esi
js     111f <find_network_newline+0x1f>
add    $0x1,%esi
xor    %ecx,%ecx
xchg   %ax,%ax
cmpb   $0xa,(%rdi,%rcx,1)
je     1120 <find_network_newline+0x20>
add    $0x1,%rcx
cmp    %rcx,%rsi
jne    1110 <find_network_newline+0x10>
ret
mov    %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @find_network_newline(i8* nocapture %0, i32 %1) {
%3 = icmp slt i32 %1, 0
br i1 %3, label %17, label %4
4: ; preds = %2
%5 = add nuw i32 %1, 1
%6 = zext i32 %5 to i64
br label %7
7: ; preds = %4, %12
%8 = phi i64 [ 0, %4 ], [ %13, %12 ]
%9 = getelementptr inbounds i8, i8* %0, i64 %8
%10 = load i8, i8* %9
%11 = icmp eq i8 %10, 10
br i1 %11, label %15, label %12
12: ; preds = %7
%13 = add nuw nsw i64 %8, 1
%14 = icmp eq i64 %13, %6
br i1 %14, label %17, label %7
15: ; preds = %7
%16 = trunc i64 %8 to i32
br label %17
17: ; preds = %12, %15, %2
%18 = phi i32 [ -1, %2 ], [ %16, %15 ], [ -1, %12 ]
ret i32 %18
}
long double remainerl(long double x, long double y) {
  long double result;
  return result;
}


x86 assembly (clang, -O0):
<remainerl>:
push   %rbp
mov    %rsp,%rbp
fldt   0x20(%rbp)
fldt   0x10(%rbp)
fstpt  -0x10(%rbp)
fstpt  -0x20(%rbp)
fldt   -0x30(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
define x86_fp80 @remainerl(x86_fp80 %0, x86_fp80 %1) {
%3 = alloca x86_fp80
%4 = alloca x86_fp80
%5 = alloca x86_fp80
store x86_fp80 %0, x86_fp80* %3
store x86_fp80 %1, x86_fp80* %4
%6 = load x86_fp80, x86_fp80* %5
ret x86_fp80 %6
}

LLVM IR (-O2):
define x86_fp80 @remainerl(x86_fp80 %0, x86_fp80 %1) {
ret x86_fp80 undef
}
/* Variables and functions */
int /*<<< orphan*/ strncpy(char *, char *, int);
int get_plugin_info(int opcode, char *buf, int buflen) {
  switch (opcode) {
  case 0:
    strncpy(buf, "audio postprocess plugin for Julius", buflen);
    break;
  }
  return 0;
}


x86 assembly (clang, -O0):
<get_plugin_info>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x4(%rbp),%eax
test   %eax,%eax
jne    1145 <get_plugin_info+0x35>
jmp    1132 <get_plugin_info+0x22>
mov    -0x10(%rbp),%rdi
mov    -0x14(%rbp),%edx
lea    0xec0(%rip),%rsi
call   1030 <strncpy@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_plugin_info>:
test   %edi,%edi
je     1117 <get_plugin_info+0x7>
xor    %eax,%eax
ret
push   %rax
lea    0xee1(%rip),%rax
mov    %rsi,%rdi
mov    %rax,%rsi
call   1030 <strncpy@plt>
add    $0x8,%rsp
xor    %eax,%eax
ret

LLVM IR (-O0):
@.str = [36 x i8] c"audio postprocess plugin for Julius\00"
define i32 @get_plugin_info(i32 %0, i8* %1, i32 %2) {
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i32
store i32 %0, i32* %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%7 = load i32, i32* %4
switch i32 %7, label %12 [
i32 0, label %8
]
8: ; preds = %3
%9 = load i8*, i8** %5
%10 = load i32, i32* %6
%11 = call i32 @strncpy(i8* %9, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0), i32 %10)
br label %12
12: ; preds = %3, %8
ret i32 0
}

LLVM IR (-O2):
@.str = [36 x i8] c"audio postprocess plugin for Julius\00"
define i32 @get_plugin_info(i32 %0, i8* %1, i32 %2) {
%4 = icmp eq i32 %0, 0
br i1 %4, label %5, label %7
5: ; preds = %3
%6 = tail call i32 @strncpy(i8* %1, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0), i32 %2)
br label %7
7: ; preds = %3, %5
ret i32 0
}
void ath_dynack_node_init(struct ath_hw *ah, struct ath_node *an) {}


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

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

LLVM IR (-O0):
%struct.ath_hw = type opaque
%struct.ath_node = type opaque
define void @ath_dynack_node_init(%struct.ath_hw* %0, %struct.ath_node* %1) {
%3 = alloca %struct.ath_hw*
%4 = alloca %struct.ath_node*
store %struct.ath_hw* %0, %struct.ath_hw** %3
store %struct.ath_node* %1, %struct.ath_node** %4
ret void
}

LLVM IR (-O2):
%struct.ath_hw = type opaque
%struct.ath_node = type opaque
define void @ath_dynack_node_init(%struct.ath_hw* nocapture %0, %struct.ath_node* nocapture %1) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
void print_usage(char *file) {
  printf("Usage:\n");
  printf("%s <r8 | r16 | r32> <phy addr> [num]\n", file);
  printf("%s <w8 | w16 | w32> <phy addr> <val>\n", file);
}


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

x86 assembly (clang, -O2):
<print_usage>:
push   %rbx
mov    %rdi,%rbx
lea    0xf21(%rip),%rdi
call   1030 <puts@plt>
lea    0xec9(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xede(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
pop    %rbx
jmp    1040 <printf@plt>

LLVM IR (-O0):
@.str = [8 x i8] c"Usage:\0A\00"
@.str.1 = [38 x i8] c"%s <r8 | r16 | r32> <phy addr> [num]\0A\00"
@.str.2 = [38 x i8] c"%s <w8 | w16 | w32> <phy addr> <val>\0A\00"
define void @print_usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
%4 = load i8*, i8** %2
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.1, i64 0, i64 0), i8* %4)
%6 = load i8*, i8** %2
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.2, i64 0, i64 0), i8* %6)
ret void
}

LLVM IR (-O2):
@.str.1 = [38 x i8] c"%s <r8 | r16 | r32> <phy addr> [num]\0A\00"
@.str.2 = [38 x i8] c"%s <w8 | w16 | w32> <phy addr> <val>\0A\00"
@str = [7 x i8] c"Usage:\00"
define void @print_usage(i8* %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @str, i64 0, i64 0))
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([38 x i8], [38 x i8]* @.str.1, i64 0, i64 0), i8* %0)
%4 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([38 x i8], [38 x i8]* @.str.2, i64 0, i64 0), i8* %0)
ret void
}
/* Type definitions */
struct timespec {
  int tv_sec;
  int tv_nsec;
};
typedef int int64_t;

/* Variables and functions */
int /*<<< orphan*/ CLOCK_MONOTONIC;
scalar_t__ clock_gettime(int /*<<< orphan*/, struct timespec *);
int64_t mwsp_get_time() {
  struct timespec tm;
  if (clock_gettime(CLOCK_MONOTONIC, &tm) < 0) {
    return -1;
  }
  return ((tm.tv_sec * 1000000000) + tm.tv_nsec);
}


x86 assembly (clang, -O0):
<mwsp_get_time>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    0x2ec9(%rip),%rax
mov    (%rax),%edi
lea    -0x10(%rbp),%rsi
call   1030 <clock_gettime@plt>
cmp    $0x0,%rax
jge    1140 <mwsp_get_time+0x30>
movl   $0xffffffff,-0x4(%rbp)
jmp    114d <mwsp_get_time+0x3d>
imul   $0x3b9aca00,-0x10(%rbp),%eax
add    -0xc(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mwsp_get_time>:
push   %rax
mov    0x2ed0(%rip),%rax
mov    (%rax),%edi
mov    %rsp,%rsi
call   1030 <clock_gettime@plt>
imul   $0x3b9aca00,(%rsp),%ecx
add    0x4(%rsp),%ecx
test   %rax,%rax
mov    $0xffffffff,%eax
cmovns %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.timespec = type { i32, i32 }
@CLOCK_MONOTONIC = global i32 0
define i32 @mwsp_get_time() {
%1 = alloca i32
%2 = alloca %struct.timespec
%3 = load i32, i32* @CLOCK_MONOTONIC
%4 = call i64 @clock_gettime(i32 %3, %struct.timespec* %2)
%5 = icmp slt i64 %4, 0
br i1 %5, label %6, label %7
6: ; preds = %0
store i32 -1, i32* %1
br label %14
7: ; preds = %0
%8 = getelementptr inbounds %struct.timespec, %struct.timespec* %2, i32 0, i32 0
%9 = load i32, i32* %8
%10 = mul nsw i32 %9, 1000000000
%11 = getelementptr inbounds %struct.timespec, %struct.timespec* %2, i32 0, i32 1
%12 = load i32, i32* %11
%13 = add nsw i32 %10, %12
store i32 %13, i32* %1
br label %14
14: ; preds = %7, %6
%15 = load i32, i32* %1
ret i32 %15
}

LLVM IR (-O2):
%struct.timespec = type { i32, i32 }
@CLOCK_MONOTONIC = global i32 0
define i32 @mwsp_get_time() {
%1 = alloca %struct.timespec
%2 = bitcast %struct.timespec* %1 to i8*
%3 = load i32, i32* @CLOCK_MONOTONIC
%4 = call i64 @clock_gettime(i32 %3, %struct.timespec* %1)
%5 = icmp slt i64 %4, 0
%6 = getelementptr inbounds %struct.timespec, %struct.timespec* %1, i64 0, i32 0
%7 = load i32, i32* %6
%8 = mul nsw i32 %7, 1000000000
%9 = getelementptr inbounds %struct.timespec, %struct.timespec* %1, i64 0, i32 1
%10 = load i32, i32* %9
%11 = add nsw i32 %8, %10
%12 = select i1 %5, i32 -1, i32 %11
ret i32 %12
}
struct file *get_mm_exe_file(struct mm_struct *mm) {
  return ((void *)0);
}


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

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

LLVM IR (-O0):
%struct.file = type opaque
%struct.mm_struct = type opaque
define %struct.file* @get_mm_exe_file(%struct.mm_struct* %0) {
%2 = alloca %struct.mm_struct*
store %struct.mm_struct* %0, %struct.mm_struct** %2
ret %struct.file* null
}

LLVM IR (-O2):
%struct.file = type opaque
%struct.mm_struct = type opaque
define noalias %struct.file* @get_mm_exe_file(%struct.mm_struct* nocapture readnone %0) {
ret %struct.file* null
}
/* Variables and functions */
int /*<<< orphan*/ block_signals();
void timer_lock(void) { block_signals(); }


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

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

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

LLVM IR (-O2):
define void @timer_lock() {
%1 = tail call i32 (...) @block_signals()
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ DIR;

/* Variables and functions */
int /*<<< orphan*/ *opendir(char *);
int /*<<< orphan*/ readdir(int /*<<< orphan*/ *);
int main(void) {
  DIR *tmp;
  tmp = opendir("../");
  readdir(tmp);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xed1(%rip),%rdi
call   1030 <opendir@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <readdir@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
@.str = [4 x i8] c"../\00"
define i32 @main() {
%1 = tail call i32* @opendir(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @readdir(i32* %1)
ret i32 0
}
void foo717(int p) {}


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

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

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

LLVM IR (-O2):
define void @foo717(i32 %0) {
ret void
}
/* Variables and functions */
int add1(int);
int add2(int n) { return add1(n + 1); }


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

x86 assembly (clang, -O2):
<add2>:
add    $0x1,%edi
jmp    1030 <add1@plt>

LLVM IR (-O0):
define i32 @add2(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = add nsw i32 %3, 1
%5 = call i32 @add1(i32 %4)
ret i32 %5
}

LLVM IR (-O2):
define i32 @add2(i32 %0) {
%2 = add nsw i32 %0, 1
%3 = tail call i32 @add1(i32 %2)
ret i32 %3
}
int CompareDoubles(const void *x, const void *y) {
  if (*((double *)(x)) < *((double *)(y)))
    return -1;
  else if (*((double *)(x)) > *((double *)(y)))
    return 1;
  else
    return 0;
}


x86 assembly (clang, -O0):
<CompareDoubles>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm1
mov    -0x18(%rbp),%rax
movsd  (%rax),%xmm0
ucomisd %xmm1,%xmm0
jbe    1132 <CompareDoubles+0x32>
movl   $0xffffffff,-0x4(%rbp)
jmp    115b <CompareDoubles+0x5b>
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x18(%rbp),%rax
ucomisd (%rax),%xmm0
jbe    1154 <CompareDoubles+0x54>
movl   $0x1,-0x4(%rbp)
jmp    115b <CompareDoubles+0x5b>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<CompareDoubles>:
movsd  (%rdi),%xmm0
movsd  (%rsi),%xmm1
xor    %ecx,%ecx
ucomisd %xmm1,%xmm0
seta   %cl
ucomisd %xmm0,%xmm1
mov    $0xffffffff,%eax
cmovbe %ecx,%eax
ret

LLVM IR (-O0):
define i32 @CompareDoubles(i8* %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i8*
store i8* %0, i8** %4
store i8* %1, i8** %5
%6 = load i8*, i8** %4
%7 = bitcast i8* %6 to double*
%8 = load double, double* %7
%9 = load i8*, i8** %5
%10 = bitcast i8* %9 to double*
%11 = load double, double* %10
%12 = fcmp olt double %8, %11
br i1 %12, label %13, label %14
13: ; preds = %2
store i32 -1, i32* %3
br label %24
14: ; preds = %2
%15 = load i8*, i8** %4
%16 = bitcast i8* %15 to double*
%17 = load double, double* %16
%18 = load i8*, i8** %5
%19 = bitcast i8* %18 to double*
%20 = load double, double* %19
%21 = fcmp ogt double %17, %20
br i1 %21, label %22, label %23
22: ; preds = %14
store i32 1, i32* %3
br label %24
23: ; preds = %14
store i32 0, i32* %3
br label %24
24: ; preds = %23, %22, %13
%25 = load i32, i32* %3
ret i32 %25
}

LLVM IR (-O2):
define i32 @CompareDoubles(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to double*
%4 = load double, double* %3
%5 = bitcast i8* %1 to double*
%6 = load double, double* %5
%7 = fcmp olt double %4, %6
%8 = fcmp ogt double %4, %6
%9 = zext i1 %8 to i32
%10 = select i1 %7, i32 -1, i32 %9
ret i32 %10
}
int are_interrupts_enabled() {
  unsigned long flags;
  asm volatile("pushf\n\t"
               "pop %0"
               : "=g"(flags));
  return flags & (1 << 9);
}


x86 assembly (clang, -O0):
<are_interrupts_enabled>:
push   %rbp
mov    %rsp,%rbp
pushf
pop    -0x8(%rbp)
mov    -0x8(%rbp),%rax
and    $0x200,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<are_interrupts_enabled>:
pushf
pop    -0x8(%rsp)
mov    $0x200,%eax
and    -0x8(%rsp),%eax
ret

LLVM IR (-O0):
define i32 @are_interrupts_enabled() {
%1 = alloca i64
%2 = load i64, i64* %1
%3 = and i64 %2, 512
%4 = trunc i64 %3 to i32
ret i32 %4
}

LLVM IR (-O2):
define i32 @are_interrupts_enabled() {
%1 = alloca i64
%2 = bitcast i64* %1 to i8*
%3 = load i64, i64* %1
%4 = trunc i64 %3 to i32
%5 = and i32 %4, 512
ret i32 %5
}
/* Variables and functions */
int lookup_add_paths(char const *);
__attribute__((visibility("default"))) int louis_add_paths(const char *paths) {
  return lookup_add_paths(paths);
}


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

x86 assembly (clang, -O2):
<louis_add_paths>:
jmp    1030 <lookup_add_paths@plt>

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

LLVM IR (-O2):
define i32 @louis_add_paths(i8* %0) {
%2 = tail call i32 @lookup_add_paths(i8* %0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ cBreak();
int /*<<< orphan*/ dash();
int /*<<< orphan*/ dot();
void sK() {
  dash();
  dot();
  dash();
  cBreak();
}


x86 assembly (clang, -O0):
<sK>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <dash@plt>
mov    $0x0,%al
call   1030 <dot@plt>
mov    $0x0,%al
call   1040 <dash@plt>
mov    $0x0,%al
call   1050 <cBreak@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<sK>:
push   %rax
xor    %eax,%eax
call   1040 <dash@plt>
xor    %eax,%eax
call   1030 <dot@plt>
xor    %eax,%eax
call   1040 <dash@plt>
xor    %eax,%eax
pop    %rcx
jmp    1050 <cBreak@plt>

LLVM IR (-O0):
define void @sK() {
%1 = call i32 (...) @dash()
%2 = call i32 (...) @dot()
%3 = call i32 (...) @dash()
%4 = call i32 (...) @cBreak()
ret void
}

LLVM IR (-O2):
define void @sK() {
%1 = tail call i32 (...) @dash()
%2 = tail call i32 (...) @dot()
%3 = tail call i32 (...) @dash()
%4 = tail call i32 (...) @cBreak()
ret void
}