xunge/DecIR huggingface dataset:
/* Type definitions */
struct dirent {
  int dummy;
};

/* Variables and functions */
int scandir_main(char const *, struct dirent ***, int (*)(void const *),
                 int (*)(struct dirent const **, struct dirent const **), int);
int scandir_full_path(const char *path, struct dirent ***e,
                      int (*filter)(const char *),
                      int (*compare)(const struct dirent **,
                                     const struct dirent **)) {
  return scandir_main(path, e, (int (*)(const void *))filter, compare, 1);
}


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

x86 assembly (clang, -O2):
<scandir_full_path>:
mov    $0x1,%r8d
jmp    1030 <scandir_main@plt>

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

LLVM IR (-O2):
%struct.dirent = type { i32 }
define i32 @scandir_full_path(i8* %0, %struct.dirent*** %1, i32 (i8*)* %2, i32 (%struct.dirent**, %struct.dirent**)* %3) {
%5 = tail call i32 @scandir_main(i8* %0, %struct.dirent*** %1, i32 (i8*)* %2, i32 (%struct.dirent**, %struct.dirent**)* %3, i32 1)
ret i32 %5
}
void ieee80211_debugfs_key_remove(struct ieee80211_key *key) {}


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

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

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

LLVM IR (-O2):
%struct.ieee80211_key = type opaque
define void @ieee80211_debugfs_key_remove(%struct.ieee80211_key* nocapture %0) {
ret void
}
void LPCIntDisable(unsigned long ulBase, unsigned long ulIntFlags) {
  ;
  (*((volatile unsigned long *)(ulBase + 0x00000100))) &= ~ulIntFlags;
}


x86 assembly (clang, -O0):
<LPCIntDisable>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rdx
xor    $0xffffffffffffffff,%rdx
mov    -0x8(%rbp),%rax
mov    0x100(%rax),%rcx
and    %rdx,%rcx
mov    %rcx,0x100(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<LPCIntDisable>:
not    %rsi
and    %rsi,0x100(%rdi)
ret

LLVM IR (-O0):
define void @LPCIntDisable(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%5 = load i64, i64* %4
%6 = xor i64 %5, -1
%7 = load i64, i64* %3
%8 = add i64 %7, 256
%9 = inttoptr i64 %8 to i64*
%10 = load volatile i64, i64* %9
%11 = and i64 %10, %6
store volatile i64 %11, i64* %9
ret void
}

LLVM IR (-O2):
define void @LPCIntDisable(i64 %0, i64 %1) {
%3 = xor i64 %1, -1
%4 = add i64 %0, 256
%5 = inttoptr i64 %4 to i64*
%6 = load volatile i64, i64* %5
%7 = and i64 %6, %3
store volatile i64 %7, i64* %5
ret void
}
void SysCtrlClockLossResetEnable(void) {
  (*((volatile unsigned long
          *)(((unsigned long)(0x40090000 + 0x00000028) & 0xF0000000) |
             0x02000000 |
             (((unsigned long)(0x40090000 + 0x00000028) & 0x000FFFFF) << 5) |
             ((5) << 2)))) = 1;
}


x86 assembly (clang, -O0):
<SysCtrlClockLossResetEnable>:
push   %rbp
mov    %rsp,%rbp
mov    $0x43200514,%eax
movq   $0x1,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<SysCtrlClockLossResetEnable>:
movq   $0x1,0x43200514
ret

LLVM IR (-O0):
define void @SysCtrlClockLossResetEnable() {
store volatile i64 1, i64* inttoptr (i64 1126171924 to i64*)
ret void
}

LLVM IR (-O2):
define void @SysCtrlClockLossResetEnable() {
store volatile i64 1, i64* inttoptr (i64 1126171924 to i64*)
ret void
}
/* Variables and functions */
int errno;
int *__errno_location() { return &errno; }


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

x86 assembly (clang, -O2):
<__errno_location>:
mov    0x2ed9(%rip),%rax
ret

LLVM IR (-O0):
@errno = global i32 0
define i32* @__errno_location() {
ret i32* @errno
}

LLVM IR (-O2):
@errno = global i32 0
define i32* @__errno_location() {
ret i32* @errno
}
int sprintf(char *str, const char *format, ...) {
  printf("%s: not implemented\n", __func__);
  return 0;
}


x86 assembly (clang, -O0):
<sprintf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xed9(%rip),%rdi
lea    0xee7(%rip),%rsi
xor    %eax,%eax
mov    %eax,-0x14(%rbp)
call   1030 <printf@plt>
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [21 x i8] c"%s: not implemented\0A\00"
@__func__.sprintf = [8 x i8] c"sprintf\00"
define i32 @sprintf(i8* %0, i8* %1, ...) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @__func__.sprintf, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [21 x i8] c"%s: not implemented\0A\00"
@__func__.sprintf = [8 x i8] c"sprintf\00"
define i32 @sprintf(i8* nocapture readnone %0, i8* nocapture readnone %1, ...) {
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @__func__.sprintf, i64 0, i64 0))
ret i32 0
}
/* Type definitions */
struct szl_obj {
  int dummy;
};
struct szl_interp {
  int dummy;
};

