xunge/DecIR huggingface dataset:
/* Type definitions */
typedef int uint32_t;
typedef int volatile int32_t;

/* Variables and functions */
int /*<<< orphan*/ ASSERT(int);
int32_t ADCSequenceOverflow(uint32_t ui32Base, uint32_t ui32SequenceNum) {
  ASSERT((ui32Base == 0x40038000) || (ui32Base == 0x40039000));
  ASSERT(ui32SequenceNum < 4);
  return ((*((volatile uint32_t *)(ui32Base + 0x00000010))) &
          (1 << ui32SequenceNum));
}


x86 assembly (clang, -O0):
<ADCSequenceOverflow>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    $0x1,%al
cmpl   $0x40038000,-0x4(%rbp)
mov    %al,-0x9(%rbp)
je     113d <ADCSequenceOverflow+0x2d>
cmpl   $0x40039000,-0x4(%rbp)
sete   %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
and    $0x1,%al
movzbl %al,%edi
call   1030 <ASSERT@plt>
cmpl   $0x4,-0x8(%rbp)
setl   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <ASSERT@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%eax
cltq
mov    (%rax),%eax
mov    -0x8(%rbp),%ecx
mov    $0x1,%edx
shl    %cl,%edx
mov    %edx,%ecx
and    %ecx,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ADCSequenceOverflow>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
mov    %edi,%eax
and    $0xffffefff,%eax
xor    %edi,%edi
cmp    $0x40038000,%eax
sete   %dil
call   1030 <ASSERT@plt>
xor    %edi,%edi
cmp    $0x4,%ebx
setl   %dil
call   1030 <ASSERT@plt>
mov    $0x1,%eax
mov    %ebx,%ecx
shl    %cl,%eax
movslq %ebp,%rcx
and    0x10(%rcx),%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @ADCSequenceOverflow(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 = icmp eq i32 %5, 1073971200
br i1 %6, label %10, label %7
7: ; preds = %2
%8 = load i32, i32* %3
%9 = icmp eq i32 %8, 1073975296
br label %10
10: ; preds = %7, %2
%11 = phi i1 [ true, %2 ], [ %9, %7 ]
%12 = zext i1 %11 to i32
%13 = call i32 @ASSERT(i32 %12)
%14 = load i32, i32* %4
%15 = icmp slt i32 %14, 4
%16 = zext i1 %15 to i32
%17 = call i32 @ASSERT(i32 %16)
%18 = load i32, i32* %3
%19 = add nsw i32 %18, 16
%20 = sext i32 %19 to i64
%21 = inttoptr i64 %20 to i32*
%22 = load volatile i32, i32* %21
%23 = load i32, i32* %4
%24 = shl i32 1, %23
%25 = and i32 %22, %24
ret i32 %25
}

LLVM IR (-O2):
define i32 @ADCSequenceOverflow(i32 %0, i32 %1) {
%3 = and i32 %0, -4097
%4 = icmp eq i32 %3, 1073971200
%5 = zext i1 %4 to i32
%6 = tail call i32 @ASSERT(i32 %5)
%7 = icmp slt i32 %1, 4
%8 = zext i1 %7 to i32
%9 = tail call i32 @ASSERT(i32 %8)
%10 = add nsw i32 %0, 16
%11 = sext i32 %10 to i64
%12 = inttoptr i64 %11 to i32*
%13 = load volatile i32, i32* %12
%14 = shl nuw i32 1, %1
%15 = and i32 %13, %14
ret i32 %15
}
void posix_class_neg2NP_GRAPH() {}


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

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

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

LLVM IR (-O2):
define void @posix_class_neg2NP_GRAPH() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ puts(char *);
int main(int argc, char **argv) {
  int x = 0x0B00000A;
  puts((*(char *)&x == 0x0A) ? "little" : "big");
  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   $0xb00000a,-0x14(%rbp)
movsbl -0x14(%rbp),%ecx
lea    0xecf(%rip),%rdi
lea    0xec1(%rip),%rax
cmp    $0xa,%ecx
cmove  %rax,%rdi
call   1030 <puts@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [7 x i8] c"little\00"
@.str.1 = [4 x i8] c"big\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 184549386, i32* %6
%7 = bitcast i32* %6 to i8*
%8 = load i8, i8* %7
%9 = sext i8 %8 to i32
%10 = icmp eq i32 %9, 10
%11 = zext i1 %10 to i64
%12 = select i1 %10, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0)
%13 = call i32 @puts(i8* %12)
ret i32 0
}

LLVM IR (-O2):
@.str = [7 x i8] c"little\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
int AlignmentTooBig(int L, int M) {
  float ram;
  ram = 12.0 * (float)(L + 2) * (float)(M + 2) / 1.0e6;
  if (ram > (float)32)
    return 1;
  else
    return 0;
}


