xunge/DecIR huggingface dataset:
/* Variables and functions */
scalar_t__ EINVAL;
scalar_t__ errno;
unsigned long strtoul(char const *, char **, int);
unsigned long estrtoul(const char *str, int base) {
  char *end;
  unsigned long n;
  errno = 0;
  n = strtoul(str, &end, base);
  if (end == str || *end != '\0')
    errno = EINVAL;
  return n;
}


x86 assembly (clang, -O0):
<estrtoul>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    0x2eba(%rip),%rax
movq   $0x0,(%rax)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%edx
lea    -0x18(%rbp),%rsi
call   1030 <strtoul@plt>
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rax
cmp    -0x8(%rbp),%rax
je     115f <estrtoul+0x4f>
mov    -0x18(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     1173 <estrtoul+0x63>
mov    0x2e72(%rip),%rax
mov    (%rax),%rcx
mov    0x2e70(%rip),%rax
mov    %rcx,(%rax)
mov    -0x20(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<estrtoul>:
push   %r14
push   %rbx
push   %rax
mov    %esi,%edx
mov    %rdi,%rbx
mov    0x2ec0(%rip),%r14
movq   $0x0,(%r14)
mov    %rsp,%rsi
call   1030 <strtoul@plt>
mov    (%rsp),%rcx
cmp    %rbx,%rcx
je     113d <estrtoul+0x2d>
cmpb   $0x0,(%rcx)
je     114a <estrtoul+0x3a>
mov    0x2e94(%rip),%rcx
mov    (%rcx),%rcx
mov    %rcx,(%r14)
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@errno = global i64 0
@EINVAL = global i64 0
define i64 @estrtoul(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i64
store i8* %0, i8** %3
store i32 %1, i32* %4
store i64 0, i64* @errno
%7 = load i8*, i8** %3
%8 = load i32, i32* %4
%9 = call i64 @strtoul(i8* %7, i8** %5, i32 %8)
store i64 %9, i64* %6
%10 = load i8*, i8** %5
%11 = load i8*, i8** %3
%12 = icmp eq i8* %10, %11
br i1 %12, label %18, label %13
13: ; preds = %2
%14 = load i8*, i8** %5
%15 = load i8, i8* %14
%16 = sext i8 %15 to i32
%17 = icmp ne i32 %16, 0
br i1 %17, label %18, label %20
18: ; preds = %13, %2
%19 = load i64, i64* @EINVAL
store i64 %19, i64* @errno
br label %20
20: ; preds = %18, %13
%21 = load i64, i64* %6
ret i64 %21
}

LLVM IR (-O2):
@errno = global i64 0
@EINVAL = global i64 0
define i64 @estrtoul(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = bitcast i8** %3 to i8*
store i64 0, i64* @errno
%5 = call i64 @strtoul(i8* %0, i8** %3, i32 %1)
%6 = load i8*, i8** %3
%7 = icmp eq i8* %6, %0
br i1 %7, label %11, label %8
8: ; preds = %2
%9 = load i8, i8* %6
%10 = icmp eq i8 %9, 0
br i1 %10, label %13, label %11
11: ; preds = %8, %2
%12 = load i64, i64* @EINVAL
store i64 %12, i64* @errno
br label %13
13: ; preds = %11, %8
ret i64 %5
}
void XRayEndFrame() {}


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

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

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

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

/* Variables and functions */
int /*<<< orphan*/ printf(char *, void *);
void standing_exit(void *node, void *object, struct node_operations *ops) {
  printf("standing_exit %p\n", node);
}


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

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

LLVM IR (-O0):
%struct.node_operations = type { i32 }
@.str = [18 x i8] c"standing_exit %p\0A\00"
define void @standing_exit(i8* %0, i8* %1, %struct.node_operations* %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca %struct.node_operations*
store i8* %0, i8** %4
store i8* %1, i8** %5
store %struct.node_operations* %2, %struct.node_operations** %6
%7 = load i8*, i8** %4
%8 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i8* %7)
ret void
}

LLVM IR (-O2):
%struct.node_operations = type { i32 }
@.str = [18 x i8] c"standing_exit %p\0A\00"
define void @standing_exit(i8* %0, i8* nocapture readnone %1, %struct.node_operations* nocapture readnone %2) {
%4 = tail call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ make_filename(long, char *, char *);
long umfpack_zi_load_symbolic(void **, char *);
void umf4zlsym(void **Symbolic, long *filenum, long *status) {
  char filename[200];
  make_filename(*filenum, "s", filename);
  *status = umfpack_zi_load_symbolic(Symbolic, filename);
}


x86 assembly (clang, -O0):
<umf4zlsym>:
push   %rbp
mov    %rsp,%rbp
sub    $0xe0,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
lea    -0xe0(%rbp),%rdx
lea    0xeb4(%rip),%rsi
call   1040 <make_filename@plt>
mov    -0x8(%rbp),%rdi
lea    -0xe0(%rbp),%rsi
call   1030 <umfpack_zi_load_symbolic@plt>
mov    %rax,%rcx
mov    -0x18(%rbp),%rax
mov    %rcx,(%rax)
add    $0xe0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<umf4zlsym>:
push   %r15
push   %r14
push   %rbx
sub    $0xd0,%rsp
mov    %rdx,%r14
mov    %rdi,%rbx
mov    (%rsi),%rdi
lea    0xec4(%rip),%rsi
mov    %rsp,%r15
mov    %r15,%rdx
call   1040 <make_filename@plt>
mov    %rbx,%rdi
mov    %r15,%rsi
call   1030 <umfpack_zi_load_symbolic@plt>
mov    %rax,(%r14)
add    $0xd0,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [2 x i8] c"s\00"
define void @umf4zlsym(i8** %0, i64* %1, i64* %2) {
%4 = alloca i8**
%5 = alloca i64*
%6 = alloca i64*
%7 = alloca [200 x i8]
store i8** %0, i8*** %4
store i64* %1, i64** %5
store i64* %2, i64** %6
%8 = load i64*, i64** %5
%9 = load i64, i64* %8
%10 = getelementptr inbounds [200 x i8], [200 x i8]* %7, i64 0, i64 0
%11 = call i32 @make_filename(i64 %9, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), i8* %10)
%12 = load i8**, i8*** %4
%13 = getelementptr inbounds [200 x i8], [200 x i8]* %7, i64 0, i64 0
%14 = call i64 @umfpack_zi_load_symbolic(i8** %12, i8* %13)
%15 = load i64*, i64** %6
store i64 %14, i64* %15
ret void
}

LLVM IR (-O2):
@.str = [2 x i8] c"s\00"
define void @umf4zlsym(i8** %0, i64* nocapture %1, i64* nocapture writeonly %2) {
%4 = alloca [200 x i8]
%5 = getelementptr inbounds [200 x i8], [200 x i8]* %4, i64 0, i64 0
%6 = load i64, i64* %1
%7 = call i32 @make_filename(i64 %6, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), i8* %5)
%8 = call i64 @umfpack_zi_load_symbolic(i8** %0, i8* %5)
store i64 %8, i64* %2
ret void
}
/* Type definitions */
typedef scalar_t__ time_t;
struct timeval {
  scalar_t__ tv_sec;
};

