xunge/DecIR huggingface dataset:
__attribute__((always_)) int alternatives_text_reserved(void *start,
                                                        void *end) {
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @alternatives_text_reserved(i8* nocapture readnone %0, i8* nocapture readnone %1) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, unsigned char);
int main(int argc, char const *argv[]) {
  float valuef = 1245.4545;
  unsigned char value;
  value = (unsigned char)valuef;
  printf("%d\n", value);
  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)
movl   $0x449bae8b,-0x14(%rbp)
cvttss2si -0x14(%rbp),%eax
mov    %al,-0x15(%rbp)
lea    0xec4(%rip),%rdi
movzbl -0x15(%rbp),%esi
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 = [4 x i8] c"%d\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca float
%7 = alloca i8
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store float 0x409375D160000000, float* %6
%8 = load float, float* %6
%9 = fptoui float %8 to i8
store i8 %9, i8* %7
%10 = load i8, i8* %7
%11 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8 zeroext %10)
ret i32 0
}

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8 zeroext poison)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ uart_configure();
void initserial(void) { uart_configure(); }


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

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

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

LLVM IR (-O2):
define void @initserial() {
%1 = tail call i32 (...) @uart_configure()
ret void
}
void _TFC4Blog5Assetg17internetMediaTypeSS() {}


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

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

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

LLVM IR (-O2):
define void @_TFC4Blog5Assetg17internetMediaTypeSS() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
void g2(void) {
  printf("%s:Hello World\n",
         "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
         "2022-01-22/02-19-57/repos/OrangeTide/build/refs/heads/master/example/"
         "g/g2.c");
}


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

