xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ adainit();
int /*<<< orphan*/ challenge_PI_go_off();
int /*<<< orphan*/ challenge_PI_run();
int /*<<< orphan*/ challenge_initStates();
int main() {
  adainit();
  challenge_initStates();
  challenge_PI_run();
  challenge_PI_go_off();
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1050 <adainit@plt>
xor    %eax,%eax
call   1060 <challenge_initStates@plt>
xor    %eax,%eax
call   1030 <challenge_PI_run@plt>
xor    %eax,%eax
call   1040 <challenge_PI_go_off@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @adainit()
%3 = call i32 (...) @challenge_initStates()
%4 = call i32 (...) @challenge_PI_run()
%5 = call i32 (...) @challenge_PI_go_off()
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @adainit()
%2 = tail call i32 (...) @challenge_initStates()
%3 = tail call i32 (...) @challenge_PI_run()
%4 = tail call i32 (...) @challenge_PI_go_off()
ret i32 0
}
int test_imm_52int64_midword_reg(long long val) {
  return ((val >> 16) & (0x52 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_52int64_midword_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdx
sar    $0x10,%rdx
and    $0x52,%rdx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%rdx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_52int64_midword_reg>:
test   $0x520000,%edi
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_52int64_midword_reg(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = ashr i64 %3, 16
%5 = and i64 %4, 82
%6 = icmp ne i64 %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_52int64_midword_reg(i64 %0) {
%2 = and i64 %0, 5373952
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ push2(int, int /*<<< orphan*/);
void push(int v) { push2(v, 0); }


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

x86 assembly (clang, -O2):
<push>:
xor    %esi,%esi
jmp    1030 <push2@plt>

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

LLVM IR (-O2):
define void @push(i32 %0) {
%2 = tail call i32 @push2(i32 %0, i32 0)
ret void
}
void foo773(int p) {}


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

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

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

LLVM IR (-O2):
define void @foo773(i32 %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ return_struct_v1f3();
int /*<<< orphan*/ take_struct_v1f3(int /*<<< orphan*/);
void test_struct_v1f3() { take_struct_v1f3(return_struct_v1f3()); }


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

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

LLVM IR (-O0):
define void @test_struct_v1f3() {
%1 = call i32 (...) @return_struct_v1f3()
%2 = call i32 @take_struct_v1f3(i32 %1)
ret void
}

LLVM IR (-O2):
define void @test_struct_v1f3() {
%1 = tail call i32 (...) @return_struct_v1f3()
%2 = tail call i32 @take_struct_v1f3(i32 %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void Usage() {
  fprintf(stderr, "Usage: compress [-dfvcV] [-b maxbits] [file ...]\n");
}


x86 assembly (clang, -O0):
<Usage>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ec5(%rip),%rax
mov    (%rax),%edi
lea    0xedc(%rip),%rsi
call   1030 <fprintf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<Usage>:
mov    0x2ec9(%rip),%rax
mov    (%rax),%edi
lea    0xee0(%rip),%rsi
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [50 x i8] c"Usage: compress [-dfvcV] [-b maxbits] [file ...]\0A\00"
define void @Usage() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [50 x i8] c"Usage: compress [-dfvcV] [-b maxbits] [file ...]\0A\00"
define void @Usage() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int swap_add(int *, int *);
int caller() {
  int arg1 = 534;
  int arg2 = 1057;
  int sum = swap_add(&arg1, &arg2);
  int diff = arg1 - arg2;
  return sum * diff;
}


x86 assembly (clang, -O0):
<caller>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x216,-0x4(%rbp)
movl   $0x421,-0x8(%rbp)
lea    -0x4(%rbp),%rdi
lea    -0x8(%rbp),%rsi
call   1030 <swap_add@plt>
mov    %eax,-0xc(%rbp)
mov    -0x4(%rbp),%eax
sub    -0x8(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%eax
imul   -0x10(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<caller>:
push   %rax
movl   $0x216,0x4(%rsp)
movl   $0x421,(%rsp)
lea    0x4(%rsp),%rdi
mov    %rsp,%rsi
call   1030 <swap_add@plt>
mov    0x4(%rsp),%ecx
sub    (%rsp),%ecx
imul   %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @caller() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 534, i32* %1
store i32 1057, i32* %2
%5 = call i32 @swap_add(i32* %1, i32* %2)
store i32 %5, i32* %3
%6 = load i32, i32* %1
%7 = load i32, i32* %2
%8 = sub nsw i32 %6, %7
store i32 %8, i32* %4
%9 = load i32, i32* %3
%10 = load i32, i32* %4
%11 = mul nsw i32 %9, %10
ret i32 %11
}

LLVM IR (-O2):
define i32 @caller() {
%1 = alloca i32
%2 = alloca i32
%3 = bitcast i32* %1 to i8*
store i32 534, i32* %1
%4 = bitcast i32* %2 to i8*
store i32 1057, i32* %2
%5 = call i32 @swap_add(i32* %1, i32* %2)
%6 = load i32, i32* %1
%7 = load i32, i32* %2
%8 = sub nsw i32 %6, %7
%9 = mul nsw i32 %8, %5
ret i32 %9
}
void swap(char **p, char **q) {
  char *temp;
  temp = *p;
  *p = *q;
  *q = temp;
}


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

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

LLVM IR (-O0):
define void @swap(i8** %0, i8** %1) {
%3 = alloca i8**
%4 = alloca i8**
%5 = alloca i8*
store i8** %0, i8*** %3
store i8** %1, i8*** %4
%6 = load i8**, i8*** %3
%7 = load i8*, i8** %6
store i8* %7, i8** %5
%8 = load i8**, i8*** %4
%9 = load i8*, i8** %8
%10 = load i8**, i8*** %3
store i8* %9, i8** %10
%11 = load i8*, i8** %5
%12 = load i8**, i8*** %4
store i8* %11, i8** %12
ret void
}

LLVM IR (-O2):
define void @swap(i8** nocapture %0, i8** nocapture %1) {
%3 = load i8*, i8** %0
%4 = load i8*, i8** %1
store i8* %4, i8** %0
store i8* %3, i8** %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ heading(int);
void op_heading() { heading(1); }


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

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

LLVM IR (-O0):
define void @op_heading() {
%1 = call i32 @heading(i32 1)
ret void
}

LLVM IR (-O2):
define void @op_heading() {
%1 = tail call i32 @heading(i32 1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, float);
void show_float(void *value) {
  float data = *((float *)value);
  printf("%f", data);
}


x86 assembly (clang, -O0):
<show_float>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movss  (%rax),%xmm0
movss  %xmm0,-0xc(%rbp)
movss  -0xc(%rbp),%xmm0
lea    0xecb(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<show_float>:
movss  (%rdi),%xmm0
lea    0xee5(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [3 x i8] c"%f\00"
define void @show_float(i8* %0) {
%2 = alloca i8*
%3 = alloca float
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = bitcast i8* %4 to float*
%6 = load float, float* %5
store float %6, float* %3
%7 = load float, float* %3
%8 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), float %7)
ret void
}

LLVM IR (-O2):
@.str = [3 x i8] c"%f\00"
define void @show_float(i8* nocapture %0) {
%2 = bitcast i8* %0 to float*
%3 = load float, float* %2
%4 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), float %3)
ret void
}
void hfi1_dbg_ibdev_exit(struct hfi1_ibdev *ibd) {}


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

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

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

LLVM IR (-O2):
%struct.hfi1_ibdev = type opaque
define void @hfi1_dbg_ibdev_exit(%struct.hfi1_ibdev* nocapture %0) {
ret void
}
/* Type definitions */
typedef int u_int32_t;

/* Variables and functions */
int roundup(int, int);
u_int32_t buffer_skip(const char **p, int len) {
  len = roundup(len, 4);
  *p += len;
  return (len);
}


x86 assembly (clang, -O0):
<buffer_skip>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%edi
mov    $0x4,%esi
call   1030 <roundup@plt>
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%edx
mov    -0x8(%rbp),%rax
mov    (%rax),%rcx
movslq %edx,%rdx
add    %rdx,%rcx
mov    %rcx,(%rax)
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<buffer_skip>:
push   %rbx
mov    %rdi,%rbx
mov    %esi,%edi
mov    $0x4,%esi
call   1030 <roundup@plt>
cltq
add    %rax,(%rbx)
pop    %rbx
ret

LLVM IR (-O0):
define i32 @buffer_skip(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 = call i32 @roundup(i32 %5, i32 4)
store i32 %6, i32* %4
%7 = load i32, i32* %4
%8 = load i8**, i8*** %3
%9 = load i8*, i8** %8
%10 = sext i32 %7 to i64
%11 = getelementptr inbounds i8, i8* %9, i64 %10
store i8* %11, i8** %8
%12 = load i32, i32* %4
ret i32 %12
}

LLVM IR (-O2):
define i32 @buffer_skip(i8** nocapture %0, i32 %1) {
%3 = tail call i32 @roundup(i32 %1, i32 4)
%4 = load i8*, i8** %0
%5 = sext i32 %3 to i64
%6 = getelementptr inbounds i8, i8* %4, i64 %5
store i8* %6, i8** %0
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ EVP_chacha20();
int do_test_bio_cipher(int /*<<< orphan*/, int);
int test_bio_enc_chacha20(int idx) {
  return do_test_bio_cipher(EVP_chacha20(), idx);
}


x86 assembly (clang, -O0):
<test_bio_enc_chacha20>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x0,%al
call   1040 <EVP_chacha20@plt>
mov    %eax,%edi
mov    -0x4(%rbp),%esi
call   1030 <do_test_bio_cipher@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_bio_enc_chacha20>:
push   %rbx
mov    %edi,%ebx
xor    %eax,%eax
call   1040 <EVP_chacha20@plt>
mov    %eax,%edi
mov    %ebx,%esi
pop    %rbx
jmp    1030 <do_test_bio_cipher@plt>

LLVM IR (-O0):
define i32 @test_bio_enc_chacha20(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 (...) @EVP_chacha20()
%4 = load i32, i32* %2
%5 = call i32 @do_test_bio_cipher(i32 %3, i32 %4)
ret i32 %5
}

LLVM IR (-O2):
define i32 @test_bio_enc_chacha20(i32 %0) {
%2 = tail call i32 (...) @EVP_chacha20()
%3 = tail call i32 @do_test_bio_cipher(i32 %2, i32 %0)
ret i32 %3
}
/* Type definitions */
struct timezone {
  int dummy;
};
struct timeval {
  int dummy;
};

/* Variables and functions */
int gettimeofday(struct timeval *, struct timezone *);
__attribute__((__weak__, __always___)) int
softboundcets_gettimeofday(struct timeval *tv, struct timezone *tz) {
  return gettimeofday(tv, tz);
}


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

x86 assembly (clang, -O2):
<softboundcets_gettimeofday>:
jmp    1030 <gettimeofday@plt>

LLVM IR (-O0):
%struct.timeval = type { i32 }
%struct.timezone = type { i32 }
define weak i32 @softboundcets_gettimeofday(%struct.timeval* %0, %struct.timezone* %1) {
%3 = alloca %struct.timeval*
%4 = alloca %struct.timezone*
store %struct.timeval* %0, %struct.timeval** %3
store %struct.timezone* %1, %struct.timezone** %4
%5 = load %struct.timeval*, %struct.timeval** %3
%6 = load %struct.timezone*, %struct.timezone** %4
%7 = call i32 @gettimeofday(%struct.timeval* %5, %struct.timezone* %6)
ret i32 %7
}

LLVM IR (-O2):
%struct.timeval = type { i32 }
%struct.timezone = type { i32 }
define weak i32 @softboundcets_gettimeofday(%struct.timeval* %0, %struct.timezone* %1) {
%3 = tail call i32 @gettimeofday(%struct.timeval* %0, %struct.timezone* %1)
ret i32 %3
}
/* Type definitions */
typedef int /*<<< orphan*/ bs;

/* Variables and functions */
int /*<<< orphan*/ SOL_SOCKET;
int /*<<< orphan*/ SO_SNDBUF;
int /*<<< orphan*/ diep(char *);
int setsockopt(int, int /*<<< orphan*/, int /*<<< orphan*/, int *, int);
int sock_enlarge_out(int fd) {
  int bs = 33554431;
  if (setsockopt(fd, SOL_SOCKET, SO_SNDBUF, &bs, sizeof(bs)) == -1)
    diep("setsockopt");
  return 0;
}


x86 assembly (clang, -O0):
<sock_enlarge_out>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movl   $0x1ffffff,-0x8(%rbp)
mov    -0x4(%rbp),%edi
mov    0x2eac(%rip),%rax
mov    (%rax),%esi
mov    0x2e9b(%rip),%rax
mov    (%rax),%edx
lea    -0x8(%rbp),%rcx
mov    $0x4,%r8d
call   1030 <setsockopt@plt>
cmp    $0xffffffff,%eax
jne    116b <sock_enlarge_out+0x4b>
lea    0xe9a(%rip),%rdi
call   1040 <diep@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sock_enlarge_out>:
push   %rax
movl   $0x1ffffff,0x4(%rsp)
01
mov    0x2eb8(%rip),%rax
mov    (%rax),%esi
mov    0x2ea7(%rip),%rax
mov    (%rax),%edx
lea    0x4(%rsp),%rcx
mov    $0x4,%r8d
call   1030 <setsockopt@plt>
cmp    $0xffffffff,%eax
jne    115c <sock_enlarge_out+0x3c>
lea    0xea9(%rip),%rdi
call   1040 <diep@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@SOL_SOCKET = global i32 0
@SO_SNDBUF = global i32 0
@.str = [11 x i8] c"setsockopt\00"
define i32 @sock_enlarge_out(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
store i32 33554431, i32* %3
%4 = load i32, i32* %2
%5 = load i32, i32* @SOL_SOCKET
%6 = load i32, i32* @SO_SNDBUF
%7 = call i32 @setsockopt(i32 %4, i32 %5, i32 %6, i32* %3, i32 4)
%8 = icmp eq i32 %7, -1
br i1 %8, label %9, label %11
9: ; preds = %1
%10 = call i32 @diep(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
br label %11
11: ; preds = %9, %1
ret i32 0
}

LLVM IR (-O2):
@SOL_SOCKET = global i32 0
@SO_SNDBUF = global i32 0
@.str = [11 x i8] c"setsockopt\00"
define i32 @sock_enlarge_out(i32 %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
store i32 33554431, i32* %2
%4 = load i32, i32* @SOL_SOCKET
%5 = load i32, i32* @SO_SNDBUF
%6 = call i32 @setsockopt(i32 %0, i32 %4, i32 %5, i32* %2, i32 4)
%7 = icmp eq i32 %6, -1
br i1 %7, label %8, label %10
8: ; preds = %1
%9 = call i32 @diep(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
br label %10
10: ; preds = %8, %1
ret i32 0
}
/* Variables and functions */
int ismtp_end_mail(int);
int msmtp_end_mail(int);
scalar_t__ use_mailer();
int smtp_end_mail(int fd) {
  if (use_mailer())
    return msmtp_end_mail(fd);
  else
    return ismtp_end_mail(fd);
}


x86 assembly (clang, -O0):
<smtp_end_mail>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    $0x0,%al
call   1050 <use_mailer@plt>
cmp    $0x0,%rax
je     115c <smtp_end_mail+0x2c>
mov    -0x8(%rbp),%edi
call   1030 <msmtp_end_mail@plt>
mov    %eax,-0x4(%rbp)
jmp    1167 <smtp_end_mail+0x37>
mov    -0x8(%rbp),%edi
call   1040 <ismtp_end_mail@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<smtp_end_mail>:
push   %rbx
mov    %edi,%ebx
xor    %eax,%eax
call   1050 <use_mailer@plt>
mov    %ebx,%edi
test   %rax,%rax
je     1147 <smtp_end_mail+0x17>
pop    %rbx
jmp    1030 <msmtp_end_mail@plt>
pop    %rbx
jmp    1040 <ismtp_end_mail@plt>

LLVM IR (-O0):
define i32 @smtp_end_mail(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = call i64 (...) @use_mailer()
%5 = icmp ne i64 %4, 0
br i1 %5, label %6, label %9
6: ; preds = %1
%7 = load i32, i32* %3
%8 = call i32 @msmtp_end_mail(i32 %7)
store i32 %8, i32* %2
br label %12
9: ; preds = %1
%10 = load i32, i32* %3
%11 = call i32 @ismtp_end_mail(i32 %10)
store i32 %11, i32* %2
br label %12
12: ; preds = %9, %6
%13 = load i32, i32* %2
ret i32 %13
}

LLVM IR (-O2):
define i32 @smtp_end_mail(i32 %0) {
%2 = tail call i64 (...) @use_mailer()
%3 = icmp eq i64 %2, 0
br i1 %3, label %6, label %4
4: ; preds = %1
%5 = tail call i32 @msmtp_end_mail(i32 %0)
br label %8
6: ; preds = %1
%7 = tail call i32 @ismtp_end_mail(i32 %0)
br label %8
8: ; preds = %6, %4
%9 = phi i32 [ %5, %4 ], [ %7, %6 ]
ret i32 %9
}
void dl_G_RDPPIPESYNC() {}


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

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

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

LLVM IR (-O2):
define void @dl_G_RDPPIPESYNC() {
ret void
}
/* Variables and functions */
int fchownat(int /*<<< orphan*/, char *, int /*<<< orphan*/, int /*<<< orphan*/,
             int /*<<< orphan*/);
int main(void) { return fchownat(0, "", 0, 0, 0); }


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
xor    %r8d,%r8d
lea    0xed7(%rip),%rsi
mov    %r8d,%edi
mov    %r8d,%edx
mov    %r8d,%ecx
call   1030 <fchownat@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
lea    0xee9(%rip),%rsi
xor    %edi,%edi
xor    %edx,%edx
xor    %ecx,%ecx
xor    %r8d,%r8d
jmp    1030 <fchownat@plt>

LLVM IR (-O0):
@.str = [1 x i8] zeroinitializer
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @fchownat(i32 0, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0), i32 0, i32 0, i32 0)
ret i32 %2
}

LLVM IR (-O2):
@.str = [1 x i8] zeroinitializer
define i32 @main() {
%1 = tail call i32 @fchownat(i32 0, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0), i32 0, i32 0, i32 0)
ret i32 %1
}
void message_handler_req_lib_amf_protectiongrouptrackstop(void *conn,
                                                          void *msg) {}


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

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

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

LLVM IR (-O2):
define void @message_handler_req_lib_amf_protectiongrouptrackstop(i8* nocapture %0, i8* nocapture %1) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ __NR_exit_group;
long syscall(int /*<<< orphan*/, int);
long int __exit_group(int x) { return syscall(__NR_exit_group, x); }


x86 assembly (clang, -O0):
<__exit_group>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    0x2ece(%rip),%rax
mov    (%rax),%edi
mov    -0x4(%rbp),%esi
call   1030 <syscall@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__exit_group>:
mov    %edi,%esi
mov    0x2ed7(%rip),%rax
mov    (%rax),%edi
jmp    1030 <syscall@plt>

LLVM IR (-O0):
@__NR_exit_group = global i32 0
define i64 @__exit_group(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* @__NR_exit_group
%4 = load i32, i32* %2
%5 = call i64 @syscall(i32 %3, i32 %4)
ret i64 %5
}

LLVM IR (-O2):
@__NR_exit_group = global i32 0
define i64 @__exit_group(i32 %0) {
%2 = load i32, i32* @__NR_exit_group
%3 = tail call i64 @syscall(i32 %2, i32 %0)
ret i64 %3
}
int test_imm_74int8_mem(signed char *val) {
  return ((*val) & (0x74 << 0)) ? -20 : -40;
}


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

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

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

LLVM IR (-O2):
define i32 @test_imm_74int8_mem(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = and i8 %2, 116
%4 = icmp eq i8 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
unsigned djb2s(char const *key, unsigned hash) {
  char c;
  while (!!(c = *key++))
    hash = ((hash << 5) + hash) ^ c;
  return hash;
}


x86 assembly (clang, -O0):
<djb2s>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
mov    (%rax),%al
mov    %al,-0xd(%rbp)
cmp    $0x0,%al
setne  %al
xor    $0xff,%al
xor    $0xff,%al
test   $0x1,%al
jne    1135 <djb2s+0x35>
jmp    114c <djb2s+0x4c>
mov    -0xc(%rbp),%eax
shl    $0x5,%eax
add    -0xc(%rbp),%eax
movsbl -0xd(%rbp),%ecx
xor    %ecx,%eax
mov    %eax,-0xc(%rbp)
jmp    110b <djb2s+0xb>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<djb2s>:
mov    %esi,%eax
mov    (%rdi),%cl
test   %cl,%cl
je     1127 <djb2s+0x27>
add    $0x1,%rdi
nopl   0x0(%rax)
mov    %eax,%edx
shl    $0x5,%edx
add    %eax,%edx
movsbl %cl,%eax
xor    %edx,%eax
movzbl (%rdi),%ecx
add    $0x1,%rdi
test   %cl,%cl
jne    1110 <djb2s+0x10>
ret

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

LLVM IR (-O2):
define i32 @djb2s(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* [ %9, %5 ], [ %0, %2 ]
%8 = phi i32 [ %12, %5 ], [ %1, %2 ]
%9 = getelementptr inbounds i8, i8* %7, i64 1
%10 = mul i32 %8, 33
%11 = sext i8 %6 to i32
%12 = xor i32 %10, %11
%13 = load i8, i8* %9
%14 = icmp eq i8 %13, 0
br i1 %14, label %15, label %5
15: ; preds = %5, %2
%16 = phi i32 [ %1, %2 ], [ %12, %5 ]
ret i32 %16
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int n;
  scanf("%d", &n);
  if (n % 2 == 0)
    printf("yes\n");
  else
    printf("no\n");
  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
call   1040 <scanf@plt>
mov    -0x8(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    1164 <main+0x44>
lea    0xea9(%rip),%rdi
call   1030 <printf@plt>
jmp    1170 <main+0x50>
lea    0xe9d(%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
call   1040 <scanf@plt>
testb  $0x1,0x4(%rsp)
lea    0xec8(%rip),%rax
lea    0xebe(%rip),%rdi
cmove  %rax,%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@str = [3 x i8] c"no\00"
@str.3 = [4 x i8] c"yes\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%4 = load i32, i32* %1
%5 = and i32 %4, 1
%6 = icmp eq i32 %5, 0
%7 = select i1 %6, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @str.3, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @str, i64 0, i64 0)
%8 = call i32 @puts(i8* dereferenceable(1) %7)
ret i32 0
}
/* Variables and functions */
int assemble(char const *, unsigned char *);
int z80asm(unsigned char *outbuf, const char *s) { return assemble(s, outbuf); }


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

x86 assembly (clang, -O2):
<z80asm>:
mov    %rdi,%rax
mov    %rsi,%rdi
mov    %rax,%rsi
jmp    1030 <assemble@plt>

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

LLVM IR (-O2):
define i32 @z80asm(i8* %0, i8* %1) {
%3 = tail call i32 @assemble(i8* %1, i8* %0)
ret i32 %3
}
/* Variables and functions */
int bbm_bulk_write(void *, unsigned short, unsigned char *, unsigned short);
int bbm_com_bulk_write(void *handle, unsigned short addr, unsigned char *data,
                       unsigned short size) {
  int res;
  res = bbm_bulk_write(handle, addr, data, size);
  return res;
}


x86 assembly (clang, -O0):
<bbm_com_bulk_write>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %cx,%ax
mov    %si,%cx
mov    %rdi,-0x8(%rbp)
mov    %cx,-0xa(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ax,-0x1a(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xa(%rbp),%ax
mov    -0x18(%rbp),%rdx
movzwl %ax,%esi
movzwl -0x1a(%rbp),%ecx
call   1030 <bbm_bulk_write@plt>
mov    %eax,-0x20(%rbp)
mov    -0x20(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bbm_com_bulk_write>:
jmp    1030 <bbm_bulk_write@plt>

LLVM IR (-O0):
define i32 @bbm_com_bulk_write(i8* %0, i16 zeroext %1, i8* %2, i16 zeroext %3) {
%5 = alloca i8*
%6 = alloca i16
%7 = alloca i8*
%8 = alloca i16
%9 = alloca i32
store i8* %0, i8** %5
store i16 %1, i16* %6
store i8* %2, i8** %7
store i16 %3, i16* %8
%10 = load i8*, i8** %5
%11 = load i16, i16* %6
%12 = load i8*, i8** %7
%13 = load i16, i16* %8
%14 = call i32 @bbm_bulk_write(i8* %10, i16 zeroext %11, i8* %12, i16 zeroext %13)
store i32 %14, i32* %9
%15 = load i32, i32* %9
ret i32 %15
}

LLVM IR (-O2):
define i32 @bbm_com_bulk_write(i8* %0, i16 zeroext %1, i8* %2, i16 zeroext %3) {
%5 = tail call i32 @bbm_bulk_write(i8* %0, i16 zeroext %1, i8* %2, i16 zeroext %3)
ret i32 %5
}
/* Type definitions */
typedef int /*<<< orphan*/ time_t;
struct tm {
  int dummy;
};

/* Variables and functions */
struct tm *localtime(int /*<<< orphan*/ *);
int /*<<< orphan*/ mktime(struct tm *);
int /*<<< orphan*/ time(int /*<<< orphan*/);
time_t get_current_date() {
  time_t t = time(0);
  struct tm *tm = localtime(&t);
  t = mktime(tm);
  return t;
}


x86 assembly (clang, -O0):
<get_current_date>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
xor    %edi,%edi
call   1040 <time@plt>
mov    %eax,-0x4(%rbp)
lea    -0x4(%rbp),%rdi
call   1030 <localtime@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1050 <mktime@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_current_date>:
push   %rax
xor    %edi,%edi
call   1040 <time@plt>
mov    %eax,0x4(%rsp)
lea    0x4(%rsp),%rdi
call   1030 <localtime@plt>
mov    %rax,%rdi
call   1050 <mktime@plt>
pop    %rcx
ret

LLVM IR (-O0):
%struct.tm = type { i32 }
define i32 @get_current_date() {
%1 = alloca i32
%2 = alloca %struct.tm*
%3 = call i32 @time(i32 0)
store i32 %3, i32* %1
%4 = call %struct.tm* @localtime(i32* %1)
store %struct.tm* %4, %struct.tm** %2
%5 = load %struct.tm*, %struct.tm** %2
%6 = call i32 @mktime(%struct.tm* %5)
store i32 %6, i32* %1
%7 = load i32, i32* %1
ret i32 %7
}

LLVM IR (-O2):
%struct.tm = type { i32 }
define i32 @get_current_date() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = tail call i32 @time(i32 0)
store i32 %3, i32* %1
%4 = call %struct.tm* @localtime(i32* %1)
%5 = call i32 @mktime(%struct.tm* %4)
ret i32 %5
}
/* Type definitions */
struct bs_iter {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ free(struct bs_iter *);
void bs_iter_destroy(struct bs_iter *iter) { free(iter); }


x86 assembly (clang, -O0):
<bs_iter_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):
<bs_iter_destroy>:
jmp    1030 <free@plt>

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

LLVM IR (-O2):
%struct.bs_iter = type { i32 }
define void @bs_iter_destroy(%struct.bs_iter* nocapture %0) {
%2 = tail call i32 @free(%struct.bs_iter* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ bcm2835_i2c_setSlaveAddress(int);
int /*<<< orphan*/ bcm2835_i2c_write(char *, int);
int MAG3110_WRITE_REGISTER(char reg, char val) {
  char x = reg;
  char c = val;
  bcm2835_i2c_setSlaveAddress(14);
  bcm2835_i2c_write(&x, 2);
}


x86 assembly (clang, -O0):
<MAG3110_WRITE_REGISTER>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %sil,%al
mov    %dil,%cl
mov    %cl,-0x5(%rbp)
mov    %al,-0x6(%rbp)
mov    -0x5(%rbp),%al
mov    %al,-0x7(%rbp)
mov    -0x6(%rbp),%al
mov    %al,-0x8(%rbp)
mov    $0xe,%edi
call   1040 <bcm2835_i2c_setSlaveAddress@plt>
lea    -0x7(%rbp),%rdi
mov    $0x2,%esi
call   1030 <bcm2835_i2c_write@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<MAG3110_WRITE_REGISTER>:
push   %rax
mov    %dil,0x7(%rsp)
mov    $0xe,%edi
call   1040 <bcm2835_i2c_setSlaveAddress@plt>
lea    0x7(%rsp),%rdi
mov    $0x2,%esi
call   1030 <bcm2835_i2c_write@plt>
pop    %rcx
ret

LLVM IR (-O0):
define i32 @MAG3110_WRITE_REGISTER(i8 signext %0, i8 signext %1) {
%3 = alloca i32
%4 = alloca i8
%5 = alloca i8
%6 = alloca i8
%7 = alloca i8
store i8 %0, i8* %4
store i8 %1, i8* %5
%8 = load i8, i8* %4
store i8 %8, i8* %6
%9 = load i8, i8* %5
store i8 %9, i8* %7
%10 = call i32 @bcm2835_i2c_setSlaveAddress(i32 14)
%11 = call i32 @bcm2835_i2c_write(i8* %6, i32 2)
%12 = load i32, i32* %3
ret i32 %12
}

LLVM IR (-O2):
define i32 @MAG3110_WRITE_REGISTER(i8 signext %0, i8 signext %1) {
%3 = alloca i8
store i8 %0, i8* %3
%4 = tail call i32 @bcm2835_i2c_setSlaveAddress(i32 14)
%5 = call i32 @bcm2835_i2c_write(i8* %3, i32 2)
ret i32 undef
}
void copy(char to[], char from[]) {}


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

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

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

LLVM IR (-O2):
define void @copy(i8* nocapture %0, i8* nocapture %1) {
ret void
}
/* Type definitions */
typedef int uint8_t;

/* Variables and functions */
int /*<<< orphan*/ assert(int);
uint8_t ym_get_offset(uint8_t channel, uint8_t operator) {
  assert(operator<= 3);
  assert(channel <= 5);
  return operator* 4 + channel % 3;
}


x86 assembly (clang, -O0):
<ym_get_offset>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
cmpl   $0x3,-0x8(%rbp)
setle  %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
cmpl   $0x5,-0x4(%rbp)
setle  %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
mov    -0x8(%rbp),%eax
shl    $0x2,%eax
mov    %eax,-0xc(%rbp)
mov    -0x4(%rbp),%eax
mov    $0x3,%ecx
cltd
idiv   %ecx
mov    -0xc(%rbp),%eax
add    %edx,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ym_get_offset>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
xor    %edi,%edi
cmp    $0x4,%esi
setl   %dil
call   1030 <assert@plt>
xor    %edi,%edi
cmp    $0x6,%ebp
setl   %dil
call   1030 <assert@plt>
movslq %ebp,%rax
imul   $0x55555556,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
shr    $0x20,%rcx
add    %edx,%ecx
lea    (%rcx,%rcx,2),%ecx
sub    %ecx,%eax
lea    (%rax,%rbx,4),%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @ym_get_offset(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = icmp sle i32 %5, 3
%7 = zext i1 %6 to i32
%8 = call i32 @assert(i32 %7)
%9 = load i32, i32* %3
%10 = icmp sle i32 %9, 5
%11 = zext i1 %10 to i32
%12 = call i32 @assert(i32 %11)
%13 = load i32, i32* %4
%14 = mul nsw i32 %13, 4
%15 = load i32, i32* %3
%16 = srem i32 %15, 3
%17 = add nsw i32 %14, %16
ret i32 %17
}

LLVM IR (-O2):
define i32 @ym_get_offset(i32 %0, i32 %1) {
%3 = icmp slt i32 %1, 4
%4 = zext i1 %3 to i32
%5 = tail call i32 @assert(i32 %4)
%6 = icmp slt i32 %0, 6
%7 = zext i1 %6 to i32
%8 = tail call i32 @assert(i32 %7)
%9 = shl nsw i32 %1, 2
%10 = srem i32 %0, 3
%11 = add nsw i32 %9, %10
ret i32 %11
}
/* Type definitions */
struct uwsgi_stats {
  int dummy;
};

/* Variables and functions */
int uwsgi_stats_comma(struct uwsgi_stats *);
int uwsgi_stats_keyvaln(struct uwsgi_stats *, char *, char *, int);
int uwsgi_stats_keyvaln_comma(struct uwsgi_stats *us, char *key, char *value,
                              int vallen) {
  int ret = uwsgi_stats_keyvaln(us, key, value, vallen);
  if (ret)
    return -1;
  return uwsgi_stats_comma(us);
}


x86 assembly (clang, -O0):
<uwsgi_stats_keyvaln_comma>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    %ecx,-0x24(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    -0x20(%rbp),%rdx
mov    -0x24(%rbp),%ecx
call   1040 <uwsgi_stats_keyvaln@plt>
mov    %eax,-0x28(%rbp)
cmpl   $0x0,-0x28(%rbp)
je     1164 <uwsgi_stats_keyvaln_comma+0x44>
movl   $0xffffffff,-0x4(%rbp)
jmp    1170 <uwsgi_stats_keyvaln_comma+0x50>
mov    -0x10(%rbp),%rdi
call   1030 <uwsgi_stats_comma@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<uwsgi_stats_keyvaln_comma>:
push   %rbx
mov    %rdi,%rbx
call   1040 <uwsgi_stats_keyvaln@plt>
test   %eax,%eax
je     1134 <uwsgi_stats_keyvaln_comma+0x14>
mov    $0xffffffff,%eax
pop    %rbx
ret
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <uwsgi_stats_comma@plt>

LLVM IR (-O0):
%struct.uwsgi_stats = type { i32 }
define i32 @uwsgi_stats_keyvaln_comma(%struct.uwsgi_stats* %0, i8* %1, i8* %2, i32 %3) {
%5 = alloca i32
%6 = alloca %struct.uwsgi_stats*
%7 = alloca i8*
%8 = alloca i8*
%9 = alloca i32
%10 = alloca i32
store %struct.uwsgi_stats* %0, %struct.uwsgi_stats** %6
store i8* %1, i8** %7
store i8* %2, i8** %8
store i32 %3, i32* %9
%11 = load %struct.uwsgi_stats*, %struct.uwsgi_stats** %6
%12 = load i8*, i8** %7
%13 = load i8*, i8** %8
%14 = load i32, i32* %9
%15 = call i32 @uwsgi_stats_keyvaln(%struct.uwsgi_stats* %11, i8* %12, i8* %13, i32 %14)
store i32 %15, i32* %10
%16 = load i32, i32* %10
%17 = icmp ne i32 %16, 0
br i1 %17, label %18, label %19
18: ; preds = %4
store i32 -1, i32* %5
br label %22
19: ; preds = %4
%20 = load %struct.uwsgi_stats*, %struct.uwsgi_stats** %6
%21 = call i32 @uwsgi_stats_comma(%struct.uwsgi_stats* %20)
store i32 %21, i32* %5
br label %22
22: ; preds = %19, %18
%23 = load i32, i32* %5
ret i32 %23
}

LLVM IR (-O2):
%struct.uwsgi_stats = type { i32 }
define i32 @uwsgi_stats_keyvaln_comma(%struct.uwsgi_stats* %0, i8* %1, i8* %2, i32 %3) {
%5 = tail call i32 @uwsgi_stats_keyvaln(%struct.uwsgi_stats* %0, i8* %1, i8* %2, i32 %3)
%6 = icmp eq i32 %5, 0
br i1 %6, label %7, label %9
7: ; preds = %4
%8 = tail call i32 @uwsgi_stats_comma(%struct.uwsgi_stats* %0)
br label %9
9: ; preds = %4, %7
%10 = phi i32 [ %8, %7 ], [ -1, %4 ]
ret i32 %10
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, double, double);
double sinc(double);
int /*<<< orphan*/ stderr;
int main(int argc, char *argv[]) {
  double f = 1.0;
  fprintf(stderr, "sinc(%f) = %f\n", f, sinc(f));
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
movsd  0xec9(%rip),%xmm0
movsd  %xmm0,-0x18(%rbp)
mov    0x2e9d(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x24(%rbp)
movsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x18(%rbp),%xmm0
call   1040 <sinc@plt>
mov    -0x24(%rbp),%edi
movaps %xmm0,%xmm1
movsd  -0x20(%rbp),%xmm0
lea    0xe9a(%rip),%rsi
call   1030 <fprintf@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    0x2eb8(%rip),%rax
mov    (%rax),%ebx
movsd  0xece(%rip),%xmm0
call   1040 <sinc@plt>
movaps %xmm0,%xmm1
lea    0xec7(%rip),%rsi
mov    %ebx,%edi
movsd  0xeb5(%rip),%xmm0
call   1030 <fprintf@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@stderr = global i32 0
@.str = [15 x i8] c"sinc(%f) = %f\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
%5 = alloca double
store i32 %0, i32* %3
store i8** %1, i8*** %4
store double 1.000000e+00, double* %5
%6 = load i32, i32* @stderr
%7 = load double, double* %5
%8 = load double, double* %5
%9 = call double @sinc(double %8)
%10 = call i32 @fprintf(i32 %6, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), double %7, double %9)
ret i32 0
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [15 x i8] c"sinc(%f) = %f\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = load i32, i32* @stderr
%4 = tail call double @sinc(double 1.000000e+00)
%5 = tail call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), double 1.000000e+00, double %4)
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ ssize_t;

/* Variables and functions */
int /*<<< orphan*/ rio_readn(int, void *, size_t);
int /*<<< orphan*/ unix_error(char *);
ssize_t Rio_readn(int fd, void *ptr, size_t nbytes) {
  ssize_t n;
  if ((n = rio_readn(fd, ptr, nbytes)) < 0)
    unix_error("Rio_readn error");
  return n;
}


x86 assembly (clang, -O0):
<Rio_readn>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1040 <rio_readn@plt>
mov    %eax,-0x1c(%rbp)
cmp    $0x0,%eax
jge    115b <Rio_readn+0x3b>
lea    0xeaa(%rip),%rdi
call   1030 <unix_error@plt>
mov    -0x1c(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Rio_readn>:
push   %rbx
call   1040 <rio_readn@plt>
mov    %eax,%ebx
test   %eax,%eax
jns    1138 <Rio_readn+0x18>
lea    0xecd(%rip),%rdi
call   1030 <unix_error@plt>
mov    %ebx,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [16 x i8] c"Rio_readn error\00"
define i32 @Rio_readn(i32 %0, i8* %1, i64 %2) {
%4 = tail call i32 @rio_readn(i32 %0, i8* %1, i64 %2)
%5 = icmp slt i32 %4, 0
br i1 %5, label %6, label %8
6: ; preds = %3
%7 = tail call i32 @unix_error(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
br label %8
8: ; preds = %6, %3
ret i32 %4
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
int rand();
uint32_t random_int(int r_min, uint32_t r_max) {
  return (rand() % (r_max + 1 - r_min)) + r_min;
}


x86 assembly (clang, -O0):
<random_int>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    $0x0,%al
call   1030 <rand@plt>
mov    -0x8(%rbp),%ecx
add    $0x1,%ecx
sub    -0x4(%rbp),%ecx
cltd
idiv   %ecx
mov    %edx,%eax
add    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<random_int>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
xor    %eax,%eax
call   1030 <rand@plt>
sub    %ebp,%ebx
add    $0x1,%ebx
cltd
idiv   %ebx
add    %edx,%ebp
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @random_int(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = call i32 (...) @rand()
%6 = load i32, i32* %4
%7 = add nsw i32 %6, 1
%8 = load i32, i32* %3
%9 = sub nsw i32 %7, %8
%10 = srem i32 %5, %9
%11 = load i32, i32* %3
%12 = add nsw i32 %10, %11
ret i32 %12
}

LLVM IR (-O2):
define i32 @random_int(i32 %0, i32 %1) {
%3 = tail call i32 (...) @rand()
%4 = sub i32 1, %0
%5 = add i32 %4, %1
%6 = srem i32 %3, %5
%7 = add nsw i32 %6, %0
ret i32 %7
}
/* Variables and functions */
unsigned char inb(int);
int /*<<< orphan*/ outb(unsigned short, int);
unsigned char read_att_b(unsigned short addr) {
  inb(0x3DA);
  inb(0x80);
  outb(addr, 0x3C0);
  return inb(0x3C1);
}


x86 assembly (clang, -O0):
<read_att_b>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
mov    $0x3da,%edi
call   1040 <inb@plt>
mov    $0x80,%edi
call   1040 <inb@plt>
mov    $0x3c0,%esi
movzwl -0x2(%rbp),%edi
call   1030 <outb@plt>
mov    $0x3c1,%edi
call   1040 <inb@plt>
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<read_att_b>:
push   %rbx
mov    %edi,%ebx
mov    $0x3da,%edi
call   1040 <inb@plt>
mov    $0x80,%edi
call   1040 <inb@plt>
mov    %ebx,%edi
mov    $0x3c0,%esi
call   1030 <outb@plt>
mov    $0x3c1,%edi
pop    %rbx
jmp    1040 <inb@plt>

LLVM IR (-O0):
define zeroext i8 @read_att_b(i16 zeroext %0) {
%2 = alloca i16
store i16 %0, i16* %2
%3 = call zeroext i8 @inb(i32 986)
%4 = call zeroext i8 @inb(i32 128)
%5 = load i16, i16* %2
%6 = call i32 @outb(i16 zeroext %5, i32 960)
%7 = call zeroext i8 @inb(i32 961)
ret i8 %7
}

LLVM IR (-O2):
define zeroext i8 @read_att_b(i16 zeroext %0) {
%2 = tail call zeroext i8 @inb(i32 986)
%3 = tail call zeroext i8 @inb(i32 128)
%4 = tail call i32 @outb(i16 zeroext %0, i32 960)
%5 = tail call zeroext i8 @inb(i32 961)
ret i8 %5
}
void gtk_icon_factory_lookup_default() {}


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

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

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

LLVM IR (-O2):
define void @gtk_icon_factory_lookup_default() {
ret void
}
void gtk_icon_info_load_icon() {}


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

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

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

LLVM IR (-O2):
define void @gtk_icon_info_load_icon() {
ret void
}
void g_queue_insert_after() {}


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

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

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

LLVM IR (-O2):
define void @g_queue_insert_after() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_SUCCESS;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *);
int main(void) {
  printf("This is just a stub file to allow compilation to work.\n");
  exit(EXIT_SUCCESS);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
call   1030 <printf@plt>
mov    0x2e9e(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

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

LLVM IR (-O0):
@.str = [56 x i8] c"This is just a stub file to allow compilation to work.\0A\00"
@EXIT_SUCCESS = global i32 0
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([56 x i8], [56 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* @EXIT_SUCCESS
%4 = call i32 @exit(i32 %3)
unreachable
}

LLVM IR (-O2):
@EXIT_SUCCESS = global i32 0
@str = [55 x i8] c"This is just a stub file to allow compilation to work.\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([55 x i8], [55 x i8]* @str, i64 0, i64 0))
%2 = load i32, i32* @EXIT_SUCCESS
%3 = tail call i32 @exit(i32 %2)
unreachable
}