xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ cpcstrtofstr(char *, char *, unsigned int);
void fmud_ctofstring(char *fString, char **pcString, unsigned lenf) {
  cpcstrtofstr(*pcString, fString, lenf);
}


x86 assembly (clang, -O0):
<fmud_ctofstring>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
mov    -0x8(%rbp),%rsi
mov    -0x14(%rbp),%edx
call   1030 <cpcstrtofstr@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fmud_ctofstring>:
mov    %rdi,%rax
mov    (%rsi),%rdi
mov    %rax,%rsi
jmp    1030 <cpcstrtofstr@plt>

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

LLVM IR (-O2):
define void @fmud_ctofstring(i8* %0, i8** nocapture %1, i32 %2) {
%4 = load i8*, i8** %1
%5 = tail call i32 @cpcstrtofstr(i8* %4, i8* %0, i32 %2)
ret void
}
/* Variables and functions */
int malloc(int size) {
  int (*func)(int) = (int (*)(int))0x08000B39;
  return func(size);
}


x86 assembly (clang, -O0):
<malloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x8000b39,%eax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    -0x4(%rbp),%edi
call   *%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<malloc>:
mov    $0x8000b39,%eax
jmp    *%rax

LLVM IR (-O0):
define i32 @malloc(i32 %0) {
%2 = alloca i32
%3 = alloca i32 (i32)*
store i32 %0, i32* %2
store i32 (i32)* inttoptr (i64 134220601 to i32 (i32)*), i32 (i32)** %3
%4 = load i32 (i32)*, i32 (i32)** %3
%5 = load i32, i32* %2
%6 = call i32 %4(i32 %5)
ret i32 %6
}