/* Variables and functions */
scalar_t__ szl_str_to_list(struct szl_interp *, struct szl_obj *);
scalar_t__ szl_wstr_to_str(struct szl_interp *, struct szl_obj *);
int szl_wstr_to_list(struct szl_interp *interp, struct szl_obj *obj) {
  return szl_wstr_to_str(interp, obj) && szl_str_to_list(interp, obj);
}


x86 assembly (clang, -O0):
<szl_wstr_to_list>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1040 <szl_wstr_to_str@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    $0x0,%rcx
mov    %al,-0x11(%rbp)
je     1166 <szl_wstr_to_list+0x46>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <szl_str_to_list@plt>
cmp    $0x0,%rax
setne  %al
mov    %al,-0x11(%rbp)
mov    -0x11(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<szl_wstr_to_list>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
call   1040 <szl_wstr_to_str@plt>
test   %rax,%rax
je     114c <szl_wstr_to_list+0x2c>
mov    %rbx,%rdi
mov    %r14,%rsi
call   1030 <szl_str_to_list@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
setne  %al
jmp    114e <szl_wstr_to_list+0x2e>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
%struct.szl_interp = type { i32 }
%struct.szl_obj = type { i32 }
define i32 @szl_wstr_to_list(%struct.szl_interp* %0, %struct.szl_obj* %1) {
%3 = alloca %struct.szl_interp*
%4 = alloca %struct.szl_obj*
store %struct.szl_interp* %0, %struct.szl_interp** %3
store %struct.szl_obj* %1, %struct.szl_obj** %4
%5 = load %struct.szl_interp*, %struct.szl_interp** %3
%6 = load %struct.szl_obj*, %struct.szl_obj** %4
%7 = call i64 @szl_wstr_to_str(%struct.szl_interp* %5, %struct.szl_obj* %6)
%8 = icmp ne i64 %7, 0
br i1 %8, label %9, label %14
9: ; preds = %2
%10 = load %struct.szl_interp*, %struct.szl_interp** %3
%11 = load %struct.szl_obj*, %struct.szl_obj** %4
%12 = call i64 @szl_str_to_list(%struct.szl_interp* %10, %struct.szl_obj* %11)
%13 = icmp ne i64 %12, 0
br label %14
14: ; preds = %9, %2
%15 = phi i1 [ false, %2 ], [ %13, %9 ]
%16 = zext i1 %15 to i32
ret i32 %16
}

LLVM IR (-O2):
%struct.szl_interp = type { i32 }
%struct.szl_obj = type { i32 }
define i32 @szl_wstr_to_list(%struct.szl_interp* %0, %struct.szl_obj* %1) {
%3 = tail call i64 @szl_wstr_to_str(%struct.szl_interp* %0, %struct.szl_obj* %1)
%4 = icmp eq i64 %3, 0
br i1 %4, label %9, label %5
5: ; preds = %2
%6 = tail call i64 @szl_str_to_list(%struct.szl_interp* %0, %struct.szl_obj* %1)
%7 = icmp ne i64 %6, 0
%8 = zext i1 %7 to i32
br label %9
9: ; preds = %5, %2
%10 = phi i32 [ 0, %2 ], [ %8, %5 ]
ret i32 %10
}
int fastMod10(int num) {
  int out = num & 15;
  if (out >= 10) {
    out = out - 10;
  }
  return out;
}


x86 assembly (clang, -O0):
<fastMod10>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
and    $0xf,%eax
mov    %eax,-0x8(%rbp)
cmpl   $0xa,-0x8(%rbp)
jl     1123 <fastMod10+0x23>
mov    -0x8(%rbp),%eax
sub    $0xa,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<fastMod10>:
and    $0xf,%edi
lea    -0xa(%rdi),%eax
cmp    $0xa,%edi
cmovb  %edi,%eax
ret

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

LLVM IR (-O2):
define i32 @fastMod10(i32 %0) {
%2 = and i32 %0, 15
%3 = icmp ugt i32 %2, 9
%4 = add nsw i32 %2, -10
%5 = select i1 %3, i32 %4, i32 %2
ret i32 %5
}
void genblez_out() {}


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

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

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

LLVM IR (-O2):
define void @genblez_out() {
ret void
}
void CfgDepBase_RMV_SET_OBJ(ss, vv) int ss, vv;
{
  int r, b;
  CfgDepBase_SRC_HIH_EQL_SET_OBJ(&b, &r, ss, vv);
  if (b == 1) {
    CfgDepBase_DEL_SET_OBJ(ss, r);
  }
}


x86 assembly (clang, -O0):
<CfgDepBase_RMV_SET_OBJ>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edx
mov    -0x8(%rbp),%ecx
lea    -0x10(%rbp),%rdi
lea    -0xc(%rbp),%rsi
mov    $0x0,%al
call   1030 <CfgDepBase_SRC_HIH_EQL_SET_OBJ@plt>
cmpl   $0x1,-0x10(%rbp)
jne    115a <CfgDepBase_RMV_SET_OBJ+0x3a>
mov    -0x4(%rbp),%edi
mov    -0xc(%rbp),%esi
mov    $0x0,%al
call   1040 <CfgDepBase_DEL_SET_OBJ@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<CfgDepBase_RMV_SET_OBJ>:
push   %rbx
sub    $0x10,%rsp
mov    %esi,%ecx
mov    %edi,%ebx
lea    0x8(%rsp),%rdi
lea    0xc(%rsp),%rsi
mov    %ebx,%edx
xor    %eax,%eax
call   1030 <CfgDepBase_SRC_HIH_EQL_SET_OBJ@plt>
cmpl   $0x1,0x8(%rsp)
jne    1150 <CfgDepBase_RMV_SET_OBJ+0x30>
mov    0xc(%rsp),%esi
mov    %ebx,%edi
xor    %eax,%eax
call   1040 <CfgDepBase_DEL_SET_OBJ@plt>
add    $0x10,%rsp
pop    %rbx
ret

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

LLVM IR (-O2):
define void @CfgDepBase_RMV_SET_OBJ(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = bitcast i32* %3 to i8*
%6 = bitcast i32* %4 to i8*
%7 = call i32 (i32*, i32*, i32, i32, ...) bitcast (i32 (...)* @CfgDepBase_SRC_HIH_EQL_SET_OBJ to i32 (i32*, i32*, i32, i32, ...)*)(i32* %4, i32* %3, i32 %0, i32 %1)
%8 = load i32, i32* %4
%9 = icmp eq i32 %8, 1
br i1 %9, label %10, label %13
10: ; preds = %2
%11 = load i32, i32* %3
%12 = call i32 (i32, i32, ...) bitcast (i32 (...)* @CfgDepBase_DEL_SET_OBJ to i32 (i32, i32, ...)*)(i32 %0, i32 %11)
br label %13
13: ; preds = %10, %2
ret void
}
double test3a(double x) { return __builtin_pow(x, 5. / 3.); }


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

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

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

LLVM IR (-O2):
define double @test3a(double %0) {
%2 = tail call double @pow(double %0, double 0x3FFAAAAAAAAAAAAB)
ret double %2
}
/* Variables and functions */
int /*<<< orphan*/ pump_ex(int, int, int);
void pump(int input, int output) { pump_ex(input, output, 1); }


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

x86 assembly (clang, -O2):
<pump>:
mov    $0x1,%edx
jmp    1030 <pump_ex@plt>

LLVM IR (-O0):
define void @pump(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 = call i32 @pump_ex(i32 %5, i32 %6, i32 1)
ret void
}

LLVM IR (-O2):
define void @pump(i32 %0, i32 %1) {
%3 = tail call i32 @pump_ex(i32 %0, i32 %1, i32 1)
ret void
}
/* Variables and functions */
double pow(int, int);
int /*<<< orphan*/ printf(char *, double);
int /*<<< orphan*/ scanf(char *, int *);
int /*<<< orphan*/ system(char *);
int main() {
  int raio;
  double VOLUME;
  double pi = 3.14159;
  scanf("%d", &raio);
  VOLUME = ((4.0 / 3) * pi * pow(raio, 3));
  printf("VOLUME = %.3lf\n", VOLUME);
  system("pause");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movsd  0xeb1(%rip),%xmm0
movsd  %xmm0,-0x18(%rbp)
lea    0xead(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1050 <scanf@plt>
movsd  0xe8c(%rip),%xmm0
mulsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x20(%rbp)
mov    -0x8(%rbp),%edi
mov    $0x3,%esi
call   1060 <pow@plt>
movaps %xmm0,%xmm1
movsd  -0x20(%rbp),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
lea    0xe6b(%rip),%rdi
call   1040 <printf@plt>
lea    0xe6f(%rip),%rdi
call   1030 <system@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xec0(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1050 <scanf@plt>
mov    0x4(%rsp),%edi
mov    $0x3,%esi
call   1060 <pow@plt>
mulsd  0xe98(%rip),%xmm0
lea    0xe9c(%rip),%rdi
call   1040 <printf@plt>
lea    0xea0(%rip),%rdi
call   1030 <system@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
@.str.1 = [16 x i8] c"VOLUME = %.3lf\0A\00"
@.str.2 = [6 x i8] c"pause\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca double
%4 = alloca double
store i32 0, i32* %1
store double 3.141590e+00, double* %4
%5 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %2)
%6 = load double, double* %4
%7 = fmul double 0x3FF5555555555555, %6
%8 = load i32, i32* %2
%9 = call double @pow(i32 %8, i32 3)
%10 = fmul double %7, %9
store double %10, double* %3
%11 = load double, double* %3
%12 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0), double %11)
%13 = call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@.str.1 = [16 x i8] c"VOLUME = %.3lf\0A\00"
@.str.2 = [6 x i8] c"pause\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%4 = load i32, i32* %1
%5 = call double @pow(i32 %4, i32 3)
%6 = fmul double %5, 0x4010C1514ABD0449
%7 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0), double %6)
%8 = call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ stderr;
void gdbm_panic(char *mesg) { fprintf(stderr, "GDBM panic: %s\n", mesg); }


