xunge/DecIR huggingface dataset:
/* Variables and functions */
scalar_t__ strcmp(char *, char *);
void consume_argv(int argc, char **argv) {
  if (strcmp(argv[1], "show") == 0)
    return;
}


x86 assembly (clang, -O0):
<consume_argv>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
lea    0xed2(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%rax
jne    1142 <consume_argv+0x32>
jmp    1142 <consume_argv+0x32>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<consume_argv>:
mov    0x8(%rsi),%rdi
lea    0xee5(%rip),%rsi
jmp    1030 <strcmp@plt>

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

LLVM IR (-O2):
@.str = [5 x i8] c"show\00"
define void @consume_argv(i32 %0, i8** nocapture %1) {
%3 = getelementptr inbounds i8*, i8** %1, i64 1
%4 = load i8*, i8** %3
%5 = tail call i64 @strcmp(i8* %4, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
ret void
}
void fge(int *y) {
  char x;
  asm(""
      : "=@cc"
        "ge"(x));
  if (!x)
    *y = 0;
}


x86 assembly (clang, -O0):
<fge>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
setge  %al
mov    %al,-0x9(%rbp)
cmpb   $0x0,-0x9(%rbp)
jne    1122 <fge+0x22>
mov    -0x8(%rbp),%rax
movl   $0x0,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<fge>:
jl     1103 <fge+0x3>
ret
movl   $0x0,(%rdi)
ret

LLVM IR (-O0):
define void @fge(i32* %0) {
%2 = alloca i32*
%3 = alloca i8
store i32* %0, i32** %2
%4 = call i8 asm "", "={@ccge},~{dirflag},~{fpsr},~{flags}"()
store i8 %4, i8* %3
%5 = load i8, i8* %3
%6 = icmp ne i8 %5, 0
br i1 %6, label %9, label %7
7: ; preds = %1
%8 = load i32*, i32** %2
store i32 0, i32* %8
br label %9
9: ; preds = %7, %1
ret void
}

LLVM IR (-O2):
define void @fge(i32* nocapture writeonly %0) {
%2 = tail call i8 asm "", "={@ccge},~{dirflag},~{fpsr},~{flags}"()
%3 = icmp eq i8 %2, 0
br i1 %3, label %4, label %5
4: ; preds = %1
store i32 0, i32* %0
br label %5
5: ; preds = %4, %1
ret void
}
/* Type definitions */
struct addrinfo {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ gai_error(int, char *);
int getaddrinfo(char const *, char const *, struct addrinfo const *,
                struct addrinfo **);
void Getaddrinfo(const char *node, const char *service,
                 const struct addrinfo *hints, struct addrinfo **res) {
  int rc;
  if ((rc = getaddrinfo(node, service, hints, res)) != 0)
    gai_error(rc, "Getaddrinfo error");
}


x86 assembly (clang, -O0):
<Getaddrinfo>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
call   1040 <getaddrinfo@plt>
mov    %eax,-0x24(%rbp)
cmp    $0x0,%eax
je     1168 <Getaddrinfo+0x48>
mov    -0x24(%rbp),%edi
lea    0xe9d(%rip),%rsi
call   1030 <gai_error@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Getaddrinfo>:
push   %rax
call   1040 <getaddrinfo@plt>
test   %eax,%eax
je     1139 <Getaddrinfo+0x19>
lea    0xecf(%rip),%rsi
mov    %eax,%edi
pop    %rax
jmp    1030 <gai_error@plt>
pop    %rax
ret

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

LLVM IR (-O2):
%struct.addrinfo = type { i32 }
@.str = [18 x i8] c"Getaddrinfo error\00"
define void @Getaddrinfo(i8* %0, i8* %1, %struct.addrinfo* %2, %struct.addrinfo** %3) {
%5 = tail call i32 @getaddrinfo(i8* %0, i8* %1, %struct.addrinfo* %2, %struct.addrinfo** %3)
%6 = icmp eq i32 %5, 0
br i1 %6, label %9, label %7
7: ; preds = %4
%8 = tail call i32 @gai_error(i32 %5, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
br label %9
9: ; preds = %7, %4
ret void
}
/* Variables and functions */
scalar_t__ isShellSymb(char);
int isSeparator(char c) { return (c == ' ') || isShellSymb(c); }


x86 assembly (clang, -O0):
<isSeparator>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0x20,%ecx
mov    %al,-0x2(%rbp)
je     1143 <isSeparator+0x33>
movsbl -0x1(%rbp),%edi
call   1030 <isShellSymb@plt>
cmp    $0x0,%rax
setne  %al
mov    %al,-0x2(%rbp)
mov    -0x2(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<isSeparator>:
mov    $0x1,%eax
cmp    $0x20,%dil
je     1134 <isSeparator+0x24>
push   %rax
movsbl %dil,%edi
call   1030 <isShellSymb@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
setne  %al
add    $0x8,%rsp
ret

LLVM IR (-O0):
define i32 @isSeparator(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
%5 = icmp eq i32 %4, 32
br i1 %5, label %10, label %6
6: ; preds = %1
%7 = load i8, i8* %2
%8 = call i64 @isShellSymb(i8 signext %7)
%9 = icmp ne i64 %8, 0
br label %10
10: ; preds = %6, %1
%11 = phi i1 [ true, %1 ], [ %9, %6 ]
%12 = zext i1 %11 to i32
ret i32 %12
}

LLVM IR (-O2):
define i32 @isSeparator(i8 signext %0) {
%2 = icmp eq i8 %0, 32
br i1 %2, label %7, label %3
3: ; preds = %1
%4 = tail call i64 @isShellSymb(i8 signext %0)
%5 = icmp ne i64 %4, 0
%6 = zext i1 %5 to i32
br label %7
7: ; preds = %3, %1
%8 = phi i32 [ 1, %1 ], [ %6, %3 ]
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
scalar_t__ system(char *);
void test_system(void) { assert(system("/foo/bar/test") == 0); }


x86 assembly (clang, -O0):
<test_system>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1030 <system@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_system>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <system@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
pop    %rax
jmp    1040 <assert@plt>

LLVM IR (-O0):
@.str = [14 x i8] c"/foo/bar/test\00"
define void @test_system() {
%1 = call i64 @system(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @assert(i32 %3)
ret void
}

LLVM IR (-O2):
@.str = [14 x i8] c"/foo/bar/test\00"
define void @test_system() {
%1 = tail call i64 @system(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @assert(i32 %3)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint64_t;
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
void chacha_streamcipher(char *out, const char *in, size_t bytes,
                         const uint32_t key[8], uint64_t n, uint64_t l) {}


x86 assembly (clang, -O0):
<chacha_streamcipher>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8d,-0x24(%rbp)
mov    %r9d,-0x28(%rbp)
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @chacha_streamcipher(i8* nocapture %0, i8* nocapture %1, i64 %2, i32* nocapture %3, i32 %4, i32 %5) {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ off_t;

/* Variables and functions */
int /*<<< orphan*/ ENOSYS;
int /*<<< orphan*/ errno;
int truncate(const char *path, off_t length) {
  errno = ENOSYS;
  return -1;
}


x86 assembly (clang, -O0):
<truncate>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    0x2ed6(%rip),%rax
mov    (%rax),%ecx
mov    0x2ebd(%rip),%rax
mov    %ecx,(%rax)
mov    $0xffffffff,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<truncate>:
mov    0x2ee1(%rip),%rax
mov    (%rax),%eax
mov    0x2ec8(%rip),%rcx
mov    %eax,(%rcx)
mov    $0xffffffff,%eax
ret

LLVM IR (-O0):
@ENOSYS = global i32 0
@errno = global i32 0
define i32 @truncate(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i32, i32* @ENOSYS
store i32 %5, i32* @errno
ret i32 -1
}

LLVM IR (-O2):
@ENOSYS = global i32 0
@errno = global i32 0
define i32 @truncate(i8* nocapture readnone %0, i32 %1) {
%3 = load i32, i32* @ENOSYS
store i32 %3, i32* @errno
ret i32 -1
}
/* Variables and functions */
int /*<<< orphan*/ ADC_(int);
int /*<<< orphan*/ c64_memAbsoluteAddrY();
void ADC_absy(void) {
  c64_memAbsoluteAddrY();
  ADC_(1);
}


x86 assembly (clang, -O0):
<ADC_absy>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <c64_memAbsoluteAddrY@plt>
mov    $0x1,%edi
call   1030 <ADC_@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<ADC_absy>:
push   %rax
xor    %eax,%eax
call   1040 <c64_memAbsoluteAddrY@plt>
mov    $0x1,%edi
pop    %rax
jmp    1030 <ADC_@plt>

LLVM IR (-O0):
define void @ADC_absy() {
%1 = call i32 (...) @c64_memAbsoluteAddrY()
%2 = call i32 @ADC_(i32 1)
ret void
}

LLVM IR (-O2):
define void @ADC_absy() {
%1 = tail call i32 (...) @c64_memAbsoluteAddrY()
%2 = tail call i32 @ADC_(i32 1)
ret void
}
void BlinkNoTimerTaskC$Leds$led2On(void) { LedsP$Leds$led2On(); }


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

x86 assembly (clang, -O2):
<BlinkNoTimerTaskC$Leds$led2On>:
xor    %eax,%eax
jmp    1030 <LedsP$Leds$led2On@plt>

LLVM IR (-O0):
define void @"BlinkNoTimerTaskC$Leds$led2On"() {
%1 = call i32 (...) @"LedsP$Leds$led2On"()
ret void
}

LLVM IR (-O2):
define void @"BlinkNoTimerTaskC$Leds$led2On"() {
%1 = tail call i32 (...) @"LedsP$Leds$led2On"()
ret void
}
void ceph_invalidate_fscache_page(struct inode *inode, struct page *page) {}


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

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

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

LLVM IR (-O2):
%struct.inode = type opaque
%struct.page = type opaque
define void @ceph_invalidate_fscache_page(%struct.inode* nocapture %0, %struct.page* nocapture %1) {
ret void
}
/* Type definitions */
typedef int uint8_t;
typedef int uint32_t;

/* Variables and functions */
uint32_t tobcd(uint32_t v) {
  uint8_t l = v % 10;
  v /= 10;
  return (v << 4) | l;
}


x86 assembly (clang, -O0):
<tobcd>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %edx,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
shl    $0x4,%eax
or     -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<tobcd>:
movslq %edi,%rcx
imul   $0x66666667,%rcx,%rax
mov    %rax,%rdx
shr    $0x3f,%rdx
sar    $0x22,%rax
add    %edx,%eax
lea    (%rax,%rax,1),%edx
lea    (%rdx,%rdx,4),%edx
sub    %edx,%ecx
shl    $0x4,%eax
or     %ecx,%eax
ret

LLVM IR (-O0):
define i32 @tobcd(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = srem i32 %4, 10
store i32 %5, i32* %3
%6 = load i32, i32* %2
%7 = sdiv i32 %6, 10
store i32 %7, i32* %2
%8 = load i32, i32* %2
%9 = shl i32 %8, 4
%10 = load i32, i32* %3
%11 = or i32 %9, %10
ret i32 %11
}

LLVM IR (-O2):
define i32 @tobcd(i32 %0) {
%2 = srem i32 %0, 10
%3 = sdiv i32 %0, 10
%4 = shl i32 %3, 4
%5 = or i32 %4, %2
ret i32 %5
}
void av_sub_i() {}


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

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

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

LLVM IR (-O2):
define void @av_sub_i() {
ret void
}
/* Variables and functions */
int fabsf(float);
int close(float a, float b) { return fabsf(a - b) < 1e-5; }


x86 assembly (clang, -O0):
<close>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  -0x4(%rbp),%xmm0
subss  -0x8(%rbp),%xmm0
call   1030 <fabsf@plt>
cvtsi2sd %eax,%xmm1
movsd  0xec3(%rip),%xmm0
ucomisd %xmm1,%xmm0
seta   %al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<close>:
push   %rax
subss  %xmm1,%xmm0
call   1030 <fabsf@plt>
xor    %ecx,%ecx
test   %eax,%eax
setle  %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @close(float %0, float %1) {
%3 = alloca float
%4 = alloca float
store float %0, float* %3
store float %1, float* %4
%5 = load float, float* %3
%6 = load float, float* %4
%7 = fsub float %5, %6
%8 = call i32 @fabsf(float %7)
%9 = sitofp i32 %8 to double
%10 = fcmp olt double %9, 1.000000e-05
%11 = zext i1 %10 to i32
ret i32 %11
}

LLVM IR (-O2):
define i32 @close(float %0, float %1) {
%3 = fsub float %0, %1
%4 = tail call i32 @fabsf(float %3)
%5 = icmp slt i32 %4, 1
%6 = zext i1 %5 to i32
ret i32 %6
}
/* Type definitions */
typedef int /*<<< orphan*/ wchar_t;

/* Variables and functions */
int execute_keys_general_wrapper(int /*<<< orphan*/ const *, int,
                                 int /*<<< orphan*/, int /*<<< orphan*/);
int execute_keys_timed_out(const wchar_t keys[]) {
  return execute_keys_general_wrapper(keys, 1, 0, 0);
}


x86 assembly (clang, -O0):
<execute_keys_timed_out>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x1,%esi
xor    %ecx,%ecx
mov    %ecx,%edx
call   1030 <execute_keys_general_wrapper@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<execute_keys_timed_out>:
mov    $0x1,%esi
xor    %edx,%edx
xor    %ecx,%ecx
jmp    1030 <execute_keys_general_wrapper@plt>

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

LLVM IR (-O2):
define i32 @execute_keys_timed_out(i32* %0) {
%2 = tail call i32 @execute_keys_general_wrapper(i32* %0, i32 1, i32 0, i32 0)
ret i32 %2
}
void library_finalizer(struct test_suite *test_suite) {}


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

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

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

LLVM IR (-O2):
%struct.test_suite = type opaque
define void @library_finalizer(%struct.test_suite* nocapture %0) {
ret void
}
/* Type definitions */
struct event_base {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ assert(char *);
struct event_base *event_base_new(void) {
  assert(("libev: multiple event bases not supported when not compiled with "
          "EV_MULTIPLICITY"));
  return NULL;
}


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

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

LLVM IR (-O0):
%struct.event_base = type { i32 }
@.str = [81 x i8] c"libev: multiple event bases not supported when not compiled with EV_MULTIPLICITY\00"
define %struct.event_base* @event_base_new() {
%1 = call i32 @assert(i8* getelementptr inbounds ([81 x i8], [81 x i8]* @.str, i64 0, i64 0))
ret %struct.event_base* null
}

LLVM IR (-O2):
%struct.event_base = type { i32 }
@.str = [81 x i8] c"libev: multiple event bases not supported when not compiled with EV_MULTIPLICITY\00"
define noalias %struct.event_base* @event_base_new() {
%1 = tail call i32 @assert(i8* getelementptr inbounds ([81 x i8], [81 x i8]* @.str, i64 0, i64 0))
ret %struct.event_base* null
}
unsigned int readl(const volatile void *addr) {
  return *(volatile unsigned int *)addr;
}


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

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

LLVM IR (-O0):
define i32 @readl(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = bitcast i8* %3 to i32*
%5 = load volatile i32, i32* %4
ret i32 %5
}

LLVM IR (-O2):
define i32 @readl(i8* %0) {
%2 = bitcast i8* %0 to i32*
%3 = load volatile i32, i32* %2
ret i32 %3
}
/* Variables and functions */
int _foo1_helper();
scalar_t__ cos(double);
int /*<<< orphan*/ printf(char *, double);
int foo1_LTX_foo1() {
  printf("cos (0.0) = %g\n", (double)cos((double)0.0));
  return _foo1_helper();
}


x86 assembly (clang, -O0):
<foo1_LTX_foo1>:
push   %rbp
mov    %rsp,%rbp
xorps  %xmm0,%xmm0
call   1050 <cos@plt>
cvtsi2sd %rax,%xmm0
lea    0xeb8(%rip),%rdi
call   1030 <printf@plt>
mov    $0x0,%al
call   1040 <_foo1_helper@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo1_LTX_foo1>:
push   %rax
xorps  %xmm0,%xmm0
call   1050 <cos@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %rax,%xmm0
lea    0xeb8(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <_foo1_helper@plt>

LLVM IR (-O0):
@.str = [16 x i8] c"cos (0.0) = %g\0A\00"
define i32 @foo1_LTX_foo1() {
%1 = call i64 @cos(double 0.000000e+00)
%2 = sitofp i64 %1 to double
%3 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), double %2)
%4 = call i32 (...) @_foo1_helper()
ret i32 %4
}

LLVM IR (-O2):
@.str = [16 x i8] c"cos (0.0) = %g\0A\00"
define i32 @foo1_LTX_foo1() {
%1 = tail call i64 @cos(double 0.000000e+00)
%2 = sitofp i64 %1 to double
%3 = tail call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), double %2)
%4 = tail call i32 (...) @_foo1_helper()
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *, int);
void my_func(char *p, int x) { printf("p is \"%s\" and x is %i\n", p, x); }


x86 assembly (clang, -O0):
<my_func>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rsi
mov    -0xc(%rbp),%edx
lea    0xed3(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<my_func>:
mov    %esi,%edx
mov    %rdi,%rsi
lea    0xee4(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [23 x i8] c"p is \22%s\22 and x is %i\0A\00"
define void @my_func(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i8*, i8** %3
%6 = load i32, i32* %4
%7 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i8* %5, i32 %6)
ret void
}

LLVM IR (-O2):
@.str = [23 x i8] c"p is \22%s\22 and x is %i\0A\00"
define void @my_func(i8* %0, i32 %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i8* %0, i32 %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int *);
int times_called() {
  static int counter = 0;
  printf("Address of counter is %p\n", &counter);
  counter++;
  return counter;
}


x86 assembly (clang, -O0):
<times_called>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
lea    0x2f0a(%rip),%rsi
call   1030 <printf@plt>
mov    0x2eff(%rip),%eax
add    $0x1,%eax
mov    %eax,0x2ef6(%rip)
mov    0x2ef0(%rip),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<times_called>:
push   %rax
lea    0xee8(%rip),%rdi
lea    0x2f0d(%rip),%rsi
call   1030 <printf@plt>
mov    0x2f02(%rip),%eax
add    $0x1,%eax
mov    %eax,0x2ef9(%rip)
pop    %rcx
ret

LLVM IR (-O0):
@times_called.counter = internal global i32 0
@.str = [26 x i8] c"Address of counter is %p\0A\00"
define i32 @times_called() {
%1 = call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0), i32* @times_called.counter)
%2 = load i32, i32* @times_called.counter
%3 = add nsw i32 %2, 1
store i32 %3, i32* @times_called.counter
%4 = load i32, i32* @times_called.counter
ret i32 %4
}

LLVM IR (-O2):
@times_called.counter = internal global i32 0
@.str = [26 x i8] c"Address of counter is %p\0A\00"
define i32 @times_called() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0), i32* @times_called.counter)
%2 = load i32, i32* @times_called.counter
%3 = add nsw i32 %2, 1
store i32 %3, i32* @times_called.counter
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ ULLONG_MAX;
unsigned long long strtox(char const *, char **, int, int /*<<< orphan*/);
unsigned long long strtoull(const char *restrict s, char **restrict p,
                            int base) {
  return strtox(s, p, base, ULLONG_MAX);
}


x86 assembly (clang, -O0):
<strtoull>:
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
mov    0x2eb3(%rip),%rax
mov    (%rax),%ecx
call   1030 <strtox@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strtoull>:
mov    0x2ed1(%rip),%rax
mov    (%rax),%ecx
jmp    1030 <strtox@plt>

LLVM IR (-O0):
@ULLONG_MAX = global i32 0
define i64 @strtoull(i8* noalias %0, i8** noalias %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 = load i32, i32* @ULLONG_MAX
%11 = call i64 @strtox(i8* %7, i8** %8, i32 %9, i32 %10)
ret i64 %11
}

LLVM IR (-O2):
@ULLONG_MAX = global i32 0
define i64 @strtoull(i8* noalias %0, i8** noalias %1, i32 %2) {
%4 = load i32, i32* @ULLONG_MAX
%5 = tail call i64 @strtox(i8* %0, i8** %1, i32 %2, i32 %4)
ret i64 %5
}
/* Variables and functions */
int /*<<< orphan*/ close(int);
void close_dns(int fd) { close(fd); }


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

x86 assembly (clang, -O2):
<close_dns>:
jmp    1030 <close@plt>

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

LLVM IR (-O2):
define void @close_dns(i32 %0) {
%2 = tail call i32 @close(i32 %0)
ret void
}
void bus_sync(void) {}


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

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

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

LLVM IR (-O2):
define void @bus_sync() {
ret void
}
/* Variables and functions */
long xatoll(char const *);
long xatol(const char *str) { return xatoll(str); }


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

x86 assembly (clang, -O2):
<xatol>:
jmp    1030 <xatoll@plt>

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

LLVM IR (-O2):
define i64 @xatol(i8* %0) {
%2 = tail call i64 @xatoll(i8* %0)
ret i64 %2
}
/* Variables and functions */
scalar_t__ modify(long double);
void sum(long double *ptr, long double value, unsigned long n) {
  unsigned long i;
  for (i = 0; i < n; i++)
    ptr[i] += modify(value);
}


x86 assembly (clang, -O0):
<sum>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
fldt   0x10(%rbp)
mov    %rdi,-0x8(%rbp)
fstpt  -0x20(%rbp)
mov    %rsi,-0x28(%rbp)
movq   $0x0,-0x30(%rbp)
mov    -0x30(%rbp),%rax
cmp    -0x28(%rbp),%rax
jae    1175 <sum+0x65>
fldt   -0x20(%rbp)
mov    %rsp,%rax
fstpt  (%rax)
call   1030 <modify@plt>
mov    %rax,-0x38(%rbp)
fildll -0x38(%rbp)
mov    -0x8(%rbp),%rax
mov    -0x30(%rbp),%rcx
shl    $0x4,%rcx
fldt   (%rax,%rcx,1)
faddp  %st,%st(1)
fstpt  (%rax,%rcx,1)
mov    -0x30(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x30(%rbp)
jmp    112e <sum+0x1e>
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sum>:
push   %r14
push   %rbx
sub    $0x28,%rsp
fldt   0x40(%rsp)
test   %rsi,%rsi
je     1155 <sum+0x45>
mov    %rsi,%r14
mov    %rdi,%rbx
fld    %st(0)
fstpt  0x1c(%rsp)
nopl   0x0(%rax)
fstpt  (%rsp)
call   1030 <modify@plt>
mov    %rax,0x10(%rsp)
fildll 0x10(%rsp)
fldt   (%rbx)
faddp  %st,%st(1)
fstpt  (%rbx)
fldt   0x1c(%rsp)
add    $0x10,%rbx
add    $0xffffffffffffffff,%r14
jne    1130 <sum+0x20>
fstp   %st(0)
add    $0x28,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define void @sum(x86_fp80* %0, x86_fp80 %1, i64 %2) {
%4 = alloca x86_fp80*
%5 = alloca x86_fp80
%6 = alloca i64
%7 = alloca i64
store x86_fp80* %0, x86_fp80** %4
store x86_fp80 %1, x86_fp80* %5
store i64 %2, i64* %6
store i64 0, i64* %7
br label %8
8: ; preds = %21, %3
%9 = load i64, i64* %7
%10 = load i64, i64* %6
%11 = icmp ult i64 %9, %10
br i1 %11, label %12, label %24
12: ; preds = %8
%13 = load x86_fp80, x86_fp80* %5
%14 = call i64 @modify(x86_fp80 %13)
%15 = sitofp i64 %14 to x86_fp80
%16 = load x86_fp80*, x86_fp80** %4
%17 = load i64, i64* %7
%18 = getelementptr inbounds x86_fp80, x86_fp80* %16, i64 %17
%19 = load x86_fp80, x86_fp80* %18
%20 = fadd x86_fp80 %19, %15
store x86_fp80 %20, x86_fp80* %18
br label %21
21: ; preds = %12
%22 = load i64, i64* %7
%23 = add i64 %22, 1
store i64 %23, i64* %7
br label %8
24: ; preds = %8
ret void
}

LLVM IR (-O2):
define void @sum(x86_fp80* nocapture %0, x86_fp80 %1, i64 %2) {
%4 = icmp eq i64 %2, 0
br i1 %4, label %14, label %5
5: ; preds = %3, %5
%6 = phi i64 [ %12, %5 ], [ 0, %3 ]
%7 = tail call i64 @modify(x86_fp80 %1)
%8 = sitofp i64 %7 to x86_fp80
%9 = getelementptr inbounds x86_fp80, x86_fp80* %0, i64 %6
%10 = load x86_fp80, x86_fp80* %9
%11 = fadd x86_fp80 %10, %8
store x86_fp80 %11, x86_fp80* %9
%12 = add nuw i64 %6, 1
%13 = icmp eq i64 %12, %2
br i1 %13, label %14, label %5
14: ; preds = %5, %3
ret void
}
/* Variables and functions */
int /*<<< orphan*/ multicast_link_read_data_from_sock(int /*<<< orphan*/);
void *multicast_link_main_loop(void *param) {
  while (1) {
    multicast_link_read_data_from_sock(0);
  }
  return NULL;
}


x86 assembly (clang, -O0):
<multicast_link_main_loop>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
xor    %edi,%edi
call   1030 <multicast_link_read_data_from_sock@plt>
jmp    111c <multicast_link_main_loop+0xc>

x86 assembly (clang, -O2):
<multicast_link_main_loop>:
push   %rax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
xor    %edi,%edi
call   1030 <multicast_link_read_data_from_sock@plt>
jmp    1120 <multicast_link_main_loop+0x10>

LLVM IR (-O0):
define i8* @multicast_link_main_loop(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
br label %3
3: ; preds = %1, %3
%4 = call i32 @multicast_link_read_data_from_sock(i32 0)
br label %3
}

LLVM IR (-O2):
define noalias i8* @multicast_link_main_loop(i8* nocapture readnone %0) {
br label %2
2: ; preds = %1, %2
%3 = tail call i32 @multicast_link_read_data_from_sock(i32 0)
br label %2
}
int file_fetch_key_text(struct onak_dbctx *dbctx, const char *search,
                        struct openpgp_publickey **publickey) {
  return 0;
}


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

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

LLVM IR (-O0):
%struct.onak_dbctx = type opaque
%struct.openpgp_publickey = type opaque
define i32 @file_fetch_key_text(%struct.onak_dbctx* %0, i8* %1, %struct.openpgp_publickey** %2) {
%4 = alloca %struct.onak_dbctx*
%5 = alloca i8*
%6 = alloca %struct.openpgp_publickey**
store %struct.onak_dbctx* %0, %struct.onak_dbctx** %4
store i8* %1, i8** %5
store %struct.openpgp_publickey** %2, %struct.openpgp_publickey*** %6
ret i32 0
}

LLVM IR (-O2):
%struct.onak_dbctx = type opaque
%struct.openpgp_publickey = type opaque
define i32 @file_fetch_key_text(%struct.onak_dbctx* nocapture readnone %0, i8* nocapture readnone %1, %struct.openpgp_publickey** nocapture readnone %2) {
ret i32 0
}
void outer_resume(void) {}


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

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

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

LLVM IR (-O2):
define void @outer_resume() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ assert(int /*<<< orphan*/);
void convert_toleetspeak(const char *str, char *dst) {
  assert(0);
  return;
}


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

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

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

LLVM IR (-O2):
define void @convert_toleetspeak(i8* nocapture readnone %0, i8* nocapture readnone %1) {
%3 = tail call i32 @assert(i32 0)
ret void
}
/* Variables and functions */
int fun(int, int, int);
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ scanf(char *, int *, int *, int *);
int main() {
  int a, b, c, m;
  scanf("%d %d %d", &a, &b, &c);
  m = fun(a, b, c);
  printf("%d\n", m);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeba(%rip),%rdi
lea    -0x8(%rbp),%rsi
lea    -0xc(%rbp),%rdx
lea    -0x10(%rbp),%rcx
call   1050 <scanf@plt>
mov    -0x8(%rbp),%edi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
call   1030 <fun@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%esi
lea    0xe97(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
lea    0xec5(%rip),%rdi
lea    0x14(%rsp),%rsi
lea    0x10(%rsp),%rdx
lea    0xc(%rsp),%rcx
call   1050 <scanf@plt>
mov    0x14(%rsp),%edi
mov    0x10(%rsp),%esi
mov    0xc(%rsp),%edx
call   1030 <fun@plt>
lea    0xea2(%rip),%rdi
mov    %eax,%esi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

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

LLVM IR (-O2):
@.str = [9 x i8] c"%d %d %d\00"
@.str.1 = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = bitcast i32* %1 to i8*
%5 = bitcast i32* %2 to i8*
%6 = bitcast i32* %3 to i8*
%7 = call i32 @scanf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32* %1, i32* %2, i32* %3)
%8 = load i32, i32* %1
%9 = load i32, i32* %2
%10 = load i32, i32* %3
%11 = call i32 @fun(i32 %8, i32 %9, i32 %10)
%12 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %11)
ret i32 0
}
void tegra_resume(void) {}


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

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

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

LLVM IR (-O2):
define void @tegra_resume() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ caller3();
void par_caller3() { caller3(); }


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

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

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

LLVM IR (-O2):
define void @par_caller3() {
%1 = tail call i32 (...) @caller3()
ret void
}
/* Variables and functions */
float fabs(float);
int compareTwoFloats(float a, float b) {
  if (fabs(a - b) / b < 0.01)
    return 0;
  else
    return 1;
}


x86 assembly (clang, -O0):
<compareTwoFloats>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x8(%rbp)
movss  %xmm1,-0xc(%rbp)
movss  -0x8(%rbp),%xmm0
subss  -0xc(%rbp),%xmm0
call   1030 <fabs@plt>
divss  -0xc(%rbp),%xmm0
cvtss2sd %xmm0,%xmm1
movsd  0xebe(%rip),%xmm0
ucomisd %xmm1,%xmm0
jbe    1158 <compareTwoFloats+0x48>
movl   $0x0,-0x4(%rbp)
jmp    115f <compareTwoFloats+0x4f>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<compareTwoFloats>:
subss  %xmm1,%xmm0
andps  0xef5(%rip),%xmm0
divss  %xmm1,%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xef5(%rip),%xmm1
xor    %eax,%eax
ucomisd %xmm0,%xmm1
setbe  %al
ret

LLVM IR (-O0):
define i32 @compareTwoFloats(float %0, float %1) {
%3 = alloca i32
%4 = alloca float
%5 = alloca float
store float %0, float* %4
store float %1, float* %5
%6 = load float, float* %4
%7 = load float, float* %5
%8 = fsub float %6, %7
%9 = call float @fabs(float %8)
%10 = load float, float* %5
%11 = fdiv float %9, %10
%12 = fpext float %11 to double
%13 = fcmp olt double %12, 1.000000e-02
br i1 %13, label %14, label %15
14: ; preds = %2
store i32 0, i32* %3
br label %16
15: ; preds = %2
store i32 1, i32* %3
br label %16
16: ; preds = %15, %14
%17 = load i32, i32* %3
ret i32 %17
}

LLVM IR (-O2):
define i32 @compareTwoFloats(float %0, float %1) {
%3 = fsub float %0, %1
%4 = tail call float @llvm.fabs.f32(float %3)
%5 = fdiv float %4, %1
%6 = fpext float %5 to double
%7 = fcmp uge double %6, 1.000000e-02
%8 = zext i1 %7 to i32
ret i32 %8
}
void ArmCpuCaps() {}


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

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

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

LLVM IR (-O2):
define void @ArmCpuCaps() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ BTSTACK_Tasks();
void APP_Tasks(void) { BTSTACK_Tasks(); }


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

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

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

LLVM IR (-O2):
define void @APP_Tasks() {
%1 = tail call i32 (...) @BTSTACK_Tasks()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ trap_TranslateString(char const *, char *);
char *CG_TranslateString(const char *string) {
  static char staticbuf[2][32000];
  static int bufcount = 0;
  char *buf;
  buf = staticbuf[bufcount++ % 2];
  trap_TranslateString(string, buf);
  return buf;
}


x86 assembly (clang, -O0):
<CG_TranslateString>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x1291e(%rip),%eax
mov    %eax,%ecx
add    $0x1,%ecx
mov    %ecx,0x12913(%rip)
mov    $0x2,%ecx
cltd
idiv   %ecx
movslq %edx,%rcx
lea    0x2f01(%rip),%rax
imul   $0x7d00,%rcx,%rcx
add    %rcx,%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <trap_TranslateString@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<CG_TranslateString>:
push   %rbx
mov    0x12929(%rip),%eax
lea    0x1(%rax),%ecx
mov    %ecx,0x12920(%rip)
mov    %eax,%ecx
shr    $0x1f,%ecx
add    %eax,%ecx
and    $0xfffffffe,%ecx
sub    %ecx,%eax
cltq
imul   $0x7d00,%rax,%rax
lea    0x2f04(%rip),%rbx
add    %rax,%rbx
mov    %rbx,%rsi
call   1030 <trap_TranslateString@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@CG_TranslateString.staticbuf = internal global [2 x [32000 x i8]] zeroinitializer
@CG_TranslateString.bufcount = internal global i32 0
define i8* @CG_TranslateString(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
%4 = load i32, i32* @CG_TranslateString.bufcount
%5 = add nsw i32 %4, 1
store i32 %5, i32* @CG_TranslateString.bufcount
%6 = srem i32 %4, 2
%7 = sext i32 %6 to i64
%8 = getelementptr inbounds [2 x [32000 x i8]], [2 x [32000 x i8]]* @CG_TranslateString.staticbuf, i64 0, i64 %7
%9 = getelementptr inbounds [32000 x i8], [32000 x i8]* %8, i64 0, i64 0
store i8* %9, i8** %3
%10 = load i8*, i8** %2
%11 = load i8*, i8** %3
%12 = call i32 @trap_TranslateString(i8* %10, i8* %11)
%13 = load i8*, i8** %3
ret i8* %13
}

LLVM IR (-O2):
@CG_TranslateString.staticbuf = internal global [2 x [32000 x i8]] zeroinitializer
@CG_TranslateString.bufcount = internal unnamed_addr global i32 0
define i8* @CG_TranslateString(i8* %0) {
%2 = load i32, i32* @CG_TranslateString.bufcount
%3 = add nsw i32 %2, 1
store i32 %3, i32* @CG_TranslateString.bufcount
%4 = srem i32 %2, 2
%5 = sext i32 %4 to i64
%6 = getelementptr inbounds [2 x [32000 x i8]], [2 x [32000 x i8]]* @CG_TranslateString.staticbuf, i64 0, i64 %5, i64 0
%7 = tail call i32 @trap_TranslateString(i8* %0, i8* %6)
ret i8* %6
}
__attribute__((always_)) int max_int(int a, int b) { return a > b ? a : b; }


x86 assembly (clang, -O0):
<max_int>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
jle    1121 <max_int+0x21>
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
jmp    1127 <max_int+0x27>
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<max_int>:
mov    %esi,%eax
cmp    %esi,%edi
cmovg  %edi,%eax
ret

LLVM IR (-O0):
define i32 @max_int(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 = icmp sgt i32 %5, %6
br i1 %7, label %8, label %10
8: ; preds = %2
%9 = load i32, i32* %3
br label %12
10: ; preds = %2
%11 = load i32, i32* %4
br label %12
12: ; preds = %10, %8
%13 = phi i32 [ %9, %8 ], [ %11, %10 ]
ret i32 %13
}

LLVM IR (-O2):
define i32 @max_int(i32 %0, i32 %1) {
%3 = icmp sgt i32 %0, %1
%4 = select i1 %3, i32 %0, i32 %1
ret i32 %4
}
char *dgettext(const char *domainname, const char *x) {
  (void)domainname;
  return (char *)x;
}


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

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

LLVM IR (-O0):
define i8* @dgettext(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
ret i8* %6
}

LLVM IR (-O2):
define i8* @dgettext(i8* nocapture readnone %0, i8* readnone returned %1) {
ret i8* %1
}
/* Variables and functions */
char *create_binary(int);
int /*<<< orphan*/ free(char *);
int /*<<< orphan*/ printf(char *, char *);
int /*<<< orphan*/ scanf(char *, int *);
int main(void) {
  int number;
  char *binary;
  scanf("%d", &number);
  binary = create_binary(number);
  printf("%s\n", binary);
  free(binary);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeaa(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1060 <scanf@plt>
mov    -0x8(%rbp),%edi
call   1040 <create_binary@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rsi
lea    0xe8d(%rip),%rdi
call   1050 <printf@plt>
mov    -0x10(%rbp),%rdi
call   1030 <free@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
lea    0xeb4(%rip),%rdi
lea    0xc(%rsp),%rsi
call   1060 <scanf@plt>
mov    0xc(%rsp),%edi
call   1040 <create_binary@plt>
mov    %rax,%rbx
lea    0xe9a(%rip),%rdi
mov    %rax,%rsi
call   1050 <printf@plt>
mov    %rbx,%rdi
call   1030 <free@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@.str.1 = [4 x i8] c"%s\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%4 = load i32, i32* %1
%5 = call i8* @create_binary(i32 %4)
%6 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %5)
%7 = call i32 @free(i8* %5)
ret i32 0
}
int get_realjoy(int stick) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @get_realjoy(i32 %0) {
ret i32 0
}
int f(int x, int y, int b) { return b ? x : y; }


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
je     1122 <f+0x22>
mov    -0x4(%rbp),%eax
mov    %eax,-0x10(%rbp)
jmp    1128 <f+0x28>
mov    -0x8(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<f>:
mov    %edi,%eax
test   %edx,%edx
cmove  %esi,%eax
ret

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

LLVM IR (-O2):
define i32 @f(i32 %0, i32 %1, i32 %2) {
%4 = icmp eq i32 %2, 0
%5 = select i1 %4, i32 %1, i32 %0
ret i32 %5
}
int validate_int(char *str) {
  int i = 0;
  char c = str[i];
  while (c != '\0') {
    if (!(c >= '0' && c <= '9')) {
      return 0;
    }
    i++;
    c = str[i];
  }
  return 1;
}


x86 assembly (clang, -O0):
<validate_int>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,1),%al
mov    %al,-0x15(%rbp)
movsbl -0x15(%rbp),%eax
cmp    $0x0,%eax
je     116c <validate_int+0x6c>
movsbl -0x15(%rbp),%eax
cmp    $0x30,%eax
jl     1144 <validate_int+0x44>
movsbl -0x15(%rbp),%eax
cmp    $0x39,%eax
jle    1150 <validate_int+0x50>
movl   $0x0,-0x4(%rbp)
jmp    1173 <validate_int+0x73>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,1),%al
mov    %al,-0x15(%rbp)
jmp    111d <validate_int+0x1d>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<validate_int>:
mov    (%rdi),%cl
mov    $0x1,%eax
test   %cl,%cl
je     1123 <validate_int+0x23>
add    $0x1,%rdi
nop
add    $0xd0,%cl
cmp    $0x9,%cl
ja     1124 <validate_int+0x24>
movzbl (%rdi),%ecx
add    $0x1,%rdi
test   %cl,%cl
jne    1110 <validate_int+0x10>
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @validate_int(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %14, label %4
4: ; preds = %1, %9
%5 = phi i64 [ %10, %9 ], [ 0, %1 ]
%6 = phi i8 [ %12, %9 ], [ %2, %1 ]
%7 = add i8 %6, -48
%8 = icmp ult i8 %7, 10
br i1 %8, label %9, label %14
9: ; preds = %4
%10 = add nuw i64 %5, 1
%11 = getelementptr inbounds i8, i8* %0, i64 %10
%12 = load i8, i8* %11
%13 = icmp eq i8 %12, 0
br i1 %13, label %14, label %4
14: ; preds = %4, %9, %1
%15 = phi i32 [ 1, %1 ], [ 1, %9 ], [ 0, %4 ]
ret i32 %15
}
double ICDecrement(double parameter) {
  parameter = parameter - 1;
  return parameter;
}


x86 assembly (clang, -O0):
<ICDecrement>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  0xeea(%rip),%xmm1
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<ICDecrement>:
addsd  0xef8(%rip),%xmm0
ret

LLVM IR (-O0):
define double @ICDecrement(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fsub double %3, 1.000000e+00
store double %4, double* %2
%5 = load double, double* %2
ret double %5
}

LLVM IR (-O2):
define double @ICDecrement(double %0) {
%2 = fadd double %0, -1.000000e+00
ret double %2
}
char isskip(char chr) {
  if ((chr > 0) && (chr <= ' '))
    return (1);
  else
    return (0);
}


x86 assembly (clang, -O0):
<isskip>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x2(%rbp)
movsbl -0x2(%rbp),%eax
cmp    $0x0,%eax
jle    112d <isskip+0x2d>
movsbl -0x2(%rbp),%eax
cmp    $0x20,%eax
jg     112d <isskip+0x2d>
movb   $0x1,-0x1(%rbp)
jmp    1131 <isskip+0x31>
movb   $0x0,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isskip>:
add    $0xff,%dil
cmp    $0x20,%dil
setb   %al
ret

LLVM IR (-O0):
define signext i8 @isskip(i8 signext %0) {
%2 = alloca i8
%3 = alloca i8
store i8 %0, i8* %3
%4 = load i8, i8* %3
%5 = sext i8 %4 to i32
%6 = icmp sgt i32 %5, 0
br i1 %6, label %7, label %12
7: ; preds = %1
%8 = load i8, i8* %3
%9 = sext i8 %8 to i32
%10 = icmp sle i32 %9, 32
br i1 %10, label %11, label %12
11: ; preds = %7
store i8 1, i8* %2
br label %13
12: ; preds = %7, %1
store i8 0, i8* %2
br label %13
13: ; preds = %12, %11
%14 = load i8, i8* %2
ret i8 %14
}

LLVM IR (-O2):
define signext i8 @isskip(i8 signext %0) {
%2 = add i8 %0, -1
%3 = icmp ult i8 %2, 32
%4 = zext i1 %3 to i8
ret i8 %4
}