xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
void myprint_main_2(char *str) { printf("main print 2: %s", str); }


x86 assembly (clang, -O0):
<myprint_main_2>:
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):
<myprint_main_2>:
mov    %rdi,%rsi
lea    0xee6(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [17 x i8] c"main print 2: %s\00"
define void @myprint_main_2(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i8* %3)
ret void
}

LLVM IR (-O2):
@.str = [17 x i8] c"main print 2: %s\00"
define void @myprint_main_2(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
/* Type definitions */
typedef int int32_t;

/* Variables and functions */
void main() {
  int32_t a;
  a = 1;
  a |= 2;
}


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

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

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

LLVM IR (-O2):
define void @main() {
ret void
}
void ReverseGPIOP$0$In$clr(void) { HplMcs51GeneralIOC$P10$clr(); }


x86 assembly (clang, -O0):
<ReverseGPIOP$0$In$clr>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <HplMcs51GeneralIOC$P10$clr@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<ReverseGPIOP$0$In$clr>:
xor    %eax,%eax
jmp    1030 <HplMcs51GeneralIOC$P10$clr@plt>

LLVM IR (-O0):
define void @"ReverseGPIOP$0$In$clr"() {
%1 = call i32 (...) @"HplMcs51GeneralIOC$P10$clr"()
ret void
}

LLVM IR (-O2):
define void @"ReverseGPIOP$0$In$clr"() {
%1 = tail call i32 (...) @"HplMcs51GeneralIOC$P10$clr"()
ret void
}
unsigned int r2h_bits(int cmd) {
  unsigned int mask = (((cmd) > 0) ? (1 << ((cmd)-1)) : 0);
  if (cmd == 13)
    mask |= ((((14) > 0) ? (1 << ((14) - 1)) : 0) |
             (((9) > 0) ? (1 << ((9) - 1)) : 0) |
             (((15) > 0) ? (1 << ((15) - 1)) : 0));
  else if (cmd == 4)
    mask |= ((((14) > 0) ? (1 << ((14) - 1)) : 0) |
             (((15) > 0) ? (1 << ((15) - 1)) : 0) |
             (((13) > 0) ? (1 << ((13) - 1)) : 0));
  return (mask |= (((32) > 0) ? (1 << ((32) - 1)) : 0));
}


x86 assembly (clang, -O0):
<r2h_bits>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
jle    1126 <r2h_bits+0x26>
mov    -0x4(%rbp),%ecx
sub    $0x1,%ecx
mov    $0x1,%eax
shl    %cl,%eax
mov    %eax,-0xc(%rbp)
jmp    1130 <r2h_bits+0x30>
xor    %eax,%eax
mov    %eax,-0xc(%rbp)
jmp    1130 <r2h_bits+0x30>
mov    -0xc(%rbp),%eax
mov    %eax,-0x8(%rbp)
cmpl   $0xd,-0x4(%rbp)
jne    1150 <r2h_bits+0x50>
mov    -0x8(%rbp),%eax
or     $0x6100,%eax
mov    %eax,-0x8(%rbp)
jmp    116a <r2h_bits+0x6a>
cmpl   $0x4,-0x4(%rbp)
jne    1165 <r2h_bits+0x65>
mov    -0x8(%rbp),%eax
or     $0x7000,%eax
mov    %eax,-0x8(%rbp)
jmp    116a <r2h_bits+0x6a>
mov    -0x8(%rbp),%eax
or     $0x80000000,%eax
mov    %eax,-0x8(%rbp)
pop    %rbp
ret

x86 assembly (clang, -O2):
<r2h_bits>:
lea    -0x1(%rdi),%ecx
mov    $0x1,%edx
shl    %cl,%edx
xor    %eax,%eax
test   %edi,%edi
cmovg  %edx,%eax
cmp    $0x4,%edi
je     1126 <r2h_bits+0x26>
cmp    $0xd,%edi
jne    112b <r2h_bits+0x2b>
or     $0x6100,%eax
or     $0x80000000,%eax
ret
or     $0x7000,%eax
or     $0x80000000,%eax
ret

LLVM IR (-O0):
define i32 @r2h_bits(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = icmp sgt i32 %4, 0
br i1 %5, label %6, label %10
6: ; preds = %1
%7 = load i32, i32* %2
%8 = sub nsw i32 %7, 1
%9 = shl i32 1, %8
br label %11
10: ; preds = %1
br label %11
11: ; preds = %10, %6
%12 = phi i32 [ %9, %6 ], [ 0, %10 ]
store i32 %12, i32* %3
%13 = load i32, i32* %2
%14 = icmp eq i32 %13, 13
br i1 %14, label %15, label %18
15: ; preds = %11
%16 = load i32, i32* %3
%17 = or i32 %16, 24832
store i32 %17, i32* %3
br label %25
18: ; preds = %11
%19 = load i32, i32* %2
%20 = icmp eq i32 %19, 4
br i1 %20, label %21, label %24
21: ; preds = %18
%22 = load i32, i32* %3
%23 = or i32 %22, 28672
store i32 %23, i32* %3
br label %24
24: ; preds = %21, %18
br label %25
25: ; preds = %24, %15
%26 = load i32, i32* %3
%27 = or i32 %26, -2147483648
store i32 %27, i32* %3
ret i32 %27
}

LLVM IR (-O2):
define i32 @r2h_bits(i32 %0) {
%2 = icmp sgt i32 %0, 0
%3 = add nsw i32 %0, -1
%4 = shl nuw i32 1, %3
%5 = select i1 %2, i32 %4, i32 0
switch i32 %0, label %10 [
i32 13, label %6
i32 4, label %8
]
6: ; preds = %1
%7 = or i32 %5, 24832
br label %10
8: ; preds = %1
%9 = or i32 %5, 28672
br label %10
10: ; preds = %1, %8, %6
%11 = phi i32 [ %7, %6 ], [ %9, %8 ], [ %5, %1 ]
%12 = or i32 %11, -2147483648
ret i32 %12
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int test_i() {
  printf("test_i\n");
  return 42;
  printf("test_i\n");
}


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

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

LLVM IR (-O0):
@.str = [8 x i8] c"test_i\0A\00"
define i32 @test_i() {
%1 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
ret i32 42
}

LLVM IR (-O2):
@str = [7 x i8] c"test_i\00"
define i32 @test_i() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @str, i64 0, i64 0))
ret i32 42
}
/* Variables and functions */
int /*<<< orphan*/ MADV_RANDOM;
int madvise(void *, size_t, int /*<<< orphan*/);
size_t pageAlignLen(void *, size_t);
void *pageAlignStart(void *);
int sasMsyncRandom(void *startAddr, size_t size) {
  void *alignAddr = pageAlignStart(startAddr);
  size_t alignSize = pageAlignLen(startAddr, size);
  return madvise(alignAddr, alignSize, MADV_RANDOM);
}


