xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
int usage() {
  printf("Usage: demucc [-tc] FILENAME.pmd\n");
  printf("    -c COLUMNS\twrap every COLUMNs (default: %d)\n", 78);
  printf("    -t\t\tuse %%ticks instead of beats\n");
  return -1;
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xef9(%rip),%rdi
mov    $0x4e,%esi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf17(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    $0xffffffff,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<usage>:
push   %rax
lea    0xf2f(%rip),%rdi
call   1030 <puts@plt>
lea    0xecc(%rip),%rdi
mov    $0x4e,%esi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xeea(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0xffffffff,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [34 x i8] c"Usage: demucc [-tc] FILENAME.pmd\0A\00"
@.str.1 = [49 x i8] c" -c COLUMNS\09wrap every COLUMNs (default: %d)\0A\00"
@.str.2 = [38 x i8] c" -t\09\09use %%ticks instead of beats\0A\00"
define i32 @usage() {
%1 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0))
%2 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str.1, i64 0, i64 0), i32 78)
%3 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.2, i64 0, i64 0))
ret i32 -1
}

LLVM IR (-O2):
@.str.1 = [49 x i8] c" -c COLUMNS\09wrap every COLUMNs (default: %d)\0A\00"
@.str.2 = [38 x i8] c" -t\09\09use %%ticks instead of beats\0A\00"
@str = [33 x i8] c"Usage: demucc [-tc] FILENAME.pmd\00"
define i32 @usage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([33 x i8], [33 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([49 x i8], [49 x i8]* @.str.1, i64 0, i64 0), i32 78)
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([38 x i8], [38 x i8]* @.str.2, i64 0, i64 0))
ret i32 -1
}
void RTMemPoolDestroy(void) {}


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

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

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

LLVM IR (-O2):
define void @RTMemPoolDestroy() {
ret void
}
/* Variables and functions */
int check(const char *str) { return str != NULL; }


x86 assembly (clang, -O0):
<check>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
setne  %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<check>:
xor    %eax,%eax
test   %rdi,%rdi
setne  %al
ret

LLVM IR (-O0):
define i32 @check(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = icmp ne i8* %3, null
%5 = zext i1 %4 to i32
ret i32 %5
}

LLVM IR (-O2):
define i32 @check(i8* readnone %0) {
%2 = icmp ne i8* %0, null
%3 = zext i1 %2 to i32
ret i32 %3
}
unsigned int toOct(char ch) {
  return ((unsigned int)(ch)) - ((unsigned int)('0'));
  __builtin_unreachable();
}


x86 assembly (clang, -O0):
<toOct>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
sub    $0x30,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<toOct>:
lea    -0x30(%rdi),%eax
ret

LLVM IR (-O0):
define i32 @toOct(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
%5 = sub i32 %4, 48
ret i32 %5
}

LLVM IR (-O2):
define i32 @toOct(i8 signext %0) {
%2 = sext i8 %0 to i32
%3 = add nsw i32 %2, -48
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void printHi() { printf("Hi!\n"); }


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

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

LLVM IR (-O0):
@.str = [5 x i8] c"Hi!\0A\00"
define void @printHi() {
%1 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [4 x i8] c"Hi!\00"
define void @printHi() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @str, i64 0, i64 0))
ret void
}
void set_fs(unsigned long val) {
  __asm__ __volatile__("mov %w0,%%fs" : : "r"(val));
}


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

x86 assembly (clang, -O2):
<set_fs>:
mov    %edi,%fs
ret

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

