xunge/DecIR huggingface dataset:
/* Type definitions */
struct _Locale_name_hint {
  int dummy;
};
struct _Locale_monetary {
  int dummy;
};

/* Variables and functions */
scalar_t__ _Locale_create(char const *, int *);
struct _Locale_monetary *_Locale_monetary_create(const char *name,
                                                 struct _Locale_name_hint *hint,
                                                 int *__err_code) {
  return (struct _Locale_monetary *)_Locale_create(name, __err_code);
}


x86 assembly (clang, -O0):
<_Locale_monetary_create>:
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    -0x18(%rbp),%rsi
call   1030 <_Locale_create@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_Locale_monetary_create>:
mov    %rdx,%rsi
jmp    1030 <_Locale_create@plt>

LLVM IR (-O0):
%struct._Locale_monetary = type { i32 }
%struct._Locale_name_hint = type { i32 }
define %struct._Locale_monetary* @_Locale_monetary_create(i8* %0, %struct._Locale_name_hint* %1, i32* %2) {
%4 = alloca i8*
%5 = alloca %struct._Locale_name_hint*
%6 = alloca i32*
store i8* %0, i8** %4
store %struct._Locale_name_hint* %1, %struct._Locale_name_hint** %5
store i32* %2, i32** %6
%7 = load i8*, i8** %4
%8 = load i32*, i32** %6
%9 = call i64 @_Locale_create(i8* %7, i32* %8)
%10 = inttoptr i64 %9 to %struct._Locale_monetary*
ret %struct._Locale_monetary* %10
}

LLVM IR (-O2):
%struct._Locale_monetary = type { i32 }
%struct._Locale_name_hint = type { i32 }
define %struct._Locale_monetary* @_Locale_monetary_create(i8* %0, %struct._Locale_name_hint* nocapture readnone %1, i32* %2) {
%4 = tail call i64 @_Locale_create(i8* %0, i32* %2)
%5 = inttoptr i64 %4 to %struct._Locale_monetary*
ret %struct._Locale_monetary* %5
}
double tan(double x) {
  double tmp;
  __asm__ __volatile__("fldl %0;"
                       "fptan;"
                       "fdivrp;"
                       "fstpl %0;"
                       "fstpl %1"
                       : "=m"(x), "=m"(tmp)
                       : "m"(x));
  return x;
}


x86 assembly (clang, -O0):
<tan>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
fldl   -0x8(%rbp)
fptan
fdivrp %st,%st(1)
fstpl  -0x8(%rbp)
fstpl  -0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<tan>:
movsd  %xmm0,-0x10(%rsp)
fldl   -0x10(%rsp)
fptan
fdivrp %st,%st(1)
fstpl  -0x10(%rsp)
fstpl  -0x8(%rsp)
movsd  -0x10(%rsp),%xmm0
ret

LLVM IR (-O0):
define double @tan(double %0) {
%2 = alloca double
%3 = alloca double
store double %0, double* %2
%4 = load double, double* %2
ret double %4
}

LLVM IR (-O2):
define double @tan(double %0) {
%2 = alloca double
%3 = alloca double
store double %0, double* %2
%4 = bitcast double* %3 to i8*
%5 = load double, double* %2
ret double %5
}
void errorFn(void) {
  {
    goto ERROR;
  ERROR:
    return;
  }
}


x86 assembly (clang, -O0):
<errorFn>:
push   %rbp
mov    %rsp,%rbp
jmp    1109 <errorFn+0x9>
pop    %rbp
ret

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

LLVM IR (-O0):
define void @errorFn() {
br label %1
1: ; preds = %0
ret void
}

LLVM IR (-O2):
define void @errorFn() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ pthread_exit(int /*<<< orphan*/ *);
void *a_thread_func(void *attr __attribute__((unused))) {
  pthread_exit(NULL);
  return NULL;
}


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

x86 assembly (clang, -O2):
<a_thread_func>:
push   %rax
xor    %edi,%edi
call   1030 <pthread_exit@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i8* @a_thread_func(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 @pthread_exit(i32* null)
ret i8* null
}

LLVM IR (-O2):
define noalias i8* @a_thread_func(i8* nocapture readnone %0) {
%2 = tail call i32 @pthread_exit(i32* null)
ret i8* null
}
double libballistics_calcFP(double barometricPressure) {
  double FP = (barometricPressure - 29.92) / 29.92;
  return FP;
}


