xunge/DecIR huggingface dataset:
void init(int argc, char *argv[]) {
  {
    extern void input_init(int, char *[]);
    input_init(argc, argv);
  }
  {
    extern void main_init(int, char *[]);
    main_init(argc, argv);
  }
  {
    extern void prof_init(int, char *[]);
    prof_init(argc, argv);
  }
  {
    extern void trace_init(int, char *[]);
    trace_init(argc, argv);
  }
  {
    extern void type_init(int, char *[]);
    type_init(argc, argv);
  }
  {
    extern void x86linux_init(int, char *[]);
    x86linux_init(argc, argv);
  }
  {
    extern void zstab_init(int, char *[]);
    zstab_init(argc, argv);
  }
}


x86 assembly (clang, -O0):
<init>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1080 <input_init@plt>
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1040 <main_init@plt>
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1050 <prof_init@plt>
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1070 <trace_init@plt>
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1060 <type_init@plt>
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1090 <x86linux_init@plt>
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1030 <zstab_init@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<init>:
push   %rbp
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %edi,%ebp
call   1080 <input_init@plt>
mov    %ebp,%edi
mov    %rbx,%rsi
call   1040 <main_init@plt>
mov    %ebp,%edi
mov    %rbx,%rsi
call   1050 <prof_init@plt>
mov    %ebp,%edi
mov    %rbx,%rsi
call   1070 <trace_init@plt>
mov    %ebp,%edi
mov    %rbx,%rsi
call   1060 <type_init@plt>
mov    %ebp,%edi
mov    %rbx,%rsi
call   1090 <x86linux_init@plt>
mov    %ebp,%edi
mov    %rbx,%rsi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <zstab_init@plt>

LLVM IR (-O0):
define void @init(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
store i32 %0, i32* %3
store i8** %1, i8*** %4
%5 = load i32, i32* %3
%6 = load i8**, i8*** %4
%7 = load i32, i32* %3
%8 = load i8**, i8*** %4
%9 = load i32, i32* %3
%10 = load i8**, i8*** %4
%11 = load i32, i32* %3
%12 = load i8**, i8*** %4
%13 = load i32, i32* %3
%14 = load i8**, i8*** %4
%15 = load i32, i32* %3
%16 = load i8**, i8*** %4
%17 = load i32, i32* %3
%18 = load i8**, i8*** %4
ret void
}

LLVM IR (-O2):
define void @init(i32 %0, i8** %1) {
tail call void @input_init(i32 %0, i8** %1)
tail call void @main_init(i32 %0, i8** %1)
tail call void @prof_init(i32 %0, i8** %1)
tail call void @trace_init(i32 %0, i8** %1)
tail call void @type_init(i32 %0, i8** %1)
tail call void @x86linux_init(i32 %0, i8** %1)
tail call void @zstab_init(i32 %0, i8** %1)
ret void
}
GET_CHR(c) int *c;
{
  register int d;
  d = getchar();
  *c = d;
  while (d != '\n') {
    d = getchar();
  }
}


x86 assembly (clang, -O0):
<GET_CHR>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    $0x0,%al
call   1030 <getchar@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
cmpl   $0xa,-0x14(%rbp)
je     1148 <GET_CHR+0x38>
mov    $0x0,%al
call   1030 <getchar@plt>
mov    %eax,-0x14(%rbp)
jmp    112f <GET_CHR+0x1f>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<GET_CHR>:
push   %rbx
mov    %rdi,%rbx
xor    %eax,%eax
call   1030 <getchar@plt>
mov    %eax,(%rbx)
cmp    $0xa,%eax
je     113c <GET_CHR+0x2c>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
xor    %eax,%eax
call   1030 <getchar@plt>
cmp    $0xa,%eax
jne    1130 <GET_CHR+0x20>
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @GET_CHR(i32* nocapture writeonly %0) {
%2 = tail call i32 (...) @getchar()
store i32 %2, i32* %0
%3 = icmp eq i32 %2, 10
br i1 %3, label %7, label %4
4: ; preds = %1, %4
%5 = tail call i32 (...) @getchar()
%6 = icmp eq i32 %5, 10
br i1 %6, label %7, label %4
7: ; preds = %4, %1
ret i32 undef
}
void gtk_window_set_default_icon_name() {}


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

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

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

LLVM IR (-O2):
define void @gtk_window_set_default_icon_name() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ memcpy(void *, void *, int);
void array_copy(double *dst, double *src, int n) {
  memcpy((void *)dst, (void *)src, n * sizeof(double));
}


x86 assembly (clang, -O0):
<array_copy>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
movslq -0x14(%rbp),%rax
shl    $0x3,%rax
mov    %eax,%edx
call   1030 <memcpy@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<array_copy>:
shl    $0x3,%edx
jmp    1030 <memcpy@plt>

LLVM IR (-O0):
define void @array_copy(double* %0, double* %1, i32 %2) {
%4 = alloca double*
%5 = alloca double*
%6 = alloca i32
store double* %0, double** %4
store double* %1, double** %5
store i32 %2, i32* %6
%7 = load double*, double** %4
%8 = bitcast double* %7 to i8*
%9 = load double*, double** %5
%10 = bitcast double* %9 to i8*
%11 = load i32, i32* %6
%12 = sext i32 %11 to i64
%13 = mul i64 %12, 8
%14 = trunc i64 %13 to i32
%15 = call i32 @memcpy(i8* %8, i8* %10, i32 %14)
ret void
}

