xunge/DecIR huggingface dataset:
int alphasort(const struct dirent **d1, const struct dirent **d2) {
  anvil_syslog(0, "%s unimplemented\n", __FUNCTION__);
  return 0;
}


x86 assembly (clang, -O0):
<alphasort>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
xor    %edi,%edi
lea    0xed7(%rip),%rsi
lea    0xee2(%rip),%rdx
mov    $0x0,%al
call   1030 <anvil_syslog@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<alphasort>:
push   %rax
lea    0xee8(%rip),%rsi
lea    0xef3(%rip),%rdx
xor    %edi,%edi
xor    %eax,%eax
call   1030 <anvil_syslog@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.dirent = type opaque
@.str = [18 x i8] c"%s unimplemented\0A\00"
@__FUNCTION__.alphasort = [10 x i8] c"alphasort\00"
define i32 @alphasort(%struct.dirent** %0, %struct.dirent** %1) {
%3 = alloca %struct.dirent**
%4 = alloca %struct.dirent**
store %struct.dirent** %0, %struct.dirent*** %3
store %struct.dirent** %1, %struct.dirent*** %4
%5 = call i32 (i32, i8*, i8*, ...) bitcast (i32 (...)* @anvil_syslog to i32 (i32, i8*, i8*, ...)*)(i32 0, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @__FUNCTION__.alphasort, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
%struct.dirent = type opaque
@.str = [18 x i8] c"%s unimplemented\0A\00"
@__FUNCTION__.alphasort = [10 x i8] c"alphasort\00"
define i32 @alphasort(%struct.dirent** nocapture readnone %0, %struct.dirent** nocapture readnone %1) {
%3 = tail call i32 (i32, i8*, i8*, ...) bitcast (i32 (...)* @anvil_syslog to i32 (i32, i8*, i8*, ...)*)(i32 0, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @__FUNCTION__.alphasort, i64 0, i64 0))
ret i32 0
}
void INT_Excep_PERIB_INTB128(void) {}


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

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

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

LLVM IR (-O2):
define void @INT_Excep_PERIB_INTB128() {
ret void
}
/* Variables and functions */
void *malloc(size_t);
int /*<<< orphan*/ msgMessage(int, char *, size_t, char *);
void *CheckMalloc(size_t size) {
  register void *r;
  if (!(r = malloc(size)))
    msgMessage((0x1000 | 0x0800 | 0x0001), "Can't malloc %d byte%s", size,
               size == 1 ? "" : "s");
  return r;
}


x86 assembly (clang, -O0):
<CheckMalloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <malloc@plt>
mov    %rax,-0x10(%rbp)
cmp    $0x0,%rax
jne    1172 <CheckMalloc+0x52>
mov    -0x8(%rbp),%rdx
mov    -0x8(%rbp),%rsi
lea    0xec3(%rip),%rcx
lea    0xebd(%rip),%rax
cmp    $0x1,%rsi
cmove  %rax,%rcx
mov    $0x1801,%edi
lea    0xe93(%rip),%rsi
call   1040 <msgMessage@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<CheckMalloc>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
call   1030 <malloc@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    115e <CheckMalloc+0x3e>
cmp    $0x1,%r14
lea    0xed7(%rip),%rax
lea    0xecf(%rip),%rcx
cmove  %rax,%rcx
lea    0xeaf(%rip),%rsi
mov    $0x1801,%edi
mov    %r14,%rdx
call   1040 <msgMessage@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [23 x i8] c"Can't malloc %d byte%s\00"
@.str.1 = [1 x i8] zeroinitializer
@.str.2 = [2 x i8] c"s\00"
define i8* @CheckMalloc(i64 %0) {
%2 = alloca i64
%3 = alloca i8*
store i64 %0, i64* %2
%4 = load i64, i64* %2
%5 = call i8* @malloc(i64 %4)
store i8* %5, i8** %3
%6 = icmp ne i8* %5, null
br i1 %6, label %14, label %7
7: ; preds = %1
%8 = load i64, i64* %2
%9 = load i64, i64* %2
%10 = icmp eq i64 %9, 1
%11 = zext i1 %10 to i64
%12 = select i1 %10, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0)
%13 = call i32 @msgMessage(i32 6145, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i64 %8, i8* %12)
br label %14
14: ; preds = %7, %1
%15 = load i8*, i8** %3
ret i8* %15
}

LLVM IR (-O2):
@.str = [23 x i8] c"Can't malloc %d byte%s\00"
@.str.1 = [1 x i8] zeroinitializer
@.str.2 = [2 x i8] c"s\00"
define noalias i8* @CheckMalloc(i64 %0) {
%2 = tail call i8* @malloc(i64 %0)
%3 = icmp eq i8* %2, null
br i1 %3, label %4, label %8
4: ; preds = %1
%5 = icmp eq i64 %0, 1
%6 = select i1 %5, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0)
%7 = tail call i32 @msgMessage(i32 6145, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i64 %0, i8* %6)
br label %8
8: ; preds = %4, %1
ret i8* %2
}
/* Variables and functions */
scalar_t__ xLn_Beta_Function(long double, long double);
double Ln_Beta_Function(double a, double b) {
  return (double)xLn_Beta_Function((long double)a, (long double)b);
}


