xunge/DecIR huggingface dataset:
/* Variables and functions */
int add_mount(char const *, char const *, char const *, char const *,
              char const *);
int /*<<< orphan*/ mtab_needs_update(char const *);
int fuse_mnt_add_mount(const char *progname, const char *fsname,
                       const char *mnt, const char *type, const char *opts) {
  if (!mtab_needs_update(mnt))
    return 0;
  return add_mount(progname, fsname, mnt, type, opts);
}


x86 assembly (clang, -O0):
<fuse_mnt_add_mount>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    %rcx,-0x28(%rbp)
mov    %r8,-0x30(%rbp)
mov    -0x20(%rbp),%rdi
call   1040 <mtab_needs_update@plt>
cmp    $0x0,%eax
jne    115a <fuse_mnt_add_mount+0x3a>
movl   $0x0,-0x4(%rbp)
jmp    1176 <fuse_mnt_add_mount+0x56>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    -0x20(%rbp),%rdx
mov    -0x28(%rbp),%rcx
mov    -0x30(%rbp),%r8
call   1030 <add_mount@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fuse_mnt_add_mount>:
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
mov    %r8,%r14
mov    %rcx,%r15
mov    %rdx,%rbx
mov    %rsi,%r12
mov    %rdi,%r13
mov    %rdx,%rdi
call   1040 <mtab_needs_update@plt>
test   %eax,%eax
je     1161 <fuse_mnt_add_mount+0x41>
mov    %r13,%rdi
mov    %r12,%rsi
mov    %rbx,%rdx
mov    %r15,%rcx
mov    %r14,%r8
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
jmp    1030 <add_mount@plt>
xor    %eax,%eax
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
define i32 @fuse_mnt_add_mount(i8* %0, i8* %1, i8* %2, i8* %3, i8* %4) {
%6 = tail call i32 @mtab_needs_update(i8* %2)
%7 = icmp eq i32 %6, 0
br i1 %7, label %10, label %8
8: ; preds = %5
%9 = tail call i32 @add_mount(i8* %0, i8* %1, i8* %2, i8* %3, i8* %4)
br label %10
10: ; preds = %5, %8
%11 = phi i32 [ %9, %8 ], [ 0, %5 ]
ret i32 %11
}
void tdefault_terminal_ours_for_output(struct target_ops *self) {}


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

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

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

LLVM IR (-O2):
%struct.target_ops = type opaque
define void @tdefault_terminal_ours_for_output(%struct.target_ops* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, ...);
int /*<<< orphan*/ stdout;
void version(char **argv) {
  fprintf(stdout, "%s-v.%d.%d ", argv[0], 0, 1);
  fprintf(stdout, "(c) 2004-2006 "
                  "Martin Vuagnoux"
                  " <"
                  "autodafe@vuagnoux.com"
                  ">\n\n");
}


