xunge/DecIR huggingface dataset:
/* Type definitions */
struct timeval {
  double tv_sec;
  double tv_usec;
};

/* Variables and functions */
int /*<<< orphan*/ gettimeofday(struct timeval *, int /*<<< orphan*/);
double msecond() {
  struct timeval tv;
  gettimeofday(&tv, 0);
  return (tv.tv_sec * 1.0e3 + tv.tv_usec * 1.0e-3);
}


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

x86 assembly (clang, -O2):
<msecond>:
sub    $0x18,%rsp
lea    0x8(%rsp),%rdi
xor    %esi,%esi
call   1030 <gettimeofday@plt>
movsd  0x10(%rsp),%xmm1
mulsd  0xed2(%rip),%xmm1
movsd  0x8(%rsp),%xmm0
mulsd  0xecc(%rip),%xmm0
addsd  %xmm1,%xmm0
add    $0x18,%rsp
ret

LLVM IR (-O0):
%struct.timeval = type { double, double }
define double @msecond() {
%1 = alloca %struct.timeval
%2 = call i32 @gettimeofday(%struct.timeval* %1, i32 0)
%3 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i32 0, i32 0
%4 = load double, double* %3
%5 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i32 0, i32 1
%6 = load double, double* %5
%7 = fmul double %6, 1.000000e-03
%8 = call double @llvm.fmuladd.f64(double %4, double 1.000000e+03, double %7)
ret double %8
}

