xunge/DecIR huggingface dataset:
void do_invalid_tss(void *x) {
  do {
    kprintf("Unsupport Now...[%s]\n", __FUNCTION__);
    while (1)
      ;
  } while (0);
  ;
}


x86 assembly (clang, -O0):
<do_invalid_tss>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xedd(%rip),%rdi
lea    0xeec(%rip),%rsi
mov    $0x0,%al
call   1030 <kprintf@plt>
jmp    1131 <do_invalid_tss+0x21>

x86 assembly (clang, -O2):
<do_invalid_tss>:
push   %rax
lea    0xee8(%rip),%rdi
lea    0xef7(%rip),%rsi
xor    %eax,%eax
call   1030 <kprintf@plt>
cs nopw 0x0(%rax,%rax,1)
jmp    1130 <do_invalid_tss+0x20>

LLVM IR (-O0):
@.str = [22 x i8] c"Unsupport Now...[%s]\0A\00"
@__FUNCTION__.do_invalid_tss = [15 x i8] c"do_invalid_tss\00"
define void @do_invalid_tss(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
br label %3
3: ; preds = %1
%4 = call i32 (i8*, i8*, ...) bitcast (i32 (...)* @kprintf to i32 (i8*, i8*, ...)*)(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([15 x i8], [15 x i8]* @__FUNCTION__.do_invalid_tss, i64 0, i64 0))
br label %5
5: ; preds = %3, %5
br label %5
6: ; No predecessors!
ret void
}

LLVM IR (-O2):
@.str = [22 x i8] c"Unsupport Now...[%s]\0A\00"
@__FUNCTION__.do_invalid_tss = [15 x i8] c"do_invalid_tss\00"
define void @do_invalid_tss(i8* nocapture readnone %0) {
%2 = tail call i32 (i8*, i8*, ...) bitcast (i32 (...)* @kprintf to i32 (i8*, i8*, ...)*)(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([15 x i8], [15 x i8]* @__FUNCTION__.do_invalid_tss, i64 0, i64 0))
br label %3
3: ; preds = %1, %3
br label %3
}
int islower(int c) { return (unsigned)c - 'a' < 26; }


x86 assembly (clang, -O0):
<islower>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
sub    $0x61,%eax
cmp    $0x1a,%eax
setb   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<islower>:
add    $0xffffff9f,%edi
xor    %eax,%eax
cmp    $0x1a,%edi
setb   %al
ret

LLVM IR (-O0):
define i32 @islower(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = sub i32 %3, 97
%5 = icmp ult i32 %4, 26
%6 = zext i1 %5 to i32
ret i32 %6
}