x86 assembly (clang, -O2):
<g2>:
lea    0xee9(%rip),%rdi
lea    0xef2(%rip),%rsi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [16 x i8] c"%s:Hello World\0A\00"
@.str.1 = [140 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/OrangeTide/build/refs/heads/master/example/g/g2.c\00"
define void @g2() {
%1 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([140 x i8], [140 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [16 x i8] c"%s:Hello World\0A\00"
@.str.1 = [140 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/OrangeTide/build/refs/heads/master/example/g/g2.c\00"
define void @g2() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([140 x i8], [140 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Type definitions */
struct message {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ message_add_peer(struct message *);
int /*<<< orphan*/ message_add_use(struct message *);
void message_insert(struct message *M) {
  message_add_use(M);
  message_add_peer(M);
}


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

x86 assembly (clang, -O2):
<message_insert>:
push   %rbx
mov    %rdi,%rbx
call   1030 <message_add_use@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1040 <message_add_peer@plt>

LLVM IR (-O0):
%struct.message = type { i32 }
define void @message_insert(%struct.message* %0) {
%2 = alloca %struct.message*
store %struct.message* %0, %struct.message** %2
%3 = load %struct.message*, %struct.message** %2
%4 = call i32 @message_add_use(%struct.message* %3)
%5 = load %struct.message*, %struct.message** %2
%6 = call i32 @message_add_peer(%struct.message* %5)
ret void
}

LLVM IR (-O2):
%struct.message = type { i32 }
define void @message_insert(%struct.message* %0) {
%2 = tail call i32 @message_add_use(%struct.message* %0)
%3 = tail call i32 @message_add_peer(%struct.message* %0)
ret void
}
void swap(char *arr[], int i, int j) {
  char *temp = arr[i];
  arr[i] = arr[j];
  arr[j] = temp;
}


x86 assembly (clang, -O0):
<swap>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,8),%rdx
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    %rdx,(%rax,%rcx,8)
mov    -0x18(%rbp),%rdx
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    %rdx,(%rax,%rcx,8)
pop    %rbp
ret

x86 assembly (clang, -O2):
<swap>:
movslq %esi,%rax
mov    (%rdi,%rax,8),%rcx
movslq %edx,%rdx
mov    (%rdi,%rdx,8),%rsi
mov    %rsi,(%rdi,%rax,8)
mov    %rcx,(%rdi,%rdx,8)
ret

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

LLVM IR (-O2):
define void @swap(i8** nocapture %0, i32 %1, i32 %2) {
%4 = sext i32 %1 to i64
%5 = getelementptr inbounds i8*, i8** %0, i64 %4
%6 = load i8*, i8** %5
%7 = sext i32 %2 to i64
%8 = getelementptr inbounds i8*, i8** %0, i64 %7
%9 = load i8*, i8** %8
store i8* %9, i8** %5
store i8* %6, i8** %8
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void c_free(void *arg) {
  if (arg) {
    free(arg);
  }
}


x86 assembly (clang, -O0):
<c_free>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1130 <c_free+0x20>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @c_free(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = tail call i32 @free(i8* %0)
br label %5
5: ; preds = %3, %1
ret void
}
void integer_free(void *a) { (void)a; }


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

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

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

LLVM IR (-O2):
define void @integer_free(i8* nocapture %0) {
ret void
}
int test_and_clear_bit(int nr, volatile void *addr) {
  int oldbit;
  asm volatile("lock ; btrl %2,%1 ; sbbl %0,%0"
               : "=r"(oldbit), "=m"(*(volatile long *)addr)
               : "Ir"(nr), "m"(*(volatile long *)addr)
               : "memory");
  return oldbit;
}


x86 assembly (clang, -O0):
<test_and_clear_bit>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    -0x4(%rbp),%ecx
mov    -0x10(%rbp),%rdx
lock btr %ecx,(%rax)
sbb    %eax,%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_and_clear_bit>:
lock btr %edi,(%rsi)
sbb    %eax,%eax
ret

LLVM IR (-O0):
define i32 @test_and_clear_bit(i32 %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i32
store i32 %0, i32* %3
store i8* %1, i8** %4
%6 = load i8*, i8** %4
%7 = bitcast i8* %6 to i64*
%8 = load i32, i32* %3
%9 = load i8*, i8** %4
%10 = bitcast i8* %9 to i64*
%11 = call i32 asm sideeffect "lock ; btrl $2,$1 ; sbbl $0,$0", "=r,=*m,Ir,*m,~{memory},~{dirflag},~{fpsr},~{flags}"(i64* elementtype(i64) %7, i32 %8, i64* elementtype(i64) %10)
store i32 %11, i32* %5
%12 = load i32, i32* %5
ret i32 %12
}

LLVM IR (-O2):
define i32 @test_and_clear_bit(i32 %0, i8* %1) {
%3 = bitcast i8* %1 to i64*
%4 = tail call i32 asm sideeffect "lock ; btrl $2,$1 ; sbbl $0,$0", "=r,=*m,Ir,*m,~{memory},~{dirflag},~{fpsr},~{flags}"(i64* elementtype(i64) %3, i32 %0, i64* elementtype(i64) %3)
ret i32 %4
}
short REAL_TO_INT(float var) {
  short newvar = (short)var;
  return newvar;
}


x86 assembly (clang, -O0):
<REAL_TO_INT>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
cvttss2si %xmm0,%eax
mov    %ax,-0x6(%rbp)
movswl -0x6(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<REAL_TO_INT>:
cvttss2si %xmm0,%eax
ret

LLVM IR (-O0):
define signext i16 @REAL_TO_INT(float %0) {
%2 = alloca float
%3 = alloca i16
store float %0, float* %2
%4 = load float, float* %2
%5 = fptosi float %4 to i16
store i16 %5, i16* %3
%6 = load i16, i16* %3
ret i16 %6
}

LLVM IR (-O2):
define signext i16 @REAL_TO_INT(float %0) {
%2 = fptosi float %0 to i16
ret i16 %2
}
/* Variables and functions */
int f();
int g() { return f(); }


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

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

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

LLVM IR (-O2):
define i32 @g() {
%1 = tail call i32 (...) @f()
ret i32 %1
}
_Complex double f8() { return 1.0; }


x86 assembly (clang, -O0):
<f8>:
push   %rbp
mov    %rsp,%rbp
movabs $0x3ff0000000000000,%rax
mov    %rax,-0x10(%rbp)
movq   $0x0,-0x8(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  -0x8(%rbp),%xmm1
pop    %rbp
ret

x86 assembly (clang, -O2):
<f8>:
movsd  0xef8(%rip),%xmm0
xorps  %xmm1,%xmm1
ret

LLVM IR (-O0):
define { double, double } @f8() {
%1 = alloca { double, double }
%2 = getelementptr inbounds { double, double }, { double, double }* %1, i32 0, i32 0
%3 = getelementptr inbounds { double, double }, { double, double }* %1, i32 0, i32 1
store double 1.000000e+00, double* %2
store double 0.000000e+00, double* %3
%4 = load { double, double }, { double, double }* %1
ret { double, double } %4
}

LLVM IR (-O2):
define { double, double } @f8() {
ret { double, double } { double 1.000000e+00, double 0.000000e+00 }
}
/* Variables and functions */
int /*<<< orphan*/ log_level(int /*<<< orphan*/);
int log_level_compare(int /*<<< orphan*/, int);
int log_debug_enable() { return log_level_compare(log_level(0), 1); }


x86 assembly (clang, -O0):
<log_debug_enable>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
call   1030 <log_level@plt>
mov    %eax,%edi
mov    $0x1,%esi
call   1040 <log_level_compare@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<log_debug_enable>:
push   %rax
xor    %edi,%edi
call   1030 <log_level@plt>
mov    %eax,%edi
mov    $0x1,%esi
pop    %rax
jmp    1040 <log_level_compare@plt>

LLVM IR (-O0):
define i32 @log_debug_enable() {
%1 = call i32 @log_level(i32 0)
%2 = call i32 @log_level_compare(i32 %1, i32 1)
ret i32 %2
}

LLVM IR (-O2):
define i32 @log_debug_enable() {
%1 = tail call i32 @log_level(i32 0)
%2 = tail call i32 @log_level_compare(i32 %1, i32 1)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void test_list_sort(void) { printf("test\n"); }


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

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

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

LLVM IR (-O2):
@str = [5 x i8] c"test\00"
define void @test_list_sort() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fflush(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ sleep(int);
int /*<<< orphan*/ stdout;
int main(void) {
  int i;
  for (i = 0; i <= 100; i++) {
    printf("\rPercent complete: %d%% ", i);
    fflush(stdout);
    sleep(1);
  }
  printf("\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x64,-0x8(%rbp)
jg     1187 <main+0x57>
mov    -0x8(%rbp),%esi
lea    0xea6(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    0x2e78(%rip),%rax
mov    (%rax),%edi
call   1040 <fflush@plt>
mov    $0x1,%edi
call   1050 <sleep@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1146 <main+0x16>
lea    0xe8b(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r14
push   %rbx
lea    0xeb5(%rip),%r14
mov    0x2e8e(%rip),%rbx
xor    %ebp,%ebp
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    %r14,%rdi
mov    %ebp,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    (%rbx),%edi
call   1050 <fflush@plt>
mov    $0x1,%edi
call   1060 <sleep@plt>
add    $0x1,%ebp
cmp    $0x65,%ebp
jne    1160 <main+0x20>
mov    $0xa,%edi
call   1030 <putchar@plt>
xor    %eax,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
@.str = [25 x i8] c"\0DPercent complete: %d%% \00"
@stdout = global i32 0
@.str.1 = [2 x i8] c"\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %2
br label %3
3: ; preds = %12, %0
%4 = load i32, i32* %2
%5 = icmp sle i32 %4, 100
br i1 %5, label %6, label %15
6: ; preds = %3
%7 = load i32, i32* %2
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), i32 %7)
%9 = load i32, i32* @stdout
%10 = call i32 @fflush(i32 %9)
%11 = call i32 @sleep(i32 1)
br label %12
12: ; preds = %6
%13 = load i32, i32* %2
%14 = add nsw i32 %13, 1
store i32 %14, i32* %2
br label %3
15: ; preds = %3
%16 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [25 x i8] c"\0DPercent complete: %d%% \00"
@stdout = global i32 0
define i32 @main() {
br label %1
1: ; preds = %0, %1
%2 = phi i32 [ 0, %0 ], [ %7, %1 ]
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), i32 %2)
%4 = load i32, i32* @stdout
%5 = tail call i32 @fflush(i32 %4)
%6 = tail call i32 @sleep(i32 1)
%7 = add nuw nsw i32 %2, 1
%8 = icmp eq i32 %7, 101
br i1 %8, label %9, label %1
9: ; preds = %1
%10 = tail call i32 @putchar(i32 10)
ret i32 0
}
void abrirArchivo() {}


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

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

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

LLVM IR (-O2):
define void @abrirArchivo() {
ret void
}
float Immato_Clamp(float in_t) {
  return (in_t < 0.f) ? 0.f : (in_t > 1.f) ? 1.f : in_t;
}


x86 assembly (clang, -O0):
<Immato_Clamp>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
xorps  %xmm0,%xmm0
ucomiss -0x4(%rbp),%xmm0
jbe    1123 <Immato_Clamp+0x23>
xorps  %xmm0,%xmm0
movss  %xmm0,-0x8(%rbp)
jmp    115f <Immato_Clamp+0x5f>
movss  -0x4(%rbp),%xmm0
movss  0xed0(%rip),%xmm1
ucomiss %xmm1,%xmm0
jbe    114b <Immato_Clamp+0x4b>
movss  0xebf(%rip),%xmm0
movss  %xmm0,-0xc(%rbp)
jmp    1155 <Immato_Clamp+0x55>
movss  -0x4(%rbp),%xmm0
movss  %xmm0,-0xc(%rbp)
movss  -0xc(%rbp),%xmm0
movss  %xmm0,-0x8(%rbp)
movss  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<Immato_Clamp>:
movss  0xef8(%rip),%xmm1
minss  %xmm0,%xmm1
xorps  %xmm2,%xmm2
cmpltss %xmm2,%xmm0
andnps %xmm1,%xmm0
ret

LLVM IR (-O0):
define float @Immato_Clamp(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = fcmp olt float %3, 0.000000e+00
br i1 %4, label %5, label %6
5: ; preds = %1
br label %14
6: ; preds = %1
%7 = load float, float* %2
%8 = fcmp ogt float %7, 1.000000e+00
br i1 %8, label %9, label %10
9: ; preds = %6
br label %12
10: ; preds = %6
%11 = load float, float* %2
br label %12
12: ; preds = %10, %9
%13 = phi float [ 1.000000e+00, %9 ], [ %11, %10 ]
br label %14
14: ; preds = %12, %5
%15 = phi float [ 0.000000e+00, %5 ], [ %13, %12 ]
ret float %15
}

LLVM IR (-O2):
define float @Immato_Clamp(float %0) {
%2 = fcmp olt float %0, 0.000000e+00
%3 = fcmp ogt float %0, 1.000000e+00
%4 = select i1 %3, float 1.000000e+00, float %0
%5 = select i1 %2, float 0.000000e+00, float %4
ret float %5
}
/* Variables and functions */
scalar_t__ __VERIFIER_nondet_int();
int main() {
  int a[1048];
  int k = 0;
  while (a[k] >= 0 && k < 1048) {
    if (__VERIFIER_nondet_int()) {
      k++;
    } else {
      a[k]--;
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x1080,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x1074(%rbp)
movslq -0x1074(%rbp),%rcx
xor    %eax,%eax
cmpl   $0x0,-0x1070(%rbp,%rcx,4)
mov    %al,-0x1075(%rbp)
jl     115c <main+0x4c>
cmpl   $0x418,-0x1074(%rbp)
setl   %al
mov    %al,-0x1075(%rbp)
mov    -0x1075(%rbp),%al
test   $0x1,%al
jne    116f <main+0x5f>
jmp    11b1 <main+0xa1>
mov    $0x0,%al
call   1030 <__VERIFIER_nondet_int@plt>
cmp    $0x0,%rax
je     1194 <main+0x84>
mov    -0x1074(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1074(%rbp)
jmp    11ac <main+0x9c>
movslq -0x1074(%rbp),%rax
mov    -0x1070(%rbp,%rax,4),%ecx
add    $0xffffffff,%ecx
mov    %ecx,-0x1070(%rbp,%rax,4)
jmp    112c <main+0x1c>
xor    %eax,%eax
add    $0x1080,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
unsigned long crb_save_env(void) { return 0xc000000000000000ul; }


x86 assembly (clang, -O0):
<crb_save_env>:
push   %rbp
mov    %rsp,%rbp
movabs $0xc000000000000000,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<crb_save_env>:
movabs $0xc000000000000000,%rax
ret

LLVM IR (-O0):
define i64 @crb_save_env() {
ret i64 -4611686018427387904
}

LLVM IR (-O2):
define i64 @crb_save_env() {
ret i64 -4611686018427387904
}
const char *rot3d_version(void) {
  return ("rot3d : V1.02 Peter Boesecke 2012-06-04");
}


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

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

LLVM IR (-O0):
@.str = [40 x i8] c"rot3d : V1.02 Peter Boesecke 2012-06-04\00"
define i8* @rot3d_version() {
ret i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [40 x i8] c"rot3d : V1.02 Peter Boesecke 2012-06-04\00"
define i8* @rot3d_version() {
ret i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str, i64 0, i64 0)
}
/* Variables and functions */
size_t mpc55xx_non_cache_aligned_size(void const *);
size_t mpc55xx_cache_aligned_size(const void *s, size_t n) {
  return (n - mpc55xx_non_cache_aligned_size(s)) & ~((uintptr_t)0x1f);
}


x86 assembly (clang, -O0):
<mpc55xx_cache_aligned_size>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <mpc55xx_non_cache_aligned_size@plt>
mov    %rax,%rcx
mov    -0x18(%rbp),%rax
sub    %rcx,%rax
and    $0xffffffffffffffe0,%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mpc55xx_cache_aligned_size>:
push   %rbx
mov    %rsi,%rbx
call   1030 <mpc55xx_non_cache_aligned_size@plt>
sub    %rax,%rbx
and    $0xffffffffffffffe0,%rbx
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
define i64 @mpc55xx_cache_aligned_size(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 = load i8*, i8** %3
%7 = call i64 @mpc55xx_non_cache_aligned_size(i8* %6)
%8 = sub i64 %5, %7
%9 = and i64 %8, -32
ret i64 %9
}

LLVM IR (-O2):
define i64 @mpc55xx_cache_aligned_size(i8* %0, i64 %1) {
%3 = tail call i64 @mpc55xx_non_cache_aligned_size(i8* %0)
%4 = sub i64 %1, %3
%5 = and i64 %4, -32
ret i64 %5
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *);
int /*<<< orphan*/ fputs(char *, int /*<<< orphan*/ *);
main() {
  FILE *fp;
  fp = fopen("/tmp/test.txt", "w+");
  fprintf(fp, "This is testing for fprintf... \n");
  fputs("This is testing for fputs... \n", fp);
  fclose(fp);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeaa(%rip),%rdi
lea    0xeb1(%rip),%rsi
call   1060 <fopen@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
lea    0xea0(%rip),%rsi
call   1050 <fprintf@plt>
mov    -0x10(%rbp),%rsi
lea    0xeb1(%rip),%rdi
call   1040 <fputs@plt>
mov    -0x10(%rbp),%rdi
call   1030 <fclose@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xec8(%rip),%rdi
lea    0xecf(%rip),%rsi
call   1040 <fopen@plt>
mov    %rax,%rbx
lea    0xec3(%rip),%rdi
mov    $0x20,%esi
mov    $0x1,%edx
mov    %rax,%rcx
call   1050 <fwrite@plt>
lea    0xecb(%rip),%rdi
mov    $0x1e,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1050 <fwrite@plt>
mov    %rbx,%rdi
call   1030 <fclose@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [14 x i8] c"/tmp/test.txt\00"
@.str.1 = [3 x i8] c"w+\00"
@.str.2 = [33 x i8] c"This is testing for fprintf... \0A\00"
@.str.3 = [31 x i8] c"This is testing for fputs... \0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32*
store i32 0, i32* %1
%3 = call i32* @fopen(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
store i32* %3, i32** %2
%4 = load i32*, i32** %2
%5 = call i32 @fprintf(i32* %4, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.2, i64 0, i64 0))
%6 = load i32*, i32** %2
%7 = call i32 @fputs(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.3, i64 0, i64 0), i32* %6)
%8 = load i32*, i32** %2
%9 = call i32 @fclose(i32* %8)
ret i32 0
}

LLVM IR (-O2):
@.str = [14 x i8] c"/tmp/test.txt\00"
@.str.1 = [3 x i8] c"w+\00"
@.str.2 = [33 x i8] c"This is testing for fprintf... \0A\00"
@.str.3 = [31 x i8] c"This is testing for fputs... \0A\00"
define i32 @main() {
%1 = tail call i32* @fopen(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%2 = tail call i64 @fwrite(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.2, i64 0, i64 0), i64 32, i64 1, i32* %1)
%3 = tail call i64 @fwrite(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.3, i64 0, i64 0), i64 30, i64 1, i32* %1)
%4 = tail call i32 @fclose(i32* %1)
ret i32 0
}
/* Variables and functions */
unsigned int inet_addr(char const *);
unsigned int SolveIP(const char *ip) {
  ;
  if (!ip)
    return 0;
  return inet_addr(ip);
}


x86 assembly (clang, -O0):
<SolveIP>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1133 <SolveIP+0x23>
movl   $0x0,-0x4(%rbp)
jmp    113f <SolveIP+0x2f>
mov    -0x10(%rbp),%rdi
call   1030 <inet_addr@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @SolveIP(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = tail call i32 @inet_addr(i8* %0)
br label %5
5: ; preds = %1, %3
%6 = phi i32 [ %4, %3 ], [ 0, %1 ]
ret i32 %6
}
int is_space(char c) { return (unsigned char)c <= ' '; }


x86 assembly (clang, -O0):
<is_space>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%eax
cmp    $0x20,%eax
setle  %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_space>:
xor    %eax,%eax
cmp    $0x21,%dil
setb   %al
ret

LLVM IR (-O0):
define i32 @is_space(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = zext i8 %3 to i32
%5 = icmp sle i32 %4, 32
%6 = zext i1 %5 to i32
ret i32 %6
}

LLVM IR (-O2):
define i32 @is_space(i8 signext %0) {
%2 = icmp ult i8 %0, 33
%3 = zext i1 %2 to i32
ret i32 %3
}
int tegra_gpu_enable_node(void *blob, const char *gpupath) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @tegra_gpu_enable_node(i8* nocapture readnone %0, i8* nocapture readnone %1) {
ret i32 0
}
int main(int argc, char **argv) {
  int x;
  float r = argc;
  if (!(0 < r)) {
    x = 7;
  } else {
    x = 42;
  }
  return x;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cvtsi2ssl -0x8(%rbp),%xmm0
movss  %xmm0,-0x18(%rbp)
movss  -0x18(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomiss %xmm1,%xmm0
ja     1139 <main+0x39>
movl   $0x7,-0x14(%rbp)
jmp    1140 <main+0x40>
movl   $0x2a,-0x14(%rbp)
mov    -0x14(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
test   %edi,%edi
mov    $0x2a,%ecx
mov    $0x7,%eax
cmovg  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca float
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%8 = load i32, i32* %4
%9 = sitofp i32 %8 to float
store float %9, float* %7
%10 = load float, float* %7
%11 = fcmp olt float 0.000000e+00, %10
br i1 %11, label %13, label %12
12: ; preds = %2
store i32 7, i32* %6
br label %14
13: ; preds = %2
store i32 42, i32* %6
br label %14
14: ; preds = %13, %12
%15 = load i32, i32* %6
ret i32 %15
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = icmp sgt i32 %0, 0
%4 = select i1 %3, i32 42, i32 7
ret i32 %4
}
/* Variables and functions */
char *ctime(long *);
char *time_str(long timeval) { return ctime(&timeval); }


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

x86 assembly (clang, -O2):
<time_str>:
push   %rax
mov    %rdi,(%rsp)
mov    %rsp,%rdi
call   1030 <ctime@plt>
pop    %rcx
ret

LLVM IR (-O0):
define i8* @time_str(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = call i8* @ctime(i64* %2)
ret i8* %3
}

LLVM IR (-O2):
define i8* @time_str(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = call i8* @ctime(i64* %2)
ret i8* %3
}
int path_is_absolute(const char *p) { return p[0] == '/'; }


x86 assembly (clang, -O0):
<path_is_absolute>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x2f,%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<path_is_absolute>:
xor    %eax,%eax
cmpb   $0x2f,(%rdi)
sete   %al
ret

LLVM IR (-O0):
define i32 @path_is_absolute(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = getelementptr inbounds i8, i8* %3, i64 0
%5 = load i8, i8* %4
%6 = sext i8 %5 to i32
%7 = icmp eq i32 %6, 47
%8 = zext i1 %7 to i32
ret i32 %8
}

LLVM IR (-O2):
define i32 @path_is_absolute(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 47
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
int errno;
int lj_vm_errno(void) { return errno; }


x86 assembly (clang, -O0):
<lj_vm_errno>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ed5(%rip),%rax
mov    (%rax),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<lj_vm_errno>:
mov    0x2ed9(%rip),%rax
mov    (%rax),%eax
ret

LLVM IR (-O0):
@errno = global i32 0
define i32 @lj_vm_errno() {
%1 = load i32, i32* @errno
ret i32 %1
}

LLVM IR (-O2):
@errno = global i32 0
define i32 @lj_vm_errno() {
%1 = load i32, i32* @errno
ret i32 %1
}
/* Variables and functions */
int InitialisationAvecService(char *);
int Initialisation() { return InitialisationAvecService("13214"); }


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

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

LLVM IR (-O0):
@.str = [6 x i8] c"13214\00"
define i32 @Initialisation() {
%1 = call i32 @InitialisationAvecService(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
ret i32 %1
}

LLVM IR (-O2):
@.str = [6 x i8] c"13214\00"
define i32 @Initialisation() {
%1 = tail call i32 @InitialisationAvecService(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
ret i32 %1
}
/* Variables and functions */
int hex2dec(int);
int twohex(int c0, int c1) { return hex2dec(c0) << 4 | hex2dec(c1); }


x86 assembly (clang, -O0):
<twohex>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <hex2dec@plt>
shl    $0x4,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%edi
call   1030 <hex2dec@plt>
mov    %eax,%ecx
mov    -0xc(%rbp),%eax
or     %ecx,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<twohex>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
call   1030 <hex2dec@plt>
mov    %eax,%ebp
shl    $0x4,%ebp
mov    %ebx,%edi
call   1030 <hex2dec@plt>
or     %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @twohex(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = call i32 @hex2dec(i32 %5)
%7 = shl i32 %6, 4
%8 = load i32, i32* %4
%9 = call i32 @hex2dec(i32 %8)
%10 = or i32 %7, %9
ret i32 %10
}

LLVM IR (-O2):
define i32 @twohex(i32 %0, i32 %1) {
%3 = tail call i32 @hex2dec(i32 %0)
%4 = shl i32 %3, 4
%5 = tail call i32 @hex2dec(i32 %1)
%6 = or i32 %4, %5
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ link_failure_y0l();
scalar_t__ y0l(long double);
void test_y0l(long double ld) {
  if (y0l(ld) != y0l(ld))
    link_failure_y0l();
}


x86 assembly (clang, -O0):
<test_y0l>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
fldt   0x10(%rbp)
fstpt  -0x10(%rbp)
fldt   -0x10(%rbp)
mov    %rsp,%rax
fstpt  (%rax)
call   1030 <y0l@plt>
mov    %rax,-0x18(%rbp)
fldt   -0x10(%rbp)
mov    %rsp,%rax
fstpt  (%rax)
call   1030 <y0l@plt>
mov    %rax,%rcx
mov    -0x18(%rbp),%rax
cmp    %rcx,%rax
je     1163 <test_y0l+0x43>
mov    $0x0,%al
call   1040 <link_failure_y0l@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_y0l>:
push   %rbx
sub    $0x20,%rsp
fldt   0x30(%rsp)
fld    %st(0)
fstpt  0x14(%rsp)
fstpt  (%rsp)
call   1030 <y0l@plt>
mov    %rax,%rbx
fldt   0x14(%rsp)
fstpt  (%rsp)
call   1030 <y0l@plt>
cmp    %rax,%rbx
jne    1151 <test_y0l+0x31>
add    $0x20,%rsp
pop    %rbx
ret
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbx
jmp    1040 <link_failure_y0l@plt>

LLVM IR (-O0):
define void @test_y0l(x86_fp80 %0) {
%2 = alloca x86_fp80
store x86_fp80 %0, x86_fp80* %2
%3 = load x86_fp80, x86_fp80* %2
%4 = call i64 @y0l(x86_fp80 %3)
%5 = load x86_fp80, x86_fp80* %2
%6 = call i64 @y0l(x86_fp80 %5)
%7 = icmp ne i64 %4, %6
br i1 %7, label %8, label %10
8: ; preds = %1
%9 = call i32 (...) @link_failure_y0l()
br label %10
10: ; preds = %8, %1
ret void
}

LLVM IR (-O2):
define void @test_y0l(x86_fp80 %0) {
%2 = tail call i64 @y0l(x86_fp80 %0)
%3 = tail call i64 @y0l(x86_fp80 %0)
%4 = icmp eq i64 %2, %3
br i1 %4, label %7, label %5
5: ; preds = %1
%6 = tail call i32 (...) @link_failure_y0l()
br label %7
7: ; preds = %5, %1
ret void
}
void Version_0err_entry_get(int i, char **m, char **f, int *l) {}


x86 assembly (clang, -O0):
<Version_0err_entry_get>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @Version_0err_entry_get(i32 %0, i8** %1, i8** %2, i32* %3) {
%5 = alloca i32
%6 = alloca i8**
%7 = alloca i8**
%8 = alloca i32*
store i32 %0, i32* %5
store i8** %1, i8*** %6
store i8** %2, i8*** %7
store i32* %3, i32** %8
ret void
}

LLVM IR (-O2):
define void @Version_0err_entry_get(i32 %0, i8** nocapture %1, i8** nocapture %2, i32* nocapture %3) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
scalar_t__ calloc(int, int);
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, int);
int /*<<< orphan*/ stderr;
double *dvector(int n) {
  double *v;
  v = (double *)calloc(n, sizeof(double));
  if (v == NULL) {
    fprintf(stderr, "couldn't reserve memory for an %i vector\n", n);
    exit(EXIT_FAILURE);
  }
  return v;
}


x86 assembly (clang, -O0):
<dvector>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
mov    $0x8,%esi
call   1030 <calloc@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    117d <dvector+0x4d>
mov    0x2e82(%rip),%rax
mov    (%rax),%edi
mov    -0x4(%rbp),%edx
lea    0xe96(%rip),%rsi
call   1040 <fprintf@plt>
mov    0x2e62(%rip),%rax
mov    (%rax),%edi
call   1050 <exit@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dvector>:
push   %rbx
mov    %edi,%ebx
mov    $0x8,%esi
call   1030 <calloc@plt>
test   %rax,%rax
je     1144 <dvector+0x14>
pop    %rbx
ret
mov    0x2e95(%rip),%rax
mov    (%rax),%edi
lea    0xeac(%rip),%rsi
mov    %ebx,%edx
call   1040 <fprintf@plt>
mov    0x2e76(%rip),%rax
mov    (%rax),%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [42 x i8] c"couldn't reserve memory for an %i vector\0A\00"
@EXIT_FAILURE = global i32 0
define double* @dvector(i32 %0) {
%2 = alloca i32
%3 = alloca double*
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = call i64 @calloc(i32 %4, i32 8)
%6 = inttoptr i64 %5 to double*
store double* %6, double** %3
%7 = load double*, double** %3
%8 = icmp eq double* %7, null
br i1 %8, label %9, label %15
9: ; preds = %1
%10 = load i32, i32* @stderr
%11 = load i32, i32* %2
%12 = call i32 @fprintf(i32 %10, i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str, i64 0, i64 0), i32 %11)
%13 = load i32, i32* @EXIT_FAILURE
%14 = call i32 @exit(i32 %13)
unreachable
15: ; preds = %1
%16 = load double*, double** %3
ret double* %16
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [42 x i8] c"couldn't reserve memory for an %i vector\0A\00"
@EXIT_FAILURE = global i32 0
define double* @dvector(i32 %0) {
%2 = tail call i64 @calloc(i32 %0, i32 8)
%3 = icmp eq i64 %2, 0
br i1 %3, label %4, label %9
4: ; preds = %1
%5 = load i32, i32* @stderr
%6 = tail call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str, i64 0, i64 0), i32 %0)
%7 = load i32, i32* @EXIT_FAILURE
%8 = tail call i32 @exit(i32 %7)
unreachable
9: ; preds = %1
%10 = inttoptr i64 %2 to double*
ret double* %10
}
void call_data(struct window *w, void *data) {
  void (*func)(struct window *) = data;
  func(w);
}


x86 assembly (clang, -O0):
<call_data>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    -0x8(%rbp),%rdi
call   *%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<call_data>:
jmp    *%rsi

LLVM IR (-O0):
%struct.window = type opaque
define void @call_data(%struct.window* %0, i8* %1) {
%3 = alloca %struct.window*
%4 = alloca i8*
%5 = alloca void (%struct.window*)*
store %struct.window* %0, %struct.window** %3
store i8* %1, i8** %4
%6 = load i8*, i8** %4
%7 = bitcast i8* %6 to void (%struct.window*)*
store void (%struct.window*)* %7, void (%struct.window*)** %5
%8 = load void (%struct.window*)*, void (%struct.window*)** %5
%9 = load %struct.window*, %struct.window** %3
ret void
}

LLVM IR (-O2):
%struct.window = type opaque
define void @call_data(%struct.window* %0, i8* nocapture %1) {
%3 = bitcast i8* %1 to void (%struct.window*)*
tail call void %3(%struct.window* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ test_augeas_comment_entities();
int /*<<< orphan*/ test_augeas_comments();
void all_augeas_tests() {
  test_augeas_comments();
  test_augeas_comment_entities();
}


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

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

LLVM IR (-O0):
define void @all_augeas_tests() {
%1 = call i32 (...) @test_augeas_comments()
%2 = call i32 (...) @test_augeas_comment_entities()
ret void
}

LLVM IR (-O2):
define void @all_augeas_tests() {
%1 = tail call i32 (...) @test_augeas_comments()
%2 = tail call i32 (...) @test_augeas_comment_entities()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ hello(int);
int main(void) {
  hello(1);
  hello(2);
  hello(3);
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @hello(i32 1)
%2 = tail call i32 @hello(i32 2)
%3 = tail call i32 @hello(i32 3)
ret i32 0
}
/* Variables and functions */
double __ocml_ldexp_f64(double, int);
double ldexp(double x, int e) { return __ocml_ldexp_f64(x, e); }


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

x86 assembly (clang, -O2):
<ldexp>:
jmp    1030 <__ocml_ldexp_f64@plt>

LLVM IR (-O0):
define double @ldexp(double %0, i32 %1) {
%3 = alloca double
%4 = alloca i32
store double %0, double* %3
store i32 %1, i32* %4
%5 = load double, double* %3
%6 = load i32, i32* %4
%7 = call double @__ocml_ldexp_f64(double %5, i32 %6)
ret double %7
}

LLVM IR (-O2):
define double @ldexp(double %0, i32 %1) {
%3 = tail call double @__ocml_ldexp_f64(double %0, i32 %1)
ret double %3
}
int simulated_while_with_and_linear(int p) {
  int i = 0;
  int k = 0;
LOOP_COND:
  if (k == 0 && i < p) {
    goto INCR;
  } else {
    goto RETURN;
  }
INCR:
  i++;
  goto LOOP_COND;
RETURN:
  return i;
}


x86 assembly (clang, -O0):
<simulated_while_with_and_linear>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
jne    1130 <simulated_while_with_and_linear+0x30>
mov    -0x8(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    1130 <simulated_while_with_and_linear+0x30>
jmp    1135 <simulated_while_with_and_linear+0x35>
jmp    1143 <simulated_while_with_and_linear+0x43>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1115 <simulated_while_with_and_linear+0x15>
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<simulated_while_with_and_linear>:
xor    %eax,%eax
test   %edi,%edi
cmovg  %edi,%eax
ret

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

LLVM IR (-O2):
define i32 @simulated_while_with_and_linear(i32 %0) {
%2 = call i32 @llvm.smax.i32(i32 %0, i32 0)
ret i32 %2
}
/* Variables and functions */
char *U_WMRCORENONE_set(char *);
char *U_WMR3A_set(void) { return U_WMRCORENONE_set("U_WMR3A"); }


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

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

LLVM IR (-O0):
@.str = [8 x i8] c"U_WMR3A\00"
define i8* @U_WMR3A_set() {
%1 = call i8* @U_WMRCORENONE_set(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
ret i8* %1
}

LLVM IR (-O2):
@.str = [8 x i8] c"U_WMR3A\00"
define i8* @U_WMR3A_set() {
%1 = tail call i8* @U_WMRCORENONE_set(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
ret i8* %1
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void dummy_smb() { printf("\n"); }


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

x86 assembly (clang, -O2):
<dummy_smb>:
mov    $0xa,%edi
jmp    1030 <putchar@plt>

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

LLVM IR (-O2):
define void @dummy_smb() {
%1 = tail call i32 @putchar(i32 10)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
int /*<<< orphan*/ scanf(char *, int *);
char *solve(int);
int main() {
  int year;
  scanf("%d", &year);
  int result_size;
  char *result = solve(year);
  printf("%s\n", result);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeba(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1050 <scanf@plt>
mov    -0x8(%rbp),%edi
call   1030 <solve@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rsi
lea    0xe9d(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xec8(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1050 <scanf@plt>
mov    0x4(%rsp),%edi
call   1030 <solve@plt>
lea    0xeb1(%rip),%rdi
mov    %rax,%rsi
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@.str.1 = [4 x i8] c"%s\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%4 = load i32, i32* %1
%5 = call i8* @solve(i32 %4)
%6 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %5)
ret i32 0
}
int bar(int b) { return 2 * b; }


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

x86 assembly (clang, -O2):
<bar>:
lea    (%rdi,%rdi,1),%eax
ret

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

LLVM IR (-O2):
define i32 @bar(i32 %0) {
%2 = shl nsw i32 %0, 1
ret i32 %2
}