xunge/DecIR huggingface dataset:
double fabs(double x) { return x >= 0 ? x : -x; }


x86 assembly (clang, -O0):
<fabs>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jb     112a <fabs+0x2a>
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x10(%rbp)
jmp    114b <fabs+0x4b>
movsd  -0x8(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<fabs>:
movapd 0xef8(%rip),%xmm1
xorpd  %xmm0,%xmm1
xorpd  %xmm2,%xmm2
cmplesd %xmm0,%xmm2
andpd  %xmm2,%xmm0
andnpd %xmm1,%xmm2
orpd   %xmm2,%xmm0
ret

LLVM IR (-O0):
define double @fabs(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fcmp oge double %3, 0.000000e+00
br i1 %4, label %5, label %7
5: ; preds = %1
%6 = load double, double* %2
br label %10
7: ; preds = %1
%8 = load double, double* %2
%9 = fneg double %8
br label %10
10: ; preds = %7, %5
%11 = phi double [ %6, %5 ], [ %9, %7 ]
ret double %11
}

LLVM IR (-O2):
define double @fabs(double %0) {
%2 = fcmp oge double %0, 0.000000e+00
%3 = fneg double %0
%4 = select i1 %2, double %0, double %3
ret double %4
}
/* Type definitions */
struct timespec {
  double tv_sec;
  int tv_nsec;
};

/* Variables and functions */
double time_diff(struct timespec *t0, struct timespec *t1) {
  return (t1->tv_sec - t0->tv_sec) + (t1->tv_nsec - t0->tv_nsec) * 1e-9;
}


x86 assembly (clang, -O0):
<time_diff>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm1
mov    -0x8(%rbp),%rax
subsd  (%rax),%xmm1
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%eax
mov    -0x8(%rbp),%rcx
sub    0x8(%rcx),%eax
cvtsi2sd %eax,%xmm0
movsd  0xeca(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<time_diff>:
movsd  (%rsi),%xmm1
subsd  (%rdi),%xmm1
mov    0x8(%rsi),%eax
sub    0x8(%rdi),%eax
cvtsi2sd %eax,%xmm0
mulsd  0xee6(%rip),%xmm0
addsd  %xmm1,%xmm0
ret

LLVM IR (-O0):
%struct.timespec = type { double, i32 }
define double @time_diff(%struct.timespec* %0, %struct.timespec* %1) {
%3 = alloca %struct.timespec*
%4 = alloca %struct.timespec*
store %struct.timespec* %0, %struct.timespec** %3
store %struct.timespec* %1, %struct.timespec** %4
%5 = load %struct.timespec*, %struct.timespec** %4
%6 = getelementptr inbounds %struct.timespec, %struct.timespec* %5, i32 0, i32 0
%7 = load double, double* %6
%8 = load %struct.timespec*, %struct.timespec** %3
%9 = getelementptr inbounds %struct.timespec, %struct.timespec* %8, i32 0, i32 0
%10 = load double, double* %9
%11 = fsub double %7, %10
%12 = load %struct.timespec*, %struct.timespec** %4
%13 = getelementptr inbounds %struct.timespec, %struct.timespec* %12, i32 0, i32 1
%14 = load i32, i32* %13
%15 = load %struct.timespec*, %struct.timespec** %3
%16 = getelementptr inbounds %struct.timespec, %struct.timespec* %15, i32 0, i32 1
%17 = load i32, i32* %16
%18 = sub nsw i32 %14, %17
%19 = sitofp i32 %18 to double
%20 = call double @llvm.fmuladd.f64(double %19, double 1.000000e-09, double %11)
ret double %20
}

LLVM IR (-O2):
%struct.timespec = type { double, i32 }
define double @time_diff(%struct.timespec* nocapture %0, %struct.timespec* nocapture %1) {
%3 = getelementptr inbounds %struct.timespec, %struct.timespec* %1, i64 0, i32 0
%4 = load double, double* %3
%5 = getelementptr inbounds %struct.timespec, %struct.timespec* %0, i64 0, i32 0
%6 = load double, double* %5
%7 = fsub double %4, %6
%8 = getelementptr inbounds %struct.timespec, %struct.timespec* %1, i64 0, i32 1
%9 = load i32, i32* %8
%10 = getelementptr inbounds %struct.timespec, %struct.timespec* %0, i64 0, i32 1
%11 = load i32, i32* %10
%12 = sub nsw i32 %9, %11
%13 = sitofp i32 %12 to double
%14 = tail call double @llvm.fmuladd.f64(double %13, double 1.000000e-09, double %7)
ret double %14
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int /*<<< orphan*/, char *, int, char *);
int /*<<< orphan*/ islower(int);
void t_islower_0x63() {
  Assert_real((islower(99)),
              "/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_islower.c",
              500, ("islower should be 1 for c"));
}


x86 assembly (clang, -O0):
<t_islower_0x63>:
push   %rbp
mov    %rsp,%rbp
mov    $0x63,%edi
call   1030 <islower@plt>
mov    %eax,%edi
lea    0xec9(%rip),%rsi
mov    $0x1f4,%edx
lea    0xf65(%rip),%rcx
call   1040 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_islower_0x63>:
push   %rax
mov    $0x63,%edi
call   1030 <islower@plt>
lea    0xece(%rip),%rsi
lea    0xf6f(%rip),%rcx
mov    %eax,%edi
mov    $0x1f4,%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_islower.c\00"
@.str.1 = [26 x i8] c"islower should be 1 for c\00"
define void @t_islower_0x63() {
%1 = call i32 @islower(i32 99)
%2 = call i32 @Assert_real(i32 %1, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 500, i8* getelementptr inbounds ([26 x i8], [26 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_islower.c\00"
@.str.1 = [26 x i8] c"islower should be 1 for c\00"
define void @t_islower_0x63() {
%1 = tail call i32 @islower(i32 99)
%2 = tail call i32 @Assert_real(i32 %1, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 500, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
int secureMemoryWipe(void *ptr, size_t len) {
  unsigned char *a = ptr;
  while (len--)
    *a = '\0';
  free(ptr);
}


x86 assembly (clang, -O0):
<secureMemoryWipe>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,%rcx
add    $0xffffffffffffffff,%rcx
mov    %rcx,-0x18(%rbp)
cmp    $0x0,%rax
je     114d <secureMemoryWipe+0x3d>
mov    -0x20(%rbp),%rax
movb   $0x0,(%rax)
jmp    1128 <secureMemoryWipe+0x18>
mov    -0x10(%rbp),%rdi
call   1030 <free@plt>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<secureMemoryWipe>:
test   %rsi,%rsi
je     1118 <secureMemoryWipe+0x8>
movb   $0x0,(%rdi)
jmp    1030 <free@plt>

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

LLVM IR (-O2):
define i32 @secureMemoryWipe(i8* nocapture %0, i64 %1) {
%3 = icmp eq i64 %1, 0
br i1 %3, label %5, label %4
4: ; preds = %2
store i8 0, i8* %0
br label %5
5: ; preds = %4, %2
%6 = tail call i32 @free(i8* %0)
ret i32 undef
}
void crash() { ((unsigned char *)0x100000)[0] = 0xFF; }


x86 assembly (clang, -O0):
<crash>:
push   %rbp
mov    %rsp,%rbp
mov    $0x100000,%eax
movb   $0xff,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<crash>:
movb   $0xff,0x100000
ff
ret

LLVM IR (-O0):
define void @crash() {
store i8 -1, i8* inttoptr (i64 1048576 to i8*)
ret void
}

LLVM IR (-O2):
define void @crash() {
store i8 -1, i8* inttoptr (i64 1048576 to i8*)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int pa_frame_align() {
  printf("NOT IMPLEMENTED:"
         "pa_frame_align"
         "\n");
}


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

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

LLVM IR (-O0):
@.str = [32 x i8] c"NOT IMPLEMENTED:pa_frame_align\0A\00"
define i32 @pa_frame_align() {
%1 = alloca i32
%2 = call i32 @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* %1
ret i32 %3
}

LLVM IR (-O2):
@str = [31 x i8] c"NOT IMPLEMENTED:pa_frame_align\00"
define i32 @pa_frame_align() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([31 x i8], [31 x i8]* @str, i64 0, i64 0))
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void dmc_unrar_def_free_func(void *opaque, void *address) {
  (void)opaque;
  (void)address;
  free(address);
}


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

x86 assembly (clang, -O2):
<dmc_unrar_def_free_func>:
mov    %rsi,%rdi
jmp    1030 <free@plt>

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

LLVM IR (-O2):
define void @dmc_unrar_def_free_func(i8* nocapture readnone %0, i8* nocapture %1) {
%3 = tail call i32 @free(i8* %1)
ret void
}
void no_args_or_locals(void) {}


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

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

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

LLVM IR (-O2):
define void @no_args_or_locals() {
ret void
}
int luby(int i) {
  int k, p;
  k = 1;
  p = 2;
  while (p < (i + 1)) {
    k += 1;
    p *= 2;
  }
  if (p == (i + 1))
    return (p / 2);
  return (luby(i - (p / 2) + 1));
}


x86 assembly (clang, -O0):
<luby>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
movl   $0x1,-0xc(%rbp)
movl   $0x2,-0x10(%rbp)
mov    -0x10(%rbp),%eax
mov    -0x8(%rbp),%ecx
add    $0x1,%ecx
cmp    %ecx,%eax
jge    1151 <luby+0x41>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
mov    -0x10(%rbp),%eax
shl    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1129 <luby+0x19>
mov    -0x10(%rbp),%eax
mov    -0x8(%rbp),%ecx
add    $0x1,%ecx
cmp    %ecx,%eax
jne    1175 <luby+0x65>
mov    -0x10(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,-0x4(%rbp)
jmp    1190 <luby+0x80>
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
sub    %eax,%edi
add    $0x1,%edi
call   1030 <luby@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<luby>:
mov    $0x2,%eax
cs nopw 0x0(%rax,%rax,1)
nop
mov    %eax,%ecx
lea    (%rcx,%rcx,1),%eax
cmp    %edi,%ecx
jle    1110 <luby+0x10>
add    $0x1,%edi
mov    %ecx,%eax
shr    %eax
cmp    %edi,%ecx
je     1128 <luby+0x28>
sub    %eax,%edi
jmp    1100 <luby>
ret

LLVM IR (-O0):
define i32 @luby(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %3
store i32 1, i32* %4
store i32 2, i32* %5
br label %6
6: ; preds = %11, %1
%7 = load i32, i32* %5
%8 = load i32, i32* %3
%9 = add nsw i32 %8, 1
%10 = icmp slt i32 %7, %9
br i1 %10, label %11, label %16
11: ; preds = %6
%12 = load i32, i32* %4
%13 = add nsw i32 %12, 1
store i32 %13, i32* %4
%14 = load i32, i32* %5
%15 = mul nsw i32 %14, 2
store i32 %15, i32* %5
br label %6
16: ; preds = %6
%17 = load i32, i32* %5
%18 = load i32, i32* %3
%19 = add nsw i32 %18, 1
%20 = icmp eq i32 %17, %19
br i1 %20, label %21, label %24
21: ; preds = %16
%22 = load i32, i32* %5
%23 = sdiv i32 %22, 2
store i32 %23, i32* %2
br label %31
24: ; preds = %16
%25 = load i32, i32* %3
%26 = load i32, i32* %5
%27 = sdiv i32 %26, 2
%28 = sub nsw i32 %25, %27
%29 = add nsw i32 %28, 1
%30 = call i32 @luby(i32 %29)
store i32 %30, i32* %2
br label %31
31: ; preds = %24, %21
%32 = load i32, i32* %2
ret i32 %32
}

LLVM IR (-O2):
define i32 @luby(i32 %0) {
br label %2
2: ; preds = %13, %1
%3 = phi i32 [ %0, %1 ], [ %14, %13 ]
br label %4
4: ; preds = %4, %2
%5 = phi i32 [ 2, %2 ], [ %7, %4 ]
%6 = icmp sgt i32 %5, %3
%7 = shl nsw i32 %5, 1
br i1 %6, label %8, label %4
8: ; preds = %4
%9 = add nsw i32 %3, 1
%10 = icmp eq i32 %5, %9
%11 = lshr exact i32 %5, 1
br i1 %10, label %12, label %13
12: ; preds = %8
ret i32 %11
13: ; preds = %8
%14 = sub i32 %9, %11
br label %2
}
void LCD_renderSprites() {}


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

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

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

LLVM IR (-O2):
define void @LCD_renderSprites() {
ret void
}
unsigned int sum2(unsigned int n) {
  if (n <= 1) {
    return n;
  }
  return n + sum2(n - 1);
}


x86 assembly (clang, -O0):
<sum2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
cmpl   $0x1,-0x8(%rbp)
ja     1130 <sum2+0x20>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    114b <sum2+0x3b>
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%edi
sub    $0x1,%edi
call   1030 <sum2@plt>
mov    %eax,%ecx
mov    -0xc(%rbp),%eax
add    %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sum2>:
xor    %eax,%eax
cmp    $0x2,%edi
jb     1123 <sum2+0x23>
lea    -0x1(%rdi),%eax
lea    -0x2(%rdi),%ecx
imul   %ecx,%eax
lea    -0x3(%rdi),%edx
imul   %rcx,%rdx
shr    %rdx
add    %edi,%eax
sub    %edx,%eax
mov    $0x1,%edi
add    %edi,%eax
ret

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

LLVM IR (-O2):
define i32 @sum2(i32 %0) {
%2 = icmp ult i32 %0, 2
br i1 %2, label %15, label %3
3: ; preds = %1
%4 = add i32 %0, -1
%5 = add i32 %0, -2
%6 = mul i32 %4, %5
%7 = zext i32 %5 to i33
%8 = add i32 %0, -3
%9 = zext i32 %8 to i33
%10 = mul i33 %7, %9
%11 = lshr i33 %10, 1
%12 = trunc i33 %11 to i32
%13 = add i32 %6, %0
%14 = sub i32 %13, %12
br label %15
15: ; preds = %3, %1
%16 = phi i32 [ 0, %1 ], [ %14, %3 ]
%17 = phi i32 [ %0, %1 ], [ 1, %3 ]
%18 = add i32 %17, %16
ret i32 %18
}
/* Variables and functions */
int /*<<< orphan*/ fib(int);
int /*<<< orphan*/ print(char *);
int /*<<< orphan*/ print_num(int /*<<< orphan*/);
int main() {
  print_num(fib(5));
  print("\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x5,%edi
call   1040 <fib@plt>
mov    %eax,%edi
call   1050 <print_num@plt>
lea    0xea9(%rip),%rdi
call   1030 <print@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x5,%edi
call   1040 <fib@plt>
mov    %eax,%edi
call   1050 <print_num@plt>
lea    0xeb7(%rip),%rdi
call   1030 <print@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [2 x i8] c"\0A\00"
define i32 @main() {
%1 = tail call i32 @fib(i32 5)
%2 = tail call i32 @print_num(i32 %1)
%3 = tail call i32 @print(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ OverrideLowPriorityAttackSubroutines();
int /*<<< orphan*/ OverrideLowPriorityDefenseSubroutines();
void OverrideLowPrioritySubroutines() {
  OverrideLowPriorityDefenseSubroutines();
  OverrideLowPriorityAttackSubroutines();
}


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

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

LLVM IR (-O0):
define void @OverrideLowPrioritySubroutines() {
%1 = call i32 (...) @OverrideLowPriorityDefenseSubroutines()
%2 = call i32 (...) @OverrideLowPriorityAttackSubroutines()
ret void
}

LLVM IR (-O2):
define void @OverrideLowPrioritySubroutines() {
%1 = tail call i32 (...) @OverrideLowPriorityDefenseSubroutines()
%2 = tail call i32 (...) @OverrideLowPriorityAttackSubroutines()
ret void
}
/* Type definitions */
struct Cyc_Lexing_lexbuf {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ Cyc_suck_restofline_rec(struct Cyc_Lexing_lexbuf *, int);
int Cyc_suck_restofline(struct Cyc_Lexing_lexbuf *lexbuf) {
  return ({ Cyc_suck_restofline_rec(lexbuf, 12); });
}


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

x86 assembly (clang, -O2):
<Cyc_suck_restofline>:
mov    $0xc,%esi
jmp    1030 <Cyc_suck_restofline_rec@plt>

LLVM IR (-O0):
%struct.Cyc_Lexing_lexbuf = type { i32 }
define i32 @Cyc_suck_restofline(%struct.Cyc_Lexing_lexbuf* %0) {
%2 = alloca %struct.Cyc_Lexing_lexbuf*
%3 = alloca i32
store %struct.Cyc_Lexing_lexbuf* %0, %struct.Cyc_Lexing_lexbuf** %2
%4 = load %struct.Cyc_Lexing_lexbuf*, %struct.Cyc_Lexing_lexbuf** %2
%5 = call i32 @Cyc_suck_restofline_rec(%struct.Cyc_Lexing_lexbuf* %4, i32 12)
store i32 %5, i32* %3
%6 = load i32, i32* %3
ret i32 %6
}

LLVM IR (-O2):
%struct.Cyc_Lexing_lexbuf = type { i32 }
define i32 @Cyc_suck_restofline(%struct.Cyc_Lexing_lexbuf* %0) {
%2 = tail call i32 @Cyc_suck_restofline_rec(%struct.Cyc_Lexing_lexbuf* %0, i32 12)
ret i32 %2
}
/* Type definitions */
struct darr {
  int dummy;
};

/* Variables and functions */
void const *darr_last(struct darr *);
const void *darr_last_const(const struct darr *d) {
  return darr_last((struct darr *)d);
}


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

x86 assembly (clang, -O2):
<darr_last_const>:
jmp    1030 <darr_last@plt>

LLVM IR (-O0):
%struct.darr = type { i32 }
define i8* @darr_last_const(%struct.darr* %0) {
%2 = alloca %struct.darr*
store %struct.darr* %0, %struct.darr** %2
%3 = load %struct.darr*, %struct.darr** %2
%4 = call i8* @darr_last(%struct.darr* %3)
ret i8* %4
}

LLVM IR (-O2):
%struct.darr = type { i32 }
define i8* @darr_last_const(%struct.darr* %0) {
%2 = tail call i8* @darr_last(%struct.darr* %0)
ret i8* %2
}
void ff_hevc_put_hevc_uni_w_pel_pixels48_10_sse4() {}


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

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

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

LLVM IR (-O2):
define void @ff_hevc_put_hevc_uni_w_pel_pixels48_10_sse4() {
ret void
}
char *hb_energy_get_source_dummy(void) { return "Dummy Source"; }


x86 assembly (clang, -O0):
<hb_energy_get_source_dummy>:
push   %rbp
mov    %rsp,%rbp
lea    0xef5(%rip),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<hb_energy_get_source_dummy>:
lea    0xef9(%rip),%rax
ret

LLVM IR (-O0):
@.str = [13 x i8] c"Dummy Source\00"
define i8* @hb_energy_get_source_dummy() {
ret i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [13 x i8] c"Dummy Source\00"
define i8* @hb_energy_get_source_dummy() {
ret i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0)
}
int hash_plugin_hash_length(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @hash_plugin_hash_length() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ ssd1306_sendByte(int);
int /*<<< orphan*/ ssd1306_startTransmission();
void ssd1306_i2cCommandStart() {
  ssd1306_startTransmission();
  ssd1306_sendByte(0x00);
}


x86 assembly (clang, -O0):
<ssd1306_i2cCommandStart>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <ssd1306_startTransmission@plt>
xor    %edi,%edi
call   1040 <ssd1306_sendByte@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<ssd1306_i2cCommandStart>:
push   %rax
xor    %eax,%eax
call   1030 <ssd1306_startTransmission@plt>
xor    %edi,%edi
pop    %rax
jmp    1040 <ssd1306_sendByte@plt>

LLVM IR (-O0):
define void @ssd1306_i2cCommandStart() {
%1 = call i32 (...) @ssd1306_startTransmission()
%2 = call i32 @ssd1306_sendByte(i32 0)
ret void
}

LLVM IR (-O2):
define void @ssd1306_i2cCommandStart() {
%1 = tail call i32 (...) @ssd1306_startTransmission()
%2 = tail call i32 @ssd1306_sendByte(i32 0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void handleErrors() { printf("Some error occured in  encryption function\n"); }


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

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

LLVM IR (-O0):
@.str = [44 x i8] c"Some error occured in encryption function\0A\00"
define void @handleErrors() {
%1 = call i32 @printf(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [43 x i8] c"Some error occured in encryption function\00"
define void @handleErrors() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([43 x i8], [43 x i8]* @str, i64 0, i64 0))
ret void
}
void s5p6450_default_sdhci1(void) {}


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

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

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

LLVM IR (-O2):
define void @s5p6450_default_sdhci1() {
ret void
}
/* Variables and functions */
unsigned long ROTR(unsigned long, int);
unsigned long int S3(unsigned long int x) {
  return (ROTR(x, 6) ^ ROTR(x, 11) ^ ROTR(x, 25));
}


x86 assembly (clang, -O0):
<S3>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x6,%esi
call   1030 <ROTR@plt>
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0xb,%esi
call   1030 <ROTR@plt>
mov    %rax,%rcx
mov    -0x18(%rbp),%rax
xor    %rcx,%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x19,%esi
call   1030 <ROTR@plt>
mov    %rax,%rcx
mov    -0x10(%rbp),%rax
xor    %rcx,%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<S3>:
push   %r15
push   %r14
push   %rbx
mov    %rdi,%r15
mov    $0x6,%esi
call   1030 <ROTR@plt>
mov    %rax,%r14
mov    %r15,%rdi
mov    $0xb,%esi
call   1030 <ROTR@plt>
mov    %rax,%rbx
xor    %r14,%rbx
mov    %r15,%rdi
mov    $0x19,%esi
call   1030 <ROTR@plt>
xor    %rbx,%rax
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define i64 @S3(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = call i64 @ROTR(i64 %3, i32 6)
%5 = load i64, i64* %2
%6 = call i64 @ROTR(i64 %5, i32 11)
%7 = xor i64 %4, %6
%8 = load i64, i64* %2
%9 = call i64 @ROTR(i64 %8, i32 25)
%10 = xor i64 %7, %9
ret i64 %10
}

LLVM IR (-O2):
define i64 @S3(i64 %0) {
%2 = tail call i64 @ROTR(i64 %0, i32 6)
%3 = tail call i64 @ROTR(i64 %0, i32 11)
%4 = xor i64 %3, %2
%5 = tail call i64 @ROTR(i64 %0, i32 25)
%6 = xor i64 %4, %5
ret i64 %6
}
int ERR_get_error(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @ERR_get_error() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ stderr;
void err_msg(char *msg) { fprintf(stderr, "%s\n", msg); }


x86 assembly (clang, -O0):
<err_msg>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ebd(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xed0(%rip),%rsi
call   1030 <fprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<err_msg>:
mov    %rdi,%rdx
mov    0x2ec6(%rip),%rax
mov    (%rax),%edi
lea    0xedd(%rip),%rsi
jmp    1030 <fprintf@plt>

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

LLVM IR (-O2):
@stderr = global i32 0
@.str = [4 x i8] c"%s\0A\00"
define void @err_msg(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
int cipher_supported(int keytype) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @cipher_supported(i32 %0) {
ret i32 0
}
int vde_chain_nm10_free(void *mem) {
  (void)mem;
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @vde_chain_nm10_free(i8* nocapture readnone %0) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char const *);
int /*<<< orphan*/ stderr;
void panic(const char *fmt, ...) {
  fprintf(stderr, fmt);
  exit(1);
}


x86 assembly (clang, -O0):
<panic>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ead(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<panic>:
push   %rax
mov    %rdi,%rsi
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
define void @panic(i8* %0, ...) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = load i8*, i8** %2
%5 = call i32 @fprintf(i32 %3, i8* %4)
%6 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
define void @panic(i8* %0, ...) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* %0)
%4 = tail call i32 @exit(i32 1)
unreachable
}
/* Type definitions */
struct HaloMap {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ MapFileToBuffer(char *);
struct HaloMap *ParseHaloMapFromBufferWithPlugins(int /*<<< orphan*/, char *);
struct HaloMap *ParseHaloMapFromFileWithPlugins(char *mapPath,
                                                char *pluginsPath) {
  return ParseHaloMapFromBufferWithPlugins(MapFileToBuffer(mapPath),
                                           pluginsPath);
}


x86 assembly (clang, -O0):
<ParseHaloMapFromFileWithPlugins>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <MapFileToBuffer@plt>
mov    %eax,%edi
mov    -0x10(%rbp),%rsi
call   1030 <ParseHaloMapFromBufferWithPlugins@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ParseHaloMapFromFileWithPlugins>:
push   %rbx
mov    %rsi,%rbx
call   1040 <MapFileToBuffer@plt>
mov    %eax,%edi
mov    %rbx,%rsi
pop    %rbx
jmp    1030 <ParseHaloMapFromBufferWithPlugins@plt>

LLVM IR (-O0):
%struct.HaloMap = type { i32 }
define %struct.HaloMap* @ParseHaloMapFromFileWithPlugins(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %3
%6 = call i32 @MapFileToBuffer(i8* %5)
%7 = load i8*, i8** %4
%8 = call %struct.HaloMap* @ParseHaloMapFromBufferWithPlugins(i32 %6, i8* %7)
ret %struct.HaloMap* %8
}

LLVM IR (-O2):
%struct.HaloMap = type { i32 }
define %struct.HaloMap* @ParseHaloMapFromFileWithPlugins(i8* %0, i8* %1) {
%3 = tail call i32 @MapFileToBuffer(i8* %0)
%4 = tail call %struct.HaloMap* @ParseHaloMapFromBufferWithPlugins(i32 %3, i8* %1)
ret %struct.HaloMap* %4
}
void g_list_push_allocator() {}


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

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

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

LLVM IR (-O2):
define void @g_list_push_allocator() {
ret void
}
/* Variables and functions */
int COLOR_PAIR(short);
scalar_t__ has_colors();
int _color_pair(short color) {
  if (has_colors())
    return COLOR_PAIR(color);
  return -1;
}


x86 assembly (clang, -O0):
<_color_pair>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %di,%ax
mov    %ax,-0x6(%rbp)
mov    $0x0,%al
call   1030 <has_colors@plt>
cmp    $0x0,%rax
je     1151 <_color_pair+0x31>
movswl -0x6(%rbp),%edi
call   1040 <COLOR_PAIR@plt>
mov    %eax,-0x4(%rbp)
jmp    1158 <_color_pair+0x38>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_color_pair>:
push   %rbx
mov    %edi,%ebx
xor    %eax,%eax
call   1030 <has_colors@plt>
test   %rax,%rax
je     1138 <_color_pair+0x18>
movswl %bx,%edi
pop    %rbx
jmp    1040 <COLOR_PAIR@plt>
mov    $0xffffffff,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @_color_pair(i16 signext %0) {
%2 = alloca i32
%3 = alloca i16
store i16 %0, i16* %3
%4 = call i64 (...) @has_colors()
%5 = icmp ne i64 %4, 0
br i1 %5, label %6, label %9
6: ; preds = %1
%7 = load i16, i16* %3
%8 = call i32 @COLOR_PAIR(i16 signext %7)
store i32 %8, i32* %2
br label %10
9: ; preds = %1
store i32 -1, i32* %2
br label %10
10: ; preds = %9, %6
%11 = load i32, i32* %2
ret i32 %11
}

LLVM IR (-O2):
define i32 @_color_pair(i16 signext %0) {
%2 = tail call i64 (...) @has_colors()
%3 = icmp eq i64 %2, 0
br i1 %3, label %6, label %4
4: ; preds = %1
%5 = tail call i32 @COLOR_PAIR(i16 signext %0)
br label %6
6: ; preds = %1, %4
%7 = phi i32 [ %5, %4 ], [ -1, %1 ]
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ signalFaultInterrupt();
void UsageFaultISR() {
  signalFaultInterrupt();
  while (true) {
  }
}


x86 assembly (clang, -O0):
<UsageFaultISR>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <signalFaultInterrupt@plt>
jmp    111b <UsageFaultISR+0xb>

x86 assembly (clang, -O2):
<UsageFaultISR>:
push   %rax
xor    %eax,%eax
call   1030 <signalFaultInterrupt@plt>
nopl   0x0(%rax,%rax,1)
jmp    1120 <UsageFaultISR+0x10>

LLVM IR (-O0):
define void @UsageFaultISR() {
%1 = call i32 (...) @signalFaultInterrupt()
br label %2
2: ; preds = %0, %2
br label %2
}

LLVM IR (-O2):
define void @UsageFaultISR() {
%1 = tail call i32 (...) @signalFaultInterrupt()
br label %2
2: ; preds = %0, %2
br label %2
}
/* Variables and functions */
int /*<<< orphan*/ handle_42(int /*<<< orphan*/);
int gen_42() { handle_42(0); }


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

x86 assembly (clang, -O2):
<gen_42>:
xor    %edi,%edi
jmp    1030 <handle_42@plt>

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

LLVM IR (-O2):
define i32 @gen_42() {
%1 = tail call i32 @handle_42(i32 0)
ret i32 undef
}
/* Type definitions */
typedef scalar_t__ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ clear_timer4();
scalar_t__ get_timer4();
void delay_no_block(uint32_t us) {
  clear_timer4();
  uint32_t tim = get_timer4();
  while (tim < us) {
    tim = get_timer4();
  }
}


x86 assembly (clang, -O0):
<delay_no_block>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x0,%al
call   1040 <clear_timer4@plt>
mov    $0x0,%al
call   1030 <get_timer4@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
cmp    -0x8(%rbp),%rax
jge    115c <delay_no_block+0x3c>
mov    $0x0,%al
call   1030 <get_timer4@plt>
mov    %rax,-0x10(%rbp)
jmp    113e <delay_no_block+0x1e>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<delay_no_block>:
push   %rbx
mov    %rdi,%rbx
xor    %eax,%eax
call   1040 <clear_timer4@plt>
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1030 <get_timer4@plt>
cmp    %rbx,%rax
jl     1130 <delay_no_block+0x10>
pop    %rbx
ret

LLVM IR (-O0):
define void @delay_no_block(i64 %0) {
%2 = alloca i64
%3 = alloca i64
store i64 %0, i64* %2
%4 = call i32 (...) @clear_timer4()
%5 = call i64 (...) @get_timer4()
store i64 %5, i64* %3
br label %6
6: ; preds = %10, %1
%7 = load i64, i64* %3
%8 = load i64, i64* %2
%9 = icmp slt i64 %7, %8
br i1 %9, label %10, label %12
10: ; preds = %6
%11 = call i64 (...) @get_timer4()
store i64 %11, i64* %3
br label %6
12: ; preds = %6
ret void
}

LLVM IR (-O2):
define void @delay_no_block(i64 %0) {
%2 = tail call i32 (...) @clear_timer4()
%3 = tail call i64 (...) @get_timer4()
%4 = icmp slt i64 %3, %0
br i1 %4, label %5, label %8
5: ; preds = %1, %5
%6 = tail call i64 (...) @get_timer4()
%7 = icmp slt i64 %6, %0
br i1 %7, label %5, label %8
8: ; preds = %5, %1
ret void
}
int exec_pin_sense(struct xhda_codec *codec, struct xhda_node *node,
                   unsigned int cmd) {
  return 0;
}


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

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

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

LLVM IR (-O2):
%struct.xhda_codec = type opaque
%struct.xhda_node = type opaque
define i32 @exec_pin_sense(%struct.xhda_codec* nocapture readnone %0, %struct.xhda_node* nocapture readnone %1, i32 %2) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
int main() {
  printf("Adam\n");
  printf("Adam");
  printf("\n%i\n", (3 * 2));
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xedd(%rip),%rbx
mov    %rbx,%rdi
call   1030 <puts@plt>
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xebf(%rip),%rdi
mov    $0x6,%esi
xor    %eax,%eax
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
@.str.2 = [5 x i8] c"\0A%i\0A\00"
@str = [5 x i8] c"Adam\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @str, i64 0, i64 0))
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i32 6)
ret i32 0
}
void __attribute__((weak)) serial_close(unsigned long com_port) {}


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

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

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

LLVM IR (-O2):
define weak void @serial_close(i64 %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *, char *);
int /*<<< orphan*/ perror(char *);
int /*<<< orphan*/ stderr;
void ext_fail(char *type, char *name) {
  fprintf(stderr, "Fehler bei %sdatei '%s': ", type, name);
  perror("");
  exit(1);
}


x86 assembly (clang, -O0):
<ext_fail>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2e99(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
mov    -0x10(%rbp),%rcx
lea    0xea8(%rip),%rsi
call   1030 <fprintf@plt>
lea    0xeb5(%rip),%rdi
call   1040 <perror@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

x86 assembly (clang, -O2):
<ext_fail>:
push   %rax
mov    %rsi,%rcx
mov    %rdi,%rdx
mov    0x2ea2(%rip),%rax
mov    (%rax),%edi
lea    0xeb9(%rip),%rsi
call   1030 <fprintf@plt>
lea    0xec6(%rip),%rdi
call   1040 <perror@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [26 x i8] c"Fehler bei %sdatei '%s': \00"
@.str.1 = [1 x i8] zeroinitializer
define void @ext_fail(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i32, i32* @stderr
%6 = load i8*, i8** %3
%7 = load i8*, i8** %4
%8 = call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0), i8* %6, i8* %7)
%9 = call i32 @perror(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0))
%10 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [26 x i8] c"Fehler bei %sdatei '%s': \00"
@.str.1 = [1 x i8] zeroinitializer
define void @ext_fail(i8* %0, i8* %1) {
%3 = load i32, i32* @stderr
%4 = tail call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0), i8* %0, i8* %1)
%5 = tail call i32 @perror(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0))
%6 = tail call i32 @exit(i32 1)
unreachable
}
/* Type definitions */
struct sockaddr_in {
  int dummy;
};
struct sockaddr {
  int dummy;
};
typedef int /*<<< orphan*/ caddr;

/* Variables and functions */
int accept(int, struct sockaddr *, int *);
int net_accept(int sock) {
  struct sockaddr_in caddr;
  int size = sizeof(caddr);
  return accept(sock, ((struct sockaddr *)&caddr), &size);
}


x86 assembly (clang, -O0):
<net_accept>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movl   $0x4,-0xc(%rbp)
mov    -0x4(%rbp),%edi
lea    -0x8(%rbp),%rsi
lea    -0xc(%rbp),%rdx
call   1030 <accept@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<net_accept>:
sub    $0x18,%rsp
movl   $0x4,0xc(%rsp)
lea    0x10(%rsp),%rsi
lea    0xc(%rsp),%rdx
call   1030 <accept@plt>
add    $0x18,%rsp
ret

LLVM IR (-O0):
%struct.sockaddr_in = type { i32 }
%struct.sockaddr = type { i32 }
define i32 @net_accept(i32 %0) {
%2 = alloca i32
%3 = alloca %struct.sockaddr_in
%4 = alloca i32
store i32 %0, i32* %2
store i32 4, i32* %4
%5 = load i32, i32* %2
%6 = bitcast %struct.sockaddr_in* %3 to %struct.sockaddr*
%7 = call i32 @accept(i32 %5, %struct.sockaddr* %6, i32* %4)
ret i32 %7
}

LLVM IR (-O2):
%struct.sockaddr_in = type { i32 }
%struct.sockaddr = type { i32 }
define i32 @net_accept(i32 %0) {
%2 = alloca %struct.sockaddr_in
%3 = alloca i32
%4 = bitcast %struct.sockaddr_in* %2 to i8*
%5 = bitcast i32* %3 to i8*
store i32 4, i32* %3
%6 = bitcast %struct.sockaddr_in* %2 to %struct.sockaddr*
%7 = call i32 @accept(i32 %0, %struct.sockaddr* %6, i32* %3)
ret i32 %7
}
unsigned arch_get_counter_mask(void) {
  unsigned v;
  asm("cpuid" : "=a"(v) : "0"(0xa) : "ebx", "ecx", "edx");
  return ((1U << ((v >> 8) & 0xff)) - 1);
}


x86 assembly (clang, -O0):
<arch_get_counter_mask>:
push   %rbp
mov    %rsp,%rbp
push   %rbx
mov    $0xa,%eax
cpuid
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%ecx
shr    $0x8,%ecx
and    $0xff,%ecx
mov    $0x1,%eax
shl    %cl,%eax
sub    $0x1,%eax
pop    %rbx
pop    %rbp
ret

x86 assembly (clang, -O2):
<arch_get_counter_mask>:
push   %rbx
mov    $0xa,%eax
cpuid
shr    $0x8,%eax
mov    $0xffffffff,%edx
mov    %eax,%ecx
shl    %cl,%edx
not    %edx
mov    %edx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @arch_get_counter_mask() {
%1 = alloca i32
%2 = call i32 asm "cpuid", "={ax},0,~{ebx},~{ecx},~{edx},~{dirflag},~{fpsr},~{flags}"(i32 10)
store i32 %2, i32* %1
%3 = load i32, i32* %1
%4 = lshr i32 %3, 8
%5 = and i32 %4, 255
%6 = shl i32 1, %5
%7 = sub i32 %6, 1
ret i32 %7
}

LLVM IR (-O2):
define i32 @arch_get_counter_mask() {
%1 = tail call i32 asm "cpuid", "={ax},0,~{ebx},~{ecx},~{edx},~{dirflag},~{fpsr},~{flags}"(i32 10)
%2 = lshr i32 %1, 8
%3 = and i32 %2, 255
%4 = shl nsw i32 -1, %3
%5 = xor i32 %4, -1
ret i32 %5
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
int /*<<< orphan*/ ASSERT(int);
void USBDMAChannelIntEnable(uint32_t ui32Base, uint32_t ui32Channel) {
  ASSERT(ui32Base == 0x40050000);
  ASSERT(ui32Channel < 8);
  (*((volatile uint32_t *)(ui32Base + 0x00000204 + (0x10 * ui32Channel)))) |=
      0x00000008;
}


x86 assembly (clang, -O0):
<USBDMAChannelIntEnable>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
cmpl   $0x40050000,-0x4(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <ASSERT@plt>
cmpl   $0x8,-0x8(%rbp)
setl   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <ASSERT@plt>
mov    -0x4(%rbp),%eax
add    $0x204,%eax
mov    -0x8(%rbp),%ecx
shl    $0x4,%ecx
add    %ecx,%eax
cltq
mov    (%rax),%ecx
or     $0x8,%ecx
mov    %ecx,(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<USBDMAChannelIntEnable>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
xor    %edi,%edi
cmp    $0x40050000,%ebp
sete   %dil
call   1030 <ASSERT@plt>
xor    %edi,%edi
cmp    $0x8,%ebx
setl   %dil
call   1030 <ASSERT@plt>
movslq %ebp,%rax
movslq %ebx,%rcx
shl    $0x4,%rcx
orl    $0x8,0x204(%rax,%rcx,1)
08
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define void @USBDMAChannelIntEnable(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = icmp eq i32 %5, 1074069504
%7 = zext i1 %6 to i32
%8 = call i32 @ASSERT(i32 %7)
%9 = load i32, i32* %4
%10 = icmp slt i32 %9, 8
%11 = zext i1 %10 to i32
%12 = call i32 @ASSERT(i32 %11)
%13 = load i32, i32* %3
%14 = add nsw i32 %13, 516
%15 = load i32, i32* %4
%16 = mul nsw i32 16, %15
%17 = add nsw i32 %14, %16
%18 = sext i32 %17 to i64
%19 = inttoptr i64 %18 to i32*
%20 = load volatile i32, i32* %19
%21 = or i32 %20, 8
store volatile i32 %21, i32* %19
ret void
}

LLVM IR (-O2):
define void @USBDMAChannelIntEnable(i32 %0, i32 %1) {
%3 = icmp eq i32 %0, 1074069504
%4 = zext i1 %3 to i32
%5 = tail call i32 @ASSERT(i32 %4)
%6 = icmp slt i32 %1, 8
%7 = zext i1 %6 to i32
%8 = tail call i32 @ASSERT(i32 %7)
%9 = add nsw i32 %0, 516
%10 = shl nsw i32 %1, 4
%11 = add nsw i32 %9, %10
%12 = sext i32 %11 to i64
%13 = inttoptr i64 %12 to i32*
%14 = load volatile i32, i32* %13
%15 = or i32 %14, 8
store volatile i32 %15, i32* %13
ret void
}
int test_imm_7Fuint16_reg(unsigned short val) {
  return ((val) & (0x7F << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_7Fuint16_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
movzwl -0x2(%rbp),%edx
and    $0x7f,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_7Fuint16_reg>:
test   $0x7f,%dil
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_7Fuint16_reg(i16 zeroext %0) {
%2 = and i16 %0, 127
%3 = icmp eq i16 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
void f(x) int x;
{ asm(""); }


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

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

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

LLVM IR (-O2):
define void @f(i32 %0) {
tail call void asm sideeffect "", "~{dirflag},~{fpsr},~{flags}"()
ret void
}
/* Type definitions */
struct hash_table {
  int dummy;
};
struct dict {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ hash_table_put(struct hash_table *, int /*<<< orphan*/,
                                  void *);
int /*<<< orphan*/ strdup(char const *);
void dict_put(struct dict *pt, const char *key, void *value) {
  hash_table_put((struct hash_table *)pt, strdup(key), value);
}


x86 assembly (clang, -O0):
<dict_put>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <strdup@plt>
mov    -0x20(%rbp),%rdi
mov    %eax,%esi
mov    -0x18(%rbp),%rdx
call   1030 <hash_table_put@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dict_put>:
push   %r14
push   %rbx
push   %rax
mov    %rdx,%r14
mov    %rdi,%rbx
mov    %rsi,%rdi
call   1040 <strdup@plt>
mov    %rbx,%rdi
mov    %eax,%esi
mov    %r14,%rdx
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <hash_table_put@plt>

LLVM IR (-O0):
%struct.dict = type { i32 }
%struct.hash_table = type { i32 }
define void @dict_put(%struct.dict* %0, i8* %1, i8* %2) {
%4 = alloca %struct.dict*
%5 = alloca i8*
%6 = alloca i8*
store %struct.dict* %0, %struct.dict** %4
store i8* %1, i8** %5
store i8* %2, i8** %6
%7 = load %struct.dict*, %struct.dict** %4
%8 = bitcast %struct.dict* %7 to %struct.hash_table*
%9 = load i8*, i8** %5
%10 = call i32 @strdup(i8* %9)
%11 = load i8*, i8** %6
%12 = call i32 @hash_table_put(%struct.hash_table* %8, i32 %10, i8* %11)
ret void
}

LLVM IR (-O2):
%struct.dict = type { i32 }
%struct.hash_table = type { i32 }
define void @dict_put(%struct.dict* %0, i8* %1, i8* %2) {
%4 = bitcast %struct.dict* %0 to %struct.hash_table*
%5 = tail call i32 @strdup(i8* %1)
%6 = tail call i32 @hash_table_put(%struct.hash_table* %4, i32 %5, i8* %2)
ret void
}
int fun591() { return 591; }


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

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

LLVM IR (-O0):
define i32 @fun591() {
ret i32 591
}

LLVM IR (-O2):
define i32 @fun591() {
ret i32 591
}