/* Variables and functions */
int /*<<< orphan*/ gettimeofday(struct timeval *, int /*<<< orphan*/ *);
time_t time(time_t *t) {
  time_t result;
  struct timeval tv;
  gettimeofday(&tv, NULL);
  result = (time_t)tv.tv_sec;
  if (t != NULL) {
    *t = result;
  }
  return result;
}


x86 assembly (clang, -O0):
<time>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
lea    -0x18(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1030 <gettimeofday@plt>
mov    -0x18(%rbp),%rax
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1147 <time+0x37>
mov    -0x10(%rbp),%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,(%rax)
mov    -0x10(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<time>:
push   %rbx
sub    $0x10,%rsp
mov    %rdi,%rbx
lea    0x8(%rsp),%rdi
xor    %esi,%esi
call   1030 <gettimeofday@plt>
mov    0x8(%rsp),%rax
test   %rbx,%rbx
je     1131 <time+0x21>
mov    %rax,(%rbx)
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
%struct.timeval = type { i64 }
define i64 @time(i64* %0) {
%2 = alloca i64*
%3 = alloca i64
%4 = alloca %struct.timeval
store i64* %0, i64** %2
%5 = call i32 @gettimeofday(%struct.timeval* %4, i32* null)
%6 = getelementptr inbounds %struct.timeval, %struct.timeval* %4, i32 0, i32 0
%7 = load i64, i64* %6
store i64 %7, i64* %3
%8 = load i64*, i64** %2
%9 = icmp ne i64* %8, null
br i1 %9, label %10, label %13
10: ; preds = %1
%11 = load i64, i64* %3
%12 = load i64*, i64** %2
store i64 %11, i64* %12
br label %13
13: ; preds = %10, %1
%14 = load i64, i64* %3
ret i64 %14
}

LLVM IR (-O2):
%struct.timeval = type { i64 }
define i64 @time(i64* writeonly %0) {
%2 = alloca %struct.timeval
%3 = bitcast %struct.timeval* %2 to i8*
%4 = call i32 @gettimeofday(%struct.timeval* %2, i32* null)
%5 = getelementptr inbounds %struct.timeval, %struct.timeval* %2, i64 0, i32 0
%6 = load i64, i64* %5
%7 = icmp eq i64* %0, null
br i1 %7, label %9, label %8
8: ; preds = %1
store i64 %6, i64* %0
br label %9
9: ; preds = %8, %1
ret i64 %6
}
/* Variables and functions */
int /*<<< orphan*/ tolower(int /*<<< orphan*/);
void strtolower(const char *src, char *dst) {
  while (*src) {
    *dst++ = tolower(*src++);
  }
  *dst = '\0';
}


x86 assembly (clang, -O0):
<strtolower>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
je     115c <strtolower+0x4c>
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
movsbl (%rax),%edi
call   1030 <tolower@plt>
mov    %al,%cl
mov    -0x10(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x10(%rbp)
mov    %cl,(%rax)
jmp    1120 <strtolower+0x10>
mov    -0x10(%rbp),%rax
movb   $0x0,(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strtolower>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    (%rdi),%al
test   %al,%al
je     114a <strtolower+0x3a>
mov    %rdi,%rbx
add    $0x1,%rbx
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
movsbl %al,%edi
call   1030 <tolower@plt>
mov    %al,(%r14)
add    $0x1,%r14
movzbl (%rbx),%eax
add    $0x1,%rbx
test   %al,%al
jne    1130 <strtolower+0x20>
movb   $0x0,(%r14)
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define void @strtolower(i8* nocapture %0, i8* nocapture writeonly %1) {
%3 = load i8, i8* %0
%4 = icmp eq i8 %3, 0
br i1 %4, label %16, label %5
5: ; preds = %2, %5
%6 = phi i8 [ %14, %5 ], [ %3, %2 ]
%7 = phi i8* [ %13, %5 ], [ %1, %2 ]
%8 = phi i8* [ %9, %5 ], [ %0, %2 ]
%9 = getelementptr inbounds i8, i8* %8, i64 1
%10 = sext i8 %6 to i32
%11 = tail call i32 @tolower(i32 %10)
%12 = trunc i32 %11 to i8
%13 = getelementptr inbounds i8, i8* %7, i64 1
store i8 %12, i8* %7
%14 = load i8, i8* %9
%15 = icmp eq i8 %14, 0
br i1 %15, label %16, label %5
16: ; preds = %5, %2
%17 = phi i8* [ %1, %2 ], [ %13, %5 ]
store i8 0, i8* %17
ret void
}
/* Variables and functions */
long double powl(long double, long double);
long double generate_prime(long double w_a, long double w_b, long double e_a,
                           long double e_b, long double f) {
  long double p = powl(w_a, e_a) * powl(w_b, e_b) * f - 1;
  return p;
}


x86 assembly (clang, -O0):
<generate_prime>:
push   %rbp
mov    %rsp,%rbp
sub    $0x90,%rsp
fldt   0x50(%rbp)
fldt   0x40(%rbp)
fldt   0x30(%rbp)
fldt   0x20(%rbp)
fldt   0x10(%rbp)
fstpt  -0x10(%rbp)
fstpt  -0x20(%rbp)
fstpt  -0x30(%rbp)
fstpt  -0x40(%rbp)
fstpt  -0x50(%rbp)
fldt   -0x10(%rbp)
fldt   -0x30(%rbp)
mov    %rsp,%rax
fstpt  0x10(%rax)
fstpt  (%rax)
call   1030 <powl@plt>
fstpt  -0x6c(%rbp)
fldt   -0x20(%rbp)
fldt   -0x40(%rbp)
mov    %rsp,%rax
fstpt  0x10(%rax)
fstpt  (%rax)
call   1030 <powl@plt>
fldt   -0x6c(%rbp)
fmulp  %st,%st(1)
fldt   -0x50(%rbp)
fmulp  %st,%st(1)
fld1
fchs
faddp  %st,%st(1)
fstpt  -0x60(%rbp)
fldt   -0x60(%rbp)
add    $0x90,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<generate_prime>:
sub    $0x58,%rsp
fldt   0xa0(%rsp)
fstpt  0x4c(%rsp)
fldt   0x70(%rsp)
fstpt  0x40(%rsp)
fldt   0x90(%rsp)
fstpt  0x34(%rsp)
fldt   0x60(%rsp)
fldt   0x80(%rsp)
fstpt  0x10(%rsp)
fstpt  (%rsp)
call   1030 <powl@plt>
fstpt  0x28(%rsp)
fldt   0x34(%rsp)
fstpt  0x10(%rsp)
fldt   0x40(%rsp)
fstpt  (%rsp)
call   1030 <powl@plt>
fldt   0x28(%rsp)
fmulp  %st,%st(1)
fldt   0x4c(%rsp)
fmulp  %st,%st(1)
fld1
fchs
faddp  %st,%st(1)
add    $0x58,%rsp
ret

LLVM IR (-O0):
define x86_fp80 @generate_prime(x86_fp80 %0, x86_fp80 %1, x86_fp80 %2, x86_fp80 %3, x86_fp80 %4) {
%6 = alloca x86_fp80
%7 = alloca x86_fp80
%8 = alloca x86_fp80
%9 = alloca x86_fp80
%10 = alloca x86_fp80
%11 = alloca x86_fp80
store x86_fp80 %0, x86_fp80* %6
store x86_fp80 %1, x86_fp80* %7
store x86_fp80 %2, x86_fp80* %8
store x86_fp80 %3, x86_fp80* %9
store x86_fp80 %4, x86_fp80* %10
%12 = load x86_fp80, x86_fp80* %6
%13 = load x86_fp80, x86_fp80* %8
%14 = call x86_fp80 @powl(x86_fp80 %12, x86_fp80 %13)
%15 = load x86_fp80, x86_fp80* %7
%16 = load x86_fp80, x86_fp80* %9
%17 = call x86_fp80 @powl(x86_fp80 %15, x86_fp80 %16)
%18 = fmul x86_fp80 %14, %17
%19 = load x86_fp80, x86_fp80* %10
%20 = call x86_fp80 @llvm.fmuladd.f80(x86_fp80 %18, x86_fp80 %19, x86_fp80 0xKBFFF8000000000000000)
store x86_fp80 %20, x86_fp80* %11
%21 = load x86_fp80, x86_fp80* %11
ret x86_fp80 %21
}

LLVM IR (-O2):
define x86_fp80 @generate_prime(x86_fp80 %0, x86_fp80 %1, x86_fp80 %2, x86_fp80 %3, x86_fp80 %4) {
%6 = tail call x86_fp80 @powl(x86_fp80 %0, x86_fp80 %2)
%7 = tail call x86_fp80 @powl(x86_fp80 %1, x86_fp80 %3)
%8 = fmul x86_fp80 %6, %7
%9 = tail call x86_fp80 @llvm.fmuladd.f80(x86_fp80 %8, x86_fp80 %4, x86_fp80 0xKBFFF8000000000000000)
ret x86_fp80 %9
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
void asmheader() {
  printf("#assemble/link with 'gcc file.s -o file\n");
  printf("	.text\n");
  printf(".globl _main\n");
  printf("	.data\n");
  printf("IOBUF: .space %d\n", 256);
}


x86 assembly (clang, -O0):
<asmheader>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf00(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xefa(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xefa(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xef4(%rip),%rdi
mov    $0x100,%esi
mov    $0x0,%al
call   1030 <printf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<asmheader>:
push   %rax
lea    0xeea(%rip),%rdi
call   1030 <puts@plt>
lea    0xf06(%rip),%rdi
call   1030 <puts@plt>
lea    0xf01(%rip),%rdi
call   1030 <puts@plt>
lea    0xf02(%rip),%rdi
call   1030 <puts@plt>
lea    0xea8(%rip),%rdi
mov    $0x100,%esi
xor    %eax,%eax
pop    %rcx
jmp    1040 <printf@plt>

LLVM IR (-O0):
@.str = [41 x i8] c"#assemble/link with 'gcc file.s -o file\0A\00"
@.str.1 = [8 x i8] c"\09.text\0A\00"
@.str.2 = [14 x i8] c".globl _main\0A\00"
@.str.3 = [8 x i8] c"\09.data\0A\00"
@.str.4 = [18 x i8] c"IOBUF: .space %d\0A\00"
define void @asmheader() {
%1 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str, i64 0, i64 0))
%2 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i64 0, i64 0))
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.3, i64 0, i64 0))
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.4, i64 0, i64 0), i32 256)
ret void
}

