xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *const, size_t const, size_t const);
void printType(char *const name, size_t const size) {
  printf("%s (%zd bytes, %zd bits):\n   ", name, size, size * 8);
}


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

x86 assembly (clang, -O2):
<printType>:
mov    %rsi,%rdx
mov    %rdi,%rsi
lea    0x0(,%rdx,8),%rcx
lea    0xedb(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [30 x i8] c"%s (%zd bytes, %zd bits):\0A \00"
define void @printType(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
store i8* %0, i8** %3
store i64 %1, i64* %4
%5 = load i8*, i8** %3
%6 = load i64, i64* %4
%7 = load i64, i64* %4
%8 = mul i64 %7, 8
%9 = call i32 @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0), i8* %5, i64 %6, i64 %8)
ret void
}

LLVM IR (-O2):
@.str = [30 x i8] c"%s (%zd bytes, %zd bits):\0A \00"
define void @printType(i8* %0, i64 %1) {
%3 = shl i64 %1, 3
%4 = tail call i32 @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0), i8* %0, i64 %1, i64 %3)
ret void
}
char *langDbgDevPpi() { return "PPI"; }


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

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

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

LLVM IR (-O2):
@.str = [4 x i8] c"PPI\00"
define i8* @langDbgDevPpi() {
ret i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0)
}
int zone_dataset_visible(const char *dataset, int *write) {
  if (write) {
    *write = 1;
  }
  return 1;
}


x86 assembly (clang, -O0):
<zone_dataset_visible>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     1121 <zone_dataset_visible+0x21>
mov    -0x10(%rbp),%rax
movl   $0x1,(%rax)
mov    $0x1,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<zone_dataset_visible>:
test   %rsi,%rsi
je     110b <zone_dataset_visible+0xb>
movl   $0x1,(%rsi)
mov    $0x1,%eax
ret

LLVM IR (-O0):
define i32 @zone_dataset_visible(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 ne i32* %5, null
br i1 %6, label %7, label %9
7: ; preds = %2
%8 = load i32*, i32** %4
store i32 1, i32* %8
br label %9
9: ; preds = %7, %2
ret i32 1
}

LLVM IR (-O2):
define i32 @zone_dataset_visible(i8* nocapture readnone %0, i32* writeonly %1) {
%3 = icmp eq i32* %1, null
br i1 %3, label %5, label %4
4: ; preds = %2
store i32 1, i32* %1
br label %5
5: ; preds = %4, %2
ret i32 1
}
/* Variables and functions */
int raid_cpu_match_avx(int, int, int);
int raid_cpu_has_avx512bw(void) {
  return raid_cpu_match_avx(1 << 27, (1 << 16) | (1 << 30),
                            (3 << 1) | (7 << 5));
}


x86 assembly (clang, -O0):
<raid_cpu_has_avx512bw>:
push   %rbp
mov    %rsp,%rbp
mov    $0x8000000,%edi
mov    $0x40010000,%esi
mov    $0xe6,%edx
call   1030 <raid_cpu_match_avx@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<raid_cpu_has_avx512bw>:
mov    $0x8000000,%edi
mov    $0x40010000,%esi
mov    $0xe6,%edx
jmp    1030 <raid_cpu_match_avx@plt>

LLVM IR (-O0):
define i32 @raid_cpu_has_avx512bw() {
%1 = call i32 @raid_cpu_match_avx(i32 134217728, i32 1073807360, i32 230)
ret i32 %1
}

LLVM IR (-O2):
define i32 @raid_cpu_has_avx512bw() {
%1 = tail call i32 @raid_cpu_match_avx(i32 134217728, i32 1073807360, i32 230)
ret i32 %1
}
/* Variables and functions */
int rename(char const *, char const *);
int replace_file(const char *from, const char *to) { return rename(from, to); }


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

x86 assembly (clang, -O2):
<replace_file>:
jmp    1030 <rename@plt>

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

LLVM IR (-O2):
define i32 @replace_file(i8* nocapture %0, i8* nocapture %1) {
%3 = tail call i32 @rename(i8* %0, i8* %1)
ret i32 %3
}
void bigadd(int *sn, int *n) {
  int i, tmp, c = 0;
  for (i = 0; i < 200; i++) {
    tmp = sn[i] + n[i] + c;
    sn[i] = tmp % 10;
    c = tmp / 10;
  }
}


