xunge/DecIR huggingface dataset:
/* Variables and functions */
int S_IREAD;
int S_IWRITE;
int /*<<< orphan*/ close(int);
int creat(char *, int);
int /*<<< orphan*/ ftruncate(int, int);
int /*<<< orphan*/ truncate(char *, int);
int main() {
  int fd;
  fd = creat("foobar", S_IREAD | S_IWRITE);
  ftruncate(fd, 1024);
  close(fd);
  truncate("foobar", 2048);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    0x2e82(%rip),%rax
mov    (%rax),%esi
mov    0x2e89(%rip),%rax
or     (%rax),%esi
lea    0xe98(%rip),%rdi
call   1060 <creat@plt>
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%edi
mov    $0x400,%esi
call   1030 <ftruncate@plt>
mov    -0x8(%rbp),%edi
call   1040 <close@plt>
lea    0xe74(%rip),%rdi
mov    $0x800,%esi
call   1050 <truncate@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %rbx
push   %rax
mov    0x2e8e(%rip),%rax
mov    0x2e97(%rip),%rcx
mov    (%rcx),%esi
or     (%rax),%esi
lea    0xea4(%rip),%rbx
mov    %rbx,%rdi
call   1060 <creat@plt>
mov    %eax,%ebp
mov    %eax,%edi
mov    $0x400,%esi
call   1030 <ftruncate@plt>
mov    %ebp,%edi
call   1040 <close@plt>
mov    %rbx,%rdi
mov    $0x800,%esi
call   1050 <truncate@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@.str = [7 x i8] c"foobar\00"
@S_IREAD = global i32 0
@S_IWRITE = global i32 0
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
%3 = load i32, i32* @S_IREAD
%4 = load i32, i32* @S_IWRITE
%5 = or i32 %3, %4
%6 = call i32 @creat(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 %5)
store i32 %6, i32* %2
%7 = load i32, i32* %2
%8 = call i32 @ftruncate(i32 %7, i32 1024)
%9 = load i32, i32* %2
%10 = call i32 @close(i32 %9)
%11 = call i32 @truncate(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 2048)
ret i32 0
}

LLVM IR (-O2):
@.str = [7 x i8] c"foobar\00"
@S_IREAD = global i32 0
@S_IWRITE = global i32 0
define i32 @main() {
%1 = load i32, i32* @S_IREAD
%2 = load i32, i32* @S_IWRITE
%3 = or i32 %2, %1
%4 = tail call i32 @creat(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 %3)
%5 = tail call i32 @ftruncate(i32 %4, i32 1024)
%6 = tail call i32 @close(i32 %4)
%7 = tail call i32 @truncate(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 2048)
ret i32 0
}
void outb(unsigned short int port, unsigned char value) {
  __asm__ volatile("outb %1, %0;" : : "Nd"(port), "a"(value));
}


x86 assembly (clang, -O0):
<outb>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %di,%cx
mov    %cx,-0x2(%rbp)
mov    %al,-0x3(%rbp)
mov    -0x2(%rbp),%dx
mov    -0x3(%rbp),%al
out    %al,(%dx)
pop    %rbp
ret

x86 assembly (clang, -O2):
<outb>:
mov    %esi,%eax
mov    %edi,%edx
out    %al,(%dx)
ret

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

LLVM IR (-O2):
define void @outb(i16 zeroext %0, i8 zeroext %1) {
tail call void asm sideeffect "outb $1, $0;", "N{dx},{ax},~{dirflag},~{fpsr},~{flags}"(i16 %0, i8 %1)
ret void
}
int greaterThan(double x, double y) {
  int i;
  if (x > y) {
    i = 1;
  } else {
    i = 0;
  }
  return i;
}


x86 assembly (clang, -O0):
<greaterThan>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
ucomisd -0x10(%rbp),%xmm0
jbe    112a <greaterThan+0x2a>
movl   $0x1,-0x14(%rbp)
jmp    1131 <greaterThan+0x31>
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<greaterThan>:
xor    %eax,%eax
ucomisd %xmm1,%xmm0
seta   %al
ret

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

LLVM IR (-O2):
define i32 @greaterThan(double %0, double %1) {
%3 = fcmp ogt double %0, %1
%4 = zext i1 %3 to i32
ret i32 %4
}
void arch_init_thread(void) {}


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

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

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

LLVM IR (-O2):
define void @arch_init_thread() {
ret void
}
double form_volume(void) { return 1.0; }


x86 assembly (clang, -O0):
<form_volume>:
push   %rbp
mov    %rsp,%rbp
movsd  0xef4(%rip),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<form_volume>:
movsd  0xef8(%rip),%xmm0
ret

LLVM IR (-O0):
define double @form_volume() {
ret double 1.000000e+00
}

LLVM IR (-O2):
define double @form_volume() {
ret double 1.000000e+00
}
/* Variables and functions */
int /*<<< orphan*/ RESET1(int /*<<< orphan*/);
int /*<<< orphan*/ RESET2(int /*<<< orphan*/);
int /*<<< orphan*/ TEST(int);
void CPU_RESET() {
  RESET1(0);
  RESET2(0);
  TEST(1);
  TEST(0);
  TEST(1);
  TEST(0);
  TEST(1);
  TEST(0);
  RESET1(0);
}