x86 assembly (clang, -O0):
<gdbm_panic>:
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):
<gdbm_panic>:
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 = [16 x i8] c"GDBM panic: %s\0A\00"
define void @gdbm_panic(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = load i8*, i8** %2
%5 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i8* %4)
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [16 x i8] c"GDBM panic: %s\0A\00"
define void @gdbm_panic(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
double leaky_gradient(const double x) { return (x < 0) ? .1 : 1; }


x86 assembly (clang, -O0):
<leaky_gradient>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  0xeea(%rip),%xmm3
movsd  0xeea(%rip),%xmm2
xorps  %xmm1,%xmm1
cmpltsd %xmm1,%xmm0
movaps %xmm0,%xmm1
andpd  %xmm3,%xmm1
andnpd %xmm2,%xmm0
orpd   %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<leaky_gradient>:
xorpd  %xmm1,%xmm1
xor    %eax,%eax
ucomisd %xmm0,%xmm1
seta   %al
lea    0xeec(%rip),%rcx
movsd  (%rcx,%rax,8),%xmm0
ret

LLVM IR (-O0):
define double @leaky_gradient(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fcmp olt double %3, 0.000000e+00
%5 = zext i1 %4 to i64
%6 = select i1 %4, double 1.000000e-01, double 1.000000e+00
ret double %6
}

LLVM IR (-O2):
define double @leaky_gradient(double %0) {
%2 = fcmp olt double %0, 0.000000e+00
%3 = select i1 %2, double 1.000000e-01, double 1.000000e+00
ret double %3
}
/* Variables and functions */
unsigned int _bextr_u32(unsigned int, unsigned int, unsigned int);
unsigned int func_bextr32_3args(unsigned int X, unsigned int Y,
                                unsigned int Z) {
  return _bextr_u32(X, Y, Z);
}


x86 assembly (clang, -O0):
<func_bextr32_3args>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
call   1030 <_bextr_u32@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<func_bextr32_3args>:
jmp    1030 <_bextr_u32@plt>

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

LLVM IR (-O2):
define i32 @func_bextr32_3args(i32 %0, i32 %1, i32 %2) {
%4 = tail call i32 @_bextr_u32(i32 %0, i32 %1, i32 %2)
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ __builtin_wasm_memory_grow(int /*<<< orphan*/, int);
int /*<<< orphan*/ isatty(int);
int main(void) {
  isatty(1);
  __builtin_wasm_memory_grow(0, 1);
  isatty(1);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x1,%edi
call   1030 <isatty@plt>
xor    %edi,%edi
mov    $0x1,%esi
call   1040 <__builtin_wasm_memory_grow@plt>
mov    $0x1,%edi
call   1030 <isatty@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @isatty(i32 1)
%3 = call i32 @__builtin_wasm_memory_grow(i32 0, i32 1)
%4 = call i32 @isatty(i32 1)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @isatty(i32 1)
%2 = tail call i32 @__builtin_wasm_memory_grow(i32 0, i32 1)
%3 = tail call i32 @isatty(i32 1)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *, char const *);
void fail(const char *s) {
  printf("error %s", s);
  exit(-1);
}


x86 assembly (clang, -O0):
<fail>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xec9(%rip),%rdi
call   1030 <printf@plt>
mov    $0xffffffff,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<fail>:
push   %rax
mov    %rdi,%rsi
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
mov    $0xffffffff,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [9 x i8] c"error %s\00"
define void @fail(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i8* %3)
%5 = call i32 @exit(i32 -1)
unreachable
}

LLVM IR (-O2):
@.str = [9 x i8] c"error %s\00"
define void @fail(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i8* %0)
%3 = tail call i32 @exit(i32 -1)
unreachable
}
/* Variables and functions */
int __VERIFIER_nondet_int();
int calculateNext(int s2) {
  int calculateNext_return;
  do {
    calculateNext_return = __VERIFIER_nondet_int();
  } while (calculateNext_return == s2 || calculateNext_return == 0);
  return calculateNext_return;
}