x86 assembly (clang, -O0):
<sasMsyncRandom>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <pageAlignStart@plt>
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1040 <pageAlignLen@plt>
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x20(%rbp),%rsi
mov    0x2e73(%rip),%rax
mov    (%rax),%edx
call   1050 <madvise@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sasMsyncRandom>:
push   %r15
push   %r14
push   %rbx
mov    %rsi,%r14
mov    %rdi,%rbx
call   1030 <pageAlignStart@plt>
mov    %rax,%r15
mov    %rbx,%rdi
mov    %r14,%rsi
call   1040 <pageAlignLen@plt>
mov    0x2e8b(%rip),%rcx
mov    (%rcx),%edx
mov    %r15,%rdi
mov    %rax,%rsi
pop    %rbx
pop    %r14
pop    %r15
jmp    1050 <madvise@plt>

LLVM IR (-O0):
@MADV_RANDOM = global i32 0
define i32 @sasMsyncRandom(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
%5 = alloca i8*
%6 = alloca i64
store i8* %0, i8** %3
store i64 %1, i64* %4
%7 = load i8*, i8** %3
%8 = call i8* @pageAlignStart(i8* %7)
store i8* %8, i8** %5
%9 = load i8*, i8** %3
%10 = load i64, i64* %4
%11 = call i64 @pageAlignLen(i8* %9, i64 %10)
store i64 %11, i64* %6
%12 = load i8*, i8** %5
%13 = load i64, i64* %6
%14 = load i32, i32* @MADV_RANDOM
%15 = call i32 @madvise(i8* %12, i64 %13, i32 %14)
ret i32 %15
}

LLVM IR (-O2):
@MADV_RANDOM = global i32 0
define i32 @sasMsyncRandom(i8* %0, i64 %1) {
%3 = tail call i8* @pageAlignStart(i8* %0)
%4 = tail call i64 @pageAlignLen(i8* %0, i64 %1)
%5 = load i32, i32* @MADV_RANDOM
%6 = tail call i32 @madvise(i8* %3, i64 %4, i32 %5)
ret i32 %6
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ printf(char *, int /*<<< orphan*/);
int /*<<< orphan*/ read32(int /*<<< orphan*/ *);
int bsshunk(FILE *fp) {
  printf("Allocable memory = %lu\n", read32(fp));
  return 0;
}


x86 assembly (clang, -O0):
<bsshunk>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <read32@plt>
mov    %eax,%esi
lea    0xec2(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bsshunk>:
push   %rax
call   1040 <read32@plt>
lea    0xed3(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [24 x i8] c"Allocable memory = %lu\0A\00"
define i32 @bsshunk(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = call i32 @read32(i32* %3)
%5 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), i32 %4)
ret i32 0
}

LLVM IR (-O2):
@.str = [24 x i8] c"Allocable memory = %lu\0A\00"
define i32 @bsshunk(i32* %0) {
%2 = tail call i32 @read32(i32* %0)
%3 = tail call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), i32 %2)
ret i32 0
}
/* Variables and functions */
char *concat(char const *, char const *, char);
char *build_path(const char *path, const char *fname) {
  return concat(path, fname, '/');
}


x86 assembly (clang, -O0):
<build_path>:
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    $0x2f,%edx
call   1030 <concat@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<build_path>:
mov    $0x2f,%edx
jmp    1030 <concat@plt>

LLVM IR (-O0):
define i8* @build_path(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 i8* @concat(i8* %5, i8* %6, i8 signext 47)
ret i8* %7
}

LLVM IR (-O2):
define i8* @build_path(i8* %0, i8* %1) {
%3 = tail call i8* @concat(i8* %0, i8* %1, i8 signext 47)
ret i8* %3
}
/* Variables and functions */
int /*<<< orphan*/ L3();
int main() {
  L3();
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @L3()
ret i32 0
}
float callback3_float_float_float(float (*f)(float)) { return f(3.0); }


x86 assembly (clang, -O0):
<callback3_float_float_float>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movss  0xeec(%rip),%xmm0
call   *-0x8(%rbp)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<callback3_float_float_float>:
movss  0xef8(%rip),%xmm0
jmp    *%rdi

LLVM IR (-O0):
define float @callback3_float_float_float(float (float)* %0) {
%2 = alloca float (float)*
store float (float)* %0, float (float)** %2
%3 = load float (float)*, float (float)** %2
%4 = call float %3(float 3.000000e+00)
ret float %4
}