LLVM IR (-O2):
define i32 @malloc(i32 %0) {
%2 = tail call i32 inttoptr (i64 134220601 to i32 (i32)*)(i32 %0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ printTestSummary();
int /*<<< orphan*/ test1();
int /*<<< orphan*/ test2();
int /*<<< orphan*/ test3();
int /*<<< orphan*/ test4();
int main(void) {
  test1();
  test2();
  test3();
  test4();
  printTestSummary();
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1050 <test1@plt>
mov    $0x0,%al
call   1070 <test2@plt>
mov    $0x0,%al
call   1030 <test3@plt>
mov    $0x0,%al
call   1060 <test4@plt>
mov    $0x0,%al
call   1040 <printTestSummary@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1050 <test1@plt>
xor    %eax,%eax
call   1070 <test2@plt>
xor    %eax,%eax
call   1030 <test3@plt>
xor    %eax,%eax
call   1060 <test4@plt>
xor    %eax,%eax
call   1040 <printTestSummary@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = call i32 (...) @test1()
%2 = call i32 (...) @test2()
%3 = call i32 (...) @test3()
%4 = call i32 (...) @test4()
%5 = call i32 (...) @printTestSummary()
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @test1()
%2 = tail call i32 (...) @test2()
%3 = tail call i32 (...) @test3()
%4 = tail call i32 (...) @test4()
%5 = tail call i32 (...) @printTestSummary()
ret i32 0
}
int do_548() { return 548; }


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

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

LLVM IR (-O0):
define i32 @do_548() {
ret i32 548
}

LLVM IR (-O2):
define i32 @do_548() {
ret i32 548
}
/* Variables and functions */
int /*<<< orphan*/ deallocate(int /*<<< orphan*/);
int /*<<< orphan*/ fromAptr(int /*<<< orphan*/);
int /*<<< orphan*/ getInstanceAttribute(int, int);
int /*<<< orphan*/ setInstanceAttribute(int, int, int /*<<< orphan*/);
int /*<<< orphan*/ toAptr(char *);
void setInstanceStringAttribute(int instance, int attribute, char *string) {
  deallocate(fromAptr(getInstanceAttribute(instance, attribute)));
  setInstanceAttribute(instance, attribute, toAptr(string));
}


x86 assembly (clang, -O0):
<setInstanceStringAttribute>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1070 <getInstanceAttribute@plt>
mov    %eax,%edi
call   1040 <fromAptr@plt>
mov    %eax,%edi
call   1050 <deallocate@plt>
mov    -0x4(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <toAptr@plt>
mov    -0x18(%rbp),%edi
mov    -0x14(%rbp),%esi
mov    %eax,%edx
call   1060 <setInstanceAttribute@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<setInstanceStringAttribute>:
push   %rbp
push   %r14
push   %rbx
mov    %rdx,%r14
mov    %esi,%ebp
mov    %edi,%ebx
call   1070 <getInstanceAttribute@plt>
mov    %eax,%edi
call   1040 <fromAptr@plt>
mov    %eax,%edi
call   1050 <deallocate@plt>
mov    %r14,%rdi
call   1030 <toAptr@plt>
mov    %ebx,%edi
mov    %ebp,%esi
mov    %eax,%edx
pop    %rbx
pop    %r14
pop    %rbp
jmp    1060 <setInstanceAttribute@plt>

LLVM IR (-O0):
define void @setInstanceStringAttribute(i32 %0, i32 %1, i8* %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i8*
store i32 %0, i32* %4
store i32 %1, i32* %5
store i8* %2, i8** %6
%7 = load i32, i32* %4
%8 = load i32, i32* %5
%9 = call i32 @getInstanceAttribute(i32 %7, i32 %8)
%10 = call i32 @fromAptr(i32 %9)
%11 = call i32 @deallocate(i32 %10)
%12 = load i32, i32* %4
%13 = load i32, i32* %5
%14 = load i8*, i8** %6
%15 = call i32 @toAptr(i8* %14)
%16 = call i32 @setInstanceAttribute(i32 %12, i32 %13, i32 %15)
ret void
}

LLVM IR (-O2):
define void @setInstanceStringAttribute(i32 %0, i32 %1, i8* %2) {
%4 = tail call i32 @getInstanceAttribute(i32 %0, i32 %1)
%5 = tail call i32 @fromAptr(i32 %4)
%6 = tail call i32 @deallocate(i32 %5)
%7 = tail call i32 @toAptr(i8* %2)
%8 = tail call i32 @setInstanceAttribute(i32 %0, i32 %1, i32 %7)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ internal_fiat_p384_set_one(uintptr_t);
void fiat_p384_set_one(uint32_t out1[12]) {
  internal_fiat_p384_set_one((uintptr_t)out1);
}


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

x86 assembly (clang, -O2):
<fiat_p384_set_one>:
jmp    1030 <internal_fiat_p384_set_one@plt>

LLVM IR (-O0):
define void @fiat_p384_set_one(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = ptrtoint i32* %3 to i64
%5 = call i32 @internal_fiat_p384_set_one(i64 %4)
ret void
}

LLVM IR (-O2):
define void @fiat_p384_set_one(i32* %0) {
%2 = ptrtoint i32* %0 to i64
%3 = tail call i32 @internal_fiat_p384_set_one(i64 %2)
ret void
}
void gdk_window_move() {}


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

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

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

LLVM IR (-O2):
define void @gdk_window_move() {
ret void
}
void bch_btree_iter_next_check(struct btree_iter *iter) {}


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

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

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

LLVM IR (-O2):
%struct.btree_iter = type opaque
define void @bch_btree_iter_next_check(%struct.btree_iter* nocapture %0) {
ret void
}
/* Type definitions */
struct spinlock {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ free(struct spinlock *);
void spinlock_dispose(struct spinlock *l) { free(l); }


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

LLVM IR (-O0):
%struct.spinlock = type { i32 }
define void @spinlock_dispose(%struct.spinlock* %0) {
%2 = alloca %struct.spinlock*
store %struct.spinlock* %0, %struct.spinlock** %2
%3 = load %struct.spinlock*, %struct.spinlock** %2
%4 = call i32 @free(%struct.spinlock* %3)
ret void
}

LLVM IR (-O2):
%struct.spinlock = type { i32 }
define void @spinlock_dispose(%struct.spinlock* nocapture %0) {
%2 = tail call i32 @free(%struct.spinlock* %0)
ret void
}
/* Variables and functions */
double median_double(double *, int);
double median(double *data, int len) { return median_double(data, len); }


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

x86 assembly (clang, -O2):
<median>:
jmp    1030 <median_double@plt>

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

LLVM IR (-O2):
define double @median(double* %0, i32 %1) {
%3 = tail call double @median_double(double* %0, i32 %1)
ret double %3
}
/* Variables and functions */
int /*<<< orphan*/ TIM16_ISR();
int /*<<< orphan*/ TIM1_UP_ISR();
void TIM1_UP_TIM16_ISR(void) {
  TIM1_UP_ISR();
  TIM16_ISR();
}


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

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

LLVM IR (-O0):
define void @TIM1_UP_TIM16_ISR() {
%1 = call i32 (...) @TIM1_UP_ISR()
%2 = call i32 (...) @TIM16_ISR()
ret void
}

LLVM IR (-O2):
define void @TIM1_UP_TIM16_ISR() {
%1 = tail call i32 (...) @TIM1_UP_ISR()
%2 = tail call i32 (...) @TIM16_ISR()
ret void
}
void ComponentSeparator(double *Eff, double F, double x, double CO2_F_ref,
                        double CO2_x_ref) {
  Eff[0] = 0.995 - 3.14e-3 * (F - CO2_F_ref) - 32.5 * (x - CO2_x_ref);
  if (Eff[0] > 1)
    Eff[0] = 1.;
}


x86 assembly (clang, -O0):
<ComponentSeparator>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movsd  %xmm0,-0x10(%rbp)
movsd  %xmm1,-0x18(%rbp)
movsd  %xmm2,-0x20(%rbp)
movsd  %xmm3,-0x28(%rbp)
movsd  -0x10(%rbp),%xmm1
subsd  -0x20(%rbp),%xmm1
movsd  0xee2(%rip),%xmm0
mulsd  %xmm0,%xmm1
movsd  0xede(%rip),%xmm0
addsd  %xmm0,%xmm1
movsd  -0x18(%rbp),%xmm0
subsd  -0x28(%rbp),%xmm0
movsd  0xeb8(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x8(%rbp),%rax
movsd  %xmm0,(%rax)
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm0
movsd  0xe90(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    118a <ComponentSeparator+0x8a>
mov    -0x8(%rbp),%rax
movsd  0xe7a(%rip),%xmm0
movsd  %xmm0,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<ComponentSeparator>:
subsd  %xmm2,%xmm0
mulsd  0xef4(%rip),%xmm0
addsd  0xef4(%rip),%xmm0
subsd  %xmm3,%xmm1
mulsd  0xef0(%rip),%xmm1
addsd  %xmm0,%xmm1
movsd  0xeec(%rip),%xmm0
minsd  %xmm1,%xmm0
movsd  %xmm0,(%rdi)
ret

LLVM IR (-O0):
define void @ComponentSeparator(double* %0, double %1, double %2, double %3, double %4) {
%6 = alloca double*
%7 = alloca double
%8 = alloca double
%9 = alloca double
%10 = alloca double
store double* %0, double** %6
store double %1, double* %7
store double %2, double* %8
store double %3, double* %9
store double %4, double* %10
%11 = load double, double* %7
%12 = load double, double* %9
%13 = fsub double %11, %12
%14 = call double @llvm.fmuladd.f64(double -3.140000e-03, double %13, double 0x3FEFD70A3D70A3D7)
%15 = load double, double* %8
%16 = load double, double* %10
%17 = fsub double %15, %16
%18 = call double @llvm.fmuladd.f64(double -3.250000e+01, double %17, double %14)
%19 = load double*, double** %6
%20 = getelementptr inbounds double, double* %19, i64 0
store double %18, double* %20
%21 = load double*, double** %6
%22 = getelementptr inbounds double, double* %21, i64 0
%23 = load double, double* %22
%24 = fcmp ogt double %23, 1.000000e+00
br i1 %24, label %25, label %28
25: ; preds = %5
%26 = load double*, double** %6
%27 = getelementptr inbounds double, double* %26, i64 0
store double 1.000000e+00, double* %27
br label %28
28: ; preds = %25, %5
ret void
}

LLVM IR (-O2):
define void @ComponentSeparator(double* nocapture writeonly %0, double %1, double %2, double %3, double %4) {
%6 = fsub double %1, %3
%7 = tail call double @llvm.fmuladd.f64(double %6, double -3.140000e-03, double 0x3FEFD70A3D70A3D7)
%8 = fsub double %2, %4
%9 = tail call double @llvm.fmuladd.f64(double %8, double -3.250000e+01, double %7)
%10 = fcmp ogt double %9, 1.000000e+00
%11 = select i1 %10, double 1.000000e+00, double %9
store double %11, double* %0
ret void
}
/* Variables and functions */
int std_listen(int, int);
int listen(int sockfd, int backlog) { return std_listen(sockfd, backlog); }


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

x86 assembly (clang, -O2):
<listen>:
jmp    1030 <std_listen@plt>

LLVM IR (-O0):
define i32 @listen(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 @std_listen(i32 %5, i32 %6)
ret i32 %7
}

LLVM IR (-O2):
define i32 @listen(i32 %0, i32 %1) {
%3 = tail call i32 @std_listen(i32 %0, i32 %1)
ret i32 %3
}
int foo(int x[100]) {
  int y[100];
  int *p;
  y[0] = 2000;
  if (x[0] != 1000) {
    return 1;
  }
  p = x;
  if (p[0] != 1000) {
    return 2;
  }
  p = y;
  if (p[0] != 2000) {
    return 3;
  }
  if (sizeof(x) != sizeof(void *)) {
    return 4;
  }
  if (sizeof(y) <= sizeof(x)) {
    return 5;
  }
  return 0;
}


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
sub    $0x130,%rsp
mov    %rdi,-0x10(%rbp)
movl   $0x7d0,-0x1a0(%rbp)
mov    -0x10(%rbp),%rax
cmpl   $0x3e8,(%rax)
je     1135 <foo+0x35>
movl   $0x1,-0x4(%rbp)
jmp    1193 <foo+0x93>
mov    -0x10(%rbp),%rax
mov    %rax,-0x1a8(%rbp)
mov    -0x1a8(%rbp),%rax
cmpl   $0x3e8,(%rax)
je     115f <foo+0x5f>
movl   $0x2,-0x4(%rbp)
jmp    1193 <foo+0x93>
lea    -0x1a0(%rbp),%rax
mov    %rax,-0x1a8(%rbp)
mov    -0x1a8(%rbp),%rax
cmpl   $0x7d0,(%rax)
je     118c <foo+0x8c>
movl   $0x3,-0x4(%rbp)
jmp    1193 <foo+0x93>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x130,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo>:
xor    %eax,%eax
cmpl   $0x3e8,(%rdi)
setne  %al
ret

LLVM IR (-O0):
define i32 @foo(i32* %0) {
%2 = alloca i32
%3 = alloca i32*
%4 = alloca [100 x i32]
%5 = alloca i32*
store i32* %0, i32** %3
%6 = getelementptr inbounds [100 x i32], [100 x i32]* %4, i64 0, i64 0
store i32 2000, i32* %6
%7 = load i32*, i32** %3
%8 = getelementptr inbounds i32, i32* %7, i64 0
%9 = load i32, i32* %8
%10 = icmp ne i32 %9, 1000
br i1 %10, label %11, label %12
11: ; preds = %1
store i32 1, i32* %2
br label %27
12: ; preds = %1
%13 = load i32*, i32** %3
store i32* %13, i32** %5
%14 = load i32*, i32** %5
%15 = getelementptr inbounds i32, i32* %14, i64 0
%16 = load i32, i32* %15
%17 = icmp ne i32 %16, 1000
br i1 %17, label %18, label %19
18: ; preds = %12
store i32 2, i32* %2
br label %27
19: ; preds = %12
%20 = getelementptr inbounds [100 x i32], [100 x i32]* %4, i64 0, i64 0
store i32* %20, i32** %5
%21 = load i32*, i32** %5
%22 = getelementptr inbounds i32, i32* %21, i64 0
%23 = load i32, i32* %22
%24 = icmp ne i32 %23, 2000
br i1 %24, label %25, label %26
25: ; preds = %19
store i32 3, i32* %2
br label %27
26: ; preds = %19
store i32 0, i32* %2
br label %27
27: ; preds = %26, %25, %18, %11
%28 = load i32, i32* %2
ret i32 %28
}

LLVM IR (-O2):
define i32 @foo(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = icmp ne i32 %2, 1000
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ HplAtm128GeneralIOPinP__16__IO__set();
void SharedAnalogDeviceP__1__EnablePin__set(void) {
  HplAtm128GeneralIOPinP__16__IO__set();
}


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

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

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

LLVM IR (-O2):
define void @SharedAnalogDeviceP__1__EnablePin__set() {
%1 = tail call i32 (...) @HplAtm128GeneralIOPinP__16__IO__set()
ret void
}
/* Variables and functions */
double get_cpu_clock_speed();
int /*<<< orphan*/ printf(char *, double);
int main() {
  printf("cpu clock speed: %f.\n", get_cpu_clock_speed());
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [22 x i8] c"cpu clock speed: %f.\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call double (...) @get_cpu_clock_speed()
%3 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), double %2)
ret i32 0
}

LLVM IR (-O2):
@.str = [22 x i8] c"cpu clock speed: %f.\0A\00"
define i32 @main() {
%1 = tail call double (...) @get_cpu_clock_speed()
%2 = tail call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), double %1)
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
__attribute__((always_)) uint8_t __CLZ(uint32_t value) {
  uint8_t result;
  return (result);
}


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

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

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

LLVM IR (-O2):
define i32 @__CLZ(i32 %0) {
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ foo(int /*<<< orphan*/);
__attribute__((no, noclone)) unsigned char f26(unsigned char x,
                                               unsigned char y) {
  unsigned char r = 2U - x;
  if (r <= 2U)
    foo(0);
  return r;
}


x86 assembly (clang, -O0):
<f26>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %sil,%al
mov    %dil,%cl
mov    %cl,-0x1(%rbp)
mov    %al,-0x2(%rbp)
movzbl -0x1(%rbp),%ecx
mov    $0x2,%eax
sub    %ecx,%eax
mov    %al,-0x3(%rbp)
movzbl -0x3(%rbp),%eax
cmp    $0x2,%eax
ja     1146 <f26+0x36>
xor    %edi,%edi
call   1030 <foo@plt>
movzbl -0x3(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f26>:
push   %rbx
mov    $0x2,%bl
sub    %dil,%bl
cmp    $0x2,%bl
ja     1122 <f26+0x12>
xor    %edi,%edi
call   1030 <foo@plt>
mov    %ebx,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define zeroext i8 @f26(i8 zeroext %0, i8 zeroext %1) {
%3 = sub i8 2, %0
%4 = icmp ult i8 %3, 3
br i1 %4, label %5, label %7
5: ; preds = %2
%6 = tail call i32 @foo(i32 0)
br label %7
7: ; preds = %5, %2
ret i8 %3
}
void wpas_p2p_ap_setup_failed(struct wpa_supplicant *wpa_s) {}


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

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

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

LLVM IR (-O2):
%struct.wpa_supplicant = type opaque
define void @wpas_p2p_ap_setup_failed(%struct.wpa_supplicant* nocapture %0) {
ret void
}
/* Variables and functions */
scalar_t__ isspace(char const);
char *skip_ws(const char *p) {
  while (isspace(*p))
    p++;
  return (char *)p;
}


x86 assembly (clang, -O0):
<skip_ws>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%edi
call   1030 <isspace@plt>
cmp    $0x0,%rax
je     1143 <skip_ws+0x33>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    111c <skip_ws+0xc>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<skip_ws>:
push   %rbx
mov    %rdi,%rbx
add    $0xffffffffffffffff,%rbx
nopl   0x0(%rax,%rax,1)
movsbl 0x1(%rbx),%edi
add    $0x1,%rbx
call   1030 <isspace@plt>
test   %rax,%rax
jne    1120 <skip_ws+0x10>
mov    %rbx,%rax
pop    %rbx
ret

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

LLVM IR (-O2):
define i8* @skip_ws(i8* %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i8* [ %0, %1 ], [ %7, %2 ]
%4 = load i8, i8* %3
%5 = tail call i64 @isspace(i8 signext %4)
%6 = icmp eq i64 %5, 0
%7 = getelementptr inbounds i8, i8* %3, i64 1
br i1 %6, label %8, label %2
8: ; preds = %2
ret i8* %3
}
int min_from_two(int x, int y) { return ((x <= y) ? x : y); }


x86 assembly (clang, -O0):
<min_from_two>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
jg     1121 <min_from_two+0x21>
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
jmp    1127 <min_from_two+0x27>
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<min_from_two>:
mov    %edi,%eax
cmp    %esi,%edi
cmovg  %esi,%eax
ret

LLVM IR (-O0):
define i32 @min_from_two(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 = icmp sle i32 %5, %6
br i1 %7, label %8, label %10
8: ; preds = %2
%9 = load i32, i32* %3
br label %12
10: ; preds = %2
%11 = load i32, i32* %4
br label %12
12: ; preds = %10, %8
%13 = phi i32 [ %9, %8 ], [ %11, %10 ]
ret i32 %13
}

LLVM IR (-O2):
define i32 @min_from_two(i32 %0, i32 %1) {
%3 = icmp sgt i32 %0, %1
%4 = select i1 %3, i32 %1, i32 %0
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ endwin();
void stop_window(void) { endwin(); }


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

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

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

LLVM IR (-O2):
define void @stop_window() {
%1 = tail call i32 (...) @endwin()
ret void
}
int foo(int num, char b, char c, int e) { return 0; }


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
mov    %dl,%al
mov    %sil,%dl
mov    %edi,-0x4(%rbp)
mov    %dl,-0x5(%rbp)
mov    %al,-0x6(%rbp)
mov    %ecx,-0xc(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @foo(i32 %0, i8 signext %1, i8 signext %2, i32 %3) {
%5 = alloca i32
%6 = alloca i8
%7 = alloca i8
%8 = alloca i32
store i32 %0, i32* %5
store i8 %1, i8* %6
store i8 %2, i8* %7
store i32 %3, i32* %8
ret i32 0
}

LLVM IR (-O2):
define i32 @foo(i32 %0, i8 signext %1, i8 signext %2, i32 %3) {
ret i32 0
}
/* Type definitions */
typedef int int32_t;

/* Variables and functions */
void main() {
  int32_t a;
  a = 1 >= 2;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @main() {
ret void
}
/* Variables and functions */
char *getenv(char *);
char *strstr(char const *, char *);
bool test_is_valgrind(void) {
  const char *str = getenv("LD_PRELOAD");
  if (!str) {
    return false;
  }
  const char *pos = strstr(str, "valgrind/");
  if (!pos) {
    return false;
  }
  return true;
}


x86 assembly (clang, -O0):
<test_is_valgrind>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
lea    0xed1(%rip),%rdi
call   1030 <getenv@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    114f <test_is_valgrind+0x2f>
movl   $0x0,-0x4(%rbp)
jmp    1181 <test_is_valgrind+0x61>
mov    -0x10(%rbp),%rdi
lea    0xeb1(%rip),%rsi
call   1040 <strstr@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    117a <test_is_valgrind+0x5a>
movl   $0x0,-0x4(%rbp)
jmp    1181 <test_is_valgrind+0x61>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_is_valgrind>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <getenv@plt>
test   %rax,%rax
je     114e <test_is_valgrind+0x2e>
lea    0xed2(%rip),%rsi
mov    %rax,%rdi
call   1040 <strstr@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
setne  %al
pop    %rcx
ret
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [11 x i8] c"LD_PRELOAD\00"
@.str.1 = [10 x i8] c"valgrind/\00"
define i32 @test_is_valgrind() {
%1 = tail call i8* @getenv(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
%2 = icmp eq i8* %1, null
br i1 %2, label %7, label %3
3: ; preds = %0
%4 = tail call i8* @strstr(i8* %1, i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0))
%5 = icmp ne i8* %4, null
%6 = zext i1 %5 to i32
br label %7
7: ; preds = %0, %3
%8 = phi i32 [ %6, %3 ], [ 0, %0 ]
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ EX_USAGE;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ fputs(char *, int /*<<< orphan*/);
int /*<<< orphan*/ stderr;
void emit_help(void) {
  fputs("Usage: stripeofeol file [file2 ...]\n", stderr);
  exit(EX_USAGE);
}


x86 assembly (clang, -O0):
<emit_help>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ead(%rip),%rax
mov    (%rax),%esi
lea    0xecc(%rip),%rdi
call   1030 <fputs@plt>
mov    0x2ea8(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<emit_help>:
push   %rax
mov    0x2eb0(%rip),%rax
mov    (%rax),%esi
lea    0xecf(%rip),%rdi
call   1030 <fputs@plt>
mov    0x2eab(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [37 x i8] c"Usage: stripeofeol file [file2 ...]\0A\00"
@stderr = global i32 0
@EX_USAGE = global i32 0
define void @emit_help() {
%1 = load i32, i32* @stderr
%2 = call i32 @fputs(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0), i32 %1)
%3 = load i32, i32* @EX_USAGE
%4 = call i32 @exit(i32 %3)
unreachable
}

LLVM IR (-O2):
@.str = [37 x i8] c"Usage: stripeofeol file [file2 ...]\0A\00"
@stderr = global i32 0
@EX_USAGE = global i32 0
define void @emit_help() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fputs(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0), i32 %1)
%3 = load i32, i32* @EX_USAGE
%4 = tail call i32 @exit(i32 %3)
unreachable
}
int main() {
  int arg1 = 0xBBBBBBBB;
  int arg2 = 0xDEADBEEF;
  char out = 0;
  __asm__("addl %1, %2; lahf; movb %%ah, %%al; xorb %%ah,%%ah;"
          : "=a"(out)
          : "r"(arg1), "r"(arg2));
  return (out & 1) && (out & (1 << 2)) && (out & (1 << 7)) ? 1 : 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movl   $0xbbbbbbbb,-0x8(%rbp)
movl   $0xdeadbeef,-0xc(%rbp)
movb   $0x0,-0xd(%rbp)
mov    -0x8(%rbp),%eax
mov    -0xc(%rbp),%ecx
add    %eax,%ecx
lahf
mov    %ah,%al
xor    %ah,%ah
mov    %al,-0xd(%rbp)
movsbl -0xd(%rbp),%ecx
and    $0x1,%ecx
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0xe(%rbp)
je     1169 <main+0x69>
movsbl -0xd(%rbp),%ecx
and    $0x4,%ecx
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0xe(%rbp)
je     1169 <main+0x69>
movsbl -0xd(%rbp),%eax
and    $0x80,%eax
cmp    $0x0,%eax
setne  %al
mov    %al,-0xe(%rbp)
mov    -0xe(%rbp),%dl
xor    %eax,%eax
mov    $0x1,%ecx
test   $0x1,%dl
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
mov    $0xbbbbbbbb,%eax
mov    $0xdeadbeef,%ecx
add    %eax,%ecx
lahf
mov    %ah,%al
xor    %ah,%ah
movzbl %al,%ecx
mov    %ecx,%edx
not    %edx
shr    $0x7,%ecx
xor    %eax,%eax
test   $0x5,%dl
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i8
store i32 0, i32* %1
store i32 -1145324613, i32* %2
store i32 -559038737, i32* %3
store i8 0, i8* %4
%5 = load i32, i32* %2
%6 = load i32, i32* %3
%7 = call i8 asm "addl $1, $2; lahf; movb %ah, %al; xorb %ah,%ah;", "={ax},r,r,~{dirflag},~{fpsr},~{flags}"(i32 %5, i32 %6)
store i8 %7, i8* %4
%8 = load i8, i8* %4
%9 = sext i8 %8 to i32
%10 = and i32 %9, 1
%11 = icmp ne i32 %10, 0
br i1 %11, label %12, label %22
12: ; preds = %0
%13 = load i8, i8* %4
%14 = sext i8 %13 to i32
%15 = and i32 %14, 4
%16 = icmp ne i32 %15, 0
br i1 %16, label %17, label %22
17: ; preds = %12
%18 = load i8, i8* %4
%19 = sext i8 %18 to i32
%20 = and i32 %19, 128
%21 = icmp ne i32 %20, 0
br label %22
22: ; preds = %17, %12, %0
%23 = phi i1 [ false, %12 ], [ false, %0 ], [ %21, %17 ]
%24 = zext i1 %23 to i64
%25 = select i1 %23, i32 1, i32 0
ret i32 %25
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i8 asm "addl $1, $2; lahf; movb %ah, %al; xorb %ah,%ah;", "={ax},r,r,~{dirflag},~{fpsr},~{flags}"(i32 -1145324613, i32 -559038737)
%2 = zext i8 %1 to i32
%3 = and i32 %2, 5
%4 = icmp eq i32 %3, 5
%5 = lshr i32 %2, 7
%6 = select i1 %4, i32 %5, i32 0
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isascii(int);
void t_isascii_0xa4() {
  Assert_real((isascii(164) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_isascii.c",
              825, ("isascii should be 0 for 0xa4"));
}


x86 assembly (clang, -O0):
<t_isascii_0xa4>:
push   %rbp
mov    %rsp,%rbp
mov    $0xa4,%edi
call   1030 <isascii@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xebf(%rip),%rsi
mov    $0x339,%edx
lea    0xf5b(%rip),%rcx
call   1040 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_isascii_0xa4>:
push   %rax
mov    $0xa4,%edi
call   1030 <isascii@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x339,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

LLVM IR (-O0):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isascii.c\00"
@.str.1 = [29 x i8] c"isascii should be 0 for 0xa4\00"
define void @t_isascii_0xa4() {
%1 = call i64 @isascii(i32 164)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 825, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isascii.c\00"
@.str.1 = [29 x i8] c"isascii should be 0 for 0xa4\00"
define void @t_isascii_0xa4() {
%1 = tail call i64 @isascii(i32 164)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 825, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
unsigned char pcibios_read_config_byte(int /*<<< orphan*/, scalar_t__, int);
unsigned long dimm_base(int n) {
  unsigned char byte;
  unsigned long result;
  if (n == 0) {
    return 0;
  }
  byte = pcibios_read_config_byte(0, ((0x00 << 3) + 0), 0x60 + (n - 1));
  result = byte;
  result <<= 23;
  return result;
}


x86 assembly (clang, -O0):
<dimm_base>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
jne    1132 <dimm_base+0x22>
movq   $0x0,-0x8(%rbp)
jmp    1165 <dimm_base+0x55>
mov    -0xc(%rbp),%edx
sub    $0x1,%edx
add    $0x60,%edx
xor    %edi,%edi
xor    %eax,%eax
mov    %eax,%esi
call   1030 <pcibios_read_config_byte@plt>
mov    %al,-0xd(%rbp)
movzbl -0xd(%rbp),%eax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
shl    $0x17,%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dimm_base>:
test   %edi,%edi
je     112f <dimm_base+0x1f>
push   %rax
mov    %edi,%edx
add    $0x5f,%edx
xor    %edi,%edi
xor    %esi,%esi
call   1030 <pcibios_read_config_byte@plt>
movzbl %al,%eax
shl    $0x17,%rax
add    $0x8,%rsp
ret
xor    %eax,%eax
ret

LLVM IR (-O0):
define i64 @dimm_base(i32 %0) {
%2 = alloca i64
%3 = alloca i32
%4 = alloca i8
%5 = alloca i64
store i32 %0, i32* %3
%6 = load i32, i32* %3
%7 = icmp eq i32 %6, 0
br i1 %7, label %8, label %9
8: ; preds = %1
store i64 0, i64* %2
br label %19
9: ; preds = %1
%10 = load i32, i32* %3
%11 = sub nsw i32 %10, 1
%12 = add nsw i32 96, %11
%13 = call zeroext i8 @pcibios_read_config_byte(i32 0, i64 0, i32 %12)
store i8 %13, i8* %4
%14 = load i8, i8* %4
%15 = zext i8 %14 to i64
store i64 %15, i64* %5
%16 = load i64, i64* %5
%17 = shl i64 %16, 23
store i64 %17, i64* %5
%18 = load i64, i64* %5
store i64 %18, i64* %2
br label %19
19: ; preds = %9, %8
%20 = load i64, i64* %2
ret i64 %20
}

LLVM IR (-O2):
define i64 @dimm_base(i32 %0) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %8, label %3
3: ; preds = %1
%4 = add nsw i32 %0, 95
%5 = tail call zeroext i8 @pcibios_read_config_byte(i32 0, i64 0, i32 %4)
%6 = zext i8 %5 to i64
%7 = shl nuw nsw i64 %6, 23
br label %8
8: ; preds = %1, %3
%9 = phi i64 [ %7, %3 ], [ 0, %1 ]
ret i64 %9
}
/* Type definitions */
typedef int /*<<< orphan*/ pthread_mutex_t;

/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ errno;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ perror(char *);
int /*<<< orphan*/ pthread_mutex_lock(int /*<<< orphan*/ *);
void pthread_mutex_elock(pthread_mutex_t *lock) {
  if ((errno = pthread_mutex_lock(lock)))
    do {
      perror("pthread_mutex_lock failed");
      exit(EXIT_FAILURE);
    } while (0);
}


x86 assembly (clang, -O0):
<pthread_mutex_elock>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1050 <pthread_mutex_lock@plt>
mov    0x2e94(%rip),%rcx
mov    %eax,(%rcx)
cmp    $0x0,%eax
je     1176 <pthread_mutex_elock+0x46>
jmp    115c <pthread_mutex_elock+0x2c>
lea    0xe9d(%rip),%rdi
call   1030 <perror@plt>
mov    0x2e69(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pthread_mutex_elock>:
push   %rax
call   1050 <pthread_mutex_lock@plt>
mov    0x2ea3(%rip),%rcx
mov    %eax,(%rcx)
test   %eax,%eax
jne    1145 <pthread_mutex_elock+0x15>
pop    %rax
ret
lea    0xeb4(%rip),%rdi
call   1030 <perror@plt>
mov    0x2e80(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@errno = global i32 0
@.str = [26 x i8] c"pthread_mutex_lock failed\00"
@EXIT_FAILURE = global i32 0
define void @pthread_mutex_elock(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = call i32 @pthread_mutex_lock(i32* %3)
store i32 %4, i32* @errno
%5 = icmp ne i32 %4, 0
br i1 %5, label %6, label %12
6: ; preds = %1
br label %7
7: ; preds = %6
%8 = call i32 @perror(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
%9 = load i32, i32* @EXIT_FAILURE
%10 = call i32 @exit(i32 %9)
unreachable
11: ; No predecessors!
br label %12
12: ; preds = %11, %1
ret void
}

LLVM IR (-O2):
@errno = global i32 0
@.str = [26 x i8] c"pthread_mutex_lock failed\00"
@EXIT_FAILURE = global i32 0
define void @pthread_mutex_elock(i32* %0) {
%2 = tail call i32 @pthread_mutex_lock(i32* %0)
store i32 %2, i32* @errno
%3 = icmp eq i32 %2, 0
br i1 %3, label %8, label %4
4: ; preds = %1
%5 = tail call i32 @perror(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
%6 = load i32, i32* @EXIT_FAILURE
%7 = tail call i32 @exit(i32 %6)
unreachable
8: ; preds = %1
ret void
}
void InitializePDProtocolVariables(void) {}


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

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

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

LLVM IR (-O2):
define void @InitializePDProtocolVariables() {
ret void
}
macputchar(c) char c;
{ macprintf("%c", c); }


x86 assembly (clang, -O0):
<macputchar>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x5(%rbp)
movsbl -0x5(%rbp),%esi
lea    0xed7(%rip),%rdi
mov    $0x0,%al
call   1030 <macprintf@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<macputchar>:
movsbl %dil,%esi
lea    0xee5(%rip),%rdi
xor    %eax,%eax
jmp    1030 <macprintf@plt>

LLVM IR (-O0):
@.str = [3 x i8] c"%c\00"
define i32 @macputchar(i32 %0) {
%2 = alloca i32
%3 = alloca i8
%4 = trunc i32 %0 to i8
store i8 %4, i8* %3
%5 = load i8, i8* %3
%6 = sext i8 %5 to i32
%7 = call i32 (i8*, i32, ...) bitcast (i32 (...)* @macprintf to i32 (i8*, i32, ...)*)(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %6)
%8 = load i32, i32* %2
ret i32 %8
}

LLVM IR (-O2):
@.str = [3 x i8] c"%c\00"
define i32 @macputchar(i32 %0) {
%2 = shl i32 %0, 24
%3 = ashr exact i32 %2, 24
%4 = tail call i32 (i8*, i32, ...) bitcast (i32 (...)* @macprintf to i32 (i8*, i32, ...)*)(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %3)
ret i32 undef
}
int main(int argc, char *argv[]) { return argc; }


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
mov    %edi,%eax
ret

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

LLVM IR (-O2):
define i32 @main(i32 returned %0, i8** nocapture readnone %1) {
ret i32 %0
}
/* Variables and functions */
int /*<<< orphan*/ print_array(int *, int);
int /*<<< orphan*/ quick_sort(int *, int /*<<< orphan*/, int);
int main() {
  int a[10] = {9, 8, 7, 6, 5, 12, 3, 34, 1, 0};
  print_array(a, 10);
  quick_sort(a, 0, 9);
  print_array(a, 10);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x30(%rbp),%rdi
lea    0xeb6(%rip),%rsi
mov    $0x28,%edx
call   1040 <memcpy@plt>
lea    -0x30(%rbp),%rdi
mov    $0xa,%esi
call   1030 <print_array@plt>
lea    -0x30(%rbp),%rdi
xor    %esi,%esi
mov    $0x9,%edx
call   1050 <quick_sort@plt>
lea    -0x30(%rbp),%rdi
mov    $0xa,%esi
call   1030 <print_array@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x30,%rsp
mov    0xef4(%rip),%rax
mov    %rax,0x20(%rsp)
movaps 0xed8(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0xebc(%rip),%xmm0
movaps %xmm0,(%rsp)
mov    %rsp,%rbx
mov    %rbx,%rdi
mov    $0xa,%esi
call   1030 <print_array@plt>
mov    %rbx,%rdi
xor    %esi,%esi
mov    $0x9,%edx
call   1040 <quick_sort@plt>
mov    %rbx,%rdi
mov    $0xa,%esi
call   1030 <print_array@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@__const.main.a = [10 x i32] [i32 9, i32 8, i32 7, i32 6, i32 5, i32 12, i32 3, i32 34, i32 1, i32 0]
define i32 @main() {
%1 = alloca i32
%2 = alloca [10 x i32]
store i32 0, i32* %1
%3 = bitcast [10 x i32]* %2 to i8*
%4 = getelementptr inbounds [10 x i32], [10 x i32]* %2, i64 0, i64 0
%5 = call i32 @print_array(i32* %4, i32 10)
%6 = getelementptr inbounds [10 x i32], [10 x i32]* %2, i64 0, i64 0
%7 = call i32 @quick_sort(i32* %6, i32 0, i32 9)
%8 = getelementptr inbounds [10 x i32], [10 x i32]* %2, i64 0, i64 0
%9 = call i32 @print_array(i32* %8, i32 10)
ret i32 0
}

LLVM IR (-O2):
@__const.main.a = [10 x i32] [i32 9, i32 8, i32 7, i32 6, i32 5, i32 12, i32 3, i32 34, i32 1, i32 0]
define i32 @main() {
%1 = alloca [10 x i32]
%2 = bitcast [10 x i32]* %1 to i8*
%3 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 0
%4 = call i32 @print_array(i32* %3, i32 10)
%5 = call i32 @quick_sort(i32* %3, i32 0, i32 9)
%6 = call i32 @print_array(i32* %3, i32 10)
ret i32 0
}
int ar9003_mci_end_reset(struct ath_hw *ah, struct ath9k_channel *chan,
                         struct ath9k_hw_cal_data *caldata) {
  return 0;
}


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

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

LLVM IR (-O0):
%struct.ath_hw = type opaque
%struct.ath9k_channel = type opaque
%struct.ath9k_hw_cal_data = type opaque
define i32 @ar9003_mci_end_reset(%struct.ath_hw* %0, %struct.ath9k_channel* %1, %struct.ath9k_hw_cal_data* %2) {
%4 = alloca %struct.ath_hw*
%5 = alloca %struct.ath9k_channel*
%6 = alloca %struct.ath9k_hw_cal_data*
store %struct.ath_hw* %0, %struct.ath_hw** %4
store %struct.ath9k_channel* %1, %struct.ath9k_channel** %5
store %struct.ath9k_hw_cal_data* %2, %struct.ath9k_hw_cal_data** %6
ret i32 0
}

LLVM IR (-O2):
%struct.ath_hw = type opaque
%struct.ath9k_channel = type opaque
%struct.ath9k_hw_cal_data = type opaque
define i32 @ar9003_mci_end_reset(%struct.ath_hw* nocapture readnone %0, %struct.ath9k_channel* nocapture readnone %1, %struct.ath9k_hw_cal_data* nocapture readnone %2) {
ret i32 0
}
/* Variables and functions */
double cos(double);
double Double_cos(double x) { return cos(x); }


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

x86 assembly (clang, -O2):
<Double_cos>:
jmp    1030 <cos@plt>

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

LLVM IR (-O2):
define double @Double_cos(double %0) {
%2 = tail call double @cos(double %0)
ret double %2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int print_options_str_manip() {
  printf("\r\nEnter any one of the below options,\r\n");
  printf("1. String concatination\r\n");
  printf("0. Exit string manipulation\r\n");
  printf("Option: ");
}


x86 assembly (clang, -O0):
<print_options_str_manip>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xee1(%rip),%rdi
call   1030 <printf@plt>
lea    0xefd(%rip),%rdi
call   1030 <printf@plt>
lea    0xf0b(%rip),%rdi
call   1030 <printf@plt>
lea    0xf1d(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_options_str_manip>:
push   %rax
lea    0xee1(%rip),%rdi
call   1030 <puts@plt>
lea    0xefc(%rip),%rdi
call   1030 <puts@plt>
lea    0xf09(%rip),%rdi
call   1030 <puts@plt>
lea    0xeb4(%rip),%rdi
pop    %rax
jmp    1040 <printf@plt>

LLVM IR (-O0):
@.str = [40 x i8] c"\0D\0AEnter any one of the below options,\0D\0A\00"
@.str.1 = [26 x i8] c"1. String concatination\0D\0A\00"
@.str.2 = [30 x i8] c"0. Exit string manipulation\0D\0A\00"
@.str.3 = [9 x i8] c"Option: \00"
define i32 @print_options_str_manip() {
%1 = alloca i32
%2 = call i32 @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
%4 = call i32 @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.2, i64 0, i64 0))
%5 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.3, i64 0, i64 0))
%6 = load i32, i32* %1
ret i32 %6
}

LLVM IR (-O2):
@.str.3 = [9 x i8] c"Option: \00"
@str = [39 x i8] c"\0D\0AEnter any one of the below options,\0D\00"
@str.4 = [25 x i8] c"1. String concatination\0D\00"
@str.5 = [29 x i8] c"0. Exit string manipulation\0D\00"
define i32 @print_options_str_manip() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([39 x i8], [39 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @str.4, i64 0, i64 0))
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @str.5, i64 0, i64 0))
%4 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.3, i64 0, i64 0))
ret i32 undef
}
/* Variables and functions */
scalar_t__ isalpha(int);
scalar_t__ isblank(int);
int can_print_it(char ch) { return isalpha((int)ch) || isblank((int)ch); }


x86 assembly (clang, -O0):
<can_print_it>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%edi
call   1040 <isalpha@plt>
mov    %rax,%rcx
mov    $0x1,%al
cmp    $0x0,%rcx
mov    %al,-0x2(%rbp)
jne    115c <can_print_it+0x3c>
movsbl -0x1(%rbp),%edi
call   1030 <isblank@plt>
cmp    $0x0,%rax
setne  %al
mov    %al,-0x2(%rbp)
mov    -0x2(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<can_print_it>:
push   %rbx
mov    %edi,%ebx
call   1040 <isalpha@plt>
mov    %rax,%rcx
mov    $0x1,%eax
test   %rcx,%rcx
je     1137 <can_print_it+0x17>
pop    %rbx
ret
mov    %ebx,%edi
call   1030 <isblank@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
setne  %al
pop    %rbx
ret

LLVM IR (-O0):
define i32 @can_print_it(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
%5 = call i64 @isalpha(i32 %4)
%6 = icmp ne i64 %5, 0
br i1 %6, label %12, label %7
7: ; preds = %1
%8 = load i8, i8* %2
%9 = sext i8 %8 to i32
%10 = call i64 @isblank(i32 %9)
%11 = icmp ne i64 %10, 0
br label %12
12: ; preds = %7, %1
%13 = phi i1 [ true, %1 ], [ %11, %7 ]
%14 = zext i1 %13 to i32
ret i32 %14
}

LLVM IR (-O2):
define i32 @can_print_it(i8 signext %0) {
%2 = sext i8 %0 to i32
%3 = tail call i64 @isalpha(i32 %2)
%4 = icmp eq i64 %3, 0
br i1 %4, label %5, label %9
5: ; preds = %1
%6 = tail call i64 @isblank(i32 %2)
%7 = icmp ne i64 %6, 0
%8 = zext i1 %7 to i32
br label %9
9: ; preds = %5, %1
%10 = phi i32 [ 1, %1 ], [ %8, %5 ]
ret i32 %10
}