x86 assembly (clang, -O0):
<calculateNext>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x0,%al
call   1030 <__VERIFIER_nondet_int@plt>
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%ecx
mov    $0x1,%al
cmp    -0x4(%rbp),%ecx
mov    %al,-0x9(%rbp)
je     1140 <calculateNext+0x30>
cmpl   $0x0,-0x8(%rbp)
sete   %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
test   $0x1,%al
jne    111b <calculateNext+0xb>
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<calculateNext>:
push   %rbx
mov    %edi,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
xor    %eax,%eax
call   1030 <__VERIFIER_nondet_int@plt>
cmp    %ebx,%eax
je     1120 <calculateNext+0x10>
test   %eax,%eax
je     1120 <calculateNext+0x10>
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @calculateNext(i32 %0) {
br label %2
2: ; preds = %2, %1
%3 = tail call i32 (...) @__VERIFIER_nondet_int()
%4 = icmp eq i32 %3, %0
%5 = icmp eq i32 %3, 0
%6 = or i1 %4, %5
br i1 %6, label %2, label %7
7: ; preds = %2
ret i32 %3
}
/* Type definitions */
typedef int /*<<< orphan*/ ssize_t;

/* Variables and functions */
int /*<<< orphan*/ write_float4_array(int, float *, int);
ssize_t write_float4(int f, float x) { return write_float4_array(f, &x, 1); }