x86 assembly (clang, -O0):
<libballistics_calcFP>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  0xeea(%rip),%xmm1
subsd  %xmm1,%xmm0
movsd  0xede(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<libballistics_calcFP>:
addsd  0xef8(%rip),%xmm0
divsd  0xef8(%rip),%xmm0
ret

LLVM IR (-O0):
define double @libballistics_calcFP(double %0) {
%2 = alloca double
%3 = alloca double
store double %0, double* %2
%4 = load double, double* %2
%5 = fsub double %4, 2.992000e+01
%6 = fdiv double %5, 2.992000e+01
store double %6, double* %3
%7 = load double, double* %3
ret double %7
}

LLVM IR (-O2):
define double @libballistics_calcFP(double %0) {
%2 = fadd double %0, -2.992000e+01
%3 = fdiv double %2, 2.992000e+01
ret double %3
}
int mshell_exit(char **args) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @mshell_exit(i8** nocapture readnone %0) {
ret i32 0
}
/* Type definitions */
struct arg_xxx {
  int dummy;
};

/* Variables and functions */
struct arg_xxx *arg_xxxn(char const *, char const *, char const *,
                         int /*<<< orphan*/, int, double, double, char const *);
struct arg_xxx *arg_xxx0(const char *shortopts, const char *longopts,
                         const char *datatype, double minvalue, double maxvalue,
                         const char *glossary) {
  return arg_xxxn(shortopts, longopts, datatype, 0, 1, minvalue, maxvalue,
                  glossary);
}


x86 assembly (clang, -O0):
<arg_xxx0>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
movsd  %xmm0,-0x20(%rbp)
movsd  %xmm1,-0x28(%rbp)
mov    %rcx,-0x30(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
movsd  -0x20(%rbp),%xmm0
movsd  -0x28(%rbp),%xmm1
mov    -0x30(%rbp),%r9
xor    %ecx,%ecx
mov    $0x1,%r8d
call   1030 <arg_xxxn@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<arg_xxx0>:
mov    %rcx,%r9
xor    %ecx,%ecx
mov    $0x1,%r8d
jmp    1030 <arg_xxxn@plt>

LLVM IR (-O0):
%struct.arg_xxx = type { i32 }
define %struct.arg_xxx* @arg_xxx0(i8* %0, i8* %1, i8* %2, double %3, double %4, i8* %5) {
%7 = alloca i8*
%8 = alloca i8*
%9 = alloca i8*
%10 = alloca double
%11 = alloca double
%12 = alloca i8*
store i8* %0, i8** %7
store i8* %1, i8** %8
store i8* %2, i8** %9
store double %3, double* %10
store double %4, double* %11
store i8* %5, i8** %12
%13 = load i8*, i8** %7
%14 = load i8*, i8** %8
%15 = load i8*, i8** %9
%16 = load double, double* %10
%17 = load double, double* %11
%18 = load i8*, i8** %12
%19 = call %struct.arg_xxx* @arg_xxxn(i8* %13, i8* %14, i8* %15, i32 0, i32 1, double %16, double %17, i8* %18)
ret %struct.arg_xxx* %19
}

LLVM IR (-O2):
%struct.arg_xxx = type { i32 }
define %struct.arg_xxx* @arg_xxx0(i8* %0, i8* %1, i8* %2, double %3, double %4, i8* %5) {
%7 = tail call %struct.arg_xxx* @arg_xxxn(i8* %0, i8* %1, i8* %2, i32 0, i32 1, double %3, double %4, i8* %5)
ret %struct.arg_xxx* %7
}
int SDL_imageFilterDivASM(unsigned char *Src1, unsigned char *Src2,
                          unsigned char *Dest, int length) {
  return (0);
}


x86 assembly (clang, -O0):
<SDL_imageFilterDivASM>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @SDL_imageFilterDivASM(i8* %0, i8* %1, i8* %2, i32 %3) {
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i32
store i8* %0, i8** %5
store i8* %1, i8** %6
store i8* %2, i8** %7
store i32 %3, i32* %8
ret i32 0
}

LLVM IR (-O2):
define i32 @SDL_imageFilterDivASM(i8* nocapture readnone %0, i8* nocapture readnone %1, i8* nocapture readnone %2, i32 %3) {
ret i32 0
}
int mapping_length() { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @mapping_length() {
ret i32 0
}
int is_sparc_r(char c) {
  return c == 'r' || c == 'g' || c == 'o' || c == 'l' || c == 'i';
}


x86 assembly (clang, -O0):
<is_sparc_r>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0x72,%ecx
mov    %al,-0x2(%rbp)
je     115f <is_sparc_r+0x5f>
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0x67,%ecx
mov    %al,-0x2(%rbp)
je     115f <is_sparc_r+0x5f>
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0x6f,%ecx
mov    %al,-0x2(%rbp)
je     115f <is_sparc_r+0x5f>
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0x6c,%ecx
mov    %al,-0x2(%rbp)
je     115f <is_sparc_r+0x5f>
movsbl -0x1(%rbp),%eax
cmp    $0x69,%eax
sete   %al
mov    %al,-0x2(%rbp)
mov    -0x2(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_sparc_r>:
lea    -0x67(%rdi),%ecx
cmp    $0xb,%cl
ja     111c <is_sparc_r+0x1c>
mov    $0x1,%eax
movzbl %cl,%ecx
mov    $0x921,%edx
bt     %rcx,%rdx
jae    111c <is_sparc_r+0x1c>
ret
xor    %eax,%eax
cmp    $0x69,%dil
sete   %al
ret

LLVM IR (-O0):
define i32 @is_sparc_r(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
%5 = icmp eq i32 %4, 114
br i1 %5, label %22, label %6
6: ; preds = %1
%7 = load i8, i8* %2
%8 = sext i8 %7 to i32
%9 = icmp eq i32 %8, 103
br i1 %9, label %22, label %10
10: ; preds = %6
%11 = load i8, i8* %2
%12 = sext i8 %11 to i32
%13 = icmp eq i32 %12, 111
br i1 %13, label %22, label %14
14: ; preds = %10
%15 = load i8, i8* %2
%16 = sext i8 %15 to i32
%17 = icmp eq i32 %16, 108
br i1 %17, label %22, label %18
18: ; preds = %14
%19 = load i8, i8* %2
%20 = sext i8 %19 to i32
%21 = icmp eq i32 %20, 105
br label %22
22: ; preds = %18, %14, %10, %6, %1
%23 = phi i1 [ true, %14 ], [ true, %10 ], [ true, %6 ], [ true, %1 ], [ %21, %18 ]
%24 = zext i1 %23 to i32
ret i32 %24
}

LLVM IR (-O2):
define i32 @is_sparc_r(i8 signext %0) {
switch i8 %0, label %2 [
i8 114, label %5
i8 111, label %5
i8 108, label %5
i8 103, label %5
]
2: ; preds = %1
%3 = icmp eq i8 %0, 105
%4 = zext i1 %3 to i32
br label %5
5: ; preds = %1, %1, %1, %1, %2
%6 = phi i32 [ 1, %1 ], [ %4, %2 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ]
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ local_irq_restore(unsigned long);
int /*<<< orphan*/ local_irq_save(unsigned long);
unsigned int readl(int);
int /*<<< orphan*/ wait_ms(int);
int /*<<< orphan*/ writel(unsigned int, int);
void hiusb_stop_hcd(void) {
  unsigned long flags;
  unsigned int reg;
  local_irq_save(flags);
  reg = readl((0x12040000 + 0x12c));
  writel(reg | ((1 << 13)), (0x12040000 + 0x12c));
  wait_ms(500);
  local_irq_restore(flags);
}


x86 assembly (clang, -O0):
<hiusb_stop_hcd>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    -0x8(%rbp),%rdi
call   1030 <local_irq_save@plt>
mov    $0x1204012c,%edi
call   1040 <readl@plt>
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%edi
or     $0x2000,%edi
mov    $0x1204012c,%esi
call   1060 <writel@plt>
mov    $0x1f4,%edi
call   1070 <wait_ms@plt>
mov    -0x8(%rbp),%rdi
call   1050 <local_irq_restore@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<hiusb_stop_hcd>:
push   %rax
call   1030 <local_irq_save@plt>
mov    $0x1204012c,%edi
call   1040 <readl@plt>
or     $0x2000,%eax
mov    %eax,%edi
mov    $0x1204012c,%esi
call   1060 <writel@plt>
mov    $0x1f4,%edi
call   1070 <wait_ms@plt>
pop    %rax
jmp    1050 <local_irq_restore@plt>

LLVM IR (-O0):
define void @hiusb_stop_hcd() {
%1 = alloca i64
%2 = alloca i32
%3 = load i64, i64* %1
%4 = call i32 @local_irq_save(i64 %3)
%5 = call i32 @readl(i32 302252332)
store i32 %5, i32* %2
%6 = load i32, i32* %2
%7 = or i32 %6, 8192
%8 = call i32 @writel(i32 %7, i32 302252332)
%9 = call i32 @wait_ms(i32 500)
%10 = load i64, i64* %1
%11 = call i32 @local_irq_restore(i64 %10)
ret void
}

LLVM IR (-O2):
define void @hiusb_stop_hcd() {
%1 = tail call i32 @local_irq_save(i64 undef)
%2 = tail call i32 @readl(i32 302252332)
%3 = or i32 %2, 8192
%4 = tail call i32 @writel(i32 %3, i32 302252332)
%5 = tail call i32 @wait_ms(i32 500)
%6 = tail call i32 @local_irq_restore(i64 undef)
ret void
}
void __attribute__((weak)) dma2_stream5_isr() { debug_handler(__FUNCTION__); }


x86 assembly (clang, -O0):
<dma2_stream5_isr>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
mov    $0x0,%al
call   1030 <debug_handler@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<dma2_stream5_isr>:
lea    0xee9(%rip),%rdi
xor    %eax,%eax
jmp    1030 <debug_handler@plt>

LLVM IR (-O0):
@__FUNCTION__.dma2_stream5_isr = [17 x i8] c"dma2_stream5_isr\00"
define weak void @dma2_stream5_isr() {
%1 = call i32 (i8*, ...) bitcast (i32 (...)* @debug_handler to i32 (i8*, ...)*)(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @__FUNCTION__.dma2_stream5_isr, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@__FUNCTION__.dma2_stream5_isr = [17 x i8] c"dma2_stream5_isr\00"
define weak void @dma2_stream5_isr() {
%1 = tail call i32 (i8*, ...) bitcast (i32 (...)* @debug_handler to i32 (i8*, ...)*)(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @__FUNCTION__.dma2_stream5_isr, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ puts(char *);
void main() { puts("Simple!"); }


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

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

LLVM IR (-O0):
@.str = [8 x i8] c"Simple!\00"
define void @main() {
%1 = call i32 @puts(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [8 x i8] c"Simple!\00"
define void @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
ret void
}
int _findfirstbit(unsigned value) {
  int result;
  result = -1;
  while (value != 0) {
    value >>= 1;
    ++result;
  }
  return result;
}


x86 assembly (clang, -O0):
<_findfirstbit>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0xffffffff,-0x8(%rbp)
cmpl   $0x0,-0x4(%rbp)
je     112f <_findfirstbit+0x2f>
mov    -0x4(%rbp),%eax
shr    $0x1,%eax
mov    %eax,-0x4(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    110e <_findfirstbit+0xe>
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<_findfirstbit>:
mov    $0xffffffff,%eax
test   %edi,%edi
je     111c <_findfirstbit+0x1c>
mov    %edi,%ecx
nopl   0x0(%rax,%rax,1)
shr    %ecx
add    $0x1,%eax
cmp    $0x1,%edi
mov    %ecx,%edi
ja     1110 <_findfirstbit+0x10>
ret

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

LLVM IR (-O2):
define i32 @_findfirstbit(i32 %0) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %9, label %3
3: ; preds = %1, %3
%4 = phi i32 [ %7, %3 ], [ -1, %1 ]
%5 = phi i32 [ %6, %3 ], [ %0, %1 ]
%6 = lshr i32 %5, 1
%7 = add nsw i32 %4, 1
%8 = icmp ult i32 %5, 2
br i1 %8, label %9, label %3
9: ; preds = %3, %1
%10 = phi i32 [ -1, %1 ], [ %7, %3 ]
ret i32 %10
}
/* Type definitions */
struct pattern {
  int dummy;
};

/* Variables and functions */
int offset(int /*<<< orphan*/, int, int, int);
scalar_t__ play_attack_defend_n(int, int, int, int, int);
int autohelperowl_attackpat137(struct pattern *patt, int transformation,
                               int move, int color, int action) {
  int A;
  (void)patt;
  (void)color;
  (void)action;
  A = offset(0, 1, move, transformation);
  return 1 || play_attack_defend_n(color, 1, 1, move, A);
}


x86 assembly (clang, -O0):
<autohelperowl_attackpat137>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
mov    %r8d,-0x18(%rbp)
mov    -0x10(%rbp),%edx
mov    -0xc(%rbp),%ecx
xor    %edi,%edi
mov    $0x1,%esi
call   1030 <offset@plt>
mov    %eax,-0x1c(%rbp)
mov    $0x1,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<autohelperowl_attackpat137>:
push   %rax
mov    %esi,%ecx
xor    %edi,%edi
mov    $0x1,%esi
call   1030 <offset@plt>
mov    $0x1,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.pattern = type { i32 }
define i32 @autohelperowl_attackpat137(%struct.pattern* %0, i32 %1, i32 %2, i32 %3, i32 %4) {
%6 = alloca %struct.pattern*
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
store %struct.pattern* %0, %struct.pattern** %6
store i32 %1, i32* %7
store i32 %2, i32* %8
store i32 %3, i32* %9
store i32 %4, i32* %10
%12 = load %struct.pattern*, %struct.pattern** %6
%13 = load i32, i32* %9
%14 = load i32, i32* %10
%15 = load i32, i32* %8
%16 = load i32, i32* %7
%17 = call i32 @offset(i32 0, i32 1, i32 %15, i32 %16)
store i32 %17, i32* %11
ret i32 1
}

LLVM IR (-O2):
%struct.pattern = type { i32 }
define i32 @autohelperowl_attackpat137(%struct.pattern* nocapture readnone %0, i32 %1, i32 %2, i32 %3, i32 %4) {
%6 = tail call i32 @offset(i32 0, i32 1, i32 %2, i32 %1)
ret i32 1
}
/* Variables and functions */
scalar_t__ RAND_MAX;
double rand();
double uniform() { return rand() / (double)RAND_MAX; }


x86 assembly (clang, -O0):
<uniform>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <rand@plt>
mov    0x2ec6(%rip),%rax
cvtsi2sdq (%rax),%xmm1
divsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<uniform>:
push   %rax
xor    %eax,%eax
call   1030 <rand@plt>
mov    0x2ec9(%rip),%rax
cvtsi2sdq (%rax),%xmm1
divsd  %xmm1,%xmm0
pop    %rax
ret

LLVM IR (-O0):
@RAND_MAX = global i64 0
define double @uniform() {
%1 = call double (...) @rand()
%2 = load i64, i64* @RAND_MAX
%3 = sitofp i64 %2 to double
%4 = fdiv double %1, %3
ret double %4
}

LLVM IR (-O2):
@RAND_MAX = global i64 0
define double @uniform() {
%1 = tail call double (...) @rand()
%2 = load i64, i64* @RAND_MAX
%3 = sitofp i64 %2 to double
%4 = fdiv double %1, %3
ret double %4
}
void atomic_pause() { __asm__ __volatile__("rep; nop"); }


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

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

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

LLVM IR (-O2):
define void @atomic_pause() {
tail call void asm sideeffect "rep; nop", "~{dirflag},~{fpsr},~{flags}"()
ret void
}
void do_scsi_request() {}


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

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

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

LLVM IR (-O2):
define void @do_scsi_request() {
ret void
}
int creat_both(path1, path2, path3)
char *path1, *path2, *path3;
{
  if (creat_symlink(path1, path2) == -1)
    return (0);
  else if (creat_object(path3) == -1)
    return (0);
  return (1);
}


x86 assembly (clang, -O0):
<creat_both>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    $0x0,%al
call   1040 <creat_symlink@plt>
cmp    $0xffffffff,%eax
jne    1158 <creat_both+0x38>
movl   $0x0,-0x4(%rbp)
jmp    1184 <creat_both+0x64>
mov    -0x20(%rbp),%rdi
mov    $0x0,%al
call   1030 <creat_object@plt>
cmp    $0xffffffff,%eax
jne    1178 <creat_both+0x58>
movl   $0x0,-0x4(%rbp)
jmp    1184 <creat_both+0x64>
jmp    117d <creat_both+0x5d>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<creat_both>:
push   %rbp
push   %rbx
push   %rax
mov    %rdx,%rbx
xor    %ebp,%ebp
xor    %eax,%eax
call   1040 <creat_symlink@plt>
cmp    $0xffffffff,%eax
je     1147 <creat_both+0x27>
mov    %rbx,%rdi
xor    %eax,%eax
call   1030 <creat_object@plt>
xor    %ebp,%ebp
cmp    $0xffffffff,%eax
setne  %bpl
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @creat_both(i8* %0, i8* %1, i8* %2) {
%4 = tail call i32 (i8*, i8*, ...) bitcast (i32 (...)* @creat_symlink to i32 (i8*, i8*, ...)*)(i8* %0, i8* %1)
%5 = icmp eq i32 %4, -1
br i1 %5, label %10, label %6
6: ; preds = %3
%7 = tail call i32 (i8*, ...) bitcast (i32 (...)* @creat_object to i32 (i8*, ...)*)(i8* %2)
%8 = icmp ne i32 %7, -1
%9 = zext i1 %8 to i32
br label %10
10: ; preds = %6, %3
%11 = phi i32 [ 0, %3 ], [ %9, %6 ]
ret i32 %11
}
void ToRemove() { return; }


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

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

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

LLVM IR (-O2):
define void @ToRemove() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *, ...);
void usage(char *exename) {
  printf("Usage: %s <filename> [-d]\n", exename);
  printf("   Interface attached to d-link must have IP addres 192.168.0.x/24 "
         "where x != 1\n");
  exit(1);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xec9(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xed6(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %rax
mov    %rdi,%rsi
lea    0xec5(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xed2(%rip),%rdi
call   1030 <puts@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [27 x i8] c"Usage: %s <filename> [-d]\0A\00"
@.str.1 = [81 x i8] c" Interface attached to d-link must have IP addres 192.168.0.x/24 where x != 1\0A\00"
define void @usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0), i8* %3)
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([81 x i8], [81 x i8]* @.str.1, i64 0, i64 0))
%6 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@.str = [27 x i8] c"Usage: %s <filename> [-d]\0A\00"
@str = [80 x i8] c" Interface attached to d-link must have IP addres 192.168.0.x/24 where x != 1\00"
define void @usage(i8* %0) {
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0), i8* %0)
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([80 x i8], [80 x i8]* @str, i64 0, i64 0))
%4 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void deleteBasicMachine(void *data) {
  if (data) {
    free(data);
  }
}


x86 assembly (clang, -O0):
<deleteBasicMachine>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1130 <deleteBasicMachine+0x20>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<deleteBasicMachine>:
test   %rdi,%rdi
je     111a <deleteBasicMachine+0xa>
jmp    1030 <free@plt>
ret

LLVM IR (-O0):
define void @deleteBasicMachine(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = icmp ne i8* %3, null
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load i8*, i8** %2
%7 = call i32 @free(i8* %6)
br label %8
8: ; preds = %5, %1
ret void
}

LLVM IR (-O2):
define void @deleteBasicMachine(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = tail call i32 @free(i8* %0)
br label %5
5: ; preds = %3, %1
ret void
}
unsigned int SumOfSquares(unsigned int num) {
  unsigned int sum = 0;
  sum = (num * (num + 1) * (2 * num + 1)) / 6;
  return sum;
}


x86 assembly (clang, -O0):
<SumOfSquares>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x4(%rbp),%ecx
add    $0x1,%ecx
imul   %ecx,%eax
mov    -0x4(%rbp),%ecx
shl    $0x1,%ecx
add    $0x1,%ecx
imul   %ecx,%eax
mov    $0x6,%ecx
xor    %edx,%edx
div    %ecx
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<SumOfSquares>:
lea    0x1(%rdi),%eax
imul   %edi,%eax
lea    (%rdi,%rdi,1),%ecx
add    $0x1,%ecx
imul   %eax,%ecx
mov    $0xaaaaaaab,%eax
imul   %rcx,%rax
shr    $0x22,%rax
ret

LLVM IR (-O0):
define i32 @SumOfSquares(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
store i32 0, i32* %3
%4 = load i32, i32* %2
%5 = load i32, i32* %2
%6 = add i32 %5, 1
%7 = mul i32 %4, %6
%8 = load i32, i32* %2
%9 = mul i32 2, %8
%10 = add i32 %9, 1
%11 = mul i32 %7, %10
%12 = udiv i32 %11, 6
store i32 %12, i32* %3
%13 = load i32, i32* %3
ret i32 %13
}

LLVM IR (-O2):
define i32 @SumOfSquares(i32 %0) {
%2 = add i32 %0, 1
%3 = mul i32 %2, %0
%4 = shl i32 %0, 1
%5 = or i32 %4, 1
%6 = mul i32 %3, %5
%7 = udiv i32 %6, 6
ret i32 %7
}
/* Variables and functions */
float __ocml_fma_rtz_f32(float, float, float);
float __fmaf_rz(float x, float y, float z) {
  return __ocml_fma_rtz_f32(x, y, z);
}


x86 assembly (clang, -O0):
<__fmaf_rz>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  %xmm2,-0xc(%rbp)
movss  -0x4(%rbp),%xmm0
movss  -0x8(%rbp),%xmm1
movss  -0xc(%rbp),%xmm2
call   1030 <__ocml_fma_rtz_f32@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__fmaf_rz>:
jmp    1030 <__ocml_fma_rtz_f32@plt>

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

LLVM IR (-O2):
define float @__fmaf_rz(float %0, float %1, float %2) {
%4 = tail call float @__ocml_fma_rtz_f32(float %0, float %1, float %2)
ret float %4
}
/* Variables and functions */
int close(int);
int /*<<< orphan*/ err_sys(char *);
void Close(int fd) {
  if (close(fd) == -1)
    err_sys("close error");
}


x86 assembly (clang, -O0):
<Close>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1040 <close@plt>
cmp    $0xffffffff,%eax
jne    1148 <Close+0x28>
lea    0xebd(%rip),%rdi
call   1030 <err_sys@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Close>:
push   %rax
call   1040 <close@plt>
cmp    $0xffffffff,%eax
je     112d <Close+0xd>
pop    %rax
ret
lea    0xecc(%rip),%rdi
pop    %rax
jmp    1030 <err_sys@plt>

LLVM IR (-O0):
@.str = [12 x i8] c"close error\00"
define void @Close(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @close(i32 %3)
%5 = icmp eq i32 %4, -1
br i1 %5, label %6, label %8
6: ; preds = %1
%7 = call i32 @err_sys(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
br label %8
8: ; preds = %6, %1
ret void
}

LLVM IR (-O2):
@.str = [12 x i8] c"close error\00"
define void @Close(i32 %0) {
%2 = tail call i32 @close(i32 %0)
%3 = icmp eq i32 %2, -1
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i32 @err_sys(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
br label %6
6: ; preds = %4, %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ chardb_sql_sync();
int /*<<< orphan*/ inter_sync();
int mmo_char_sync_timer(int tid, unsigned int tick, int id, void *data) {
  chardb_sql_sync();
  inter_sync();
  return 0;
}


x86 assembly (clang, -O0):
<mmo_char_sync_timer>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %rcx,-0x18(%rbp)
mov    $0x0,%al
call   1040 <chardb_sql_sync@plt>
mov    $0x0,%al
call   1030 <inter_sync@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mmo_char_sync_timer>:
push   %rax
xor    %eax,%eax
call   1040 <chardb_sql_sync@plt>
xor    %eax,%eax
call   1030 <inter_sync@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @mmo_char_sync_timer(i32 %0, i32 %1, i32 %2, i8* %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i8*
store i32 %0, i32* %5
store i32 %1, i32* %6
store i32 %2, i32* %7
store i8* %3, i8** %8
%9 = call i32 (...) @chardb_sql_sync()
%10 = call i32 (...) @inter_sync()
ret i32 0
}

LLVM IR (-O2):
define i32 @mmo_char_sync_timer(i32 %0, i32 %1, i32 %2, i8* nocapture readnone %3) {
%5 = tail call i32 (...) @chardb_sql_sync()
%6 = tail call i32 (...) @inter_sync()
ret i32 0
}
void count_op(void *data, char c) {
  unsigned int *idata = data;
  (*idata)++;
}


x86 assembly (clang, -O0):
<count_op>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %rdi,-0x8(%rbp)
mov    %al,-0x9(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    (%rax),%ecx
add    $0x1,%ecx
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<count_op>:
addl   $0x1,(%rdi)
ret

LLVM IR (-O0):
define void @count_op(i8* %0, i8 signext %1) {
%3 = alloca i8*
%4 = alloca i8
%5 = alloca i32*
store i8* %0, i8** %3
store i8 %1, i8* %4
%6 = load i8*, i8** %3
%7 = bitcast i8* %6 to i32*
store i32* %7, i32** %5
%8 = load i32*, i32** %5
%9 = load i32, i32* %8
%10 = add i32 %9, 1
store i32 %10, i32* %8
ret void
}

LLVM IR (-O2):
define void @count_op(i8* nocapture %0, i8 signext %1) {
%3 = bitcast i8* %0 to i32*
%4 = load i32, i32* %3
%5 = add i32 %4, 1
store i32 %5, i32* %3
ret void
}
/* Variables and functions */
int sv_get_number_of_modules(int);
int vox_get_number_of_modules(int slot) {
  return sv_get_number_of_modules(slot);
}


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

x86 assembly (clang, -O2):
<vox_get_number_of_modules>:
jmp    1030 <sv_get_number_of_modules@plt>

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

LLVM IR (-O2):
define i32 @vox_get_number_of_modules(i32 %0) {
%2 = tail call i32 @sv_get_number_of_modules(i32 %0)
ret i32 %2
}
/* Variables and functions */
unsigned int foo1(int);
unsigned int bar1(int x) { return foo1(x + 6); }


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

x86 assembly (clang, -O2):
<bar1>:
add    $0x6,%edi
jmp    1030 <foo1@plt>

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

LLVM IR (-O2):
define i32 @bar1(i32 %0) {
%2 = add nsw i32 %0, 6
%3 = tail call i32 @foo1(i32 %2)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void print_instructions(void) {
  printf("Welcome to tic-tac-toe!\n");
  printf("Player 1 always plays X and player 2 always play O\n");
  printf("Good luck!\n\n\n");
}


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

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

LLVM IR (-O0):
@.str = [25 x i8] c"Welcome to tic-tac-toe!\0A\00"
@.str.1 = [52 x i8] c"Player 1 always plays X and player 2 always play O\0A\00"
@.str.2 = [14 x i8] c"Good luck!\0A\0A\0A\00"
define void @print_instructions() {
%1 = call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @printf(i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [24 x i8] c"Welcome to tic-tac-toe!\00"
@str.3 = [51 x i8] c"Player 1 always plays X and player 2 always play O\00"
@str.4 = [13 x i8] c"Good luck!\0A\0A\00"
define void @print_instructions() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([51 x i8], [51 x i8]* @str.3, i64 0, i64 0))
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @str.4, i64 0, i64 0))
ret void
}
void g_slist_sort_with_data() {}


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

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

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

LLVM IR (-O2):
define void @g_slist_sort_with_data() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ R_Systeminit();
int HardwareSetup(void) {
  R_Systeminit();
  return (1U);
}


x86 assembly (clang, -O0):
<HardwareSetup>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <R_Systeminit@plt>
mov    $0x1,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<HardwareSetup>:
push   %rax
xor    %eax,%eax
call   1030 <R_Systeminit@plt>
mov    $0x1,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @HardwareSetup() {
%1 = call i32 (...) @R_Systeminit()
ret i32 1
}

LLVM IR (-O2):
define i32 @HardwareSetup() {
%1 = tail call i32 (...) @R_Systeminit()
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ abs(int);
int floor(int /*<<< orphan*/);
int /*<<< orphan*/ log10(int /*<<< orphan*/);
int get_length_digits(int n) { return (n == 0) ? 1 : floor(log10(abs(n))) + 1; }


x86 assembly (clang, -O0):
<get_length_digits>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
jne    1152 <get_length_digits+0x22>
mov    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    116e <get_length_digits+0x3e>
mov    -0x4(%rbp),%edi
call   1030 <abs@plt>
mov    %eax,%edi
call   1040 <log10@plt>
mov    %eax,%edi
call   1050 <floor@plt>
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_length_digits>:
test   %edi,%edi
je     1142 <get_length_digits+0x22>
push   %rax
mov    %edi,%eax
neg    %eax
cmovs  %edi,%eax
mov    %eax,%edi
call   1030 <log10@plt>
mov    %eax,%edi
call   1040 <floor@plt>
add    $0x1,%eax
add    $0x8,%rsp
ret
mov    $0x1,%eax
ret

LLVM IR (-O0):
define i32 @get_length_digits(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp eq i32 %3, 0
br i1 %4, label %5, label %6
5: ; preds = %1
br label %12
6: ; preds = %1
%7 = load i32, i32* %2
%8 = call i32 @abs(i32 %7)
%9 = call i32 @log10(i32 %8)
%10 = call i32 @floor(i32 %9)
%11 = add nsw i32 %10, 1
br label %12
12: ; preds = %6, %5
%13 = phi i32 [ 1, %5 ], [ %11, %6 ]
ret i32 %13
}

LLVM IR (-O2):
define i32 @get_length_digits(i32 %0) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %8, label %3
3: ; preds = %1
%4 = tail call i32 @llvm.abs.i32(i32 %0, i1 true)
%5 = tail call i32 @log10(i32 %4)
%6 = tail call i32 @floor(i32 %5)
%7 = add nsw i32 %6, 1
br label %8
8: ; preds = %1, %3
%9 = phi i32 [ %7, %3 ], [ 1, %1 ]
ret i32 %9
}
int test_imm_ABuint8_mem(unsigned char *val) {
  return ((*val) & (-0xAB << 0)) ? -20 : -40;
}


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

x86 assembly (clang, -O2):
<test_imm_ABuint8_mem>:
testb  $0x55,(%rdi)
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_ABuint8_mem(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = load i8, i8* %3
%5 = zext i8 %4 to i32
%6 = and i32 %5, -171
%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_ABuint8_mem(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = and i8 %2, 85
%4 = icmp eq i8 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int fgetc_unlocked(int /*<<< orphan*/ *);
int get(void *file) { return fgetc_unlocked((FILE *)file); }


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

x86 assembly (clang, -O2):
<get>:
jmp    1030 <fgetc_unlocked@plt>

LLVM IR (-O0):
define i32 @get(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = bitcast i8* %3 to i32*
%5 = call i32 @fgetc_unlocked(i32* %4)
ret i32 %5
}

LLVM IR (-O2):
define i32 @get(i8* nocapture %0) {
%2 = bitcast i8* %0 to i32*
%3 = tail call i32 @fgetc_unlocked(i32* %2)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int pa_stream_get_channel_map() {
  printf("NOT IMPLEMENTED:"
         "pa_stream_get_channel_map"
         "\n");
}


x86 assembly (clang, -O0):
<pa_stream_get_channel_map>:
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_stream_get_channel_map>:
lea    0xee9(%rip),%rdi
jmp    1030 <puts@plt>

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

LLVM IR (-O2):
@str = [42 x i8] c"NOT IMPLEMENTED:pa_stream_get_channel_map\00"
define i32 @pa_stream_get_channel_map() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([42 x i8], [42 x i8]* @str, i64 0, i64 0))
ret i32 undef
}
unsigned xrop3_224_0_1(unsigned char s, unsigned char t) {
  unsigned D = 0x00ff;
  unsigned S = ((unsigned)s << 8) | s;
  unsigned T = ((unsigned)t << 8) | t;
  unsigned stk1;
  unsigned stk2;
  stk2 = D | S;
  stk1 = T & stk2;
  return (stk1 & S) | (stk1 & (~T)) | (T & (~S) & D);
}


x86 assembly (clang, -O0):
<xrop3_224_0_1>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %dil,%cl
mov    %cl,-0x1(%rbp)
mov    %al,-0x2(%rbp)
movl   $0xff,-0x8(%rbp)
movzbl -0x1(%rbp),%eax
shl    $0x8,%eax
movzbl -0x1(%rbp),%ecx
or     %ecx,%eax
mov    %eax,-0xc(%rbp)
movzbl -0x2(%rbp),%eax
shl    $0x8,%eax
movzbl -0x2(%rbp),%ecx
or     %ecx,%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%eax
or     -0xc(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x10(%rbp),%eax
and    -0x18(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
and    -0xc(%rbp),%eax
mov    -0x14(%rbp),%ecx
mov    -0x10(%rbp),%edx
xor    $0xffffffff,%edx
and    %edx,%ecx
or     %ecx,%eax
mov    -0x10(%rbp),%ecx
mov    -0xc(%rbp),%edx
xor    $0xffffffff,%edx
and    %edx,%ecx
and    -0x8(%rbp),%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<xrop3_224_0_1>:
mov    %edi,%eax
shl    $0x8,%eax
mov    %esi,%ecx
shl    $0x8,%ecx
or     %esi,%ecx
or     %edi,%eax
and    %ecx,%eax
not    %edi
and    %esi,%edi
or     %edi,%eax
ret

LLVM IR (-O0):
define i32 @xrop3_224_0_1(i8 zeroext %0, i8 zeroext %1) {
%3 = alloca i8
%4 = alloca i8
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
store i8 %0, i8* %3
store i8 %1, i8* %4
store i32 255, i32* %5
%10 = load i8, i8* %3
%11 = zext i8 %10 to i32
%12 = shl i32 %11, 8
%13 = load i8, i8* %3
%14 = zext i8 %13 to i32
%15 = or i32 %12, %14
store i32 %15, i32* %6
%16 = load i8, i8* %4
%17 = zext i8 %16 to i32
%18 = shl i32 %17, 8
%19 = load i8, i8* %4
%20 = zext i8 %19 to i32
%21 = or i32 %18, %20
store i32 %21, i32* %7
%22 = load i32, i32* %5
%23 = load i32, i32* %6
%24 = or i32 %22, %23
store i32 %24, i32* %9
%25 = load i32, i32* %7
%26 = load i32, i32* %9
%27 = and i32 %25, %26
store i32 %27, i32* %8
%28 = load i32, i32* %8
%29 = load i32, i32* %6
%30 = and i32 %28, %29
%31 = load i32, i32* %8
%32 = load i32, i32* %7
%33 = xor i32 %32, -1
%34 = and i32 %31, %33
%35 = or i32 %30, %34
%36 = load i32, i32* %7
%37 = load i32, i32* %6
%38 = xor i32 %37, -1
%39 = and i32 %36, %38
%40 = load i32, i32* %5
%41 = and i32 %39, %40
%42 = or i32 %35, %41
ret i32 %42
}

LLVM IR (-O2):
define i32 @xrop3_224_0_1(i8 zeroext %0, i8 zeroext %1) {
%3 = zext i8 %0 to i32
%4 = shl nuw nsw i32 %3, 8
%5 = zext i8 %1 to i32
%6 = mul nuw nsw i32 %5, 257
%7 = or i32 %4, %3
%8 = and i32 %7, %6
%9 = xor i32 %3, -1
%10 = and i32 %9, %5
%11 = or i32 %8, %10
ret i32 %11
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void printAll3SUM() { printf("printAll3SUM()\n"); }


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

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

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

LLVM IR (-O2):
@str = [15 x i8] c"printAll3SUM()\00"
define void @printAll3SUM() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ esc(char *);
deckpam() { esc("="); }


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

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

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

LLVM IR (-O2):
@.str = [2 x i8] c"=\00"
define i32 @deckpam() {
%1 = tail call i32 @esc(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ _errorloop();
void DebugMonitor_Handler() { _errorloop(); }


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

x86 assembly (clang, -O2):
<DebugMonitor_Handler>:
xor    %eax,%eax
jmp    1030 <_errorloop@plt>

LLVM IR (-O0):
define void @DebugMonitor_Handler() {
%1 = call i32 (...) @_errorloop()
ret void
}

LLVM IR (-O2):
define void @DebugMonitor_Handler() {
%1 = tail call i32 (...) @_errorloop()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
void print_string(char s[]) { printf("%s", s); }


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

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

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

LLVM IR (-O2):
@.str = [3 x i8] c"%s\00"
define void @print_string(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
/* Variables and functions */
scalar_t__ strlen(char const *);
bool str_is_nonempty(const char *s) {
  if (s != NULL && strlen(s) > 0) {
    return true;
  } else {
    return false;
  }
}


x86 assembly (clang, -O0):
<str_is_nonempty>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     1146 <str_is_nonempty+0x36>
mov    -0x10(%rbp),%rdi
call   1030 <strlen@plt>
cmp    $0x0,%rax
jle    1146 <str_is_nonempty+0x36>
movl   $0x1,-0x4(%rbp)
jmp    114d <str_is_nonempty+0x3d>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<str_is_nonempty>:
test   %rdi,%rdi
je     112e <str_is_nonempty+0x1e>
push   %rax
call   1030 <strlen@plt>
mov    %rax,%rcx
mov    $0x1,%eax
test   %rcx,%rcx
lea    0x8(%rsp),%rsp
jle    112e <str_is_nonempty+0x1e>
ret
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @str_is_nonempty(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
store i8* %0, i8** %3
%4 = load i8*, i8** %3
%5 = icmp ne i8* %4, null
br i1 %5, label %6, label %11
6: ; preds = %1
%7 = load i8*, i8** %3
%8 = call i64 @strlen(i8* %7)
%9 = icmp sgt i64 %8, 0
br i1 %9, label %10, label %11
10: ; preds = %6
store i32 1, i32* %2
br label %12
11: ; preds = %6, %1
store i32 0, i32* %2
br label %12
12: ; preds = %11, %10
%13 = load i32, i32* %2
ret i32 %13
}

LLVM IR (-O2):
define i32 @str_is_nonempty(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %6, label %3
3: ; preds = %1
%4 = tail call i64 @strlen(i8* %0)
%5 = icmp sgt i64 %4, 0
br i1 %5, label %7, label %6
6: ; preds = %3, %1
br label %7
7: ; preds = %3, %6
%8 = phi i32 [ 0, %6 ], [ 1, %3 ]
ret i32 %8
}
void *sub(int a, int *b) { return (void *)b; }


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

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

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

LLVM IR (-O2):
define i8* @sub(i32 %0, i32* readnone %1) {
%3 = bitcast i32* %1 to i8*
ret i8* %3
}