x86 assembly (clang, -O0):
<bigadd>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x1c(%rbp)
movl   $0x0,-0x14(%rbp)
cmpl   $0xc8,-0x14(%rbp)
jge    1175 <bigadd+0x75>
mov    -0x8(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
mov    -0x10(%rbp),%rcx
movslq -0x14(%rbp),%rdx
add    (%rcx,%rdx,4),%eax
add    -0x1c(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x18(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    -0x8(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x18(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %eax,-0x1c(%rbp)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    111a <bigadd+0x1a>
pop    %rbp
ret

x86 assembly (clang, -O2):
<bigadd>:
xor    %eax,%eax
xor    %ecx,%ecx
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
add    (%rdi,%rax,4),%ecx
add    (%rsi,%rax,4),%ecx
movslq %ecx,%r8
imul   $0x66666667,%r8,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
sar    $0x22,%rcx
add    %edx,%ecx
lea    (%rcx,%rcx,1),%edx
lea    (%rdx,%rdx,4),%edx
sub    %edx,%r8d
mov    %r8d,(%rdi,%rax,4)
add    $0x1,%rax
cmp    $0xc8,%rax
jne    1110 <bigadd+0x10>
ret

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

LLVM IR (-O2):
define void @bigadd(i32* nocapture %0, i32* nocapture %1) {
br label %3
3: ; preds = %2, %3
%4 = phi i64 [ 0, %2 ], [ %14, %3 ]
%5 = phi i32 [ 0, %2 ], [ %13, %3 ]
%6 = getelementptr inbounds i32, i32* %0, i64 %4
%7 = load i32, i32* %6
%8 = getelementptr inbounds i32, i32* %1, i64 %4
%9 = load i32, i32* %8
%10 = add i32 %7, %5
%11 = add i32 %10, %9
%12 = srem i32 %11, 10
store i32 %12, i32* %6
%13 = sdiv i32 %11, 10
%14 = add nuw nsw i64 %4, 1
%15 = icmp eq i64 %14, 200
br i1 %15, label %16, label %3
16: ; preds = %3
ret void
}
int reverse(int i) {
  int n = 0;
  while (i) {
    n = (n * 10) + (i % 10);
    i /= 10;
  }
  return n;
}


x86 assembly (clang, -O0):
<reverse>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x0,-0x4(%rbp)
je     1145 <reverse+0x45>
imul   $0xa,-0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x4(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    -0xc(%rbp),%eax
add    %edx,%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %eax,-0x4(%rbp)
jmp    110e <reverse+0xe>
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<reverse>:
xor    %eax,%eax
test   %edi,%edi
je     113f <reverse+0x3f>
cs nopw 0x0(%rax,%rax,1)
lea    (%rax,%rax,4),%eax
movslq %edi,%rcx
imul   $0x66666667,%rcx,%rdi
mov    %rdi,%rdx
shr    $0x3f,%rdx
sar    $0x22,%rdi
add    %edx,%edi
lea    (%rdi,%rdi,1),%edx
lea    (%rdx,%rdx,4),%edx
mov    %ecx,%esi
sub    %edx,%esi
lea    (%rsi,%rax,2),%eax
add    $0x9,%ecx
cmp    $0x12,%ecx
ja     1110 <reverse+0x10>
ret

LLVM IR (-O0):
define i32 @reverse(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
store i32 0, i32* %3
br label %4
4: ; preds = %7, %1
%5 = load i32, i32* %2
%6 = icmp ne i32 %5, 0
br i1 %6, label %7, label %15
7: ; preds = %4
%8 = load i32, i32* %3
%9 = mul nsw i32 %8, 10
%10 = load i32, i32* %2
%11 = srem i32 %10, 10
%12 = add nsw i32 %9, %11
store i32 %12, i32* %3
%13 = load i32, i32* %2
%14 = sdiv i32 %13, 10
store i32 %14, i32* %2
br label %4
15: ; preds = %4
%16 = load i32, i32* %3
ret i32 %16
}

LLVM IR (-O2):
define i32 @reverse(i32 %0) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %12, label %3
3: ; preds = %1, %3
%4 = phi i32 [ %8, %3 ], [ 0, %1 ]
%5 = phi i32 [ %9, %3 ], [ %0, %1 ]
%6 = mul nsw i32 %4, 10
%7 = srem i32 %5, 10
%8 = add nsw i32 %6, %7
%9 = sdiv i32 %5, 10
%10 = add i32 %5, 9
%11 = icmp ult i32 %10, 19
br i1 %11, label %12, label %3
12: ; preds = %3, %1
%13 = phi i32 [ 0, %1 ], [ %8, %3 ]
ret i32 %13
}
unsigned long elf_hash(const unsigned char *name) {
  unsigned long h = 0, g;
  while (*name) {
    h = (h << 4) + *name++;
    if (g = h & 0xf0000000)
      h ^= g >> 24;
    h &= ~g;
  }
  return h;
}


x86 assembly (clang, -O0):
<elf_hash>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movq   $0x0,-0x10(%rbp)
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
je     117f <elf_hash+0x7f>
mov    -0x10(%rbp),%rax
shl    $0x4,%rax
mov    -0x8(%rbp),%rcx
mov    %rcx,%rdx
add    $0x1,%rdx
mov    %rdx,-0x8(%rbp)
movzbl (%rcx),%ecx
add    %rcx,%rax
mov    %rax,-0x10(%rbp)
movabs $0xf0000000,%rax
and    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
cmp    $0x0,%rax
je     116a <elf_hash+0x6a>
mov    -0x18(%rbp),%rax
shr    $0x18,%rax
xor    -0x10(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x18(%rbp),%rax
xor    $0xffffffffffffffff,%rax
and    -0x10(%rbp),%rax
mov    %rax,-0x10(%rbp)
jmp    1110 <elf_hash+0x10>
mov    -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<elf_hash>:
mov    (%rdi),%cl
test   %cl,%cl
je     113d <elf_hash+0x3d>
add    $0x1,%rdi
xor    %eax,%eax
nopl   0x0(%rax)
shl    $0x4,%rax
movzbl %cl,%ecx
add    %rax,%rcx
mov    %ecx,%eax
and    $0xf0000000,%eax
mov    %rax,%rdx
shr    $0x18,%rdx
xor    %rcx,%rdx
not    %rax
and    %rdx,%rax
movzbl (%rdi),%ecx
add    $0x1,%rdi
test   %cl,%cl
jne    1110 <elf_hash+0x10>
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i64 @elf_hash(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %19, label %4
4: ; preds = %1, %4
%5 = phi i8 [ %17, %4 ], [ %2, %1 ]
%6 = phi i8* [ %9, %4 ], [ %0, %1 ]
%7 = phi i64 [ %16, %4 ], [ 0, %1 ]
%8 = shl i64 %7, 4
%9 = getelementptr inbounds i8, i8* %6, i64 1
%10 = zext i8 %5 to i64
%11 = add i64 %8, %10
%12 = and i64 %11, 4026531840
%13 = lshr exact i64 %12, 24
%14 = xor i64 %13, %11
%15 = xor i64 %12, -1
%16 = and i64 %14, %15
%17 = load i8, i8* %9
%18 = icmp eq i8 %17, 0
br i1 %18, label %19, label %4
19: ; preds = %4, %1
%20 = phi i64 [ 0, %1 ], [ %16, %4 ]
ret i64 %20
}
int SOC_Create(int type, int *port, const char *hostname) { return -1; }


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

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

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

LLVM IR (-O2):
define i32 @SOC_Create(i32 %0, i32* nocapture readnone %1, i8* nocapture readnone %2) {
ret i32 -1
}
/* Variables and functions */
int ENXIO;
int nc_pm8xxx_mpp_config_analog_output(unsigned mpp, unsigned level,
                                       unsigned control) {
  return -ENXIO;
}


x86 assembly (clang, -O0):
<nc_pm8xxx_mpp_config_analog_output>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
xor    %eax,%eax
mov    0x2eca(%rip),%rcx
sub    (%rcx),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<nc_pm8xxx_mpp_config_analog_output>:
mov    0x2ed9(%rip),%rcx
xor    %eax,%eax
sub    (%rcx),%eax
ret

LLVM IR (-O0):
@ENXIO = global i32 0
define i32 @nc_pm8xxx_mpp_config_analog_output(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
%7 = load i32, i32* @ENXIO
%8 = sub nsw i32 0, %7
ret i32 %8
}

LLVM IR (-O2):
@ENXIO = global i32 0
define i32 @nc_pm8xxx_mpp_config_analog_output(i32 %0, i32 %1, i32 %2) {
%4 = load i32, i32* @ENXIO
%5 = sub nsw i32 0, %4
ret i32 %5
}
int propagate_rightmost(int reg) { return reg | (reg - 1); }


x86 assembly (clang, -O0):
<propagate_rightmost>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x4(%rbp),%ecx
sub    $0x1,%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<propagate_rightmost>:
lea    -0x1(%rdi),%eax
or     %edi,%eax
ret

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

LLVM IR (-O2):
define i32 @propagate_rightmost(i32 %0) {
%2 = add nsw i32 %0, -1
%3 = or i32 %2, %0
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
void fooA(int *iptr) {
  printf("The value pointed to by iptr is %d\n", *iptr);
  printf("The address point to by iptr is %p\n", iptr);
  printf("The address of iptr itself is %p\n", &iptr);
}


x86 assembly (clang, -O0):
<fooA>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%esi
lea    0xed7(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%rsi
lea    0xee9(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xeff(%rip),%rdi
lea    -0x8(%rbp),%rsi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fooA>:
push   %rbx
sub    $0x10,%rsp
mov    %rdi,%rbx
mov    %rdi,0x8(%rsp)
mov    (%rdi),%esi
lea    0xeda(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xef0(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xf03(%rip),%rdi
lea    0x8(%rsp),%rsi
xor    %eax,%eax
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [36 x i8] c"The value pointed to by iptr is %d\0A\00"
@.str.1 = [36 x i8] c"The address point to by iptr is %p\0A\00"
@.str.2 = [34 x i8] c"The address of iptr itself is %p\0A\00"
define void @fooA(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = load i32, i32* %3
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0), i32 %4)
%6 = load i32*, i32** %2
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.1, i64 0, i64 0), i32* %6)
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.2, i64 0, i64 0), i32** %2)
ret void
}

LLVM IR (-O2):
@.str = [36 x i8] c"The value pointed to by iptr is %d\0A\00"
@.str.1 = [36 x i8] c"The address point to by iptr is %p\0A\00"
@.str.2 = [34 x i8] c"The address of iptr itself is %p\0A\00"
define void @fooA(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32, i32* %0
%4 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0), i32 %3)
%5 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([36 x i8], [36 x i8]* @.str.1, i64 0, i64 0), i32* %0)
%6 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([34 x i8], [34 x i8]* @.str.2, i64 0, i64 0), i32** %2)
ret void
}
void ff_hevc_put_hevc_epel_h16_10_sse4() {}


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

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

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

LLVM IR (-O2):
define void @ff_hevc_put_hevc_epel_h16_10_sse4() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ iprintf(char *);
void ClearScreen(void) { iprintf("\033[2J\033[1;1H"); }


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

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

LLVM IR (-O0):
@.str = [11 x i8] c"\1B[2J\1B[1;1H\00"
define void @ClearScreen() {
%1 = call i32 @iprintf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [11 x i8] c"\1B[2J\1B[1;1H\00"
define void @ClearScreen() {
%1 = tail call i32 @iprintf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
ret void
}
int test_imm_C3uint16_reg(unsigned short val) {
  return ((val) & (-0xC3 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_C3uint16_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
movzwl -0x2(%rbp),%edx
and    $0xffffff3d,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @test_imm_C3uint16_reg(i16 zeroext %0) {
%2 = alloca i16
store i16 %0, i16* %2
%3 = load i16, i16* %2
%4 = zext i16 %3 to i32
%5 = and i32 %4, -195
%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_C3uint16_reg(i16 zeroext %0) {
%2 = and i16 %0, -195
%3 = icmp eq i16 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ WNOHANG;
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ wait3(int /*<<< orphan*/ *, int /*<<< orphan*/,
                         int /*<<< orphan*/ *);
void *SigCatcher(int n) {
  wait3(NULL, WNOHANG, NULL);
  printf("Sesion cerrada\n");
}


x86 assembly (clang, -O0):
<SigCatcher>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0xc(%rbp)
mov    0x2eb6(%rip),%rax
mov    (%rax),%esi
xor    %eax,%eax
mov    %eax,%edx
mov    %rdx,%rdi
call   1030 <wait3@plt>
lea    0xeb9(%rip),%rdi
call   1040 <printf@plt>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<SigCatcher>:
push   %rax
mov    0x2ec0(%rip),%rax
mov    (%rax),%esi
xor    %edi,%edi
xor    %edx,%edx
call   1040 <wait3@plt>
lea    0xec6(%rip),%rdi
pop    %rax
jmp    1030 <puts@plt>

LLVM IR (-O0):
@WNOHANG = global i32 0
@.str = [16 x i8] c"Sesion cerrada\0A\00"
define i8* @SigCatcher(i32 %0) {
%2 = alloca i8*
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* @WNOHANG
%5 = call i32 @wait3(i32* null, i32 %4, i32* null)
%6 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
%7 = load i8*, i8** %2
ret i8* %7
}

LLVM IR (-O2):
@WNOHANG = global i32 0
@str = [15 x i8] c"Sesion cerrada\00"
define noalias i8* @SigCatcher(i32 %0) {
%2 = load i32, i32* @WNOHANG
%3 = tail call i32 @wait3(i32* null, i32 %2, i32* null)
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @str, i64 0, i64 0))
ret i8* undef
}
/* Variables and functions */
int funcA();
int main(int argc, char **argv) { return funcA(); }


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

x86 assembly (clang, -O2):
<main>:
xor    %eax,%eax
jmp    1030 <funcA@plt>

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

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @funcA()
ret i32 %3
}
int SDL_imageFilterAddByteToHalfMMX(unsigned char *Src1, unsigned char *Dest,
                                    int length, unsigned char C,
                                    unsigned char *Mask) {
  return (0);
}


x86 assembly (clang, -O0):
<SDL_imageFilterAddByteToHalfMMX>:
push   %rbp
mov    %rsp,%rbp
mov    %cl,%al
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %al,-0x15(%rbp)
mov    %r8,-0x20(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @SDL_imageFilterAddByteToHalfMMX(i8* %0, i8* %1, i32 %2, i8 zeroext %3, i8* %4) {
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i32
%9 = alloca i8
%10 = alloca i8*
store i8* %0, i8** %6
store i8* %1, i8** %7
store i32 %2, i32* %8
store i8 %3, i8* %9
store i8* %4, i8** %10
ret i32 0
}

LLVM IR (-O2):
define i32 @SDL_imageFilterAddByteToHalfMMX(i8* nocapture readnone %0, i8* nocapture readnone %1, i32 %2, i8 zeroext %3, i8* nocapture readnone %4) {
ret i32 0
}
/* Variables and functions */
int strcmp(char const *, char const *);
int wsh_strcmp(const char *s1, const char *s2) { return strcmp(s1, s2); }


x86 assembly (clang, -O0):
<wsh_strcmp>:
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):
<wsh_strcmp>:
jmp    1030 <strcmp@plt>

LLVM IR (-O0):
define i32 @wsh_strcmp(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 @wsh_strcmp(i8* nocapture %0, i8* nocapture %1) {
%3 = tail call i32 @strcmp(i8* dereferenceable(1) %0, i8* dereferenceable(1) %1)
ret i32 %3
}
void debug(char *cstr) {}


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

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

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

LLVM IR (-O2):
define void @debug(i8* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ check(char const *);
int main(int ac, const char **av) {
  check(av[1]);
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    0x8(%rsi),%rdi
call   1030 <check@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = load i8**, i8*** %5
%7 = getelementptr inbounds i8*, i8** %6, i64 1
%8 = load i8*, i8** %7
%9 = call i32 @check(i8* %8)
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = getelementptr inbounds i8*, i8** %1, i64 1
%4 = load i8*, i8** %3
%5 = tail call i32 @check(i8* %4)
ret i32 0
}
/* Variables and functions */
float exp(int /*<<< orphan*/);
int /*<<< orphan*/ pow(float, int);
float gaussian(float x, int L, float sigma) {
  return exp(-pow((x - L / 2) / (2 * sigma), 2));
}


x86 assembly (clang, -O0):
<gaussian>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
movss  %xmm1,-0xc(%rbp)
movss  -0x4(%rbp),%xmm0
mov    -0x8(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
cvtsi2ss %eax,%xmm1
subss  %xmm1,%xmm0
movss  0xeab(%rip),%xmm1
mulss  -0xc(%rbp),%xmm1
divss  %xmm1,%xmm0
mov    $0x2,%edi
call   1040 <pow@plt>
xor    %edi,%edi
sub    %eax,%edi
call   1030 <exp@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gaussian>:
push   %rax
mov    %edi,%eax
shr    $0x1f,%eax
add    %edi,%eax
sar    %eax
cvtsi2ss %eax,%xmm2
subss  %xmm2,%xmm0
addss  %xmm1,%xmm1
divss  %xmm1,%xmm0
mov    $0x2,%edi
call   1040 <pow@plt>
neg    %eax
mov    %eax,%edi
pop    %rax
jmp    1030 <exp@plt>

LLVM IR (-O0):
define float @gaussian(float %0, i32 %1, float %2) {
%4 = alloca float
%5 = alloca i32
%6 = alloca float
store float %0, float* %4
store i32 %1, i32* %5
store float %2, float* %6
%7 = load float, float* %4
%8 = load i32, i32* %5
%9 = sdiv i32 %8, 2
%10 = sitofp i32 %9 to float
%11 = fsub float %7, %10
%12 = load float, float* %6
%13 = fmul float 2.000000e+00, %12
%14 = fdiv float %11, %13
%15 = call i32 @pow(float %14, i32 2)
%16 = sub nsw i32 0, %15
%17 = call float @exp(i32 %16)
ret float %17
}

LLVM IR (-O2):
define float @gaussian(float %0, i32 %1, float %2) {
%4 = sdiv i32 %1, 2
%5 = sitofp i32 %4 to float
%6 = fsub float %0, %5
%7 = fmul float %2, 2.000000e+00
%8 = fdiv float %6, %7
%9 = tail call i32 @pow(float %8, i32 2)
%10 = sub nsw i32 0, %9
%11 = tail call float @exp(i32 %10)
ret float %11
}
void glTexImage3D(void) { return; }


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

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

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

LLVM IR (-O2):
define void @glTexImage3D() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ aes256_gentab();
void xts_aes_init(int hw_crypt) { aes256_gentab(); }


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

x86 assembly (clang, -O2):
<xts_aes_init>:
xor    %eax,%eax
jmp    1030 <aes256_gentab@plt>

LLVM IR (-O0):
define void @xts_aes_init(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 (...) @aes256_gentab()
ret void
}

LLVM IR (-O2):
define void @xts_aes_init(i32 %0) {
%2 = tail call i32 (...) @aes256_gentab()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void Q_free(void *ptr) {
  if (!ptr)
    return;
  free(ptr);
}


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

x86 assembly (clang, -O2):
<Q_free>:
test   %rdi,%rdi
je     111a <Q_free+0xa>
jmp    1030 <free@plt>
ret

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

LLVM IR (-O2):
define void @Q_free(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = tail call i32 @free(i8* %0)
br label %5
5: ; preds = %1, %3
ret void
}
void RandomFunc(unsigned int input[1], unsigned int output[1]) {
  unsigned int state[1];
  unsigned int local1;
  {
    state[0UL] = (input[0UL] + 914778474UL) - 981234615U;
    local1 = 0UL;
    while (local1 < 0U) {
      if (!(state[0UL] < local1)) {
        state[local1] += state[0UL];
      }
      local1++;
    }
    output[0UL] = (state[0UL] + 166502562UL) - 1296878231U;
  }
}


x86 assembly (clang, -O0):
<RandomFunc>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
add    $0x3686696a,%rax
sub    $0x3a7c73b7,%rax
mov    %eax,-0x14(%rbp)
movl   $0x0,-0x18(%rbp)
cmpl   $0x0,-0x18(%rbp)
jae    115a <RandomFunc+0x5a>
mov    -0x14(%rbp),%eax
cmp    -0x18(%rbp),%eax
jb     114c <RandomFunc+0x4c>
mov    -0x14(%rbp),%ecx
mov    -0x18(%rbp),%eax
add    -0x14(%rbp,%rax,4),%ecx
mov    %ecx,-0x14(%rbp,%rax,4)
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    1128 <RandomFunc+0x28>
mov    -0x14(%rbp),%eax
add    $0x9eca0a2,%rax
sub    $0x4d4cca97,%rax
mov    %eax,%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<RandomFunc>:
mov    $0xb8a9cbbe,%eax
add    (%rdi),%eax
mov    %eax,(%rsi)
ret

LLVM IR (-O0):
define void @RandomFunc(i32* %0, i32* %1) {
%3 = alloca i32*
%4 = alloca i32*
%5 = alloca [1 x i32]
%6 = alloca i32
store i32* %0, i32** %3
store i32* %1, i32** %4
%7 = load i32*, i32** %3
%8 = getelementptr inbounds i32, i32* %7, i64 0
%9 = load i32, i32* %8
%10 = zext i32 %9 to i64
%11 = add i64 %10, 914778474
%12 = sub i64 %11, 981234615
%13 = trunc i64 %12 to i32
%14 = getelementptr inbounds [1 x i32], [1 x i32]* %5, i64 0, i64 0
store i32 %13, i32* %14
store i32 0, i32* %6
br label %15
15: ; preds = %31, %2
%16 = load i32, i32* %6
%17 = icmp ult i32 %16, 0
br i1 %17, label %18, label %34
18: ; preds = %15
%19 = getelementptr inbounds [1 x i32], [1 x i32]* %5, i64 0, i64 0
%20 = load i32, i32* %19
%21 = load i32, i32* %6
%22 = icmp ult i32 %20, %21
br i1 %22, label %31, label %23
23: ; preds = %18
%24 = getelementptr inbounds [1 x i32], [1 x i32]* %5, i64 0, i64 0
%25 = load i32, i32* %24
%26 = load i32, i32* %6
%27 = zext i32 %26 to i64
%28 = getelementptr inbounds [1 x i32], [1 x i32]* %5, i64 0, i64 %27
%29 = load i32, i32* %28
%30 = add i32 %29, %25
store i32 %30, i32* %28
br label %31
31: ; preds = %23, %18
%32 = load i32, i32* %6
%33 = add i32 %32, 1
store i32 %33, i32* %6
br label %15
34: ; preds = %15
%35 = getelementptr inbounds [1 x i32], [1 x i32]* %5, i64 0, i64 0
%36 = load i32, i32* %35
%37 = zext i32 %36 to i64
%38 = add i64 %37, 166502562
%39 = sub i64 %38, 1296878231
%40 = trunc i64 %39 to i32
%41 = load i32*, i32** %4
%42 = getelementptr inbounds i32, i32* %41, i64 0
store i32 %40, i32* %42
ret void
}

LLVM IR (-O2):
define void @RandomFunc(i32* nocapture %0, i32* nocapture writeonly %1) {
%3 = load i32, i32* %0
%4 = add i32 %3, -1196831810
store i32 %4, i32* %1
ret void
}
/* Variables and functions */
int baumcrypt_helper1(char const *, char const *, unsigned char *,
                      int /*<<< orphan*/);
int baumcrypt_decrypt(const char *name_in, const char *name_out,
                      unsigned char *key) {
  return baumcrypt_helper1(name_in, name_out, key, 0);
}


x86 assembly (clang, -O0):
<baumcrypt_decrypt>:
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
xor    %ecx,%ecx
call   1030 <baumcrypt_helper1@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<baumcrypt_decrypt>:
xor    %ecx,%ecx
jmp    1030 <baumcrypt_helper1@plt>

LLVM IR (-O0):
define i32 @baumcrypt_decrypt(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 = call i32 @baumcrypt_helper1(i8* %7, i8* %8, i8* %9, i32 0)
ret i32 %10
}

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


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

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

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

LLVM IR (-O2):
define void @foo640() {
ret void
}
void invalidate_dcache_range(unsigned long start, unsigned long stop) {}


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

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

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

LLVM IR (-O2):
define void @invalidate_dcache_range(i64 %0, i64 %1) {
ret void
}
/* Type definitions */
typedef int time_t;
typedef int off_t;

/* Variables and functions */
unsigned int hash(off_t size, time_t mtime) {
  return (size ^ mtime) & ((1 << 17) - 1);
}


x86 assembly (clang, -O0):
<hash>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
xor    -0x8(%rbp),%eax
and    $0x1ffff,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<hash>:
mov    %edi,%eax
xor    %esi,%eax
and    $0x1ffff,%eax
ret

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

LLVM IR (-O2):
define i32 @hash(i32 %0, i32 %1) {
%3 = xor i32 %1, %0
%4 = and i32 %3, 131071
ret i32 %4
}
void gtk_button_set_image() {}


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

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

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

LLVM IR (-O2):
define void @gtk_button_set_image() {
ret void
}
/* Variables and functions */
const char *convert_float(const char *s, size_t size, void *arg) {
  return NULL;
}


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

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

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

LLVM IR (-O2):
define noalias i8* @convert_float(i8* nocapture readnone %0, i64 %1, i8* nocapture readnone %2) {
ret i8* null
}
const char *check_cptr_VSTREAM_CTLchar(const char *v) { return v; }


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

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

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

LLVM IR (-O2):
define i8* @check_cptr_VSTREAM_CTLchar(i8* readnone returned %0) {
ret i8* %0
}
unsigned long edf_maxlinlen(void) { return (1023); }


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

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

LLVM IR (-O0):
define i64 @edf_maxlinlen() {
ret i64 1023
}

LLVM IR (-O2):
define i64 @edf_maxlinlen() {
ret i64 1023
}
int cubic(float a) {
  float x, s;
  int r;
  x = a;
  r = 1;
  s = 3.25;
  while (x - s > 0) {
    x = x - s;
    s = s + 6 * r + 3;
    r = r + 1;
  }
  return r;
}


x86 assembly (clang, -O0):
<cubic>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
movss  %xmm0,-0x8(%rbp)
movl   $0x1,-0x10(%rbp)
movss  0xede(%rip),%xmm0
movss  %xmm0,-0xc(%rbp)
movss  -0x8(%rbp),%xmm0
subss  -0xc(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomiss %xmm1,%xmm0
jbe    117c <cubic+0x7c>
movss  -0x8(%rbp),%xmm0
subss  -0xc(%rbp),%xmm0
movss  %xmm0,-0x8(%rbp)
movss  -0xc(%rbp),%xmm0
imul   $0x6,-0x10(%rbp),%eax
cvtsi2ss %eax,%xmm1
addss  %xmm1,%xmm0
movss  0xe9f(%rip),%xmm1
addss  %xmm1,%xmm0
movss  %xmm0,-0xc(%rbp)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1127 <cubic+0x27>
mov    -0x10(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<cubic>:
addss  0xef8(%rip),%xmm0
mov    $0x1,%eax
xorps  %xmm1,%xmm1
ucomiss %xmm1,%xmm0
jbe    1151 <cubic+0x51>
movss  0xee7(%rip),%xmm3
mov    $0x1,%eax
mov    $0x6,%ecx
movss  0xed9(%rip),%xmm2
nop
xorps  %xmm4,%xmm4
cvtsi2ss %ecx,%xmm4
addss  %xmm3,%xmm4
addss  %xmm2,%xmm4
add    $0x1,%eax
subss  %xmm4,%xmm0
add    $0x6,%ecx
ucomiss %xmm1,%xmm0
movaps %xmm4,%xmm3
ja     1130 <cubic+0x30>
ret

LLVM IR (-O0):
define i32 @cubic(float %0) {
%2 = alloca float
%3 = alloca float
%4 = alloca float
%5 = alloca i32
store float %0, float* %2
%6 = load float, float* %2
store float %6, float* %3
store i32 1, i32* %5
store float 3.250000e+00, float* %4
br label %7
7: ; preds = %12, %1
%8 = load float, float* %3
%9 = load float, float* %4
%10 = fsub float %8, %9
%11 = fcmp ogt float %10, 0.000000e+00
br i1 %11, label %12, label %24
12: ; preds = %7
%13 = load float, float* %3
%14 = load float, float* %4
%15 = fsub float %13, %14
store float %15, float* %3
%16 = load float, float* %4
%17 = load i32, i32* %5
%18 = mul nsw i32 6, %17
%19 = sitofp i32 %18 to float
%20 = fadd float %16, %19
%21 = fadd float %20, 3.000000e+00
store float %21, float* %4
%22 = load i32, i32* %5
%23 = add nsw i32 %22, 1
store i32 %23, i32* %5
br label %7
24: ; preds = %7
%25 = load i32, i32* %5
ret i32 %25
}

LLVM IR (-O2):
define i32 @cubic(float %0) {
%2 = fadd float %0, -3.250000e+00
%3 = fcmp ogt float %2, 0.000000e+00
br i1 %3, label %4, label %15
4: ; preds = %1, %4
%5 = phi float [ %13, %4 ], [ %2, %1 ]
%6 = phi i32 [ %12, %4 ], [ 1, %1 ]
%7 = phi float [ %11, %4 ], [ 3.250000e+00, %1 ]
%8 = mul nsw i32 %6, 6
%9 = sitofp i32 %8 to float
%10 = fadd float %7, %9
%11 = fadd float %10, 3.000000e+00
%12 = add nuw nsw i32 %6, 1
%13 = fsub float %5, %11
%14 = fcmp ogt float %13, 0.000000e+00
br i1 %14, label %4, label %15
15: ; preds = %4, %1
%16 = phi i32 [ 1, %1 ], [ %12, %4 ]
ret i32 %16
}
void CpuException0() {}


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

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

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

LLVM IR (-O2):
define void @CpuException0() {
ret void
}
int fun842() { return 842; }


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

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

LLVM IR (-O0):
define i32 @fun842() {
ret i32 842
}

LLVM IR (-O2):
define i32 @fun842() {
ret i32 842
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
float valueAsFloat(uint32_t value) {
  union {
    float f;
    uint32_t i;
  } u = {.i = value};
  return u.f;
}


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

x86 assembly (clang, -O2):
<valueAsFloat>:
movd   %edi,%xmm0
ret

LLVM IR (-O0):
%union.anon = type { float }
define float @valueAsFloat(i32 %0) {
%2 = alloca i32
%3 = alloca %union.anon
store i32 %0, i32* %2
%4 = bitcast %union.anon* %3 to i32*
%5 = load i32, i32* %2
store i32 %5, i32* %4
%6 = bitcast %union.anon* %3 to float*
%7 = load float, float* %6
ret float %7
}

LLVM IR (-O2):
define float @valueAsFloat(i32 %0) {
%2 = bitcast i32 %0 to float
ret float %2
}
void RTTestDestroy(void) {}


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

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

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

LLVM IR (-O2):
define void @RTTestDestroy() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ update_panels();
void panel_stack_update() { update_panels(); }


x86 assembly (clang, -O0):
<panel_stack_update>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <update_panels@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<panel_stack_update>:
xor    %eax,%eax
jmp    1030 <update_panels@plt>

LLVM IR (-O0):
define void @panel_stack_update() {
%1 = call i32 (...) @update_panels()
ret void
}

LLVM IR (-O2):
define void @panel_stack_update() {
%1 = tail call i32 (...) @update_panels()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ itoa(int, char *, int);
int /*<<< orphan*/ printf(char *, char *);
int main(void) {
  int number, width;
  char str[100];
  number = -343565;
  width = 10;
  itoa(number, str, width);
  printf("%s", str);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0xfffac1f3,-0x8(%rbp)
movl   $0xa,-0xc(%rbp)
mov    -0x8(%rbp),%edi
lea    -0x70(%rbp),%rsi
mov    -0xc(%rbp),%edx
call   1040 <itoa@plt>
lea    -0x70(%rbp),%rsi
lea    0xea9(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x70,%rsp
mov    %rsp,%rbx
mov    $0xfffac1f3,%edi
mov    %rbx,%rsi
mov    $0xa,%edx
call   1040 <itoa@plt>
lea    0xebf(%rip),%rdi
mov    %rbx,%rsi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x70,%rsp
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%s\00"
define i32 @main() {
%1 = alloca [100 x i8]
%2 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 0, i64 0
%3 = call i32 @itoa(i32 -343565, i8* %2, i32 10)
%4 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %2)
ret i32 0
}
int dbl_compare(double *a, double *b) {
  if (*a > *b)
    return 1;
  else if (*a < *b)
    return -1;
  else
    return 0;
}


x86 assembly (clang, -O0):
<dbl_compare>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x18(%rbp),%rax
ucomisd (%rax),%xmm0
jbe    112e <dbl_compare+0x2e>
movl   $0x1,-0x4(%rbp)
jmp    115b <dbl_compare+0x5b>
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm1
mov    -0x18(%rbp),%rax
movsd  (%rax),%xmm0
ucomisd %xmm1,%xmm0
jbe    1154 <dbl_compare+0x54>
movl   $0xffffffff,-0x4(%rbp)
jmp    115b <dbl_compare+0x5b>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<dbl_compare>:
movsd  (%rdi),%xmm0
movsd  (%rsi),%xmm1
xor    %ecx,%ecx
ucomisd %xmm0,%xmm1
seta   %cl
neg    %ecx
ucomisd %xmm1,%xmm0
mov    $0x1,%eax
cmovbe %ecx,%eax
ret

LLVM IR (-O0):
define i32 @dbl_compare(double* %0, double* %1) {
%3 = alloca i32
%4 = alloca double*
%5 = alloca double*
store double* %0, double** %4
store double* %1, double** %5
%6 = load double*, double** %4
%7 = load double, double* %6
%8 = load double*, double** %5
%9 = load double, double* %8
%10 = fcmp ogt double %7, %9
br i1 %10, label %11, label %12
11: ; preds = %2
store i32 1, i32* %3
br label %20
12: ; preds = %2
%13 = load double*, double** %4
%14 = load double, double* %13
%15 = load double*, double** %5
%16 = load double, double* %15
%17 = fcmp olt double %14, %16
br i1 %17, label %18, label %19
18: ; preds = %12
store i32 -1, i32* %3
br label %20
19: ; preds = %12
store i32 0, i32* %3
br label %20
20: ; preds = %19, %18, %11
%21 = load i32, i32* %3
ret i32 %21
}

LLVM IR (-O2):
define i32 @dbl_compare(double* nocapture %0, double* nocapture %1) {
%3 = load double, double* %0
%4 = load double, double* %1
%5 = fcmp ogt double %3, %4
%6 = fcmp olt double %3, %4
%7 = sext i1 %6 to i32
%8 = select i1 %5, i32 1, i32 %7
ret i32 %8
}
int test_fun(int x, int y, int z) {
  int c = 0;
  while ((x > y) && (x > z)) {
    y = y + 1;
    z = z + 1;
    c = c + 1;
  }
  return c;
}


x86 assembly (clang, -O0):
<test_fun>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x4(%rbp),%ecx
xor    %eax,%eax
cmp    -0x8(%rbp),%ecx
mov    %al,-0x11(%rbp)
jle    1131 <test_fun+0x31>
mov    -0x4(%rbp),%eax
cmp    -0xc(%rbp),%eax
setg   %al
mov    %al,-0x11(%rbp)
mov    -0x11(%rbp),%al
test   $0x1,%al
jne    1141 <test_fun+0x41>
jmp    1161 <test_fun+0x61>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1114 <test_fun+0x14>
mov    -0x10(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_fun>:
xor    %eax,%eax
cmp    %edi,%esi
jge    1125 <test_fun+0x25>
cmp    %edi,%edx
jge    1125 <test_fun+0x25>
add    $0xffffffff,%edi
mov    %edi,%eax
sub    %esi,%eax
sub    %edx,%edi
cmp    %eax,%edi
cmovae %eax,%edi
add    $0x1,%edi
test   %eax,%eax
mov    $0x1,%eax
cmovne %edi,%eax
ret

LLVM IR (-O0):
define i32 @test_fun(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
store i32 0, i32* %7
br label %8
8: ; preds = %18, %3
%9 = load i32, i32* %4
%10 = load i32, i32* %5
%11 = icmp sgt i32 %9, %10
br i1 %11, label %12, label %16
12: ; preds = %8
%13 = load i32, i32* %4
%14 = load i32, i32* %6
%15 = icmp sgt i32 %13, %14
br label %16
16: ; preds = %12, %8
%17 = phi i1 [ false, %8 ], [ %15, %12 ]
br i1 %17, label %18, label %25
18: ; preds = %16
%19 = load i32, i32* %5
%20 = add nsw i32 %19, 1
store i32 %20, i32* %5
%21 = load i32, i32* %6
%22 = add nsw i32 %21, 1
store i32 %22, i32* %6
%23 = load i32, i32* %7
%24 = add nsw i32 %23, 1
store i32 %24, i32* %7
br label %8
25: ; preds = %16
%26 = load i32, i32* %7
ret i32 %26
}

LLVM IR (-O2):
define i32 @test_fun(i32 %0, i32 %1, i32 %2) {
%4 = icmp slt i32 %1, %0
%5 = icmp slt i32 %2, %0
%6 = and i1 %4, %5
br i1 %6, label %7, label %15
7: ; preds = %3
%8 = add nsw i32 %0, -1
%9 = sub i32 %8, %1
%10 = sub i32 %8, %2
%11 = icmp eq i32 %9, 0
%12 = call i32 @llvm.umin.i32(i32 %10, i32 %9)
%13 = add i32 %12, 1
%14 = select i1 %11, i32 1, i32 %13
br label %15
15: ; preds = %7, %3
%16 = phi i32 [ 0, %3 ], [ %14, %7 ]
ret i32 %16
}