xunge/DecIR huggingface dataset:
unsigned int scan_ulong(const char *s, unsigned long *u) {
  unsigned int pos;
  unsigned long result, c;
  pos = 0;
  result = 0;
  while ((c = (unsigned long)(unsigned char)(s[pos] - '0')) < 10) {
    result = result * 10 + c;
    ++pos;
  }
  *u = result;
  return pos;
}


x86 assembly (clang, -O0):
<scan_ulong>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
movq   $0x0,-0x20(%rbp)
mov    -0x8(%rbp),%rax
mov    -0x14(%rbp),%ecx
movsbl (%rax,%rcx,1),%eax
sub    $0x30,%eax
movzbl %al,%eax
mov    %rax,-0x28(%rbp)
cmp    $0xa,%rax
jae    1155 <scan_ulong+0x55>
imul   $0xa,-0x20(%rbp),%rax
add    -0x28(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    111b <scan_ulong+0x1b>
mov    -0x20(%rbp),%rcx
mov    -0x10(%rbp),%rax
mov    %rcx,(%rax)
mov    -0x14(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<scan_ulong>:
mov    (%rdi),%dl
add    $0xd0,%dl
cmp    $0x9,%dl
ja     112e <scan_ulong+0x2e>
xor    %eax,%eax
xor    %ecx,%ecx
xchg   %ax,%ax
movzbl %dl,%edx
lea    (%rcx,%rcx,4),%rcx
lea    (%rdx,%rcx,2),%rcx
add    $0x1,%eax
movzbl (%rdi,%rax,1),%edx
add    $0xd0,%dl
cmp    $0xa,%dl
jb     1110 <scan_ulong+0x10>
mov    %rcx,(%rsi)
ret
xor    %ecx,%ecx
xor    %eax,%eax
mov    %rcx,(%rsi)
ret

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

LLVM IR (-O2):
define i32 @scan_ulong(i8* nocapture %0, i64* nocapture writeonly %1) {
%3 = load i8, i8* %0
%4 = add i8 %3, -48
%5 = icmp ult i8 %4, 10
br i1 %5, label %6, label %19
6: ; preds = %2, %6
%7 = phi i8 [ %17, %6 ], [ %4, %2 ]
%8 = phi i32 [ %13, %6 ], [ 0, %2 ]
%9 = phi i64 [ %12, %6 ], [ 0, %2 ]
%10 = zext i8 %7 to i64
%11 = mul i64 %9, 10
%12 = add i64 %11, %10
%13 = add i32 %8, 1
%14 = zext i32 %13 to i64
%15 = getelementptr inbounds i8, i8* %0, i64 %14
%16 = load i8, i8* %15
%17 = add i8 %16, -48
%18 = icmp ult i8 %17, 10
br i1 %18, label %6, label %19
19: ; preds = %6, %2
%20 = phi i64 [ 0, %2 ], [ %12, %6 ]
%21 = phi i32 [ 0, %2 ], [ %13, %6 ]
store i64 %20, i64* %1
ret i32 %21
}
double wtime_impl(void) {
  double t = 0.0;
  return t;
}


x86 assembly (clang, -O0):
<wtime_impl>:
push   %rbp
mov    %rsp,%rbp
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<wtime_impl>:
xorps  %xmm0,%xmm0
ret

LLVM IR (-O0):
define double @wtime_impl() {
%1 = alloca double
store double 0.000000e+00, double* %1
%2 = load double, double* %1
ret double %2
}

LLVM IR (-O2):
define double @wtime_impl() {
ret double 0.000000e+00
}
/* Type definitions */
typedef int uint16_t;

/* Variables and functions */
int getValueFromIndex(int);
uint16_t getLength(uint16_t pos) {
  if (pos > 15000 - 2) {
    return 15000 - pos;
  }
  return (getValueFromIndex(pos) & 0x3fff);
}


x86 assembly (clang, -O0):
<getLength>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
cmpl   $0x3a96,-0x8(%rbp)
jle    1138 <getLength+0x28>
mov    $0x3a98,%eax
sub    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1148 <getLength+0x38>
mov    -0x8(%rbp),%edi
call   1030 <getValueFromIndex@plt>
and    $0x3fff,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getLength>:
cmp    $0x3a97,%edi
jl     1120 <getLength+0x10>
mov    $0x3a98,%eax
sub    %edi,%eax
ret
push   %rax
call   1030 <getValueFromIndex@plt>
and    $0x3fff,%eax
add    $0x8,%rsp
ret

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

LLVM IR (-O2):
define i32 @getLength(i32 %0) {
%2 = icmp sgt i32 %0, 14998
br i1 %2, label %3, label %5
3: ; preds = %1
%4 = sub nsw i32 15000, %0
br label %8
5: ; preds = %1
%6 = tail call i32 @getValueFromIndex(i32 %0)
%7 = and i32 %6, 16383
br label %8
8: ; preds = %5, %3
%9 = phi i32 [ %4, %3 ], [ %7, %5 ]
ret i32 %9
}
void stop_single() {}


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

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

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

LLVM IR (-O2):
define void @stop_single() {
ret void
}
int splitbank_closestPowerOfTwo(int p) {
  int base = 2;
  if (p > 2) {
    while (base < p) {
      base *= 2;
    }
  }
  return base;
}


x86 assembly (clang, -O0):
<splitbank_closestPowerOfTwo>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x2,-0x8(%rbp)
cmpl   $0x2,-0x4(%rbp)
jle    113c <splitbank_closestPowerOfTwo+0x3c>
jmp    111d <splitbank_closestPowerOfTwo+0x1d>
mov    -0x8(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    1137 <splitbank_closestPowerOfTwo+0x37>
mov    -0x8(%rbp),%eax
shl    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    111d <splitbank_closestPowerOfTwo+0x1d>
jmp    113c <splitbank_closestPowerOfTwo+0x3c>
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<splitbank_closestPowerOfTwo>:
mov    $0x2,%eax
cmp    $0x3,%edi
jl     1119 <splitbank_closestPowerOfTwo+0x19>
mov    $0x2,%ecx
nop
mov    %ecx,%eax
lea    (%rax,%rax,1),%ecx
cmp    %edi,%eax
jl     1110 <splitbank_closestPowerOfTwo+0x10>
ret

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

LLVM IR (-O2):
define i32 @splitbank_closestPowerOfTwo(i32 %0) {
%2 = icmp sgt i32 %0, 2
br i1 %2, label %3, label %7
3: ; preds = %1, %3
%4 = phi i32 [ %6, %3 ], [ 2, %1 ]
%5 = icmp slt i32 %4, %0
%6 = shl nsw i32 %4, 1
br i1 %5, label %3, label %7
7: ; preds = %3, %1
%8 = phi i32 [ 2, %1 ], [ %4, %3 ]
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ fflush(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ stdout;
int /*<<< orphan*/ sync();
int main(int argc, char **argv) {
  sync();
  printf("Sync complete.\n");
  fflush(stdout);
  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    $0x0,%al
call   1040 <sync@plt>
lea    0xeac(%rip),%rdi
call   1030 <printf@plt>
mov    0x2e80(%rip),%rax
mov    (%rax),%edi
call   1050 <fflush@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1040 <sync@plt>
lea    0xec1(%rip),%rdi
call   1030 <puts@plt>
mov    0x2e95(%rip),%rax
mov    (%rax),%edi
call   1050 <fflush@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [16 x i8] c"Sync complete.\0A\00"
@stdout = global i32 0
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 (...) @sync()
%7 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
%8 = load i32, i32* @stdout
%9 = call i32 @fflush(i32 %8)
ret i32 0
}

LLVM IR (-O2):
@stdout = global i32 0
@str = [15 x i8] c"Sync complete.\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @sync()
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @str, i64 0, i64 0))
%5 = load i32, i32* @stdout
%6 = tail call i32 @fflush(i32 %5)
ret i32 0
}
/* Variables and functions */
int getpid();
int c(void) { return getpid() % 100000; }


x86 assembly (clang, -O0):
<c>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <getpid@plt>
mov    $0x186a0,%ecx
cltd
idiv   %ecx
mov    %edx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<c>:
push   %rax
xor    %eax,%eax
call   1030 <getpid@plt>
cltq
imul   $0x14f8b589,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
sar    $0x2d,%rcx
add    %edx,%ecx
imul   $0x186a0,%ecx,%ecx
sub    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @c() {
%1 = call i32 (...) @getpid()
%2 = srem i32 %1, 100000
ret i32 %2
}

LLVM IR (-O2):
define i32 @c() {
%1 = tail call i32 (...) @getpid()
%2 = srem i32 %1, 100000
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void fnDispArray(int X[], int n) {
  int i;
  for (i = 0; i < n; i++)
    printf(" %5d \n", X[i]);
}


x86 assembly (clang, -O0):
<fnDispArray>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1157 <fnDispArray+0x47>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,4),%esi
lea    0xebc(%rip),%rdi
call   1030 <printf@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1126 <fnDispArray+0x16>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fnDispArray>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
test   %esi,%esi
jle    1145 <fnDispArray+0x35>
mov    %rdi,%r15
mov    %esi,%r12d
xor    %ebx,%ebx
lea    0xed5(%rip),%r14
nopl   0x0(%rax,%rax,1)
mov    (%r15,%rbx,4),%esi
mov    %r14,%rdi
call   1030 <printf@plt>
add    $0x1,%rbx
cmp    %rbx,%r12
jne    1130 <fnDispArray+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
@.str = [7 x i8] c" %5d \0A\00"
define void @fnDispArray(i32* nocapture %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %13
4: ; preds = %2
%5 = zext i32 %1 to i64
br label %6
6: ; preds = %4, %6
%7 = phi i64 [ 0, %4 ], [ %11, %6 ]
%8 = getelementptr inbounds i32, i32* %0, i64 %7
%9 = load i32, i32* %8
%10 = tail call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 %9)
%11 = add nuw nsw i64 %7, 1
%12 = icmp eq i64 %11, %5
br i1 %12, label %13, label %6
13: ; preds = %6, %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ abort();
int memcmp(const void *aptr, const void *bptr, size_t size) {
  abort();
  return 0;
}


x86 assembly (clang, -O0):
<memcmp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    $0x0,%al
call   1030 <abort@plt>

x86 assembly (clang, -O2):
<memcmp>:
push   %rax
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
define i32 @memcmp(i8* %0, i8* %1, i64 %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i64
store i8* %0, i8** %4
store i8* %1, i8** %5
store i64 %2, i64* %6
%7 = call i32 (...) @abort()
unreachable
}

LLVM IR (-O2):
define i32 @memcmp(i8* nocapture readnone %0, i8* nocapture readnone %1, i64 %2) {
%4 = tail call i32 (...) @abort()
unreachable
}
char test_57_0(char *mem) { return __atomic_xor_fetch(mem + 0, 1, 4); }


x86 assembly (clang, -O0):
<test_57_0>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
movb   $0x1,-0x9(%rbp)
mov    -0x9(%rbp),%cl
mov    %cl,-0xc(%rbp)
mov    (%rax),%al
mov    %al,-0xb(%rbp)
mov    -0xb(%rbp),%al
mov    -0x18(%rbp),%rcx
mov    -0xc(%rbp),%sil
mov    %al,%dl
xor    %sil,%dl
lock cmpxchg %dl,(%rcx)
sete   %cl
mov    %al,-0x19(%rbp)
test   $0x1,%cl
mov    %al,-0xb(%rbp)
jne    114a <test_57_0+0x4a>
jmp    111f <test_57_0+0x1f>
mov    -0xc(%rbp),%cl
mov    -0x19(%rbp),%al
xor    %cl,%al
mov    %al,-0xa(%rbp)
movsbl -0xa(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_57_0>:
mov    (%rdi),%al
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    %eax,%ecx
xor    $0x1,%cl
lock cmpxchg %cl,(%rdi)
jne    1110 <test_57_0+0x10>
xor    $0x1,%al
ret

LLVM IR (-O0):
define signext i8 @test_57_0(i8* %0) {
%2 = alloca i8*
%3 = alloca i8
%4 = alloca i8
store i8* %0, i8** %2
%5 = load i8*, i8** %2
%6 = getelementptr inbounds i8, i8* %5, i64 0
store i8 1, i8* %3
%7 = load i8, i8* %3
%8 = atomicrmw xor i8* %6, i8 %7 acq_rel
%9 = xor i8 %8, %7
store i8 %9, i8* %4
%10 = load i8, i8* %4
ret i8 %10
}

LLVM IR (-O2):
define signext i8 @test_57_0(i8* nocapture %0) {
%2 = atomicrmw xor i8* %0, i8 1 acq_rel
%3 = xor i8 %2, 1
ret i8 %3
}
void sj_onArrayStart(char *name) {}


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

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

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

LLVM IR (-O2):
define void @sj_onArrayStart(i8* nocapture %0) {
ret void
}
double sigmoid_deriv_func(double y) { return (y * (1.0 - y)); }


x86 assembly (clang, -O0):
<sigmoid_deriv_func>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  0xeea(%rip),%xmm1
subsd  -0x8(%rbp),%xmm1
mulsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<sigmoid_deriv_func>:
movsd  0xef8(%rip),%xmm1
subsd  %xmm0,%xmm1
mulsd  %xmm1,%xmm0
ret

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

LLVM IR (-O2):
define double @sigmoid_deriv_func(double %0) {
%2 = fsub double 1.000000e+00, %0
%3 = fmul double %2, %0
ret double %3
}
/* Type definitions */
struct mafAli {
  int dummy;
};

/* Variables and functions */
struct mafAli *mafSubsetE(struct mafAli *, char *, int, int,
                          int /*<<< orphan*/);
struct mafAli *mafSubset(struct mafAli *maf, char *componentSource,
                         int newStart, int newEnd) {
  return mafSubsetE(maf, componentSource, newStart, newEnd, 0);
}


x86 assembly (clang, -O0):
<mafSubset>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %ecx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
mov    -0x18(%rbp),%ecx
xor    %r8d,%r8d
call   1030 <mafSubsetE@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mafSubset>:
xor    %r8d,%r8d
jmp    1030 <mafSubsetE@plt>

LLVM IR (-O0):
%struct.mafAli = type { i32 }
define %struct.mafAli* @mafSubset(%struct.mafAli* %0, i8* %1, i32 %2, i32 %3) {
%5 = alloca %struct.mafAli*
%6 = alloca i8*
%7 = alloca i32
%8 = alloca i32
store %struct.mafAli* %0, %struct.mafAli** %5
store i8* %1, i8** %6
store i32 %2, i32* %7
store i32 %3, i32* %8
%9 = load %struct.mafAli*, %struct.mafAli** %5
%10 = load i8*, i8** %6
%11 = load i32, i32* %7
%12 = load i32, i32* %8
%13 = call %struct.mafAli* @mafSubsetE(%struct.mafAli* %9, i8* %10, i32 %11, i32 %12, i32 0)
ret %struct.mafAli* %13
}

LLVM IR (-O2):
%struct.mafAli = type { i32 }
define %struct.mafAli* @mafSubset(%struct.mafAli* %0, i8* %1, i32 %2, i32 %3) {
%5 = tail call %struct.mafAli* @mafSubsetE(%struct.mafAli* %0, i8* %1, i32 %2, i32 %3, i32 0)
ret %struct.mafAli* %5
}
int caam_pkc_init(struct device *dev) { return 0; }


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

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

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

LLVM IR (-O2):
%struct.device = type opaque
define i32 @caam_pkc_init(%struct.device* nocapture readnone %0) {
ret i32 0
}
int __attribute__((no, noclone)) fn1(unsigned int u) {
  return (-(int)(u - 1U)) - 1;
}


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

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

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

LLVM IR (-O2):
define i32 @fn1(i32 %0) {
%2 = sub i32 0, %0
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void usage(void) {
  fprintf(stderr, "usage: xstr [-cv] [-] [file ...]\n");
  exit(1);
}


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    $0x1,%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    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [34 x i8] c"usage: xstr [-cv] [-] [file ...]\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [34 x i8] c"usage: xstr [-cv] [-] [file ...]\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @exit(i32 1)
unreachable
}
int c077(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @c077() {
ret i32 0
}
void foo431() {}


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

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

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

LLVM IR (-O2):
define void @foo431() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ putstring(char *);
void fc(char a[]) { putstring(a); }


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

x86 assembly (clang, -O2):
<fc>:
jmp    1030 <putstring@plt>

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

LLVM IR (-O2):
define void @fc(i8* %0) {
%2 = tail call i32 @putstring(i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ accept_loop(int, int);
void *thread_main_autospawn(void *arg) {
  int s;
  {
    s = (int)arg;
    accept_loop(-1, s);
    return ((void *)0);
  }
}


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

x86 assembly (clang, -O2):
<thread_main_autospawn>:
push   %rax
mov    %rdi,%rsi
mov    $0xffffffff,%edi
call   1030 <accept_loop@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i8* @thread_main_autospawn(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = ptrtoint i8* %4 to i32
store i32 %5, i32* %3
%6 = load i32, i32* %3
%7 = call i32 @accept_loop(i32 -1, i32 %6)
ret i8* null
}

LLVM IR (-O2):
define noalias i8* @thread_main_autospawn(i8* %0) {
%2 = ptrtoint i8* %0 to i64
%3 = trunc i64 %2 to i32
%4 = tail call i32 @accept_loop(i32 -1, i32 %3)
ret i8* null
}
float quartic_ease_in(float p) { return p * p * p * p; }


x86 assembly (clang, -O0):
<quartic_ease_in>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
mulss  -0x4(%rbp),%xmm0
mulss  -0x4(%rbp),%xmm0
mulss  -0x4(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<quartic_ease_in>:
movaps %xmm0,%xmm1
mulss  %xmm0,%xmm1
mulss  %xmm0,%xmm1
mulss  %xmm1,%xmm0
ret

LLVM IR (-O0):
define float @quartic_ease_in(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = load float, float* %2
%5 = fmul float %3, %4
%6 = load float, float* %2
%7 = fmul float %5, %6
%8 = load float, float* %2
%9 = fmul float %7, %8
ret float %9
}

LLVM IR (-O2):
define float @quartic_ease_in(float %0) {
%2 = fmul float %0, %0
%3 = fmul float %2, %0
%4 = fmul float %3, %0
ret float %4
}
/* Variables and functions */
double sinus(double, int /*<<< orphan*/);
double sin(double arg) { return sinus(arg, 0); }


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

x86 assembly (clang, -O2):
<sin>:
xor    %edi,%edi
jmp    1030 <sinus@plt>

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

LLVM IR (-O2):
define double @sin(double %0) {
%2 = tail call double @sinus(double %0, i32 0)
ret double %2
}
void gdk_screen_get_number() {}


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

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

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

LLVM IR (-O2):
define void @gdk_screen_get_number() {
ret void
}
int platform_chdir(const char *dir) { return -1; }


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

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

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

LLVM IR (-O2):
define i32 @platform_chdir(i8* nocapture readnone %0) {
ret i32 -1
}
/* Variables and functions */
long double cos(long double);
long double cosl(long double a1) { return cos(a1); }


x86 assembly (clang, -O0):
<cosl>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
fldt   0x10(%rbp)
fstpt  -0x10(%rbp)
fldt   -0x10(%rbp)
mov    %rsp,%rax
fstpt  (%rax)
call   1030 <cos@plt>
fld    %st(0)
fstp   %st(0)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cosl>:
jmp    1030 <cos@plt>

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

LLVM IR (-O2):
define x86_fp80 @cosl(x86_fp80 %0) {
%2 = tail call x86_fp80 @cos(x86_fp80 %0)
ret x86_fp80 %2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main() {
  int a = 0;
  if (a == 0) {
    printf("a is zero\n");
  } else {
    printf("a is non-zero\n");
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jne    1141 <main+0x31>
lea    0xec9(%rip),%rdi
call   1030 <printf@plt>
jmp    114d <main+0x3d>
lea    0xec3(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [11 x i8] c"a is zero\0A\00"
@.str.1 = [15 x i8] c"a is non-zero\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %2
%3 = load i32, i32* %2
%4 = icmp eq i32 %3, 0
br i1 %4, label %5, label %7
5: ; preds = %0
%6 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
br label %9
7: ; preds = %0
%8 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0))
br label %9
9: ; preds = %7, %5
ret i32 0
}

LLVM IR (-O2):
@str = [10 x i8] c"a is zero\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @str, i64 0, i64 0))
ret i32 0
}
void *__thread_func(void *arg) { return (arg); }


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

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

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

LLVM IR (-O2):
define i8* @__thread_func(i8* readnone returned %0) {
ret i8* %0
}
int index_maxdepth(int nodecount) {
  int b, c, maxdepth;
  maxdepth = 1;
  b = 0;
  c = 1;
  while (b <= nodecount) {
    int tmp;
    tmp = 1 + b + c;
    b = c;
    c = tmp;
    maxdepth++;
  }
  return maxdepth;
}


x86 assembly (clang, -O0):
<index_maxdepth>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x1,-0x10(%rbp)
movl   $0x0,-0x8(%rbp)
movl   $0x1,-0xc(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0x4(%rbp),%eax
jg     114e <index_maxdepth+0x4e>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
add    -0xc(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x14(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    111c <index_maxdepth+0x1c>
mov    -0x10(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<index_maxdepth>:
mov    $0x1,%eax
test   %edi,%edi
js     1121 <index_maxdepth+0x21>
xor    %ecx,%ecx
mov    $0x1,%edx
lea    (%rdx,%rcx,1),%esi
add    $0x1,%esi
add    $0x1,%eax
mov    %edx,%ecx
cmp    %edi,%edx
mov    %esi,%edx
jle    1110 <index_maxdepth+0x10>
ret

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

LLVM IR (-O2):
define i32 @index_maxdepth(i32 %0) {
%2 = icmp slt i32 %0, 0
br i1 %2, label %11, label %3
3: ; preds = %1, %3
%4 = phi i32 [ %6, %3 ], [ 0, %1 ]
%5 = phi i32 [ %9, %3 ], [ 1, %1 ]
%6 = phi i32 [ %8, %3 ], [ 1, %1 ]
%7 = add i32 %6, 1
%8 = add i32 %7, %4
%9 = add nuw nsw i32 %5, 1
%10 = icmp sgt i32 %6, %0
br i1 %10, label %11, label %3
11: ; preds = %3, %1
%12 = phi i32 [ 1, %1 ], [ %9, %3 ]
ret i32 %12
}
unsigned long long nlm_crypto_form_pkt_desc4(unsigned int srcfraglen,
                                             unsigned long long srcfragaddr) {
  return (((unsigned long long)((srcfraglen - 1)) & ((1ULL << (16)) - 1))
          << (48)) |
         ((unsigned long long)(srcfragaddr) << (0));
}


x86 assembly (clang, -O0):
<nlm_crypto_form_pkt_desc4>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%eax
sub    $0x1,%eax
mov    %eax,%eax
and    $0xffff,%rax
shl    $0x30,%rax
mov    -0x10(%rbp),%rcx
shl    $0x0,%rcx
or     %rcx,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<nlm_crypto_form_pkt_desc4>:
lea    -0x1(%rdi),%eax
shl    $0x30,%rax
or     %rsi,%rax
ret

LLVM IR (-O0):
define i64 @nlm_crypto_form_pkt_desc4(i32 %0, i64 %1) {
%3 = alloca i32
%4 = alloca i64
store i32 %0, i32* %3
store i64 %1, i64* %4
%5 = load i32, i32* %3
%6 = sub i32 %5, 1
%7 = zext i32 %6 to i64
%8 = and i64 %7, 65535
%9 = shl i64 %8, 48
%10 = load i64, i64* %4
%11 = shl i64 %10, 0
%12 = or i64 %9, %11
ret i64 %12
}

LLVM IR (-O2):
define i64 @nlm_crypto_form_pkt_desc4(i32 %0, i64 %1) {
%3 = add i32 %0, 65535
%4 = zext i32 %3 to i64
%5 = shl i64 %4, 48
%6 = or i64 %5, %1
ret i64 %6
}
/* Variables and functions */
unsigned long clk_get_pll_rate();
unsigned int reg_read_32(unsigned int volatile *);
unsigned long clk_get_dc_rate(void) {
  unsigned long pll_rate, dc_rate;
  unsigned int ctrl;
  pll_rate = clk_get_pll_rate();
  ctrl = reg_read_32((volatile unsigned int *)(0xbfe78034));
  dc_rate = pll_rate;
  return dc_rate;
}


x86 assembly (clang, -O0):
<clk_get_dc_rate>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    $0x0,%al
call   1040 <clk_get_pll_rate@plt>
mov    %rax,-0x8(%rbp)
mov    $0xbfe78034,%edi
call   1030 <reg_read_32@plt>
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<clk_get_dc_rate>:
push   %rbx
xor    %eax,%eax
call   1040 <clk_get_pll_rate@plt>
mov    %rax,%rbx
mov    $0xbfe78034,%edi
call   1030 <reg_read_32@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
define i64 @clk_get_dc_rate() {
%1 = alloca i64
%2 = alloca i64
%3 = alloca i32
%4 = call i64 (...) @clk_get_pll_rate()
store i64 %4, i64* %1
%5 = call i32 @reg_read_32(i32* inttoptr (i64 3219619892 to i32*))
store i32 %5, i32* %3
%6 = load i64, i64* %1
store i64 %6, i64* %2
%7 = load i64, i64* %2
ret i64 %7
}

LLVM IR (-O2):
define i64 @clk_get_dc_rate() {
%1 = tail call i64 (...) @clk_get_pll_rate()
%2 = tail call i32 @reg_read_32(i32* inttoptr (i64 3219619892 to i32*))
ret i64 %1
}
/* Variables and functions */
int /*<<< orphan*/ _exit(int);
int /*<<< orphan*/ printf(char *);
void usage() {
  printf("Lplayer: The Linux Player.\nUsage: ");
  printf("lplayer <command>\nCommands Available:\n\tnext\n\tcurrent\n\thelp\n");
  printf("Type \"lplayer help <command>\" for more information.\n");
  _exit(1);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1040 <printf@plt>
lea    0xeec(%rip),%rdi
call   1040 <printf@plt>
lea    0xf1c(%rip),%rdi
call   1040 <printf@plt>
mov    $0x1,%edi
call   1030 <_exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %rax
lea    0xec8(%rip),%rdi
call   1050 <printf@plt>
lea    0xedf(%rip),%rdi
call   1040 <puts@plt>
lea    0xf0e(%rip),%rdi
call   1040 <puts@plt>
mov    $0x1,%edi
call   1030 <_exit@plt>

LLVM IR (-O0):
@.str = [35 x i8] c"Lplayer: The Linux Player.\0AUsage: \00"
@.str.1 = [60 x i8] c"lplayer <command>\0ACommands Available:\0A\09next\0A\09current\0A\09help\0A\00"
@.str.2 = [53 x i8] c"Type \22lplayer help <command>\22 for more information.\0A\00"
define void @usage() {
%1 = call i32 @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @printf(i8* getelementptr inbounds ([60 x i8], [60 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 @printf(i8* getelementptr inbounds ([53 x i8], [53 x i8]* @.str.2, i64 0, i64 0))
%4 = call i32 @_exit(i32 1)
unreachable
}

LLVM IR (-O2):
@.str = [35 x i8] c"Lplayer: The Linux Player.\0AUsage: \00"
@str = [59 x i8] c"lplayer <command>\0ACommands Available:\0A\09next\0A\09current\0A\09help\00"
@str.3 = [52 x i8] c"Type \22lplayer help <command>\22 for more information.\00"
define void @usage() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([59 x i8], [59 x i8]* @str, i64 0, i64 0))
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([52 x i8], [52 x i8]* @str.3, i64 0, i64 0))
%4 = tail call i32 @_exit(i32 1)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ errx(int, char *, int);
int ensurebase(int b) {
  if (b < 2 || b > 36)
    errx(1, "Unsupported base: %d", b);
  return b;
}


x86 assembly (clang, -O0):
<ensurebase>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x2,-0x4(%rbp)
jl     112f <ensurebase+0x1f>
cmpl   $0x24,-0x4(%rbp)
jle    1143 <ensurebase+0x33>
mov    -0x4(%rbp),%edx
mov    $0x1,%edi
lea    0xec2(%rip),%rsi
call   1030 <errx@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ensurebase>:
push   %rbx
mov    %edi,%ebx
lea    -0x25(%rbx),%eax
cmp    $0xffffffdc,%eax
ja     112e <ensurebase+0x1e>
lea    0xede(%rip),%rsi
mov    $0x1,%edi
mov    %ebx,%edx
call   1030 <errx@plt>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [21 x i8] c"Unsupported base: %d\00"
define i32 @ensurebase(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp slt i32 %3, 2
br i1 %4, label %8, label %5
5: ; preds = %1
%6 = load i32, i32* %2
%7 = icmp sgt i32 %6, 36
br i1 %7, label %8, label %11
8: ; preds = %5, %1
%9 = load i32, i32* %2
%10 = call i32 @errx(i32 1, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i32 %9)
br label %11
11: ; preds = %8, %5
%12 = load i32, i32* %2
ret i32 %12
}

LLVM IR (-O2):
@.str = [21 x i8] c"Unsupported base: %d\00"
define i32 @ensurebase(i32 returned %0) {
%2 = add i32 %0, -37
%3 = icmp ult i32 %2, -35
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i32 @errx(i32 1, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i32 %0)
br label %6
6: ; preds = %1, %4
ret i32 %0
}
int imax3(int a, int b, int c) {
  int ret = a;
  if (b > a)
    ret = b;
  if (c > a)
    ret = c;
  return ret;
}


x86 assembly (clang, -O0):
<imax3>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0x4(%rbp),%eax
jle    1125 <imax3+0x25>
mov    -0x8(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x4(%rbp),%eax
jle    1137 <imax3+0x37>
mov    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<imax3>:
mov    %esi,%eax
cmp    %edi,%esi
cmovle %edi,%eax
cmp    %edi,%edx
cmovg  %edx,%eax
ret

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

LLVM IR (-O2):
define i32 @imax3(i32 %0, i32 %1, i32 %2) {
%4 = icmp sgt i32 %1, %0
%5 = select i1 %4, i32 %1, i32 %0
%6 = icmp sgt i32 %2, %0
%7 = select i1 %6, i32 %2, i32 %5
ret i32 %7
}
/* Variables and functions */
bool cc_char_in(char const c, char const *const restrict seps) {
  if (!seps)
    return false;
  for (char *x = (char *)seps; *x != '\0'; ++x)
    if (c == *x)
      return true;
  return false;
}


x86 assembly (clang, -O0):
<cc_char_in>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x5(%rbp)
mov    %rsi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1125 <cc_char_in+0x25>
movl   $0x0,-0x4(%rbp)
jmp    1179 <cc_char_in+0x79>
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     1172 <cc_char_in+0x72>
movsbl -0x5(%rbp),%eax
mov    -0x18(%rbp),%rcx
movsbl (%rcx),%ecx
cmp    %ecx,%eax
jne    115c <cc_char_in+0x5c>
movl   $0x1,-0x4(%rbp)
jmp    1179 <cc_char_in+0x79>
jmp    1161 <cc_char_in+0x61>
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
jmp    112d <cc_char_in+0x2d>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<cc_char_in>:
test   %rsi,%rsi
je     1128 <cc_char_in+0x28>
cs nopw 0x0(%rax,%rax,1)
nop
movzbl (%rsi),%ecx
test   %cl,%cl
je     1120 <cc_char_in+0x20>
add    $0x1,%rsi
cmp    %dil,%cl
jne    1110 <cc_char_in+0x10>
xor    %eax,%eax
test   %cl,%cl
setne  %al
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @cc_char_in(i8 signext %0, i8* noalias %1) {
%3 = icmp eq i8* %1, null
br i1 %3, label %14, label %4
4: ; preds = %2, %4
%5 = phi i8* [ %10, %4 ], [ %1, %2 ]
%6 = load i8, i8* %5
%7 = icmp eq i8 %6, 0
%8 = icmp eq i8 %6, %0
%9 = or i1 %7, %8
%10 = getelementptr inbounds i8, i8* %5, i64 1
br i1 %9, label %11, label %4
11: ; preds = %4
%12 = xor i1 %7, true
%13 = zext i1 %12 to i32
br label %14
14: ; preds = %11, %2
%15 = phi i32 [ 0, %2 ], [ %13, %11 ]
ret i32 %15
}
/* Type definitions */
struct activity {
  int dummy;
};

/* Variables and functions */
int get_serial_nr();
int wrap_get_serial_nr(struct activity *a) {
  int n = 0;
  if ((n = get_serial_nr()) > 0) {
    if (n > 65536)
      return 65536;
    else
      return n;
  }
  return 0;
}


x86 assembly (clang, -O0):
<wrap_get_serial_nr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    $0x0,%al
call   1030 <get_serial_nr@plt>
mov    %eax,-0x14(%rbp)
cmp    $0x0,%eax
jle    115a <wrap_get_serial_nr+0x4a>
cmpl   $0x10000,-0x14(%rbp)
jle    114f <wrap_get_serial_nr+0x3f>
movl   $0x10000,-0x4(%rbp)
jmp    1161 <wrap_get_serial_nr+0x51>
mov    -0x14(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1161 <wrap_get_serial_nr+0x51>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<wrap_get_serial_nr>:
push   %rbx
xor    %ebx,%ebx
xor    %eax,%eax
call   1030 <get_serial_nr@plt>
cmp    $0x10000,%eax
mov    $0x10000,%ecx
cmovge %ecx,%eax
test   %eax,%eax
cmovs  %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
%struct.activity = type { i32 }
define i32 @wrap_get_serial_nr(%struct.activity* %0) {
%2 = alloca i32
%3 = alloca %struct.activity*
%4 = alloca i32
store %struct.activity* %0, %struct.activity** %3
store i32 0, i32* %4
%5 = call i32 (...) @get_serial_nr()
store i32 %5, i32* %4
%6 = icmp sgt i32 %5, 0
br i1 %6, label %7, label %13
7: ; preds = %1
%8 = load i32, i32* %4
%9 = icmp sgt i32 %8, 65536
br i1 %9, label %10, label %11
10: ; preds = %7
store i32 65536, i32* %2
br label %14
11: ; preds = %7
%12 = load i32, i32* %4
store i32 %12, i32* %2
br label %14
13: ; preds = %1
store i32 0, i32* %2
br label %14
14: ; preds = %13, %11, %10
%15 = load i32, i32* %2
ret i32 %15
}

LLVM IR (-O2):
%struct.activity = type { i32 }
define i32 @wrap_get_serial_nr(%struct.activity* nocapture readnone %0) {
%2 = tail call i32 (...) @get_serial_nr()
%3 = icmp slt i32 %2, 65536
%4 = select i1 %3, i32 %2, i32 65536
%5 = icmp sgt i32 %4, 0
%6 = select i1 %5, i32 %4, i32 0
ret i32 %6
}
void self_assign_bad() {
  int x;
  x = x;
}


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

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

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

LLVM IR (-O2):
define void @self_assign_bad() {
ret void
}
void main() {
  int y;
  if (y < 0) {
    y = 0;
  }
  int x = y;
  x = x + 1;
  int i = 0;
  while (1) {
    if (i == 1) {
      x = x + 1;
      i = 0;
    } else {
      x = x - 1;
      i = 1;
    }
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
cmpl   $0x0,-0x4(%rbp)
jge    1115 <main+0x15>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x1,-0xc(%rbp)
jne    114a <main+0x4a>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
jmp    115a <main+0x5a>
mov    -0x8(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x8(%rbp)
movl   $0x1,-0xc(%rbp)
jmp    112b <main+0x2b>

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

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

LLVM IR (-O2):
define void @main() {
br label %1
1: ; preds = %1, %0
br label %1
}
/* Type definitions */
typedef int /*<<< orphan*/ sigset_t;

/* Variables and functions */
int /*<<< orphan*/ SIGTERM;
int /*<<< orphan*/ SIGUSR1;
int /*<<< orphan*/ SIG_UNBLOCK;
int /*<<< orphan*/ pthread_sigmask(int /*<<< orphan*/, int /*<<< orphan*/ *,
                                   int /*<<< orphan*/ *);
int /*<<< orphan*/ sigaddset(int /*<<< orphan*/ *, int /*<<< orphan*/);
int /*<<< orphan*/ sigemptyset(int /*<<< orphan*/ *);
void unblock_sigusr1(void) {
  sigset_t set;
  sigemptyset(&set);
  sigaddset(&set, SIGUSR1);
  sigaddset(&set, SIGTERM);
  pthread_sigmask(SIG_UNBLOCK, &set, NULL);
}


x86 assembly (clang, -O0):
<unblock_sigusr1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    -0x4(%rbp),%rdi
call   1030 <sigemptyset@plt>
mov    0x2e98(%rip),%rax
mov    (%rax),%esi
lea    -0x4(%rbp),%rdi
call   1050 <sigaddset@plt>
mov    0x2e7e(%rip),%rax
mov    (%rax),%esi
lea    -0x4(%rbp),%rdi
call   1050 <sigaddset@plt>
mov    0x2e7c(%rip),%rax
mov    (%rax),%edi
lea    -0x4(%rbp),%rsi
xor    %eax,%eax
mov    %eax,%edx
call   1040 <pthread_sigmask@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<unblock_sigusr1>:
push   %rbx
sub    $0x10,%rsp
lea    0xc(%rsp),%rbx
mov    %rbx,%rdi
call   1030 <sigemptyset@plt>
mov    0x2e97(%rip),%rax
mov    (%rax),%esi
mov    %rbx,%rdi
call   1050 <sigaddset@plt>
mov    0x2e7e(%rip),%rax
mov    (%rax),%esi
mov    %rbx,%rdi
call   1050 <sigaddset@plt>
mov    0x2e7d(%rip),%rax
mov    (%rax),%edi
mov    %rbx,%rsi
xor    %edx,%edx
call   1040 <pthread_sigmask@plt>
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@SIGUSR1 = global i32 0
@SIGTERM = global i32 0
@SIG_UNBLOCK = global i32 0
define void @unblock_sigusr1() {
%1 = alloca i32
%2 = call i32 @sigemptyset(i32* %1)
%3 = load i32, i32* @SIGUSR1
%4 = call i32 @sigaddset(i32* %1, i32 %3)
%5 = load i32, i32* @SIGTERM
%6 = call i32 @sigaddset(i32* %1, i32 %5)
%7 = load i32, i32* @SIG_UNBLOCK
%8 = call i32 @pthread_sigmask(i32 %7, i32* %1, i32* null)
ret void
}

LLVM IR (-O2):
@SIGUSR1 = global i32 0
@SIGTERM = global i32 0
@SIG_UNBLOCK = global i32 0
define void @unblock_sigusr1() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i32 @sigemptyset(i32* %1)
%4 = load i32, i32* @SIGUSR1
%5 = call i32 @sigaddset(i32* %1, i32 %4)
%6 = load i32, i32* @SIGTERM
%7 = call i32 @sigaddset(i32* %1, i32 %6)
%8 = load i32, i32* @SIG_UNBLOCK
%9 = call i32 @pthread_sigmask(i32 %8, i32* %1, i32* null)
ret void
}
/* Variables and functions */
int bar(int);
int foo(int a) {
  int y = bar(9);
  return a + y;
}


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x9,%edi
call   1030 <bar@plt>
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
add    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo>:
push   %rbx
mov    %edi,%ebx
mov    $0x9,%edi
call   1030 <bar@plt>
add    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @foo(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = call i32 @bar(i32 9)
store i32 %4, i32* %3
%5 = load i32, i32* %2
%6 = load i32, i32* %3
%7 = add nsw i32 %5, %6
ret i32 %7
}

LLVM IR (-O2):
define i32 @foo(i32 %0) {
%2 = tail call i32 @bar(i32 9)
%3 = add nsw i32 %2, %0
ret i32 %3
}
void I2C2_EV_IRQHandler() {}


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

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

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

LLVM IR (-O2):
define void @I2C2_EV_IRQHandler() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ prune_minmax1_Ok(int /*<<< orphan*/, int /*<<< orphan*/);
void call_prune_minmax1_Ok() { prune_minmax1_Ok(0, 0); }


x86 assembly (clang, -O0):
<call_prune_minmax1_Ok>:
push   %rbp
mov    %rsp,%rbp
xor    %esi,%esi
mov    %esi,%edi
call   1030 <prune_minmax1_Ok@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<call_prune_minmax1_Ok>:
xor    %edi,%edi
xor    %esi,%esi
jmp    1030 <prune_minmax1_Ok@plt>

LLVM IR (-O0):
define void @call_prune_minmax1_Ok() {
%1 = call i32 @prune_minmax1_Ok(i32 0, i32 0)
ret void
}

LLVM IR (-O2):
define void @call_prune_minmax1_Ok() {
%1 = tail call i32 @prune_minmax1_Ok(i32 0, i32 0)
ret void
}