xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ check_dir_auto_make(char const *);
void check_env() {
  const char *dirs[3] = {"./world", "./plugins", "./players"};
  for (int i = 0; i < 3; ++i) {
    check_dir_auto_make(dirs[i]);
  }
}


x86 assembly (clang, -O0):
<check_env>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    0x2ce1(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0x2cde(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    0x2cdb(%rip),%rax
mov    %rax,-0x10(%rbp)
movl   $0x0,-0x24(%rbp)
cmpl   $0x3,-0x24(%rbp)
jge    1166 <check_env+0x56>
movslq -0x24(%rbp),%rax
mov    -0x20(%rbp,%rax,8),%rdi
call   1030 <check_dir_auto_make@plt>
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    1140 <check_env+0x30>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<check_env>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <check_dir_auto_make@plt>
lea    0xee4(%rip),%rdi
call   1030 <check_dir_auto_make@plt>
lea    0xee2(%rip),%rdi
pop    %rax
jmp    1030 <check_dir_auto_make@plt>

LLVM IR (-O0):
@.str = [8 x i8] c"./world\00"
@.str.1 = [10 x i8] c"./plugins\00"
@.str.2 = [10 x i8] c"./players\00"
@__const.check_env.dirs = [3 x i8*] [i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i32 0, i32 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i32 0, i32 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i32 0, i32 0)]
define void @check_env() {
%1 = alloca [3 x i8*]
%2 = alloca i32
%3 = bitcast [3 x i8*]* %1 to i8*
store i32 0, i32* %2
br label %4
4: ; preds = %13, %0
%5 = load i32, i32* %2
%6 = icmp slt i32 %5, 3
br i1 %6, label %7, label %16
7: ; preds = %4
%8 = load i32, i32* %2
%9 = sext i32 %8 to i64
%10 = getelementptr inbounds [3 x i8*], [3 x i8*]* %1, i64 0, i64 %9
%11 = load i8*, i8** %10
%12 = call i32 @check_dir_auto_make(i8* %11)
br label %13
13: ; preds = %7
%14 = load i32, i32* %2
%15 = add nsw i32 %14, 1
store i32 %15, i32* %2
br label %4
16: ; preds = %4
ret void
}

LLVM IR (-O2):
@.str = [8 x i8] c"./world\00"
@.str.1 = [10 x i8] c"./plugins\00"
@.str.2 = [10 x i8] c"./players\00"
define void @check_env() {
%1 = tail call i32 @check_dir_auto_make(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @check_dir_auto_make(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0))
%3 = tail call i32 @check_dir_auto_make(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0))
ret void
}
double deg(double n) { return n * 3.14159265358979323846 / 180.0; }


x86 assembly (clang, -O0):
<deg>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  0xef7(%rip),%xmm0
mulsd  -0x8(%rbp),%xmm0
movsd  0xee2(%rip),%xmm1
divsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<deg>:
mulsd  0xef8(%rip),%xmm0
divsd  0xef8(%rip),%xmm0
ret

LLVM IR (-O0):
define double @deg(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fmul double %3, 0x400921FB54442D18
%5 = fdiv double %4, 1.800000e+02
ret double %5
}

LLVM IR (-O2):
define double @deg(double %0) {
%2 = fmul double %0, 0x400921FB54442D18
%3 = fdiv double %2, 1.800000e+02
ret double %3
}
/* Variables and functions */
int strcmp(char *, char *);
int strcoll(char *s1, char *s2) { return strcmp(s1, s2); }


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

x86 assembly (clang, -O2):
<strcoll>:
jmp    1030 <strcmp@plt>

LLVM IR (-O0):
define i32 @strcoll(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 = call i32 @strcmp(i8* %5, i8* %6)
ret i32 %7
}

