xunge/DecIR huggingface dataset:
int compare(e1, e2)
unsigned long *e1, *e2;
{
  if (*e1 < *e2)
    return -1;
  if (*e1 > *e2)
    return 1;
  return 0;
}


x86 assembly (clang, -O0):
<compare>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%rax
mov    -0x18(%rbp),%rcx
cmp    (%rcx),%rax
jae    112c <compare+0x2c>
movl   $0xffffffff,-0x4(%rbp)
jmp    1153 <compare+0x53>
mov    -0x10(%rbp),%rax
mov    (%rax),%rax
mov    -0x18(%rbp),%rcx
cmp    (%rcx),%rax
jbe    114c <compare+0x4c>
movl   $0x1,-0x4(%rbp)
jmp    1153 <compare+0x53>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<compare>:
mov    (%rdi),%rax
xor    %ecx,%ecx
cmp    (%rsi),%rax
seta   %cl
mov    $0xffffffff,%eax
cmovae %ecx,%eax
ret

LLVM IR (-O0):
define i32 @compare(i64* %0, i64* %1) {
%3 = alloca i32
%4 = alloca i64*
%5 = alloca i64*
store i64* %0, i64** %4
store i64* %1, i64** %5
%6 = load i64*, i64** %4
%7 = load i64, i64* %6
%8 = load i64*, i64** %5
%9 = load i64, i64* %8
%10 = icmp ult i64 %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 i64*, i64** %4
%14 = load i64, i64* %13
%15 = load i64*, i64** %5
%16 = load i64, i64* %15
%17 = icmp ugt i64 %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 @compare(i64* nocapture %0, i64* nocapture %1) {
%3 = load i64, i64* %0
%4 = load i64, i64* %1
%5 = icmp ult i64 %3, %4
%6 = icmp ugt i64 %3, %4
%7 = zext i1 %6 to i32
%8 = select i1 %5, i32 -1, i32 %7
ret i32 %8
}
/* Variables and functions */
char identity(char);
void void_tor(char x) { char y = (identity(x) | x) ? 42 : 43; }


x86 assembly (clang, -O0):
<void_tor>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%edi
call   1030 <identity@plt>
movsbl %al,%edx
movsbl -0x1(%rbp),%eax
or     %eax,%edx
mov    $0x2b,%eax
mov    $0x2a,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
mov    %al,-0x2(%rbp)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<void_tor>:
jmp    1030 <identity@plt>

LLVM IR (-O0):
define void @void_tor(i8 signext %0) {
%2 = alloca i8
%3 = alloca i8
store i8 %0, i8* %2
%4 = load i8, i8* %2
%5 = call signext i8 @identity(i8 signext %4)
%6 = sext i8 %5 to i32
%7 = load i8, i8* %2
%8 = sext i8 %7 to i32
%9 = or i32 %6, %8
%10 = icmp ne i32 %9, 0
%11 = zext i1 %10 to i64
%12 = select i1 %10, i32 42, i32 43
%13 = trunc i32 %12 to i8
store i8 %13, i8* %3
ret void
}

LLVM IR (-O2):
define void @void_tor(i8 signext %0) {
%2 = tail call signext i8 @identity(i8 signext %0)
ret void
}
unsigned int reverse_bits(unsigned int value) {
  unsigned int ret = 0;
  unsigned int tt = 1;
  for (tt = 1; tt != 0; tt <<= 1) {
    ret <<= 1;
    if (value & tt) {
      ret |= 1;
    }
  }
  return ret;
}


x86 assembly (clang, -O0):
<reverse_bits>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
movl   $0x1,-0xc(%rbp)
movl   $0x1,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
je     115a <reverse_bits+0x5a>
mov    -0x8(%rbp),%eax
shl    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
and    -0xc(%rbp),%eax
cmp    $0x0,%eax
je     1147 <reverse_bits+0x47>
mov    -0x8(%rbp),%eax
or     $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    114c <reverse_bits+0x4c>
mov    -0xc(%rbp),%eax
shl    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    111c <reverse_bits+0x1c>
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<reverse_bits>:
xor    %eax,%eax
mov    $0x1,%ecx
nopw   0x0(%rax,%rax,1)
xor    %edx,%edx
test   %edi,%ecx
setne  %dl
lea    (%rcx,%rcx,1),%esi
add    %edx,%edx
lea    (%rdx,%rax,4),%eax
xor    %edx,%edx
test   %edi,%esi
setne  %dl
or     %eax,%edx
lea    0x0(,%rcx,4),%eax
xor    %esi,%esi
test   %edi,%eax
setne  %sil
lea    0x0(,%rcx,8),%r8d
add    %esi,%esi
lea    (%rsi,%rdx,4),%edx
xor    %eax,%eax
test   %edi,%r8d
setne  %al
or     %edx,%eax
shl    $0x4,%ecx
jne    1110 <reverse_bits+0x10>
ret

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

LLVM IR (-O2):
define i32 @reverse_bits(i32 %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i32 [ 1, %1 ], [ %26, %2 ]
%4 = phi i32 [ 0, %1 ], [ %25, %2 ]
%5 = and i32 %3, %0
%6 = icmp eq i32 %5, 0
%7 = shl i32 %3, 1
%8 = shl i32 %4, 2
%9 = select i1 %6, i32 0, i32 2
%10 = or i32 %8, %9
%11 = and i32 %7, %0
%12 = icmp ne i32 %11, 0
%13 = zext i1 %12 to i32
%14 = or i32 %10, %13
%15 = shl i32 %3, 2
%16 = and i32 %15, %0
%17 = icmp eq i32 %16, 0
%18 = shl i32 %3, 3
%19 = shl i32 %14, 2
%20 = select i1 %17, i32 0, i32 2
%21 = or i32 %19, %20
%22 = and i32 %18, %0
%23 = icmp ne i32 %22, 0
%24 = zext i1 %23 to i32
%25 = or i32 %21, %24
%26 = shl i32 %3, 4
%27 = icmp eq i32 %26, 0
br i1 %27, label %28, label %2
28: ; preds = %2
ret i32 %25
}
char power(unsigned char x, unsigned char n) { return x * n; }


x86 assembly (clang, -O0):
<power>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %dil,%cl
mov    %cl,-0x1(%rbp)
mov    %al,-0x2(%rbp)
movzbl -0x1(%rbp),%eax
movzbl -0x2(%rbp),%ecx
imul   %ecx,%eax
movsbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<power>:
mov    %esi,%eax
mul    %dil
ret

LLVM IR (-O0):
define signext i8 @power(i8 zeroext %0, i8 zeroext %1) {
%3 = alloca i8
%4 = alloca i8
store i8 %0, i8* %3
store i8 %1, i8* %4
%5 = load i8, i8* %3
%6 = zext i8 %5 to i32
%7 = load i8, i8* %4
%8 = zext i8 %7 to i32
%9 = mul nsw i32 %6, %8
%10 = trunc i32 %9 to i8
ret i8 %10
}

LLVM IR (-O2):
define signext i8 @power(i8 zeroext %0, i8 zeroext %1) {
%3 = mul i8 %1, %0
ret i8 %3
}
short idiv_signed_rounded(long x, int shift) {
  x >>= (shift - 1);
  x += (x & 1);
  return (short)(x >> 1);
}


x86 assembly (clang, -O0):
<idiv_signed_rounded>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%ecx
sub    $0x1,%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,%ecx
sar    %cl,%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
and    $0x1,%rax
add    -0x8(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
sar    $0x1,%rax
cwtl
pop    %rbp
ret

x86 assembly (clang, -O2):
<idiv_signed_rounded>:
lea    -0x1(%rsi),%ecx
sar    %cl,%rdi
mov    %edi,%eax
and    $0x1,%eax
add    %edi,%eax
shr    %eax
ret

LLVM IR (-O0):
define signext i16 @idiv_signed_rounded(i64 %0, i32 %1) {
%3 = alloca i64
%4 = alloca i32
store i64 %0, i64* %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = sub nsw i32 %5, 1
%7 = load i64, i64* %3
%8 = zext i32 %6 to i64
%9 = ashr i64 %7, %8
store i64 %9, i64* %3
%10 = load i64, i64* %3
%11 = and i64 %10, 1
%12 = load i64, i64* %3
%13 = add nsw i64 %12, %11
store i64 %13, i64* %3
%14 = load i64, i64* %3
%15 = ashr i64 %14, 1
%16 = trunc i64 %15 to i16
ret i16 %16
}

LLVM IR (-O2):
define signext i16 @idiv_signed_rounded(i64 %0, i32 %1) {
%3 = add nsw i32 %1, -1
%4 = zext i32 %3 to i64
%5 = ashr i64 %0, %4
%6 = and i64 %5, 1
%7 = add nsw i64 %6, %5
%8 = lshr i64 %7, 1
%9 = trunc i64 %8 to i16
ret i16 %9
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void usage() {
  fprintf(stderr, "echofs: -d -w nthreads mount-point\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    $0xffffffff,%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    $0xffffffff,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [36 x i8] c"echofs: -d -w nthreads mount-point\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @exit(i32 -1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [36 x i8] c"echofs: -d -w nthreads mount-point\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @exit(i32 -1)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
void *malloc(size_t);
int /*<<< orphan*/ perror(char *);
void *get_new_memory(size_t values, size_t valsize) {
  void *new_mem = malloc(values * valsize);
  if (new_mem == NULL) {
    perror("Failed to obtain new memory");
    exit(EXIT_FAILURE);
  }
  return new_mem;
}


x86 assembly (clang, -O0):
<get_new_memory>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
imul   -0x10(%rbp),%rdi
call   1030 <malloc@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    1177 <get_new_memory+0x47>
lea    0xe9c(%rip),%rdi
call   1040 <perror@plt>
mov    0x2e70(%rip),%rax
mov    (%rax),%edi
call   1050 <exit@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_new_memory>:
push   %rax
imul   %rsi,%rdi
call   1030 <malloc@plt>
test   %rax,%rax
je     1141 <get_new_memory+0x11>
pop    %rcx
ret
lea    0xeb8(%rip),%rdi
call   1040 <perror@plt>
mov    0x2e8c(%rip),%rax
mov    (%rax),%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [28 x i8] c"Failed to obtain new memory\00"
@EXIT_FAILURE = global i32 0
define i8* @get_new_memory(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
%5 = alloca i8*
store i64 %0, i64* %3
store i64 %1, i64* %4
%6 = load i64, i64* %3
%7 = load i64, i64* %4
%8 = mul i64 %6, %7
%9 = call i8* @malloc(i64 %8)
store i8* %9, i8** %5
%10 = load i8*, i8** %5
%11 = icmp eq i8* %10, null
br i1 %11, label %12, label %16
12: ; preds = %2
%13 = call i32 @perror(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0))
%14 = load i32, i32* @EXIT_FAILURE
%15 = call i32 @exit(i32 %14)
unreachable
16: ; preds = %2
%17 = load i8*, i8** %5
ret i8* %17
}

LLVM IR (-O2):
@.str = [28 x i8] c"Failed to obtain new memory\00"
@EXIT_FAILURE = global i32 0
define noalias i8* @get_new_memory(i64 %0, i64 %1) {
%3 = mul i64 %1, %0
%4 = tail call i8* @malloc(i64 %3)
%5 = icmp eq i8* %4, null
br i1 %5, label %6, label %10
6: ; preds = %2
%7 = tail call i32 @perror(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0))
%8 = load i32, i32* @EXIT_FAILURE
%9 = tail call i32 @exit(i32 %8)
unreachable
10: ; preds = %2
ret i8* %4
}
/* Type definitions */
typedef int /*<<< orphan*/ clock_t;

/* Variables and functions */
int /*<<< orphan*/ clock();
clock_t start_watch() { return clock(); }


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

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

LLVM IR (-O0):
define i32 @start_watch() {
%1 = call i32 (...) @clock()
ret i32 %1
}

LLVM IR (-O2):
define i32 @start_watch() {
%1 = tail call i32 (...) @clock()
ret i32 %1
}
unsigned int multiply(unsigned a, unsigned b) {
  int sum = 0;
  for (int i = 0; i < a; ++i) {
    sum += b;
  }
  return sum;
}


x86 assembly (clang, -O0):
<multiply>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0x4(%rbp),%eax
jae    113b <multiply+0x3b>
mov    -0x8(%rbp),%eax
add    -0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1118 <multiply+0x18>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @multiply(i32 %0, i32 %1) {
%3 = mul i32 %1, %0
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
void *calloc(size_t, size_t);
void *assert_calloc(size_t nmemb, size_t size) {
  void *result = calloc(nmemb, size);
  assert(result != NULL || nmemb == 0 || size == 0);
  return result;
}


x86 assembly (clang, -O0):
<assert_calloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <calloc@plt>
mov    %rax,-0x18(%rbp)
mov    $0x1,%al
cmpq   $0x0,-0x18(%rbp)
mov    %al,-0x19(%rbp)
jne    116c <assert_calloc+0x4c>
mov    $0x1,%al
cmpq   $0x0,-0x8(%rbp)
mov    %al,-0x19(%rbp)
je     116c <assert_calloc+0x4c>
cmpq   $0x0,-0x10(%rbp)
sete   %al
mov    %al,-0x19(%rbp)
mov    -0x19(%rbp),%al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<assert_calloc>:
push   %r15
push   %r14
push   %rbx
mov    %rsi,%r14
mov    %rdi,%rbx
call   1030 <calloc@plt>
mov    %rax,%r15
test   %rax,%rax
setne  %al
test   %rbx,%rbx
sete   %cl
test   %r14,%r14
sete   %dl
or     %cl,%dl
or     %al,%dl
movzbl %dl,%edi
call   1040 <assert@plt>
mov    %r15,%rax
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
define noalias i8* @assert_calloc(i64 %0, i64 %1) {
%3 = tail call i8* @calloc(i64 %0, i64 %1)
%4 = icmp ne i8* %3, null
%5 = icmp eq i64 %0, 0
%6 = or i1 %5, %4
%7 = icmp eq i64 %1, 0
%8 = or i1 %7, %6
%9 = zext i1 %8 to i32
%10 = tail call i32 @assert(i32 %9)
ret i8* %3
}
/* Variables and functions */
int /*<<< orphan*/ __VERIFIER_assert(int);
int main(void) {
  int a = 3;
  int b = 2;
  __VERIFIER_assert(a <= b);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x3,-0x8(%rbp)
movl   $0x2,-0xc(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
setle  %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <__VERIFIER_assert@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
store i32 3, i32* %2
store i32 2, i32* %3
%4 = load i32, i32* %2
%5 = load i32, i32* %3
%6 = icmp sle i32 %4, %5
%7 = zext i1 %6 to i32
%8 = call i32 @__VERIFIER_assert(i32 %7)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @__VERIFIER_assert(i32 0)
ret i32 0
}
void foo742() {}


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

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

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

LLVM IR (-O2):
define void @foo742() {
ret void
}
void gtk_resize_mode_get_type() {}


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

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

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

LLVM IR (-O2):
define void @gtk_resize_mode_get_type() {
ret void
}
double f(float a) { return a; }


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

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

LLVM IR (-O0):
define double @f(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = fpext float %3 to double
ret double %4
}

LLVM IR (-O2):
define double @f(float %0) {
%2 = fpext float %0 to double
ret double %2
}
void VMR3LoadFromFile(void) {}


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

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

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

LLVM IR (-O2):
define void @VMR3LoadFromFile() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ do_uninit_read(int *);
void uninit_test5(int *val_p) { do_uninit_read(val_p); }


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

x86 assembly (clang, -O2):
<uninit_test5>:
jmp    1030 <do_uninit_read@plt>

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

LLVM IR (-O2):
define void @uninit_test5(i32* %0) {
%2 = tail call i32 @do_uninit_read(i32* %0)
ret void
}
/* Type definitions */
typedef int uint8_t;

/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main() {
  uint8_t age = 9;
  uint8_t height = 184;
  printf("The Age is %u\n", age);
  printf("The height is %u\n", height);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x9,-0x8(%rbp)
movl   $0xb8,-0xc(%rbp)
mov    -0x8(%rbp),%esi
lea    0xec9(%rip),%rdi
call   1030 <printf@plt>
mov    -0xc(%rbp),%esi
lea    0xec9(%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
mov    $0x9,%esi
call   1030 <printf@plt>
lea    0xee6(%rip),%rdi
mov    $0xb8,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [15 x i8] c"The Age is %u\0A\00"
@.str.1 = [18 x i8] c"The height is %u\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
store i32 9, i32* %2
store i32 184, i32* %3
%4 = load i32, i32* %2
%5 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32 %4)
%6 = load i32, i32* %3
%7 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.1, i64 0, i64 0), i32 %6)
ret i32 0
}

LLVM IR (-O2):
@.str = [15 x i8] c"The Age is %u\0A\00"
@.str.1 = [18 x i8] c"The height is %u\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32 9)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.1, i64 0, i64 0), i32 184)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char const *);
int /*<<< orphan*/ stderr;
int usage(const char *argv0) {
  fprintf(stderr,
          "Usage: %s [options] filebase\n"
          "  -d <device>: open this device\n"
          "  -n <number of pages to scan>\n"
          "  -b <block size>\n"
          "  -w <width in inches>\n"
          "  -h <height in inches>\n"
          "  --duplex: scan front and back\n",
          argv0);
  return 1;
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ebd(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xed0(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<usage>:
push   %rax
mov    %rdi,%rdx
mov    0x2ec5(%rip),%rax
mov    (%rax),%edi
lea    0xedc(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%eax
pop    %rcx
ret

LLVM IR (-O0):
@stderr = global i32 0
@.str = [190 x i8] c"Usage: %s [options] filebase\0A -d <device>: open this device\0A -n <number of pages to scan>\0A -b <block size>\0A -w <width in inches>\0A -h <height in inches>\0A --duplex: scan front and back\0A\00"
define i32 @usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = load i8*, i8** %2
%5 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([190 x i8], [190 x i8]* @.str, i64 0, i64 0), i8* %4)
ret i32 1
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [190 x i8] c"Usage: %s [options] filebase\0A -d <device>: open this device\0A -n <number of pages to scan>\0A -b <block size>\0A -w <width in inches>\0A -h <height in inches>\0A --duplex: scan front and back\0A\00"
define i32 @usage(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([190 x i8], [190 x i8]* @.str, i64 0, i64 0), i8* %0)
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ thr_print(char *);
void *thr_fn(void *arg) {
  thr_print("child");
  return ((void *)0);
}


x86 assembly (clang, -O0):
<thr_fn>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xedd(%rip),%rdi
call   1030 <thr_print@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [6 x i8] c"child\00"
define i8* @thr_fn(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 @thr_print(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
ret i8* null
}

LLVM IR (-O2):
@.str = [6 x i8] c"child\00"
define noalias i8* @thr_fn(i8* nocapture readnone %0) {
%2 = tail call i32 @thr_print(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
ret i8* null
}
/* Variables and functions */
int /*<<< orphan*/ create();
int /*<<< orphan*/ display();
void main() {
  create();
  display();
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1040 <create@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <display@plt>

LLVM IR (-O0):
define void @main() {
%1 = call i32 (...) @create()
%2 = call i32 (...) @display()
ret void
}

LLVM IR (-O2):
define void @main() {
%1 = tail call i32 (...) @create()
%2 = tail call i32 (...) @display()
ret void
}
void X509_REQ_set_version(void) {}


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

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

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

LLVM IR (-O2):
define void @X509_REQ_set_version() {
ret void
}
/* Variables and functions */
int Update(char *, char *, char *);
int HandleSubmitHMI(void) {
  return Update("HMI", "/local/root/hmi", "chmod 754 /local/root/hmi");
}


x86 assembly (clang, -O0):
<HandleSubmitHMI>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
lea    0xeec(%rip),%rsi
lea    0xedb(%rip),%rdx
call   1030 <Update@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<HandleSubmitHMI>:
lea    0xee9(%rip),%rdi
lea    0xef0(%rip),%rsi
lea    0xedf(%rip),%rdx
jmp    1030 <Update@plt>

LLVM IR (-O0):
@.str = [4 x i8] c"HMI\00"
@.str.1 = [16 x i8] c"/local/root/hmi\00"
@.str.2 = [26 x i8] c"chmod 754 /local/root/hmi\00"
define i32 @HandleSubmitHMI() {
%1 = call i32 @Update(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.2, i64 0, i64 0))
ret i32 %1
}

LLVM IR (-O2):
@.str = [4 x i8] c"HMI\00"
@.str.1 = [16 x i8] c"/local/root/hmi\00"
@.str.2 = [26 x i8] c"chmod 754 /local/root/hmi\00"
define i32 @HandleSubmitHMI() {
%1 = tail call i32 @Update(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.2, i64 0, i64 0))
ret i32 %1
}
/* Variables and functions */
int /*<<< orphan*/ print_error(char *, unsigned long long const,
                               unsigned long long const);
int values_equal_display_error(const unsigned long long left,
                               const unsigned long long right) {
  const int equal = left == right;
  if (!equal) {
    print_error("                "
                "%llx"
                " != "
                "%llx"
                "\n",
                left, right);
  }
  return equal;
}


x86 assembly (clang, -O0):
<values_equal_display_error>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
cmp    -0x10(%rbp),%rax
sete   %al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
jne    1151 <values_equal_display_error+0x41>
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
lea    0xeb4(%rip),%rdi
call   1030 <print_error@plt>
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<values_equal_display_error>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
cmp    %rsi,%rdi
je     1131 <values_equal_display_error+0x21>
lea    0xeda(%rip),%rdi
mov    %rbx,%rsi
mov    %r14,%rdx
call   1030 <print_error@plt>
xor    %eax,%eax
cmp    %r14,%rbx
sete   %al
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [30 x i8] c" %llx != %llx\0A\00"
define i32 @values_equal_display_error(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
%5 = alloca i32
store i64 %0, i64* %3
store i64 %1, i64* %4
%6 = load i64, i64* %3
%7 = load i64, i64* %4
%8 = icmp eq i64 %6, %7
%9 = zext i1 %8 to i32
store i32 %9, i32* %5
%10 = load i32, i32* %5
%11 = icmp ne i32 %10, 0
br i1 %11, label %16, label %12
12: ; preds = %2
%13 = load i64, i64* %3
%14 = load i64, i64* %4
%15 = call i32 @print_error(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0), i64 %13, i64 %14)
br label %16
16: ; preds = %12, %2
%17 = load i32, i32* %5
ret i32 %17
}

LLVM IR (-O2):
@.str = [30 x i8] c" %llx != %llx\0A\00"
define i32 @values_equal_display_error(i64 %0, i64 %1) {
%3 = icmp eq i64 %0, %1
br i1 %3, label %6, label %4
4: ; preds = %2
%5 = tail call i32 @print_error(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0), i64 %0, i64 %1)
br label %6
6: ; preds = %4, %2
%7 = zext i1 %3 to i32
ret i32 %7
}
void usage(char *exec) {
  int length = 0;
  length = (int)strlen(exec) + 7;
  printf("Usage: %s [-c,--cheatsheet <answers>]\n", exec);
  printf("%*s [-h,--help]\n", length, " ");
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
add    $0x7,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xeb3(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0xc(%rbp),%esi
lea    0xec9(%rip),%rdi
lea    0xed3(%rip),%rdx
mov    $0x0,%al
call   1040 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<usage>:
push   %rbp
push   %rbx
push   %rax
mov    %rdi,%rbx
call   1030 <strlen@plt>
lea    0x7(%rax),%ebp
lea    0xecb(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xee1(%rip),%rdi
lea    0xeeb(%rip),%rdx
mov    %ebp,%esi
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1040 <printf@plt>

LLVM IR (-O0):
@.str = [39 x i8] c"Usage: %s [-c,--cheatsheet <answers>]\0A\00"
@.str.1 = [17 x i8] c"%*s [-h,--help]\0A\00"
@.str.2 = [2 x i8] c" \00"
define void @usage(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
store i32 0, i32* %3
%4 = load i8*, i8** %2
%5 = call i64 @strlen(i8* %4)
%6 = trunc i64 %5 to i32
%7 = add nsw i32 %6, 7
store i32 %7, i32* %3
%8 = load i8*, i8** %2
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str, i64 0, i64 0), i8* %8)
%10 = load i32, i32* %3
%11 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0), i32 %10, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [39 x i8] c"Usage: %s [-c,--cheatsheet <answers>]\0A\00"
@.str.1 = [17 x i8] c"%*s [-h,--help]\0A\00"
@.str.2 = [2 x i8] c" \00"
define void @usage(i8* %0) {
%2 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%3 = trunc i64 %2 to i32
%4 = add nsw i32 %3, 7
%5 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([39 x i8], [39 x i8]* @.str, i64 0, i64 0), i8* %0)
%6 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0), i32 %4, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
ret void
}
/* Variables and functions */
char *malloc(int);
float rpi_soc_temp();
int /*<<< orphan*/ snprintf(char *, int, char *, float);
char *rpi_soc_temp_str(void *s) {
  float t = rpi_soc_temp();
  char *buff;
  s = s;
  buff = malloc(128);
  if (buff)
    snprintf(buff, 127, "%0.2f'C", t);
  return buff;
}


x86 assembly (clang, -O0):
<rpi_soc_temp_str>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x0,%al
call   1030 <rpi_soc_temp@plt>
movss  %xmm0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    $0x80,%edi
call   1050 <malloc@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
je     1183 <rpi_soc_temp_str+0x53>
mov    -0x18(%rbp),%rdi
movss  -0xc(%rbp),%xmm0
mov    $0x7f,%esi
lea    0xe82(%rip),%rdx
call   1040 <snprintf@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rpi_soc_temp_str>:
push   %rbx
sub    $0x10,%rsp
xor    %eax,%eax
call   1030 <rpi_soc_temp@plt>
movss  %xmm0,0xc(%rsp)
mov    $0x80,%edi
call   1050 <malloc@plt>
mov    %rax,%rbx
test   %rax,%rax
je     116e <rpi_soc_temp_str+0x3e>
lea    0xea5(%rip),%rdx
mov    %rbx,%rdi
mov    $0x7f,%esi
movss  0xc(%rsp),%xmm0
call   1040 <snprintf@plt>
mov    %rbx,%rax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [8 x i8] c"%0.2f'C\00"
define i8* @rpi_soc_temp_str(i8* %0) {
%2 = alloca i8*
%3 = alloca float
%4 = alloca i8*
store i8* %0, i8** %2
%5 = call float (...) @rpi_soc_temp()
store float %5, float* %3
%6 = load i8*, i8** %2
store i8* %6, i8** %2
%7 = call i8* @malloc(i32 128)
store i8* %7, i8** %4
%8 = load i8*, i8** %4
%9 = icmp ne i8* %8, null
br i1 %9, label %10, label %14
10: ; preds = %1
%11 = load i8*, i8** %4
%12 = load float, float* %3
%13 = call i32 @snprintf(i8* %11, i32 127, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), float %12)
br label %14
14: ; preds = %10, %1
%15 = load i8*, i8** %4
ret i8* %15
}

LLVM IR (-O2):
@.str = [8 x i8] c"%0.2f'C\00"
define i8* @rpi_soc_temp_str(i8* nocapture readnone %0) {
%2 = tail call float (...) @rpi_soc_temp()
%3 = tail call dereferenceable_or_null(128) i8* @malloc(i32 128)
%4 = icmp eq i8* %3, null
br i1 %4, label %7, label %5
5: ; preds = %1
%6 = tail call i32 @snprintf(i8* %3, i32 127, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), float %2)
br label %7
7: ; preds = %5, %1
ret i8* %3
}
/* Variables and functions */
int /*<<< orphan*/ reverse_even_array();
int /*<<< orphan*/ reverse_odd_array();
int main(int argc, char *argv[]) {
  reverse_even_array();
  reverse_odd_array();
}


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

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

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

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @reverse_even_array()
%4 = tail call i32 (...) @reverse_odd_array()
ret i32 0
}
int _increasing_double(const void *a, const void *b) {
  if ((*(double *)b) > (*(double *)a))
    return (-1);
  else if ((*(double *)b) < (*(double *)a))
    return (1);
  return (0);
}


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

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

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

LLVM IR (-O2):
define i32 @_increasing_double(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %1 to double*
%4 = load double, double* %3
%5 = bitcast i8* %0 to double*
%6 = load double, double* %5
%7 = fcmp ogt double %4, %6
%8 = fcmp olt double %4, %6
%9 = zext i1 %8 to i32
%10 = select i1 %7, i32 -1, i32 %9
ret i32 %10
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef scalar_t__ uint16_t;
struct dictionary {
  int dummy;
};

/* Variables and functions */
scalar_t__ dict_find(int /*<<< orphan*/ const *, size_t,
                     struct dictionary const *);
uint16_t lookup_replacement(uint16_t original, const uint8_t *replacement,
                            size_t replen,
                            const struct dictionary *dictionary) {
  uint16_t d;
  d = dict_find(replacement, replen, dictionary);
  if (d == 0) {
    return original;
  }
  return d;
}


x86 assembly (clang, -O0):
<lookup_replacement>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    %rcx,-0x28(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x20(%rbp),%rsi
mov    -0x28(%rbp),%rdx
call   1030 <dict_find@plt>
mov    %rax,-0x30(%rbp)
cmpq   $0x0,-0x30(%rbp)
jne    1155 <lookup_replacement+0x45>
mov    -0x10(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    115d <lookup_replacement+0x4d>
mov    -0x30(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<lookup_replacement>:
push   %rbx
mov    %rdi,%rbx
mov    %rsi,%rdi
mov    %rdx,%rsi
mov    %rcx,%rdx
call   1030 <dict_find@plt>
test   %rax,%rax
cmove  %rbx,%rax
pop    %rbx
ret

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

LLVM IR (-O2):
%struct.dictionary = type { i32 }
define i64 @lookup_replacement(i64 %0, i32* %1, i64 %2, %struct.dictionary* %3) {
%5 = tail call i64 @dict_find(i32* %1, i64 %2, %struct.dictionary* %3)
%6 = icmp eq i64 %5, 0
%7 = select i1 %6, i64 %0, i64 %5
ret i64 %7
}
/* Variables and functions */
int /*<<< orphan*/ sprintf(char *, char *, int);
int /*<<< orphan*/ usleep(int);
int /*<<< orphan*/ write(int, char *, int);
void setAttenuator(int fd, int on) {
  char cmd[8];
  if (on < 0 || on > 1)
    return;
  sprintf(cmd, "RA0%d;", on);
  write(fd, cmd, 5);
  usleep(100e3);
}


x86 assembly (clang, -O0):
<setAttenuator>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jl     1152 <setAttenuator+0x22>
cmpl   $0x1,-0x8(%rbp)
jle    1157 <setAttenuator+0x27>
jmp    1185 <setAttenuator+0x55>
lea    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%edx
lea    0xe9b(%rip),%rsi
call   1040 <sprintf@plt>
mov    -0x4(%rbp),%edi
lea    -0x10(%rbp),%rsi
mov    $0x5,%edx
call   1030 <write@plt>
mov    $0x186a0,%edi
call   1050 <usleep@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<setAttenuator>:
cmp    $0x1,%esi
jbe    1136 <setAttenuator+0x6>
ret
push   %r14
push   %rbx
push   %rax
mov    %esi,%edx
mov    %edi,%ebx
lea    0xebb(%rip),%rsi
mov    %rsp,%r14
mov    %r14,%rdi
call   1040 <sprintf@plt>
mov    %ebx,%edi
mov    %r14,%rsi
mov    $0x5,%edx
call   1030 <write@plt>
mov    $0x186a0,%edi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1050 <usleep@plt>

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

LLVM IR (-O2):
@.str = [7 x i8] c"RA0%d;\00"
define void @setAttenuator(i32 %0, i32 %1) {
%3 = alloca [8 x i8]
%4 = getelementptr inbounds [8 x i8], [8 x i8]* %3, i64 0, i64 0
%5 = icmp ugt i32 %1, 1
br i1 %5, label %10, label %6
6: ; preds = %2
%7 = call i32 @sprintf(i8* %4, i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 %1)
%8 = call i32 @write(i32 %0, i8* %4, i32 5)
%9 = tail call i32 @usleep(i32 100000)
br label %10
10: ; preds = %2, %6
ret void
}
void XHeightOfScreen() {}


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

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

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

LLVM IR (-O2):
define void @XHeightOfScreen() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ g();
f() {
  int f2 = 0;
  if (f2 == 0)
    ;
  g();
}


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jne    112e <f+0x1e>
jmp    112e <f+0x1e>
mov    $0x0,%al
call   1030 <g@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @f() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %2
%3 = load i32, i32* %2
%4 = icmp eq i32 %3, 0
br i1 %4, label %5, label %6
5: ; preds = %0
br label %6
6: ; preds = %5, %0
%7 = call i32 (...) @g()
%8 = load i32, i32* %1
ret i32 %8
}

LLVM IR (-O2):
define i32 @f() {
%1 = tail call i32 (...) @g()
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ x264_slicetype_path(char **, int, int);
void x264_slicetype_analyse(int n, int length) {
  char best_paths[250][250];
  x264_slicetype_path(best_paths, n, length);
}


x86 assembly (clang, -O0):
<x264_slicetype_analyse>:
push   %rbp
mov    %rsp,%rbp
sub    $0xf430,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
lea    -0xf430(%rbp),%rdi
mov    -0x4(%rbp),%esi
mov    -0x8(%rbp),%edx
call   1030 <x264_slicetype_path@plt>
add    $0xf430,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<x264_slicetype_analyse>:
sub    $0xf428,%rsp
mov    %esi,%edx
mov    %edi,%esi
mov    %rsp,%rdi
call   1030 <x264_slicetype_path@plt>
add    $0xf428,%rsp
ret

LLVM IR (-O0):
define void @x264_slicetype_analyse(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca [250 x [250 x i8]]
store i32 %0, i32* %3
store i32 %1, i32* %4
%6 = getelementptr inbounds [250 x [250 x i8]], [250 x [250 x i8]]* %5, i64 0, i64 0
%7 = bitcast [250 x i8]* %6 to i8**
%8 = load i32, i32* %3
%9 = load i32, i32* %4
%10 = call i32 @x264_slicetype_path(i8** %7, i32 %8, i32 %9)
ret void
}

LLVM IR (-O2):
define void @x264_slicetype_analyse(i32 %0, i32 %1) {
%3 = alloca [250 x [250 x i8]]
%4 = getelementptr inbounds [250 x [250 x i8]], [250 x [250 x i8]]* %3, i64 0, i64 0, i64 0
%5 = bitcast [250 x [250 x i8]]* %3 to i8**
%6 = call i32 @x264_slicetype_path(i8** %5, i32 %0, i32 %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ print_ids(char *);
void *func(void *arg) {
  print_ids("new  thread:");
  return ((void *)0);
}


x86 assembly (clang, -O0):
<func>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xedd(%rip),%rdi
call   1030 <print_ids@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [13 x i8] c"new thread:\00"
define i8* @func(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 @print_ids(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
ret i8* null
}

LLVM IR (-O2):
@.str = [13 x i8] c"new thread:\00"
define noalias i8* @func(i8* nocapture readnone %0) {
%2 = tail call i32 @print_ids(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
ret i8* null
}
extern short PassShort(short *sht) { return *sht; }


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

x86 assembly (clang, -O2):
<PassShort>:
movzwl (%rdi),%eax
ret

LLVM IR (-O0):
define signext i16 @PassShort(i16* %0) {
%2 = alloca i16*
store i16* %0, i16** %2
%3 = load i16*, i16** %2
%4 = load i16, i16* %3
ret i16 %4
}

LLVM IR (-O2):
define signext i16 @PassShort(i16* nocapture %0) {
%2 = load i16, i16* %0
ret i16 %2
}
int is_pathdelim(const int c) { return c == '\\' || c == ':'; }


x86 assembly (clang, -O0):
<is_pathdelim>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    $0x1,%al
cmpl   $0x5c,-0x4(%rbp)
mov    %al,-0x5(%rbp)
je     1120 <is_pathdelim+0x20>
cmpl   $0x3a,-0x4(%rbp)
sete   %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_pathdelim>:
cmp    $0x5c,%edi
sete   %al
cmp    $0x3a,%edi
sete   %cl
or     %al,%cl
movzbl %cl,%eax
ret

LLVM IR (-O0):
define i32 @is_pathdelim(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp eq i32 %3, 92
br i1 %4, label %8, label %5
5: ; preds = %1
%6 = load i32, i32* %2
%7 = icmp eq i32 %6, 58
br label %8
8: ; preds = %5, %1
%9 = phi i1 [ true, %1 ], [ %7, %5 ]
%10 = zext i1 %9 to i32
ret i32 %10
}

LLVM IR (-O2):
define i32 @is_pathdelim(i32 %0) {
%2 = icmp eq i32 %0, 92
%3 = icmp eq i32 %0, 58
%4 = or i1 %2, %3
%5 = zext i1 %4 to i32
ret i32 %5
}
unsigned short unsignedshort_ignoring_signedint(unsigned short x,
                                                signed int y) {
  return x;
}


x86 assembly (clang, -O0):
<unsignedshort_ignoring_signedint>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
mov    %esi,-0x8(%rbp)
movzwl -0x2(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define zeroext i16 @unsignedshort_ignoring_signedint(i16 returned zeroext %0, i32 %1) {
ret i16 %0
}
void spca506_shutdown(struct usb_spca50x *spca50x) {}


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

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

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

LLVM IR (-O2):
%struct.usb_spca50x = type opaque
define void @spca506_shutdown(%struct.usb_spca50x* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void print(int c, int *output) {
  printf("c =%d\n", c);
  return;
}


x86 assembly (clang, -O0):
<print>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%esi
lea    0xed7(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print>:
mov    %edi,%esi
lea    0xee7(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [7 x i8] c"c =%d\0A\00"
define void @print(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 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 %5)
ret void
}

LLVM IR (-O2):
@.str = [7 x i8] c"c =%d\0A\00"
define void @print(i32 %0, i32* nocapture readnone %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 %0)
ret void
}
void U210ToARGB() {}


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

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

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

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