x86 assembly (clang, -O0):
<write_float4>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movss  %xmm0,-0x8(%rbp)
mov    -0x4(%rbp),%edi
lea    -0x8(%rbp),%rsi
mov    $0x1,%edx
call   1030 <write_float4_array@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<write_float4>:
push   %rax
movss  %xmm0,0x4(%rsp)
lea    0x4(%rsp),%rsi
mov    $0x1,%edx
call   1030 <write_float4_array@plt>
pop    %rcx
ret

LLVM IR (-O0):
define i32 @write_float4(i32 %0, float %1) {
%3 = alloca i32
%4 = alloca float
store i32 %0, i32* %3
store float %1, float* %4
%5 = load i32, i32* %3
%6 = call i32 @write_float4_array(i32 %5, float* %4, i32 1)
ret i32 %6
}

LLVM IR (-O2):
define i32 @write_float4(i32 %0, float %1) {
%3 = alloca float
store float %1, float* %3
%4 = call i32 @write_float4_array(i32 %0, float* %3, i32 1)
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ test_add_file_to_tag();
int /*<<< orphan*/ test_add_new_file();
int /*<<< orphan*/ test_add_new_tag();
int /*<<< orphan*/ test_add_tag_to_file();
int /*<<< orphan*/ test_rename_tag();
int main(int argc, char **argv) {
  test_add_new_tag();
  test_add_new_file();
  test_rename_tag();
  test_add_tag_to_file();
  test_add_file_to_tag();
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x0,%al
call   1050 <test_add_new_tag@plt>
mov    $0x0,%al
call   1060 <test_add_new_file@plt>
mov    $0x0,%al
call   1040 <test_rename_tag@plt>
mov    $0x0,%al
call   1030 <test_add_tag_to_file@plt>
mov    $0x0,%al
call   1070 <test_add_file_to_tag@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1050 <test_add_new_tag@plt>
xor    %eax,%eax
call   1060 <test_add_new_file@plt>
xor    %eax,%eax
call   1040 <test_rename_tag@plt>
xor    %eax,%eax
call   1030 <test_add_tag_to_file@plt>
xor    %eax,%eax
call   1070 <test_add_file_to_tag@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
store i32 %0, i32* %3
store i8** %1, i8*** %4
%5 = call i32 (...) @test_add_new_tag()
%6 = call i32 (...) @test_add_new_file()
%7 = call i32 (...) @test_rename_tag()
%8 = call i32 (...) @test_add_tag_to_file()
%9 = call i32 (...) @test_add_file_to_tag()
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @test_add_new_tag()
%4 = tail call i32 (...) @test_add_new_file()
%5 = tail call i32 (...) @test_rename_tag()
%6 = tail call i32 (...) @test_add_tag_to_file()
%7 = tail call i32 (...) @test_add_file_to_tag()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main(void) {
  int re = 100;
  const int pi = 2;
  re = re + pi;
  printf("%d", re);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x64,-0x8(%rbp)
movl   $0x2,-0xc(%rbp)
mov    -0x8(%rbp),%eax
add    $0x2,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%esi
lea    0xec0(%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    $0x66,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 102)
ret i32 0
}
/* Type definitions */
typedef int uint8_t;

/* Variables and functions */
uint8_t bcd_from_byte(uint8_t byte) { return byte + (6 * (byte / 10)); }


x86 assembly (clang, -O0):
<bcd_from_byte>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
mov    -0x8(%rbp),%eax
imul   $0x6,%ecx,%ecx
add    %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<bcd_from_byte>:
movslq %edi,%rax
imul   $0x66666667,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
sar    $0x22,%rcx
add    %edx,%ecx
lea    (%rcx,%rcx,2),%ecx
lea    (%rax,%rcx,2),%eax
ret

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

LLVM IR (-O2):
define i32 @bcd_from_byte(i32 %0) {
%2 = sdiv i32 %0, 10
%3 = mul nsw i32 %2, 6
%4 = add nsw i32 %3, %0
ret i32 %4
}
void ecrobot_device_initialize(void) {}


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

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

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

LLVM IR (-O2):
define void @ecrobot_device_initialize() {
ret void
}
/* Variables and functions */
int c(int);
int b(int val) {
  int rc = c(val);
  return rc;
}


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

x86 assembly (clang, -O2):
<b>:
jmp    1030 <c@plt>

LLVM IR (-O0):
define i32 @b(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = call i32 @c(i32 %4)
store i32 %5, i32* %3
%6 = load i32, i32* %3
ret i32 %6
}

LLVM IR (-O2):
define i32 @b(i32 %0) {
%2 = tail call i32 @c(i32 %0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ vla_factory(int);
int main(void) {
  vla_factory(5);
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @vla_factory(i32 5)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int foo(int a) { printf("%d\n", a); }


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

x86 assembly (clang, -O2):
<foo>:
mov    %edi,%esi
lea    0xee7(%rip),%rdi
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define i32 @foo(i32 %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %0)
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ e_nop();
void e_nop_accu() { e_nop(); }


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

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

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

LLVM IR (-O2):
define void @e_nop_accu() {
%1 = tail call i32 (...) @e_nop()
ret void
}
/* Type definitions */
typedef scalar_t__ clock_t;

/* Variables and functions */
scalar_t__ clock();
clock_t BMK_clockSpan(clock_t start) { return clock() - start; }


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

x86 assembly (clang, -O2):
<BMK_clockSpan>:
push   %rbx
mov    %rdi,%rbx
xor    %eax,%eax
call   1030 <clock@plt>
sub    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
define i64 @BMK_clockSpan(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = call i64 (...) @clock()
%4 = load i64, i64* %2
%5 = sub nsw i64 %3, %4
ret i64 %5
}

LLVM IR (-O2):
define i64 @BMK_clockSpan(i64 %0) {
%2 = tail call i64 (...) @clock()
%3 = sub nsw i64 %2, %0
ret i64 %3
}
/* Variables and functions */
char *U_WMRCORENONE_set(char *);
char *U_WMR94_set(void) { return U_WMRCORENONE_set("U_WMR94"); }


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

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

LLVM IR (-O0):
@.str = [8 x i8] c"U_WMR94\00"
define i8* @U_WMR94_set() {
%1 = call i8* @U_WMRCORENONE_set(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
ret i8* %1
}

LLVM IR (-O2):
@.str = [8 x i8] c"U_WMR94\00"
define i8* @U_WMR94_set() {
%1 = tail call i8* @U_WMRCORENONE_set(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
ret i8* %1
}
/* Variables and functions */
int random();
int sklist_random_level(void) {
  int level = 1;
  while ((random() & 0xFFFF) < 0.25 * 0xFFFF)
    level += 1;
  return level < 32 ? level : 32;
}


x86 assembly (clang, -O0):
<sklist_random_level>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x1,-0x4(%rbp)
mov    $0x0,%al
call   1030 <random@plt>
and    $0xffff,%eax
cvtsi2sd %eax,%xmm1
movsd  0xec9(%rip),%xmm0
ucomisd %xmm1,%xmm0
jbe    114f <sklist_random_level+0x3f>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    111f <sklist_random_level+0xf>
cmpl   $0x20,-0x4(%rbp)
jge    1164 <sklist_random_level+0x54>
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
jmp    1171 <sklist_random_level+0x61>
mov    $0x20,%eax
mov    %eax,-0x8(%rbp)
jmp    1171 <sklist_random_level+0x61>
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sklist_random_level>:
push   %rbx
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
xor    %eax,%eax
call   1030 <random@plt>
add    $0x1,%ebx
test   $0xc000,%eax
je     1120 <sklist_random_level+0x10>
cmp    $0x20,%ebx
mov    $0x20,%eax
cmovb  %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @sklist_random_level() {
%1 = alloca i32
store i32 1, i32* %1
br label %2
2: ; preds = %7, %0
%3 = call i32 (...) @random()
%4 = and i32 %3, 65535
%5 = sitofp i32 %4 to double
%6 = fcmp olt double %5, 0x40CFFFE000000000
br i1 %6, label %7, label %10
7: ; preds = %2
%8 = load i32, i32* %1
%9 = add nsw i32 %8, 1
store i32 %9, i32* %1
br label %2
10: ; preds = %2
%11 = load i32, i32* %1
%12 = icmp slt i32 %11, 32
br i1 %12, label %13, label %15
13: ; preds = %10
%14 = load i32, i32* %1
br label %16
15: ; preds = %10
br label %16
16: ; preds = %15, %13
%17 = phi i32 [ %14, %13 ], [ 32, %15 ]
ret i32 %17
}

LLVM IR (-O2):
define i32 @sklist_random_level() {
br label %1
1: ; preds = %1, %0
%2 = phi i32 [ 1, %0 ], [ %6, %1 ]
%3 = tail call i32 (...) @random()
%4 = and i32 %3, 49152
%5 = icmp eq i32 %4, 0
%6 = add nuw nsw i32 %2, 1
br i1 %5, label %1, label %7
7: ; preds = %1
%8 = icmp ult i32 %2, 32
%9 = select i1 %8, i32 %2, i32 32
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ sprintf(char *, char *, char const *);
int system(char *);
int configure_serial_port(const char *dev) {
  char string[64];
  sprintf(string, "stty -F %s 2400 -parity -icanon -echo -echoe", dev);
  return system(string);
}


x86 assembly (clang, -O0):
<configure_serial_port>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
mov    %rdi,-0x8(%rbp)
lea    -0x50(%rbp),%rdi
mov    -0x8(%rbp),%rdx
lea    0xec5(%rip),%rsi
call   1040 <sprintf@plt>
lea    -0x50(%rbp),%rdi
call   1030 <system@plt>
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<configure_serial_port>:
push   %rbx
sub    $0x40,%rsp
mov    %rdi,%rdx
lea    0xed1(%rip),%rsi
mov    %rsp,%rbx
mov    %rbx,%rdi
call   1040 <sprintf@plt>
mov    %rbx,%rdi
call   1030 <system@plt>
add    $0x40,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [45 x i8] c"stty -F %s 2400 -parity -icanon -echo -echoe\00"
define i32 @configure_serial_port(i8* %0) {
%2 = alloca i8*
%3 = alloca [64 x i8]
store i8* %0, i8** %2
%4 = getelementptr inbounds [64 x i8], [64 x i8]* %3, i64 0, i64 0
%5 = load i8*, i8** %2
%6 = call i32 @sprintf(i8* %4, i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str, i64 0, i64 0), i8* %5)
%7 = getelementptr inbounds [64 x i8], [64 x i8]* %3, i64 0, i64 0
%8 = call i32 @system(i8* %7)
ret i32 %8
}

LLVM IR (-O2):
@.str = [45 x i8] c"stty -F %s 2400 -parity -icanon -echo -echoe\00"
define i32 @configure_serial_port(i8* %0) {
%2 = alloca [64 x i8]
%3 = getelementptr inbounds [64 x i8], [64 x i8]* %2, i64 0, i64 0
%4 = call i32 @sprintf(i8* %3, i8* dereferenceable(1) getelementptr inbounds ([45 x i8], [45 x i8]* @.str, i64 0, i64 0), i8* %0)
%5 = call i32 @system(i8* %3)
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ O_WRONLY;
int open(char *, int /*<<< orphan*/);
int libpcspeak_open(char *ttyname) { return open(ttyname, O_WRONLY); }


x86 assembly (clang, -O0):
<libpcspeak_open>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    0x2eb1(%rip),%rax
mov    (%rax),%esi
call   1030 <open@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<libpcspeak_open>:
mov    0x2ec1(%rip),%rax
mov    (%rax),%esi
jmp    1030 <open@plt>

LLVM IR (-O0):
@O_WRONLY = global i32 0
define i32 @libpcspeak_open(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = load i32, i32* @O_WRONLY
%5 = call i32 @open(i8* %3, i32 %4)
ret i32 %5
}

LLVM IR (-O2):
@O_WRONLY = global i32 0
define i32 @libpcspeak_open(i8* nocapture %0) {
%2 = load i32, i32* @O_WRONLY
%3 = tail call i32 @open(i8* %0, i32 %2)
ret i32 %3
}
struct s3c24x0_lcd *s3c24x0_get_base_lcd(void) {
  return (struct s3c24x0_lcd *)0x14A00000;
}


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

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

LLVM IR (-O0):
%struct.s3c24x0_lcd = type opaque
define %struct.s3c24x0_lcd* @s3c24x0_get_base_lcd() {
ret %struct.s3c24x0_lcd* inttoptr (i64 346030080 to %struct.s3c24x0_lcd*)
}

LLVM IR (-O2):
%struct.s3c24x0_lcd = type opaque
define %struct.s3c24x0_lcd* @s3c24x0_get_base_lcd() {
ret %struct.s3c24x0_lcd* inttoptr (i64 346030080 to %struct.s3c24x0_lcd*)
}
/* Variables and functions */
int open(char *, int);
int /*<<< orphan*/ open_error(char *);
int Open(char *filename, int flags) {
  int fd;
  if ((fd = open(filename, flags)) < 0)
    open_error(filename);
  return fd;
}


x86 assembly (clang, -O0):
<Open>:
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   1040 <open@plt>
mov    %eax,-0x10(%rbp)
cmp    $0x0,%eax
jge    1150 <Open+0x30>
mov    -0x8(%rbp),%rdi
call   1030 <open_error@plt>
mov    -0x10(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Open>:
push   %rbp
push   %rbx
push   %rax
mov    %rdi,%rbx
call   1040 <open@plt>
mov    %eax,%ebp
test   %eax,%eax
jns    1139 <Open+0x19>
mov    %rbx,%rdi
call   1030 <open_error@plt>
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @Open(i8* %0, i32 %1) {
%3 = tail call i32 @open(i8* %0, i32 %1)
%4 = icmp slt i32 %3, 0
br i1 %4, label %5, label %7
5: ; preds = %2
%6 = tail call i32 @open_error(i8* %0)
br label %7
7: ; preds = %5, %2
ret i32 %3
}
int test_imm_DAuint32_mem(unsigned int *val) {
  return ((*val) & (0xDA << 0)) ? -20 : -40;
}


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

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

LLVM IR (-O0):
define i32 @test_imm_DAuint32_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, 218
%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_DAuint32_mem(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = and i32 %2, 218
%4 = icmp eq i32 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
char *strndup(char const *, size_t);
char *strdup(const char *src) { return strndup(src, ~((size_t)0)); }


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

x86 assembly (clang, -O2):
<strdup>:
mov    $0xffffffffffffffff,%rsi
jmp    1030 <strndup@plt>

LLVM IR (-O0):
define i8* @strdup(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i8* @strndup(i8* %3, i64 -1)
ret i8* %4
}

LLVM IR (-O2):
define noalias i8* @strdup(i8* nocapture %0) {
%2 = tail call i8* @strndup(i8* %0, i64 -1)
ret i8* %2
}
/* Variables and functions */
int /*<<< orphan*/ tzset();
void httpdate_init(void) { tzset(); }


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

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

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

LLVM IR (-O2):
define void @httpdate_init() {
%1 = tail call i32 (...) @tzset()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
int /*<<< orphan*/ puts(char *);
int /*<<< orphan*/ strlen(char *);
int /*<<< orphan*/ write(int, char *, int /*<<< orphan*/);
void *connection_handler(void *socket) {
  puts("Building connection!!!");
  int sock = *(int *)socket;
  char *message;
  message = "Greetings!I am rob!";
  write(sock, message, strlen(message));
  free(socket);
  return 0;
}


x86 assembly (clang, -O0):
<connection_handler>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xead(%rip),%rdi
call   1040 <puts@plt>
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0xc(%rbp)
lea    0xeaf(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x24(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rdi
call   1060 <strlen@plt>
mov    -0x24(%rbp),%edi
mov    -0x20(%rbp),%rsi
mov    %eax,%edx
call   1050 <write@plt>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<connection_handler>:
push   %rbp
push   %r14
push   %rbx
mov    %rdi,%rbx
lea    0xeb2(%rip),%rdi
call   1040 <puts@plt>
mov    (%rbx),%ebp
lea    0xebb(%rip),%r14
mov    %r14,%rdi
call   1060 <strlen@plt>
mov    %ebp,%edi
mov    %r14,%rsi
mov    %eax,%edx
call   1050 <write@plt>
mov    %rbx,%rdi
call   1030 <free@plt>
xor    %eax,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
@.str = [23 x i8] c"Building connection!!!\00"
@.str.1 = [20 x i8] c"Greetings!I am rob!\00"
define i8* @connection_handler(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
%4 = alloca i8*
store i8* %0, i8** %2
%5 = call i32 @puts(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0))
%6 = load i8*, i8** %2
%7 = bitcast i8* %6 to i32*
%8 = load i32, i32* %7
store i32 %8, i32* %3
store i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.1, i64 0, i64 0), i8** %4
%9 = load i32, i32* %3
%10 = load i8*, i8** %4
%11 = load i8*, i8** %4
%12 = call i32 @strlen(i8* %11)
%13 = call i32 @write(i32 %9, i8* %10, i32 %12)
%14 = load i8*, i8** %2
%15 = call i32 @free(i8* %14)
ret i8* null
}

LLVM IR (-O2):
@.str = [23 x i8] c"Building connection!!!\00"
@.str.1 = [20 x i8] c"Greetings!I am rob!\00"
define noalias i8* @connection_handler(i8* nocapture %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0))
%3 = bitcast i8* %0 to i32*
%4 = load i32, i32* %3
%5 = tail call i32 @strlen(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.1, i64 0, i64 0))
%6 = tail call i32 @write(i32 %4, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.1, i64 0, i64 0), i32 %5)
%7 = tail call i32 @free(i8* %0)
ret i8* null
}
void foo752(int p) {}


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

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

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

LLVM IR (-O2):
define void @foo752(i32 %0) {
ret void
}
/* Variables and functions */
int stc(char *, char *);
int main(int argc, char **argv) {
  int ret = stc("15213", argv[argc - 1]);
  argv[0] = '\0';
  return ret;
}


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)
mov    -0x10(%rbp),%rax
mov    -0x8(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
mov    (%rax,%rcx,8),%rsi
lea    0xec2(%rip),%rdi
call   1030 <stc@plt>
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%rax
movq   $0x0,(%rax)
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    %rsi,%rbx
movslq %edi,%rax
mov    -0x8(%rsi,%rax,8),%rsi
lea    0xedd(%rip),%rdi
call   1030 <stc@plt>
movq   $0x0,(%rbx)
pop    %rbx
ret

LLVM IR (-O0):
@.str = [6 x i8] c"15213\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = load i8**, i8*** %5
%8 = load i32, i32* %4
%9 = sub nsw i32 %8, 1
%10 = sext i32 %9 to i64
%11 = getelementptr inbounds i8*, i8** %7, i64 %10
%12 = load i8*, i8** %11
%13 = call i32 @stc(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* %12)
store i32 %13, i32* %6
%14 = load i8**, i8*** %5
%15 = getelementptr inbounds i8*, i8** %14, i64 0
store i8* null, i8** %15
%16 = load i32, i32* %6
ret i32 %16
}

LLVM IR (-O2):
@.str = [6 x i8] c"15213\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = add nsw i32 %0, -1
%4 = sext i32 %3 to i64
%5 = getelementptr inbounds i8*, i8** %1, i64 %4
%6 = load i8*, i8** %5
%7 = tail call i32 @stc(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* %6)
store i8* null, i8** %1
ret i32 %7
}