xunge/DecIR huggingface dataset:
void spin(void) {
  static int i_spin = 0;
  const char spin[4] = "-/|\\";
  printf("%c", spin[i_spin % sizeof(spin)]);
  i_spin++;
  if ((i_spin % 41) == 0) {
    printf("\r");
  }
}


x86 assembly (clang, -O0):
<spin>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    0xee2(%rip),%eax
mov    %eax,-0x4(%rbp)
movslq 0x2f04(%rip),%rax
and    $0x3,%rax
movsbl -0x4(%rbp,%rax,1),%esi
lea    0xecc(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    0x2ee7(%rip),%eax
add    $0x1,%eax
mov    %eax,0x2ede(%rip)
mov    0x2ed8(%rip),%eax
mov    $0x29,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    1173 <spin+0x63>
lea    0xe9b(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<spin>:
push   %rax
mov    0x2f15(%rip),%eax
and    $0x3,%eax
lea    0xedf(%rip),%rcx
movsbl (%rax,%rcx,1),%edi
call   1030 <putchar@plt>
mov    0x2efc(%rip),%eax
add    $0x1,%eax
mov    %eax,0x2ef3(%rip)
imul   $0xc18f9c19,%eax,%eax
add    $0x31f3831,%eax
cmp    $0x63e7062,%eax
jbe    114d <spin+0x3d>
pop    %rax
ret
mov    $0xd,%edi
pop    %rax
jmp    1030 <putchar@plt>

LLVM IR (-O0):
@spin.i_spin = internal global i32 0
@__const.spin.spin = [4 x i8] c"-/|\\"
@.str = [3 x i8] c"%c\00"
@.str.1 = [2 x i8] c"\0D\00"
define void @spin() {
%1 = alloca [4 x i8]
%2 = bitcast [4 x i8]* %1 to i8*
%3 = load i32, i32* @spin.i_spin
%4 = sext i32 %3 to i64
%5 = urem i64 %4, 4
%6 = getelementptr inbounds [4 x i8], [4 x i8]* %1, i64 0, i64 %5
%7 = load i8, i8* %6
%8 = sext i8 %7 to i32
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %8)
%10 = load i32, i32* @spin.i_spin
%11 = add nsw i32 %10, 1
store i32 %11, i32* @spin.i_spin
%12 = load i32, i32* @spin.i_spin
%13 = srem i32 %12, 41
%14 = icmp eq i32 %13, 0
br i1 %14, label %15, label %17
15: ; preds = %0
%16 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
br label %17
17: ; preds = %15, %0
ret void
}

LLVM IR (-O2):
@spin.i_spin = internal unnamed_addr global i32 0
@__const.spin.spin = [4 x i8] c"-/|\\"
define void @spin() {
%1 = load i32, i32* @spin.i_spin
%2 = and i32 %1, 3
%3 = zext i32 %2 to i64
%4 = getelementptr inbounds [4 x i8], [4 x i8]* @__const.spin.spin, i64 0, i64 %3
%5 = load i8, i8* %4
%6 = sext i8 %5 to i32
%7 = tail call i32 @putchar(i32 %6)
%8 = load i32, i32* @spin.i_spin
%9 = add nsw i32 %8, 1
store i32 %9, i32* @spin.i_spin
%10 = srem i32 %9, 41
%11 = icmp eq i32 %10, 0
br i1 %11, label %12, label %14
12: ; preds = %0
%13 = tail call i32 @putchar(i32 13)
br label %14
14: ; preds = %12, %0
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void free_if(void *ptr) {
  if (ptr == NULL)
    return;
  free(ptr);
  return;
}


x86 assembly (clang, -O0):
<free_if>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    112c <free_if+0x1c>
jmp    1135 <free_if+0x25>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<free_if>:
test   %rdi,%rdi
je     111a <free_if+0xa>
jmp    1030 <free@plt>
ret

LLVM IR (-O0):
define void @free_if(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = icmp eq i8* %3, null
br i1 %4, label %5, label %6
5: ; preds = %1
br label %9
6: ; preds = %1
%7 = load i8*, i8** %2
%8 = call i32 @free(i8* %7)
br label %9
9: ; preds = %6, %5
ret void
}

LLVM IR (-O2):
define void @free_if(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = tail call i32 @free(i8* %0)
br label %5
5: ; preds = %1, %3
ret void
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  scalar_t__ detail;
};
typedef TYPE_1__ XConfigureRequestEvent;

/* Variables and functions */
int get_XConfigureRequestEvent_detail(void *_p) {
  return (int)((XConfigureRequestEvent *)_p)->detail;
}


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

x86 assembly (clang, -O2):
<get_XConfigureRequestEvent_detail>:
mov    (%rdi),%eax
ret

LLVM IR (-O0):
%struct.TYPE_2__ = type { i64 }
define i32 @get_XConfigureRequestEvent_detail(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = bitcast i8* %3 to %struct.TYPE_2__*
%5 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %4, i32 0, i32 0
%6 = load i64, i64* %5
%7 = trunc i64 %6 to i32
ret i32 %7
}

LLVM IR (-O2):
define i32 @get_XConfigureRequestEvent_detail(i8* nocapture %0) {
%2 = bitcast i8* %0 to i64*
%3 = load i64, i64* %2
%4 = trunc i64 %3 to i32
ret i32 %4
}
void gtk_cell_renderer_pixbuf_get_type() {}


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

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

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

LLVM IR (-O2):
define void @gtk_cell_renderer_pixbuf_get_type() {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ __my_little_hc128_unsafe_random();
uint32_t hc128random_unsafe(void) { return __my_little_hc128_unsafe_random(); }


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

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

LLVM IR (-O0):
define i32 @hc128random_unsafe() {
%1 = call i32 (...) @__my_little_hc128_unsafe_random()
ret i32 %1
}

LLVM IR (-O2):
define i32 @hc128random_unsafe() {
%1 = tail call i32 (...) @__my_little_hc128_unsafe_random()
ret i32 %1
}
double mismatch(double p, double q, void *data) {
  (void)data;
  return (1 - p) * q / 3 + (1 - q) * p / 3 + 2 * p * q / 9;
}


x86 assembly (clang, -O0):
<mismatch>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
mov    %rdi,-0x18(%rbp)
movsd  0xefe(%rip),%xmm0
subsd  -0x8(%rbp),%xmm0
mulsd  -0x10(%rbp),%xmm0
movsd  0xee4(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  0xee0(%rip),%xmm1
subsd  -0x10(%rbp),%xmm1
mulsd  -0x8(%rbp),%xmm1
movsd  0xec6(%rip),%xmm2
divsd  %xmm2,%xmm1
addsd  %xmm1,%xmm0
movsd  0xeae(%rip),%xmm1
mulsd  -0x8(%rbp),%xmm1
mulsd  -0x10(%rbp),%xmm1
movsd  0xe94(%rip),%xmm2
divsd  %xmm2,%xmm1
addsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<mismatch>:
movsd  0xef8(%rip),%xmm2
subsd  %xmm1,%xmm2
mulsd  %xmm0,%xmm2
divsd  0xef0(%rip),%xmm2
unpcklpd %xmm0,%xmm3
addsd  %xmm0,%xmm0
movapd 0xee8(%rip),%xmm4
subpd  %xmm3,%xmm4
shufpd $0x2,%xmm4,%xmm0
unpcklpd %xmm1,%xmm1
mulpd  %xmm1,%xmm0
divpd  0xedf(%rip),%xmm0
movapd %xmm0,%xmm1
unpckhpd %xmm0,%xmm1
addsd  %xmm2,%xmm1
addsd  %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @mismatch(double %0, double %1, i8* %2) {
%4 = alloca double
%5 = alloca double
%6 = alloca i8*
store double %0, double* %4
store double %1, double* %5
store i8* %2, i8** %6
%7 = load i8*, i8** %6
%8 = load double, double* %4
%9 = fsub double 1.000000e+00, %8
%10 = load double, double* %5
%11 = fmul double %9, %10
%12 = fdiv double %11, 3.000000e+00
%13 = load double, double* %5
%14 = fsub double 1.000000e+00, %13
%15 = load double, double* %4
%16 = fmul double %14, %15
%17 = fdiv double %16, 3.000000e+00
%18 = fadd double %12, %17
%19 = load double, double* %4
%20 = fmul double 2.000000e+00, %19
%21 = load double, double* %5
%22 = fmul double %20, %21
%23 = fdiv double %22, 9.000000e+00
%24 = fadd double %18, %23
ret double %24
}

LLVM IR (-O2):
define double @mismatch(double %0, double %1, i8* nocapture readnone %2) {
%4 = fsub double 1.000000e+00, %1
%5 = fmul double %4, %0
%6 = fdiv double %5, 3.000000e+00
%7 = insertelement <2 x double> poison, double %0, i64 0
%8 = shufflevector <2 x double> %7, <2 x double> poison, <2 x i32> zeroinitializer
%9 = fmul <2 x double> %8, <double 2.000000e+00, double poison>
%10 = fsub <2 x double> <double poison, double 1.000000e+00>, %8
%11 = shufflevector <2 x double> %9, <2 x double> %10, <2 x i32> <i32 0, i32 3>
%12 = insertelement <2 x double> poison, double %1, i64 0
%13 = shufflevector <2 x double> %12, <2 x double> poison, <2 x i32> zeroinitializer
%14 = fmul <2 x double> %11, %13
%15 = fdiv <2 x double> %14, <double 9.000000e+00, double 3.000000e+00>
%16 = extractelement <2 x double> %15, i64 1
%17 = fadd double %16, %6
%18 = extractelement <2 x double> %15, i64 0
%19 = fadd double %18, %17
ret double %19
}
/* Variables and functions */
unsigned int rand();
extern unsigned int normal_rand(void *context, unsigned int max_value) {
  return rand() % max_value;
}


x86 assembly (clang, -O0):
<normal_rand>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    $0x0,%al
call   1030 <rand@plt>
xor    %edx,%edx
divl   -0xc(%rbp)
mov    %edx,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<normal_rand>:
push   %rbx
mov    %esi,%ebx
xor    %eax,%eax
call   1030 <rand@plt>
xor    %edx,%edx
div    %ebx
mov    %edx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @normal_rand(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = call i32 (...) @rand()
%6 = load i32, i32* %4
%7 = urem i32 %5, %6
ret i32 %7
}

LLVM IR (-O2):
define i32 @normal_rand(i8* nocapture readnone %0, i32 %1) {
%3 = tail call i32 (...) @rand()
%4 = urem i32 %3, %1
ret i32 %4
}
/* Type definitions */
typedef int /*<<< orphan*/ uint64_t;
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ hash_words64(int /*<<< orphan*/ const *, size_t,
                                int /*<<< orphan*/);
uint32_t hash_bytes64(const uint64_t p[], size_t n_bytes, uint32_t basis) {
  return hash_words64(p, n_bytes / 8, basis);
}


x86 assembly (clang, -O0):
<hash_bytes64>:
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
shr    $0x3,%rsi
mov    -0x14(%rbp),%edx
call   1030 <hash_words64@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<hash_bytes64>:
shr    $0x3,%rsi
jmp    1030 <hash_words64@plt>

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

LLVM IR (-O2):
define i32 @hash_bytes64(i32* %0, i64 %1, i32 %2) {
%4 = lshr i64 %1, 3
%5 = tail call i32 @hash_words64(i32* %0, i64 %4, i32 %2)
ret i32 %5
}
disorder(s, t) char *s, *t;
{
  register char *u;
  for (u = t; *u != '\n'; u++)
    ;
  *u = 0;
  diag(s, t);
  term(0);
}


x86 assembly (clang, -O0):
<disorder>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
movsbl (%rax),%eax
cmp    $0xa,%eax
je     115e <disorder+0x3e>
jmp    114d <disorder+0x2d>
mov    -0x20(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x20(%rbp)
jmp    1138 <disorder+0x18>
mov    -0x20(%rbp),%rax
movb   $0x0,(%rax)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    $0x0,%al
call   1030 <diag@plt>
xor    %edi,%edi
mov    $0x0,%al
call   1040 <term@plt>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<disorder>:
push   %rax
mov    %rsi,%rax
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
cmpb   $0xa,(%rax)
lea    0x1(%rax),%rax
jne    1130 <disorder+0x10>
movb   $0x0,-0x1(%rax)
xor    %eax,%eax
call   1030 <diag@plt>
xor    %edi,%edi
xor    %eax,%eax
pop    %rcx
jmp    1040 <term@plt>

LLVM IR (-O0):
define i32 @disorder(i8* %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i8*
store i8* %0, i8** %4
store i8* %1, i8** %5
%7 = load i8*, i8** %5
store i8* %7, i8** %6
br label %8
8: ; preds = %14, %2
%9 = load i8*, i8** %6
%10 = load i8, i8* %9
%11 = sext i8 %10 to i32
%12 = icmp ne i32 %11, 10
br i1 %12, label %13, label %17
13: ; preds = %8
br label %14
14: ; preds = %13
%15 = load i8*, i8** %6
%16 = getelementptr inbounds i8, i8* %15, i32 1
store i8* %16, i8** %6
br label %8
17: ; preds = %8
%18 = load i8*, i8** %6
store i8 0, i8* %18
%19 = load i8*, i8** %4
%20 = load i8*, i8** %5
%21 = call i32 (i8*, i8*, ...) bitcast (i32 (...)* @diag to i32 (i8*, i8*, ...)*)(i8* %19, i8* %20)
%22 = call i32 (i32, ...) bitcast (i32 (...)* @term to i32 (i32, ...)*)(i32 0)
%23 = load i32, i32* %3
ret i32 %23
}

LLVM IR (-O2):
define i32 @disorder(i8* %0, i8* %1) {
br label %3
3: ; preds = %3, %2
%4 = phi i8* [ %1, %2 ], [ %7, %3 ]
%5 = load i8, i8* %4
%6 = icmp eq i8 %5, 10
%7 = getelementptr inbounds i8, i8* %4, i64 1
br i1 %6, label %8, label %3
8: ; preds = %3
store i8 0, i8* %4
%9 = tail call i32 (i8*, i8*, ...) bitcast (i32 (...)* @diag to i32 (i8*, i8*, ...)*)(i8* %0, i8* %1)
%10 = tail call i32 (i32, ...) bitcast (i32 (...)* @term to i32 (i32, ...)*)(i32 0)
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ _fail(char const *const, int const);
int /*<<< orphan*/ print_error(char *, char const *const);
void _assert_true(const unsigned long long result, const char *const expression,
                  const char *const file, const int line) {
  if (!result) {
    print_error("                "
                "%s\n",
                expression);
    _fail(file, line);
  }
}


x86 assembly (clang, -O0):
<_assert_true>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    115e <_assert_true+0x3e>
mov    -0x10(%rbp),%rsi
lea    0xeb3(%rip),%rdi
call   1030 <print_error@plt>
mov    -0x18(%rbp),%rdi
mov    -0x1c(%rbp),%esi
call   1040 <_fail@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_assert_true>:
test   %rdi,%rdi
je     1126 <_assert_true+0x6>
ret
push   %rbp
push   %rbx
push   %rax
mov    %ecx,%ebp
mov    %rdx,%rbx
lea    0xecb(%rip),%rdi
call   1030 <print_error@plt>
mov    %rbx,%rdi
mov    %ebp,%esi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1040 <_fail@plt>

LLVM IR (-O0):
@.str = [20 x i8] c" %s\0A\00"
define void @_assert_true(i64 %0, i8* %1, i8* %2, i32 %3) {
%5 = alloca i64
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i32
store i64 %0, i64* %5
store i8* %1, i8** %6
store i8* %2, i8** %7
store i32 %3, i32* %8
%9 = load i64, i64* %5
%10 = icmp ne i64 %9, 0
br i1 %10, label %17, label %11
11: ; preds = %4
%12 = load i8*, i8** %6
%13 = call i32 @print_error(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i8* %12)
%14 = load i8*, i8** %7
%15 = load i32, i32* %8
%16 = call i32 @_fail(i8* %14, i32 %15)
br label %17
17: ; preds = %11, %4
ret void
}

LLVM IR (-O2):
@.str = [20 x i8] c" %s\0A\00"
define void @_assert_true(i64 %0, i8* %1, i8* %2, i32 %3) {
%5 = icmp eq i64 %0, 0
br i1 %5, label %6, label %9
6: ; preds = %4
%7 = tail call i32 @print_error(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i8* %1)
%8 = tail call i32 @_fail(i8* %2, i32 %3)
br label %9
9: ; preds = %6, %4
ret void
}
int bar(int *x, int y) {
  if ((y == 0) ? (*x = 0) : *x)
    return 0;
}


x86 assembly (clang, -O0):
<bar>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
jne    112e <bar+0x2e>
mov    -0x10(%rbp),%rax
movl   $0x0,(%rax)
xor    %eax,%eax
test   $0x1,%al
jne    113b <bar+0x3b>
jmp    1142 <bar+0x42>
mov    -0x10(%rbp),%rax
cmpl   $0x0,(%rax)
je     1142 <bar+0x42>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<bar>:
test   %esi,%esi
je     1107 <bar+0x7>
xor    %eax,%eax
ret
movl   $0x0,(%rdi)
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @bar(i32* nocapture writeonly %0, i32 %1) {
%3 = icmp eq i32 %1, 0
br i1 %3, label %4, label %5
4: ; preds = %2
store i32 0, i32* %0
br label %5
5: ; preds = %2, %4
ret i32 0
}
/* Variables and functions */
scalar_t__ rand();
double RandomReal(double low, double high) {
  double d;
  d = (double)rand() / ((double)((int)((unsigned)~0 >> 1)) + 1);
  return (low + d * (high - low));
}


x86 assembly (clang, -O0):
<RandomReal>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
mov    $0x0,%al
call   1030 <rand@plt>
cvtsi2sd %rax,%xmm0
movsd  0xeca(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x8(%rbp),%xmm1
movsd  -0x18(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm2
subsd  -0x8(%rbp),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<RandomReal>:
sub    $0x18,%rsp
movsd  %xmm1,0x10(%rsp)
movsd  %xmm0,0x8(%rsp)
xor    %eax,%eax
call   1030 <rand@plt>
xorps  %xmm1,%xmm1
cvtsi2sd %rax,%xmm1
mulsd  0xec9(%rip),%xmm1
movsd  0x10(%rsp),%xmm0
movsd  0x8(%rsp),%xmm2
subsd  %xmm2,%xmm0
mulsd  %xmm1,%xmm0
addsd  %xmm2,%xmm0
add    $0x18,%rsp
ret

LLVM IR (-O0):
define double @RandomReal(double %0, double %1) {
%3 = alloca double
%4 = alloca double
%5 = alloca double
store double %0, double* %3
store double %1, double* %4
%6 = call i64 (...) @rand()
%7 = sitofp i64 %6 to double
%8 = fdiv double %7, 0x41E0000000000000
store double %8, double* %5
%9 = load double, double* %3
%10 = load double, double* %5
%11 = load double, double* %4
%12 = load double, double* %3
%13 = fsub double %11, %12
%14 = call double @llvm.fmuladd.f64(double %10, double %13, double %9)
ret double %14
}

LLVM IR (-O2):
define double @RandomReal(double %0, double %1) {
%3 = tail call i64 (...) @rand()
%4 = sitofp i64 %3 to double
%5 = fmul double %4, 0x3E00000000000000
%6 = fsub double %1, %0
%7 = tail call double @llvm.fmuladd.f64(double %5, double %6, double %0)
ret double %7
}
void regulator_set_drvdata(struct regulator *regulator, void *data) {}


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

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

LLVM IR (-O0):
%struct.regulator = type opaque
define void @regulator_set_drvdata(%struct.regulator* %0, i8* %1) {
%3 = alloca %struct.regulator*
%4 = alloca i8*
store %struct.regulator* %0, %struct.regulator** %3
store i8* %1, i8** %4
ret void
}

LLVM IR (-O2):
%struct.regulator = type opaque
define void @regulator_set_drvdata(%struct.regulator* nocapture %0, i8* nocapture %1) {
ret void
}
/* Forward declarations */
typedef struct TYPE_4__ TYPE_2__;
typedef struct TYPE_3__ TYPE_1__;

/* Type definitions */
struct TYPE_3__ {
  scalar_t__ time;
};
struct TYPE_4__ {
  TYPE_1__ xselectionrequest;
};
typedef TYPE_2__ XEvent;

/* Variables and functions */
unsigned long get_XEvent_xselectionrequest_time(void *_p) {
  return (unsigned long)((XEvent *)_p)->xselectionrequest.time;
}


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

x86 assembly (clang, -O2):
<get_XEvent_xselectionrequest_time>:
mov    (%rdi),%rax
ret

LLVM IR (-O0):
%struct.TYPE_4__ = type { %struct.TYPE_3__ }
%struct.TYPE_3__ = type { i64 }
define i64 @get_XEvent_xselectionrequest_time(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = bitcast i8* %3 to %struct.TYPE_4__*
%5 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %4, i32 0, i32 0
%6 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %5, i32 0, i32 0
%7 = load i64, i64* %6
ret i64 %7
}

LLVM IR (-O2):
define i64 @get_XEvent_xselectionrequest_time(i8* nocapture %0) {
%2 = bitcast i8* %0 to i64*
%3 = load i64, i64* %2
ret i64 %3
}
void ScaleARGBFilterCols_NEON() {}


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

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

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

LLVM IR (-O2):
define void @ScaleARGBFilterCols_NEON() {
ret void
}
void MPURegionSet(unsigned long ulRegion, unsigned long ulAddr,
                  unsigned long ulFlags) {
  ;

  ;
  (*((volatile unsigned long *)(0xE000ED9C))) = ulAddr | ulRegion | 0x00000010;
  (*((volatile unsigned long *)(0xE000EDA0))) =
      (ulFlags & ~(0x00380000 | 0x00020000)) | 0x00040000 | 0x00010000;
}


x86 assembly (clang, -O0):
<MPURegionSet>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x10(%rbp),%rcx
or     -0x8(%rbp),%rcx
or     $0x10,%rcx
mov    $0xe000ed9c,%eax
mov    %rcx,(%rax)
mov    -0x18(%rbp),%rcx
and    $0xffffffffffc5ffff,%rcx
or     $0x40000,%rcx
or     $0x10000,%rcx
mov    $0xe000eda0,%eax
mov    %rcx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<MPURegionSet>:
or     %rsi,%rdi
or     $0x10,%rdi
mov    $0xe000ed9c,%eax
mov    %rdi,(%rax)
and    $0xffffffffffc0ffff,%rdx
or     $0x50000,%rdx
mov    %rdx,0x4(%rax)
ret

LLVM IR (-O0):
define void @MPURegionSet(i64 %0, i64 %1, i64 %2) {
%4 = alloca i64
%5 = alloca i64
%6 = alloca i64
store i64 %0, i64* %4
store i64 %1, i64* %5
store i64 %2, i64* %6
%7 = load i64, i64* %5
%8 = load i64, i64* %4
%9 = or i64 %7, %8
%10 = or i64 %9, 16
store volatile i64 %10, i64* inttoptr (i64 3758157212 to i64*)
%11 = load i64, i64* %6
%12 = and i64 %11, -3801089
%13 = or i64 %12, 262144
%14 = or i64 %13, 65536
store volatile i64 %14, i64* inttoptr (i64 3758157216 to i64*)
ret void
}

LLVM IR (-O2):
define void @MPURegionSet(i64 %0, i64 %1, i64 %2) {
%4 = or i64 %0, %1
%5 = or i64 %4, 16
store volatile i64 %5, i64* inttoptr (i64 3758157212 to i64*)
%6 = and i64 %2, -4128769
%7 = or i64 %6, 327680
store volatile i64 %7, i64* inttoptr (i64 3758157216 to i64*)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
int test_llist_init() {
  assert(1);
  return 0;
}


x86 assembly (clang, -O0):
<test_llist_init>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1,%edi
call   1030 <assert@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_llist_init>:
push   %rax
mov    $0x1,%edi
call   1030 <assert@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @test_llist_init() {
%1 = call i32 @assert(i32 1)
ret i32 0
}

LLVM IR (-O2):
define i32 @test_llist_init() {
%1 = tail call i32 @assert(i32 1)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ sprintf(char *, char *, char const *const,
                           void const *const);
int /*<<< orphan*/ system(char *);
void addr2line(char const *const program_name, void const *const addr) {
  char addr2line_cmd[512] = {0};
  sprintf(addr2line_cmd, "addr2line -f -p -e %.256s %p", program_name, addr);
  return (void)system(addr2line_cmd);
}


x86 assembly (clang, -O0):
<addr2line>:
push   %rbp
mov    %rsp,%rbp
sub    $0x210,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    -0x210(%rbp),%rdi
xor    %esi,%esi
mov    $0x200,%edx
call   1040 <memset@plt>
lea    -0x210(%rbp),%rdi
mov    -0x8(%rbp),%rdx
mov    -0x10(%rbp),%rcx
lea    0xe94(%rip),%rsi
call   1050 <sprintf@plt>
lea    -0x210(%rbp),%rdi
call   1030 <system@plt>
add    $0x210,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<addr2line>:
push   %r15
push   %r14
push   %rbx
sub    $0x200,%rsp
mov    %rsi,%r14
mov    %rdi,%rbx
mov    %rsp,%r15
mov    $0x200,%edx
mov    %r15,%rdi
xor    %esi,%esi
call   1040 <memset@plt>
lea    0xea5(%rip),%rsi
mov    %r15,%rdi
mov    %rbx,%rdx
mov    %r14,%rcx
call   1050 <sprintf@plt>
mov    %r15,%rdi
call   1030 <system@plt>
add    $0x200,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [29 x i8] c"addr2line -f -p -e %.256s %p\00"
define void @addr2line(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca [512 x i8]
store i8* %0, i8** %3
store i8* %1, i8** %4
%6 = bitcast [512 x i8]* %5 to i8*
%7 = getelementptr inbounds [512 x i8], [512 x i8]* %5, i64 0, i64 0
%8 = load i8*, i8** %3
%9 = load i8*, i8** %4
%10 = call i32 @sprintf(i8* %7, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0), i8* %8, i8* %9)
%11 = getelementptr inbounds [512 x i8], [512 x i8]* %5, i64 0, i64 0
%12 = call i32 @system(i8* %11)
ret void
}

LLVM IR (-O2):
@.str = [29 x i8] c"addr2line -f -p -e %.256s %p\00"
define void @addr2line(i8* %0, i8* %1) {
%3 = alloca [512 x i8]
%4 = getelementptr inbounds [512 x i8], [512 x i8]* %3, i64 0, i64 0
%5 = call i32 @sprintf(i8* %4, i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0), i8* %0, i8* %1)
%6 = call i32 @system(i8* %4)
ret void
}
/* Variables and functions */
char *__body_init_status(char **, int *, int);
void body_init_status_enclosure(char *buffer[2], char **header,
                                int *num_lines) {
  buffer[0] = __body_init_status(header, num_lines, 12);
  buffer[1] = __body_init_status(header, num_lines, 13);
}


x86 assembly (clang, -O0):
<body_init_status_enclosure>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    $0xc,%edx
call   1030 <__body_init_status@plt>
mov    %rax,%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,(%rax)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    $0xd,%edx
call   1030 <__body_init_status@plt>
mov    %rax,%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,0x8(%rax)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<body_init_status_enclosure>:
push   %r15
push   %r14
push   %rbx
mov    %rdx,%r14
mov    %rsi,%rbx
mov    %rdi,%r15
mov    %rsi,%rdi
mov    %rdx,%rsi
mov    $0xc,%edx
call   1030 <__body_init_status@plt>
mov    %rax,(%r15)
mov    %rbx,%rdi
mov    %r14,%rsi
mov    $0xd,%edx
call   1030 <__body_init_status@plt>
mov    %rax,0x8(%r15)
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
define void @body_init_status_enclosure(i8** nocapture writeonly %0, i8** %1, i32* %2) {
%4 = tail call i8* @__body_init_status(i8** %1, i32* %2, i32 12)
store i8* %4, i8** %0
%5 = tail call i8* @__body_init_status(i8** %1, i32* %2, i32 13)
%6 = getelementptr inbounds i8*, i8** %0, i64 1
store i8* %5, i8** %6
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
struct sockaddr_storage {
  int dummy;
};
typedef int /*<<< orphan*/ ssize_t;

/* Variables and functions */
int /*<<< orphan*/ net_base_send(int, int /*<<< orphan*/ const *, size_t,
                                 struct sockaddr_storage const *,
                                 int /*<<< orphan*/);
ssize_t net_dgram_send(int sock, const uint8_t *buffer, size_t size,
                       const struct sockaddr_storage *addr) {
  return net_base_send(sock, buffer, size, addr, 0);
}


x86 assembly (clang, -O0):
<net_dgram_send>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
xor    %r8d,%r8d
call   1030 <net_base_send@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<net_dgram_send>:
xor    %r8d,%r8d
jmp    1030 <net_base_send@plt>

LLVM IR (-O0):
%struct.sockaddr_storage = type { i32 }
define i32 @net_dgram_send(i32 %0, i32* %1, i64 %2, %struct.sockaddr_storage* %3) {
%5 = alloca i32
%6 = alloca i32*
%7 = alloca i64
%8 = alloca %struct.sockaddr_storage*
store i32 %0, i32* %5
store i32* %1, i32** %6
store i64 %2, i64* %7
store %struct.sockaddr_storage* %3, %struct.sockaddr_storage** %8
%9 = load i32, i32* %5
%10 = load i32*, i32** %6
%11 = load i64, i64* %7
%12 = load %struct.sockaddr_storage*, %struct.sockaddr_storage** %8
%13 = call i32 @net_base_send(i32 %9, i32* %10, i64 %11, %struct.sockaddr_storage* %12, i32 0)
ret i32 %13
}

LLVM IR (-O2):
%struct.sockaddr_storage = type { i32 }
define i32 @net_dgram_send(i32 %0, i32* %1, i64 %2, %struct.sockaddr_storage* %3) {
%5 = tail call i32 @net_base_send(i32 %0, i32* %1, i64 %2, %struct.sockaddr_storage* %3, i32 0)
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ clear_io_bit(int, int);
void TOSH_MAKE_RADIO_FIFO_INPUT() { clear_io_bit(-3, 6); }


x86 assembly (clang, -O0):
<TOSH_MAKE_RADIO_FIFO_INPUT>:
push   %rbp
mov    %rsp,%rbp
mov    $0xfffffffd,%edi
mov    $0x6,%esi
call   1030 <clear_io_bit@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<TOSH_MAKE_RADIO_FIFO_INPUT>:
mov    $0xfffffffd,%edi
mov    $0x6,%esi
jmp    1030 <clear_io_bit@plt>

LLVM IR (-O0):
define void @TOSH_MAKE_RADIO_FIFO_INPUT() {
%1 = call i32 @clear_io_bit(i32 -3, i32 6)
ret void
}

LLVM IR (-O2):
define void @TOSH_MAKE_RADIO_FIFO_INPUT() {
%1 = tail call i32 @clear_io_bit(i32 -3, i32 6)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ bson_fatal_msg(int, char *);
void *malloc(int);
void *bson_malloc(int size) {
  void *p = malloc(size);
  bson_fatal_msg(!!p, "malloc() failed");
  return p;
}


x86 assembly (clang, -O0):
<bson_malloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <malloc@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
setne  %al
xor    $0xff,%al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%edi
lea    0xeb1(%rip),%rsi
call   1040 <bson_fatal_msg@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bson_malloc>:
push   %rbx
call   1030 <malloc@plt>
mov    %rax,%rbx
xor    %edi,%edi
test   %rax,%rax
setne  %dil
lea    0xec7(%rip),%rsi
call   1040 <bson_fatal_msg@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [16 x i8] c"malloc() failed\00"
define i8* @bson_malloc(i32 %0) {
%2 = alloca i32
%3 = alloca i8*
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = call i8* @malloc(i32 %4)
store i8* %5, i8** %3
%6 = load i8*, i8** %3
%7 = icmp ne i8* %6, null
%8 = xor i1 %7, true
%9 = xor i1 %8, true
%10 = zext i1 %9 to i32
%11 = call i32 @bson_fatal_msg(i32 %10, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
%12 = load i8*, i8** %3
ret i8* %12
}

LLVM IR (-O2):
@.str = [16 x i8] c"malloc() failed\00"
define noalias i8* @bson_malloc(i32 %0) {
%2 = tail call i8* @malloc(i32 %0)
%3 = icmp ne i8* %2, null
%4 = zext i1 %3 to i32
%5 = tail call i32 @bson_fatal_msg(i32 %4, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
ret i8* %2
}
/* Variables and functions */
int f1(int, int);
float f2(double);
int f3(int);
int /*<<< orphan*/ f4(int *);
int main() {
  int v = f3(4);
  f4(&v);
  float tmp = f2(1.0);
  return f1(3, v) + ((int)tmp);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x4,%edi
call   1040 <f3@plt>
mov    %eax,-0x8(%rbp)
lea    -0x8(%rbp),%rdi
call   1060 <f4@plt>
movsd  0xe93(%rip),%xmm0
call   1030 <f2@plt>
movss  %xmm0,-0xc(%rbp)
mov    -0x8(%rbp),%esi
mov    $0x3,%edi
call   1050 <f1@plt>
cvttss2si -0xc(%rbp),%ecx
add    %ecx,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x4,%edi
call   1040 <f3@plt>
mov    %eax,(%rsp)
mov    %rsp,%rdi
call   1060 <f4@plt>
movsd  0xea2(%rip),%xmm0
call   1030 <f2@plt>
movss  %xmm0,0x4(%rsp)
mov    (%rsp),%esi
mov    $0x3,%edi
call   1050 <f1@plt>
cvttss2si 0x4(%rsp),%ecx
add    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca float
store i32 0, i32* %1
%4 = call i32 @f3(i32 4)
store i32 %4, i32* %2
%5 = call i32 @f4(i32* %2)
%6 = call float @f2(double 1.000000e+00)
store float %6, float* %3
%7 = load i32, i32* %2
%8 = call i32 @f1(i32 3, i32 %7)
%9 = load float, float* %3
%10 = fptosi float %9 to i32
%11 = add nsw i32 %8, %10
ret i32 %11
}

LLVM IR (-O2):
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = tail call i32 @f3(i32 4)
store i32 %3, i32* %1
%4 = call i32 @f4(i32* %1)
%5 = call float @f2(double 1.000000e+00)
%6 = load i32, i32* %1
%7 = call i32 @f1(i32 3, i32 %6)
%8 = fptosi float %5 to i32
%9 = add nsw i32 %7, %8
ret i32 %9
}
int main() {
  int a[12];
  int i;
  int j;
  a[i + 1] = a[j * 2] + 3;
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
mov    -0x48(%rbp),%eax
shl    $0x1,%eax
cltq
mov    -0x40(%rbp,%rax,4),%ecx
add    $0x3,%ecx
mov    -0x44(%rbp),%eax
add    $0x1,%eax
cltq
mov    %ecx,-0x40(%rbp,%rax,4)
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca [12 x i32]
%3 = alloca i32
%4 = alloca i32
store i32 0, i32* %1
%5 = load i32, i32* %4
%6 = mul nsw i32 %5, 2
%7 = sext i32 %6 to i64
%8 = getelementptr inbounds [12 x i32], [12 x i32]* %2, i64 0, i64 %7
%9 = load i32, i32* %8
%10 = add nsw i32 %9, 3
%11 = load i32, i32* %3
%12 = add nsw i32 %11, 1
%13 = sext i32 %12 to i64
%14 = getelementptr inbounds [12 x i32], [12 x i32]* %2, i64 0, i64 %13
store i32 %10, i32* %14
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ acc_struct();
int /*<<< orphan*/ addr_lb();
int /*<<< orphan*/ ass_res();
int /*<<< orphan*/ c_to_l();
int /*<<< orphan*/ char_param();
int /*<<< orphan*/ cmp_rev();
int /*<<< orphan*/ compl_ind();
int /*<<< orphan*/ con_fold();
int /*<<< orphan*/ loc_dif();
int /*<<< orphan*/ printf(char *);
main() {
  cmp_rev();
  loc_dif();
  con_fold();
  ass_res();
  c_to_l();
  acc_struct();
  char_param();
  addr_lb();
  compl_ind();
  printf("END\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   10a0 <cmp_rev@plt>
mov    $0x0,%al
call   1030 <loc_dif@plt>
mov    $0x0,%al
call   1070 <con_fold@plt>
mov    $0x0,%al
call   1090 <ass_res@plt>
mov    $0x0,%al
call   1040 <c_to_l@plt>
mov    $0x0,%al
call   10c0 <acc_struct@plt>
mov    $0x0,%al
call   1060 <char_param@plt>
mov    $0x0,%al
call   10b0 <addr_lb@plt>
mov    $0x0,%al
call   1050 <compl_ind@plt>
lea    0xe0b(%rip),%rdi
call   1080 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   10a0 <cmp_rev@plt>
xor    %eax,%eax
call   1030 <loc_dif@plt>
xor    %eax,%eax
call   1080 <con_fold@plt>
xor    %eax,%eax
call   1090 <ass_res@plt>
xor    %eax,%eax
call   1040 <c_to_l@plt>
xor    %eax,%eax
call   10c0 <acc_struct@plt>
xor    %eax,%eax
call   1070 <char_param@plt>
xor    %eax,%eax
call   10b0 <addr_lb@plt>
xor    %eax,%eax
call   1050 <compl_ind@plt>
lea    0xe19(%rip),%rdi
call   1060 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [5 x i8] c"END\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @cmp_rev()
%3 = call i32 (...) @loc_dif()
%4 = call i32 (...) @con_fold()
%5 = call i32 (...) @ass_res()
%6 = call i32 (...) @c_to_l()
%7 = call i32 (...) @acc_struct()
%8 = call i32 (...) @char_param()
%9 = call i32 (...) @addr_lb()
%10 = call i32 (...) @compl_ind()
%11 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [4 x i8] c"END\00"
define i32 @main() {
%1 = tail call i32 (...) @cmp_rev()
%2 = tail call i32 (...) @loc_dif()
%3 = tail call i32 (...) @con_fold()
%4 = tail call i32 (...) @ass_res()
%5 = tail call i32 (...) @c_to_l()
%6 = tail call i32 (...) @acc_struct()
%7 = tail call i32 (...) @char_param()
%8 = tail call i32 (...) @addr_lb()
%9 = tail call i32 (...) @compl_ind()
%10 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ rul___emit_decr_indent();
int /*<<< orphan*/ rul___emit_newline();
int /*<<< orphan*/ rul___emit_string(char *);
int /*<<< orphan*/ rul___emit_verify_newline();
void rul__emit_end_conditional(void) {
  rul___emit_verify_newline();
  rul___emit_decr_indent();
  rul___emit_string("}");
  rul___emit_newline();
}


x86 assembly (clang, -O0):
<rul__emit_end_conditional>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <rul___emit_verify_newline@plt>
mov    $0x0,%al
call   1050 <rul___emit_decr_indent@plt>
lea    0xea7(%rip),%rdi
call   1030 <rul___emit_string@plt>
mov    $0x0,%al
call   1060 <rul___emit_newline@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<rul__emit_end_conditional>:
push   %rax
xor    %eax,%eax
call   1040 <rul___emit_verify_newline@plt>
xor    %eax,%eax
call   1050 <rul___emit_decr_indent@plt>
lea    0xeaa(%rip),%rdi
call   1030 <rul___emit_string@plt>
xor    %eax,%eax
pop    %rcx
jmp    1060 <rul___emit_newline@plt>

LLVM IR (-O0):
@.str = [2 x i8] c"}\00"
define void @rul__emit_end_conditional() {
%1 = call i32 (...) @rul___emit_verify_newline()
%2 = call i32 (...) @rul___emit_decr_indent()
%3 = call i32 @rul___emit_string(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%4 = call i32 (...) @rul___emit_newline()
ret void
}

LLVM IR (-O2):
@.str = [2 x i8] c"}\00"
define void @rul__emit_end_conditional() {
%1 = tail call i32 (...) @rul___emit_verify_newline()
%2 = tail call i32 (...) @rul___emit_decr_indent()
%3 = tail call i32 @rul___emit_string(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%4 = tail call i32 (...) @rul___emit_newline()
ret void
}
/* Variables and functions */
int ENOTTY;
int ttyname_r(int fd, char *buf, size_t buflen) { return ENOTTY; }


x86 assembly (clang, -O0):
<ttyname_r>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    0x2ed2(%rip),%rax
mov    (%rax),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ttyname_r>:
mov    0x2ee1(%rip),%rax
mov    (%rax),%eax
ret

LLVM IR (-O0):
@ENOTTY = global i32 0
define i32 @ttyname_r(i32 %0, i8* %1, i64 %2) {
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i64
store i32 %0, i32* %4
store i8* %1, i8** %5
store i64 %2, i64* %6
%7 = load i32, i32* @ENOTTY
ret i32 %7
}

LLVM IR (-O2):
@ENOTTY = global i32 0
define i32 @ttyname_r(i32 %0, i8* nocapture readnone %1, i64 %2) {
%4 = load i32, i32* @ENOTTY
ret i32 %4
}
void foo109() {}


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

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

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

LLVM IR (-O2):
define void @foo109() {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ a;

/* Variables and functions */
int /*<<< orphan*/ dump(int *, int);
int /*<<< orphan*/ select_sort(int *, int);
int main() {
  int a[10] = {9, 11, 4, 15, 16, 3, 20, 44, 5, 10};
  select_sort(a, sizeof(a) / sizeof(int));
  dump(a, sizeof(a) / sizeof(int));
  return 0;
}


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

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

LLVM IR (-O0):
@__const.main.a = [10 x i32] [i32 9, i32 11, i32 4, i32 15, i32 16, i32 3, i32 20, i32 44, i32 5, i32 10]
define i32 @main() {
%1 = alloca i32
%2 = alloca [10 x i32]
store i32 0, i32* %1
%3 = bitcast [10 x i32]* %2 to i8*
%4 = getelementptr inbounds [10 x i32], [10 x i32]* %2, i64 0, i64 0
%5 = call i32 @select_sort(i32* %4, i32 10)
%6 = getelementptr inbounds [10 x i32], [10 x i32]* %2, i64 0, i64 0
%7 = call i32 @dump(i32* %6, i32 10)
ret i32 0
}

LLVM IR (-O2):
@__const.main.a = [10 x i32] [i32 9, i32 11, i32 4, i32 15, i32 16, i32 3, i32 20, i32 44, i32 5, i32 10]
define i32 @main() {
%1 = alloca [10 x i32]
%2 = bitcast [10 x i32]* %1 to i8*
%3 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 0
%4 = call i32 @select_sort(i32* %3, i32 10)
%5 = call i32 @dump(i32* %3, i32 10)
ret i32 0
}
/* Variables and functions */
double sdtools_logN(double, double);
double sdtools_log(double x) { return sdtools_logN(x, 2.7182818284590452354); }


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

x86 assembly (clang, -O2):
<sdtools_log>:
movsd  0xee8(%rip),%xmm1
jmp    1030 <sdtools_logN@plt>

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

LLVM IR (-O2):
define double @sdtools_log(double %0) {
%2 = tail call double @sdtools_logN(double %0, double 0x4005BF0A8B145769)
ret double %2
}
/* Variables and functions */
int /*<<< orphan*/ func1();
int /*<<< orphan*/ func2();
int /*<<< orphan*/ printf(char *);
int main(void) {
  printf("\n Hello World! \n");
  func1();
  func2();
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xec8(%rip),%rdi
call   1040 <puts@plt>
xor    %eax,%eax
call   1030 <func1@plt>
xor    %eax,%eax
call   1050 <func2@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@str = [16 x i8] c"\0A Hello World! \00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 (...) @func1()
%3 = tail call i32 (...) @func2()
ret i32 0
}
/* Variables and functions */
void *compat_malloc(size_t);
int /*<<< orphan*/ memory_add_entry(void *, size_t, char const *, int);
void *memory_malloc(size_t size, const char *srcname, int line) {
  void *ptr;
  ptr = compat_malloc(size);
  memory_add_entry(ptr, size, srcname, line);
  return ptr;
}


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

x86 assembly (clang, -O2):
<memory_malloc>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %edx,%r14d
mov    %rsi,%r15
mov    %rdi,%rbp
call   1040 <compat_malloc@plt>
mov    %rax,%rbx
mov    %rax,%rdi
mov    %rbp,%rsi
mov    %r15,%rdx
mov    %r14d,%ecx
call   1030 <memory_add_entry@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define i8* @memory_malloc(i64 %0, i8* %1, i32 %2) {
%4 = alloca i64
%5 = alloca i8*
%6 = alloca i32
%7 = alloca i8*
store i64 %0, i64* %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%8 = load i64, i64* %4
%9 = call i8* @compat_malloc(i64 %8)
store i8* %9, i8** %7
%10 = load i8*, i8** %7
%11 = load i64, i64* %4
%12 = load i8*, i8** %5
%13 = load i32, i32* %6
%14 = call i32 @memory_add_entry(i8* %10, i64 %11, i8* %12, i32 %13)
%15 = load i8*, i8** %7
ret i8* %15
}

LLVM IR (-O2):
define i8* @memory_malloc(i64 %0, i8* %1, i32 %2) {
%4 = tail call i8* @compat_malloc(i64 %0)
%5 = tail call i32 @memory_add_entry(i8* %4, i64 %0, i8* %1, i32 %2)
ret i8* %4
}
/* Variables and functions */
int /*<<< orphan*/ Label_Printf(char *);
void Dico_String_Start(int nb_consts) { Label_Printf(".section\t.rodata"); }


x86 assembly (clang, -O0):
<Dico_String_Start>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
lea    0xede(%rip),%rdi
call   1030 <Label_Printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [17 x i8] c".section\09.rodata\00"
define void @Dico_String_Start(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @Label_Printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [17 x i8] c".section\09.rodata\00"
define void @Dico_String_Start(i32 %0) {
%2 = tail call i32 @Label_Printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ __emit_string_literal_range(char *, int /*<<< orphan*/,
                                               int /*<<< orphan*/, int);
void test_stringified_token_1(int x) {
  __emit_string_literal_range("x > 0", 0, 0, 4);
}


x86 assembly (clang, -O0):
<test_stringified_token_1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
lea    0xede(%rip),%rdi
xor    %edx,%edx
mov    $0x4,%ecx
mov    %edx,%esi
call   1030 <__emit_string_literal_range@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_stringified_token_1>:
lea    0xee9(%rip),%rdi
xor    %esi,%esi
xor    %edx,%edx
mov    $0x4,%ecx
jmp    1030 <__emit_string_literal_range@plt>

LLVM IR (-O0):
@.str = [6 x i8] c"x > 0\00"
define void @test_stringified_token_1(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @__emit_string_literal_range(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 0, i32 0, i32 4)
ret void
}

LLVM IR (-O2):
@.str = [6 x i8] c"x > 0\00"
define void @test_stringified_token_1(i32 %0) {
%2 = tail call i32 @__emit_string_literal_range(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 0, i32 0, i32 4)
ret void
}
int sum(int x, int y) { return x + y; }


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

x86 assembly (clang, -O2):
<sum>:
lea    (%rdi,%rsi,1),%eax
ret

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

LLVM IR (-O2):
define i32 @sum(i32 %0, i32 %1) {
%3 = add nsw i32 %1, %0
ret i32 %3
}