LLVM IR (-O2):
define i32 @islower(i32 %0) {
%2 = add i32 %0, -97
%3 = icmp ult i32 %2, 26
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
double *malloc(int);
int /*<<< orphan*/ my_task(double *, double *);
void one_unregistered_pointer(void) {
  double *p, *q;
  p = malloc(12 * sizeof *p);
  q = malloc(23 * sizeof *q);
#pragma starpu register p 12
  my_task(p, q);
}


x86 assembly (clang, -O0):
<one_unregistered_pointer>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x60,%edi
call   1040 <malloc@plt>
mov    %rax,-0x8(%rbp)
mov    $0xb8,%edi
call   1040 <malloc@plt>
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <my_task@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<one_unregistered_pointer>:
push   %rbx
mov    $0x60,%edi
call   1040 <malloc@plt>
mov    %rax,%rbx
mov    $0xb8,%edi
call   1040 <malloc@plt>
mov    %rbx,%rdi
mov    %rax,%rsi
pop    %rbx
jmp    1030 <my_task@plt>

LLVM IR (-O0):
define void @one_unregistered_pointer() {
%1 = alloca double*
%2 = alloca double*
%3 = call double* @malloc(i32 96)
store double* %3, double** %1
%4 = call double* @malloc(i32 184)
store double* %4, double** %2
%5 = load double*, double** %1
%6 = load double*, double** %2
%7 = call i32 @my_task(double* %5, double* %6)
ret void
}

LLVM IR (-O2):
define void @one_unregistered_pointer() {
%1 = tail call double* @malloc(i32 96)
%2 = tail call double* @malloc(i32 184)
%3 = tail call i32 @my_task(double* %1, double* %2)
ret void
}
__attribute__((always_)) void outb(unsigned short port, unsigned char data) {
  __asm__ __volatile__("outb %0, %1" : : "a"(data), "Nd"(port));
}


x86 assembly (clang, -O0):
<outb>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %di,%cx
mov    %cx,-0x2(%rbp)
mov    %al,-0x3(%rbp)
mov    -0x3(%rbp),%al
mov    -0x2(%rbp),%dx
out    %al,(%dx)
pop    %rbp
ret

x86 assembly (clang, -O2):
<outb>:
mov    %esi,%eax
mov    %edi,%edx
out    %al,(%dx)
ret

LLVM IR (-O0):
define void @outb(i16 zeroext %0, i8 zeroext %1) {
%3 = alloca i16
%4 = alloca i8
store i16 %0, i16* %3
store i8 %1, i8* %4
%5 = load i8, i8* %4
%6 = load i16, i16* %3
ret void
}

LLVM IR (-O2):
define void @outb(i16 zeroext %0, i8 zeroext %1) {
tail call void asm sideeffect "outb $0, $1", "{ax},N{dx},~{dirflag},~{fpsr},~{flags}"(i8 %1, i16 %0)
ret void
}
int __attribute__((visibility("default"))) func(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @func() {
ret i32 0
}
int combinator_lambda_markov_algorithm(void) {
  int n = 0;
  return 0;
}


x86 assembly (clang, -O0):
<combinator_lambda_markov_algorithm>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @combinator_lambda_markov_algorithm() {
ret i32 0
}
int tgetnum(char *name) { return -1; }


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

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

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

LLVM IR (-O2):
define i32 @tgetnum(i8* nocapture readnone %0) {
ret i32 -1
}
/* Type definitions */
struct stat {
  int st_size;
};

/* Variables and functions */
int /*<<< orphan*/ fstat(int, struct stat *);
int fileSize(int fd) {
  struct stat sb;
  fstat(fd, &sb);
  return sb.st_size;
}


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

x86 assembly (clang, -O2):
<fileSize>:
push   %rax
mov    %rsp,%rsi
call   1030 <fstat@plt>
mov    (%rsp),%eax
pop    %rcx
ret

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

LLVM IR (-O2):
%struct.stat = type { i32 }
define i32 @fileSize(i32 %0) {
%2 = alloca %struct.stat
%3 = bitcast %struct.stat* %2 to i8*
%4 = call i32 @fstat(i32 %0, %struct.stat* %2)
%5 = getelementptr inbounds %struct.stat, %struct.stat* %2, i64 0, i32 0
%6 = load i32, i32* %5
ret i32 %6
}
int free2d(float ***a, int n) {
  free(&((*a)[0][0]));
  free(*a);
  return 0;
}


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

x86 assembly (clang, -O2):
<free2d>:
push   %rbx
mov    %rdi,%rbx
mov    (%rdi),%rax
mov    (%rax),%rdi
call   1030 <free@plt>
mov    (%rbx),%rdi
call   1030 <free@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @free2d(float*** %0, i32 %1) {
%3 = alloca float***
%4 = alloca i32
store float*** %0, float**** %3
store i32 %1, i32* %4
%5 = load float***, float**** %3
%6 = load float**, float*** %5
%7 = getelementptr inbounds float*, float** %6, i64 0
%8 = load float*, float** %7
%9 = getelementptr inbounds float, float* %8, i64 0
%10 = bitcast float* %9 to i8*
%11 = load float***, float**** %3
%12 = load float**, float*** %11
%13 = bitcast float** %12 to i8*
ret i32 0
}

LLVM IR (-O2):
define i32 @free2d(float*** nocapture %0, i32 %1) {
%3 = bitcast float*** %0 to i8***
%4 = load i8**, i8*** %3
%5 = load i8*, i8** %4
tail call void @free(i8* %5)
%6 = bitcast float*** %0 to i8**
%7 = load i8*, i8** %6
tail call void @free(i8* %7)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ CreateAndDestroyList();
int /*<<< orphan*/ assert(int /*<<< orphan*/, char *);
void ListTests() { assert(CreateAndDestroyList(), "CreateAndDestroyList"); }


x86 assembly (clang, -O0):
<ListTests>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <CreateAndDestroyList@plt>
mov    %eax,%edi
lea    0xecc(%rip),%rsi
call   1040 <assert@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<ListTests>:
push   %rax
xor    %eax,%eax
call   1030 <CreateAndDestroyList@plt>
lea    0xed1(%rip),%rsi
mov    %eax,%edi
pop    %rax
jmp    1040 <assert@plt>

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

LLVM IR (-O2):
@.str = [21 x i8] c"CreateAndDestroyList\00"
define void @ListTests() {
%1 = tail call i32 (...) @CreateAndDestroyList()
%2 = tail call i32 @assert(i32 %1, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ sleep(int);
void calcThread(void *argp) {
  int i;
  sleep(1);
  for (i = 0; i < 10000000; i++) {
    printf("%d\r", i);
  }
}


x86 assembly (clang, -O0):
<calcThread>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x1,%edi
call   1040 <sleep@plt>
movl   $0x0,-0xc(%rbp)
cmpl   $0x989680,-0xc(%rbp)
jge    1167 <calcThread+0x47>
mov    -0xc(%rbp),%esi
lea    0xeac(%rip),%rdi
call   1030 <printf@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    113d <calcThread+0x1d>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<calcThread>:
push   %r14
push   %rbx
push   %rax
mov    $0x1,%edi
call   1040 <sleep@plt>
xor    %ebx,%ebx
lea    0xec9(%rip),%r14
nopw   0x0(%rax,%rax,1)
mov    %r14,%rdi
mov    %ebx,%esi
call   1030 <printf@plt>
add    $0x1,%ebx
cmp    $0x989680,%ebx
jne    1140 <calcThread+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%d\0D\00"
define void @calcThread(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
%4 = call i32 @sleep(i32 1)
store i32 0, i32* %3
br label %5
5: ; preds = %11, %1
%6 = load i32, i32* %3
%7 = icmp slt i32 %6, 10000000
br i1 %7, label %8, label %14
8: ; preds = %5
%9 = load i32, i32* %3
%10 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %9)
br label %11
11: ; preds = %8
%12 = load i32, i32* %3
%13 = add nsw i32 %12, 1
store i32 %13, i32* %3
br label %5
14: ; preds = %5
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0D\00"
define void @calcThread(i8* nocapture readnone %0) {
%2 = tail call i32 @sleep(i32 1)
br label %3
3: ; preds = %1, %3
%4 = phi i32 [ 0, %1 ], [ %6, %3 ]
%5 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %4)
%6 = add nuw nsw i32 %4, 1
%7 = icmp eq i32 %6, 10000000
br i1 %7, label %8, label %3
8: ; preds = %3
ret void
}
/* Type definitions */
typedef int int64_t;

/* Variables and functions */
int /*<<< orphan*/ printf(char *, double);
double stdlib_strided_dsem(int, int, double *, int);
int main() {
  double x[] = {1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0};
  int64_t N = 4;
  int64_t stride = 2;
  double v = stdlib_strided_dsem(N, 1, x, stride);
  printf("standard error of the mean: %lf\n", v);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
lea    -0x40(%rbp),%rdi
lea    0xebd(%rip),%rsi
mov    $0x40,%edx
call   1050 <memcpy@plt>
movl   $0x4,-0x44(%rbp)
movl   $0x2,-0x48(%rbp)
mov    -0x44(%rbp),%edi
lea    -0x40(%rbp),%rdx
mov    -0x48(%rbp),%ecx
mov    $0x1,%esi
call   1040 <stdlib_strided_dsem@plt>
movsd  %xmm0,-0x50(%rbp)
movsd  -0x50(%rbp),%xmm0
lea    0xec0(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x48,%rsp
movaps 0xf05(%rip),%xmm0
movaps %xmm0,0x30(%rsp)
movaps 0xee9(%rip),%xmm0
movaps %xmm0,0x20(%rsp)
movaps 0xecd(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0xeb1(%rip),%xmm0
movaps %xmm0,(%rsp)
mov    %rsp,%rdx
mov    $0x4,%edi
mov    $0x1,%esi
mov    $0x2,%ecx
call   1040 <stdlib_strided_dsem@plt>
lea    0xecf(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x48,%rsp
ret

LLVM IR (-O0):
@__const.main.x = [8 x double] [double 1.000000e+00, double 2.000000e+00, double 3.000000e+00, double 4.000000e+00, double 5.000000e+00, double 6.000000e+00, double 7.000000e+00, double 8.000000e+00]
@.str = [33 x i8] c"standard error of the mean: %lf\0A\00"
define i32 @main() {
%1 = alloca [8 x double]
%2 = alloca i32
%3 = alloca i32
%4 = alloca double
%5 = bitcast [8 x double]* %1 to i8*
store i32 4, i32* %2
store i32 2, i32* %3
%6 = load i32, i32* %2
%7 = getelementptr inbounds [8 x double], [8 x double]* %1, i64 0, i64 0
%8 = load i32, i32* %3
%9 = call double @stdlib_strided_dsem(i32 %6, i32 1, double* %7, i32 %8)
store double %9, double* %4
%10 = load double, double* %4
%11 = call i32 @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0), double %10)
ret i32 0
}

LLVM IR (-O2):
@__const.main.x = [8 x double] [double 1.000000e+00, double 2.000000e+00, double 3.000000e+00, double 4.000000e+00, double 5.000000e+00, double 6.000000e+00, double 7.000000e+00, double 8.000000e+00]
@.str = [33 x i8] c"standard error of the mean: %lf\0A\00"
define i32 @main() {
%1 = alloca [8 x double]
%2 = bitcast [8 x double]* %1 to i8*
%3 = getelementptr inbounds [8 x double], [8 x double]* %1, i64 0, i64 0
%4 = call double @stdlib_strided_dsem(i32 4, i32 1, double* %3, i32 2)
%5 = call i32 @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0), double %4)
ret i32 0
}
/* Variables and functions */
int getpagesize();
int /*<<< orphan*/ printf(char *, int);
int main(void) {
  int page_size;
  page_size = getpagesize();
  printf("page_size = %d\n", page_size);
  return 0;
}


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

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

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

LLVM IR (-O2):
@.str = [16 x i8] c"page_size = %d\0A\00"
define i32 @main() {
%1 = tail call i32 (...) @getpagesize()
%2 = tail call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ inverte(int);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int num;
  scanf("%d", &num);
  while (num != 0) {
    inverte(num);
    scanf("%d", &num);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
cmpl   $0x0,-0x8(%rbp)
je     1166 <main+0x46>
mov    -0x8(%rbp),%edi
call   1030 <inverte@plt>
lea    0xea8(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
jmp    113f <main+0x1f>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
lea    0xed5(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1040 <scanf@plt>
mov    0x4(%rsp),%edi
test   %edi,%edi
je     1168 <main+0x48>
lea    0xebc(%rip),%r14
lea    0x4(%rsp),%rbx
nopl   0x0(%rax)
call   1030 <inverte@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
call   1040 <scanf@plt>
mov    0x4(%rsp),%edi
test   %edi,%edi
jne    1150 <main+0x30>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%4 = load i32, i32* %1
%5 = icmp eq i32 %4, 0
br i1 %5, label %12, label %6
6: ; preds = %0, %6
%7 = phi i32 [ %10, %6 ], [ %4, %0 ]
%8 = call i32 @inverte(i32 %7)
%9 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%10 = load i32, i32* %1
%11 = icmp eq i32 %10, 0
br i1 %11, label %12, label %6
12: ; preds = %6, %0
ret i32 0
}
void gtk_icon_view_get_model() {}


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

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

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

LLVM IR (-O2):
define void @gtk_icon_view_get_model() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void onAccept(int fd, int *res) { printf("(server) on accept! (%d)\n", fd); }


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

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

LLVM IR (-O0):
@.str = [26 x i8] c"(server) on accept! (%d)\0A\00"
define void @onAccept(i32 %0, i32* %1) {
%3 = alloca i32
%4 = alloca i32*
store i32 %0, i32* %3
store i32* %1, i32** %4
%5 = load i32, i32* %3
%6 = call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0), i32 %5)
ret void
}

LLVM IR (-O2):
@.str = [26 x i8] c"(server) on accept! (%d)\0A\00"
define void @onAccept(i32 %0, i32* nocapture readnone %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0), i32 %0)
ret void
}
/* Variables and functions */
char *memcpy(char *, char const *, scalar_t__);
scalar_t__ strlen(char const *);
char *strcpy(char *d, const char *s) { return memcpy(d, s, strlen(s) + 1); }


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

x86 assembly (clang, -O2):
<strcpy>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %rdi,%r14
mov    %rsi,%rdi
call   1030 <strlen@plt>
lea    0x1(%rax),%rdx
mov    %r14,%rdi
mov    %rbx,%rsi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <memcpy@plt>

LLVM IR (-O0):
define i8* @strcpy(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 = load i8*, i8** %4
%8 = call i64 @strlen(i8* %7)
%9 = add nsw i64 %8, 1
%10 = call i8* @memcpy(i8* %5, i8* %6, i64 %9)
ret i8* %10
}

LLVM IR (-O2):
define i8* @strcpy(i8* returned writeonly %0, i8* nocapture %1) {
%3 = tail call i64 @strlen(i8* dereferenceable(1) %1)
%4 = add nsw i64 %3, 1
tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 1 %0, i8* align 1 %1, i64 %4, i1 false)
ret i8* %0
}
/* Variables and functions */
int inb(int);
int uart_can_tx_byte(void) { return inb(0x3f8 + 0x05) & 0x20; }


x86 assembly (clang, -O0):
<uart_can_tx_byte>:
push   %rbp
mov    %rsp,%rbp
mov    $0x3fd,%edi
call   1030 <inb@plt>
and    $0x20,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<uart_can_tx_byte>:
push   %rax
mov    $0x3fd,%edi
call   1030 <inb@plt>
and    $0x20,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @uart_can_tx_byte() {
%1 = call i32 @inb(i32 1021)
%2 = and i32 %1, 32
ret i32 %2
}

LLVM IR (-O2):
define i32 @uart_can_tx_byte() {
%1 = tail call i32 @inb(i32 1021)
%2 = and i32 %1, 32
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void HelloWorld() { printf("Hello\tWorld\n"); }


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

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

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

LLVM IR (-O2):
@str = [12 x i8] c"Hello\09World\00"
define void @HelloWorld() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @str, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ feof(int /*<<< orphan*/ *);
int read_particle_from_file(int /*<<< orphan*/ *);
int read_particles_from_file(FILE *file) {
  int ok = 1;
  while (ok && !feof(file)) {
    ok = read_particle_from_file(file);
  }
  return ok;
}


x86 assembly (clang, -O0):
<read_particles_from_file>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x1,-0xc(%rbp)
xor    %eax,%eax
cmpl   $0x0,-0xc(%rbp)
mov    %al,-0xd(%rbp)
je     1156 <read_particles_from_file+0x36>
mov    -0x8(%rbp),%rdi
call   1030 <feof@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
mov    %al,-0xd(%rbp)
mov    -0xd(%rbp),%al
test   $0x1,%al
jne    1166 <read_particles_from_file+0x46>
jmp    1177 <read_particles_from_file+0x57>
mov    -0x8(%rbp),%rdi
call   1040 <read_particle_from_file@plt>
mov    %eax,-0xc(%rbp)
jmp    1133 <read_particles_from_file+0x13>
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<read_particles_from_file>:
push   %rbp
push   %rbx
push   %rax
mov    %rdi,%rbx
call   1030 <feof@plt>
mov    $0x1,%ebp
test   %eax,%eax
jne    115e <read_particles_from_file+0x3e>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    %rbx,%rdi
call   1040 <read_particle_from_file@plt>
test   %eax,%eax
je     115c <read_particles_from_file+0x3c>
mov    %eax,%ebp
mov    %rbx,%rdi
call   1030 <feof@plt>
test   %eax,%eax
je     1140 <read_particles_from_file+0x20>
jmp    115e <read_particles_from_file+0x3e>
xor    %ebp,%ebp
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @read_particles_from_file(i32* %0) {
%2 = alloca i32*
%3 = alloca i32
store i32* %0, i32** %2
store i32 1, i32* %3
br label %4
4: ; preds = %14, %1
%5 = load i32, i32* %3
%6 = icmp ne i32 %5, 0
br i1 %6, label %7, label %12
7: ; preds = %4
%8 = load i32*, i32** %2
%9 = call i32 @feof(i32* %8)
%10 = icmp ne i32 %9, 0
%11 = xor i1 %10, true
br label %12
12: ; preds = %7, %4
%13 = phi i1 [ false, %4 ], [ %11, %7 ]
br i1 %13, label %14, label %17
14: ; preds = %12
%15 = load i32*, i32** %2
%16 = call i32 @read_particle_from_file(i32* %15)
store i32 %16, i32* %3
br label %4
17: ; preds = %12
%18 = load i32, i32* %3
ret i32 %18
}

LLVM IR (-O2):
define i32 @read_particles_from_file(i32* %0) {
%2 = tail call i32 @feof(i32* %0)
%3 = icmp eq i32 %2, 0
br i1 %3, label %7, label %10
4: ; preds = %7
%5 = tail call i32 @feof(i32* %0)
%6 = icmp eq i32 %5, 0
br i1 %6, label %7, label %10
7: ; preds = %1, %4
%8 = tail call i32 @read_particle_from_file(i32* %0)
%9 = icmp eq i32 %8, 0
br i1 %9, label %10, label %4
10: ; preds = %4, %7, %1
%11 = phi i32 [ 1, %1 ], [ %8, %4 ], [ 0, %7 ]
ret i32 %11
}
void gtk_icon_theme_set_search_path() {}


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

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

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

LLVM IR (-O2):
define void @gtk_icon_theme_set_search_path() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isalpha(int);
void t_isalpha_0x5d() {
  Assert_real((isalpha(93) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_isalpha.c",
              470, ("isalpha should be 0 for ]"));
}


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

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

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

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isalpha.c\00"
@.str.1 = [26 x i8] c"isalpha should be 0 for ]\00"
define void @t_isalpha_0x5d() {
%1 = tail call i64 @isalpha(i32 93)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 470, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
double get_time_unit();
scalar_t__ get_user_time();
double get_time() { return ((double)get_user_time()) / get_time_unit(); }


x86 assembly (clang, -O0):
<get_time>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1040 <get_user_time@plt>
cvtsi2sd %rax,%xmm0
movsd  %xmm0,-0x8(%rbp)
mov    $0x0,%al
call   1030 <get_time_unit@plt>
movaps %xmm0,%xmm1
movsd  -0x8(%rbp),%xmm0
divsd  %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_time>:
push   %rax
xor    %eax,%eax
call   1040 <get_user_time@plt>
cvtsi2sd %rax,%xmm0
movsd  %xmm0,(%rsp)
xor    %eax,%eax
call   1030 <get_time_unit@plt>
movsd  (%rsp),%xmm1
divsd  %xmm0,%xmm1
movapd %xmm1,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @get_time() {
%1 = call i64 (...) @get_user_time()
%2 = sitofp i64 %1 to double
%3 = call double (...) @get_time_unit()
%4 = fdiv double %2, %3
ret double %4
}

LLVM IR (-O2):
define double @get_time() {
%1 = tail call i64 (...) @get_user_time()
%2 = sitofp i64 %1 to double
%3 = tail call double (...) @get_time_unit()
%4 = fdiv double %2, %3
ret double %4
}
/* Variables and functions */
int f391(int *);
int f392(int *p) { return f391(p); }


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

x86 assembly (clang, -O2):
<f392>:
jmp    1030 <f391@plt>

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

LLVM IR (-O2):
define i32 @f392(i32* %0) {
%2 = tail call i32 @f391(i32* %0)
ret i32 %2
}
unsigned long mask_read(unsigned long add, unsigned long mask) {
  volatile unsigned long *addr = (volatile unsigned long *)add;
  unsigned long val = (*addr & mask);
  return val;
}


x86 assembly (clang, -O0):
<mask_read>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    (%rax),%rax
and    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
pop    %rbp
ret

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

LLVM IR (-O0):
define i64 @mask_read(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
%5 = alloca i64*
%6 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%7 = load i64, i64* %3
%8 = inttoptr i64 %7 to i64*
store i64* %8, i64** %5
%9 = load i64*, i64** %5
%10 = load volatile i64, i64* %9
%11 = load i64, i64* %4
%12 = and i64 %10, %11
store i64 %12, i64* %6
%13 = load i64, i64* %6
ret i64 %13
}

LLVM IR (-O2):
define i64 @mask_read(i64 %0, i64 %1) {
%3 = inttoptr i64 %0 to i64*
%4 = load volatile i64, i64* %3
%5 = and i64 %4, %1
ret i64 %5
}
/* Variables and functions */
int /*<<< orphan*/ iface_error(char const *);
void interface_error(const char *msg) { iface_error(msg); }


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

x86 assembly (clang, -O2):
<interface_error>:
jmp    1030 <iface_error@plt>

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

LLVM IR (-O2):
define void @interface_error(i8* %0) {
%2 = tail call i32 @iface_error(i8* %0)
ret void
}
void redislite_put_4bytes(unsigned char *p, int v) {
  p[0] = (unsigned char)(v >> 24);
  p[1] = (unsigned char)(v >> 16);
  p[2] = (unsigned char)(v >> 8);
  p[3] = (unsigned char)v;
}


x86 assembly (clang, -O0):
<redislite_put_4bytes>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
sar    $0x18,%eax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
mov    -0xc(%rbp),%eax
sar    $0x10,%eax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,0x1(%rax)
mov    -0xc(%rbp),%eax
sar    $0x8,%eax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,0x2(%rax)
mov    -0xc(%rbp),%eax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,0x3(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<redislite_put_4bytes>:
bswap  %esi
mov    %esi,(%rdi)
ret

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

LLVM IR (-O2):
define void @redislite_put_4bytes(i8* nocapture writeonly %0, i32 %1) {
%3 = lshr i32 %1, 24
%4 = trunc i32 %3 to i8
store i8 %4, i8* %0
%5 = lshr i32 %1, 16
%6 = trunc i32 %5 to i8
%7 = getelementptr inbounds i8, i8* %0, i64 1
store i8 %6, i8* %7
%8 = lshr i32 %1, 8
%9 = trunc i32 %8 to i8
%10 = getelementptr inbounds i8, i8* %0, i64 2
store i8 %9, i8* %10
%11 = trunc i32 %1 to i8
%12 = getelementptr inbounds i8, i8* %0, i64 3
store i8 %11, i8* %12
ret void
}
/* Variables and functions */
int /*<<< orphan*/ bar(int);
void p1(int x) {
  bar(x);
  bar(x + 1);
}


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

x86 assembly (clang, -O2):
<p1>:
push   %rbx
mov    %edi,%ebx
call   1030 <bar@plt>
add    $0x1,%ebx
mov    %ebx,%edi
pop    %rbx
jmp    1030 <bar@plt>

LLVM IR (-O0):
define void @p1(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @bar(i32 %3)
%5 = load i32, i32* %2
%6 = add nsw i32 %5, 1
%7 = call i32 @bar(i32 %6)
ret void
}

LLVM IR (-O2):
define void @p1(i32 %0) {
%2 = tail call i32 @bar(i32 %0)
%3 = add nsw i32 %0, 1
%4 = tail call i32 @bar(i32 %3)
ret void
}
/* Variables and functions */
int partition(int *, int, int);
void qsort(int *arr, int lo, int hi) {
  if (lo < hi) {
    int wall = partition(arr, lo, hi);
    qsort(arr, lo, wall - 1);
    qsort(arr, wall + 1, hi);
  }
}


x86 assembly (clang, -O0):
<qsort>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x10(%rbp),%eax
jge    1174 <qsort+0x54>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
call   1030 <partition@plt>
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x14(%rbp),%edx
sub    $0x1,%edx
call   1040 <qsort@plt>
mov    -0x8(%rbp),%rdi
mov    -0x14(%rbp),%esi
add    $0x1,%esi
mov    -0x10(%rbp),%edx
call   1040 <qsort@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<qsort>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
cmp    %edx,%esi
jge    1166 <qsort+0x46>
mov    %edx,%r14d
mov    %esi,%ebp
mov    %rdi,%r15
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    %r15,%rdi
mov    %ebp,%esi
mov    %r14d,%edx
call   1030 <partition@plt>
mov    %eax,%ebx
lea    -0x1(%rbx),%edx
mov    %r15,%rdi
mov    %ebp,%esi
call   1040 <qsort@plt>
add    $0x1,%ebx
mov    %ebx,%ebp
cmp    %r14d,%ebx
jl     1140 <qsort+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

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

LLVM IR (-O2):
define void @qsort(i32* %0, i32 %1, i32 %2) {
%4 = icmp slt i32 %1, %2
br i1 %4, label %5, label %11
5: ; preds = %3, %5
%6 = phi i32 [ %9, %5 ], [ %1, %3 ]
%7 = tail call i32 @partition(i32* %0, i32 %6, i32 %2)
%8 = add nsw i32 %7, -1
tail call void @qsort(i32* %0, i32 %6, i32 %8)
%9 = add nsw i32 %7, 1
%10 = icmp slt i32 %9, %2
br i1 %10, label %5, label %11
11: ; preds = %5, %3
ret void
}
/* Type definitions */
struct svc_req {
  int dummy;
};
typedef int /*<<< orphan*/ result;

/* Variables and functions */
int /*<<< orphan*/ memset(char *, int /*<<< orphan*/, int);
void *yppushproc_null_1_svc(void *argp, struct svc_req *rqstp) {
  static char result;
  (void)memset(&result, 0, sizeof(result));
  return ((void *)&result);
}


x86 assembly (clang, -O0):
<yppushproc_null_1_svc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0x2f02(%rip),%rdi
xor    %esi,%esi
mov    $0x1,%edx
call   1030 <memset@plt>
lea    0x2eef(%rip),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<yppushproc_null_1_svc>:
push   %rbx
lea    0x2f11(%rip),%rbx
mov    %rbx,%rdi
xor    %esi,%esi
mov    $0x1,%edx
call   1030 <memset@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
%struct.svc_req = type { i32 }
@yppushproc_null_1_svc.result = internal global i8 0
define i8* @yppushproc_null_1_svc(i8* %0, %struct.svc_req* %1) {
%3 = alloca i8*
%4 = alloca %struct.svc_req*
store i8* %0, i8** %3
store %struct.svc_req* %1, %struct.svc_req** %4
%5 = call i32 @memset(i8* @yppushproc_null_1_svc.result, i32 0, i32 1)
ret i8* @yppushproc_null_1_svc.result
}

LLVM IR (-O2):
%struct.svc_req = type { i32 }
@yppushproc_null_1_svc.result = internal global i8 0
define i8* @yppushproc_null_1_svc(i8* nocapture readnone %0, %struct.svc_req* nocapture readnone %1) {
%3 = tail call i32 @memset(i8* @yppushproc_null_1_svc.result, i32 0, i32 1)
ret i8* @yppushproc_null_1_svc.result
}
int test_imm_05int8_reg(signed char val) {
  return ((val) & (-0x05 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_05int8_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%edx
and    $0xfffffffb,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_05int8_reg>:
test   $0xfb,%dil
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_05int8_reg(i8 signext %0) {
%2 = and i8 %0, -5
%3 = icmp eq i8 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
int HelpItem163(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @HelpItem163() {
ret i32 0
}
int back() { return 10; }


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

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

LLVM IR (-O0):
define i32 @back() {
ret i32 10
}

LLVM IR (-O2):
define i32 @back() {
ret i32 10
}
/* Variables and functions */
int /*<<< orphan*/ kiotrader_scan_string(char const *);
int /*<<< orphan*/ kiotrader_switch_to_buffer(int /*<<< orphan*/);
void KTraderParse_initFlex(const char *_code) {
  kiotrader_switch_to_buffer(kiotrader_scan_string(_code));
}


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

x86 assembly (clang, -O2):
<KTraderParse_initFlex>:
push   %rax
call   1030 <kiotrader_scan_string@plt>
mov    %eax,%edi
pop    %rax
jmp    1040 <kiotrader_switch_to_buffer@plt>

LLVM IR (-O0):
define void @KTraderParse_initFlex(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @kiotrader_scan_string(i8* %3)
%5 = call i32 @kiotrader_switch_to_buffer(i32 %4)
ret void
}

LLVM IR (-O2):
define void @KTraderParse_initFlex(i8* %0) {
%2 = tail call i32 @kiotrader_scan_string(i8* %0)
%3 = tail call i32 @kiotrader_switch_to_buffer(i32 %2)
ret void
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
void CANRetrySet(uint32_t ui32Base, bool bAutoRetry) {
  uint32_t ui32CtlReg;
  ;
  ui32CtlReg = (*((volatile unsigned long *)(ui32Base + 0x00000000)));
  if (bAutoRetry) {
    ui32CtlReg &= ~0x00000020;
  } else {
    ui32CtlReg |= 0x00000020;
  }
  (*((volatile unsigned long *)(ui32Base + 0x00000000))) = ui32CtlReg;
}


x86 assembly (clang, -O0):
<CANRetrySet>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
add    $0x0,%eax
cltq
mov    (%rax),%rax
mov    %eax,-0xc(%rbp)
cmpl   $0x0,-0x8(%rbp)
je     1130 <CANRetrySet+0x30>
mov    -0xc(%rbp),%eax
and    $0xffffffdf,%eax
mov    %eax,-0xc(%rbp)
jmp    1139 <CANRetrySet+0x39>
mov    -0xc(%rbp),%eax
or     $0x20,%eax
mov    %eax,-0xc(%rbp)
movslq -0xc(%rbp),%rcx
mov    -0x4(%rbp),%eax
add    $0x0,%eax
cltq
mov    %rcx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<CANRetrySet>:
movslq %edi,%rax
mov    (%rax),%rcx
xor    %edx,%edx
test   %esi,%esi
sete   %dl
and    $0xffffffdf,%ecx
shl    $0x5,%edx
or     %ecx,%edx
movslq %edx,%rcx
mov    %rcx,(%rax)
ret

LLVM IR (-O0):
define void @CANRetrySet(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%6 = load i32, i32* %3
%7 = add nsw i32 %6, 0
%8 = sext i32 %7 to i64
%9 = inttoptr i64 %8 to i64*
%10 = load volatile i64, i64* %9
%11 = trunc i64 %10 to i32
store i32 %11, i32* %5
%12 = load i32, i32* %4
%13 = icmp ne i32 %12, 0
br i1 %13, label %14, label %17
14: ; preds = %2
%15 = load i32, i32* %5
%16 = and i32 %15, -33
store i32 %16, i32* %5
br label %20
17: ; preds = %2
%18 = load i32, i32* %5
%19 = or i32 %18, 32
store i32 %19, i32* %5
br label %20
20: ; preds = %17, %14
%21 = load i32, i32* %5
%22 = sext i32 %21 to i64
%23 = load i32, i32* %3
%24 = add nsw i32 %23, 0
%25 = sext i32 %24 to i64
%26 = inttoptr i64 %25 to i64*
store volatile i64 %22, i64* %26
ret void
}

LLVM IR (-O2):
define void @CANRetrySet(i32 %0, i32 %1) {
%3 = sext i32 %0 to i64
%4 = inttoptr i64 %3 to i64*
%5 = load volatile i64, i64* %4
%6 = icmp eq i32 %1, 0
%7 = and i64 %5, 4294967263
%8 = select i1 %6, i64 32, i64 0
%9 = or i64 %7, %8
%10 = shl nuw i64 %9, 32
%11 = ashr exact i64 %10, 32
store volatile i64 %11, i64* %4
ret void
}
int jeSlapica(int opseg, int promjerRupe) {
  float promjerPeciva;
  promjerPeciva = opseg / 6.0;
  if (promjerPeciva <= (float)promjerRupe)
    return 1;
  else
    return 0;
}


x86 assembly (clang, -O0):
<jeSlapica>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
cvtsi2sdl -0x8(%rbp),%xmm0
movsd  0xee9(%rip),%xmm1
divsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x10(%rbp)
movss  -0x10(%rbp),%xmm1
cvtsi2ssl -0xc(%rbp),%xmm0
ucomiss %xmm1,%xmm0
jb     1143 <jeSlapica+0x43>
movl   $0x1,-0x4(%rbp)
jmp    114a <jeSlapica+0x4a>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<jeSlapica>:
cvtsi2sd %edi,%xmm0
divsd  0xef4(%rip),%xmm0
cvtsd2ss %xmm0,%xmm0
cvtsi2ss %esi,%xmm1
xor    %eax,%eax
ucomiss %xmm0,%xmm1
setae  %al
ret

LLVM IR (-O0):
define i32 @jeSlapica(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 = sitofp i32 %7 to double
%9 = fdiv double %8, 6.000000e+00
%10 = fptrunc double %9 to float
store float %10, float* %6
%11 = load float, float* %6
%12 = load i32, i32* %5
%13 = sitofp i32 %12 to float
%14 = fcmp ole float %11, %13
br i1 %14, label %15, label %16
15: ; preds = %2
store i32 1, i32* %3
br label %17
16: ; preds = %2
store i32 0, i32* %3
br label %17
17: ; preds = %16, %15
%18 = load i32, i32* %3
ret i32 %18
}

LLVM IR (-O2):
define i32 @jeSlapica(i32 %0, i32 %1) {
%3 = sitofp i32 %0 to double
%4 = fdiv double %3, 6.000000e+00
%5 = fptrunc double %4 to float
%6 = sitofp i32 %1 to float
%7 = fcmp ole float %5, %6
%8 = zext i1 %7 to i32
ret i32 %8
}
void genc_ole_d() {}


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

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

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

LLVM IR (-O2):
define void @genc_ole_d() {
ret void
}
/* Type definitions */
typedef int uint8_t;

/* Variables and functions */
int /*<<< orphan*/ mcp2515_spi_select();
int /*<<< orphan*/ mcp2515_spi_transfer(int, int /*<<< orphan*/ *);
int /*<<< orphan*/ mcp2515_spi_unselect();
void mcp2515_write(uint8_t regAddr, uint8_t data) {
  mcp2515_spi_select();
  mcp2515_spi_transfer(0x02, NULL);
  mcp2515_spi_transfer(regAddr, NULL);
  mcp2515_spi_transfer(data, NULL);
  mcp2515_spi_unselect();
}


x86 assembly (clang, -O0):
<mcp2515_write>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    $0x0,%al
call   1030 <mcp2515_spi_select@plt>
mov    $0x2,%edi
xor    %eax,%eax
mov    %eax,%esi
call   1040 <mcp2515_spi_transfer@plt>
mov    -0x4(%rbp),%edi
xor    %eax,%eax
mov    %eax,%esi
call   1040 <mcp2515_spi_transfer@plt>
mov    -0x8(%rbp),%edi
xor    %eax,%eax
mov    %eax,%esi
call   1040 <mcp2515_spi_transfer@plt>
mov    $0x0,%al
call   1050 <mcp2515_spi_unselect@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mcp2515_write>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
xor    %eax,%eax
call   1030 <mcp2515_spi_select@plt>
mov    $0x2,%edi
xor    %esi,%esi
call   1040 <mcp2515_spi_transfer@plt>
mov    %ebp,%edi
xor    %esi,%esi
call   1040 <mcp2515_spi_transfer@plt>
mov    %ebx,%edi
xor    %esi,%esi
call   1040 <mcp2515_spi_transfer@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1050 <mcp2515_spi_unselect@plt>

LLVM IR (-O0):
define void @mcp2515_write(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = call i32 (...) @mcp2515_spi_select()
%6 = call i32 @mcp2515_spi_transfer(i32 2, i32* null)
%7 = load i32, i32* %3
%8 = call i32 @mcp2515_spi_transfer(i32 %7, i32* null)
%9 = load i32, i32* %4
%10 = call i32 @mcp2515_spi_transfer(i32 %9, i32* null)
%11 = call i32 (...) @mcp2515_spi_unselect()
ret void
}

LLVM IR (-O2):
define void @mcp2515_write(i32 %0, i32 %1) {
%3 = tail call i32 (...) @mcp2515_spi_select()
%4 = tail call i32 @mcp2515_spi_transfer(i32 2, i32* null)
%5 = tail call i32 @mcp2515_spi_transfer(i32 %0, i32* null)
%6 = tail call i32 @mcp2515_spi_transfer(i32 %1, i32* null)
%7 = tail call i32 (...) @mcp2515_spi_unselect()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ compare(int, int);
int main() {
  compare(4, 2);
  compare(4, 5);
  compare(4, 4);
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @compare(i32 4, i32 2)
%2 = tail call i32 @compare(i32 4, i32 5)
%3 = tail call i32 @compare(i32 4, i32 4)
ret i32 0
}