LLVM IR (-O2):
define float @callback3_float_float_float(float (float)* nocapture %0) {
%2 = tail call float %0(float 3.000000e+00)
ret float %2
}
/* Type definitions */
struct mm_array {
  int dummy;
};

/* Variables and functions */
int mm_array_resize(struct mm_array *, scalar_t__);
scalar_t__ mm_array_size(struct mm_array *);
int mm_array_extend(struct mm_array *mar, size_t count) {
  return mm_array_resize(mar, mm_array_size(mar) + count);
}


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

x86 assembly (clang, -O2):
<mm_array_extend>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %rdi,%r14
call   1040 <mm_array_size@plt>
add    %rax,%rbx
mov    %r14,%rdi
mov    %rbx,%rsi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <mm_array_resize@plt>

LLVM IR (-O0):
%struct.mm_array = type { i32 }
define i32 @mm_array_extend(%struct.mm_array* %0, i64 %1) {
%3 = alloca %struct.mm_array*
%4 = alloca i64
store %struct.mm_array* %0, %struct.mm_array** %3
store i64 %1, i64* %4
%5 = load %struct.mm_array*, %struct.mm_array** %3
%6 = load %struct.mm_array*, %struct.mm_array** %3
%7 = call i64 @mm_array_size(%struct.mm_array* %6)
%8 = load i64, i64* %4
%9 = add i64 %7, %8
%10 = call i32 @mm_array_resize(%struct.mm_array* %5, i64 %9)
ret i32 %10
}

LLVM IR (-O2):
%struct.mm_array = type { i32 }
define i32 @mm_array_extend(%struct.mm_array* %0, i64 %1) {
%3 = tail call i64 @mm_array_size(%struct.mm_array* %0)
%4 = add i64 %3, %1
%5 = tail call i32 @mm_array_resize(%struct.mm_array* %0, i64 %4)
ret i32 %5
}
void timer_stats_timer_clear_start_info(struct timer_list *timer) {}


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

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

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

LLVM IR (-O2):
%struct.timer_list = type opaque
define void @timer_stats_timer_clear_start_info(%struct.timer_list* nocapture %0) {
ret void
}
isatty(f) {
  char buf[128];
  if (gtty(f, buf) < 0)
    return 0;
  return 1;
}


x86 assembly (clang, -O0):
<isatty>:
push   %rbp
mov    %rsp,%rbp
sub    $0x90,%rsp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%edi
lea    -0x90(%rbp),%rsi
mov    $0x0,%al
call   1030 <gtty@plt>
cmp    $0x0,%eax
jge    1144 <isatty+0x34>
movl   $0x0,-0x4(%rbp)
jmp    114b <isatty+0x3b>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x90,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<isatty>:
sub    $0x88,%rsp
mov    %rsp,%rsi
xor    %eax,%eax
call   1030 <gtty@plt>
not    %eax
shr    $0x1f,%eax
add    $0x88,%rsp
ret

LLVM IR (-O0):
define i32 @isatty(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca [128 x i8]
store i32 %0, i32* %3
%5 = load i32, i32* %3
%6 = getelementptr inbounds [128 x i8], [128 x i8]* %4, i64 0, i64 0
%7 = call i32 (i32, i8*, ...) bitcast (i32 (...)* @gtty to i32 (i32, i8*, ...)*)(i32 %5, i8* %6)
%8 = icmp slt i32 %7, 0
br i1 %8, label %9, label %10
9: ; preds = %1
store i32 0, i32* %2
br label %11
10: ; preds = %1
store i32 1, i32* %2
br label %11
11: ; preds = %10, %9
%12 = load i32, i32* %2
ret i32 %12
}