LLVM IR (-O2):
define void @set_fs(i64 %0) {
tail call void asm sideeffect "mov ${0:w},%fs", "r,~{dirflag},~{fpsr},~{flags}"(i64 %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(int *);
int *malloc(int);
int /*<<< orphan*/ puts(char *);
scalar_t__ test_equal(void *, void *);
int equals_after_free() {
  volatile int *x = malloc(sizeof(int));
  *x = 12;
  free((int *)x);
  if (test_equal((void *)x, (void *)x)) {
    puts("EQ!");
  }
  return 1;
}


x86 assembly (clang, -O0):
<equals_after_free>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x4,%edi
call   1060 <malloc@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movl   $0xc,(%rax)
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
mov    -0x8(%rbp),%rdi
mov    -0x8(%rbp),%rsi
call   1050 <test_equal@plt>
cmp    $0x0,%rax
je     118c <equals_after_free+0x4c>
lea    0xe79(%rip),%rdi
call   1040 <puts@plt>
mov    $0x1,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<equals_after_free>:
push   %rbx
mov    $0x4,%edi
call   1060 <malloc@plt>
mov    %rax,%rbx
movl   $0xc,(%rax)
mov    %rax,%rdi
call   1030 <free@plt>
mov    %rbx,%rdi
mov    %rbx,%rsi
call   1050 <test_equal@plt>
test   %rax,%rax
je     1178 <equals_after_free+0x38>
lea    0xe8d(%rip),%rdi
call   1040 <puts@plt>
mov    $0x1,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [4 x i8] c"EQ!\00"
define i32 @equals_after_free() {
%1 = alloca i32*
%2 = call i32* @malloc(i32 4)
store i32* %2, i32** %1
%3 = load i32*, i32** %1
store volatile i32 12, i32* %3
%4 = load i32*, i32** %1
%5 = call i32 @free(i32* %4)
%6 = load i32*, i32** %1
%7 = bitcast i32* %6 to i8*
%8 = load i32*, i32** %1
%9 = bitcast i32* %8 to i8*
%10 = call i64 @test_equal(i8* %7, i8* %9)
%11 = icmp ne i64 %10, 0
br i1 %11, label %12, label %14
12: ; preds = %0
%13 = call i32 @puts(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
br label %14
14: ; preds = %12, %0
ret i32 1
}

LLVM IR (-O2):
@.str = [4 x i8] c"EQ!\00"
define i32 @equals_after_free() {
%1 = tail call i32* @malloc(i32 4)
store volatile i32 12, i32* %1
%2 = tail call i32 @free(i32* %1)
%3 = bitcast i32* %1 to i8*
%4 = tail call i64 @test_equal(i8* %3, i8* %3)
%5 = icmp eq i64 %4, 0
br i1 %5, label %8, label %6
6: ; preds = %0
%7 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
br label %8
8: ; preds = %6, %0
ret i32 1
}
/* Type definitions */
struct buffer {
  int dummy;
};

/* Variables and functions */
int add_int_data(struct buffer *, int, unsigned int);
int add_physchan_avp(struct buffer *buf, unsigned int physchan) {
  return add_int_data(buf, 25, physchan);
}


x86 assembly (clang, -O0):
<add_physchan_avp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%edx
mov    $0x19,%esi
call   1030 <add_int_data@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<add_physchan_avp>:
mov    %esi,%edx
mov    $0x19,%esi
jmp    1030 <add_int_data@plt>

LLVM IR (-O0):
%struct.buffer = type { i32 }
define i32 @add_physchan_avp(%struct.buffer* %0, i32 %1) {
%3 = alloca %struct.buffer*
%4 = alloca i32
store %struct.buffer* %0, %struct.buffer** %3
store i32 %1, i32* %4
%5 = load %struct.buffer*, %struct.buffer** %3
%6 = load i32, i32* %4
%7 = call i32 @add_int_data(%struct.buffer* %5, i32 25, i32 %6)
ret i32 %7
}

LLVM IR (-O2):
%struct.buffer = type { i32 }
define i32 @add_physchan_avp(%struct.buffer* %0, i32 %1) {
%3 = tail call i32 @add_int_data(%struct.buffer* %0, i32 25, i32 %1)
ret i32 %3
}
void elfoutmsbu32(unsigned char *bp, unsigned long v) {
  ((bp)[0] = (v >> 24), (bp)[1] = (v >> 16), (bp)[2] = (v >> 8), (bp)[3] = v);
}


x86 assembly (clang, -O0):
<elfoutmsbu32>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
shr    $0x18,%rax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
mov    -0x10(%rbp),%rax
shr    $0x10,%rax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,0x1(%rax)
mov    -0x10(%rbp),%rax
shr    $0x8,%rax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,0x2(%rax)
mov    -0x10(%rbp),%rax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,0x3(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<elfoutmsbu32>:
bswap  %esi
mov    %esi,(%rdi)
ret

LLVM IR (-O0):
define void @elfoutmsbu32(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
store i8* %0, i8** %3
store i64 %1, i64* %4
%5 = load i64, i64* %4
%6 = lshr i64 %5, 24
%7 = trunc i64 %6 to i8
%8 = load i8*, i8** %3
%9 = getelementptr inbounds i8, i8* %8, i64 0
store i8 %7, i8* %9
%10 = load i64, i64* %4
%11 = lshr i64 %10, 16
%12 = trunc i64 %11 to i8
%13 = load i8*, i8** %3
%14 = getelementptr inbounds i8, i8* %13, i64 1
store i8 %12, i8* %14
%15 = load i64, i64* %4
%16 = lshr i64 %15, 8
%17 = trunc i64 %16 to i8
%18 = load i8*, i8** %3
%19 = getelementptr inbounds i8, i8* %18, i64 2
store i8 %17, i8* %19
%20 = load i64, i64* %4
%21 = trunc i64 %20 to i8
%22 = load i8*, i8** %3
%23 = getelementptr inbounds i8, i8* %22, i64 3
store i8 %21, i8* %23
ret void
}

LLVM IR (-O2):
define void @elfoutmsbu32(i8* nocapture writeonly %0, i64 %1) {
%3 = lshr i64 %1, 24
%4 = trunc i64 %3 to i8
store i8 %4, i8* %0
%5 = lshr i64 %1, 16
%6 = trunc i64 %5 to i8
%7 = getelementptr inbounds i8, i8* %0, i64 1
store i8 %6, i8* %7
%8 = lshr i64 %1, 8
%9 = trunc i64 %8 to i8
%10 = getelementptr inbounds i8, i8* %0, i64 2
store i8 %9, i8* %10
%11 = trunc i64 %1 to i8
%12 = getelementptr inbounds i8, i8* %0, i64 3
store i8 %11, i8* %12
ret void
}
/* Variables and functions */
int tb_height();
int drawing_height() { return tb_height() - 1; }


x86 assembly (clang, -O0):
<drawing_height>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <tb_height@plt>
sub    $0x1,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<drawing_height>:
push   %rax
xor    %eax,%eax
call   1030 <tb_height@plt>
add    $0xffffffff,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @drawing_height() {
%1 = call i32 (...) @tb_height()
%2 = sub nsw i32 %1, 1
ret i32 %2
}

LLVM IR (-O2):
define i32 @drawing_height() {
%1 = tail call i32 (...) @tb_height()
%2 = add nsw i32 %1, -1
ret i32 %2
}
/* Variables and functions */
char *strdup(char *);
char *nebtype2str(__attribute__((__unused__)) int i) {
  return strdup("UNKNOWN");
}


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

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

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

LLVM IR (-O2):
@.str = [8 x i8] c"UNKNOWN\00"
define noalias i8* @nebtype2str(i32 %0) {
%2 = tail call dereferenceable_or_null(8) i8* @strdup(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
ret i8* %2
}
int jeOperator(char c) {
  return (c == '+' || c == '-' || c == '*' || c == '/');
}


x86 assembly (clang, -O0):
<jeOperator>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0x2b,%ecx
mov    %al,-0x2(%rbp)
je     114d <jeOperator+0x4d>
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0x2d,%ecx
mov    %al,-0x2(%rbp)
je     114d <jeOperator+0x4d>
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0x2a,%ecx
mov    %al,-0x2(%rbp)
je     114d <jeOperator+0x4d>
movsbl -0x1(%rbp),%eax
cmp    $0x2f,%eax
sete   %al
mov    %al,-0x2(%rbp)
mov    -0x2(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<jeOperator>:
cmp    $0x2d,%dil
ja     1120 <jeOperator+0x20>
mov    $0x1,%eax
movzbl %dil,%ecx
movabs $0x2c0000000000,%rdx
bt     %rcx,%rdx
jae    1120 <jeOperator+0x20>
ret
xor    %eax,%eax
cmp    $0x2f,%dil
sete   %al
ret

LLVM IR (-O0):
define i32 @jeOperator(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
%5 = icmp eq i32 %4, 43
br i1 %5, label %18, label %6
6: ; preds = %1
%7 = load i8, i8* %2
%8 = sext i8 %7 to i32
%9 = icmp eq i32 %8, 45
br i1 %9, label %18, label %10
10: ; preds = %6
%11 = load i8, i8* %2
%12 = sext i8 %11 to i32
%13 = icmp eq i32 %12, 42
br i1 %13, label %18, label %14
14: ; preds = %10
%15 = load i8, i8* %2
%16 = sext i8 %15 to i32
%17 = icmp eq i32 %16, 47
br label %18
18: ; preds = %14, %10, %6, %1
%19 = phi i1 [ true, %10 ], [ true, %6 ], [ true, %1 ], [ %17, %14 ]
%20 = zext i1 %19 to i32
ret i32 %20
}

LLVM IR (-O2):
define i32 @jeOperator(i8 signext %0) {
switch i8 %0, label %2 [
i8 45, label %5
i8 43, label %5
i8 42, label %5
]
2: ; preds = %1
%3 = icmp eq i8 %0, 47
%4 = zext i1 %3 to i32
br label %5
5: ; preds = %1, %1, %1, %2
%6 = phi i32 [ 1, %1 ], [ %4, %2 ], [ 1, %1 ], [ 1, %1 ]
ret i32 %6
}
int free_image_array(the_array, length)
short **the_array;
long length;
{
  int i;
  for (i = 0; i < length; i++)
    free(the_array[i]);
  return (1);
}


x86 assembly (clang, -O0):
<free_image_array>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
movslq -0x14(%rbp),%rax
cmp    -0x10(%rbp),%rax
jge    1154 <free_image_array+0x44>
mov    -0x8(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
call   1030 <free@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1127 <free_image_array+0x17>
mov    $0x1,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<free_image_array>:
push   %r15
push   %r14
push   %rbx
test   %rsi,%rsi
jle    1142 <free_image_array+0x32>
mov    %rsi,%r15
mov    %rdi,%r14
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    (%r14,%rbx,8),%rdi
call   1030 <free@plt>
add    $0x1,%rbx
cmp    %rbx,%r15
jne    1130 <free_image_array+0x20>
mov    $0x1,%eax
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
define i32 @free_image_array(i16** nocapture %0, i64 %1) {
%3 = icmp sgt i64 %1, 0
br i1 %3, label %4, label %11
4: ; preds = %2, %4
%5 = phi i64 [ %9, %4 ], [ 0, %2 ]
%6 = getelementptr inbounds i16*, i16** %0, i64 %5
%7 = bitcast i16** %6 to i8**
%8 = load i8*, i8** %7
tail call void @free(i8* %8)
%9 = add nuw nsw i64 %5, 1
%10 = icmp eq i64 %9, %1
br i1 %10, label %11, label %4
11: ; preds = %4, %2
ret i32 1
}
/* Variables and functions */
unsigned char serial_getc(int);
void serial_wait_line(int fd) {
  unsigned char c = 0;
  do {
    c = serial_getc(fd);
  } while (c != 0 && c != '\n' && c != '\r');
}


x86 assembly (clang, -O0):
<serial_wait_line>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movb   $0x0,-0x5(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <serial_getc@plt>
mov    %al,-0x5(%rbp)
movzbl -0x5(%rbp),%ecx
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0x6(%rbp)
je     115b <serial_wait_line+0x4b>
movzbl -0x5(%rbp),%ecx
xor    %eax,%eax
cmp    $0xa,%ecx
mov    %al,-0x6(%rbp)
je     115b <serial_wait_line+0x4b>
movzbl -0x5(%rbp),%eax
cmp    $0xd,%eax
setne  %al
mov    %al,-0x6(%rbp)
mov    -0x6(%rbp),%al
test   $0x1,%al
jne    111f <serial_wait_line+0xf>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<serial_wait_line>:
push   %r14
push   %rbx
push   %rax
mov    %edi,%ebx
mov    $0x2401,%r14d
nopl   0x0(%rax)
mov    %ebx,%edi
call   1030 <serial_getc@plt>
cmp    $0xd,%al
ja     1120 <serial_wait_line+0x10>
movzbl %al,%eax
bt     %rax,%r14
jae    1120 <serial_wait_line+0x10>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define void @serial_wait_line(i32 %0) {
br label %2
2: ; preds = %2, %1
%3 = tail call zeroext i8 @serial_getc(i32 %0)
switch i8 %3, label %2 [
i8 13, label %4
i8 10, label %4
i8 0, label %4
]
4: ; preds = %2, %2, %2
ret void
}
void x_full_screen(int do_full) { return; }


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

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

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

LLVM IR (-O2):
define void @x_full_screen(i32 %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void usage(void) {
  fprintf(stderr, "USAGE: dietsplashctl percentage [message]\n\n"
                  "EXAMPLE\n\t"
                  "dietsplashctl 49 \"loading ssh\"\n\n");
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ec5(%rip),%rax
mov    (%rax),%edi
lea    0xedc(%rip),%rsi
call   1030 <fprintf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<usage>:
mov    0x2ec9(%rip),%rax
mov    (%rax),%edi
lea    0xee0(%rip),%rsi
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [85 x i8] c"USAGE: dietsplashctl percentage [message]\0A\0AEXAMPLE\0A\09dietsplashctl 49 \22loading ssh\22\0A\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([85 x i8], [85 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [85 x i8] c"USAGE: dietsplashctl percentage [message]\0A\0AEXAMPLE\0A\09dietsplashctl 49 \22loading ssh\22\0A\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([85 x i8], [85 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ strcpy(char *, char *);
char *cMLeftTrim(char *str) {
  char *s = str;
  while (*s)
    if (*s == ' ')
      ++s;
    else
      break;
  if (s > str)
    strcpy((char *)str, (char *)s);
  return str;
}


x86 assembly (clang, -O0):
<cMLeftTrim>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
cmpb   $0x0,(%rax)
je     115c <cMLeftTrim+0x4c>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x20,%eax
jne    1152 <cMLeftTrim+0x42>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1157 <cMLeftTrim+0x47>
jmp    115c <cMLeftTrim+0x4c>
jmp    1124 <cMLeftTrim+0x14>
mov    -0x10(%rbp),%rax
cmp    -0x8(%rbp),%rax
jbe    1177 <cMLeftTrim+0x67>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <strcpy@plt>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cMLeftTrim>:
push   %rbx
mov    %rdi,%rbx
lea    -0x1(%rdi),%rsi
nopl   0x0(%rax,%rax,1)
cmpb   $0x20,0x1(%rsi)
lea    0x1(%rsi),%rsi
je     1120 <cMLeftTrim+0x10>
cmp    %rbx,%rsi
jbe    1137 <cMLeftTrim+0x27>
mov    %rbx,%rdi
call   1030 <strcpy@plt>
mov    %rbx,%rax
pop    %rbx
ret

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

LLVM IR (-O2):
define i8* @cMLeftTrim(i8* returned %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i8* [ %0, %1 ], [ %6, %2 ]
%4 = load i8, i8* %3
%5 = icmp eq i8 %4, 32
%6 = getelementptr inbounds i8, i8* %3, i64 1
br i1 %5, label %2, label %7
7: ; preds = %2
%8 = icmp ugt i8* %3, %0
br i1 %8, label %9, label %11
9: ; preds = %7
%10 = tail call i32 @strcpy(i8* %0, i8* %3)
br label %11
11: ; preds = %9, %7
ret i8* %0
}
void PKCS7_DIGEST_new(void) {}


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

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

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

LLVM IR (-O2):
define void @PKCS7_DIGEST_new() {
ret void
}
/* Variables and functions */
size_t strlen(char const *);
size_t uint32_size(size_t);
size_t string_size(const char *str) {
  size_t len = strlen(str);
  return uint32_size(len) + len;
}


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

x86 assembly (clang, -O2):
<string_size>:
push   %rbx
call   1030 <strlen@plt>
mov    %rax,%rbx
mov    %rax,%rdi
call   1040 <uint32_size@plt>
add    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
define i64 @string_size(i8* %0) {
%2 = alloca i8*
%3 = alloca i64
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i64 @strlen(i8* %4)
store i64 %5, i64* %3
%6 = load i64, i64* %3
%7 = call i64 @uint32_size(i64 %6)
%8 = load i64, i64* %3
%9 = add i64 %7, %8
ret i64 %9
}

LLVM IR (-O2):
define i64 @string_size(i8* nocapture %0) {
%2 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%3 = tail call i64 @uint32_size(i64 %2)
%4 = add i64 %3, %2
ret i64 %4
}
/* Variables and functions */
int /*<<< orphan*/ lprint(char *);
void slirp_stats(void) { lprint("SLIRP statistics code not compiled.\n"); }


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

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

LLVM IR (-O0):
@.str = [37 x i8] c"SLIRP statistics code not compiled.\0A\00"
define void @slirp_stats() {
%1 = call i32 @lprint(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [37 x i8] c"SLIRP statistics code not compiled.\0A\00"
define void @slirp_stats() {
%1 = tail call i32 @lprint(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(int **);
void free_table(int **table) { free(table); }


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

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

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

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

/* Variables and functions */
int /*<<< orphan*/ FatalErrnoError(int, int, char *);
int setsockopt(int, int, int, void const *, int /*<<< orphan*/);
void Esetsockopt(int s, int level, int optname, const void *optval,
                 socklen_t optlen) {
  FatalErrnoError(setsockopt(s, level, optname, optval, optlen) == -1, 1,
                  "setsockopt()");
}


x86 assembly (clang, -O0):
<Esetsockopt>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %rcx,-0x18(%rbp)
mov    %r8d,-0x1c(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
mov    -0x18(%rbp),%rcx
mov    -0x1c(%rbp),%r8d
call   1030 <setsockopt@plt>
cmp    $0xffffffff,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
mov    $0x1,%esi
lea    0xe9a(%rip),%rdx
call   1040 <FatalErrnoError@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Esetsockopt>:
push   %rax
call   1030 <setsockopt@plt>
xor    %edi,%edi
cmp    $0xffffffff,%eax
sete   %dil
lea    0xeca(%rip),%rdx
mov    $0x1,%esi
pop    %rax
jmp    1040 <FatalErrnoError@plt>

LLVM IR (-O0):
@.str = [13 x i8] c"setsockopt()\00"
define void @Esetsockopt(i32 %0, i32 %1, i32 %2, i8* %3, i32 %4) {
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i8*
%10 = alloca i32
store i32 %0, i32* %6
store i32 %1, i32* %7
store i32 %2, i32* %8
store i8* %3, i8** %9
store i32 %4, i32* %10
%11 = load i32, i32* %6
%12 = load i32, i32* %7
%13 = load i32, i32* %8
%14 = load i8*, i8** %9
%15 = load i32, i32* %10
%16 = call i32 @setsockopt(i32 %11, i32 %12, i32 %13, i8* %14, i32 %15)
%17 = icmp eq i32 %16, -1
%18 = zext i1 %17 to i32
%19 = call i32 @FatalErrnoError(i32 %18, i32 1, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [13 x i8] c"setsockopt()\00"
define void @Esetsockopt(i32 %0, i32 %1, i32 %2, i8* %3, i32 %4) {
%6 = tail call i32 @setsockopt(i32 %0, i32 %1, i32 %2, i8* %3, i32 %4)
%7 = icmp eq i32 %6, -1
%8 = zext i1 %7 to i32
%9 = tail call i32 @FatalErrnoError(i32 %8, i32 1, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ outnop1str(char *);
void outABX() { outnop1str("ABX"); }


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

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

LLVM IR (-O0):
@.str = [4 x i8] c"ABX\00"
define void @outABX() {
%1 = call i32 @outnop1str(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"ABX\00"
define void @outABX() {
%1 = tail call i32 @outnop1str(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ a;

/* Variables and functions */
int bin_search_recursive(int *, int, int /*<<< orphan*/, int);
int /*<<< orphan*/ printf(char *, int);
int main() {
  int a[] = {1, 2, 3, 4, 5, 6, 7};
  int v = bin_search_recursive(a, 7, 0, sizeof(a) / sizeof(a[0]));
  printf("%d\n", v);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    0xed1(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xece(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    0xecb(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    0xec9(%rip),%eax
mov    %eax,-0x8(%rbp)
lea    -0x20(%rbp),%rdi
mov    $0x7,%ecx
xor    %edx,%edx
mov    %ecx,%esi
call   1030 <bin_search_recursive@plt>
mov    %eax,-0x24(%rbp)
mov    -0x24(%rbp),%esi
lea    0xeab(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x28,%rsp
movups 0xee1(%rip),%xmm0
movups %xmm0,0xc(%rsp)
movaps 0xec9(%rip),%xmm0
movaps %xmm0,(%rsp)
mov    %rsp,%rdi
mov    $0x7,%esi
xor    %edx,%edx
mov    $0x7,%ecx
call   1030 <bin_search_recursive@plt>
lea    0xec6(%rip),%rdi
mov    %eax,%esi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x28,%rsp
ret

LLVM IR (-O0):
@__const.main.a = [7 x i32] [i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7]
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = alloca [7 x i32]
%2 = alloca i32
%3 = bitcast [7 x i32]* %1 to i8*
%4 = getelementptr inbounds [7 x i32], [7 x i32]* %1, i64 0, i64 0
%5 = call i32 @bin_search_recursive(i32* %4, i32 7, i32 0, i32 7)
store i32 %5, i32* %2
%6 = load i32, i32* %2
%7 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %6)
ret i32 0
}

LLVM IR (-O2):
@__const.main.a = [7 x i32] [i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7]
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = alloca [7 x i32]
%2 = bitcast [7 x i32]* %1 to i8*
%3 = getelementptr inbounds [7 x i32], [7 x i32]* %1, i64 0, i64 0
%4 = call i32 @bin_search_recursive(i32* %3, i32 7, i32 0, i32 7)
%5 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %4)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void free_val(void *key, void *value) { free(value); }


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

x86 assembly (clang, -O2):
<free_val>:
mov    %rsi,%rdi
jmp    1030 <free@plt>

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

LLVM IR (-O2):
define void @free_val(i8* nocapture readnone %0, i8* nocapture %1) {
%3 = tail call i32 @free(i8* %1)
ret void
}
/* Variables and functions */
int kwboot_tty_send(int, unsigned char *, int);
int kwboot_tty_send_char(int fd, unsigned char c) {
  return kwboot_tty_send(fd, &c, 1);
}


x86 assembly (clang, -O0):
<kwboot_tty_send_char>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %sil,%al
mov    %edi,-0x4(%rbp)
mov    %al,-0x5(%rbp)
mov    -0x4(%rbp),%edi
lea    -0x5(%rbp),%rsi
mov    $0x1,%edx
call   1030 <kwboot_tty_send@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<kwboot_tty_send_char>:
push   %rax
mov    %sil,0x7(%rsp)
lea    0x7(%rsp),%rsi
mov    $0x1,%edx
call   1030 <kwboot_tty_send@plt>
pop    %rcx
ret

LLVM IR (-O0):
define i32 @kwboot_tty_send_char(i32 %0, i8 zeroext %1) {
%3 = alloca i32
%4 = alloca i8
store i32 %0, i32* %3
store i8 %1, i8* %4
%5 = load i32, i32* %3
%6 = call i32 @kwboot_tty_send(i32 %5, i8* %4, i32 1)
ret i32 %6
}

LLVM IR (-O2):
define i32 @kwboot_tty_send_char(i32 %0, i8 zeroext %1) {
%3 = alloca i8
store i8 %1, i8* %3
%4 = call i32 @kwboot_tty_send(i32 %0, i8* %3, i32 1)
ret i32 %4
}
void create_play_song(int num) {}


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

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

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

LLVM IR (-O2):
define void @create_play_song(i32 %0) {
ret void
}
void DH_generate_key(void) {}


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

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

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

LLVM IR (-O2):
define void @DH_generate_key() {
ret void
}
/* Variables and functions */
char *ap_cvt(double, int, int *, int *, int /*<<< orphan*/, char *);
char *ap_fcvt(double arg, int ndigits, int *decpt, int *sign, char *buf) {
  return (ap_cvt(arg, ndigits, decpt, sign, 0, buf));
}


x86 assembly (clang, -O0):
<ap_fcvt>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movsd  %xmm0,-0x8(%rbp)
mov    %edi,-0xc(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    %rcx,-0x28(%rbp)
movsd  -0x8(%rbp),%xmm0
mov    -0xc(%rbp),%edi
mov    -0x18(%rbp),%rsi
mov    -0x20(%rbp),%rdx
mov    -0x28(%rbp),%r8
xor    %ecx,%ecx
call   1030 <ap_cvt@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ap_fcvt>:
mov    %rcx,%r8
xor    %ecx,%ecx
jmp    1030 <ap_cvt@plt>

LLVM IR (-O0):
define i8* @ap_fcvt(double %0, i32 %1, i32* %2, i32* %3, i8* %4) {
%6 = alloca double
%7 = alloca i32
%8 = alloca i32*
%9 = alloca i32*
%10 = alloca i8*
store double %0, double* %6
store i32 %1, i32* %7
store i32* %2, i32** %8
store i32* %3, i32** %9
store i8* %4, i8** %10
%11 = load double, double* %6
%12 = load i32, i32* %7
%13 = load i32*, i32** %8
%14 = load i32*, i32** %9
%15 = load i8*, i8** %10
%16 = call i8* @ap_cvt(double %11, i32 %12, i32* %13, i32* %14, i32 0, i8* %15)
ret i8* %16
}

LLVM IR (-O2):
define i8* @ap_fcvt(double %0, i32 %1, i32* %2, i32* %3, i8* %4) {
%6 = tail call i8* @ap_cvt(double %0, i32 %1, i32* %2, i32* %3, i32 0, i8* %4)
ret i8* %6
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *, char *);
int /*<<< orphan*/ stderr;
void ReadTreeError(char *err, char *token) {
  fprintf(stderr, "Tree parse error: unexpected token '%s' -- %s\n",
          token == NULL ? "(End of file)" : token, err);
  exit(1);
}


x86 assembly (clang, -O0):
<ReadTreeError>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2ea9(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x14(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1157 <ReadTreeError+0x37>
lea    0xee1(%rip),%rax
mov    %rax,-0x20(%rbp)
jmp    115f <ReadTreeError+0x3f>
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x14(%rbp),%edi
mov    -0x20(%rbp),%rdx
mov    -0x8(%rbp),%rcx
lea    0xe8f(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<ReadTreeError>:
push   %rax
mov    %rdi,%rcx
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
test   %rsi,%rsi
lea    0xef8(%rip),%rdx
cmovne %rsi,%rdx
lea    0xebe(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [47 x i8] c"Tree parse error: unexpected token '%s' -- %s\0A\00"
@.str.1 = [14 x i8] c"(End of file)\00"
define void @ReadTreeError(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i32, i32* @stderr
%6 = load i8*, i8** %4
%7 = icmp eq i8* %6, null
br i1 %7, label %8, label %9
8: ; preds = %2
br label %11
9: ; preds = %2
%10 = load i8*, i8** %4
br label %11
11: ; preds = %9, %8
%12 = phi i8* [ getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0), %8 ], [ %10, %9 ]
%13 = load i8*, i8** %3
%14 = call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str, i64 0, i64 0), i8* %12, i8* %13)
%15 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [47 x i8] c"Tree parse error: unexpected token '%s' -- %s\0A\00"
@.str.1 = [14 x i8] c"(End of file)\00"
define void @ReadTreeError(i8* %0, i8* %1) {
%3 = load i32, i32* @stderr
%4 = icmp eq i8* %1, null
%5 = select i1 %4, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0), i8* %1
%6 = tail call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str, i64 0, i64 0), i8* %5, i8* %0)
%7 = tail call i32 @exit(i32 1)
unreachable
}
void d2i_X509_REQ(void) {}


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

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

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

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


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

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

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

LLVM IR (-O2):
define void @test16_Mod_foo__I() {
ret void
}
char *langRomTypeSegaBasic() { return "Sega Basic"; }


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

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

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

LLVM IR (-O2):
@.str = [11 x i8] c"Sega Basic\00"
define i8* @langRomTypeSegaBasic() {
ret i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0)
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ puts(char *);
void help() {
  puts("Usage: slideextract [OPTION] infile outprefix\n\nExtract slides from "
       "video.\n\n  -g              Launch gui to set comparison region, press "
       "any key when done\n  -r X1.Y1:X2.Y2  Manually set comparison "
       "region\n\n  -h  Display this help and exit\n  -V  Output version "
       "information and exit\n\nSelect a comparision region (e.g. slide "
       "number) for faster and more\naccurate extraction.\n");
  exit(0);
}


x86 assembly (clang, -O0):
<help>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1030 <puts@plt>
xor    %edi,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<help>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <puts@plt>
xor    %edi,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [370 x i8] c"Usage: slideextract [OPTION] infile outprefix\0A\0AExtract slides from video.\0A\0A -g Launch gui to set comparison region, press any key when done\0A -r X1.Y1:X2.Y2 Manually set comparison region\0A\0A -h Display this help and exit\0A -V Output version information and exit\0A\0ASelect a comparision region (e.g. slide number) for faster and more\0Aaccurate extraction.\0A\00"
define void @help() {
%1 = call i32 @puts(i8* getelementptr inbounds ([370 x i8], [370 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@.str = [370 x i8] c"Usage: slideextract [OPTION] infile outprefix\0A\0AExtract slides from video.\0A\0A -g Launch gui to set comparison region, press any key when done\0A -r X1.Y1:X2.Y2 Manually set comparison region\0A\0A -h Display this help and exit\0A -V Output version information and exit\0A\0ASelect a comparision region (e.g. slide number) for faster and more\0Aaccurate extraction.\0A\00"
define void @help() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([370 x i8], [370 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @exit(i32 0)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main() {
  int math;
  int physics;
  int check;
  math = 5;
  physics = 5;
  check = math == 6 || physics == 6;
  printf("%d", check);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x5,-0x8(%rbp)
movl   $0x5,-0xc(%rbp)
mov    $0x1,%al
cmpl   $0x6,-0x8(%rbp)
mov    %al,-0x11(%rbp)
je     1146 <main+0x36>
cmpl   $0x6,-0xc(%rbp)
sete   %al
mov    %al,-0x11(%rbp)
mov    -0x11(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%esi
lea    0xea5(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 0, i32* %1
store i32 5, i32* %2
store i32 5, i32* %3
%5 = load i32, i32* %2
%6 = icmp eq i32 %5, 6
br i1 %6, label %10, label %7
7: ; preds = %0
%8 = load i32, i32* %3
%9 = icmp eq i32 %8, 6
br label %10
10: ; preds = %7, %0
%11 = phi i1 [ true, %0 ], [ %9, %7 ]
%12 = zext i1 %11 to i32
store i32 %12, i32* %4
%13 = load i32, i32* %4
%14 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %13)
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 0)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ LCDWrite(int /*<<< orphan*/, int);
void gotoXY(int x, int y) {
  LCDWrite(0, 0x80 | x);
  LCDWrite(0, 0x40 | y);
}


x86 assembly (clang, -O0):
<gotoXY>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%esi
or     $0x80,%esi
xor    %edi,%edi
call   1030 <LCDWrite@plt>
mov    -0x8(%rbp),%esi
or     $0x40,%esi
xor    %edi,%edi
call   1030 <LCDWrite@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gotoXY>:
push   %rbx
mov    %esi,%ebx
mov    %edi,%esi
or     $0x80,%esi
xor    %edi,%edi
call   1030 <LCDWrite@plt>
or     $0x40,%ebx
xor    %edi,%edi
mov    %ebx,%esi
pop    %rbx
jmp    1030 <LCDWrite@plt>

LLVM IR (-O0):
define void @gotoXY(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 = or i32 128, %5
%7 = call i32 @LCDWrite(i32 0, i32 %6)
%8 = load i32, i32* %4
%9 = or i32 64, %8
%10 = call i32 @LCDWrite(i32 0, i32 %9)
ret void
}

LLVM IR (-O2):
define void @gotoXY(i32 %0, i32 %1) {
%3 = or i32 %0, 128
%4 = tail call i32 @LCDWrite(i32 0, i32 %3)
%5 = or i32 %1, 64
%6 = tail call i32 @LCDWrite(i32 0, i32 %5)
ret void
}
void sendComment(char *comment) { sendCGSComment(__FUNCTION__, comment); }


x86 assembly (clang, -O0):
<sendComment>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xed9(%rip),%rdi
mov    $0x0,%al
call   1030 <sendCGSComment@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sendComment>:
mov    %rdi,%rsi
lea    0xee6(%rip),%rdi
xor    %eax,%eax
jmp    1030 <sendCGSComment@plt>

LLVM IR (-O0):
@__FUNCTION__.sendComment = [12 x i8] c"sendComment\00"
define void @sendComment(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 (i8*, i8*, ...) bitcast (i32 (...)* @sendCGSComment to i32 (i8*, i8*, ...)*)(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @__FUNCTION__.sendComment, i64 0, i64 0), i8* %3)
ret void
}

LLVM IR (-O2):
@__FUNCTION__.sendComment = [12 x i8] c"sendComment\00"
define void @sendComment(i8* %0) {
%2 = tail call i32 (i8*, i8*, ...) bitcast (i32 (...)* @sendCGSComment to i32 (i8*, i8*, ...)*)(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @__FUNCTION__.sendComment, i64 0, i64 0), i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char);
void f5(void) {
  char a = 'Z';
  char b = 'C';
  while (a - b - 18) {
    printf("%c\n", b);
    b++;
  }
}


x86 assembly (clang, -O0):
<f5>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movb   $0x5a,-0x1(%rbp)
movb   $0x43,-0x2(%rbp)
movsbl -0x1(%rbp),%eax
movsbl -0x2(%rbp),%ecx
sub    %ecx,%eax
sub    $0x12,%eax
cmp    $0x0,%eax
je     1153 <f5+0x43>
lea    0xec3(%rip),%rdi
movsbl -0x2(%rbp),%esi
call   1030 <printf@plt>
mov    -0x2(%rbp),%al
add    $0x1,%al
mov    %al,-0x2(%rbp)
jmp    1120 <f5+0x10>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f5>:
push   %rbx
lea    0xee8(%rip),%rbx
mov    %rbx,%rdi
mov    $0x43,%esi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x44,%esi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x45,%esi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x46,%esi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x47,%esi
pop    %rbx
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [4 x i8] c"%c\0A\00"
define void @f5() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8 signext 67)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8 signext 68)
%3 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8 signext 69)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8 signext 70)
%5 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8 signext 71)
ret void
}
/* Variables and functions */
scalar_t__ get_rn_dbl(int *);
float get_rn_flt(int *igenptr) { return (float)get_rn_dbl(igenptr); }


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

x86 assembly (clang, -O2):
<get_rn_flt>:
push   %rax
call   1030 <get_rn_dbl@plt>
cvtsi2ss %rax,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define float @get_rn_flt(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = call i64 @get_rn_dbl(i32* %3)
%5 = sitofp i64 %4 to float
ret float %5
}

LLVM IR (-O2):
define float @get_rn_flt(i32* %0) {
%2 = tail call i64 @get_rn_dbl(i32* %0)
%3 = sitofp i64 %2 to float
ret float %3
}
/* Variables and functions */
double __nv_dsqrt_rn(double);
double __dsqrt_rn(double __a) { return __nv_dsqrt_rn(__a); }


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

x86 assembly (clang, -O2):
<__dsqrt_rn>:
jmp    1030 <__nv_dsqrt_rn@plt>

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

LLVM IR (-O2):
define double @__dsqrt_rn(double %0) {
%2 = tail call double @__nv_dsqrt_rn(double %0)
ret double %2
}