x86 assembly (clang, -O0):
<CPU_RESET>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
call   1030 <RESET1@plt>
xor    %edi,%edi
call   1050 <RESET2@plt>
mov    $0x1,%edi
call   1040 <TEST@plt>
xor    %edi,%edi
call   1040 <TEST@plt>
mov    $0x1,%edi
call   1040 <TEST@plt>
xor    %edi,%edi
call   1040 <TEST@plt>
mov    $0x1,%edi
call   1040 <TEST@plt>
xor    %edi,%edi
call   1040 <TEST@plt>
xor    %edi,%edi
call   1030 <RESET1@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<CPU_RESET>:
push   %rax
xor    %edi,%edi
call   1030 <RESET1@plt>
xor    %edi,%edi
call   1050 <RESET2@plt>
mov    $0x1,%edi
call   1040 <TEST@plt>
xor    %edi,%edi
call   1040 <TEST@plt>
mov    $0x1,%edi
call   1040 <TEST@plt>
xor    %edi,%edi
call   1040 <TEST@plt>
mov    $0x1,%edi
call   1040 <TEST@plt>
xor    %edi,%edi
call   1040 <TEST@plt>
xor    %edi,%edi
pop    %rax
jmp    1030 <RESET1@plt>

LLVM IR (-O0):
define void @CPU_RESET() {
%1 = call i32 @RESET1(i32 0)
%2 = call i32 @RESET2(i32 0)
%3 = call i32 @TEST(i32 1)
%4 = call i32 @TEST(i32 0)
%5 = call i32 @TEST(i32 1)
%6 = call i32 @TEST(i32 0)
%7 = call i32 @TEST(i32 1)
%8 = call i32 @TEST(i32 0)
%9 = call i32 @RESET1(i32 0)
ret void
}

LLVM IR (-O2):
define void @CPU_RESET() {
%1 = tail call i32 @RESET1(i32 0)
%2 = tail call i32 @RESET2(i32 0)
%3 = tail call i32 @TEST(i32 1)
%4 = tail call i32 @TEST(i32 0)
%5 = tail call i32 @TEST(i32 1)
%6 = tail call i32 @TEST(i32 0)
%7 = tail call i32 @TEST(i32 1)
%8 = tail call i32 @TEST(i32 0)
%9 = tail call i32 @RESET1(i32 0)
ret void
}
int avl_numcmp(x, y)
char *x, *y;
{ return (int)x - (int)y; }


x86 assembly (clang, -O0):
<avl_numcmp>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%rcx
sub    %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<avl_numcmp>:
mov    %rdi,%rax
sub    %esi,%eax
ret

LLVM IR (-O0):
define i32 @avl_numcmp(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 = ptrtoint i8* %5 to i32
%7 = load i8*, i8** %4
%8 = ptrtoint i8* %7 to i32
%9 = sub nsw i32 %6, %8
ret i32 %9
}

LLVM IR (-O2):
define i32 @avl_numcmp(i8* %0, i8* %1) {
%3 = ptrtoint i8* %0 to i64
%4 = trunc i64 %3 to i32
%5 = ptrtoint i8* %1 to i64
%6 = trunc i64 %5 to i32
%7 = sub nsw i32 %4, %6
ret i32 %7
}
/* Variables and functions */
int log(double);
double ppos(double m, double u) {
  double r = m / u;
  return ((double)(log((double)r) / log((double)2.0)));
}


x86 assembly (clang, -O0):
<ppos>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
divsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
call   1030 <log@plt>
mov    %eax,-0x1c(%rbp)
movsd  0xeba(%rip),%xmm0
call   1030 <log@plt>
mov    %eax,%ecx
mov    -0x1c(%rbp),%eax
cltd
idiv   %ecx
cvtsi2sd %eax,%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ppos>:
push   %rbx
divsd  %xmm1,%xmm0
call   1030 <log@plt>
mov    %eax,%ebx
movsd  0xedc(%rip),%xmm0
call   1030 <log@plt>
mov    %eax,%ecx
mov    %ebx,%eax
cltd
idiv   %ecx
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
pop    %rbx
ret

LLVM IR (-O0):
define double @ppos(double %0, double %1) {
%3 = alloca double
%4 = alloca double
%5 = alloca double
store double %0, double* %3
store double %1, double* %4
%6 = load double, double* %3
%7 = load double, double* %4
%8 = fdiv double %6, %7
store double %8, double* %5
%9 = load double, double* %5
%10 = call i32 @log(double %9)
%11 = call i32 @log(double 2.000000e+00)
%12 = sdiv i32 %10, %11
%13 = sitofp i32 %12 to double
ret double %13
}

LLVM IR (-O2):
define double @ppos(double %0, double %1) {
%3 = fdiv double %0, %1
%4 = tail call i32 @log(double %3)
%5 = tail call i32 @log(double 2.000000e+00)
%6 = sdiv i32 %4, %5
%7 = sitofp i32 %6 to double
ret double %7
}
void RTjpeg_idct_init(void) {}


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

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

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

LLVM IR (-O2):
define void @RTjpeg_idct_init() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
int /*<<< orphan*/ putchar(char);
void print_with_space(char *s, int with_space) {
  if (with_space)
    putchar(' ');
  printf("%s", s);
}


x86 assembly (clang, -O0):
<print_with_space>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
je     1143 <print_with_space+0x23>
mov    $0x20,%edi
call   1030 <putchar@plt>
mov    -0x8(%rbp),%rsi
lea    0xeb2(%rip),%rdi
call   1040 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_with_space>:
push   %rbx
mov    %rdi,%rbx
test   %esi,%esi
je     1132 <print_with_space+0x12>
mov    $0x20,%edi
call   1030 <putchar@plt>
lea    0xec7(%rip),%rdi
mov    %rbx,%rsi
pop    %rbx
jmp    1040 <printf@plt>