LLVM IR (-O2):
define i32 @isatty(i32 %0) {
%2 = alloca [128 x i8]
%3 = getelementptr inbounds [128 x i8], [128 x i8]* %2, i64 0, i64 0
%4 = call i32 (i32, i8*, ...) bitcast (i32 (...)* @gtty to i32 (i32, i8*, ...)*)(i32 %0, i8* %3)
%5 = xor i32 %4, -1
%6 = lshr i32 %5, 31
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ do_PyThread_exit_thread(int);
void PyThread__exit_thread(void) { do_PyThread_exit_thread(1); }


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

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

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

LLVM IR (-O2):
define void @PyThread__exit_thread() {
%1 = tail call i32 @do_PyThread_exit_thread(i32 1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void print_msg() { printf("Hello world\n "); }


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

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

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

LLVM IR (-O2):
@.str = [14 x i8] c"Hello world\0A \00"
define void @print_msg() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef scalar_t__ uint16_t;

/* Variables and functions */
void volatile_fetch_sub_u16(uint16_t *dest, uint16_t val) {
  *((volatile uint16_t *)dest) -= val;
}


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

x86 assembly (clang, -O2):
<volatile_fetch_sub_u16>:
sub    %rsi,(%rdi)
ret

LLVM IR (-O0):
define void @volatile_fetch_sub_u16(i64* %0, i64 %1) {
%3 = alloca i64*
%4 = alloca i64
store i64* %0, i64** %3
store i64 %1, i64* %4
%5 = load i64, i64* %4
%6 = load i64*, i64** %3
%7 = load volatile i64, i64* %6
%8 = sub nsw i64 %7, %5
store volatile i64 %8, i64* %6
ret void
}

LLVM IR (-O2):
define void @volatile_fetch_sub_u16(i64* %0, i64 %1) {
%3 = load volatile i64, i64* %0
%4 = sub nsw i64 %3, %1
store volatile i64 %4, i64* %0
ret void
}
void port_lock_from_isr(void) {}


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

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

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

LLVM IR (-O2):
define void @port_lock_from_isr() {
ret void
}
long open(const char *filename, long flags, long mode) {
  long fd = 0;
  asm("movq $5,%%rax		\n\t"
      "movq %1,%%rbx	\n\t"
      "movq %2,%%rcx \n\t"
      "movq %3,%%rdx \n\t"
      "int $0x80  \n\t"
      "movq %%rax,%0 \n\t"
      : "=m"(fd)
      : "m"(filename), "m"(flags), "m"(mode));
  return fd;
}


x86 assembly (clang, -O0):
<open>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
movq   $0x0,-0x20(%rbp)
mov    $0x5,%rax
mov    -0x8(%rbp),%rbx
mov    -0x10(%rbp),%rcx
mov    -0x18(%rbp),%rdx
int    $0x80
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<open>:
mov    %rdi,-0x8(%rsp)
mov    %rsi,-0x10(%rsp)
mov    %rdx,-0x18(%rsp)
movq   $0x0,-0x20(%rsp)
mov    $0x5,%rax
mov    -0x8(%rsp),%rbx
mov    -0x10(%rsp),%rcx
mov    -0x18(%rsp),%rdx
int    $0x80
mov    %rax,-0x20(%rsp)
mov    -0x20(%rsp),%rax
ret

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

LLVM IR (-O2):
define i64 @open(i8* %0, i64 %1, i64 %2) {
%4 = alloca i8*
%5 = alloca i64
%6 = alloca i64
%7 = alloca i64
store i8* %0, i8** %4
store i64 %1, i64* %5
store i64 %2, i64* %6
%8 = bitcast i64* %7 to i8*
store i64 0, i64* %7
%9 = load i64, i64* %7
ret i64 %9
}
void kimage_file_post_load_cleanup(struct kimage *image) {}


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

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

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

LLVM IR (-O2):
%struct.kimage = type opaque
define void @kimage_file_post_load_cleanup(%struct.kimage* nocapture %0) {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ int64_t;

/* Variables and functions */
double stdlib_strided_dnansumkbn(int /*<<< orphan*/ const, double const *,
                                 int /*<<< orphan*/ const);
double stdlib_strided_dnansum(const int64_t N, const double *X,
                              const int64_t stride) {
  return stdlib_strided_dnansumkbn(N, X, stride);
}


x86 assembly (clang, -O0):
<stdlib_strided_dnansum>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
call   1030 <stdlib_strided_dnansumkbn@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<stdlib_strided_dnansum>:
jmp    1030 <stdlib_strided_dnansumkbn@plt>

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

LLVM IR (-O2):
define double @stdlib_strided_dnansum(i32 %0, double* %1, i32 %2) {
%4 = tail call double @stdlib_strided_dnansumkbn(i32 %0, double* %1, i32 %2)
ret double %4
}
__attribute__((always_)) void flush_tlb_single(unsigned long addr) {
  __asm__ __volatile__("invlpg (%0)" : : "r"(addr) : "memory");
}


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

x86 assembly (clang, -O2):
<flush_tlb_single>:
invlpg (%rdi)
ret

LLVM IR (-O0):
define void @flush_tlb_single(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
ret void
}

LLVM IR (-O2):
define void @flush_tlb_single(i64 %0) {
tail call void asm sideeffect "invlpg ($0)", "r,~{memory},~{dirflag},~{fpsr},~{flags}"(i64 %0)
ret void
}
/* Variables and functions */
scalar_t__ inc_addr(void *, int);
int rename(char *, char *);
int bad_rename(void *addr) {
  return rename((char *)addr, (char *)inc_addr(addr, 1));
}


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

x86 assembly (clang, -O2):
<bad_rename>:
push   %rbx
mov    %rdi,%rbx
mov    $0x1,%esi
call   1030 <inc_addr@plt>
mov    %rbx,%rdi
mov    %rax,%rsi
pop    %rbx
jmp    1040 <rename@plt>

LLVM IR (-O0):
define i32 @bad_rename(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = load i8*, i8** %2
%5 = call i64 @inc_addr(i8* %4, i32 1)
%6 = inttoptr i64 %5 to i8*
%7 = call i32 @rename(i8* %3, i8* %6)
ret i32 %7
}

LLVM IR (-O2):
define i32 @bad_rename(i8* %0) {
%2 = tail call i64 @inc_addr(i8* %0, i32 1)
%3 = inttoptr i64 %2 to i8*
%4 = tail call i32 @rename(i8* %0, i8* %3)
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ rm(char *);
int /*<<< orphan*/ sm(char *);
void decnrcm(int flag) {
  if (flag)
    sm("?42");
  else
    rm("?42");
}


x86 assembly (clang, -O0):
<decnrcm>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
je     1146 <decnrcm+0x26>
lea    0xec4(%rip),%rdi
call   1040 <sm@plt>
jmp    1152 <decnrcm+0x32>
lea    0xeb3(%rip),%rdi
call   1030 <rm@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<decnrcm>:
test   %edi,%edi
je     1130 <decnrcm+0x10>
lea    0xed5(%rip),%rdi
jmp    1040 <sm@plt>
lea    0xec9(%rip),%rdi
jmp    1030 <rm@plt>

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

LLVM IR (-O2):
@.str = [4 x i8] c"?42\00"
define void @decnrcm(i32 %0) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = tail call i32 @sm(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
br label %7
5: ; preds = %1
%6 = tail call i32 @rm(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
br label %7
7: ; preds = %5, %3
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ header;

/* Variables and functions */
int /*<<< orphan*/ kannotate_write(char *, int);
void gator_annotate_marker(void) {
  int header = 0x1c | (0x05 << 8);
  kannotate_write((char *)&header, sizeof(header));
}


x86 assembly (clang, -O0):
<gator_annotate_marker>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x51c,-0x4(%rbp)
lea    -0x4(%rbp),%rdi
mov    $0x4,%esi
call   1030 <kannotate_write@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gator_annotate_marker>:
push   %rax
movl   $0x51c,0x4(%rsp)
lea    0x4(%rsp),%rdi
mov    $0x4,%esi
call   1030 <kannotate_write@plt>
pop    %rax
ret

LLVM IR (-O0):
define void @gator_annotate_marker() {
%1 = alloca i32
store i32 1308, i32* %1
%2 = bitcast i32* %1 to i8*
%3 = call i32 @kannotate_write(i8* %2, i32 4)
ret void
}

LLVM IR (-O2):
define void @gator_annotate_marker() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
store i32 1308, i32* %1
%3 = call i32 @kannotate_write(i8* %2, i32 4)
ret void
}
int f(int a, int b) {
  int x = -a;
  int y = b - x;
  return y;
}


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
xor    %eax,%eax
sub    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
sub    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<f>:
lea    (%rdi,%rsi,1),%eax
ret

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

LLVM IR (-O2):
define i32 @f(i32 %0, i32 %1) {
%3 = add nsw i32 %1, %0
ret i32 %3
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int uint32_t;
typedef int /*<<< orphan*/ uint16_t;
typedef int /*<<< orphan*/ tmp;

/* Variables and functions */
int /*<<< orphan*/ ivory_serialize_pack_prim_2_be(int /*<<< orphan*/ *,
                                                  int /*<<< orphan*/ *);
int /*<<< orphan*/ memcpy(int /*<<< orphan*/ **, int /*<<< orphan*/ const *,
                          int);
void ivory_serialize_pack_uint16_be(uint8_t *dst, uint32_t offs,
                                    const uint16_t *src) {
  uint8_t tmp[2] = {0};
  memcpy(&tmp, src, sizeof(tmp));
  ivory_serialize_pack_prim_2_be(dst + offs, tmp);
}


x86 assembly (clang, -O0):
<ivory_serialize_pack_uint16_be>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
lea    -0x20(%rbp),%rdi
xor    %esi,%esi
mov    $0x8,%edx
call   1030 <memset@plt>
lea    -0x20(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    $0x8,%edx
call   1040 <memcpy@plt>
mov    -0x8(%rbp),%rdi
movslq -0xc(%rbp),%rax
shl    $0x2,%rax
add    %rax,%rdi
lea    -0x20(%rbp),%rsi
call   1050 <ivory_serialize_pack_prim_2_be@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ivory_serialize_pack_uint16_be>:
push   %r15
push   %r14
push   %rbx
sub    $0x10,%rsp
mov    %esi,%ebx
mov    %rdi,%r14
movq   $0x0,0x8(%rsp)
lea    0x8(%rsp),%r15
mov    %r15,%rdi
mov    %rdx,%rsi
mov    $0x8,%edx
call   1030 <memcpy@plt>
movslq %ebx,%rax
lea    (%r14,%rax,4),%rdi
mov    %r15,%rsi
call   1040 <ivory_serialize_pack_prim_2_be@plt>
add    $0x10,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define void @ivory_serialize_pack_uint16_be(i32* %0, i32 %1, i32* %2) {
%4 = alloca i32*
%5 = alloca i32
%6 = alloca i32*
%7 = alloca [2 x i32]
store i32* %0, i32** %4
store i32 %1, i32* %5
store i32* %2, i32** %6
%8 = bitcast [2 x i32]* %7 to i8*
%9 = bitcast [2 x i32]* %7 to i32**
%10 = load i32*, i32** %6
%11 = call i32 @memcpy(i32** %9, i32* %10, i32 8)
%12 = load i32*, i32** %4
%13 = load i32, i32* %5
%14 = sext i32 %13 to i64
%15 = getelementptr inbounds i32, i32* %12, i64 %14
%16 = getelementptr inbounds [2 x i32], [2 x i32]* %7, i64 0, i64 0
%17 = call i32 @ivory_serialize_pack_prim_2_be(i32* %15, i32* %16)
ret void
}

LLVM IR (-O2):
define void @ivory_serialize_pack_uint16_be(i32* %0, i32 %1, i32* %2) {
%4 = alloca i64
%5 = bitcast i64* %4 to i8*
store i64 0, i64* %4
%6 = bitcast i64* %4 to i32**
%7 = call i32 @memcpy(i32** %6, i32* %2, i32 8)
%8 = sext i32 %1 to i64
%9 = getelementptr inbounds i32, i32* %0, i64 %8
%10 = bitcast i64* %4 to i32*
%11 = call i32 @ivory_serialize_pack_prim_2_be(i32* %9, i32* %10)
ret void
}
void sigupdate(int sig, void *arg) {
  int *var = (int *)arg;
  *var = 1;
}


x86 assembly (clang, -O0):
<sigupdate>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
movl   $0x1,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<sigupdate>:
movl   $0x1,(%rsi)
ret

LLVM IR (-O0):
define void @sigupdate(i32 %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i32*
store i32 %0, i32* %3
store i8* %1, i8** %4
%6 = load i8*, i8** %4
%7 = bitcast i8* %6 to i32*
store i32* %7, i32** %5
%8 = load i32*, i32** %5
store i32 1, i32* %8
ret void
}

LLVM IR (-O2):
define void @sigupdate(i32 %0, i8* nocapture writeonly %1) {
%3 = bitcast i8* %1 to i32*
store i32 1, i32* %3
ret void
}
void dd_pbl_ios_iap_restore() {}


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

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

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

LLVM IR (-O2):
define void @dd_pbl_ios_iap_restore() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ strlen(char *);
int /*<<< orphan*/ write(int, char *, int /*<<< orphan*/);
int a() {
  ;
  write(1, "a\n", strlen("a\n"));
  ;
}


x86 assembly (clang, -O0):
<a>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xed1(%rip),%rdi
call   1040 <strlen@plt>
mov    %eax,%edx
mov    $0x1,%edi
lea    0xebe(%rip),%rsi
call   1030 <write@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<a>:
push   %rbx
lea    0xed8(%rip),%rbx
mov    %rbx,%rdi
call   1040 <strlen@plt>
mov    $0x1,%edi
mov    %rbx,%rsi
mov    %eax,%edx
pop    %rbx
jmp    1030 <write@plt>

LLVM IR (-O0):
@.str = [3 x i8] c"a\0A\00"
define i32 @a() {
%1 = alloca i32
%2 = call i32 @strlen(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @write(i32 1, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %2)
%4 = load i32, i32* %1
ret i32 %4
}

LLVM IR (-O2):
@.str = [3 x i8] c"a\0A\00"
define i32 @a() {
%1 = tail call i32 @strlen(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @write(i32 1, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ stderr;
void usage(char *proc) {
  fprintf(stderr, "usage: %s [-d /dev/name] [-v] \"0-8...\"\n", proc);
}


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

x86 assembly (clang, -O2):
<usage>:
mov    %rdi,%rdx
mov    0x2ec6(%rip),%rax
mov    (%rax),%edi
lea    0xedd(%rip),%rsi
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [40 x i8] c"usage: %s [-d /dev/name] [-v] \220-8...\22\0A\00"
define void @usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = load i8*, i8** %2
%5 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str, i64 0, i64 0), i8* %4)
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [40 x i8] c"usage: %s [-d /dev/name] [-v] \220-8...\22\0A\00"
define void @usage(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
/* Type definitions */
struct comm {
  int dummy;
};

/* Variables and functions */
void comm_bcast(const struct comm *c, void *p, size_t n, unsigned int root) {}


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

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

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

LLVM IR (-O2):
%struct.comm = type { i32 }
define void @comm_bcast(%struct.comm* nocapture %0, i8* nocapture %1, i64 %2, i32 %3) {
ret void
}
void f_incomplete() {
  struct S5;
  struct S5 {
    char j;
  };
  if (1) {
    struct S5;
    struct S5 {
      char i;
      char j;
    };
    if (1) {
      struct S5;
    }
  }
}


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

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

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

LLVM IR (-O2):
define void @f_incomplete() {
ret void
}
int d_gt_rr1(double a1, double a2) { return (((a1) > (a2))); }


x86 assembly (clang, -O0):
<d_gt_rr1>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
ucomisd -0x10(%rbp),%xmm0
seta   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<d_gt_rr1>:
xor    %eax,%eax
ucomisd %xmm1,%xmm0
seta   %al
ret

LLVM IR (-O0):
define i32 @d_gt_rr1(double %0, double %1) {
%3 = alloca double
%4 = alloca double
store double %0, double* %3
store double %1, double* %4
%5 = load double, double* %3
%6 = load double, double* %4
%7 = fcmp ogt double %5, %6
%8 = zext i1 %7 to i32
ret i32 %8
}

LLVM IR (-O2):
define i32 @d_gt_rr1(double %0, double %1) {
%3 = fcmp ogt double %0, %1
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
uint32_t bswap32(uint32_t v) {
  return ((v & 0xff000000) >> 24) | ((v & 0x00ff0000) >> 8) |
         ((v & 0x0000ff00) << 8) | ((v & 0x000000ff) << 24);
}


x86 assembly (clang, -O0):
<bswap32>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
and    $0xff000000,%eax
shr    $0x18,%eax
mov    -0x4(%rbp),%ecx
and    $0xff0000,%ecx
sar    $0x8,%ecx
or     %ecx,%eax
mov    -0x4(%rbp),%ecx
and    $0xff00,%ecx
shl    $0x8,%ecx
or     %ecx,%eax
mov    -0x4(%rbp),%ecx
and    $0xff,%ecx
shl    $0x18,%ecx
or     %ecx,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @bswap32(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = and i32 %3, -16777216
%5 = lshr i32 %4, 24
%6 = load i32, i32* %2
%7 = and i32 %6, 16711680
%8 = ashr i32 %7, 8
%9 = or i32 %5, %8
%10 = load i32, i32* %2
%11 = and i32 %10, 65280
%12 = shl i32 %11, 8
%13 = or i32 %9, %12
%14 = load i32, i32* %2
%15 = and i32 %14, 255
%16 = shl i32 %15, 24
%17 = or i32 %13, %16
ret i32 %17
}

LLVM IR (-O2):
define i32 @bswap32(i32 %0) {
%2 = tail call i32 @llvm.bswap.i32(i32 %0)
ret i32 %2
}
void foo471() {}


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

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

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

LLVM IR (-O2):
define void @foo471() {
ret void
}
/* Variables and functions */
int _ada_use_c2phc4c(int, int *, int *, double *, int /*<<< orphan*/);
int clear_multprec_data(void) {
  int *a, *b, fail;
  double *c;
  fail = _ada_use_c2phc4c(498, a, b, c, 0);
  return fail;
}


x86 assembly (clang, -O0):
<clear_multprec_data>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    $0x1f2,%edi
xor    %r8d,%r8d
call   1030 <_ada_use_c2phc4c@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<clear_multprec_data>:
mov    $0x1f2,%edi
xor    %r8d,%r8d
jmp    1030 <_ada_use_c2phc4c@plt>

LLVM IR (-O0):
define i32 @clear_multprec_data() {
%1 = alloca i32*
%2 = alloca i32*
%3 = alloca i32
%4 = alloca double*
%5 = load i32*, i32** %1
%6 = load i32*, i32** %2
%7 = load double*, double** %4
%8 = call i32 @_ada_use_c2phc4c(i32 498, i32* %5, i32* %6, double* %7, i32 0)
store i32 %8, i32* %3
%9 = load i32, i32* %3
ret i32 %9
}

LLVM IR (-O2):
define i32 @clear_multprec_data() {
%1 = tail call i32 @_ada_use_c2phc4c(i32 498, i32* undef, i32* undef, double* undef, i32 0)
ret i32 %1
}
void callee_1_1_1() {}


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

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

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

LLVM IR (-O2):
define void @callee_1_1_1() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int, int);
int main(void) {
  int value1, value2, sum;
  value1 = 50;
  value2 = 25;
  sum = value1 + value2;
  printf("The sum of %i and %i is %i\n", value1, value2, sum);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x32,-0x8(%rbp)
movl   $0x19,-0xc(%rbp)
mov    -0x8(%rbp),%eax
add    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
mov    -0x10(%rbp),%ecx
lea    0xeba(%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
mov    $0x32,%esi
mov    $0x19,%edx
mov    $0x4b,%ecx
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [28 x i8] c"The sum of %i and %i is %i\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 0, i32* %1
store i32 50, i32* %2
store i32 25, i32* %3
%5 = load i32, i32* %2
%6 = load i32, i32* %3
%7 = add nsw i32 %5, %6
store i32 %7, i32* %4
%8 = load i32, i32* %2
%9 = load i32, i32* %3
%10 = load i32, i32* %4
%11 = call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0), i32 %8, i32 %9, i32 %10)
ret i32 0
}

LLVM IR (-O2):
@.str = [28 x i8] c"The sum of %i and %i is %i\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0), i32 50, i32 25, i32 75)
ret i32 0
}
void TransposeWx8_Any_SSSE3() {}


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

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

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

LLVM IR (-O2):
define void @TransposeWx8_Any_SSSE3() {
ret void
}
double initial_anticausal_coefficient(double c[], long data_length, double z) {
  return ((z / (z * z - 1.0)) *
          (z * c[data_length - 2L] + c[data_length - 1L]));
}


x86 assembly (clang, -O0):
<initial_anticausal_coefficient>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm1
movsd  -0x18(%rbp),%xmm2
mulsd  %xmm2,%xmm1
movsd  0xed4(%rip),%xmm2
addsd  %xmm2,%xmm1
divsd  %xmm1,%xmm0
movsd  -0x18(%rbp),%xmm1
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%rcx
sub    $0x2,%rcx
movsd  (%rax,%rcx,8),%xmm3
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%rcx
sub    $0x1,%rcx
movsd  (%rax,%rcx,8),%xmm2
mulsd  %xmm3,%xmm1
addsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<initial_anticausal_coefficient>:
movapd %xmm0,%xmm1
mulsd  %xmm0,%xmm1
addsd  0xef0(%rip),%xmm1
movapd %xmm0,%xmm2
mulsd  -0x10(%rdi,%rsi,8),%xmm0
divsd  %xmm1,%xmm2
addsd  -0x8(%rdi,%rsi,8),%xmm0
mulsd  %xmm2,%xmm0
ret

LLVM IR (-O0):
define double @initial_anticausal_coefficient(double* %0, i64 %1, double %2) {
%4 = alloca double*
%5 = alloca i64
%6 = alloca double
store double* %0, double** %4
store i64 %1, i64* %5
store double %2, double* %6
%7 = load double, double* %6
%8 = load double, double* %6
%9 = load double, double* %6
%10 = call double @llvm.fmuladd.f64(double %8, double %9, double -1.000000e+00)
%11 = fdiv double %7, %10
%12 = load double, double* %6
%13 = load double*, double** %4
%14 = load i64, i64* %5
%15 = sub nsw i64 %14, 2
%16 = getelementptr inbounds double, double* %13, i64 %15
%17 = load double, double* %16
%18 = load double*, double** %4
%19 = load i64, i64* %5
%20 = sub nsw i64 %19, 1
%21 = getelementptr inbounds double, double* %18, i64 %20
%22 = load double, double* %21
%23 = call double @llvm.fmuladd.f64(double %12, double %17, double %22)
%24 = fmul double %11, %23
ret double %24
}

LLVM IR (-O2):
define double @initial_anticausal_coefficient(double* nocapture %0, i64 %1, double %2) {
%4 = tail call double @llvm.fmuladd.f64(double %2, double %2, double -1.000000e+00)
%5 = fdiv double %2, %4
%6 = add nsw i64 %1, -2
%7 = getelementptr inbounds double, double* %0, i64 %6
%8 = load double, double* %7
%9 = add nsw i64 %1, -1
%10 = getelementptr inbounds double, double* %0, i64 %9
%11 = load double, double* %10
%12 = tail call double @llvm.fmuladd.f64(double %2, double %8, double %11)
%13 = fmul double %5, %12
ret double %13
}
void fun(int i) {}


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

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

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

LLVM IR (-O2):
define void @fun(i32 %0) {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ time_t;
struct tm {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ localtime_r(int /*<<< orphan*/ *, struct tm *);
int /*<<< orphan*/ strftime(char *, size_t, char *, struct tm *);
int /*<<< orphan*/ time(int /*<<< orphan*/ *);
void zc_time(char *time_str, size_t time_str_size) {
  time_t tt;
  struct tm local_time;
  time(&tt);
  localtime_r(&tt, &local_time);
  strftime(time_str, time_str_size, "%m-%d %T", &local_time);
  return;
}


x86 assembly (clang, -O0):
<zc_time>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    -0x14(%rbp),%rdi
call   1040 <time@plt>
lea    -0x14(%rbp),%rdi
lea    -0x18(%rbp),%rsi
call   1030 <localtime_r@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
lea    0xe9b(%rip),%rdx
lea    -0x18(%rbp),%rcx
call   1050 <strftime@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<zc_time>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
lea    0x4(%rsp),%r15
mov    %r15,%rdi
call   1040 <time@plt>
mov    %rsp,%r12
mov    %r15,%rdi
mov    %r12,%rsi
call   1030 <localtime_r@plt>
lea    0xea0(%rip),%rdx
mov    %rbx,%rdi
mov    %r14,%rsi
mov    %r12,%rcx
call   1050 <strftime@plt>
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
%struct.tm = type { i32 }
@.str = [9 x i8] c"%m-%d %T\00"
define void @zc_time(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
%5 = alloca i32
%6 = alloca %struct.tm
store i8* %0, i8** %3
store i64 %1, i64* %4
%7 = call i32 @time(i32* %5)
%8 = call i32 @localtime_r(i32* %5, %struct.tm* %6)
%9 = load i8*, i8** %3
%10 = load i64, i64* %4
%11 = call i32 @strftime(i8* %9, i64 %10, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), %struct.tm* %6)
ret void
}

LLVM IR (-O2):
%struct.tm = type { i32 }
@.str = [9 x i8] c"%m-%d %T\00"
define void @zc_time(i8* %0, i64 %1) {
%3 = alloca i32
%4 = alloca %struct.tm
%5 = bitcast i32* %3 to i8*
%6 = bitcast %struct.tm* %4 to i8*
%7 = call i32 @time(i32* %3)
%8 = call i32 @localtime_r(i32* %3, %struct.tm* %4)
%9 = call i32 @strftime(i8* %0, i64 %1, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), %struct.tm* %4)
ret void
}
void rho_ruby_raise_argerror(const char *fmt, ...) {}


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

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

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

LLVM IR (-O2):
define void @rho_ruby_raise_argerror(i8* nocapture %0, ...) {
ret void
}
double ets2ts(tsec)
double tsec;
{
  double dj, dj0, dt;
  dj0 = ts2jd(tsec);
  dt = utdt(dj0);
  dj = dj0 - (dt / 86400.0);
  dt = utdt(dj);
  return (tsec - dt);
}


x86 assembly (clang, -O0):
<ets2ts>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
mov    $0x1,%al
call   1030 <ts2jd@plt>
cvtsi2sd %eax,%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
mov    $0x1,%al
call   1040 <utdt@plt>
cvtsi2sd %eax,%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x18(%rbp),%xmm0
movsd  -0x20(%rbp),%xmm1
movsd  0xe97(%rip),%xmm2
divsd  %xmm2,%xmm1
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
mov    $0x1,%al
call   1040 <utdt@plt>
cvtsi2sd %eax,%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x8(%rbp),%xmm0
subsd  -0x20(%rbp),%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ets2ts>:
sub    $0x18,%rsp
movsd  %xmm0,0x10(%rsp)
mov    $0x1,%al
call   1030 <ts2jd@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
movsd  %xmm0,0x8(%rsp)
mov    $0x1,%al
call   1040 <utdt@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
divsd  0xeac(%rip),%xmm0
addsd  0x8(%rsp),%xmm0
mov    $0x1,%al
call   1040 <utdt@plt>
cvtsi2sd %eax,%xmm1
movsd  0x10(%rsp),%xmm0
subsd  %xmm1,%xmm0
add    $0x18,%rsp
ret

LLVM IR (-O0):
define double @ets2ts(double %0) {
%2 = alloca double
%3 = alloca double
%4 = alloca double
%5 = alloca double
store double %0, double* %2
%6 = load double, double* %2
%7 = call i32 (double, ...) bitcast (i32 (...)* @ts2jd to i32 (double, ...)*)(double %6)
%8 = sitofp i32 %7 to double
store double %8, double* %4
%9 = load double, double* %4
%10 = call i32 (double, ...) bitcast (i32 (...)* @utdt to i32 (double, ...)*)(double %9)
%11 = sitofp i32 %10 to double
store double %11, double* %5
%12 = load double, double* %4
%13 = load double, double* %5
%14 = fdiv double %13, 8.640000e+04
%15 = fsub double %12, %14
store double %15, double* %3
%16 = load double, double* %3
%17 = call i32 (double, ...) bitcast (i32 (...)* @utdt to i32 (double, ...)*)(double %16)
%18 = sitofp i32 %17 to double
store double %18, double* %5
%19 = load double, double* %2
%20 = load double, double* %5
%21 = fsub double %19, %20
ret double %21
}

LLVM IR (-O2):
define double @ets2ts(double %0) {
%2 = tail call i32 (double, ...) bitcast (i32 (...)* @ts2jd to i32 (double, ...)*)(double %0)
%3 = sitofp i32 %2 to double
%4 = tail call i32 (double, ...) bitcast (i32 (...)* @utdt to i32 (double, ...)*)(double %3)
%5 = sitofp i32 %4 to double
%6 = fdiv double %5, 8.640000e+04
%7 = fsub double %3, %6
%8 = tail call i32 (double, ...) bitcast (i32 (...)* @utdt to i32 (double, ...)*)(double %7)
%9 = sitofp i32 %8 to double
%10 = fsub double %0, %9
ret double %10
}