xunge/DecIR huggingface dataset:
__complex__ int ctest_int(__complex__ int x) {
  __complex__ int res;
  res = ~x;
  return res;
}


x86 assembly (clang, -O0):
<ctest_int>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%ecx
xor    %eax,%eax
sub    -0xc(%rbp),%eax
mov    %ecx,-0x18(%rbp)
mov    %eax,-0x14(%rbp)
mov    -0x18(%rbp),%ecx
mov    -0x14(%rbp),%eax
mov    %ecx,-0x8(%rbp)
mov    %eax,-0x4(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ctest_int>:
movabs $0xffffffff00000000,%rcx
ff ff ff
and    %rdi,%rcx
mov    %edi,%eax
sub    %rcx,%rax
ret

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

LLVM IR (-O2):
define i64 @ctest_int(i64 %0) {
%2 = and i64 %0, -4294967296
%3 = and i64 %0, 4294967295
%4 = sub i64 %3, %2
ret i64 %4
}
unsigned long int system_get_memory_swap() { return 0; }


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

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

LLVM IR (-O0):
define i64 @system_get_memory_swap() {
ret i64 0
}

LLVM IR (-O2):
define i64 @system_get_memory_swap() {
ret i64 0
}
/* Variables and functions */
char *month_name(int);
int /*<<< orphan*/ printf(char *, char *);
int main() {
  printf("Month: %s\n", month_name(1));
  return (0);
}


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

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

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

LLVM IR (-O2):
@.str = [11 x i8] c"Month: %s\0A\00"
define i32 @main() {
%1 = tail call i8* @month_name(i32 1)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* %1)
ret i32 0
}
unsigned long __mp_squareroot(unsigned long n) {
  unsigned long r, t;
  for (r = 0, t = 1; n >= t; n -= t, r++, t += 2)
    ;
  return r;
}


x86 assembly (clang, -O0):
<__mp_squareroot>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movq   $0x0,-0x10(%rbp)
movq   $0x1,-0x18(%rbp)
mov    -0x8(%rbp),%rax
cmp    -0x18(%rbp),%rax
jb     1157 <__mp_squareroot+0x57>
jmp    112b <__mp_squareroot+0x2b>
mov    -0x18(%rbp),%rcx
mov    -0x8(%rbp),%rax
sub    %rcx,%rax
mov    %rax,-0x8(%rbp)
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
mov    -0x18(%rbp),%rax
add    $0x2,%rax
mov    %rax,-0x18(%rbp)
jmp    1118 <__mp_squareroot+0x18>
mov    -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<__mp_squareroot>:
test   %rdi,%rdi
je     1121 <__mp_squareroot+0x21>
mov    $0x1,%ecx
xor    %eax,%eax
nopl   0x0(%rax)
sub    %rcx,%rdi
add    $0x1,%rax
add    $0x2,%rcx
cmp    %rcx,%rdi
jae    1110 <__mp_squareroot+0x10>
ret
xor    %eax,%eax
ret

LLVM IR (-O0):
define i64 @__mp_squareroot(i64 %0) {
%2 = alloca i64
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %2
store i64 0, i64* %3
store i64 1, i64* %4
br label %5
5: ; preds = %10, %1
%6 = load i64, i64* %2
%7 = load i64, i64* %4
%8 = icmp uge i64 %6, %7
br i1 %8, label %9, label %18
9: ; preds = %5
br label %10
10: ; preds = %9
%11 = load i64, i64* %4
%12 = load i64, i64* %2
%13 = sub i64 %12, %11
store i64 %13, i64* %2
%14 = load i64, i64* %3
%15 = add i64 %14, 1
store i64 %15, i64* %3
%16 = load i64, i64* %4
%17 = add i64 %16, 2
store i64 %17, i64* %4
br label %5
18: ; preds = %5
%19 = load i64, i64* %3
ret i64 %19
}

LLVM IR (-O2):
define i64 @__mp_squareroot(i64 %0) {
%2 = icmp eq i64 %0, 0
br i1 %2, label %11, label %3
3: ; preds = %1, %3
%4 = phi i64 [ %9, %3 ], [ 1, %1 ]
%5 = phi i64 [ %8, %3 ], [ 0, %1 ]
%6 = phi i64 [ %7, %3 ], [ %0, %1 ]
%7 = sub i64 %6, %4
%8 = add i64 %5, 1
%9 = add i64 %4, 2
%10 = icmp ult i64 %7, %9
br i1 %10, label %11, label %3
11: ; preds = %3, %1
%12 = phi i64 [ 0, %1 ], [ %8, %3 ]
ret i64 %12
}
__attribute__((always_)) void rep_nop(void) {
  asm volatile("rep; nop" ::: "memory");
}


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

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

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

