xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ F_GETFL;
int /*<<< orphan*/ F_SETFL;
int O_NDELAY;
int fcntl(int /*<<< orphan*/, int /*<<< orphan*/, ...);
extern void set_nodelay_mode(void) {
  int termflags;
  termflags = fcntl(0, F_GETFL);
  termflags |= O_NDELAY;
  fcntl(0, F_SETFL, termflags);
}


x86 assembly (clang, -O0):
<set_nodelay_mode>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    0x2eb1(%rip),%rax
mov    (%rax),%esi
xor    %edi,%edi
mov    $0x0,%al
call   1030 <fcntl@plt>
mov    %eax,-0x4(%rbp)
mov    0x2ea4(%rip),%rax
mov    (%rax),%eax
or     -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    0x2e9d(%rip),%rax
mov    (%rax),%esi
mov    -0x4(%rbp),%edx
xor    %edi,%edi
mov    $0x0,%al
call   1030 <fcntl@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_nodelay_mode>:
push   %rax
mov    0x2eb8(%rip),%rax
mov    (%rax),%esi
xor    %edi,%edi
xor    %eax,%eax
call   1030 <fcntl@plt>
mov    0x2eae(%rip),%rcx
or     (%rcx),%eax
mov    0x2ead(%rip),%rcx
mov    (%rcx),%esi
xor    %edi,%edi
mov    %eax,%edx
xor    %eax,%eax
pop    %rcx
jmp    1030 <fcntl@plt>

LLVM IR (-O0):
@F_GETFL = global i32 0
@O_NDELAY = global i32 0
@F_SETFL = global i32 0
define void @set_nodelay_mode() {
%1 = alloca i32
%2 = load i32, i32* @F_GETFL
%3 = call i32 (i32, i32, ...) @fcntl(i32 0, i32 %2)
store i32 %3, i32* %1
%4 = load i32, i32* @O_NDELAY
%5 = load i32, i32* %1
%6 = or i32 %5, %4
store i32 %6, i32* %1
%7 = load i32, i32* @F_SETFL
%8 = load i32, i32* %1
%9 = call i32 (i32, i32, ...) @fcntl(i32 0, i32 %7, i32 %8)
ret void
}