LLVM IR (-O2):
define void @array_copy(double* %0, double* %1, i32 %2) {
%4 = bitcast double* %0 to i8*
%5 = bitcast double* %1 to i8*
%6 = shl i32 %2, 3
%7 = tail call i32 @memcpy(i8* %4, i8* %5, i32 %6)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ DecodeDD_xxxxdddxssxxxrrr();
int /*<<< orphan*/ DoBinOpAddX(int /*<<< orphan*/);
void DoCodeAddXd(void) { DoBinOpAddX(DecodeDD_xxxxdddxssxxxrrr()); }


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

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

LLVM IR (-O0):
define void @DoCodeAddXd() {
%1 = call i32 (...) @DecodeDD_xxxxdddxssxxxrrr()
%2 = call i32 @DoBinOpAddX(i32 %1)
ret void
}

LLVM IR (-O2):
define void @DoCodeAddXd() {
%1 = tail call i32 (...) @DecodeDD_xxxxdddxssxxxrrr()
%2 = tail call i32 @DoBinOpAddX(i32 %1)
ret void
}
void swap(int *arr, int a, int b) {
  int temp = arr[a];
  arr[a] = arr[b];
  arr[b] = temp;
}


x86 assembly (clang, -O0):
<swap>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
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>:
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** %4
%9 = load i32, i32* %5
%10 = sext i32 %9 to i64
%11 = getelementptr inbounds i32, i32* %8, i64 %10
%12 = load i32, i32* %11
store i32 %12, i32* %7
%13 = load i32*, i32** %4
%14 = load i32, i32* %6
%15 = sext i32 %14 to i64
%16 = getelementptr inbounds i32, i32* %13, i64 %15
%17 = load i32, i32* %16
%18 = load i32*, i32** %4
%19 = load i32, i32* %5
%20 = sext i32 %19 to i64
%21 = getelementptr inbounds i32, i32* %18, i64 %20
store i32 %17, i32* %21
%22 = load i32, i32* %7
%23 = load i32*, i32** %4
%24 = load i32, i32* %6
%25 = sext i32 %24 to i64
%26 = getelementptr inbounds i32, i32* %23, i64 %25
store i32 %22, i32* %26
ret void
}

LLVM IR (-O2):
define void @swap(i32* nocapture %0, i32 %1, i32 %2) {
%4 = sext i32 %1 to i64
%5 = getelementptr inbounds i32, i32* %0, i64 %4
%6 = load i32, i32* %5
%7 = sext i32 %2 to i64
%8 = getelementptr inbounds i32, i32* %0, i64 %7
%9 = load i32, i32* %8
store i32 %9, i32* %5
store i32 %6, i32* %8
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main() {
  printf("Open Source SW Project\n");
  printf("First GitHub Tranning\n");
  printf("Hello OSSW\n");
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [24 x i8] c"Open Source SW Project\0A\00"
@.str.1 = [23 x i8] c"First GitHub Tranning\0A\00"
@.str.2 = [12 x i8] c"Hello OSSW\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.1, i64 0, i64 0))
%4 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.2, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [23 x i8] c"Open Source SW Project\00"
@str.3 = [22 x i8] c"First GitHub Tranning\00"
@str.4 = [11 x i8] c"Hello OSSW\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @str.3, i64 0, i64 0))
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @str.4, i64 0, i64 0))
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ int64_t;

/* Variables and functions */
double sqrt(int /*<<< orphan*/);
int /*<<< orphan*/ stdlib_strided_dvarianceyc(int /*<<< orphan*/ const,
                                              double const, double const *,
                                              int /*<<< orphan*/ const);
double stdlib_strided_dstdevyc(const int64_t N, const double correction,
                               const double *X, const int64_t stride) {
  return sqrt(stdlib_strided_dvarianceyc(N, correction, X, stride));
}


x86 assembly (clang, -O0):
<stdlib_strided_dstdevyc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
movsd  %xmm0,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %edx,-0x1c(%rbp)
mov    -0x4(%rbp),%edi
movsd  -0x10(%rbp),%xmm0
mov    -0x18(%rbp),%rsi
mov    -0x1c(%rbp),%edx
call   1040 <stdlib_strided_dvarianceyc@plt>
mov    %eax,%edi
call   1030 <sqrt@plt>
add    $0x20,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define double @stdlib_strided_dstdevyc(i32 %0, double %1, double* %2, i32 %3) {
%5 = alloca i32
%6 = alloca double
%7 = alloca double*
%8 = alloca i32
store i32 %0, i32* %5
store double %1, double* %6
store double* %2, double** %7
store i32 %3, i32* %8
%9 = load i32, i32* %5
%10 = load double, double* %6
%11 = load double*, double** %7
%12 = load i32, i32* %8
%13 = call i32 @stdlib_strided_dvarianceyc(i32 %9, double %10, double* %11, i32 %12)
%14 = call double @sqrt(i32 %13)
ret double %14
}

