xunge/DecIR huggingface dataset:
/* Variables and functions */
int handleGDBCommand();
void __mriCore_GdbCommandHandlingLoop(void) {
  int startDebuggeeUpAgain;
  do {
    startDebuggeeUpAgain = handleGDBCommand();
  } while (!startDebuggeeUpAgain);
}


x86 assembly (clang, -O0):
<__mriCore_GdbCommandHandlingLoop>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <handleGDBCommand@plt>
mov    %eax,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
setne  %al
xor    $0xff,%al
test   $0x1,%al
jne    1118 <__mriCore_GdbCommandHandlingLoop+0x8>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__mriCore_GdbCommandHandlingLoop>:
push   %rax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1030 <handleGDBCommand@plt>
test   %eax,%eax
je     1120 <__mriCore_GdbCommandHandlingLoop+0x10>
pop    %rax
ret

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

LLVM IR (-O2):
define void @__mriCore_GdbCommandHandlingLoop() {
br label %1
1: ; preds = %1, %0
%2 = tail call i32 (...) @handleGDBCommand()
%3 = icmp eq i32 %2, 0
br i1 %3, label %1, label %4
4: ; preds = %1
ret void
}
/* Type definitions */
typedef scalar_t__ process_id;

/* Variables and functions */
int /*<<< orphan*/ getpid();
int /*<<< orphan*/ srand(unsigned int);
int /*<<< orphan*/ time(int /*<<< orphan*/ *);
void xp_randomize(void) {
  unsigned seed = ~0;
  unsigned curtime = (unsigned)time(NULL);
  unsigned process_id = (unsigned)getpid();
  seed = curtime ^ (sizeof(process_id) == sizeof(short)
                        ? ((((short)(process_id)&0xff00) >> 8) |
                           (((short)(process_id)&0x00ff) << 8))
                    : sizeof(process_id) == sizeof(long)
                        ? ((((long)(process_id)&0xff000000) >> 24) |
                           (((long)(process_id)&0x00ff0000) >> 8) |
                           (((long)(process_id)&0x0000ff00) << 8) |
                           (((long)(process_id)&0x000000ff) << 24))
                        : (process_id));
  srand(seed);
}


x86 assembly (clang, -O0):
<xp_randomize>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0xffffffff,-0x4(%rbp)
xor    %eax,%eax
mov    %eax,%edi
call   1050 <time@plt>
mov    %eax,-0x8(%rbp)
mov    $0x0,%al
call   1030 <getpid@plt>
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
mov    -0xc(%rbp),%ecx
xor    %rcx,%rax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1040 <srand@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xp_randomize>:
push   %rbx
xor    %edi,%edi
call   1050 <time@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   1030 <getpid@plt>
xor    %eax,%ebx
mov    %ebx,%edi
pop    %rbx
jmp    1040 <srand@plt>

LLVM IR (-O0):
define void @xp_randomize() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 -1, i32* %1
%4 = call i32 @time(i32* null)
store i32 %4, i32* %2
%5 = call i32 (...) @getpid()
store i32 %5, i32* %3
%6 = load i32, i32* %2
%7 = zext i32 %6 to i64
%8 = load i32, i32* %3
%9 = zext i32 %8 to i64
%10 = xor i64 %7, %9
%11 = trunc i64 %10 to i32
store i32 %11, i32* %1
%12 = load i32, i32* %1
%13 = call i32 @srand(i32 %12)
ret void
}

