xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ lwfree_var(void *);
void lwfree(void *mem) { lwfree_var(mem); }


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

x86 assembly (clang, -O2):
<lwfree>:
jmp    1030 <lwfree_var@plt>

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

LLVM IR (-O2):
define void @lwfree(i8* %0) {
%2 = tail call i32 @lwfree_var(i8* %0)
ret void
}
/* Variables and functions */
double pow(int, int);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int n;
  printf("Vnesete eden priroden broj: ");
  scanf("%d", &n);
  double rezultat = pow(n, 3);
  printf("Kubot na brojot %d e %.2f\n", n, rezultat);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeba(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xec9(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
mov    -0x8(%rbp),%edi
mov    $0x3,%esi
call   1050 <pow@plt>
movsd  %xmm0,-0x10(%rbp)
mov    -0x8(%rbp),%esi
movsd  -0x10(%rbp),%xmm0
lea    0xea2(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xec8(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xed7(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1040 <scanf@plt>
mov    0x4(%rsp),%edi
mov    $0x3,%esi
call   1050 <pow@plt>
mov    0x4(%rsp),%esi
lea    0xeb7(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [29 x i8] c"Vnesete eden priroden broj: \00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [27 x i8] c"Kubot na brojot %d e %.2f\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca double
store i32 0, i32* %1
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0))
%5 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %2)
%6 = load i32, i32* %2
%7 = call double @pow(i32 %6, i32 3)
store double %7, double* %3
%8 = load i32, i32* %2
%9 = load double, double* %3
%10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.2, i64 0, i64 0), i32 %8, double %9)
ret i32 0
}

LLVM IR (-O2):
@.str = [29 x i8] c"Vnesete eden priroden broj: \00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [27 x i8] c"Kubot na brojot %d e %.2f\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%5 = load i32, i32* %1
%6 = call double @pow(i32 %5, i32 3)
%7 = load i32, i32* %1
%8 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @.str.2, i64 0, i64 0), i32 %7, double %6)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printenv();
int do_printenv(int argc, char **argv) {
  printenv();
  return 0;
}


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

x86 assembly (clang, -O2):
<do_printenv>:
push   %rax
xor    %eax,%eax
call   1030 <printenv@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @do_printenv(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
store i32 %0, i32* %3
store i8** %1, i8*** %4
%5 = call i32 (...) @printenv()
ret i32 0
}

LLVM IR (-O2):
define i32 @do_printenv(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @printenv()
ret i32 0
}
int fn1(int p) { return -p; }


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

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

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

LLVM IR (-O2):
define i32 @fn1(i32 %0) {
%2 = sub nsw i32 0, %0
ret i32 %2
}
/* Type definitions */
typedef int /*<<< orphan*/ str;

