xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ __cc_db_equal(double const *, double const *,
                                 double const *);
int __cc_db_larger(const double *a, const double *b, const double *epsilon) {
  return ((*a - *b) > 0.0) && (!__cc_db_equal(a, b, epsilon));
}


x86 assembly (clang, -O0):
<__cc_db_larger>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x10(%rbp),%rax
subsd  (%rax),%xmm0
xor    %eax,%eax
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
mov    %al,-0x19(%rbp)
jbe    1162 <__cc_db_larger+0x52>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1030 <__cc_db_equal@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
mov    %al,-0x19(%rbp)
mov    -0x19(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__cc_db_larger>:
push   %rax
movsd  (%rdi),%xmm0
subsd  (%rsi),%xmm0
xor    %eax,%eax
xorpd  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jbe    1133 <__cc_db_larger+0x23>
call   1030 <__cc_db_equal@plt>
mov    %eax,%ecx
xor    %eax,%eax
test   %ecx,%ecx
sete   %al
pop    %rcx
ret

LLVM IR (-O0):
define i32 @__cc_db_larger(double* %0, double* %1, double* %2) {
%4 = alloca double*
%5 = alloca double*
%6 = alloca double*
store double* %0, double** %4
store double* %1, double** %5
store double* %2, double** %6
%7 = load double*, double** %4
%8 = load double, double* %7
%9 = load double*, double** %5
%10 = load double, double* %9
%11 = fsub double %8, %10
%12 = fcmp ogt double %11, 0.000000e+00
br i1 %12, label %13, label %20
13: ; preds = %3
%14 = load double*, double** %4
%15 = load double*, double** %5
%16 = load double*, double** %6
%17 = call i32 @__cc_db_equal(double* %14, double* %15, double* %16)
%18 = icmp ne i32 %17, 0
%19 = xor i1 %18, true
br label %20
20: ; preds = %13, %3
%21 = phi i1 [ false, %3 ], [ %19, %13 ]
%22 = zext i1 %21 to i32
ret i32 %22
}

LLVM IR (-O2):
define i32 @__cc_db_larger(double* %0, double* %1, double* %2) {
%4 = load double, double* %0
%5 = load double, double* %1
%6 = fsub double %4, %5
%7 = fcmp ogt double %6, 0.000000e+00
br i1 %7, label %8, label %12
8: ; preds = %3
%9 = tail call i32 @__cc_db_equal(double* %0, double* %1, double* %2)
%10 = icmp eq i32 %9, 0
%11 = zext i1 %10 to i32
br label %12
12: ; preds = %8, %3
%13 = phi i32 [ 0, %3 ], [ %11, %8 ]
ret i32 %13
}
/* Variables and functions */
unsigned int alarm(int /*<<< orphan*/);
unsigned int testcase_reset_timeout_(void) { return alarm(0); }


x86 assembly (clang, -O0):
<testcase_reset_timeout_>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
call   1030 <alarm@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<testcase_reset_timeout_>:
xor    %edi,%edi
jmp    1030 <alarm@plt>

LLVM IR (-O0):
define i32 @testcase_reset_timeout_() {
%1 = call i32 @alarm(i32 0)
ret i32 %1
}

LLVM IR (-O2):
define i32 @testcase_reset_timeout_() {
%1 = tail call i32 @alarm(i32 0)
ret i32 %1
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void printLine() {
  int i;
  for (i = 0; i < 80; i++)
    printf("-");
  printf("\n");
}


x86 assembly (clang, -O0):
<printLine>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
cmpl   $0x50,-0x4(%rbp)
jge    1143 <printLine+0x33>
lea    0xed0(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    111f <printLine+0xf>
lea    0xeb8(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<printLine>:
push   %rbx
mov    $0x50,%ebx
cs nopw 0x0(%rax,%rax,1)
mov    $0x2d,%edi
call   1030 <putchar@plt>
add    $0xffffffff,%ebx
jne    1120 <printLine+0x10>
mov    $0xa,%edi
pop    %rbx
jmp    1030 <putchar@plt>

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

LLVM IR (-O2):
define void @printLine() {
br label %1
1: ; preds = %0, %1
%2 = phi i32 [ 0, %0 ], [ %4, %1 ]
%3 = tail call i32 @putchar(i32 45)
%4 = add nuw nsw i32 %2, 1
%5 = icmp eq i32 %4, 80
br i1 %5, label %6, label %1
6: ; preds = %1
%7 = tail call i32 @putchar(i32 10)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ BlockMulty(int **, int **, int **, int, int);
void Return(int **Result, int **input, int **out, int size, int degree,
            int param) {
  int i;
  for (i = 0; i < degree; i++)
    BlockMulty(Result, input, out, size, param);
}


x86 assembly (clang, -O0):
<Return>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    %r8d,-0x20(%rbp)
mov    %r9d,-0x24(%rbp)
movl   $0x0,-0x28(%rbp)
mov    -0x28(%rbp),%eax
cmp    -0x20(%rbp),%eax
jge    1168 <Return+0x58>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x1c(%rbp),%ecx
mov    -0x24(%rbp),%r8d
call   1030 <BlockMulty@plt>
mov    -0x28(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x28(%rbp)
jmp    1136 <Return+0x26>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Return>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
test   %r8d,%r8d
jle    1159 <Return+0x49>
mov    %r9d,%r14d
mov    %r8d,%ebp
mov    %ecx,%r15d
mov    %rdx,%r12
mov    %rsi,%r13
mov    %rdi,%rbx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    %rbx,%rdi
mov    %r13,%rsi
mov    %r12,%rdx
mov    %r15d,%ecx
mov    %r14d,%r8d
call   1030 <BlockMulty@plt>
add    $0xffffffff,%ebp
jne    1140 <Return+0x30>
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

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

LLVM IR (-O2):
define void @Return(i32** %0, i32** %1, i32** %2, i32 %3, i32 %4, i32 %5) {
%7 = icmp sgt i32 %4, 0
br i1 %7, label %8, label %13
8: ; preds = %6, %8
%9 = phi i32 [ %11, %8 ], [ 0, %6 ]
%10 = tail call i32 @BlockMulty(i32** %0, i32** %1, i32** %2, i32 %3, i32 %5)
%11 = add nuw nsw i32 %9, 1
%12 = icmp eq i32 %11, %4
br i1 %12, label %13, label %8
13: ; preds = %8, %6
ret void
}
/* Variables and functions */
int /*<<< orphan*/ abort();
void __attribute__((no)) f(long double a) {
  if (a != 1.23L)
    abort();
}


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
fldt   0x10(%rbp)
fstpt  -0x10(%rbp)
fldt   -0x10(%rbp)
fldt   0xed9(%rip)
fxch   %st(1)
fucomip %st(1),%st
fstp   %st(0)
jne    113e <f+0x2e>
jp     113e <f+0x2e>
jmp    1145 <f+0x35>
mov    $0x0,%al
call   1030 <abort@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f>:
push   %rax
fldt   0x10(%rsp)
fldt   0xee5(%rip)
fxch   %st(1)
fucomip %st(1),%st
fstp   %st(0)
jne    1127 <f+0x17>
jp     1127 <f+0x17>
pop    %rax
ret
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
define void @f(x86_fp80 %0) {
%2 = alloca x86_fp80
store x86_fp80 %0, x86_fp80* %2
%3 = load x86_fp80, x86_fp80* %2
%4 = fcmp une x86_fp80 %3, 0xK3FFF9D70A3D70A3D70A4
br i1 %4, label %5, label %7
5: ; preds = %1
%6 = call i32 (...) @abort()
unreachable
7: ; preds = %1
ret void
}

LLVM IR (-O2):
define void @f(x86_fp80 %0) {
%2 = fcmp une x86_fp80 %0, 0xK3FFF9D70A3D70A3D70A4
br i1 %2, label %3, label %5
3: ; preds = %1
%4 = tail call i32 (...) @abort()
unreachable
5: ; preds = %1
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ va_list;

/* Variables and functions */
int /*<<< orphan*/ stderr;
int /*<<< orphan*/ vfprintf(int /*<<< orphan*/, char *, int /*<<< orphan*/);
void verbose_printf(char *format, va_list ap) { vfprintf(stderr, format, ap); }


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

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

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

LLVM IR (-O2):
@stderr = global i32 0
define void @verbose_printf(i8* %0, i32 %1) {
%3 = load i32, i32* @stderr
%4 = tail call i32 @vfprintf(i32 %3, i8* %0, i32 %1)
ret void
}
/* Variables and functions */
int exp(double);
double sinh(double x) {
  double y = 0;
  y = (exp(x) - exp(-x)) / 2;
  return y;
}


x86 assembly (clang, -O0):
<sinh>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1030 <exp@plt>
mov    %eax,-0x14(%rbp)
movsd  -0x8(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
call   1030 <exp@plt>
mov    %eax,%ecx
mov    -0x14(%rbp),%eax
sub    %ecx,%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
cvtsi2sd %eax,%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sinh>:
push   %rbx
sub    $0x10,%rsp
movaps %xmm0,(%rsp)
call   1030 <exp@plt>
mov    %eax,%ebx
movaps (%rsp),%xmm0
xorps  0xed5(%rip),%xmm0
call   1030 <exp@plt>
sub    %eax,%ebx
mov    %ebx,%eax
shr    $0x1f,%eax
add    %ebx,%eax
sar    %eax
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define double @sinh(double %0) {
%2 = alloca double
%3 = alloca double
store double %0, double* %2
store double 0.000000e+00, double* %3
%4 = load double, double* %2
%5 = call i32 @exp(double %4)
%6 = load double, double* %2
%7 = fneg double %6
%8 = call i32 @exp(double %7)
%9 = sub nsw i32 %5, %8
%10 = sdiv i32 %9, 2
%11 = sitofp i32 %10 to double
store double %11, double* %3
%12 = load double, double* %3
ret double %12
}

LLVM IR (-O2):
define double @sinh(double %0) {
%2 = tail call i32 @exp(double %0)
%3 = fneg double %0
%4 = tail call i32 @exp(double %3)
%5 = sub nsw i32 %2, %4
%6 = sdiv i32 %5, 2
%7 = sitofp i32 %6 to double
ret double %7
}
int my_strlen(char *str) {
  int i;
  i = 0;
  while (str[i] != '\0')
    i++;
  return (i);
}


x86 assembly (clang, -O0):
<my_strlen>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x0,%eax
je     1132 <my_strlen+0x32>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    110f <my_strlen+0xf>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<my_strlen>:
mov    $0xffffffff,%eax
cs nopw 0x0(%rax,%rax,1)
nop
add    $0x1,%eax
cmpb   $0x0,(%rdi)
lea    0x1(%rdi),%rdi
jne    1110 <my_strlen+0x10>
ret

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

LLVM IR (-O2):
define i32 @my_strlen(i8* nocapture %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i64 [ %7, %2 ], [ 0, %1 ]
%4 = getelementptr inbounds i8, i8* %0, i64 %3
%5 = load i8, i8* %4
%6 = icmp eq i8 %5, 0
%7 = add nuw i64 %3, 1
br i1 %6, label %8, label %2
8: ; preds = %2
%9 = trunc i64 %3 to i32
ret i32 %9
}
/* Type definitions */
typedef char *u_int32_t;

/* Variables and functions */
u_int32_t cpuid(u_int32_t eax, u_int32_t ecx) {
  asm volatile("xor %%ebx, %%ebx; cpuid"
               : "=a"(eax), "=c"(ecx)
               : "a"(eax)
               : "%ebx", "%edx");
  return ecx;
}


x86 assembly (clang, -O0):
<cpuid>:
push   %rbp
mov    %rsp,%rbp
push   %rbx
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
xor    %ebx,%ebx
cpuid
mov    %rax,-0x10(%rbp)
mov    %rcx,-0x18(%rbp)
mov    -0x18(%rbp),%rax
pop    %rbx
pop    %rbp
ret

x86 assembly (clang, -O2):
<cpuid>:
push   %rbx
mov    %rdi,%rax
xor    %ebx,%ebx
cpuid
mov    %rcx,%rax
pop    %rbx
ret

LLVM IR (-O0):
define i8* @cpuid(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 = call { i8*, i8* } asm sideeffect "xor %ebx, %ebx; cpuid", "={ax},={cx},{ax},~{ebx},~{edx},~{dirflag},~{fpsr},~{flags}"(i8* %5)
%7 = extractvalue { i8*, i8* } %6, 0
%8 = extractvalue { i8*, i8* } %6, 1
store i8* %7, i8** %3
store i8* %8, i8** %4
%9 = load i8*, i8** %4
ret i8* %9
}

LLVM IR (-O2):
define i8* @cpuid(i8* %0, i8* nocapture readnone %1) {
%3 = tail call { i8*, i8* } asm sideeffect "xor %ebx, %ebx; cpuid", "={ax},={cx},{ax},~{ebx},~{edx},~{dirflag},~{fpsr},~{flags}"(i8* %0)
%4 = extractvalue { i8*, i8* } %3, 1
ret i8* %4
}
/* Variables and functions */
char *strstr(char *, char *);
void filter_error_message(char *message) {
  char *nullit;
  nullit =
      strstr(message, " Upgrade your browser extension so you can enter it.");
  if (nullit)
    *nullit = '\0';
}


x86 assembly (clang, -O0):
<filter_error_message>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xed9(%rip),%rsi
call   1030 <strstr@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     1142 <filter_error_message+0x32>
mov    -0x10(%rbp),%rax
movb   $0x0,(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<filter_error_message>:
push   %rax
lea    0xee8(%rip),%rsi
call   1030 <strstr@plt>
test   %rax,%rax
je     1125 <filter_error_message+0x15>
movb   $0x0,(%rax)
pop    %rax
ret

LLVM IR (-O0):
@.str = [53 x i8] c" Upgrade your browser extension so you can enter it.\00"
define void @filter_error_message(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i8* @strstr(i8* %4, i8* getelementptr inbounds ([53 x i8], [53 x i8]* @.str, i64 0, i64 0))
store i8* %5, i8** %3
%6 = load i8*, i8** %3
%7 = icmp ne i8* %6, null
br i1 %7, label %8, label %10
8: ; preds = %1
%9 = load i8*, i8** %3
store i8 0, i8* %9
br label %10
10: ; preds = %8, %1
ret void
}

LLVM IR (-O2):
@.str = [53 x i8] c" Upgrade your browser extension so you can enter it.\00"
define void @filter_error_message(i8* %0) {
%2 = tail call i8* @strstr(i8* dereferenceable(1) %0, i8* dereferenceable(1) getelementptr inbounds ([53 x i8], [53 x i8]* @.str, i64 0, i64 0))
%3 = icmp eq i8* %2, null
br i1 %3, label %5, label %4
4: ; preds = %1
store i8 0, i8* %2
br label %5
5: ; preds = %4, %1
ret void
}
int check_pattern(unsigned char *buf, unsigned char pattern, int len) {
  int i;
  for (i = 0; i < len; i++) {
    if (buf[i] != pattern)
      return -1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<check_pattern>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %rdi,-0x10(%rbp)
mov    %al,-0x11(%rbp)
mov    %edx,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
cmp    -0x18(%rbp),%eax
jge    115b <check_pattern+0x5b>
mov    -0x10(%rbp),%rax
movslq -0x1c(%rbp),%rcx
movzbl (%rax,%rcx,1),%eax
movzbl -0x11(%rbp),%ecx
cmp    %ecx,%eax
je     1148 <check_pattern+0x48>
movl   $0xffffffff,-0x4(%rbp)
jmp    1162 <check_pattern+0x62>
jmp    114d <check_pattern+0x4d>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    1118 <check_pattern+0x18>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<check_pattern>:
test   %edx,%edx
jle    111f <check_pattern+0x1f>
mov    %edx,%eax
xor    %ecx,%ecx
nopl   0x0(%rax,%rax,1)
cmp    %sil,(%rdi,%rcx,1)
jne    1122 <check_pattern+0x22>
add    $0x1,%rcx
cmp    %rcx,%rax
jne    1110 <check_pattern+0x10>
xor    %eax,%eax
ret
mov    $0xffffffff,%eax
ret

LLVM IR (-O0):
define i32 @check_pattern(i8* %0, i8 zeroext %1, i32 %2) {
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i8
%7 = alloca i32
%8 = alloca i32
store i8* %0, i8** %5
store i8 %1, i8* %6
store i32 %2, i32* %7
store i32 0, i32* %8
br label %9
9: ; preds = %25, %3
%10 = load i32, i32* %8
%11 = load i32, i32* %7
%12 = icmp slt i32 %10, %11
br i1 %12, label %13, label %28
13: ; preds = %9
%14 = load i8*, i8** %5
%15 = load i32, i32* %8
%16 = sext i32 %15 to i64
%17 = getelementptr inbounds i8, i8* %14, i64 %16
%18 = load i8, i8* %17
%19 = zext i8 %18 to i32
%20 = load i8, i8* %6
%21 = zext i8 %20 to i32
%22 = icmp ne i32 %19, %21
br i1 %22, label %23, label %24
23: ; preds = %13
store i32 -1, i32* %4
br label %29
24: ; preds = %13
br label %25
25: ; preds = %24
%26 = load i32, i32* %8
%27 = add nsw i32 %26, 1
store i32 %27, i32* %8
br label %9
28: ; preds = %9
store i32 0, i32* %4
br label %29
29: ; preds = %28, %23
%30 = load i32, i32* %4
ret i32 %30
}

LLVM IR (-O2):
define i32 @check_pattern(i8* nocapture %0, i8 zeroext %1, i32 %2) {
%4 = icmp sgt i32 %2, 0
br i1 %4, label %5, label %15
5: ; preds = %3
%6 = zext i32 %2 to i64
br label %9
7: ; preds = %9
%8 = icmp eq i64 %14, %6
br i1 %8, label %15, label %9
9: ; preds = %5, %7
%10 = phi i64 [ 0, %5 ], [ %14, %7 ]
%11 = getelementptr inbounds i8, i8* %0, i64 %10
%12 = load i8, i8* %11
%13 = icmp eq i8 %12, %1
%14 = add nuw nsw i64 %10, 1
br i1 %13, label %7, label %15
15: ; preds = %9, %7, %3
%16 = phi i32 [ 0, %3 ], [ 0, %7 ], [ -1, %9 ]
ret i32 %16
}
/* Type definitions */
typedef int /*<<< orphan*/ fenv_t;

/* Variables and functions */
int feholdexcept(fenv_t *envp) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @feholdexcept(i32* nocapture readnone %0) {
ret i32 0
}
/* Variables and functions */
int toascii(int);
int toAscii(int c) { return (toascii(c)); }


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

x86 assembly (clang, -O2):
<toAscii>:
mov    %edi,%eax
and    $0x7f,%eax
ret

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

LLVM IR (-O2):
define i32 @toAscii(i32 %0) {
%2 = and i32 %0, 127
ret i32 %2
}
/* Variables and functions */
int f166(int *);
int f167(int *p) { return f166(p); }


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

x86 assembly (clang, -O2):
<f167>:
jmp    1030 <f166@plt>

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

LLVM IR (-O2):
define i32 @f167(i32* %0) {
%2 = tail call i32 @f166(i32* %0)
ret i32 %2
}
/* Type definitions */
struct stat {
  int dummy;
};

/* Variables and functions */
scalar_t__ stat(char *, struct stat *);
int file_exists(char *filename) {
  struct stat buffer;
  if (stat(filename, &buffer) == 0)
    return 1;
  return 0;
}


x86 assembly (clang, -O0):
<file_exists>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
lea    -0x18(%rbp),%rsi
call   1030 <stat@plt>
cmp    $0x0,%rax
jne    113f <file_exists+0x2f>
movl   $0x1,-0x4(%rbp)
jmp    1146 <file_exists+0x36>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
%struct.stat = type { i32 }
define i32 @file_exists(i8* %0) {
%2 = alloca %struct.stat
%3 = bitcast %struct.stat* %2 to i8*
%4 = call i64 @stat(i8* %0, %struct.stat* %2)
%5 = icmp eq i64 %4, 0
%6 = zext i1 %5 to i32
ret i32 %6
}
/* Type definitions */
typedef int /*<<< orphan*/ __m128i;

/* Variables and functions */
int /*<<< orphan*/ avg_422_downsample_first_ag_rb_vectors_n_save_previous_sse2(
    int /*<<< orphan*/ *, int /*<<< orphan*/ *, int /*<<< orphan*/ *);
extern void avg_422_downsample_first_ag_rb_vectors_n_save_previous_sse2_ssse3(
    __m128i *in_4_v16i_current_ag_rb_vectors, __m128i *previous,
    __m128i *out_2_v16i_avg_422_ag_rb_vectors) {
  avg_422_downsample_first_ag_rb_vectors_n_save_previous_sse2(
      in_4_v16i_current_ag_rb_vectors, previous,
      out_2_v16i_avg_422_ag_rb_vectors);
}


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

x86 assembly (clang, -O2):
<avg_422_downsample_first_ag_rb_vectors_n_save_previous_sse2_ssse3>:
jmp    1030 <avg_422_downsample_first_ag_rb_vectors_n_save_previous_sse2@plt>

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

LLVM IR (-O2):
define void @avg_422_downsample_first_ag_rb_vectors_n_save_previous_sse2_ssse3(i32* %0, i32* %1, i32* %2) {
%4 = tail call i32 @avg_422_downsample_first_ag_rb_vectors_n_save_previous_sse2(i32* %0, i32* %1, i32* %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int pa_config_parse_unsigned() {
  printf("NOT IMPLEMENTED:"
         "pa_config_parse_unsigned"
         "\n");
}


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

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

LLVM IR (-O0):
@.str = [42 x i8] c"NOT IMPLEMENTED:pa_config_parse_unsigned\0A\00"
define i32 @pa_config_parse_unsigned() {
%1 = alloca i32
%2 = call i32 @printf(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* %1
ret i32 %3
}

LLVM IR (-O2):
@str = [41 x i8] c"NOT IMPLEMENTED:pa_config_parse_unsigned\00"
define i32 @pa_config_parse_unsigned() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([41 x i8], [41 x i8]* @str, i64 0, i64 0))
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void print_radio_ctl_usage(void) {
  printf("\nUsage : radioctrl [ 0 | 1 ]\n");
  return;
}


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

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

LLVM IR (-O0):
@.str = [30 x i8] c"\0AUsage : radioctrl [ 0 | 1 ]\0A\00"
define void @print_radio_ctl_usage() {
%1 = call i32 @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [29 x i8] c"\0AUsage : radioctrl [ 0 | 1 ]\00"
define void @print_radio_ctl_usage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ strcpy(char *, char *);
void getDbPath(char *path) { strcpy(path, ":memory:"); }


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

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

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

LLVM IR (-O2):
@.str = [9 x i8] c":memory:\00"
define void @getDbPath(i8* %0) {
%2 = tail call i32 @strcpy(i8* %0, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
ret void
}
int SteamAPI_ISteamFriends_GetFriendCount(void *self, int iFriendFlags) {
  xlogf("%s(self = %p, iFriendFlags = %d)\n", __func__, self, iFriendFlags);
  return 0;
}


x86 assembly (clang, -O0):
<SteamAPI_ISteamFriends_GetFriendCount>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdx
mov    -0xc(%rbp),%ecx
lea    0xed3(%rip),%rdi
lea    0xeee(%rip),%rsi
mov    $0x0,%al
call   1030 <xlogf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<SteamAPI_ISteamFriends_GetFriendCount>:
push   %rax
mov    %esi,%ecx
mov    %rdi,%rdx
lea    0xee3(%rip),%rdi
lea    0xefe(%rip),%rsi
xor    %eax,%eax
call   1030 <xlogf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [34 x i8] c"%s(self = %p, iFriendFlags = %d)\0A\00"
@__func__.SteamAPI_ISteamFriends_GetFriendCount = [38 x i8] c"SteamAPI_ISteamFriends_GetFriendCount\00"
define i32 @SteamAPI_ISteamFriends_GetFriendCount(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 (i8*, i8*, i8*, i32, ...) bitcast (i32 (...)* @xlogf to i32 (i8*, i8*, i8*, i32, ...)*)(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([38 x i8], [38 x i8]* @__func__.SteamAPI_ISteamFriends_GetFriendCount, i64 0, i64 0), i8* %5, i32 %6)
ret i32 0
}

LLVM IR (-O2):
@.str = [34 x i8] c"%s(self = %p, iFriendFlags = %d)\0A\00"
@__func__.SteamAPI_ISteamFriends_GetFriendCount = [38 x i8] c"SteamAPI_ISteamFriends_GetFriendCount\00"
define i32 @SteamAPI_ISteamFriends_GetFriendCount(i8* %0, i32 %1) {
%3 = tail call i32 (i8*, i8*, i8*, i32, ...) bitcast (i32 (...)* @xlogf to i32 (i8*, i8*, i8*, i32, ...)*)(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([38 x i8], [38 x i8]* @__func__.SteamAPI_ISteamFriends_GetFriendCount, i64 0, i64 0), i8* %0, i32 %1)
ret i32 0
}
/* Variables and functions */
int f423(int *);
int f424(int *p) { return f423(p); }


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

x86 assembly (clang, -O2):
<f424>:
jmp    1030 <f423@plt>

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

LLVM IR (-O2):
define i32 @f424(i32* %0) {
%2 = tail call i32 @f423(i32* %0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ puts(char *);
void Cyc_dump_begin(void) {
  puts("%%HEVEA "
       "\\begin{latexonly}\n\\begin{list}{}{\\setlength\\itemsep{0pt}"
       "\\setlength\\topsep{0pt}\\setlength\\leftmargin{\\parindent}"
       "\\setlength\\itemindent{-\\leftmargin}}\\item[]\\colorbox{"
       "cycdochighlight}{\\ttfamily\\begin{minipage}[b]{\\textwidth}\n%%HEVEA "
       "\\end{latexonly}\n%%HEVEA \\begin{rawhtml}<dl><dt><table><tr><td "
       "bgcolor=\"c0d0ff\">\\end{rawhtml}\n\\begin{tabbing}");
}


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

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

LLVM IR (-O0):
@.str = [347 x i8] c"%%HEVEA \\begin{latexonly}\0A\\begin{list}{}{\\setlength\\itemsep{0pt}\\setlength\\topsep{0pt}\\setlength\\leftmargin{\\parindent}\\setlength\\itemindent{-\\leftmargin}}\\item[]\\colorbox{cycdochighlight}{\\ttfamily\\begin{minipage}[b]{\\textwidth}\0A%%HEVEA \\end{latexonly}\0A%%HEVEA \\begin{rawhtml}<dl><dt><table><tr><td bgcolor=\22c0d0ff\22>\\end{rawhtml}\0A\\begin{tabbing}\00"
define void @Cyc_dump_begin() {
%1 = call i32 @puts(i8* getelementptr inbounds ([347 x i8], [347 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [347 x i8] c"%%HEVEA \\begin{latexonly}\0A\\begin{list}{}{\\setlength\\itemsep{0pt}\\setlength\\topsep{0pt}\\setlength\\leftmargin{\\parindent}\\setlength\\itemindent{-\\leftmargin}}\\item[]\\colorbox{cycdochighlight}{\\ttfamily\\begin{minipage}[b]{\\textwidth}\0A%%HEVEA \\end{latexonly}\0A%%HEVEA \\begin{rawhtml}<dl><dt><table><tr><td bgcolor=\22c0d0ff\22>\\end{rawhtml}\0A\\begin{tabbing}\00"
define void @Cyc_dump_begin() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([347 x i8], [347 x i8]* @.str, i64 0, i64 0))
ret void
}
int sum(int first, int second) {
  int sum = 0;
  sum = first + second;
  return sum;
}


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

x86 assembly (clang, -O2):
<sum>:
lea    (%rdi,%rsi,1),%eax
ret

LLVM IR (-O0):
define i32 @sum(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
store i32 0, i32* %5
%6 = load i32, i32* %3
%7 = load i32, i32* %4
%8 = add nsw i32 %6, %7
store i32 %8, i32* %5
%9 = load i32, i32* %5
ret i32 %9
}

LLVM IR (-O2):
define i32 @sum(i32 %0, i32 %1) {
%3 = add nsw i32 %1, %0
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int /*<<< orphan*/);
int main(int argc, char *argv[]) {
  char *string = "Roger";
  char *marker = string;
  while (1) {
    printf("%c", *marker++);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xed3(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x28(%rbp)
mov    %rcx,-0x20(%rbp)
movsbl (%rax),%esi
lea    0xeb0(%rip),%rdi
call   1030 <printf@plt>
jmp    1139 <main+0x29>

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
lea    0xee5(%rip),%rbx
lea    0xee4(%rip),%r14
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movsbl (%rbx),%esi
add    $0x1,%rbx
mov    %r14,%rdi
call   1030 <printf@plt>
jmp    1130 <main+0x20>

LLVM IR (-O0):
@.str = [6 x i8] c"Roger\00"
@.str.1 = [3 x i8] c"%c\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i8*
%7 = alloca i8*
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8** %6
%8 = load i8*, i8** %6
store i8* %8, i8** %7
br label %9
9: ; preds = %2, %9
%10 = load i8*, i8** %7
%11 = getelementptr inbounds i8, i8* %10, i32 1
store i8* %11, i8** %7
%12 = load i8, i8* %10
%13 = sext i8 %12 to i32
%14 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32 %13)
br label %9
}

LLVM IR (-O2):
@.str = [6 x i8] c"Roger\00"
@.str.1 = [3 x i8] c"%c\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
br label %3
3: ; preds = %3, %2
%4 = phi i8* [ getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), %2 ], [ %5, %3 ]
%5 = getelementptr inbounds i8, i8* %4, i64 1
%6 = load i8, i8* %4
%7 = sext i8 %6 to i32
%8 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32 %7)
br label %3
}
int obj1func1(int a __attribute__((unused))) { return 42; }


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

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

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

LLVM IR (-O2):
define i32 @obj1func1(i32 %0) {
ret i32 42
}
/* Variables and functions */
int /*<<< orphan*/ PTHREAD_CANCEL_ENABLE;
int /*<<< orphan*/ pthread_setcancelstate(int /*<<< orphan*/,
                                          int /*<<< orphan*/ *);
void enable_cancel(void) {
  pthread_setcancelstate(PTHREAD_CANCEL_ENABLE, NULL);
}


x86 assembly (clang, -O0):
<enable_cancel>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ec5(%rip),%rax
mov    (%rax),%edi
xor    %eax,%eax
mov    %eax,%esi
call   1030 <pthread_setcancelstate@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<enable_cancel>:
mov    0x2ec9(%rip),%rax
mov    (%rax),%edi
xor    %esi,%esi
jmp    1030 <pthread_setcancelstate@plt>

LLVM IR (-O0):
@PTHREAD_CANCEL_ENABLE = global i32 0
define void @enable_cancel() {
%1 = load i32, i32* @PTHREAD_CANCEL_ENABLE
%2 = call i32 @pthread_setcancelstate(i32 %1, i32* null)
ret void
}

LLVM IR (-O2):
@PTHREAD_CANCEL_ENABLE = global i32 0
define void @enable_cancel() {
%1 = load i32, i32* @PTHREAD_CANCEL_ENABLE
%2 = tail call i32 @pthread_setcancelstate(i32 %1, i32* null)
ret void
}
/* Variables and functions */
double pow(double, int);
double stretching(double x) {
  double alpha = 2.0;
  double beta = 2.0;
  return alpha * x + (3 - 2 * alpha - beta) * x * x +
         (alpha - 2 + beta) * pow(x, 3.);
}


x86 assembly (clang, -O0):
<stretching>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  0xedb(%rip),%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  0xece(%rip),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  -0x8(%rbp),%xmm2
movsd  -0x10(%rbp),%xmm3
addsd  %xmm3,%xmm3
movsd  0xeb6(%rip),%xmm1
subsd  %xmm3,%xmm1
subsd  -0x18(%rbp),%xmm1
mulsd  -0x8(%rbp),%xmm1
mulsd  -0x8(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  0xe81(%rip),%xmm1
subsd  %xmm1,%xmm0
addsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x8(%rbp),%xmm0
mov    $0x3,%edi
call   1030 <pow@plt>
movsd  -0x28(%rbp),%xmm1
movaps %xmm0,%xmm2
movsd  -0x20(%rbp),%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<stretching>:
push   %rax
movsd  0xee7(%rip),%xmm1
mulsd  %xmm0,%xmm1
mulsd  %xmm0,%xmm1
movapd %xmm0,%xmm2
addsd  %xmm0,%xmm2
addsd  %xmm1,%xmm2
movsd  %xmm2,(%rsp)
mov    $0x3,%edi
call   1030 <pow@plt>
addsd  %xmm0,%xmm0
addsd  (%rsp),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @stretching(double %0) {
%2 = alloca double
%3 = alloca double
%4 = alloca double
store double %0, double* %2
store double 2.000000e+00, double* %3
store double 2.000000e+00, double* %4
%5 = load double, double* %3
%6 = load double, double* %2
%7 = load double, double* %3
%8 = call double @llvm.fmuladd.f64(double -2.000000e+00, double %7, double 3.000000e+00)
%9 = load double, double* %4
%10 = fsub double %8, %9
%11 = load double, double* %2
%12 = fmul double %10, %11
%13 = load double, double* %2
%14 = fmul double %12, %13
%15 = call double @llvm.fmuladd.f64(double %5, double %6, double %14)
%16 = load double, double* %3
%17 = fsub double %16, 2.000000e+00
%18 = load double, double* %4
%19 = fadd double %17, %18
%20 = load double, double* %2
%21 = call double @pow(double %20, i32 3)
%22 = call double @llvm.fmuladd.f64(double %19, double %21, double %15)
ret double %22
}

LLVM IR (-O2):
define double @stretching(double %0) {
%2 = fmul double %0, -3.000000e+00
%3 = fmul double %2, %0
%4 = tail call double @llvm.fmuladd.f64(double %0, double 2.000000e+00, double %3)
%5 = tail call double @pow(double %0, i32 3)
%6 = tail call double @llvm.fmuladd.f64(double %5, double 2.000000e+00, double %4)
ret double %6
}
/* Variables and functions */
int /*<<< orphan*/ output_with_tab(char *);
void gen_def_storage(void) { output_with_tab(".ds\t"); }


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

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

LLVM IR (-O0):
@.str = [5 x i8] c".ds\09\00"
define void @gen_def_storage() {
%1 = call i32 @output_with_tab(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [5 x i8] c".ds\09\00"
define void @gen_def_storage() {
%1 = tail call i32 @output_with_tab(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
ret void
}
void d2i_ASN1_TYPE(void) {}


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

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

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

LLVM IR (-O2):
define void @d2i_ASN1_TYPE() {
ret void
}
/* Variables and functions */
int fsetxattr(int, char const *, char const *, int, int /*<<< orphan*/);
scalar_t__ smack_label_length(char const *);
int smack_set_label_for_file(int fd, const char *xattr, const char *label) {
  int len;
  len = (int)smack_label_length(label);
  if (len < 0)
    return -2;
  return fsetxattr(fd, xattr, label, len, 0);
}


x86 assembly (clang, -O0):
<smack_set_label_for_file>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
call   1040 <smack_label_length@plt>
mov    %eax,-0x1c(%rbp)
cmpl   $0x0,-0x1c(%rbp)
jge    1155 <smack_set_label_for_file+0x35>
movl   $0xfffffffe,-0x4(%rbp)
jmp    116e <smack_set_label_for_file+0x4e>
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x1c(%rbp),%ecx
xor    %r8d,%r8d
call   1030 <fsetxattr@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<smack_set_label_for_file>:
push   %rbp
push   %r14
push   %rbx
mov    %rdx,%rbx
mov    %rsi,%r14
mov    %edi,%ebp
mov    %rdx,%rdi
call   1040 <smack_label_length@plt>
test   %eax,%eax
js     114e <smack_set_label_for_file+0x2e>
mov    %ebp,%edi
mov    %r14,%rsi
mov    %rbx,%rdx
mov    %eax,%ecx
xor    %r8d,%r8d
pop    %rbx
pop    %r14
pop    %rbp
jmp    1030 <fsetxattr@plt>
mov    $0xfffffffe,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
define i32 @smack_set_label_for_file(i32 %0, i8* %1, i8* %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i32
store i32 %0, i32* %5
store i8* %1, i8** %6
store i8* %2, i8** %7
%9 = load i8*, i8** %7
%10 = call i64 @smack_label_length(i8* %9)
%11 = trunc i64 %10 to i32
store i32 %11, i32* %8
%12 = load i32, i32* %8
%13 = icmp slt i32 %12, 0
br i1 %13, label %14, label %15
14: ; preds = %3
store i32 -2, i32* %4
br label %21
15: ; preds = %3
%16 = load i32, i32* %5
%17 = load i8*, i8** %6
%18 = load i8*, i8** %7
%19 = load i32, i32* %8
%20 = call i32 @fsetxattr(i32 %16, i8* %17, i8* %18, i32 %19, i32 0)
store i32 %20, i32* %4
br label %21
21: ; preds = %15, %14
%22 = load i32, i32* %4
ret i32 %22
}

LLVM IR (-O2):
define i32 @smack_set_label_for_file(i32 %0, i8* %1, i8* %2) {
%4 = tail call i64 @smack_label_length(i8* %2)
%5 = trunc i64 %4 to i32
%6 = icmp slt i32 %5, 0
br i1 %6, label %9, label %7
7: ; preds = %3
%8 = tail call i32 @fsetxattr(i32 %0, i8* %1, i8* %2, i32 %5, i32 0)
br label %9
9: ; preds = %3, %7
%10 = phi i32 [ %8, %7 ], [ -2, %3 ]
ret i32 %10
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;
struct sfmt_state_t {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ gen_rand32(struct sfmt_state_t *);
double to_res53_mix(int /*<<< orphan*/, int /*<<< orphan*/);
double genrand_res53_mix(struct sfmt_state_t *s) {
  uint32_t x, y;
  x = gen_rand32(s);
  y = gen_rand32(s);
  return to_res53_mix(x, y);
}


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

x86 assembly (clang, -O2):
<genrand_res53_mix>:
push   %rbp
push   %rbx
push   %rax
mov    %rdi,%rbx
call   1040 <gen_rand32@plt>
mov    %eax,%ebp
mov    %rbx,%rdi
call   1040 <gen_rand32@plt>
mov    %ebp,%edi
mov    %eax,%esi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <to_res53_mix@plt>

LLVM IR (-O0):
%struct.sfmt_state_t = type { i32 }
define double @genrand_res53_mix(%struct.sfmt_state_t* %0) {
%2 = alloca %struct.sfmt_state_t*
%3 = alloca i32
%4 = alloca i32
store %struct.sfmt_state_t* %0, %struct.sfmt_state_t** %2
%5 = load %struct.sfmt_state_t*, %struct.sfmt_state_t** %2
%6 = call i32 @gen_rand32(%struct.sfmt_state_t* %5)
store i32 %6, i32* %3
%7 = load %struct.sfmt_state_t*, %struct.sfmt_state_t** %2
%8 = call i32 @gen_rand32(%struct.sfmt_state_t* %7)
store i32 %8, i32* %4
%9 = load i32, i32* %3
%10 = load i32, i32* %4
%11 = call double @to_res53_mix(i32 %9, i32 %10)
ret double %11
}

LLVM IR (-O2):
%struct.sfmt_state_t = type { i32 }
define double @genrand_res53_mix(%struct.sfmt_state_t* %0) {
%2 = tail call i32 @gen_rand32(%struct.sfmt_state_t* %0)
%3 = tail call i32 @gen_rand32(%struct.sfmt_state_t* %0)
%4 = tail call double @to_res53_mix(i32 %2, i32 %3)
ret double %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int);
int main(void) {
  int a[] = {1, 2, 3};
  for (int i = 0; i < 4; i++)
    printf("a[%d] = %d\n", i, a[i]);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    0xeda(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    0xed8(%rip),%eax
mov    %eax,-0x8(%rbp)
movl   $0x0,-0x14(%rbp)
cmpl   $0x4,-0x14(%rbp)
jge    1169 <main+0x59>
mov    -0x14(%rbp),%esi
movslq -0x14(%rbp),%rax
mov    -0x10(%rbp,%rax,4),%edx
lea    0xeb6(%rip),%rdi
call   1030 <printf@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    113a <main+0x2a>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xee8(%rip),%rbx
mov    %rbx,%rdi
xor    %esi,%esi
mov    $0x1,%edx
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x1,%esi
mov    $0x2,%edx
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x2,%esi
mov    $0x3,%edx
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x3,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [12 x i8] c"a[%d] = %d\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 0, i32 1)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 1, i32 2)
%3 = tail call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 2, i32 3)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 3, i32 undef)
ret i32 0
}
/* Variables and functions */
bool nrf52_errata_192(void) { return false; }


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

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

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

LLVM IR (-O2):
define i32 @nrf52_errata_192() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int rand();
int /*<<< orphan*/ srand(unsigned int);
scalar_t__ time(int /*<<< orphan*/ *);
int main() {
  int i;
  srand((unsigned)time(NULL));
  i = rand();
  printf("%d\n", i);
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %edi,%edi
call   1050 <time@plt>
mov    %eax,%edi
call   1040 <srand@plt>
xor    %eax,%eax
call   1060 <rand@plt>
lea    0xea3(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
%3 = call i64 @time(i32* null)
%4 = trunc i64 %3 to i32
%5 = call i32 @srand(i32 %4)
%6 = call i32 (...) @rand()
store i32 %6, i32* %2
%7 = load i32, i32* %2
%8 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %7)
ret i32 0
}

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