LLVM IR (-O2):
define void @xp_randomize() {
%1 = tail call i32 @time(i32* null)
%2 = tail call i32 (...) @getpid()
%3 = xor i32 %2, %1
%4 = tail call i32 @srand(i32 %3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ DEBUG_ASSERT(int);
void TimerSynchronize(unsigned long ulBase, unsigned long ulTimers) {
  DEBUG_ASSERT(ulBase == 0x40030000);
  (*((volatile unsigned long *)(ulBase + 0x00000010))) = ulTimers;
}


x86 assembly (clang, -O0):
<TimerSynchronize>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpq   $0x40030000,-0x8(%rbp)
40
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <DEBUG_ASSERT@plt>
mov    -0x10(%rbp),%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,0x10(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<TimerSynchronize>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
xor    %edi,%edi
cmp    $0x40030000,%rbx
sete   %dil
call   1030 <DEBUG_ASSERT@plt>
mov    %r14,0x10(%rbx)
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define void @TimerSynchronize(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%5 = load i64, i64* %3
%6 = icmp eq i64 %5, 1073938432
%7 = zext i1 %6 to i32
%8 = call i32 @DEBUG_ASSERT(i32 %7)
%9 = load i64, i64* %4
%10 = load i64, i64* %3
%11 = add i64 %10, 16
%12 = inttoptr i64 %11 to i64*
store volatile i64 %9, i64* %12
ret void
}

LLVM IR (-O2):
define void @TimerSynchronize(i64 %0, i64 %1) {
%3 = icmp eq i64 %0, 1073938432
%4 = zext i1 %3 to i32
%5 = tail call i32 @DEBUG_ASSERT(i32 %4)
%6 = add i64 %0, 16
%7 = inttoptr i64 %6 to i64*
store volatile i64 %1, i64* %7
ret void
}
/* Type definitions */
struct sembuf {
  int member_1;
  int /*<<< orphan*/ member_2;
  int /*<<< orphan*/ member_0;
};

/* Variables and functions */
int /*<<< orphan*/ semop(int, struct sembuf *, int);
void post_v(int semid) {
  struct sembuf sops = {0, 1, 0};
  semop(semid, &sops, 1);
}


x86 assembly (clang, -O0):
<post_v>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    0xede(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    0xedc(%rip),%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%edi
lea    -0x10(%rbp),%rsi
mov    $0x1,%edx
call   1030 <semop@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<post_v>:
sub    $0x18,%rsp
mov    0xeee(%rip),%eax
mov    %eax,0x10(%rsp)
mov    0xedb(%rip),%rax
mov    %rax,0x8(%rsp)
lea    0x8(%rsp),%rsi
mov    $0x1,%edx
call   1030 <semop@plt>
add    $0x18,%rsp
ret

LLVM IR (-O0):
%struct.sembuf = type { i32, i32, i32 }
@__const.post_v.sops = %struct.sembuf { i32 0, i32 1, i32 0 }
define void @post_v(i32 %0) {
%2 = alloca i32
%3 = alloca %struct.sembuf
store i32 %0, i32* %2
%4 = bitcast %struct.sembuf* %3 to i8*
%5 = load i32, i32* %2
%6 = call i32 @semop(i32 %5, %struct.sembuf* %3, i32 1)
ret void
}

LLVM IR (-O2):
%struct.sembuf = type { i32, i32, i32 }
@__const.post_v.sops = %struct.sembuf { i32 0, i32 1, i32 0 }
define void @post_v(i32 %0) {
%2 = alloca %struct.sembuf
%3 = bitcast %struct.sembuf* %2 to i8*
%4 = call i32 @semop(i32 %0, %struct.sembuf* %2, i32 1)
ret void
}
void mn_print(const char *log) {}


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

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

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

LLVM IR (-O2):
define void @mn_print(i8* nocapture %0) {
ret void
}
int float_compare(void *num1, void *num2) {
  if (*(float *)num1 > *(float *)num2) {
    return 1;
  } else if (*(float *)num1 < *(float *)num2) {
    return -1;
  } else {
    return 0;
  }
  return 0;
}


x86 assembly (clang, -O0):
<float_compare>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
movss  (%rax),%xmm0
mov    -0x18(%rbp),%rax
ucomiss (%rax),%xmm0
jbe    112d <float_compare+0x2d>
movl   $0x1,-0x4(%rbp)
jmp    1159 <float_compare+0x59>
mov    -0x10(%rbp),%rax
movss  (%rax),%xmm1
mov    -0x18(%rbp),%rax
movss  (%rax),%xmm0
ucomiss %xmm1,%xmm0
jbe    1152 <float_compare+0x52>
movl   $0xffffffff,-0x4(%rbp)
jmp    1159 <float_compare+0x59>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<float_compare>:
movss  (%rdi),%xmm0
movss  (%rsi),%xmm1
xor    %ecx,%ecx
ucomiss %xmm0,%xmm1
seta   %cl
neg    %ecx
ucomiss %xmm1,%xmm0
mov    $0x1,%eax
cmovbe %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @float_compare(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to float*
%4 = load float, float* %3
%5 = bitcast i8* %1 to float*
%6 = load float, float* %5
%7 = fcmp ogt float %4, %6
%8 = fcmp olt float %4, %6
%9 = sext i1 %8 to i32
%10 = select i1 %7, i32 1, i32 %9
ret i32 %10
}
/* Variables and functions */
int /*<<< orphan*/ err(int, char *);
void *malloc(size_t);
void *check_malloc(size_t size) {
  void *ret = malloc(size);
  if (!ret) {
    err(1, "malloc");
  }
  return ret;
}


x86 assembly (clang, -O0):
<check_malloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <malloc@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1155 <check_malloc+0x35>
mov    $0x1,%edi
lea    0xeb0(%rip),%rsi
call   1030 <err@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<check_malloc>:
push   %rbx
call   1040 <malloc@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    113f <check_malloc+0x1f>
lea    0xecb(%rip),%rsi
mov    $0x1,%edi
call   1030 <err@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [7 x i8] c"malloc\00"
define i8* @check_malloc(i64 %0) {
%2 = alloca i64
%3 = alloca i8*
store i64 %0, i64* %2
%4 = load i64, i64* %2
%5 = call i8* @malloc(i64 %4)
store i8* %5, i8** %3
%6 = load i8*, i8** %3
%7 = icmp ne i8* %6, null
br i1 %7, label %10, label %8
8: ; preds = %1
%9 = call i32 @err(i32 1, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
br label %10
10: ; preds = %8, %1
%11 = load i8*, i8** %3
ret i8* %11
}

LLVM IR (-O2):
@.str = [7 x i8] c"malloc\00"
define noalias i8* @check_malloc(i64 %0) {
%2 = tail call i8* @malloc(i64 %0)
%3 = icmp eq i8* %2, null
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i32 @err(i32 1, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
br label %6
6: ; preds = %4, %1
ret i8* %2
}
/* Type definitions */
struct tms {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ free(struct tms *);
void delete_tms(struct tms *ptms) { free(ptms); }


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

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

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

LLVM IR (-O2):
%struct.tms = type { i32 }
define void @delete_tms(%struct.tms* nocapture %0) {
%2 = tail call i32 @free(%struct.tms* %0)
ret void
}
/* Variables and functions */
int fabs(double);
int isTwoDoubleNumEqual(double d1, double d2) {
  if (fabs(d1 - d2) < 1e-5)
    return 1;
  else
    return 0;
}


x86 assembly (clang, -O0):
<isTwoDoubleNumEqual>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x10(%rbp)
movsd  %xmm1,-0x18(%rbp)
movsd  -0x10(%rbp),%xmm0
subsd  -0x18(%rbp),%xmm0
call   1030 <fabs@plt>
cvtsi2sd %eax,%xmm1
movsd  0xec3(%rip),%xmm0
ucomisd %xmm1,%xmm0
jbe    1153 <isTwoDoubleNumEqual+0x43>
movl   $0x1,-0x4(%rbp)
jmp    115a <isTwoDoubleNumEqual+0x4a>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<isTwoDoubleNumEqual>:
push   %rax
subsd  %xmm1,%xmm0
call   1030 <fabs@plt>
xor    %ecx,%ecx
test   %eax,%eax
setle  %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @isTwoDoubleNumEqual(double %0, double %1) {
%3 = alloca i32
%4 = alloca double
%5 = alloca double
store double %0, double* %4
store double %1, double* %5
%6 = load double, double* %4
%7 = load double, double* %5
%8 = fsub double %6, %7
%9 = call i32 @fabs(double %8)
%10 = sitofp i32 %9 to double
%11 = fcmp olt double %10, 1.000000e-05
br i1 %11, label %12, label %13
12: ; preds = %2
store i32 1, i32* %3
br label %14
13: ; preds = %2
store i32 0, i32* %3
br label %14
14: ; preds = %13, %12
%15 = load i32, i32* %3
ret i32 %15
}

LLVM IR (-O2):
define i32 @isTwoDoubleNumEqual(double %0, double %1) {
%3 = fsub double %0, %1
%4 = tail call i32 @fabs(double %3)
%5 = icmp slt i32 %4, 1
%6 = zext i1 %5 to i32
ret i32 %6
}
float test_logf(float x) { return __builtin_logf(x); }


x86 assembly (clang, -O0):
<test_logf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
call   1030 <logf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_logf>:
jmp    1030 <logf@plt>

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

LLVM IR (-O2):
define float @test_logf(float %0) {
%2 = tail call float @logf(float %0)
ret float %2
}
void g_locale_from_utf8() {}


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

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

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

LLVM IR (-O2):
define void @g_locale_from_utf8() {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
uint32_t asuint(float f) {
  union {
    float f;
    uint32_t i;
  } u = {f};
  return u.i;
}


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

x86 assembly (clang, -O2):
<asuint>:
movd   %xmm0,%eax
ret

LLVM IR (-O0):
%union.anon = type { float }
define i32 @asuint(float %0) {
%2 = alloca float
%3 = alloca %union.anon
store float %0, float* %2
%4 = bitcast %union.anon* %3 to float*
%5 = load float, float* %2
store float %5, float* %4
%6 = bitcast %union.anon* %3 to i32*
%7 = load i32, i32* %6
ret i32 %7
}

LLVM IR (-O2):
define i32 @asuint(float %0) {
%2 = bitcast float %0 to i32
ret i32 %2
}
/* Type definitions */
typedef int /*<<< orphan*/ CRYPTO_THREAD_ID;

/* Variables and functions */
CRYPTO_THREAD_ID CRYPTO_THREAD_get_current_id(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @CRYPTO_THREAD_get_current_id() {
ret i32 0
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  scalar_t__ save_under;
};
typedef TYPE_1__ XWindowAttributes;

/* Variables and functions */
int get_XWindowAttributes_save_under(void *_p) {
  return (int)((XWindowAttributes *)_p)->save_under;
}


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

x86 assembly (clang, -O2):
<get_XWindowAttributes_save_under>:
mov    (%rdi),%eax
ret

LLVM IR (-O0):
%struct.TYPE_2__ = type { i64 }
define i32 @get_XWindowAttributes_save_under(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = bitcast i8* %3 to %struct.TYPE_2__*
%5 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %4, i32 0, i32 0
%6 = load i64, i64* %5
%7 = trunc i64 %6 to i32
ret i32 %7
}

LLVM IR (-O2):
define i32 @get_XWindowAttributes_save_under(i8* nocapture %0) {
%2 = bitcast i8* %0 to i64*
%3 = load i64, i64* %2
%4 = trunc i64 %3 to i32
ret i32 %4
}
/* Type definitions */
typedef int /*<<< orphan*/ sqlite3;

/* Variables and functions */
int getSQLResultInt(int /*<<< orphan*/ *, char *);
char *sqlite3_mprintf(char *, char *, char *);
int searchForUser(sqlite3 *db, char *username, char *password) {
  int result;
  char *sql = sqlite3_mprintf("Select EXISTS(Select * From Database "
                              "Where Username = '%q' and Password = '%q');",
                              username, password);
  result = getSQLResultInt(db, sql);
  return result;
}


x86 assembly (clang, -O0):
<searchForUser>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
lea    0xebd(%rip),%rdi
call   1040 <sqlite3_mprintf@plt>
mov    %rax,-0x28(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x28(%rbp),%rsi
call   1030 <getSQLResultInt@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<searchForUser>:
push   %rbx
mov    %rdi,%rbx
lea    0xed5(%rip),%rdi
call   1040 <sqlite3_mprintf@plt>
mov    %rbx,%rdi
mov    %rax,%rsi
pop    %rbx
jmp    1030 <getSQLResultInt@plt>

LLVM IR (-O0):
@.str = [81 x i8] c"Select EXISTS(Select * From Database Where Username = '%q' and Password = '%q');\00"
define i32 @searchForUser(i32* %0, i8* %1, i8* %2) {
%4 = alloca i32*
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i32
%8 = alloca i8*
store i32* %0, i32** %4
store i8* %1, i8** %5
store i8* %2, i8** %6
%9 = load i8*, i8** %5
%10 = load i8*, i8** %6
%11 = call i8* @sqlite3_mprintf(i8* getelementptr inbounds ([81 x i8], [81 x i8]* @.str, i64 0, i64 0), i8* %9, i8* %10)
store i8* %11, i8** %8
%12 = load i32*, i32** %4
%13 = load i8*, i8** %8
%14 = call i32 @getSQLResultInt(i32* %12, i8* %13)
store i32 %14, i32* %7
%15 = load i32, i32* %7
ret i32 %15
}

LLVM IR (-O2):
@.str = [81 x i8] c"Select EXISTS(Select * From Database Where Username = '%q' and Password = '%q');\00"
define i32 @searchForUser(i32* %0, i8* %1, i8* %2) {
%4 = tail call i8* @sqlite3_mprintf(i8* getelementptr inbounds ([81 x i8], [81 x i8]* @.str, i64 0, i64 0), i8* %1, i8* %2)
%5 = tail call i32 @getSQLResultInt(i32* %0, i8* %4)
ret i32 %5
}
int t1_init_ctxno_mag(int f) {
  int n;
  if (!(f & 0x2000)) {
    n = (f & ((0x0010 | 0x0001 | 0x0020 | 0x0002 | 0x0040 | 0x0004 | 0x0080 |
               0x0008)))
            ? 1
            : 0;
  } else {
    n = 2;
  }
  return ((0 + 1) + 9) + n;
}


x86 assembly (clang, -O0):
<t1_init_ctxno_mag>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
and    $0x2000,%eax
cmp    $0x0,%eax
jne    1136 <t1_init_ctxno_mag+0x36>
mov    -0x4(%rbp),%edx
and    $0xff,%edx
xor    %eax,%eax
mov    $0x1,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
mov    %eax,-0x8(%rbp)
jmp    113d <t1_init_ctxno_mag+0x3d>
movl   $0x2,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0xa,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<t1_init_ctxno_mag>:
cmp    $0x1,%dil
mov    $0xb,%ecx
sbb    $0x0,%ecx
test   $0x2000,%edi
mov    $0xc,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @t1_init_ctxno_mag(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = and i32 %4, 8192
%6 = icmp ne i32 %5, 0
br i1 %6, label %13, label %7
7: ; preds = %1
%8 = load i32, i32* %2
%9 = and i32 %8, 255
%10 = icmp ne i32 %9, 0
%11 = zext i1 %10 to i64
%12 = select i1 %10, i32 1, i32 0
store i32 %12, i32* %3
br label %14
13: ; preds = %1
store i32 2, i32* %3
br label %14
14: ; preds = %13, %7
%15 = load i32, i32* %3
%16 = add nsw i32 10, %15
ret i32 %16
}

LLVM IR (-O2):
define i32 @t1_init_ctxno_mag(i32 %0) {
%2 = and i32 %0, 8192
%3 = icmp eq i32 %2, 0
%4 = and i32 %0, 255
%5 = icmp eq i32 %4, 0
%6 = select i1 %5, i32 10, i32 11
%7 = select i1 %3, i32 %6, i32 12
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ abort();
int /*<<< orphan*/ assert(int /*<<< orphan*/);
int /*<<< orphan*/ perror(char *);
char *strndup(char const *, size_t);
char *xstrndup(const char *s, size_t n) {
  char *new;
  assert(s != NULL);
  new = strndup(s, n);
  if (new == NULL) {
    perror("xstrndup");
    abort();
  }
  return new;
}


x86 assembly (clang, -O0):
<xstrndup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpq   $0x0,-0x8(%rbp)
setne  %al
and    $0x1,%al
movzbl %al,%edi
call   1050 <assert@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1040 <strndup@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    1191 <xstrndup+0x51>
lea    0xe7b(%rip),%rdi
call   1060 <perror@plt>
mov    $0x0,%al
call   1030 <abort@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xstrndup>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
xor    %edi,%edi
test   %rbx,%rbx
setne  %dil
call   1050 <assert@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
call   1040 <strndup@plt>
test   %rax,%rax
je     1170 <xstrndup+0x30>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret
lea    0xe89(%rip),%rdi
call   1060 <perror@plt>
xor    %eax,%eax
call   1030 <abort@plt>

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

LLVM IR (-O2):
@.str = [9 x i8] c"xstrndup\00"
define noalias i8* @xstrndup(i8* %0, i64 %1) {
%3 = icmp ne i8* %0, null
%4 = zext i1 %3 to i32
%5 = tail call i32 @assert(i32 %4)
%6 = tail call i8* @strndup(i8* %0, i64 %1)
%7 = icmp eq i8* %6, null
br i1 %7, label %8, label %11
8: ; preds = %2
%9 = tail call i32 @perror(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
%10 = tail call i32 (...) @abort()
unreachable
11: ; preds = %2
ret i8* %6
}
/* Variables and functions */
int /*<<< orphan*/ clang_analyzer_eval(int);
scalar_t__ strncmp(char *, char *, int);
void strncmp_constant_and_var_0() {
  char *x = "123";
  clang_analyzer_eval(strncmp(x, "123", 3) == 0);
}


x86 assembly (clang, -O0):
<strncmp_constant_and_var_0>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xed1(%rip),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xec2(%rip),%rsi
mov    $0x3,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <clang_analyzer_eval@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strncmp_constant_and_var_0>:
push   %rax
lea    0xed8(%rip),%rdi
mov    %rdi,%rsi
mov    $0x3,%edx
call   1030 <strncmp@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
pop    %rax
jmp    1040 <clang_analyzer_eval@plt>

LLVM IR (-O0):
@.str = [4 x i8] c"123\00"
define void @strncmp_constant_and_var_0() {
%1 = alloca i8*
store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8** %1
%2 = load i8*, i8** %1
%3 = call i64 @strncmp(i8* %2, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 3)
%4 = icmp eq i64 %3, 0
%5 = zext i1 %4 to i32
%6 = call i32 @clang_analyzer_eval(i32 %5)
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"123\00"
define void @strncmp_constant_and_var_0() {
%1 = tail call i64 @strncmp(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 3)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @clang_analyzer_eval(i32 %3)
ret void
}
/* Type definitions */
typedef int __le16;

/* Variables and functions */
int cpu_to_le16(int);
int ieee80211_is_coding_dcrd(__le16 fc) {
  return (fc & cpu_to_le16(0x000c | 0x00f0)) == cpu_to_le16(0x000c | 0x0090);
}


x86 assembly (clang, -O0):
<ieee80211_is_coding_dcrd>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    $0xfc,%edi
call   1030 <cpu_to_le16@plt>
mov    %eax,%ecx
mov    -0xc(%rbp),%eax
and    %ecx,%eax
mov    %eax,-0x8(%rbp)
mov    $0x9c,%edi
call   1030 <cpu_to_le16@plt>
mov    %eax,%ecx
mov    -0x8(%rbp),%eax
cmp    %ecx,%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ieee80211_is_coding_dcrd>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebx
mov    $0xfc,%edi
call   1030 <cpu_to_le16@plt>
mov    %eax,%ebp
and    %ebx,%ebp
mov    $0x9c,%edi
call   1030 <cpu_to_le16@plt>
xor    %ecx,%ecx
cmp    %eax,%ebp
sete   %cl
mov    %ecx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @ieee80211_is_coding_dcrd(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @cpu_to_le16(i32 252)
%5 = and i32 %3, %4
%6 = call i32 @cpu_to_le16(i32 156)
%7 = icmp eq i32 %5, %6
%8 = zext i1 %7 to i32
ret i32 %8
}

LLVM IR (-O2):
define i32 @ieee80211_is_coding_dcrd(i32 %0) {
%2 = tail call i32 @cpu_to_le16(i32 252)
%3 = and i32 %2, %0
%4 = tail call i32 @cpu_to_le16(i32 156)
%5 = icmp eq i32 %3, %4
%6 = zext i1 %5 to i32
ret i32 %6
}
char *strsep(pp, delim)
char **pp;
const char *delim;
{
  char *p, *q;
  if (!(p = *pp))
    return 0;
  if (q = strpbrk(p, delim)) {
    *pp = q + 1;
    *q = '\0';
  } else
    *pp = 0;
  return p;
}


x86 assembly (clang, -O0):
<strsep>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%rax
mov    %rax,-0x20(%rbp)
cmp    $0x0,%rax
jne    1142 <strsep+0x32>
movq   $0x0,-0x8(%rbp)
jmp    118b <strsep+0x7b>
mov    -0x20(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1030 <strpbrk@plt>
mov    %rax,-0x28(%rbp)
cmp    $0x0,%rax
je     1178 <strsep+0x68>
mov    -0x28(%rbp),%rcx
add    $0x1,%rcx
mov    -0x10(%rbp),%rax
mov    %rcx,(%rax)
mov    -0x28(%rbp),%rax
movb   $0x0,(%rax)
jmp    1183 <strsep+0x73>
mov    -0x10(%rbp),%rax
movq   $0x0,(%rax)
mov    -0x20(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strsep>:
push   %r14
push   %rbx
push   %rax
mov    (%rdi),%rbx
test   %rbx,%rbx
je     1142 <strsep+0x32>
mov    %rdi,%r14
mov    %rbx,%rdi
call   1030 <strpbrk@plt>
test   %rax,%rax
je     113b <strsep+0x2b>
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,(%r14)
movb   $0x0,(%rax)
jmp    1142 <strsep+0x32>
movq   $0x0,(%r14)
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define i8* @strsep(i8** nocapture %0, i8* nocapture %1) {
%3 = load i8*, i8** %0
%4 = icmp eq i8* %3, null
br i1 %4, label %11, label %5
5: ; preds = %2
%6 = tail call i8* @strpbrk(i8* %3, i8* %1)
%7 = icmp eq i8* %6, null
br i1 %7, label %10, label %8
8: ; preds = %5
%9 = getelementptr inbounds i8, i8* %6, i64 1
store i8* %9, i8** %0
store i8 0, i8* %6
br label %11
10: ; preds = %5
store i8* null, i8** %0
br label %11
11: ; preds = %8, %10, %2
ret i8* %3
}
/* Variables and functions */
int /*<<< orphan*/ get_input(int);
int /*<<< orphan*/ max_pair_prod(int);
int /*<<< orphan*/ printf(char *, int /*<<< orphan*/);
int scanf(char *, int *);
int main() {
  int n = 0, res = 0;
  res = scanf("%d", &n);
  get_input(n);
  printf("%llu", max_pair_prod(n));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
lea    0xe9c(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1050 <scanf@plt>
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%edi
call   1060 <get_input@plt>
mov    -0x8(%rbp),%edi
call   1040 <max_pair_prod@plt>
mov    %eax,%esi
lea    0xe7a(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
movl   $0x0,0x4(%rsp)
lea    0xeb0(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1050 <scanf@plt>
mov    0x4(%rsp),%edi
call   1060 <get_input@plt>
mov    0x4(%rsp),%edi
call   1040 <max_pair_prod@plt>
lea    0xe90(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@.str.1 = [5 x i8] c"%llu\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
store i32 0, i32* %1
%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 i32 @get_input(i32 %4)
%6 = load i32, i32* %1
%7 = call i32 @max_pair_prod(i32 %6)
%8 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i32 %7)
ret i32 0
}
void log_info(const char *type, int code, const char *msg) {
  (void)type;
  (void)code;
  (void)msg;
}


x86 assembly (clang, -O0):
<log_info>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @log_info(i8* nocapture %0, i32 %1, i8* nocapture %2) {
ret void
}
jump(label) int label;
{
  ot("jmp ");
  printlabel(label);
  nl();
}


x86 assembly (clang, -O0):
<jump>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
lea    0xebe(%rip),%rdi
mov    $0x0,%al
call   1040 <ot@plt>
mov    -0x8(%rbp),%edi
mov    $0x0,%al
call   1050 <printlabel@plt>
mov    $0x0,%al
call   1030 <nl@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<jump>:
push   %rbx
mov    %edi,%ebx
lea    0xec6(%rip),%rdi
xor    %eax,%eax
call   1040 <ot@plt>
mov    %ebx,%edi
xor    %eax,%eax
call   1050 <printlabel@plt>
xor    %eax,%eax
pop    %rbx
jmp    1030 <nl@plt>

LLVM IR (-O0):
@.str = [5 x i8] c"jmp \00"
define i32 @jump(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = call i32 (i8*, ...) bitcast (i32 (...)* @ot to i32 (i8*, ...)*)(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%5 = load i32, i32* %3
%6 = call i32 (i32, ...) bitcast (i32 (...)* @printlabel to i32 (i32, ...)*)(i32 %5)
%7 = call i32 (...) @nl()
%8 = load i32, i32* %2
ret i32 %8
}

LLVM IR (-O2):
@.str = [5 x i8] c"jmp \00"
define i32 @jump(i32 %0) {
%2 = tail call i32 (i8*, ...) bitcast (i32 (...)* @ot to i32 (i8*, ...)*)(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 (i32, ...) bitcast (i32 (...)* @printlabel to i32 (i32, ...)*)(i32 %0)
%4 = tail call i32 (...) @nl()
ret i32 undef
}
void wolfs_log(const char *function, const char *fmt, ...) {}


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

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

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

LLVM IR (-O2):
define void @wolfs_log(i8* nocapture %0, i8* nocapture %1, ...) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ ffvers(float *);
int /*<<< orphan*/ fp_msg(char *);
int /*<<< orphan*/ sprintf(char *, char *, float);
int fp_version(void) {
  float version;
  char cfitsioversion[40];
  fp_msg("1.7.0 (Dec 2013)");
  ffvers(&version);
  sprintf(cfitsioversion, " CFITSIO version %5.3f", version);
  fp_msg(cfitsioversion);
  fp_msg("\n");
  return (0);
}


x86 assembly (clang, -O0):
<fp_version>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
lea    0xec1(%rip),%rdi
call   1030 <fp_msg@plt>
lea    -0x4(%rbp),%rdi
call   1040 <ffvers@plt>
lea    -0x30(%rbp),%rdi
movss  -0x4(%rbp),%xmm0
lea    0xeb4(%rip),%rsi
call   1050 <sprintf@plt>
lea    -0x30(%rbp),%rdi
call   1030 <fp_msg@plt>
lea    0xeb6(%rip),%rdi
call   1030 <fp_msg@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fp_version>:
push   %rbx
sub    $0x40,%rsp
lea    0xec4(%rip),%rdi
call   1030 <fp_msg@plt>
lea    0xc(%rsp),%rdi
call   1040 <ffvers@plt>
movss  0xc(%rsp),%xmm0
lea    0xeb9(%rip),%rsi
lea    0x10(%rsp),%rbx
mov    %rbx,%rdi
call   1050 <sprintf@plt>
mov    %rbx,%rdi
call   1030 <fp_msg@plt>
lea    0xeb4(%rip),%rdi
call   1030 <fp_msg@plt>
xor    %eax,%eax
add    $0x40,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [17 x i8] c"1.7.0 (Dec 2013)\00"
@.str.1 = [23 x i8] c" CFITSIO version %5.3f\00"
@.str.2 = [2 x i8] c"\0A\00"
define i32 @fp_version() {
%1 = alloca float
%2 = alloca [40 x i8]
%3 = call i32 @fp_msg(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @ffvers(float* %1)
%5 = getelementptr inbounds [40 x i8], [40 x i8]* %2, i64 0, i64 0
%6 = load float, float* %1
%7 = call i32 @sprintf(i8* %5, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.1, i64 0, i64 0), float %6)
%8 = getelementptr inbounds [40 x i8], [40 x i8]* %2, i64 0, i64 0
%9 = call i32 @fp_msg(i8* %8)
%10 = call i32 @fp_msg(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [17 x i8] c"1.7.0 (Dec 2013)\00"
@.str.1 = [23 x i8] c" CFITSIO version %5.3f\00"
@.str.2 = [2 x i8] c"\0A\00"
define i32 @fp_version() {
%1 = alloca float
%2 = alloca [40 x i8]
%3 = bitcast float* %1 to i8*
%4 = getelementptr inbounds [40 x i8], [40 x i8]* %2, i64 0, i64 0
%5 = tail call i32 @fp_msg(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
%6 = call i32 @ffvers(float* %1)
%7 = load float, float* %1
%8 = call i32 @sprintf(i8* %4, i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @.str.1, i64 0, i64 0), float %7)
%9 = call i32 @fp_msg(i8* %4)
%10 = call i32 @fp_msg(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ uart_init();
void _start(void) {
  uart_init();
  extern int main();
  main(0, 0);
  exit(0);
}


x86 assembly (clang, -O0):
<_start>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <uart_init@plt>
xor    %esi,%esi
mov    %esi,%edi
mov    $0x0,%al
call   1040 <main@plt>
xor    %edi,%edi
call   1050 <exit@plt>

x86 assembly (clang, -O2):
<_start>:
push   %rax
xor    %eax,%eax
call   1030 <uart_init@plt>
xor    %edi,%edi
xor    %esi,%esi
xor    %eax,%eax
call   1040 <main@plt>
xor    %edi,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
define void @_start() {
%1 = call i32 (...) @uart_init()
%2 = call i32 (i32, i32, ...) bitcast (i32 (...)* @main to i32 (i32, i32, ...)*)(i32 0, i32 0)
%3 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
define void @_start() {
%1 = tail call i32 (...) @uart_init()
%2 = tail call i32 (i32, i32, ...) bitcast (i32 (...)* @main to i32 (i32, i32, ...)*)(i32 0, i32 0)
%3 = tail call i32 @exit(i32 0)
unreachable
}
/* Variables and functions */
void test_close_streams(void) {}


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

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

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

LLVM IR (-O2):
define void @test_close_streams() {
ret void
}
/* Variables and functions */
unsigned long ktime_get_real_seconds();
unsigned long get_seconds(void) { return ktime_get_real_seconds(); }


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

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

LLVM IR (-O0):
define i64 @get_seconds() {
%1 = call i64 (...) @ktime_get_real_seconds()
ret i64 %1
}

LLVM IR (-O2):
define i64 @get_seconds() {
%1 = tail call i64 (...) @ktime_get_real_seconds()
ret i64 %1
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int);
int main() {
  int a = 123456;
  int b = 98765;
  printf("before : a = %d, b = %d\n", a, b);
  a = a ^ b;
  b = a ^ b;
  a = a ^ b;
  printf("after  : a = %d, b = %d\n", a, b);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x1e240,-0x8(%rbp)
movl   $0x181cd,-0xc(%rbp)
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
lea    0xec6(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
xor    -0xc(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
xor    -0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
xor    -0xc(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
lea    0xeb2(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [25 x i8] c"before : a = %d, b = %d\0A\00"
@.str.1 = [25 x i8] c"after : a = %d, b = %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
store i32 123456, i32* %2
store i32 98765, i32* %3
%4 = load i32, i32* %2
%5 = load i32, i32* %3
%6 = call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), i32 %4, i32 %5)
%7 = load i32, i32* %2
%8 = load i32, i32* %3
%9 = xor i32 %7, %8
store i32 %9, i32* %2
%10 = load i32, i32* %2
%11 = load i32, i32* %3
%12 = xor i32 %10, %11
store i32 %12, i32* %3
%13 = load i32, i32* %2
%14 = load i32, i32* %3
%15 = xor i32 %13, %14
store i32 %15, i32* %2
%16 = load i32, i32* %2
%17 = load i32, i32* %3
%18 = call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.1, i64 0, i64 0), i32 %16, i32 %17)
ret i32 0
}

LLVM IR (-O2):
@.str = [25 x i8] c"before : a = %d, b = %d\0A\00"
@.str.1 = [25 x i8] c"after : a = %d, b = %d\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), i32 123456, i32 98765)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.1, i64 0, i64 0), i32 98765, i32 123456)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ caesar(char *, char *, int);
int /*<<< orphan*/ free(char *);
char *malloc(int);
int /*<<< orphan*/ printf(char *, char *);
int strlen(char *);
void run_caesar(char *input, int shift) {
  char *output = malloc(strlen(input) * sizeof(char));
  caesar(output, input, shift);
  printf("%s\n", output);
  free(output);
}


x86 assembly (clang, -O0):
<run_caesar>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <strlen@plt>
cltq
shl    $0x0,%rax
mov    %eax,%edi
call   1070 <malloc@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x8(%rbp),%rsi
mov    -0xc(%rbp),%edx
call   1060 <caesar@plt>
mov    -0x18(%rbp),%rsi
lea    0xe6c(%rip),%rdi
call   1050 <printf@plt>
mov    -0x18(%rbp),%rdi
call   1030 <free@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<run_caesar>:
push   %rbp
push   %r14
push   %rbx
mov    %esi,%r14d
mov    %rdi,%rbx
call   1040 <strlen@plt>
mov    %eax,%edi
call   1070 <malloc@plt>
mov    %rax,%rbp
mov    %rax,%rdi
mov    %rbx,%rsi
mov    %r14d,%edx
call   1060 <caesar@plt>
lea    0xe82(%rip),%rdi
mov    %rbp,%rsi
call   1050 <printf@plt>
mov    %rbp,%rdi
pop    %rbx
pop    %r14
pop    %rbp
jmp    1030 <free@plt>

LLVM IR (-O0):
@.str = [4 x i8] c"%s\0A\00"
define void @run_caesar(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
%5 = alloca i8*
store i8* %0, i8** %3
store i32 %1, i32* %4
%6 = load i8*, i8** %3
%7 = call i32 @strlen(i8* %6)
%8 = sext i32 %7 to i64
%9 = mul i64 %8, 1
%10 = trunc i64 %9 to i32
%11 = call i8* @malloc(i32 %10)
store i8* %11, i8** %5
%12 = load i8*, i8** %5
%13 = load i8*, i8** %3
%14 = load i32, i32* %4
%15 = call i32 @caesar(i8* %12, i8* %13, i32 %14)
%16 = load i8*, i8** %5
%17 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %16)
%18 = load i8*, i8** %5
%19 = call i32 @free(i8* %18)
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"%s\0A\00"
define void @run_caesar(i8* %0, i32 %1) {
%3 = tail call i32 @strlen(i8* %0)
%4 = tail call i8* @malloc(i32 %3)
%5 = tail call i32 @caesar(i8* %4, i8* %0, i32 %1)
%6 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %4)
%7 = tail call i32 @free(i8* %4)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ stderr;
FILE *AbreFicheiro(char *nome, char *mode) {
  FILE *f;
  f = fopen(nome, mode);
  if (f == NULL) {
    fprintf(stderr, "ERROR: It is not possible to open file %s!\n", nome);
    exit(1);
  }
  return (f);
}


x86 assembly (clang, -O0):
<AbreFicheiro>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1040 <fopen@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    117f <AbreFicheiro+0x4f>
mov    0x2e7d(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xe90(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1050 <exit@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<AbreFicheiro>:
push   %rbx
mov    %rdi,%rbx
call   1040 <fopen@plt>
test   %rax,%rax
je     1140 <AbreFicheiro+0x10>
pop    %rbx
ret
mov    0x2e99(%rip),%rax
mov    (%rax),%edi
lea    0xeb0(%rip),%rsi
mov    %rbx,%rdx
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [44 x i8] c"ERROR: It is not possible to open file %s!\0A\00"
define i32* @AbreFicheiro(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i32*
store i8* %0, i8** %3
store i8* %1, i8** %4
%6 = load i8*, i8** %3
%7 = load i8*, i8** %4
%8 = call i32* @fopen(i8* %6, i8* %7)
store i32* %8, i32** %5
%9 = load i32*, i32** %5
%10 = icmp eq i32* %9, null
br i1 %10, label %11, label %16
11: ; preds = %2
%12 = load i32, i32* @stderr
%13 = load i8*, i8** %3
%14 = call i32 @fprintf(i32 %12, i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str, i64 0, i64 0), i8* %13)
%15 = call i32 @exit(i32 1)
unreachable
16: ; preds = %2
%17 = load i32*, i32** %5
ret i32* %17
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [44 x i8] c"ERROR: It is not possible to open file %s!\0A\00"
define noalias i32* @AbreFicheiro(i8* %0, i8* nocapture %1) {
%3 = tail call i32* @fopen(i8* %0, i8* %1)
%4 = icmp eq i32* %3, null
br i1 %4, label %5, label %9
5: ; preds = %2
%6 = load i32, i32* @stderr
%7 = tail call i32 @fprintf(i32 %6, i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str, i64 0, i64 0), i8* %0)
%8 = tail call i32 @exit(i32 1)
unreachable
9: ; preds = %2
ret i32* %3
}
/* Variables and functions */
long double pow(double, double);
long double powl(long double x, long double y) {
  return pow((double)x, (double)y);
}


x86 assembly (clang, -O0):
<powl>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
fldt   0x20(%rbp)
fldt   0x10(%rbp)
fstpt  -0x10(%rbp)
fstpt  -0x20(%rbp)
fldt   -0x10(%rbp)
fstpl  -0x30(%rbp)
movsd  -0x30(%rbp),%xmm0
fldt   -0x20(%rbp)
fstpl  -0x28(%rbp)
movsd  -0x28(%rbp),%xmm1
call   1030 <pow@plt>
fld    %st(0)
fstp   %st(0)
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<powl>:
fldt   0x18(%rsp)
fldt   0x8(%rsp)
fstpl  -0x8(%rsp)
movsd  -0x8(%rsp),%xmm0
fstpl  -0x10(%rsp)
movsd  -0x10(%rsp),%xmm1
jmp    1030 <pow@plt>

LLVM IR (-O0):
define x86_fp80 @powl(x86_fp80 %0, x86_fp80 %1) {
%3 = alloca x86_fp80
%4 = alloca x86_fp80
store x86_fp80 %0, x86_fp80* %3
store x86_fp80 %1, x86_fp80* %4
%5 = load x86_fp80, x86_fp80* %3
%6 = fptrunc x86_fp80 %5 to double
%7 = load x86_fp80, x86_fp80* %4
%8 = fptrunc x86_fp80 %7 to double
%9 = call x86_fp80 @pow(double %6, double %8)
ret x86_fp80 %9
}

LLVM IR (-O2):
define x86_fp80 @powl(x86_fp80 %0, x86_fp80 %1) {
%3 = fptrunc x86_fp80 %0 to double
%4 = fptrunc x86_fp80 %1 to double
%5 = tail call x86_fp80 @pow(double %3, double %4)
ret x86_fp80 %5
}
int nvg__isTransformFlipped(const float *xform) {
  float det = xform[0] * xform[3] - xform[2] * xform[1];
  return (det < 0);
}


x86 assembly (clang, -O0):
<nvg__isTransformFlipped>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movss  (%rax),%xmm0
mov    -0x8(%rbp),%rax
movss  0xc(%rax),%xmm2
mov    -0x8(%rbp),%rax
movss  0x8(%rax),%xmm1
mov    -0x8(%rbp),%rax
mulss  0x4(%rax),%xmm1
movd   %xmm1,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
movss  %xmm0,-0xc(%rbp)
xorps  %xmm0,%xmm0
ucomiss -0xc(%rbp),%xmm0
seta   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<nvg__isTransformFlipped>:
movss  (%rdi),%xmm0
movss  0x4(%rdi),%xmm1
mulss  0x8(%rdi),%xmm1
mulss  0xc(%rdi),%xmm0
subss  %xmm1,%xmm0
xorps  %xmm1,%xmm1
xor    %eax,%eax
ucomiss %xmm0,%xmm1
seta   %al
ret

LLVM IR (-O0):
define i32 @nvg__isTransformFlipped(float* %0) {
%2 = alloca float*
%3 = alloca float
store float* %0, float** %2
%4 = load float*, float** %2
%5 = getelementptr inbounds float, float* %4, i64 0
%6 = load float, float* %5
%7 = load float*, float** %2
%8 = getelementptr inbounds float, float* %7, i64 3
%9 = load float, float* %8
%10 = load float*, float** %2
%11 = getelementptr inbounds float, float* %10, i64 2
%12 = load float, float* %11
%13 = load float*, float** %2
%14 = getelementptr inbounds float, float* %13, i64 1
%15 = load float, float* %14
%16 = fmul float %12, %15
%17 = fneg float %16
%18 = call float @llvm.fmuladd.f32(float %6, float %9, float %17)
store float %18, float* %3
%19 = load float, float* %3
%20 = fcmp olt float %19, 0.000000e+00
%21 = zext i1 %20 to i32
ret i32 %21
}

LLVM IR (-O2):
define i32 @nvg__isTransformFlipped(float* nocapture %0) {
%2 = load float, float* %0
%3 = getelementptr inbounds float, float* %0, i64 3
%4 = load float, float* %3
%5 = getelementptr inbounds float, float* %0, i64 2
%6 = load float, float* %5
%7 = getelementptr inbounds float, float* %0, i64 1
%8 = load float, float* %7
%9 = fneg float %6
%10 = fmul float %8, %9
%11 = tail call float @llvm.fmuladd.f32(float %2, float %4, float %10)
%12 = fcmp olt float %11, 0.000000e+00
%13 = zext i1 %12 to i32
ret i32 %13
}