xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ puts(char *);
void print_trailer(void) {
  puts("extra_conf_args=\"cross_signum=$cross_signum "
       "cross_stack_direction=$cross_stack_direction "
       "cross_linuxthreads=$cross_linuxthreads "
       "cross_linuxthreads_static=$cross_linuxthreads_static\"\n"
       "\n"
       "srcdir=`dirname $0`\n"
       "if test ! -f \"$srcdir/configure\" ; then\n"
       "  echo \"The script $0 must be in the same directory as the configure "
       "script.\"\n"
       "  exit 1\n"
       "fi\n"
       "${srcdir}/configure --host=$TARGET_TYPE --program-prefix='' "
       "$extra_conf_args \"$@\"\n");
}


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

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

LLVM IR (-O0):
@.str = [416 x i8] c"extra_conf_args=\22cross_signum=$cross_signum cross_stack_direction=$cross_stack_direction cross_linuxthreads=$cross_linuxthreads cross_linuxthreads_static=$cross_linuxthreads_static\22\0A\0Asrcdir=`dirname $0`\0Aif test ! -f \22$srcdir/configure\22 ; then\0A echo \22The script $0 must be in the same directory as the configure script.\22\0A exit 1\0Afi\0A${srcdir}/configure --host=$TARGET_TYPE --program-prefix='' $extra_conf_args \22$@\22\0A\00"
define void @print_trailer() {
%1 = call i32 @puts(i8* getelementptr inbounds ([416 x i8], [416 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [416 x i8] c"extra_conf_args=\22cross_signum=$cross_signum cross_stack_direction=$cross_stack_direction cross_linuxthreads=$cross_linuxthreads cross_linuxthreads_static=$cross_linuxthreads_static\22\0A\0Asrcdir=`dirname $0`\0Aif test ! -f \22$srcdir/configure\22 ; then\0A echo \22The script $0 must be in the same directory as the configure script.\22\0A exit 1\0Afi\0A${srcdir}/configure --host=$TARGET_TYPE --program-prefix='' $extra_conf_args \22$@\22\0A\00"
define void @print_trailer() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([416 x i8], [416 x i8]* @.str, i64 0, i64 0))
ret void
}
__attribute__((always_)) void *radix_tree_indirect_to_ptr(void *ptr) {
  return (void *)((unsigned long)ptr & ~1);
}


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

x86 assembly (clang, -O2):
<radix_tree_indirect_to_ptr>:
mov    %rdi,%rax
and    $0xfffffffffffffffe,%rax
ret

LLVM IR (-O0):
define i8* @radix_tree_indirect_to_ptr(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = ptrtoint i8* %3 to i64
%5 = and i64 %4, -2
%6 = inttoptr i64 %5 to i8*
ret i8* %6
}

LLVM IR (-O2):
define i8* @radix_tree_indirect_to_ptr(i8* %0) {
%2 = ptrtoint i8* %0 to i64
%3 = and i64 %2, -2
%4 = inttoptr i64 %3 to i8*
ret i8* %4
}
void d2i_DHparams(void) {}


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

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

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

LLVM IR (-O2):
define void @d2i_DHparams() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void resource_free(void *a) { free(a); }


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

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

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

LLVM IR (-O2):
define void @resource_free(i8* nocapture %0) {
%2 = tail call i32 @free(i8* %0)
ret void
}
/* Type definitions */
typedef int uint32_t;
typedef int /*<<< orphan*/ uint16_t;

/* Variables and functions */
__attribute__((always_)) void BME_OR_H(volatile uint16_t *addr,
                                       register uint16_t wdata) {
  *(volatile uint16_t *)((uint32_t)addr | (1 << 27)) = wdata;
}


x86 assembly (clang, -O0):
<BME_OR_H>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%ecx
mov    -0x8(%rbp),%rax
or     $0x8000000,%eax
cltq
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<BME_OR_H>:
movslq %edi,%rax
or     $0x8000000,%rax
mov    %esi,(%rax)
ret

LLVM IR (-O0):
define void @BME_OR_H(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 = ptrtoint i32* %6 to i32
%8 = or i32 %7, 134217728
%9 = sext i32 %8 to i64
%10 = inttoptr i64 %9 to i32*
store volatile i32 %5, i32* %10
ret void
}

LLVM IR (-O2):
define void @BME_OR_H(i32* %0, i32 %1) {
%3 = ptrtoint i32* %0 to i64
%4 = shl i64 %3, 32
%5 = ashr exact i64 %4, 32
%6 = or i64 %5, 134217728
%7 = inttoptr i64 %6 to i32*
store volatile i32 %1, i32* %7
ret void
}
/* Type definitions */
typedef int uint64_t;

/* Variables and functions */
int ntohl(int);
uint64_t ntohll(uint64_t host_longlong) {
  int x = 1;
  if (*(char *)&x == 1)
    return ((((uint64_t)ntohl(host_longlong)) << 32) +
            ntohl(host_longlong >> 32));
  else
    return host_longlong;
}


x86 assembly (clang, -O0):
<ntohll>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
movl   $0x1,-0xc(%rbp)
movsbl -0xc(%rbp),%eax
cmp    $0x1,%eax
jne    115f <ntohll+0x4f>
mov    -0x8(%rbp),%edi
call   1030 <ntohl@plt>
mov    $0x20,%ecx
shl    %cl,%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%edi
mov    $0x20,%ecx
sar    %cl,%edi
call   1030 <ntohl@plt>
mov    %eax,%ecx
mov    -0x10(%rbp),%eax
add    %ecx,%eax
mov    %eax,-0x4(%rbp)
jmp    1165 <ntohll+0x55>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ntohll>:
push   %rbx
mov    %edi,%ebx
call   1030 <ntohl@plt>
call   1030 <ntohl@plt>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @ntohll(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 1, i32* %4
%5 = bitcast i32* %4 to i8*
%6 = load i8, i8* %5
%7 = sext i8 %6 to i32
%8 = icmp eq i32 %7, 1
br i1 %8, label %9, label %17
9: ; preds = %1
%10 = load i32, i32* %3
%11 = call i32 @ntohl(i32 %10)
%12 = shl i32 %11, 32
%13 = load i32, i32* %3
%14 = ashr i32 %13, 32
%15 = call i32 @ntohl(i32 %14)
%16 = add nsw i32 %12, %15
store i32 %16, i32* %2
br label %19
17: ; preds = %1
%18 = load i32, i32* %3
store i32 %18, i32* %2
br label %19
19: ; preds = %17, %9
%20 = load i32, i32* %2
ret i32 %20
}

LLVM IR (-O2):
define i32 @ntohll(i32 returned %0) {
%2 = tail call i32 @ntohl(i32 %0)
%3 = tail call i32 @ntohl(i32 poison)
ret i32 %0
}
/* Variables and functions */
double M_PI;
int cos(double);
double cos_interpolate(double y0, double y1, double mu) {
  double mu2 = (1 - cos(mu * M_PI)) / 2;
  return y0 * (1 - mu2) + y1 * mu2;
}


x86 assembly (clang, -O0):
<cos_interpolate>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
mov    0x2eb5(%rip),%rax
mulsd  (%rax),%xmm0
call   1030 <cos@plt>
mov    %eax,%ecx
mov    $0x1,%eax
sub    %ecx,%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
cvtsi2sd %eax,%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  0xe9d(%rip),%xmm2
subsd  -0x20(%rbp),%xmm2
movsd  -0x10(%rbp),%xmm1
mulsd  -0x20(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cos_interpolate>:
sub    $0x18,%rsp
movsd  %xmm1,0x8(%rsp)
movsd  %xmm0,0x10(%rsp)
mov    0x2ec1(%rip),%rax
mulsd  (%rax),%xmm2
movapd %xmm2,%xmm0
call   1030 <cos@plt>
mov    $0x1,%ecx
sub    %eax,%ecx
mov    %ecx,%eax
shr    $0x1f,%eax
add    %ecx,%eax
sar    %eax
xorps  %xmm1,%xmm1
cvtsi2sd %eax,%xmm1
movsd  0xead(%rip),%xmm0
subsd  %xmm1,%xmm0
movsd  0x8(%rsp),%xmm2
mulsd  %xmm1,%xmm2
mulsd  0x10(%rsp),%xmm0
addsd  %xmm2,%xmm0
add    $0x18,%rsp
ret

LLVM IR (-O0):
@M_PI = global double 0.000000e+00
define double @cos_interpolate(double %0, double %1, double %2) {
%4 = alloca double
%5 = alloca double
%6 = alloca double
%7 = alloca double
store double %0, double* %4
store double %1, double* %5
store double %2, double* %6
%8 = load double, double* %6
%9 = load double, double* @M_PI
%10 = fmul double %8, %9
%11 = call i32 @cos(double %10)
%12 = sub nsw i32 1, %11
%13 = sdiv i32 %12, 2
%14 = sitofp i32 %13 to double
store double %14, double* %7
%15 = load double, double* %4
%16 = load double, double* %7
%17 = fsub double 1.000000e+00, %16
%18 = load double, double* %5
%19 = load double, double* %7
%20 = fmul double %18, %19
%21 = call double @llvm.fmuladd.f64(double %15, double %17, double %20)
ret double %21
}

LLVM IR (-O2):
@M_PI = global double 0.000000e+00
define double @cos_interpolate(double %0, double %1, double %2) {
%4 = load double, double* @M_PI
%5 = fmul double %4, %2
%6 = tail call i32 @cos(double %5)
%7 = sub nsw i32 1, %6
%8 = sdiv i32 %7, 2
%9 = sitofp i32 %8 to double
%10 = fsub double 1.000000e+00, %9
%11 = fmul double %9, %1
%12 = tail call double @llvm.fmuladd.f64(double %0, double %10, double %11)
ret double %12
}
/* Type definitions */
struct timespec {
  long tv_sec;
  long tv_nsec;
};

/* Variables and functions */
long timespec_milliseconds(struct timespec *a) {
  return a->tv_sec * 1000L + a->tv_nsec / 1000000L;
}


x86 assembly (clang, -O0):
<timespec_milliseconds>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
imul   $0x3e8,(%rax),%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    0x8(%rax),%rax
mov    $0xf4240,%ecx
cqto
idiv   %rcx
mov    %rax,%rcx
mov    -0x10(%rbp),%rax
add    %rcx,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<timespec_milliseconds>:
imul   $0x3e8,(%rdi),%rcx
movabs $0x431bde82d7b634db,%rax
de 1b 43
imulq  0x8(%rdi)
mov    %rdx,%rax
shr    $0x3f,%rax
sar    $0x12,%rdx
add    %rdx,%rax
add    %rcx,%rax
ret

LLVM IR (-O0):
%struct.timespec = type { i64, i64 }
define i64 @timespec_milliseconds(%struct.timespec* %0) {
%2 = alloca %struct.timespec*
store %struct.timespec* %0, %struct.timespec** %2
%3 = load %struct.timespec*, %struct.timespec** %2
%4 = getelementptr inbounds %struct.timespec, %struct.timespec* %3, i32 0, i32 0
%5 = load i64, i64* %4
%6 = mul nsw i64 %5, 1000
%7 = load %struct.timespec*, %struct.timespec** %2
%8 = getelementptr inbounds %struct.timespec, %struct.timespec* %7, i32 0, i32 1
%9 = load i64, i64* %8
%10 = sdiv i64 %9, 1000000
%11 = add nsw i64 %6, %10
ret i64 %11
}

LLVM IR (-O2):
%struct.timespec = type { i64, i64 }
define i64 @timespec_milliseconds(%struct.timespec* nocapture %0) {
%2 = getelementptr inbounds %struct.timespec, %struct.timespec* %0, i64 0, i32 0
%3 = load i64, i64* %2
%4 = mul nsw i64 %3, 1000
%5 = getelementptr inbounds %struct.timespec, %struct.timespec* %0, i64 0, i32 1
%6 = load i64, i64* %5
%7 = sdiv i64 %6, 1000000
%8 = add nsw i64 %7, %4
ret i64 %8
}
/* Variables and functions */
int __VERIFIER_nondet_int();
int main() {
  int x, y;
  x = __VERIFIER_nondet_int();
  y = 1;
  while (x > 0) {
    x = x - y;
    y = y + 1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <__VERIFIER_nondet_int@plt>
mov    %eax,-0x8(%rbp)
movl   $0x1,-0xc(%rbp)
cmpl   $0x0,-0x8(%rbp)
jle    1151 <main+0x41>
mov    -0x8(%rbp),%eax
sub    -0xc(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1130 <main+0x20>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @__VERIFIER_nondet_int()
ret i32 0
}
int lre_conf_init(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @lre_conf_init() {
ret i32 0
}
void _mutex_release(unsigned int tid, unsigned int mid) {
  unsigned int cmd;
  unsigned int sta;
  cmd = (((0x13000000)) | ((1 & ((1 << 3) - 1)) << (8 + (6 + 2))) |
         ((tid & ((1 << 8) - 1)) << (6 + 2)) | ((mid & ((1 << 6) - 1)) << 2));
  sta = (*(volatile unsigned int *)(cmd));
}


x86 assembly (clang, -O0):
<_mutex_release>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
and    $0xff,%eax
shl    $0x8,%eax
or     $0x13010000,%eax
mov    -0x8(%rbp),%ecx
and    $0x3f,%ecx
shl    $0x2,%ecx
or     %ecx,%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    (%rax),%eax
mov    %eax,-0x10(%rbp)
pop    %rbp
ret

x86 assembly (clang, -O2):
<_mutex_release>:
shl    $0x8,%edi
movzwl %di,%eax
and    $0x3f,%esi
lea    (%rax,%rsi,4),%eax
mov    0x13010000(%rax),%eax
ret

LLVM IR (-O0):
define void @_mutex_release(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%7 = load i32, i32* %3
%8 = and i32 %7, 255
%9 = shl i32 %8, 8
%10 = or i32 318832640, %9
%11 = load i32, i32* %4
%12 = and i32 %11, 63
%13 = shl i32 %12, 2
%14 = or i32 %10, %13
store i32 %14, i32* %5
%15 = load i32, i32* %5
%16 = zext i32 %15 to i64
%17 = inttoptr i64 %16 to i32*
%18 = load volatile i32, i32* %17
store i32 %18, i32* %6
ret void
}

LLVM IR (-O2):
define void @_mutex_release(i32 %0, i32 %1) {
%3 = shl i32 %0, 8
%4 = and i32 %3, 65280
%5 = shl i32 %1, 2
%6 = and i32 %5, 252
%7 = or i32 %4, %6
%8 = or i32 %7, 318832640
%9 = zext i32 %8 to i64
%10 = inttoptr i64 %9 to i32*
%11 = load volatile i32, i32* %10
ret void
}
/* Variables and functions */
size_t vi_to_size(void const *, size_t, size_t *);
size_t ntuple_rank(const void *data, size_t size, size_t *rank) {
  return vi_to_size(data, size, rank);
}


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

x86 assembly (clang, -O2):
<ntuple_rank>:
jmp    1030 <vi_to_size@plt>

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

LLVM IR (-O2):
define i64 @ntuple_rank(i8* %0, i64 %1, i64* %2) {
%4 = tail call i64 @vi_to_size(i8* %0, i64 %1, i64* %2)
ret i64 %4
}
/* Type definitions */
struct statfs {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ ENOSYS;
int /*<<< orphan*/ errno;
int /*<<< orphan*/ printf(char *);
int statfs(const char *path __attribute__((unused)),
           struct statfs *buf __attribute__((unused))) {
  printf("statfs\n");
  errno = ENOSYS;
  return (-1);
}


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

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

LLVM IR (-O0):
%struct.statfs = type { i32 }
@.str = [8 x i8] c"statfs\0A\00"
@ENOSYS = global i32 0
@errno = global i32 0
define i32 @statfs(i8* %0, %struct.statfs* %1) {
%3 = alloca i8*
%4 = alloca %struct.statfs*
store i8* %0, i8** %3
store %struct.statfs* %1, %struct.statfs** %4
%5 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
%6 = load i32, i32* @ENOSYS
store i32 %6, i32* @errno
ret i32 -1
}

LLVM IR (-O2):
%struct.statfs = type { i32 }
@ENOSYS = global i32 0
@errno = global i32 0
@str = [7 x i8] c"statfs\00"
define i32 @statfs(i8* nocapture readnone %0, %struct.statfs* nocapture readnone %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @str, i64 0, i64 0))
%4 = load i32, i32* @ENOSYS
store i32 %4, i32* @errno
ret i32 -1
}
/* Variables and functions */
char *malloc(scalar_t__);
int /*<<< orphan*/ strcpy(char *, char const *);
scalar_t__ strlen(char const *);
char *strdup(const char *s) {
  char *p = malloc(strlen(s) + 1);
  if (p) {
    strcpy(p, s);
  }
  return p;
}


x86 assembly (clang, -O0):
<strdup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <strlen@plt>
mov    %rax,%rdi
add    $0x1,%rdi
call   1050 <malloc@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     116d <strdup+0x3d>
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rsi
call   1030 <strcpy@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strdup>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
call   1040 <strlen@plt>
lea    0x1(%rax),%rdi
call   1050 <malloc@plt>
mov    %rax,%rbx
test   %rax,%rax
je     1158 <strdup+0x28>
mov    %rbx,%rdi
mov    %r14,%rsi
call   1030 <strcpy@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i8* @strdup(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i64 @strlen(i8* %4)
%6 = add nsw i64 %5, 1
%7 = call i8* @malloc(i64 %6)
store i8* %7, i8** %3
%8 = load i8*, i8** %3
%9 = icmp ne i8* %8, null
br i1 %9, label %10, label %14
10: ; preds = %1
%11 = load i8*, i8** %3
%12 = load i8*, i8** %2
%13 = call i32 @strcpy(i8* %11, i8* %12)
br label %14
14: ; preds = %10, %1
%15 = load i8*, i8** %3
ret i8* %15
}

LLVM IR (-O2):
define i8* @strdup(i8* %0) {
%2 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%3 = add nsw i64 %2, 1
%4 = tail call i8* @malloc(i64 %3)
%5 = icmp eq i8* %4, null
br i1 %5, label %8, label %6
6: ; preds = %1
%7 = tail call i32 @strcpy(i8* %4, i8* %0)
br label %8
8: ; preds = %6, %1
ret i8* %4
}
void printbool() {}


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

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

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

LLVM IR (-O2):
define void @printbool() {
ret void
}
void f(void) {
#pragma css task
}


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

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

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

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


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

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

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

LLVM IR (-O2):
define void @excpt_dummy() {
ret void
}
/* Variables and functions */
scalar_t__ v4mapped(unsigned char const *);
int is_default(const unsigned char *prefix, int plen) {
  return plen == 0 || (plen == 96 && v4mapped(prefix));
}


x86 assembly (clang, -O0):
<is_default>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    $0x1,%al
cmpl   $0x0,-0xc(%rbp)
mov    %al,-0xd(%rbp)
je     1156 <is_default+0x46>
xor    %eax,%eax
cmpl   $0x60,-0xc(%rbp)
mov    %al,-0xe(%rbp)
jne    1150 <is_default+0x40>
mov    -0x8(%rbp),%rdi
call   1030 <v4mapped@plt>
cmp    $0x0,%rax
setne  %al
mov    %al,-0xe(%rbp)
mov    -0xe(%rbp),%al
mov    %al,-0xd(%rbp)
mov    -0xd(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_default>:
test   %esi,%esi
je     112f <is_default+0x1f>
cmp    $0x60,%esi
jne    1135 <is_default+0x25>
push   %rax
call   1030 <v4mapped@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
setne  %al
add    $0x8,%rsp
ret
mov    $0x1,%eax
ret
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @is_default(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = icmp eq i32 %5, 0
br i1 %6, label %16, label %7
7: ; preds = %2
%8 = load i32, i32* %4
%9 = icmp eq i32 %8, 96
br i1 %9, label %10, label %14
10: ; preds = %7
%11 = load i8*, i8** %3
%12 = call i64 @v4mapped(i8* %11)
%13 = icmp ne i64 %12, 0
br label %14
14: ; preds = %10, %7
%15 = phi i1 [ false, %7 ], [ %13, %10 ]
br label %16
16: ; preds = %14, %2
%17 = phi i1 [ true, %2 ], [ %15, %14 ]
%18 = zext i1 %17 to i32
ret i32 %18
}

LLVM IR (-O2):
define i32 @is_default(i8* %0, i32 %1) {
switch i32 %1, label %7 [
i32 0, label %8
i32 96, label %3
]
3: ; preds = %2
%4 = tail call i64 @v4mapped(i8* %0)
%5 = icmp ne i64 %4, 0
%6 = zext i1 %5 to i32
br label %8
7: ; preds = %2
br label %8
8: ; preds = %2, %7, %3
%9 = phi i32 [ 1, %2 ], [ %6, %3 ], [ 0, %7 ]
ret i32 %9
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int /*<<< orphan*/ uint32_t;
typedef int /*<<< orphan*/ uint16_t;

/* Variables and functions */
__attribute__((visibility("hidden"))) void
write_file(uint16_t address, uint8_t *data, uint32_t lenght) {}


x86 assembly (clang, -O0):
<write_file>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
define hidden void @write_file(i32 %0, i32* %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32*
%6 = alloca i32
store i32 %0, i32* %4
store i32* %1, i32** %5
store i32 %2, i32* %6
ret void
}

LLVM IR (-O2):
define hidden void @write_file(i32 %0, i32* nocapture %1, i32 %2) {
ret void
}
int prime(int num) {
  int i;
  for (i = 2; i < num; i++)
    if (num % i == 0) {
      return 0;
    }
  return 1;
}


x86 assembly (clang, -O0):
<prime>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
movl   $0x2,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    1149 <prime+0x49>
mov    -0x8(%rbp),%eax
cltd
idivl  -0xc(%rbp)
cmp    $0x0,%edx
jne    1136 <prime+0x36>
movl   $0x0,-0x4(%rbp)
jmp    1150 <prime+0x50>
jmp    113b <prime+0x3b>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    110e <prime+0xe>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<prime>:
mov    $0x1,%ecx
cmp    $0x3,%edi
jl     1120 <prime+0x20>
mov    $0x2,%esi
nop
mov    %edi,%eax
cltd
idiv   %esi
test   %edx,%edx
je     1123 <prime+0x23>
add    $0x1,%esi
cmp    %esi,%edi
jne    1110 <prime+0x10>
mov    %ecx,%eax
ret
xor    %ecx,%ecx
mov    %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @prime(i32 %0) {
%2 = icmp sgt i32 %0, 2
br i1 %2, label %5, label %10
3: ; preds = %5
%4 = icmp eq i32 %9, %0
br i1 %4, label %10, label %5
5: ; preds = %1, %3
%6 = phi i32 [ %9, %3 ], [ 2, %1 ]
%7 = srem i32 %0, %6
%8 = icmp eq i32 %7, 0
%9 = add nuw nsw i32 %6, 1
br i1 %8, label %10, label %3
10: ; preds = %5, %3, %1
%11 = phi i32 [ 1, %1 ], [ 1, %3 ], [ 0, %5 ]
ret i32 %11
}
int test_imm_07int64_midword_reg(long long val) {
  return ((val >> 16) & (0x07 << 0)) ? -20 : -40;
}


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

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

LLVM IR (-O0):
define i32 @test_imm_07int64_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, 7
%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_07int64_midword_reg(i64 %0) {
%2 = and i64 %0, 458752
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
int int_lesser(void *a, void *b) { return *(int *)a < *(int *)b; }


x86 assembly (clang, -O0):
<int_lesser>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
mov    -0x10(%rbp),%rcx
cmp    (%rcx),%eax
setl   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<int_lesser>:
mov    (%rdi),%ecx
xor    %eax,%eax
cmp    (%rsi),%ecx
setl   %al
ret

LLVM IR (-O0):
define i32 @int_lesser(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %3
%6 = bitcast i8* %5 to i32*
%7 = load i32, i32* %6
%8 = load i8*, i8** %4
%9 = bitcast i8* %8 to i32*
%10 = load i32, i32* %9
%11 = icmp slt i32 %7, %10
%12 = zext i1 %11 to i32
ret i32 %12
}

LLVM IR (-O2):
define i32 @int_lesser(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 slt i32 %4, %6
%8 = zext i1 %7 to i32
ret i32 %8
}
__attribute__((__weak__, __always___)) char *
softboundmpx_dcgettext(const char *domainname, const char *msgid,
                       int category) {
  void *ret_ptr = dcgettext(domainname, msgid, category);
  __softboundmpx_store_return_metadata(
      ret_ptr, (void *)((char *)ret_ptr + strlen(ret_ptr)));
  return ret_ptr;
}


x86 assembly (clang, -O0):
<softboundmpx_dcgettext>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%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
mov    $0x0,%al
call   1030 <dcgettext@plt>
cltq
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x20(%rbp),%rax
mov    %rax,-0x30(%rbp)
mov    -0x20(%rbp),%rdi
call   1040 <strlen@plt>
mov    -0x30(%rbp),%rsi
mov    -0x28(%rbp),%rdi
add    %rax,%rsi
mov    $0x0,%al
call   1050 <__softboundmpx_store_return_metadata@plt>
mov    -0x20(%rbp),%rax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<softboundmpx_dcgettext>:
push   %rbx
xor    %eax,%eax
call   1030 <dcgettext@plt>
movslq %eax,%rbx
mov    %rbx,%rdi
call   1040 <strlen@plt>
lea    (%rax,%rbx,1),%rsi
mov    %rbx,%rdi
xor    %eax,%eax
call   1050 <__softboundmpx_store_return_metadata@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
define weak i8* @softboundmpx_dcgettext(i8* %0, i8* %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i32
%7 = alloca i8*
store i8* %0, i8** %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%8 = load i8*, i8** %4
%9 = load i8*, i8** %5
%10 = load i32, i32* %6
%11 = call i32 (i8*, i8*, i32, ...) bitcast (i32 (...)* @dcgettext to i32 (i8*, i8*, i32, ...)*)(i8* %8, i8* %9, i32 %10)
%12 = sext i32 %11 to i64
%13 = inttoptr i64 %12 to i8*
store i8* %13, i8** %7
%14 = load i8*, i8** %7
%15 = load i8*, i8** %7
%16 = load i8*, i8** %7
%17 = call i64 @strlen(i8* %16)
%18 = getelementptr inbounds i8, i8* %15, i64 %17
%19 = call i32 (i8*, i8*, ...) bitcast (i32 (...)* @__softboundmpx_store_return_metadata to i32 (i8*, i8*, ...)*)(i8* %14, i8* %18)
%20 = load i8*, i8** %7
ret i8* %20
}

LLVM IR (-O2):
define weak i8* @softboundmpx_dcgettext(i8* %0, i8* %1, i32 %2) {
%4 = tail call i32 (i8*, i8*, i32, ...) bitcast (i32 (...)* @dcgettext to i32 (i8*, i8*, i32, ...)*)(i8* %0, i8* %1, i32 %2)
%5 = sext i32 %4 to i64
%6 = inttoptr i64 %5 to i8*
%7 = tail call i64 @strlen(i8* dereferenceable(1) %6)
%8 = getelementptr inbounds i8, i8* %6, i64 %7
%9 = tail call i32 (i8*, i8*, ...) bitcast (i32 (...)* @__softboundmpx_store_return_metadata to i32 (i8*, i8*, ...)*)(i8* %6, i8* %8)
ret i8* %6
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ perror(char *);
char *strndup(char *, size_t);
char *estrndup(char *s, size_t n) {
  char *r;
  if (!(r = strndup(s, n)))
    do {
      perror("strndup failed");
      exit(EXIT_FAILURE);
    } while (0);
  return r;
}


x86 assembly (clang, -O0):
<estrndup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <strndup@plt>
mov    %rax,-0x18(%rbp)
cmp    $0x0,%rax
jne    117a <estrndup+0x4a>
jmp    1160 <estrndup+0x30>
lea    0xe99(%rip),%rdi
call   1040 <perror@plt>
mov    0x2e6d(%rip),%rax
mov    (%rax),%edi
call   1050 <exit@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<estrndup>:
push   %rax
call   1030 <strndup@plt>
test   %rax,%rax
je     113d <estrndup+0xd>
pop    %rcx
ret
lea    0xebc(%rip),%rdi
call   1040 <perror@plt>
mov    0x2e90(%rip),%rax
mov    (%rax),%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [15 x i8] c"strndup failed\00"
@EXIT_FAILURE = global i32 0
define i8* @estrndup(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
%5 = alloca i8*
store i8* %0, i8** %3
store i64 %1, i64* %4
%6 = load i8*, i8** %3
%7 = load i64, i64* %4
%8 = call i8* @strndup(i8* %6, i64 %7)
store i8* %8, i8** %5
%9 = icmp ne i8* %8, null
br i1 %9, label %16, label %10
10: ; preds = %2
br label %11
11: ; preds = %10
%12 = call i32 @perror(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
%13 = load i32, i32* @EXIT_FAILURE
%14 = call i32 @exit(i32 %13)
unreachable
15: ; No predecessors!
br label %16
16: ; preds = %15, %2
%17 = load i8*, i8** %5
ret i8* %17
}

LLVM IR (-O2):
@.str = [15 x i8] c"strndup failed\00"
@EXIT_FAILURE = global i32 0
define noalias i8* @estrndup(i8* nocapture %0, i64 %1) {
%3 = tail call i8* @strndup(i8* %0, i64 %1)
%4 = icmp eq i8* %3, null
br i1 %4, label %5, label %9
5: ; preds = %2
%6 = tail call i32 @perror(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
%7 = load i32, i32* @EXIT_FAILURE
%8 = tail call i32 @exit(i32 %7)
unreachable
9: ; preds = %2
ret i8* %3
}
int array_size2(char a[]) { return sizeof(a); }


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

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

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

LLVM IR (-O2):
define i32 @array_size2(i8* nocapture readnone %0) {
ret i32 8
}
/* Variables and functions */
int core3_safe(char const *);
int U_EMRSELECTPALETTE_safe(const char *record) { return (core3_safe(record)); }


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

x86 assembly (clang, -O2):
<U_EMRSELECTPALETTE_safe>:
jmp    1030 <core3_safe@plt>

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

LLVM IR (-O2):
define i32 @U_EMRSELECTPALETTE_safe(i8* %0) {
%2 = tail call i32 @core3_safe(i8* %0)
ret i32 %2
}
void reverse_array(int *a, int n) {
  int i, tmp;
  for (i = 0; i < n--; i++) {
    tmp = a[i];
    a[i] = a[n];
    a[n] = tmp;
  }
}


x86 assembly (clang, -O0):
<reverse_array>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
mov    -0xc(%rbp),%ecx
mov    %ecx,%edx
add    $0xffffffff,%edx
mov    %edx,-0xc(%rbp)
cmp    %ecx,%eax
jge    1168 <reverse_array+0x68>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    (%rax,%rcx,4),%edx
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x14(%rbp),%edx
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1112 <reverse_array+0x12>
pop    %rbp
ret

x86 assembly (clang, -O2):
<reverse_array>:
test   %esi,%esi
jle    112c <reverse_array+0x2c>
mov    %esi,%eax
add    $0xffffffffffffffff,%rax
xor    %ecx,%ecx
nopl   0x0(%rax)
mov    (%rdi,%rcx,4),%edx
mov    (%rdi,%rax,4),%esi
mov    %esi,(%rdi,%rcx,4)
mov    %edx,(%rdi,%rax,4)
add    $0x1,%rcx
lea    -0x1(%rax),%rdx
cmp    %rax,%rcx
mov    %rdx,%rax
jl     1110 <reverse_array+0x10>
ret

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

LLVM IR (-O2):
define void @reverse_array(i32* nocapture %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %16
4: ; preds = %2
%5 = zext i32 %1 to i64
br label %6
6: ; preds = %4, %6
%7 = phi i64 [ 0, %4 ], [ %14, %6 ]
%8 = phi i64 [ %5, %4 ], [ %9, %6 ]
%9 = add nsw i64 %8, -1
%10 = getelementptr inbounds i32, i32* %0, i64 %7
%11 = load i32, i32* %10
%12 = getelementptr inbounds i32, i32* %0, i64 %9
%13 = load i32, i32* %12
store i32 %13, i32* %10
store i32 %11, i32* %12
%14 = add nuw nsw i64 %7, 1
%15 = icmp slt i64 %14, %9
br i1 %15, label %6, label %16
16: ; preds = %6, %2
ret void
}
int any_double_vec(double *vec, int x) {
  int i;
  int any = 0;
  for (i = 0; i < x; i++) {
    if (vec[i] != 0.0) {
      any = 1;
      return any;
    }
  }
  return any;
}


x86 assembly (clang, -O0):
<any_double_vec>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
movl   $0x0,-0x1c(%rbp)
movl   $0x0,-0x18(%rbp)
mov    -0x18(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    116f <any_double_vec+0x6f>
mov    -0x10(%rbp),%rax
movslq -0x18(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    114a <any_double_vec+0x4a>
jp     114a <any_double_vec+0x4a>
jmp    115c <any_double_vec+0x5c>
movl   $0x1,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1175 <any_double_vec+0x75>
jmp    1161 <any_double_vec+0x61>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    1119 <any_double_vec+0x19>
mov    -0x1c(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<any_double_vec>:
test   %esi,%esi
jle    1126 <any_double_vec+0x26>
mov    %esi,%eax
xor    %ecx,%ecx
xorpd  %xmm0,%xmm0
nopl   0x0(%rax)
movsd  (%rdi,%rcx,8),%xmm1
ucomisd %xmm0,%xmm1
jne    1129 <any_double_vec+0x29>
jp     1129 <any_double_vec+0x29>
add    $0x1,%rcx
cmp    %rcx,%rax
jne    1110 <any_double_vec+0x10>
xor    %eax,%eax
ret
mov    $0x1,%eax
ret

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

LLVM IR (-O2):
define i32 @any_double_vec(double* nocapture %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %14
4: ; preds = %2
%5 = zext i32 %1 to i64
br label %8
6: ; preds = %8
%7 = icmp eq i64 %13, %5
br i1 %7, label %14, label %8
8: ; preds = %4, %6
%9 = phi i64 [ 0, %4 ], [ %13, %6 ]
%10 = getelementptr inbounds double, double* %0, i64 %9
%11 = load double, double* %10
%12 = fcmp une double %11, 0.000000e+00
%13 = add nuw nsw i64 %9, 1
br i1 %12, label %14, label %6
14: ; preds = %8, %6, %2
%15 = phi i32 [ 0, %2 ], [ 0, %6 ], [ 1, %8 ]
ret i32 %15
}
void GOMP_ordered_start(void) {}


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

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

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

LLVM IR (-O2):
define void @GOMP_ordered_start() {
ret void
}
/* Variables and functions */
float vec3_length(float *);
void vec3_normalize(float v[3]) {
  const float invLen = 1.0f / vec3_length(v);
  v[0] *= invLen;
  v[1] *= invLen;
  v[2] *= invLen;
}


x86 assembly (clang, -O0):
<vec3_normalize>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <vec3_length@plt>
movaps %xmm0,%xmm1
movss  0xed0(%rip),%xmm0
divss  %xmm1,%xmm0
movss  %xmm0,-0xc(%rbp)
movss  -0xc(%rbp),%xmm0
mov    -0x8(%rbp),%rax
mulss  (%rax),%xmm0
movss  %xmm0,(%rax)
movss  -0xc(%rbp),%xmm0
mov    -0x8(%rbp),%rax
mulss  0x4(%rax),%xmm0
movss  %xmm0,0x4(%rax)
movss  -0xc(%rbp),%xmm0
mov    -0x8(%rbp),%rax
mulss  0x8(%rax),%xmm0
movss  %xmm0,0x8(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<vec3_normalize>:
push   %rbx
mov    %rdi,%rbx
call   1030 <vec3_length@plt>
movss  0xedf(%rip),%xmm1
divss  %xmm0,%xmm1
movss  (%rbx),%xmm0
mulss  %xmm1,%xmm0
movss  %xmm0,(%rbx)
movss  0x4(%rbx),%xmm0
mulss  %xmm1,%xmm0
movss  %xmm0,0x4(%rbx)
mulss  0x8(%rbx),%xmm1
movss  %xmm1,0x8(%rbx)
pop    %rbx
ret

LLVM IR (-O0):
define void @vec3_normalize(float* %0) {
%2 = alloca float*
%3 = alloca float
store float* %0, float** %2
%4 = load float*, float** %2
%5 = call float @vec3_length(float* %4)
%6 = fdiv float 1.000000e+00, %5
store float %6, float* %3
%7 = load float, float* %3
%8 = load float*, float** %2
%9 = getelementptr inbounds float, float* %8, i64 0
%10 = load float, float* %9
%11 = fmul float %10, %7
store float %11, float* %9
%12 = load float, float* %3
%13 = load float*, float** %2
%14 = getelementptr inbounds float, float* %13, i64 1
%15 = load float, float* %14
%16 = fmul float %15, %12
store float %16, float* %14
%17 = load float, float* %3
%18 = load float*, float** %2
%19 = getelementptr inbounds float, float* %18, i64 2
%20 = load float, float* %19
%21 = fmul float %20, %17
store float %21, float* %19
ret void
}

LLVM IR (-O2):
define void @vec3_normalize(float* %0) {
%2 = tail call float @vec3_length(float* %0)
%3 = fdiv float 1.000000e+00, %2
%4 = load float, float* %0
%5 = fmul float %4, %3
store float %5, float* %0
%6 = getelementptr inbounds float, float* %0, i64 1
%7 = load float, float* %6
%8 = fmul float %3, %7
store float %8, float* %6
%9 = getelementptr inbounds float, float* %0, i64 2
%10 = load float, float* %9
%11 = fmul float %3, %10
store float %11, float* %9
ret void
}
void brk_inst(void) {}


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

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

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

LLVM IR (-O2):
define void @brk_inst() {
ret void
}
/* Variables and functions */
char *str_nreplace(char *, char const *, char const *, int /*<<< orphan*/);
int /*<<< orphan*/ strlen(char *);
char *str_replace(char *str, const char *delim, const char *with) {
  return str_nreplace(str, delim, with, strlen(str));
}


x86 assembly (clang, -O0):
<str_replace>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x30(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
mov    -0x30(%rbp),%rdi
mov    -0x28(%rbp),%rsi
mov    -0x20(%rbp),%rdx
mov    %eax,%ecx
call   1040 <str_nreplace@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<str_replace>:
push   %r15
push   %r14
push   %rbx
mov    %rdx,%r14
mov    %rsi,%r15
mov    %rdi,%rbx
call   1030 <strlen@plt>
mov    %rbx,%rdi
mov    %r15,%rsi
mov    %r14,%rdx
mov    %eax,%ecx
pop    %rbx
pop    %r14
pop    %r15
jmp    1040 <str_nreplace@plt>

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

LLVM IR (-O2):
define i8* @str_replace(i8* %0, i8* %1, i8* %2) {
%4 = tail call i32 @strlen(i8* %0)
%5 = tail call i8* @str_nreplace(i8* %0, i8* %1, i8* %2, i32 %4)
ret i8* %5
}
/* Variables and functions */
int EXIT_SUCCESS;
int /*<<< orphan*/ mount(char const *, char const *, char const *,
                         int /*<<< orphan*/, int /*<<< orphan*/);
int main(int argc, char **argv) {
  const char *source = *++argv;
  const char *target = *++argv;
  const char *fsType = *++argv;
  mount(source, target, fsType, 0, 0);
  return EXIT_SUCCESS;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x8,%rcx
mov    %rcx,-0x10(%rbp)
mov    0x8(%rax),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x8,%rcx
mov    %rcx,-0x10(%rbp)
mov    0x8(%rax),%rax
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x8,%rcx
mov    %rcx,-0x10(%rbp)
mov    0x8(%rax),%rax
mov    %rax,-0x28(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x20(%rbp),%rsi
mov    -0x28(%rbp),%rdx
xor    %r8d,%r8d
mov    %r8d,%ecx
call   1030 <mount@plt>
mov    0x2e57(%rip),%rax
mov    (%rax),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    0x8(%rsi),%rdi
mov    0x10(%rsi),%rax
mov    0x18(%rsi),%rdx
mov    %rax,%rsi
xor    %ecx,%ecx
xor    %r8d,%r8d
call   1030 <mount@plt>
mov    0x2eaf(%rip),%rax
mov    (%rax),%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@EXIT_SUCCESS = global i32 0
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = getelementptr inbounds i8*, i8** %1, i64 1
%4 = load i8*, i8** %3
%5 = getelementptr inbounds i8*, i8** %1, i64 2
%6 = load i8*, i8** %5
%7 = getelementptr inbounds i8*, i8** %1, i64 3
%8 = load i8*, i8** %7
%9 = tail call i32 @mount(i8* %4, i8* %6, i8* %8, i32 0, i32 0)
%10 = load i32, i32* @EXIT_SUCCESS
ret i32 %10
}
/* Variables and functions */
int /*<<< orphan*/ W_OK;
int access(char const *, int /*<<< orphan*/);
bool FileWritePermissionCheck(const char *file_name) {
  if (access(file_name, W_OK) != -1) {
    return true;
  } else {
    return false;
  }
}


x86 assembly (clang, -O0):
<FileWritePermissionCheck>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    0x2ec1(%rip),%rax
mov    (%rax),%esi
call   1030 <access@plt>
cmp    $0xffffffff,%eax
je     1143 <FileWritePermissionCheck+0x33>
movl   $0x1,-0x4(%rbp)
jmp    114a <FileWritePermissionCheck+0x3a>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<FileWritePermissionCheck>:
push   %rax
mov    0x2ed0(%rip),%rax
mov    (%rax),%esi
call   1030 <access@plt>
xor    %ecx,%ecx
cmp    $0xffffffff,%eax
setne  %cl
mov    %ecx,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@W_OK = global i32 0
define i32 @FileWritePermissionCheck(i8* nocapture %0) {
%2 = load i32, i32* @W_OK
%3 = tail call i32 @access(i8* %0, i32 %2)
%4 = icmp ne i32 %3, -1
%5 = zext i1 %4 to i32
ret i32 %5
}
__attribute__((no_sanitize("implicit-integer-sign-change"))) unsigned int
blacklist_3(signed int src) {
  return src;
}


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

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

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

LLVM IR (-O2):
define i32 @blacklist_3(i32 returned %0) {
ret i32 %0
}