xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ udelay(int);
void idbr_tx_done(void) {
  int timeout = 1000;
  while (timeout &&
         (((*((volatile unsigned int *)(0x40301698))) & 0x0040) == 0)) {
    udelay(10);
    timeout--;
  }
  (*((volatile unsigned int *)(0x40301698))) = 0x0040;
}


x86 assembly (clang, -O0):
<idbr_tx_done>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x3e8,-0x4(%rbp)
xor    %eax,%eax
cmpl   $0x0,-0x4(%rbp)
mov    %al,-0x5(%rbp)
je     1141 <idbr_tx_done+0x31>
mov    $0x40301698,%eax
mov    (%rax),%eax
and    $0x40,%eax
cmp    $0x0,%eax
sete   %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
test   $0x1,%al
jne    1151 <idbr_tx_done+0x41>
jmp    1169 <idbr_tx_done+0x59>
mov    $0xa,%edi
call   1030 <udelay@plt>
mov    -0x4(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x4(%rbp)
jmp    111f <idbr_tx_done+0xf>
mov    $0x40301698,%eax
movl   $0x40,(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<idbr_tx_done>:
push   %rbx
mov    $0xfffffc18,%ebx
cs nopw 0x0(%rax,%rax,1)
testl  $0x40,0x40301698
jne    113b <idbr_tx_done+0x2b>
mov    $0xa,%edi
call   1030 <udelay@plt>
inc    %ebx
jne    1120 <idbr_tx_done+0x10>
movl   $0x40,0x40301698
pop    %rbx
ret

LLVM IR (-O0):
define void @idbr_tx_done() {
%1 = alloca i32
store i32 1000, i32* %1
br label %2
2: ; preds = %11, %0
%3 = load i32, i32* %1
%4 = icmp ne i32 %3, 0
br i1 %4, label %5, label %9
5: ; preds = %2
%6 = load volatile i32, i32* inttoptr (i64 1076893336 to i32*)
%7 = and i32 %6, 64
%8 = icmp eq i32 %7, 0
br label %9
9: ; preds = %5, %2
%10 = phi i1 [ false, %2 ], [ %8, %5 ]
br i1 %10, label %11, label %15
11: ; preds = %9
%12 = call i32 @udelay(i32 10)
%13 = load i32, i32* %1
%14 = add nsw i32 %13, -1
store i32 %14, i32* %1
br label %2
15: ; preds = %9
store volatile i32 64, i32* inttoptr (i64 1076893336 to i32*)
ret void
}

LLVM IR (-O2):
define void @idbr_tx_done() {
br label %1
1: ; preds = %0, %6
%2 = phi i32 [ 1000, %0 ], [ %8, %6 ]
%3 = load volatile i32, i32* inttoptr (i64 1076893336 to i32*)
%4 = and i32 %3, 64
%5 = icmp eq i32 %4, 0
br i1 %5, label %6, label %10
6: ; preds = %1
%7 = tail call i32 @udelay(i32 10)
%8 = add nsw i32 %2, -1
%9 = icmp eq i32 %8, 0
br i1 %9, label %10, label %1
10: ; preds = %6, %1
store volatile i32 64, i32* inttoptr (i64 1076893336 to i32*)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void call_this3() { printf("Hello Python!\n"); }


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

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

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

LLVM IR (-O2):
@str = [14 x i8] c"Hello Python!\00"
define void @call_this3() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ db(int);
void fldlg2() {
  db(0xD9);
  db(0xEC);
}


x86 assembly (clang, -O0):
<fldlg2>:
push   %rbp
mov    %rsp,%rbp
mov    $0xd9,%edi
call   1030 <db@plt>
mov    $0xec,%edi
call   1030 <db@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<fldlg2>:
push   %rax
mov    $0xd9,%edi
call   1030 <db@plt>
mov    $0xec,%edi
pop    %rax
jmp    1030 <db@plt>

LLVM IR (-O0):
define void @fldlg2() {
%1 = call i32 @db(i32 217)
%2 = call i32 @db(i32 236)
ret void
}

LLVM IR (-O2):
define void @fldlg2() {
%1 = tail call i32 @db(i32 217)
%2 = tail call i32 @db(i32 236)
ret void
}
/* Variables and functions */
void *malloc(int);
void *glp_malloc(int size) {
  void *header = malloc(size + 10);
  return (void *)((char *)header + 10);
}


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

x86 assembly (clang, -O2):
<glp_malloc>:
push   %rax
add    $0xa,%edi
call   1030 <malloc@plt>
add    $0xa,%rax
pop    %rcx
ret

LLVM IR (-O0):
define i8* @glp_malloc(i32 %0) {
%2 = alloca i32
%3 = alloca i8*
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = add nsw i32 %4, 10
%6 = call i8* @malloc(i32 %5)
store i8* %6, i8** %3
%7 = load i8*, i8** %3
%8 = getelementptr inbounds i8, i8* %7, i64 10
ret i8* %8
}

LLVM IR (-O2):
define noalias i8* @glp_malloc(i32 %0) {
%2 = add nsw i32 %0, 10
%3 = tail call i8* @malloc(i32 %2)
%4 = getelementptr inbounds i8, i8* %3, i64 10
ret i8* %4
}
/* Variables and functions */
double libm_sqrt(double);
double rsqrt(double r) { return libm_sqrt(r); }


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

x86 assembly (clang, -O2):
<rsqrt>:
jmp    1030 <libm_sqrt@plt>

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

LLVM IR (-O2):
define double @rsqrt(double %0) {
%2 = tail call double @libm_sqrt(double %0)
ret double %2
}
/* Variables and functions */
int omp_get_num_threads();
int omp_get_thread_num();
int /*<<< orphan*/ printf(char *, int, int, int);
int main(int argc, char **argv) {
#pragma omp parallel for
  for (int i = 0; i < 64; ++i) {
    printf("[THREAD %2d of %d] Loop index: %d.\n", omp_get_thread_num() + 1,
           omp_get_num_threads(), i);
  }
}


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)
movl   $0x0,-0x14(%rbp)
cmpl   $0x40,-0x14(%rbp)
jge    118d <main+0x5d>
mov    $0x0,%al
call   1030 <omp_get_thread_num@plt>
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
mov    $0x0,%al
call   1050 <omp_get_num_threads@plt>
mov    -0x18(%rbp),%esi
mov    %eax,%edx
mov    -0x14(%rbp),%ecx
lea    0xe86(%rip),%rdi
call   1040 <printf@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    114d <main+0x1d>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r14
push   %rbx
lea    0xec5(%rip),%r14
xor    %ebp,%ebp
nopl   (%rax)
xor    %eax,%eax
call   1030 <omp_get_thread_num@plt>
lea    0x1(%rax),%ebx
xor    %eax,%eax
call   1050 <omp_get_num_threads@plt>
mov    %r14,%rdi
mov    %ebx,%esi
mov    %eax,%edx
mov    %ebp,%ecx
call   1040 <printf@plt>
add    $0x1,%ebp
cmp    $0x40,%ebp
jne    1140 <main+0x10>
xor    %eax,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
@.str = [36 x i8] c"[THREAD %2d of %d] Loop index: %d.\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 0, i32* %6
br label %7
7: ; preds = %16, %2
%8 = load i32, i32* %6
%9 = icmp slt i32 %8, 64
br i1 %9, label %10, label %19
10: ; preds = %7
%11 = call i32 (...) @omp_get_thread_num()
%12 = add nsw i32 %11, 1
%13 = call i32 (...) @omp_get_num_threads()
%14 = load i32, i32* %6
%15 = call i32 @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0), i32 %12, i32 %13, i32 %14)
br label %16
16: ; preds = %10
%17 = load i32, i32* %6
%18 = add nsw i32 %17, 1
store i32 %18, i32* %6
br label %7
19: ; preds = %7
%20 = load i32, i32* %3
ret i32 %20
}

