xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ free(char *);
void freeMatrix(char **matrix, size_t size) {
  size_t i;
  for (i = 0; i < size; i++)
    free(matrix[i]);
}


x86 assembly (clang, -O0):
<freeMatrix>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movq   $0x0,-0x18(%rbp)
mov    -0x18(%rbp),%rax
cmp    -0x10(%rbp),%rax
jae    1158 <freeMatrix+0x48>
mov    -0x8(%rbp),%rax
mov    -0x18(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
call   1030 <free@plt>
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
jmp    1128 <freeMatrix+0x18>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<freeMatrix>:
push   %r15
push   %r14
push   %rbx
test   %rsi,%rsi
je     1142 <freeMatrix+0x32>
mov    %rsi,%r15
mov    %rdi,%r14
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    (%r14,%rbx,8),%rdi
call   1030 <free@plt>
add    $0x1,%rbx
cmp    %rbx,%r15
jne    1130 <freeMatrix+0x20>
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define void @freeMatrix(i8** %0, i64 %1) {
%3 = alloca i8**
%4 = alloca i64
%5 = alloca i64
store i8** %0, i8*** %3
store i64 %1, i64* %4
store i64 0, i64* %5
br label %6
6: ; preds = %16, %2
%7 = load i64, i64* %5
%8 = load i64, i64* %4
%9 = icmp ult i64 %7, %8
br i1 %9, label %10, label %19
10: ; preds = %6
%11 = load i8**, i8*** %3
%12 = load i64, i64* %5
%13 = getelementptr inbounds i8*, i8** %11, i64 %12
%14 = load i8*, i8** %13
%15 = call i32 @free(i8* %14)
br label %16
16: ; preds = %10
%17 = load i64, i64* %5
%18 = add i64 %17, 1
store i64 %18, i64* %5
br label %6
19: ; preds = %6
ret void
}

LLVM IR (-O2):
define void @freeMatrix(i8** nocapture %0, i64 %1) {
%3 = icmp eq i64 %1, 0
br i1 %3, label %11, label %4
4: ; preds = %2, %4
%5 = phi i64 [ %9, %4 ], [ 0, %2 ]
%6 = getelementptr inbounds i8*, i8** %0, i64 %5
%7 = load i8*, i8** %6
%8 = tail call i32 @free(i8* %7)
%9 = add nuw i64 %5, 1
%10 = icmp eq i64 %9, %1
br i1 %10, label %11, label %4
11: ; preds = %4, %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ back_start(int, char **);
void front_start(int argc, char **argv) { back_start(argc, argv); }


x86 assembly (clang, -O0):
<front_start>:
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   1030 <back_start@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<front_start>:
jmp    1030 <back_start@plt>

LLVM IR (-O0):
define void @front_start(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 @back_start(i32 %5, i8** %6)
ret void
}

LLVM IR (-O2):
define void @front_start(i32 %0, i8** %1) {
%3 = tail call i32 @back_start(i32 %0, i8** %1)
ret void
}
int cairo_code_draw_envReverseLabel_get_width() { return 74; }


x86 assembly (clang, -O0):
<cairo_code_draw_envReverseLabel_get_width>:
push   %rbp
mov    %rsp,%rbp
mov    $0x4a,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @cairo_code_draw_envReverseLabel_get_width() {
ret i32 74
}

LLVM IR (-O2):
define i32 @cairo_code_draw_envReverseLabel_get_width() {
ret i32 74
}
void f1(int *p) {
  if (p != ((void *)0) && *p == 0)
    *p = 1;
}


x86 assembly (clang, -O0):
<f1>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     112a <f1+0x2a>
mov    -0x8(%rbp),%rax
cmpl   $0x0,(%rax)
jne    112a <f1+0x2a>
mov    -0x8(%rbp),%rax
movl   $0x1,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<f1>:
test   %rdi,%rdi
je     110a <f1+0xa>
cmpl   $0x0,(%rdi)
je     110b <f1+0xb>
ret
movl   $0x1,(%rdi)
ret

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

LLVM IR (-O2):
define void @f1(i32* %0) {
%2 = icmp eq i32* %0, null
br i1 %2, label %7, label %3
3: ; preds = %1
%4 = load i32, i32* %0
%5 = icmp eq i32 %4, 0
br i1 %5, label %6, label %7
6: ; preds = %3
store i32 1, i32* %0
br label %7
7: ; preds = %6, %3, %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int);
int main() {
  int a;
  int i = 2;
  a = (i++, i++, i++);
  printf("a=%d,i=%d\n", a, i);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x2,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,%ecx
add    $0x1,%ecx
mov    %ecx,-0x8(%rbp)
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%esi
mov    -0x8(%rbp),%edx
lea    0xeb4(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
@.str = [11 x i8] c"a=%d,i=%d\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i32 4, i32 5)
ret i32 0
}
/* Variables and functions */
scalar_t__ pow(double, int);
double sqrt(scalar_t__);
double CoreDistance(double l, double bl) {
  return sqrt(pow(l, 2) + pow(6371.0, 2) - bl * l);
}


x86 assembly (clang, -O0):
<CoreDistance>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
mov    $0x2,%edi
call   1030 <pow@plt>
mov    %rax,-0x18(%rbp)
movsd  0xeb3(%rip),%xmm0
mov    $0x2,%edi
call   1030 <pow@plt>
mov    %rax,%rcx
mov    -0x18(%rbp),%rax
add    %rcx,%rax
cvtsi2sd %rax,%xmm1
movsd  -0x10(%rbp),%xmm0
movsd  -0x8(%rbp),%xmm2
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
cvttsd2si %xmm0,%rdi
call   1040 <sqrt@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<CoreDistance>:
push   %rbx
sub    $0x10,%rsp
movsd  %xmm1,0x8(%rsp)
movsd  %xmm0,(%rsp)
mov    $0x2,%edi
call   1030 <pow@plt>
mov    %rax,%rbx
movsd  0xebb(%rip),%xmm0
mov    $0x2,%edi
call   1030 <pow@plt>
add    %rbx,%rax
xorps  %xmm0,%xmm0
cvtsi2sd %rax,%xmm0
movsd  0x8(%rsp),%xmm1
mulsd  (%rsp),%xmm1
subsd  %xmm1,%xmm0
cvttsd2si %xmm0,%rdi
add    $0x10,%rsp
pop    %rbx
jmp    1040 <sqrt@plt>

LLVM IR (-O0):
define double @CoreDistance(double %0, double %1) {
%3 = alloca double
%4 = alloca double
store double %0, double* %3
store double %1, double* %4
%5 = load double, double* %3
%6 = call i64 @pow(double %5, i32 2)
%7 = call i64 @pow(double 6.371000e+03, i32 2)
%8 = add nsw i64 %6, %7
%9 = sitofp i64 %8 to double
%10 = load double, double* %4
%11 = load double, double* %3
%12 = fneg double %10
%13 = call double @llvm.fmuladd.f64(double %12, double %11, double %9)
%14 = fptosi double %13 to i64
%15 = call double @sqrt(i64 %14)
ret double %15
}

LLVM IR (-O2):
define double @CoreDistance(double %0, double %1) {
%3 = tail call i64 @pow(double %0, i32 2)
%4 = tail call i64 @pow(double 6.371000e+03, i32 2)
%5 = add nsw i64 %4, %3
%6 = sitofp i64 %5 to double
%7 = fneg double %1
%8 = tail call double @llvm.fmuladd.f64(double %7, double %0, double %6)
%9 = fptosi double %8 to i64
%10 = tail call double @sqrt(i64 %9)
ret double %10
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ scanf(char *, char *);
int strcmp(char *, char *);
int main(void) {
  char mystring1[255];
  char mystring2[255];
  scanf("%s", mystring1);
  scanf("%s", mystring2);
  printf("%d\n", strcmp(mystring1, mystring2));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x210,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x110(%rbp),%rsi
lea    0xeb0(%rip),%rdi
call   1050 <scanf@plt>
lea    -0x210(%rbp),%rsi
lea    0xe9d(%rip),%rdi
call   1050 <scanf@plt>
lea    -0x110(%rbp),%rdi
lea    -0x210(%rbp),%rsi
call   1040 <strcmp@plt>
mov    %eax,%esi
lea    0xe7f(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x210,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %rbx
sub    $0x200,%rsp
lea    0xebd(%rip),%r15
lea    0x100(%rsp),%r14
mov    %r15,%rdi
mov    %r14,%rsi
call   1050 <scanf@plt>
mov    %rsp,%rbx
mov    %r15,%rdi
mov    %rbx,%rsi
call   1050 <scanf@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
call   1040 <strcmp@plt>
lea    0xe8d(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x200,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

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

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


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

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

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

LLVM IR (-O2):
define void @ff_hevc_put_hevc_uni_epel_hv12_12_sse4() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ get_grid_area_ug(int const *, double const *, double const *,
                                    double *);
void get_grid_area_ug_(const int *npts, const double *lon, const double *lat,
                       double *area) {
  get_grid_area_ug(npts, lon, lat, area);
}


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

x86 assembly (clang, -O2):
<get_grid_area_ug_>:
jmp    1030 <get_grid_area_ug@plt>

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

LLVM IR (-O2):
define void @get_grid_area_ug_(i32* %0, double* %1, double* %2, double* %3) {
%5 = tail call i32 @get_grid_area_ug(i32* %0, double* %1, double* %2, double* %3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ func(char *);
int /*<<< orphan*/ printf(char *);
int main(int argc, char **argv) {
  char *buf = "hello\n";
  if (argc > 1) {
    buf = argv[1];
  }
  func(buf);
  printf("Returned Properly\n");
  return 1;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xec3(%rip),%rax
mov    %rax,-0x18(%rbp)
cmpl   $0x1,-0x8(%rbp)
jle    1157 <main+0x37>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
call   1040 <func@plt>
lea    0xea0(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
cmp    $0x2,%edi
jl     112c <main+0xc>
mov    0x8(%rsi),%rdi
jmp    1133 <main+0x13>
lea    0xecd(%rip),%rdi
call   1040 <func@plt>
lea    0xec8(%rip),%rdi
call   1030 <puts@plt>
mov    $0x1,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [7 x i8] c"hello\0A\00"
@.str.1 = [19 x i8] c"Returned Properly\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i8*
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8** %6
%7 = load i32, i32* %4
%8 = icmp sgt i32 %7, 1
br i1 %8, label %9, label %13
9: ; preds = %2
%10 = load i8**, i8*** %5
%11 = getelementptr inbounds i8*, i8** %10, i64 1
%12 = load i8*, i8** %11
store i8* %12, i8** %6
br label %13
13: ; preds = %9, %2
%14 = load i8*, i8** %6
%15 = call i32 @func(i8* %14)
%16 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0))
ret i32 1
}

LLVM IR (-O2):
@.str = [7 x i8] c"hello\0A\00"
@str = [18 x i8] c"Returned Properly\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp sgt i32 %0, 1
br i1 %3, label %4, label %7
4: ; preds = %2
%5 = getelementptr inbounds i8*, i8** %1, i64 1
%6 = load i8*, i8** %5
br label %7
7: ; preds = %4, %2
%8 = phi i8* [ %6, %4 ], [ getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), %2 ]
%9 = tail call i32 @func(i8* %8)
%10 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @str, i64 0, i64 0))
ret i32 1
}
int hwblk_init(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @hwblk_init() {
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ u_int32_t;

/* Variables and functions */
u_int32_t drv_dropped(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @drv_dropped() {
ret i32 0
}
void tce_sortacc_0_(double *unsorted, double *sorted, double *factor) {
  *sorted += (*unsorted) * (*factor);
}


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

x86 assembly (clang, -O2):
<tce_sortacc_0_>:
movsd  (%rdi),%xmm0
mulsd  (%rdx),%xmm0
addsd  (%rsi),%xmm0
movsd  %xmm0,(%rsi)
ret

LLVM IR (-O0):
define void @tce_sortacc_0_(double* %0, double* %1, double* %2) {
%4 = alloca double*
%5 = alloca double*
%6 = alloca double*
store double* %0, double** %4
store double* %1, double** %5
store double* %2, double** %6
%7 = load double*, double** %4
%8 = load double, double* %7
%9 = load double*, double** %6
%10 = load double, double* %9
%11 = load double*, double** %5
%12 = load double, double* %11
%13 = call double @llvm.fmuladd.f64(double %8, double %10, double %12)
store double %13, double* %11
ret void
}

LLVM IR (-O2):
define void @tce_sortacc_0_(double* nocapture %0, double* nocapture %1, double* nocapture %2) {
%4 = load double, double* %0
%5 = load double, double* %2
%6 = load double, double* %1
%7 = tail call double @llvm.fmuladd.f64(double %4, double %5, double %6)
store double %7, double* %1
ret void
}
/* Variables and functions */
int bsr(int);
int llrun_get_buckets_quantity(int max_gap) { return bsr(max_gap) + 1; }


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

x86 assembly (clang, -O2):
<llrun_get_buckets_quantity>:
push   %rax
call   1030 <bsr@plt>
add    $0x1,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @llrun_get_buckets_quantity(i32 %0) {
%2 = tail call i32 @bsr(i32 %0)
%3 = add nsw i32 %2, 1
ret i32 %3
}
unsigned char get_Qm_ul(unsigned char I_MCS) {
  if (I_MCS < 11)
    return (2);
  else if (I_MCS < 21)
    return (4);
  else
    return (6);
}


x86 assembly (clang, -O0):
<get_Qm_ul>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x2(%rbp)
movzbl -0x2(%rbp),%eax
cmp    $0xb,%eax
jge    1120 <get_Qm_ul+0x20>
movb   $0x2,-0x1(%rbp)
jmp    113a <get_Qm_ul+0x3a>
movzbl -0x2(%rbp),%eax
cmp    $0x15,%eax
jge    1136 <get_Qm_ul+0x36>
movb   $0x4,-0x1(%rbp)
jmp    113a <get_Qm_ul+0x3a>
movb   $0x6,-0x1(%rbp)
movzbl -0x1(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_Qm_ul>:
cmp    $0x15,%dil
setae  %al
add    %al,%al
or     $0x4,%al
cmp    $0xb,%dil
movzbl %al,%ecx
mov    $0x2,%eax
cmovae %ecx,%eax
ret

LLVM IR (-O0):
define zeroext i8 @get_Qm_ul(i8 zeroext %0) {
%2 = alloca i8
%3 = alloca i8
store i8 %0, i8* %3
%4 = load i8, i8* %3
%5 = zext i8 %4 to i32
%6 = icmp slt i32 %5, 11
br i1 %6, label %7, label %8
7: ; preds = %1
store i8 2, i8* %2
br label %14
8: ; preds = %1
%9 = load i8, i8* %3
%10 = zext i8 %9 to i32
%11 = icmp slt i32 %10, 21
br i1 %11, label %12, label %13
12: ; preds = %8
store i8 4, i8* %2
br label %14
13: ; preds = %8
store i8 6, i8* %2
br label %14
14: ; preds = %13, %12, %7
%15 = load i8, i8* %2
ret i8 %15
}

LLVM IR (-O2):
define zeroext i8 @get_Qm_ul(i8 zeroext %0) {
%2 = icmp ult i8 %0, 11
%3 = icmp ult i8 %0, 21
%4 = select i1 %3, i8 4, i8 6
%5 = select i1 %2, i8 2, i8 %4
ret i8 %5
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char const *const, char const *const,
                          char const *const, char const *const,
                          char const *const);
int Usage(const char *restrict const name) {
  printf("usage:  %s [-n] [-e] variable ... \n"
         "        %s [-n] [-e] [-q] -w variable=value ... \n"
         "        %s [-n] [-e] -a \n"
         "        %s [-n] [-e] [-q] -p <file>   (default /etc/sysctl.conf) \n"
         "        %s [-n] [-e] -A\n",
         name, name, name, name, name);
  return -1;
}


x86 assembly (clang, -O0):
<Usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
mov    -0x8(%rbp),%rdx
mov    -0x8(%rbp),%rcx
mov    -0x8(%rbp),%r8
mov    -0x8(%rbp),%r9
lea    0xec9(%rip),%rdi
call   1030 <printf@plt>
mov    $0xffffffff,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Usage>:
push   %rax
mov    %rdi,%rcx
lea    0xee5(%rip),%rdi
mov    %rcx,%rsi
mov    %rcx,%rdx
mov    %rcx,%r8
mov    %rcx,%r9
call   1030 <printf@plt>
mov    $0xffffffff,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [200 x i8] c"usage: %s [-n] [-e] variable ... \0A %s [-n] [-e] [-q] -w variable=value ... \0A %s [-n] [-e] -a \0A %s [-n] [-e] [-q] -p <file> (default /etc/sysctl.conf) \0A %s [-n] [-e] -A\0A\00"
define i32 @Usage(i8* noalias %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = load i8*, i8** %2
%5 = load i8*, i8** %2
%6 = load i8*, i8** %2
%7 = load i8*, i8** %2
%8 = call i32 @printf(i8* getelementptr inbounds ([200 x i8], [200 x i8]* @.str, i64 0, i64 0), i8* %3, i8* %4, i8* %5, i8* %6, i8* %7)
ret i32 -1
}

LLVM IR (-O2):
@.str = [200 x i8] c"usage: %s [-n] [-e] variable ... \0A %s [-n] [-e] [-q] -w variable=value ... \0A %s [-n] [-e] -a \0A %s [-n] [-e] [-q] -p <file> (default /etc/sysctl.conf) \0A %s [-n] [-e] -A\0A\00"
define i32 @Usage(i8* noalias %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([200 x i8], [200 x i8]* @.str, i64 0, i64 0), i8* %0, i8* %0, i8* %0, i8* %0, i8* %0)
ret i32 -1
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *, char *, char *);
void printVersionInfo(void) {
  printf(
      "\n\nThis is %s version %s released by Alexandros Stamatakis on %s.\n\n",
      "RAxML-Light", "1.0.5", "June 2011");
}


x86 assembly (clang, -O0):
<printVersionInfo>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
lea    0xf21(%rip),%rsi
lea    0xf26(%rip),%rdx
lea    0xf25(%rip),%rcx
call   1030 <printf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<printVersionInfo>:
lea    0xee9(%rip),%rdi
lea    0xf25(%rip),%rsi
lea    0xf2a(%rip),%rdx
lea    0xf29(%rip),%rcx
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [67 x i8] c"\0A\0AThis is %s version %s released by Alexandros Stamatakis on %s.\0A\0A\00"
@.str.1 = [12 x i8] c"RAxML-Light\00"
@.str.2 = [6 x i8] c"1.0.5\00"
@.str.3 = [10 x i8] c"June 2011\00"
define void @printVersionInfo() {
%1 = call i32 @printf(i8* getelementptr inbounds ([67 x i8], [67 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.3, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [67 x i8] c"\0A\0AThis is %s version %s released by Alexandros Stamatakis on %s.\0A\0A\00"
@.str.1 = [12 x i8] c"RAxML-Light\00"
@.str.2 = [6 x i8] c"1.0.5\00"
@.str.3 = [10 x i8] c"June 2011\00"
define void @printVersionInfo() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([67 x i8], [67 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.3, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ terminal_print(char const *);
int /*<<< orphan*/ terminal_putc(char);
int puts(const char *str) {
  terminal_print(str);
  terminal_putc('\n');
}


x86 assembly (clang, -O0):
<puts>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <terminal_print@plt>
mov    $0xa,%edi
call   1040 <terminal_putc@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<puts>:
push   %rax
call   1030 <terminal_print@plt>
mov    $0xa,%edi
pop    %rax
jmp    1040 <terminal_putc@plt>

LLVM IR (-O0):
define i32 @puts(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
store i8* %0, i8** %3
%4 = load i8*, i8** %3
%5 = call i32 @terminal_print(i8* %4)
%6 = call i32 @terminal_putc(i8 signext 10)
%7 = load i32, i32* %2
ret i32 %7
}

LLVM IR (-O2):
define i32 @puts(i8* %0) {
%2 = tail call i32 @terminal_print(i8* %0)
%3 = tail call i32 @terminal_putc(i8 signext 10)
ret i32 undef
}
/* Type definitions */
struct rtattr {
  int dummy;
};
typedef int /*<<< orphan*/ __u32;
typedef int /*<<< orphan*/ __u16;

/* Variables and functions */
scalar_t__ RTA_DATA(struct rtattr const *);
__u16 rta_getattr_u32(const struct rtattr *rta) {
  return *(__u32 *)RTA_DATA(rta);
}


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

x86 assembly (clang, -O2):
<rta_getattr_u32>:
push   %rax
call   1030 <RTA_DATA@plt>
mov    (%rax),%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.rtattr = type { i32 }
define i32 @rta_getattr_u32(%struct.rtattr* %0) {
%2 = alloca %struct.rtattr*
store %struct.rtattr* %0, %struct.rtattr** %2
%3 = load %struct.rtattr*, %struct.rtattr** %2
%4 = call i64 @RTA_DATA(%struct.rtattr* %3)
%5 = inttoptr i64 %4 to i32*
%6 = load i32, i32* %5
ret i32 %6
}

LLVM IR (-O2):
%struct.rtattr = type { i32 }
define i32 @rta_getattr_u32(%struct.rtattr* %0) {
%2 = tail call i64 @RTA_DATA(%struct.rtattr* %0)
%3 = inttoptr i64 %2 to i32*
%4 = load i32, i32* %3
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ __enable_irq();
void __sd_nvic_irq_enable(void) { __enable_irq(); }


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

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

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

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

/* Variables and functions */
int REG_NOSUB;
int /*<<< orphan*/ regexp_compile(int /*<<< orphan*/ *, char const *, int);
int /*<<< orphan*/ regfree(int /*<<< orphan*/ *);
__attribute__((__warn_unused_result__)) bool
regexp_is_valid(const char *pattern, int flags) {
  regex_t re;
  if (!regexp_compile(&re, pattern, flags | REG_NOSUB)) {
    return false;
  }
  regfree(&re);
  return true;
}


x86 assembly (clang, -O0):
<regexp_is_valid>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
mov    0x2ea3(%rip),%rax
or     (%rax),%edx
lea    -0x18(%rbp),%rdi
call   1040 <regexp_compile@plt>
cmp    $0x0,%eax
jne    115d <regexp_is_valid+0x3d>
movl   $0x0,-0x4(%rbp)
jmp    116d <regexp_is_valid+0x4d>
lea    -0x18(%rbp),%rdi
call   1030 <regfree@plt>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<regexp_is_valid>:
push   %rax
mov    %esi,%edx
mov    %rdi,%rsi
mov    0x2eb3(%rip),%rax
or     (%rax),%edx
lea    0x4(%rsp),%rdi
call   1040 <regexp_compile@plt>
test   %eax,%eax
je     114e <regexp_is_valid+0x2e>
lea    0x4(%rsp),%rdi
call   1030 <regfree@plt>
mov    $0x1,%eax
pop    %rcx
ret
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@REG_NOSUB = global i32 0
define i32 @regexp_is_valid(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
%7 = load i8*, i8** %4
%8 = load i32, i32* %5
%9 = load i32, i32* @REG_NOSUB
%10 = or i32 %8, %9
%11 = call i32 @regexp_compile(i32* %6, i8* %7, i32 %10)
%12 = icmp ne i32 %11, 0
br i1 %12, label %14, label %13
13: ; preds = %2
store i32 0, i32* %3
br label %16
14: ; preds = %2
%15 = call i32 @regfree(i32* %6)
store i32 1, i32* %3
br label %16
16: ; preds = %14, %13
%17 = load i32, i32* %3
ret i32 %17
}

LLVM IR (-O2):
@REG_NOSUB = global i32 0
define i32 @regexp_is_valid(i8* %0, i32 %1) {
%3 = alloca i32
%4 = bitcast i32* %3 to i8*
%5 = load i32, i32* @REG_NOSUB
%6 = or i32 %5, %1
%7 = call i32 @regexp_compile(i32* %3, i8* %0, i32 %6)
%8 = icmp eq i32 %7, 0
br i1 %8, label %11, label %9
9: ; preds = %2
%10 = call i32 @regfree(i32* %3)
br label %11
11: ; preds = %2, %9
%12 = phi i32 [ 1, %9 ], [ 0, %2 ]
ret i32 %12
}
double nx_min_d(double x, double y) { return (x < y) ? x : y; }


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

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

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

LLVM IR (-O2):
define double @nx_min_d(double %0, double %1) {
%3 = fcmp olt double %0, %1
%4 = select i1 %3, double %0, double %1
ret double %4
}
/* Variables and functions */
double rng_uint64();
double rng_dbl(void) { return 5.42101086242752217e-20 * rng_uint64(); }


x86 assembly (clang, -O0):
<rng_dbl>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <rng_uint64@plt>
movaps %xmm0,%xmm1
movsd  0xeda(%rip),%xmm0
mulsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<rng_dbl>:
push   %rax
xor    %eax,%eax
call   1030 <rng_uint64@plt>
mulsd  0xee0(%rip),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @rng_dbl() {
%1 = call double (...) @rng_uint64()
%2 = fmul double 0x3BF0000000000000, %1
ret double %2
}

LLVM IR (-O2):
define double @rng_dbl() {
%1 = tail call double (...) @rng_uint64()
%2 = fmul double %1, 0x3BF0000000000000
ret double %2
}
/* Variables and functions */
scalar_t__ EOF;
int /*<<< orphan*/ printf(char *, float);
scalar_t__ scanf(char *, float *);
int main(void) {
  float price;
  while (scanf("%f", &price) != EOF)
    printf("%7.3f\n", price);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
mov    0x2ea2(%rip),%rcx
cmp    (%rcx),%rax
je     1165 <main+0x45>
movss  -0x8(%rbp),%xmm0
lea    0xea8(%rip),%rdi
call   1030 <printf@plt>
jmp    112f <main+0xf>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
lea    0xed1(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1040 <scanf@plt>
mov    0x2ea8(%rip),%r12
cmp    (%r12),%rax
je     117f <main+0x5f>
lea    0xeb6(%rip),%r14
lea    0xeac(%rip),%r15
lea    0x4(%rsp),%rbx
nopl   0x0(%rax)
movss  0x4(%rsp),%xmm0
mov    %r14,%rdi
call   1030 <printf@plt>
mov    %r15,%rdi
mov    %rbx,%rsi
call   1040 <scanf@plt>
cmp    (%r12),%rax
jne    1160 <main+0x40>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%f\00"
@EOF = global i64 0
@.str.1 = [7 x i8] c"%7.3f\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca float
store i32 0, i32* %1
br label %3
3: ; preds = %7, %0
%4 = call i64 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), float* %2)
%5 = load i64, i64* @EOF
%6 = icmp ne i64 %4, %5
br i1 %6, label %7, label %10
7: ; preds = %3
%8 = load float, float* %2
%9 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), float %8)
br label %3
10: ; preds = %3
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%f\00"
@EOF = global i64 0
@.str.1 = [7 x i8] c"%7.3f\0A\00"
define i32 @main() {
%1 = alloca float
%2 = bitcast float* %1 to i8*
%3 = call i64 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), float* %1)
%4 = load i64, i64* @EOF
%5 = icmp eq i64 %3, %4
br i1 %5, label %12, label %6
6: ; preds = %0, %6
%7 = load float, float* %1
%8 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), float %7)
%9 = call i64 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), float* %1)
%10 = load i64, i64* @EOF
%11 = icmp eq i64 %9, %10
br i1 %11, label %12, label %6
12: ; preds = %6, %0
ret i32 0
}
/* Type definitions */
struct channel {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ ch_write(struct channel *, char *, int);
void httpd_end_headers(struct channel *ch) { ch_write(ch, "\r\n", 2); }


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

x86 assembly (clang, -O2):
<httpd_end_headers>:
lea    0xee9(%rip),%rsi
mov    $0x2,%edx
jmp    1030 <ch_write@plt>

LLVM IR (-O0):
%struct.channel = type { i32 }
@.str = [3 x i8] c"\0D\0A\00"
define void @httpd_end_headers(%struct.channel* %0) {
%2 = alloca %struct.channel*
store %struct.channel* %0, %struct.channel** %2
%3 = load %struct.channel*, %struct.channel** %2
%4 = call i32 @ch_write(%struct.channel* %3, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 2)
ret void
}

LLVM IR (-O2):
%struct.channel = type { i32 }
@.str = [3 x i8] c"\0D\0A\00"
define void @httpd_end_headers(%struct.channel* %0) {
%2 = tail call i32 @ch_write(%struct.channel* %0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 2)
ret void
}
/* Variables and functions */
char timlib_delimiter(char *);
char timlib_get_delimiter(char *string) { return timlib_delimiter(string); }


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

x86 assembly (clang, -O2):
<timlib_get_delimiter>:
jmp    1030 <timlib_delimiter@plt>

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

LLVM IR (-O2):
define signext i8 @timlib_get_delimiter(i8* %0) {
%2 = tail call signext i8 @timlib_delimiter(i8* %0)
ret i8 %2
}
/* Type definitions */
typedef int /*<<< orphan*/ ssize_t;
typedef int /*<<< orphan*/ off_t;

/* Variables and functions */
int /*<<< orphan*/ __fake_pread_write(int, void *, size_t, int /*<<< orphan*/,
                                      int /*<<< orphan*/);
ssize_t __libc_pread(int fd, void *buf, size_t count, off_t offset) {
  return (__fake_pread_write(fd, buf, count, offset, 0));
}


x86 assembly (clang, -O0):
<__libc_pread>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x1c(%rbp),%ecx
xor    %r8d,%r8d
call   1030 <__fake_pread_write@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__libc_pread>:
xor    %r8d,%r8d
jmp    1030 <__fake_pread_write@plt>

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

LLVM IR (-O2):
define i32 @__libc_pread(i32 %0, i8* %1, i64 %2, i32 %3) {
%5 = tail call i32 @__fake_pread_write(i32 %0, i8* %1, i64 %2, i32 %3, i32 0)
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ SIGINT;
int /*<<< orphan*/ sig_default(int /*<<< orphan*/);
extern void sig_int_default(void) { sig_default(SIGINT); }


x86 assembly (clang, -O0):
<sig_int_default>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ecd(%rip),%rax
mov    (%rax),%edi
call   1030 <sig_default@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<sig_int_default>:
mov    0x2ed1(%rip),%rax
mov    (%rax),%edi
jmp    1030 <sig_default@plt>

LLVM IR (-O0):
@SIGINT = global i32 0
define void @sig_int_default() {
%1 = load i32, i32* @SIGINT
%2 = call i32 @sig_default(i32 %1)
ret void
}

LLVM IR (-O2):
@SIGINT = global i32 0
define void @sig_int_default() {
%1 = load i32, i32* @SIGINT
%2 = tail call i32 @sig_default(i32 %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void SENNA_free(void *ptr) { free(ptr); }


x86 assembly (clang, -O0):
<SENNA_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):
<SENNA_free>:
jmp    1030 <free@plt>

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

LLVM IR (-O2):
define void @SENNA_free(i8* nocapture %0) {
%2 = tail call i32 @free(i8* %0)
ret void
}
int size2alloc(int size) { return ((size - 1) | 7) + 1; }


x86 assembly (clang, -O0):
<size2alloc>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
sub    $0x1,%eax
or     $0x7,%eax
add    $0x1,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<size2alloc>:
lea    -0x1(%rdi),%eax
or     $0x7,%eax
add    $0x1,%eax
ret

LLVM IR (-O0):
define i32 @size2alloc(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = sub nsw i32 %3, 1
%5 = or i32 %4, 7
%6 = add nsw i32 %5, 1
ret i32 %6
}

LLVM IR (-O2):
define i32 @size2alloc(i32 %0) {
%2 = add nsw i32 %0, -1
%3 = or i32 %2, 7
%4 = add nsw i32 %3, 1
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ AF_UNIX;
int /*<<< orphan*/ SOCK_STREAM;
int /*<<< orphan*/ malloc(int);
int socketpair(int /*<<< orphan*/, int /*<<< orphan*/, int /*<<< orphan*/,
               int *);
int main(void) {
  int socket_vector[2];
  malloc(100);
  return socketpair(AF_UNIX, SOCK_STREAM, 0, socket_vector);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x64,%edi
call   1040 <malloc@plt>
mov    0x2ea8(%rip),%rax
mov    (%rax),%edi
mov    0x2e8f(%rip),%rax
mov    (%rax),%esi
lea    -0xc(%rbp),%rcx
xor    %edx,%edx
call   1030 <socketpair@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x64,%edi
call   1040 <malloc@plt>
mov    0x2eb6(%rip),%rax
mov    (%rax),%edi
mov    0x2e9d(%rip),%rax
mov    (%rax),%esi
mov    %rsp,%rcx
xor    %edx,%edx
call   1030 <socketpair@plt>
pop    %rcx
ret

LLVM IR (-O0):
@AF_UNIX = global i32 0
@SOCK_STREAM = global i32 0
define i32 @main() {
%1 = alloca i32
%2 = alloca [2 x i32]
store i32 0, i32* %1
%3 = call i32 @malloc(i32 100)
%4 = load i32, i32* @AF_UNIX
%5 = load i32, i32* @SOCK_STREAM
%6 = getelementptr inbounds [2 x i32], [2 x i32]* %2, i64 0, i64 0
%7 = call i32 @socketpair(i32 %4, i32 %5, i32 0, i32* %6)
ret i32 %7
}

LLVM IR (-O2):
@AF_UNIX = global i32 0
@SOCK_STREAM = global i32 0
define i32 @main() {
%1 = alloca [2 x i32]
%2 = bitcast [2 x i32]* %1 to i8*
%3 = tail call i32 @malloc(i32 100)
%4 = load i32, i32* @AF_UNIX
%5 = load i32, i32* @SOCK_STREAM
%6 = getelementptr inbounds [2 x i32], [2 x i32]* %1, i64 0, i64 0
%7 = call i32 @socketpair(i32 %4, i32 %5, i32 0, i32* %6)
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int);
void p(int a, int b) { printf("a:%d\tb:%d\n", a, b); }


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

x86 assembly (clang, -O2):
<p>:
mov    %esi,%edx
mov    %edi,%esi
lea    0xee5(%rip),%rdi
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [11 x i8] c"a:%d\09b:%d\0A\00"
define void @p(i32 %0, i32 %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i32 %0, i32 %1)
ret void
}
void foo() {
  signed int x = 5;
  signed int y = 2;
  signed int z = x % y;
}


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
movl   $0x5,-0x4(%rbp)
movl   $0x2,-0x8(%rbp)
mov    -0x4(%rbp),%eax
cltd
idivl  -0x8(%rbp)
mov    %edx,-0xc(%rbp)
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @foo() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void foo(int x) { printf("foo(%d)\n", x); }


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

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

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

LLVM IR (-O2):
@.str = [9 x i8] c"foo(%d)\0A\00"
define void @foo(i32 %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ delay(int);
int /*<<< orphan*/ mbus_remote_register_write(int, int, int);
void set_pmu_active_default(void) {
  mbus_remote_register_write(
      0x8, 0x18, ((3 << 14) | (0 << 13) | (1 << 9) | (1 << 5) | (10)));
  delay(200);
  mbus_remote_register_write(0x8, 0x16,
                             ((0 << 19) | (0 << 18) | (0 << 17) | (3 << 14) |
                              (0 << 13) | (4 << 9) | (4 << 5) | (16)));
  delay(200);
  delay(200);
  mbus_remote_register_write(0x8, 0x1A,
                             ((0 << 13) | (5 << 9) | (4 << 5) | (16)));
  delay(200);
}


x86 assembly (clang, -O0):
<set_pmu_active_default>:
push   %rbp
mov    %rsp,%rbp
mov    $0x8,%edi
mov    $0x18,%esi
mov    $0xc22a,%edx
call   1040 <mbus_remote_register_write@plt>
mov    $0xc8,%edi
call   1030 <delay@plt>
mov    $0x8,%edi
mov    $0x16,%esi
mov    $0xc890,%edx
call   1040 <mbus_remote_register_write@plt>
mov    $0xc8,%edi
call   1030 <delay@plt>
mov    $0xc8,%edi
call   1030 <delay@plt>
mov    $0x8,%edi
mov    $0x1a,%esi
mov    $0xa90,%edx
call   1040 <mbus_remote_register_write@plt>
mov    $0xc8,%edi
call   1030 <delay@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_pmu_active_default>:
push   %rax
mov    $0x8,%edi
mov    $0x18,%esi
mov    $0xc22a,%edx
call   1040 <mbus_remote_register_write@plt>
mov    $0xc8,%edi
call   1030 <delay@plt>
mov    $0x8,%edi
mov    $0x16,%esi
mov    $0xc890,%edx
call   1040 <mbus_remote_register_write@plt>
mov    $0xc8,%edi
call   1030 <delay@plt>
mov    $0xc8,%edi
call   1030 <delay@plt>
mov    $0x8,%edi
mov    $0x1a,%esi
mov    $0xa90,%edx
call   1040 <mbus_remote_register_write@plt>
mov    $0xc8,%edi
pop    %rax
jmp    1030 <delay@plt>

LLVM IR (-O0):
define void @set_pmu_active_default() {
%1 = call i32 @mbus_remote_register_write(i32 8, i32 24, i32 49706)
%2 = call i32 @delay(i32 200)
%3 = call i32 @mbus_remote_register_write(i32 8, i32 22, i32 51344)
%4 = call i32 @delay(i32 200)
%5 = call i32 @delay(i32 200)
%6 = call i32 @mbus_remote_register_write(i32 8, i32 26, i32 2704)
%7 = call i32 @delay(i32 200)
ret void
}

LLVM IR (-O2):
define void @set_pmu_active_default() {
%1 = tail call i32 @mbus_remote_register_write(i32 8, i32 24, i32 49706)
%2 = tail call i32 @delay(i32 200)
%3 = tail call i32 @mbus_remote_register_write(i32 8, i32 22, i32 51344)
%4 = tail call i32 @delay(i32 200)
%5 = tail call i32 @delay(i32 200)
%6 = tail call i32 @mbus_remote_register_write(i32 8, i32 26, i32 2704)
%7 = tail call i32 @delay(i32 200)
ret void
}
/* Type definitions */
typedef int uint16_t;

/* Variables and functions */
int /*<<< orphan*/ print_ophead(int, char const *, int);
int /*<<< orphan*/ printf(char *, int);
void print_vx(uint16_t op, const char *name, int index) {
  print_ophead(op, name, index);
  printf("V%X\n", (op & 0x0F00) >> 8);
}


x86 assembly (clang, -O0):
<print_vx>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
call   1040 <print_ophead@plt>
mov    -0x4(%rbp),%esi
and    $0xf00,%esi
sar    $0x8,%esi
lea    0xeac(%rip),%rdi
call   1030 <printf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_vx>:
push   %rbx
mov    %edi,%ebx
call   1040 <print_ophead@plt>
shr    $0x8,%ebx
and    $0xf,%ebx
lea    0xecb(%rip),%rdi
mov    %ebx,%esi
pop    %rbx
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [5 x i8] c"V%X\0A\00"
define void @print_vx(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
%8 = load i8*, i8** %5
%9 = load i32, i32* %6
%10 = call i32 @print_ophead(i32 %7, i8* %8, i32 %9)
%11 = load i32, i32* %4
%12 = and i32 %11, 3840
%13 = ashr i32 %12, 8
%14 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 %13)
ret void
}

LLVM IR (-O2):
@.str = [5 x i8] c"V%X\0A\00"
define void @print_vx(i32 %0, i8* %1, i32 %2) {
%4 = tail call i32 @print_ophead(i32 %0, i8* %1, i32 %2)
%5 = lshr i32 %0, 8
%6 = and i32 %5, 15
%7 = tail call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 %6)
ret void
}
__attribute__((always_)) void
debug_dma_sync_sg_for_device(struct device *dev, struct scatterlist *sg,
                             int nelems, int direction) {}


x86 assembly (clang, -O0):
<debug_dma_sync_sg_for_device>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %ecx,-0x18(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.device = type opaque
%struct.scatterlist = type opaque
define void @debug_dma_sync_sg_for_device(%struct.device* %0, %struct.scatterlist* %1, i32 %2, i32 %3) {
%5 = alloca %struct.device*
%6 = alloca %struct.scatterlist*
%7 = alloca i32
%8 = alloca i32
store %struct.device* %0, %struct.device** %5
store %struct.scatterlist* %1, %struct.scatterlist** %6
store i32 %2, i32* %7
store i32 %3, i32* %8
ret void
}

LLVM IR (-O2):
%struct.device = type opaque
%struct.scatterlist = type opaque
define void @debug_dma_sync_sg_for_device(%struct.device* nocapture %0, %struct.scatterlist* nocapture %1, i32 %2, i32 %3) {
ret void
}