xunge/DecIR huggingface dataset:
/* Variables and functions */
int strncmp(void const *, void const *, int const);
int cmp_cache(const void *p1, const void *p2, const int len) {
  return strncmp(p1, p2, len);
}


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

x86 assembly (clang, -O2):
<cmp_cache>:
jmp    1030 <strncmp@plt>

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

LLVM IR (-O2):
define i32 @cmp_cache(i8* %0, i8* %1, i32 %2) {
%4 = tail call i32 @strncmp(i8* %0, i8* %1, i32 %2)
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ abort();
void f19(long j) {
  if ((j & ((1UL << (19)) - 1)) >= ((1UL << ((19) - 1)) + 2))
    abort();
}


x86 assembly (clang, -O0):
<f19>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
and    $0x7ffff,%rax
cmp    $0x40002,%rax
jb     1139 <f19+0x29>
mov    $0x0,%al
call   1030 <abort@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f19>:
and    $0x7fffe,%edi
cmp    $0x40002,%edi
jae    111f <f19+0xf>
ret
push   %rax
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
define void @f19(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = and i64 %3, 524287
%5 = icmp uge i64 %4, 262146
br i1 %5, label %6, label %8
6: ; preds = %1
%7 = call i32 (...) @abort()
unreachable
8: ; preds = %1
ret void
}

LLVM IR (-O2):
define void @f19(i64 %0) {
%2 = and i64 %0, 524286
%3 = icmp ugt i64 %2, 262145
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i32 (...) @abort()
unreachable
6: ; preds = %1
ret void
}
void IE_Init_Cvars(void) {}


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

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

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

LLVM IR (-O2):
define void @IE_Init_Cvars() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ checkTimer(int);
int startTimer(int);
int main() {
  int t;
  t = startTimer(1);
  while (!checkTimer(t))
    ;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x1,%edi
call   1040 <startTimer@plt>
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%edi
call   1030 <checkTimer@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
test   $0x1,%al
jne    1159 <main+0x39>
jmp    115e <main+0x3e>
jmp    113c <main+0x1c>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    $0x1,%edi
call   1040 <startTimer@plt>
mov    %eax,%ebx
nopl   (%rax)
mov    %ebx,%edi
call   1030 <checkTimer@plt>
test   %eax,%eax
je     1130 <main+0x10>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
%3 = call i32 @startTimer(i32 1)
store i32 %3, i32* %2
br label %4
4: ; preds = %9, %0
%5 = load i32, i32* %2
%6 = call i32 @checkTimer(i32 %5)
%7 = icmp ne i32 %6, 0
%8 = xor i1 %7, true
br i1 %8, label %9, label %10
9: ; preds = %4
br label %4
10: ; preds = %4
%11 = load i32, i32* %1
ret i32 %11
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @startTimer(i32 1)
br label %2
2: ; preds = %2, %0
%3 = tail call i32 @checkTimer(i32 %1)
%4 = icmp eq i32 %3, 0
br i1 %4, label %2, label %5
5: ; preds = %2
ret i32 0
}
/* Variables and functions */
int tolower(char volatile);
int t_tolower(char ch) {
  volatile char xc = ch;
  return tolower(xc);
}


x86 assembly (clang, -O0):
<t_tolower>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    -0x1(%rbp),%al
mov    %al,-0x2(%rbp)
mov    -0x2(%rbp),%al
movsbl %al,%edi
call   1030 <tolower@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_tolower>:
mov    %dil,-0x1(%rsp)
movsbl -0x1(%rsp),%edi
jmp    1030 <tolower@plt>

LLVM IR (-O0):
define i32 @t_tolower(i8 signext %0) {
%2 = alloca i8
%3 = alloca i8
store i8 %0, i8* %2
%4 = load i8, i8* %2
store volatile i8 %4, i8* %3
%5 = load volatile i8, i8* %3
%6 = call i32 @tolower(i8 signext %5)
ret i32 %6
}

LLVM IR (-O2):
define i32 @t_tolower(i8 signext %0) {
%2 = alloca i8
store volatile i8 %0, i8* %2
%3 = load volatile i8, i8* %2
%4 = tail call i32 @tolower(i8 signext %3)
ret i32 %4
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
int /*<<< orphan*/ ehrpwm_write(int /*<<< orphan*/, int, unsigned char);
int ehrpwm_hr_set_cmpval(uint8_t module, unsigned char val) {
  ehrpwm_write(module, 0x10, val << 8);
  return 0;
}


x86 assembly (clang, -O0):
<ehrpwm_hr_set_cmpval>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %sil,%al
mov    %edi,-0x4(%rbp)
mov    %al,-0x5(%rbp)
mov    -0x4(%rbp),%edi
movzbl -0x5(%rbp),%eax
shl    $0x8,%eax
mov    $0x10,%esi
movzbl %al,%edx
call   1030 <ehrpwm_write@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ehrpwm_hr_set_cmpval>:
push   %rax
mov    $0x10,%esi
xor    %edx,%edx
call   1030 <ehrpwm_write@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @ehrpwm_hr_set_cmpval(i32 %0, i8 zeroext %1) {
%3 = alloca i32
%4 = alloca i8
store i32 %0, i32* %3
store i8 %1, i8* %4
%5 = load i32, i32* %3
%6 = load i8, i8* %4
%7 = zext i8 %6 to i32
%8 = shl i32 %7, 8
%9 = trunc i32 %8 to i8
%10 = call i32 @ehrpwm_write(i32 %5, i32 16, i8 zeroext %9)
ret i32 0
}

LLVM IR (-O2):
define i32 @ehrpwm_hr_set_cmpval(i32 %0, i8 zeroext %1) {
%3 = tail call i32 @ehrpwm_write(i32 %0, i32 16, i8 zeroext 0)
ret i32 0
}
/* Type definitions */
typedef int uint8_t;
typedef int /*<<< orphan*/ uint64_t;
typedef scalar_t__ int64_t;

/* Variables and functions */
int /*<<< orphan*/ __wbeu64(int *, int /*<<< orphan*/);
int i2c_transact(int, int, int *, int, int /*<<< orphan*/);
int i2c_write_beint64(int fd, int chip_addr, int reg, int64_t value) {
  uint8_t data[1 + sizeof(uint64_t)];
  data[0] = reg;
  __wbeu64(&data[1], (uint64_t)value);
  return i2c_transact(fd, chip_addr, data, 1 + sizeof(uint64_t), 0);
}


x86 assembly (clang, -O0):
<i2c_write_beint64>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %rcx,-0x18(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x30(%rbp)
lea    -0x30(%rbp),%rdi
add    $0x4,%rdi
mov    -0x18(%rbp),%rax
mov    %eax,%esi
call   1030 <__wbeu64@plt>
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
lea    -0x30(%rbp),%rdx
mov    $0x5,%ecx
xor    %r8d,%r8d
call   1040 <i2c_transact@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<i2c_write_beint64>:
push   %rbp
push   %rbx
sub    $0x18,%rsp
mov    %esi,%ebx
mov    %edi,%ebp
mov    %edx,(%rsp)
lea    0x4(%rsp),%rdi
mov    %ecx,%esi
call   1030 <__wbeu64@plt>
mov    %rsp,%rdx
mov    %ebp,%edi
mov    %ebx,%esi
mov    $0x5,%ecx
xor    %r8d,%r8d
call   1040 <i2c_transact@plt>
add    $0x18,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @i2c_write_beint64(i32 %0, i32 %1, i32 %2, i64 %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i64
%9 = alloca [5 x i32]
store i32 %0, i32* %5
store i32 %1, i32* %6
store i32 %2, i32* %7
store i64 %3, i64* %8
%10 = load i32, i32* %7
%11 = getelementptr inbounds [5 x i32], [5 x i32]* %9, i64 0, i64 0
store i32 %10, i32* %11
%12 = getelementptr inbounds [5 x i32], [5 x i32]* %9, i64 0, i64 1
%13 = load i64, i64* %8
%14 = trunc i64 %13 to i32
%15 = call i32 @__wbeu64(i32* %12, i32 %14)
%16 = load i32, i32* %5
%17 = load i32, i32* %6
%18 = getelementptr inbounds [5 x i32], [5 x i32]* %9, i64 0, i64 0
%19 = call i32 @i2c_transact(i32 %16, i32 %17, i32* %18, i32 5, i32 0)
ret i32 %19
}

LLVM IR (-O2):
define i32 @i2c_write_beint64(i32 %0, i32 %1, i32 %2, i64 %3) {
%5 = alloca [5 x i32]
%6 = bitcast [5 x i32]* %5 to i8*
%7 = getelementptr inbounds [5 x i32], [5 x i32]* %5, i64 0, i64 0
store i32 %2, i32* %7
%8 = getelementptr inbounds [5 x i32], [5 x i32]* %5, i64 0, i64 1
%9 = trunc i64 %3 to i32
%10 = call i32 @__wbeu64(i32* %8, i32 %9)
%11 = call i32 @i2c_transact(i32 %0, i32 %1, i32* %7, i32 5, i32 0)
ret i32 %11
}
/* Variables and functions */
int pt_compare_min(char *, char *);
int pt_qsort_compare(const void *a, const void *b) {
  return pt_compare_min((char *)a, (char *)b);
}


x86 assembly (clang, -O0):
<pt_qsort_compare>:
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 <pt_compare_min@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pt_qsort_compare>:
jmp    1030 <pt_compare_min@plt>

LLVM IR (-O0):
define i32 @pt_qsort_compare(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 @pt_compare_min(i8* %5, i8* %6)
ret i32 %7
}

LLVM IR (-O2):
define i32 @pt_qsort_compare(i8* %0, i8* %1) {
%3 = tail call i32 @pt_compare_min(i8* %0, i8* %1)
ret i32 %3
}
/* Variables and functions */
scalar_t__ general_int_hash_func(long);
long int_hash_func(void *key) { return (long)general_int_hash_func((long)key); }


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

x86 assembly (clang, -O2):
<int_hash_func>:
jmp    1030 <general_int_hash_func@plt>

LLVM IR (-O0):
define i64 @int_hash_func(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = ptrtoint i8* %3 to i64
%5 = call i64 @general_int_hash_func(i64 %4)
ret i64 %5
}

LLVM IR (-O2):
define i64 @int_hash_func(i8* %0) {
%2 = ptrtoint i8* %0 to i64
%3 = tail call i64 @general_int_hash_func(i64 %2)
ret i64 %3
}
int divi(int x, int y) { return (x / y); }


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

x86 assembly (clang, -O2):
<divi>:
mov    %edi,%eax
cltd
idiv   %esi
ret

LLVM IR (-O0):
define i32 @divi(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 = sdiv i32 %5, %6
ret i32 %7
}

LLVM IR (-O2):
define i32 @divi(i32 %0, i32 %1) {
%3 = sdiv i32 %0, %1
ret i32 %3
}
void main(void) {
  int x;
  { int x; }
  x = x + 1;
  return;
}


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

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

LLVM IR (-O0):
define void @main() {
%1 = alloca i32
%2 = alloca i32
%3 = load i32, i32* %1
%4 = add nsw i32 %3, 1
store i32 %4, i32* %1
ret void
}

LLVM IR (-O2):
define void @main() {
ret void
}
void gtk_handle_box_set_handle_position() {}


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

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

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

LLVM IR (-O2):
define void @gtk_handle_box_set_handle_position() {
ret void
}
void __cxa_throw_bad_array_new_length() {}


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

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

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

LLVM IR (-O2):
define void @__cxa_throw_bad_array_new_length() {
ret void
}
/* Type definitions */
struct timespec {
  int tv_nsec;
  scalar_t__ tv_sec;
};

/* Variables and functions */
int /*<<< orphan*/ CLOCK_REALTIME;
int /*<<< orphan*/ clock_gettime(int /*<<< orphan*/, struct timespec *);
double seconds_since_epoch() {
  struct timespec t;
  clock_gettime(CLOCK_REALTIME, &t);
  return (double)t.tv_sec + t.tv_nsec * 1e-9;
}


x86 assembly (clang, -O0):
<seconds_since_epoch>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    0x2ec1(%rip),%rax
mov    (%rax),%edi
lea    -0x10(%rbp),%rsi
call   1030 <clock_gettime@plt>
cvtsi2sdq -0x8(%rbp),%xmm1
cvtsi2sdl -0x10(%rbp),%xmm0
movsd  0xec3(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<seconds_since_epoch>:
sub    $0x18,%rsp
mov    0x2ec5(%rip),%rax
mov    (%rax),%edi
lea    0x8(%rsp),%rsi
call   1030 <clock_gettime@plt>
cvtsi2sdq 0x10(%rsp),%xmm1
cvtsi2sdl 0x8(%rsp),%xmm0
mulsd  0xec4(%rip),%xmm0
addsd  %xmm1,%xmm0
add    $0x18,%rsp
ret

LLVM IR (-O0):
%struct.timespec = type { i32, i64 }
@CLOCK_REALTIME = global i32 0
define double @seconds_since_epoch() {
%1 = alloca %struct.timespec
%2 = load i32, i32* @CLOCK_REALTIME
%3 = call i32 @clock_gettime(i32 %2, %struct.timespec* %1)
%4 = getelementptr inbounds %struct.timespec, %struct.timespec* %1, i32 0, i32 1
%5 = load i64, i64* %4
%6 = sitofp i64 %5 to double
%7 = getelementptr inbounds %struct.timespec, %struct.timespec* %1, i32 0, i32 0
%8 = load i32, i32* %7
%9 = sitofp i32 %8 to double
%10 = call double @llvm.fmuladd.f64(double %9, double 1.000000e-09, double %6)
ret double %10
}

LLVM IR (-O2):
%struct.timespec = type { i32, i64 }
@CLOCK_REALTIME = global i32 0
define double @seconds_since_epoch() {
%1 = alloca %struct.timespec
%2 = bitcast %struct.timespec* %1 to i8*
%3 = load i32, i32* @CLOCK_REALTIME
%4 = call i32 @clock_gettime(i32 %3, %struct.timespec* %1)
%5 = getelementptr inbounds %struct.timespec, %struct.timespec* %1, i64 0, i32 1
%6 = load i64, i64* %5
%7 = sitofp i64 %6 to double
%8 = getelementptr inbounds %struct.timespec, %struct.timespec* %1, i64 0, i32 0
%9 = load i32, i32* %8
%10 = sitofp i32 %9 to double
%11 = call double @llvm.fmuladd.f64(double %10, double 1.000000e-09, double %7)
ret double %11
}
/* Type definitions */
typedef int /*<<< orphan*/ tuple;
struct bpf_sock_tuple {
  int dummy;
};
struct __sk_buff {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ BPF_F_CURRENT_NETNS;
int /*<<< orphan*/ bpf_sk_lookup_tcp(struct __sk_buff *,
                                     struct bpf_sock_tuple *, int,
                                     int /*<<< orphan*/, int /*<<< orphan*/);
__attribute__((section("fail_no_release"), used)) int
bpf_sk_lookup_test2(struct __sk_buff *skb) {
  struct bpf_sock_tuple tuple = {};
  bpf_sk_lookup_tcp(skb, &tuple, sizeof(tuple), BPF_F_CURRENT_NETNS, 0);
  return 0;
}


x86 assembly (clang, -O0):
<bpf_sk_lookup_test2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    -0x10(%rbp),%rdi
xor    %esi,%esi
mov    $0x4,%edx
call   1030 <memset@plt>
mov    -0x8(%rbp),%rdi
mov    0x2eb1(%rip),%rax
mov    (%rax),%ecx
lea    -0x10(%rbp),%rsi
mov    $0x4,%edx
xor    %r8d,%r8d
call   1040 <bpf_sk_lookup_tcp@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bpf_sk_lookup_test2>:
push   %rax
movl   $0x0,(%rsp)
mov    0x2ed9(%rip),%rax
mov    (%rax),%ecx
mov    %rsp,%rsi
mov    $0x4,%edx
xor    %r8d,%r8d
call   1030 <bpf_sk_lookup_tcp@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
%struct.__sk_buff = type { i32 }
%struct.bpf_sock_tuple = type { i32 }
@BPF_F_CURRENT_NETNS = global i32 0
@llvm.compiler.used = appending global [1 x i8*] [i8* bitcast (i32 (%struct.__sk_buff*)* @bpf_sk_lookup_test2 to i8*)], section "llvm.metadata"
define i32 @bpf_sk_lookup_test2(%struct.__sk_buff* %0) section "fail_no_release" {
%2 = alloca %struct.bpf_sock_tuple
%3 = bitcast %struct.bpf_sock_tuple* %2 to i8*
%4 = getelementptr inbounds %struct.bpf_sock_tuple, %struct.bpf_sock_tuple* %2, i64 0, i32 0
store i32 0, i32* %4
%5 = load i32, i32* @BPF_F_CURRENT_NETNS
%6 = call i32 @bpf_sk_lookup_tcp(%struct.__sk_buff* %0, %struct.bpf_sock_tuple* %2, i32 4, i32 %5, i32 0)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int, int);
int /*<<< orphan*/ scanf(char *, int *, int *);
int main() {
  int a, b, c;
  scanf("%d %d", &a, &b);
  c = a++ * --b;
  printf("%d %d %d\n", a, b, c);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
lea    -0x8(%rbp),%rsi
lea    -0xc(%rbp),%rdx
call   1040 <scanf@plt>
mov    -0x8(%rbp),%eax
mov    %eax,%ecx
add    $0x1,%ecx
mov    %ecx,-0x8(%rbp)
mov    -0xc(%rbp),%ecx
add    $0xffffffff,%ecx
mov    %ecx,-0xc(%rbp)
imul   %ecx,%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
mov    -0x10(%rbp),%ecx
lea    0xe99(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
lea    0x4(%rsp),%rsi
mov    %rsp,%rdx
call   1040 <scanf@plt>
mov    0x4(%rsp),%ecx
lea    0x1(%rcx),%esi
mov    %esi,0x4(%rsp)
mov    (%rsp),%edx
add    $0xffffffff,%edx
mov    %edx,(%rsp)
imul   %edx,%ecx
lea    0xeb3(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [6 x i8] c"%d %d\00"
@.str.1 = [10 x i8] c"%d %d %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = bitcast i32* %1 to i8*
%4 = bitcast i32* %2 to i8*
%5 = call i32 @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32* %1, i32* %2)
%6 = load i32, i32* %1
%7 = add nsw i32 %6, 1
store i32 %7, i32* %1
%8 = load i32, i32* %2
%9 = add nsw i32 %8, -1
store i32 %9, i32* %2
%10 = mul nsw i32 %9, %6
%11 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i32 %7, i32 %9, i32 %10)
ret i32 0
}
int fdiv(int a, int b) { return (a - (a < 0 ? b - 1 : 0)) / b; }


x86 assembly (clang, -O0):
<fdiv>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
cmpl   $0x0,-0x4(%rbp)
jge    1128 <fdiv+0x28>
mov    -0x8(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1132 <fdiv+0x32>
xor    %eax,%eax
mov    %eax,-0x10(%rbp)
jmp    1132 <fdiv+0x32>
mov    -0xc(%rbp),%eax
mov    -0x10(%rbp),%ecx
sub    %ecx,%eax
cltd
idivl  -0x8(%rbp)
pop    %rbp
ret

x86 assembly (clang, -O2):
<fdiv>:
mov    %edi,%eax
lea    -0x1(%rsi),%ecx
mov    %edi,%edx
sar    $0x1f,%edx
and    %ecx,%edx
sub    %edx,%eax
cltd
idiv   %esi
ret

LLVM IR (-O0):
define i32 @fdiv(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* %3
%7 = icmp slt i32 %6, 0
br i1 %7, label %8, label %11
8: ; preds = %2
%9 = load i32, i32* %4
%10 = sub nsw i32 %9, 1
br label %12
11: ; preds = %2
br label %12
12: ; preds = %11, %8
%13 = phi i32 [ %10, %8 ], [ 0, %11 ]
%14 = sub nsw i32 %5, %13
%15 = load i32, i32* %4
%16 = sdiv i32 %14, %15
ret i32 %16
}

LLVM IR (-O2):
define i32 @fdiv(i32 %0, i32 %1) {
%3 = icmp slt i32 %0, 0
%4 = add nsw i32 %1, -1
%5 = select i1 %3, i32 %4, i32 0
%6 = sub nsw i32 %0, %5
%7 = sdiv i32 %6, %1
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ out_char(int, int /*<<< orphan*/);
void out_str(int fd, char *str) {
  while (*str != '\0')
    out_char(fd, *str++);
}


x86 assembly (clang, -O0):
<out_str>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     114e <out_str+0x3e>
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x10(%rbp)
movsbl (%rax),%esi
call   1030 <out_char@plt>
jmp    111f <out_str+0xf>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<out_str>:
push   %rbp
push   %rbx
push   %rax
mov    (%rsi),%al
test   %al,%al
je     1145 <out_str+0x35>
mov    %rsi,%rbx
mov    %edi,%ebp
add    $0x1,%rbx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movsbl %al,%esi
mov    %ebp,%edi
call   1030 <out_char@plt>
movzbl (%rbx),%eax
add    $0x1,%rbx
test   %al,%al
jne    1130 <out_str+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define void @out_str(i32 %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
store i32 %0, i32* %3
store i8* %1, i8** %4
br label %5
5: ; preds = %10, %2
%6 = load i8*, i8** %4
%7 = load i8, i8* %6
%8 = sext i8 %7 to i32
%9 = icmp ne i32 %8, 0
br i1 %9, label %10, label %17
10: ; preds = %5
%11 = load i32, i32* %3
%12 = load i8*, i8** %4
%13 = getelementptr inbounds i8, i8* %12, i32 1
store i8* %13, i8** %4
%14 = load i8, i8* %12
%15 = sext i8 %14 to i32
%16 = call i32 @out_char(i32 %11, i32 %15)
br label %5
17: ; preds = %5
ret void
}

LLVM IR (-O2):
define void @out_str(i32 %0, i8* nocapture %1) {
%3 = load i8, i8* %1
%4 = icmp eq i8 %3, 0
br i1 %4, label %13, label %5
5: ; preds = %2, %5
%6 = phi i8 [ %11, %5 ], [ %3, %2 ]
%7 = phi i8* [ %9, %5 ], [ %1, %2 ]
%8 = sext i8 %6 to i32
%9 = getelementptr inbounds i8, i8* %7, i64 1
%10 = tail call i32 @out_char(i32 %0, i32 %8)
%11 = load i8, i8* %9
%12 = icmp eq i8 %11, 0
br i1 %12, label %13, label %5
13: ; preds = %5, %2
ret void
}
/* Type definitions */
struct lifo {
  int dummy;
};

/* Variables and functions */
double INFINITY;
double opr_ninf(struct lifo *stack) { return -INFINITY; }


x86 assembly (clang, -O0):
<opr_ninf>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    0x2ed9(%rip),%rax
movsd  (%rax),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<opr_ninf>:
mov    0x2ee1(%rip),%rax
movsd  (%rax),%xmm0
xorps  0xeee(%rip),%xmm0
ret

LLVM IR (-O0):
%struct.lifo = type { i32 }
@INFINITY = global double 0.000000e+00
define double @opr_ninf(%struct.lifo* %0) {
%2 = alloca %struct.lifo*
store %struct.lifo* %0, %struct.lifo** %2
%3 = load double, double* @INFINITY
%4 = fneg double %3
ret double %4
}

LLVM IR (-O2):
%struct.lifo = type { i32 }
@INFINITY = global double 0.000000e+00
define double @opr_ninf(%struct.lifo* nocapture readnone %0) {
%2 = load double, double* @INFINITY
%3 = fneg double %2
ret double %3
}
int next(int a) {
  if (a + 1 == 1024)
    return 0;
  return a + 1;
}


x86 assembly (clang, -O0):
<next>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
cmp    $0x400,%eax
jne    1124 <next+0x24>
movl   $0x0,-0x4(%rbp)
jmp    112d <next+0x2d>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<next>:
lea    0x1(%rdi),%ecx
xor    %eax,%eax
cmp    $0x400,%ecx
cmovne %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @next(i32 %0) {
%2 = add nsw i32 %0, 1
%3 = icmp eq i32 %2, 1024
%4 = select i1 %3, i32 0, i32 %2
ret i32 %4
}
int json_isdigit(int ch) { return ch >= '0' && ch <= '9'; }


x86 assembly (clang, -O0):
<json_isdigit>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
xor    %eax,%eax
cmpl   $0x30,-0x4(%rbp)
mov    %al,-0x5(%rbp)
jl     1120 <json_isdigit+0x20>
cmpl   $0x39,-0x4(%rbp)
setle  %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<json_isdigit>:
add    $0xffffffd0,%edi
xor    %eax,%eax
cmp    $0xa,%edi
setb   %al
ret

LLVM IR (-O0):
define i32 @json_isdigit(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp sge i32 %3, 48
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load i32, i32* %2
%7 = icmp sle i32 %6, 57
br label %8
8: ; preds = %5, %1
%9 = phi i1 [ false, %1 ], [ %7, %5 ]
%10 = zext i1 %9 to i32
ret i32 %10
}

LLVM IR (-O2):
define i32 @json_isdigit(i32 %0) {
%2 = add i32 %0, -48
%3 = icmp ult i32 %2, 10
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
int ENODEV;
int qpnp_config_reset_enable(int pon_type, int en) { return -ENODEV; }


x86 assembly (clang, -O0):
<qpnp_config_reset_enable>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
xor    %eax,%eax
mov    0x2ecd(%rip),%rcx
sub    (%rcx),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<qpnp_config_reset_enable>:
mov    0x2ed9(%rip),%rcx
xor    %eax,%eax
sub    (%rcx),%eax
ret

LLVM IR (-O0):
@ENODEV = global i32 0
define i32 @qpnp_config_reset_enable(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* @ENODEV
%6 = sub nsw i32 0, %5
ret i32 %6
}

LLVM IR (-O2):
@ENODEV = global i32 0
define i32 @qpnp_config_reset_enable(i32 %0, i32 %1) {
%3 = load i32, i32* @ENODEV
%4 = sub nsw i32 0, %3
ret i32 %4
}
/* Variables and functions */
float calcArea(float);
int /*<<< orphan*/ greeting();
int /*<<< orphan*/ printf(char *, float, float);
int /*<<< orphan*/ scanf(char *, float *);
int main() {
  float area, radius;
  greeting();
  scanf("%f", &radius);
  area = calcArea(radius);
  printf("A circle with the radius of \'%f\'\nwill have an area of: %.3f\n",
         radius, area);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1040 <greeting@plt>
lea    0xea3(%rip),%rdi
lea    -0xc(%rbp),%rsi
call   1050 <scanf@plt>
movss  -0xc(%rbp),%xmm0
call   1060 <calcArea@plt>
movss  %xmm0,-0x8(%rbp)
movss  -0xc(%rbp),%xmm0
movss  -0x8(%rbp),%xmm1
lea    0xe7d(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1040 <greeting@plt>
lea    0xeb1(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1050 <scanf@plt>
movss  0x4(%rsp),%xmm0
call   1060 <calcArea@plt>
movaps %xmm0,%xmm1
movss  0x4(%rsp),%xmm0
lea    0xe8f(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%f\00"
@.str.1 = [61 x i8] c"A circle with the radius of '%f'\0Awill have an area of: %.3f\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca float
%3 = alloca float
store i32 0, i32* %1
%4 = call i32 (...) @greeting()
%5 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), float* %3)
%6 = load float, float* %3
%7 = call float @calcArea(float %6)
store float %7, float* %2
%8 = load float, float* %3
%9 = load float, float* %2
%10 = call i32 @printf(i8* getelementptr inbounds ([61 x i8], [61 x i8]* @.str.1, i64 0, i64 0), float %8, float %9)
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%f\00"
@.str.1 = [61 x i8] c"A circle with the radius of '%f'\0Awill have an area of: %.3f\0A\00"
define i32 @main() {
%1 = alloca float
%2 = bitcast float* %1 to i8*
%3 = tail call i32 (...) @greeting()
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), float* %1)
%5 = load float, float* %1
%6 = call float @calcArea(float %5)
%7 = load float, float* %1
%8 = call i32 @printf(i8* getelementptr inbounds ([61 x i8], [61 x i8]* @.str.1, i64 0, i64 0), float %7, float %6)
ret i32 0
}
int get_bit(unsigned int *bitmap, const int bitn) {
  return bitmap[bitn >> 5] & (1 << (bitn & 0x1F));
}


x86 assembly (clang, -O0):
<get_bit>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    -0xc(%rbp),%ecx
sar    $0x5,%ecx
movslq %ecx,%rcx
mov    (%rax,%rcx,4),%eax
mov    -0xc(%rbp),%ecx
and    $0x1f,%ecx
mov    $0x1,%edx
shl    %cl,%edx
mov    %edx,%ecx
and    %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_bit>:
mov    %esi,%ecx
mov    %esi,%edx
mov    $0x1,%eax
shl    %cl,%eax
sar    $0x5,%edx
movslq %edx,%rcx
and    (%rdi,%rcx,4),%eax
ret

LLVM IR (-O0):
define i32 @get_bit(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 = ashr i32 %6, 5
%8 = sext i32 %7 to i64
%9 = getelementptr inbounds i32, i32* %5, i64 %8
%10 = load i32, i32* %9
%11 = load i32, i32* %4
%12 = and i32 %11, 31
%13 = shl i32 1, %12
%14 = and i32 %10, %13
ret i32 %14
}

LLVM IR (-O2):
define i32 @get_bit(i32* nocapture %0, i32 %1) {
%3 = ashr i32 %1, 5
%4 = sext i32 %3 to i64
%5 = getelementptr inbounds i32, i32* %0, i64 %4
%6 = load i32, i32* %5
%7 = and i32 %1, 31
%8 = shl nuw i32 1, %7
%9 = and i32 %6, %8
ret i32 %9
}
unsigned long hashtable_hash_key_djb2(const char *string) {
  unsigned long hash;
  const char *ptr_string;
  hash = 5381;
  for (ptr_string = string; ptr_string[0]; ptr_string++) {
    hash ^= (hash << 5) + (hash >> 2) + (int)(ptr_string[0]);
  }
  return hash;
}


x86 assembly (clang, -O0):
<hashtable_hash_key_djb2>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movq   $0x1505,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
cmpb   $0x0,(%rax)
je     115e <hashtable_hash_key_djb2+0x5e>
mov    -0x10(%rbp),%rax
shl    $0x5,%rax
mov    -0x10(%rbp),%rcx
shr    $0x2,%rcx
add    %rcx,%rax
mov    -0x18(%rbp),%rcx
movsbl (%rcx),%ecx
movslq %ecx,%rcx
add    %rcx,%rax
xor    -0x10(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
jmp    1118 <hashtable_hash_key_djb2+0x18>
mov    -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<hashtable_hash_key_djb2>:
mov    (%rdi),%cl
test   %cl,%cl
je     1137 <hashtable_hash_key_djb2+0x37>
add    $0x1,%rdi
mov    $0x1505,%eax
nop
mov    %rax,%rdx
shl    $0x5,%rdx
mov    %rax,%rsi
shr    $0x2,%rsi
add    %rdx,%rsi
movsbq %cl,%rcx
add    %rsi,%rcx
xor    %rcx,%rax
movzbl (%rdi),%ecx
add    $0x1,%rdi
test   %cl,%cl
jne    1110 <hashtable_hash_key_djb2+0x10>
ret
mov    $0x1505,%eax
ret

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

LLVM IR (-O2):
define i64 @hashtable_hash_key_djb2(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %17, label %4
4: ; preds = %1, %4
%5 = phi i8 [ %15, %4 ], [ %2, %1 ]
%6 = phi i8* [ %14, %4 ], [ %0, %1 ]
%7 = phi i64 [ %13, %4 ], [ 5381, %1 ]
%8 = shl i64 %7, 5
%9 = lshr i64 %7, 2
%10 = add i64 %8, %9
%11 = sext i8 %5 to i64
%12 = add i64 %10, %11
%13 = xor i64 %12, %7
%14 = getelementptr inbounds i8, i8* %6, i64 1
%15 = load i8, i8* %14
%16 = icmp eq i8 %15, 0
br i1 %16, label %17, label %4
17: ; preds = %4, %1
%18 = phi i64 [ 5381, %1 ], [ %13, %4 ]
ret i64 %18
}
unsigned long lock_component_alloc() {}


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

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

LLVM IR (-O0):
define i64 @lock_component_alloc() {
%1 = alloca i64
%2 = load i64, i64* %1
ret i64 %2
}

LLVM IR (-O2):
define i64 @lock_component_alloc() {
ret i64 undef
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int /*<<< orphan*/ int32_t;

/* Variables and functions */
int32_t eqntohint32(const uint8_t *data) { return *(int32_t *)data; }


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

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

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

LLVM IR (-O2):
define i32 @eqntohint32(i32* nocapture %0) {
%2 = load i32, i32* %0
ret i32 %2
}
/* Type definitions */
struct lwan_strbuf {
  int dummy;
};

/* Variables and functions */
struct lwan_strbuf *lwan_strbuf_new_with_size(int /*<<< orphan*/);
__attribute__((always_)) struct lwan_strbuf *lwan_strbuf_new(void) {
  return lwan_strbuf_new_with_size(0);
}


x86 assembly (clang, -O0):
<lwan_strbuf_new>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
call   1030 <lwan_strbuf_new_with_size@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<lwan_strbuf_new>:
xor    %edi,%edi
jmp    1030 <lwan_strbuf_new_with_size@plt>

LLVM IR (-O0):
%struct.lwan_strbuf = type { i32 }
define %struct.lwan_strbuf* @lwan_strbuf_new() {
%1 = call %struct.lwan_strbuf* @lwan_strbuf_new_with_size(i32 0)
ret %struct.lwan_strbuf* %1
}

LLVM IR (-O2):
%struct.lwan_strbuf = type { i32 }
define %struct.lwan_strbuf* @lwan_strbuf_new() {
%1 = tail call %struct.lwan_strbuf* @lwan_strbuf_new_with_size(i32 0)
ret %struct.lwan_strbuf* %1
}
/* Type definitions */
struct stat {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ stat(char *, struct stat *);
int main(int ac, char **av) {
  for (int i = 0; i < 1000000; i++) {
    struct stat st;
    stat(av[1], &st);
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
cmpl   $0xf4240,-0x14(%rbp)
jge    1159 <main+0x49>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
lea    -0x18(%rbp),%rsi
call   1030 <stat@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    112d <main+0x1d>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r14
push   %rbx
sub    $0x10,%rsp
mov    %rsi,%rbx
mov    $0xf4240,%ebp
lea    0x8(%rsp),%r14
cs nopw 0x0(%rax,%rax,1)
nop
mov    0x8(%rbx),%rdi
mov    %r14,%rsi
call   1030 <stat@plt>
add    $0xffffffff,%ebp
jne    1130 <main+0x20>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
%struct.stat = type { i32 }
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca %struct.stat
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 0, i32* %6
br label %8
8: ; preds = %16, %2
%9 = load i32, i32* %6
%10 = icmp slt i32 %9, 1000000
br i1 %10, label %11, label %19
11: ; preds = %8
%12 = load i8**, i8*** %5
%13 = getelementptr inbounds i8*, i8** %12, i64 1
%14 = load i8*, i8** %13
%15 = call i32 @stat(i8* %14, %struct.stat* %7)
br label %16
16: ; preds = %11
%17 = load i32, i32* %6
%18 = add nsw i32 %17, 1
store i32 %18, i32* %6
br label %8
19: ; preds = %8
%20 = load i32, i32* %3
ret i32 %20
}

LLVM IR (-O2):
%struct.stat = type { i32 }
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = alloca %struct.stat
%4 = bitcast %struct.stat* %3 to i8*
%5 = getelementptr inbounds i8*, i8** %1, i64 1
br label %7
6: ; preds = %7
ret i32 0
7: ; preds = %2, %7
%8 = phi i32 [ 0, %2 ], [ %11, %7 ]
%9 = load i8*, i8** %5
%10 = call i32 @stat(i8* %9, %struct.stat* %3)
%11 = add nuw nsw i32 %8, 1
%12 = icmp eq i32 %11, 1000000
br i1 %12, label %6, label %7
}
unsigned int f52(unsigned int x, int y __attribute__((unused))) {
  return (x << 1) ^ (x >> ((-1) & (8 * 4 - 1)));
}


x86 assembly (clang, -O0):
<f52>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
shl    $0x1,%eax
mov    -0x4(%rbp),%ecx
shr    $0x1f,%ecx
xor    %ecx,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @f52(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 = shl i32 %5, 1
%7 = load i32, i32* %3
%8 = lshr i32 %7, 31
%9 = xor i32 %6, %8
ret i32 %9
}

LLVM IR (-O2):
define i32 @f52(i32 %0, i32 %1) {
%3 = tail call i32 @llvm.fshl.i32(i32 %0, i32 %0, i32 1)
ret i32 %3
}
/* Variables and functions */
scalar_t__ isPowerOfTwo(int);
int /*<<< orphan*/ printf(char *, int);
void test(int n) {
  if (isPowerOfTwo(n)) {
    printf("yes: %d \n", n);
  } else {
    printf("no: %d \n", n);
  }
}


x86 assembly (clang, -O0):
<test>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <isPowerOfTwo@plt>
cmp    $0x0,%rax
je     1151 <test+0x31>
mov    -0x4(%rbp),%esi
lea    0xeb9(%rip),%rdi
call   1040 <printf@plt>
jmp    1160 <test+0x40>
mov    -0x4(%rbp),%esi
lea    0xeaf(%rip),%rdi
call   1040 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test>:
push   %rbx
mov    %edi,%ebx
call   1030 <isPowerOfTwo@plt>
test   %rax,%rax
lea    0xed8(%rip),%rax
lea    0xec7(%rip),%rdi
cmove  %rax,%rdi
mov    %ebx,%esi
pop    %rbx
jmp    1040 <printf@plt>

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

LLVM IR (-O2):
@.str = [10 x i8] c"yes: %d \0A\00"
@.str.1 = [9 x i8] c"no: %d \0A\00"
define void @test(i32 %0) {
%2 = tail call i64 @isPowerOfTwo(i32 %0)
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0)
%5 = tail call i32 @printf(i8* %4, i32 %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, char);
int main() {
  int i = 0;
  char c;
  for (i = 0; i <= 255; i++) {
    c = i;
    printf("\n%d%c", i, c);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0xff,-0x8(%rbp)
jg     1161 <main+0x51>
mov    -0x8(%rbp),%eax
mov    %al,-0x9(%rbp)
mov    -0x8(%rbp),%esi
lea    0xeb6(%rip),%rdi
movsbl -0x9(%rbp),%edx
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    112d <main+0x1d>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
xor    %ebx,%ebx
lea    0xee3(%rip),%r14
nopl   (%rax)
movsbl %bl,%edx
mov    %r14,%rdi
mov    %ebx,%esi
call   1030 <printf@plt>
add    $0x1,%ebx
cmp    $0x100,%ebx
jne    1120 <main+0x10>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [6 x i8] c"\0A%d%c\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i8
store i32 0, i32* %1
store i32 0, i32* %2
store i32 0, i32* %2
br label %4
4: ; preds = %13, %0
%5 = load i32, i32* %2
%6 = icmp sle i32 %5, 255
br i1 %6, label %7, label %16
7: ; preds = %4
%8 = load i32, i32* %2
%9 = trunc i32 %8 to i8
store i8 %9, i8* %3
%10 = load i32, i32* %2
%11 = load i8, i8* %3
%12 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 %10, i8 signext %11)
br label %13
13: ; preds = %7
%14 = load i32, i32* %2
%15 = add nsw i32 %14, 1
store i32 %15, i32* %2
br label %4
16: ; preds = %4
ret i32 0
}

LLVM IR (-O2):
@.str = [6 x i8] c"\0A%d%c\00"
define i32 @main() {
br label %1
1: ; preds = %0, %1
%2 = phi i32 [ 0, %0 ], [ %5, %1 ]
%3 = trunc i32 %2 to i8
%4 = tail call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 %2, i8 signext %3)
%5 = add nuw nsw i32 %2, 1
%6 = icmp eq i32 %5, 256
br i1 %6, label %7, label %1
7: ; preds = %1
ret i32 0
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  unsigned long window;
};
typedef TYPE_1__ XMotionEvent;

/* Variables and functions */
void set_XMotionEvent_window(void *_p, unsigned long _v) {
  ((XMotionEvent *)_p)->window = (unsigned long)_v;
}


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

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

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

LLVM IR (-O2):
define void @set_XMotionEvent_window(i8* nocapture writeonly %0, i64 %1) {
%3 = bitcast i8* %0 to i64*
store i64 %1, i64* %3
ret void
}
/* Variables and functions */
int /*<<< orphan*/ abort();
scalar_t__ bar(char *, char *);
main() {
  char *p = "a", *q = "b";
  if (p)
    if (bar(p, q))
      return 0;
  abort();
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rax
mov    %rax,-0x10(%rbp)
lea    0xec1(%rip),%rax
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     1174 <main+0x54>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1040 <bar@plt>
cmp    $0x0,%rax
je     116f <main+0x4f>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret
jmp    1174 <main+0x54>
mov    $0x0,%al
call   1030 <abort@plt>

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
lea    0xed3(%rip),%rsi
call   1040 <bar@plt>
test   %rax,%rax
je     113d <main+0x1d>
xor    %eax,%eax
pop    %rcx
ret
xor    %eax,%eax
call   1030 <abort@plt>

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

LLVM IR (-O2):
@.str = [2 x i8] c"a\00"
@.str.1 = [2 x i8] c"b\00"
define i32 @main() {
%1 = tail call i64 @bar(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%2 = icmp eq i64 %1, 0
br i1 %2, label %4, label %3
3: ; preds = %0
ret i32 0
4: ; preds = %0
%5 = tail call i32 (...) @abort()
unreachable
}
int diag_l3_base_recv(struct diag_l3_conn *d_l3_conn __attribute__((unused)),
                      int timeout __attribute__((unused)),
                      void (*rcv_call_back)(void *handle, struct diag_msg *)
                          __attribute__((unused)),
                      void *handle __attribute__((unused))) {
  return (0);
}


x86 assembly (clang, -O0):
<diag_l3_base_recv>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.diag_l3_conn = type opaque
%struct.diag_msg = type opaque
define i32 @diag_l3_base_recv(%struct.diag_l3_conn* %0, i32 %1, void (i8*, %struct.diag_msg*)* %2, i8* %3) {
%5 = alloca %struct.diag_l3_conn*
%6 = alloca i32
%7 = alloca void (i8*, %struct.diag_msg*)*
%8 = alloca i8*
store %struct.diag_l3_conn* %0, %struct.diag_l3_conn** %5
store i32 %1, i32* %6
store void (i8*, %struct.diag_msg*)* %2, void (i8*, %struct.diag_msg*)** %7
store i8* %3, i8** %8
ret i32 0
}

LLVM IR (-O2):
%struct.diag_l3_conn = type opaque
%struct.diag_msg = type opaque
define i32 @diag_l3_base_recv(%struct.diag_l3_conn* nocapture readnone %0, i32 %1, void (i8*, %struct.diag_msg*)* nocapture readnone %2, i8* nocapture readnone %3) {
ret i32 0
}
/* Variables and functions */
int SIGFPE;
int scalanative_libc_sigfpe() { return SIGFPE; }


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

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

LLVM IR (-O0):
@SIGFPE = global i32 0
define i32 @scalanative_libc_sigfpe() {
%1 = load i32, i32* @SIGFPE
ret i32 %1
}

LLVM IR (-O2):
@SIGFPE = global i32 0
define i32 @scalanative_libc_sigfpe() {
%1 = load i32, i32* @SIGFPE
ret i32 %1
}
/* Type definitions */
typedef int /*<<< orphan*/ wchar_t;
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int fputs(char const *, int /*<<< orphan*/ *);
int fputws(const wchar_t *str, FILE *stream) {
  return fputs((const char *)str, stream);
}


x86 assembly (clang, -O0):
<fputws>:
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 <fputs@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fputws>:
jmp    1030 <fputs@plt>

LLVM IR (-O0):
define i32 @fputws(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 = bitcast i32* %5 to i8*
%7 = load i32*, i32** %4
%8 = call i32 @fputs(i8* %6, i32* %7)
ret i32 %8
}

LLVM IR (-O2):
define i32 @fputws(i32* nocapture %0, i32* nocapture %1) {
%3 = bitcast i32* %0 to i8*
%4 = tail call i32 @fputs(i8* %3, i32* %1)
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ return_struct_vf1();
int /*<<< orphan*/ take_struct_vf1(int /*<<< orphan*/);
void test_struct_vf1() { take_struct_vf1(return_struct_vf1()); }


x86 assembly (clang, -O0):
<test_struct_vf1>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <return_struct_vf1@plt>
mov    %eax,%edi
call   1030 <take_struct_vf1@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_struct_vf1>:
push   %rax
xor    %eax,%eax
call   1040 <return_struct_vf1@plt>
mov    %eax,%edi
pop    %rax
jmp    1030 <take_struct_vf1@plt>

LLVM IR (-O0):
define void @test_struct_vf1() {
%1 = call i32 (...) @return_struct_vf1()
%2 = call i32 @take_struct_vf1(i32 %1)
ret void
}

LLVM IR (-O2):
define void @test_struct_vf1() {
%1 = tail call i32 (...) @return_struct_vf1()
%2 = tail call i32 @take_struct_vf1(i32 %1)
ret void
}