xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
int /*<<< orphan*/ squeeze(char *, char *);
int main() {
  char s1[] = "green tractor";
  char s2[] = "r ";
  squeeze(s1, s2);
  printf("%s\n", s1);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    0xeca(%rip),%rax
mov    %rax,-0x12(%rbp)
mov    0xec8(%rip),%eax
mov    %eax,-0xa(%rbp)
mov    0xec2(%rip),%ax
mov    %ax,-0x6(%rbp)
mov    0xeb9(%rip),%ax
mov    %ax,-0x15(%rbp)
mov    0xeb1(%rip),%al
mov    %al,-0x13(%rbp)
lea    -0x12(%rbp),%rdi
lea    -0x15(%rbp),%rsi
call   1030 <squeeze@plt>
lea    -0x12(%rbp),%rsi
lea    0xe97(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x20,%rsp
movabs $0x726f7463617274,%rax
mov    %rax,0x16(%rsp)
movabs $0x7274206e65657267,%rax
20 74 72
mov    %rax,0x10(%rsp)
movb   $0x0,0xe(%rsp)
movw   $0x2072,0xc(%rsp)
lea    0x10(%rsp),%rbx
lea    0xc(%rsp),%rsi
mov    %rbx,%rdi
call   1030 <squeeze@plt>
lea    0xea9(%rip),%rdi
mov    %rbx,%rsi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@__const.main.s1 = [14 x i8] c"green tractor\00"
@__const.main.s2 = [3 x i8] c"r \00"
@.str = [4 x i8] c"%s\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [14 x i8]
%3 = alloca [3 x i8]
store i32 0, i32* %1
%4 = bitcast [14 x i8]* %2 to i8*
%5 = bitcast [3 x i8]* %3 to i8*
%6 = getelementptr inbounds [14 x i8], [14 x i8]* %2, i64 0, i64 0
%7 = getelementptr inbounds [3 x i8], [3 x i8]* %3, i64 0, i64 0
%8 = call i32 @squeeze(i8* %6, i8* %7)
%9 = getelementptr inbounds [14 x i8], [14 x i8]* %2, i64 0, i64 0
%10 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %9)
ret i32 0
}

LLVM IR (-O2):
@__const.main.s1 = [14 x i8] c"green tractor\00"
@__const.main.s2 = [3 x i8] c"r \00"
@.str = [4 x i8] c"%s\0A\00"
define i32 @main() {
%1 = alloca [14 x i8]
%2 = alloca [3 x i8]
%3 = getelementptr inbounds [14 x i8], [14 x i8]* %1, i64 0, i64 0
%4 = getelementptr inbounds [3 x i8], [3 x i8]* %2, i64 0, i64 0
%5 = call i32 @squeeze(i8* %3, i8* %4)
%6 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %3)
ret i32 0
}
const char *g10m_revision_string(int dummy) { return "$Revision: 1.1 $"; }


x86 assembly (clang, -O0):
<g10m_revision_string>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
lea    0xef2(%rip),%rax
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [17 x i8] c"$Revision: 1.1 $\00"
define i8* @g10m_revision_string(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
ret i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [17 x i8] c"$Revision: 1.1 $\00"
define i8* @g10m_revision_string(i32 %0) {
ret i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0)
}
/* Variables and functions */
int /*<<< orphan*/ ysNativeManager();
int ysRegistreFunc(int /*<<< orphan*/, char *,
                   void *(*)(int, union ycall_arg *, int *));
int ysRegistreNativeFunc(char *name,
                         void *(*value)(int, union ycall_arg *, int *)) {
  return ysRegistreFunc(ysNativeManager(), name, value);
}


x86 assembly (clang, -O0):
<ysRegistreNativeFunc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x0,%al
call   1040 <ysNativeManager@plt>
mov    %eax,%edi
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
call   1030 <ysRegistreFunc@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ysRegistreNativeFunc>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
xor    %eax,%eax
call   1040 <ysNativeManager@plt>
mov    %eax,%edi
mov    %rbx,%rsi
mov    %r14,%rdx
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <ysRegistreFunc@plt>

LLVM IR (-O0):
%union.ycall_arg = type opaque
%union.ycall_arg.0 = type opaque
define i32 @ysRegistreNativeFunc(i8* %0, i8* (i32, %union.ycall_arg*, i32*)* %1) {
%3 = alloca i8*
%4 = alloca i8* (i32, %union.ycall_arg*, i32*)*
store i8* %0, i8** %3
store i8* (i32, %union.ycall_arg*, i32*)* %1, i8* (i32, %union.ycall_arg*, i32*)** %4
%5 = call i32 (...) @ysNativeManager()
%6 = load i8*, i8** %3
%7 = load i8* (i32, %union.ycall_arg*, i32*)*, i8* (i32, %union.ycall_arg*, i32*)** %4
%8 = bitcast i8* (i32, %union.ycall_arg*, i32*)* %7 to i8* (i32, %union.ycall_arg.0*, i32*)*
%9 = call i32 @ysRegistreFunc(i32 %5, i8* %6, i8* (i32, %union.ycall_arg.0*, i32*)* %8)
ret i32 %9
}