x86 assembly (clang, -O0):
<Ln_Beta_Function>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
fldl   -0x8(%rbp)
fldl   -0x10(%rbp)
mov    %rsp,%rax
fstpt  0x10(%rax)
fstpt  (%rax)
call   1030 <xLn_Beta_Function@plt>
cvtsi2sd %rax,%xmm0
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Ln_Beta_Function>:
sub    $0x38,%rsp
movsd  %xmm0,0x30(%rsp)
fldl   0x30(%rsp)
movsd  %xmm1,0x28(%rsp)
fldl   0x28(%rsp)
fstpt  0x10(%rsp)
fstpt  (%rsp)
call   1030 <xLn_Beta_Function@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %rax,%xmm0
add    $0x38,%rsp
ret

LLVM IR (-O0):
define double @Ln_Beta_Function(double %0, double %1) {
%3 = alloca double
%4 = alloca double
store double %0, double* %3
store double %1, double* %4
%5 = load double, double* %3
%6 = fpext double %5 to x86_fp80
%7 = load double, double* %4
%8 = fpext double %7 to x86_fp80
%9 = call i64 @xLn_Beta_Function(x86_fp80 %6, x86_fp80 %8)
%10 = sitofp i64 %9 to double
ret double %10
}

LLVM IR (-O2):
define double @Ln_Beta_Function(double %0, double %1) {
%3 = fpext double %0 to x86_fp80
%4 = fpext double %1 to x86_fp80
%5 = tail call i64 @xLn_Beta_Function(x86_fp80 %3, x86_fp80 %4)
%6 = sitofp i64 %5 to double
ret double %6
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int function1(int *myptr) {
  printf("If this worked correctly\n");
  printf("this value should be four more than\n");
  printf("entered.\n");
  return *myptr += 4;
}


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

x86 assembly (clang, -O2):
<function1>:
push   %rbx
mov    %rdi,%rbx
lea    0xee5(%rip),%rdi
call   1030 <puts@plt>
lea    0xef2(%rip),%rdi
call   1030 <puts@plt>
lea    0xf0a(%rip),%rdi
call   1030 <puts@plt>
mov    (%rbx),%eax
add    $0x4,%eax
mov    %eax,(%rbx)
pop    %rbx
ret

LLVM IR (-O0):
@.str = [26 x i8] c"If this worked correctly\0A\00"
@.str.1 = [37 x i8] c"this value should be four more than\0A\00"
@.str.2 = [10 x i8] c"entered.\0A\00"
define i32 @function1(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.1, i64 0, i64 0))
%5 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0))
%6 = load i32*, i32** %2
%7 = load i32, i32* %6
%8 = add nsw i32 %7, 4
store i32 %8, i32* %6
ret i32 %8
}

LLVM IR (-O2):
@str = [25 x i8] c"If this worked correctly\00"
@str.3 = [36 x i8] c"this value should be four more than\00"
@str.4 = [9 x i8] c"entered.\00"
define i32 @function1(i32* nocapture %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @str, i64 0, i64 0))
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([36 x i8], [36 x i8]* @str.3, i64 0, i64 0))
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @str.4, i64 0, i64 0))
%5 = load i32, i32* %0
%6 = add nsw i32 %5, 4
store i32 %6, i32* %0
ret i32 %6
}
/* Variables and functions */
int errno;
scalar_t__ rename(char const *, char const *);
int dss_rename(const char *old_path, const char *new_path) {
  if (rename(old_path, new_path) >= 0)
    return 1;
  return -((errno) | (1 << 30));
}


x86 assembly (clang, -O0):
<dss_rename>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1030 <rename@plt>
cmp    $0x0,%rax
jl     1143 <dss_rename+0x33>
movl   $0x1,-0x4(%rbp)
jmp    1159 <dss_rename+0x49>
mov    0x2e96(%rip),%rax
mov    (%rax),%ecx
or     $0x40000000,%ecx
xor    %eax,%eax
sub    %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dss_rename>:
push   %rax
call   1030 <rename@plt>
mov    0x2ec3(%rip),%rcx
mov    $0x40000000,%edx
or     (%rcx),%edx
neg    %edx
test   %rax,%rax
mov    $0x1,%eax
cmovs  %edx,%eax
pop    %rcx
ret

LLVM IR (-O0):
@errno = global i32 0
define i32 @dss_rename(i8* %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i8*
store i8* %0, i8** %4
store i8* %1, i8** %5
%6 = load i8*, i8** %4
%7 = load i8*, i8** %5
%8 = call i64 @rename(i8* %6, i8* %7)
%9 = icmp sge i64 %8, 0
br i1 %9, label %10, label %11
10: ; preds = %2
store i32 1, i32* %3
br label %15
11: ; preds = %2
%12 = load i32, i32* @errno
%13 = or i32 %12, 1073741824
%14 = sub nsw i32 0, %13
store i32 %14, i32* %3
br label %15
15: ; preds = %11, %10
%16 = load i32, i32* %3
ret i32 %16
}