x86 assembly (clang, -O0):
<AlignmentTooBig>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%eax
add    $0x2,%eax
cvtsi2ss %eax,%xmm0
cvtss2sd %xmm0,%xmm1
movsd  0xef0(%rip),%xmm0
mulsd  %xmm1,%xmm0
mov    -0xc(%rbp),%eax
add    $0x2,%eax
cvtsi2ss %eax,%xmm1
cvtss2sd %xmm1,%xmm1
mulsd  %xmm1,%xmm0
movsd  0xeca(%rip),%xmm1
divsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x10(%rbp)
movss  -0x10(%rbp),%xmm0
movss  0xea8(%rip),%xmm1
ucomiss %xmm1,%xmm0
jbe    116d <AlignmentTooBig+0x6d>
movl   $0x1,-0x4(%rbp)
jmp    1174 <AlignmentTooBig+0x74>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<AlignmentTooBig>:
add    $0x2,%edi
cvtsi2ss %edi,%xmm0
cvtss2sd %xmm0,%xmm0
add    $0x2,%esi
cvtsi2ss %esi,%xmm1
mulsd  0xee6(%rip),%xmm0
cvtss2sd %xmm1,%xmm1
mulsd  %xmm0,%xmm1
divsd  0xede(%rip),%xmm1
xorps  %xmm0,%xmm0
cvtsd2ss %xmm1,%xmm0
xor    %eax,%eax
ucomiss 0xed6(%rip),%xmm0
seta   %al
ret

LLVM IR (-O0):
define i32 @AlignmentTooBig(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca float
store i32 %0, i32* %4
store i32 %1, i32* %5
%7 = load i32, i32* %4
%8 = add nsw i32 %7, 2
%9 = sitofp i32 %8 to float
%10 = fpext float %9 to double
%11 = fmul double 1.200000e+01, %10
%12 = load i32, i32* %5
%13 = add nsw i32 %12, 2
%14 = sitofp i32 %13 to float
%15 = fpext float %14 to double
%16 = fmul double %11, %15
%17 = fdiv double %16, 1.000000e+06
%18 = fptrunc double %17 to float
store float %18, float* %6
%19 = load float, float* %6
%20 = fcmp ogt float %19, 3.200000e+01
br i1 %20, label %21, label %22
21: ; preds = %2
store i32 1, i32* %3
br label %23
22: ; preds = %2
store i32 0, i32* %3
br label %23
23: ; preds = %22, %21
%24 = load i32, i32* %3
ret i32 %24
}

LLVM IR (-O2):
define i32 @AlignmentTooBig(i32 %0, i32 %1) {
%3 = add nsw i32 %0, 2
%4 = sitofp i32 %3 to float
%5 = fpext float %4 to double
%6 = fmul double %5, 1.200000e+01
%7 = add nsw i32 %1, 2
%8 = sitofp i32 %7 to float
%9 = fpext float %8 to double
%10 = fmul double %6, %9
%11 = fdiv double %10, 1.000000e+06
%12 = fptrunc double %11 to float
%13 = fcmp ogt float %12, 3.200000e+01
%14 = zext i1 %13 to i32
ret i32 %14
}
/* Variables and functions */
int /*<<< orphan*/ INC_();
int /*<<< orphan*/ c64_memZero();
void INC_zp(void) {
  c64_memZero();
  INC_();
}


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

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

LLVM IR (-O0):
define void @INC_zp() {
%1 = call i32 (...) @c64_memZero()
%2 = call i32 (...) @INC_()
ret void
}

