xunge/DecIR huggingface dataset:
void f() {
  int x = size_t(1.0) + 2;
  int y = (size_t(1.0) + 5);
  int z = size_t(1.0) + 5 + size_t(2.0);
}


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  0xee8(%rip),%xmm0
mov    $0x1,%al
call   1030 <size_t@plt>
add    $0x2,%eax
mov    %eax,-0x4(%rbp)
movsd  0xed3(%rip),%xmm0
mov    $0x1,%al
call   1030 <size_t@plt>
add    $0x5,%eax
mov    %eax,-0x8(%rbp)
movsd  0xebe(%rip),%xmm0
mov    $0x1,%al
call   1030 <size_t@plt>
add    $0x5,%eax
mov    %eax,-0x10(%rbp)
movsd  0xea1(%rip),%xmm0
mov    $0x1,%al
call   1030 <size_t@plt>
mov    %eax,%ecx
mov    -0x10(%rbp),%eax
add    %ecx,%eax
mov    %eax,-0xc(%rbp)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f>:
push   %rax
movsd  0xee7(%rip),%xmm0
mov    $0x1,%al
call   1030 <size_t@plt>
movsd  0xed8(%rip),%xmm0
mov    $0x1,%al
call   1030 <size_t@plt>
movsd  0xec9(%rip),%xmm0
mov    $0x1,%al
call   1030 <size_t@plt>
movsd  0xec2(%rip),%xmm0
mov    $0x1,%al
pop    %rcx
jmp    1030 <size_t@plt>

LLVM IR (-O0):
define void @f() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = call i32 (double, ...) bitcast (i32 (...)* @size_t to i32 (double, ...)*)(double 1.000000e+00)
%5 = add nsw i32 %4, 2
store i32 %5, i32* %1
%6 = call i32 (double, ...) bitcast (i32 (...)* @size_t to i32 (double, ...)*)(double 1.000000e+00)
%7 = add nsw i32 %6, 5
store i32 %7, i32* %2
%8 = call i32 (double, ...) bitcast (i32 (...)* @size_t to i32 (double, ...)*)(double 1.000000e+00)
%9 = add nsw i32 %8, 5
%10 = call i32 (double, ...) bitcast (i32 (...)* @size_t to i32 (double, ...)*)(double 2.000000e+00)
%11 = add nsw i32 %9, %10
store i32 %11, i32* %3
ret void
}

LLVM IR (-O2):
define void @f() {
%1 = tail call i32 (double, ...) bitcast (i32 (...)* @size_t to i32 (double, ...)*)(double 1.000000e+00)
%2 = tail call i32 (double, ...) bitcast (i32 (...)* @size_t to i32 (double, ...)*)(double 1.000000e+00)
%3 = tail call i32 (double, ...) bitcast (i32 (...)* @size_t to i32 (double, ...)*)(double 1.000000e+00)
%4 = tail call i32 (double, ...) bitcast (i32 (...)* @size_t to i32 (double, ...)*)(double 2.000000e+00)
ret void
}
unsigned int htable_hash_function(const char *key, unsigned int htable_size) {
  unsigned long int h = 0;
  unsigned char *p;
  for (p = (unsigned char *)key; *p != '\0'; p++)
    h = 31 * h + *p;
  return h % htable_size;
}