LLVM IR (-O0):
@.str = [3 x i8] c"%s\00"
define void @print_with_space(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = icmp ne i32 %5, 0
br i1 %6, label %7, label %9
7: ; preds = %2
%8 = call i32 @putchar(i8 signext 32)
br label %9
9: ; preds = %7, %2
%10 = load i8*, i8** %3
%11 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %10)
ret void
}

LLVM IR (-O2):
@.str = [3 x i8] c"%s\00"
define void @print_with_space(i8* %0, i32 %1) {
%3 = icmp eq i32 %1, 0
br i1 %3, label %6, label %4
4: ; preds = %2
%5 = tail call i32 @putchar(i8 signext 32)
br label %6
6: ; preds = %4, %2
%7 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int sw(int /*<<< orphan*/, int /*<<< orphan*/, int /*<<< orphan*/,
       int /*<<< orphan*/);
int main() {
  int status;
  status = sw(0, 0, 0, 0);
  printf("s=%d\n", status);
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %edi,%edi
xor    %esi,%esi
xor    %edx,%edx
xor    %ecx,%ecx
call   1040 <sw@plt>
lea    0xecb(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [6 x i8] c"s=%d\0A\00"
define i32 @main() {
%1 = tail call i32 @sw(i32 0, i32 0, i32 0, i32 0)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i32 0
}
/* Variables and functions */
double ilogb(double);
int /*<<< orphan*/ isfinite(double);
double logb(double x) {
  if (!isfinite(x))
    return x * x;
  if (x == 0)
    return -1 / (x * x);
  return ilogb(x);
}


x86 assembly (clang, -O0):
<logb>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
call   1040 <isfinite@plt>
cmp    $0x0,%eax
jne    1154 <logb+0x34>
movsd  -0x10(%rbp),%xmm0
mulsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    119b <logb+0x7b>
movsd  -0x10(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    118c <logb+0x6c>
jp     118c <logb+0x6c>
movsd  -0x10(%rbp),%xmm1
mulsd  -0x10(%rbp),%xmm1
movsd  0xe82(%rip),%xmm0
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    119b <logb+0x7b>
movsd  -0x10(%rbp),%xmm0
call   1030 <ilogb@plt>
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<logb>:
push   %rax
movsd  %xmm0,(%rsp)
call   1040 <isfinite@plt>
test   %eax,%eax
je     1156 <logb+0x36>
xorpd  %xmm1,%xmm1
movsd  (%rsp),%xmm0
ucomisd %xmm1,%xmm0
jne    1161 <logb+0x41>
jp     1161 <logb+0x41>
mulsd  %xmm0,%xmm0
movsd  0xeb4(%rip),%xmm1
divsd  %xmm0,%xmm1
movapd %xmm1,%xmm0
pop    %rax
ret
movsd  (%rsp),%xmm0
mulsd  %xmm0,%xmm0
pop    %rax
ret
pop    %rax
jmp    1030 <ilogb@plt>

LLVM IR (-O0):
define double @logb(double %0) {
%2 = alloca double
%3 = alloca double
store double %0, double* %3
%4 = load double, double* %3
%5 = call i32 @isfinite(double %4)
%6 = icmp ne i32 %5, 0
br i1 %6, label %11, label %7
7: ; preds = %1
%8 = load double, double* %3
%9 = load double, double* %3
%10 = fmul double %8, %9
store double %10, double* %2
br label %22
11: ; preds = %1
%12 = load double, double* %3
%13 = fcmp oeq double %12, 0.000000e+00
br i1 %13, label %14, label %19
14: ; preds = %11
%15 = load double, double* %3
%16 = load double, double* %3
%17 = fmul double %15, %16
%18 = fdiv double -1.000000e+00, %17
store double %18, double* %2
br label %22
19: ; preds = %11
%20 = load double, double* %3
%21 = call double @ilogb(double %20)
store double %21, double* %2
br label %22
22: ; preds = %19, %14, %7
%23 = load double, double* %2
ret double %23
}

LLVM IR (-O2):
define double @logb(double %0) {
%2 = tail call i32 @isfinite(double %0)
%3 = icmp eq i32 %2, 0
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = fmul double %0, %0
br label %13
6: ; preds = %1
%7 = fcmp oeq double %0, 0.000000e+00
br i1 %7, label %8, label %11
8: ; preds = %6
%9 = fmul double %0, %0
%10 = fdiv double -1.000000e+00, %9
br label %13
11: ; preds = %6
%12 = tail call double @ilogb(double %0)
br label %13
13: ; preds = %11, %8, %4
%14 = phi double [ %10, %8 ], [ %12, %11 ], [ %5, %4 ]
ret double %14
}
int g$$1(struct _Data$$1 *this$1) { return f$$1(this$1); }


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

x86 assembly (clang, -O2):
<g$$1>:
xor    %eax,%eax
jmp    1030 <f$$1@plt>

LLVM IR (-O0):
%"struct._Data$$1" = type opaque
define i32 @"g$$1"(%"struct._Data$$1"* %0) {
%2 = alloca %"struct._Data$$1"*
store %"struct._Data$$1"* %0, %"struct._Data$$1"** %2
%3 = load %"struct._Data$$1"*, %"struct._Data$$1"** %2
%4 = call i32 (%"struct._Data$$1"*, ...) bitcast (i32 (...)* @"f$$1" to i32 (%"struct._Data$$1"*, ...)*)(%"struct._Data$$1"* %3)
ret i32 %4
}

LLVM IR (-O2):
%"struct._Data$$1" = type opaque
define i32 @"g$$1"(%"struct._Data$$1"* %0) {
%2 = tail call i32 (%"struct._Data$$1"*, ...) bitcast (i32 (...)* @"f$$1" to i32 (%"struct._Data$$1"*, ...)*)(%"struct._Data$$1"* %0)
ret i32 %2
}
char tolowerl(char a) {
  if (a >= 'A' && a <= 'Z') {
    return (a += 'a' - 'A');
  }
  return a;
}


x86 assembly (clang, -O0):
<tolowerl>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x2(%rbp)
movsbl -0x2(%rbp),%eax
cmp    $0x41,%eax
jl     1136 <tolowerl+0x36>
movsbl -0x2(%rbp),%eax
cmp    $0x5a,%eax
jg     1136 <tolowerl+0x36>
movsbl -0x2(%rbp),%eax
add    $0x20,%eax
mov    %al,-0x2(%rbp)
mov    %al,-0x1(%rbp)
jmp    113c <tolowerl+0x3c>
mov    -0x2(%rbp),%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<tolowerl>:
lea    -0x41(%rdi),%eax
lea    0x20(%rdi),%ecx
cmp    $0x1a,%al
movzbl %cl,%eax
cmovae %edi,%eax
ret

LLVM IR (-O0):
define signext i8 @tolowerl(i8 signext %0) {
%2 = alloca i8
%3 = alloca i8
store i8 %0, i8* %3
%4 = load i8, i8* %3
%5 = sext i8 %4 to i32
%6 = icmp sge i32 %5, 65
br i1 %6, label %7, label %16
7: ; preds = %1
%8 = load i8, i8* %3
%9 = sext i8 %8 to i32
%10 = icmp sle i32 %9, 90
br i1 %10, label %11, label %16
11: ; preds = %7
%12 = load i8, i8* %3
%13 = sext i8 %12 to i32
%14 = add nsw i32 %13, 32
%15 = trunc i32 %14 to i8
store i8 %15, i8* %3
store i8 %15, i8* %2
br label %18
16: ; preds = %7, %1
%17 = load i8, i8* %3
store i8 %17, i8* %2
br label %18
18: ; preds = %16, %11
%19 = load i8, i8* %2
ret i8 %19
}

LLVM IR (-O2):
define signext i8 @tolowerl(i8 signext %0) {
%2 = add i8 %0, -65
%3 = icmp ult i8 %2, 26
%4 = add i8 %0, 32
%5 = select i1 %3, i8 %4, i8 %0
ret i8 %5
}
int kiSetBusSpeed(int speed) { return 1; }


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

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

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

LLVM IR (-O2):
define i32 @kiSetBusSpeed(i32 %0) {
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ hash_init();
int /*<<< orphan*/ malloc_struct_code();
int /*<<< orphan*/ program();
int /*<<< orphan*/ sym_table_init();
void compile() {
  hash_init();
  sym_table_init();
  malloc_struct_code();
  program();
}


x86 assembly (clang, -O0):
<compile>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <hash_init@plt>
mov    $0x0,%al
call   1060 <sym_table_init@plt>
mov    $0x0,%al
call   1050 <malloc_struct_code@plt>
mov    $0x0,%al
call   1040 <program@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<compile>:
push   %rax
xor    %eax,%eax
call   1030 <hash_init@plt>
xor    %eax,%eax
call   1060 <sym_table_init@plt>
xor    %eax,%eax
call   1050 <malloc_struct_code@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <program@plt>

LLVM IR (-O0):
define void @compile() {
%1 = call i32 (...) @hash_init()
%2 = call i32 (...) @sym_table_init()
%3 = call i32 (...) @malloc_struct_code()
%4 = call i32 (...) @program()
ret void
}

LLVM IR (-O2):
define void @compile() {
%1 = tail call i32 (...) @hash_init()
%2 = tail call i32 (...) @sym_table_init()
%3 = tail call i32 (...) @malloc_struct_code()
%4 = tail call i32 (...) @program()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, void *, double);
int /*<<< orphan*/ stdout;
void array_element_display(void *x, void *arg) {
  { arg = arg; }
  if (NULL != x)
    fprintf(stdout, "\tdisplay element -> {object=>0x%p,value=>%.3f}\n", x,
            *(double *)x);
}


x86 assembly (clang, -O0):
<array_element_display>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x10(%rbp)
xor    %eax,%eax
cmp    -0x8(%rbp),%rax
je     1155 <array_element_display+0x45>
mov    0x2ea5(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm0
lea    0xeb0(%rip),%rsi
call   1030 <fprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<array_element_display>:
test   %rdi,%rdi
je     1131 <array_element_display+0x21>
mov    %rdi,%rdx
mov    0x2ec1(%rip),%rax
mov    (%rax),%edi
movsd  (%rdx),%xmm0
lea    0xed4(%rip),%rsi
jmp    1030 <fprintf@plt>
ret

LLVM IR (-O0):
@stdout = global i32 0
@.str = [48 x i8] c"\09display element -> {object=>0x%p,value=>%.3f}\0A\00"
define void @array_element_display(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
store i8* %5, i8** %4
%6 = load i8*, i8** %3
%7 = icmp ne i8* null, %6
br i1 %7, label %8, label %15
8: ; preds = %2
%9 = load i32, i32* @stdout
%10 = load i8*, i8** %3
%11 = load i8*, i8** %3
%12 = bitcast i8* %11 to double*
%13 = load double, double* %12
%14 = call i32 @fprintf(i32 %9, i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str, i64 0, i64 0), i8* %10, double %13)
br label %15
15: ; preds = %8, %2
ret void
}

LLVM IR (-O2):
@stdout = global i32 0
@.str = [48 x i8] c"\09display element -> {object=>0x%p,value=>%.3f}\0A\00"
define void @array_element_display(i8* %0, i8* nocapture readnone %1) {
%3 = icmp eq i8* %0, null
br i1 %3, label %9, label %4
4: ; preds = %2
%5 = load i32, i32* @stdout
%6 = bitcast i8* %0 to double*
%7 = load double, double* %6
%8 = tail call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str, i64 0, i64 0), i8* %0, double %7)
br label %9
9: ; preds = %4, %2
ret void
}
void DisplayZJ(void) { ; }


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

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

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

LLVM IR (-O2):
define void @DisplayZJ() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ mprintf(char *);
void term_clear() { mprintf("\033[2J\033[1;1H"); }


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

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

LLVM IR (-O0):
@.str = [11 x i8] c"\1B[2J\1B[1;1H\00"
define void @term_clear() {
%1 = call i32 @mprintf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [11 x i8] c"\1B[2J\1B[1;1H\00"
define void @term_clear() {
%1 = tail call i32 @mprintf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, char *);
void print_usage() {
  char usage[] =
      "Primary inputs:\n"
      "\t-P:\tPassword to hash\n"
      "\t-S:\tSalt to use\n\n"
      "Secondary inputs (optional):\n"
      "\t-k:\tSecret\n"
      "\t-D:\tAdditional data\n"
      "\t-l:\tDigest length\n"
      "\t-n:\tNumber of passes\n"
      "\t-m:\tMemory requested (Kb)\n"
      "\t-p:\tParallelism (number of lanes)\n"
      "\t-a:\tArgon type (0 for Argon2d or 1 for Argon2i)\n"
      "\t-v:\tVerbose (1 enabled by default, 0 to display only the hash)\n";
  printf("%s\n", usage);
  exit(0);
}


x86 assembly (clang, -O0):
<print_usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x150,%rsp
lea    -0x150(%rbp),%rdi
lea    0xeb7(%rip),%rsi
mov    $0x14f,%edx
call   1040 <memcpy@plt>
lea    -0x150(%rbp),%rsi
lea    0xfee(%rip),%rdi
call   1030 <printf@plt>
xor    %edi,%edi
call   1050 <exit@plt>

x86 assembly (clang, -O2):
<print_usage>:
push   %rbx
sub    $0x150,%rsp
lea    0xec1(%rip),%rsi
mov    %rsp,%rbx
mov    $0x14f,%edx
mov    %rbx,%rdi
call   1040 <memcpy@plt>
lea    0xff9(%rip),%rdi
mov    %rbx,%rsi
call   1030 <printf@plt>
xor    %edi,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@__const.print_usage.usage = [335 x i8] c"Primary inputs:\0A\09-P:\09Password to hash\0A\09-S:\09Salt to use\0A\0ASecondary inputs (optional):\0A\09-k:\09Secret\0A\09-D:\09Additional data\0A\09-l:\09Digest length\0A\09-n:\09Number of passes\0A\09-m:\09Memory requested (Kb)\0A\09-p:\09Parallelism (number of lanes)\0A\09-a:\09Argon type (0 for Argon2d or 1 for Argon2i)\0A\09-v:\09Verbose (1 enabled by default, 0 to display only the hash)\0A\00"
@.str = [4 x i8] c"%s\0A\00"
define void @print_usage() {
%1 = alloca [335 x i8]
%2 = bitcast [335 x i8]* %1 to i8*
%3 = getelementptr inbounds [335 x i8], [335 x i8]* %1, i64 0, i64 0
%4 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %3)
%5 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@__const.print_usage.usage = [335 x i8] c"Primary inputs:\0A\09-P:\09Password to hash\0A\09-S:\09Salt to use\0A\0ASecondary inputs (optional):\0A\09-k:\09Secret\0A\09-D:\09Additional data\0A\09-l:\09Digest length\0A\09-n:\09Number of passes\0A\09-m:\09Memory requested (Kb)\0A\09-p:\09Parallelism (number of lanes)\0A\09-a:\09Argon type (0 for Argon2d or 1 for Argon2i)\0A\09-v:\09Verbose (1 enabled by default, 0 to display only the hash)\0A\00"
@.str = [4 x i8] c"%s\0A\00"
define void @print_usage() {
%1 = alloca [335 x i8]
%2 = getelementptr inbounds [335 x i8], [335 x i8]* %1, i64 0, i64 0
%3 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %2)
%4 = call i32 @exit(i32 0)
unreachable
}
int triplet2index(int i1, int i2, int i3, int n_motifs) {
  int index;
  index = (i1 - 1) * n_motifs * n_motifs + (i2 - 1) * n_motifs + i3;
  return index;
}


x86 assembly (clang, -O0):
<triplet2index>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    -0x4(%rbp),%eax
sub    $0x1,%eax
imul   -0x10(%rbp),%eax
imul   -0x10(%rbp),%eax
mov    -0x8(%rbp),%ecx
sub    $0x1,%ecx
imul   -0x10(%rbp),%ecx
add    %ecx,%eax
add    -0xc(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<triplet2index>:
add    $0xffffffff,%edi
imul   %ecx,%edi
lea    (%rsi,%rdi,1),%eax
add    $0xffffffff,%eax
imul   %ecx,%eax
add    %edx,%eax
ret

LLVM IR (-O0):
define i32 @triplet2index(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
store i32 %0, i32* %5
store i32 %1, i32* %6
store i32 %2, i32* %7
store i32 %3, i32* %8
%10 = load i32, i32* %5
%11 = sub nsw i32 %10, 1
%12 = load i32, i32* %8
%13 = mul nsw i32 %11, %12
%14 = load i32, i32* %8
%15 = mul nsw i32 %13, %14
%16 = load i32, i32* %6
%17 = sub nsw i32 %16, 1
%18 = load i32, i32* %8
%19 = mul nsw i32 %17, %18
%20 = add nsw i32 %15, %19
%21 = load i32, i32* %7
%22 = add nsw i32 %20, %21
store i32 %22, i32* %9
%23 = load i32, i32* %9
ret i32 %23
}

LLVM IR (-O2):
define i32 @triplet2index(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = add nsw i32 %0, -1
%6 = mul nsw i32 %5, %3
%7 = add nsw i32 %1, -1
%8 = add i32 %7, %6
%9 = mul i32 %8, %3
%10 = add nsw i32 %9, %2
ret i32 %10
}
double asin(double x) { return __builtin_asin(x); }


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

x86 assembly (clang, -O2):
<asin>:
movsd  0xef8(%rip),%xmm1
ucomisd %xmm0,%xmm1
ja     1120 <asin+0x20>
ucomisd 0xef2(%rip),%xmm0
ja     1120 <asin+0x20>
ret
nopl   0x0(%rax)
jmp    1120 <asin+0x20>

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

LLVM IR (-O2):
define double @asin(double %0) {
%2 = fcmp ogt double %0, 1.000000e+00
%3 = fcmp olt double %0, -1.000000e+00
%4 = or i1 %3, %2
br i1 %4, label %5, label %6
5: ; preds = %1, %5
br label %5
6: ; preds = %1
ret double undef
}
void mdp4_writeback_dma_busy_wait(struct msm_fb_data_type *mfd) {}


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

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

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

LLVM IR (-O2):
%struct.msm_fb_data_type = type opaque
define void @mdp4_writeback_dma_busy_wait(%struct.msm_fb_data_type* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ logErrorMsg(char *);
void bailoutUinputConfig() {
  logErrorMsg("Error while configuring uinput device");
  exit(2);
}


x86 assembly (clang, -O0):
<bailoutUinputConfig>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1030 <logErrorMsg@plt>
mov    $0x2,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<bailoutUinputConfig>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <logErrorMsg@plt>
mov    $0x2,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [38 x i8] c"Error while configuring uinput device\00"
define void @bailoutUinputConfig() {
%1 = call i32 @logErrorMsg(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @exit(i32 2)
unreachable
}

LLVM IR (-O2):
@.str = [38 x i8] c"Error while configuring uinput device\00"
define void @bailoutUinputConfig() {
%1 = tail call i32 @logErrorMsg(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @exit(i32 2)
unreachable
}
/* Variables and functions */
char *mkfn(char const *, char const *, char const *);
extern char *mkdepfn(const char *name, const char *dir, const char *ext) {
  return mkfn(name, dir, ext);
}


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

x86 assembly (clang, -O2):
<mkdepfn>:
jmp    1030 <mkfn@plt>

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

LLVM IR (-O2):
define i8* @mkdepfn(i8* %0, i8* %1, i8* %2) {
%4 = tail call i8* @mkfn(i8* %0, i8* %1, i8* %2)
ret i8* %4
}
void glPointSizePointerOES(void) { return; }


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

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

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

LLVM IR (-O2):
define void @glPointSizePointerOES() {
ret void
}
void pdgstrf_StackFree() {}


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

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

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

LLVM IR (-O2):
define void @pdgstrf_StackFree() {
ret void
}
/* Variables and functions */
scalar_t__ strcmp(char const *, char const *);
int type_equal(const char *p, const char *q) { return strcmp(p, q) == 0; }


x86 assembly (clang, -O0):
<type_equal>:
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>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<type_equal>:
push   %rax
call   1030 <strcmp@plt>
xor    %ecx,%ecx
test   %rax,%rax
sete   %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @type_equal(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 i64 @strcmp(i8* %5, i8* %6)
%8 = icmp eq i64 %7, 0
%9 = zext i1 %8 to i32
ret i32 %9
}

LLVM IR (-O2):
define i32 @type_equal(i8* %0, i8* %1) {
%3 = tail call i64 @strcmp(i8* %0, i8* %1)
%4 = icmp eq i64 %3, 0
%5 = zext i1 %4 to i32
ret i32 %5
}
double ajust_double(val)
double val;
{
  double tmp;
  char buff[20];
  sprintf(buff, "%10.5f", val);
  tmp = atof(buff);
  return tmp;
}


x86 assembly (clang, -O0):
<ajust_double>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movsd  %xmm0,-0x8(%rbp)
lea    -0x30(%rbp),%rdi
movsd  -0x8(%rbp),%xmm0
lea    0xec3(%rip),%rsi
mov    $0x1,%al
call   1040 <sprintf@plt>
lea    -0x30(%rbp),%rdi
mov    $0x0,%al
call   1030 <atof@plt>
cvtsi2sd %eax,%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ajust_double>:
push   %rbx
sub    $0x20,%rsp
lea    0xed4(%rip),%rsi
mov    %rsp,%rbx
mov    %rbx,%rdi
mov    $0x1,%al
call   1040 <sprintf@plt>
mov    %rbx,%rdi
xor    %eax,%eax
call   1030 <atof@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
add    $0x20,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [7 x i8] c"%10.5f\00"
define double @ajust_double(double %0) {
%2 = alloca double
%3 = alloca double
%4 = alloca [20 x i8]
store double %0, double* %2
%5 = getelementptr inbounds [20 x i8], [20 x i8]* %4, i64 0, i64 0
%6 = load double, double* %2
%7 = call i32 (i8*, i8*, ...) @sprintf(i8* %5, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), double %6)
%8 = getelementptr inbounds [20 x i8], [20 x i8]* %4, i64 0, i64 0
%9 = call i32 (i8*, ...) bitcast (i32 (...)* @atof to i32 (i8*, ...)*)(i8* %8)
%10 = sitofp i32 %9 to double
store double %10, double* %3
%11 = load double, double* %3
ret double %11
}

LLVM IR (-O2):
@.str = [7 x i8] c"%10.5f\00"
define double @ajust_double(double %0) {
%2 = alloca [20 x i8]
%3 = getelementptr inbounds [20 x i8], [20 x i8]* %2, i64 0, i64 0
%4 = call i32 (i8*, i8*, ...) @sprintf(i8* %3, i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), double %0)
%5 = call i32 (i8*, ...) bitcast (i32 (...)* @atof to i32 (i8*, ...)*)(i8* %3)
%6 = sitofp i32 %5 to double
ret double %6
}
reg0indreg1(r0, r1, x0, x1, p0, p1) int r0, r1;
int *p0, *p1;
{
  if (r0 <= (*p1))
    return 1;
  else
    return 0;
}


x86 assembly (clang, -O0):
<reg0indreg1>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
mov    %r8,-0x20(%rbp)
mov    %r9,-0x28(%rbp)
mov    -0x8(%rbp),%eax
mov    -0x28(%rbp),%rcx
cmp    (%rcx),%eax
jg     1133 <reg0indreg1+0x33>
movl   $0x1,-0x4(%rbp)
jmp    113a <reg0indreg1+0x3a>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<reg0indreg1>:
xor    %eax,%eax
cmp    %edi,(%r9)
setge  %al
ret

LLVM IR (-O0):
define i32 @reg0indreg1(i32 %0, i32 %1, i32 %2, i32 %3, i32* %4, i32* %5) {
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32*
%13 = alloca i32*
store i32 %0, i32* %8
store i32 %1, i32* %9
store i32 %2, i32* %10
store i32 %3, i32* %11
store i32* %4, i32** %12
store i32* %5, i32** %13
%14 = load i32, i32* %8
%15 = load i32*, i32** %13
%16 = load i32, i32* %15
%17 = icmp sle i32 %14, %16
br i1 %17, label %18, label %19
18: ; preds = %6
store i32 1, i32* %7
br label %20
19: ; preds = %6
store i32 0, i32* %7
br label %20
20: ; preds = %19, %18
%21 = load i32, i32* %7
ret i32 %21
}

LLVM IR (-O2):
define i32 @reg0indreg1(i32 %0, i32 %1, i32 %2, i32 %3, i32* nocapture readnone %4, i32* nocapture %5) {
%7 = load i32, i32* %5
%8 = icmp sge i32 %7, %0
%9 = zext i1 %8 to i32
ret i32 %9
}
/* Variables and functions */
double get_speedmeter_value();
int /*<<< orphan*/ init_speedmeter(int /*<<< orphan*/, int);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ usleep(int);
int main() {
  printf("INITIALIZING SPEEDMETER LIBRARY!\n");
  init_speedmeter(0, 1);
  printf("TESTING ...\n");
  while (1) {
    printf("SPEED = %f\n", get_speedmeter_value());
    usleep(500000);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeaa(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %edi,%edi
mov    $0x1,%esi
call   1050 <init_speedmeter@plt>
lea    0xeb2(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    $0x0,%al
call   1040 <get_speedmeter_value@plt>
lea    0xeaa(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
mov    $0x7a120,%edi
call   1060 <usleep@plt>
jmp    1177 <main+0x37>

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xeb4(%rip),%rdi
call   1030 <puts@plt>
xor    %edi,%edi
mov    $0x1,%esi
call   1060 <init_speedmeter@plt>
lea    0xebd(%rip),%rdi
call   1030 <puts@plt>
lea    0xe84(%rip),%rbx
nopl   0x0(%rax)
xor    %eax,%eax
call   1050 <get_speedmeter_value@plt>
mov    %rbx,%rdi
mov    $0x1,%al
call   1040 <printf@plt>
mov    $0x7a120,%edi
call   1070 <usleep@plt>
jmp    1180 <main+0x30>

LLVM IR (-O0):
@.str = [34 x i8] c"INITIALIZING SPEEDMETER LIBRARY!\0A\00"
@.str.1 = [13 x i8] c"TESTING ...\0A\00"
@.str.2 = [12 x i8] c"SPEED = %f\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @init_speedmeter(i32 0, i32 1)
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0))
br label %5
5: ; preds = %0, %5
%6 = call double (...) @get_speedmeter_value()
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.2, i64 0, i64 0), double %6)
%8 = call i32 @usleep(i32 500000)
br label %5
}

LLVM IR (-O2):
@.str.2 = [12 x i8] c"SPEED = %f\0A\00"
@str = [33 x i8] c"INITIALIZING SPEEDMETER LIBRARY!\00"
@str.3 = [12 x i8] c"TESTING ...\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([33 x i8], [33 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @init_speedmeter(i32 0, i32 1)
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @str.3, i64 0, i64 0))
br label %4
4: ; preds = %0, %4
%5 = tail call double (...) @get_speedmeter_value()
%6 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str.2, i64 0, i64 0), double %5)
%7 = tail call i32 @usleep(i32 500000)
br label %4
}
/* Variables and functions */
int /*<<< orphan*/ wdog_disable();
void pre_startup(void) { wdog_disable(); }


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

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

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

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


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

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

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