LLVM IR (-O2):
%union.ycall_arg = type opaque
%union.ycall_arg.0 = type opaque
define i32 @ysRegistreNativeFunc(i8* %0, i8* (i32, %union.ycall_arg*, i32*)* %1) {
%3 = tail call i32 (...) @ysNativeManager()
%4 = bitcast i8* (i32, %union.ycall_arg*, i32*)* %1 to i8* (i32, %union.ycall_arg.0*, i32*)*
%5 = tail call i32 @ysRegistreFunc(i32 %3, i8* %0, i8* (i32, %union.ycall_arg.0*, i32*)* %4)
ret i32 %5
}
int NJ_is_number(char c) {
  if (c >= '0' && c <= '9') {
    return (1);
  } else {
    return (0);
  }
}


x86 assembly (clang, -O0):
<NJ_is_number>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x5(%rbp)
movsbl -0x5(%rbp),%eax
cmp    $0x30,%eax
jl     1130 <NJ_is_number+0x30>
movsbl -0x5(%rbp),%eax
cmp    $0x39,%eax
jg     1130 <NJ_is_number+0x30>
movl   $0x1,-0x4(%rbp)
jmp    1137 <NJ_is_number+0x37>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<NJ_is_number>:
add    $0xd0,%dil
xor    %eax,%eax
cmp    $0xa,%dil
setb   %al
ret

LLVM IR (-O0):
define i32 @NJ_is_number(i8 signext %0) {
%2 = alloca i32
%3 = alloca i8
store i8 %0, i8* %3
%4 = load i8, i8* %3
%5 = sext i8 %4 to i32
%6 = icmp sge i32 %5, 48
br i1 %6, label %7, label %12
7: ; preds = %1
%8 = load i8, i8* %3
%9 = sext i8 %8 to i32
%10 = icmp sle i32 %9, 57
br i1 %10, label %11, label %12
11: ; preds = %7
store i32 1, i32* %2
br label %13
12: ; preds = %7, %1
store i32 0, i32* %2
br label %13
13: ; preds = %12, %11
%14 = load i32, i32* %2
ret i32 %14
}

