xunge/DecIR huggingface dataset:
double pmin(double a, double b) {
  if (a < b) {
    return a;
  } else {
    return b;
  }
}


x86 assembly (clang, -O0):
<pmin>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x10(%rbp)
movsd  %xmm1,-0x18(%rbp)
movsd  -0x10(%rbp),%xmm1
movsd  -0x18(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jbe    1131 <pmin+0x31>
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    113b <pmin+0x3b>
movsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<pmin>:
minsd  %xmm1,%xmm0
ret

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

LLVM IR (-O2):
define double @pmin(double %0, double %1) {
%3 = fcmp olt double %0, %1
%4 = select i1 %3, double %0, double %1
ret double %4
}
void foo205() {}


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

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

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

LLVM IR (-O2):
define void @foo205() {
ret void
}
int test_03(long long tab[], int index) { return (int)tab[index + 1]; }


x86 assembly (clang, -O0):
<test_03>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    -0xc(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
mov    (%rax,%rcx,8),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_03>:
movslq %esi,%rax
mov    0x8(%rdi,%rax,8),%eax
ret

LLVM IR (-O0):
define i32 @test_03(i64* %0, i32 %1) {
%3 = alloca i64*
%4 = alloca i32
store i64* %0, i64** %3
store i32 %1, i32* %4
%5 = load i64*, i64** %3
%6 = load i32, i32* %4
%7 = add nsw i32 %6, 1
%8 = sext i32 %7 to i64
%9 = getelementptr inbounds i64, i64* %5, i64 %8
%10 = load i64, i64* %9
%11 = trunc i64 %10 to i32
ret i32 %11
}

LLVM IR (-O2):
define i32 @test_03(i64* nocapture %0, i32 %1) {
%3 = add nsw i32 %1, 1
%4 = sext i32 %3 to i64
%5 = getelementptr inbounds i64, i64* %0, i64 %4
%6 = load i64, i64* %5
%7 = trunc i64 %6 to i32
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ fflush(int /*<<< orphan*/);
int /*<<< orphan*/ fputs(char const *, int /*<<< orphan*/);
int /*<<< orphan*/ stdout;
void startItFunVerbose(const char *descr) {
  fputs("   - it ", stdout);
  fputs(descr, stdout);
  fputs("\n", stdout);
  fflush(stdout);
}


x86 assembly (clang, -O0):
<startItFunVerbose>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ead(%rip),%rax
mov    (%rax),%esi
lea    0xec4(%rip),%rdi
call   1030 <fputs@plt>
mov    -0x8(%rbp),%rdi
mov    0x2e94(%rip),%rax
mov    (%rax),%esi
call   1030 <fputs@plt>
mov    0x2e86(%rip),%rax
mov    (%rax),%esi
lea    0xea6(%rip),%rdi
call   1030 <fputs@plt>
mov    0x2e71(%rip),%rax
mov    (%rax),%edi
call   1040 <fflush@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<startItFunVerbose>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
mov    0x2eb2(%rip),%r14
mov    (%r14),%esi
lea    0xec8(%rip),%rdi
call   1030 <fputs@plt>
mov    (%r14),%esi
mov    %rbx,%rdi
call   1030 <fputs@plt>
mov    (%r14),%esi
lea    0xeb7(%rip),%rdi
call   1030 <fputs@plt>
mov    (%r14),%edi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <fflush@plt>

LLVM IR (-O0):
@.str = [9 x i8] c" - it \00"
@stdout = global i32 0
@.str.1 = [2 x i8] c"\0A\00"
define void @startItFunVerbose(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stdout
%4 = call i32 @fputs(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 %3)
%5 = load i8*, i8** %2
%6 = load i32, i32* @stdout
%7 = call i32 @fputs(i8* %5, i32 %6)
%8 = load i32, i32* @stdout
%9 = call i32 @fputs(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0), i32 %8)
%10 = load i32, i32* @stdout
%11 = call i32 @fflush(i32 %10)
ret void
}

LLVM IR (-O2):
@.str = [9 x i8] c" - it \00"
@stdout = global i32 0
@.str.1 = [2 x i8] c"\0A\00"
define void @startItFunVerbose(i8* %0) {
%2 = load i32, i32* @stdout
%3 = tail call i32 @fputs(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 %2)
%4 = load i32, i32* @stdout
%5 = tail call i32 @fputs(i8* %0, i32 %4)
%6 = load i32, i32* @stdout
%7 = tail call i32 @fputs(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0), i32 %6)
%8 = load i32, i32* @stdout
%9 = tail call i32 @fflush(i32 %8)
ret void
}
int test00_inv(int a, int b) { return (a != b) ? 0x80000000 : 0x7FFFFFFF; }


x86 assembly (clang, -O0):
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edx
mov    -0x8(%rbp),%esi
mov    $0x7fffffff,%eax
mov    $0x80000000,%ecx
cmp    %esi,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
xor    %ecx,%ecx
cmp    %esi,%edi
sete   %cl
mov    $0x80000000,%eax
sub    %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test00_inv(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = load i32, i32* %4
%7 = icmp ne i32 %5, %6
%8 = zext i1 %7 to i64
%9 = select i1 %7, i32 -2147483648, i32 2147483647
ret i32 %9
}

LLVM IR (-O2):
define i32 @test00_inv(i32 %0, i32 %1) {
%3 = icmp eq i32 %0, %1
%4 = select i1 %3, i32 2147483647, i32 -2147483648
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ al(unsigned long *, unsigned long *, unsigned long *, long);
void l(unsigned long *q, unsigned long *s, long t, unsigned long *u, long v) {
  al(q, s, u, t);
}


x86 assembly (clang, -O0):
<l>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x20(%rbp),%rdx
mov    -0x18(%rbp),%rcx
call   1030 <al@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<l>:
mov    %rdx,%rax
mov    %rcx,%rdx
mov    %rax,%rcx
jmp    1030 <al@plt>

LLVM IR (-O0):
define void @l(i64* %0, i64* %1, i64 %2, i64* %3, i64 %4) {
%6 = alloca i64*
%7 = alloca i64*
%8 = alloca i64
%9 = alloca i64*
%10 = alloca i64
store i64* %0, i64** %6
store i64* %1, i64** %7
store i64 %2, i64* %8
store i64* %3, i64** %9
store i64 %4, i64* %10
%11 = load i64*, i64** %6
%12 = load i64*, i64** %7
%13 = load i64*, i64** %9
%14 = load i64, i64* %8
%15 = call i32 @al(i64* %11, i64* %12, i64* %13, i64 %14)
ret void
}

LLVM IR (-O2):
define void @l(i64* %0, i64* %1, i64 %2, i64* %3, i64 %4) {
%6 = tail call i32 @al(i64* %0, i64* %1, i64* %3, i64 %2)
ret void
}
/* Variables and functions */
int read(int, char *, int);
int /*<<< orphan*/ write(int, char *, int);
void filecopy(int ifd, int ofd) {
  int n;
  char buf[512];
  while ((n = read(ifd, buf, 512)) > 0) {
    write(ofd, buf, n);
  }
}


x86 assembly (clang, -O0):
<filecopy>:
push   %rbp
mov    %rsp,%rbp
sub    $0x210,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edi
lea    -0x210(%rbp),%rsi
mov    $0x200,%edx
call   1040 <read@plt>
mov    %eax,-0xc(%rbp)
cmp    $0x0,%eax
jle    1168 <filecopy+0x48>
mov    -0x8(%rbp),%edi
lea    -0x210(%rbp),%rsi
mov    -0xc(%rbp),%edx
call   1030 <write@plt>
jmp    1131 <filecopy+0x11>
add    $0x210,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<filecopy>:
push   %rbp
push   %r14
push   %rbx
sub    $0x200,%rsp
mov    %esi,%r14d
mov    %edi,%ebp
mov    %rsp,%rsi
mov    $0x200,%edx
call   1040 <read@plt>
test   %eax,%eax
jle    1170 <filecopy+0x50>
mov    %rsp,%rbx
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    %r14d,%edi
mov    %rbx,%rsi
mov    %eax,%edx
call   1030 <write@plt>
mov    %ebp,%edi
mov    %rbx,%rsi
mov    $0x200,%edx
call   1040 <read@plt>
test   %eax,%eax
jg     1150 <filecopy+0x30>
add    $0x200,%rsp
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
define void @filecopy(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca [512 x i8]
store i32 %0, i32* %3
store i32 %1, i32* %4
br label %7
7: ; preds = %12, %2
%8 = load i32, i32* %3
%9 = getelementptr inbounds [512 x i8], [512 x i8]* %6, i64 0, i64 0
%10 = call i32 @read(i32 %8, i8* %9, i32 512)
store i32 %10, i32* %5
%11 = icmp sgt i32 %10, 0
br i1 %11, label %12, label %17
12: ; preds = %7
%13 = load i32, i32* %4
%14 = getelementptr inbounds [512 x i8], [512 x i8]* %6, i64 0, i64 0
%15 = load i32, i32* %5
%16 = call i32 @write(i32 %13, i8* %14, i32 %15)
br label %7
17: ; preds = %7
ret void
}

LLVM IR (-O2):
define void @filecopy(i32 %0, i32 %1) {
%3 = alloca [512 x i8]
%4 = getelementptr inbounds [512 x i8], [512 x i8]* %3, i64 0, i64 0
%5 = call i32 @read(i32 %0, i8* %4, i32 512)
%6 = icmp sgt i32 %5, 0
br i1 %6, label %7, label %12
7: ; preds = %2, %7
%8 = phi i32 [ %10, %7 ], [ %5, %2 ]
%9 = call i32 @write(i32 %1, i8* %4, i32 %8)
%10 = call i32 @read(i32 %0, i8* %4, i32 512)
%11 = icmp sgt i32 %10, 0
br i1 %11, label %7, label %12
12: ; preds = %7, %2
ret void
}
/* Variables and functions */
bool canWinNim(int n) { return (n % 4 == 0) ? false : true; }


x86 assembly (clang, -O0):
<canWinNim>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    $0x4,%ecx
cltd
idiv   %ecx
mov    $0x1,%eax
xor    %ecx,%ecx
cmp    $0x0,%edx
cmove  %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<canWinNim>:
xor    %eax,%eax
test   $0x3,%dil
setne  %al
ret

LLVM IR (-O0):
define i32 @canWinNim(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = srem i32 %3, 4
%5 = icmp eq i32 %4, 0
%6 = zext i1 %5 to i64
%7 = select i1 %5, i32 0, i32 1
ret i32 %7
}

LLVM IR (-O2):
define i32 @canWinNim(i32 %0) {
%2 = and i32 %0, 3
%3 = icmp ne i32 %2, 0
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
int *memchr(int *, int, int);
int *__rawmemchr(int *s, int c) { return memchr(s, c, 1 << 30); }


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

x86 assembly (clang, -O2):
<__rawmemchr>:
mov    $0x40000000,%edx
jmp    1030 <memchr@plt>

LLVM IR (-O0):
define i32* @__rawmemchr(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 i32* @memchr(i32* %5, i32 %6, i32 1073741824)
ret i32* %7
}

LLVM IR (-O2):
define i32* @__rawmemchr(i32* %0, i32 %1) {
%3 = tail call i32* @memchr(i32* %0, i32 %1, i32 1073741824)
ret i32* %3
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  unsigned long red_max;
};
typedef TYPE_1__ XStandardColormap;

/* Variables and functions */
void set_XStandardColormap_red_max(void *_p, unsigned long _v) {
  ((XStandardColormap *)_p)->red_max = (unsigned long)_v;
}


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

x86 assembly (clang, -O2):
<set_XStandardColormap_red_max>:
mov    %rsi,(%rdi)
ret

LLVM IR (-O0):
%struct.TYPE_2__ = type { i64 }
define void @set_XStandardColormap_red_max(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
store i8* %0, i8** %3
store i64 %1, i64* %4
%5 = load i64, i64* %4
%6 = load i8*, i8** %3
%7 = bitcast i8* %6 to %struct.TYPE_2__*
%8 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %7, i32 0, i32 0
store i64 %5, i64* %8
ret void
}

LLVM IR (-O2):
define void @set_XStandardColormap_red_max(i8* nocapture writeonly %0, i64 %1) {
%3 = bitcast i8* %0 to i64*
store i64 %1, i64* %3
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void printVersion() { printf("hosts v1.0.0 (c) 2013 Ulrich Schmidt-Goertz\n"); }


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

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

LLVM IR (-O0):
@.str = [45 x i8] c"hosts v1.0.0 (c) 2013 Ulrich Schmidt-Goertz\0A\00"
define void @printVersion() {
%1 = call i32 @printf(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [44 x i8] c"hosts v1.0.0 (c) 2013 Ulrich Schmidt-Goertz\00"
define void @printVersion() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([44 x i8], [44 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void csv_cstate_table_footer(__attribute__((unused)) void *report_data) {
  printf("\n\n");
}


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

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

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

LLVM IR (-O2):
@str = [2 x i8] c"\0A\00"
define void @csv_cstate_table_footer(i8* nocapture readnone %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([2 x i8], [2 x i8]* @str, i64 0, i64 0))
ret void
}
/* Type definitions */
struct task_struct {
  int dummy;
};
struct sched_dl_entity {
  int dummy;
};
struct cbs_membership_entry {
  int dummy;
};

/* Variables and functions */
struct cbs_membership_entry *cbs_membership_add(struct sched_dl_entity *,
                                                struct task_struct *,
                                                int /*<<< orphan*/);
int /*<<< orphan*/ get_cbs(struct sched_dl_entity *);
struct cbs_membership_entry *
associate_task_and_cbs(struct task_struct *p, struct sched_dl_entity *cbs) {
  get_cbs(cbs);
  return cbs_membership_add(cbs, p, 0);
}


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

x86 assembly (clang, -O2):
<associate_task_and_cbs>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %rdi,%r14
mov    %rsi,%rdi
call   1030 <get_cbs@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
xor    %edx,%edx
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <cbs_membership_add@plt>

LLVM IR (-O0):
%struct.cbs_membership_entry = type { i32 }
%struct.task_struct = type { i32 }
%struct.sched_dl_entity = type { i32 }
define %struct.cbs_membership_entry* @associate_task_and_cbs(%struct.task_struct* %0, %struct.sched_dl_entity* %1) {
%3 = alloca %struct.task_struct*
%4 = alloca %struct.sched_dl_entity*
store %struct.task_struct* %0, %struct.task_struct** %3
store %struct.sched_dl_entity* %1, %struct.sched_dl_entity** %4
%5 = load %struct.sched_dl_entity*, %struct.sched_dl_entity** %4
%6 = call i32 @get_cbs(%struct.sched_dl_entity* %5)
%7 = load %struct.sched_dl_entity*, %struct.sched_dl_entity** %4
%8 = load %struct.task_struct*, %struct.task_struct** %3
%9 = call %struct.cbs_membership_entry* @cbs_membership_add(%struct.sched_dl_entity* %7, %struct.task_struct* %8, i32 0)
ret %struct.cbs_membership_entry* %9
}

LLVM IR (-O2):
%struct.cbs_membership_entry = type { i32 }
%struct.task_struct = type { i32 }
%struct.sched_dl_entity = type { i32 }
define %struct.cbs_membership_entry* @associate_task_and_cbs(%struct.task_struct* %0, %struct.sched_dl_entity* %1) {
%3 = tail call i32 @get_cbs(%struct.sched_dl_entity* %1)
%4 = tail call %struct.cbs_membership_entry* @cbs_membership_add(%struct.sched_dl_entity* %1, %struct.task_struct* %0, i32 0)
ret %struct.cbs_membership_entry* %4
}
/* Variables and functions */
int /*<<< orphan*/ GPIOPinWrite(int, int, int);
void start() {
  GPIOPinWrite(0x40007000, 0x00000040, 0xff);
  GPIOPinWrite(0x40007000, 0x00000080, 0xff);
  GPIOPinWrite(0x40007000, 0x00000040, 0x00);
  GPIOPinWrite(0x40007000, 0x00000080, 0x00);
}


x86 assembly (clang, -O0):
<start>:
push   %rbp
mov    %rsp,%rbp
mov    $0x40007000,%edi
mov    $0x40,%esi
mov    $0xff,%edx
call   1030 <GPIOPinWrite@plt>
mov    $0x40007000,%edi
mov    $0x80,%esi
mov    $0xff,%edx
call   1030 <GPIOPinWrite@plt>
mov    $0x40007000,%edi
mov    $0x40,%esi
xor    %edx,%edx
call   1030 <GPIOPinWrite@plt>
mov    $0x40007000,%edi
mov    $0x80,%esi
xor    %edx,%edx
call   1030 <GPIOPinWrite@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<start>:
push   %rax
mov    $0x40007000,%edi
mov    $0x40,%esi
mov    $0xff,%edx
call   1030 <GPIOPinWrite@plt>
mov    $0x40007000,%edi
mov    $0x80,%esi
mov    $0xff,%edx
call   1030 <GPIOPinWrite@plt>
mov    $0x40007000,%edi
mov    $0x40,%esi
xor    %edx,%edx
call   1030 <GPIOPinWrite@plt>
mov    $0x40007000,%edi
mov    $0x80,%esi
xor    %edx,%edx
pop    %rax
jmp    1030 <GPIOPinWrite@plt>

LLVM IR (-O0):
define void @start() {
%1 = call i32 @GPIOPinWrite(i32 1073770496, i32 64, i32 255)
%2 = call i32 @GPIOPinWrite(i32 1073770496, i32 128, i32 255)
%3 = call i32 @GPIOPinWrite(i32 1073770496, i32 64, i32 0)
%4 = call i32 @GPIOPinWrite(i32 1073770496, i32 128, i32 0)
ret void
}

LLVM IR (-O2):
define void @start() {
%1 = tail call i32 @GPIOPinWrite(i32 1073770496, i32 64, i32 255)
%2 = tail call i32 @GPIOPinWrite(i32 1073770496, i32 128, i32 255)
%3 = tail call i32 @GPIOPinWrite(i32 1073770496, i32 64, i32 0)
%4 = tail call i32 @GPIOPinWrite(i32 1073770496, i32 128, i32 0)
ret void
}
/* Variables and functions */
int is_prime(int *);
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int answer;
  int number;
  int *refernce_of_a = &number;
  scanf("%d", refernce_of_a);
  answer = is_prime(&number);
  printf("%d", answer);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rsi
lea    0xeb5(%rip),%rdi
call   1050 <scanf@plt>
lea    -0x8(%rbp),%rdi
call   1040 <is_prime@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%esi
lea    0xe9a(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
lea    0xec5(%rip),%r14
lea    0x4(%rsp),%rbx
mov    %r14,%rdi
mov    %rbx,%rsi
call   1050 <scanf@plt>
mov    %rbx,%rdi
call   1040 <is_prime@plt>
mov    %r14,%rdi
mov    %eax,%esi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%4 = call i32 @is_prime(i32* %1)
%5 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %4)
ret i32 0
}
/* Variables and functions */
char *strchr(char *, char);
void slash2bs(char *inString) {
  char *slash = inString;
  while (NULL != (slash = strchr(slash, '/'))) {
    *slash = '\\';
    slash++;
  }
}


x86 assembly (clang, -O0):
<slash2bs>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    $0x2f,%esi
call   1030 <strchr@plt>
mov    %rax,%rcx
mov    %rcx,-0x10(%rbp)
xor    %eax,%eax
cmp    %rcx,%rax
je     115c <slash2bs+0x4c>
mov    -0x10(%rbp),%rax
movb   $0x5c,(%rax)
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1124 <slash2bs+0x14>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<slash2bs>:
push   %rax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    $0x2f,%esi
call   1030 <strchr@plt>
test   %rax,%rax
je     113b <slash2bs+0x2b>
movb   $0x5c,(%rax)
add    $0x1,%rax
mov    %rax,%rdi
jmp    1120 <slash2bs+0x10>
pop    %rax
ret

LLVM IR (-O0):
define void @slash2bs(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
store i8* %4, i8** %3
br label %5
5: ; preds = %9, %1
%6 = load i8*, i8** %3
%7 = call i8* @strchr(i8* %6, i8 signext 47)
store i8* %7, i8** %3
%8 = icmp ne i8* null, %7
br i1 %8, label %9, label %13
9: ; preds = %5
%10 = load i8*, i8** %3
store i8 92, i8* %10
%11 = load i8*, i8** %3
%12 = getelementptr inbounds i8, i8* %11, i32 1
store i8* %12, i8** %3
br label %5
13: ; preds = %5
ret void
}

LLVM IR (-O2):
define void @slash2bs(i8* %0) {
%2 = tail call i8* @strchr(i8* dereferenceable(1) %0, i8 signext 47)
%3 = icmp eq i8* %2, null
br i1 %3, label %9, label %4
4: ; preds = %1, %4
%5 = phi i8* [ %7, %4 ], [ %2, %1 ]
store i8 92, i8* %5
%6 = getelementptr inbounds i8, i8* %5, i64 1
%7 = tail call i8* @strchr(i8* dereferenceable(1) %6, i8 signext 47)
%8 = icmp eq i8* %7, null
br i1 %8, label %9, label %4
9: ; preds = %4, %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ RTLD_LAZY;
int /*<<< orphan*/ abort();
int /*<<< orphan*/ dlclose(void *);
char *dlerror();
void *dlopen(char *, int /*<<< orphan*/);
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *, char *);
int main(void) {
  void *handle = dlopen("reldep9mod3.so", RTLD_LAZY);
  if (handle == NULL) {
    printf("%s\n", dlerror());
    exit(1);
  }
  dlclose(handle);
  abort();
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    0x2e6a(%rip),%rax
mov    (%rax),%esi
lea    0xe81(%rip),%rdi
call   1060 <dlopen@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    11b3 <main+0x53>
mov    $0x0,%al
call   1030 <dlerror@plt>
mov    %rax,%rsi
lea    0xe6b(%rip),%rdi
call   1050 <printf@plt>
mov    $0x1,%edi
call   1070 <exit@plt>
mov    -0x10(%rbp),%rdi
call   1080 <dlclose@plt>
mov    $0x0,%al
call   1040 <abort@plt>

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    0x2e78(%rip),%rax
mov    (%rax),%esi
lea    0xe8f(%rip),%rdi
call   1060 <dlopen@plt>
test   %rax,%rax
jne    119b <main+0x3b>
xor    %eax,%eax
call   1030 <dlerror@plt>
lea    0xe86(%rip),%rdi
mov    %rax,%rsi
call   1050 <printf@plt>
mov    $0x1,%edi
call   1070 <exit@plt>
mov    %rax,%rdi
call   1080 <dlclose@plt>
xor    %eax,%eax
call   1040 <abort@plt>

LLVM IR (-O0):
@.str = [15 x i8] c"reldep9mod3.so\00"
@RTLD_LAZY = global i32 0
@.str.1 = [4 x i8] c"%s\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i8*
store i32 0, i32* %1
%3 = load i32, i32* @RTLD_LAZY
%4 = call i8* @dlopen(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32 %3)
store i8* %4, i8** %2
%5 = load i8*, i8** %2
%6 = icmp eq i8* %5, null
br i1 %6, label %7, label %11
7: ; preds = %0
%8 = call i8* (...) @dlerror()
%9 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %8)
%10 = call i32 @exit(i32 1)
unreachable
11: ; preds = %0
%12 = load i8*, i8** %2
%13 = call i32 @dlclose(i8* %12)
%14 = call i32 (...) @abort()
unreachable
}

LLVM IR (-O2):
@.str = [15 x i8] c"reldep9mod3.so\00"
@RTLD_LAZY = global i32 0
@.str.1 = [4 x i8] c"%s\0A\00"
define i32 @main() {
%1 = load i32, i32* @RTLD_LAZY
%2 = tail call i8* @dlopen(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32 %1)
%3 = icmp eq i8* %2, null
br i1 %3, label %4, label %8
4: ; preds = %0
%5 = tail call i8* (...) @dlerror()
%6 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %5)
%7 = tail call i32 @exit(i32 1)
unreachable
8: ; preds = %0
%9 = tail call i32 @dlclose(i8* %2)
%10 = tail call i32 (...) @abort()
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ usl_signal_notify(int);
void usl_sigusr1(int sig) { usl_signal_notify(sig); }


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

x86 assembly (clang, -O2):
<usl_sigusr1>:
jmp    1030 <usl_signal_notify@plt>

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

LLVM IR (-O2):
define void @usl_sigusr1(i32 %0) {
%2 = tail call i32 @usl_signal_notify(i32 %0)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ write(int /*<<< orphan*/ *, unsigned char *, int);
void writelong(FILE *fp, int l) {
  unsigned char *c;
  c = (unsigned char *)&l;
  write(fp, c + 3, 1);
  write(fp, c + 2, 1);
  write(fp, c + 1, 1);
  write(fp, c + 0, 1);
}


x86 assembly (clang, -O0):
<writelong>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
lea    -0xc(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x18(%rbp),%rsi
add    $0x3,%rsi
mov    $0x1,%edx
call   1030 <write@plt>
mov    -0x8(%rbp),%rdi
mov    -0x18(%rbp),%rsi
add    $0x2,%rsi
mov    $0x1,%edx
call   1030 <write@plt>
mov    -0x8(%rbp),%rdi
mov    -0x18(%rbp),%rsi
add    $0x1,%rsi
mov    $0x1,%edx
call   1030 <write@plt>
mov    -0x8(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    $0x1,%edx
call   1030 <write@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<writelong>:
push   %rbx
sub    $0x10,%rsp
mov    %rdi,%rbx
mov    %esi,0xc(%rsp)
lea    0xf(%rsp),%rsi
mov    $0x1,%edx
call   1030 <write@plt>
lea    0xe(%rsp),%rsi
mov    %rbx,%rdi
mov    $0x1,%edx
call   1030 <write@plt>
lea    0xd(%rsp),%rsi
mov    %rbx,%rdi
mov    $0x1,%edx
call   1030 <write@plt>
lea    0xc(%rsp),%rsi
mov    %rbx,%rdi
mov    $0x1,%edx
call   1030 <write@plt>
add    $0x10,%rsp
pop    %rbx
ret

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

LLVM IR (-O2):
define void @writelong(i32* %0, i32 %1) {
%3 = alloca i32
store i32 %1, i32* %3
%4 = bitcast i32* %3 to i8*
%5 = getelementptr inbounds i8, i8* %4, i64 3
%6 = call i32 @write(i32* %0, i8* %5, i32 1)
%7 = getelementptr inbounds i8, i8* %4, i64 2
%8 = call i32 @write(i32* %0, i8* %7, i32 1)
%9 = getelementptr inbounds i8, i8* %4, i64 1
%10 = call i32 @write(i32* %0, i8* %9, i32 1)
%11 = call i32 @write(i32* %0, i8* %4, i32 1)
ret void
}
int fun1010() { return 1010; }


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

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

LLVM IR (-O0):
define i32 @fun1010() {
ret i32 1010
}

LLVM IR (-O2):
define i32 @fun1010() {
ret i32 1010
}
/* Variables and functions */
int /*<<< orphan*/ assert(int /*<<< orphan*/);
void *__alloc_percpu(size_t size, size_t align) {
  assert(0);
  return NULL;
}


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

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

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

LLVM IR (-O2):
define noalias i8* @__alloc_percpu(i64 %0, i64 %1) {
%3 = tail call i32 @assert(i32 0)
ret i8* null
}
void SXNET_get_id_asc(void) {}


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

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

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

LLVM IR (-O2):
define void @SXNET_get_id_asc() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
main() {
  int number = 2;
  while (number <= 30) {
    if (number % 2 == 0)
      printf("%d\n", number);
    number++;
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x2,-0x8(%rbp)
cmpl   $0x1e,-0x8(%rbp)
jg     1161 <main+0x51>
mov    -0x8(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    1153 <main+0x43>
mov    -0x8(%rbp),%esi
lea    0xeb2(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1126 <main+0x16>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
mov    $0x2,%ebx
lea    0xee0(%rip),%r14
jmp    1138 <main+0x28>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
add    $0x1,%ebx
cmp    $0x1f,%ebx
je     1149 <main+0x39>
test   $0x1,%bl
jne    1130 <main+0x20>
mov    %r14,%rdi
mov    %ebx,%esi
call   1030 <printf@plt>
jmp    1130 <main+0x20>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
store i32 2, i32* %2
br label %3
3: ; preds = %13, %0
%4 = load i32, i32* %2
%5 = icmp sle i32 %4, 30
br i1 %5, label %6, label %16
6: ; preds = %3
%7 = load i32, i32* %2
%8 = srem i32 %7, 2
%9 = icmp eq i32 %8, 0
br i1 %9, label %10, label %13
10: ; preds = %6
%11 = load i32, i32* %2
%12 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %11)
br label %13
13: ; preds = %10, %6
%14 = load i32, i32* %2
%15 = add nsw i32 %14, 1
store i32 %15, i32* %2
br label %3
16: ; preds = %3
ret i32 0
}

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
br label %1
1: ; preds = %0, %7
%2 = phi i32 [ 2, %0 ], [ %8, %7 ]
%3 = and i32 %2, 1
%4 = icmp eq i32 %3, 0
br i1 %4, label %5, label %7
5: ; preds = %1
%6 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %2)
br label %7
7: ; preds = %5, %1
%8 = add nuw nsw i32 %2, 1
%9 = icmp eq i32 %8, 31
br i1 %9, label %10, label %1
10: ; preds = %7
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ say(char *, int);
void talk(void) { say("The old lady has a ton of liquor up here!", 1); }


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

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

LLVM IR (-O0):
@.str = [42 x i8] c"The old lady has a ton of liquor up here!\00"
define void @talk() {
%1 = call i32 @say(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str, i64 0, i64 0), i32 1)
ret void
}

LLVM IR (-O2):
@.str = [42 x i8] c"The old lady has a ton of liquor up here!\00"
define void @talk() {
%1 = tail call i32 @say(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str, i64 0, i64 0), i32 1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *);
void NeverRunFunc() {
  printf("Hello Overflow World.\n");
  exit(0);
}


x86 assembly (clang, -O0):
<NeverRunFunc>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
xor    %edi,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<NeverRunFunc>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <puts@plt>
xor    %edi,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [23 x i8] c"Hello Overflow World.\0A\00"
define void @NeverRunFunc() {
%1 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@str = [22 x i8] c"Hello Overflow World.\00"
define void @NeverRunFunc() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @exit(i32 0)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ printMatrixClockwisely(int **, int, int);
int main(int argc, const char *argv[]) {
  int matrix[][5] = {1, 2,  3,  4,  17, 5,  6,  7,  8,  18,
                     9, 10, 11, 12, 19, 13, 14, 15, 16, 20};
  printMatrixClockwisely(matrix, 4, 5);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    -0x60(%rbp),%rdi
lea    0xebf(%rip),%rsi
mov    $0x50,%edx
call   1030 <memcpy@plt>
lea    -0x60(%rbp),%rdi
mov    $0x4,%esi
mov    $0x5,%edx
call   1040 <printMatrixClockwisely@plt>
xor    %eax,%eax
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x58,%rsp
movaps 0xf25(%rip),%xmm0
movaps %xmm0,0x40(%rsp)
movaps 0xf09(%rip),%xmm0
movaps %xmm0,0x30(%rsp)
movaps 0xeed(%rip),%xmm0
movaps %xmm0,0x20(%rsp)
movaps 0xed1(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0xeb5(%rip),%xmm0
movaps %xmm0,(%rsp)
mov    %rsp,%rdi
mov    $0x4,%esi
mov    $0x5,%edx
call   1030 <printMatrixClockwisely@plt>
xor    %eax,%eax
add    $0x58,%rsp
ret

LLVM IR (-O0):
@__const.main.matrix = [4 x [5 x i32]] [[5 x i32] [i32 1, i32 2, i32 3, i32 4, i32 17], [5 x i32] [i32 5, i32 6, i32 7, i32 8, i32 18], [5 x i32] [i32 9, i32 10, i32 11, i32 12, i32 19], [5 x i32] [i32 13, i32 14, i32 15, i32 16, i32 20]]
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca [4 x [5 x i32]]
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = bitcast [4 x [5 x i32]]* %6 to i8*
%8 = getelementptr inbounds [4 x [5 x i32]], [4 x [5 x i32]]* %6, i64 0, i64 0
%9 = bitcast [5 x i32]* %8 to i32**
%10 = call i32 @printMatrixClockwisely(i32** %9, i32 4, i32 5)
ret i32 0
}

LLVM IR (-O2):
@__const.main.matrix = [4 x [5 x i32]] [[5 x i32] [i32 1, i32 2, i32 3, i32 4, i32 17], [5 x i32] [i32 5, i32 6, i32 7, i32 8, i32 18], [5 x i32] [i32 9, i32 10, i32 11, i32 12, i32 19], [5 x i32] [i32 13, i32 14, i32 15, i32 16, i32 20]]
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca [4 x [5 x i32]]
%4 = bitcast [4 x [5 x i32]]* %3 to i8*
%5 = bitcast [4 x [5 x i32]]* %3 to i32**
%6 = call i32 @printMatrixClockwisely(i32** %5, i32 4, i32 5)
ret i32 0
}
float k_evolve(float absm, float z, float q0, float q1, float qz0) {
  return (absm + q0 * (1. + q1 * (z - qz0)) * (z - qz0));
}


x86 assembly (clang, -O0):
<k_evolve>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  %xmm2,-0xc(%rbp)
movss  %xmm3,-0x10(%rbp)
movss  %xmm4,-0x14(%rbp)
movss  -0x4(%rbp),%xmm0
cvtss2sd %xmm0,%xmm1
movss  -0xc(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movss  -0x10(%rbp),%xmm2
movss  -0x8(%rbp),%xmm3
subss  -0x14(%rbp),%xmm3
mulss  %xmm3,%xmm2
cvtss2sd %xmm2,%xmm3
movsd  0xeb2(%rip),%xmm2
addsd  %xmm3,%xmm2
mulsd  %xmm2,%xmm0
movss  -0x8(%rbp),%xmm2
subss  -0x14(%rbp),%xmm2
cvtss2sd %xmm2,%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<k_evolve>:
cvtss2sd %xmm0,%xmm0
cvtss2sd %xmm2,%xmm2
subss  %xmm4,%xmm1
mulss  %xmm1,%xmm3
cvtss2sd %xmm3,%xmm3
addsd  0xee4(%rip),%xmm3
mulsd  %xmm2,%xmm3
cvtss2sd %xmm1,%xmm1
mulsd  %xmm3,%xmm1
addsd  %xmm0,%xmm1
xorps  %xmm0,%xmm0
cvtsd2ss %xmm1,%xmm0
ret

LLVM IR (-O0):
define float @k_evolve(float %0, float %1, float %2, float %3, float %4) {
%6 = alloca float
%7 = alloca float
%8 = alloca float
%9 = alloca float
%10 = alloca float
store float %0, float* %6
store float %1, float* %7
store float %2, float* %8
store float %3, float* %9
store float %4, float* %10
%11 = load float, float* %6
%12 = fpext float %11 to double
%13 = load float, float* %8
%14 = fpext float %13 to double
%15 = load float, float* %9
%16 = load float, float* %7
%17 = load float, float* %10
%18 = fsub float %16, %17
%19 = fmul float %15, %18
%20 = fpext float %19 to double
%21 = fadd double 1.000000e+00, %20
%22 = fmul double %14, %21
%23 = load float, float* %7
%24 = load float, float* %10
%25 = fsub float %23, %24
%26 = fpext float %25 to double
%27 = call double @llvm.fmuladd.f64(double %22, double %26, double %12)
%28 = fptrunc double %27 to float
ret float %28
}

LLVM IR (-O2):
define float @k_evolve(float %0, float %1, float %2, float %3, float %4) {
%6 = fpext float %0 to double
%7 = fpext float %2 to double
%8 = fsub float %1, %4
%9 = fmul float %8, %3
%10 = fpext float %9 to double
%11 = fadd double %10, 1.000000e+00
%12 = fmul double %11, %7
%13 = fpext float %8 to double
%14 = tail call double @llvm.fmuladd.f64(double %12, double %13, double %6)
%15 = fptrunc double %14 to float
ret float %15
}
void copy(char to[], char from[]) {
  for (int i = 0; (to[i] = from[i]) != '\0'; ++i)
    ;
}


x86 assembly (clang, -O0):
<copy>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,1),%al
mov    -0x8(%rbp),%rcx
movslq -0x14(%rbp),%rdx
mov    %al,(%rcx,%rdx,1)
movsbl %al,%eax
cmp    $0x0,%eax
je     1148 <copy+0x48>
jmp    113a <copy+0x3a>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1113 <copy+0x13>
pop    %rbp
ret

x86 assembly (clang, -O2):
<copy>:
xor    %eax,%eax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movzbl (%rsi,%rax,1),%ecx
mov    %cl,(%rdi,%rax,1)
add    $0x1,%rax
test   %cl,%cl
jne    1110 <copy+0x10>
ret

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

LLVM IR (-O2):
define void @copy(i8* nocapture writeonly %0, i8* nocapture %1) {
br label %3
3: ; preds = %3, %2
%4 = phi i64 [ %9, %3 ], [ 0, %2 ]
%5 = getelementptr inbounds i8, i8* %1, i64 %4
%6 = load i8, i8* %5
%7 = getelementptr inbounds i8, i8* %0, i64 %4
store i8 %6, i8* %7
%8 = icmp eq i8 %6, 0
%9 = add nuw i64 %4, 1
br i1 %8, label %10, label %3
10: ; preds = %3
ret void
}
void bar_long(void) { foo_long(2L - 3Li); }


x86 assembly (clang, -O0):
<bar_long>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movq   $0x2,-0x10(%rbp)
movq   $0xfffffffffffffffd,-0x8(%rbp)
ff
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rsi
mov    $0x0,%al
call   1030 <foo_long@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bar_long>:
mov    $0x2,%edi
mov    $0xfffffffffffffffd,%rsi
xor    %eax,%eax
jmp    1030 <foo_long@plt>

LLVM IR (-O0):
define void @bar_long() {
%1 = alloca { i64, i64 }
%2 = getelementptr inbounds { i64, i64 }, { i64, i64 }* %1, i32 0, i32 0
%3 = getelementptr inbounds { i64, i64 }, { i64, i64 }* %1, i32 0, i32 1
store i64 2, i64* %2
store i64 -3, i64* %3
%4 = getelementptr inbounds { i64, i64 }, { i64, i64 }* %1, i32 0, i32 0
%5 = load i64, i64* %4
%6 = getelementptr inbounds { i64, i64 }, { i64, i64 }* %1, i32 0, i32 1
%7 = load i64, i64* %6
%8 = call i32 (i64, i64, ...) bitcast (i32 (...)* @foo_long to i32 (i64, i64, ...)*)(i64 %5, i64 %7)
ret void
}

LLVM IR (-O2):
define void @bar_long() {
%1 = tail call i32 (i64, i64, ...) bitcast (i32 (...)* @foo_long to i32 (i64, i64, ...)*)(i64 2, i64 -3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ arm_msr_imm_op();
int /*<<< orphan*/ arm_reg_to_psr(int /*<<< orphan*/);
void arm_msr_imm() { arm_reg_to_psr(arm_msr_imm_op()); }


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

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

LLVM IR (-O0):
define void @arm_msr_imm() {
%1 = call i32 (...) @arm_msr_imm_op()
%2 = call i32 @arm_reg_to_psr(i32 %1)
ret void
}

LLVM IR (-O2):
define void @arm_msr_imm() {
%1 = tail call i32 (...) @arm_msr_imm_op()
%2 = tail call i32 @arm_reg_to_psr(i32 %1)
ret void
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  scalar_t__ nchars;
};
typedef TYPE_1__ XmbTextItem;

/* Variables and functions */
int get_XmbTextItem_nchars(void *_p) {
  return (int)((XmbTextItem *)_p)->nchars;
}


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

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

LLVM IR (-O0):
%struct.TYPE_2__ = type { i64 }
define i32 @get_XmbTextItem_nchars(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = bitcast i8* %3 to %struct.TYPE_2__*
%5 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %4, i32 0, i32 0
%6 = load i64, i64* %5
%7 = trunc i64 %6 to i32
ret i32 %7
}

LLVM IR (-O2):
define i32 @get_XmbTextItem_nchars(i8* nocapture %0) {
%2 = bitcast i8* %0 to i64*
%3 = load i64, i64* %2
%4 = trunc i64 %3 to i32
ret i32 %4
}
int test_imm_70uint64_midword_reg(unsigned long long val) {
  return ((val >> 16) & (0x70 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_70uint64_midword_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdx
shr    $0x10,%rdx
and    $0x70,%rdx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%rdx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_70uint64_midword_reg>:
test   $0x700000,%edi
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_70uint64_midword_reg(i64 %0) {
%2 = and i64 %0, 7340032
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
double SepPenalty2(int ival, int itarget) {
  double fval;
  if (!itarget)
    return (0);
  fval = (double)ival / (double)itarget;
  if (!ival)
    fval = 1.0 / (double)itarget;
  return (1 / (7 * fval + 0.2) - (1 / 7.2));
}


x86 assembly (clang, -O0):
<SepPenalty2>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0xc(%rbp)
mov    %esi,-0x10(%rbp)
cmpl   $0x0,-0x10(%rbp)
jne    1121 <SepPenalty2+0x21>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    118e <SepPenalty2+0x8e>
cvtsi2sdl -0xc(%rbp),%xmm0
cvtsi2sdl -0x10(%rbp),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x18(%rbp)
cmpl   $0x0,-0xc(%rbp)
jne    1154 <SepPenalty2+0x54>
cvtsi2sdl -0x10(%rbp),%xmm1
movsd  0xeb5(%rip),%xmm0
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm1
movsd  0xeaf(%rip),%xmm0
mulsd  %xmm0,%xmm1
movsd  0xeab(%rip),%xmm0
addsd  %xmm0,%xmm1
movsd  0xe87(%rip),%xmm0
divsd  %xmm1,%xmm0
movsd  0xe83(%rip),%xmm1
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<SepPenalty2>:
test   %esi,%esi
je     1140 <SepPenalty2+0x40>
cvtsi2sd %esi,%xmm2
movsd  0xef0(%rip),%xmm0
movapd %xmm0,%xmm1
test   %edi,%edi
je     111f <SepPenalty2+0x1f>
xorps  %xmm1,%xmm1
cvtsi2sd %edi,%xmm1
divsd  %xmm2,%xmm1
mulsd  0xedd(%rip),%xmm1
addsd  0xedd(%rip),%xmm1
divsd  %xmm1,%xmm0
addsd  0xed9(%rip),%xmm0
ret
xorps  %xmm0,%xmm0
ret

LLVM IR (-O0):
define double @SepPenalty2(i32 %0, i32 %1) {
%3 = alloca double
%4 = alloca i32
%5 = alloca i32
%6 = alloca double
store i32 %0, i32* %4
store i32 %1, i32* %5
%7 = load i32, i32* %5
%8 = icmp ne i32 %7, 0
br i1 %8, label %10, label %9
9: ; preds = %2
store double 0.000000e+00, double* %3
br label %27
10: ; preds = %2
%11 = load i32, i32* %4
%12 = sitofp i32 %11 to double
%13 = load i32, i32* %5
%14 = sitofp i32 %13 to double
%15 = fdiv double %12, %14
store double %15, double* %6
%16 = load i32, i32* %4
%17 = icmp ne i32 %16, 0
br i1 %17, label %22, label %18
18: ; preds = %10
%19 = load i32, i32* %5
%20 = sitofp i32 %19 to double
%21 = fdiv double 1.000000e+00, %20
store double %21, double* %6
br label %22
22: ; preds = %18, %10
%23 = load double, double* %6
%24 = call double @llvm.fmuladd.f64(double 7.000000e+00, double %23, double 2.000000e-01)
%25 = fdiv double 1.000000e+00, %24
%26 = fsub double %25, 0x3FC1C71C71C71C72
store double %26, double* %3
br label %27
27: ; preds = %22, %9
%28 = load double, double* %3
ret double %28
}

LLVM IR (-O2):
define double @SepPenalty2(i32 %0, i32 %1) {
%3 = icmp eq i32 %1, 0
br i1 %3, label %13, label %4
4: ; preds = %2
%5 = sitofp i32 %0 to double
%6 = sitofp i32 %1 to double
%7 = icmp eq i32 %0, 0
%8 = select i1 %7, double 1.000000e+00, double %5
%9 = fdiv double %8, %6
%10 = tail call double @llvm.fmuladd.f64(double %9, double 7.000000e+00, double 2.000000e-01)
%11 = fdiv double 1.000000e+00, %10
%12 = fadd double %11, 0xBFC1C71C71C71C72
br label %13
13: ; preds = %2, %4
%14 = phi double [ %12, %4 ], [ 0.000000e+00, %2 ]
ret double %14
}
/* Variables and functions */
scalar_t__ __VERIFIER_nondet_int();
int /*<<< orphan*/ my_thread1();
int /*<<< orphan*/ my_thread2();
void *thr2(void *arg) {
  if (__VERIFIER_nondet_int())
    my_thread1();
  else
    my_thread2();
  return 0;
}


x86 assembly (clang, -O0):
<thr2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x0,%al
call   1040 <__VERIFIER_nondet_int@plt>
cmp    $0x0,%rax
je     1159 <thr2+0x29>
mov    $0x0,%al
call   1030 <my_thread1@plt>
jmp    1160 <thr2+0x30>
mov    $0x0,%al
call   1050 <my_thread2@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<thr2>:
push   %rax
xor    %eax,%eax
call   1040 <__VERIFIER_nondet_int@plt>
test   %rax,%rax
je     1146 <thr2+0x16>
xor    %eax,%eax
call   1030 <my_thread1@plt>
jmp    114d <thr2+0x1d>
xor    %eax,%eax
call   1050 <my_thread2@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i8* @thr2(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i64 (...) @__VERIFIER_nondet_int()
%4 = icmp ne i64 %3, 0
br i1 %4, label %5, label %7
5: ; preds = %1
%6 = call i32 (...) @my_thread1()
br label %9
7: ; preds = %1
%8 = call i32 (...) @my_thread2()
br label %9
9: ; preds = %7, %5
ret i8* null
}

LLVM IR (-O2):
define noalias i8* @thr2(i8* nocapture readnone %0) {
%2 = tail call i64 (...) @__VERIFIER_nondet_int()
%3 = icmp eq i64 %2, 0
br i1 %3, label %6, label %4
4: ; preds = %1
%5 = tail call i32 (...) @my_thread1()
br label %8
6: ; preds = %1
%7 = tail call i32 (...) @my_thread2()
br label %8
8: ; preds = %6, %4
ret i8* null
}
void foo468() {}


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

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

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

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