LLVM IR (-O2):
define i32 @strcoll(i8* nocapture %0, i8* nocapture %1) {
%3 = tail call i32 @strcmp(i8* dereferenceable(1) %0, i8* dereferenceable(1) %1)
ret i32 %3
}
/* Type definitions */
struct timex32 {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ CLOCK_REALTIME;
int __clock_adjtime32(int /*<<< orphan*/, struct timex32 *);
int __adjtimex_time32(struct timex32 *tx32) {
  return __clock_adjtime32(CLOCK_REALTIME, tx32);
}


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

x86 assembly (clang, -O2):
<__adjtimex_time32>:
mov    %rdi,%rsi
mov    0x2ec6(%rip),%rax
mov    (%rax),%edi
jmp    1030 <__clock_adjtime32@plt>

LLVM IR (-O0):
%struct.timex32 = type { i32 }
@CLOCK_REALTIME = global i32 0
define i32 @__adjtimex_time32(%struct.timex32* %0) {
%2 = alloca %struct.timex32*
store %struct.timex32* %0, %struct.timex32** %2
%3 = load i32, i32* @CLOCK_REALTIME
%4 = load %struct.timex32*, %struct.timex32** %2
%5 = call i32 @__clock_adjtime32(i32 %3, %struct.timex32* %4)
ret i32 %5
}

LLVM IR (-O2):
%struct.timex32 = type { i32 }
@CLOCK_REALTIME = global i32 0
define i32 @__adjtimex_time32(%struct.timex32* %0) {
%2 = load i32, i32* @CLOCK_REALTIME
%3 = tail call i32 @__clock_adjtime32(i32 %2, %struct.timex32* %0)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ scanf(char *, int *);
int main(void) {
  int x;
  scanf("%d", &x);
  printf("%d\n", x * x * x);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
mov    -0x8(%rbp),%esi
imul   -0x8(%rbp),%esi
imul   -0x8(%rbp),%esi
lea    0xeb2(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

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


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

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

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

LLVM IR (-O2):
define void @ieee80211_proc_deinit() {
ret void
}
void foo528() {}


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

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

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

LLVM IR (-O2):
define void @foo528() {
ret void
}
const char *__malidrv_build_info(void) {
  return "malidrv:  CONFIG=ux500 USING_OS_MEMORY=1 API_VERSION=9 REPO_URL= "
         "REVISION= CHANGED_REVISION= CHANGE_DATE= BUILD_DATE=sob, 6 kwi 2013, "
         "00:48:05 CEST BUILD=DEBUG CPU=ux500 USING_UMP=1 USING_HWMEM=1 "
         "USING_PMM=1 USING_MALI200=0 USING_MALI400=3 USING_MALI400_L2_CACHE=1 "
         "USING_GP2=0 KDIR= MALI_PLATFORM_FILE=platform/ux500/mali_platform.c "
         "OS_MEMORY_KERNEL_BUFFER_SIZE_IN_MB=6 USING_PROFILING=1 "
         "USING_INTERNAL_PROFILING=0 USING_GPU_UTILIZATION=1 "
         "USING_MALI_RUN_TIME_PM=1";
}


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

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

LLVM IR (-O0):
@.str = [464 x i8] c"malidrv: CONFIG=ux500 USING_OS_MEMORY=1 API_VERSION=9 REPO_URL= REVISION= CHANGED_REVISION= CHANGE_DATE= BUILD_DATE=sob, 6 kwi 2013, 00:48:05 CEST BUILD=DEBUG CPU=ux500 USING_UMP=1 USING_HWMEM=1 USING_PMM=1 USING_MALI200=0 USING_MALI400=3 USING_MALI400_L2_CACHE=1 USING_GP2=0 KDIR= MALI_PLATFORM_FILE=platform/ux500/mali_platform.c OS_MEMORY_KERNEL_BUFFER_SIZE_IN_MB=6 USING_PROFILING=1 USING_INTERNAL_PROFILING=0 USING_GPU_UTILIZATION=1 USING_MALI_RUN_TIME_PM=1\00"
define i8* @__malidrv_build_info() {
ret i8* getelementptr inbounds ([464 x i8], [464 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [464 x i8] c"malidrv: CONFIG=ux500 USING_OS_MEMORY=1 API_VERSION=9 REPO_URL= REVISION= CHANGED_REVISION= CHANGE_DATE= BUILD_DATE=sob, 6 kwi 2013, 00:48:05 CEST BUILD=DEBUG CPU=ux500 USING_UMP=1 USING_HWMEM=1 USING_PMM=1 USING_MALI200=0 USING_MALI400=3 USING_MALI400_L2_CACHE=1 USING_GP2=0 KDIR= MALI_PLATFORM_FILE=platform/ux500/mali_platform.c OS_MEMORY_KERNEL_BUFFER_SIZE_IN_MB=6 USING_PROFILING=1 USING_INTERNAL_PROFILING=0 USING_GPU_UTILIZATION=1 USING_MALI_RUN_TIME_PM=1\00"
define i8* @__malidrv_build_info() {
ret i8* getelementptr inbounds ([464 x i8], [464 x i8]* @.str, i64 0, i64 0)
}
int fun452() { return 452; }


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

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

LLVM IR (-O0):
define i32 @fun452() {
ret i32 452
}

LLVM IR (-O2):
define i32 @fun452() {
ret i32 452
}
/* Variables and functions */
int /*<<< orphan*/ puts(char const *);
void CK_Cross_puts(const char *str) { puts(str); }


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

x86 assembly (clang, -O2):
<CK_Cross_puts>:
jmp    1030 <puts@plt>

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

LLVM IR (-O2):
define void @CK_Cross_puts(i8* nocapture %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int avx() {
  printf("AVX is not supported.");
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [22 x i8] c"AVX is not supported.\00"
define i32 @avx() {
%1 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [22 x i8] c"AVX is not supported.\00"
define i32 @avx() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
long FATORACAO(long);
long atol(char *);
int /*<<< orphan*/ printf(char *, long, ...);
int main() {
  long int n;
  long int MAIOR_DIVISOR;
  char Sensor[] = "1620694973";
  n = atol(Sensor);
  printf("Problema sensor: %ld\n", n);
  MAIOR_DIVISOR = FATORACAO(n);
  printf("Maior divisor de %ld: %ld\n", n, MAIOR_DIVISOR);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
mov    0xeba(%rip),%rax
mov    %rax,-0x23(%rbp)
mov    0xeb7(%rip),%ax
mov    %ax,-0x1b(%rbp)
mov    0xeaf(%rip),%al
mov    %al,-0x19(%rbp)
lea    -0x23(%rbp),%rdi
call   1050 <atol@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rsi
lea    0xe95(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x10(%rbp),%rdi
call   1030 <FATORACAO@plt>
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
lea    0xe88(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
mov    $0x6099d7bd,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0x6099d7bd,%edi
call   1030 <FATORACAO@plt>
lea    0xed1(%rip),%rdi
mov    $0x6099d7bd,%esi
mov    %rax,%rdx
xor    %eax,%eax
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@__const.main.Sensor = [11 x i8] c"1620694973\00"
@.str = [22 x i8] c"Problema sensor: %ld\0A\00"
@.str.1 = [27 x i8] c"Maior divisor de %ld: %ld\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i64
%3 = alloca i64
%4 = alloca [11 x i8]
store i32 0, i32* %1
%5 = bitcast [11 x i8]* %4 to i8*
%6 = getelementptr inbounds [11 x i8], [11 x i8]* %4, i64 0, i64 0
%7 = call i64 @atol(i8* %6)
store i64 %7, i64* %2
%8 = load i64, i64* %2
%9 = call i32 (i8*, i64, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i64 %8)
%10 = load i64, i64* %2
%11 = call i64 @FATORACAO(i64 %10)
store i64 %11, i64* %3
%12 = load i64, i64* %2
%13 = load i64, i64* %3
%14 = call i32 (i8*, i64, ...) @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0), i64 %12, i64 %13)
ret i32 0
}

LLVM IR (-O2):
@.str = [22 x i8] c"Problema sensor: %ld\0A\00"
@.str.1 = [27 x i8] c"Maior divisor de %ld: %ld\0A\00"
define i32 @main() {
%1 = tail call i32 (i8*, i64, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i64 1620694973)
%2 = tail call i64 @FATORACAO(i64 1620694973)
%3 = tail call i32 (i8*, i64, ...) @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0), i64 1620694973, i64 %2)
ret i32 0
}
unsigned long ReadLong(unsigned char *ptr) {
  return ((unsigned long)ptr[1]) << 24 | ((unsigned long)ptr[0]) << 16 |
         ((unsigned long)ptr[3]) << 8 | ((unsigned long)ptr[2]);
}


x86 assembly (clang, -O0):
<ReadLong>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movzbl 0x1(%rax),%eax
shl    $0x18,%rax
mov    -0x8(%rbp),%rcx
movzbl (%rcx),%ecx
shl    $0x10,%rcx
or     %rcx,%rax
mov    -0x8(%rbp),%rcx
movzbl 0x3(%rcx),%ecx
shl    $0x8,%rcx
or     %rcx,%rax
mov    -0x8(%rbp),%rcx
movzbl 0x2(%rcx),%ecx
or     %rcx,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ReadLong>:
movzbl 0x1(%rdi),%eax
shl    $0x18,%rax
movzbl (%rdi),%ecx
shl    $0x10,%rcx
or     %rax,%rcx
movzbl 0x3(%rdi),%edx
shl    $0x8,%rdx
or     %rcx,%rdx
movzbl 0x2(%rdi),%eax
or     %rdx,%rax
ret

LLVM IR (-O0):
define i64 @ReadLong(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = getelementptr inbounds i8, i8* %3, i64 1
%5 = load i8, i8* %4
%6 = zext i8 %5 to i64
%7 = shl i64 %6, 24
%8 = load i8*, i8** %2
%9 = getelementptr inbounds i8, i8* %8, i64 0
%10 = load i8, i8* %9
%11 = zext i8 %10 to i64
%12 = shl i64 %11, 16
%13 = or i64 %7, %12
%14 = load i8*, i8** %2
%15 = getelementptr inbounds i8, i8* %14, i64 3
%16 = load i8, i8* %15
%17 = zext i8 %16 to i64
%18 = shl i64 %17, 8
%19 = or i64 %13, %18
%20 = load i8*, i8** %2
%21 = getelementptr inbounds i8, i8* %20, i64 2
%22 = load i8, i8* %21
%23 = zext i8 %22 to i64
%24 = or i64 %19, %23
ret i64 %24
}

LLVM IR (-O2):
define i64 @ReadLong(i8* nocapture %0) {
%2 = getelementptr inbounds i8, i8* %0, i64 1
%3 = load i8, i8* %2
%4 = zext i8 %3 to i64
%5 = shl nuw nsw i64 %4, 24
%6 = load i8, i8* %0
%7 = zext i8 %6 to i64
%8 = shl nuw nsw i64 %7, 16
%9 = or i64 %8, %5
%10 = getelementptr inbounds i8, i8* %0, i64 3
%11 = load i8, i8* %10
%12 = zext i8 %11 to i64
%13 = shl nuw nsw i64 %12, 8
%14 = or i64 %9, %13
%15 = getelementptr inbounds i8, i8* %0, i64 2
%16 = load i8, i8* %15
%17 = zext i8 %16 to i64
%18 = or i64 %14, %17
ret i64 %18
}
/* Variables and functions */
int /*<<< orphan*/ configuration_get_rotor_yaesu_g2800dxc_interpolation_table();
int interpolate_2d(int /*<<< orphan*/, double);
int read_adc(int);
int yaesu_g2800dxc_get_position() {
  int adc_value = read_adc((5));
  double sensor_voltage = adc_value * (1 / 4096 * 1800 * 3.6);
  return interpolate_2d(
      configuration_get_rotor_yaesu_g2800dxc_interpolation_table(),
      sensor_voltage);
}


x86 assembly (clang, -O0):
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x5,%edi
call   1030 <read_adc@plt>
mov    %eax,-0x4(%rbp)
cvtsi2sdl -0x4(%rbp),%xmm0
xorps  %xmm1,%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x10(%rbp)
mov    $0x0,%al
call   1050 <configuration_get_rotor_yaesu_g2800dxc_interpolation_table@plt>
mov    %eax,%edi
movsd  -0x10(%rbp),%xmm0
call   1040 <interpolate_2d@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
push   %rax
mov    $0x5,%edi
call   1030 <read_adc@plt>
cvtsi2sd %eax,%xmm0
xorpd  %xmm1,%xmm1
mulsd  %xmm0,%xmm1
movsd  %xmm1,(%rsp)
xor    %eax,%eax
call   1050 <configuration_get_rotor_yaesu_g2800dxc_interpolation_table@plt>
mov    %eax,%edi
movsd  (%rsp),%xmm0
pop    %rax
jmp    1040 <interpolate_2d@plt>

LLVM IR (-O0):
define i32 @yaesu_g2800dxc_get_position() {
%1 = alloca i32
%2 = alloca double
%3 = call i32 @read_adc(i32 5)
store i32 %3, i32* %1
%4 = load i32, i32* %1
%5 = sitofp i32 %4 to double
%6 = fmul double %5, 0.000000e+00
store double %6, double* %2
%7 = call i32 (...) @configuration_get_rotor_yaesu_g2800dxc_interpolation_table()
%8 = load double, double* %2
%9 = call i32 @interpolate_2d(i32 %7, double %8)
ret i32 %9
}

LLVM IR (-O2):
define i32 @yaesu_g2800dxc_get_position() {
%1 = tail call i32 @read_adc(i32 5)
%2 = sitofp i32 %1 to double
%3 = fmul double %2, 0.000000e+00
%4 = tail call i32 (...) @configuration_get_rotor_yaesu_g2800dxc_interpolation_table()
%5 = tail call i32 @interpolate_2d(i32 %4, double %3)
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fflush(int /*<<< orphan*/);
int /*<<< orphan*/ perror(char const *);
int /*<<< orphan*/ stdout;
void error(const char *msg) {
  perror(msg);
  fflush(stdout);
  exit(1);
}


x86 assembly (clang, -O0):
<error>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <perror@plt>
mov    0x2e94(%rip),%rax
mov    (%rax),%edi
call   1030 <fflush@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

x86 assembly (clang, -O2):
<error>:
push   %rax
call   1040 <perror@plt>
mov    0x2ea3(%rip),%rax
mov    (%rax),%edi
call   1030 <fflush@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@stdout = global i32 0
define void @error(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @perror(i8* %3)
%5 = load i32, i32* @stdout
%6 = call i32 @fflush(i32 %5)
%7 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stdout = global i32 0
define void @error(i8* nocapture %0) {
%2 = tail call i32 @perror(i8* %0)
%3 = load i32, i32* @stdout
%4 = tail call i32 @fflush(i32 %3)
%5 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
void free(void *);
void crush_free(void *ptr, void *user_data) {
  (void)user_data;
  return free(ptr);
}


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

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

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

LLVM IR (-O2):
define void @crush_free(i8* nocapture %0, i8* nocapture readnone %1) {
tail call void @free(i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ assert(void **);
int /*<<< orphan*/ obj_free(void *);
void db_free_obj(void *key, void **value) {
  assert(key);
  assert(value);
  obj_free(*value);
}


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

x86 assembly (clang, -O2):
<db_free_obj>:
push   %rbx
mov    %rsi,%rbx
call   1040 <assert@plt>
mov    %rbx,%rdi
call   1040 <assert@plt>
mov    (%rbx),%rdi
pop    %rbx
jmp    1030 <obj_free@plt>

LLVM IR (-O0):
define void @db_free_obj(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 = bitcast i8* %5 to i8**
%7 = call i32 @assert(i8** %6)
%8 = load i8**, i8*** %4
%9 = call i32 @assert(i8** %8)
%10 = load i8**, i8*** %4
%11 = load i8*, i8** %10
%12 = call i32 @obj_free(i8* %11)
ret void
}

LLVM IR (-O2):
define void @db_free_obj(i8* %0, i8** %1) {
%3 = bitcast i8* %0 to i8**
%4 = tail call i32 @assert(i8** %3)
%5 = tail call i32 @assert(i8** %1)
%6 = load i8*, i8** %1
%7 = tail call i32 @obj_free(i8* %6)
ret void
}
/* Variables and functions */
double sin(int);
double sinefunc(double x, int term, int ioff) { return sin((ioff + term) * x); }


x86 assembly (clang, -O0):
<sinefunc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
mov    %edi,-0xc(%rbp)
mov    %esi,-0x10(%rbp)
mov    -0x10(%rbp),%eax
add    -0xc(%rbp),%eax
cvtsi2sd %eax,%xmm0
mulsd  -0x8(%rbp),%xmm0
cvttsd2si %xmm0,%edi
call   1030 <sin@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sinefunc>:
add    %esi,%edi
cvtsi2sd %edi,%xmm1
mulsd  %xmm0,%xmm1
cvttsd2si %xmm1,%edi
jmp    1030 <sin@plt>

LLVM IR (-O0):
define double @sinefunc(double %0, i32 %1, i32 %2) {
%4 = alloca double
%5 = alloca i32
%6 = alloca i32
store double %0, double* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load i32, i32* %6
%8 = load i32, i32* %5
%9 = add nsw i32 %7, %8
%10 = sitofp i32 %9 to double
%11 = load double, double* %4
%12 = fmul double %10, %11
%13 = fptosi double %12 to i32
%14 = call double @sin(i32 %13)
ret double %14
}

LLVM IR (-O2):
define double @sinefunc(double %0, i32 %1, i32 %2) {
%4 = add nsw i32 %2, %1
%5 = sitofp i32 %4 to double
%6 = fmul double %5, %0
%7 = fptosi double %6 to i32
%8 = tail call double @sin(i32 %7)
ret double %8
}
/* Type definitions */
struct trace_seq {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ scsi_trace_parse_cdb(struct trace_seq *, unsigned char *,
                                        unsigned long long);
unsigned long long process_scsi_trace_parse_cdb(struct trace_seq *s,
                                                unsigned long long *args) {
  scsi_trace_parse_cdb(s, (unsigned char *)(unsigned long)args[1], args[2]);
  return 0;
}


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

x86 assembly (clang, -O2):
<process_scsi_trace_parse_cdb>:
push   %rax
mov    0x8(%rsi),%rax
mov    0x10(%rsi),%rdx
mov    %rax,%rsi
call   1030 <scsi_trace_parse_cdb@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.trace_seq = type { i32 }
define i64 @process_scsi_trace_parse_cdb(%struct.trace_seq* %0, i64* %1) {
%3 = alloca %struct.trace_seq*
%4 = alloca i64*
store %struct.trace_seq* %0, %struct.trace_seq** %3
store i64* %1, i64** %4
%5 = load %struct.trace_seq*, %struct.trace_seq** %3
%6 = load i64*, i64** %4
%7 = getelementptr inbounds i64, i64* %6, i64 1
%8 = load i64, i64* %7
%9 = inttoptr i64 %8 to i8*
%10 = load i64*, i64** %4
%11 = getelementptr inbounds i64, i64* %10, i64 2
%12 = load i64, i64* %11
%13 = call i32 @scsi_trace_parse_cdb(%struct.trace_seq* %5, i8* %9, i64 %12)
ret i64 0
}

LLVM IR (-O2):
%struct.trace_seq = type { i32 }
define i64 @process_scsi_trace_parse_cdb(%struct.trace_seq* %0, i64* nocapture %1) {
%3 = getelementptr inbounds i64, i64* %1, i64 1
%4 = load i64, i64* %3
%5 = inttoptr i64 %4 to i8*
%6 = getelementptr inbounds i64, i64* %1, i64 2
%7 = load i64, i64* %6
%8 = tail call i32 @scsi_trace_parse_cdb(%struct.trace_seq* %0, i8* %5, i64 %7)
ret i64 0
}
/* Type definitions */
typedef scalar_t__ uint8_t;

/* Variables and functions */
int rand();
int /*<<< orphan*/ srand(int /*<<< orphan*/);
int /*<<< orphan*/ time(int /*<<< orphan*/ *);
void fill_random_buffer(uint8_t *buf, int len) {
  int i;
  srand(time(NULL));
  for (i = 0; i < len; i++)
    buf[i] = (uint8_t)(rand() & 0xFF);
}


x86 assembly (clang, -O0):
<fill_random_buffer>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
xor    %eax,%eax
mov    %eax,%edi
call   1040 <time@plt>
mov    %eax,%edi
call   1030 <srand@plt>
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    118b <fill_random_buffer+0x5b>
mov    $0x0,%al
call   1050 <rand@plt>
and    $0xff,%eax
movslq %eax,%rdx
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    %rdx,(%rax,%rcx,8)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1156 <fill_random_buffer+0x26>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fill_random_buffer>:
push   %rbp
push   %r14
push   %rbx
mov    %esi,%ebp
mov    %rdi,%r14
xor    %edi,%edi
call   1040 <time@plt>
mov    %eax,%edi
call   1030 <srand@plt>
test   %ebp,%ebp
jle    1167 <fill_random_buffer+0x37>
mov    %ebp,%ebp
xor    %ebx,%ebx
nop
xor    %eax,%eax
call   1050 <rand@plt>
movzbl %al,%eax
mov    %rax,(%r14,%rbx,8)
add    $0x1,%rbx
cmp    %rbx,%rbp
jne    1150 <fill_random_buffer+0x20>
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
define void @fill_random_buffer(i64* %0, i32 %1) {
%3 = alloca i64*
%4 = alloca i32
%5 = alloca i32
store i64* %0, i64** %3
store i32 %1, i32* %4
%6 = call i32 @time(i32* null)
%7 = call i32 @srand(i32 %6)
store i32 0, i32* %5
br label %8
8: ; preds = %20, %2
%9 = load i32, i32* %5
%10 = load i32, i32* %4
%11 = icmp slt i32 %9, %10
br i1 %11, label %12, label %23
12: ; preds = %8
%13 = call i32 (...) @rand()
%14 = and i32 %13, 255
%15 = sext i32 %14 to i64
%16 = load i64*, i64** %3
%17 = load i32, i32* %5
%18 = sext i32 %17 to i64
%19 = getelementptr inbounds i64, i64* %16, i64 %18
store i64 %15, i64* %19
br label %20
20: ; preds = %12
%21 = load i32, i32* %5
%22 = add nsw i32 %21, 1
store i32 %22, i32* %5
br label %8
23: ; preds = %8
ret void
}

LLVM IR (-O2):
define void @fill_random_buffer(i64* nocapture writeonly %0, i32 %1) {
%3 = tail call i32 @time(i32* null)
%4 = tail call i32 @srand(i32 %3)
%5 = icmp sgt i32 %1, 0
br i1 %5, label %6, label %16
6: ; preds = %2
%7 = zext i32 %1 to i64
br label %8
8: ; preds = %6, %8
%9 = phi i64 [ 0, %6 ], [ %14, %8 ]
%10 = tail call i32 (...) @rand()
%11 = and i32 %10, 255
%12 = zext i32 %11 to i64
%13 = getelementptr inbounds i64, i64* %0, i64 %9
store i64 %12, i64* %13
%14 = add nuw nsw i64 %9, 1
%15 = icmp eq i64 %14, %7
br i1 %15, label %16, label %8
16: ; preds = %8, %2
ret void
}
void format_pinpoint_message(msg, arg) char msg[], arg[];
{
  char errmsg[2048];
  (void)sprintf(errmsg, msg, arg);
  pinpoint_message(errmsg);
}


x86 assembly (clang, -O0):
<format_pinpoint_message>:
push   %rbp
mov    %rsp,%rbp
sub    $0x810,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    -0x810(%rbp),%rdi
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
mov    $0x0,%al
call   1040 <sprintf@plt>
lea    -0x810(%rbp),%rdi
mov    $0x0,%al
call   1030 <pinpoint_message@plt>
add    $0x810,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<format_pinpoint_message>:
push   %rbx
sub    $0x800,%rsp
mov    %rsi,%rdx
mov    %rdi,%rsi
mov    %rsp,%rbx
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <sprintf@plt>
mov    %rbx,%rdi
xor    %eax,%eax
call   1030 <pinpoint_message@plt>
add    $0x800,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define void @format_pinpoint_message(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca [2048 x i8]
store i8* %0, i8** %3
store i8* %1, i8** %4
%6 = getelementptr inbounds [2048 x i8], [2048 x i8]* %5, i64 0, i64 0
%7 = load i8*, i8** %3
%8 = load i8*, i8** %4
%9 = call i32 (i8*, i8*, ...) @sprintf(i8* %6, i8* %7, i8* %8)
%10 = getelementptr inbounds [2048 x i8], [2048 x i8]* %5, i64 0, i64 0
%11 = call i32 (i8*, ...) bitcast (i32 (...)* @pinpoint_message to i32 (i8*, ...)*)(i8* %10)
ret void
}

LLVM IR (-O2):
define void @format_pinpoint_message(i8* nocapture %0, i8* %1) {
%3 = alloca [2048 x i8]
%4 = getelementptr inbounds [2048 x i8], [2048 x i8]* %3, i64 0, i64 0
%5 = call i32 (i8*, i8*, ...) @sprintf(i8* %4, i8* dereferenceable(1) %0, i8* %1)
%6 = call i32 (i8*, ...) bitcast (i32 (...)* @pinpoint_message to i32 (i8*, ...)*)(i8* %4)
ret void
}
/* Type definitions */
struct libkeccak_hmac_state {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ free(struct libkeccak_hmac_state *);
int /*<<< orphan*/ libkeccak_hmac_fast_destroy(struct libkeccak_hmac_state *);
void libkeccak_hmac_fast_free(struct libkeccak_hmac_state *restrict state) {
  libkeccak_hmac_fast_destroy(state);
  free(state);
}


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

x86 assembly (clang, -O2):
<libkeccak_hmac_fast_free>:
push   %rbx
mov    %rdi,%rbx
call   1040 <libkeccak_hmac_fast_destroy@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <free@plt>

LLVM IR (-O0):
%struct.libkeccak_hmac_state = type { i32 }
define void @libkeccak_hmac_fast_free(%struct.libkeccak_hmac_state* noalias %0) {
%2 = alloca %struct.libkeccak_hmac_state*
store %struct.libkeccak_hmac_state* %0, %struct.libkeccak_hmac_state** %2
%3 = load %struct.libkeccak_hmac_state*, %struct.libkeccak_hmac_state** %2
%4 = call i32 @libkeccak_hmac_fast_destroy(%struct.libkeccak_hmac_state* %3)
%5 = load %struct.libkeccak_hmac_state*, %struct.libkeccak_hmac_state** %2
%6 = call i32 @free(%struct.libkeccak_hmac_state* %5)
ret void
}

LLVM IR (-O2):
%struct.libkeccak_hmac_state = type { i32 }
define void @libkeccak_hmac_fast_free(%struct.libkeccak_hmac_state* noalias %0) {
%2 = tail call i32 @libkeccak_hmac_fast_destroy(%struct.libkeccak_hmac_state* %0)
%3 = tail call i32 @free(%struct.libkeccak_hmac_state* %0)
ret void
}
/* Type definitions */
typedef scalar_t__ uint16_t;
typedef int /*<<< orphan*/ tmp;

/* Variables and functions */
int /*<<< orphan*/ FifoProtocol_memcpy(scalar_t__ *, void const *, int);
void inv_fifo_protocol_helper_decode_heart_rate_data(const void *in,
                                                     uint16_t len, float *bpm) {
  uint16_t tmp;
  FifoProtocol_memcpy((&tmp), (in), (sizeof(tmp)));
  tmp = tmp;
  *bpm = ((float)(uint16_t)(tmp) / (float)(1ULL << (7)));
  (void)len;
}


x86 assembly (clang, -O0):
<inv_fifo_protocol_helper_decode_heart_rate_data>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rsi
lea    -0x20(%rbp),%rdi
mov    $0x8,%edx
call   1030 <FifoProtocol_memcpy@plt>
mov    -0x20(%rbp),%rax
mov    %rax,-0x20(%rbp)
cvtsi2ssq -0x20(%rbp),%xmm0
movss  0xeb4(%rip),%xmm1
divss  %xmm1,%xmm0
mov    -0x18(%rbp),%rax
movss  %xmm0,(%rax)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<inv_fifo_protocol_helper_decode_heart_rate_data>:
push   %rbx
sub    $0x10,%rsp
mov    %rdx,%rbx
mov    %rdi,%rsi
lea    0x8(%rsp),%rdi
mov    $0x8,%edx
call   1030 <FifoProtocol_memcpy@plt>
cvtsi2ssq 0x8(%rsp),%xmm0
mulss  0xec7(%rip),%xmm0
movss  %xmm0,(%rbx)
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define void @inv_fifo_protocol_helper_decode_heart_rate_data(i8* %0, i64 %1, float* %2) {
%4 = alloca i8*
%5 = alloca i64
%6 = alloca float*
%7 = alloca i64
store i8* %0, i8** %4
store i64 %1, i64* %5
store float* %2, float** %6
%8 = load i8*, i8** %4
%9 = call i32 @FifoProtocol_memcpy(i64* %7, i8* %8, i32 8)
%10 = load i64, i64* %7
store i64 %10, i64* %7
%11 = load i64, i64* %7
%12 = sitofp i64 %11 to float
%13 = fdiv float %12, 1.280000e+02
%14 = load float*, float** %6
store float %13, float* %14
%15 = load i64, i64* %5
ret void
}

LLVM IR (-O2):
define void @inv_fifo_protocol_helper_decode_heart_rate_data(i8* %0, i64 %1, float* nocapture writeonly %2) {
%4 = alloca i64
%5 = bitcast i64* %4 to i8*
%6 = call i32 @FifoProtocol_memcpy(i64* %4, i8* %0, i32 8)
%7 = load i64, i64* %4
%8 = sitofp i64 %7 to float
%9 = fmul float %8, 7.812500e-03
store float %9, float* %2
ret void
}
int print_null(const char *s, ...) {}


x86 assembly (clang, -O0):
<print_null>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @print_null(i8* nocapture readnone %0, ...) {
ret i32 undef
}
unsigned int tune6(unsigned int t) {
  return (((int)(t / 1e7 * t * t + t) % 127) | (t >> 4) | (t >> 5) |
          (t % 127)) +
         ((t >> 16) | t);
}


x86 assembly (clang, -O0):
<tune6>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
cvtsi2sd %rax,%xmm2
movsd  0xee9(%rip),%xmm1
movaps %xmm2,%xmm0
divsd  %xmm1,%xmm0
mulsd  %xmm2,%xmm0
movaps %xmm2,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
cvttsd2si %xmm0,%eax
mov    $0x7f,%ecx
cltd
idiv   %ecx
mov    %edx,%eax
mov    -0x4(%rbp),%ecx
shr    $0x4,%ecx
or     %ecx,%eax
mov    -0x4(%rbp),%ecx
shr    $0x5,%ecx
or     %ecx,%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    $0x7f,%ecx
xor    %edx,%edx
div    %ecx
mov    -0x8(%rbp),%eax
or     %edx,%eax
mov    -0x4(%rbp),%ecx
shr    $0x10,%ecx
or     -0x4(%rbp),%ecx
add    %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<tune6>:
mov    %edi,%eax
cvtsi2sd %rax,%xmm0
movapd %xmm0,%xmm1
divsd  0xeed(%rip),%xmm1
mulsd  %xmm0,%xmm1
mulsd  %xmm0,%xmm1
addsd  %xmm0,%xmm1
cvttsd2si %xmm1,%ecx
movslq %ecx,%rdx
imul   $0xffffffff81020409,%rdx,%rcx
shr    $0x20,%rcx
add    %edx,%ecx
mov    %ecx,%esi
shr    $0x1f,%esi
sar    $0x6,%ecx
add    %esi,%ecx
mov    %ecx,%esi
shl    $0x7,%esi
sub    %esi,%ecx
add    %edx,%ecx
mov    %edi,%edx
imul   $0x2040811,%rax,%rax
shr    $0x20,%rax
mov    %edi,%esi
sub    %eax,%esi
shr    %esi
add    %eax,%esi
shr    $0x6,%esi
mov    %esi,%eax
shl    $0x7,%eax
sub    %eax,%esi
add    %edi,%esi
mov    %edi,%eax
shr    $0x10,%eax
or     %edi,%eax
shr    $0x4,%edi
shr    $0x5,%edx
or     %edi,%edx
or     %edx,%esi
or     %ecx,%esi
add    %esi,%eax
ret

LLVM IR (-O0):
define i32 @tune6(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = uitofp i32 %3 to double
%5 = fdiv double %4, 1.000000e+07
%6 = load i32, i32* %2
%7 = uitofp i32 %6 to double
%8 = fmul double %5, %7
%9 = load i32, i32* %2
%10 = uitofp i32 %9 to double
%11 = load i32, i32* %2
%12 = uitofp i32 %11 to double
%13 = call double @llvm.fmuladd.f64(double %8, double %10, double %12)
%14 = fptosi double %13 to i32
%15 = srem i32 %14, 127
%16 = load i32, i32* %2
%17 = lshr i32 %16, 4
%18 = or i32 %15, %17
%19 = load i32, i32* %2
%20 = lshr i32 %19, 5
%21 = or i32 %18, %20
%22 = load i32, i32* %2
%23 = urem i32 %22, 127
%24 = or i32 %21, %23
%25 = load i32, i32* %2
%26 = lshr i32 %25, 16
%27 = load i32, i32* %2
%28 = or i32 %26, %27
%29 = add i32 %24, %28
ret i32 %29
}

LLVM IR (-O2):
define i32 @tune6(i32 %0) {
%2 = uitofp i32 %0 to double
%3 = fdiv double %2, 1.000000e+07
%4 = fmul double %3, %2
%5 = tail call double @llvm.fmuladd.f64(double %4, double %2, double %2)
%6 = fptosi double %5 to i32
%7 = srem i32 %6, 127
%8 = lshr i32 %0, 4
%9 = lshr i32 %0, 5
%10 = urem i32 %0, 127
%11 = or i32 %9, %8
%12 = or i32 %11, %10
%13 = or i32 %12, %7
%14 = lshr i32 %0, 16
%15 = or i32 %14, %0
%16 = add i32 %13, %15
ret i32 %16
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int uint16_t;

/* Variables and functions */
int Get_RGB_LED_Max_Value();
uint8_t asRGBComponent(uint16_t ccr) {
  return (uint8_t)((ccr << 8) / Get_RGB_LED_Max_Value());
}


x86 assembly (clang, -O0):
<asRGBComponent>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
shl    $0x8,%eax
mov    %eax,-0x8(%rbp)
mov    $0x0,%al
call   1030 <Get_RGB_LED_Max_Value@plt>
mov    %eax,%ecx
mov    -0x8(%rbp),%eax
cltd
idiv   %ecx
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<asRGBComponent>:
push   %rbx
mov    %edi,%ebx
shl    $0x8,%ebx
xor    %eax,%eax
call   1030 <Get_RGB_LED_Max_Value@plt>
mov    %eax,%ecx
mov    %ebx,%eax
cltd
idiv   %ecx
pop    %rbx
ret

LLVM IR (-O0):
define i32 @asRGBComponent(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = shl i32 %3, 8
%5 = call i32 (...) @Get_RGB_LED_Max_Value()
%6 = sdiv i32 %4, %5
ret i32 %6
}

LLVM IR (-O2):
define i32 @asRGBComponent(i32 %0) {
%2 = shl i32 %0, 8
%3 = tail call i32 (...) @Get_RGB_LED_Max_Value()
%4 = sdiv i32 %2, %3
ret i32 %4
}
void rt_application_init() {}


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

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

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

LLVM IR (-O2):
define void @rt_application_init() {
ret void
}
/* Type definitions */
typedef int uint8_t;
typedef int uint16_t;

/* Variables and functions */
int /*<<< orphan*/ get_byte();
uint16_t parse_four_digits(void) {
  uint16_t value = 0;
  uint8_t n;
  for (n = 0; n < 4; n++) {
    get_byte();
    value *= 10;
    value += ((get_byte()) - '0');
  }
  return value;
}


x86 assembly (clang, -O0):
<parse_four_digits>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x4,-0x8(%rbp)
jge    115c <parse_four_digits+0x4c>
mov    $0x0,%al
call   1030 <get_byte@plt>
imul   $0xa,-0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    $0x0,%al
call   1030 <get_byte@plt>
sub    $0x30,%eax
add    -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1126 <parse_four_digits+0x16>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<parse_four_digits>:
push   %rbx
xor    %eax,%eax
call   1030 <get_byte@plt>
xor    %eax,%eax
call   1030 <get_byte@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   1030 <get_byte@plt>
lea    (%rbx,%rbx,4),%ebx
xor    %eax,%eax
call   1030 <get_byte@plt>
lea    (%rax,%rbx,2),%eax
lea    (%rax,%rax,4),%ebx
xor    %eax,%eax
call   1030 <get_byte@plt>
xor    %eax,%eax
call   1030 <get_byte@plt>
lea    (%rax,%rbx,2),%eax
lea    (%rax,%rax,4),%ebx
xor    %eax,%eax
call   1030 <get_byte@plt>
xor    %eax,%eax
call   1030 <get_byte@plt>
lea    (%rax,%rbx,2),%eax
add    $0xffff2fb0,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @parse_four_digits() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %2
br label %3
3: ; preds = %14, %0
%4 = load i32, i32* %2
%5 = icmp slt i32 %4, 4
br i1 %5, label %6, label %17
6: ; preds = %3
%7 = call i32 (...) @get_byte()
%8 = load i32, i32* %1
%9 = mul nsw i32 %8, 10
store i32 %9, i32* %1
%10 = call i32 (...) @get_byte()
%11 = sub nsw i32 %10, 48
%12 = load i32, i32* %1
%13 = add nsw i32 %12, %11
store i32 %13, i32* %1
br label %14
14: ; preds = %6
%15 = load i32, i32* %2
%16 = add nsw i32 %15, 1
store i32 %16, i32* %2
br label %3
17: ; preds = %3
%18 = load i32, i32* %1
ret i32 %18
}

LLVM IR (-O2):
define i32 @parse_four_digits() {
%1 = tail call i32 (...) @get_byte()
%2 = tail call i32 (...) @get_byte()
%3 = tail call i32 (...) @get_byte()
%4 = mul i32 %2, 10
%5 = tail call i32 (...) @get_byte()
%6 = add i32 %4, -528
%7 = add i32 %6, %5
%8 = tail call i32 (...) @get_byte()
%9 = mul nsw i32 %7, 10
%10 = tail call i32 (...) @get_byte()
%11 = add i32 %9, -48
%12 = add i32 %11, %10
%13 = tail call i32 (...) @get_byte()
%14 = mul nsw i32 %12, 10
%15 = tail call i32 (...) @get_byte()
%16 = add i32 %14, -48
%17 = add i32 %16, %15
ret i32 %17
}
/* Type definitions */
struct timespec {
  long const tv_sec;
};

/* Variables and functions */
int /*<<< orphan*/ CLOCK_MONOTONIC;
int /*<<< orphan*/ clock_gettime(int /*<<< orphan*/, struct timespec *);
const long get_sys_uptime() {
  struct timespec sp;
  (void)clock_gettime(CLOCK_MONOTONIC, &sp);
  return (sp.tv_sec);
}


x86 assembly (clang, -O0):
<get_sys_uptime>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    0x2ec9(%rip),%rax
mov    (%rax),%edi
lea    -0x8(%rbp),%rsi
call   1030 <clock_gettime@plt>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_sys_uptime>:
push   %rax
mov    0x2ed0(%rip),%rax
mov    (%rax),%edi
mov    %rsp,%rsi
call   1030 <clock_gettime@plt>
mov    (%rsp),%rax
pop    %rcx
ret

LLVM IR (-O0):
%struct.timespec = type { i64 }
@CLOCK_MONOTONIC = global i32 0
define i64 @get_sys_uptime() {
%1 = alloca %struct.timespec
%2 = load i32, i32* @CLOCK_MONOTONIC
%3 = call i32 @clock_gettime(i32 %2, %struct.timespec* %1)
%4 = getelementptr inbounds %struct.timespec, %struct.timespec* %1, i32 0, i32 0
%5 = load i64, i64* %4
ret i64 %5
}

LLVM IR (-O2):
%struct.timespec = type { i64 }
@CLOCK_MONOTONIC = global i32 0
define i64 @get_sys_uptime() {
%1 = alloca %struct.timespec
%2 = bitcast %struct.timespec* %1 to i8*
%3 = load i32, i32* @CLOCK_MONOTONIC
%4 = call i32 @clock_gettime(i32 %3, %struct.timespec* %1)
%5 = getelementptr inbounds %struct.timespec, %struct.timespec* %1, i64 0, i32 0
%6 = load i64, i64* %5
ret i64 %6
}
int invert(int a) {
  int r = 0;
  while (a != 0) {
    r = r * 10;
    r = r + a % 10;
    a = a / 10;
  }
  return r;
}


x86 assembly (clang, -O0):
<invert>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x0,-0x4(%rbp)
je     114b <invert+0x4b>
imul   $0xa,-0x8(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x4(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    -0xc(%rbp),%eax
add    %edx,%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %eax,-0x4(%rbp)
jmp    110e <invert+0xe>
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<invert>:
xor    %eax,%eax
test   %edi,%edi
je     113f <invert+0x3f>
cs nopw 0x0(%rax,%rax,1)
lea    (%rax,%rax,4),%eax
movslq %edi,%rcx
imul   $0x66666667,%rcx,%rdi
mov    %rdi,%rdx
shr    $0x3f,%rdx
sar    $0x22,%rdi
add    %edx,%edi
lea    (%rdi,%rdi,1),%edx
lea    (%rdx,%rdx,4),%edx
mov    %ecx,%esi
sub    %edx,%esi
lea    (%rsi,%rax,2),%eax
add    $0x9,%ecx
cmp    $0x12,%ecx
ja     1110 <invert+0x10>
ret

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

LLVM IR (-O2):
define i32 @invert(i32 %0) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %12, label %3
3: ; preds = %1, %3
%4 = phi i32 [ %8, %3 ], [ 0, %1 ]
%5 = phi i32 [ %9, %3 ], [ %0, %1 ]
%6 = mul nsw i32 %4, 10
%7 = srem i32 %5, 10
%8 = add nsw i32 %6, %7
%9 = sdiv i32 %5, 10
%10 = add i32 %5, 9
%11 = icmp ult i32 %10, 19
br i1 %11, label %12, label %3
12: ; preds = %3, %1
%13 = phi i32 [ 0, %1 ], [ %8, %3 ]
ret i32 %13
}
long double test_log10l(long double x) { return __builtin_log10l(x); }


x86 assembly (clang, -O0):
<test_log10l>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
fldt   0x10(%rbp)
fstpt  -0x10(%rbp)
fldt   -0x10(%rbp)
mov    %rsp,%rax
fstpt  (%rax)
call   1030 <log10l@plt>
fld    %st(0)
fstp   %st(0)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_log10l>:
jmp    1030 <log10l@plt>

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

LLVM IR (-O2):
define x86_fp80 @test_log10l(x86_fp80 %0) {
%2 = tail call x86_fp80 @log10l(x86_fp80 %0)
ret x86_fp80 %2
}
/* Variables and functions */
int /*<<< orphan*/ synbad();
scalar_t__ word();
void chkword(void) {
  if (word())
    synbad();
}


x86 assembly (clang, -O0):
<chkword>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <word@plt>
cmp    $0x0,%rax
je     113c <chkword+0x1c>
mov    $0x0,%al
call   1030 <synbad@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<chkword>:
push   %rax
xor    %eax,%eax
call   1040 <word@plt>
test   %rax,%rax
je     1135 <chkword+0x15>
xor    %eax,%eax
pop    %rcx
jmp    1030 <synbad@plt>
pop    %rax
ret

LLVM IR (-O0):
define void @chkword() {
%1 = call i64 (...) @word()
%2 = icmp ne i64 %1, 0
br i1 %2, label %3, label %5
3: ; preds = %0
%4 = call i32 (...) @synbad()
br label %5
5: ; preds = %3, %0
ret void
}

LLVM IR (-O2):
define void @chkword() {
%1 = tail call i64 (...) @word()
%2 = icmp eq i64 %1, 0
br i1 %2, label %5, label %3
3: ; preds = %0
%4 = tail call i32 (...) @synbad()
br label %5
5: ; preds = %3, %0
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fdc_write_sector(int, int, char *);
void writeblock_fd(int device, int blockno, char *buffer) {
  fdc_write_sector(device, blockno * 2, buffer);
  fdc_write_sector(device, blockno * 2 + 1, buffer + 512);
}


x86 assembly (clang, -O0):
<writeblock_fd>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
shl    $0x1,%esi
mov    -0x10(%rbp),%rdx
call   1030 <fdc_write_sector@plt>
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
shl    $0x1,%esi
add    $0x1,%esi
mov    -0x10(%rbp),%rdx
add    $0x200,%rdx
call   1030 <fdc_write_sector@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<writeblock_fd>:
push   %rbp
push   %r14
push   %rbx
mov    %rdx,%rbx
mov    %esi,%r14d
mov    %edi,%ebp
lea    (%r14,%r14,1),%esi
call   1030 <fdc_write_sector@plt>
lea    (%r14,%r14,1),%esi
add    $0x1,%esi
add    $0x200,%rbx
mov    %ebp,%edi
mov    %rbx,%rdx
pop    %rbx
pop    %r14
pop    %rbp
jmp    1030 <fdc_write_sector@plt>

LLVM IR (-O0):
define void @writeblock_fd(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 = mul nsw i32 %8, 2
%10 = load i8*, i8** %6
%11 = call i32 @fdc_write_sector(i32 %7, i32 %9, i8* %10)
%12 = load i32, i32* %4
%13 = load i32, i32* %5
%14 = mul nsw i32 %13, 2
%15 = add nsw i32 %14, 1
%16 = load i8*, i8** %6
%17 = getelementptr inbounds i8, i8* %16, i64 512
%18 = call i32 @fdc_write_sector(i32 %12, i32 %15, i8* %17)
ret void
}

LLVM IR (-O2):
define void @writeblock_fd(i32 %0, i32 %1, i8* %2) {
%4 = shl nsw i32 %1, 1
%5 = tail call i32 @fdc_write_sector(i32 %0, i32 %4, i8* %2)
%6 = or i32 %4, 1
%7 = getelementptr inbounds i8, i8* %2, i64 512
%8 = tail call i32 @fdc_write_sector(i32 %0, i32 %6, i8* %7)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exception_handler_uninstall_platform();
void exception_handler_uninstall() { exception_handler_uninstall_platform(); }


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

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

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

LLVM IR (-O2):
define void @exception_handler_uninstall() {
%1 = tail call i32 (...) @exception_handler_uninstall_platform()
ret void
}