LLVM IR (-O2):
define void @rep_nop() {
tail call void asm sideeffect "rep; nop", "~{memory},~{dirflag},~{fpsr},~{flags}"()
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ pid_t;

/* Variables and functions */
int /*<<< orphan*/ diminuto_reaper_reap_generic(int, int *, int /*<<< orphan*/);
pid_t diminuto_reaper_wait(int *statusp) {
  return diminuto_reaper_reap_generic(-1, statusp, 0);
}


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

x86 assembly (clang, -O2):
<diminuto_reaper_wait>:
mov    %rdi,%rsi
mov    $0xffffffff,%edi
xor    %edx,%edx
jmp    1030 <diminuto_reaper_reap_generic@plt>

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

LLVM IR (-O2):
define i32 @diminuto_reaper_wait(i32* %0) {
%2 = tail call i32 @diminuto_reaper_reap_generic(i32 -1, i32* %0, i32 0)
ret i32 %2
}
char char_fetch_sub_consume(char *ptr, int value) {
  return __atomic_fetch_sub(ptr, value, 1);
}


x86 assembly (clang, -O0):
<char_fetch_sub_consume>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rcx
mov    -0xc(%rbp),%al
mov    %al,-0xd(%rbp)
mov    -0xd(%rbp),%al
neg    %al
lock xadd %al,(%rcx)
mov    %al,-0xe(%rbp)
movsbl -0xe(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<char_fetch_sub_consume>:
mov    %esi,%eax
neg    %al
lock xadd %al,(%rdi)
ret

LLVM IR (-O0):
define signext i8 @char_fetch_sub_consume(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
%5 = alloca i8
%6 = alloca i8
store i8* %0, i8** %3
store i32 %1, i32* %4
%7 = load i8*, i8** %3
%8 = load i32, i32* %4
%9 = trunc i32 %8 to i8
store i8 %9, i8* %5
%10 = load i8, i8* %5
%11 = atomicrmw sub i8* %7, i8 %10 acquire
store i8 %11, i8* %6
%12 = load i8, i8* %6
ret i8 %12
}

LLVM IR (-O2):
define signext i8 @char_fetch_sub_consume(i8* nocapture %0, i32 %1) {
%3 = trunc i32 %1 to i8
%4 = atomicrmw sub i8* %0, i8 %3 acquire
ret i8 %4
}
/* Variables and functions */
int /*<<< orphan*/ MAP_SHARED;
void *pft_mmap(size_t, int /*<<< orphan*/, int /*<<< orphan*/ *);
void *valloc_shared(size_t size) { return pft_mmap(size, MAP_SHARED, NULL); }


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

x86 assembly (clang, -O2):
<valloc_shared>:
mov    0x2ed9(%rip),%rax
mov    (%rax),%esi
xor    %edx,%edx
jmp    1030 <pft_mmap@plt>

LLVM IR (-O0):
@MAP_SHARED = global i32 0
define i8* @valloc_shared(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = load i32, i32* @MAP_SHARED
%5 = call i8* @pft_mmap(i64 %3, i32 %4, i32* null)
ret i8* %5
}

LLVM IR (-O2):
@MAP_SHARED = global i32 0
define i8* @valloc_shared(i64 %0) {
%2 = load i32, i32* @MAP_SHARED
%3 = tail call i8* @pft_mmap(i64 %0, i32 %2, i32* null)
ret i8* %3
}
int CStrings__len(char *str) {
  for (int i = 0; i <= 8 * 1024; i++)
    if (str[i] == 0)
      return i;
  str[8 * 1024] = 0;
  return 8 * 1024;
}


x86 assembly (clang, -O0):
<CStrings__len>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
cmpl   $0x2000,-0x14(%rbp)
jg     114f <CStrings__len+0x4f>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x0,%eax
jne    113c <CStrings__len+0x3c>
mov    -0x14(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1161 <CStrings__len+0x61>
jmp    1141 <CStrings__len+0x41>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    110f <CStrings__len+0xf>
mov    -0x10(%rbp),%rax
movb   $0x0,0x2000(%rax)
movl   $0x2000,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<CStrings__len>:
mov    $0x2,%eax
cs nopw 0x0(%rax,%rax,1)
nop
cmpb   $0x0,-0x2(%rdi,%rax,1)
je     113d <CStrings__len+0x3d>
cmpb   $0x0,-0x1(%rdi,%rax,1)
je     1142 <CStrings__len+0x42>
cmpb   $0x0,(%rdi,%rax,1)
je     1141 <CStrings__len+0x41>
add    $0x3,%rax
cmp    $0x2003,%rax
jne    1110 <CStrings__len+0x10>
movb   $0x0,0x2000(%rdi)
mov    $0x2000,%eax
ret
add    $0xfffffffffffffffe,%rax
ret
add    $0xffffffffffffffff,%rax
ret

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

LLVM IR (-O2):
define i32 @CStrings__len(i8* nocapture %0) {
br label %2
2: ; preds = %17, %1
%3 = phi i64 [ 0, %1 ], [ %18, %17 ]
%4 = getelementptr inbounds i8, i8* %0, i64 %3
%5 = load i8, i8* %4
%6 = icmp eq i8 %5, 0
br i1 %6, label %22, label %7
7: ; preds = %2
%8 = add nuw nsw i64 %3, 1
%9 = getelementptr inbounds i8, i8* %0, i64 %8
%10 = load i8, i8* %9
%11 = icmp eq i8 %10, 0
br i1 %11, label %22, label %12
12: ; preds = %7
%13 = add nuw nsw i64 %3, 2
%14 = getelementptr inbounds i8, i8* %0, i64 %13
%15 = load i8, i8* %14
%16 = icmp eq i8 %15, 0
br i1 %16, label %22, label %17
17: ; preds = %12
%18 = add nuw nsw i64 %3, 3
%19 = icmp eq i64 %18, 8193
br i1 %19, label %20, label %2
20: ; preds = %17
%21 = getelementptr inbounds i8, i8* %0, i64 8192
store i8 0, i8* %21
br label %25
22: ; preds = %12, %7, %2
%23 = phi i64 [ %3, %2 ], [ %8, %7 ], [ %13, %12 ]
%24 = trunc i64 %23 to i32
br label %25
25: ; preds = %22, %20
%26 = phi i32 [ 8192, %20 ], [ %24, %22 ]
ret i32 %26
}
void batadv_nc_status_update(struct net_device *net_dev) {}


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

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

LLVM IR (-O0):
%struct.net_device = type opaque
define void @batadv_nc_status_update(%struct.net_device* %0) {
%2 = alloca %struct.net_device*
store %struct.net_device* %0, %struct.net_device** %2
ret void
}

LLVM IR (-O2):
%struct.net_device = type opaque
define void @batadv_nc_status_update(%struct.net_device* nocapture %0) {
ret void
}
/* Variables and functions */
int bswapl(int);
int bswapq(int);
int /*<<< orphan*/ printf(char *, int);
int main(void) {
  printf("0x%llx\n", bswapq(0x8877665544332211ULL));
  printf("0x%x\n", bswapl(0x44332211ULL));
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x44332211,%edi
call   1040 <bswapq@plt>
lea    0xebe(%rip),%rdi
mov    %eax,%esi
call   1050 <printf@plt>
mov    $0x44332211,%edi
call   1030 <bswapl@plt>
lea    0xeae(%rip),%rdi
mov    %eax,%esi
call   1050 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [8 x i8] c"0x%llx\0A\00"
@.str.1 = [6 x i8] c"0x%x\0A\00"
define i32 @main() {
%1 = tail call i32 @bswapq(i32 1144201745)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 %1)
%3 = tail call i32 @bswapl(i32 1144201745)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32 %3)
ret i32 0
}
unsigned char linux_inb(unsigned long port) {
  return (*(volatile unsigned char *)(0xb0100000 + port));
}


x86 assembly (clang, -O0):
<linux_inb>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movabs $0xb0100000,%rax
add    -0x8(%rbp),%rax
mov    (%rax),%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<linux_inb>:
mov    $0xb0100000,%eax
mov    (%rdi,%rax,1),%al
ret

LLVM IR (-O0):
define zeroext i8 @linux_inb(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = add i64 2953838592, %3
%5 = inttoptr i64 %4 to i8*
%6 = load volatile i8, i8* %5
ret i8 %6
}

LLVM IR (-O2):
define zeroext i8 @linux_inb(i64 %0) {
%2 = add i64 %0, 2953838592
%3 = inttoptr i64 %2 to i8*
%4 = load volatile i8, i8* %3
ret i8 %4
}
long return_long_1() { return -1073741824; }


x86 assembly (clang, -O0):
<return_long_1>:
push   %rbp
mov    %rsp,%rbp
mov    $0xffffffffc0000000,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<return_long_1>:
mov    $0xffffffffc0000000,%rax
ret

LLVM IR (-O0):
define i64 @return_long_1() {
ret i64 -1073741824
}

LLVM IR (-O2):
define i64 @return_long_1() {
ret i64 -1073741824
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void usage(void) {
  fprintf(stderr, "Usage: /usr/bin/which [-a] args\n");
  exit(2);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x2,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %rax
mov    0x2eb8(%rip),%rax
mov    (%rax),%edi
lea    0xecf(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x2,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [33 x i8] c"Usage: /usr/bin/which [-a] args\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @exit(i32 2)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [33 x i8] c"Usage: /usr/bin/which [-a] args\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @exit(i32 2)
unreachable
}
/* Variables and functions */
char *strtok(char *, char const *);
char *sent_split(char *sentence, const char *sep) {
  return (strtok(sentence, sep));
}


x86 assembly (clang, -O0):
<sent_split>:
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 <strtok@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sent_split>:
jmp    1030 <strtok@plt>

LLVM IR (-O0):
define i8* @sent_split(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 = load i8*, i8** %4
%7 = call i8* @strtok(i8* %5, i8* %6)
ret i8* %7
}

LLVM IR (-O2):
define i8* @sent_split(i8* %0, i8* nocapture %1) {
%3 = tail call i8* @strtok(i8* %0, i8* %1)
ret i8* %3
}
/* Variables and functions */
float __nv_fast_exp10f(float);
float __exp10f(float __a) { return __nv_fast_exp10f(__a); }


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

x86 assembly (clang, -O2):
<__exp10f>:
jmp    1030 <__nv_fast_exp10f@plt>

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

LLVM IR (-O2):
define float @__exp10f(float %0) {
%2 = tail call float @__nv_fast_exp10f(float %0)
ret float %2
}
int test_imm_56uint8_reg(unsigned char val) {
  return ((val) & (0x56 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_56uint8_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%edx
and    $0x56,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_56uint8_reg>:
test   $0x56,%dil
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_56uint8_reg(i8 zeroext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = zext i8 %3 to i32
%5 = and i32 %4, 86
%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_56uint8_reg(i8 zeroext %0) {
%2 = and i8 %0, 86
%3 = icmp eq i8 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
int test_imm_47uint8_reg(unsigned char val) {
  return ((val) & (-0x47 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_47uint8_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%edx
and    $0xffffffb9,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_47uint8_reg>:
test   $0xb9,%dil
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_47uint8_reg(i8 zeroext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = zext i8 %3 to i32
%5 = and i32 %4, -71
%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_47uint8_reg(i8 zeroext %0) {
%2 = and i8 %0, -71
%3 = icmp eq i8 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
void sigusr1() {}


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

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

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

LLVM IR (-O2):
define void @sigusr1() {
ret void
}
/* Type definitions */
struct ioctl_entry {
  int dummy;
};
struct ioctl_args {
  int dummy;
};

/* Variables and functions */
int do_set_ioctl_int(struct ioctl_args *, struct ioctl_entry *);
int set_scan_period(struct ioctl_args *args, struct ioctl_entry *entry) {
  return do_set_ioctl_int(args, entry);
}


x86 assembly (clang, -O0):
<set_scan_period>:
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 <do_set_ioctl_int@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_scan_period>:
jmp    1030 <do_set_ioctl_int@plt>

LLVM IR (-O0):
%struct.ioctl_args = type { i32 }
%struct.ioctl_entry = type { i32 }
define i32 @set_scan_period(%struct.ioctl_args* %0, %struct.ioctl_entry* %1) {
%3 = alloca %struct.ioctl_args*
%4 = alloca %struct.ioctl_entry*
store %struct.ioctl_args* %0, %struct.ioctl_args** %3
store %struct.ioctl_entry* %1, %struct.ioctl_entry** %4
%5 = load %struct.ioctl_args*, %struct.ioctl_args** %3
%6 = load %struct.ioctl_entry*, %struct.ioctl_entry** %4
%7 = call i32 @do_set_ioctl_int(%struct.ioctl_args* %5, %struct.ioctl_entry* %6)
ret i32 %7
}

LLVM IR (-O2):
%struct.ioctl_args = type { i32 }
%struct.ioctl_entry = type { i32 }
define i32 @set_scan_period(%struct.ioctl_args* %0, %struct.ioctl_entry* %1) {
%3 = tail call i32 @do_set_ioctl_int(%struct.ioctl_args* %0, %struct.ioctl_entry* %1)
ret i32 %3
}
/* Type definitions */
struct nlattr {
  int dummy;
};

/* Variables and functions */
scalar_t__ libbpf_nla_data(struct nlattr const *);
const char *libbpf_nla_getattr_str(const struct nlattr *nla) {
  return (const char *)libbpf_nla_data(nla);
}


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

x86 assembly (clang, -O2):
<libbpf_nla_getattr_str>:
jmp    1030 <libbpf_nla_data@plt>

LLVM IR (-O0):
%struct.nlattr = type { i32 }
define i8* @libbpf_nla_getattr_str(%struct.nlattr* %0) {
%2 = alloca %struct.nlattr*
store %struct.nlattr* %0, %struct.nlattr** %2
%3 = load %struct.nlattr*, %struct.nlattr** %2
%4 = call i64 @libbpf_nla_data(%struct.nlattr* %3)
%5 = inttoptr i64 %4 to i8*
ret i8* %5
}

LLVM IR (-O2):
%struct.nlattr = type { i32 }
define i8* @libbpf_nla_getattr_str(%struct.nlattr* %0) {
%2 = tail call i64 @libbpf_nla_data(%struct.nlattr* %0)
%3 = inttoptr i64 %2 to i8*
ret i8* %3
}
/* Variables and functions */
char const *vp_file_read(char *);
const char *vp_pty_read(char *args) { return vp_file_read(args); }


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

x86 assembly (clang, -O2):
<vp_pty_read>:
jmp    1030 <vp_file_read@plt>

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

LLVM IR (-O2):
define i8* @vp_pty_read(i8* %0) {
%2 = tail call i8* @vp_file_read(i8* %0)
ret i8* %2
}
unsigned xrop3_140_1_0(unsigned char s, unsigned char t) {
  unsigned D = 0x00ff;
  unsigned S = ((unsigned)s << 8) | s;
  unsigned T = ((unsigned)t << 8) | t;
  unsigned stk1;
  unsigned stk2;
  unsigned stk3;
  stk3 = ~T;
  stk2 = D | stk3;
  stk1 = S & stk2;
  return (stk1 & (~S)) | (D & S);
}


x86 assembly (clang, -O0):
<xrop3_140_1_0>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %dil,%cl
mov    %cl,-0x1(%rbp)
mov    %al,-0x2(%rbp)
movl   $0xff,-0x8(%rbp)
movzbl -0x1(%rbp),%eax
shl    $0x8,%eax
movzbl -0x1(%rbp),%ecx
or     %ecx,%eax
mov    %eax,-0xc(%rbp)
movzbl -0x2(%rbp),%eax
shl    $0x8,%eax
movzbl -0x2(%rbp),%ecx
or     %ecx,%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
xor    $0xffffffff,%eax
mov    %eax,-0x1c(%rbp)
mov    -0x8(%rbp),%eax
or     -0x1c(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0xc(%rbp),%eax
and    -0x18(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    -0xc(%rbp),%ecx
xor    $0xffffffff,%ecx
and    %ecx,%eax
mov    -0x8(%rbp),%ecx
and    -0xc(%rbp),%ecx
or     %ecx,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @xrop3_140_1_0(i8 zeroext %0, i8 zeroext %1) {
%3 = alloca i8
%4 = alloca i8
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
store i8 %0, i8* %3
store i8 %1, i8* %4
store i32 255, i32* %5
%11 = load i8, i8* %3
%12 = zext i8 %11 to i32
%13 = shl i32 %12, 8
%14 = load i8, i8* %3
%15 = zext i8 %14 to i32
%16 = or i32 %13, %15
store i32 %16, i32* %6
%17 = load i8, i8* %4
%18 = zext i8 %17 to i32
%19 = shl i32 %18, 8
%20 = load i8, i8* %4
%21 = zext i8 %20 to i32
%22 = or i32 %19, %21
store i32 %22, i32* %7
%23 = load i32, i32* %7
%24 = xor i32 %23, -1
store i32 %24, i32* %10
%25 = load i32, i32* %5
%26 = load i32, i32* %10
%27 = or i32 %25, %26
store i32 %27, i32* %9
%28 = load i32, i32* %6
%29 = load i32, i32* %9
%30 = and i32 %28, %29
store i32 %30, i32* %8
%31 = load i32, i32* %8
%32 = load i32, i32* %6
%33 = xor i32 %32, -1
%34 = and i32 %31, %33
%35 = load i32, i32* %5
%36 = load i32, i32* %6
%37 = and i32 %35, %36
%38 = or i32 %34, %37
ret i32 %38
}

LLVM IR (-O2):
define i32 @xrop3_140_1_0(i8 zeroext %0, i8 zeroext %1) {
%3 = zext i8 %0 to i32
ret i32 %3
}
const char *PHYSFS_getDirSeparator(void) {
  static char retval[2] = {'/', '\0'};
  return retval;
}


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

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

LLVM IR (-O0):
@PHYSFS_getDirSeparator.retval = internal global [2 x i8] c"/\00"
define i8* @PHYSFS_getDirSeparator() {
ret i8* getelementptr inbounds ([2 x i8], [2 x i8]* @PHYSFS_getDirSeparator.retval, i64 0, i64 0)
}

LLVM IR (-O2):
@PHYSFS_getDirSeparator.retval = internal global [2 x i8] c"/\00"
define i8* @PHYSFS_getDirSeparator() {
ret i8* getelementptr inbounds ([2 x i8], [2 x i8]* @PHYSFS_getDirSeparator.retval, i64 0, i64 0)
}
double difficultyRating(void) { return 4.75; }


x86 assembly (clang, -O0):
<difficultyRating>:
push   %rbp
mov    %rsp,%rbp
movsd  0xef4(%rip),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<difficultyRating>:
movsd  0xef8(%rip),%xmm0
ret

LLVM IR (-O0):
define double @difficultyRating() {
ret double 4.750000e+00
}

LLVM IR (-O2):
define double @difficultyRating() {
ret double 4.750000e+00
}
/* Type definitions */
typedef int /*<<< orphan*/ fexcept_t;

/* Variables and functions */
int fesetexceptflag(const fexcept_t *flagp, int excepts) { return 0; }


x86 assembly (clang, -O0):
<fesetexceptflag>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @fesetexceptflag(i32* nocapture readnone %0, i32 %1) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/
__softboundcets_propagate_metadata_shadow_stack_from(int, int /*<<< orphan*/);
void *bsearch(void const *, void const *, size_t, size_t,
              int (*)(void const *, void const *));
__attribute__((__weak__, __always___)) void *
softboundcets_bsearch(const void *key, const void *base, size_t nmemb,
                      size_t size, int (*compar)(const void *, const void *)) {
  void *ret_ptr = bsearch(key, base, nmemb, size, compar);
  __softboundcets_propagate_metadata_shadow_stack_from(2, 0);
  return ret_ptr;
}


x86 assembly (clang, -O0):
<softboundcets_bsearch>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    -0x28(%rbp),%r8
call   1040 <bsearch@plt>
mov    %rax,-0x30(%rbp)
mov    $0x2,%edi
xor    %esi,%esi
call   1030 <__softboundcets_propagate_metadata_shadow_stack_from@plt>
mov    -0x30(%rbp),%rax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<softboundcets_bsearch>:
push   %rbx
call   1040 <bsearch@plt>
mov    %rax,%rbx
mov    $0x2,%edi
xor    %esi,%esi
call   1030 <__softboundcets_propagate_metadata_shadow_stack_from@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
define weak i8* @softboundcets_bsearch(i8* %0, i8* %1, i64 %2, i64 %3, i32 (i8*, i8*)* %4) {
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i64
%9 = alloca i64
%10 = alloca i32 (i8*, i8*)*
%11 = alloca i8*
store i8* %0, i8** %6
store i8* %1, i8** %7
store i64 %2, i64* %8
store i64 %3, i64* %9
store i32 (i8*, i8*)* %4, i32 (i8*, i8*)** %10
%12 = load i8*, i8** %6
%13 = load i8*, i8** %7
%14 = load i64, i64* %8
%15 = load i64, i64* %9
%16 = load i32 (i8*, i8*)*, i32 (i8*, i8*)** %10
%17 = call i8* @bsearch(i8* %12, i8* %13, i64 %14, i64 %15, i32 (i8*, i8*)* %16)
store i8* %17, i8** %11
%18 = call i32 @__softboundcets_propagate_metadata_shadow_stack_from(i32 2, i32 0)
%19 = load i8*, i8** %11
ret i8* %19
}

LLVM IR (-O2):
define weak i8* @softboundcets_bsearch(i8* %0, i8* %1, i64 %2, i64 %3, i32 (i8*, i8*)* %4) {
%6 = tail call i8* @bsearch(i8* %0, i8* %1, i64 %2, i64 %3, i32 (i8*, i8*)* %4)
%7 = tail call i32 @__softboundcets_propagate_metadata_shadow_stack_from(i32 2, i32 0)
ret i8* %6
}
int test_imm_C0uint64_lowword_reg(unsigned long long val) {
  return ((val) & (0xC0 << 0)) ? -20 : -40;
}


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

x86 assembly (clang, -O2):
<test_imm_C0uint64_lowword_reg>:
test   $0xc0,%dil
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_C0uint64_lowword_reg(i64 %0) {
%2 = and i64 %0, 192
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
int __attribute__((no)) bar(int x) {
  if (x > 4)
    return bar(x - 3);
  return 0;
}


x86 assembly (clang, -O0):
<bar>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
cmpl   $0x4,-0x8(%rbp)
jle    1138 <bar+0x28>
mov    -0x8(%rbp),%edi
sub    $0x3,%edi
call   1030 <bar@plt>
mov    %eax,-0x4(%rbp)
jmp    113f <bar+0x2f>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @bar(i32 %0) {
ret i32 0
}
/* Type definitions */
typedef int int64_t;

/* Variables and functions */
int /*<<< orphan*/ printf(char *, float);
float stdlib_strided_smaxabssorted(int, float *, int);
int main() {
  float x[] = {-1.0, -2.0, -3.0, -4.0, -5.0, -6.0, -7.0, -8.0};
  int64_t N = 4;
  int64_t stride = 2;
  float v = stdlib_strided_smaxabssorted(N, x, stride);
  printf("maxabs: %f\n", v);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    0xed1(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xece(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    0xecb(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    0xec8(%rip),%rax
mov    %rax,-0x8(%rbp)
movl   $0x4,-0x24(%rbp)
movl   $0x2,-0x28(%rbp)
mov    -0x24(%rbp),%edi
lea    -0x20(%rbp),%rsi
mov    -0x28(%rbp),%edx
call   1040 <stdlib_strided_smaxabssorted@plt>
movss  %xmm0,-0x2c(%rbp)
movss  -0x2c(%rbp),%xmm0
lea    0xe9e(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x28,%rsp
movaps 0xee5(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0xec9(%rip),%xmm0
movaps %xmm0,(%rsp)
mov    %rsp,%rsi
mov    $0x4,%edi
mov    $0x2,%edx
call   1040 <stdlib_strided_smaxabssorted@plt>
lea    0xecc(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x28,%rsp
ret

LLVM IR (-O0):
@__const.main.x = [8 x float] [float -1.000000e+00, float -2.000000e+00, float -3.000000e+00, float -4.000000e+00, float -5.000000e+00, float -6.000000e+00, float -7.000000e+00, float -8.000000e+00]
@.str = [12 x i8] c"maxabs: %f\0A\00"
define i32 @main() {
%1 = alloca [8 x float]
%2 = alloca i32
%3 = alloca i32
%4 = alloca float
%5 = bitcast [8 x float]* %1 to i8*
store i32 4, i32* %2
store i32 2, i32* %3
%6 = load i32, i32* %2
%7 = getelementptr inbounds [8 x float], [8 x float]* %1, i64 0, i64 0
%8 = load i32, i32* %3
%9 = call float @stdlib_strided_smaxabssorted(i32 %6, float* %7, i32 %8)
store float %9, float* %4
%10 = load float, float* %4
%11 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), float %10)
ret i32 0
}

LLVM IR (-O2):
@__const.main.x = [8 x float] [float -1.000000e+00, float -2.000000e+00, float -3.000000e+00, float -4.000000e+00, float -5.000000e+00, float -6.000000e+00, float -7.000000e+00, float -8.000000e+00]
@.str = [12 x i8] c"maxabs: %f\0A\00"
define i32 @main() {
%1 = alloca [8 x float]
%2 = bitcast [8 x float]* %1 to i8*
%3 = getelementptr inbounds [8 x float], [8 x float]* %1, i64 0, i64 0
%4 = call float @stdlib_strided_smaxabssorted(i32 4, float* %3, i32 2)
%5 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), float %4)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ bits_double(int /*<<< orphan*/);
int /*<<< orphan*/ box_double(int /*<<< orphan*/);
int /*<<< orphan*/ dpop();
int /*<<< orphan*/ to_unsigned_8(int /*<<< orphan*/);
void primitive_bits_double_impl(void) {
  box_double(bits_double(to_unsigned_8(dpop())));
}


x86 assembly (clang, -O0):
<primitive_bits_double_impl>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <dpop@plt>
mov    %eax,%edi
call   1050 <to_unsigned_8@plt>
mov    %eax,%edi
call   1040 <bits_double@plt>
mov    %eax,%edi
call   1060 <box_double@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<primitive_bits_double_impl>:
push   %rax
xor    %eax,%eax
call   1030 <dpop@plt>
mov    %eax,%edi
call   1050 <to_unsigned_8@plt>
mov    %eax,%edi
call   1040 <bits_double@plt>
mov    %eax,%edi
pop    %rax
jmp    1060 <box_double@plt>

LLVM IR (-O0):
define void @primitive_bits_double_impl() {
%1 = call i32 (...) @dpop()
%2 = call i32 @to_unsigned_8(i32 %1)
%3 = call i32 @bits_double(i32 %2)
%4 = call i32 @box_double(i32 %3)
ret void
}

LLVM IR (-O2):
define void @primitive_bits_double_impl() {
%1 = tail call i32 (...) @dpop()
%2 = tail call i32 @to_unsigned_8(i32 %1)
%3 = tail call i32 @bits_double(i32 %2)
%4 = tail call i32 @box_double(i32 %3)
ret void
}
int cairo_code_draw_casWaveLabel_get_height() { return 62; }


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

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

LLVM IR (-O0):
define i32 @cairo_code_draw_casWaveLabel_get_height() {
ret i32 62
}

LLVM IR (-O2):
define i32 @cairo_code_draw_casWaveLabel_get_height() {
ret i32 62
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
void closeMountsTable(FILE *table) {}


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

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

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

LLVM IR (-O2):
define void @closeMountsTable(i32* nocapture %0) {
ret void
}
float foo(float f) {
  if (f < 0.0f)
    f = -f;
  return f;
}


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
xorps  %xmm0,%xmm0
ucomiss -0x4(%rbp),%xmm0
jbe    112d <foo+0x2d>
movss  -0x4(%rbp),%xmm0
movd   %xmm0,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm0
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo>:
movaps 0xef9(%rip),%xmm2
xorps  %xmm0,%xmm2
xorps  %xmm3,%xmm3
movaps %xmm0,%xmm1
cmpltss %xmm3,%xmm1
andps  %xmm1,%xmm2
andnps %xmm0,%xmm1
orps   %xmm2,%xmm1
movaps %xmm1,%xmm0
ret

LLVM IR (-O0):
define float @foo(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = fcmp olt float %3, 0.000000e+00
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load float, float* %2
%7 = fneg float %6
store float %7, float* %2
br label %8
8: ; preds = %5, %1
%9 = load float, float* %2
ret float %9
}

LLVM IR (-O2):
define float @foo(float %0) {
%2 = fcmp olt float %0, 0.000000e+00
%3 = fneg float %0
%4 = select i1 %2, float %3, float %0
ret float %4
}
void dummy_combine_finish(struct ui_entry_combiner_state *st) {}


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

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

LLVM IR (-O0):
%struct.ui_entry_combiner_state = type opaque
define void @dummy_combine_finish(%struct.ui_entry_combiner_state* %0) {
%2 = alloca %struct.ui_entry_combiner_state*
store %struct.ui_entry_combiner_state* %0, %struct.ui_entry_combiner_state** %2
ret void
}

LLVM IR (-O2):
%struct.ui_entry_combiner_state = type opaque
define void @dummy_combine_finish(%struct.ui_entry_combiner_state* nocapture %0) {
ret void
}
void RTBase64Encode(void) {}


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

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

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

LLVM IR (-O2):
define void @RTBase64Encode() {
ret void
}
/* Variables and functions */
scalar_t__ fork();
int /*<<< orphan*/ puts(char *);
int main() {
  if (fork())
    puts("PARENT");
  else
    puts("CHILD");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1040 <fork@plt>
cmp    $0x0,%rax
je     1151 <main+0x31>
lea    0xeb9(%rip),%rdi
call   1030 <puts@plt>
jmp    115d <main+0x3d>
lea    0xeaf(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [7 x i8] c"PARENT\00"
@.str.1 = [6 x i8] c"CHILD\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i64 (...) @fork()
%3 = icmp ne i64 %2, 0
br i1 %3, label %4, label %6
4: ; preds = %0
%5 = call i32 @puts(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
br label %8
6: ; preds = %0
%7 = call i32 @puts(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
br label %8
8: ; preds = %6, %4
ret i32 0
}

LLVM IR (-O2):
@.str = [7 x i8] c"PARENT\00"
@.str.1 = [6 x i8] c"CHILD\00"
define i32 @main() {
%1 = tail call i64 (...) @fork()
%2 = icmp eq i64 %1, 0
%3 = select i1 %2, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0)
%4 = tail call i32 @puts(i8* dereferenceable(1) %3)
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ ssize_t;
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ getdelim(char **, size_t *, char, int /*<<< orphan*/ *);
ssize_t getline(char **__restrict linep, size_t *__restrict linecapp,
                FILE *__restrict fp) {
  return (getdelim(linep, linecapp, '\n', fp));
}


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

x86 assembly (clang, -O2):
<getline>:
mov    %rdx,%rcx
mov    $0xa,%edx
jmp    1030 <getdelim@plt>

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

LLVM IR (-O2):
define i32 @getline(i8** noalias %0, i64* noalias %1, i32* noalias %2) {
%4 = tail call i32 @getdelim(i8** %0, i64* %1, i8 signext 10, i32* %2)
ret i32 %4
}
/* Variables and functions */
int strcmp(char *, char *);
int _cmp_strings(const void *a, const void *b) {
  return (strcmp(((char *)a), ((char *)b)));
}


x86 assembly (clang, -O0):
<_cmp_strings>:
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 <strcmp@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_cmp_strings>:
jmp    1030 <strcmp@plt>

LLVM IR (-O0):
define i32 @_cmp_strings(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 = load i8*, i8** %4
%7 = call i32 @strcmp(i8* %5, i8* %6)
ret i32 %7
}

LLVM IR (-O2):
define i32 @_cmp_strings(i8* nocapture %0, i8* nocapture %1) {
%3 = tail call i32 @strcmp(i8* dereferenceable(1) %0, i8* dereferenceable(1) %1)
ret i32 %3
}
void statemachine() {}


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

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

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

LLVM IR (-O2):
define void @statemachine() {
ret void
}
int bton(s)
char *s;
{
  int n = 0;
  int v = 8;
  while (v) {
    if (*s == '1')
      n |= v;
    v >>= 1;
    s++;
  }
  return n;
}


x86 assembly (clang, -O0):
<bton>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
movl   $0x8,-0x10(%rbp)
cmpl   $0x0,-0x10(%rbp)
je     1153 <bton+0x53>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x31,%eax
jne    1139 <bton+0x39>
mov    -0x10(%rbp),%eax
or     -0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x10(%rbp),%eax
sar    $0x1,%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    1116 <bton+0x16>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<bton>:
xor    %eax,%eax
cmpb   $0x31,(%rdi)
sete   %al
shl    $0x3,%eax
xor    %ecx,%ecx
cmpb   $0x31,0x1(%rdi)
sete   %cl
xor    %edx,%edx
cmpb   $0x31,0x2(%rdi)
lea    (%rax,%rcx,4),%eax
sete   %dl
lea    (%rax,%rdx,2),%ecx
xor    %eax,%eax
cmpb   $0x31,0x3(%rdi)
sete   %al
or     %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @bton(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 49
%4 = select i1 %3, i32 8, i32 0
%5 = getelementptr inbounds i8, i8* %0, i64 1
%6 = load i8, i8* %5
%7 = icmp eq i8 %6, 49
%8 = select i1 %7, i32 4, i32 0
%9 = or i32 %8, %4
%10 = getelementptr inbounds i8, i8* %0, i64 2
%11 = load i8, i8* %10
%12 = icmp eq i8 %11, 49
%13 = select i1 %12, i32 2, i32 0
%14 = or i32 %13, %9
%15 = getelementptr inbounds i8, i8* %0, i64 3
%16 = load i8, i8* %15
%17 = icmp eq i8 %16, 49
%18 = zext i1 %17 to i32
%19 = or i32 %14, %18
ret i32 %19
}
int test_imm_0Euint32_reg(unsigned int val) {
  return ((val) & (0x0E << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_0Euint32_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edx
and    $0xe,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_0Euint32_reg>:
test   $0xe,%dil
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_0Euint32_reg(i32 %0) {
%2 = and i32 %0, 14
%3 = icmp eq i32 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
int read(int fd, char *buf, int nbytes) { return -1; }


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

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

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

LLVM IR (-O2):
define i32 @read(i32 %0, i8* nocapture readnone %1, i32 %2) {
ret i32 -1
}
__attribute__((no, noclone)) int f3(struct A *x, struct A *z) {
  asm volatile("" : : "g"(x), "g"(z) : "memory");
  return 0;
}


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

x86 assembly (clang, -O2):
<f3>:
mov    %rsi,-0x10(%rsp)
mov    %rdi,-0x8(%rsp)
xor    %eax,%eax
ret

LLVM IR (-O0):
%struct.A = type opaque
define i32 @f3(%struct.A* %0, %struct.A* %1) {
%3 = alloca %struct.A*
%4 = alloca %struct.A*
store %struct.A* %0, %struct.A** %3
store %struct.A* %1, %struct.A** %4
%5 = load %struct.A*, %struct.A** %3
%6 = load %struct.A*, %struct.A** %4
ret i32 0
}

LLVM IR (-O2):
%struct.A = type opaque
define i32 @f3(%struct.A* %0, %struct.A* %1) {
tail call void asm sideeffect "", "imr,imr,~{memory},~{dirflag},~{fpsr},~{flags}"(%struct.A* %0, %struct.A* %1)
ret i32 0
}