LLVM IR (-O2):
define void @SobelYRow_C() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void PrintHelp() {
  printf("Usage:\nCommand <option> <filename/number>\n\n");
  printf("options:\n-f read from file\n-c read from c rand() function\n\n");
  printf("filename/number:\nnumber of Kilobytes to process or filename of file "
         "to read (up to 2^32)\n");
}


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

x86 assembly (clang, -O2):
<PrintHelp>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <puts@plt>
lea    0xf07(%rip),%rdi
call   1030 <puts@plt>
lea    0xf36(%rip),%rdi
pop    %rax
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [44 x i8] c"Usage:\0ACommand <option> <filename/number>\0A\0A\00"
@.str.1 = [60 x i8] c"options:\0A-f read from file\0A-c read from c rand() function\0A\0A\00"
@.str.2 = [90 x i8] c"filename/number:\0Anumber of Kilobytes to process or filename of file to read (up to 2^32)\0A\00"
define void @PrintHelp() {
%1 = call i32 @printf(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @printf(i8* getelementptr inbounds ([60 x i8], [60 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 @printf(i8* getelementptr inbounds ([90 x i8], [90 x i8]* @.str.2, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [43 x i8] c"Usage:\0ACommand <option> <filename/number>\0A\00"
@str.3 = [59 x i8] c"options:\0A-f read from file\0A-c read from c rand() function\0A\00"
@str.4 = [89 x i8] c"filename/number:\0Anumber of Kilobytes to process or filename of file to read (up to 2^32)\00"
define void @PrintHelp() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([43 x i8], [43 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([59 x i8], [59 x i8]* @str.3, i64 0, i64 0))
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([89 x i8], [89 x i8]* @str.4, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, char *);
int main(int argc, char *argv[]) {
  printf("The value of argc is %d value of argv[1] %s and integer value of "
         "argv[1] is  \n",
         argc, argv[1]);
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    %edi,%eax
mov    0x8(%rsi),%rdx
lea    0xee2(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [79 x i8] c"The value of argc is %d value of argv[1] %s and integer value of argv[1] is \0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = load i32, i32* %4
%7 = load i8**, i8*** %5
%8 = getelementptr inbounds i8*, i8** %7, i64 1
%9 = load i8*, i8** %8
%10 = call i32 @printf(i8* getelementptr inbounds ([79 x i8], [79 x i8]* @.str, i64 0, i64 0), i32 %6, i8* %9)
ret i32 0
}

LLVM IR (-O2):
@.str = [79 x i8] c"The value of argc is %d value of argv[1] %s and integer value of argv[1] is \0A\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = getelementptr inbounds i8*, i8** %1, i64 1
%4 = load i8*, i8** %3
%5 = tail call i32 @printf(i8* getelementptr inbounds ([79 x i8], [79 x i8]* @.str, i64 0, i64 0), i32 %0, i8* %4)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void _aligned_free(void *mem) { free(mem); }


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

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

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

LLVM IR (-O2):
define void @_aligned_free(i8* nocapture %0) {
%2 = tail call i32 @free(i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ EVP_MD_CTX_destroy(void *);
void evpmd_free(void *aux, void *hash) { EVP_MD_CTX_destroy(hash); }


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

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

LLVM IR (-O0):
define void @evpmd_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 = call i32 @EVP_MD_CTX_destroy(i8* %5)
ret void
}

LLVM IR (-O2):
define void @evpmd_free(i8* nocapture readnone %0, i8* %1) {
%3 = tail call i32 @EVP_MD_CTX_destroy(i8* %1)
ret void
}
char bintohex(int n) {}


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

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

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

LLVM IR (-O2):
define signext i8 @bintohex(i32 %0) {
ret i8 undef
}
/* Variables and functions */
int /*<<< orphan*/ sprintf(char *, char *, int);
const char *sprintfstype(int magic) {
  static char buf[32];
  sprintf(buf, "%#x", magic);
  return buf;
}


x86 assembly (clang, -O0):
<sprintfstype>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edx
lea    0x2f1b(%rip),%rdi
lea    0xed4(%rip),%rsi
call   1030 <sprintf@plt>
lea    0x2f08(%rip),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sprintfstype>:
push   %rbx
mov    %edi,%edx
lea    0x2f26(%rip),%rbx
lea    0xedf(%rip),%rsi
mov    %rbx,%rdi
call   1030 <sprintf@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@sprintfstype.buf = internal global [32 x i8] zeroinitializer
@.str = [4 x i8] c"%#x\00"
define i8* @sprintfstype(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @sprintf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @sprintfstype.buf, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %3)
ret i8* getelementptr inbounds ([32 x i8], [32 x i8]* @sprintfstype.buf, i64 0, i64 0)
}

LLVM IR (-O2):
@sprintfstype.buf = internal global [32 x i8] zeroinitializer
@.str = [4 x i8] c"%#x\00"
define i8* @sprintfstype(i32 %0) {
%2 = tail call i32 @sprintf(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @sprintfstype.buf, i64 0, i64 0), i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %0)
ret i8* getelementptr inbounds ([32 x i8], [32 x i8]* @sprintfstype.buf, i64 0, i64 0)
}