LLVM IR (-O2):
@F_GETFL = global i32 0
@O_NDELAY = global i32 0
@F_SETFL = global i32 0
define void @set_nodelay_mode() {
%1 = load i32, i32* @F_GETFL
%2 = tail call i32 (i32, i32, ...) @fcntl(i32 0, i32 %1)
%3 = load i32, i32* @O_NDELAY
%4 = or i32 %3, %2
%5 = load i32, i32* @F_SETFL
%6 = tail call i32 (i32, i32, ...) @fcntl(i32 0, i32 %5, i32 %4)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ pthread_t;

/* Variables and functions */
int pthread_cancel(pthread_t thread) { return 1; }


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

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

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

LLVM IR (-O2):
define i32 @pthread_cancel(i32 %0) {
ret i32 1
}
void tiles_init() { return; }


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

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

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

LLVM IR (-O2):
define void @tiles_init() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ error(char *);
void errorNotConst(void) { error("Non-constant expression\n"); }


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

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

LLVM IR (-O0):
@.str = [25 x i8] c"Non-constant expression\0A\00"
define void @errorNotConst() {
%1 = call i32 @error(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [25 x i8] c"Non-constant expression\0A\00"
define void @errorNotConst() {
%1 = tail call i32 @error(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ raiseInvOp();
void runInvOpc() { raiseInvOp(); }


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

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

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

LLVM IR (-O2):
define void @runInvOpc() {
%1 = tail call i32 (...) @raiseInvOp()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ test_treetable_iter_next();
int /*<<< orphan*/ test_treetable_iter_remove();
void test_treetable_iter() {
  test_treetable_iter_next();
  test_treetable_iter_remove();
}


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

x86 assembly (clang, -O2):
<test_treetable_iter>:
push   %rax
xor    %eax,%eax
call   1030 <test_treetable_iter_next@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <test_treetable_iter_remove@plt>

LLVM IR (-O0):
define void @test_treetable_iter() {
%1 = call i32 (...) @test_treetable_iter_next()
%2 = call i32 (...) @test_treetable_iter_remove()
ret void
}

LLVM IR (-O2):
define void @test_treetable_iter() {
%1 = tail call i32 (...) @test_treetable_iter_next()
%2 = tail call i32 (...) @test_treetable_iter_remove()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main() {
  printf("hello world from c");
  return 0;
}


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

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

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

LLVM IR (-O2):
@.str = [19 x i8] c"hello world from c\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ parallel_merge(char *, int);
void test_main(void) { parallel_merge("child-qsort-mm", 80); }


x86 assembly (clang, -O0):
<test_main>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
mov    $0x50,%esi
call   1030 <parallel_merge@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_main>:
lea    0xee9(%rip),%rdi
mov    $0x50,%esi
jmp    1030 <parallel_merge@plt>

LLVM IR (-O0):
@.str = [15 x i8] c"child-qsort-mm\00"
define void @test_main() {
%1 = call i32 @parallel_merge(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32 80)
ret void
}

LLVM IR (-O2):
@.str = [15 x i8] c"child-qsort-mm\00"
define void @test_main() {
%1 = tail call i32 @parallel_merge(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32 80)
ret void
}
void f165(void) {
  ({
    ({ 0; });
    ({ 0; });
    0;
  });
  ({
    ({ 0; });
    ({ 0; });
    goto a;
  a:
    0;
  });
  0;
}


x86 assembly (clang, -O0):
<f165>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
movl   $0x0,-0x18(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @f165() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 0, i32* %1
%7 = load i32, i32* %1
store i32 0, i32* %2
%8 = load i32, i32* %2
store i32 0, i32* %3
%9 = load i32, i32* %3
store i32 0, i32* %4
%10 = load i32, i32* %4
store i32 0, i32* %5
%11 = load i32, i32* %5
br label %12
12: ; preds = %0
store i32 0, i32* %6
%13 = load i32, i32* %6
ret void
}

LLVM IR (-O2):
define void @f165() {
ret void
}
void gtk_tree_model_filter_new() {}


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

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

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

LLVM IR (-O2):
define void @gtk_tree_model_filter_new() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fputs(char *, int /*<<< orphan*/);
int /*<<< orphan*/ stdout;
void fyellow(void) { fputs("\033[0;33;1m", stdout); }


x86 assembly (clang, -O0):
<fyellow>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ec5(%rip),%rax
mov    (%rax),%esi
lea    0xedc(%rip),%rdi
call   1030 <fputs@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<fyellow>:
mov    0x2ec9(%rip),%rax
mov    (%rax),%esi
lea    0xee0(%rip),%rdi
jmp    1030 <fputs@plt>

LLVM IR (-O0):
@.str = [10 x i8] c"\1B[0;33;1m\00"
@stdout = global i32 0
define void @fyellow() {
%1 = load i32, i32* @stdout
%2 = call i32 @fputs(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 %1)
ret void
}

LLVM IR (-O2):
@.str = [10 x i8] c"\1B[0;33;1m\00"
@stdout = global i32 0
define void @fyellow() {
%1 = load i32, i32* @stdout
%2 = tail call i32 @fputs(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 %1)
ret void
}
/* Forward declarations */
typedef struct TYPE_3__ TYPE_1__;

/* Type definitions */
struct TYPE_3__ {
  int /*<<< orphan*/ unauth_attr;
};
typedef TYPE_1__ PKCS7_SIGNER_INFO;

/* Variables and functions */
int add_attribute(int /*<<< orphan*/ *, int, int, void *);
int PKCS7_add_attribute(PKCS7_SIGNER_INFO *p7si, int nid, int atrtype,
                        void *value) {
  return (add_attribute(&(p7si->unauth_attr), nid, atrtype, value));
}


x86 assembly (clang, -O0):
<PKCS7_add_attribute>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %rcx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
mov    -0x18(%rbp),%rcx
call   1030 <add_attribute@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<PKCS7_add_attribute>:
jmp    1030 <add_attribute@plt>

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

LLVM IR (-O2):
%struct.TYPE_3__ = type { i32 }
define i32 @PKCS7_add_attribute(%struct.TYPE_3__* %0, i32 %1, i32 %2, i8* %3) {
%5 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %0, i64 0, i32 0
%6 = tail call i32 @add_attribute(i32* %5, i32 %1, i32 %2, i8* %3)
ret i32 %6
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ *fopen(char const *, char const *);
FILE *plt_fopen(const char *filename, const char *mode) {
  return fopen(filename, mode);
}


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

x86 assembly (clang, -O2):
<plt_fopen>:
jmp    1030 <fopen@plt>

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

LLVM IR (-O2):
define noalias i32* @plt_fopen(i8* nocapture %0, i8* nocapture %1) {
%3 = tail call i32* @fopen(i8* %0, i8* %1)
ret i32* %3
}
/* Variables and functions */
int /*<<< orphan*/ outb(int, int);
void set_timer_phase(int hz) {
  int divisor = 1193180 / hz;
  outb(0x43, 0x36);
  outb(0x40, divisor & 0xFF);
  outb(0x40, divisor >> 8);
}


x86 assembly (clang, -O0):
<set_timer_phase>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x1234dc,%eax
cltd
idivl  -0x4(%rbp)
mov    %eax,-0x8(%rbp)
mov    $0x43,%edi
mov    $0x36,%esi
call   1030 <outb@plt>
mov    -0x8(%rbp),%esi
and    $0xff,%esi
mov    $0x40,%edi
call   1030 <outb@plt>
mov    -0x8(%rbp),%esi
sar    $0x8,%esi
mov    $0x40,%edi
call   1030 <outb@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_timer_phase>:
push   %rbx
mov    $0x1234dc,%eax
xor    %edx,%edx
idiv   %edi
mov    %eax,%ebx
mov    $0x43,%edi
mov    $0x36,%esi
call   1030 <outb@plt>
movzbl %bl,%esi
mov    $0x40,%edi
call   1030 <outb@plt>
sar    $0x8,%ebx
mov    $0x40,%edi
mov    %ebx,%esi
pop    %rbx
jmp    1030 <outb@plt>

LLVM IR (-O0):
define void @set_timer_phase(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = sdiv i32 1193180, %4
store i32 %5, i32* %3
%6 = call i32 @outb(i32 67, i32 54)
%7 = load i32, i32* %3
%8 = and i32 %7, 255
%9 = call i32 @outb(i32 64, i32 %8)
%10 = load i32, i32* %3
%11 = ashr i32 %10, 8
%12 = call i32 @outb(i32 64, i32 %11)
ret void
}

LLVM IR (-O2):
define void @set_timer_phase(i32 %0) {
%2 = sdiv i32 1193180, %0
%3 = tail call i32 @outb(i32 67, i32 54)
%4 = and i32 %2, 255
%5 = tail call i32 @outb(i32 64, i32 %4)
%6 = ashr i32 %2, 8
%7 = tail call i32 @outb(i32 64, i32 %6)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ mock_push(int /*<<< orphan*/);
int /*<<< orphan*/ pack_glXRender(int /*<<< orphan*/ *);
void glXRender() {
  { mock_push(pack_glXRender(NULL)); };
}


x86 assembly (clang, -O0):
<glXRender>:
push   %rbp
mov    %rsp,%rbp
xor    %eax,%eax
mov    %eax,%edi
call   1040 <pack_glXRender@plt>
mov    %eax,%edi
call   1030 <mock_push@plt>
pop    %rbp
ret

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

LLVM IR (-O0):
define void @glXRender() {
%1 = call i32 @pack_glXRender(i32* null)
%2 = call i32 @mock_push(i32 %1)
ret void
}

LLVM IR (-O2):
define void @glXRender() {
%1 = tail call i32 @pack_glXRender(i32* null)
%2 = tail call i32 @mock_push(i32 %1)
ret void
}
void clntunix_abort(void) {}


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

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

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

LLVM IR (-O2):
define void @clntunix_abort() {
ret void
}
/* Variables and functions */
int nc__open(char const *, int, int /*<<< orphan*/ *, int *);
int nc_open(const char *path, int ioflags, int *ncid_ptr) {
  return nc__open(path, ioflags, NULL, ncid_ptr);
}


x86 assembly (clang, -O0):
<nc_open>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x18(%rbp),%rcx
xor    %eax,%eax
mov    %eax,%edx
call   1030 <nc__open@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<nc_open>:
mov    %rdx,%rcx
xor    %edx,%edx
jmp    1030 <nc__open@plt>

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

LLVM IR (-O2):
define i32 @nc_open(i8* %0, i32 %1, i32* %2) {
%4 = tail call i32 @nc__open(i8* %0, i32 %1, i32* null, i32* %2)
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ W_GetNumForName(char *);
void *W_LoadLumpNum(int /*<<< orphan*/);
void *W_LoadLumpName(char *name) {
  return W_LoadLumpNum(W_GetNumForName(name));
}


x86 assembly (clang, -O0):
<W_LoadLumpName>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <W_GetNumForName@plt>
mov    %eax,%edi
call   1040 <W_LoadLumpNum@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<W_LoadLumpName>:
push   %rax
call   1030 <W_GetNumForName@plt>
mov    %eax,%edi
pop    %rax
jmp    1040 <W_LoadLumpNum@plt>

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

LLVM IR (-O2):
define i8* @W_LoadLumpName(i8* %0) {
%2 = tail call i32 @W_GetNumForName(i8* %0)
%3 = tail call i8* @W_LoadLumpNum(i32 %2)
ret i8* %3
}
/* Variables and functions */
int memcmp(void const *, void const *, int);
int cmp_20(const void *a, const void *b) { return memcmp(a, b, 20); }


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

x86 assembly (clang, -O2):
<cmp_20>:
mov    $0x14,%edx
jmp    1030 <memcmp@plt>

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

LLVM IR (-O2):
define i32 @cmp_20(i8* %0, i8* %1) {
%3 = tail call i32 @memcmp(i8* %0, i8* %1, i32 20)
ret i32 %3
}
void gtk_scrolled_window_new() {}


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

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

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

LLVM IR (-O2):
define void @gtk_scrolled_window_new() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, long);
int main() {
  long salary;
  long *salary_ptr;
  salary = 50000;
  salary_ptr = &salary;
  printf("salary: %lu\n", salary);
  *salary_ptr = 60000;
  printf("salary: %lu\n", salary);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movq   $0xc350,-0x10(%rbp)
lea    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rsi
lea    0xec6(%rip),%rdi
call   1030 <printf@plt>
mov    -0x18(%rbp),%rax
movq   $0xea60,(%rax)
mov    -0x10(%rbp),%rsi
lea    0xeab(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xee8(%rip),%rbx
mov    $0xc350,%esi
mov    %rbx,%rdi
call   1030 <printf@plt>
mov    $0xea60,%esi
mov    %rbx,%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [13 x i8] c"salary: %lu\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i64 50000)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i64 60000)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ puts(char *);
int main(int argc, char *argv[]) {
  puts("Hello");
  puts("This is another line");
  puts("puts adds an implicite end of line... ");
  puts("I didn't know that");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xed3(%rip),%rdi
call   1030 <puts@plt>
lea    0xecd(%rip),%rdi
call   1030 <puts@plt>
lea    0xed6(%rip),%rdi
call   1030 <puts@plt>
lea    0xef1(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [6 x i8] c"Hello\00"
@.str.1 = [21 x i8] c"This is another line\00"
@.str.2 = [39 x i8] c"puts adds an implicite end of line... \00"
@.str.3 = [19 x i8] c"I didn't know that\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = call i32 @puts(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%7 = call i32 @puts(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.1, i64 0, i64 0))
%8 = call i32 @puts(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.2, i64 0, i64 0))
%9 = call i32 @puts(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.3, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [6 x i8] c"Hello\00"
@.str.1 = [21 x i8] c"This is another line\00"
@.str.2 = [39 x i8] c"puts adds an implicite end of line... \00"
@.str.3 = [19 x i8] c"I didn't know that\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @.str.1, i64 0, i64 0))
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([39 x i8], [39 x i8]* @.str.2, i64 0, i64 0))
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str.3, i64 0, i64 0))
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ BIO;

/* Variables and functions */
int nullf_free(BIO *a) {
  if (a == NULL)
    return (0);
  return (1);
}


x86 assembly (clang, -O0):
<nullf_free>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    111f <nullf_free+0x1f>
movl   $0x0,-0x4(%rbp)
jmp    1126 <nullf_free+0x26>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<nullf_free>:
xor    %eax,%eax
test   %rdi,%rdi
setne  %al
ret

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

LLVM IR (-O2):
define i32 @nullf_free(i32* readnone %0) {
%2 = icmp ne i32* %0, null
%3 = zext i1 %2 to i32
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ putchar(char);
void output(char str[], int key, int size) {
  if (key == size - 1) {
    return;
  }
  putchar(str[key]);
  output(str, key + 1, size);
}


x86 assembly (clang, -O0):
<output>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0xc(%rbp),%eax
mov    -0x10(%rbp),%ecx
sub    $0x1,%ecx
cmp    %ecx,%eax
jne    1148 <output+0x28>
jmp    116b <output+0x4b>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movsbl (%rax,%rcx,1),%edi
call   1030 <putchar@plt>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
add    $0x1,%esi
mov    -0x10(%rbp),%edx
call   1040 <output@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<output>:
push   %r15
push   %r14
push   %rbx
lea    -0x1(%rdx),%eax
cmp    %esi,%eax
je     1143 <output+0x33>
mov    %esi,%r15d
mov    %rdi,%r14
movslq %esi,%rax
add    %rax,%r14
not    %r15d
add    %edx,%r15d
xor    %ebx,%ebx
movsbl (%r14,%rbx,1),%edi
call   1030 <putchar@plt>
add    $0x1,%rbx
cmp    %ebx,%r15d
jne    1130 <output+0x20>
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define void @output(i8* %0, i32 %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i32
store i8* %0, i8** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load i32, i32* %5
%8 = load i32, i32* %6
%9 = sub nsw i32 %8, 1
%10 = icmp eq i32 %7, %9
br i1 %10, label %11, label %12
11: ; preds = %3
br label %23
12: ; preds = %3
%13 = load i8*, i8** %4
%14 = load i32, i32* %5
%15 = sext i32 %14 to i64
%16 = getelementptr inbounds i8, i8* %13, i64 %15
%17 = load i8, i8* %16
%18 = call i32 @putchar(i8 signext %17)
%19 = load i8*, i8** %4
%20 = load i32, i32* %5
%21 = add nsw i32 %20, 1
%22 = load i32, i32* %6
br label %23
23: ; preds = %12, %11
ret void
}

LLVM IR (-O2):
define void @output(i8* nocapture %0, i32 %1, i32 %2) {
%4 = add nsw i32 %2, -1
%5 = icmp eq i32 %4, %1
br i1 %5, label %16, label %6
6: ; preds = %3
%7 = sext i32 %1 to i64
br label %8
8: ; preds = %6, %8
%9 = phi i64 [ %7, %6 ], [ %13, %8 ]
%10 = getelementptr inbounds i8, i8* %0, i64 %9
%11 = load i8, i8* %10
%12 = tail call i32 @putchar(i8 signext %11)
%13 = add nsw i64 %9, 1
%14 = trunc i64 %13 to i32
%15 = icmp eq i32 %4, %14
br i1 %15, label %16, label %8
16: ; preds = %8, %3
ret void
}
/* Variables and functions */
scalar_t__ random();
int nrandom(int n) { return ((int)random() % n); }


x86 assembly (clang, -O0):
<nrandom>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x0,%al
call   1030 <random@plt>
cltd
idivl  -0x4(%rbp)
mov    %edx,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<nrandom>:
push   %rbx
mov    %edi,%ebx
xor    %eax,%eax
call   1030 <random@plt>
cltd
idiv   %ebx
mov    %edx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @nrandom(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i64 (...) @random()
%4 = trunc i64 %3 to i32
%5 = load i32, i32* %2
%6 = srem i32 %4, %5
ret i32 %6
}

LLVM IR (-O2):
define i32 @nrandom(i32 %0) {
%2 = tail call i64 (...) @random()
%3 = trunc i64 %2 to i32
%4 = srem i32 %3, %0
ret i32 %4
}
/* Type definitions */
struct gengetopt_args_info {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ cmdline_parser_release(struct gengetopt_args_info *);
void cmdline_parser_free(struct gengetopt_args_info *args_info) {
  cmdline_parser_release(args_info);
}


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

x86 assembly (clang, -O2):
<cmdline_parser_free>:
jmp    1030 <cmdline_parser_release@plt>

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

LLVM IR (-O2):
%struct.gengetopt_args_info = type { i32 }
define void @cmdline_parser_free(%struct.gengetopt_args_info* %0) {
%2 = tail call i32 @cmdline_parser_release(%struct.gengetopt_args_info* %0)
ret void
}
int XInternalConnectionNumbers() {}


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

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

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

LLVM IR (-O2):
define i32 @XInternalConnectionNumbers() {
ret i32 undef
}
/* Variables and functions */
int inportb(int);
int /*<<< orphan*/ outportb(int, int);
void tone_on() { outportb(0x61, inportb(0x61) | 0x03); }


x86 assembly (clang, -O0):
<tone_on>:
push   %rbp
mov    %rsp,%rbp
mov    $0x61,%edi
call   1030 <inportb@plt>
mov    %eax,%esi
or     $0x3,%esi
mov    $0x61,%edi
call   1040 <outportb@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<tone_on>:
push   %rax
mov    $0x61,%edi
call   1030 <inportb@plt>
or     $0x3,%eax
mov    $0x61,%edi
mov    %eax,%esi
pop    %rax
jmp    1040 <outportb@plt>

LLVM IR (-O0):
define void @tone_on() {
%1 = call i32 @inportb(i32 97)
%2 = or i32 %1, 3
%3 = call i32 @outportb(i32 97, i32 %2)
ret void
}

LLVM IR (-O2):
define void @tone_on() {
%1 = tail call i32 @inportb(i32 97)
%2 = or i32 %1, 3
%3 = tail call i32 @outportb(i32 97, i32 %2)
ret void
}
/* Variables and functions */
int rand();
unsigned int __flip_coins() {
  int depth;
  for (depth = 0; rand() % 2; depth++)
    ;
  return depth;
}


x86 assembly (clang, -O0):
<__flip_coins>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <rand@plt>
mov    $0x2,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
je     114a <__flip_coins+0x3a>
jmp    113c <__flip_coins+0x2c>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    111f <__flip_coins+0xf>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__flip_coins>:
push   %rbx
mov    $0xffffffff,%ebx
cs nopw 0x0(%rax,%rax,1)
xor    %eax,%eax
call   1030 <rand@plt>
add    $0x1,%ebx
test   $0x1,%al
jne    1120 <__flip_coins+0x10>
mov    %ebx,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @__flip_coins() {
br label %1
1: ; preds = %1, %0
%2 = phi i32 [ 0, %0 ], [ %6, %1 ]
%3 = tail call i32 (...) @rand()
%4 = and i32 %3, 1
%5 = icmp eq i32 %4, 0
%6 = add nuw nsw i32 %2, 1
br i1 %5, label %7, label %1
7: ; preds = %1
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main(void) {
  printf("Ola mundo\n");
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [11 x i8] c"Ola mundo\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [10 x i8] c"Ola mundo\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
void *stub1(void *, int, unsigned int);
void *svcAlloc(int, int);
void *allocIobuf() {
  void *ptr = svcAlloc(0xCAFF, 0x828);
  ((void *(*)(void *, int, unsigned int))0xE600EAB4)(ptr, 0x00, 0x828);
  return ptr;
}


x86 assembly (clang, -O0):
<allocIobuf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0xcaff,%edi
mov    $0x828,%esi
call   1030 <svcAlloc@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
xor    %esi,%esi
mov    $0x828,%edx
mov    $0xe600eab4,%eax
call   *%rax
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<allocIobuf>:
push   %rbx
mov    $0xcaff,%edi
mov    $0x828,%esi
call   1030 <svcAlloc@plt>
mov    %rax,%rbx
mov    $0xe600eab4,%eax
mov    %rbx,%rdi
xor    %esi,%esi
mov    $0x828,%edx
call   *%rax
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
define i8* @allocIobuf() {
%1 = alloca i8*
%2 = call i8* @svcAlloc(i32 51967, i32 2088)
store i8* %2, i8** %1
%3 = load i8*, i8** %1
%4 = call i8* inttoptr (i64 3858819764 to i8* (i8*, i32, i32)*)(i8* %3, i32 0, i32 2088)
%5 = load i8*, i8** %1
ret i8* %5
}

LLVM IR (-O2):
define i8* @allocIobuf() {
%1 = tail call i8* @svcAlloc(i32 51967, i32 2088)
%2 = tail call i8* inttoptr (i64 3858819764 to i8* (i8*, i32, i32)*)(i8* %1, i32 0, i32 2088)
ret i8* %1
}
/* Variables and functions */
int /*<<< orphan*/ WSync();
void StateRestore(int version) { WSync(); }


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

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

LLVM IR (-O0):
define void @StateRestore(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 (...) @WSync()
ret void
}

LLVM IR (-O2):
define void @StateRestore(i32 %0) {
%2 = tail call i32 (...) @WSync()
ret void
}
void glutEstablishOverlay(void) {}


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

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

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

LLVM IR (-O2):
define void @glutEstablishOverlay() {
ret void
}
int get_pivot(int low, int high) { return (low + high) / 2; }


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

x86 assembly (clang, -O2):
<get_pivot>:
lea    (%rdi,%rsi,1),%ecx
mov    %ecx,%eax
shr    $0x1f,%eax
add    %ecx,%eax
sar    %eax
ret

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

LLVM IR (-O2):
define i32 @get_pivot(i32 %0, i32 %1) {
%3 = add nsw i32 %1, %0
%4 = sdiv i32 %3, 2
ret i32 %4
}
void Hal_hook_wr_sgnbfield(void) {}


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

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

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

LLVM IR (-O2):
define void @Hal_hook_wr_sgnbfield() {
ret void
}
void invert1x1(const float *src, float *dst) { dst[0] = 1.0f / src[0]; }


x86 assembly (clang, -O0):
<invert1x1>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movss  0xee8(%rip),%xmm0
divss  (%rax),%xmm0
mov    -0x10(%rbp),%rax
movss  %xmm0,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<invert1x1>:
movss  0xef8(%rip),%xmm0
divss  (%rdi),%xmm0
movss  %xmm0,(%rsi)
ret

LLVM IR (-O0):
define void @invert1x1(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 = getelementptr inbounds float, float* %5, i64 0
%7 = load float, float* %6
%8 = fdiv float 1.000000e+00, %7
%9 = load float*, float** %4
%10 = getelementptr inbounds float, float* %9, i64 0
store float %8, float* %10
ret void
}

LLVM IR (-O2):
define void @invert1x1(float* nocapture %0, float* nocapture writeonly %1) {
%3 = load float, float* %0
%4 = fdiv float 1.000000e+00, %3
store float %4, float* %1
ret void
}
void gtk_widget_set_events() {}


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

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

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

LLVM IR (-O2):
define void @gtk_widget_set_events() {
ret void
}
/* Variables and functions */
int ipc_can_send(unsigned long, int, int, int);
int /*<<< orphan*/ yield();
int ipc_send(unsigned long whom, int val, int srcva, int perm) {
  int r;
  while ((r = ipc_can_send(whom, val, srcva, perm)) == -6) {
    yield();
  }
  return r;
}


x86 assembly (clang, -O0):
<ipc_send>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
mov    -0x14(%rbp),%ecx
call   1040 <ipc_can_send@plt>
mov    %eax,-0x18(%rbp)
cmp    $0xfffffffa,%eax
jne    115f <ipc_send+0x3f>
mov    $0x0,%al
call   1030 <yield@plt>
jmp    1135 <ipc_send+0x15>
mov    -0x18(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ipc_send>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %ecx,%r14d
mov    %edx,%r15d
mov    %esi,%ebx
mov    %rdi,%rbp
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
call   1040 <ipc_can_send@plt>
cmp    $0xfffffffa,%eax
jne    115e <ipc_send+0x3e>
xor    %eax,%eax
call   1030 <yield@plt>
mov    %rbp,%rdi
mov    %ebx,%esi
mov    %r15d,%edx
mov    %r14d,%ecx
jmp    1140 <ipc_send+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @ipc_send(i64 %0, i32 %1, i32 %2, i32 %3) {
%5 = tail call i32 @ipc_can_send(i64 %0, i32 %1, i32 %2, i32 %3)
%6 = icmp eq i32 %5, -6
br i1 %6, label %7, label %11
7: ; preds = %4, %7
%8 = tail call i32 (...) @yield()
%9 = tail call i32 @ipc_can_send(i64 %0, i32 %1, i32 %2, i32 %3)
%10 = icmp eq i32 %9, -6
br i1 %10, label %7, label %11
11: ; preds = %7, %4
%12 = phi i32 [ %5, %4 ], [ %9, %7 ]
ret i32 %12
}
void rop3_21_0_1(unsigned char *D, unsigned char S, unsigned char T) {
  unsigned char stk1;
  unsigned char stk2;
  stk2 = T & S;
  stk1 = *D | stk2;
  stk1 = ~stk1;
  *D = (stk1 & S) | (stk1 & (~T)) | (T & (~S) & *D);
}


x86 assembly (clang, -O0):
<rop3_21_0_1>:
push   %rbp
mov    %rsp,%rbp
mov    %dl,%al
mov    %sil,%cl
mov    %rdi,-0x8(%rbp)
mov    %cl,-0x9(%rbp)
mov    %al,-0xa(%rbp)
movzbl -0xa(%rbp),%eax
movzbl -0x9(%rbp),%ecx
and    %ecx,%eax
mov    %al,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movzbl (%rax),%eax
movzbl -0xc(%rbp),%ecx
or     %ecx,%eax
mov    %al,-0xb(%rbp)
movzbl -0xb(%rbp),%eax
xor    $0xffffffff,%eax
mov    %al,-0xb(%rbp)
movzbl -0xb(%rbp),%eax
movzbl -0x9(%rbp),%ecx
and    %ecx,%eax
movzbl -0xb(%rbp),%ecx
movzbl -0xa(%rbp),%edx
xor    $0xffffffff,%edx
and    %edx,%ecx
or     %ecx,%eax
movzbl -0xa(%rbp),%ecx
movzbl -0x9(%rbp),%edx
xor    $0xffffffff,%edx
and    %edx,%ecx
mov    -0x8(%rbp),%rdx
movzbl (%rdx),%edx
and    %edx,%ecx
or     %ecx,%eax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<rop3_21_0_1>:
mov    %edx,%eax
and    %sil,%al
mov    (%rdi),%r8b
or     %r8b,%al
not    %al
mov    %edx,%ecx
not    %cl
or     %sil,%cl
and    %al,%cl
not    %sil
and    %dl,%sil
and    %r8b,%sil
or     %cl,%sil
mov    %sil,(%rdi)
ret

LLVM IR (-O0):
define void @rop3_21_0_1(i8* %0, i8 zeroext %1, i8 zeroext %2) {
%4 = alloca i8*
%5 = alloca i8
%6 = alloca i8
%7 = alloca i8
%8 = alloca i8
store i8* %0, i8** %4
store i8 %1, i8* %5
store i8 %2, i8* %6
%9 = load i8, i8* %6
%10 = zext i8 %9 to i32
%11 = load i8, i8* %5
%12 = zext i8 %11 to i32
%13 = and i32 %10, %12
%14 = trunc i32 %13 to i8
store i8 %14, i8* %8
%15 = load i8*, i8** %4
%16 = load i8, i8* %15
%17 = zext i8 %16 to i32
%18 = load i8, i8* %8
%19 = zext i8 %18 to i32
%20 = or i32 %17, %19
%21 = trunc i32 %20 to i8
store i8 %21, i8* %7
%22 = load i8, i8* %7
%23 = zext i8 %22 to i32
%24 = xor i32 %23, -1
%25 = trunc i32 %24 to i8
store i8 %25, i8* %7
%26 = load i8, i8* %7
%27 = zext i8 %26 to i32
%28 = load i8, i8* %5
%29 = zext i8 %28 to i32
%30 = and i32 %27, %29
%31 = load i8, i8* %7
%32 = zext i8 %31 to i32
%33 = load i8, i8* %6
%34 = zext i8 %33 to i32
%35 = xor i32 %34, -1
%36 = and i32 %32, %35
%37 = or i32 %30, %36
%38 = load i8, i8* %6
%39 = zext i8 %38 to i32
%40 = load i8, i8* %5
%41 = zext i8 %40 to i32
%42 = xor i32 %41, -1
%43 = and i32 %39, %42
%44 = load i8*, i8** %4
%45 = load i8, i8* %44
%46 = zext i8 %45 to i32
%47 = and i32 %43, %46
%48 = or i32 %37, %47
%49 = trunc i32 %48 to i8
%50 = load i8*, i8** %4
store i8 %49, i8* %50
ret void
}

LLVM IR (-O2):
define void @rop3_21_0_1(i8* nocapture %0, i8 zeroext %1, i8 zeroext %2) {
%4 = and i8 %2, %1
%5 = load i8, i8* %0
%6 = or i8 %5, %4
%7 = xor i8 %6, -1
%8 = xor i8 %2, -1
%9 = or i8 %8, %1
%10 = and i8 %9, %7
%11 = xor i8 %1, -1
%12 = and i8 %11, %2
%13 = and i8 %12, %5
%14 = or i8 %10, %13
store i8 %14, i8* %0
ret void
}
/* Variables and functions */
void *malloc(size_t);
void *ALnullState_New(size_t size) { return malloc(size); }


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

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

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

LLVM IR (-O2):
define noalias i8* @ALnullState_New(i64 %0) {
%2 = tail call i8* @malloc(i64 %0)
ret i8* %2
}
void alm(signo) int signo;
{ printf("SIGALRM Received\n"); }


x86 assembly (clang, -O0):
<alm>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
lea    0xede(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [18 x i8] c"SIGALRM Received\0A\00"
define void @alm(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [17 x i8] c"SIGALRM Received\00"
define void @alm(i32 %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char const *);
void usage(const char *pname) {
  printf(
      "Usage: %s <open|read|write|all> <path>\n            \n            open: "
      "watch open events only\n            read: watch read events only\n      "
      "      write: watch write events only\n            all: watch all "
      "events\n            path: the file/directory to be watched\n",
      pname);
}


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

x86 assembly (clang, -O2):
<usage>:
mov    %rdi,%rsi
lea    0xee6(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [263 x i8] c"Usage: %s <open|read|write|all> <path>\0A \0A open: watch open events only\0A read: watch read events only\0A write: watch write events only\0A all: watch all events\0A path: the file/directory to be watched\0A\00"
define void @usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @printf(i8* getelementptr inbounds ([263 x i8], [263 x i8]* @.str, i64 0, i64 0), i8* %3)
ret void
}

LLVM IR (-O2):
@.str = [263 x i8] c"Usage: %s <open|read|write|all> <path>\0A \0A open: watch open events only\0A read: watch read events only\0A write: watch write events only\0A all: watch all events\0A path: the file/directory to be watched\0A\00"
define void @usage(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([263 x i8], [263 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
void f62(void) {
  ({
    ({ 0; });
    ({
      goto a;
      0;
    });
    0;
  });
a:
  ({
    ({ 0; });
    ({ 0; });
    0;
  });
  0;
}


x86 assembly (clang, -O0):
<f62>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
movl   $0x0,-0x18(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @f62() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 0, i32* %1
%7 = load i32, i32* %1
br label %8
8: ; preds = %0
store i32 0, i32* %4
%9 = load i32, i32* %4
store i32 0, i32* %5
%10 = load i32, i32* %5
store i32 0, i32* %6
%11 = load i32, i32* %6
ret void
}

LLVM IR (-O2):
define void @f62() {
ret void
}
/* Type definitions */
typedef int uint8_t;
typedef int const uint32_t;

/* Variables and functions */
uint32_t u8array_to_u32(const uint8_t *item, int offset) {
  return (item[offset] | (item[offset + 1] << 8) | (item[offset + 2] << 16) |
          (item[offset + 3] << 24));
}


x86 assembly (clang, -O0):
<u8array_to_u32>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
mov    -0x8(%rbp),%rcx
mov    -0xc(%rbp),%edx
add    $0x1,%edx
movslq %edx,%rdx
mov    (%rcx,%rdx,4),%ecx
shl    $0x8,%ecx
or     %ecx,%eax
mov    -0x8(%rbp),%rcx
mov    -0xc(%rbp),%edx
add    $0x2,%edx
movslq %edx,%rdx
mov    (%rcx,%rdx,4),%ecx
shl    $0x10,%ecx
or     %ecx,%eax
mov    -0x8(%rbp),%rcx
mov    -0xc(%rbp),%edx
add    $0x3,%edx
movslq %edx,%rdx
mov    (%rcx,%rdx,4),%ecx
shl    $0x18,%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<u8array_to_u32>:
movslq %esi,%rax
mov    0x4(%rdi,%rax,4),%ecx
mov    0x8(%rdi,%rax,4),%edx
shl    $0x8,%ecx
or     (%rdi,%rax,4),%ecx
shl    $0x10,%edx
mov    0xc(%rdi,%rax,4),%eax
shl    $0x18,%eax
or     %edx,%eax
or     %ecx,%eax
ret

LLVM IR (-O0):
define i32 @u8array_to_u32(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 = sext i32 %6 to i64
%8 = getelementptr inbounds i32, i32* %5, i64 %7
%9 = load i32, i32* %8
%10 = load i32*, i32** %3
%11 = load i32, i32* %4
%12 = add nsw i32 %11, 1
%13 = sext i32 %12 to i64
%14 = getelementptr inbounds i32, i32* %10, i64 %13
%15 = load i32, i32* %14
%16 = shl i32 %15, 8
%17 = or i32 %9, %16
%18 = load i32*, i32** %3
%19 = load i32, i32* %4
%20 = add nsw i32 %19, 2
%21 = sext i32 %20 to i64
%22 = getelementptr inbounds i32, i32* %18, i64 %21
%23 = load i32, i32* %22
%24 = shl i32 %23, 16
%25 = or i32 %17, %24
%26 = load i32*, i32** %3
%27 = load i32, i32* %4
%28 = add nsw i32 %27, 3
%29 = sext i32 %28 to i64
%30 = getelementptr inbounds i32, i32* %26, i64 %29
%31 = load i32, i32* %30
%32 = shl i32 %31, 24
%33 = or i32 %25, %32
ret i32 %33
}

LLVM IR (-O2):
define i32 @u8array_to_u32(i32* nocapture %0, i32 %1) {
%3 = sext i32 %1 to i64
%4 = getelementptr inbounds i32, i32* %0, i64 %3
%5 = load i32, i32* %4
%6 = add nsw i32 %1, 1
%7 = sext i32 %6 to i64
%8 = getelementptr inbounds i32, i32* %0, i64 %7
%9 = load i32, i32* %8
%10 = shl i32 %9, 8
%11 = or i32 %10, %5
%12 = add nsw i32 %1, 2
%13 = sext i32 %12 to i64
%14 = getelementptr inbounds i32, i32* %0, i64 %13
%15 = load i32, i32* %14
%16 = shl i32 %15, 16
%17 = or i32 %11, %16
%18 = add nsw i32 %1, 3
%19 = sext i32 %18 to i64
%20 = getelementptr inbounds i32, i32* %0, i64 %19
%21 = load i32, i32* %20
%22 = shl i32 %21, 24
%23 = or i32 %17, %22
ret i32 %23
}
/* Variables and functions */
int /*<<< orphan*/ abort();
main() {
  int i = {{{5}}}, j = 2, k = {1, 2};
  if (i != 5)
    abort();
  if (j != 2)
    abort();
  if (k != 1)
    abort();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x5,-0x8(%rbp)
movl   $0x2,-0xc(%rbp)
movl   $0x1,-0x10(%rbp)
cmpl   $0x5,-0x8(%rbp)
je     1145 <main+0x35>
mov    $0x0,%al
call   1030 <abort@plt>
cmpl   $0x2,-0xc(%rbp)
je     1156 <main+0x46>
mov    $0x0,%al
call   1030 <abort@plt>
cmpl   $0x1,-0x10(%rbp)
je     1167 <main+0x57>
mov    $0x0,%al
call   1030 <abort@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 0, i32* %1
store i32 5, i32* %2
store i32 2, i32* %3
store i32 1, i32* %4
%5 = load i32, i32* %2
%6 = icmp ne i32 %5, 5
br i1 %6, label %7, label %9
7: ; preds = %0
%8 = call i32 (...) @abort()
unreachable
9: ; preds = %0
%10 = load i32, i32* %3
%11 = icmp ne i32 %10, 2
br i1 %11, label %12, label %14
12: ; preds = %9
%13 = call i32 (...) @abort()
unreachable
14: ; preds = %9
%15 = load i32, i32* %4
%16 = icmp ne i32 %15, 1
br i1 %16, label %17, label %19
17: ; preds = %14
%18 = call i32 (...) @abort()
unreachable
19: ; preds = %14
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}