LLVM IR (-O2):
define i32 @NJ_is_number(i8 signext %0) {
%2 = add i8 %0, -48
%3 = icmp ult i8 %2, 10
%4 = zext i1 %3 to i32
ret i32 %4
}
int test_imm_2Cint8_mem(signed char *val) {
  return ((*val) & (-0x2C << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_2Cint8_mem>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%edx
and    $0xffffffd4,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_2Cint8_mem>:
testb  $0xd4,(%rdi)
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_2Cint8_mem(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = and i8 %2, -44
%4 = icmp eq i8 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isgraph(int);
void t_isgraph_0xa2() {
  Assert_real((isgraph(162) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_isgraph.c",
              815, ("isgraph should be 0 for 0xa2"));
}


x86 assembly (clang, -O0):
<t_isgraph_0xa2>:
push   %rbp
mov    %rsp,%rbp
mov    $0xa2,%edi
call   1040 <isgraph@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xebf(%rip),%rsi
mov    $0x32f,%edx
lea    0xf5b(%rip),%rcx
call   1030 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_isgraph_0xa2>:
push   %rax
mov    $0xa2,%edi
call   1040 <isgraph@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x32f,%edx
pop    %rax
jmp    1030 <Assert_real@plt>

LLVM IR (-O0):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isgraph.c\00"
@.str.1 = [29 x i8] c"isgraph should be 0 for 0xa2\00"
define void @t_isgraph_0xa2() {
%1 = call i64 @isgraph(i32 162)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 815, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isgraph.c\00"
@.str.1 = [29 x i8] c"isgraph should be 0 for 0xa2\00"
define void @t_isgraph_0xa2() {
%1 = tail call i64 @isgraph(i32 162)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 815, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
int compareInt(int a, int b) {
  int result[2] = {1, -1};
  int sign_bit = (unsigned int)(a - b) >> (sizeof(int) * 8 - 1);
  return result[sign_bit];
}


x86 assembly (clang, -O0):
<compareInt>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    0xeef(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    -0x4(%rbp),%eax
sub    -0x8(%rbp),%eax
shr    $0x1f,%eax
mov    %eax,-0x14(%rbp)
movslq -0x14(%rbp),%rax
mov    -0x10(%rbp,%rax,4),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<compareInt>:
xor    %eax,%eax
cmp    %esi,%edi
setl   %al
lea    0xef2(%rip),%rcx
mov    (%rcx,%rax,4),%eax
ret

LLVM IR (-O0):
@__const.compareInt.result = [2 x i32] [i32 1, i32 -1]
define i32 @compareInt(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca [2 x i32]
%6 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%7 = bitcast [2 x i32]* %5 to i8*
%8 = load i32, i32* %3
%9 = load i32, i32* %4
%10 = sub nsw i32 %8, %9
%11 = lshr i32 %10, 31
store i32 %11, i32* %6
%12 = load i32, i32* %6
%13 = sext i32 %12 to i64
%14 = getelementptr inbounds [2 x i32], [2 x i32]* %5, i64 0, i64 %13
%15 = load i32, i32* %14
ret i32 %15
}

LLVM IR (-O2):
@__const.compareInt.result = [2 x i32] [i32 1, i32 -1]
define i32 @compareInt(i32 %0, i32 %1) {
%3 = icmp slt i32 %0, %1
%4 = zext i1 %3 to i64
%5 = getelementptr inbounds [2 x i32], [2 x i32]* @__const.compareInt.result, i64 0, i64 %4
%6 = load i32, i32* %5
ret i32 %6
}
int compare(const void *a, const void *b) {
  long long unsigned *first, *second;
  first = (long long unsigned *)a;
  second = (long long unsigned *)b;
  return *first > *second;
}


x86 assembly (clang, -O0):
<compare>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rax
mov    (%rax),%rax
mov    -0x20(%rbp),%rcx
cmp    (%rcx),%rax
seta   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<compare>:
mov    (%rdi),%rcx
xor    %eax,%eax
cmp    (%rsi),%rcx
seta   %al
ret

LLVM IR (-O0):
define i32 @compare(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i64*
%6 = alloca i64*
store i8* %0, i8** %3
store i8* %1, i8** %4
%7 = load i8*, i8** %3
%8 = bitcast i8* %7 to i64*
store i64* %8, i64** %5
%9 = load i8*, i8** %4
%10 = bitcast i8* %9 to i64*
store i64* %10, i64** %6
%11 = load i64*, i64** %5
%12 = load i64, i64* %11
%13 = load i64*, i64** %6
%14 = load i64, i64* %13
%15 = icmp ugt i64 %12, %14
%16 = zext i1 %15 to i32
ret i32 %16
}

LLVM IR (-O2):
define i32 @compare(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i64*
%4 = bitcast i8* %1 to i64*
%5 = load i64, i64* %3
%6 = load i64, i64* %4
%7 = icmp ugt i64 %5, %6
%8 = zext i1 %7 to i32
ret i32 %8
}
fatal_error() {}


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

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

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

LLVM IR (-O2):
define i32 @fatal_error() {
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ set_flag(int, int);
void set_subtract(bool set) { set_flag(6, set); }


x86 assembly (clang, -O0):
<set_subtract>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%esi
mov    $0x6,%edi
call   1030 <set_flag@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_subtract>:
mov    %edi,%esi
mov    $0x6,%edi
jmp    1030 <set_flag@plt>

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

LLVM IR (-O2):
define void @set_subtract(i32 %0) {
%2 = tail call i32 @set_flag(i32 6, i32 %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void shlr() {
  printf("c = srcb&0x1;\n");
  printf("dst = (srcb>>1) &~ 0x80;\n");
}


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

x86 assembly (clang, -O2):
<shlr>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <puts@plt>
lea    0xeea(%rip),%rdi
pop    %rax
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [15 x i8] c"c = srcb&0x1;\0A\00"
@.str.1 = [26 x i8] c"dst = (srcb>>1) &~ 0x80;\0A\00"
define void @shlr() {
%1 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [14 x i8] c"c = srcb&0x1;\00"
@str.2 = [25 x i8] c"dst = (srcb>>1) &~ 0x80;\00"
define void @shlr() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @str.2, i64 0, i64 0))
ret void
}
const char *five_roman() {
  char *roman;
  roman = "V";
  return roman;
}


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

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

LLVM IR (-O0):
@.str = [2 x i8] c"V\00"
define i8* @five_roman() {
%1 = alloca i8*
store i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), i8** %1
%2 = load i8*, i8** %1
ret i8* %2
}

LLVM IR (-O2):
@.str = [2 x i8] c"V\00"
define i8* @five_roman() {
ret i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0)
}
int isZero(int x) { return !x; }


x86 assembly (clang, -O0):
<isZero>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isZero>:
xor    %eax,%eax
test   %edi,%edi
sete   %al
ret

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

LLVM IR (-O2):
define i32 @isZero(i32 %0) {
%2 = icmp eq i32 %0, 0
%3 = zext i1 %2 to i32
ret i32 %3
}
/* Variables and functions */
int next_serial();
int /*<<< orphan*/ printf(char *, int);
int main() {
  printf("%d\n", next_serial());
  printf("%d\n", next_serial());
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1040 <next_serial@plt>
mov    %eax,%esi
lea    0xec1(%rip),%rdi
call   1030 <printf@plt>
mov    $0x0,%al
call   1040 <next_serial@plt>
mov    %eax,%esi
lea    0xeac(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
xor    %eax,%eax
call   1040 <next_serial@plt>
lea    0xed1(%rip),%rbx
mov    %rbx,%rdi
mov    %eax,%esi
call   1030 <printf@plt>
xor    %eax,%eax
call   1040 <next_serial@plt>
mov    %rbx,%rdi
mov    %eax,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = tail call i32 (...) @next_serial()
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %1)
%3 = tail call i32 (...) @next_serial()
%4 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %3)
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ pid_t;

/* Variables and functions */
int EINVAL;
__attribute__((visibility("default"))) int sd_bus_creds_get_pid(void *c,
                                                                pid_t *pid) {
  return -EINVAL;
}


x86 assembly (clang, -O0):
<sd_bus_creds_get_pid>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
xor    %eax,%eax
mov    0x2ecb(%rip),%rcx
sub    (%rcx),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
@EINVAL = global i32 0
define i32 @sd_bus_creds_get_pid(i8* nocapture readnone %0, i32* nocapture readnone %1) {
%3 = load i32, i32* @EINVAL
%4 = sub nsw i32 0, %3
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ cgiMakeCheckBox2Bool(char *, int, int, char *, char *);
void cgiMakeCheckBoxIdAndJS(char *name, int checked, char *id,
                            char *javascript) {
  cgiMakeCheckBox2Bool(name, checked, 1, id, javascript);
}


x86 assembly (clang, -O0):
<cgiMakeCheckBoxIdAndJS>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x18(%rbp),%rcx
mov    -0x20(%rbp),%r8
mov    $0x1,%edx
call   1030 <cgiMakeCheckBox2Bool@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cgiMakeCheckBoxIdAndJS>:
mov    %rcx,%r8
mov    %rdx,%rcx
mov    $0x1,%edx
jmp    1030 <cgiMakeCheckBox2Bool@plt>

LLVM IR (-O0):
define void @cgiMakeCheckBoxIdAndJS(i8* %0, i32 %1, i8* %2, i8* %3) {
%5 = alloca i8*
%6 = alloca i32
%7 = alloca i8*
%8 = alloca i8*
store i8* %0, i8** %5
store i32 %1, i32* %6
store i8* %2, i8** %7
store i8* %3, i8** %8
%9 = load i8*, i8** %5
%10 = load i32, i32* %6
%11 = load i8*, i8** %7
%12 = load i8*, i8** %8
%13 = call i32 @cgiMakeCheckBox2Bool(i8* %9, i32 %10, i32 1, i8* %11, i8* %12)
ret void
}

LLVM IR (-O2):
define void @cgiMakeCheckBoxIdAndJS(i8* %0, i32 %1, i8* %2, i8* %3) {
%5 = tail call i32 @cgiMakeCheckBox2Bool(i8* %0, i32 %1, i32 1, i8* %2, i8* %3)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *);
void md_bold_end(FILE *fw, int term) {
  switch (term) {
  case 0:
    break;
  case 1:
    fprintf(fw, "</b>");
    break;
  case 2:
    fprintf(fw, "} ");
    break;
  }
}


x86 assembly (clang, -O0):
<md_bold_end>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
test   %eax,%eax
je     1154 <md_bold_end+0x44>
jmp    1132 <md_bold_end+0x22>
mov    -0x10(%rbp),%eax
sub    $0x1,%eax
je     1159 <md_bold_end+0x49>
jmp    1143 <md_bold_end+0x33>
mov    -0x10(%rbp),%eax
sub    $0x2,%eax
je     116e <md_bold_end+0x5e>
jmp    117e <md_bold_end+0x6e>
jmp    117e <md_bold_end+0x6e>
mov    -0x8(%rbp),%rdi
lea    0xe9c(%rip),%rsi
call   1030 <fprintf@plt>
jmp    117e <md_bold_end+0x6e>
mov    -0x8(%rbp),%rdi
lea    0xe8c(%rip),%rsi
call   1030 <fprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<md_bold_end>:
mov    %rdi,%rcx
cmp    $0x2,%esi
je     1133 <md_bold_end+0x23>
cmp    $0x1,%esi
jne    1149 <md_bold_end+0x39>
lea    0xedc(%rip),%rdi
mov    $0x4,%esi
mov    $0x1,%edx
jmp    1030 <fwrite@plt>
lea    0xecb(%rip),%rdi
mov    $0x2,%esi
mov    $0x1,%edx
jmp    1030 <fwrite@plt>
ret

LLVM IR (-O0):
@.str = [5 x i8] c"</b>\00"
@.str.1 = [3 x i8] c"} \00"
define void @md_bold_end(i32* %0, i32 %1) {
%3 = alloca i32*
%4 = alloca i32
store i32* %0, i32** %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
switch i32 %5, label %13 [
i32 0, label %6
i32 1, label %7
i32 2, label %10
]
6: ; preds = %2
br label %13
7: ; preds = %2
%8 = load i32*, i32** %3
%9 = call i32 @fprintf(i32* %8, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
br label %13
10: ; preds = %2
%11 = load i32*, i32** %3
%12 = call i32 @fprintf(i32* %11, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
br label %13
13: ; preds = %2, %10, %7, %6
ret void
}

LLVM IR (-O2):
@.str = [5 x i8] c"</b>\00"
@.str.1 = [3 x i8] c"} \00"
define void @md_bold_end(i32* nocapture %0, i32 %1) {
switch i32 %1, label %7 [
i32 2, label %5
i32 1, label %3
]
3: ; preds = %2
%4 = tail call i64 @fwrite(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i64 4, i64 1, i32* %0)
br label %7
5: ; preds = %2
%6 = tail call i64 @fwrite(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i64 2, i64 1, i32* %0)
br label %7
7: ; preds = %2, %5, %3
ret void
}
/* Variables and functions */
int /*<<< orphan*/ init_shell();
int /*<<< orphan*/ loop_forever();
int /*<<< orphan*/ shut_shell();
int c_entry(void) {
  init_shell();
  for (;;)
    loop_forever();
  shut_shell();
  return 0;
}


x86 assembly (clang, -O0):
<c_entry>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <init_shell@plt>
mov    $0x0,%al
call   1030 <loop_forever@plt>
jmp    112b <c_entry+0xb>

x86 assembly (clang, -O2):
<c_entry>:
push   %rax
xor    %eax,%eax
call   1040 <init_shell@plt>
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1030 <loop_forever@plt>
jmp    1130 <c_entry+0x10>

LLVM IR (-O0):
define i32 @c_entry() {
%1 = call i32 (...) @init_shell()
br label %2
2: ; preds = %2, %0
%3 = call i32 (...) @loop_forever()
br label %2
}

LLVM IR (-O2):
define i32 @c_entry() {
%1 = tail call i32 (...) @init_shell()
br label %2
2: ; preds = %2, %0
%3 = tail call i32 (...) @loop_forever()
br label %2
}
/* Type definitions */
struct timeval {
  scalar_t__ tv_usec;
  scalar_t__ tv_sec;
};

/* Variables and functions */
int /*<<< orphan*/ gettimeofday(struct timeval *, int /*<<< orphan*/ *);
double now(void) {
  struct timeval tv;
  gettimeofday(&tv, NULL);
  return (double)tv.tv_sec + (double)tv.tv_usec / 1000000;
}


x86 assembly (clang, -O0):
<now>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    -0x10(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1030 <gettimeofday@plt>
cvtsi2sdq -0x8(%rbp),%xmm0
cvtsi2sdq -0x10(%rbp),%xmm1
movsd  0xec7(%rip),%xmm2
divsd  %xmm2,%xmm1
addsd  %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<now>:
sub    $0x18,%rsp
lea    0x8(%rsp),%rdi
xor    %esi,%esi
call   1030 <gettimeofday@plt>
cvtsi2sdq 0x10(%rsp),%xmm1
cvtsi2sdq 0x8(%rsp),%xmm0
divsd  0xeca(%rip),%xmm0
addsd  %xmm1,%xmm0
add    $0x18,%rsp
ret

LLVM IR (-O0):
%struct.timeval = type { i64, i64 }
define double @now() {
%1 = alloca %struct.timeval
%2 = call i32 @gettimeofday(%struct.timeval* %1, i32* null)
%3 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i32 0, i32 1
%4 = load i64, i64* %3
%5 = sitofp i64 %4 to double
%6 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i32 0, i32 0
%7 = load i64, i64* %6
%8 = sitofp i64 %7 to double
%9 = fdiv double %8, 1.000000e+06
%10 = fadd double %5, %9
ret double %10
}

LLVM IR (-O2):
%struct.timeval = type { i64, i64 }
define double @now() {
%1 = alloca %struct.timeval
%2 = bitcast %struct.timeval* %1 to i8*
%3 = call i32 @gettimeofday(%struct.timeval* %1, i32* null)
%4 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 1
%5 = load i64, i64* %4
%6 = sitofp i64 %5 to double
%7 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 0
%8 = load i64, i64* %7
%9 = sitofp i64 %8 to double
%10 = fdiv double %9, 1.000000e+06
%11 = fadd double %10, %6
ret double %11
}
/* Variables and functions */
int /*<<< orphan*/ abort();
void __attribute__((regparm(2), stdcall)) foo(int i, int j, float x) {
  static int last_align = -1;
  int dummy, align = (int)&dummy & 15;
  if (last_align < 0)
    last_align = align;
  else if (align != last_align)
    abort();
}


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
movss  %xmm0,-0xc(%rbp)
lea    -0x10(%rbp),%rax
and    $0xf,%eax
mov    %eax,-0x14(%rbp)
cmpl   $0x0,0x2ef4(%rip)
jge    1148 <foo+0x38>
mov    -0x14(%rbp),%eax
mov    %eax,0x2ee5(%rip)
jmp    1163 <foo+0x53>
mov    -0x14(%rbp),%eax
cmp    0x2ed7(%rip),%eax
je     115e <foo+0x4e>
mov    $0x0,%al
call   1030 <abort@plt>
jmp    1163 <foo+0x53>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo>:
push   %rax
lea    0x4(%rsp),%rax
and    $0xc,%eax
mov    0x2f09(%rip),%ecx
test   %ecx,%ecx
js     1129 <foo+0x19>
cmp    %ecx,%eax
jne    1131 <foo+0x21>
pop    %rax
ret
mov    %eax,0x2ef9(%rip)
pop    %rax
ret
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
@foo.last_align = internal global i32 -1
define void @foo(i32 %0, i32 %1, float %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca float
%7 = alloca i32
%8 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store float %2, float* %6
%9 = ptrtoint i32* %7 to i32
%10 = and i32 %9, 15
store i32 %10, i32* %8
%11 = load i32, i32* @foo.last_align
%12 = icmp slt i32 %11, 0
br i1 %12, label %13, label %15
13: ; preds = %3
%14 = load i32, i32* %8
store i32 %14, i32* @foo.last_align
br label %22
15: ; preds = %3
%16 = load i32, i32* %8
%17 = load i32, i32* @foo.last_align
%18 = icmp ne i32 %16, %17
br i1 %18, label %19, label %21
19: ; preds = %15
%20 = call i32 (...) @abort()
unreachable
21: ; preds = %15
br label %22
22: ; preds = %21, %13
ret void
}

LLVM IR (-O2):
@foo.last_align = internal unnamed_addr global i32 -1
define void @foo(i32 %0, i32 %1, float %2) {
%4 = alloca i32
%5 = bitcast i32* %4 to i8*
%6 = ptrtoint i32* %4 to i64
%7 = trunc i64 %6 to i32
%8 = and i32 %7, 12
%9 = load i32, i32* @foo.last_align
%10 = icmp slt i32 %9, 0
br i1 %10, label %11, label %12
11: ; preds = %3
store i32 %8, i32* @foo.last_align
br label %16
12: ; preds = %3
%13 = icmp eq i32 %8, %9
br i1 %13, label %16, label %14
14: ; preds = %12
%15 = call i32 (...) @abort()
unreachable
16: ; preds = %12, %11
ret void
}
unsigned char condense_color(unsigned char x1, unsigned char x2) {
  unsigned short color_value;
  color_value = x1;
  color_value <<= 8;
  color_value += x2;
  return 255 & (color_value >> 8);
}


x86 assembly (clang, -O0):
<condense_color>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %dil,%cl
mov    %cl,-0x1(%rbp)
mov    %al,-0x2(%rbp)
movzbl -0x1(%rbp),%eax
mov    %ax,-0x4(%rbp)
movzwl -0x4(%rbp),%eax
shl    $0x8,%eax
mov    %ax,-0x4(%rbp)
movzbl -0x2(%rbp),%ecx
movzwl -0x4(%rbp),%eax
add    %ecx,%eax
mov    %ax,-0x4(%rbp)
movzwl -0x4(%rbp),%eax
sar    $0x8,%eax
and    $0xff,%eax
movzbl %al,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define zeroext i8 @condense_color(i8 zeroext %0, i8 zeroext %1) {
%3 = alloca i8
%4 = alloca i8
%5 = alloca i16
store i8 %0, i8* %3
store i8 %1, i8* %4
%6 = load i8, i8* %3
%7 = zext i8 %6 to i16
store i16 %7, i16* %5
%8 = load i16, i16* %5
%9 = zext i16 %8 to i32
%10 = shl i32 %9, 8
%11 = trunc i32 %10 to i16
store i16 %11, i16* %5
%12 = load i8, i8* %4
%13 = zext i8 %12 to i32
%14 = load i16, i16* %5
%15 = zext i16 %14 to i32
%16 = add nsw i32 %15, %13
%17 = trunc i32 %16 to i16
store i16 %17, i16* %5
%18 = load i16, i16* %5
%19 = zext i16 %18 to i32
%20 = ashr i32 %19, 8
%21 = and i32 255, %20
%22 = trunc i32 %21 to i8
ret i8 %22
}

LLVM IR (-O2):
define zeroext i8 @condense_color(i8 returned zeroext %0, i8 zeroext %1) {
ret i8 %0
}
int must_decrease_left(int *left, int *right, long n, long leftStart,
                       long rightStart) {
  return (left[leftStart] > right[rightStart]);
}


x86 assembly (clang, -O0):
<must_decrease_left>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    -0x8(%rbp),%rax
mov    -0x20(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
mov    -0x10(%rbp),%rcx
mov    -0x28(%rbp),%rdx
cmp    (%rcx,%rdx,4),%eax
setg   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<must_decrease_left>:
mov    (%rdi,%rcx,4),%ecx
xor    %eax,%eax
cmp    (%rsi,%r8,4),%ecx
setg   %al
ret

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

LLVM IR (-O2):
define i32 @must_decrease_left(i32* nocapture %0, i32* nocapture %1, i64 %2, i64 %3, i64 %4) {
%6 = getelementptr inbounds i32, i32* %0, i64 %3
%7 = load i32, i32* %6
%8 = getelementptr inbounds i32, i32* %1, i64 %4
%9 = load i32, i32* %8
%10 = icmp sgt i32 %7, %9
%11 = zext i1 %10 to i32
ret i32 %11
}
void gtk_tool_item_set_tooltip() {}


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

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

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

LLVM IR (-O2):
define void @gtk_tool_item_set_tooltip() {
ret void
}
void module_add_driver(struct module *mod, struct device_driver *drv) {}


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

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

LLVM IR (-O0):
%struct.module = type opaque
%struct.device_driver = type opaque
define void @module_add_driver(%struct.module* %0, %struct.device_driver* %1) {
%3 = alloca %struct.module*
%4 = alloca %struct.device_driver*
store %struct.module* %0, %struct.module** %3
store %struct.device_driver* %1, %struct.device_driver** %4
ret void
}

LLVM IR (-O2):
%struct.module = type opaque
%struct.device_driver = type opaque
define void @module_add_driver(%struct.module* nocapture %0, %struct.device_driver* nocapture %1) {
ret void
}
/* Variables and functions */
scalar_t__ lfact(int);
double perm(int n, int r) {
  return ((double)lfact(n)) / ((double)lfact(n - r));
}


x86 assembly (clang, -O0):
<perm>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <lfact@plt>
cvtsi2sd %rax,%xmm0
movsd  %xmm0,-0x10(%rbp)
mov    -0x4(%rbp),%edi
sub    -0x8(%rbp),%edi
call   1030 <lfact@plt>
movsd  -0x10(%rbp),%xmm0
cvtsi2sd %rax,%xmm1
divsd  %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<perm>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
call   1030 <lfact@plt>
cvtsi2sd %rax,%xmm0
movsd  %xmm0,(%rsp)
sub    %ebx,%ebp
mov    %ebp,%edi
call   1030 <lfact@plt>
cvtsi2sd %rax,%xmm1
movsd  (%rsp),%xmm0
divsd  %xmm1,%xmm0
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define double @perm(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 i64 @lfact(i32 %5)
%7 = sitofp i64 %6 to double
%8 = load i32, i32* %3
%9 = load i32, i32* %4
%10 = sub nsw i32 %8, %9
%11 = call i64 @lfact(i32 %10)
%12 = sitofp i64 %11 to double
%13 = fdiv double %7, %12
ret double %13
}

LLVM IR (-O2):
define double @perm(i32 %0, i32 %1) {
%3 = tail call i64 @lfact(i32 %0)
%4 = sitofp i64 %3 to double
%5 = sub nsw i32 %0, %1
%6 = tail call i64 @lfact(i32 %5)
%7 = sitofp i64 %6 to double
%8 = fdiv double %4, %7
ret double %8
}
/* Variables and functions */
int /*<<< orphan*/ atoi(char *);
char *binary(int /*<<< orphan*/);
int /*<<< orphan*/ print(char *, int);
int main(int argc, char *argv[]) {
  char *result = binary(atoi(argv[1]));
  int i = 0;
  for (i = 0; result[i] != '\0'; ++i)
    ;
  print(result, i);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1050 <atoi@plt>
mov    %eax,%edi
call   1030 <binary@plt>
mov    %rax,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
movl   $0x0,-0x1c(%rbp)
mov    -0x18(%rbp),%rax
movslq -0x1c(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x0,%eax
je     1194 <main+0x64>
jmp    1186 <main+0x56>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    116c <main+0x3c>
mov    -0x18(%rbp),%rdi
mov    -0x1c(%rbp),%esi
call   1040 <print@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    0x8(%rsi),%rdi
call   1050 <atoi@plt>
mov    %eax,%edi
call   1030 <binary@plt>
xor    %esi,%esi
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
cmpb   $0x0,(%rax,%rsi,1)
lea    0x1(%rsi),%rsi
jne    1150 <main+0x20>
add    $0xffffffff,%esi
mov    %rax,%rdi
call   1040 <print@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = getelementptr inbounds i8*, i8** %1, i64 1
%4 = load i8*, i8** %3
%5 = tail call i32 @atoi(i8* %4)
%6 = tail call i8* @binary(i32 %5)
br label %7
7: ; preds = %7, %2
%8 = phi i64 [ %12, %7 ], [ 0, %2 ]
%9 = getelementptr inbounds i8, i8* %6, i64 %8
%10 = load i8, i8* %9
%11 = icmp eq i8 %10, 0
%12 = add nuw i64 %8, 1
br i1 %11, label %13, label %7
13: ; preds = %7
%14 = trunc i64 %8 to i32
%15 = tail call i32 @print(i8* %6, i32 %14)
ret i32 0
}
int func1(int a) { return a + 1; }


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

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

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

LLVM IR (-O2):
define i32 @func1(i32 %0) {
%2 = add nsw i32 %0, 1
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ puts(char *);
int /*<<< orphan*/ scanf(char *, unsigned int *);
unsigned int get_key_size() {
  unsigned int key_size;
  puts("How many bits long do you want your key to be?");
  scanf("%d", &key_size);
  return key_size;
}


x86 assembly (clang, -O0):
<get_key_size>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xed1(%rip),%rdi
call   1030 <puts@plt>
lea    0xef4(%rip),%rdi
lea    -0x4(%rbp),%rsi
call   1040 <scanf@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_key_size>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <puts@plt>
lea    0xefb(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1040 <scanf@plt>
mov    0x4(%rsp),%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [47 x i8] c"How many bits long do you want your key to be?\00"
@.str.1 = [3 x i8] c"%d\00"
define i32 @get_key_size() {
%1 = alloca i32
%2 = call i32 @puts(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%4 = load i32, i32* %1
ret i32 %4
}

LLVM IR (-O2):
@.str = [47 x i8] c"How many bits long do you want your key to be?\00"
@.str.1 = [3 x i8] c"%d\00"
define i32 @get_key_size() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([47 x i8], [47 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%5 = load i32, i32* %1
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ main_shutdown(char *);
void main_sigint(int e) {
  (void)e;
  main_shutdown("Caught sigint.");
}


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

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

LLVM IR (-O0):
@.str = [15 x i8] c"Caught sigint.\00"
define void @main_sigint(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @main_shutdown(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [15 x i8] c"Caught sigint.\00"
define void @main_sigint(i32 %0) {
%2 = tail call i32 @main_shutdown(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int *malloc(int);
int main() {
  int *p, *q, *r;
  p = malloc(sizeof(int) * 10);
  while (*p) {
    p = p + 1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x28,%edi
call   1030 <malloc@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
cmpl   $0x0,(%rax)
je     114b <main+0x3b>
mov    -0x10(%rbp),%rax
add    $0x4,%rax
mov    %rax,-0x10(%rbp)
jmp    112d <main+0x1d>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32*
%3 = alloca i32*
%4 = alloca i32*
store i32 0, i32* %1
%5 = call i32* @malloc(i32 40)
store i32* %5, i32** %2
br label %6
6: ; preds = %10, %0
%7 = load i32*, i32** %2
%8 = load i32, i32* %7
%9 = icmp ne i32 %8, 0
br i1 %9, label %10, label %13
10: ; preds = %6
%11 = load i32*, i32** %2
%12 = getelementptr inbounds i32, i32* %11, i64 1
store i32* %12, i32** %2
br label %6
13: ; preds = %6
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32* @malloc(i32 40)
ret i32 0
}
f_impl1() { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @f_impl1() {
ret i32 0
}
void ScaleRowDown34_1_Box_NEON() {}


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

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

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

LLVM IR (-O2):
define void @ScaleRowDown34_1_Box_NEON() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ simpleTest();
int main() {
  simpleTest();
  return 0;
}


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

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @simpleTest()
ret i32 0
}

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


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

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

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

LLVM IR (-O2):
define void @RTAvlrGCPtrRangeGet() {
ret void
}
/* Variables and functions */
int __sec_reduce_add(int);
int foo1() {
  int a;
  a = __sec_reduce_add(1);
}


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

x86 assembly (clang, -O2):
<foo1>:
mov    $0x1,%edi
jmp    1030 <__sec_reduce_add@plt>

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

LLVM IR (-O2):
define i32 @foo1() {
%1 = tail call i32 @__sec_reduce_add(i32 1)
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char const *);
void usage(const char *prog) {
  printf("Usage: %s\n", prog);
  printf("%s <httpserver ip> p <port> m <GET/POST> u <uri> h <extra "
         "httpheader> d <data>\n",
         prog);
}


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

x86 assembly (clang, -O2):
<usage>:
push   %rbx
mov    %rdi,%rbx
lea    0xee5(%rip),%rdi
mov    %rbx,%rsi
call   1030 <printf@plt>
lea    0xee1(%rip),%rdi
mov    %rbx,%rsi
pop    %rbx
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [11 x i8] c"Usage: %s\0A\00"
@.str.1 = [80 x i8] c"%s <httpserver ip> p <port> m <GET/POST> u <uri> h <extra httpheader> d <data>\0A\00"
define void @usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* %3)
%5 = load i8*, i8** %2
%6 = call i32 @printf(i8* getelementptr inbounds ([80 x i8], [80 x i8]* @.str.1, i64 0, i64 0), i8* %5)
ret void
}

LLVM IR (-O2):
@.str = [11 x i8] c"Usage: %s\0A\00"
@.str.1 = [80 x i8] c"%s <httpserver ip> p <port> m <GET/POST> u <uri> h <extra httpheader> d <data>\0A\00"
define void @usage(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* %0)
%3 = tail call i32 @printf(i8* getelementptr inbounds ([80 x i8], [80 x i8]* @.str.1, i64 0, i64 0), i8* %0)
ret void
}
int __attribute((fastcall)) check_fastcall_espdiff_0(void) { return 0; }


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

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

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

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

/* Variables and functions */
void SSIDisable(uint32_t ui32Base) {
  ;
  (*((volatile uint32_t *)(ui32Base + 0x00000004))) &= ~(0x00000002);
}


x86 assembly (clang, -O0):
<SSIDisable>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x4,%eax
cltq
mov    (%rax),%ecx
and    $0xfffffffd,%ecx
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<SSIDisable>:
movslq %edi,%rax
andl   $0xfffffffd,0x4(%rax)
ret

LLVM IR (-O0):
define void @SSIDisable(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = add nsw i32 %3, 4
%5 = sext i32 %4 to i64
%6 = inttoptr i64 %5 to i32*
%7 = load volatile i32, i32* %6
%8 = and i32 %7, -3
store volatile i32 %8, i32* %6
ret void
}

LLVM IR (-O2):
define void @SSIDisable(i32 %0) {
%2 = add nsw i32 %0, 4
%3 = sext i32 %2 to i64
%4 = inttoptr i64 %3 to i32*
%5 = load volatile i32, i32* %4
%6 = and i32 %5, -3
store volatile i32 %6, i32* %4
ret void
}
/* Variables and functions */
int /*<<< orphan*/ curvisible();
viscursor() { curvisible(); }


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

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

LLVM IR (-O0):
define i32 @viscursor() {
%1 = alloca i32
%2 = call i32 (...) @curvisible()
%3 = load i32, i32* %1
ret i32 %3
}

LLVM IR (-O2):
define i32 @viscursor() {
%1 = tail call i32 (...) @curvisible()
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ assert(int /*<<< orphan*/);
int /*<<< orphan*/ free(char *);
void strFree(char *string) {
  assert(string != NULL);
  free(string);
}


x86 assembly (clang, -O0):
<strFree>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
setne  %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strFree>:
push   %rbx
mov    %rdi,%rbx
xor    %edi,%edi
test   %rbx,%rbx
setne  %dil
call   1040 <assert@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <free@plt>

LLVM IR (-O0):
define void @strFree(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
%6 = call i32 @assert(i32 %5)
%7 = load i8*, i8** %2
%8 = call i32 @free(i8* %7)
ret void
}

LLVM IR (-O2):
define void @strFree(i8* %0) {
%2 = icmp ne i8* %0, null
%3 = zext i1 %2 to i32
%4 = tail call i32 @assert(i32 %3)
%5 = tail call i32 @free(i8* %0)
ret void
}
void av_copy_packet() {}


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

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

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

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