/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ read(int /*<<< orphan*/, char *, int);
int strlen(char *);
int main() {
  char str[5];
  read(0, str, sizeof(str));
  int a = strlen(str);
  printf("Length of string is: %d", a);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x9(%rbp),%rsi
xor    %edi,%edi
mov    $0x5,%edx
call   1050 <read@plt>
lea    -0x9(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%esi
lea    0xe9b(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
lea    0xb(%rsp),%rbx
xor    %edi,%edi
mov    %rbx,%rsi
mov    $0x5,%edx
call   1050 <read@plt>
mov    %rbx,%rdi
call   1030 <strlen@plt>
lea    0xea8(%rip),%rdi
mov    %eax,%esi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [24 x i8] c"Length of string is: %d\00"
define i32 @main() {
%1 = alloca [5 x i8]
%2 = getelementptr inbounds [5 x i8], [5 x i8]* %1, i64 0, i64 0
%3 = call i32 @read(i32 0, i8* %2, i32 5)
%4 = call i32 @strlen(i8* %2)
%5 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), i32 %4)
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ uint16_t;
struct etimer {
  int dummy;
};

/* Variables and functions */
int timer_elapsed_seconds(struct etimer *, int /*<<< orphan*/);
bool timer_elapsed_seconds_short(struct etimer *t, uint16_t value) {
  return timer_elapsed_seconds(t, value);
}


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

x86 assembly (clang, -O2):
<timer_elapsed_seconds_short>:
jmp    1030 <timer_elapsed_seconds@plt>

LLVM IR (-O0):
%struct.etimer = type { i32 }
define i32 @timer_elapsed_seconds_short(%struct.etimer* %0, i32 %1) {
%3 = alloca %struct.etimer*
%4 = alloca i32
store %struct.etimer* %0, %struct.etimer** %3
store i32 %1, i32* %4
%5 = load %struct.etimer*, %struct.etimer** %3
%6 = load i32, i32* %4
%7 = call i32 @timer_elapsed_seconds(%struct.etimer* %5, i32 %6)
ret i32 %7
}

LLVM IR (-O2):
%struct.etimer = type { i32 }
define i32 @timer_elapsed_seconds_short(%struct.etimer* %0, i32 %1) {
%3 = tail call i32 @timer_elapsed_seconds(%struct.etimer* %0, i32 %1)
ret i32 %3
}
/* Type definitions */
typedef scalar_t__ pid_t;

/* Variables and functions */
scalar_t__ fork();
int /*<<< orphan*/ function();
int /*<<< orphan*/ waitpid(scalar_t__, int /*<<< orphan*/ *,
                           int /*<<< orphan*/);
int main() {
  pid_t child = fork();
  if (child == 0)
    function();
  else
    waitpid(child, NULL, 0);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1050 <fork@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1161 <main+0x31>
mov    $0x0,%al
call   1030 <function@plt>
jmp    1170 <main+0x40>
mov    -0x10(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
xor    %edx,%edx
call   1040 <waitpid@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1050 <fork@plt>
test   %rax,%rax
je     114b <main+0x1b>
mov    %rax,%rdi
xor    %esi,%esi
xor    %edx,%edx
call   1040 <waitpid@plt>
jmp    1152 <main+0x22>
xor    %eax,%eax
call   1030 <function@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i64 (...) @fork()
%2 = icmp eq i64 %1, 0
br i1 %2, label %3, label %5
3: ; preds = %0
%4 = tail call i32 (...) @function()
br label %7
5: ; preds = %0
%6 = tail call i32 @waitpid(i64 %1, i32* null, i32 0)
br label %7
7: ; preds = %5, %3
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ strncpy(char *, char const *, size_t);
void strncpy_ex(char *dst, const char *src, size_t n) {
  size_t len = n - 1;
  strncpy(dst, src, len);
  dst[len] = 0;
}


x86 assembly (clang, -O0):
<strncpy_ex>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x18(%rbp),%rax
sub    $0x1,%rax
mov    %rax,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x20(%rbp),%rdx
call   1030 <strncpy@plt>
mov    -0x8(%rbp),%rax
mov    -0x20(%rbp),%rcx
movb   $0x0,(%rax,%rcx,1)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strncpy_ex>:
push   %r14
push   %rbx
push   %rax
mov    %rdx,%r14
mov    %rdi,%rbx
add    $0xffffffffffffffff,%rdx
call   1030 <strncpy@plt>
movb   $0x0,-0x1(%rbx,%r14,1)
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define void @strncpy_ex(i8* %0, i8* %1, i64 %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i64
%7 = alloca i64
store i8* %0, i8** %4
store i8* %1, i8** %5
store i64 %2, i64* %6
%8 = load i64, i64* %6
%9 = sub i64 %8, 1
store i64 %9, i64* %7
%10 = load i8*, i8** %4
%11 = load i8*, i8** %5
%12 = load i64, i64* %7
%13 = call i32 @strncpy(i8* %10, i8* %11, i64 %12)
%14 = load i8*, i8** %4
%15 = load i64, i64* %7
%16 = getelementptr inbounds i8, i8* %14, i64 %15
store i8 0, i8* %16
ret void
}

LLVM IR (-O2):
define void @strncpy_ex(i8* %0, i8* %1, i64 %2) {
%4 = add i64 %2, -1
%5 = tail call i32 @strncpy(i8* %0, i8* %1, i64 %4)
%6 = getelementptr inbounds i8, i8* %0, i64 %4
store i8 0, i8* %6
ret void
}
int deallocate_share_mem(void *shared_memory) { return 1; }


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

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

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

LLVM IR (-O2):
define i32 @deallocate_share_mem(i8* nocapture readnone %0) {
ret i32 1
}
double slow(int step, int maxstep) {
  double t;
  t = 1.0 - (double)step / (double)maxstep;
  return 0.04 * t * t * t;
}


x86 assembly (clang, -O0):
<slow>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
cvtsi2sdl -0x4(%rbp),%xmm1
cvtsi2sdl -0x8(%rbp),%xmm0
divsd  %xmm0,%xmm1
movsd  0xee8(%rip),%xmm0
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  0xecf(%rip),%xmm0
mulsd  -0x10(%rbp),%xmm0
mulsd  -0x10(%rbp),%xmm0
mulsd  -0x10(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<slow>:
cvtsi2sd %edi,%xmm0
cvtsi2sd %esi,%xmm1
divsd  %xmm1,%xmm0
movsd  0xeec(%rip),%xmm1
subsd  %xmm0,%xmm1
movsd  0xee8(%rip),%xmm0
mulsd  %xmm1,%xmm0
mulsd  %xmm1,%xmm0
mulsd  %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @slow(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca double
store i32 %0, i32* %3
store i32 %1, i32* %4
%6 = load i32, i32* %3
%7 = sitofp i32 %6 to double
%8 = load i32, i32* %4
%9 = sitofp i32 %8 to double
%10 = fdiv double %7, %9
%11 = fsub double 1.000000e+00, %10
store double %11, double* %5
%12 = load double, double* %5
%13 = fmul double 4.000000e-02, %12
%14 = load double, double* %5
%15 = fmul double %13, %14
%16 = load double, double* %5
%17 = fmul double %15, %16
ret double %17
}

LLVM IR (-O2):
define double @slow(i32 %0, i32 %1) {
%3 = sitofp i32 %0 to double
%4 = sitofp i32 %1 to double
%5 = fdiv double %3, %4
%6 = fsub double 1.000000e+00, %5
%7 = fmul double %6, 4.000000e-02
%8 = fmul double %6, %7
%9 = fmul double %6, %8
ret double %9
}
void g_time_val_add() {}


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

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

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

LLVM IR (-O2):
define void @g_time_val_add() {
ret void
}
/* Type definitions */
struct rtattr {
  int dummy;
};
struct qdisc_util {
  int dummy;
};
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int csz_print_xstats(struct qdisc_util *qu, FILE *f, struct rtattr *xstats) {
  return -1;
}


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

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

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

LLVM IR (-O2):
%struct.qdisc_util = type { i32 }
%struct.rtattr = type { i32 }
define i32 @csz_print_xstats(%struct.qdisc_util* nocapture readnone %0, i32* nocapture readnone %1, %struct.rtattr* nocapture readnone %2) {
ret i32 -1
}
/* Variables and functions */
int /*<<< orphan*/ clang_analyzer_eval(int);
void largeAdjustmentGT(unsigned a) {
  if (a - 2 > (~0U) - 1)
    clang_analyzer_eval(a == 1);
  else
    clang_analyzer_eval(a != 1);
}


x86 assembly (clang, -O0):
<largeAdjustmentGT>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
sub    $0x2,%eax
cmp    $0xfffffffe,%eax
jbe    1140 <largeAdjustmentGT+0x30>
cmpl   $0x1,-0x4(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <clang_analyzer_eval@plt>
jmp    1151 <largeAdjustmentGT+0x41>
cmpl   $0x1,-0x4(%rbp)
setne  %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <clang_analyzer_eval@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<largeAdjustmentGT>:
mov    $0x1,%edi
jmp    1030 <clang_analyzer_eval@plt>

LLVM IR (-O0):
define void @largeAdjustmentGT(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = sub i32 %3, 2
%5 = icmp ugt i32 %4, -2
br i1 %5, label %6, label %11
6: ; preds = %1
%7 = load i32, i32* %2
%8 = icmp eq i32 %7, 1
%9 = zext i1 %8 to i32
%10 = call i32 @clang_analyzer_eval(i32 %9)
br label %16
11: ; preds = %1
%12 = load i32, i32* %2
%13 = icmp ne i32 %12, 1
%14 = zext i1 %13 to i32
%15 = call i32 @clang_analyzer_eval(i32 %14)
br label %16
16: ; preds = %11, %6
ret void
}

LLVM IR (-O2):
define void @largeAdjustmentGT(i32 %0) {
%2 = tail call i32 @clang_analyzer_eval(i32 1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ stderr;
void invalid_conf_option(char *op) {
  fprintf(stderr, "Invalid config option: %s\n", op);
}


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

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

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

LLVM IR (-O2):
@stderr = global i32 0
@.str = [27 x i8] c"Invalid config option: %s\0A\00"
define void @invalid_conf_option(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
void mm_optimize() {}


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

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

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

LLVM IR (-O2):
define void @mm_optimize() {
ret void
}
/* Variables and functions */
unsigned int bme280_compensate_P_int64(int);
unsigned int bme280_compensate_P_int64_twentyfour_bit_output(signed int adc_p) {
  unsigned int pressure = 0;
  pressure = bme280_compensate_P_int64(adc_p);
  pressure = (unsigned int)(pressure >> 1);
  return pressure;
}


x86 assembly (clang, -O0):
<bme280_compensate_P_int64_twentyfour_bit_output>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <bme280_compensate_P_int64@plt>
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
shr    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bme280_compensate_P_int64_twentyfour_bit_output>:
push   %rax
call   1030 <bme280_compensate_P_int64@plt>
shr    %eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @bme280_compensate_P_int64_twentyfour_bit_output(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
store i32 0, i32* %3
%4 = load i32, i32* %2
%5 = call i32 @bme280_compensate_P_int64(i32 %4)
store i32 %5, i32* %3
%6 = load i32, i32* %3
%7 = lshr i32 %6, 1
store i32 %7, i32* %3
%8 = load i32, i32* %3
ret i32 %8
}

LLVM IR (-O2):
define i32 @bme280_compensate_P_int64_twentyfour_bit_output(i32 %0) {
%2 = tail call i32 @bme280_compensate_P_int64(i32 %0)
%3 = lshr i32 %2, 1
ret i32 %3
}
/* Variables and functions */
int isLeapYear(int);
char *testYear() {
  int year = 2016;
  int result = isLeapYear(year);
  do {
    if (!(result == 1))
      return "Number of days must be 20";
  } while (0);
  return 0;
}


x86 assembly (clang, -O0):
<testYear>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x7e0,-0xc(%rbp)
mov    -0xc(%rbp),%edi
call   1030 <isLeapYear@plt>
mov    %eax,-0x10(%rbp)
cmpl   $0x1,-0x10(%rbp)
je     1144 <testYear+0x34>
lea    0xec5(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1151 <testYear+0x41>
jmp    1149 <testYear+0x39>
movq   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<testYear>:
push   %rax
mov    $0x7e0,%edi
call   1030 <isLeapYear@plt>
xor    %ecx,%ecx
cmp    $0x1,%eax
lea    0xed9(%rip),%rax
cmovne %rax,%rcx
mov    %rcx,%rax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [26 x i8] c"Number of days must be 20\00"
define i8* @testYear() {
%1 = alloca i8*
%2 = alloca i32
%3 = alloca i32
store i32 2016, i32* %2
%4 = load i32, i32* %2
%5 = call i32 @isLeapYear(i32 %4)
store i32 %5, i32* %3
br label %6
6: ; preds = %0
%7 = load i32, i32* %3
%8 = icmp eq i32 %7, 1
br i1 %8, label %10, label %9
9: ; preds = %6
store i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0), i8** %1
br label %12
10: ; preds = %6
br label %11
11: ; preds = %10
store i8* null, i8** %1
br label %12
12: ; preds = %11, %9
%13 = load i8*, i8** %1
ret i8* %13
}

LLVM IR (-O2):
@.str = [26 x i8] c"Number of days must be 20\00"
define i8* @testYear() {
%1 = tail call i32 @isLeapYear(i32 2016)
%2 = icmp eq i32 %1, 1
%3 = select i1 %2, i8* null, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0)
ret i8* %3
}
/* Type definitions */
typedef scalar_t__ const int32_t;

/* Variables and functions */
int32_t clamp24_from_q8_23(int32_t ival) {
  static const int32_t limpos = 0x7fffff;
  static const int32_t limneg = -0x800000;
  if (ival < limneg) {
    return limneg;
  } else if (ival > limpos) {
    return limpos;
  } else {
    return ival;
  }
}


x86 assembly (clang, -O0):
<clamp24_from_q8_23>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
cmpq   $0xffffffffff800000,-0x10(%rbp)
ff
jge    1123 <clamp24_from_q8_23+0x23>
movq   $0xffffffffff800000,-0x8(%rbp)
ff
jmp    1146 <clamp24_from_q8_23+0x46>
cmpq   $0x7fffff,-0x10(%rbp)
jle    113e <clamp24_from_q8_23+0x3e>
movq   $0x7fffff,-0x8(%rbp)
jmp    1146 <clamp24_from_q8_23+0x46>
mov    -0x10(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<clamp24_from_q8_23>:
cmp    $0x7fffff,%rdi
mov    $0x7fffff,%ecx
cmovl  %rdi,%rcx
cmp    $0xffffffffff800001,%rcx
mov    $0xffffffffff800000,%rax
cmovge %rcx,%rax
ret

LLVM IR (-O0):
@clamp24_from_q8_23.limpos = internal constant i64 8388607
@clamp24_from_q8_23.limneg = internal constant i64 -8388608
define i64 @clamp24_from_q8_23(i64 %0) {
%2 = alloca i64
%3 = alloca i64
store i64 %0, i64* %3
%4 = load i64, i64* %3
%5 = icmp slt i64 %4, -8388608
br i1 %5, label %6, label %7
6: ; preds = %1
store i64 -8388608, i64* %2
br label %13
7: ; preds = %1
%8 = load i64, i64* %3
%9 = icmp sgt i64 %8, 8388607
br i1 %9, label %10, label %11
10: ; preds = %7
store i64 8388607, i64* %2
br label %13
11: ; preds = %7
%12 = load i64, i64* %3
store i64 %12, i64* %2
br label %13
13: ; preds = %11, %10, %6
%14 = load i64, i64* %2
ret i64 %14
}

LLVM IR (-O2):
define i64 @clamp24_from_q8_23(i64 %0) {
%2 = icmp slt i64 %0, 8388607
%3 = select i1 %2, i64 %0, i64 8388607
%4 = icmp sgt i64 %3, -8388608
%5 = select i1 %4, i64 %3, i64 -8388608
ret i64 %5
}
void putpix1(image, bitpix, w, h, bzero, dirale, x, y, dpix) char *image;
int bitpix;
int w;
int h;
double bzero;
double dirale;
int x;
int y;
double dpix;
{
  putpix(image, bitpix, w, h, bzero, dirale, x - 1, y - 1, dpix);
  return;
}


x86 assembly (clang, -O0):
<putpix1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
movsd  %xmm0,-0x20(%rbp)
movsd  %xmm1,-0x28(%rbp)
mov    %r8d,-0x2c(%rbp)
mov    %r9d,-0x30(%rbp)
movsd  %xmm2,-0x38(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
mov    -0x14(%rbp),%ecx
movsd  -0x20(%rbp),%xmm0
movsd  -0x28(%rbp),%xmm1
mov    -0x2c(%rbp),%r8d
sub    $0x1,%r8d
mov    -0x30(%rbp),%r9d
sub    $0x1,%r9d
movsd  -0x38(%rbp),%xmm2
mov    $0x3,%al
call   1030 <putpix@plt>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<putpix1>:
add    $0xffffffff,%r8d
add    $0xffffffff,%r9d
mov    $0x3,%al
jmp    1030 <putpix@plt>

LLVM IR (-O0):
define void @putpix1(i8* %0, i32 %1, i32 %2, i32 %3, double %4, double %5, i32 %6, i32 %7, double %8) {
%10 = alloca i8*
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
%14 = alloca double
%15 = alloca double
%16 = alloca i32
%17 = alloca i32
%18 = alloca double
store i8* %0, i8** %10
store i32 %1, i32* %11
store i32 %2, i32* %12
store i32 %3, i32* %13
store double %4, double* %14
store double %5, double* %15
store i32 %6, i32* %16
store i32 %7, i32* %17
store double %8, double* %18
%19 = load i8*, i8** %10
%20 = load i32, i32* %11
%21 = load i32, i32* %12
%22 = load i32, i32* %13
%23 = load double, double* %14
%24 = load double, double* %15
%25 = load i32, i32* %16
%26 = sub nsw i32 %25, 1
%27 = load i32, i32* %17
%28 = sub nsw i32 %27, 1
%29 = load double, double* %18
%30 = call i32 (i8*, i32, i32, i32, double, double, i32, i32, double, ...) bitcast (i32 (...)* @putpix to i32 (i8*, i32, i32, i32, double, double, i32, i32, double, ...)*)(i8* %19, i32 %20, i32 %21, i32 %22, double %23, double %24, i32 %26, i32 %28, double %29)
ret void
}

LLVM IR (-O2):
define void @putpix1(i8* %0, i32 %1, i32 %2, i32 %3, double %4, double %5, i32 %6, i32 %7, double %8) {
%10 = add nsw i32 %6, -1
%11 = add nsw i32 %7, -1
%12 = tail call i32 (i8*, i32, i32, i32, double, double, i32, i32, double, ...) bitcast (i32 (...)* @putpix to i32 (i8*, i32, i32, i32, double, double, i32, i32, double, ...)*)(i8* %0, i32 %1, i32 %2, i32 %3, double %4, double %5, i32 %10, i32 %11, double %8)
ret void
}
int ld_ble_rm2(long double a1, long double *a2) {
  return !(__builtin_islessequal(a1, *a2));
}


x86 assembly (clang, -O0):
<ld_ble_rm2>:
push   %rbp
mov    %rsp,%rbp
fldt   0x10(%rbp)
fstpt  -0x10(%rbp)
mov    %rdi,-0x18(%rbp)
fldt   -0x10(%rbp)
mov    -0x18(%rbp),%rax
fldt   (%rax)
fucomip %st(1),%st
fstp   %st(0)
setae  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ld_ble_rm2>:
fldt   0x8(%rsp)
fldt   (%rdi)
xor    %eax,%eax
fucomip %st(1),%st
fstp   %st(0)
setb   %al
ret

LLVM IR (-O0):
define i32 @ld_ble_rm2(x86_fp80 %0, x86_fp80* %1) {
%3 = alloca x86_fp80
%4 = alloca x86_fp80*
store x86_fp80 %0, x86_fp80* %3
store x86_fp80* %1, x86_fp80** %4
%5 = load x86_fp80, x86_fp80* %3
%6 = load x86_fp80*, x86_fp80** %4
%7 = load x86_fp80, x86_fp80* %6
%8 = fcmp ole x86_fp80 %5, %7
%9 = xor i1 %8, true
%10 = zext i1 %9 to i32
ret i32 %10
}

LLVM IR (-O2):
define i32 @ld_ble_rm2(x86_fp80 %0, x86_fp80* nocapture %1) {
%3 = load x86_fp80, x86_fp80* %1
%4 = fcmp ult x86_fp80 %3, %0
%5 = zext i1 %4 to i32
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, unsigned int);
int main() {
  int i = 0;
  unsigned len = 0U;
  printf("%u\n", len - 1);
  return 0;
}


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

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

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

LLVM IR (-O2):
@.str = [4 x i8] c"%u\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 -1)
ret i32 0
}
/* Type definitions */
struct __sk_buff {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ lookup_no_release(struct __sk_buff *);
__attribute__((section("fail_no_release_subcall"), used)) int
bpf_sk_lookup_test5(struct __sk_buff *skb) {
  lookup_no_release(skb);
  return 0;
}


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

x86 assembly (clang, -O2):
<bpf_sk_lookup_test5>:
push   %rax
call   1030 <lookup_no_release@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.__sk_buff = type { i32 }
@llvm.compiler.used = appending global [1 x i8*] [i8* bitcast (i32 (%struct.__sk_buff*)* @bpf_sk_lookup_test5 to i8*)], section "llvm.metadata"
define i32 @bpf_sk_lookup_test5(%struct.__sk_buff* %0) section "fail_no_release_subcall" {
%2 = alloca %struct.__sk_buff*
store %struct.__sk_buff* %0, %struct.__sk_buff** %2
%3 = load %struct.__sk_buff*, %struct.__sk_buff** %2
%4 = call i32 @lookup_no_release(%struct.__sk_buff* %3)
ret i32 0
}

LLVM IR (-O2):
%struct.__sk_buff = type { i32 }
@llvm.compiler.used = appending global [1 x i8*] [i8* bitcast (i32 (%struct.__sk_buff*)* @bpf_sk_lookup_test5 to i8*)], section "llvm.metadata"
define i32 @bpf_sk_lookup_test5(%struct.__sk_buff* %0) section "fail_no_release_subcall" {
%2 = tail call i32 @lookup_no_release(%struct.__sk_buff* %0)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ strlen(char *);
int write(int, char *, int /*<<< orphan*/);
int write_str(int fd, char *s) { return write(fd, s, strlen(s)); }


x86 assembly (clang, -O0):
<write_str>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <strlen@plt>
mov    -0x1c(%rbp),%edi
mov    -0x18(%rbp),%rsi
mov    %eax,%edx
call   1030 <write@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<write_str>:
push   %rbp
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %edi,%ebp
mov    %rsi,%rdi
call   1040 <strlen@plt>
mov    %ebp,%edi
mov    %rbx,%rsi
mov    %eax,%edx
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <write@plt>

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

LLVM IR (-O2):
define i32 @write_str(i32 %0, i8* %1) {
%3 = tail call i32 @strlen(i8* %1)
%4 = tail call i32 @write(i32 %0, i8* %1, i32 %3)
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ rprintf(char *);
void DefaultVICHandler(void) {
  (*(volatile unsigned long *)(0xFFFFF000 + 0x030)) = 0;
  rprintf("\nDefault VIC Stop");
  while (1)
    ;
}


x86 assembly (clang, -O0):
<DefaultVICHandler>:
push   %rbp
mov    %rsp,%rbp
mov    $0xfffff030,%eax
movq   $0x0,(%rax)
lea    0xed9(%rip),%rdi
call   1030 <rprintf@plt>
jmp    112c <DefaultVICHandler+0x1c>

x86 assembly (clang, -O2):
<DefaultVICHandler>:
push   %rax
mov    $0xfffff030,%eax
movq   $0x0,(%rax)
lea    0xedc(%rip),%rdi
call   1030 <rprintf@plt>
nopl   0x0(%rax)
jmp    1130 <DefaultVICHandler+0x20>

LLVM IR (-O0):
@.str = [18 x i8] c"\0ADefault VIC Stop\00"
define void @DefaultVICHandler() {
store volatile i64 0, i64* inttoptr (i64 4294963248 to i64*)
%1 = call i32 @rprintf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
br label %2
2: ; preds = %0, %2
br label %2
}

LLVM IR (-O2):
@.str = [18 x i8] c"\0ADefault VIC Stop\00"
define void @DefaultVICHandler() {
store volatile i64 0, i64* inttoptr (i64 4294963248 to i64*)
%1 = tail call i32 @rprintf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
br label %2
2: ; preds = %0, %2
br label %2
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
int /*<<< orphan*/ MC_put1_8(int, int /*<<< orphan*/ *,
                             int /*<<< orphan*/ const *, int);
void MC_put_o_8_mmxext(uint8_t *dest, const uint8_t *ref, int stride,
                       int height) {
  MC_put1_8(height, dest, ref, stride);
}


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

x86 assembly (clang, -O2):
<MC_put_o_8_mmxext>:
mov    %edx,%eax
mov    %rsi,%rdx
mov    %rdi,%rsi
mov    %ecx,%edi
mov    %eax,%ecx
jmp    1030 <MC_put1_8@plt>

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

LLVM IR (-O2):
define void @MC_put_o_8_mmxext(i32* %0, i32* %1, i32 %2, i32 %3) {
%5 = tail call i32 @MC_put1_8(i32 %3, i32* %0, i32* %1, i32 %2)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint64_t;
struct node {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ manhattan_h(struct node *, struct node *,
                               int /*<<< orphan*/);
uint64_t cost_of_travel(struct node *from, struct node *to, uint64_t cost) {
  return manhattan_h(from, to, cost);
}


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

x86 assembly (clang, -O2):
<cost_of_travel>:
jmp    1030 <manhattan_h@plt>

LLVM IR (-O0):
%struct.node = type { i32 }
define i32 @cost_of_travel(%struct.node* %0, %struct.node* %1, i32 %2) {
%4 = alloca %struct.node*
%5 = alloca %struct.node*
%6 = alloca i32
store %struct.node* %0, %struct.node** %4
store %struct.node* %1, %struct.node** %5
store i32 %2, i32* %6
%7 = load %struct.node*, %struct.node** %4
%8 = load %struct.node*, %struct.node** %5
%9 = load i32, i32* %6
%10 = call i32 @manhattan_h(%struct.node* %7, %struct.node* %8, i32 %9)
ret i32 %10
}

LLVM IR (-O2):
%struct.node = type { i32 }
define i32 @cost_of_travel(%struct.node* %0, %struct.node* %1, i32 %2) {
%4 = tail call i32 @manhattan_h(%struct.node* %0, %struct.node* %1, i32 %2)
ret i32 %4
}
int somaCubos(int n) {
  if (n == 0)
    return 0;
  return (n * n * n) + somaCubos(n - 1);
}


x86 assembly (clang, -O0):
<somaCubos>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jne    1131 <somaCubos+0x21>
movl   $0x0,-0x4(%rbp)
jmp    1154 <somaCubos+0x44>
mov    -0x8(%rbp),%eax
imul   -0x8(%rbp),%eax
imul   -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%edi
sub    $0x1,%edi
call   1030 <somaCubos@plt>
mov    %eax,%ecx
mov    -0xc(%rbp),%eax
add    %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<somaCubos>:
test   %edi,%edi
je     1178 <somaCubos+0x78>
mov    %edi,%eax
imul   %edi,%eax
lea    -0x1(%rdi),%r8d
lea    -0x3(%rdi),%r10d
mov    %r10d,%ecx
imul   %edi,%ecx
add    $0x3,%ecx
imul   %edi,%ecx
add    $0xffffffff,%ecx
imul   %r8d,%ecx
lea    (%rdi,%rdi,2),%r9d
mov    $0x9,%esi
sub    %r9d,%esi
imul   %edi,%esi
add    $0xfffffff9,%esi
lea    -0x2(%rdi),%edx
imul   %r8,%rdx
imul   %rdx,%r10
shr    %rdx
imul   %esi,%edx
lea    (%r9,%r9,1),%r8d
add    $0xfffffff4,%r8d
lea    -0x4(%rdi),%esi
imul   %r10,%rsi
shr    %r10
imul   %r8d,%r10d
imul   $0xaaaaaaab,%r10d,%r8d
shr    $0x2,%rsi
and    $0xfffffffe,%esi
imul   %edi,%eax
add    %ecx,%eax
add    %edx,%eax
add    %r8d,%eax
sub    %esi,%eax
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @somaCubos(i32 %0) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %47, label %3
3: ; preds = %1
%4 = mul i32 %0, %0
%5 = add i32 %0, -1
%6 = add i32 %0, -3
%7 = mul i32 %6, %0
%8 = add i32 %7, 3
%9 = mul i32 %8, %0
%10 = add i32 %9, -1
%11 = mul i32 %5, %10
%12 = mul i32 %0, -3
%13 = add i32 %12, 9
%14 = mul i32 %13, %0
%15 = add i32 %14, -7
%16 = zext i32 %5 to i33
%17 = add i32 %0, -2
%18 = zext i32 %17 to i33
%19 = mul i33 %16, %18
%20 = lshr i33 %19, 1
%21 = trunc i33 %20 to i32
%22 = mul i32 %15, %21
%23 = mul i32 %0, 6
%24 = add i32 %23, -12
%25 = zext i32 %6 to i33
%26 = mul i33 %19, %25
%27 = lshr i33 %26, 1
%28 = trunc i33 %27 to i32
%29 = mul i32 %24, %28
%30 = mul i32 %29, -1431655765
%31 = zext i32 %5 to i35
%32 = zext i32 %17 to i35
%33 = mul i35 %31, %32
%34 = zext i32 %6 to i35
%35 = mul i35 %33, %34
%36 = add i32 %0, -4
%37 = zext i32 %36 to i35
%38 = mul i35 %35, %37
%39 = lshr i35 %38, 2
%40 = trunc i35 %39 to i32
%41 = and i32 %40, -2
%42 = mul i32 %4, %0
%43 = add i32 %42, %11
%44 = add i32 %43, %22
%45 = add i32 %30, %44
%46 = sub i32 %45, %41
br label %47
47: ; preds = %3, %1
%48 = phi i32 [ 0, %1 ], [ %46, %3 ]
ret i32 %48
}
/* Variables and functions */
void *malloc(int);
int /*<<< orphan*/ process_plain_bad(int, void *const);
int main(int argc, char *argv[]) {
  int t = 100;
  void *const output = malloc(t * sizeof(int));
  process_plain_bad(t, output);
#pragma omp taskwait
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x64,-0x14(%rbp)
movslq -0x14(%rbp),%rax
shl    $0x2,%rax
mov    %eax,%edi
call   1040 <malloc@plt>
mov    %rax,-0x20(%rbp)
mov    -0x14(%rbp),%edi
mov    -0x20(%rbp),%rsi
call   1030 <process_plain_bad@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x190,%edi
call   1040 <malloc@plt>
mov    $0x64,%edi
mov    %rax,%rsi
call   1030 <process_plain_bad@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i8*
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 100, i32* %6
%8 = load i32, i32* %6
%9 = sext i32 %8 to i64
%10 = mul i64 %9, 4
%11 = trunc i64 %10 to i32
%12 = call i8* @malloc(i32 %11)
store i8* %12, i8** %7
%13 = load i32, i32* %6
%14 = load i8*, i8** %7
%15 = call i32 @process_plain_bad(i32 %13, i8* %14)
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call dereferenceable_or_null(400) i8* @malloc(i32 400)
%4 = tail call i32 @process_plain_bad(i32 100, i8* %3)
ret i32 0
}
/* Variables and functions */
float babylonianSqrt(int, float, float);
float sqrt(float S) {
  if (S <= -0.001) {
    return -1;
  }
  int n = 6;
  return babylonianSqrt(n, S, S / 2);
}


x86 assembly (clang, -O0):
<sqrt>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x8(%rbp)
movss  -0x8(%rbp),%xmm0
cvtss2sd %xmm0,%xmm1
movsd  0xed2(%rip),%xmm0
ucomisd %xmm1,%xmm0
jb     114a <sqrt+0x3a>
movss  0xecc(%rip),%xmm0
movss  %xmm0,-0x4(%rbp)
jmp    1174 <sqrt+0x64>
movl   $0x6,-0xc(%rbp)
mov    -0xc(%rbp),%edi
movss  -0x8(%rbp),%xmm0
movss  -0x8(%rbp),%xmm1
movss  0xea2(%rip),%xmm2
divss  %xmm2,%xmm1
call   1030 <babylonianSqrt@plt>
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sqrt>:
cvtss2sd %xmm0,%xmm1
movsd  0xee4(%rip),%xmm2
ucomisd %xmm1,%xmm2
jae    1138 <sqrt+0x28>
movss  0xee2(%rip),%xmm1
mulss  %xmm0,%xmm1
mov    $0x6,%edi
jmp    1030 <babylonianSqrt@plt>
movss  0xec8(%rip),%xmm0
ret

LLVM IR (-O0):
define float @sqrt(float %0) {
%2 = alloca float
%3 = alloca float
%4 = alloca i32
store float %0, float* %3
%5 = load float, float* %3
%6 = fpext float %5 to double
%7 = fcmp ole double %6, -1.000000e-03
br i1 %7, label %8, label %9
8: ; preds = %1
store float -1.000000e+00, float* %2
br label %15
9: ; preds = %1
store i32 6, i32* %4
%10 = load i32, i32* %4
%11 = load float, float* %3
%12 = load float, float* %3
%13 = fdiv float %12, 2.000000e+00
%14 = call float @babylonianSqrt(i32 %10, float %11, float %13)
store float %14, float* %2
br label %15
15: ; preds = %9, %8
%16 = load float, float* %2
ret float %16
}

LLVM IR (-O2):
define float @sqrt(float %0) {
%2 = fpext float %0 to double
%3 = fcmp ugt double %2, -1.000000e-03
br i1 %3, label %4, label %7
4: ; preds = %1
%5 = fmul float %0, 5.000000e-01
%6 = tail call float @babylonianSqrt(i32 6, float %0, float %5)
br label %7
7: ; preds = %1, %4
%8 = phi float [ %6, %4 ], [ -1.000000e+00, %1 ]
ret float %8
}
/* Variables and functions */
int /*<<< orphan*/ strcpy(char *, char const *);
__attribute__((dllexport)) __attribute__((__visibility__("default"))) int
test(int intValue, const char *textValue, char *outTextValue) {
  strcpy(outTextValue, textValue);
  return intValue;
}


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

x86 assembly (clang, -O2):
<test>:
push   %rbx
mov    %edi,%ebx
mov    %rdx,%rdi
call   1030 <strcpy@plt>
mov    %ebx,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @test(i32 returned %0, i8* %1, i8* %2) {
%4 = tail call i32 @strcpy(i8* %2, i8* %1)
ret i32 %0
}
int test_imm_8Dint16_reg(short val) {
  return ((val) & (0x8D << 0)) ? -20 : -40;
}


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

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

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

LLVM IR (-O2):
define i32 @test_imm_8Dint16_reg(i16 signext %0) {
%2 = and i16 %0, 141
%3 = icmp eq i16 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
int /*<<< orphan*/ strcpy(char *, char *);
void ex2() {
  char str1[20] = "Hello World.", str2[20];
  int count;
  strcpy(str2, str1);
  printf("%s\n", str2);
}


x86 assembly (clang, -O0):
<ex2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
mov    0xed1(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xece(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    0xecc(%rip),%eax
mov    %eax,-0x10(%rbp)
lea    -0x40(%rbp),%rdi
lea    -0x20(%rbp),%rsi
call   1030 <strcpy@plt>
lea    -0x40(%rbp),%rsi
lea    0xeb5(%rip),%rdi
call   1040 <printf@plt>
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ex2>:
push   %rbx
sub    $0x40,%rsp
movaps 0xed4(%rip),%xmm0
movaps %xmm0,(%rsp)
movl   $0x0,0x10(%rsp)
lea    0x20(%rsp),%rbx
mov    %rsp,%rsi
mov    %rbx,%rdi
call   1030 <strcpy@plt>
lea    0xec5(%rip),%rdi
mov    %rbx,%rsi
call   1040 <printf@plt>
add    $0x40,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@__const.ex2.str1 = [20 x i8] c"Hello World.\00\00\00\00\00\00\00\00"
@.str = [4 x i8] c"%s\0A\00"
define void @ex2() {
%1 = alloca [20 x i8]
%2 = alloca [20 x i8]
%3 = alloca i32
%4 = bitcast [20 x i8]* %1 to i8*
%5 = getelementptr inbounds [20 x i8], [20 x i8]* %2, i64 0, i64 0
%6 = getelementptr inbounds [20 x i8], [20 x i8]* %1, i64 0, i64 0
%7 = call i32 @strcpy(i8* %5, i8* %6)
%8 = getelementptr inbounds [20 x i8], [20 x i8]* %2, i64 0, i64 0
%9 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %8)
ret void
}

LLVM IR (-O2):
@__const.ex2.str1 = [20 x i8] c"Hello World.\00\00\00\00\00\00\00\00"
@.str = [4 x i8] c"%s\0A\00"
define void @ex2() {
%1 = alloca [20 x i8]
%2 = alloca [20 x i8]
%3 = getelementptr inbounds [20 x i8], [20 x i8]* %1, i64 0, i64 0
%4 = getelementptr inbounds [20 x i8], [20 x i8]* %2, i64 0, i64 0
%5 = call i32 @strcpy(i8* %4, i8* %3)
%6 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %4)
ret void
}
int KBtoMB(int kb) { return (int)(kb / 1024); }


x86 assembly (clang, -O0):
<KBtoMB>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    $0x400,%ecx
cltd
idiv   %ecx
pop    %rbp
ret

x86 assembly (clang, -O2):
<KBtoMB>:
lea    0x3ff(%rdi),%eax
test   %edi,%edi
cmovns %edi,%eax
sar    $0xa,%eax
ret

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

LLVM IR (-O2):
define i32 @KBtoMB(i32 %0) {
%2 = sdiv i32 %0, 1024
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
scalar_t__ sync();
int /*<<< orphan*/ warn(char *);
void do_sync(void) {
  if (sync()) {
    warn("sync");
  }
  printf("sync\n");
}


x86 assembly (clang, -O0):
<do_sync>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1050 <sync@plt>
cmp    $0x0,%rax
je     1151 <do_sync+0x21>
lea    0xeb4(%rip),%rdi
call   1030 <warn@plt>
lea    0xead(%rip),%rdi
call   1040 <printf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<do_sync>:
push   %rax
xor    %eax,%eax
call   1050 <sync@plt>
test   %rax,%rax
je     1149 <do_sync+0x19>
lea    0xebc(%rip),%rdi
call   1030 <warn@plt>
lea    0xeb0(%rip),%rdi
pop    %rax
jmp    1040 <puts@plt>

LLVM IR (-O0):
@.str = [5 x i8] c"sync\00"
@.str.1 = [6 x i8] c"sync\0A\00"
define void @do_sync() {
%1 = call i64 (...) @sync()
%2 = icmp ne i64 %1, 0
br i1 %2, label %3, label %5
3: ; preds = %0
%4 = call i32 @warn(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
br label %5
5: ; preds = %3, %0
%6 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [5 x i8] c"sync\00"
define void @do_sync() {
%1 = tail call i64 (...) @sync()
%2 = icmp eq i64 %1, 0
br i1 %2, label %5, label %3
3: ; preds = %0
%4 = tail call i32 @warn(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @str, i64 0, i64 0))
br label %5
5: ; preds = %3, %0
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
void signal_deinit(void) {}


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

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

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

LLVM IR (-O2):
define void @signal_deinit() {
ret void
}
int test_imm_92uint32_mem(unsigned int *val) {
  return ((*val) & (0x92 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_92uint32_mem>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%edx
and    $0x92,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_92uint32_mem>:
testb  $0x92,(%rdi)
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_92uint32_mem(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = and i32 %2, 146
%4 = icmp eq i32 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}