x86 assembly (clang, -O0):
<version>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ebd(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rax
mov    (%rax),%rdx
lea    0xecd(%rip),%rsi
xor    %ecx,%ecx
mov    $0x1,%r8d
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    0x2e97(%rip),%rax
mov    (%rax),%edi
lea    0xeba(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<version>:
push   %rbx
mov    0x2ec8(%rip),%rbx
mov    (%rbx),%eax
mov    (%rdi),%rdx
lea    0xedc(%rip),%rsi
mov    %eax,%edi
xor    %ecx,%ecx
mov    $0x1,%r8d
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0xece(%rip),%rsi
xor    %eax,%eax
pop    %rbx
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stdout = global i32 0
@.str = [12 x i8] c"%s-v.%d.%d \00"
@.str.1 = [56 x i8] c"(c) 2004-2006 Martin Vuagnoux <autodafe@vuagnoux.com>\0A\0A\00"
define void @version(i8** %0) {
%2 = alloca i8**
store i8** %0, i8*** %2
%3 = load i32, i32* @stdout
%4 = load i8**, i8*** %2
%5 = getelementptr inbounds i8*, i8** %4, i64 0
%6 = load i8*, i8** %5
%7 = call i32 (i32, i8*, ...) @fprintf(i32 %3, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* %6, i32 0, i32 1)
%8 = load i32, i32* @stdout
%9 = call i32 (i32, i8*, ...) @fprintf(i32 %8, i8* getelementptr inbounds ([56 x i8], [56 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@stdout = global i32 0
@.str = [12 x i8] c"%s-v.%d.%d \00"
@.str.1 = [56 x i8] c"(c) 2004-2006 Martin Vuagnoux <autodafe@vuagnoux.com>\0A\0A\00"
define void @version(i8** nocapture %0) {
%2 = load i32, i32* @stdout
%3 = load i8*, i8** %0
%4 = tail call i32 (i32, i8*, ...) @fprintf(i32 %2, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* %3, i32 0, i32 1)
%5 = load i32, i32* @stdout
%6 = tail call i32 (i32, i8*, ...) @fprintf(i32 %5, i8* getelementptr inbounds ([56 x i8], [56 x i8]* @.str.1, i64 0, i64 0))
ret void
}
void VrefBuffer_RestoreConfig(void) {}


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

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

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

LLVM IR (-O2):
define void @VrefBuffer_RestoreConfig() {
ret void
}
void X509_ALGOR_dup(void) {}


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

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

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

LLVM IR (-O2):
define void @X509_ALGOR_dup() {
ret void
}
void av_opt_get_channel_layout() {}


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

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

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

LLVM IR (-O2):
define void @av_opt_get_channel_layout() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void sayFooBar() { printf("I say FooBar...\n"); }


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

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

LLVM IR (-O0):
@.str = [17 x i8] c"I say FooBar...\0A\00"
define void @sayFooBar() {
%1 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [16 x i8] c"I say FooBar...\00"
define void @sayFooBar() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ rename(char *, char *);
void uninitvar_rename(void) {
  char *s1;
  char *s2;
  (void)rename(s1, s2);
}


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

x86 assembly (clang, -O2):
<uninitvar_rename>:
jmp    1030 <rename@plt>

LLVM IR (-O0):
define void @uninitvar_rename() {
%1 = alloca i8*
%2 = alloca i8*
%3 = load i8*, i8** %1
%4 = load i8*, i8** %2
%5 = call i32 @rename(i8* %3, i8* %4)
ret void
}

LLVM IR (-O2):
define void @uninitvar_rename() {
%1 = tail call i32 @rename(i8* undef, i8* undef)
ret void
}
int x27_process_request(struct mypacket *packet) { return 0; }


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

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

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

LLVM IR (-O2):
%struct.mypacket = type opaque
define i32 @x27_process_request(%struct.mypacket* nocapture readnone %0) {
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ Widget;
typedef int /*<<< orphan*/ Cursor;

/* Variables and functions */
int /*<<< orphan*/ GetHourGlassCursor(int /*<<< orphan*/);
int /*<<< orphan*/ XDefineCursor(int /*<<< orphan*/, int /*<<< orphan*/,
                                 int /*<<< orphan*/);
int /*<<< orphan*/ XFlush(int /*<<< orphan*/);
int /*<<< orphan*/ XtDisplay(int /*<<< orphan*/);
int /*<<< orphan*/ XtWindow(int /*<<< orphan*/);
void TurnOnHourGlass(Widget w) {
  Cursor cursor;
  cursor = GetHourGlassCursor(XtDisplay(w));
  XDefineCursor(XtDisplay(w), XtWindow(w), cursor);
  XFlush(XtDisplay(w));
}


x86 assembly (clang, -O0):
<TurnOnHourGlass>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1040 <XtDisplay@plt>
mov    %eax,%edi
call   1070 <GetHourGlassCursor@plt>
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%edi
call   1040 <XtDisplay@plt>
mov    %eax,-0xc(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <XtWindow@plt>
mov    -0xc(%rbp),%edi
mov    %eax,%esi
mov    -0x8(%rbp),%edx
call   1050 <XDefineCursor@plt>
mov    -0x4(%rbp),%edi
call   1040 <XtDisplay@plt>
mov    %eax,%edi
call   1060 <XFlush@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<TurnOnHourGlass>:
push   %rbp
push   %r14
push   %rbx
mov    %edi,%ebx
call   1040 <XtDisplay@plt>
mov    %eax,%edi
call   1070 <GetHourGlassCursor@plt>
mov    %eax,%r14d
mov    %ebx,%edi
call   1040 <XtDisplay@plt>
mov    %eax,%ebp
mov    %ebx,%edi
call   1030 <XtWindow@plt>
mov    %ebp,%edi
mov    %eax,%esi
mov    %r14d,%edx
call   1050 <XDefineCursor@plt>
mov    %ebx,%edi
call   1040 <XtDisplay@plt>
mov    %eax,%edi
pop    %rbx
pop    %r14
pop    %rbp
jmp    1060 <XFlush@plt>

LLVM IR (-O0):
define void @TurnOnHourGlass(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = call i32 @XtDisplay(i32 %4)
%6 = call i32 @GetHourGlassCursor(i32 %5)
store i32 %6, i32* %3
%7 = load i32, i32* %2
%8 = call i32 @XtDisplay(i32 %7)
%9 = load i32, i32* %2
%10 = call i32 @XtWindow(i32 %9)
%11 = load i32, i32* %3
%12 = call i32 @XDefineCursor(i32 %8, i32 %10, i32 %11)
%13 = load i32, i32* %2
%14 = call i32 @XtDisplay(i32 %13)
%15 = call i32 @XFlush(i32 %14)
ret void
}

LLVM IR (-O2):
define void @TurnOnHourGlass(i32 %0) {
%2 = tail call i32 @XtDisplay(i32 %0)
%3 = tail call i32 @GetHourGlassCursor(i32 %2)
%4 = tail call i32 @XtDisplay(i32 %0)
%5 = tail call i32 @XtWindow(i32 %0)
%6 = tail call i32 @XDefineCursor(i32 %4, i32 %5, i32 %3)
%7 = tail call i32 @XtDisplay(i32 %0)
%8 = tail call i32 @XFlush(i32 %7)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ PIN_ON(int);
int /*<<< orphan*/ Welcome();
main(int argc, char **argv) {
  int pin = 44;
  Welcome();
  PIN_ON(pin);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x2c,-0x14(%rbp)
mov    $0x0,%al
call   1040 <Welcome@plt>
mov    -0x14(%rbp),%edi
call   1030 <PIN_ON@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1040 <Welcome@plt>
mov    $0x2c,%edi
call   1030 <PIN_ON@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
%5 = alloca i32
store i32 %0, i32* %3
store i8** %1, i8*** %4
store i32 44, i32* %5
%6 = call i32 (...) @Welcome()
%7 = load i32, i32* %5
%8 = call i32 @PIN_ON(i32 %7)
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @Welcome()
%4 = tail call i32 @PIN_ON(i32 44)
ret i32 0
}
/* Variables and functions */
int __tuntap_up(char const *);
int tapdev_up(const char *name) { return __tuntap_up(name); }


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

x86 assembly (clang, -O2):
<tapdev_up>:
jmp    1030 <__tuntap_up@plt>

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

LLVM IR (-O2):
define i32 @tapdev_up(i8* %0) {
%2 = tail call i32 @__tuntap_up(i8* %0)
ret i32 %2
}
/* Variables and functions */
int foo();
int main() {
  int ok;
  ok = foo();
  return ok;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @foo()
ret i32 %1
}
int Log2RoundUp(long x) {
  int y = 0;
  while (x >= (1 << y))
    y++;
  return y;
}


x86 assembly (clang, -O0):
<Log2RoundUp>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    -0xc(%rbp),%ecx
mov    $0x1,%edx
shl    %cl,%edx
mov    %edx,%ecx
movslq %ecx,%rcx
cmp    %rcx,%rax
jl     1139 <Log2RoundUp+0x39>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    110f <Log2RoundUp+0xf>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<Log2RoundUp>:
mov    $0xffffffff,%ecx
cs nopw 0x0(%rax,%rax,1)
nop
add    $0x1,%ecx
mov    $0x1,%eax
shl    %cl,%eax
cltq
cmp    %rdi,%rax
jle    1110 <Log2RoundUp+0x10>
mov    %ecx,%eax
ret

LLVM IR (-O0):
define i32 @Log2RoundUp(i64 %0) {
%2 = alloca i64
%3 = alloca i32
store i64 %0, i64* %2
store i32 0, i32* %3
br label %4
4: ; preds = %10, %1
%5 = load i64, i64* %2
%6 = load i32, i32* %3
%7 = shl i32 1, %6
%8 = sext i32 %7 to i64
%9 = icmp sge i64 %5, %8
br i1 %9, label %10, label %13
10: ; preds = %4
%11 = load i32, i32* %3
%12 = add nsw i32 %11, 1
store i32 %12, i32* %3
br label %4
13: ; preds = %4
%14 = load i32, i32* %3
ret i32 %14
}

LLVM IR (-O2):
define i32 @Log2RoundUp(i64 %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i32 [ 0, %1 ], [ %7, %2 ]
%4 = shl nuw i32 1, %3
%5 = sext i32 %4 to i64
%6 = icmp sgt i64 %5, %0
%7 = add nuw nsw i32 %3, 1
br i1 %6, label %8, label %2
8: ; preds = %2
ret i32 %3
}
void foo075(int p) {}


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

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

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

LLVM IR (-O2):
define void @foo075(i32 %0) {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int /*<<< orphan*/ int16_t;

/* Variables and functions */
int /*<<< orphan*/ p264_pixel_sub_8x8_mmx(int /*<<< orphan*/ *,
                                          int /*<<< orphan*/ *, int,
                                          int /*<<< orphan*/ *, int);
int /*<<< orphan*/ p264_xdct8_mmxext(int /*<<< orphan*/ **);
int /*<<< orphan*/ p264_ydct8_mmx(int /*<<< orphan*/ **);
void p264_sub8x8_dct8_mmxext(int16_t dct[8][8], uint8_t *pix1, int i_pix1,
                             uint8_t *pix2, int i_pix2) {
  p264_pixel_sub_8x8_mmx((int16_t *)dct, pix1, i_pix1, pix2, i_pix2);
  p264_xdct8_mmxext(dct);
  p264_ydct8_mmx(dct);
}


x86 assembly (clang, -O0):
<p264_sub8x8_dct8_mmxext>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8d,-0x24(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
mov    -0x20(%rbp),%rcx
mov    -0x24(%rbp),%r8d
call   1030 <p264_pixel_sub_8x8_mmx@plt>
mov    -0x8(%rbp),%rdi
call   1040 <p264_xdct8_mmxext@plt>
mov    -0x8(%rbp),%rdi
call   1050 <p264_ydct8_mmx@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<p264_sub8x8_dct8_mmxext>:
push   %rbx
mov    %rdi,%rbx
call   1030 <p264_pixel_sub_8x8_mmx@plt>
mov    %rbx,%rdi
call   1040 <p264_xdct8_mmxext@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1050 <p264_ydct8_mmx@plt>

LLVM IR (-O0):
define void @p264_sub8x8_dct8_mmxext([8 x i32]* %0, i32* %1, i32 %2, i32* %3, i32 %4) {
%6 = alloca [8 x i32]*
%7 = alloca i32*
%8 = alloca i32
%9 = alloca i32*
%10 = alloca i32
store [8 x i32]* %0, [8 x i32]** %6
store i32* %1, i32** %7
store i32 %2, i32* %8
store i32* %3, i32** %9
store i32 %4, i32* %10
%11 = load [8 x i32]*, [8 x i32]** %6
%12 = bitcast [8 x i32]* %11 to i32*
%13 = load i32*, i32** %7
%14 = load i32, i32* %8
%15 = load i32*, i32** %9
%16 = load i32, i32* %10
%17 = call i32 @p264_pixel_sub_8x8_mmx(i32* %12, i32* %13, i32 %14, i32* %15, i32 %16)
%18 = load [8 x i32]*, [8 x i32]** %6
%19 = bitcast [8 x i32]* %18 to i32**
%20 = call i32 @p264_xdct8_mmxext(i32** %19)
%21 = load [8 x i32]*, [8 x i32]** %6
%22 = bitcast [8 x i32]* %21 to i32**
%23 = call i32 @p264_ydct8_mmx(i32** %22)
ret void
}

LLVM IR (-O2):
define void @p264_sub8x8_dct8_mmxext([8 x i32]* %0, i32* %1, i32 %2, i32* %3, i32 %4) {
%6 = getelementptr [8 x i32], [8 x i32]* %0, i64 0, i64 0
%7 = tail call i32 @p264_pixel_sub_8x8_mmx(i32* %6, i32* %1, i32 %2, i32* %3, i32 %4)
%8 = bitcast [8 x i32]* %0 to i32**
%9 = tail call i32 @p264_xdct8_mmxext(i32** %8)
%10 = tail call i32 @p264_ydct8_mmx(i32** %8)
ret void
}
/* Variables and functions */
int read_value_from_fcd(int, unsigned char *);
int fcdppGetBiasT(unsigned char *state) {
  return read_value_from_fcd(166, state);
}


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

x86 assembly (clang, -O2):
<fcdppGetBiasT>:
mov    %rdi,%rsi
mov    $0xa6,%edi
jmp    1030 <read_value_from_fcd@plt>

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

LLVM IR (-O2):
define i32 @fcdppGetBiasT(i8* %0) {
%2 = tail call i32 @read_value_from_fcd(i32 166, i8* %0)
ret i32 %2
}
short test_04(int x) {
  if (x < 58 && x > 47)
    return 1;
  return 0;
}


x86 assembly (clang, -O0):
<test_04>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0x3a,-0x8(%rbp)
jge    1126 <test_04+0x26>
cmpl   $0x2f,-0x8(%rbp)
jle    1126 <test_04+0x26>
movw   $0x1,-0x2(%rbp)
jmp    112c <test_04+0x2c>
movw   $0x0,-0x2(%rbp)
movswl -0x2(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define signext i16 @test_04(i32 %0) {
%2 = alloca i16
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = icmp slt i32 %4, 58
br i1 %5, label %6, label %10
6: ; preds = %1
%7 = load i32, i32* %3
%8 = icmp sgt i32 %7, 47
br i1 %8, label %9, label %10
9: ; preds = %6
store i16 1, i16* %2
br label %11
10: ; preds = %6, %1
store i16 0, i16* %2
br label %11
11: ; preds = %10, %9
%12 = load i16, i16* %2
ret i16 %12
}

LLVM IR (-O2):
define signext i16 @test_04(i32 %0) {
%2 = add i32 %0, -48
%3 = icmp ult i32 %2, 10
%4 = zext i1 %3 to i16
ret i16 %4
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int uint32_t;
typedef int /*<<< orphan*/ uint16_t;

/* Variables and functions */
int /*<<< orphan*/ unaligned_write_be16(int /*<<< orphan*/ *,
                                        int /*<<< orphan*/);
void unaligned_write_be32(void *_u, uint32_t a) {
  uint8_t *u = _u;
  unaligned_write_be16(u, (uint16_t)(a >> 16));
  unaligned_write_be16(u + 2, (uint16_t)a);
}


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

x86 assembly (clang, -O2):
<unaligned_write_be32>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebp
mov    %rdi,%rbx
sar    $0x10,%esi
call   1030 <unaligned_write_be16@plt>
add    $0x8,%rbx
mov    %rbx,%rdi
mov    %ebp,%esi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <unaligned_write_be16@plt>

LLVM IR (-O0):
define void @unaligned_write_be32(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
%5 = alloca i32*
store i8* %0, i8** %3
store i32 %1, i32* %4
%6 = load i8*, i8** %3
%7 = bitcast i8* %6 to i32*
store i32* %7, i32** %5
%8 = load i32*, i32** %5
%9 = load i32, i32* %4
%10 = ashr i32 %9, 16
%11 = call i32 @unaligned_write_be16(i32* %8, i32 %10)
%12 = load i32*, i32** %5
%13 = getelementptr inbounds i32, i32* %12, i64 2
%14 = load i32, i32* %4
%15 = call i32 @unaligned_write_be16(i32* %13, i32 %14)
ret void
}

LLVM IR (-O2):
define void @unaligned_write_be32(i8* %0, i32 %1) {
%3 = bitcast i8* %0 to i32*
%4 = ashr i32 %1, 16
%5 = tail call i32 @unaligned_write_be16(i32* %3, i32 %4)
%6 = getelementptr inbounds i8, i8* %0, i64 8
%7 = bitcast i8* %6 to i32*
%8 = tail call i32 @unaligned_write_be16(i32* %7, i32 %1)
ret void
}
void AYUVToYRow_C() {}


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

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

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

LLVM IR (-O2):
define void @AYUVToYRow_C() {
ret void
}
/* Variables and functions */
char *environment_get(char *);
char *environ_get_environment(char *variable_name) {
  return environment_get(variable_name);
}


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

x86 assembly (clang, -O2):
<environ_get_environment>:
jmp    1030 <environment_get@plt>

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

LLVM IR (-O2):
define i8* @environ_get_environment(i8* %0) {
%2 = tail call i8* @environment_get(i8* %0)
ret i8* %2
}
/* Type definitions */
typedef scalar_t__ uint8_t;
typedef int uint64_t;

/* Variables and functions */
uint64_t get64be(const uint8_t *bytes) {
  return (uint64_t)bytes[7] | ((uint64_t)bytes[6] << 8) |
         ((uint64_t)bytes[5] << 16) | ((uint64_t)bytes[4] << 24) |
         ((uint64_t)bytes[3] << 32) | ((uint64_t)bytes[2] << 40) |
         ((uint64_t)bytes[1] << 48) | ((uint64_t)bytes[0] << 56);
}


x86 assembly (clang, -O0):
<get64be>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    0x38(%rax),%rax
mov    -0x8(%rbp),%rcx
mov    0x30(%rcx),%rcx
shl    $0x8,%ecx
or     %ecx,%eax
mov    -0x8(%rbp),%rcx
mov    0x28(%rcx),%rcx
shl    $0x10,%ecx
or     %ecx,%eax
mov    -0x8(%rbp),%rcx
mov    0x20(%rcx),%rcx
shl    $0x18,%ecx
or     %ecx,%eax
mov    -0x8(%rbp),%rcx
mov    0x18(%rcx),%rcx
mov    %ecx,%edx
mov    $0x20,%ecx
shl    %cl,%edx
mov    %edx,%ecx
or     %ecx,%eax
mov    -0x8(%rbp),%rcx
mov    0x10(%rcx),%rcx
mov    %ecx,%edx
mov    $0x28,%ecx
shl    %cl,%edx
mov    %edx,%ecx
or     %ecx,%eax
mov    -0x8(%rbp),%rcx
mov    0x8(%rcx),%rcx
mov    %ecx,%edx
mov    $0x30,%ecx
shl    %cl,%edx
mov    %edx,%ecx
or     %ecx,%eax
mov    -0x8(%rbp),%rcx
mov    (%rcx),%rcx
mov    %ecx,%edx
mov    $0x38,%ecx
shl    %cl,%edx
mov    %edx,%ecx
or     %ecx,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @get64be(i64* nocapture readnone %0) {
ret i32 poison
}
void BN_GF2m_mod_div(void) {}


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

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

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

LLVM IR (-O2):
define void @BN_GF2m_mod_div() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ close(int);
int /*<<< orphan*/ write(int, char *, int);
void end_voc(int fd) {
  char dummy = 0;
  write(fd, &dummy, 1);
  if (fd != 1)
    close(fd);
}


x86 assembly (clang, -O0):
<end_voc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movb   $0x0,-0x5(%rbp)
mov    -0x4(%rbp),%edi
lea    -0x5(%rbp),%rsi
mov    $0x1,%edx
call   1030 <write@plt>
cmpl   $0x1,-0x4(%rbp)
je     1152 <end_voc+0x32>
mov    -0x4(%rbp),%edi
call   1040 <close@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<end_voc>:
push   %rbx
sub    $0x10,%rsp
mov    %edi,%ebx
movb   $0x0,0xf(%rsp)
lea    0xf(%rsp),%rsi
mov    $0x1,%edx
call   1030 <write@plt>
cmp    $0x1,%ebx
jne    1146 <end_voc+0x26>
add    $0x10,%rsp
pop    %rbx
ret
mov    %ebx,%edi
add    $0x10,%rsp
pop    %rbx
jmp    1040 <close@plt>

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

LLVM IR (-O2):
define void @end_voc(i32 %0) {
%2 = alloca i8
store i8 0, i8* %2
%3 = call i32 @write(i32 %0, i8* %2, i32 1)
%4 = icmp eq i32 %0, 1
br i1 %4, label %7, label %5
5: ; preds = %1
%6 = tail call i32 @close(i32 %0)
br label %7
7: ; preds = %5, %1
ret void
}
/* Type definitions */
typedef char *uint64_t;

/* Variables and functions */
uint64_t ROL64_47(uint64_t x) {
  __asm__("rolq $47, %0" : "=r"(x) : "0"(x));
  return x;
}


x86 assembly (clang, -O0):
<ROL64_47>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
rol    $0x2f,%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ROL64_47>:
mov    %rdi,%rax
rol    $0x2f,%rax
ret

LLVM IR (-O0):
define i8* @ROL64_47(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i8* asm "rolq $$47, $0", "=r,0,~{dirflag},~{fpsr},~{flags}"(i8* %3)
store i8* %4, i8** %2
%5 = load i8*, i8** %2
ret i8* %5
}

LLVM IR (-O2):
define i8* @ROL64_47(i8* readnone %0) {
%2 = tail call i8* asm "rolq $$47, $0", "=r,0,~{dirflag},~{fpsr},~{flags}"(i8* %0)
ret i8* %2
}
/* Variables and functions */
int /*<<< orphan*/ msg_add_writemem(int, int, unsigned char *);
void msg_add_writebyte(int m65_addr, unsigned char byte) {
  msg_add_writemem(m65_addr, 1, &byte);
}


x86 assembly (clang, -O0):
<msg_add_writebyte>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %sil,%al
mov    %edi,-0x4(%rbp)
mov    %al,-0x5(%rbp)
mov    -0x4(%rbp),%edi
mov    $0x1,%esi
lea    -0x5(%rbp),%rdx
call   1030 <msg_add_writemem@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<msg_add_writebyte>:
push   %rax
mov    %sil,0x7(%rsp)
lea    0x7(%rsp),%rdx
mov    $0x1,%esi
call   1030 <msg_add_writemem@plt>
pop    %rax
ret

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

LLVM IR (-O2):
define void @msg_add_writebyte(i32 %0, i8 zeroext %1) {
%3 = alloca i8
store i8 %1, i8* %3
%4 = call i32 @msg_add_writemem(i32 %0, i32 1, i8* %3)
ret void
}
int do_873() { return 873; }


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

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

LLVM IR (-O0):
define i32 @do_873() {
ret i32 873
}

LLVM IR (-O2):
define i32 @do_873() {
ret i32 873
}
int null_get_unmute_volume(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @null_get_unmute_volume() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void xfree(void *ptr) {
  if (ptr == NULL)
    return;
  free(ptr);
}


x86 assembly (clang, -O0):
<xfree>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    112c <xfree+0x1c>
jmp    1135 <xfree+0x25>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xfree>:
test   %rdi,%rdi
je     111a <xfree+0xa>
jmp    1030 <free@plt>
ret

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

LLVM IR (-O2):
define void @xfree(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = tail call i32 @free(i8* %0)
br label %5
5: ; preds = %1, %3
ret void
}
/* Variables and functions */
unsigned int hash_ulong(void const *);
unsigned int hash_ushort(const void *key) { return hash_ulong(key); }


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

x86 assembly (clang, -O2):
<hash_ushort>:
jmp    1030 <hash_ulong@plt>

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

LLVM IR (-O2):
define i32 @hash_ushort(i8* %0) {
%2 = tail call i32 @hash_ulong(i8* %0)
ret i32 %2
}
/* Variables and functions */
void *memcpy(void *, void const *, size_t);
void *__wrap_memcpy(void *dst, const void *src, size_t size) {
  return memcpy(dst, src, size);
}


x86 assembly (clang, -O0):
<__wrap_memcpy>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    %rdi,-0x20(%rbp)
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1030 <memcpy@plt>
mov    -0x20(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__wrap_memcpy>:
jmp    1030 <memcpy@plt>

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

LLVM IR (-O2):
define i8* @__wrap_memcpy(i8* returned writeonly %0, i8* nocapture %1, i64 %2) {
tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 1 %0, i8* align 1 %1, i64 %2, i1 false)
ret i8* %0
}
void swap(int v[], int i, int j) {
  if (i == j)
    return;
  int temp;
  temp = v[i];
  v[i] = v[j];
  v[j] = temp;
}


x86 assembly (clang, -O0):
<swap>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x10(%rbp),%eax
jne    111f <swap+0x1f>
jmp    1151 <swap+0x51>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,4),%edx
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x14(%rbp),%edx
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
pop    %rbp
ret

x86 assembly (clang, -O2):
<swap>:
cmp    %edx,%esi
je     1116 <swap+0x16>
movslq %esi,%rax
mov    (%rdi,%rax,4),%ecx
movslq %edx,%rdx
mov    (%rdi,%rdx,4),%esi
mov    %esi,(%rdi,%rax,4)
mov    %ecx,(%rdi,%rdx,4)
ret

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

LLVM IR (-O2):
define void @swap(i32* nocapture %0, i32 %1, i32 %2) {
%4 = icmp eq i32 %1, %2
br i1 %4, label %12, label %5
5: ; preds = %3
%6 = sext i32 %1 to i64
%7 = getelementptr inbounds i32, i32* %0, i64 %6
%8 = load i32, i32* %7
%9 = sext i32 %2 to i64
%10 = getelementptr inbounds i32, i32* %0, i64 %9
%11 = load i32, i32* %10
store i32 %11, i32* %7
store i32 %8, i32* %10
br label %12
12: ; preds = %3, %5
ret void
}
/* Variables and functions */
int /*<<< orphan*/ sha1_finalize();
void crypt_finalize(void) {
  sha1_finalize();
  return;
}


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

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

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

LLVM IR (-O2):
define void @crypt_finalize() {
%1 = tail call i32 (...) @sha1_finalize()
ret void
}
void mmcau_sha1_initialize_output(unsigned int sha1_state[]) {
  sha1_state[0] = 0x67452301;
  sha1_state[1] = 0xefcdab89;
  sha1_state[2] = 0x98badcfe;
  sha1_state[3] = 0x10325476;
  sha1_state[4] = 0xc3d2e1f0;
}


x86 assembly (clang, -O0):
<mmcau_sha1_initialize_output>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movl   $0x67452301,(%rax)
mov    -0x8(%rbp),%rax
movl   $0xefcdab89,0x4(%rax)
mov    -0x8(%rbp),%rax
movl   $0x98badcfe,0x8(%rax)
mov    -0x8(%rbp),%rax
movl   $0x10325476,0xc(%rax)
mov    -0x8(%rbp),%rax
movl   $0xc3d2e1f0,0x10(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<mmcau_sha1_initialize_output>:
movaps 0xef9(%rip),%xmm0
movups %xmm0,(%rdi)
movl   $0xc3d2e1f0,0x10(%rdi)
ret

LLVM IR (-O0):
define void @mmcau_sha1_initialize_output(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = getelementptr inbounds i32, i32* %3, i64 0
store i32 1732584193, i32* %4
%5 = load i32*, i32** %2
%6 = getelementptr inbounds i32, i32* %5, i64 1
store i32 -271733879, i32* %6
%7 = load i32*, i32** %2
%8 = getelementptr inbounds i32, i32* %7, i64 2
store i32 -1732584194, i32* %8
%9 = load i32*, i32** %2
%10 = getelementptr inbounds i32, i32* %9, i64 3
store i32 271733878, i32* %10
%11 = load i32*, i32** %2
%12 = getelementptr inbounds i32, i32* %11, i64 4
store i32 -1009589776, i32* %12
ret void
}

LLVM IR (-O2):
define void @mmcau_sha1_initialize_output(i32* nocapture writeonly %0) {
%2 = bitcast i32* %0 to <4 x i32>*
store <4 x i32> <i32 1732584193, i32 -271733879, i32 -1732584194, i32 271733878>, <4 x i32>* %2
%3 = getelementptr inbounds i32, i32* %0, i64 4
store i32 -1009589776, i32* %3
ret void
}
/* Variables and functions */
unsigned long UINT_MAX;
unsigned int CLIP_TO_UINT(unsigned long size) {
  return size >= UINT_MAX ? UINT_MAX : (unsigned int)size;
}


x86 assembly (clang, -O0):
<CLIP_TO_UINT>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    0x2ed5(%rip),%rcx
cmp    (%rcx),%rax
jb     112f <CLIP_TO_UINT+0x2f>
mov    0x2ec5(%rip),%rax
mov    (%rax),%rax
mov    %rax,-0x10(%rbp)
jmp    1139 <CLIP_TO_UINT+0x39>
mov    -0x8(%rbp),%rax
mov    %eax,%eax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<CLIP_TO_UINT>:
mov    0x2ee1(%rip),%rax
mov    (%rax),%rax
cmp    %rdi,%rax
cmova  %edi,%eax
ret

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

LLVM IR (-O2):
@UINT_MAX = global i64 0
define i32 @CLIP_TO_UINT(i64 %0) {
%2 = load i64, i64* @UINT_MAX
%3 = icmp ugt i64 %2, %0
%4 = select i1 %3, i64 %0, i64 %2
%5 = trunc i64 %4 to i32
ret i32 %5
}
/* Variables and functions */
int atoi(char *);
int /*<<< orphan*/ fac(int);
int /*<<< orphan*/ facrec(int);
int /*<<< orphan*/ printf(char *, int, int /*<<< orphan*/);
int main(int argc, char **argv) {
  int n = atoi(argv[1]);
  printf("fac(%d) = %llu\n", n, fac(n));
  printf("facrec(%d) = %llu\n", n, facrec(n));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1050 <atoi@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x14(%rbp),%edi
call   1030 <fac@plt>
mov    -0x1c(%rbp),%esi
mov    %eax,%edx
lea    0xe80(%rip),%rdi
call   1040 <printf@plt>
mov    -0x14(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x14(%rbp),%edi
call   1060 <facrec@plt>
mov    -0x18(%rbp),%esi
mov    %eax,%edx
lea    0xe71(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    0x8(%rsi),%rdi
call   1050 <atoi@plt>
mov    %eax,%ebx
mov    %eax,%edi
call   1030 <fac@plt>
lea    0xea6(%rip),%rdi
mov    %ebx,%esi
mov    %eax,%edx
call   1040 <printf@plt>
mov    %ebx,%edi
call   1060 <facrec@plt>
lea    0xe9f(%rip),%rdi
mov    %ebx,%esi
mov    %eax,%edx
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [16 x i8] c"fac(%d) = %llu\0A\00"
@.str.1 = [19 x i8] c"facrec(%d) = %llu\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = load i8**, i8*** %5
%8 = getelementptr inbounds i8*, i8** %7, i64 1
%9 = load i8*, i8** %8
%10 = call i32 @atoi(i8* %9)
store i32 %10, i32* %6
%11 = load i32, i32* %6
%12 = load i32, i32* %6
%13 = call i32 @fac(i32 %12)
%14 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i32 %11, i32 %13)
%15 = load i32, i32* %6
%16 = load i32, i32* %6
%17 = call i32 @facrec(i32 %16)
%18 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0), i32 %15, i32 %17)
ret i32 0
}

LLVM IR (-O2):
@.str = [16 x i8] c"fac(%d) = %llu\0A\00"
@.str.1 = [19 x i8] c"facrec(%d) = %llu\0A\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = getelementptr inbounds i8*, i8** %1, i64 1
%4 = load i8*, i8** %3
%5 = tail call i32 @atoi(i8* %4)
%6 = tail call i32 @fac(i32 %5)
%7 = tail call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i32 %5, i32 %6)
%8 = tail call i32 @facrec(i32 %5)
%9 = tail call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0), i32 %5, i32 %8)
ret i32 0
}
int test_bit(int nr, const volatile unsigned long *addr) {
  return 1UL & (addr[((nr) / ((int)sizeof(unsigned long) * 8))] >>
                (nr & (((int)sizeof(unsigned long) * 8) - 1)));
}


x86 assembly (clang, -O0):
<test_bit>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x4(%rbp),%eax
mov    $0x40,%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
mov    -0x18(%rbp),%rax
movslq %ecx,%rcx
mov    (%rax,%rcx,8),%rax
mov    -0x4(%rbp),%ecx
and    $0x3f,%ecx
mov    %ecx,%ecx
shr    %cl,%rax
and    $0x1,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_bit>:
mov    %edi,%ecx
lea    0x3f(%rcx),%eax
test   %edi,%edi
cmovns %edi,%eax
sar    $0x6,%eax
cltq
mov    (%rsi,%rax,8),%rax
shr    %cl,%rax
and    $0x1,%eax
ret

LLVM IR (-O0):
define i32 @test_bit(i32 %0, i64* %1) {
%3 = alloca i32
%4 = alloca i64*
store i32 %0, i32* %3
store i64* %1, i64** %4
%5 = load i64*, i64** %4
%6 = load i32, i32* %3
%7 = sdiv i32 %6, 64
%8 = sext i32 %7 to i64
%9 = getelementptr inbounds i64, i64* %5, i64 %8
%10 = load volatile i64, i64* %9
%11 = load i32, i32* %3
%12 = and i32 %11, 63
%13 = zext i32 %12 to i64
%14 = lshr i64 %10, %13
%15 = and i64 1, %14
%16 = trunc i64 %15 to i32
ret i32 %16
}

LLVM IR (-O2):
define i32 @test_bit(i32 %0, i64* %1) {
%3 = sdiv i32 %0, 64
%4 = sext i32 %3 to i64
%5 = getelementptr inbounds i64, i64* %1, i64 %4
%6 = load volatile i64, i64* %5
%7 = and i32 %0, 63
%8 = zext i32 %7 to i64
%9 = lshr i64 %6, %8
%10 = trunc i64 %9 to i32
%11 = and i32 %10, 1
ret i32 %11
}
/* Variables and functions */
int syscall(int, char *, int /*<<< orphan*/);
int fixtty(char *tty) { return syscall(40, tty, 0); }


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

x86 assembly (clang, -O2):
<fixtty>:
mov    %rdi,%rsi
mov    $0x28,%edi
xor    %edx,%edx
jmp    1030 <syscall@plt>

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

LLVM IR (-O2):
define i32 @fixtty(i8* %0) {
%2 = tail call i32 @syscall(i32 40, i8* %0, i32 0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ method3();
int main(void) {
  method3();
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @method3()
ret i32 0
}
/* Variables and functions */
double exp(double);
double sqrt(double);
double f7(double x) { return exp(-x) - 0.5 - sqrt(x); }


x86 assembly (clang, -O0):
<f7>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
call   1030 <exp@plt>
movsd  0xeaa(%rip),%xmm1
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1040 <sqrt@plt>
movaps %xmm0,%xmm1
movsd  -0x10(%rbp),%xmm0
subsd  %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f7>:
sub    $0x18,%rsp
movapd %xmm0,%xmm1
movapd %xmm0,(%rsp)
movapd 0xecb(%rip),%xmm0
xorpd  %xmm1,%xmm0
call   1030 <exp@plt>
movapd %xmm0,%xmm1
addsd  0xec6(%rip),%xmm1
xorpd  %xmm0,%xmm0
movapd (%rsp),%xmm2
ucomisd %xmm0,%xmm2
movapd %xmm2,%xmm0
jb     1163 <f7+0x43>
sqrtsd %xmm0,%xmm0
jmp    1172 <f7+0x52>
movsd  %xmm1,(%rsp)
call   1040 <sqrt@plt>
movsd  (%rsp),%xmm1
subsd  %xmm0,%xmm1
movapd %xmm1,%xmm0
add    $0x18,%rsp
ret

LLVM IR (-O0):
define double @f7(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fneg double %3
%5 = call double @exp(double %4)
%6 = fsub double %5, 5.000000e-01
%7 = load double, double* %2
%8 = call double @sqrt(double %7)
%9 = fsub double %6, %8
ret double %9
}

LLVM IR (-O2):
define double @f7(double %0) {
%2 = fneg double %0
%3 = tail call double @exp(double %2)
%4 = fadd double %3, -5.000000e-01
%5 = tail call double @sqrt(double %0)
%6 = fsub double %4, %5
ret double %6
}
void mymodule_exit(void) {}


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

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

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

LLVM IR (-O2):
define void @mymodule_exit() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void usage(void) {
  fprintf(stderr, "HulaHoop dossier_accessible\n");
  exit(EXIT_FAILURE);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2e98(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %rax
mov    0x2eb8(%rip),%rax
mov    (%rax),%edi
lea    0xecf(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2e9b(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [29 x i8] c"HulaHoop dossier_accessible\0A\00"
@EXIT_FAILURE = global i32 0
define void @usage() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* @EXIT_FAILURE
%4 = call i32 @exit(i32 %3)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [29 x i8] c"HulaHoop dossier_accessible\0A\00"
@EXIT_FAILURE = global i32 0
define void @usage() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* @EXIT_FAILURE
%4 = tail call i32 @exit(i32 %3)
unreachable
}