LLVM IR (-O2):
@errno = global i32 0
define i32 @dss_rename(i8* nocapture %0, i8* nocapture %1) {
%3 = tail call i64 @rename(i8* %0, i8* %1)
%4 = icmp sgt i64 %3, -1
%5 = load i32, i32* @errno
%6 = or i32 %5, 1073741824
%7 = sub nsw i32 0, %6
%8 = select i1 %4, i32 1, i32 %7
ret i32 %8
}
/* Type definitions */
typedef int /*<<< orphan*/ __m64;

/* Variables and functions */
int /*<<< orphan*/ _mm_srli_si64(int /*<<< orphan*/, int);
__m64 test72(__m64 a) { return _mm_srli_si64(a, 3); }


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

x86 assembly (clang, -O2):
<test72>:
mov    $0x3,%esi
jmp    1030 <_mm_srli_si64@plt>

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

LLVM IR (-O2):
define i32 @test72(i32 %0) {
%2 = tail call i32 @_mm_srli_si64(i32 %0, i32 3)
ret i32 %2
}
void XtWindowToWidget() {}


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

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

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

LLVM IR (-O2):
define void @XtWindowToWidget() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printPascal(int);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ scanf(char *, int *);
int main(int argc, const char *argv[]) {
  int n;
  printf(" ? line : ");
  scanf("%d", &n);
  printPascal(n);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xeb3(%rip),%rdi
call   1030 <printf@plt>
lea    0xeb2(%rip),%rdi
lea    -0x14(%rbp),%rsi
call   1050 <scanf@plt>
mov    -0x14(%rbp),%edi
call   1040 <printPascal@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xec8(%rip),%rdi
call   1030 <printf@plt>
lea    0xec7(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1050 <scanf@plt>
mov    0x4(%rsp),%edi
call   1040 <printPascal@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [11 x i8] c" ? line : \00"
@.str.1 = [3 x i8] c"%d\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca i32
%4 = bitcast i32* %3 to i8*
%5 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
%6 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %3)
%7 = load i32, i32* %3
%8 = call i32 @printPascal(i32 %7)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ questions(int);
int main(int argc, const char *argv[]) {
  questions(5);
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @questions(i32 5)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, void *);
void atexit(void *addr) { printf(">>> atexit(%p)\n", addr); }


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

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

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

LLVM IR (-O2):
@.str = [16 x i8] c">>> atexit(%p)\0A\00"
define void @atexit(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
int test_imm_01int64_midword_reg(long long val) {
  return ((val >> 16) & (0x01 << 0)) ? -20 : -40;
}


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

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

LLVM IR (-O0):
define i32 @test_imm_01int64_midword_reg(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = ashr i64 %3, 16
%5 = and i64 %4, 1
%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_01int64_midword_reg(i64 %0) {
%2 = and i64 %0, 65536
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ glWindowPos4f(int, int, int /*<<< orphan*/, int);
void glWindowPos2i(int x, int y) { glWindowPos4f(x, y, 0, 1); }


x86 assembly (clang, -O0):
<glWindowPos2i>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
xor    %edx,%edx
mov    $0x1,%ecx
call   1030 <glWindowPos4f@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<glWindowPos2i>:
xor    %edx,%edx
mov    $0x1,%ecx
jmp    1030 <glWindowPos4f@plt>

LLVM IR (-O0):
define void @glWindowPos2i(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 @glWindowPos4f(i32 %5, i32 %6, i32 0, i32 1)
ret void
}

LLVM IR (-O2):
define void @glWindowPos2i(i32 %0, i32 %1) {
%3 = tail call i32 @glWindowPos4f(i32 %0, i32 %1, i32 0, i32 1)
ret void
}
int munlockall() { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @munlockall() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ store_file(char *, int);
void store_index(char *word) { store_file(word, 1); }


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

x86 assembly (clang, -O2):
<store_index>:
mov    $0x1,%esi
jmp    1030 <store_file@plt>

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

LLVM IR (-O2):
define void @store_index(i8* %0) {
%2 = tail call i32 @store_file(i8* %0, i32 1)
ret void
}
void f5(void *p, unsigned n) { __builtin_bzero(p, n); }


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

x86 assembly (clang, -O2):
<f5>:
mov    %esi,%edx
xor    %esi,%esi
jmp    1030 <memset@plt>

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

LLVM IR (-O2):
define void @f5(i8* nocapture writeonly %0, i32 %1) {
%3 = zext i32 %1 to i64
tail call void @llvm.memset.p0i8.i64(i8* align 1 %0, i8 0, i64 %3, i1 false)
ret void
}
unsigned long my_zero_pfn(unsigned long addr) {
  extern unsigned long zero_pfn;
  return zero_pfn;
}


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

x86 assembly (clang, -O2):
<my_zero_pfn>:
mov    0x2ee1(%rip),%rax
mov    (%rax),%rax
ret

LLVM IR (-O0):
@zero_pfn = external global i64
define i64 @my_zero_pfn(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* @zero_pfn
ret i64 %3
}

LLVM IR (-O2):
@zero_pfn = external global i64
define i64 @my_zero_pfn(i64 %0) {
%2 = load i64, i64* @zero_pfn
ret i64 %2
}
int glyph_hash(int index__, int size, int style) {
  unsigned int h;
  h = index__ + (style << 24) + (size << 16);
  return h % 263;
}


x86 assembly (clang, -O0):
<glyph_hash>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x4(%rbp),%eax
mov    -0xc(%rbp),%ecx
shl    $0x18,%ecx
add    %ecx,%eax
mov    -0x8(%rbp),%ecx
shl    $0x10,%ecx
add    %ecx,%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
mov    $0x107,%ecx
xor    %edx,%edx
div    %ecx
mov    %edx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<glyph_hash>:
shl    $0x18,%edx
shl    $0x10,%esi
lea    (%rsi,%rdi,1),%eax
add    %edx,%eax
imul   $0x7c97d911,%rax,%rcx
shr    $0x27,%rcx
imul   $0x107,%ecx,%ecx
sub    %ecx,%eax
ret

LLVM IR (-O0):
define i32 @glyph_hash(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* %6
%10 = shl i32 %9, 24
%11 = add nsw i32 %8, %10
%12 = load i32, i32* %5
%13 = shl i32 %12, 16
%14 = add nsw i32 %11, %13
store i32 %14, i32* %7
%15 = load i32, i32* %7
%16 = urem i32 %15, 263
ret i32 %16
}

LLVM IR (-O2):
define i32 @glyph_hash(i32 %0, i32 %1, i32 %2) {
%4 = shl i32 %2, 24
%5 = shl i32 %1, 16
%6 = add i32 %5, %0
%7 = add i32 %6, %4
%8 = urem i32 %7, 263
ret i32 %8
}
int f3(int a, int b) { return b ^ (a | b); }


x86 assembly (clang, -O0):
<f3>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    -0x4(%rbp),%ecx
or     -0x8(%rbp),%ecx
xor    %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<f3>:
mov    %esi,%eax
not    %eax
and    %edi,%eax
ret

LLVM IR (-O0):
define i32 @f3(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = load i32, i32* %3
%7 = load i32, i32* %4
%8 = or i32 %6, %7
%9 = xor i32 %5, %8
ret i32 %9
}

LLVM IR (-O2):
define i32 @f3(i32 %0, i32 %1) {
%3 = xor i32 %1, -1
%4 = and i32 %3, %0
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int pa_channel_map_mask() {
  printf("NOT IMPLEMENTED:"
         "pa_channel_map_mask"
         "\n");
}


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

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

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

LLVM IR (-O2):
@str = [36 x i8] c"NOT IMPLEMENTED:pa_channel_map_mask\00"
define i32 @pa_channel_map_mask() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([36 x i8], [36 x i8]* @str, i64 0, i64 0))
ret i32 undef
}
void fu(void) {}


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

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

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

LLVM IR (-O2):
define void @fu() {
ret void
}
unsigned long ADCReferenceGet(unsigned long ulBase) {
  ;
  return ((*((volatile unsigned long *)(ulBase + 0x00000038))) & 0x00000003);
}


x86 assembly (clang, -O0):
<ADCReferenceGet>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    0x38(%rax),%rax
and    $0x3,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ADCReferenceGet>:
mov    0x38(%rdi),%rax
and    $0x3,%eax
ret

LLVM IR (-O0):
define i64 @ADCReferenceGet(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = add i64 %3, 56
%5 = inttoptr i64 %4 to i64*
%6 = load volatile i64, i64* %5
%7 = and i64 %6, 3
ret i64 %7
}

LLVM IR (-O2):
define i64 @ADCReferenceGet(i64 %0) {
%2 = add i64 %0, 56
%3 = inttoptr i64 %2 to i64*
%4 = load volatile i64, i64* %3
%5 = and i64 %4, 3
ret i64 %5
}
/* Variables and functions */
int random();
int _random_level() {
  int level = 1;
  while ((random() & 0xFFFF) < (0.25 * 0xFFFF)) {
    level += 1;
  }
  return (level < 32) ? level : 32;
}


x86 assembly (clang, -O0):
<_random_level>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x1,-0x4(%rbp)
mov    $0x0,%al
call   1030 <random@plt>
and    $0xffff,%eax
cvtsi2sd %eax,%xmm1
movsd  0xec9(%rip),%xmm0
ucomisd %xmm1,%xmm0
jbe    114f <_random_level+0x3f>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    111f <_random_level+0xf>
cmpl   $0x20,-0x4(%rbp)
jge    1164 <_random_level+0x54>
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
jmp    1171 <_random_level+0x61>
mov    $0x20,%eax
mov    %eax,-0x8(%rbp)
jmp    1171 <_random_level+0x61>
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_random_level>:
push   %rbx
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
xor    %eax,%eax
call   1030 <random@plt>
add    $0x1,%ebx
test   $0xc000,%eax
je     1120 <_random_level+0x10>
cmp    $0x20,%ebx
mov    $0x20,%eax
cmovb  %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @_random_level() {
%1 = alloca i32
store i32 1, i32* %1
br label %2
2: ; preds = %7, %0
%3 = call i32 (...) @random()
%4 = and i32 %3, 65535
%5 = sitofp i32 %4 to double
%6 = fcmp olt double %5, 0x40CFFFE000000000
br i1 %6, label %7, label %10
7: ; preds = %2
%8 = load i32, i32* %1
%9 = add nsw i32 %8, 1
store i32 %9, i32* %1
br label %2
10: ; preds = %2
%11 = load i32, i32* %1
%12 = icmp slt i32 %11, 32
br i1 %12, label %13, label %15
13: ; preds = %10
%14 = load i32, i32* %1
br label %16
15: ; preds = %10
br label %16
16: ; preds = %15, %13
%17 = phi i32 [ %14, %13 ], [ 32, %15 ]
ret i32 %17
}

LLVM IR (-O2):
define i32 @_random_level() {
br label %1
1: ; preds = %1, %0
%2 = phi i32 [ 1, %0 ], [ %6, %1 ]
%3 = tail call i32 (...) @random()
%4 = and i32 %3, 49152
%5 = icmp eq i32 %4, 0
%6 = add nuw nsw i32 %2, 1
br i1 %5, label %1, label %7
7: ; preds = %1
%8 = icmp ult i32 %2, 32
%9 = select i1 %8, i32 %2, i32 32
ret i32 %9
}
/* Variables and functions */
size_t strtoul(char const *, char **, int);
size_t r_strtoul(const char *nptr, char **endptr, int base) {
  return strtoul(nptr, endptr, base);
}


x86 assembly (clang, -O0):
<r_strtoul>:
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
mov    -0x14(%rbp),%edx
call   1030 <strtoul@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<r_strtoul>:
jmp    1030 <strtoul@plt>

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

LLVM IR (-O2):
define i64 @r_strtoul(i8* %0, i8** nocapture %1, i32 %2) {
%4 = tail call i64 @strtoul(i8* %0, i8** %1, i32 %2)
ret i64 %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int);
void printdata(int a, int b) { printf("a=%d\nb=%d\n", a, b); }


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

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

LLVM IR (-O0):
@.str = [11 x i8] c"a=%d\0Ab=%d\0A\00"
define void @printdata(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 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i32 %5, i32 %6)
ret void
}

LLVM IR (-O2):
@.str = [11 x i8] c"a=%d\0Ab=%d\0A\00"
define void @printdata(i32 %0, i32 %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i32 %0, i32 %1)
ret void
}
/* Variables and functions */
int errno;
int setErrno(int newno) {
  errno = newno;
  return newno;
}


x86 assembly (clang, -O0):
<setErrno>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%ecx
mov    0x2ecf(%rip),%rax
mov    %ecx,(%rax)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<setErrno>:
mov    %edi,%eax
mov    0x2ed7(%rip),%rcx
mov    %edi,(%rcx)
ret

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

LLVM IR (-O2):
@errno = global i32 0
define i32 @setErrno(i32 returned %0) {
store i32 %0, i32* @errno
ret i32 %0
}
/* Variables and functions */
int /*<<< orphan*/ STDOUT_FILENO;
scalar_t__ write(int /*<<< orphan*/, char *, int);
void readline_clear_screen(void) {
  if (write(STDOUT_FILENO, "\x1b[H\x1b[2J", 7) <= 0) {
  }
}


x86 assembly (clang, -O0):
<readline_clear_screen>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ed5(%rip),%rax
mov    (%rax),%edi
lea    0xedc(%rip),%rsi
mov    $0x7,%edx
call   1030 <write@plt>
cmp    $0x0,%rax
jg     113d <readline_clear_screen+0x2d>
jmp    113d <readline_clear_screen+0x2d>
pop    %rbp
ret

x86 assembly (clang, -O2):
<readline_clear_screen>:
mov    0x2ed9(%rip),%rax
mov    (%rax),%edi
lea    0xee0(%rip),%rsi
mov    $0x7,%edx
jmp    1030 <write@plt>

LLVM IR (-O0):
@STDOUT_FILENO = global i32 0
@.str = [8 x i8] c"\1B[H\1B[2J\00"
define void @readline_clear_screen() {
%1 = load i32, i32* @STDOUT_FILENO
%2 = call i64 @write(i32 %1, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 7)
%3 = icmp sle i64 %2, 0
br i1 %3, label %4, label %5
4: ; preds = %0
br label %5
5: ; preds = %4, %0
ret void
}

LLVM IR (-O2):
@STDOUT_FILENO = global i32 0
@.str = [8 x i8] c"\1B[H\1B[2J\00"
define void @readline_clear_screen() {
%1 = load i32, i32* @STDOUT_FILENO
%2 = tail call i64 @write(i32 %1, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 7)
ret void
}
/* Variables and functions */
int dupd_memcmp(const char *b1, const char *b2, size_t n) {
  while (n) {
    if (*b1++ != *b2++) {
      return 1;
    }
    n--;
  }
  return 0;
}


x86 assembly (clang, -O0):
<dupd_memcmp>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
cmpq   $0x0,-0x20(%rbp)
je     1164 <dupd_memcmp+0x64>
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x10(%rbp)
movsbl (%rax),%eax
mov    -0x18(%rbp),%rcx
mov    %rcx,%rdx
add    $0x1,%rdx
mov    %rdx,-0x18(%rbp)
movsbl (%rcx),%ecx
cmp    %ecx,%eax
je     1153 <dupd_memcmp+0x53>
movl   $0x1,-0x4(%rbp)
jmp    116b <dupd_memcmp+0x6b>
mov    -0x20(%rbp),%rax
add    $0xffffffffffffffff,%rax
mov    %rax,-0x20(%rbp)
jmp    1110 <dupd_memcmp+0x10>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<dupd_memcmp>:
test   %rdx,%rdx
je     1122 <dupd_memcmp+0x22>
xor    %eax,%eax
nopw   0x0(%rax,%rax,1)
movzbl (%rdi,%rax,1),%ecx
cmp    (%rsi,%rax,1),%cl
jne    1125 <dupd_memcmp+0x25>
add    $0x1,%rax
cmp    %rax,%rdx
jne    1110 <dupd_memcmp+0x10>
xor    %eax,%eax
ret
mov    $0x1,%eax
ret

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

LLVM IR (-O2):
define i32 @dupd_memcmp(i8* nocapture %0, i8* nocapture %1, i64 %2) {
%4 = icmp eq i64 %2, 0
br i1 %4, label %17, label %5
5: ; preds = %3, %12
%6 = phi i64 [ %15, %12 ], [ %2, %3 ]
%7 = phi i8* [ %13, %12 ], [ %1, %3 ]
%8 = phi i8* [ %14, %12 ], [ %0, %3 ]
%9 = load i8, i8* %8
%10 = load i8, i8* %7
%11 = icmp eq i8 %9, %10
br i1 %11, label %12, label %17
12: ; preds = %5
%13 = getelementptr inbounds i8, i8* %7, i64 1
%14 = getelementptr inbounds i8, i8* %8, i64 1
%15 = add i64 %6, -1
%16 = icmp eq i64 %15, 0
br i1 %16, label %17, label %5
17: ; preds = %5, %12, %3
%18 = phi i32 [ 0, %3 ], [ 0, %12 ], [ 1, %5 ]
ret i32 %18
}
/* Variables and functions */
char *ExecCommandWithArgs(char **, int *, int /*<<< orphan*/ *, int);
char *ExecCommand(char *cmd, int *myRet) {
  char *args[2];
  args[0] = cmd;
  args[1] = 0;
  return (ExecCommandWithArgs(args, myRet, NULL, 1));
}


x86 assembly (clang, -O0):
<ExecCommand>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x20(%rbp)
movq   $0x0,-0x18(%rbp)
lea    -0x20(%rbp),%rdi
mov    -0x10(%rbp),%rsi
xor    %eax,%eax
mov    %eax,%edx
mov    $0x1,%ecx
call   1030 <ExecCommandWithArgs@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ExecCommand>:
sub    $0x18,%rsp
mov    %rdi,(%rsp)
movq   $0x0,0x8(%rsp)
mov    %rsp,%rdi
xor    %edx,%edx
mov    $0x1,%ecx
call   1030 <ExecCommandWithArgs@plt>
add    $0x18,%rsp
ret

LLVM IR (-O0):
define i8* @ExecCommand(i8* %0, i32* %1) {
%3 = alloca i8*
%4 = alloca i32*
%5 = alloca [2 x i8*]
store i8* %0, i8** %3
store i32* %1, i32** %4
%6 = load i8*, i8** %3
%7 = getelementptr inbounds [2 x i8*], [2 x i8*]* %5, i64 0, i64 0
store i8* %6, i8** %7
%8 = getelementptr inbounds [2 x i8*], [2 x i8*]* %5, i64 0, i64 1
store i8* null, i8** %8
%9 = getelementptr inbounds [2 x i8*], [2 x i8*]* %5, i64 0, i64 0
%10 = load i32*, i32** %4
%11 = call i8* @ExecCommandWithArgs(i8** %9, i32* %10, i32* null, i32 1)
ret i8* %11
}

LLVM IR (-O2):
define i8* @ExecCommand(i8* %0, i32* %1) {
%3 = alloca [2 x i8*]
%4 = bitcast [2 x i8*]* %3 to i8*
%5 = getelementptr inbounds [2 x i8*], [2 x i8*]* %3, i64 0, i64 0
store i8* %0, i8** %5
%6 = getelementptr inbounds [2 x i8*], [2 x i8*]* %3, i64 0, i64 1
store i8* null, i8** %6
%7 = call i8* @ExecCommandWithArgs(i8** %5, i32* %1, i32* null, i32 1)
ret i8* %7
}
float vmin(float a, float b) { return (a < b) ? a : b; }


x86 assembly (clang, -O0):
<vmin>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  -0x4(%rbp),%xmm1
movss  -0x8(%rbp),%xmm0
ucomiss %xmm1,%xmm0
jbe    1130 <vmin+0x30>
movss  -0x4(%rbp),%xmm0
movss  %xmm0,-0xc(%rbp)
jmp    113a <vmin+0x3a>
movss  -0x8(%rbp),%xmm0
movss  %xmm0,-0xc(%rbp)
movss  -0xc(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<vmin>:
minss  %xmm1,%xmm0
ret

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

LLVM IR (-O2):
define float @vmin(float %0, float %1) {
%3 = fcmp olt float %0, %1
%4 = select i1 %3, float %0, float %1
ret float %4
}
/* Type definitions */
typedef int /*<<< orphan*/ pthread_cond_t;

/* Variables and functions */
int /*<<< orphan*/ pthread_cond_destroy(int /*<<< orphan*/ *);
int /*<<< orphan*/ pthread_cond_init(int /*<<< orphan*/ *,
                                     int /*<<< orphan*/ *);
int main(int argc, char *argv[]) {
  pthread_cond_t c;
  pthread_cond_init(&c, NULL);
  pthread_cond_destroy(&c);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    -0x14(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1030 <pthread_cond_init@plt>
lea    -0x14(%rbp),%rdi
call   1040 <pthread_cond_destroy@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
lea    0xc(%rsp),%rbx
mov    %rbx,%rdi
xor    %esi,%esi
call   1030 <pthread_cond_init@plt>
mov    %rbx,%rdi
call   1040 <pthread_cond_destroy@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = call i32 @pthread_cond_init(i32* %6, i32* null)
%8 = call i32 @pthread_cond_destroy(i32* %6)
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca i32
%4 = bitcast i32* %3 to i8*
%5 = call i32 @pthread_cond_init(i32* %3, i32* null)
%6 = call i32 @pthread_cond_destroy(i32* %3)
ret i32 0
}
int sysfs_rename_dir(struct kobject *kobj, const char *new_name) { return 0; }


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

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

LLVM IR (-O0):
%struct.kobject = type opaque
define i32 @sysfs_rename_dir(%struct.kobject* %0, i8* %1) {
%3 = alloca %struct.kobject*
%4 = alloca i8*
store %struct.kobject* %0, %struct.kobject** %3
store i8* %1, i8** %4
ret i32 0
}

LLVM IR (-O2):
%struct.kobject = type opaque
define i32 @sysfs_rename_dir(%struct.kobject* nocapture readnone %0, i8* nocapture readnone %1) {
ret i32 0
}
void redefined(c) int c;
{ warn("redefinition of -%c option", c); }


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

x86 assembly (clang, -O2):
<redefined>:
mov    %edi,%esi
lea    0xee7(%rip),%rdi
xor    %eax,%eax
jmp    1030 <warn@plt>

LLVM IR (-O0):
@.str = [27 x i8] c"redefinition of -%c option\00"
define void @redefined(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 (i8*, i32, ...) bitcast (i32 (...)* @warn to i32 (i8*, i32, ...)*)(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0), i32 %3)
ret void
}

LLVM IR (-O2):
@.str = [27 x i8] c"redefinition of -%c option\00"
define void @redefined(i32 %0) {
%2 = tail call i32 (i8*, i32, ...) bitcast (i32 (...)* @warn to i32 (i8*, i32, ...)*)(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0), i32 %0)
ret void
}
/* Variables and functions */
double log(double);
double Log2(double x) { return log(x) / 0.69314718; }


x86 assembly (clang, -O0):
<Log2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1030 <log@plt>
movsd  0xed1(%rip),%xmm1
divsd  %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Log2>:
push   %rax
call   1030 <log@plt>
divsd  0xee2(%rip),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @Log2(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = call double @log(double %3)
%5 = fdiv double %4, 0x3FE62E42FEAD449C
ret double %5
}

LLVM IR (-O2):
define double @Log2(double %0) {
%2 = tail call double @log(double %0)
%3 = fdiv double %2, 0x3FE62E42FEAD449C
ret double %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
char *DBM_strFunc(char *pInput) {
  printf("Passed in string %s\n", pInput);
  return "你好";
}


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

x86 assembly (clang, -O2):
<DBM_strFunc>:
push   %rax
mov    %rdi,%rsi
lea    0xee5(%rip),%rdi
call   1030 <printf@plt>
lea    0xeee(%rip),%rax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [21 x i8] c"Passed in string %s\0A\00"
@.str.1 = [7 x i8] c"\E4\BD\A0\E5\A5\BD\00"
define i8* @DBM_strFunc(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i8* %3)
ret i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [21 x i8] c"Passed in string %s\0A\00"
@.str.1 = [7 x i8] c"\E4\BD\A0\E5\A5\BD\00"
define i8* @DBM_strFunc(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i8* %0)
ret i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0)
}
/* Variables and functions */
double exp(float);
float squash(float x) {
  float m;
  return (1.0 / (1.0 + exp(-x)));
}


x86 assembly (clang, -O0):
<squash>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
movd   %xmm0,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm0
call   1030 <exp@plt>
movsd  0xec4(%rip),%xmm1
addsd  %xmm0,%xmm1
movsd  0xeb8(%rip),%xmm0
divsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<squash>:
push   %rax
xorpd  0xee7(%rip),%xmm0
call   1030 <exp@plt>
movsd  0xeea(%rip),%xmm1
addsd  %xmm1,%xmm0
divsd  %xmm0,%xmm1
xorps  %xmm0,%xmm0
cvtsd2ss %xmm1,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define float @squash(float %0) {
%2 = alloca float
%3 = alloca float
store float %0, float* %2
%4 = load float, float* %2
%5 = fneg float %4
%6 = call double @exp(float %5)
%7 = fadd double 1.000000e+00, %6
%8 = fdiv double 1.000000e+00, %7
%9 = fptrunc double %8 to float
ret float %9
}

LLVM IR (-O2):
define float @squash(float %0) {
%2 = fneg float %0
%3 = tail call double @exp(float %2)
%4 = fadd double %3, 1.000000e+00
%5 = fdiv double 1.000000e+00, %4
%6 = fptrunc double %5 to float
ret float %6
}
void EVP_PKEY_get_attr(void) {}


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

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

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

LLVM IR (-O2):
define void @EVP_PKEY_get_attr() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isupper(int);
void t_isupper_0x32() {
  Assert_real((isupper(50) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_isupper.c",
              255, ("isupper should be 0 for 2"));
}


x86 assembly (clang, -O0):
<t_isupper_0x32>:
push   %rbp
mov    %rsp,%rbp
mov    $0x32,%edi
call   1030 <isupper@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xebf(%rip),%rsi
mov    $0xff,%edx
lea    0xf5b(%rip),%rcx
call   1040 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_isupper_0x32>:
push   %rax
mov    $0x32,%edi
call   1030 <isupper@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0xff,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

LLVM IR (-O0):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isupper.c\00"
@.str.1 = [26 x i8] c"isupper should be 0 for 2\00"
define void @t_isupper_0x32() {
%1 = call i64 @isupper(i32 50)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 255, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isupper.c\00"
@.str.1 = [26 x i8] c"isupper should be 0 for 2\00"
define void @t_isupper_0x32() {
%1 = tail call i64 @isupper(i32 50)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 255, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}
int f() {
  int i, j;
  i = 0;
  return i;
}


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

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

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

LLVM IR (-O2):
define i32 @f() {
ret i32 0
}
double Sleef_log_u10(double x) { return __builtin_log(x); }


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

x86 assembly (clang, -O2):
<Sleef_log_u10>:
jmp    1030 <log@plt>

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

LLVM IR (-O2):
define double @Sleef_log_u10(double %0) {
%2 = tail call double @log(double %0)
ret double %2
}
/* Variables and functions */
void main() {
  char *video_memory = (char *)0xb8000;
  *video_memory = 'X';
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
mov    $0xb8000,%eax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movb   $0x58,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
movb   $0x58,0xb8000
58
ret

LLVM IR (-O0):
define void @main() {
%1 = alloca i8*
store i8* inttoptr (i64 753664 to i8*), i8** %1
%2 = load i8*, i8** %1
store i8 88, i8* %2
ret void
}

LLVM IR (-O2):
define void @main() {
store i8 88, i8* inttoptr (i64 753664 to i8*)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
int /*<<< orphan*/ scanf(char *, char *);
int main() {
  char s[20];
  scanf("%s", (char *)s);
  printf("You typed: %s.\n", s);
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x20,%rsp
lea    0xed4(%rip),%rdi
mov    %rsp,%rbx
mov    %rbx,%rsi
call   1040 <scanf@plt>
lea    0xec5(%rip),%rdi
mov    %rbx,%rsi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%s\00"
@.str.1 = [16 x i8] c"You typed: %s.\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [20 x i8]
store i32 0, i32* %1
%3 = getelementptr inbounds [20 x i8], [20 x i8]* %2, i64 0, i64 0
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %3)
%5 = getelementptr inbounds [20 x i8], [20 x i8]* %2, i64 0, i64 0
%6 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0), i8* %5)
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%s\00"
@.str.1 = [16 x i8] c"You typed: %s.\0A\00"
define i32 @main() {
%1 = alloca [20 x i8]
%2 = getelementptr inbounds [20 x i8], [20 x i8]* %1, i64 0, i64 0
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %2)
%4 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0), i8* %2)
ret i32 0
}
unsigned long unsignedlong_ignoring_shortint(unsigned long x, short int y) {
  return x;
}


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

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

LLVM IR (-O0):
define i64 @unsignedlong_ignoring_shortint(i64 %0, i16 signext %1) {
%3 = alloca i64
%4 = alloca i16
store i64 %0, i64* %3
store i16 %1, i16* %4
%5 = load i64, i64* %3
ret i64 %5
}

LLVM IR (-O2):
define i64 @unsignedlong_ignoring_shortint(i64 returned %0, i16 signext %1) {
ret i64 %0
}