xunge/DecIR huggingface dataset:
/* Variables and functions */
unsigned char *xsalsa8_encrypt(unsigned char *, size_t *, unsigned char const *,
                               size_t, unsigned char const *,
                               unsigned char const *);
unsigned char *crypt_encrypt_xsalsa8(unsigned char *out, size_t *out_len,
                                     const unsigned char *in, size_t in_len,
                                     const unsigned char *nonce,
                                     const unsigned char *key) {
  return xsalsa8_encrypt(out, out_len, in, in_len, nonce, key);
}


x86 assembly (clang, -O0):
<crypt_encrypt_xsalsa8>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9,-0x30(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    -0x28(%rbp),%r8
mov    -0x30(%rbp),%r9
call   1030 <xsalsa8_encrypt@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<crypt_encrypt_xsalsa8>:
jmp    1030 <xsalsa8_encrypt@plt>

LLVM IR (-O0):
define i8* @crypt_encrypt_xsalsa8(i8* %0, i64* %1, i8* %2, i64 %3, i8* %4, i8* %5) {
%7 = alloca i8*
%8 = alloca i64*
%9 = alloca i8*
%10 = alloca i64
%11 = alloca i8*
%12 = alloca i8*
store i8* %0, i8** %7
store i64* %1, i64** %8
store i8* %2, i8** %9
store i64 %3, i64* %10
store i8* %4, i8** %11
store i8* %5, i8** %12
%13 = load i8*, i8** %7
%14 = load i64*, i64** %8
%15 = load i8*, i8** %9
%16 = load i64, i64* %10
%17 = load i8*, i8** %11
%18 = load i8*, i8** %12
%19 = call i8* @xsalsa8_encrypt(i8* %13, i64* %14, i8* %15, i64 %16, i8* %17, i8* %18)
ret i8* %19
}

LLVM IR (-O2):
define i8* @crypt_encrypt_xsalsa8(i8* %0, i64* %1, i8* %2, i64 %3, i8* %4, i8* %5) {
%7 = tail call i8* @xsalsa8_encrypt(i8* %0, i64* %1, i8* %2, i64 %3, i8* %4, i8* %5)
ret i8* %7
}
float eval_as_float(float x) {
  float y = x;
  return y;
}


x86 assembly (clang, -O0):
<eval_as_float>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
movss  %xmm0,-0x8(%rbp)
movss  -0x8(%rbp),%xmm0
pop    %rbp
ret

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

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

LLVM IR (-O2):
define float @eval_as_float(float returned %0) {
ret float %0
}
void MROnNextPreviousRequestSink(int trackDelta) {}


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

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

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

LLVM IR (-O2):
define void @MROnNextPreviousRequestSink(i32 %0) {
ret void
}
/* Variables and functions */
unsigned int toint32(double);
unsigned int touint32(double d) { return toint32(d); }


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

x86 assembly (clang, -O2):
<touint32>:
jmp    1030 <toint32@plt>

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

LLVM IR (-O2):
define i32 @touint32(double %0) {
%2 = tail call i32 @toint32(double %0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ ENOSYS;
int /*<<< orphan*/ __set_errno(int /*<<< orphan*/);
int /*<<< orphan*/ fputs(char *, int /*<<< orphan*/);
int /*<<< orphan*/ stderr;
long double __ieee754_atan2l(long double x, long double y) {
  fputs("__ieee754_atan2l not implemented\n", stderr);
  __set_errno(ENOSYS);
  return 0.0;
}


x86 assembly (clang, -O0):
<__ieee754_atan2l>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
fldt   0x20(%rbp)
fldt   0x10(%rbp)
fstpt  -0x10(%rbp)
fstpt  -0x20(%rbp)
mov    0x2e9d(%rip),%rax
mov    (%rax),%esi
lea    0xebc(%rip),%rdi
call   1040 <fputs@plt>
mov    0x2e98(%rip),%rax
mov    (%rax),%edi
call   1030 <__set_errno@plt>
fldz
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__ieee754_atan2l>:
push   %rax
mov    0x2eb0(%rip),%rax
mov    (%rax),%esi
lea    0xecf(%rip),%rdi
call   1040 <fputs@plt>
mov    0x2eab(%rip),%rax
mov    (%rax),%edi
call   1030 <__set_errno@plt>
fldz
pop    %rax
ret

LLVM IR (-O0):
@.str = [34 x i8] c"__ieee754_atan2l not implemented\0A\00"
@stderr = global i32 0
@ENOSYS = global i32 0
define x86_fp80 @__ieee754_atan2l(x86_fp80 %0, x86_fp80 %1) {
%3 = alloca x86_fp80
%4 = alloca x86_fp80
store x86_fp80 %0, x86_fp80* %3
store x86_fp80 %1, x86_fp80* %4
%5 = load i32, i32* @stderr
%6 = call i32 @fputs(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0), i32 %5)
%7 = load i32, i32* @ENOSYS
%8 = call i32 @__set_errno(i32 %7)
ret x86_fp80 0xK00000000000000000000
}

LLVM IR (-O2):
@.str = [34 x i8] c"__ieee754_atan2l not implemented\0A\00"
@stderr = global i32 0
@ENOSYS = global i32 0
define x86_fp80 @__ieee754_atan2l(x86_fp80 %0, x86_fp80 %1) {
%3 = load i32, i32* @stderr
%4 = tail call i32 @fputs(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0), i32 %3)
%5 = load i32, i32* @ENOSYS
%6 = tail call i32 @__set_errno(i32 %5)
ret x86_fp80 0xK00000000000000000000
}
float frandom(limit)
long limit;
{
  float r;
  long rdm;
  if (limit < 2)
    return (0);
  rdm = rand() % (limit * 100);
  r = (float)rdm / 100.0;
  return (r);
}


x86 assembly (clang, -O0):
<frandom>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
cmpq   $0x2,-0x10(%rbp)
jge    1134 <frandom+0x24>
xorps  %xmm0,%xmm0
movss  %xmm0,-0x4(%rbp)
jmp    1174 <frandom+0x64>
mov    $0x0,%al
call   1030 <rand@plt>
cltq
imul   $0x64,-0x10(%rbp),%rcx
cqto
idiv   %rcx
mov    %rdx,-0x20(%rbp)
cvtsi2ssq -0x20(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xea3(%rip),%xmm1
divsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x14(%rbp)
movss  -0x14(%rbp),%xmm0
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<frandom>:
xorps  %xmm0,%xmm0
cmp    $0x2,%rdi
jl     1156 <frandom+0x46>
push   %rbx
mov    %rdi,%rbx
xor    %eax,%eax
call   1030 <rand@plt>
movslq %eax,%rcx
imul   $0x64,%rbx,%rsi
mov    %rcx,%rdx
or     %rsi,%rdx
shr    $0x20,%rdx
je     1141 <frandom+0x31>
mov    %rcx,%rax
cqto
idiv   %rsi
jmp    1145 <frandom+0x35>
xor    %edx,%edx
div    %esi
xorps  %xmm0,%xmm0
cvtsi2ss %rdx,%xmm0
divss  0xeab(%rip),%xmm0
pop    %rbx
ret

LLVM IR (-O0):
define float @frandom(i64 %0) {
%2 = alloca float
%3 = alloca i64
%4 = alloca float
%5 = alloca i64
store i64 %0, i64* %3
%6 = load i64, i64* %3
%7 = icmp slt i64 %6, 2
br i1 %7, label %8, label %9
8: ; preds = %1
store float 0.000000e+00, float* %2
br label %21
9: ; preds = %1
%10 = call i32 (...) @rand()
%11 = sext i32 %10 to i64
%12 = load i64, i64* %3
%13 = mul nsw i64 %12, 100
%14 = srem i64 %11, %13
store i64 %14, i64* %5
%15 = load i64, i64* %5
%16 = sitofp i64 %15 to float
%17 = fpext float %16 to double
%18 = fdiv double %17, 1.000000e+02
%19 = fptrunc double %18 to float
store float %19, float* %4
%20 = load float, float* %4
store float %20, float* %2
br label %21
21: ; preds = %9, %8
%22 = load float, float* %2
ret float %22
}

LLVM IR (-O2):
define float @frandom(i64 %0) {
%2 = icmp slt i64 %0, 2
br i1 %2, label %10, label %3
3: ; preds = %1
%4 = tail call i32 (...) @rand()
%5 = sext i32 %4 to i64
%6 = mul nsw i64 %0, 100
%7 = srem i64 %5, %6
%8 = sitofp i64 %7 to float
%9 = fdiv float %8, 1.000000e+02
br label %10
10: ; preds = %1, %3
%11 = phi float [ %9, %3 ], [ 0.000000e+00, %1 ]
ret float %11
}
void dummyvideo_ShowCFB(void) {}


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

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

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

LLVM IR (-O2):
define void @dummyvideo_ShowCFB() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ ungetsc(int);
void s_put(int c) { ungetsc(c); }


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

x86 assembly (clang, -O2):
<s_put>:
jmp    1030 <ungetsc@plt>

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

LLVM IR (-O2):
define void @s_put(i32 %0) {
%2 = tail call i32 @ungetsc(i32 %0)
ret void
}
void XkbFreeServerMap() {}


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

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

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

LLVM IR (-O2):
define void @XkbFreeServerMap() {
ret void
}
void restart_hz_timer(struct pt_regs *regs) {}


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

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

LLVM IR (-O0):
%struct.pt_regs = type opaque
define void @restart_hz_timer(%struct.pt_regs* %0) {
%2 = alloca %struct.pt_regs*
store %struct.pt_regs* %0, %struct.pt_regs** %2
ret void
}

LLVM IR (-O2):
%struct.pt_regs = type opaque
define void @restart_hz_timer(%struct.pt_regs* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int init(void) {
  printf("SOY EL TIMER LOCO!\n");
  return 0;
}


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

x86 assembly (clang, -O2):
<init>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [20 x i8] c"SOY EL TIMER LOCO!\0A\00"
define i32 @init() {
%1 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [19 x i8] c"SOY EL TIMER LOCO!\00"
define i32 @init() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
long os_atomic_set_long(long volatile *, long);
long os_atomic_exchange_long(volatile long *ptr, long val) {
  return os_atomic_set_long(ptr, val);
}


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

x86 assembly (clang, -O2):
<os_atomic_exchange_long>:
jmp    1030 <os_atomic_set_long@plt>

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

LLVM IR (-O2):
define i64 @os_atomic_exchange_long(i64* %0, i64 %1) {
%3 = tail call i64 @os_atomic_set_long(i64* %0, i64 %1)
ret i64 %3
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void aFree_(void *p, const char *file, int line, const char *func) {
  if (p)
    free(p);
  p = (void *)0;
}


x86 assembly (clang, -O0):
<aFree_>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %rcx,-0x20(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     113b <aFree_+0x2b>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
movq   $0x0,-0x8(%rbp)
add    $0x20,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @aFree_(i8* %0, i8* nocapture readnone %1, i32 %2, i8* nocapture readnone %3) {
%5 = icmp eq i8* %0, null
br i1 %5, label %8, label %6
6: ; preds = %4
%7 = tail call i32 @free(i8* %0)
br label %8
8: ; preds = %6, %4
ret void
}
void ff_hevc_put_hevc_bi_epel_h32_12_sse4() {}


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

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

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

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

/* Variables and functions */
uint32_t softfloat_shiftRightJam32(uint32_t a, uint_fast16_t dist) {
  return (dist < 31) ? a >> dist | ((uint32_t)(a << (-dist & 31)) != 0)
                     : (a != 0);
}


x86 assembly (clang, -O0):
<softfloat_shiftRightJam32>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
cmpl   $0x1f,-0x8(%rbp)
jge    1141 <softfloat_shiftRightJam32+0x41>
mov    -0x4(%rbp),%eax
mov    -0x8(%rbp),%ecx
sar    %cl,%eax
mov    -0x4(%rbp),%edx
xor    %ecx,%ecx
sub    -0x8(%rbp),%ecx
and    $0x1f,%ecx
shl    %cl,%edx
mov    %edx,%ecx
cmp    $0x0,%ecx
setne  %cl
and    $0x1,%cl
movzbl %cl,%ecx
or     %ecx,%eax
mov    %eax,-0xc(%rbp)
jmp    1150 <softfloat_shiftRightJam32+0x50>
cmpl   $0x0,-0x4(%rbp)
setne  %al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<softfloat_shiftRightJam32>:
cmp    $0x1e,%esi
jg     1119 <softfloat_shiftRightJam32+0x19>
mov    %esi,%ecx
mov    %edi,%edx
sar    %cl,%edx
neg    %cl
shl    %cl,%edi
xor    %eax,%eax
test   %edi,%edi
setne  %al
or     %edx,%eax
ret
xor    %eax,%eax
test   %edi,%edi
setne  %al
ret

LLVM IR (-O0):
define i32 @softfloat_shiftRightJam32(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 = icmp slt i32 %5, 31
br i1 %6, label %7, label %19
7: ; preds = %2
%8 = load i32, i32* %3
%9 = load i32, i32* %4
%10 = ashr i32 %8, %9
%11 = load i32, i32* %3
%12 = load i32, i32* %4
%13 = sub nsw i32 0, %12
%14 = and i32 %13, 31
%15 = shl i32 %11, %14
%16 = icmp ne i32 %15, 0
%17 = zext i1 %16 to i32
%18 = or i32 %10, %17
br label %23
19: ; preds = %2
%20 = load i32, i32* %3
%21 = icmp ne i32 %20, 0
%22 = zext i1 %21 to i32
br label %23
23: ; preds = %19, %7
%24 = phi i32 [ %18, %7 ], [ %22, %19 ]
ret i32 %24
}

LLVM IR (-O2):
define i32 @softfloat_shiftRightJam32(i32 %0, i32 %1) {
%3 = icmp slt i32 %1, 31
br i1 %3, label %4, label %12
4: ; preds = %2
%5 = ashr i32 %0, %1
%6 = sub nsw i32 0, %1
%7 = and i32 %6, 31
%8 = shl i32 %0, %7
%9 = icmp ne i32 %8, 0
%10 = zext i1 %9 to i32
%11 = or i32 %5, %10
br label %15
12: ; preds = %2
%13 = icmp ne i32 %0, 0
%14 = zext i1 %13 to i32
br label %15
15: ; preds = %12, %4
%16 = phi i32 [ %11, %4 ], [ %14, %12 ]
ret i32 %16
}
void MAIN__() {}


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

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

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

LLVM IR (-O2):
define void @MAIN__() {
ret void
}
/* Variables and functions */
double get_time();
int /*<<< orphan*/ init_data(double **, int);
scalar_t__ malloc(int);
int /*<<< orphan*/ pencil_dscal_n(int, double, int, double **);
int main() {
  double start_time, end_time;
  double(*A)[1024 * 1024 * 10][1] = (double(*)[1024 * 1024 * 10][1])
      malloc(1024 * 1024 * 10 * sizeof(double));
  init_data(*A, 1024 * 1024 * 10);
  start_time = get_time();
  pencil_dscal_n(1024 * 1024 * 10, 10.0, 1, *A);
  end_time = get_time();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x5000000,%edi
call   1050 <malloc@plt>
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rdi
mov    $0xa00000,%esi
call   1030 <init_data@plt>
mov    $0x0,%al
call   1040 <get_time@plt>
movsd  %xmm0,-0x10(%rbp)
mov    -0x20(%rbp),%rdx
mov    $0xa00000,%edi
movsd  0xe78(%rip),%xmm0
mov    $0x1,%esi
call   1060 <pencil_dscal_n@plt>
mov    $0x0,%al
call   1040 <get_time@plt>
movsd  %xmm0,-0x18(%rbp)
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    $0x5000000,%edi
call   1050 <malloc@plt>
mov    %rax,%rbx
mov    %rax,%rdi
mov    $0xa00000,%esi
call   1030 <init_data@plt>
xor    %eax,%eax
call   1040 <get_time@plt>
movsd  0xe96(%rip),%xmm0
mov    $0xa00000,%edi
mov    $0x1,%esi
mov    %rbx,%rdx
call   1060 <pencil_dscal_n@plt>
xor    %eax,%eax
call   1040 <get_time@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca double
%3 = alloca double
%4 = alloca [10485760 x [1 x double]]*
store i32 0, i32* %1
%5 = call i64 @malloc(i32 83886080)
%6 = inttoptr i64 %5 to [10485760 x [1 x double]]*
store [10485760 x [1 x double]]* %6, [10485760 x [1 x double]]** %4
%7 = load [10485760 x [1 x double]]*, [10485760 x [1 x double]]** %4
%8 = getelementptr inbounds [10485760 x [1 x double]], [10485760 x [1 x double]]* %7, i64 0, i64 0
%9 = bitcast [1 x double]* %8 to double**
%10 = call i32 @init_data(double** %9, i32 10485760)
%11 = call double (...) @get_time()
store double %11, double* %2
%12 = load [10485760 x [1 x double]]*, [10485760 x [1 x double]]** %4
%13 = getelementptr inbounds [10485760 x [1 x double]], [10485760 x [1 x double]]* %12, i64 0, i64 0
%14 = bitcast [1 x double]* %13 to double**
%15 = call i32 @pencil_dscal_n(i32 10485760, double 1.000000e+01, i32 1, double** %14)
%16 = call double (...) @get_time()
store double %16, double* %3
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i64 @malloc(i32 83886080)
%2 = inttoptr i64 %1 to double**
%3 = tail call i32 @init_data(double** %2, i32 10485760)
%4 = tail call double (...) @get_time()
%5 = tail call i32 @pencil_dscal_n(i32 10485760, double 1.000000e+01, i32 1, double** %2)
%6 = tail call double (...) @get_time()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ PressMouse245(unsigned char);
void pressmouse(unsigned char m) { PressMouse245(m); }


x86 assembly (clang, -O0):
<pressmouse>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%edi
call   1030 <PressMouse245@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pressmouse>:
jmp    1030 <PressMouse245@plt>

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

LLVM IR (-O2):
define void @pressmouse(i8 zeroext %0) {
%2 = tail call i32 @PressMouse245(i8 zeroext %0)
ret void
}
int test_imm_36uint16_reg(unsigned short val) {
  return ((val) & (-0x36 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_36uint16_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
movzwl -0x2(%rbp),%edx
and    $0xffffffca,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_36uint16_reg>:
test   $0xffca,%edi
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_36uint16_reg(i16 zeroext %0) {
%2 = and i16 %0, -54
%3 = icmp eq i16 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
int islower(int c) { return c >= 'a' && c <= 'z' ? 1 : 0; }


x86 assembly (clang, -O0):
<islower>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
xor    %eax,%eax
cmpl   $0x61,-0x4(%rbp)
mov    %al,-0x5(%rbp)
jl     1120 <islower+0x20>
cmpl   $0x7a,-0x4(%rbp)
setle  %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%dl
xor    %eax,%eax
mov    $0x1,%ecx
test   $0x1,%dl
cmovne %ecx,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @islower(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp sge i32 %3, 97
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load i32, i32* %2
%7 = icmp sle i32 %6, 122
br label %8
8: ; preds = %5, %1
%9 = phi i1 [ false, %1 ], [ %7, %5 ]
%10 = zext i1 %9 to i64
%11 = select i1 %9, i32 1, i32 0
ret i32 %11
}

LLVM IR (-O2):
define i32 @islower(i32 %0) {
%2 = add i32 %0, -97
%3 = icmp ult i32 %2, 26
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ pause();
void g(int a) {
  (void)a;
  *(int *)1 = 0;
  pause();
}


x86 assembly (clang, -O0):
<g>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x1,%eax
movl   $0x0,(%rax)
mov    $0x0,%al
call   1030 <pause@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<g>:
movl   $0x0,0x1
xor    %eax,%eax
jmp    1030 <pause@plt>

LLVM IR (-O0):
define void @g(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
store i32 0, i32* inttoptr (i64 1 to i32*)
%4 = call i32 (...) @pause()
ret void
}

LLVM IR (-O2):
define void @g(i32 %0) {
store i32 0, i32* inttoptr (i64 1 to i32*)
%2 = tail call i32 (...) @pause()
ret void
}
double epb2ep(epoch)
double epoch;
{
  double dj;
  dj = epb2jd(epoch);
  return (jd2ep(dj));
}


x86 assembly (clang, -O0):
<epb2ep>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
mov    $0x1,%al
call   1040 <epb2jd@plt>
cvtsi2sd %eax,%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
mov    $0x1,%al
call   1030 <jd2ep@plt>
cvtsi2sd %eax,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<epb2ep>:
push   %rax
mov    $0x1,%al
call   1040 <epb2jd@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
mov    $0x1,%al
call   1030 <jd2ep@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @epb2ep(double %0) {
%2 = alloca double
%3 = alloca double
store double %0, double* %2
%4 = load double, double* %2
%5 = call i32 (double, ...) bitcast (i32 (...)* @epb2jd to i32 (double, ...)*)(double %4)
%6 = sitofp i32 %5 to double
store double %6, double* %3
%7 = load double, double* %3
%8 = call i32 (double, ...) bitcast (i32 (...)* @jd2ep to i32 (double, ...)*)(double %7)
%9 = sitofp i32 %8 to double
ret double %9
}

LLVM IR (-O2):
define double @epb2ep(double %0) {
%2 = tail call i32 (double, ...) bitcast (i32 (...)* @epb2jd to i32 (double, ...)*)(double %0)
%3 = sitofp i32 %2 to double
%4 = tail call i32 (double, ...) bitcast (i32 (...)* @jd2ep to i32 (double, ...)*)(double %3)
%5 = sitofp i32 %4 to double
ret double %5
}
void wifi_rsp_flash_ps_save(const struct wifi_msg_flash_ps_save_rsp_t *msg) {}


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

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

LLVM IR (-O0):
%struct.wifi_msg_flash_ps_save_rsp_t = type opaque
define void @wifi_rsp_flash_ps_save(%struct.wifi_msg_flash_ps_save_rsp_t* %0) {
%2 = alloca %struct.wifi_msg_flash_ps_save_rsp_t*
store %struct.wifi_msg_flash_ps_save_rsp_t* %0, %struct.wifi_msg_flash_ps_save_rsp_t** %2
ret void
}

LLVM IR (-O2):
%struct.wifi_msg_flash_ps_save_rsp_t = type opaque
define void @wifi_rsp_flash_ps_save(%struct.wifi_msg_flash_ps_save_rsp_t* nocapture %0) {
ret void
}
/* Variables and functions */
int foo(int /*<<< orphan*/);
int main() { return foo(0); }


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @foo(i32 0)
ret i32 %1
}
int test_imm_45int16_mem(short *val) {
  return ((*val) & (0x45 << 0)) ? -20 : -40;
}


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

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

LLVM IR (-O0):
define i32 @test_imm_45int16_mem(i16* %0) {
%2 = alloca i16*
store i16* %0, i16** %2
%3 = load i16*, i16** %2
%4 = load i16, i16* %3
%5 = sext i16 %4 to i32
%6 = and i32 %5, 69
%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_45int16_mem(i16* nocapture %0) {
%2 = load i16, i16* %0
%3 = and i16 %2, 69
%4 = icmp eq i16 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ LOG_ERR;
int clear();
int /*<<< orphan*/ syslog(int /*<<< orphan*/, char *);
void clear_all_rules() {
  if (clear() == -1)
    syslog(LOG_ERR, "Failed to clear all rules");
}


x86 assembly (clang, -O0):
<clear_all_rules>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <clear@plt>
cmp    $0xffffffff,%eax
jne    1149 <clear_all_rules+0x29>
mov    0x2e9d(%rip),%rax
mov    (%rax),%edi
lea    0xebc(%rip),%rsi
call   1030 <syslog@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<clear_all_rules>:
push   %rax
xor    %eax,%eax
call   1040 <clear@plt>
cmp    $0xffffffff,%eax
je     112f <clear_all_rules+0xf>
pop    %rax
ret
mov    0x2ea2(%rip),%rax
mov    (%rax),%edi
lea    0xec1(%rip),%rsi
pop    %rax
jmp    1030 <syslog@plt>

LLVM IR (-O0):
@LOG_ERR = global i32 0
@.str = [26 x i8] c"Failed to clear all rules\00"
define void @clear_all_rules() {
%1 = call i32 (...) @clear()
%2 = icmp eq i32 %1, -1
br i1 %2, label %3, label %6
3: ; preds = %0
%4 = load i32, i32* @LOG_ERR
%5 = call i32 @syslog(i32 %4, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
br label %6
6: ; preds = %3, %0
ret void
}

LLVM IR (-O2):
@LOG_ERR = global i32 0
@.str = [26 x i8] c"Failed to clear all rules\00"
define void @clear_all_rules() {
%1 = tail call i32 (...) @clear()
%2 = icmp eq i32 %1, -1
br i1 %2, label %3, label %6
3: ; preds = %0
%4 = load i32, i32* @LOG_ERR
%5 = tail call i32 @syslog(i32 %4, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
br label %6
6: ; preds = %3, %0
ret void
}
void __handle_sysrq(int key, struct tty_struct *tty, int check_mask) {}


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

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

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

LLVM IR (-O2):
%struct.tty_struct = type opaque
define void @__handle_sysrq(i32 %0, %struct.tty_struct* nocapture %1, i32 %2) {
ret void
}
int main() {
  int b = 1;
  int a = 10;
  while (a > b && b < a) {
    a = a + b;
    while (a < b) {
      b = a + b;
    }
    if (a > b)
      a = 2;
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movl   $0x1,-0x8(%rbp)
movl   $0xa,-0xc(%rbp)
mov    -0xc(%rbp),%ecx
xor    %eax,%eax
cmp    -0x8(%rbp),%ecx
mov    %al,-0xd(%rbp)
jle    1136 <main+0x36>
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
setl   %al
mov    %al,-0xd(%rbp)
mov    -0xd(%rbp),%al
test   $0x1,%al
jne    1146 <main+0x46>
jmp    1181 <main+0x81>
mov    -0xc(%rbp),%eax
add    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    1169 <main+0x69>
mov    -0xc(%rbp),%eax
add    -0x8(%rbp),%eax
mov    %eax,-0x8(%rbp)
jmp    114f <main+0x4f>
mov    -0xc(%rbp),%eax
cmp    -0x8(%rbp),%eax
jle    117c <main+0x7c>
movl   $0x2,-0xc(%rbp)
jmp    1119 <main+0x19>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
store i32 1, i32* %2
store i32 10, i32* %3
br label %4
4: ; preds = %31, %0
%5 = load i32, i32* %3
%6 = load i32, i32* %2
%7 = icmp sgt i32 %5, %6
br i1 %7, label %8, label %12
8: ; preds = %4
%9 = load i32, i32* %2
%10 = load i32, i32* %3
%11 = icmp slt i32 %9, %10
br label %12
12: ; preds = %8, %4
%13 = phi i1 [ false, %4 ], [ %11, %8 ]
br i1 %13, label %14, label %32
14: ; preds = %12
%15 = load i32, i32* %3
%16 = load i32, i32* %2
%17 = add nsw i32 %15, %16
store i32 %17, i32* %3
br label %18
18: ; preds = %22, %14
%19 = load i32, i32* %3
%20 = load i32, i32* %2
%21 = icmp slt i32 %19, %20
br i1 %21, label %22, label %26
22: ; preds = %18
%23 = load i32, i32* %3
%24 = load i32, i32* %2
%25 = add nsw i32 %23, %24
store i32 %25, i32* %2
br label %18
26: ; preds = %18
%27 = load i32, i32* %3
%28 = load i32, i32* %2
%29 = icmp sgt i32 %27, %28
br i1 %29, label %30, label %31
30: ; preds = %26
store i32 2, i32* %3
br label %31
31: ; preds = %30, %26
br label %4
32: ; preds = %12
ret i32 0
}

LLVM IR (-O2):
void DIRECTORYSTRING_free(void) {}


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

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

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

LLVM IR (-O2):
define void @DIRECTORYSTRING_free() {
ret void
}
int b2(void) { return 2; }


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

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

LLVM IR (-O0):
define i32 @b2() {
ret i32 2
}

LLVM IR (-O2):
define i32 @b2() {
ret i32 2
}
/* Type definitions */
typedef int /*<<< orphan*/ regex_t;
typedef int /*<<< orphan*/ re;

/* Variables and functions */
scalar_t__ malloc(int);
int regcomp(int /*<<< orphan*/ *, char const *, int);
void *Regcomp(const char *pat, int flag) {
  regex_t re;
  regex_t *rre;
  int rcode;
  rcode = regcomp(&re, pat, flag);
  if (rcode == 0) {
    rre = (regex_t *)malloc(sizeof(re));
    *rre = re;
    return (void *)rre;
  }
  return 0;
}


x86 assembly (clang, -O0):
<Regcomp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
lea    -0x18(%rbp),%rdi
call   1030 <regcomp@plt>
mov    %eax,-0x24(%rbp)
cmpl   $0x0,-0x24(%rbp)
jne    1170 <Regcomp+0x50>
mov    $0x4,%edi
call   1040 <malloc@plt>
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%ecx
mov    -0x20(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x20(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    1178 <Regcomp+0x58>
movq   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Regcomp>:
push   %rax
mov    %esi,%edx
mov    %rdi,%rsi
lea    0x4(%rsp),%rdi
call   1030 <regcomp@plt>
test   %eax,%eax
je     1138 <Regcomp+0x18>
xor    %eax,%eax
pop    %rcx
ret
mov    $0x4,%edi
call   1040 <malloc@plt>
mov    0x4(%rsp),%ecx
mov    %ecx,(%rax)
pop    %rcx
ret

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

LLVM IR (-O2):
define i8* @Regcomp(i8* %0, i32 %1) {
%3 = alloca i32
%4 = bitcast i32* %3 to i8*
%5 = call i32 @regcomp(i32* %3, i8* %0, i32 %1)
%6 = icmp eq i32 %5, 0
br i1 %6, label %7, label %12
7: ; preds = %2
%8 = call i64 @malloc(i32 4)
%9 = inttoptr i64 %8 to i32*
%10 = load i32, i32* %3
store i32 %10, i32* %9
%11 = inttoptr i64 %8 to i8*
br label %12
12: ; preds = %2, %7
%13 = phi i8* [ %11, %7 ], [ null, %2 ]
ret i8* %13
}
__attribute__((no, noclone)) unsigned __int128 t159_3add(signed __int128 y) {
  unsigned __int128 r;
  if (__builtin_add_overflow((signed __int128)(-3), y, &r))
    bar();
  return r;
}


x86 assembly (clang, -O0):
<t159_3add>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %rdi,-0x20(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x20(%rbp),%rax
mov    -0x18(%rbp),%rcx
mov    %rcx,-0x28(%rbp)
mov    %rax,-0x30(%rbp)
mov    -0x30(%rbp),%rdx
mov    -0x28(%rbp),%rcx
mov    %rcx,%r9
sar    $0x3f,%r9
add    $0xfffffffffffffffd,%rdx
adc    $0xffffffffffffffff,%rcx
mov    %r9,%r8
adc    $0xffffffffffffffff,%r8
adc    $0xffffffffffffffff,%r9
mov    %r8d,%eax
and    $0x1,%eax
mov    %eax,%esi
mov    %rsi,%rax
neg    %rax
mov    %rax,%rdi
xor    %r9,%rdi
xor    %r8,%rax
or     %rdi,%rax
or     %rsi,%rax
setne  %al
mov    %rdx,-0x40(%rbp)
mov    %rcx,-0x38(%rbp)
test   $0x1,%al
jne    1187 <t159_3add+0x77>
jmp    118e <t159_3add+0x7e>
mov    $0x0,%al
call   1030 <bar@plt>
mov    -0x40(%rbp),%rax
mov    -0x38(%rbp),%rcx
mov    %rcx,-0x8(%rbp)
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    -0x8(%rbp),%rdx
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<t159_3add>:
push   %r14
push   %rbx
push   %rax
xor    %eax,%eax
mov    %rdi,%r14
add    $0xfffffffffffffffd,%r14
mov    %rsi,%rbx
adc    $0xffffffffffffffff,%rbx
mov    $0x2,%ecx
cmp    %rdi,%rcx
sbb    %rsi,%rax
jl     1138 <t159_3add+0x28>
xor    %eax,%eax
call   1030 <bar@plt>
mov    %r14,%rax
mov    %rbx,%rdx
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define { i64, i64 } @t159_3add(i64 %0, i64 %1) {
%3 = alloca i128
%4 = alloca i128
%5 = alloca i128
%6 = alloca i128
%7 = bitcast i128* %4 to { i64, i64 }*
%8 = getelementptr inbounds { i64, i64 }, { i64, i64 }* %7, i32 0, i32 0
store i64 %0, i64* %8
%9 = getelementptr inbounds { i64, i64 }, { i64, i64 }* %7, i32 0, i32 1
store i64 %1, i64* %9
%10 = load i128, i128* %4
store i128 %10, i128* %5
%11 = load i128, i128* %5
%12 = sext i128 %11 to i129
%13 = call { i129, i1 } @llvm.sadd.with.overflow.i129(i129 -3, i129 %12)
%14 = extractvalue { i129, i1 } %13, 1
%15 = extractvalue { i129, i1 } %13, 0
%16 = trunc i129 %15 to i128
%17 = zext i128 %16 to i129
%18 = icmp ne i129 %15, %17
%19 = or i1 %14, %18
store i128 %16, i128* %6
br i1 %19, label %20, label %22
20: ; preds = %2
%21 = call i32 (...) @bar()
br label %22
22: ; preds = %20, %2
%23 = load i128, i128* %6
store i128 %23, i128* %3
%24 = bitcast i128* %3 to { i64, i64 }*
%25 = load { i64, i64 }, { i64, i64 }* %24
ret { i64, i64 } %25
}

LLVM IR (-O2):
define { i64, i64 } @t159_3add(i64 %0, i64 %1) {
%3 = zext i64 %1 to i128
%4 = shl nuw i128 %3, 64
%5 = zext i64 %0 to i128
%6 = or i128 %4, %5
%7 = zext i128 %6 to i129
%8 = add nsw i129 %7, -3
%9 = icmp slt i128 %6, 3
br i1 %9, label %10, label %12
10: ; preds = %2
%11 = tail call i32 (...) @bar()
br label %12
12: ; preds = %10, %2
%13 = trunc i129 %8 to i64
%14 = lshr i129 %8, 64
%15 = trunc i129 %14 to i64
%16 = insertvalue { i64, i64 } poison, i64 %13, 0
%17 = insertvalue { i64, i64 } %16, i64 %15, 1
ret { i64, i64 } %17
}
void DMA2_Stream0_IRQHandler() {}


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

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

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

LLVM IR (-O2):
define void @DMA2_Stream0_IRQHandler() {
ret void
}
void pendfunc2(int x) {
  asm("    .global "
      "set_point2"
      "\n"
      "set_point2"
      ":\n"
      "    call "
      "x86_trace_dummy"
      "\n");
}


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

x86 assembly (clang, -O2):
<pendfunc2>:
call   1030 <x86_trace_dummy@plt>
ret

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

LLVM IR (-O2):
define void @pendfunc2(i32 %0) {
tail call void asm sideeffect " .global set_point2\0Aset_point2:\0A call x86_trace_dummy\0A", "~{dirflag},~{fpsr},~{flags}"()
ret void
}
void uart0_putc(char c) {
  while (!((*((volatile unsigned long *)((0x01C28000 + 0x14)))) & (1 << 6))) {
  }
  (*((volatile unsigned long *)((0x01C28000 + 0x0))) = (unsigned long)(c));
}


x86 assembly (clang, -O0):
<uart0_putc>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    $0x1c28014,%eax
mov    (%rax),%rax
and    $0x40,%rax
cmp    $0x0,%rax
setne  %al
xor    $0xff,%al
test   $0x1,%al
jne    112c <uart0_putc+0x2c>
jmp    1131 <uart0_putc+0x31>
jmp    110a <uart0_putc+0xa>
movsbq -0x1(%rbp),%rcx
mov    $0x1c28000,%eax
mov    %rcx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<uart0_putc>:
testq  $0x40,0x1c28014
je     1100 <uart0_putc>
movsbq %dil,%rax
mov    %rax,0x1c28000
01
ret

LLVM IR (-O0):
define void @uart0_putc(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
br label %3
3: ; preds = %8, %1
%4 = load volatile i64, i64* inttoptr (i64 29523988 to i64*)
%5 = and i64 %4, 64
%6 = icmp ne i64 %5, 0
%7 = xor i1 %6, true
br i1 %7, label %8, label %9
8: ; preds = %3
br label %3
9: ; preds = %3
%10 = load i8, i8* %2
%11 = sext i8 %10 to i64
store volatile i64 %11, i64* inttoptr (i64 29523968 to i64*)
ret void
}

LLVM IR (-O2):
define void @uart0_putc(i8 signext %0) {
br label %2
2: ; preds = %2, %1
%3 = load volatile i64, i64* inttoptr (i64 29523988 to i64*)
%4 = and i64 %3, 64
%5 = icmp eq i64 %4, 0
br i1 %5, label %2, label %6
6: ; preds = %2
%7 = sext i8 %0 to i64
store volatile i64 %7, i64* inttoptr (i64 29523968 to i64*)
ret void
}
int main(void) {
  struct \U000000c0 {
    int \U000000c1;
  } x;
  struct \U000000c0 *y = &x;
  y->\U000000c1 = 1;
  if (x.\U000000c1 != 1)
    abort();
  goto \U000000ff;
\U000000ff:;
  enum e { \U000000c2 = 4 };
  if (\U000000c2 != 4)
    abort();
  exit(0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movl   $0x1,(%rax)
cmpl   $0x1,-0x8(%rbp)
je     1150 <main+0x30>
call   1030 <abort@plt>
jmp    1155 <main+0x35>
xor    %edi,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %edi,%edi
call   1030 <exit@plt>

LLVM IR (-O0):
%"struct.\C3\80" = type { i32 }
define i32 @main() {
%1 = alloca i32
%2 = alloca %"struct.\C3\80"
%3 = alloca %"struct.\C3\80"*
store i32 0, i32* %1
store %"struct.\C3\80"* %2, %"struct.\C3\80"** %3
%4 = load %"struct.\C3\80"*, %"struct.\C3\80"** %3
%5 = getelementptr inbounds %"struct.\C3\80", %"struct.\C3\80"* %4, i32 0, i32 0
store i32 1, i32* %5
%6 = getelementptr inbounds %"struct.\C3\80", %"struct.\C3\80"* %2, i32 0, i32 0
%7 = load i32, i32* %6
%8 = icmp ne i32 %7, 1
br i1 %8, label %9, label %10
9: ; preds = %0
unreachable
10: ; preds = %0
br label %11
11: ; preds = %10
unreachable
}

LLVM IR (-O2):
%"struct.\C3\80" = type { i32 }
define i32 @main() {
tail call void @exit(i32 0)
unreachable
}
int Cyc_BansheeIf_resolve(void *b) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @Cyc_BansheeIf_resolve(i8* nocapture readnone %0) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ stderr;
void printUsage(char *arg0) {
  fprintf(stderr,
          "wopn2hpp\n"
          "Usage: %s input.wopn [output.h]\n",
          arg0);
}


x86 assembly (clang, -O0):
<printUsage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ebd(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xed0(%rip),%rsi
call   1030 <fprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<printUsage>:
mov    %rdi,%rdx
mov    0x2ec6(%rip),%rax
mov    (%rax),%edi
lea    0xedd(%rip),%rsi
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [42 x i8] c"wopn2hpp\0AUsage: %s input.wopn [output.h]\0A\00"
define void @printUsage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = load i8*, i8** %2
%5 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str, i64 0, i64 0), i8* %4)
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [42 x i8] c"wopn2hpp\0AUsage: %s input.wopn [output.h]\0A\00"
define void @printUsage(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
empty() {}


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

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

LLVM IR (-O0):
define i32 @empty() {
%1 = alloca i32
%2 = load i32, i32* %1
ret i32 %2
}

LLVM IR (-O2):
define i32 @empty() {
ret i32 undef
}
void cpu_boost_shutdown(void) {}


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

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

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

LLVM IR (-O2):
define void @cpu_boost_shutdown() {
ret void
}
_wait(p) int *p;
{
  long l = _xwait();
  if (l == -1)
    return -1;
  if (p)
    *p = (l >> 16);
  return l & 0xffff;
}


x86 assembly (clang, -O0):
<_wait>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    $0x0,%al
call   1030 <_xwait@plt>
cltq
mov    %rax,-0x18(%rbp)
cmpq   $0xffffffffffffffff,-0x18(%rbp)
jne    1140 <_wait+0x30>
movl   $0xffffffff,-0x4(%rbp)
jmp    1168 <_wait+0x58>
cmpq   $0x0,-0x10(%rbp)
je     115b <_wait+0x4b>
mov    -0x18(%rbp),%rax
sar    $0x10,%rax
mov    %eax,%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x18(%rbp),%rax
and    $0xffff,%rax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_wait>:
push   %rbx
mov    %rdi,%rbx
xor    %eax,%eax
call   1030 <_xwait@plt>
cmp    $0xffffffff,%eax
je     1131 <_wait+0x21>
test   %rbx,%rbx
je     112c <_wait+0x1c>
mov    %eax,%ecx
sar    $0x10,%ecx
mov    %ecx,(%rbx)
movzwl %ax,%eax
pop    %rbx
ret
mov    $0xffffffff,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @_wait(i32* %0) {
%2 = alloca i32
%3 = alloca i32*
%4 = alloca i64
store i32* %0, i32** %3
%5 = call i32 (...) @_xwait()
%6 = sext i32 %5 to i64
store i64 %6, i64* %4
%7 = load i64, i64* %4
%8 = icmp eq i64 %7, -1
br i1 %8, label %9, label %10
9: ; preds = %1
store i32 -1, i32* %2
br label %22
10: ; preds = %1
%11 = load i32*, i32** %3
%12 = icmp ne i32* %11, null
br i1 %12, label %13, label %18
13: ; preds = %10
%14 = load i64, i64* %4
%15 = ashr i64 %14, 16
%16 = trunc i64 %15 to i32
%17 = load i32*, i32** %3
store i32 %16, i32* %17
br label %18
18: ; preds = %13, %10
%19 = load i64, i64* %4
%20 = and i64 %19, 65535
%21 = trunc i64 %20 to i32
store i32 %21, i32* %2
br label %22
22: ; preds = %18, %9
%23 = load i32, i32* %2
ret i32 %23
}

LLVM IR (-O2):
define i32 @_wait(i32* writeonly %0) {
%2 = tail call i32 (...) @_xwait()
%3 = icmp eq i32 %2, -1
br i1 %3, label %10, label %4
4: ; preds = %1
%5 = icmp eq i32* %0, null
br i1 %5, label %8, label %6
6: ; preds = %4
%7 = ashr i32 %2, 16
store i32 %7, i32* %0
br label %8
8: ; preds = %6, %4
%9 = and i32 %2, 65535
br label %10
10: ; preds = %1, %8
%11 = phi i32 [ %9, %8 ], [ -1, %1 ]
ret i32 %11
}
/* Variables and functions */
int /*<<< orphan*/ data(int);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int liczba;
  printf("Podaj liczbe :\n");
  scanf("%i", &liczba);
  data(liczba);
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xecb(%rip),%rdi
call   1030 <puts@plt>
lea    0xebc(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1050 <scanf@plt>
mov    0x4(%rsp),%edi
call   1040 <data@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str.1 = [3 x i8] c"%i\00"
@str = [15 x i8] c"Podaj liczbe :\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%5 = load i32, i32* %1
%6 = call i32 @data(i32 %5)
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ PKCS7;
typedef int /*<<< orphan*/ ASN1_VALUE;

/* Variables and functions */
int /*<<< orphan*/ ASN1_item_free(int /*<<< orphan*/ *, int /*<<< orphan*/ *);
int /*<<< orphan*/ PKCS7_it;
void PKCS7_free(PKCS7 *a) { ASN1_item_free((ASN1_VALUE *)a, &PKCS7_it); }


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

x86 assembly (clang, -O2):
<PKCS7_free>:
mov    0x2ec9(%rip),%rsi
jmp    1030 <ASN1_item_free@plt>

LLVM IR (-O0):
@PKCS7_it = global i32 0
define void @PKCS7_free(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = call i32 @ASN1_item_free(i32* %3, i32* @PKCS7_it)
ret void
}

LLVM IR (-O2):
@PKCS7_it = global i32 0
define void @PKCS7_free(i32* %0) {
%2 = tail call i32 @ASN1_item_free(i32* %0, i32* @PKCS7_it)
ret void
}