LLVM IR (-O2):
@.str = [36 x i8] c"[THREAD %2d of %d] Loop index: %d.\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
br label %4
3: ; preds = %4
ret i32 0
4: ; preds = %2, %4
%5 = phi i32 [ 0, %2 ], [ %10, %4 ]
%6 = tail call i32 (...) @omp_get_thread_num()
%7 = add nsw i32 %6, 1
%8 = tail call i32 (...) @omp_get_num_threads()
%9 = tail call i32 @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0), i32 %7, i32 %8, i32 %5)
%10 = add nuw nsw i32 %5, 1
%11 = icmp eq i32 %10, 64
br i1 %11, label %3, label %4
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char const *, char *);
int chaz_Util_can_open_file(const char *file_path) {
  FILE *garbage_fh;
  garbage_fh = fopen(file_path, "rb");
  if (garbage_fh == NULL) {
    return 0;
  } else {
    fclose(garbage_fh);
    return 1;
  }
}


x86 assembly (clang, -O0):
<chaz_Util_can_open_file>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
lea    0xec9(%rip),%rsi
call   1040 <fopen@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    1157 <chaz_Util_can_open_file+0x37>
movl   $0x0,-0x4(%rbp)
jmp    1167 <chaz_Util_can_open_file+0x47>
mov    -0x18(%rbp),%rdi
call   1030 <fclose@plt>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<chaz_Util_can_open_file>:
push   %rax
lea    0xed8(%rip),%rsi
call   1040 <fopen@plt>
test   %rax,%rax
je     1141 <chaz_Util_can_open_file+0x21>
mov    %rax,%rdi
call   1030 <fclose@plt>
mov    $0x1,%eax
pop    %rcx
ret
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"rb\00"
define i32 @chaz_Util_can_open_file(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
%4 = alloca i32*
store i8* %0, i8** %3
%5 = load i8*, i8** %3
%6 = call i32* @fopen(i8* %5, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
store i32* %6, i32** %4
%7 = load i32*, i32** %4
%8 = icmp eq i32* %7, null
br i1 %8, label %9, label %10
9: ; preds = %1
store i32 0, i32* %2
br label %13
10: ; preds = %1
%11 = load i32*, i32** %4
%12 = call i32 @fclose(i32* %11)
store i32 1, i32* %2
br label %13
13: ; preds = %10, %9
%14 = load i32, i32* %2
ret i32 %14
}

LLVM IR (-O2):
@.str = [3 x i8] c"rb\00"
define i32 @chaz_Util_can_open_file(i8* nocapture %0) {
%2 = tail call i32* @fopen(i8* %0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%3 = icmp eq i32* %2, null
br i1 %3, label %6, label %4
4: ; preds = %1
%5 = tail call i32 @fclose(i32* %2)
br label %6
6: ; preds = %1, %4
%7 = phi i32 [ 1, %4 ], [ 0, %1 ]
ret i32 %7
}
/* Variables and functions */
unsigned int count32bits(long long);
unsigned int count64bits(long long int x) {
  return count32bits(x & 0xffffffff) + count32bits((x >> 32) & 0xffffffff);
}


x86 assembly (clang, -O0):
<count64bits>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movabs $0xffffffff,%rdi
and    -0x8(%rbp),%rdi
call   1030 <count32bits@plt>
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
sar    $0x20,%rdi
movabs $0xffffffff,%rax
and    %rax,%rdi
call   1030 <count32bits@plt>
mov    %eax,%ecx
mov    -0xc(%rbp),%eax
add    %ecx,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<count64bits>:
push   %rbp
push   %rbx
push   %rax
mov    %rdi,%rbx
mov    %ebx,%edi
call   1030 <count32bits@plt>
mov    %eax,%ebp
shr    $0x20,%rbx
mov    %rbx,%rdi
call   1030 <count32bits@plt>
add    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @count64bits(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = and i64 %3, 4294967295
%5 = call i32 @count32bits(i64 %4)
%6 = load i64, i64* %2
%7 = ashr i64 %6, 32
%8 = and i64 %7, 4294967295
%9 = call i32 @count32bits(i64 %8)
%10 = add i32 %5, %9
ret i32 %10
}

LLVM IR (-O2):
define i32 @count64bits(i64 %0) {
%2 = and i64 %0, 4294967295
%3 = tail call i32 @count32bits(i64 %2)
%4 = lshr i64 %0, 32
%5 = tail call i32 @count32bits(i64 %4)
%6 = add i32 %5, %3
ret i32 %6
}
int _fstat(fd, buf)
int fd;
struct stat *buf;
{
  char Xbuf[100];
  int retval;
  retval = __fstat(fd, Xbuf);
  Xcvt(Xbuf, (char *)buf);
  return retval;
}


x86 assembly (clang, -O0):
<_fstat>:
push   %rbp
mov    %rsp,%rbp
sub    $0x90,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%edi
lea    -0x80(%rbp),%rsi
mov    $0x0,%al
call   1030 <__fstat@plt>
mov    %eax,-0x84(%rbp)
lea    -0x80(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    $0x0,%al
call   1040 <Xcvt@plt>
mov    -0x84(%rbp),%eax
add    $0x90,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_fstat>:
push   %rbp
push   %r14
push   %rbx
sub    $0x70,%rsp
mov    %rsi,%rbx
mov    %rsp,%r14
mov    %r14,%rsi
xor    %eax,%eax
call   1030 <__fstat@plt>
mov    %eax,%ebp
mov    %r14,%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1040 <Xcvt@plt>
mov    %ebp,%eax
add    $0x70,%rsp
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
%struct.stat = type opaque
define i32 @_fstat(i32 %0, %struct.stat* %1) {
%3 = alloca i32
%4 = alloca %struct.stat*
%5 = alloca [100 x i8]
%6 = alloca i32
store i32 %0, i32* %3
store %struct.stat* %1, %struct.stat** %4
%7 = load i32, i32* %3
%8 = getelementptr inbounds [100 x i8], [100 x i8]* %5, i64 0, i64 0
%9 = call i32 (i32, i8*, ...) bitcast (i32 (...)* @__fstat to i32 (i32, i8*, ...)*)(i32 %7, i8* %8)
store i32 %9, i32* %6
%10 = getelementptr inbounds [100 x i8], [100 x i8]* %5, i64 0, i64 0
%11 = load %struct.stat*, %struct.stat** %4
%12 = bitcast %struct.stat* %11 to i8*
%13 = call i32 (i8*, i8*, ...) bitcast (i32 (...)* @Xcvt to i32 (i8*, i8*, ...)*)(i8* %10, i8* %12)
%14 = load i32, i32* %6
ret i32 %14
}

LLVM IR (-O2):
%struct.stat = type opaque
define i32 @_fstat(i32 %0, %struct.stat* %1) {
%3 = alloca [100 x i8]
%4 = getelementptr inbounds [100 x i8], [100 x i8]* %3, i64 0, i64 0
%5 = call i32 (i32, i8*, ...) bitcast (i32 (...)* @__fstat to i32 (i32, i8*, ...)*)(i32 %0, i8* %4)
%6 = bitcast %struct.stat* %1 to i8*
%7 = call i32 (i8*, i8*, ...) bitcast (i32 (...)* @Xcvt to i32 (i8*, i8*, ...)*)(i8* %4, i8* %6)
ret i32 %5
}
/* Type definitions */
typedef int /*<<< orphan*/ mode_t;
typedef int /*<<< orphan*/ dev_t;

/* Variables and functions */
int /*<<< orphan*/ EINVAL;
int _MKNOD_VER;
int /*<<< orphan*/ __set_errno(int /*<<< orphan*/);
int __syscall_mknod(char const *, int /*<<< orphan*/, int /*<<< orphan*/);
int __xmknod(int vers, const char *path, mode_t mode, dev_t *dev) {
  if (vers != _MKNOD_VER) {
    __set_errno(EINVAL);
    return -1;
  }
  return __syscall_mknod(path, mode, *dev);
}


x86 assembly (clang, -O0):
<__xmknod>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x8(%rbp),%eax
mov    0x2ea8(%rip),%rcx
cmp    (%rcx),%eax
je     1162 <__xmknod+0x42>
mov    0x2e89(%rip),%rax
mov    (%rax),%edi
call   1030 <__set_errno@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    1177 <__xmknod+0x57>
mov    -0x10(%rbp),%rdi
mov    -0x14(%rbp),%esi
mov    -0x20(%rbp),%rax
mov    (%rax),%edx
call   1040 <__syscall_mknod@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__xmknod>:
push   %rax
mov    0x2ec0(%rip),%rax
cmp    %edi,(%rax)
jne    113b <__xmknod+0x1b>
mov    (%rcx),%eax
mov    %rsi,%rdi
mov    %edx,%esi
mov    %eax,%edx
pop    %rax
jmp    1040 <__syscall_mknod@plt>
mov    0x2e96(%rip),%rax
mov    (%rax),%edi
call   1030 <__set_errno@plt>
mov    $0xffffffff,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@_MKNOD_VER = global i32 0
@EINVAL = global i32 0
define i32 @__xmknod(i32 %0, i8* %1, i32 %2, i32* nocapture %3) {
%5 = load i32, i32* @_MKNOD_VER
%6 = icmp eq i32 %5, %0
br i1 %6, label %10, label %7
7: ; preds = %4
%8 = load i32, i32* @EINVAL
%9 = tail call i32 @__set_errno(i32 %8)
br label %13
10: ; preds = %4
%11 = load i32, i32* %3
%12 = tail call i32 @__syscall_mknod(i8* %1, i32 %2, i32 %11)
br label %13
13: ; preds = %10, %7
%14 = phi i32 [ -1, %7 ], [ %12, %10 ]
ret i32 %14
}
void X509_cmp(void) {}


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

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

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

LLVM IR (-O2):
define void @X509_cmp() {
ret void
}
void LPCChannelConfigEPSet(unsigned long ulBase, unsigned long ulChannel,
                           unsigned long ulConfig, unsigned long ulAddress,
                           unsigned long ulOffset) {
  ;
  ;

  ;
  ;

  ;
  ulConfig |= (((ulOffset >> 1) << 5) & 0x00003FE0);
  (*((volatile unsigned long *)(ulBase + 0x00000010 + (ulChannel * 0x10)))) =
      ulConfig;
  (*((volatile unsigned long *)(ulBase + 0x00000018 + (ulChannel * 0x10)))) =
      ulAddress;
}


x86 assembly (clang, -O0):
<LPCChannelConfigEPSet>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    -0x28(%rbp),%rax
shr    $0x1,%rax
shl    $0x5,%rax
and    $0x3fe0,%rax
or     -0x18(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rcx
mov    -0x8(%rbp),%rax
add    $0x10,%rax
mov    -0x10(%rbp),%rdx
shl    $0x4,%rdx
add    %rdx,%rax
mov    %rcx,(%rax)
mov    -0x20(%rbp),%rcx
mov    -0x8(%rbp),%rax
add    $0x18,%rax
mov    -0x10(%rbp),%rdx
shl    $0x4,%rdx
add    %rdx,%rax
mov    %rcx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<LPCChannelConfigEPSet>:
shl    $0x4,%r8d
and    $0x3fe0,%r8d
or     %rdx,%r8
shl    $0x4,%rsi
mov    %r8,0x10(%rsi,%rdi,1)
mov    %rcx,0x18(%rsi,%rdi,1)
ret

LLVM IR (-O0):
define void @LPCChannelConfigEPSet(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* %10
%12 = lshr i64 %11, 1
%13 = shl i64 %12, 5
%14 = and i64 %13, 16352
%15 = load i64, i64* %8
%16 = or i64 %15, %14
store i64 %16, i64* %8
%17 = load i64, i64* %8
%18 = load i64, i64* %6
%19 = add i64 %18, 16
%20 = load i64, i64* %7
%21 = mul i64 %20, 16
%22 = add i64 %19, %21
%23 = inttoptr i64 %22 to i64*
store volatile i64 %17, i64* %23
%24 = load i64, i64* %9
%25 = load i64, i64* %6
%26 = add i64 %25, 24
%27 = load i64, i64* %7
%28 = mul i64 %27, 16
%29 = add i64 %26, %28
%30 = inttoptr i64 %29 to i64*
store volatile i64 %24, i64* %30
ret void
}

LLVM IR (-O2):
define void @LPCChannelConfigEPSet(i64 %0, i64 %1, i64 %2, i64 %3, i64 %4) {
%6 = shl i64 %4, 4
%7 = and i64 %6, 16352
%8 = or i64 %7, %2
%9 = shl i64 %1, 4
%10 = add i64 %9, %0
%11 = add i64 %10, 16
%12 = inttoptr i64 %11 to i64*
store volatile i64 %8, i64* %12
%13 = add i64 %10, 24
%14 = inttoptr i64 %13 to i64*
store volatile i64 %3, i64* %14
ret void
}
/* Variables and functions */
double pow(double, double);
double rgb_to_linear(double c) {
  return c > (0.0031308 * 12.92) ? pow(c * (1.0 / 1.055) + (0.055 / 1.055), 2.4)
                                 : c * (1.0 / 12.92);
}


x86 assembly (clang, -O0):
<rgb_to_linear>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  0xed6(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    1168 <rgb_to_linear+0x58>
movsd  -0x8(%rbp),%xmm0
movsd  0xed7(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xed3(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  0xeb7(%rip),%xmm1
call   1030 <pow@plt>
movsd  %xmm0,-0x10(%rbp)
jmp    117a <rgb_to_linear+0x6a>
movsd  0xe98(%rip),%xmm0
mulsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rgb_to_linear>:
ucomisd 0xee8(%rip),%xmm0
jbe    1137 <rgb_to_linear+0x27>
mulsd  0xeee(%rip),%xmm0
addsd  0xeee(%rip),%xmm0
movsd  0xeee(%rip),%xmm1
jmp    1030 <pow@plt>
mulsd  0xec9(%rip),%xmm0
ret

LLVM IR (-O0):
define double @rgb_to_linear(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fcmp ogt double %3, 0x3FA4B5DAA07D970D
br i1 %4, label %5, label %9
5: ; preds = %1
%6 = load double, double* %2
%7 = call double @llvm.fmuladd.f64(double %6, double 0x3FEE54EDCD0AEB60, double 0x3FAAB1232F514A03)
%8 = call double @pow(double %7, double 2.400000e+00)
br label %12
9: ; preds = %1
%10 = load double, double* %2
%11 = fmul double %10, 0x3FB3D0722149B580
br label %12
12: ; preds = %9, %5
%13 = phi double [ %8, %5 ], [ %11, %9 ]
ret double %13
}

LLVM IR (-O2):
define double @rgb_to_linear(double %0) {
%2 = fcmp ogt double %0, 0x3FA4B5DAA07D970D
br i1 %2, label %3, label %6
3: ; preds = %1
%4 = tail call double @llvm.fmuladd.f64(double %0, double 0x3FEE54EDCD0AEB60, double 0x3FAAB1232F514A03)
%5 = tail call double @pow(double %4, double 2.400000e+00)
br label %8
6: ; preds = %1
%7 = fmul double %0, 0x3FB3D0722149B580
br label %8
8: ; preds = %6, %3
%9 = phi double [ %5, %3 ], [ %7, %6 ]
ret double %9
}
int pgx_nint(float f) { return (int)(f >= 0.0 ? (f + 0.5) : (f - 0.5)); }


x86 assembly (clang, -O0):
<pgx_nint>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jb     113e <pgx_nint+0x3e>
movss  -0x4(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xed0(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x10(%rbp)
jmp    1158 <pgx_nint+0x58>
movss  -0x4(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xeb1(%rip),%xmm1
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
cvttsd2si %xmm0,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<pgx_nint>:
xorps  %xmm1,%xmm1
xor    %eax,%eax
ucomiss %xmm1,%xmm0
setb   %al
cvtss2sd %xmm0,%xmm0
lea    0xeea(%rip),%rcx
addsd  (%rcx,%rax,8),%xmm0
cvttsd2si %xmm0,%eax
ret

LLVM IR (-O0):
define i32 @pgx_nint(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = fpext float %3 to double
%5 = fcmp oge double %4, 0.000000e+00
br i1 %5, label %6, label %10
6: ; preds = %1
%7 = load float, float* %2
%8 = fpext float %7 to double
%9 = fadd double %8, 5.000000e-01
br label %14
10: ; preds = %1
%11 = load float, float* %2
%12 = fpext float %11 to double
%13 = fsub double %12, 5.000000e-01
br label %14
14: ; preds = %10, %6
%15 = phi double [ %9, %6 ], [ %13, %10 ]
%16 = fptosi double %15 to i32
ret i32 %16
}

LLVM IR (-O2):
define i32 @pgx_nint(float %0) {
%2 = fpext float %0 to double
%3 = fcmp ult float %0, 0.000000e+00
%4 = select i1 %3, double -5.000000e-01, double 5.000000e-01
%5 = fadd double %4, %2
%6 = fptosi double %5 to i32
ret i32 %6
}
int base64_decoded_len(int len) { return len / 4 * 3; }


x86 assembly (clang, -O0):
<base64_decoded_len>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    $0x4,%ecx
cltd
idiv   %ecx
imul   $0x3,%eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<base64_decoded_len>:
lea    0x3(%rdi),%eax
test   %edi,%edi
cmovns %edi,%eax
sar    $0x2,%eax
lea    (%rax,%rax,2),%eax
ret

LLVM IR (-O0):
define i32 @base64_decoded_len(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = sdiv i32 %3, 4
%5 = mul nsw i32 %4, 3
ret i32 %5
}

LLVM IR (-O2):
define i32 @base64_decoded_len(i32 %0) {
%2 = sdiv i32 %0, 4
%3 = mul nsw i32 %2, 3
ret i32 %3
}
double EDDlog(double x) { return (-1. / x / x); }


x86 assembly (clang, -O0):
<EDDlog>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  0xeef(%rip),%xmm0
divsd  -0x8(%rbp),%xmm0
divsd  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<EDDlog>:
movsd  0xef8(%rip),%xmm1
divsd  %xmm0,%xmm1
divsd  %xmm0,%xmm1
movapd %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @EDDlog(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fdiv double -1.000000e+00, %3
%5 = load double, double* %2
%6 = fdiv double %4, %5
ret double %6
}

LLVM IR (-O2):
define double @EDDlog(double %0) {
%2 = fdiv double -1.000000e+00, %0
%3 = fdiv double %2, %0
ret double %3
}
int test_imm_07uint32_mem(unsigned int *val) {
  return ((*val) & (0x07 << 0)) ? -20 : -40;
}


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

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

LLVM IR (-O0):
define i32 @test_imm_07uint32_mem(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = load i32, i32* %3
%5 = and i32 %4, 7
%6 = icmp ne i32 %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_07uint32_mem(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = and i32 %2, 7
%4 = icmp eq i32 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
void cns3xxx_l2x0_init(void) {}


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

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

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

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


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

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

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

LLVM IR (-O2):
define void @av_hex_dump_log() {
ret void
}
int mlr_string_hash_func(char *str) {
  unsigned long hash = 5381;
  int c;
  while ((c = *str++) != 0)
    hash = ((hash << 5) + hash) + c;
  return (int)hash;
}


x86 assembly (clang, -O0):
<mlr_string_hash_func>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movq   $0x1505,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
movsbl (%rax),%eax
mov    %eax,-0x14(%rbp)
cmp    $0x0,%eax
je     114a <mlr_string_hash_func+0x4a>
mov    -0x10(%rbp),%rax
shl    $0x5,%rax
add    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
add    %rcx,%rax
mov    %rax,-0x10(%rbp)
jmp    1110 <mlr_string_hash_func+0x10>
mov    -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<mlr_string_hash_func>:
mov    (%rdi),%cl
test   %cl,%cl
je     112d <mlr_string_hash_func+0x2d>
add    $0x1,%rdi
mov    $0x1505,%eax
nop
mov    %rax,%rdx
shl    $0x5,%rdx
add    %rax,%rdx
movsbq %cl,%rax
add    %rdx,%rax
movzbl (%rdi),%ecx
add    $0x1,%rdi
test   %cl,%cl
jne    1110 <mlr_string_hash_func+0x10>
ret
mov    $0x1505,%eax
ret

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

LLVM IR (-O2):
define i32 @mlr_string_hash_func(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %16, label %4
4: ; preds = %1, %4
%5 = phi i8 [ %12, %4 ], [ %2, %1 ]
%6 = phi i8* [ %8, %4 ], [ %0, %1 ]
%7 = phi i64 [ %11, %4 ], [ 5381, %1 ]
%8 = getelementptr inbounds i8, i8* %6, i64 1
%9 = mul i64 %7, 33
%10 = sext i8 %5 to i64
%11 = add i64 %9, %10
%12 = load i8, i8* %8
%13 = icmp eq i8 %12, 0
br i1 %13, label %14, label %4
14: ; preds = %4
%15 = trunc i64 %11 to i32
br label %16
16: ; preds = %14, %1
%17 = phi i32 [ 5381, %1 ], [ %15, %14 ]
ret i32 %17
}
/* Variables and functions */
double strtod(char *, char **);
int isdouble(double *d, char *s) {
  char **endptr;
  char *p;
  if (s[0] == 0) {
    return (0);
  }
  endptr = &p;
  *d = strtod(s, endptr);
  if (**endptr != 0) {
    return (0);
  }
  return (-1);
}


x86 assembly (clang, -O0):
<isdouble>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x18(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
jne    113c <isdouble+0x2c>
movl   $0x0,-0x4(%rbp)
jmp    117f <isdouble+0x6f>
lea    -0x28(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x20(%rbp),%rsi
call   1030 <strtod@plt>
mov    -0x10(%rbp),%rax
movsd  %xmm0,(%rax)
mov    -0x20(%rbp),%rax
mov    (%rax),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     1178 <isdouble+0x68>
movl   $0x0,-0x4(%rbp)
jmp    117f <isdouble+0x6f>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<isdouble>:
push   %rbx
sub    $0x10,%rsp
cmpb   $0x0,(%rsi)
je     113d <isdouble+0x2d>
mov    %rdi,%rbx
lea    0x8(%rsp),%rax
mov    %rsi,%rdi
mov    %rax,%rsi
call   1030 <strtod@plt>
movsd  %xmm0,(%rbx)
mov    0x8(%rsp),%rax
cmpb   $0x1,(%rax)
sbb    %eax,%eax
jmp    113f <isdouble+0x2f>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @isdouble(double* nocapture writeonly %0, i8* %1) {
%3 = alloca i8*
%4 = bitcast i8** %3 to i8*
%5 = load i8, i8* %1
%6 = icmp eq i8 %5, 0
br i1 %6, label %13, label %7
7: ; preds = %2
%8 = call double @strtod(i8* %1, i8** %3)
store double %8, double* %0
%9 = load i8*, i8** %3
%10 = load i8, i8* %9
%11 = icmp eq i8 %10, 0
%12 = sext i1 %11 to i32
br label %13
13: ; preds = %7, %2
%14 = phi i32 [ 0, %2 ], [ %12, %7 ]
ret i32 %14
}
/* Variables and functions */
float exp_sin_custom_io(float, float, float);
float exp_sin_custom_f_io(float step, float max_steps, float max_val) {
  return exp_sin_custom_io(step, max_steps, max_val);
}


x86 assembly (clang, -O0):
<exp_sin_custom_f_io>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  %xmm2,-0xc(%rbp)
movss  -0x4(%rbp),%xmm0
movss  -0x8(%rbp),%xmm1
movss  -0xc(%rbp),%xmm2
call   1030 <exp_sin_custom_io@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<exp_sin_custom_f_io>:
jmp    1030 <exp_sin_custom_io@plt>

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

LLVM IR (-O2):
define float @exp_sin_custom_f_io(float %0, float %1, float %2) {
%4 = tail call float @exp_sin_custom_io(float %0, float %1, float %2)
ret float %4
}
/* Variables and functions */
int /*<<< orphan*/ image();
int main() {
  image();
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @image()
ret i32 0
}
void fc272(int n) {
a : {
  typedef int(*b)[n];
  {
    typedef int(*c)[n];
    0;
  }
  {
    typedef int(*d)[n];
    0;
  };
  typedef int(*e)[n];
  0;
};
  {
    typedef int(*f)[n];
    {
      typedef int(*g)[n];
      0;
    };
    {
      typedef int(*h)[n];
      0;
    };
    ;
    typedef int(*i)[n];
    0;
  };
  ;
  typedef int(*j)[n];
  0;
  goto a;
}


x86 assembly (clang, -O0):
<fc272>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
jmp    1107 <fc272+0x7>

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

LLVM IR (-O0):
define void @fc272(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
br label %3
3: ; preds = %3, %1
%4 = load i32, i32* %2
%5 = zext i32 %4 to i64
%6 = load i32, i32* %2
%7 = zext i32 %6 to i64
%8 = load i32, i32* %2
%9 = zext i32 %8 to i64
%10 = load i32, i32* %2
%11 = zext i32 %10 to i64
%12 = load i32, i32* %2
%13 = zext i32 %12 to i64
%14 = load i32, i32* %2
%15 = zext i32 %14 to i64
%16 = load i32, i32* %2
%17 = zext i32 %16 to i64
%18 = load i32, i32* %2
%19 = zext i32 %18 to i64
%20 = load i32, i32* %2
%21 = zext i32 %20 to i64
br label %3
}

LLVM IR (-O2):
define void @fc272(i32 %0) {
br label %2
2: ; preds = %2, %1
br label %2
}
/* Variables and functions */
int /*<<< orphan*/ howdy_2();
int main() {
  howdy_2();
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @howdy_2()
ret i32 0
}
int test_imm_B0uint16_mem(unsigned short *val) {
  return ((*val) & (-0xB0 << 0)) ? -20 : -40;
}


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

x86 assembly (clang, -O2):
<test_imm_B0uint16_mem>:
movzwl (%rdi),%eax
test   $0xff50,%eax
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_B0uint16_mem(i16* nocapture %0) {
%2 = load i16, i16* %0
%3 = and i16 %2, -176
%4 = icmp eq i16 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ abort();
int /*<<< orphan*/ perror(char *);
int /*<<< orphan*/ strlen(char const *);
int write(int, char const *, int /*<<< orphan*/);
void writestr(int fd, const char *s) {
  int r;
  r = write(fd, s, strlen(s));
  if (r <= 0) {
    perror("write");
    abort();
  }
}


x86 assembly (clang, -O0):
<writestr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x24(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%rdi
call   1050 <strlen@plt>
mov    -0x24(%rbp),%edi
mov    -0x20(%rbp),%rsi
mov    %eax,%edx
call   1040 <write@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
jg     1194 <writestr+0x54>
lea    0xe78(%rip),%rdi
call   1060 <perror@plt>
mov    $0x0,%al
call   1030 <abort@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<writestr>:
push   %rbp
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %edi,%ebp
mov    %rsi,%rdi
call   1050 <strlen@plt>
mov    %ebp,%edi
mov    %rbx,%rsi
mov    %eax,%edx
call   1040 <write@plt>
test   %eax,%eax
jle    1167 <writestr+0x27>
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret
lea    0xe92(%rip),%rdi
call   1060 <perror@plt>
xor    %eax,%eax
call   1030 <abort@plt>

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

LLVM IR (-O2):
@.str = [6 x i8] c"write\00"
define void @writestr(i32 %0, i8* %1) {
%3 = tail call i32 @strlen(i8* %1)
%4 = tail call i32 @write(i32 %0, i8* %1, i32 %3)
%5 = icmp slt i32 %4, 1
br i1 %5, label %6, label %9
6: ; preds = %2
%7 = tail call i32 @perror(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%8 = tail call i32 (...) @abort()
unreachable
9: ; preds = %2
ret void
}
/* Forward declarations */
typedef struct TYPE_3__ TYPE_1__;

/* Type definitions */
struct TYPE_3__ {
  char *next_in;
};
typedef TYPE_1__ z_stream;

/* Variables and functions */
char *streaming_commons_get_next_in(z_stream *stream) {
  return stream->next_in;
}


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

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

LLVM IR (-O0):
%struct.TYPE_3__ = type { i8* }
define i8* @streaming_commons_get_next_in(%struct.TYPE_3__* %0) {
%2 = alloca %struct.TYPE_3__*
store %struct.TYPE_3__* %0, %struct.TYPE_3__** %2
%3 = load %struct.TYPE_3__*, %struct.TYPE_3__** %2
%4 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %3, i32 0, i32 0
%5 = load i8*, i8** %4
ret i8* %5
}

LLVM IR (-O2):
%struct.TYPE_3__ = type { i8* }
define i8* @streaming_commons_get_next_in(%struct.TYPE_3__* nocapture %0) {
%2 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %0, i64 0, i32 0
%3 = load i8*, i8** %2
ret i8* %3
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void ft_memdel(void **ap) {
  if (!ap)
    return;
  free(*ap);
  *ap = NULL;
}


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

x86 assembly (clang, -O2):
<ft_memdel>:
test   %rdi,%rdi
je     1129 <ft_memdel+0x19>
push   %rbx
mov    %rdi,%rbx
mov    (%rdi),%rdi
call   1030 <free@plt>
movq   $0x0,(%rbx)
pop    %rbx
ret

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

LLVM IR (-O2):
define void @ft_memdel(i8** %0) {
%2 = icmp eq i8** %0, null
br i1 %2, label %6, label %3
3: ; preds = %1
%4 = load i8*, i8** %0
%5 = tail call i32 @free(i8* %4)
store i8* null, i8** %0
br label %6
6: ; preds = %1, %3
ret void
}
int func(void) {
  int n = 3;
  int m = 5;
  n | m;
  return 0;
}


x86 assembly (clang, -O0):
<func>:
push   %rbp
mov    %rsp,%rbp
movl   $0x3,-0x4(%rbp)
movl   $0x5,-0x8(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @func() {
ret i32 0
}
void bochs_breakpoint(void) { __asm__ __volatile__("xchgw %bx, %bx"); }


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

x86 assembly (clang, -O2):
<bochs_breakpoint>:
xchg   %bx,%bx
ret

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

LLVM IR (-O2):
define void @bochs_breakpoint() {
tail call void asm sideeffect "xchgw %bx, %bx", "~{dirflag},~{fpsr},~{flags}"()
ret void
}
void set_cwd(const char *cwd) {
  __asm__ __volatile__("int $0x40" ::"a"(30), "b"(1), "c"(cwd));
}


x86 assembly (clang, -O0):
<set_cwd>:
push   %rbp
mov    %rsp,%rbp
push   %rbx
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rcx
mov    $0x1e,%eax
mov    $0x1,%ebx
int    $0x40
pop    %rbx
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_cwd>:
push   %rbx
mov    %rdi,%rcx
mov    $0x1e,%eax
mov    $0x1,%ebx
int    $0x40
pop    %rbx
ret

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

LLVM IR (-O2):
define void @set_cwd(i8* %0) {
tail call void asm sideeffect "int $$0x40", "{ax},{bx},{cx},~{dirflag},~{fpsr},~{flags}"(i32 30, i32 1, i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ ENOSYS;
int /*<<< orphan*/ errno;
int utmpname(const char *file) {
  errno = ENOSYS;
  return -1;
}


x86 assembly (clang, -O0):
<utmpname>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    0x2ed9(%rip),%rax
mov    (%rax),%ecx
mov    0x2ec0(%rip),%rax
mov    %ecx,(%rax)
mov    $0xffffffff,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<utmpname>:
mov    0x2ee1(%rip),%rax
mov    (%rax),%eax
mov    0x2ec8(%rip),%rcx
mov    %eax,(%rcx)
mov    $0xffffffff,%eax
ret

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

LLVM IR (-O2):
@ENOSYS = global i32 0
@errno = global i32 0
define i32 @utmpname(i8* nocapture readnone %0) {
%2 = load i32, i32* @ENOSYS
store i32 %2, i32* @errno
ret i32 -1
}
void ff_hevc_put_hevc_bi_qpel_hv64_10_sse4() {}


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

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

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

LLVM IR (-O2):
define void @ff_hevc_put_hevc_bi_qpel_hv64_10_sse4() {
ret void
}
char *BF_options() { return ("blowfish(idx)"); }


x86 assembly (clang, -O0):
<BF_options>:
push   %rbp
mov    %rsp,%rbp
lea    0xef5(%rip),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<BF_options>:
lea    0xef9(%rip),%rax
ret

LLVM IR (-O0):
@.str = [14 x i8] c"blowfish(idx)\00"
define i8* @BF_options() {
ret i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [14 x i8] c"blowfish(idx)\00"
define i8* @BF_options() {
ret i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0)
}
/* Variables and functions */
int munmap(void *, size_t);
int munmap_wrap(void *addr, size_t length) { return munmap(addr, length); }


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

x86 assembly (clang, -O2):
<munmap_wrap>:
jmp    1030 <munmap@plt>

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

LLVM IR (-O2):
define i32 @munmap_wrap(i8* %0, i64 %1) {
%3 = tail call i32 @munmap(i8* %0, i64 %1)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main(void) { printf("Hello, world!\n"); }


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

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

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

LLVM IR (-O2):
@str = [14 x i8] c"Hello, world!\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @str, i64 0, i64 0))
ret i32 0
}
void test6_T_pollen__run__E() {}


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

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

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

LLVM IR (-O2):
define void @test6_T_pollen__run__E() {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ ptrdiff_t;

/* Variables and functions */
int ffts_compare_offsets(const void *pa, const void *pb) {
  const ptrdiff_t a = *(const ptrdiff_t *)pa;
  const ptrdiff_t b = *(const ptrdiff_t *)pb;
  return (a > b) - (a < b);
}


x86 assembly (clang, -O0):
<ffts_compare_offsets>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x18(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x18(%rbp),%eax
setg   %al
and    $0x1,%al
movzbl %al,%eax
mov    -0x14(%rbp),%ecx
cmp    -0x18(%rbp),%ecx
setl   %cl
and    $0x1,%cl
movzbl %cl,%ecx
sub    %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ffts_compare_offsets>:
mov    (%rdi),%ecx
xor    %eax,%eax
xor    %edx,%edx
cmp    (%rsi),%ecx
setg   %al
setl   %dl
sub    %edx,%eax
ret

LLVM IR (-O0):
define i32 @ffts_compare_offsets(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i32
store i8* %0, i8** %3
store i8* %1, i8** %4
%7 = load i8*, i8** %3
%8 = bitcast i8* %7 to i32*
%9 = load i32, i32* %8
store i32 %9, i32* %5
%10 = load i8*, i8** %4
%11 = bitcast i8* %10 to i32*
%12 = load i32, i32* %11
store i32 %12, i32* %6
%13 = load i32, i32* %5
%14 = load i32, i32* %6
%15 = icmp sgt i32 %13, %14
%16 = zext i1 %15 to i32
%17 = load i32, i32* %5
%18 = load i32, i32* %6
%19 = icmp slt i32 %17, %18
%20 = zext i1 %19 to i32
%21 = sub nsw i32 %16, %20
ret i32 %21
}

LLVM IR (-O2):
define i32 @ffts_compare_offsets(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i32*
%4 = load i32, i32* %3
%5 = bitcast i8* %1 to i32*
%6 = load i32, i32* %5
%7 = icmp sgt i32 %4, %6
%8 = zext i1 %7 to i32
%9 = icmp slt i32 %4, %6
%10 = sext i1 %9 to i32
%11 = add nsw i32 %10, %8
ret i32 %11
}
/* Variables and functions */
int /*<<< orphan*/ i2c_debug(char const *, int);
void i2c_log(const char *s) { i2c_debug(s, 1); }


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

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

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

LLVM IR (-O2):
define void @i2c_log(i8* %0) {
%2 = tail call i32 @i2c_debug(i8* %0, i32 1)
ret void
}