x86 assembly (clang, -O0):
<htable_hash_function>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movq   $0x0,-0x18(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
movzbl (%rax),%eax
cmp    $0x0,%eax
je     114f <htable_hash_function+0x4f>
imul   $0x1f,-0x18(%rbp),%rax
mov    -0x20(%rbp),%rcx
movzbl (%rcx),%ecx
add    %rcx,%rax
mov    %rax,-0x18(%rbp)
mov    -0x20(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x20(%rbp)
jmp    111b <htable_hash_function+0x1b>
mov    -0x18(%rbp),%rax
mov    -0xc(%rbp),%ecx
xor    %edx,%edx
div    %rcx
mov    %edx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<htable_hash_function>:
mov    (%rdi),%cl
test   %cl,%cl
je     112d <htable_hash_function+0x2d>
add    $0x1,%rdi
xor    %eax,%eax
nopl   0x0(%rax)
mov    %rax,%rdx
shl    $0x5,%rdx
sub    %rax,%rdx
movzbl %cl,%eax
add    %rdx,%rax
movzbl (%rdi),%ecx
add    $0x1,%rdi
test   %cl,%cl
jne    1110 <htable_hash_function+0x10>
jmp    112f <htable_hash_function+0x2f>
xor    %eax,%eax
mov    %esi,%ecx
mov    %rax,%rdx
shr    $0x20,%rdx
je     1143 <htable_hash_function+0x43>
xor    %edx,%edx
div    %rcx
mov    %rdx,%rax
ret
xor    %edx,%edx
div    %ecx
mov    %edx,%eax
ret

LLVM IR (-O0):
define i32 @htable_hash_function(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
%5 = alloca i64
%6 = alloca i8*
store i8* %0, i8** %3
store i32 %1, i32* %4
store i64 0, i64* %5
%7 = load i8*, i8** %3
store i8* %7, i8** %6
br label %8
8: ; preds = %20, %2
%9 = load i8*, i8** %6
%10 = load i8, i8* %9
%11 = zext i8 %10 to i32
%12 = icmp ne i32 %11, 0
br i1 %12, label %13, label %23
13: ; preds = %8
%14 = load i64, i64* %5
%15 = mul i64 31, %14
%16 = load i8*, i8** %6
%17 = load i8, i8* %16
%18 = zext i8 %17 to i64
%19 = add i64 %15, %18
store i64 %19, i64* %5
br label %20
20: ; preds = %13
%21 = load i8*, i8** %6
%22 = getelementptr inbounds i8, i8* %21, i32 1
store i8* %22, i8** %6
br label %8
23: ; preds = %8
%24 = load i64, i64* %5
%25 = load i32, i32* %4
%26 = zext i32 %25 to i64
%27 = urem i64 %24, %26
%28 = trunc i64 %27 to i32
ret i32 %28
}

LLVM IR (-O2):
define i32 @htable_hash_function(i8* nocapture %0, i32 %1) {
%3 = load i8, i8* %0
%4 = icmp eq i8 %3, 0
br i1 %4, label %15, label %5
5: ; preds = %2, %5
%6 = phi i8 [ %13, %5 ], [ %3, %2 ]
%7 = phi i8* [ %12, %5 ], [ %0, %2 ]
%8 = phi i64 [ %11, %5 ], [ 0, %2 ]
%9 = mul i64 %8, 31
%10 = zext i8 %6 to i64
%11 = add i64 %9, %10
%12 = getelementptr inbounds i8, i8* %7, i64 1
%13 = load i8, i8* %12
%14 = icmp eq i8 %13, 0
br i1 %14, label %15, label %5
15: ; preds = %5, %2
%16 = phi i64 [ 0, %2 ], [ %11, %5 ]
%17 = zext i32 %1 to i64
%18 = urem i64 %16, %17
%19 = trunc i64 %18 to i32
ret i32 %19
}
/* Type definitions */
typedef scalar_t__ uint32_t;

/* Variables and functions */
bool sancus_get_u32l(long v, uint32_t *out) {
  if ((v >= 0) && (v <= 0xffffffff)) {
    if (out != NULL)
      *out = (uint32_t)v;
    return true;
  }
  return false;
}


x86 assembly (clang, -O0):
<sancus_get_u32l>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
cmpq   $0x0,-0x10(%rbp)
jl     1148 <sancus_get_u32l+0x48>
mov    $0xffffffff,%eax
cmp    %rax,-0x10(%rbp)
jg     1148 <sancus_get_u32l+0x48>
cmpq   $0x0,-0x18(%rbp)
je     113c <sancus_get_u32l+0x3c>
mov    -0x10(%rbp),%rcx
mov    -0x18(%rbp),%rax
mov    %rcx,(%rax)
movl   $0x1,-0x4(%rbp)
jmp    114f <sancus_get_u32l+0x4f>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<sancus_get_u32l>:
xor    %eax,%eax
mov    %rdi,%rcx
shr    $0x20,%rcx
jne    1118 <sancus_get_u32l+0x18>
mov    $0x1,%eax
test   %rsi,%rsi
je     1118 <sancus_get_u32l+0x18>
mov    %rdi,(%rsi)
ret

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

LLVM IR (-O2):
define i32 @sancus_get_u32l(i64 %0, i64* writeonly %1) {
%3 = icmp ult i64 %0, 4294967296
br i1 %3, label %4, label %7
4: ; preds = %2
%5 = icmp eq i64* %1, null
br i1 %5, label %7, label %6
6: ; preds = %4
store i64 %0, i64* %1
br label %7
7: ; preds = %2, %4, %6
%8 = phi i32 [ 1, %6 ], [ 1, %4 ], [ 0, %2 ]
ret i32 %8
}
/* Type definitions */
struct stat {
  int st_mode;
};

/* Variables and functions */
scalar_t__ stat(char const *, struct stat *);
int dashx(const char *fname) {
  struct stat st;
  return (stat(fname, &st) == 0 && (st.st_mode & 0755));
}


x86 assembly (clang, -O0):
<dashx>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    -0x10(%rbp),%rsi
call   1030 <stat@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    $0x0,%rcx
mov    %al,-0x11(%rbp)
jne    114c <dashx+0x3c>
mov    -0x10(%rbp),%eax
and    $0x1ed,%eax
cmp    $0x0,%eax
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):
<dashx>:
push   %rax
mov    %rsp,%rsi
call   1030 <stat@plt>
test   %rax,%rax
sete   %al
testl  $0x1ed,(%rsp)
setne  %cl
and    %al,%cl
movzbl %cl,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.stat = type { i32 }
define i32 @dashx(i8* %0) {
%2 = alloca i8*
%3 = alloca %struct.stat
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i64 @stat(i8* %4, %struct.stat* %3)
%6 = icmp eq i64 %5, 0
br i1 %6, label %7, label %12
7: ; preds = %1
%8 = getelementptr inbounds %struct.stat, %struct.stat* %3, i32 0, i32 0
%9 = load i32, i32* %8
%10 = and i32 %9, 493
%11 = icmp ne i32 %10, 0
br label %12
12: ; preds = %7, %1
%13 = phi i1 [ false, %1 ], [ %11, %7 ]
%14 = zext i1 %13 to i32
ret i32 %14
}

LLVM IR (-O2):
%struct.stat = type { i32 }
define i32 @dashx(i8* %0) {
%2 = alloca %struct.stat
%3 = bitcast %struct.stat* %2 to i8*
%4 = call i64 @stat(i8* %0, %struct.stat* %2)
%5 = icmp eq i64 %4, 0
%6 = getelementptr inbounds %struct.stat, %struct.stat* %2, i64 0, i32 0
%7 = load i32, i32* %6
%8 = and i32 %7, 493
%9 = icmp ne i32 %8, 0
%10 = select i1 %5, i1 %9, i1 false
%11 = zext i1 %10 to i32
ret i32 %11
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ puts(char *);
void abort(void) {
  puts("abort");
  exit(0);
}


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

x86 assembly (clang, -O2):
<abort>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <puts@plt>
xor    %edi,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [6 x i8] c"abort\00"
define void @abort() {
%1 = call i32 @puts(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@.str = [6 x i8] c"abort\00"
define void @abort() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @exit(i32 0)
unreachable
}
int dataframe_elmcnt(int **df) { return df[-1][3]; }


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

x86 assembly (clang, -O2):
<dataframe_elmcnt>:
mov    -0x8(%rdi),%rax
mov    0xc(%rax),%eax
ret

LLVM IR (-O0):
define i32 @dataframe_elmcnt(i32** %0) {
%2 = alloca i32**
store i32** %0, i32*** %2
%3 = load i32**, i32*** %2
%4 = getelementptr inbounds i32*, i32** %3, i64 -1
%5 = load i32*, i32** %4
%6 = getelementptr inbounds i32, i32* %5, i64 3
%7 = load i32, i32* %6
ret i32 %7
}

LLVM IR (-O2):
define i32 @dataframe_elmcnt(i32** nocapture %0) {
%2 = getelementptr inbounds i32*, i32** %0, i64 -1
%3 = load i32*, i32** %2
%4 = getelementptr inbounds i32, i32* %3, i64 3
%5 = load i32, i32* %4
ret i32 %5
}
int func(int a) { return 2 * a; }


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

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

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

LLVM IR (-O2):
define i32 @func(i32 %0) {
%2 = shl nsw i32 %0, 1
ret i32 %2
}
/* Type definitions */
struct cpufreq_affected_cpus {
  int dummy;
};

/* Variables and functions */
struct cpufreq_affected_cpus *sysfs_get_freq_affected_cpus(unsigned int);
struct cpufreq_affected_cpus *cpufreq_get_affected_cpus(unsigned int cpu) {
  return sysfs_get_freq_affected_cpus(cpu);
}


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

x86 assembly (clang, -O2):
<cpufreq_get_affected_cpus>:
jmp    1030 <sysfs_get_freq_affected_cpus@plt>

LLVM IR (-O0):
%struct.cpufreq_affected_cpus = type { i32 }
define %struct.cpufreq_affected_cpus* @cpufreq_get_affected_cpus(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call %struct.cpufreq_affected_cpus* @sysfs_get_freq_affected_cpus(i32 %3)
ret %struct.cpufreq_affected_cpus* %4
}

LLVM IR (-O2):
%struct.cpufreq_affected_cpus = type { i32 }
define %struct.cpufreq_affected_cpus* @cpufreq_get_affected_cpus(i32 %0) {
%2 = tail call %struct.cpufreq_affected_cpus* @sysfs_get_freq_affected_cpus(i32 %0)
ret %struct.cpufreq_affected_cpus* %2
}
int c_func_1_() { return 1; }


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

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

LLVM IR (-O0):
define i32 @c_func_1_() {
ret i32 1
}

LLVM IR (-O2):
define i32 @c_func_1_() {
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ get_index_name();
scalar_t__ munmap(int *, int);
int /*<<< orphan*/ shm_error(char *);
scalar_t__ shm_unlink(int /*<<< orphan*/);
int /*<<< orphan*/ trace_flow(char *);
void unmap_index(int *index) {
  if (0) {
    trace_flow("ENTERING: unmap_index");
  }
  if (munmap(index, sizeof(int)) != 0) {
    shm_error("munmap");
  }
  if (shm_unlink(get_index_name()) != 0) {
    shm_error("shm_unlink");
  }
  if (0) {
    trace_flow("LEAVING: unmap_index");
  }
}


x86 assembly (clang, -O0):
<unmap_index>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x4,%esi
call   1050 <munmap@plt>
cmp    $0x0,%rax
je     1170 <unmap_index+0x30>
lea    0xe95(%rip),%rdi
call   1030 <shm_error@plt>
mov    $0x0,%al
call   1040 <get_index_name@plt>
mov    %eax,%edi
call   1060 <shm_unlink@plt>
cmp    $0x0,%rax
je     1194 <unmap_index+0x54>
lea    0xe78(%rip),%rdi
call   1030 <shm_error@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<unmap_index>:
push   %rax
mov    $0x4,%esi
call   1050 <munmap@plt>
test   %rax,%rax
je     115c <unmap_index+0x1c>
lea    0xea9(%rip),%rdi
call   1030 <shm_error@plt>
xor    %eax,%eax
call   1040 <get_index_name@plt>
mov    %eax,%edi
call   1060 <shm_unlink@plt>
test   %rax,%rax
je     117c <unmap_index+0x3c>
lea    0xe91(%rip),%rdi
pop    %rax
jmp    1030 <shm_error@plt>
pop    %rax
ret

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

LLVM IR (-O2):
@.str = [7 x i8] c"munmap\00"
@.str.1 = [11 x i8] c"shm_unlink\00"
define void @unmap_index(i32* %0) {
%2 = tail call i64 @munmap(i32* %0, i32 4)
%3 = icmp eq i64 %2, 0
br i1 %3, label %6, label %4
4: ; preds = %1
%5 = tail call i32 @shm_error(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
br label %6
6: ; preds = %4, %1
%7 = tail call i32 (...) @get_index_name()
%8 = tail call i64 @shm_unlink(i32 %7)
%9 = icmp eq i64 %8, 0
br i1 %9, label %12, label %10
10: ; preds = %6
%11 = tail call i32 @shm_error(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0))
br label %12
12: ; preds = %10, %6
ret void
}
int test_imm_C1uint32_mem(unsigned int *val) {
  return ((*val) & (0xC1 << 0)) ? -20 : -40;
}


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

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

LLVM IR (-O0):
define i32 @test_imm_C1uint32_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, 193
%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_C1uint32_mem(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = and i32 %2, 193
%4 = icmp eq i32 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
long C_i_fixnum_max(long x, long y) { return ((long)x > (long)y) ? x : y; }


x86 assembly (clang, -O0):
<C_i_fixnum_max>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
cmp    -0x10(%rbp),%rax
jle    1127 <C_i_fixnum_max+0x27>
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
jmp    112f <C_i_fixnum_max+0x2f>
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<C_i_fixnum_max>:
mov    %rsi,%rax
cmp    %rsi,%rdi
cmovg  %rdi,%rax
ret

LLVM IR (-O0):
define i64 @C_i_fixnum_max(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%5 = load i64, i64* %3
%6 = load i64, i64* %4
%7 = icmp sgt i64 %5, %6
br i1 %7, label %8, label %10
8: ; preds = %2
%9 = load i64, i64* %3
br label %12
10: ; preds = %2
%11 = load i64, i64* %4
br label %12
12: ; preds = %10, %8
%13 = phi i64 [ %9, %8 ], [ %11, %10 ]
ret i64 %13
}

LLVM IR (-O2):
define i64 @C_i_fixnum_max(i64 %0, i64 %1) {
%3 = icmp sgt i64 %0, %1
%4 = select i1 %3, i64 %0, i64 %1
ret i64 %4
}
/* Variables and functions */
int /*<<< orphan*/ sw_xboot_main();
int xboottest(int argc, char *argv[]) {
  sw_xboot_main();
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @xboottest(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @sw_xboot_main()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ g();
main() {
  goto a;
  if (0) {
    int i = 5;
    int j = 2;
    g();
  }
a:;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
jmp    1109 <main+0x9>
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
br label %1
1: ; preds = %0
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
first_btl_prf(loc, Base_btl_prf) int *loc, *Base_btl_prf;
{ btl_prf_FIRST_FNC_OBJ(loc, Base_btl_prf); }


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

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

LLVM IR (-O0):
define i32 @first_btl_prf(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** %4
%7 = load i32*, i32** %5
%8 = call i32 (i32*, i32*, ...) bitcast (i32 (...)* @btl_prf_FIRST_FNC_OBJ to i32 (i32*, i32*, ...)*)(i32* %6, i32* %7)
%9 = load i32, i32* %3
ret i32 %9
}

LLVM IR (-O2):
define i32 @first_btl_prf(i32* %0, i32* %1) {
%3 = tail call i32 (i32*, i32*, ...) bitcast (i32 (...)* @btl_prf_FIRST_FNC_OBJ to i32 (i32*, i32*, ...)*)(i32* %0, i32* %1)
ret i32 undef
}
/* Variables and functions */
int my_strlen(char *);
int main(void) { return my_strlen("Hello world !"); }


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeda(%rip),%rdi
call   1030 <my_strlen@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [14 x i8] c"Hello world !\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @my_strlen(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
ret i32 %2
}

LLVM IR (-O2):
@.str = [14 x i8] c"Hello world !\00"
define i32 @main() {
%1 = tail call i32 @my_strlen(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
ret i32 %1
}
/* Type definitions */
struct gfx_state {
  int dummy;
};

/* Variables and functions */
int getchar();
int gfx_getch(struct gfx_state *s) {
  (void)s;
  return getchar();
}


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

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

LLVM IR (-O0):
%struct.gfx_state = type { i32 }
define i32 @gfx_getch(%struct.gfx_state* %0) {
%2 = alloca %struct.gfx_state*
store %struct.gfx_state* %0, %struct.gfx_state** %2
%3 = load %struct.gfx_state*, %struct.gfx_state** %2
%4 = call i32 (...) @getchar()
ret i32 %4
}

LLVM IR (-O2):
%struct.gfx_state = type { i32 }
define i32 @gfx_getch(%struct.gfx_state* nocapture readnone %0) {
%2 = tail call i32 (...) @getchar()
ret i32 %2
}
char tty_hex(unsigned char b) {
  if (b < 10)
    return '0' + b;
  return 'a' + (b - 10);
}


x86 assembly (clang, -O0):
<tty_hex>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x2(%rbp)
movzbl -0x2(%rbp),%eax
cmp    $0xa,%eax
jge    1126 <tty_hex+0x26>
movzbl -0x2(%rbp),%eax
add    $0x30,%eax
mov    %al,-0x1(%rbp)
jmp    1133 <tty_hex+0x33>
movzbl -0x2(%rbp),%eax
sub    $0xa,%eax
add    $0x61,%eax
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<tty_hex>:
cmp    $0xa,%dil
mov    $0x30,%ecx
mov    $0x57,%eax
cmovb  %ecx,%eax
add    %dil,%al
ret

LLVM IR (-O0):
define signext i8 @tty_hex(i8 zeroext %0) {
%2 = alloca i8
%3 = alloca i8
store i8 %0, i8* %3
%4 = load i8, i8* %3
%5 = zext i8 %4 to i32
%6 = icmp slt i32 %5, 10
br i1 %6, label %7, label %12
7: ; preds = %1
%8 = load i8, i8* %3
%9 = zext i8 %8 to i32
%10 = add nsw i32 48, %9
%11 = trunc i32 %10 to i8
store i8 %11, i8* %2
br label %18
12: ; preds = %1
%13 = load i8, i8* %3
%14 = zext i8 %13 to i32
%15 = sub nsw i32 %14, 10
%16 = add nsw i32 97, %15
%17 = trunc i32 %16 to i8
store i8 %17, i8* %2
br label %18
18: ; preds = %12, %7
%19 = load i8, i8* %2
ret i8 %19
}

LLVM IR (-O2):
define signext i8 @tty_hex(i8 zeroext %0) {
%2 = icmp ult i8 %0, 10
%3 = select i1 %2, i8 48, i8 87
%4 = add i8 %3, %0
ret i8 %4
}
/* Variables and functions */
int /*<<< orphan*/ fork_stuff();
int main() {
  fork_stuff();
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @fork_stuff()
ret i32 0
}
/* Variables and functions */
int strcmp(char const *, char const *);
int cmp_sha1(const char *a, const char *b) { return strcmp(a, b); }


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

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

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

LLVM IR (-O2):
define i32 @cmp_sha1(i8* nocapture %0, i8* nocapture %1) {
%3 = tail call i32 @strcmp(i8* dereferenceable(1) %0, i8* dereferenceable(1) %1)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int executeWait(void) {
  printf("Some time passes...\n");
  return 1;
}


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

x86 assembly (clang, -O2):
<executeWait>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <puts@plt>
mov    $0x1,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [21 x i8] c"Some time passes...\0A\00"
define i32 @executeWait() {
%1 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0))
ret i32 1
}

LLVM IR (-O2):
@str = [20 x i8] c"Some time passes...\00"
define i32 @executeWait() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @str, i64 0, i64 0))
ret i32 1
}
/* Type definitions */
typedef int __u32;

/* Variables and functions */
void copy4(unsigned char *out, __u32 x) {
  out[0] = x & 0xFF;
  out[1] = (x >> 8) & 0xFF;
  out[2] = (x >> 16) & 0xFF;
  out[3] = (x >> 24) & 0xFF;
}


x86 assembly (clang, -O0):
<copy4>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
and    $0xff,%eax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
mov    -0xc(%rbp),%eax
sar    $0x8,%eax
and    $0xff,%eax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,0x1(%rax)
mov    -0xc(%rbp),%eax
sar    $0x10,%eax
and    $0xff,%eax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,0x2(%rax)
mov    -0xc(%rbp),%eax
sar    $0x18,%eax
and    $0xff,%eax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,0x3(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<copy4>:
mov    %esi,(%rdi)
ret

LLVM IR (-O0):
define void @copy4(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = and i32 %5, 255
%7 = trunc i32 %6 to i8
%8 = load i8*, i8** %3
%9 = getelementptr inbounds i8, i8* %8, i64 0
store i8 %7, i8* %9
%10 = load i32, i32* %4
%11 = ashr i32 %10, 8
%12 = and i32 %11, 255
%13 = trunc i32 %12 to i8
%14 = load i8*, i8** %3
%15 = getelementptr inbounds i8, i8* %14, i64 1
store i8 %13, i8* %15
%16 = load i32, i32* %4
%17 = ashr i32 %16, 16
%18 = and i32 %17, 255
%19 = trunc i32 %18 to i8
%20 = load i8*, i8** %3
%21 = getelementptr inbounds i8, i8* %20, i64 2
store i8 %19, i8* %21
%22 = load i32, i32* %4
%23 = ashr i32 %22, 24
%24 = and i32 %23, 255
%25 = trunc i32 %24 to i8
%26 = load i8*, i8** %3
%27 = getelementptr inbounds i8, i8* %26, i64 3
store i8 %25, i8* %27
ret void
}

LLVM IR (-O2):
define void @copy4(i8* nocapture writeonly %0, i32 %1) {
%3 = trunc i32 %1 to i8
store i8 %3, i8* %0
%4 = lshr i32 %1, 8
%5 = trunc i32 %4 to i8
%6 = getelementptr inbounds i8, i8* %0, i64 1
store i8 %5, i8* %6
%7 = lshr i32 %1, 16
%8 = trunc i32 %7 to i8
%9 = getelementptr inbounds i8, i8* %0, i64 2
store i8 %8, i8* %9
%10 = lshr i32 %1, 24
%11 = trunc i32 %10 to i8
%12 = getelementptr inbounds i8, i8* %0, i64 3
store i8 %11, i8* %12
ret void
}
int threefourths(int x) {
  int xl2 = x & 0x3;
  int xl1 = (x & 1) << 1;
  int x_mask = x >> ((sizeof(int) << 3) - 1u);
  int bias = x_mask & 3;
  int incr = (xl2 + xl1 + bias) >> 2;
  int s2 = x >> 2;
  int s1 = x >> 1;
  return s1 + s2 + incr;
}


x86 assembly (clang, -O0):
<threefourths>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
and    $0x3,%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
and    $0x1,%eax
shl    $0x1,%eax
mov    %eax,-0xc(%rbp)
mov    -0x4(%rbp),%eax
sar    $0x1f,%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
and    $0x3,%eax
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%eax
add    -0xc(%rbp),%eax
add    -0x14(%rbp),%eax
sar    $0x2,%eax
mov    %eax,-0x18(%rbp)
mov    -0x4(%rbp),%eax
sar    $0x2,%eax
mov    %eax,-0x1c(%rbp)
mov    -0x4(%rbp),%eax
sar    $0x1,%eax
mov    %eax,-0x20(%rbp)
mov    -0x20(%rbp),%eax
add    -0x1c(%rbp),%eax
add    -0x18(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<threefourths>:
mov    %edi,%eax
and    $0x3,%eax
mov    %edi,%ecx
and    $0x1,%ecx
mov    %edi,%edx
sar    $0x1f,%edx
and    $0x3,%edx
lea    (%rax,%rcx,2),%ecx
add    %edx,%ecx
shr    $0x2,%ecx
mov    %edi,%eax
sar    $0x2,%eax
sar    %edi
add    %edi,%eax
add    %ecx,%eax
ret

LLVM IR (-O0):
define i32 @threefourths(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
store i32 %0, i32* %2
%10 = load i32, i32* %2
%11 = and i32 %10, 3
store i32 %11, i32* %3
%12 = load i32, i32* %2
%13 = and i32 %12, 1
%14 = shl i32 %13, 1
store i32 %14, i32* %4
%15 = load i32, i32* %2
%16 = ashr i32 %15, 31
store i32 %16, i32* %5
%17 = load i32, i32* %5
%18 = and i32 %17, 3
store i32 %18, i32* %6
%19 = load i32, i32* %3
%20 = load i32, i32* %4
%21 = add nsw i32 %19, %20
%22 = load i32, i32* %6
%23 = add nsw i32 %21, %22
%24 = ashr i32 %23, 2
store i32 %24, i32* %7
%25 = load i32, i32* %2
%26 = ashr i32 %25, 2
store i32 %26, i32* %8
%27 = load i32, i32* %2
%28 = ashr i32 %27, 1
store i32 %28, i32* %9
%29 = load i32, i32* %9
%30 = load i32, i32* %8
%31 = add nsw i32 %29, %30
%32 = load i32, i32* %7
%33 = add nsw i32 %31, %32
ret i32 %33
}

LLVM IR (-O2):
define i32 @threefourths(i32 %0) {
%2 = and i32 %0, 3
%3 = shl i32 %0, 1
%4 = and i32 %3, 2
%5 = icmp slt i32 %0, 0
%6 = select i1 %5, i32 3, i32 0
%7 = add nuw nsw i32 %4, %2
%8 = add nuw nsw i32 %7, %6
%9 = lshr i32 %8, 2
%10 = ashr i32 %0, 2
%11 = ashr i32 %0, 1
%12 = add nsw i32 %11, %10
%13 = add nsw i32 %12, %9
ret i32 %13
}
/* Type definitions */
typedef int /*<<< orphan*/ u_int32_t;

/* Variables and functions */
int /*<<< orphan*/ SOL_SOCKET;
int /*<<< orphan*/ SO_SNDBUF;
int setsockopt(int, int /*<<< orphan*/, int /*<<< orphan*/,
               int /*<<< orphan*/ *, int);
int set_sndbuf(int socket, u_int32_t buff_size) {
  return setsockopt(socket, SOL_SOCKET, SO_SNDBUF, &buff_size,
                    sizeof(u_int32_t));
}


x86 assembly (clang, -O0):
<set_sndbuf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edi
mov    0x2ec0(%rip),%rax
mov    (%rax),%esi
mov    0x2eaf(%rip),%rax
mov    (%rax),%edx
lea    -0x8(%rbp),%rcx
mov    $0x4,%r8d
call   1030 <setsockopt@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_sndbuf>:
push   %rax
mov    %esi,0x4(%rsp)
mov    0x2ecc(%rip),%rax
mov    (%rax),%esi
mov    0x2ebb(%rip),%rax
mov    (%rax),%edx
lea    0x4(%rsp),%rcx
mov    $0x4,%r8d
call   1030 <setsockopt@plt>
pop    %rcx
ret

LLVM IR (-O0):
@SOL_SOCKET = global i32 0
@SO_SNDBUF = global i32 0
define i32 @set_sndbuf(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* @SOL_SOCKET
%7 = load i32, i32* @SO_SNDBUF
%8 = call i32 @setsockopt(i32 %5, i32 %6, i32 %7, i32* %4, i32 4)
ret i32 %8
}

LLVM IR (-O2):
@SOL_SOCKET = global i32 0
@SO_SNDBUF = global i32 0
define i32 @set_sndbuf(i32 %0, i32 %1) {
%3 = alloca i32
store i32 %1, i32* %3
%4 = load i32, i32* @SOL_SOCKET
%5 = load i32, i32* @SO_SNDBUF
%6 = call i32 @setsockopt(i32 %0, i32 %4, i32 %5, i32* %3, i32 4)
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ echo(char *);
after() { echo("Hello"); }


x86 assembly (clang, -O0):
<after>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xee1(%rip),%rdi
call   1030 <echo@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [6 x i8] c"Hello\00"
define i32 @after() {
%1 = alloca i32
%2 = call i32 @echo(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* %1
ret i32 %3
}

LLVM IR (-O2):
@.str = [6 x i8] c"Hello\00"
define i32 @after() {
%1 = tail call i32 @echo(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
ret i32 undef
}
int Size_GetHashCode(void) { return 0; }


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

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

LLVM IR (-O0):
define i32 @Size_GetHashCode() {
ret i32 0
}

LLVM IR (-O2):
define i32 @Size_GetHashCode() {
ret i32 0
}
signed long long dynref__append(struct dynref__obj *const p,
                                struct dynref__buffer *const buf,
                                const signed long long ref) {}


x86 assembly (clang, -O0):
<dynref__append>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.dynref__obj = type opaque
%struct.dynref__buffer = type opaque
define i64 @dynref__append(%struct.dynref__obj* %0, %struct.dynref__buffer* %1, i64 %2) {
%4 = alloca i64
%5 = alloca %struct.dynref__obj*
%6 = alloca %struct.dynref__buffer*
%7 = alloca i64
store %struct.dynref__obj* %0, %struct.dynref__obj** %5
store %struct.dynref__buffer* %1, %struct.dynref__buffer** %6
store i64 %2, i64* %7
%8 = load i64, i64* %4
ret i64 %8
}

LLVM IR (-O2):
%struct.dynref__obj = type opaque
%struct.dynref__buffer = type opaque
define i64 @dynref__append(%struct.dynref__obj* nocapture readnone %0, %struct.dynref__buffer* nocapture readnone %1, i64 %2) {
ret i64 undef
}
/* Type definitions */
typedef scalar_t__ off_t;

/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, long long, char const *,
                           char const *);
int /*<<< orphan*/ stderr;
void line_ignored(const char *path, off_t n, const char *line) {
  fprintf(stderr, "ignored invalid line %lld in %s: %s", (long long)n, path,
          line);
}


x86 assembly (clang, -O0):
<line_ignored>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rdx
mov    -0x8(%rbp),%rcx
mov    -0x18(%rbp),%r8
lea    0xec0(%rip),%rsi
call   1030 <fprintf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<line_ignored>:
mov    %rdx,%r8
mov    %rsi,%rdx
mov    %rdi,%rcx
mov    0x2ec0(%rip),%rax
mov    (%rax),%edi
lea    0xed7(%rip),%rsi
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [36 x i8] c"ignored invalid line %lld in %s: %s\00"
define void @line_ignored(i8* %0, i64 %1, i8* %2) {
%4 = alloca i8*
%5 = alloca i64
%6 = alloca i8*
store i8* %0, i8** %4
store i64 %1, i64* %5
store i8* %2, i8** %6
%7 = load i32, i32* @stderr
%8 = load i64, i64* %5
%9 = load i8*, i8** %4
%10 = load i8*, i8** %6
%11 = call i32 @fprintf(i32 %7, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0), i64 %8, i8* %9, i8* %10)
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [36 x i8] c"ignored invalid line %lld in %s: %s\00"
define void @line_ignored(i8* %0, i64 %1, i8* %2) {
%4 = load i32, i32* @stderr
%5 = tail call i32 @fprintf(i32 %4, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0), i64 %1, i8* %0, i8* %2)
ret void
}
int mc_utf8_charlen(int ch) {
  return (0 == (ch & 0x80))      ? 1
         : (0xc0 == (ch & 0xe0)) ? 2
         : (0xe0 == (ch & 0xf0)) ? 3
         : (0xf0 == (ch & 0xf8)) ? 4
                                 : 0;
}


x86 assembly (clang, -O0):
<mc_utf8_charlen>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%ecx
and    $0x80,%ecx
xor    %eax,%eax
cmp    %ecx,%eax
jne    1127 <mc_utf8_charlen+0x27>
mov    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1196 <mc_utf8_charlen+0x96>
mov    -0x4(%rbp),%ecx
and    $0xe0,%ecx
mov    $0xc0,%eax
cmp    %ecx,%eax
jne    114a <mc_utf8_charlen+0x4a>
mov    $0x2,%eax
mov    %eax,-0xc(%rbp)
jmp    1190 <mc_utf8_charlen+0x90>
mov    -0x4(%rbp),%ecx
and    $0xf0,%ecx
mov    $0xe0,%eax
cmp    %ecx,%eax
jne    116d <mc_utf8_charlen+0x6d>
mov    $0x3,%eax
mov    %eax,-0x10(%rbp)
jmp    118a <mc_utf8_charlen+0x8a>
mov    -0x4(%rbp),%esi
and    $0xf8,%esi
mov    $0xf0,%edx
xor    %eax,%eax
mov    $0x4,%ecx
cmp    %esi,%edx
cmove  %ecx,%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<mc_utf8_charlen>:
mov    $0x1,%eax
test   $0x80,%dil
je     1149 <mc_utf8_charlen+0x49>
mov    %edi,%ecx
and    $0xe0,%ecx
mov    $0x2,%eax
cmp    $0xc0,%ecx
je     1149 <mc_utf8_charlen+0x49>
mov    %edi,%ecx
and    $0xf0,%ecx
mov    $0x3,%eax
cmp    $0xe0,%ecx
je     1149 <mc_utf8_charlen+0x49>
and    $0xf8,%edi
xor    %eax,%eax
cmp    $0xf0,%edi
sete   %al
shl    $0x2,%eax
ret

LLVM IR (-O0):
define i32 @mc_utf8_charlen(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = and i32 %3, 128
%5 = icmp eq i32 0, %4
br i1 %5, label %6, label %7
6: ; preds = %1
br label %27
7: ; preds = %1
%8 = load i32, i32* %2
%9 = and i32 %8, 224
%10 = icmp eq i32 192, %9
br i1 %10, label %11, label %12
11: ; preds = %7
br label %25
12: ; preds = %7
%13 = load i32, i32* %2
%14 = and i32 %13, 240
%15 = icmp eq i32 224, %14
br i1 %15, label %16, label %17
16: ; preds = %12
br label %23
17: ; preds = %12
%18 = load i32, i32* %2
%19 = and i32 %18, 248
%20 = icmp eq i32 240, %19
%21 = zext i1 %20 to i64
%22 = select i1 %20, i32 4, i32 0
br label %23
23: ; preds = %17, %16
%24 = phi i32 [ 3, %16 ], [ %22, %17 ]
br label %25
25: ; preds = %23, %11
%26 = phi i32 [ 2, %11 ], [ %24, %23 ]
br label %27
27: ; preds = %25, %6
%28 = phi i32 [ 1, %6 ], [ %26, %25 ]
ret i32 %28
}

LLVM IR (-O2):
define i32 @mc_utf8_charlen(i32 %0) {
%2 = and i32 %0, 128
%3 = icmp eq i32 %2, 0
br i1 %3, label %14, label %4
4: ; preds = %1
%5 = and i32 %0, 224
%6 = icmp eq i32 %5, 192
br i1 %6, label %14, label %7
7: ; preds = %4
%8 = and i32 %0, 240
%9 = icmp eq i32 %8, 224
br i1 %9, label %14, label %10
10: ; preds = %7
%11 = and i32 %0, 248
%12 = icmp eq i32 %11, 240
%13 = select i1 %12, i32 4, i32 0
br label %14
14: ; preds = %4, %7, %10, %1
%15 = phi i32 [ 1, %1 ], [ 2, %4 ], [ %13, %10 ], [ 3, %7 ]
ret i32 %15
}
void close_logger() { return; }


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

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

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

LLVM IR (-O2):
define void @close_logger() {
ret void
}
/* Type definitions */
struct program {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ free(struct program *);
void program_destroy(struct program *prog) { free(prog); }


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

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

LLVM IR (-O0):
%struct.program = type { i32 }
define void @program_destroy(%struct.program* %0) {
%2 = alloca %struct.program*
store %struct.program* %0, %struct.program** %2
%3 = load %struct.program*, %struct.program** %2
%4 = call i32 @free(%struct.program* %3)
ret void
}

LLVM IR (-O2):
%struct.program = type { i32 }
define void @program_destroy(%struct.program* nocapture %0) {
%2 = tail call i32 @free(%struct.program* %0)
ret void
}
void timing(int start, const char *label) {}


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

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

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

LLVM IR (-O2):
define void @timing(i32 %0, i8* nocapture %1) {
ret void
}
/* Variables and functions */
void *malloc(int);
void *btic1g_malloc(int sz) { return (malloc(sz)); }


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

x86 assembly (clang, -O2):
<btic1g_malloc>:
jmp    1030 <malloc@plt>

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

LLVM IR (-O2):
define noalias i8* @btic1g_malloc(i32 %0) {
%2 = tail call i8* @malloc(i32 %0)
ret i8* %2
}
double e2r(double embar, double Pmbar) {
  double r;
  r = 0.62197 / ((Pmbar / embar) - 1.0);
  return (r);
}


x86 assembly (clang, -O0):
<e2r>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm1
divsd  -0x8(%rbp),%xmm1
movsd  0xee8(%rip),%xmm0
subsd  %xmm0,%xmm1
movsd  0xed4(%rip),%xmm0
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<e2r>:
divsd  %xmm0,%xmm1
addsd  0xef4(%rip),%xmm1
movsd  0xef4(%rip),%xmm0
divsd  %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @e2r(double %0, double %1) {
%3 = alloca double
%4 = alloca double
%5 = alloca double
store double %0, double* %3
store double %1, double* %4
%6 = load double, double* %4
%7 = load double, double* %3
%8 = fdiv double %6, %7
%9 = fsub double %8, 1.000000e+00
%10 = fdiv double 6.219700e-01, %9
store double %10, double* %5
%11 = load double, double* %5
ret double %11
}

LLVM IR (-O2):
define double @e2r(double %0, double %1) {
%3 = fdiv double %1, %0
%4 = fadd double %3, -1.000000e+00
%5 = fdiv double 6.219700e-01, %4
ret double %5
}
__attribute__((no, noclone)) unsigned __int128 t173_3mul(unsigned __int128 y) {
  unsigned __int128 r;
  if (__builtin_mul_overflow((unsigned __int128)(1), y, &r))
    bar();
  return r;
}


x86 assembly (clang, -O0):
<t173_3mul>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %rdi,-0x20(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x20(%rbp),%rax
mov    -0x18(%rbp),%rcx
mov    %rcx,-0x28(%rbp)
mov    %rax,-0x30(%rbp)
mov    -0x30(%rbp),%rcx
mov    -0x28(%rbp),%rdx
xor    %eax,%eax
mov    %rdx,-0x38(%rbp)
mov    %rcx,-0x40(%rbp)
test   $0x1,%al
jne    114f <t173_3mul+0x3f>
jmp    1156 <t173_3mul+0x46>
mov    $0x0,%al
call   1030 <bar@plt>
mov    -0x40(%rbp),%rax
mov    -0x38(%rbp),%rcx
mov    %rcx,-0x8(%rbp)
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    -0x8(%rbp),%rdx
add    $0x40,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define { i64, i64 } @t173_3mul(i64 %0, i64 %1) {
%3 = alloca i128
%4 = alloca i128
%5 = alloca i128
%6 = alloca i128
%7 = bitcast i128* %4 to { i64, i64 }*
%8 = getelementptr inbounds { i64, i64 }, { i64, i64 }* %7, i32 0, i32 0
store i64 %0, i64* %8
%9 = getelementptr inbounds { i64, i64 }, { i64, i64 }* %7, i32 0, i32 1
store i64 %1, i64* %9
%10 = load i128, i128* %4
store i128 %10, i128* %5
%11 = load i128, i128* %5
%12 = call { i128, i1 } @llvm.umul.with.overflow.i128(i128 1, i128 %11)
%13 = extractvalue { i128, i1 } %12, 1
%14 = extractvalue { i128, i1 } %12, 0
store i128 %14, i128* %6
br i1 %13, label %15, label %17
15: ; preds = %2
%16 = call i32 (...) @bar()
br label %17
17: ; preds = %15, %2
%18 = load i128, i128* %6
store i128 %18, i128* %3
%19 = bitcast i128* %3 to { i64, i64 }*
%20 = load { i64, i64 }, { i64, i64 }* %19
ret { i64, i64 } %20
}

LLVM IR (-O2):
define { i64, i64 } @t173_3mul(i64 %0, i64 %1) {
%3 = insertvalue { i64, i64 } poison, i64 %0, 0
%4 = insertvalue { i64, i64 } %3, i64 %1, 1
ret { i64, i64 } %4
}
/* Variables and functions */
unsigned int _xgetbv(int /*<<< orphan*/);
int /*<<< orphan*/ _xsetbv(int /*<<< orphan*/, int /*<<< orphan*/);
unsigned int xgetsetbv(void) {
  _xsetbv(0, 0);
  return _xgetbv(0);
}


x86 assembly (clang, -O0):
<xgetsetbv>:
push   %rbp
mov    %rsp,%rbp
xor    %esi,%esi
mov    %esi,%edi
call   1030 <_xsetbv@plt>
xor    %edi,%edi
call   1040 <_xgetbv@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<xgetsetbv>:
push   %rax
xor    %edi,%edi
xor    %esi,%esi
call   1030 <_xsetbv@plt>
xor    %edi,%edi
pop    %rax
jmp    1040 <_xgetbv@plt>

LLVM IR (-O0):
define i32 @xgetsetbv() {
%1 = call i32 @_xsetbv(i32 0, i32 0)
%2 = call i32 @_xgetbv(i32 0)
ret i32 %2
}

LLVM IR (-O2):
define i32 @xgetsetbv() {
%1 = tail call i32 @_xsetbv(i32 0, i32 0)
%2 = tail call i32 @_xgetbv(i32 0)
ret i32 %2
}
void gendmultu() {}


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

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

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

LLVM IR (-O2):
define void @gendmultu() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ IPPROTO_IP;
int IPTOS_LOWDELAY;
int /*<<< orphan*/ IP_TOS;
int /*<<< orphan*/ setsockopt(int, int /*<<< orphan*/, int /*<<< orphan*/,
                              int *, int);
void set_ip_tos(int fd) {
  int tos = IPTOS_LOWDELAY;
  setsockopt(fd, IPPROTO_IP, IP_TOS, &tos, sizeof(int));
}


x86 assembly (clang, -O0):
<set_ip_tos>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    0x2ed6(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%edi
mov    0x2eaf(%rip),%rax
mov    (%rax),%esi
mov    0x2e9e(%rip),%rax
mov    (%rax),%edx
lea    -0x8(%rbp),%rcx
mov    $0x4,%r8d
call   1030 <setsockopt@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_ip_tos>:
push   %rax
mov    0x2ee0(%rip),%rax
mov    (%rax),%eax
mov    %eax,0x4(%rsp)
mov    0x2ebb(%rip),%rax
mov    (%rax),%esi
mov    0x2eaa(%rip),%rax
mov    (%rax),%edx
lea    0x4(%rsp),%rcx
mov    $0x4,%r8d
call   1030 <setsockopt@plt>
pop    %rax
ret

LLVM IR (-O0):
@IPTOS_LOWDELAY = global i32 0
@IPPROTO_IP = global i32 0
@IP_TOS = global i32 0
define void @set_ip_tos(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = load i32, i32* @IPTOS_LOWDELAY
store i32 %4, i32* %3
%5 = load i32, i32* %2
%6 = load i32, i32* @IPPROTO_IP
%7 = load i32, i32* @IP_TOS
%8 = call i32 @setsockopt(i32 %5, i32 %6, i32 %7, i32* %3, i32 4)
ret void
}

LLVM IR (-O2):
@IPTOS_LOWDELAY = global i32 0
@IPPROTO_IP = global i32 0
@IP_TOS = global i32 0
define void @set_ip_tos(i32 %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
%4 = load i32, i32* @IPTOS_LOWDELAY
store i32 %4, i32* %2
%5 = load i32, i32* @IPPROTO_IP
%6 = load i32, i32* @IP_TOS
%7 = call i32 @setsockopt(i32 %0, i32 %5, i32 %6, i32* %2, i32 4)
ret void
}
/* Variables and functions */
scalar_t__ calloc(size_t, int);
float *vector0(long nl, long nh) {
  float *v;
  v = (float *)calloc((size_t)(nh - nl + 1 + 0), sizeof(float));
  return v - nl + 0;
}


x86 assembly (clang, -O0):
<vector0>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
sub    -0x8(%rbp),%rdi
add    $0x1,%rdi
add    $0x0,%rdi
mov    $0x4,%esi
call   1030 <calloc@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
xor    %ecx,%ecx
sub    -0x8(%rbp),%rcx
shl    $0x2,%rcx
add    %rcx,%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<vector0>:
push   %rbx
mov    %rdi,%rbx
sub    %rdi,%rsi
lea    0x1(%rsi),%rdi
mov    $0x4,%esi
call   1030 <calloc@plt>
shl    $0x2,%rbx
sub    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
define float* @vector0(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
%5 = alloca float*
store i64 %0, i64* %3
store i64 %1, i64* %4
%6 = load i64, i64* %4
%7 = load i64, i64* %3
%8 = sub nsw i64 %6, %7
%9 = add nsw i64 %8, 1
%10 = add nsw i64 %9, 0
%11 = call i64 @calloc(i64 %10, i32 4)
%12 = inttoptr i64 %11 to float*
store float* %12, float** %5
%13 = load float*, float** %5
%14 = load i64, i64* %3
%15 = sub i64 0, %14
%16 = getelementptr inbounds float, float* %13, i64 %15
%17 = getelementptr inbounds float, float* %16, i64 0
ret float* %17
}

LLVM IR (-O2):
define float* @vector0(i64 %0, i64 %1) {
%3 = sub i64 0, %0
%4 = sub i64 1, %0
%5 = add i64 %4, %1
%6 = tail call i64 @calloc(i64 %5, i32 4)
%7 = inttoptr i64 %6 to float*
%8 = getelementptr inbounds float, float* %7, i64 %3
ret float* %8
}