LLVM IR (-O2):
define void @INC_zp() {
%1 = tail call i32 (...) @c64_memZero()
%2 = tail call i32 (...) @INC_()
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ va_list;

/* Variables and functions */
int /*<<< orphan*/ stdout;
int vfprintf(int /*<<< orphan*/, char const *, int /*<<< orphan*/);
signed int vprintf(const char *pFormat, va_list ap) {
  return (vfprintf(stdout, pFormat, ap));
}


x86 assembly (clang, -O0):
<vprintf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    0x2eba(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rsi
mov    -0xc(%rbp),%edx
call   1030 <vfprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<vprintf>:
mov    %esi,%edx
mov    %rdi,%rsi
mov    0x2ec4(%rip),%rax
mov    (%rax),%edi
jmp    1030 <vfprintf@plt>

LLVM IR (-O0):
@stdout = global i32 0
define i32 @vprintf(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i32, i32* @stdout
%6 = load i8*, i8** %3
%7 = load i32, i32* %4
%8 = call i32 @vfprintf(i32 %5, i8* %6, i32 %7)
ret i32 %8
}

LLVM IR (-O2):
@stdout = global i32 0
define i32 @vprintf(i8* %0, i32 %1) {
%3 = load i32, i32* @stdout
%4 = tail call i32 @vfprintf(i32 %3, i8* %0, i32 %1)
ret i32 %4
}
unsigned int alarm(unsigned int seconds) {
  ;
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @alarm(i32 %0) {
ret i32 0
}
/* Variables and functions */
char getchar();
char *getnchar(char *array, int n) {
  int i = 0;
  while (n--)
    array[i++] = getchar();
  return array;
}


x86 assembly (clang, -O0):
<getnchar>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,%ecx
add    $0xffffffff,%ecx
mov    %ecx,-0xc(%rbp)
cmp    $0x0,%eax
je     115d <getnchar+0x4d>
mov    $0x0,%al
call   1030 <getchar@plt>
mov    %al,%dl
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%ecx
mov    %ecx,%esi
add    $0x1,%esi
mov    %esi,-0x10(%rbp)
movslq %ecx,%rcx
mov    %dl,(%rax,%rcx,1)
jmp    1126 <getnchar+0x16>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getnchar>:
push   %r15
push   %r14
push   %rbx
mov    %rdi,%r14
test   %esi,%esi
je     1144 <getnchar+0x34>
mov    %esi,%r15d
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1030 <getchar@plt>
mov    %al,(%r14,%rbx,1)
add    $0x1,%rbx
cmp    %ebx,%r15d
jne    1130 <getnchar+0x20>
mov    %r14,%rax
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
define i8* @getnchar(i8* returned writeonly %0, i32 %1) {
%3 = icmp eq i32 %1, 0
br i1 %3, label %12, label %4
4: ; preds = %2, %4
%5 = phi i64 [ %9, %4 ], [ 0, %2 ]
%6 = phi i32 [ %7, %4 ], [ %1, %2 ]
%7 = add nsw i32 %6, -1
%8 = tail call signext i8 (...) @getchar()
%9 = add nuw nsw i64 %5, 1
%10 = getelementptr inbounds i8, i8* %0, i64 %5
store i8 %8, i8* %10
%11 = icmp eq i32 %7, 0
br i1 %11, label %12, label %4
12: ; preds = %4, %2
ret i8* %0
}
OP(ed, be) {}


x86 assembly (clang, -O0):
<OP>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @OP(i32 %0, i32 %1) {
ret i32 undef
}
/* Variables and functions */
scalar_t__ malloc(int const);
double *vector_double_alloc(const int dimension) {
  double *Vector;
  Vector = (double *)malloc(dimension * sizeof(double));
  return Vector;
}


x86 assembly (clang, -O0):
<vector_double_alloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movslq -0x4(%rbp),%rax
shl    $0x3,%rax
mov    %eax,%edi
call   1030 <malloc@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<vector_double_alloc>:
shl    $0x3,%edi
jmp    1030 <malloc@plt>

LLVM IR (-O0):
define double* @vector_double_alloc(i32 %0) {
%2 = alloca i32
%3 = alloca double*
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = sext i32 %4 to i64
%6 = mul i64 %5, 8
%7 = trunc i64 %6 to i32
%8 = call i64 @malloc(i32 %7)
%9 = inttoptr i64 %8 to double*
store double* %9, double** %3
%10 = load double*, double** %3
ret double* %10
}

LLVM IR (-O2):
define double* @vector_double_alloc(i32 %0) {
%2 = shl i32 %0, 3
%3 = tail call i64 @malloc(i32 %2)
%4 = inttoptr i64 %3 to double*
ret double* %4
}
/* Variables and functions */
int /*<<< orphan*/ wait(int *);
void mort_fils() {
  int status;
  wait(&status);
}


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

x86 assembly (clang, -O2):
<mort_fils>:
push   %rax
lea    0x4(%rsp),%rdi
call   1030 <wait@plt>
pop    %rax
ret

LLVM IR (-O0):
define void @mort_fils() {
%1 = alloca i32
%2 = call i32 @wait(i32* %1)
ret void
}

LLVM IR (-O2):
define void @mort_fils() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i32 @wait(i32* %1)
ret void
}
int thermal_notify_tz_trip_delete(int tz_id, int id) { return 0; }


x86 assembly (clang, -O0):
<thermal_notify_tz_trip_delete>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @thermal_notify_tz_trip_delete(i32 %0, i32 %1) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ kprintc(char const *, int);
int /*<<< orphan*/ line_break();
void kprintlnc(const char *string, int color) {
  kprintc(string, color);
  line_break();
}


x86 assembly (clang, -O0):
<kprintlnc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
call   1030 <kprintc@plt>
mov    $0x0,%al
call   1040 <line_break@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define void @kprintlnc(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i8*, i8** %3
%6 = load i32, i32* %4
%7 = call i32 @kprintc(i8* %5, i32 %6)
%8 = call i32 (...) @line_break()
ret void
}

LLVM IR (-O2):
define void @kprintlnc(i8* %0, i32 %1) {
%3 = tail call i32 @kprintc(i8* %0, i32 %1)
%4 = tail call i32 (...) @line_break()
ret void
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
int main(void) {
  while (true) {
    *((volatile uint32_t *)0x20060000) = (1 << 1) | (1 << 3);
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
mov    $0x20060000,%eax
movl   $0xa,(%rax)
jmp    110b <main+0xb>

x86 assembly (clang, -O2):
<main>:
movl   $0xa,0x20060000
jmp    1100 <main>

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
br label %2
2: ; preds = %0, %2
store volatile i32 10, i32* inttoptr (i64 537264128 to i32*)
br label %2
}

LLVM IR (-O2):
define i32 @main() {
br label %1
1: ; preds = %0, %1
store volatile i32 10, i32* inttoptr (i64 537264128 to i32*)
br label %1
}
/* Variables and functions */
scalar_t__ strcmp(char const *const, char const *const);
unsigned short xmlrpc_streq(const char *const a, const char *const b) {
  return (strcmp(a, b) == 0);
}


x86 assembly (clang, -O0):
<xmlrpc_streq>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%eax
movzwl %ax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xmlrpc_streq>:
push   %rax
call   1030 <strcmp@plt>
xor    %ecx,%ecx
test   %rax,%rax
sete   %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define zeroext i16 @xmlrpc_streq(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %3
%6 = load i8*, i8** %4
%7 = call i64 @strcmp(i8* %5, i8* %6)
%8 = icmp eq i64 %7, 0
%9 = zext i1 %8 to i32
%10 = trunc i32 %9 to i16
ret i16 %10
}

LLVM IR (-O2):
define zeroext i16 @xmlrpc_streq(i8* %0, i8* %1) {
%3 = tail call i64 @strcmp(i8* %0, i8* %1)
%4 = icmp eq i64 %3, 0
%5 = zext i1 %4 to i16
ret i16 %5
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void Tui_Textcolor(int color) { printf("\x1b[%dm", 30 + color); }


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

x86 assembly (clang, -O2):
<Tui_Textcolor>:
lea    0x1e(%rdi),%esi
lea    0xee6(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [6 x i8] c"\1B[%dm\00"
define void @Tui_Textcolor(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = add nsw i32 30, %3
%5 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 %4)
ret void
}

LLVM IR (-O2):
@.str = [6 x i8] c"\1B[%dm\00"
define void @Tui_Textcolor(i32 %0) {
%2 = add nsw i32 %0, 30
%3 = tail call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 %2)
ret void
}
void *phys_to_virt(unsigned long phys) { return (void *)phys; }


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

x86 assembly (clang, -O2):
<phys_to_virt>:
mov    %rdi,%rax
ret

LLVM IR (-O0):
define i8* @phys_to_virt(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = inttoptr i64 %3 to i8*
ret i8* %4
}

LLVM IR (-O2):
define i8* @phys_to_virt(i64 %0) {
%2 = inttoptr i64 %0 to i8*
ret i8* %2
}
/* Variables and functions */
int snprintf(char *, int, char *, unsigned long);
int lookup_symbol_name(unsigned long addr, char *symbol) {
  return snprintf(symbol, 100, "%016lX", addr);
}


x86 assembly (clang, -O0):
<lookup_symbol_name>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rcx
mov    $0x64,%esi
lea    0xecc(%rip),%rdx
call   1030 <snprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<lookup_symbol_name>:
mov    %rdi,%rcx
lea    0xee6(%rip),%rdx
mov    %rsi,%rdi
mov    $0x64,%esi
jmp    1030 <snprintf@plt>

LLVM IR (-O0):
@.str = [7 x i8] c"%016lX\00"
define i32 @lookup_symbol_name(i64 %0, i8* %1) {
%3 = alloca i64
%4 = alloca i8*
store i64 %0, i64* %3
store i8* %1, i8** %4
%5 = load i8*, i8** %4
%6 = load i64, i64* %3
%7 = call i32 @snprintf(i8* %5, i32 100, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i64 %6)
ret i32 %7
}

LLVM IR (-O2):
@.str = [7 x i8] c"%016lX\00"
define i32 @lookup_symbol_name(i64 %0, i8* %1) {
%3 = tail call i32 @snprintf(i8* %1, i32 100, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i64 %0)
ret i32 %3
}
void def_fn1(void) {}


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

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

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

LLVM IR (-O2):
define void @def_fn1() {
ret void
}
int execute_mpx() { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @execute_mpx() {
ret i32 0
}
void remove_record(struct page *page, struct record *record) {}


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

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

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

LLVM IR (-O2):
%struct.page = type opaque
%struct.record = type opaque
define void @remove_record(%struct.page* nocapture %0, %struct.record* nocapture %1) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void function1(int a) {
  printf("You entered %d so function1 was called\n\n", a);
}


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

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

LLVM IR (-O0):
@.str = [41 x i8] c"You entered %d so function1 was called\0A\0A\00"
define void @function1(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @printf(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str, i64 0, i64 0), i32 %3)
ret void
}

LLVM IR (-O2):
@.str = [41 x i8] c"You entered %d so function1 was called\0A\0A\00"
define void @function1(i32 %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str, i64 0, i64 0), i32 %0)
ret void
}
/* Variables and functions */
size_t left_child(int node) { return (2 * node) + 1; }


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

x86 assembly (clang, -O2):
<left_child>:
lea    (%rdi,%rdi,1),%eax
add    $0x1,%eax
cltq
ret

LLVM IR (-O0):
define i64 @left_child(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = mul nsw i32 2, %3
%5 = add nsw i32 %4, 1
%6 = sext i32 %5 to i64
ret i64 %6
}

LLVM IR (-O2):
define i64 @left_child(i32 %0) {
%2 = shl nsw i32 %0, 1
%3 = or i32 %2, 1
%4 = sext i32 %3 to i64
ret i64 %4
}
/* Type definitions */
struct token_list {
  int dummy;
};
struct ast_node {
  int dummy;
};

/* Variables and functions */
struct ast_node *make_node(int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ pop_token_list(struct token_list *);
struct ast_node *parse_number(struct token_list *tkl) {
  return make_node(pop_token_list(tkl), 0);
}


x86 assembly (clang, -O0):
<parse_number>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <pop_token_list@plt>
mov    %eax,%edi
xor    %esi,%esi
call   1040 <make_node@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<parse_number>:
push   %rax
call   1030 <pop_token_list@plt>
mov    %eax,%edi
xor    %esi,%esi
pop    %rax
jmp    1040 <make_node@plt>

LLVM IR (-O0):
%struct.ast_node = type { i32 }
%struct.token_list = type { i32 }
define %struct.ast_node* @parse_number(%struct.token_list* %0) {
%2 = alloca %struct.token_list*
store %struct.token_list* %0, %struct.token_list** %2
%3 = load %struct.token_list*, %struct.token_list** %2
%4 = call i32 @pop_token_list(%struct.token_list* %3)
%5 = call %struct.ast_node* @make_node(i32 %4, i32 0)
ret %struct.ast_node* %5
}

LLVM IR (-O2):
%struct.ast_node = type { i32 }
%struct.token_list = type { i32 }
define %struct.ast_node* @parse_number(%struct.token_list* %0) {
%2 = tail call i32 @pop_token_list(%struct.token_list* %0)
%3 = tail call %struct.ast_node* @make_node(i32 %2, i32 0)
ret %struct.ast_node* %3
}
void XkbComputeRowBounds() {}


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

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

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

LLVM IR (-O2):
define void @XkbComputeRowBounds() {
ret void
}
/* Type definitions */
struct stkpool {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ stkp_destroy(struct stkpool *);
void __stkp_destroy_agent(void *alloc) {
  stkp_destroy((struct stkpool *)alloc);
}


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

x86 assembly (clang, -O2):
<__stkp_destroy_agent>:
jmp    1030 <stkp_destroy@plt>

LLVM IR (-O0):
%struct.stkpool = type { i32 }
define void @__stkp_destroy_agent(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = bitcast i8* %3 to %struct.stkpool*
%5 = call i32 @stkp_destroy(%struct.stkpool* %4)
ret void
}

LLVM IR (-O2):
%struct.stkpool = type { i32 }
define void @__stkp_destroy_agent(i8* %0) {
%2 = bitcast i8* %0 to %struct.stkpool*
%3 = tail call i32 @stkp_destroy(%struct.stkpool* %2)
ret void
}
/* Variables and functions */
int sumOfDigits(int);
int recurSumOfDigits(int number) {
  if (number == 0)
    return 0;
  return ((number % 10) + sumOfDigits(number / 10));
}


x86 assembly (clang, -O0):
<recurSumOfDigits>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jne    1131 <recurSumOfDigits+0x21>
movl   $0x0,-0x4(%rbp)
jmp    1159 <recurSumOfDigits+0x49>
mov    -0x8(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %edx,-0xc(%rbp)
mov    -0x8(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %eax,%edi
call   1030 <sumOfDigits@plt>
mov    -0xc(%rbp),%edx
add    %eax,%edx
mov    %edx,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<recurSumOfDigits>:
test   %edi,%edi
je     113f <recurSumOfDigits+0x2f>
push   %rbx
mov    %edi,%ebx
movslq %edi,%rax
imul   $0x66666667,%rax,%rdi
mov    %rdi,%rax
shr    $0x3f,%rax
sar    $0x22,%rdi
add    %eax,%edi
lea    (%rdi,%rdi,1),%eax
lea    (%rax,%rax,4),%eax
sub    %eax,%ebx
call   1030 <sumOfDigits@plt>
add    %ebx,%eax
pop    %rbx
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @recurSumOfDigits(i32 %0) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %8, label %3
3: ; preds = %1
%4 = srem i32 %0, 10
%5 = sdiv i32 %0, 10
%6 = tail call i32 @sumOfDigits(i32 %5)
%7 = add nsw i32 %6, %4
br label %8
8: ; preds = %1, %3
%9 = phi i32 [ %7, %3 ], [ 0, %1 ]
ret i32 %9
}
/* Variables and functions */
scalar_t__ GALSC_run_next_task();
int /*<<< orphan*/ TOSH_sleep();
int /*<<< orphan*/ TOSH_wait();
void GALSC_run_task() {
  while (GALSC_run_next_task())
    ;
  TOSH_sleep();
  TOSH_wait();
}


x86 assembly (clang, -O0):
<GALSC_run_task>:
push   %rbp
mov    %rsp,%rbp
jmp    1139 <GALSC_run_task+0x9>
mov    $0x0,%al
call   1040 <GALSC_run_next_task@plt>
cmp    $0x0,%rax
je     114f <GALSC_run_task+0x1f>
jmp    1139 <GALSC_run_task+0x9>
mov    $0x0,%al
call   1030 <TOSH_sleep@plt>
mov    $0x0,%al
call   1050 <TOSH_wait@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<GALSC_run_task>:
push   %rax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1040 <GALSC_run_next_task@plt>
test   %rax,%rax
jne    1140 <GALSC_run_task+0x10>
xor    %eax,%eax
call   1030 <TOSH_sleep@plt>
xor    %eax,%eax
pop    %rcx
jmp    1050 <TOSH_wait@plt>

LLVM IR (-O0):
define void @GALSC_run_task() {
br label %1
1: ; preds = %4, %0
%2 = call i64 (...) @GALSC_run_next_task()
%3 = icmp ne i64 %2, 0
br i1 %3, label %4, label %5
4: ; preds = %1
br label %1
5: ; preds = %1
%6 = call i32 (...) @TOSH_sleep()
%7 = call i32 (...) @TOSH_wait()
ret void
}

LLVM IR (-O2):
define void @GALSC_run_task() {
br label %1
1: ; preds = %1, %0
%2 = tail call i64 (...) @GALSC_run_next_task()
%3 = icmp eq i64 %2, 0
br i1 %3, label %4, label %1
4: ; preds = %1
%5 = tail call i32 (...) @TOSH_sleep()
%6 = tail call i32 (...) @TOSH_wait()
ret void
}
/* Type definitions */
typedef int uint8_t;

/* Variables and functions */
int rf_get_channel();
int /*<<< orphan*/ rf_set_channel(int);
int /*<<< orphan*/ uart1_flush_rxbuf();
void ulin_handler(uint8_t *ulin_frame) {
  if (ulin_frame[3] == 127) {
    if (rf_get_channel() != ulin_frame[4])
      rf_set_channel(ulin_frame[4]);
  }
  uart1_flush_rxbuf();
}


x86 assembly (clang, -O0):
<ulin_handler>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
cmpl   $0x7f,0xc(%rax)
jne    116f <ulin_handler+0x3f>
mov    $0x0,%al
call   1030 <rf_get_channel@plt>
mov    -0x8(%rbp),%rcx
cmp    0x10(%rcx),%eax
je     116a <ulin_handler+0x3a>
mov    -0x8(%rbp),%rax
mov    0x10(%rax),%edi
call   1050 <rf_set_channel@plt>
jmp    116f <ulin_handler+0x3f>
mov    $0x0,%al
call   1040 <uart1_flush_rxbuf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ulin_handler>:
push   %rbx
cmpl   $0x7f,0xc(%rdi)
jne    114d <ulin_handler+0x1d>
mov    %rdi,%rbx
xor    %eax,%eax
call   1030 <rf_get_channel@plt>
mov    0x10(%rbx),%edi
cmp    %edi,%eax
je     114d <ulin_handler+0x1d>
call   1050 <rf_set_channel@plt>
xor    %eax,%eax
pop    %rbx
jmp    1040 <uart1_flush_rxbuf@plt>

LLVM IR (-O0):
define void @ulin_handler(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = getelementptr inbounds i32, i32* %3, i64 3
%5 = load i32, i32* %4
%6 = icmp eq i32 %5, 127
br i1 %6, label %7, label %19
7: ; preds = %1
%8 = call i32 (...) @rf_get_channel()
%9 = load i32*, i32** %2
%10 = getelementptr inbounds i32, i32* %9, i64 4
%11 = load i32, i32* %10
%12 = icmp ne i32 %8, %11
br i1 %12, label %13, label %18
13: ; preds = %7
%14 = load i32*, i32** %2
%15 = getelementptr inbounds i32, i32* %14, i64 4
%16 = load i32, i32* %15
%17 = call i32 @rf_set_channel(i32 %16)
br label %18
18: ; preds = %13, %7
br label %19
19: ; preds = %18, %1
%20 = call i32 (...) @uart1_flush_rxbuf()
ret void
}

LLVM IR (-O2):
define void @ulin_handler(i32* nocapture %0) {
%2 = getelementptr inbounds i32, i32* %0, i64 3
%3 = load i32, i32* %2
%4 = icmp eq i32 %3, 127
br i1 %4, label %5, label %12
5: ; preds = %1
%6 = tail call i32 (...) @rf_get_channel()
%7 = getelementptr inbounds i32, i32* %0, i64 4
%8 = load i32, i32* %7
%9 = icmp eq i32 %6, %8
br i1 %9, label %12, label %10
10: ; preds = %5
%11 = tail call i32 @rf_set_channel(i32 %8)
br label %12
12: ; preds = %5, %10, %1
%13 = tail call i32 (...) @uart1_flush_rxbuf()
ret void
}
double ln_get_ell_mean_anomaly(double n, double delta_JD) {
  return delta_JD * n;
}


x86 assembly (clang, -O0):
<ln_get_ell_mean_anomaly>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
mulsd  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<ln_get_ell_mean_anomaly>:
mulsd  %xmm1,%xmm0
ret

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

LLVM IR (-O2):
define double @ln_get_ell_mean_anomaly(double %0, double %1) {
%3 = fmul double %0, %1
ret double %3
}
/* Variables and functions */
long meat_time_find_begin_of_month(long const);
long meat_time_find_end_of_month(long const);
void meat_time_align_range_to_month(signed long int const i_begin,
                                    signed long int const i_end,
                                    signed long int *const pi_begin,
                                    signed long int *const pi_end) {
  *pi_begin = meat_time_find_begin_of_month(i_begin);
  *pi_end = meat_time_find_end_of_month(i_end);
}


x86 assembly (clang, -O0):
<meat_time_align_range_to_month>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <meat_time_find_begin_of_month@plt>
mov    %rax,%rcx
mov    -0x18(%rbp),%rax
mov    %rcx,(%rax)
mov    -0x10(%rbp),%rdi
call   1040 <meat_time_find_end_of_month@plt>
mov    %rax,%rcx
mov    -0x20(%rbp),%rax
mov    %rcx,(%rax)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<meat_time_align_range_to_month>:
push   %r15
push   %r14
push   %rbx
mov    %rcx,%r14
mov    %rdx,%rbx
mov    %rsi,%r15
call   1030 <meat_time_find_begin_of_month@plt>
mov    %rax,(%rbx)
mov    %r15,%rdi
call   1040 <meat_time_find_end_of_month@plt>
mov    %rax,(%r14)
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define void @meat_time_align_range_to_month(i64 %0, i64 %1, i64* %2, i64* %3) {
%5 = alloca i64
%6 = alloca i64
%7 = alloca i64*
%8 = alloca i64*
store i64 %0, i64* %5
store i64 %1, i64* %6
store i64* %2, i64** %7
store i64* %3, i64** %8
%9 = load i64, i64* %5
%10 = call i64 @meat_time_find_begin_of_month(i64 %9)
%11 = load i64*, i64** %7
store i64 %10, i64* %11
%12 = load i64, i64* %6
%13 = call i64 @meat_time_find_end_of_month(i64 %12)
%14 = load i64*, i64** %8
store i64 %13, i64* %14
ret void
}

LLVM IR (-O2):
define void @meat_time_align_range_to_month(i64 %0, i64 %1, i64* nocapture writeonly %2, i64* nocapture writeonly %3) {
%5 = tail call i64 @meat_time_find_begin_of_month(i64 %0)
store i64 %5, i64* %2
%6 = tail call i64 @meat_time_find_end_of_month(i64 %1)
store i64 %6, i64* %3
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char, char, char);
int /*<<< orphan*/ scanf(char *, char **);
int main() {
  char v[3];
  scanf("%s", &v);
  printf("%c%c%c\n", v[2], v[1], v[0]);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x7(%rbp),%rsi
lea    0xec6(%rip),%rdi
call   1040 <scanf@plt>
mov    -0x5(%rbp),%cl
mov    -0x6(%rbp),%al
lea    0xeb7(%rip),%rdi
movsbl %cl,%esi
movsbl %al,%edx
movsbl -0x7(%rbp),%ecx
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
lea    0x5(%rsp),%rsi
call   1040 <scanf@plt>
movsbl 0x7(%rsp),%esi
movsbl 0x6(%rsp),%edx
movsbl 0x5(%rsp),%ecx
lea    0xebb(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%s\00"
@.str.1 = [8 x i8] c"%c%c%c\0A\00"
define i32 @main() {
%1 = alloca [3 x i8]
%2 = getelementptr inbounds [3 x i8], [3 x i8]* %1, i64 0, i64 0
%3 = bitcast [3 x i8]* %1 to i8**
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8** %3)
%5 = getelementptr inbounds [3 x i8], [3 x i8]* %1, i64 0, i64 2
%6 = load i8, i8* %5
%7 = getelementptr inbounds [3 x i8], [3 x i8]* %1, i64 0, i64 1
%8 = load i8, i8* %7
%9 = load i8, i8* %2
%10 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), i8 signext %6, i8 signext %8, i8 signext %9)
ret i32 0
}
/* Type definitions */
struct section_list {
  int dummy;
};
struct genlist {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ genlist_clear(struct genlist *);
void section_list_clear(struct section_list *tthis) {
  genlist_clear((struct genlist *)tthis);
}


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

x86 assembly (clang, -O2):
<section_list_clear>:
jmp    1030 <genlist_clear@plt>

LLVM IR (-O0):
%struct.section_list = type { i32 }
%struct.genlist = type { i32 }
define void @section_list_clear(%struct.section_list* %0) {
%2 = alloca %struct.section_list*
store %struct.section_list* %0, %struct.section_list** %2
%3 = load %struct.section_list*, %struct.section_list** %2
%4 = bitcast %struct.section_list* %3 to %struct.genlist*
%5 = call i32 @genlist_clear(%struct.genlist* %4)
ret void
}

LLVM IR (-O2):
%struct.section_list = type { i32 }
%struct.genlist = type { i32 }
define void @section_list_clear(%struct.section_list* %0) {
%2 = bitcast %struct.section_list* %0 to %struct.genlist*
%3 = tail call i32 @genlist_clear(%struct.genlist* %2)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ __u_char;

/* Variables and functions */
int /*<<< orphan*/ cbmarch_parallel_burst_read(int);
__u_char cbm_parallel_burst_read(int HandleDevice) {
  ;
  return cbmarch_parallel_burst_read(HandleDevice);
}


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

x86 assembly (clang, -O2):
<cbm_parallel_burst_read>:
jmp    1030 <cbmarch_parallel_burst_read@plt>

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

LLVM IR (-O2):
define i32 @cbm_parallel_burst_read(i32 %0) {
%2 = tail call i32 @cbmarch_parallel_burst_read(i32 %0)
ret i32 %2
}
/* Type definitions */
struct lobject {
  int dummy;
};
struct lemon {
  int dummy;
};

/* Variables and functions */
struct lobject *lobject_error_runtime(struct lemon *, char *);
struct lobject *machine_throw(struct lemon *, struct lobject *);
struct lobject *machine_stack_overflow(struct lemon *lemon) {
  struct lobject *error;
  error = lobject_error_runtime(lemon, "stack overflow");
  return machine_throw(lemon, error);
}


x86 assembly (clang, -O0):
<machine_stack_overflow>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xec9(%rip),%rsi
call   1040 <lobject_error_runtime@plt>
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <machine_throw@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.lobject = type { i32 }
%struct.lemon = type { i32 }
@.str = [15 x i8] c"stack overflow\00"
define %struct.lobject* @machine_stack_overflow(%struct.lemon* %0) {
%2 = alloca %struct.lemon*
%3 = alloca %struct.lobject*
store %struct.lemon* %0, %struct.lemon** %2
%4 = load %struct.lemon*, %struct.lemon** %2
%5 = call %struct.lobject* @lobject_error_runtime(%struct.lemon* %4, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
store %struct.lobject* %5, %struct.lobject** %3
%6 = load %struct.lemon*, %struct.lemon** %2
%7 = load %struct.lobject*, %struct.lobject** %3
%8 = call %struct.lobject* @machine_throw(%struct.lemon* %6, %struct.lobject* %7)
ret %struct.lobject* %8
}

LLVM IR (-O2):
%struct.lobject = type { i32 }
%struct.lemon = type { i32 }
@.str = [15 x i8] c"stack overflow\00"
define %struct.lobject* @machine_stack_overflow(%struct.lemon* %0) {
%2 = tail call %struct.lobject* @lobject_error_runtime(%struct.lemon* %0, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
%3 = tail call %struct.lobject* @machine_throw(%struct.lemon* %0, %struct.lobject* %2)
ret %struct.lobject* %3
}
/* Variables and functions */
float log10(float);
float _log10(float s) { return log10(s); }


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

x86 assembly (clang, -O2):
<_log10>:
jmp    1030 <log10@plt>

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

LLVM IR (-O2):
define float @_log10(float %0) {
%2 = tail call float @log10(float %0)
ret float %2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main(void) {
  printf("Estou aqui"
         "\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeda(%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
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@str = [11 x i8] c"Estou aqui\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @str, i64 0, i64 0))
ret i32 0
}
int recursive_fibonacci(int n) {
  if (n == 1 || n == 2)
    return 1;
  else
    return recursive_fibonacci(n - 1) + recursive_fibonacci(n - 2);
}


x86 assembly (clang, -O0):
<recursive_fibonacci>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
cmpl   $0x1,-0x8(%rbp)
je     112f <recursive_fibonacci+0x1f>
cmpl   $0x2,-0x8(%rbp)
jne    113b <recursive_fibonacci+0x2b>
movl   $0x1,-0x4(%rbp)
jmp    115e <recursive_fibonacci+0x4e>
mov    -0x8(%rbp),%edi
sub    $0x1,%edi
call   1030 <recursive_fibonacci@plt>
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%edi
sub    $0x2,%edi
call   1030 <recursive_fibonacci@plt>
mov    %eax,%ecx
mov    -0xc(%rbp),%eax
add    %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<recursive_fibonacci>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebp
add    $0xffffffff,%ebp
mov    $0x1,%ebx
cmp    $0x2,%ebp
jb     1144 <recursive_fibonacci+0x34>
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    %ebp,%edi
call   1030 <recursive_fibonacci@plt>
add    %eax,%ebx
add    $0xfffffffe,%ebp
cmp    $0x1,%ebp
ja     1130 <recursive_fibonacci+0x20>
add    $0x1,%ebx
mov    %ebx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @recursive_fibonacci(i32 %0) {
%2 = add i32 %0, -1
%3 = icmp ult i32 %2, 2
br i1 %3, label %15, label %4
4: ; preds = %1, %4
%5 = phi i32 [ %11, %4 ], [ %2, %1 ]
%6 = phi i32 [ %9, %4 ], [ %0, %1 ]
%7 = phi i32 [ %10, %4 ], [ 0, %1 ]
%8 = tail call i32 @recursive_fibonacci(i32 %5)
%9 = add nsw i32 %6, -2
%10 = add nsw i32 %8, %7
%11 = add i32 %6, -3
%12 = icmp ult i32 %11, 2
br i1 %12, label %13, label %4
13: ; preds = %4
%14 = add i32 %10, 1
br label %15
15: ; preds = %13, %1
%16 = phi i32 [ 1, %1 ], [ %14, %13 ]
ret i32 %16
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
int /*<<< orphan*/ assert(int);
int munmap(void *, size_t);
int epistasis_dataset_close(uint8_t *contents, size_t file_len) {
  assert(contents);
  assert(file_len > 0);
  return munmap((void *)contents, file_len);
}


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

x86 assembly (clang, -O2):
<epistasis_dataset_close>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
call   1030 <assert@plt>
xor    %edi,%edi
test   %r14,%r14
setne  %dil
call   1030 <assert@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <munmap@plt>

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

LLVM IR (-O2):
define i32 @epistasis_dataset_close(i32* %0, i64 %1) {
%3 = ptrtoint i32* %0 to i64
%4 = trunc i64 %3 to i32
%5 = tail call i32 @assert(i32 %4)
%6 = icmp ne i64 %1, 0
%7 = zext i1 %6 to i32
%8 = tail call i32 @assert(i32 %7)
%9 = bitcast i32* %0 to i8*
%10 = tail call i32 @munmap(i8* %9, i64 %1)
ret i32 %10
}
/* Variables and functions */
int /*<<< orphan*/ strcasestr(char *, char *);
int main(void) { return !strcasestr("foobar", "bar"); }


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeda(%rip),%rdi
lea    0xed6(%rip),%rsi
call   1030 <strcasestr@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rdi
lea    0xee4(%rip),%rsi
call   1030 <strcasestr@plt>
xor    %ecx,%ecx
test   %eax,%eax
sete   %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [7 x i8] c"foobar\00"
@.str.1 = [4 x i8] c"bar\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @strcasestr(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
%3 = icmp ne i32 %2, 0
%4 = xor i1 %3, true
%5 = zext i1 %4 to i32
ret i32 %5
}

LLVM IR (-O2):
@.str = [7 x i8] c"foobar\00"
@.str.1 = [4 x i8] c"bar\00"
define i32 @main() {
%1 = tail call i32 @strcasestr(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
%2 = icmp eq i32 %1, 0
%3 = zext i1 %2 to i32
ret i32 %3
}