LLVM IR (-O2):
@.str.4 = [18 x i8] c"IOBUF: .space %d\0A\00"
@str = [40 x i8] c"#assemble/link with 'gcc file.s -o file\00"
@str.5 = [7 x i8] c"\09.text\00"
@str.6 = [13 x i8] c".globl _main\00"
@str.7 = [7 x i8] c"\09.data\00"
define void @asmheader() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([40 x i8], [40 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @str.5, i64 0, i64 0))
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @str.6, i64 0, i64 0))
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @str.7, i64 0, i64 0))
%5 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str.4, i64 0, i64 0), i32 256)
ret void
}
int filter_initialize(void **user_param) { return (0); }


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

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

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

LLVM IR (-O2):
define i32 @filter_initialize(i8** nocapture readnone %0) {
ret i32 0
}
unsigned int multiplicacao(unsigned int x, unsigned int y) { return x * y; }


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

x86 assembly (clang, -O2):
<multiplicacao>:
mov    %edi,%eax
imul   %esi,%eax
ret

LLVM IR (-O0):
define i32 @multiplicacao(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 = load i32, i32* %4
%7 = mul i32 %5, %6
ret i32 %7
}

LLVM IR (-O2):
define i32 @multiplicacao(i32 %0, i32 %1) {
%3 = mul i32 %1, %0
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ GyrCon_OFILM(int);
int /*<<< orphan*/ SrvCon_OFILM(int, int);
void OisEnaLin_OFILM(void) {
  SrvCon_OFILM(0x00, 0x01);
  SrvCon_OFILM(0x01, 0x01);
  GyrCon_OFILM(0x02);
}


x86 assembly (clang, -O0):
<OisEnaLin_OFILM>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
mov    $0x1,%esi
call   1040 <SrvCon_OFILM@plt>
mov    $0x1,%esi
mov    %esi,%edi
call   1040 <SrvCon_OFILM@plt>
mov    $0x2,%edi
call   1030 <GyrCon_OFILM@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<OisEnaLin_OFILM>:
push   %rax
xor    %edi,%edi
mov    $0x1,%esi
call   1040 <SrvCon_OFILM@plt>
mov    $0x1,%edi
mov    $0x1,%esi
call   1040 <SrvCon_OFILM@plt>
mov    $0x2,%edi
pop    %rax
jmp    1030 <GyrCon_OFILM@plt>

LLVM IR (-O0):
define void @OisEnaLin_OFILM() {
%1 = call i32 @SrvCon_OFILM(i32 0, i32 1)
%2 = call i32 @SrvCon_OFILM(i32 1, i32 1)
%3 = call i32 @GyrCon_OFILM(i32 2)
ret void
}

LLVM IR (-O2):
define void @OisEnaLin_OFILM() {
%1 = tail call i32 @SrvCon_OFILM(i32 0, i32 1)
%2 = tail call i32 @SrvCon_OFILM(i32 1, i32 1)
%3 = tail call i32 @GyrCon_OFILM(i32 2)
ret void
}
/* Variables and functions */
float mt_rand_real(int, int);
int mt_probability(float prob, int my_rank) {
  return (mt_rand_real(1, my_rank) <= prob);
}


x86 assembly (clang, -O0):
<mt_probability>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%esi
mov    $0x1,%edi
call   1030 <mt_rand_real@plt>
movaps %xmm0,%xmm1
movss  -0x4(%rbp),%xmm0
ucomiss %xmm1,%xmm0
setae  %al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mt_probability>:
push   %rax
mov    %edi,%esi
movss  %xmm0,0x4(%rsp)
mov    $0x1,%edi
call   1030 <mt_rand_real@plt>
xor    %eax,%eax
movss  0x4(%rsp),%xmm1
ucomiss %xmm0,%xmm1
setae  %al
pop    %rcx
ret

LLVM IR (-O0):
define i32 @mt_probability(float %0, i32 %1) {
%3 = alloca float
%4 = alloca i32
store float %0, float* %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = call float @mt_rand_real(i32 1, i32 %5)
%7 = load float, float* %3
%8 = fcmp ole float %6, %7
%9 = zext i1 %8 to i32
ret i32 %9
}

LLVM IR (-O2):
define i32 @mt_probability(float %0, i32 %1) {
%3 = tail call float @mt_rand_real(i32 1, i32 %1)
%4 = fcmp ole float %3, %0
%5 = zext i1 %4 to i32
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void bye(void) {
  fprintf(stderr, "*** error exit ***\n");
  exit(1);
}


x86 assembly (clang, -O0):
<bye>:
push   %rbp
mov    %rsp,%rbp
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<bye>:
push   %rax
mov    0x2eb8(%rip),%rax
mov    (%rax),%edi
lea    0xecf(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [20 x i8] c"*** error exit ***\0A\00"
define void @bye() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [20 x i8] c"*** error exit ***\0A\00"
define void @bye() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ fopen(char const *, char *);
void touch(char *command) { fopen((const char *)command, "w"); }


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

x86 assembly (clang, -O2):
<touch>:
lea    0xee9(%rip),%rsi
jmp    1030 <fopen@plt>

LLVM IR (-O0):
@.str = [2 x i8] c"w\00"
define void @touch(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @fopen(i8* %3, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [2 x i8] c"w\00"
define void @touch(i8* %0) {
%2 = tail call i32 @fopen(i8* %0, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int mfspr(int);
int /*<<< orphan*/ mtspr(int, int);
void dmmu_disable(void) {
  mtspr(((0 << (11)) + 17), mfspr(((0 << (11)) + 17)) & ~0x00000020);
}


x86 assembly (clang, -O0):
<dmmu_disable>:
push   %rbp
mov    %rsp,%rbp
mov    $0x11,%edi
call   1030 <mfspr@plt>
mov    %eax,%esi
and    $0xffffffdf,%esi
mov    $0x11,%edi
call   1040 <mtspr@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<dmmu_disable>:
push   %rax
mov    $0x11,%edi
call   1030 <mfspr@plt>
and    $0xffffffdf,%eax
mov    $0x11,%edi
mov    %eax,%esi
pop    %rax
jmp    1040 <mtspr@plt>

LLVM IR (-O0):
define void @dmmu_disable() {
%1 = call i32 @mfspr(i32 17)
%2 = and i32 %1, -33
%3 = call i32 @mtspr(i32 17, i32 %2)
ret void
}

LLVM IR (-O2):
define void @dmmu_disable() {
%1 = tail call i32 @mfspr(i32 17)
%2 = and i32 %1, -33
%3 = tail call i32 @mtspr(i32 17, i32 %2)
ret void
}
int main() {
  int x;
  int *p1 = (int *)malloc(sizeof(int));
  int *p2 = &x;
  char str[3] = "asd";
  printf("p1: %d\np2: %d\nstr[3]: %d\n", is_stack(p1), is_stack(p2),
         is_stack(str));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x4,%edi
call   1040 <malloc@plt>
mov    %rax,-0x10(%rbp)
lea    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    0xea4(%rip),%ax
mov    %ax,-0x1b(%rbp)
mov    0xe9c(%rip),%al
mov    %al,-0x19(%rbp)
mov    -0x10(%rbp),%rdi
mov    $0x0,%al
call   1050 <is_stack@plt>
mov    %eax,-0x24(%rbp)
mov    -0x18(%rbp),%rdi
mov    $0x0,%al
call   1050 <is_stack@plt>
mov    %eax,-0x20(%rbp)
lea    -0x1b(%rbp),%rdi
mov    $0x0,%al
call   1050 <is_stack@plt>
mov    -0x24(%rbp),%esi
mov    -0x20(%rbp),%edx
mov    %eax,%ecx
lea    0xe64(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %rbx
push   %rax
mov    $0x4,%edi
call   1040 <malloc@plt>
movb   $0x64,0x2(%rsp)
movw   $0x7361,(%rsp)
mov    %rax,%rdi
xor    %eax,%eax
call   1050 <is_stack@plt>
mov    %eax,%ebx
lea    0x4(%rsp),%rdi
xor    %eax,%eax
call   1050 <is_stack@plt>
mov    %eax,%ebp
mov    %rsp,%rdi
xor    %eax,%eax
call   1050 <is_stack@plt>
lea    0xe90(%rip),%rdi
mov    %ebx,%esi
mov    %ebp,%edx
mov    %eax,%ecx
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@__const.main.str = [3 x i8] c"asd"
@.str = [26 x i8] c"p1: %d\0Ap2: %d\0Astr[3]: %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32*
%4 = alloca i32*
%5 = alloca [3 x i8]
store i32 0, i32* %1
%6 = call i8* @malloc(i64 4)
%7 = bitcast i8* %6 to i32*
store i32* %7, i32** %3
store i32* %2, i32** %4
%8 = bitcast [3 x i8]* %5 to i8*
%9 = load i32*, i32** %3
%10 = call i32 (i32*, ...) bitcast (i32 (...)* @is_stack to i32 (i32*, ...)*)(i32* %9)
%11 = load i32*, i32** %4
%12 = call i32 (i32*, ...) bitcast (i32 (...)* @is_stack to i32 (i32*, ...)*)(i32* %11)
%13 = getelementptr inbounds [3 x i8], [3 x i8]* %5, i64 0, i64 0
%14 = call i32 (i8*, ...) bitcast (i32 (...)* @is_stack to i32 (i8*, ...)*)(i8* %13)
%15 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0), i32 %10, i32 %12, i32 %14)
ret i32 0
}

LLVM IR (-O2):
@__const.main.str = [3 x i8] c"asd"
@.str = [26 x i8] c"p1: %d\0Ap2: %d\0Astr[3]: %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [3 x i8]
%3 = bitcast i32* %1 to i8*
%4 = tail call dereferenceable_or_null(4) i8* @malloc(i64 4)
%5 = bitcast i8* %4 to i32*
%6 = getelementptr inbounds [3 x i8], [3 x i8]* %2, i64 0, i64 0
%7 = tail call i32 (i32*, ...) bitcast (i32 (...)* @is_stack to i32 (i32*, ...)*)(i32* %5)
%8 = call i32 (i32*, ...) bitcast (i32 (...)* @is_stack to i32 (i32*, ...)*)(i32* %1)
%9 = call i32 (i8*, ...) bitcast (i32 (...)* @is_stack to i32 (i8*, ...)*)(i8* %6)
%10 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0), i32 %7, i32 %8, i32 %9)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ execl(char *, char *, char *, int /*<<< orphan*/);
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *);
int main(int argc, char *argv[], char *env[]) {
  execl(argv[1], argv[1], argv[0], 0);
  printf("Error on program start\n");
  exit(-1);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rsi
mov    -0x10(%rbp),%rax
mov    (%rax),%rdx
xor    %ecx,%ecx
call   1050 <execl@plt>
lea    0xe91(%rip),%rdi
call   1030 <printf@plt>
mov    $0xffffffff,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    (%rsi),%rdx
mov    0x8(%rsi),%rdi
mov    %rdi,%rsi
xor    %ecx,%ecx
call   1050 <execl@plt>
lea    0xeb7(%rip),%rdi
call   1030 <puts@plt>
mov    $0xffffffff,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [24 x i8] c"Error on program start\0A\00"
define i32 @main(i32 %0, i8** %1, i8** %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i8**
%7 = alloca i8**
store i32 0, i32* %4
store i32 %0, i32* %5
store i8** %1, i8*** %6
store i8** %2, i8*** %7
%8 = load i8**, i8*** %6
%9 = getelementptr inbounds i8*, i8** %8, i64 1
%10 = load i8*, i8** %9
%11 = load i8**, i8*** %6
%12 = getelementptr inbounds i8*, i8** %11, i64 1
%13 = load i8*, i8** %12
%14 = load i8**, i8*** %6
%15 = getelementptr inbounds i8*, i8** %14, i64 0
%16 = load i8*, i8** %15
%17 = call i32 @execl(i8* %10, i8* %13, i8* %16, i32 0)
%18 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
%19 = call i32 @exit(i32 -1)
unreachable
}

LLVM IR (-O2):
@str = [23 x i8] c"Error on program start\00"
define i32 @main(i32 %0, i8** nocapture %1, i8** nocapture readnone %2) {
%4 = getelementptr inbounds i8*, i8** %1, i64 1
%5 = load i8*, i8** %4
%6 = load i8*, i8** %1
%7 = tail call i32 @execl(i8* %5, i8* %5, i8* %6, i32 0)
%8 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @str, i64 0, i64 0))
%9 = tail call i32 @exit(i32 -1)
unreachable
}
/* Type definitions */
typedef int /*<<< orphan*/ int16_t;

/* Variables and functions */
int16_t myAbs(int16_t param) {
  if (param < 0)
    return -param;
  else
    return param;
}


x86 assembly (clang, -O0):
<myAbs>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jge    111e <myAbs+0x1e>
xor    %eax,%eax
sub    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1124 <myAbs+0x24>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<myAbs>:
mov    %edi,%eax
neg    %eax
cmovs  %edi,%eax
ret

LLVM IR (-O0):
define i32 @myAbs(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = icmp slt i32 %4, 0
br i1 %5, label %6, label %9
6: ; preds = %1
%7 = load i32, i32* %3
%8 = sub nsw i32 0, %7
store i32 %8, i32* %2
br label %11
9: ; preds = %1
%10 = load i32, i32* %3
store i32 %10, i32* %2
br label %11
11: ; preds = %9, %6
%12 = load i32, i32* %2
ret i32 %12
}

LLVM IR (-O2):
define i32 @myAbs(i32 %0) {
%2 = tail call i32 @llvm.abs.i32(i32 %0, i1 true)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ fflush(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ sleep(double);
int /*<<< orphan*/ stdout;
int main() {
  int thrust = 1000;
  while (1) {
    thrust = thrust + 1;
    printf("0%d\n", thrust);
    fflush(stdout);
    sleep(0.5);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x3e8,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%esi
lea    0xeac(%rip),%rdi
call   1030 <printf@plt>
mov    0x2e78(%rip),%rax
mov    (%rax),%edi
call   1040 <fflush@plt>
movsd  0xe89(%rip),%xmm0
call   1050 <sleep@plt>
jmp    1146 <main+0x16>

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %rbx
mov    $0x3e9,%ebx
lea    0xec7(%rip),%r14
mov    0x2e98(%rip),%r15
nopl   0x0(%rax,%rax,1)
mov    %r14,%rdi
mov    %ebx,%esi
call   1030 <printf@plt>
mov    (%r15),%edi
call   1040 <fflush@plt>
movsd  0xe96(%rip),%xmm0
call   1050 <sleep@plt>
add    $0x1,%ebx
jmp    1150 <main+0x20>

LLVM IR (-O0):
@.str = [5 x i8] c"0%d\0A\00"
@stdout = global i32 0
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
store i32 1000, i32* %2
br label %3
3: ; preds = %0, %3
%4 = load i32, i32* %2
%5 = add nsw i32 %4, 1
store i32 %5, i32* %2
%6 = load i32, i32* %2
%7 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 %6)
%8 = load i32, i32* @stdout
%9 = call i32 @fflush(i32 %8)
%10 = call i32 @sleep(double 5.000000e-01)
br label %3
}

LLVM IR (-O2):
@.str = [5 x i8] c"0%d\0A\00"
@stdout = global i32 0
define i32 @main() {
br label %1
1: ; preds = %1, %0
%2 = phi i32 [ 1000, %0 ], [ %3, %1 ]
%3 = add nuw nsw i32 %2, 1
%4 = tail call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 %3)
%5 = load i32, i32* @stdout
%6 = tail call i32 @fflush(i32 %5)
%7 = tail call i32 @sleep(double 5.000000e-01)
br label %1
}
/* Variables and functions */
int /*<<< orphan*/ gen_op_jmp_T0(int);
int /*<<< orphan*/ gen_op_set_T0_s32(int);
void gen_op_jmp_s32(int val, int label) {
  gen_op_set_T0_s32(val);
  gen_op_jmp_T0(label);
}


x86 assembly (clang, -O0):
<gen_op_jmp_s32>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <gen_op_set_T0_s32@plt>
mov    -0x8(%rbp),%edi
call   1040 <gen_op_jmp_T0@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gen_op_jmp_s32>:
push   %rbx
mov    %esi,%ebx
call   1030 <gen_op_set_T0_s32@plt>
mov    %ebx,%edi
pop    %rbx
jmp    1040 <gen_op_jmp_T0@plt>

LLVM IR (-O0):
define void @gen_op_jmp_s32(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 @gen_op_set_T0_s32(i32 %5)
%7 = load i32, i32* %4
%8 = call i32 @gen_op_jmp_T0(i32 %7)
ret void
}

LLVM IR (-O2):
define void @gen_op_jmp_s32(i32 %0, i32 %1) {
%3 = tail call i32 @gen_op_set_T0_s32(i32 %0)
%4 = tail call i32 @gen_op_jmp_T0(i32 %1)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ int64_t;

/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ rec_print(int /*<<< orphan*/);
int64_t print(int64_t val) {
  rec_print(val);
  printf("\n");
  return val;
}


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

x86 assembly (clang, -O2):
<print>:
push   %rbx
mov    %edi,%ebx
call   1040 <rec_print@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    %ebx,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @print(i32 returned %0) {
%2 = tail call i32 @rec_print(i32 %0)
%3 = tail call i32 @putchar(i32 10)
ret i32 %0
}
/* Variables and functions */
int /*<<< orphan*/ U_WMRNOTIMPLEMENTED_swap(char *, int);
void U_WMRDRAWTEXT_swap(char *record, int torev) {
  U_WMRNOTIMPLEMENTED_swap(record, torev);
}


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

x86 assembly (clang, -O2):
<U_WMRDRAWTEXT_swap>:
jmp    1030 <U_WMRNOTIMPLEMENTED_swap@plt>

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

LLVM IR (-O2):
define void @U_WMRDRAWTEXT_swap(i8* %0, i32 %1) {
%3 = tail call i32 @U_WMRNOTIMPLEMENTED_swap(i8* %0, i32 %1)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ SSL;

/* Variables and functions */
int ssl_has_ecc_ciphers(int /*<<< orphan*/ *);
int tlsext_ec_clienthello_needs(SSL *s) { return ssl_has_ecc_ciphers(s); }


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

x86 assembly (clang, -O2):
<tlsext_ec_clienthello_needs>:
jmp    1030 <ssl_has_ecc_ciphers@plt>

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

LLVM IR (-O2):
define i32 @tlsext_ec_clienthello_needs(i32* %0) {
%2 = tail call i32 @ssl_has_ecc_ciphers(i32* %0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void *func1(void *arg) { printf("Hello from func1\n"); }


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

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

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

LLVM IR (-O2):
@str = [17 x i8] c"Hello from func1\00"
define noalias i8* @func1(i8* nocapture readnone %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @str, i64 0, i64 0))
ret i8* undef
}
int do_893() { return 893; }


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

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

LLVM IR (-O0):
define i32 @do_893() {
ret i32 893
}

LLVM IR (-O2):
define i32 @do_893() {
ret i32 893
}
/* Variables and functions */
scalar_t__ CRYPTO_secure_malloc_init(int, int);
int /*<<< orphan*/ perror(char *);
int main(int argc, char **argv) {
  if (CRYPTO_secure_malloc_init(4096, 32)) {
    perror("failed "
           "215");
    return 1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x1000,%edi
mov    $0x20,%esi
call   1040 <CRYPTO_secure_malloc_init@plt>
cmp    $0x0,%rax
je     1167 <main+0x47>
lea    0xeaa(%rip),%rdi
call   1030 <perror@plt>
movl   $0x1,-0x4(%rbp)
jmp    116e <main+0x4e>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x1000,%edi
mov    $0x20,%esi
call   1040 <CRYPTO_secure_malloc_init@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
jne    113c <main+0x1c>
pop    %rcx
ret
lea    0xebd(%rip),%rdi
call   1030 <perror@plt>
mov    $0x1,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [11 x i8] c"failed 215\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i64 @CRYPTO_secure_malloc_init(i32 4096, i32 32)
%4 = icmp eq i64 %3, 0
br i1 %4, label %7, label %5
5: ; preds = %2
%6 = tail call i32 @perror(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
br label %7
7: ; preds = %2, %5
%8 = phi i32 [ 1, %5 ], [ 0, %2 ]
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
void caml_gr_wait_event() { exit(1); }


x86 assembly (clang, -O0):
<caml_gr_wait_event>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1,%edi
call   1030 <exit@plt>

x86 assembly (clang, -O2):
<caml_gr_wait_event>:
push   %rax
mov    $0x1,%edi
call   1030 <exit@plt>

LLVM IR (-O0):
define void @caml_gr_wait_event() {
%1 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
define void @caml_gr_wait_event() {
%1 = tail call i32 @exit(i32 1)
unreachable
}
__attribute__((always_)) int __test_and_set_bit(int nr,
                                                volatile unsigned long *addr) {
  int oldbit;
  asm("bts %2,%1\n\t"
      "sbb %0,%0"
      : "=r"(oldbit), "+m"(*(volatile long *)(addr))
      : "Ir"(nr));
  return oldbit;
}


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

x86 assembly (clang, -O2):
<__test_and_set_bit>:
bts    %edi,(%rsi)
sbb    %eax,%eax
ret

LLVM IR (-O0):
define i32 @__test_and_set_bit(i32 %0, i64* %1) {
%3 = alloca i32
%4 = alloca i64*
%5 = alloca i32
store i32 %0, i32* %3
store i64* %1, i64** %4
%6 = load i64*, i64** %4
%7 = load i32, i32* %3
%8 = call i32 asm "bts $2,$1\0A\09sbb $0,$0", "=r,=*m,Ir,*m,~{dirflag},~{fpsr},~{flags}"(i64* elementtype(i64) %6, i32 %7, i64* elementtype(i64) %6)
store i32 %8, i32* %5
%9 = load i32, i32* %5
ret i32 %9
}

LLVM IR (-O2):
define i32 @__test_and_set_bit(i32 %0, i64* %1) {
%3 = tail call i32 asm "bts $2,$1\0A\09sbb $0,$0", "=r,=*m,Ir,*m,~{dirflag},~{fpsr},~{flags}"(i64* elementtype(i64) %1, i32 %0, i64* elementtype(i64) %1)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void print_tips() {
  printf("Press Ctrl+C to print result...\n");
  printf("Press Ctrl+\\ to print exit...\n");
}


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

x86 assembly (clang, -O2):
<print_tips>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <puts@plt>
lea    0xefc(%rip),%rdi
pop    %rax
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [33 x i8] c"Press Ctrl+C to print result...\0A\00"
@.str.1 = [31 x i8] c"Press Ctrl+\\ to print exit...\0A\00"
define void @print_tips() {
%1 = call i32 @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [32 x i8] c"Press Ctrl+C to print result...\00"
@str.2 = [30 x i8] c"Press Ctrl+\\ to print exit...\00"
define void @print_tips() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @str.2, i64 0, i64 0))
ret void
}
int get_map_height() { return 17; }


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

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

LLVM IR (-O0):
define i32 @get_map_height() {
ret i32 17
}

LLVM IR (-O2):
define i32 @get_map_height() {
ret i32 17
}
/* Type definitions */
typedef int /*<<< orphan*/ pthread_once_t;

/* Variables and functions */
scalar_t__ atomic_swap(int /*<<< orphan*/ *, int);
int pthread_once(pthread_once_t *once_control, void (*init_routine)(void)) {
  if (atomic_swap(once_control, 1) == 0)
    init_routine();
  return (0);
}


x86 assembly (clang, -O0):
<pthread_once>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x1,%esi
call   1030 <atomic_swap@plt>
cmp    $0x0,%rax
jne    113b <pthread_once+0x2b>
call   *-0x10(%rbp)
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pthread_once>:
push   %rbx
mov    %rsi,%rbx
mov    $0x1,%esi
call   1030 <atomic_swap@plt>
test   %rax,%rax
jne    1125 <pthread_once+0x15>
call   *%rbx
xor    %eax,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @pthread_once(i32* %0, void ()* nocapture %1) {
%3 = tail call i64 @atomic_swap(i32* %0, i32 1)
%4 = icmp eq i64 %3, 0
br i1 %4, label %5, label %6
5: ; preds = %2
tail call void %1()
br label %6
6: ; preds = %5, %2
ret i32 0
}
void foo198(int p) {}


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

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

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

LLVM IR (-O2):
define void @foo198(i32 %0) {
ret void
}
void move(char a, char b) {
  const int testcon1 = 1;
  const char testcon2 = '1';
  printf("MOVE");
  printf(" ");
  printf(a);
  printf(" TO ", b);
  printf(" ");
}


x86 assembly (clang, -O0):
<move>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %sil,%al
mov    %dil,%cl
mov    %cl,-0x1(%rbp)
mov    %al,-0x2(%rbp)
movl   $0x1,-0x8(%rbp)
movb   $0x31,-0x9(%rbp)
lea    0xeca(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xec4(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movsbq -0x1(%rbp),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movsbl -0x2(%rbp),%esi
lea    0xea3(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe98(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<move>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
lea    0xed2(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0x20,%edi
call   1030 <putchar@plt>
movslq %ebp,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xeb5(%rip),%rdi
mov    %ebx,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0x20,%edi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <putchar@plt>

LLVM IR (-O0):
@.str = [5 x i8] c"MOVE\00"
@.str.1 = [2 x i8] c" \00"
@.str.2 = [5 x i8] c" TO \00"
define void @move(i8 signext %0, i8 signext %1) {
%3 = alloca i8
%4 = alloca i8
%5 = alloca i32
%6 = alloca i8
store i8 %0, i8* %3
store i8 %1, i8* %4
store i32 1, i32* %5
store i8 49, i8* %6
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%9 = load i8, i8* %3
%10 = sext i8 %9 to i64
%11 = inttoptr i64 %10 to i8*
%12 = call i32 (i8*, ...) @printf(i8* %11)
%13 = load i8, i8* %4
%14 = sext i8 %13 to i32
%15 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i32 %14)
%16 = 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"MOVE\00"
@.str.2 = [5 x i8] c" TO \00"
define void @move(i8 signext %0, i8 signext %1) {
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%4 = tail call i32 @putchar(i32 32)
%5 = sext i8 %0 to i64
%6 = inttoptr i64 %5 to i8*
%7 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) %6)
%8 = sext i8 %1 to i32
%9 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i32 %8)
%10 = tail call i32 @putchar(i32 32)
ret void
}
int test_imm_4Fuint16_mem(unsigned short *val) {
  return ((*val) & (-0x4F << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_4Fuint16_mem>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movzwl (%rax),%edx
and    $0xffffffb1,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_4Fuint16_mem>:
movzwl (%rdi),%eax
test   $0xffb1,%eax
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_4Fuint16_mem(i16* nocapture %0) {
%2 = load i16, i16* %0
%3 = and i16 %2, -79
%4 = icmp eq i16 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}