LLVM IR (-O2):
%struct.timeval = type { double, double }
define double @msecond() {
%1 = alloca %struct.timeval
%2 = bitcast %struct.timeval* %1 to i8*
%3 = call i32 @gettimeofday(%struct.timeval* %1, i32 0)
%4 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 0
%5 = load double, double* %4
%6 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 1
%7 = load double, double* %6
%8 = fmul double %7, 1.000000e-03
%9 = call double @llvm.fmuladd.f64(double %5, double 1.000000e+03, double %8)
ret double %9
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
void printArr(long int *Arr, int size) {
  for (int i = 0; i < size; i++) {
    printf("%ld ", Arr[i]);
  }
  printf("\n");
}


x86 assembly (clang, -O0):
<printArr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    115a <printArr+0x4a>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,8),%rsi
lea    0xebb(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1126 <printArr+0x16>
lea    0xea4(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<printArr>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
test   %esi,%esi
jle    1157 <printArr+0x37>
mov    %rdi,%r15
mov    %esi,%r12d
lea    0xec7(%rip),%r14
xor    %ebx,%ebx
nopl   0x0(%rax,%rax,1)
mov    (%r15,%rbx,8),%rsi
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
add    $0x1,%rbx
cmp    %rbx,%r12
jne    1140 <printArr+0x20>
mov    $0xa,%edi
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
jmp    1030 <putchar@plt>

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

LLVM IR (-O2):
@.str = [5 x i8] c"%ld \00"
define void @printArr(i64* nocapture %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %6
4: ; preds = %2
%5 = zext i32 %1 to i64
br label %8
6: ; preds = %8, %2
%7 = tail call i32 @putchar(i32 10)
ret void
8: ; preds = %4, %8
%9 = phi i64 [ 0, %4 ], [ %13, %8 ]
%10 = getelementptr inbounds i64, i64* %0, i64 %9
%11 = load i64, i64* %10
%12 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i64 %11)
%13 = add nuw nsw i64 %9, 1
%14 = icmp eq i64 %13, %5
br i1 %14, label %6, label %8
}
/* Variables and functions */
int close(int);
int ax_web_socket_close(int socket_fd) { return close(socket_fd); }


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

x86 assembly (clang, -O2):
<ax_web_socket_close>:
jmp    1030 <close@plt>

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

LLVM IR (-O2):
define i32 @ax_web_socket_close(i32 %0) {
%2 = tail call i32 @close(i32 %0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ memset(void *, int /*<<< orphan*/, unsigned long);
void *tcc_malloc(unsigned long);
void *tcc_mallocz(unsigned long size) {
  void *ptr;
  ptr = tcc_malloc(size);
  memset(ptr, 0, size);
  return ptr;
}


x86 assembly (clang, -O0):
<tcc_mallocz>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <tcc_malloc@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rdx
xor    %esi,%esi
call   1030 <memset@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<tcc_mallocz>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
call   1040 <tcc_malloc@plt>
mov    %rax,%rbx
mov    %rax,%rdi
xor    %esi,%esi
mov    %r14,%rdx
call   1030 <memset@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i8* @tcc_mallocz(i64 %0) {
%2 = alloca i64
%3 = alloca i8*
store i64 %0, i64* %2
%4 = load i64, i64* %2
%5 = call i8* @tcc_malloc(i64 %4)
store i8* %5, i8** %3
%6 = load i8*, i8** %3
%7 = load i64, i64* %2
%8 = call i32 @memset(i8* %6, i32 0, i64 %7)
%9 = load i8*, i8** %3
ret i8* %9
}

LLVM IR (-O2):
define i8* @tcc_mallocz(i64 %0) {
%2 = tail call i8* @tcc_malloc(i64 %0)
%3 = tail call i32 @memset(i8* %2, i32 0, i64 %0)
ret i8* %2
}
/* Type definitions */
struct timeval {
  int tv_usec;
  scalar_t__ tv_sec;
};

/* Variables and functions */
int /*<<< orphan*/ gettimeofday(struct timeval *, int /*<<< orphan*/ *);
long get_curr_ms() {
  struct timeval tv;
  gettimeofday(&tv, NULL);
  return ((long)tv.tv_sec) * 1000 + tv.tv_usec / 1000;
}


x86 assembly (clang, -O0):
<get_curr_ms>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
lea    -0x10(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1030 <gettimeofday@plt>
imul   $0x3e8,-0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%eax
mov    $0x3e8,%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
mov    -0x18(%rbp),%rax
movslq %ecx,%rcx
add    %rcx,%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_curr_ms>:
sub    $0x18,%rsp
lea    0x8(%rsp),%rdi
xor    %esi,%esi
call   1030 <gettimeofday@plt>
imul   $0x3e8,0x10(%rsp),%rcx
movslq 0x8(%rsp),%rax
imul   $0x10624dd3,%rax,%rax
mov    %rax,%rdx
shr    $0x3f,%rdx
sar    $0x26,%rax
add    %edx,%eax
cltq
add    %rcx,%rax
add    $0x18,%rsp
ret

LLVM IR (-O0):
%struct.timeval = type { i32, i64 }
define i64 @get_curr_ms() {
%1 = alloca %struct.timeval
%2 = call i32 @gettimeofday(%struct.timeval* %1, i32* null)
%3 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i32 0, i32 1
%4 = load i64, i64* %3
%5 = mul nsw i64 %4, 1000
%6 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i32 0, i32 0
%7 = load i32, i32* %6
%8 = sdiv i32 %7, 1000
%9 = sext i32 %8 to i64
%10 = add nsw i64 %5, %9
ret i64 %10
}

LLVM IR (-O2):
%struct.timeval = type { i32, i64 }
define i64 @get_curr_ms() {
%1 = alloca %struct.timeval
%2 = bitcast %struct.timeval* %1 to i8*
%3 = call i32 @gettimeofday(%struct.timeval* %1, i32* null)
%4 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 1
%5 = load i64, i64* %4
%6 = mul nsw i64 %5, 1000
%7 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 0
%8 = load i32, i32* %7
%9 = sdiv i32 %8, 1000
%10 = sext i32 %9 to i64
%11 = add nsw i64 %6, %10
ret i64 %11
}
int isPrime(int n) {
  int is_prime = 1;
  for (int i = 2; i < n; i++) {
    if (n % i == 0) {
      is_prime = 0;
      break;
    }
  }
  return is_prime;
}


x86 assembly (clang, -O0):
<isPrime>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x1,-0x8(%rbp)
movl   $0x2,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    1150 <isPrime+0x50>
mov    -0x4(%rbp),%eax
cltd
idivl  -0xc(%rbp)
cmp    $0x0,%edx
jne    113d <isPrime+0x3d>
movl   $0x0,-0x8(%rbp)
jmp    1150 <isPrime+0x50>
jmp    1142 <isPrime+0x42>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1115 <isPrime+0x15>
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isPrime>:
mov    $0x1,%ecx
cmp    $0x3,%edi
jl     1120 <isPrime+0x20>
mov    $0x2,%esi
nop
mov    %edi,%eax
cltd
idiv   %esi
test   %edx,%edx
je     1123 <isPrime+0x23>
add    $0x1,%esi
cmp    %esi,%edi
jne    1110 <isPrime+0x10>
mov    %ecx,%eax
ret
xor    %ecx,%ecx
mov    %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @isPrime(i32 %0) {
%2 = icmp sgt i32 %0, 2
br i1 %2, label %5, label %10
3: ; preds = %5
%4 = icmp eq i32 %9, %0
br i1 %4, label %10, label %5
5: ; preds = %1, %3
%6 = phi i32 [ %9, %3 ], [ 2, %1 ]
%7 = srem i32 %0, %6
%8 = icmp eq i32 %7, 0
%9 = add nuw nsw i32 %6, 1
br i1 %8, label %10, label %3
10: ; preds = %3, %5, %1
%11 = phi i32 [ 1, %1 ], [ 0, %5 ], [ 1, %3 ]
ret i32 %11
}
float calculateExpression(int x, int y) {
  int xx = x * x;
  int yy = y * y;
  int numerator = xx + yy;
  int denominator = x + y;
  float result = numerator / denominator;
  return result;
}


x86 assembly (clang, -O0):
<calculateExpression>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
imul   -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
imul   -0x8(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%eax
add    -0x10(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x4(%rbp),%eax
add    -0x8(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x14(%rbp),%eax
cltd
idivl  -0x18(%rbp)
cvtsi2ss %eax,%xmm0
movss  %xmm0,-0x1c(%rbp)
movss  -0x1c(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<calculateExpression>:
mov    %esi,%eax
add    %edi,%esi
imul   %edi,%edi
imul   %eax,%eax
add    %edi,%eax
cltd
idiv   %esi
cvtsi2ss %eax,%xmm0
ret

LLVM IR (-O0):
define float @calculateExpression(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca float
store i32 %0, i32* %3
store i32 %1, i32* %4
%10 = load i32, i32* %3
%11 = load i32, i32* %3
%12 = mul nsw i32 %10, %11
store i32 %12, i32* %5
%13 = load i32, i32* %4
%14 = load i32, i32* %4
%15 = mul nsw i32 %13, %14
store i32 %15, i32* %6
%16 = load i32, i32* %5
%17 = load i32, i32* %6
%18 = add nsw i32 %16, %17
store i32 %18, i32* %7
%19 = load i32, i32* %3
%20 = load i32, i32* %4
%21 = add nsw i32 %19, %20
store i32 %21, i32* %8
%22 = load i32, i32* %7
%23 = load i32, i32* %8
%24 = sdiv i32 %22, %23
%25 = sitofp i32 %24 to float
store float %25, float* %9
%26 = load float, float* %9
ret float %26
}

LLVM IR (-O2):
define float @calculateExpression(i32 %0, i32 %1) {
%3 = mul nsw i32 %0, %0
%4 = mul nsw i32 %1, %1
%5 = add nuw nsw i32 %4, %3
%6 = add nsw i32 %1, %0
%7 = sdiv i32 %5, %6
%8 = sitofp i32 %7 to float
ret float %8
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main() {
  printf("This is mbr virus!");
  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 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [19 x i8] c"This is mbr virus!\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [19 x i8] c"This is mbr virus!\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
int security_sk_alloc(struct sock *sk, int family, int priority) { return 0; }


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

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

LLVM IR (-O0):
%struct.sock = type opaque
define i32 @security_sk_alloc(%struct.sock* %0, i32 %1, i32 %2) {
%4 = alloca %struct.sock*
%5 = alloca i32
%6 = alloca i32
store %struct.sock* %0, %struct.sock** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
ret i32 0
}

LLVM IR (-O2):
%struct.sock = type opaque
define i32 @security_sk_alloc(%struct.sock* nocapture readnone %0, i32 %1, i32 %2) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ error(char *);
void *malloc(size_t);
void *xmalloc(size_t s) {
  void *p = malloc(s);
  if (p == NULL)
    error("out of memory");
  return p;
}


x86 assembly (clang, -O0):
<xmalloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <malloc@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1150 <xmalloc+0x30>
lea    0xeb5(%rip),%rdi
call   1040 <error@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xmalloc>:
push   %rbx
call   1030 <malloc@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    113a <xmalloc+0x1a>
lea    0xecb(%rip),%rdi
call   1040 <error@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [14 x i8] c"out of memory\00"
define i8* @xmalloc(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 eq i8* %6, null
br i1 %7, label %8, label %10
8: ; preds = %1
%9 = call i32 @error(i8* getelementptr inbounds ([14 x i8], [14 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 = [14 x i8] c"out of memory\00"
define noalias i8* @xmalloc(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 @error(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
br label %6
6: ; preds = %4, %1
ret i8* %2
}
void RTCritSectEnterMultiple(void) {}


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

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

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

LLVM IR (-O2):
define void @RTCritSectEnterMultiple() {
ret void
}
int celsiusToFahrenheit(int celsius) {
  return (int)(celsius * (9.0 / 5.0) + 32);
}


x86 assembly (clang, -O0):
<celsiusToFahrenheit>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
cvtsi2sdl -0x4(%rbp),%xmm0
movsd  0xeec(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xee8(%rip),%xmm1
addsd  %xmm1,%xmm0
cvttsd2si %xmm0,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<celsiusToFahrenheit>:
cvtsi2sd %edi,%xmm0
mulsd  0xef4(%rip),%xmm0
addsd  0xef4(%rip),%xmm0
cvttsd2si %xmm0,%eax
ret

LLVM IR (-O0):
define i32 @celsiusToFahrenheit(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = sitofp i32 %3 to double
%5 = call double @llvm.fmuladd.f64(double %4, double 1.800000e+00, double 3.200000e+01)
%6 = fptosi double %5 to i32
ret i32 %6
}

LLVM IR (-O2):
define i32 @celsiusToFahrenheit(i32 %0) {
%2 = sitofp i32 %0 to double
%3 = tail call double @llvm.fmuladd.f64(double %2, double 1.800000e+00, double 3.200000e+01)
%4 = fptosi double %3 to i32
ret i32 %4
}
void RandomFunc(unsigned long input[1], unsigned long output[1]) {
  unsigned long state[1];
  unsigned long local1;
  {
    state[0UL] = input[0UL] + 1373777115UL;
    local1 = 0UL;
    while (local1 < input[1UL]) {
      local1++;
    }
    output[0UL] = (state[0UL] + 255873917UL) << 1UL;
  }
}


x86 assembly (clang, -O0):
<RandomFunc>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
add    $0x51e22cdb,%rax
mov    %rax,-0x18(%rbp)
movq   $0x0,-0x20(%rbp)
mov    -0x20(%rbp),%rax
mov    -0x8(%rbp),%rcx
cmp    0x8(%rcx),%rax
jae    1148 <RandomFunc+0x48>
mov    -0x20(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x20(%rbp)
jmp    1125 <RandomFunc+0x25>
mov    -0x18(%rbp),%rcx
add    $0xf40537d,%rcx
shl    $0x1,%rcx
mov    -0x10(%rbp),%rax
mov    %rcx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<RandomFunc>:
mov    (%rdi),%rax
mov    $0xc24500b0,%ecx
lea    (%rcx,%rax,2),%rax
mov    %rax,(%rsi)
ret

LLVM IR (-O0):
define void @RandomFunc(i64* %0, i64* %1) {
%3 = alloca i64*
%4 = alloca i64*
%5 = alloca [1 x i64]
%6 = alloca i64
store i64* %0, i64** %3
store i64* %1, i64** %4
%7 = load i64*, i64** %3
%8 = getelementptr inbounds i64, i64* %7, i64 0
%9 = load i64, i64* %8
%10 = add i64 %9, 1373777115
%11 = getelementptr inbounds [1 x i64], [1 x i64]* %5, i64 0, i64 0
store i64 %10, i64* %11
store i64 0, i64* %6
br label %12
12: ; preds = %18, %2
%13 = load i64, i64* %6
%14 = load i64*, i64** %3
%15 = getelementptr inbounds i64, i64* %14, i64 1
%16 = load i64, i64* %15
%17 = icmp ult i64 %13, %16
br i1 %17, label %18, label %21
18: ; preds = %12
%19 = load i64, i64* %6
%20 = add i64 %19, 1
store i64 %20, i64* %6
br label %12
21: ; preds = %12
%22 = getelementptr inbounds [1 x i64], [1 x i64]* %5, i64 0, i64 0
%23 = load i64, i64* %22
%24 = add i64 %23, 255873917
%25 = shl i64 %24, 1
%26 = load i64*, i64** %4
%27 = getelementptr inbounds i64, i64* %26, i64 0
store i64 %25, i64* %27
ret void
}

LLVM IR (-O2):
define void @RandomFunc(i64* nocapture %0, i64* nocapture writeonly %1) {
%3 = load i64, i64* %0
%4 = shl i64 %3, 1
%5 = add i64 %4, 3259302064
store i64 %5, i64* %1
ret void
}
/* Type definitions */
struct psl {
  int dummy;
};
struct dnaSeq {
  int dummy;
};

/* Variables and functions */
int pslWeightedIntronOrientation(struct psl *, struct dnaSeq *, int);
int pslIntronOrientation(struct psl *psl, struct dnaSeq *genoSeq, int offset) {
  int intronDir = pslWeightedIntronOrientation(psl, genoSeq, offset);
  if (intronDir < 0)
    intronDir = -1;
  else if (intronDir > 0)
    intronDir = 1;
  return intronDir;
}


x86 assembly (clang, -O0):
<pslIntronOrientation>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
call   1030 <pslWeightedIntronOrientation@plt>
mov    %eax,-0x18(%rbp)
cmpl   $0x0,-0x18(%rbp)
jge    114c <pslIntronOrientation+0x3c>
movl   $0xffffffff,-0x18(%rbp)
jmp    1162 <pslIntronOrientation+0x52>
cmpl   $0x0,-0x18(%rbp)
jle    115d <pslIntronOrientation+0x4d>
movl   $0x1,-0x18(%rbp)
jmp    1162 <pslIntronOrientation+0x52>
mov    -0x18(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pslIntronOrientation>:
push   %rax
call   1030 <pslWeightedIntronOrientation@plt>
xor    %ecx,%ecx
test   %eax,%eax
setne  %cl
mov    $0xffffffff,%eax
cmovns %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.psl = type { i32 }
%struct.dnaSeq = type { i32 }
define i32 @pslIntronOrientation(%struct.psl* %0, %struct.dnaSeq* %1, i32 %2) {
%4 = alloca %struct.psl*
%5 = alloca %struct.dnaSeq*
%6 = alloca i32
%7 = alloca i32
store %struct.psl* %0, %struct.psl** %4
store %struct.dnaSeq* %1, %struct.dnaSeq** %5
store i32 %2, i32* %6
%8 = load %struct.psl*, %struct.psl** %4
%9 = load %struct.dnaSeq*, %struct.dnaSeq** %5
%10 = load i32, i32* %6
%11 = call i32 @pslWeightedIntronOrientation(%struct.psl* %8, %struct.dnaSeq* %9, i32 %10)
store i32 %11, i32* %7
%12 = load i32, i32* %7
%13 = icmp slt i32 %12, 0
br i1 %13, label %14, label %15
14: ; preds = %3
store i32 -1, i32* %7
br label %20
15: ; preds = %3
%16 = load i32, i32* %7
%17 = icmp sgt i32 %16, 0
br i1 %17, label %18, label %19
18: ; preds = %15
store i32 1, i32* %7
br label %19
19: ; preds = %18, %15
br label %20
20: ; preds = %19, %14
%21 = load i32, i32* %7
ret i32 %21
}

LLVM IR (-O2):
%struct.psl = type { i32 }
%struct.dnaSeq = type { i32 }
define i32 @pslIntronOrientation(%struct.psl* %0, %struct.dnaSeq* %1, i32 %2) {
%4 = tail call i32 @pslWeightedIntronOrientation(%struct.psl* %0, %struct.dnaSeq* %1, i32 %2)
%5 = icmp ne i32 %4, 0
%6 = zext i1 %5 to i32
%7 = icmp sgt i32 %4, -1
%8 = select i1 %7, i32 %6, i32 -1
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ SPIM_EnableRxInt();
int /*<<< orphan*/ SPIM_EnableTxInt();
void SPIM_EnableInt(void) {
  SPIM_EnableRxInt();
  SPIM_EnableTxInt();
}


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

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

LLVM IR (-O0):
define void @SPIM_EnableInt() {
%1 = call i32 (...) @SPIM_EnableRxInt()
%2 = call i32 (...) @SPIM_EnableTxInt()
ret void
}

LLVM IR (-O2):
define void @SPIM_EnableInt() {
%1 = tail call i32 (...) @SPIM_EnableRxInt()
%2 = tail call i32 (...) @SPIM_EnableTxInt()
ret void
}
int is_emulated_32bit() { return 0; }


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

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

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

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

/* Variables and functions */
int /*<<< orphan*/ length_of_string(char const *);
int strlen(char const *);
int /*<<< orphan*/ write_32bit_value(int /*<<< orphan*/);
int /*<<< orphan*/ write_bytes(char const *, int);
void write_string(const char *s) {
  uint32_t len = length_of_string(s);
  write_32bit_value(len);
  write_bytes(s, strlen(s));
  write_bytes("\0\0\0\0", 4 - (strlen(s) % 4));
}


x86 assembly (clang, -O0):
<write_string>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1050 <length_of_string@plt>
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%edi
call   1040 <write_32bit_value@plt>
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
mov    -0x18(%rbp),%rdi
mov    %eax,%esi
call   1060 <write_bytes@plt>
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
mov    $0x4,%ecx
cltd
idiv   %ecx
mov    $0x4,%esi
sub    %edx,%esi
lea    0xe65(%rip),%rdi
call   1060 <write_bytes@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<write_string>:
push   %rbx
mov    %rdi,%rbx
call   1050 <length_of_string@plt>
mov    %eax,%edi
call   1040 <write_32bit_value@plt>
mov    %rbx,%rdi
call   1030 <strlen@plt>
mov    %rbx,%rdi
mov    %eax,%esi
call   1060 <write_bytes@plt>
mov    %rbx,%rdi
call   1030 <strlen@plt>
lea    0x3(%rax),%esi
test   %eax,%eax
cmovns %eax,%esi
and    $0xfffffffc,%esi
sub    %eax,%esi
add    $0x4,%esi
lea    0xe7f(%rip),%rdi
pop    %rbx
jmp    1060 <write_bytes@plt>

LLVM IR (-O0):
@.str = [5 x i8] zeroinitializer
define void @write_string(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i32 @length_of_string(i8* %4)
store i32 %5, i32* %3
%6 = load i32, i32* %3
%7 = call i32 @write_32bit_value(i32 %6)
%8 = load i8*, i8** %2
%9 = load i8*, i8** %2
%10 = call i32 @strlen(i8* %9)
%11 = call i32 @write_bytes(i8* %8, i32 %10)
%12 = load i8*, i8** %2
%13 = call i32 @strlen(i8* %12)
%14 = srem i32 %13, 4
%15 = sub nsw i32 4, %14
%16 = call i32 @write_bytes(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 %15)
ret void
}

LLVM IR (-O2):
@.str = [5 x i8] zeroinitializer
define void @write_string(i8* %0) {
%2 = tail call i32 @length_of_string(i8* %0)
%3 = tail call i32 @write_32bit_value(i32 %2)
%4 = tail call i32 @strlen(i8* %0)
%5 = tail call i32 @write_bytes(i8* %0, i32 %4)
%6 = tail call i32 @strlen(i8* %0)
%7 = srem i32 %6, 4
%8 = sub nsw i32 4, %7
%9 = tail call i32 @write_bytes(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 %8)
ret void
}
void FunctionInCFile(void) {}


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

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

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

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


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

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

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

LLVM IR (-O2):
define void @bl_init_clks() {
ret void
}
/* Variables and functions */
scalar_t__ Rand1();
int RandRange(int min, int max) {
  return (int)((double)Rand1() * ((max + 1) - min) + min);
}


x86 assembly (clang, -O0):
<RandRange>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    $0x0,%al
call   1030 <Rand1@plt>
cvtsi2sd %rax,%xmm0
mov    -0x8(%rbp),%eax
add    $0x1,%eax
sub    -0x4(%rbp),%eax
cvtsi2sd %eax,%xmm2
cvtsi2sdl -0x4(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
cvttsd2si %xmm0,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<RandRange>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
xor    %eax,%eax
call   1030 <Rand1@plt>
cvtsi2sd %rax,%xmm0
sub    %ebp,%ebx
add    $0x1,%ebx
cvtsi2sd %ebx,%xmm1
cvtsi2sd %ebp,%xmm2
mulsd  %xmm0,%xmm1
addsd  %xmm1,%xmm2
cvttsd2si %xmm2,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @RandRange(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = call i64 (...) @Rand1()
%6 = sitofp i64 %5 to double
%7 = load i32, i32* %4
%8 = add nsw i32 %7, 1
%9 = load i32, i32* %3
%10 = sub nsw i32 %8, %9
%11 = sitofp i32 %10 to double
%12 = load i32, i32* %3
%13 = sitofp i32 %12 to double
%14 = call double @llvm.fmuladd.f64(double %6, double %11, double %13)
%15 = fptosi double %14 to i32
ret i32 %15
}

LLVM IR (-O2):
define i32 @RandRange(i32 %0, i32 %1) {
%3 = tail call i64 (...) @Rand1()
%4 = sitofp i64 %3 to double
%5 = sub i32 1, %0
%6 = add i32 %5, %1
%7 = sitofp i32 %6 to double
%8 = sitofp i32 %0 to double
%9 = tail call double @llvm.fmuladd.f64(double %4, double %7, double %8)
%10 = fptosi double %9 to i32
ret i32 %10
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
void log_callback(char *str) { printf("log> %s\n", str); }


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

x86 assembly (clang, -O2):
<log_callback>:
mov    %rdi,%rsi
lea    0xee6(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [9 x i8] c"log> %s\0A\00"
define void @log_callback(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i8* %3)
ret void
}

LLVM IR (-O2):
@.str = [9 x i8] c"log> %s\0A\00"
define void @log_callback(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ system(char *);
void shutter_set_silent(bool silent) {
  ;
  if (silent) {
    system("/usr/bin/st cap capdtm setusr ADJUSTSHUTTERTYPE 0x750001");
  } else {
    system("/usr/bin/st cap capdtm setusr ADJUSTSHUTTERTYPE 0x750000");
  }
}


x86 assembly (clang, -O0):
<shutter_set_silent>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
je     1136 <shutter_set_silent+0x26>
lea    0xed4(%rip),%rdi
call   1030 <system@plt>
jmp    1142 <shutter_set_silent+0x32>
lea    0xefc(%rip),%rdi
call   1030 <system@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<shutter_set_silent>:
test   %edi,%edi
lea    0xf20(%rip),%rax
lea    0xee0(%rip),%rdi
cmove  %rax,%rdi
jmp    1030 <system@plt>

LLVM IR (-O0):
@.str = [57 x i8] c"/usr/bin/st cap capdtm setusr ADJUSTSHUTTERTYPE 0x750001\00"
@.str.1 = [57 x i8] c"/usr/bin/st cap capdtm setusr ADJUSTSHUTTERTYPE 0x750000\00"
define void @shutter_set_silent(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp ne i32 %3, 0
br i1 %4, label %5, label %7
5: ; preds = %1
%6 = call i32 @system(i8* getelementptr inbounds ([57 x i8], [57 x i8]* @.str, i64 0, i64 0))
br label %9
7: ; preds = %1
%8 = call i32 @system(i8* getelementptr inbounds ([57 x i8], [57 x i8]* @.str.1, i64 0, i64 0))
br label %9
9: ; preds = %7, %5
ret void
}

LLVM IR (-O2):
@.str = [57 x i8] c"/usr/bin/st cap capdtm setusr ADJUSTSHUTTERTYPE 0x750001\00"
@.str.1 = [57 x i8] c"/usr/bin/st cap capdtm setusr ADJUSTSHUTTERTYPE 0x750000\00"
define void @shutter_set_silent(i32 %0) {
%2 = icmp eq i32 %0, 0
%3 = select i1 %2, i8* getelementptr inbounds ([57 x i8], [57 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([57 x i8], [57 x i8]* @.str, i64 0, i64 0)
%4 = tail call i32 @system(i8* %3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, int *, int *);
int main() {
  int n1, n2;
  printf("Digite dois numeros inteiros: ");
  scanf("%d%d", &n1, &n2);
  printf("A soma de %d mais %d é igual a %d \n", n1, n2, n1 + n2);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xedb(%rip),%rdi
lea    -0x8(%rbp),%rsi
lea    -0xc(%rbp),%rdx
call   1040 <scanf@plt>
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
mov    -0x8(%rbp),%ecx
add    -0xc(%rbp),%ecx
lea    0xec0(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xee9(%rip),%rdi
lea    0x4(%rsp),%rsi
mov    %rsp,%rdx
call   1040 <scanf@plt>
mov    0x4(%rsp),%esi
mov    (%rsp),%edx
lea    (%rdx,%rsi,1),%ecx
lea    0xed0(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [31 x i8] c"Digite dois numeros inteiros: \00"
@.str.1 = [5 x i8] c"%d%d\00"
@.str.2 = [37 x i8] c"A soma de %d mais %d \C3\A9 igual a %d \0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0))
%5 = call i32 @scanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i32* %2, i32* %3)
%6 = load i32, i32* %2
%7 = load i32, i32* %3
%8 = load i32, i32* %2
%9 = load i32, i32* %3
%10 = add nsw i32 %8, %9
%11 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.2, i64 0, i64 0), i32 %6, i32 %7, i32 %10)
ret i32 0
}

LLVM IR (-O2):
@.str = [31 x i8] c"Digite dois numeros inteiros: \00"
@.str.1 = [5 x i8] c"%d%d\00"
@.str.2 = [37 x i8] c"A soma de %d mais %d \C3\A9 igual a %d \0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = bitcast i32* %1 to i8*
%4 = bitcast i32* %2 to i8*
%5 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0))
%6 = call i32 @scanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i32* %1, i32* %2)
%7 = load i32, i32* %1
%8 = load i32, i32* %2
%9 = add nsw i32 %8, %7
%10 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([37 x i8], [37 x i8]* @.str.2, i64 0, i64 0), i32 %7, i32 %8, i32 %9)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ is_zeile_empty();
int /*<<< orphan*/ print_zeile();
int /*<<< orphan*/ wort_ende();
void quit() {
  if (!is_zeile_empty()) {
    wort_ende();
    print_zeile();
  }
}


x86 assembly (clang, -O0):
<quit>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <is_zeile_empty@plt>
cmp    $0x0,%eax
jne    1152 <quit+0x22>
mov    $0x0,%al
call   1050 <wort_ende@plt>
mov    $0x0,%al
call   1040 <print_zeile@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<quit>:
push   %rax
xor    %eax,%eax
call   1030 <is_zeile_empty@plt>
test   %eax,%eax
je     113e <quit+0xe>
pop    %rax
ret
xor    %eax,%eax
call   1050 <wort_ende@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <print_zeile@plt>

LLVM IR (-O0):
define void @quit() {
%1 = call i32 (...) @is_zeile_empty()
%2 = icmp ne i32 %1, 0
br i1 %2, label %6, label %3
3: ; preds = %0
%4 = call i32 (...) @wort_ende()
%5 = call i32 (...) @print_zeile()
br label %6
6: ; preds = %3, %0
ret void
}

LLVM IR (-O2):
define void @quit() {
%1 = tail call i32 (...) @is_zeile_empty()
%2 = icmp eq i32 %1, 0
br i1 %2, label %3, label %6
3: ; preds = %0
%4 = tail call i32 (...) @wort_ende()
%5 = tail call i32 (...) @print_zeile()
br label %6
6: ; preds = %3, %0
ret void
}
/* Type definitions */
struct smp_rbt_s {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ free(struct smp_rbt_s *);
scalar_t__ smp_rbt_size(struct smp_rbt_s *);
int smp_rbt_free(struct smp_rbt_s *rbt) {
  if (smp_rbt_size(rbt) > 0)
    return (-1);
  free(rbt);
  return (0);
}


x86 assembly (clang, -O0):
<smp_rbt_free>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <smp_rbt_size@plt>
cmp    $0x0,%rax
jle    114b <smp_rbt_free+0x2b>
movl   $0xffffffff,-0x4(%rbp)
jmp    115b <smp_rbt_free+0x3b>
mov    -0x10(%rbp),%rdi
call   1030 <free@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<smp_rbt_free>:
push   %rbx
mov    %rdi,%rbx
call   1040 <smp_rbt_size@plt>
mov    %rax,%rcx
mov    $0xffffffff,%eax
test   %rcx,%rcx
jle    1138 <smp_rbt_free+0x18>
pop    %rbx
ret
mov    %rbx,%rdi
call   1030 <free@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
%struct.smp_rbt_s = type { i32 }
define i32 @smp_rbt_free(%struct.smp_rbt_s* %0) {
%2 = alloca i32
%3 = alloca %struct.smp_rbt_s*
store %struct.smp_rbt_s* %0, %struct.smp_rbt_s** %3
%4 = load %struct.smp_rbt_s*, %struct.smp_rbt_s** %3
%5 = call i64 @smp_rbt_size(%struct.smp_rbt_s* %4)
%6 = icmp sgt i64 %5, 0
br i1 %6, label %7, label %8
7: ; preds = %1
store i32 -1, i32* %2
br label %11
8: ; preds = %1
%9 = load %struct.smp_rbt_s*, %struct.smp_rbt_s** %3
%10 = call i32 @free(%struct.smp_rbt_s* %9)
store i32 0, i32* %2
br label %11
11: ; preds = %8, %7
%12 = load i32, i32* %2
ret i32 %12
}

LLVM IR (-O2):
%struct.smp_rbt_s = type { i32 }
define i32 @smp_rbt_free(%struct.smp_rbt_s* %0) {
%2 = tail call i64 @smp_rbt_size(%struct.smp_rbt_s* %0)
%3 = icmp sgt i64 %2, 0
br i1 %3, label %6, label %4
4: ; preds = %1
%5 = tail call i32 @free(%struct.smp_rbt_s* %0)
br label %6
6: ; preds = %1, %4
%7 = phi i32 [ 0, %4 ], [ -1, %1 ]
ret i32 %7
}
/* Variables and functions */
int EINVAL;
__attribute__((visibility("default"))) int
sd_bus_reply_method_errnof(void *call, int error, const char *format, ...) {
  return -EINVAL;
}


x86 assembly (clang, -O0):
<sd_bus_reply_method_errnof>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    0x2eca(%rip),%rax
mov    (%rax),%eax
neg    %eax
pop    %rbp
ret

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

LLVM IR (-O0):
@EINVAL = global i32 0
define i32 @sd_bus_reply_method_errnof(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 i32, i32* @EINVAL
%8 = sub nsw i32 0, %7
ret i32 %8
}

LLVM IR (-O2):
@EINVAL = global i32 0
define i32 @sd_bus_reply_method_errnof(i8* nocapture readnone %0, i32 %1, i8* nocapture readnone %2, ...) {
%4 = load i32, i32* @EINVAL
%5 = sub nsw i32 0, %4
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ memset_func(void *, int /*<<< orphan*/, size_t);
void OPENSSL_cleanse(void *ptr, size_t len) { memset_func(ptr, 0, len); }


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

x86 assembly (clang, -O2):
<OPENSSL_cleanse>:
mov    %rsi,%rdx
xor    %esi,%esi
jmp    1030 <memset_func@plt>

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

LLVM IR (-O2):
define void @OPENSSL_cleanse(i8* %0, i64 %1) {
%3 = tail call i32 @memset_func(i8* %0, i32 0, i64 %1)
ret void
}
int do_830() { return 830; }


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

x86 assembly (clang, -O2):
<do_830>:
mov    $0x33e,%eax
ret

LLVM IR (-O0):
define i32 @do_830() {
ret i32 830
}

LLVM IR (-O2):
define i32 @do_830() {
ret i32 830
}
/* Variables and functions */
int /*<<< orphan*/ fact(unsigned int);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, unsigned int *);
int main(void) {
  unsigned int n, t, s = 0, r;
  printf("Enter the number: ");
  scanf("%u", &n);
  printf("\nFactorial of the number is: %llu", fact(n));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x10(%rbp)
lea    0xeb3(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xeb8(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1050 <scanf@plt>
mov    -0x8(%rbp),%edi
call   1040 <fact@plt>
mov    %eax,%esi
lea    0xea1(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [19 x i8] c"Enter the number: \00"
@.str.1 = [3 x i8] c"%u\00"
@.str.2 = [34 x i8] c"\0AFactorial of the number is: %llu\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %4
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
%7 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %2)
%8 = load i32, i32* %2
%9 = call i32 @fact(i32 %8)
%10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.2, i64 0, i64 0), i32 %9)
ret i32 0
}

LLVM IR (-O2):
@.str = [19 x i8] c"Enter the number: \00"
@.str.1 = [3 x i8] c"%u\00"
@.str.2 = [34 x i8] c"\0AFactorial of the number is: %llu\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%5 = load i32, i32* %1
%6 = call i32 @fact(i32 %5)
%7 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([34 x i8], [34 x i8]* @.str.2, i64 0, i64 0), i32 %6)
ret i32 0
}
/* Type definitions */
typedef scalar_t__ u_int16_t;

/* Variables and functions */
int chash_sort16(const void *element1, const void *element2) {
  return (*(u_int16_t *)element1 > *(u_int16_t *)element2) ? 1 : -1;
}


x86 assembly (clang, -O0):
<chash_sort16>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rdx
mov    -0x10(%rbp),%rax
mov    (%rax),%rsi
mov    $0xffffffff,%eax
mov    $0x1,%ecx
cmp    %rsi,%rdx
cmovg  %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<chash_sort16>:
mov    (%rdi),%rax
xor    %ecx,%ecx
cmp    (%rsi),%rax
setg   %cl
lea    (%rcx,%rcx,1),%eax
add    $0xffffffff,%eax
ret

LLVM IR (-O0):
define i32 @chash_sort16(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 = bitcast i8* %5 to i64*
%7 = load i64, i64* %6
%8 = load i8*, i8** %4
%9 = bitcast i8* %8 to i64*
%10 = load i64, i64* %9
%11 = icmp sgt i64 %7, %10
%12 = zext i1 %11 to i64
%13 = select i1 %11, i32 1, i32 -1
ret i32 %13
}

LLVM IR (-O2):
define i32 @chash_sort16(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i64*
%4 = load i64, i64* %3
%5 = bitcast i8* %1 to i64*
%6 = load i64, i64* %5
%7 = icmp sgt i64 %4, %6
%8 = select i1 %7, i32 1, i32 -1
ret i32 %8
}
/* Type definitions */
struct dirent {
  int /*<<< orphan*/ d_name;
};

/* Variables and functions */
int is_media_by_ext(int /*<<< orphan*/);
int scandir_filter(const struct dirent *dirent) {
  return is_media_by_ext(dirent->d_name);
}


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

x86 assembly (clang, -O2):
<scandir_filter>:
mov    (%rdi),%edi
jmp    1030 <is_media_by_ext@plt>

LLVM IR (-O0):
%struct.dirent = type { i32 }
define i32 @scandir_filter(%struct.dirent* %0) {
%2 = alloca %struct.dirent*
store %struct.dirent* %0, %struct.dirent** %2
%3 = load %struct.dirent*, %struct.dirent** %2
%4 = getelementptr inbounds %struct.dirent, %struct.dirent* %3, i32 0, i32 0
%5 = load i32, i32* %4
%6 = call i32 @is_media_by_ext(i32 %5)
ret i32 %6
}

LLVM IR (-O2):
%struct.dirent = type { i32 }
define i32 @scandir_filter(%struct.dirent* nocapture %0) {
%2 = getelementptr inbounds %struct.dirent, %struct.dirent* %0, i64 0, i32 0
%3 = load i32, i32* %2
%4 = tail call i32 @is_media_by_ext(i32 %3)
ret i32 %4
}
void XCreateImage() {}


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

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

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

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


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

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

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

LLVM IR (-O2):
define void @foo_1_2_2_1_1_1_1_1_1() {
ret void
}
void rop3_123_0_0(unsigned char *D, unsigned char S, unsigned char T) {
  unsigned char stk1;
  unsigned char stk2;
  stk2 = *D ^ T;
  stk2 = ~stk2;
  stk1 = S & stk2;
  stk1 = ~stk1;
  *D = stk1;
}


x86 assembly (clang, -O0):
<rop3_123_0_0>:
push   %rbp
mov    %rsp,%rbp
mov    %dl,%al
mov    %sil,%cl
mov    %rdi,-0x8(%rbp)
mov    %cl,-0x9(%rbp)
mov    %al,-0xa(%rbp)
mov    -0x8(%rbp),%rax
movzbl (%rax),%eax
movzbl -0xa(%rbp),%ecx
xor    %ecx,%eax
mov    %al,-0xc(%rbp)
movzbl -0xc(%rbp),%eax
xor    $0xffffffff,%eax
mov    %al,-0xc(%rbp)
movzbl -0x9(%rbp),%eax
movzbl -0xc(%rbp),%ecx
and    %ecx,%eax
mov    %al,-0xb(%rbp)
movzbl -0xb(%rbp),%eax
xor    $0xffffffff,%eax
mov    %al,-0xb(%rbp)
mov    -0xb(%rbp),%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<rop3_123_0_0>:
xor    (%rdi),%dl
not    %sil
or     %dl,%sil
mov    %sil,(%rdi)
ret

LLVM IR (-O0):
define void @rop3_123_0_0(i8* %0, i8 zeroext %1, i8 zeroext %2) {
%4 = alloca i8*
%5 = alloca i8
%6 = alloca i8
%7 = alloca i8
%8 = alloca i8
store i8* %0, i8** %4
store i8 %1, i8* %5
store i8 %2, i8* %6
%9 = load i8*, i8** %4
%10 = load i8, i8* %9
%11 = zext i8 %10 to i32
%12 = load i8, i8* %6
%13 = zext i8 %12 to i32
%14 = xor i32 %11, %13
%15 = trunc i32 %14 to i8
store i8 %15, i8* %8
%16 = load i8, i8* %8
%17 = zext i8 %16 to i32
%18 = xor i32 %17, -1
%19 = trunc i32 %18 to i8
store i8 %19, i8* %8
%20 = load i8, i8* %5
%21 = zext i8 %20 to i32
%22 = load i8, i8* %8
%23 = zext i8 %22 to i32
%24 = and i32 %21, %23
%25 = trunc i32 %24 to i8
store i8 %25, i8* %7
%26 = load i8, i8* %7
%27 = zext i8 %26 to i32
%28 = xor i32 %27, -1
%29 = trunc i32 %28 to i8
store i8 %29, i8* %7
%30 = load i8, i8* %7
%31 = load i8*, i8** %4
store i8 %30, i8* %31
ret void
}

LLVM IR (-O2):
define void @rop3_123_0_0(i8* nocapture %0, i8 zeroext %1, i8 zeroext %2) {
%4 = load i8, i8* %0
%5 = xor i8 %4, %2
%6 = xor i8 %1, -1
%7 = or i8 %5, %6
store i8 %7, i8* %0
ret void
}
void JIT_FLUSH_CACHE(void) {}


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

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

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

LLVM IR (-O2):
define void @JIT_FLUSH_CACHE() {
ret void
}
/* Variables and functions */
int f319(int *);
int f320(int *p) { return f319(p); }


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

x86 assembly (clang, -O2):
<f320>:
jmp    1030 <f319@plt>

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

LLVM IR (-O2):
define i32 @f320(i32* %0) {
%2 = tail call i32 @f319(i32* %0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int setbits(int, int, int, int);
int main() {
  printf("%d\n", setbits(1, 2, 2, 3));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x1,%edi
mov    $0x2,%edx
mov    $0x3,%ecx
mov    %edx,%esi
call   1040 <setbits@plt>
mov    %eax,%esi
lea    0xeb2(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x1,%edi
mov    $0x2,%esi
mov    $0x2,%edx
mov    $0x3,%ecx
call   1040 <setbits@plt>
lea    0xebf(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

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