LLVM IR (-O2):
define double @stdlib_strided_dstdevyc(i32 %0, double %1, double* %2, i32 %3) {
%5 = tail call i32 @stdlib_strided_dvarianceyc(i32 %0, double %1, double* %2, i32 %3)
%6 = tail call double @sqrt(i32 %5)
ret double %6
}
/* Type definitions */
struct thread_map {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ free(struct thread_map *);
void thread_map__delete(struct thread_map *threads) { free(threads); }


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

x86 assembly (clang, -O2):
<thread_map__delete>:
jmp    1030 <free@plt>

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

LLVM IR (-O2):
%struct.thread_map = type { i32 }
define void @thread_map__delete(%struct.thread_map* nocapture %0) {
%2 = tail call i32 @free(%struct.thread_map* %0)
ret void
}
/* Type definitions */
struct pollfd {
  int fd;
  int /*<<< orphan*/ events;
};

/* Variables and functions */
int /*<<< orphan*/ POLLIN;
int /*<<< orphan*/ poll(struct pollfd *, int, int);
void sys_msleep(int msec) {
  struct pollfd fds[1];
  fds[0].fd = -1;
  fds[0].events = POLLIN;
  poll(fds, 1, msec);
}


x86 assembly (clang, -O0):
<sys_msleep>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movl   $0xffffffff,-0x10(%rbp)
mov    0x2ebf(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0xc(%rbp)
lea    -0x10(%rbp),%rdi
mov    -0x4(%rbp),%edx
mov    $0x1,%esi
call   1030 <poll@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sys_msleep>:
push   %rax
mov    %edi,%edx
movl   $0xffffffff,(%rsp)
mov    0x2ec7(%rip),%rax
mov    (%rax),%eax
mov    %eax,0x4(%rsp)
mov    %rsp,%rdi
mov    $0x1,%esi
call   1030 <poll@plt>
pop    %rax
ret

LLVM IR (-O0):
%struct.pollfd = type { i32, i32 }
@POLLIN = global i32 0
define void @sys_msleep(i32 %0) {
%2 = alloca i32
%3 = alloca [1 x %struct.pollfd]
store i32 %0, i32* %2
%4 = getelementptr inbounds [1 x %struct.pollfd], [1 x %struct.pollfd]* %3, i64 0, i64 0
%5 = getelementptr inbounds %struct.pollfd, %struct.pollfd* %4, i32 0, i32 0
store i32 -1, i32* %5
%6 = load i32, i32* @POLLIN
%7 = getelementptr inbounds [1 x %struct.pollfd], [1 x %struct.pollfd]* %3, i64 0, i64 0
%8 = getelementptr inbounds %struct.pollfd, %struct.pollfd* %7, i32 0, i32 1
store i32 %6, i32* %8
%9 = getelementptr inbounds [1 x %struct.pollfd], [1 x %struct.pollfd]* %3, i64 0, i64 0
%10 = load i32, i32* %2
%11 = call i32 @poll(%struct.pollfd* %9, i32 1, i32 %10)
ret void
}

LLVM IR (-O2):
%struct.pollfd = type { i32, i32 }
@POLLIN = global i32 0
define void @sys_msleep(i32 %0) {
%2 = alloca [1 x %struct.pollfd]
%3 = bitcast [1 x %struct.pollfd]* %2 to i8*
%4 = getelementptr inbounds [1 x %struct.pollfd], [1 x %struct.pollfd]* %2, i64 0, i64 0
%5 = getelementptr inbounds [1 x %struct.pollfd], [1 x %struct.pollfd]* %2, i64 0, i64 0, i32 0
store i32 -1, i32* %5
%6 = load i32, i32* @POLLIN
%7 = getelementptr inbounds [1 x %struct.pollfd], [1 x %struct.pollfd]* %2, i64 0, i64 0, i32 1
store i32 %6, i32* %7
%8 = call i32 @poll(%struct.pollfd* %4, i32 1, i32 %0)
ret void
}
/* Variables and functions */
scalar_t__ __infer_nondet_int();
int /*<<< orphan*/ nop();
void FN_unreachable_statement_break_bad() {
  while (__infer_nondet_int()) {
    if (__infer_nondet_int()) {
      break;
      nop();
    }
  }
}


x86 assembly (clang, -O0):
<FN_unreachable_statement_break_bad>:
push   %rbp
mov    %rsp,%rbp
jmp    1119 <FN_unreachable_statement_break_bad+0x9>
mov    $0x0,%al
call   1030 <__infer_nondet_int@plt>
cmp    $0x0,%rax
je     1145 <FN_unreachable_statement_break_bad+0x35>
mov    $0x0,%al
call   1030 <__infer_nondet_int@plt>
cmp    $0x0,%rax
je     1140 <FN_unreachable_statement_break_bad+0x30>
jmp    1145 <FN_unreachable_statement_break_bad+0x35>
jmp    1119 <FN_unreachable_statement_break_bad+0x9>
pop    %rbp
ret

x86 assembly (clang, -O2):
<FN_unreachable_statement_break_bad>:
push   %rax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1030 <__infer_nondet_int@plt>
test   %rax,%rax
je     1138 <FN_unreachable_statement_break_bad+0x28>
xor    %eax,%eax
call   1030 <__infer_nondet_int@plt>
test   %rax,%rax
je     1120 <FN_unreachable_statement_break_bad+0x10>
pop    %rax
ret

LLVM IR (-O0):
define void @FN_unreachable_statement_break_bad() {
br label %1
1: ; preds = %8, %0
%2 = call i64 (...) @__infer_nondet_int()
%3 = icmp ne i64 %2, 0
br i1 %3, label %4, label %9
4: ; preds = %1
%5 = call i64 (...) @__infer_nondet_int()
%6 = icmp ne i64 %5, 0
br i1 %6, label %7, label %8
7: ; preds = %4
br label %9
8: ; preds = %4
br label %1
9: ; preds = %7, %1
ret void
}

LLVM IR (-O2):
define void @FN_unreachable_statement_break_bad() {
br label %1
1: ; preds = %4, %0
%2 = tail call i64 (...) @__infer_nondet_int()
%3 = icmp eq i64 %2, 0
br i1 %3, label %7, label %4
4: ; preds = %1
%5 = tail call i64 (...) @__infer_nondet_int()
%6 = icmp eq i64 %5, 0
br i1 %6, label %1, label %7
7: ; preds = %4, %1
ret void
}
/* Variables and functions */
int genrand_int32();
int mtrand() { return genrand_int32(); }


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

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

LLVM IR (-O0):
define i32 @mtrand() {
%1 = call i32 (...) @genrand_int32()
ret i32 %1
}

LLVM IR (-O2):
define i32 @mtrand() {
%1 = tail call i32 (...) @genrand_int32()
ret i32 %1
}
unsigned int f2uiz(float a) { return (unsigned int)a; }


x86 assembly (clang, -O0):
<f2uiz>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
cvttss2si -0x4(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<f2uiz>:
cvttss2si %xmm0,%rax
ret

LLVM IR (-O0):
define i32 @f2uiz(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = fptoui float %3 to i32
ret i32 %4
}

LLVM IR (-O2):
define i32 @f2uiz(float %0) {
%2 = fptoui float %0 to i32
ret i32 %2
}
/* Type definitions */
struct quat {
  int dummy;
};

/* Variables and functions */
float quat_angle(float *, float *);
__attribute__((always_)) float psquat_angle(struct quat *a, struct quat *b) {
  return quat_angle((float *)a, (float *)b);
}


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

x86 assembly (clang, -O2):
<psquat_angle>:
jmp    1030 <quat_angle@plt>

LLVM IR (-O0):
%struct.quat = type { i32 }
define float @psquat_angle(%struct.quat* %0, %struct.quat* %1) {
%3 = alloca %struct.quat*
%4 = alloca %struct.quat*
store %struct.quat* %0, %struct.quat** %3
store %struct.quat* %1, %struct.quat** %4
%5 = load %struct.quat*, %struct.quat** %3
%6 = bitcast %struct.quat* %5 to float*
%7 = load %struct.quat*, %struct.quat** %4
%8 = bitcast %struct.quat* %7 to float*
%9 = call float @quat_angle(float* %6, float* %8)
ret float %9
}

LLVM IR (-O2):
%struct.quat = type { i32 }
define float @psquat_angle(%struct.quat* %0, %struct.quat* %1) {
%3 = bitcast %struct.quat* %0 to float*
%4 = bitcast %struct.quat* %1 to float*
%5 = tail call float @quat_angle(float* %3, float* %4)
ret float %5
}
/* Variables and functions */
int rand();
int random_number(int min, int max) {
  int rnum;
  rnum = (min - 1);
  while (rnum < min) {
    rnum = (rand() % (max + 1));
  }
  return rnum;
}


x86 assembly (clang, -O0):
<random_number>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    114b <random_number+0x3b>
mov    $0x0,%al
call   1030 <rand@plt>
mov    -0x8(%rbp),%ecx
add    $0x1,%ecx
cltd
idiv   %ecx
mov    %edx,-0xc(%rbp)
jmp    1127 <random_number+0x17>
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<random_number>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
add    $0x1,%ebx
nopw   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1030 <rand@plt>
cltd
idiv   %ebx
cmp    %ebp,%edx
jl     1120 <random_number+0x10>
mov    %edx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @random_number(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%6 = load i32, i32* %3
%7 = sub nsw i32 %6, 1
store i32 %7, i32* %5
br label %8
8: ; preds = %12, %2
%9 = load i32, i32* %5
%10 = load i32, i32* %3
%11 = icmp slt i32 %9, %10
br i1 %11, label %12, label %17
12: ; preds = %8
%13 = call i32 (...) @rand()
%14 = load i32, i32* %4
%15 = add nsw i32 %14, 1
%16 = srem i32 %13, %15
store i32 %16, i32* %5
br label %8
17: ; preds = %8
%18 = load i32, i32* %5
ret i32 %18
}

LLVM IR (-O2):
define i32 @random_number(i32 %0, i32 %1) {
%3 = add nsw i32 %1, 1
br label %4
4: ; preds = %2, %4
%5 = tail call i32 (...) @rand()
%6 = srem i32 %5, %3
%7 = icmp slt i32 %6, %0
br i1 %7, label %4, label %8
8: ; preds = %4
ret i32 %6
}
int test_imm_D6uint8_mem(unsigned char *val) {
  return ((*val) & (-0xD6 << 0)) ? -20 : -40;
}


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

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

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

LLVM IR (-O2):
define i32 @test_imm_D6uint8_mem(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = and i8 %2, 42
%4 = icmp eq i8 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
short __ocl_convert_short_long(long src) { return (short)src; }


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

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

LLVM IR (-O0):
define signext i16 @__ocl_convert_short_long(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = trunc i64 %3 to i16
ret i16 %4
}

LLVM IR (-O2):
define signext i16 @__ocl_convert_short_long(i64 %0) {
%2 = trunc i64 %0 to i16
ret i16 %2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int, int);
void sub(int f_num1, int f_num2) {
  printf("%d - %d = %d\n", f_num1, f_num2, (f_num1 - f_num2));
}


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

x86 assembly (clang, -O2):
<sub>:
mov    %esi,%edx
mov    %edi,%ecx
sub    %esi,%ecx
lea    0xee3(%rip),%rax
mov    %edi,%esi
mov    %rax,%rdi
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [14 x i8] c"%d - %d = %d\0A\00"
define void @sub(i32 %0, i32 %1) {
%3 = sub nsw i32 %0, %1
%4 = tail call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 %0, i32 %1, i32 %3)
ret void
}
/* Variables and functions */
int intlog2(int);
int intlog2_bound(int x) { return intlog2(x); }


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

x86 assembly (clang, -O2):
<intlog2_bound>:
jmp    1030 <intlog2@plt>

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

LLVM IR (-O2):
define i32 @intlog2_bound(i32 %0) {
%2 = tail call i32 @intlog2(i32 %0)
ret i32 %2
}
/* Variables and functions */
int __infer_nondet_int();
int ispunct(int x) { return __infer_nondet_int(); }


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

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

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

LLVM IR (-O2):
define i32 @ispunct(i32 %0) {
%2 = tail call i32 (...) @__infer_nondet_int()
ret i32 %2
}
/* Type definitions */
typedef int uint8_t;
typedef int uint32_t;

/* Variables and functions */
uint32_t osmo_revbytebits_8(uint8_t x) {
  x = (x & 0x55) << 1 | (x & 0xAA) >> 1;
  x = (x & 0x33) << 2 | (x & 0xCC) >> 2;
  x = (x & 0x0F) << 4 | (x & 0xF0) >> 4;
  return x;
}


x86 assembly (clang, -O0):
<osmo_revbytebits_8>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
and    $0x55,%eax
shl    $0x1,%eax
mov    -0x4(%rbp),%ecx
and    $0xaa,%ecx
sar    $0x1,%ecx
or     %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
and    $0x33,%eax
shl    $0x2,%eax
mov    -0x4(%rbp),%ecx
and    $0xcc,%ecx
sar    $0x2,%ecx
or     %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
and    $0xf,%eax
shl    $0x4,%eax
mov    -0x4(%rbp),%ecx
and    $0xf0,%ecx
sar    $0x4,%ecx
or     %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<osmo_revbytebits_8>:
rol    $0x4,%dil
mov    %edi,%eax
and    $0x33,%al
shl    $0x2,%al
shr    $0x2,%dil
and    $0x33,%dil
or     %al,%dil
mov    %edi,%eax
and    $0x55,%al
add    %al,%al
shr    %dil
and    $0x55,%dil
or     %al,%dil
movzbl %dil,%eax
ret

LLVM IR (-O0):
define i32 @osmo_revbytebits_8(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = and i32 %3, 85
%5 = shl i32 %4, 1
%6 = load i32, i32* %2
%7 = and i32 %6, 170
%8 = ashr i32 %7, 1
%9 = or i32 %5, %8
store i32 %9, i32* %2
%10 = load i32, i32* %2
%11 = and i32 %10, 51
%12 = shl i32 %11, 2
%13 = load i32, i32* %2
%14 = and i32 %13, 204
%15 = ashr i32 %14, 2
%16 = or i32 %12, %15
store i32 %16, i32* %2
%17 = load i32, i32* %2
%18 = and i32 %17, 15
%19 = shl i32 %18, 4
%20 = load i32, i32* %2
%21 = and i32 %20, 240
%22 = ashr i32 %21, 4
%23 = or i32 %19, %22
store i32 %23, i32* %2
%24 = load i32, i32* %2
ret i32 %24
}

LLVM IR (-O2):
define i32 @osmo_revbytebits_8(i32 %0) {
%2 = trunc i32 %0 to i8
%3 = tail call i8 @llvm.bitreverse.i8(i8 %2)
%4 = zext i8 %3 to i32
ret i32 %4
}
/* Type definitions */
typedef int /*<<< orphan*/ int64_t;

/* Variables and functions */
int /*<<< orphan*/ memcpy(void *, void *, int);
int /*<<< orphan*/ reverse_memcpy(void *, void *, int);
int64_t bytes_to_int64(const unsigned char bytes[8], int switch_endian) {
  int64_t dest_num;
  void *dest_ptr = (void *)&dest_num;
  if (switch_endian) {
    reverse_memcpy(dest_ptr, (void *)bytes, 8);
  } else {
    memcpy(dest_ptr, (void *)bytes, 8);
  }
  return dest_num;
}


x86 assembly (clang, -O0):
<bytes_to_int64>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
lea    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
cmpl   $0x0,-0xc(%rbp)
je     1158 <bytes_to_int64+0x38>
mov    -0x18(%rbp),%rdi
mov    -0x8(%rbp),%rsi
mov    $0x8,%edx
call   1030 <reverse_memcpy@plt>
jmp    116a <bytes_to_int64+0x4a>
mov    -0x18(%rbp),%rdi
mov    -0x8(%rbp),%rsi
mov    $0x8,%edx
call   1040 <memcpy@plt>
mov    -0x10(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bytes_to_int64>:
push   %rax
mov    %rdi,%rax
lea    0x4(%rsp),%rdi
test   %esi,%esi
je     113c <bytes_to_int64+0x1c>
mov    %rax,%rsi
mov    $0x8,%edx
call   1030 <reverse_memcpy@plt>
jmp    1149 <bytes_to_int64+0x29>
mov    %rax,%rsi
mov    $0x8,%edx
call   1040 <memcpy@plt>
mov    0x4(%rsp),%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @bytes_to_int64(i8* %0, i32 %1) {
%3 = alloca i32
%4 = bitcast i32* %3 to i8*
%5 = icmp eq i32 %1, 0
br i1 %5, label %8, label %6
6: ; preds = %2
%7 = call i32 @reverse_memcpy(i8* %4, i8* %0, i32 8)
br label %10
8: ; preds = %2
%9 = call i32 @memcpy(i8* %4, i8* %0, i32 8)
br label %10
10: ; preds = %8, %6
%11 = load i32, i32* %3
ret i32 %11
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, int, int);
int /*<<< orphan*/ stdout;
void set_cursor_point(int x, int y) { fprintf(stdout, "\033[%d;%dH", y, x); }


x86 assembly (clang, -O0):
<set_cursor_point>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    0x2ebb(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%edx
mov    -0x4(%rbp),%ecx
lea    0xecc(%rip),%rsi
call   1030 <fprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_cursor_point>:
mov    %esi,%edx
mov    %edi,%ecx
mov    0x2ec5(%rip),%rax
mov    (%rax),%edi
lea    0xedc(%rip),%rsi
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stdout = global i32 0
@.str = [9 x i8] c"\1B[%d;%dH\00"
define void @set_cursor_point(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* @stdout
%6 = load i32, i32* %4
%7 = load i32, i32* %3
%8 = call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 %6, i32 %7)
ret void
}

LLVM IR (-O2):
@stdout = global i32 0
@.str = [9 x i8] c"\1B[%d;%dH\00"
define void @set_cursor_point(i32 %0, i32 %1) {
%3 = load i32, i32* @stdout
%4 = tail call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 %1, i32 %0)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint16_t;

/* Variables and functions */
size_t write_FD_BE(int, int /*<<< orphan*/ const *, int);
size_t uint16WriteToFD(int fd, const uint16_t *data) {
  return write_FD_BE(fd, data, sizeof(uint16_t));
}


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

x86 assembly (clang, -O2):
<uint16WriteToFD>:
mov    $0x4,%edx
jmp    1030 <write_FD_BE@plt>

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

LLVM IR (-O2):
define i64 @uint16WriteToFD(i32 %0, i32* %1) {
%3 = tail call i64 @write_FD_BE(i32 %0, i32* %1, i32 4)
ret i64 %3
}
/* Type definitions */
typedef scalar_t__ ssize_t;

/* Variables and functions */
int /*<<< orphan*/ printf(char *);
scalar_t__ write(int, void *, scalar_t__);
void file_write(int file, void *pos, ssize_t size) {
  if (write(file, pos, size) < size) {
    printf("Write interrupted\n");
  }
}


x86 assembly (clang, -O0):
<file_write>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1030 <write@plt>
cmp    -0x18(%rbp),%rax
jge    1159 <file_write+0x39>
lea    0xeac(%rip),%rdi
call   1040 <printf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<file_write>:
push   %rbx
mov    %rdx,%rbx
call   1040 <write@plt>
cmp    %rbx,%rax
jge    113b <file_write+0x1b>
lea    0xecb(%rip),%rdi
pop    %rbx
jmp    1030 <puts@plt>
pop    %rbx
ret

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

LLVM IR (-O2):
@str = [18 x i8] c"Write interrupted\00"
define void @file_write(i32 %0, i8* nocapture %1, i64 %2) {
%4 = tail call i64 @write(i32 %0, i8* %1, i64 %2)
%5 = icmp slt i64 %4, %2
br i1 %5, label %6, label %8
6: ; preds = %3
%7 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @str, i64 0, i64 0))
br label %8
8: ; preds = %6, %3
ret void
}
int test_imm_1Cint16_mem(short *val) {
  return ((*val) & (0x1C << 0)) ? -20 : -40;
}


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

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

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

LLVM IR (-O2):
define i32 @test_imm_1Cint16_mem(i16* nocapture %0) {
%2 = load i16, i16* %0
%3 = and i16 %2, 28
%4 = icmp eq i16 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ grava_li(int, char *);
void rot25_sem() { grava_li(1, "$CONTINUE"); }


x86 assembly (clang, -O0):
<rot25_sem>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1,%edi
lea    0xee0(%rip),%rsi
call   1030 <grava_li@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<rot25_sem>:
lea    0xee9(%rip),%rsi
mov    $0x1,%edi
jmp    1030 <grava_li@plt>

LLVM IR (-O0):
@.str = [10 x i8] c"$CONTINUE\00"
define void @rot25_sem() {
%1 = call i32 @grava_li(i32 1, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [10 x i8] c"$CONTINUE\00"
define void @rot25_sem() {
%1 = tail call i32 @grava_li(i32 1, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
ret void
}
void sws_convertPalette8ToPacked32() {}


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

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

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

LLVM IR (-O2):
define void @sws_convertPalette8ToPacked32() {
ret void
}
/* Variables and functions */
int f1(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, int);
int main() {
  printf("return is : [%d]\n", f1(0));
  return 0;
}


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

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

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

LLVM IR (-O2):
@.str = [18 x i8] c"return is : [%d]\0A\00"
define i32 @main() {
%1 = tail call i32 @f1(i32 0)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i32 0
}
long double __mul_func(long double d1, long double d2) { return d1 * d2; }


x86 assembly (clang, -O0):
<__mul_func>:
push   %rbp
mov    %rsp,%rbp
fldt   0x20(%rbp)
fldt   0x10(%rbp)
fstpt  -0x10(%rbp)
fstpt  -0x20(%rbp)
fldt   -0x10(%rbp)
fldt   -0x20(%rbp)
fmulp  %st,%st(1)
pop    %rbp
ret

x86 assembly (clang, -O2):
<__mul_func>:
fldt   0x18(%rsp)
fldt   0x8(%rsp)
fmulp  %st,%st(1)
ret

LLVM IR (-O0):
define x86_fp80 @__mul_func(x86_fp80 %0, x86_fp80 %1) {
%3 = alloca x86_fp80
%4 = alloca x86_fp80
store x86_fp80 %0, x86_fp80* %3
store x86_fp80 %1, x86_fp80* %4
%5 = load x86_fp80, x86_fp80* %3
%6 = load x86_fp80, x86_fp80* %4
%7 = fmul x86_fp80 %5, %6
ret x86_fp80 %7
}

LLVM IR (-O2):
define x86_fp80 @__mul_func(x86_fp80 %0, x86_fp80 %1) {
%3 = fmul x86_fp80 %0, %1
ret x86_fp80 %3
}
/* Variables and functions */
void Default_EGU5_IRQHandler(void) {
  while (1)
    ;
}


x86 assembly (clang, -O0):
<Default_EGU5_IRQHandler>:
push   %rbp
mov    %rsp,%rbp
jmp    1109 <Default_EGU5_IRQHandler+0x9>
jmp    1109 <Default_EGU5_IRQHandler+0x9>

x86 assembly (clang, -O2):
<Default_EGU5_IRQHandler>:
jmp    1100 <Default_EGU5_IRQHandler>

LLVM IR (-O0):
define void @Default_EGU5_IRQHandler() {
br label %1
1: ; preds = %0, %1
br label %1
}

LLVM IR (-O2):
define void @Default_EGU5_IRQHandler() {
br label %1
1: ; preds = %0, %1
br label %1
}
/* Variables and functions */
int /*<<< orphan*/ truncW(char *, int);
int main(void) {
  char t[] = "liberdade, igualdade e fraternidade";
  truncW(t, 4);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
lea    -0x30(%rbp),%rdi
lea    0xecd(%rip),%rsi
mov    $0x24,%edx
call   1040 <memcpy@plt>
lea    -0x30(%rbp),%rdi
mov    $0x4,%esi
call   1030 <truncW@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x28,%rsp
movaps 0xef5(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0xed9(%rip),%xmm0
movaps %xmm0,(%rsp)
movl   $0x656461,0x20(%rsp)
mov    %rsp,%rdi
mov    $0x4,%esi
call   1030 <truncW@plt>
xor    %eax,%eax
add    $0x28,%rsp
ret

LLVM IR (-O0):
@__const.main.t = [36 x i8] c"liberdade, igualdade e fraternidade\00"
define i32 @main() {
%1 = alloca [36 x i8]
%2 = bitcast [36 x i8]* %1 to i8*
%3 = getelementptr inbounds [36 x i8], [36 x i8]* %1, i64 0, i64 0
%4 = call i32 @truncW(i8* %3, i32 4)
ret i32 0
}

LLVM IR (-O2):
@__const.main.t = [36 x i8] c"liberdade, igualdade e fraternidade\00"
define i32 @main() {
%1 = alloca [36 x i8]
%2 = getelementptr inbounds [36 x i8], [36 x i8]* %1, i64 0, i64 0
%3 = call i32 @truncW(i8* %2, i32 4)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
double *malloc(size_t);
int /*<<< orphan*/ stderr;
double *allocate_real_vector(size_t n) {
  double *vector = malloc(n * sizeof(double));
  if (vector == NULL) {
    fprintf(stderr, "Failed to allocate vector. ABORT.\n");
    exit(EXIT_FAILURE);
  }
  return vector;
}


x86 assembly (clang, -O0):
<allocate_real_vector>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
shl    $0x3,%rdi
call   1040 <malloc@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    117b <allocate_real_vector+0x4b>
mov    0x2e81(%rip),%rax
mov    (%rax),%edi
lea    0xe98(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2e64(%rip),%rax
mov    (%rax),%edi
call   1050 <exit@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<allocate_real_vector>:
push   %rax
shl    $0x3,%rdi
call   1040 <malloc@plt>
test   %rax,%rax
je     1141 <allocate_real_vector+0x11>
pop    %rcx
ret
mov    0x2e98(%rip),%rax
mov    (%rax),%edi
lea    0xeaf(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2e7b(%rip),%rax
mov    (%rax),%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [35 x i8] c"Failed to allocate vector. ABORT.\0A\00"
@EXIT_FAILURE = global i32 0
define double* @allocate_real_vector(i64 %0) {
%2 = alloca i64
%3 = alloca double*
store i64 %0, i64* %2
%4 = load i64, i64* %2
%5 = mul i64 %4, 8
%6 = call double* @malloc(i64 %5)
store double* %6, double** %3
%7 = load double*, double** %3
%8 = icmp eq double* %7, null
br i1 %8, label %9, label %14
9: ; preds = %1
%10 = load i32, i32* @stderr
%11 = call i32 @fprintf(i32 %10, i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0))
%12 = load i32, i32* @EXIT_FAILURE
%13 = call i32 @exit(i32 %12)
unreachable
14: ; preds = %1
%15 = load double*, double** %3
ret double* %15
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [35 x i8] c"Failed to allocate vector. ABORT.\0A\00"
@EXIT_FAILURE = global i32 0
define noalias double* @allocate_real_vector(i64 %0) {
%2 = shl i64 %0, 3
%3 = tail call double* @malloc(i64 %2)
%4 = icmp eq double* %3, null
br i1 %4, label %5, label %10
5: ; preds = %1
%6 = load i32, i32* @stderr
%7 = tail call i32 @fprintf(i32 %6, i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0))
%8 = load i32, i32* @EXIT_FAILURE
%9 = tail call i32 @exit(i32 %8)
unreachable
10: ; preds = %1
ret double* %3
}
void dummy_print() {}


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

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

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

LLVM IR (-O2):
define void @dummy_print() {
ret void
}
/* Variables and functions */
long double expl(long double);
long double coshl(long double x) {
  x = expl(x);
  return ((x + (1.0 / x)) / 2.0);
}


x86 assembly (clang, -O0):
<coshl>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
fldt   0x10(%rbp)
fstpt  -0x10(%rbp)
fldt   -0x10(%rbp)
mov    %rsp,%rax
fstpt  (%rax)
call   1030 <expl@plt>
fstpt  -0x10(%rbp)
fldt   -0x10(%rbp)
fld1
fdiv   %st(1),%st
faddp  %st,%st(1)
flds   0xec3(%rip)
fdivrp %st,%st(1)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<coshl>:
sub    $0x18,%rsp
fldt   0x20(%rsp)
fstpt  (%rsp)
call   1030 <expl@plt>
fld1
fdiv   %st(1),%st
faddp  %st,%st(1)
fmuls  0xed4(%rip)
add    $0x18,%rsp
ret

LLVM IR (-O0):
define x86_fp80 @coshl(x86_fp80 %0) {
%2 = alloca x86_fp80
store x86_fp80 %0, x86_fp80* %2
%3 = load x86_fp80, x86_fp80* %2
%4 = call x86_fp80 @expl(x86_fp80 %3)
store x86_fp80 %4, x86_fp80* %2
%5 = load x86_fp80, x86_fp80* %2
%6 = load x86_fp80, x86_fp80* %2
%7 = fdiv x86_fp80 0xK3FFF8000000000000000, %6
%8 = fadd x86_fp80 %5, %7
%9 = fdiv x86_fp80 %8, 0xK40008000000000000000
ret x86_fp80 %9
}

LLVM IR (-O2):
define x86_fp80 @coshl(x86_fp80 %0) {
%2 = tail call x86_fp80 @expl(x86_fp80 %0)
%3 = fdiv x86_fp80 0xK3FFF8000000000000000, %2
%4 = fadd x86_fp80 %2, %3
%5 = fmul x86_fp80 %4, 0xK3FFE8000000000000000
ret x86_fp80 %5
}
void subVect(double *y, const double *x1, const double *x2) {
  y[0] = x1[0] - x2[0];
  y[1] = x1[1] - x2[1];
  y[2] = x1[2] - x2[2];
  return;
}


x86 assembly (clang, -O0):
<subVect>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x18(%rbp),%rax
subsd  (%rax),%xmm0
mov    -0x8(%rbp),%rax
movsd  %xmm0,(%rax)
mov    -0x10(%rbp),%rax
movsd  0x8(%rax),%xmm0
mov    -0x18(%rbp),%rax
subsd  0x8(%rax),%xmm0
mov    -0x8(%rbp),%rax
movsd  %xmm0,0x8(%rax)
mov    -0x10(%rbp),%rax
movsd  0x10(%rax),%xmm0
mov    -0x18(%rbp),%rax
subsd  0x10(%rax),%xmm0
mov    -0x8(%rbp),%rax
movsd  %xmm0,0x10(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<subVect>:
movsd  (%rsi),%xmm0
subsd  (%rdx),%xmm0
movsd  %xmm0,(%rdi)
movsd  0x8(%rsi),%xmm0
subsd  0x8(%rdx),%xmm0
movsd  %xmm0,0x8(%rdi)
movsd  0x10(%rsi),%xmm0
subsd  0x10(%rdx),%xmm0
movsd  %xmm0,0x10(%rdi)
ret

LLVM IR (-O0):
define void @subVect(double* %0, double* %1, double* %2) {
%4 = alloca double*
%5 = alloca double*
%6 = alloca double*
store double* %0, double** %4
store double* %1, double** %5
store double* %2, double** %6
%7 = load double*, double** %5
%8 = getelementptr inbounds double, double* %7, i64 0
%9 = load double, double* %8
%10 = load double*, double** %6
%11 = getelementptr inbounds double, double* %10, i64 0
%12 = load double, double* %11
%13 = fsub double %9, %12
%14 = load double*, double** %4
%15 = getelementptr inbounds double, double* %14, i64 0
store double %13, double* %15
%16 = load double*, double** %5
%17 = getelementptr inbounds double, double* %16, i64 1
%18 = load double, double* %17
%19 = load double*, double** %6
%20 = getelementptr inbounds double, double* %19, i64 1
%21 = load double, double* %20
%22 = fsub double %18, %21
%23 = load double*, double** %4
%24 = getelementptr inbounds double, double* %23, i64 1
store double %22, double* %24
%25 = load double*, double** %5
%26 = getelementptr inbounds double, double* %25, i64 2
%27 = load double, double* %26
%28 = load double*, double** %6
%29 = getelementptr inbounds double, double* %28, i64 2
%30 = load double, double* %29
%31 = fsub double %27, %30
%32 = load double*, double** %4
%33 = getelementptr inbounds double, double* %32, i64 2
store double %31, double* %33
ret void
}

LLVM IR (-O2):
define void @subVect(double* nocapture writeonly %0, double* nocapture %1, double* nocapture %2) {
%4 = load double, double* %1
%5 = load double, double* %2
%6 = fsub double %4, %5
store double %6, double* %0
%7 = getelementptr inbounds double, double* %1, i64 1
%8 = load double, double* %7
%9 = getelementptr inbounds double, double* %2, i64 1
%10 = load double, double* %9
%11 = fsub double %8, %10
%12 = getelementptr inbounds double, double* %0, i64 1
store double %11, double* %12
%13 = getelementptr inbounds double, double* %1, i64 2
%14 = load double, double* %13
%15 = getelementptr inbounds double, double* %2, i64 2
%16 = load double, double* %15
%17 = fsub double %14, %16
%18 = getelementptr inbounds double, double* %0, i64 2
store double %17, double* %18
ret void
}