xunge/DecIR huggingface dataset:
int wr_hashfun_elf(const char *s) {
  unsigned long h, g;
  h = 0;
  while (*s) {
    h = (h << 4) + *s++;
    g = h & 0xf0000000;
    if (g)
      h ^= g >> 24;
    h &= ~g;
  }
  return h;
}


x86 assembly (clang, -O0):
<wr_hashfun_elf>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movq   $0x0,-0x10(%rbp)
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
je     1181 <wr_hashfun_elf+0x81>
mov    -0x10(%rbp),%rax
shl    $0x4,%rax
mov    -0x8(%rbp),%rcx
mov    %rcx,%rdx
add    $0x1,%rdx
mov    %rdx,-0x8(%rbp)
movsbq (%rcx),%rcx
add    %rcx,%rax
mov    %rax,-0x10(%rbp)
movabs $0xf0000000,%rax
and    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
je     116c <wr_hashfun_elf+0x6c>
mov    -0x18(%rbp),%rax
shr    $0x18,%rax
xor    -0x10(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x18(%rbp),%rax
xor    $0xffffffffffffffff,%rax
and    -0x10(%rbp),%rax
mov    %rax,-0x10(%rbp)
jmp    1110 <wr_hashfun_elf+0x10>
mov    -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<wr_hashfun_elf>:
mov    (%rdi),%cl
test   %cl,%cl
je     113e <wr_hashfun_elf+0x3e>
add    $0x1,%rdi
xor    %eax,%eax
nopl   0x0(%rax)
shl    $0x4,%rax
movsbq %cl,%rcx
add    %rax,%rcx
mov    %ecx,%eax
and    $0xf0000000,%eax
mov    %rax,%rdx
shr    $0x18,%rdx
xor    %rcx,%rdx
not    %rax
and    %rdx,%rax
movzbl (%rdi),%ecx
add    $0x1,%rdi
test   %cl,%cl
jne    1110 <wr_hashfun_elf+0x10>
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @wr_hashfun_elf(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %21, label %4
4: ; preds = %1, %4
%5 = phi i8 [ %17, %4 ], [ %2, %1 ]
%6 = phi i8* [ %9, %4 ], [ %0, %1 ]
%7 = phi i64 [ %16, %4 ], [ 0, %1 ]
%8 = shl i64 %7, 4
%9 = getelementptr inbounds i8, i8* %6, i64 1
%10 = sext i8 %5 to i64
%11 = add i64 %8, %10
%12 = and i64 %11, 4026531840
%13 = lshr exact i64 %12, 24
%14 = xor i64 %13, %11
%15 = xor i64 %12, -1
%16 = and i64 %14, %15
%17 = load i8, i8* %9
%18 = icmp eq i8 %17, 0
br i1 %18, label %19, label %4
19: ; preds = %4
%20 = trunc i64 %16 to i32
br label %21
21: ; preds = %19, %1
%22 = phi i32 [ 0, %1 ], [ %20, %19 ]
ret i32 %22
}
int f(int x1, int x2, int x3, int x4, int x5) { return x1 + x2 + x3 + x4 + x5; }


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    %r8d,-0x14(%rbp)
mov    -0x4(%rbp),%eax
add    -0x8(%rbp),%eax
add    -0xc(%rbp),%eax
add    -0x10(%rbp),%eax
add    -0x14(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<f>:
lea    (%rdi,%rsi,1),%eax
add    %edx,%eax
add    %ecx,%eax
add    %r8d,%eax
ret

LLVM IR (-O0):
define i32 @f(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4) {
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
store i32 %0, i32* %6
store i32 %1, i32* %7
store i32 %2, i32* %8
store i32 %3, i32* %9
store i32 %4, i32* %10
%11 = load i32, i32* %6
%12 = load i32, i32* %7
%13 = add nsw i32 %11, %12
%14 = load i32, i32* %8
%15 = add nsw i32 %13, %14
%16 = load i32, i32* %9
%17 = add nsw i32 %15, %16
%18 = load i32, i32* %10
%19 = add nsw i32 %17, %18
ret i32 %19
}

LLVM IR (-O2):
define i32 @f(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4) {
%6 = add nsw i32 %1, %0
%7 = add nsw i32 %6, %2
%8 = add nsw i32 %7, %3
%9 = add nsw i32 %8, %4
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void xfree(void *_ptr) {
  if (_ptr)
    free(_ptr);
}


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

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

LLVM IR (-O0):
define void @xfree(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 @xfree(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
}
int setupterm() { return (1); }


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

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

LLVM IR (-O0):
define i32 @setupterm() {
ret i32 1
}

LLVM IR (-O2):
define i32 @setupterm() {
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ ft_strlen(char const *);
int /*<<< orphan*/ write(int, char const *, int /*<<< orphan*/);
void ft_putstr(const char *s) { write(1, s, ft_strlen(s)); }


x86 assembly (clang, -O0):
<ft_putstr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <ft_strlen@plt>
mov    -0x10(%rbp),%rsi
mov    %eax,%edx
mov    $0x1,%edi
call   1030 <write@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_putstr>:
push   %rbx
mov    %rdi,%rbx
call   1040 <ft_strlen@plt>
mov    $0x1,%edi
mov    %rbx,%rsi
mov    %eax,%edx
pop    %rbx
jmp    1030 <write@plt>

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

LLVM IR (-O2):
define void @ft_putstr(i8* %0) {
%2 = tail call i32 @ft_strlen(i8* %0)
%3 = tail call i32 @write(i32 1, i8* %0, i32 %2)
ret void
}
/* Variables and functions */
double asin(double);
double ml_asin(double x) { return asin(x); }


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

x86 assembly (clang, -O2):
<ml_asin>:
jmp    1030 <asin@plt>

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

LLVM IR (-O2):
define double @ml_asin(double %0) {
%2 = tail call double @asin(double %0)
ret double %2
}
int test_imm_F0int64_highword_mem(long long *val) {
  return ((*val >> 32) & (0xF0 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_F0int64_highword_mem>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rdx
sar    $0x20,%rdx
and    $0xf0,%rdx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%rdx
cmovne %ecx,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @test_imm_F0int64_highword_mem(i64* %0) {
%2 = alloca i64*
store i64* %0, i64** %2
%3 = load i64*, i64** %2
%4 = load i64, i64* %3
%5 = ashr i64 %4, 32
%6 = and i64 %5, 240
%7 = icmp ne i64 %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_F0int64_highword_mem(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = and i64 %2, 1030792151040
%4 = icmp eq i64 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
int void_game(void) { return 1; }


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

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

LLVM IR (-O0):
define i32 @void_game() {
ret i32 1
}

LLVM IR (-O2):
define i32 @void_game() {
ret i32 1
}
void i2d_ECPrivateKey(void) {}


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

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

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

LLVM IR (-O2):
define void @i2d_ECPrivateKey() {
ret void
}
/* Variables and functions */
float tanf(float);
float futrts_tan32(float x) { return tanf(x); }


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

x86 assembly (clang, -O2):
<futrts_tan32>:
jmp    1030 <tanf@plt>

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

LLVM IR (-O2):
define float @futrts_tan32(float %0) {
%2 = tail call float @tanf(float %0)
ret float %2
}
/* Variables and functions */
int /*<<< orphan*/ stdin_mode(int /*<<< orphan*/);
void mode_restore_proc(void) { stdin_mode(0); }


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

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

LLVM IR (-O0):
define void @mode_restore_proc() {
%1 = call i32 @stdin_mode(i32 0)
ret void
}

LLVM IR (-O2):
define void @mode_restore_proc() {
%1 = tail call i32 @stdin_mode(i32 0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ BNCIO(int);
int BNCResetSine() {
  int ii, stat = 99;
  char com1, data;
  BNCIO(30);
  return (stat);
}


x86 assembly (clang, -O0):
<BNCResetSine>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x63,-0x8(%rbp)
mov    $0x1e,%edi
call   1030 <BNCIO@plt>
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<BNCResetSine>:
push   %rax
mov    $0x1e,%edi
call   1030 <BNCIO@plt>
mov    $0x63,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @BNCResetSine() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i8
%4 = alloca i8
store i32 99, i32* %2
%5 = call i32 @BNCIO(i32 30)
%6 = load i32, i32* %2
ret i32 %6
}

LLVM IR (-O2):
define i32 @BNCResetSine() {
%1 = tail call i32 @BNCIO(i32 30)
ret i32 99
}
/* Variables and functions */
int getchar();
int /*<<< orphan*/ putchar(char);
int main() {
  int c = getchar();
  if (c != 'A')
    putchar('X');
  else
    putchar('Y');
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1040 <getchar@plt>
mov    %eax,-0x8(%rbp)
cmpl   $0x41,-0x8(%rbp)
je     1152 <main+0x32>
mov    $0x58,%edi
call   1030 <putchar@plt>
jmp    115c <main+0x3c>
mov    $0x59,%edi
call   1030 <putchar@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1040 <getchar@plt>
xor    %edi,%edi
cmp    $0x41,%eax
sete   %dil
or     $0x58,%edi
call   1030 <putchar@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
%3 = call i32 (...) @getchar()
store i32 %3, i32* %2
%4 = load i32, i32* %2
%5 = icmp ne i32 %4, 65
br i1 %5, label %6, label %8
6: ; preds = %0
%7 = call i32 @putchar(i8 signext 88)
br label %10
8: ; preds = %0
%9 = call i32 @putchar(i8 signext 89)
br label %10
10: ; preds = %8, %6
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @getchar()
%2 = icmp eq i32 %1, 65
%3 = select i1 %2, i8 89, i8 88
%4 = tail call i32 @putchar(i8 signext %3)
ret i32 0
}
/* Type definitions */
typedef int int64_t;

/* Variables and functions */
int should_mark(int64_t mark_period, int64_t doc_offset, int64_t doc_end) {
  if (mark_period == 0)
    return 0;
  if (doc_offset == 0 || doc_offset == doc_end - 1) {
    return 1;
  } else if (doc_offset % mark_period == 0) {
    return 1;
  } else {
    return 0;
  }
}


x86 assembly (clang, -O0):
<should_mark>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
cmpl   $0x0,-0x8(%rbp)
jne    1123 <should_mark+0x23>
movl   $0x0,-0x4(%rbp)
jmp    116d <should_mark+0x6d>
cmpl   $0x0,-0xc(%rbp)
je     113e <should_mark+0x3e>
mov    -0xc(%rbp),%eax
mov    -0x10(%rbp),%ecx
sub    $0x1,%ecx
cmp    %ecx,%eax
jne    114a <should_mark+0x4a>
movl   $0x1,-0x4(%rbp)
jmp    116d <should_mark+0x6d>
mov    -0xc(%rbp),%eax
cltd
idivl  -0x8(%rbp)
cmp    $0x0,%edx
jne    1166 <should_mark+0x66>
movl   $0x1,-0x4(%rbp)
jmp    116d <should_mark+0x6d>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<should_mark>:
test   %edi,%edi
je     1121 <should_mark+0x21>
mov    $0x1,%eax
test   %esi,%esi
je     1120 <should_mark+0x20>
add    $0xffffffff,%edx
cmp    %esi,%edx
je     1120 <should_mark+0x20>
mov    %esi,%eax
cltd
idiv   %edi
xor    %eax,%eax
test   %edx,%edx
sete   %al
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @should_mark(i32 %0, i32 %1, i32 %2) {
%4 = icmp eq i32 %0, 0
br i1 %4, label %14, label %5
5: ; preds = %3
%6 = icmp eq i32 %1, 0
%7 = add nsw i32 %2, -1
%8 = icmp eq i32 %7, %1
%9 = select i1 %6, i1 true, i1 %8
br i1 %9, label %14, label %10
10: ; preds = %5
%11 = srem i32 %1, %0
%12 = icmp eq i32 %11, 0
%13 = zext i1 %12 to i32
br label %14
14: ; preds = %10, %5, %3
%15 = phi i32 [ 0, %3 ], [ 1, %5 ], [ %13, %10 ]
ret i32 %15
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  scalar_t__ above;
};
typedef TYPE_1__ XConfigureRequestEvent;

/* Variables and functions */
unsigned long get_XConfigureRequestEvent_above(void *_p) {
  return (unsigned long)((XConfigureRequestEvent *)_p)->above;
}


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

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

LLVM IR (-O0):
%struct.TYPE_2__ = type { i64 }
define i64 @get_XConfigureRequestEvent_above(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = bitcast i8* %3 to %struct.TYPE_2__*
%5 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %4, i32 0, i32 0
%6 = load i64, i64* %5
ret i64 %6
}

LLVM IR (-O2):
define i64 @get_XConfigureRequestEvent_above(i8* nocapture %0) {
%2 = bitcast i8* %0 to i64*
%3 = load i64, i64* %2
ret i64 %3
}
void do_nmi(void *x) {
  do {
    kprintf("Unsupport Now...[%s]\n", __FUNCTION__);
    while (1)
      ;
  } while (0);
  ;
}


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

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

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

LLVM IR (-O2):
@.str = [22 x i8] c"Unsupport Now...[%s]\0A\00"
@__FUNCTION__.do_nmi = [7 x i8] c"do_nmi\00"
define void @do_nmi(i8* nocapture readnone %0) {
%2 = tail call i32 (i8*, i8*, ...) bitcast (i32 (...)* @kprintf to i32 (i8*, i8*, ...)*)(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @__FUNCTION__.do_nmi, i64 0, i64 0))
br label %3
3: ; preds = %1, %3
br label %3
}
/* Variables and functions */
int /*<<< orphan*/ fread(unsigned short *, int, int, int /*<<< orphan*/);
int /*<<< orphan*/ stdin;
void read_raw_image_from_stdin(short unsigned int *img, int size) {
  int i;
  for (i = 0; i < size; i++) {
    fread(&img[i], sizeof(short unsigned int), 1, stdin);
  }
}


x86 assembly (clang, -O0):
<read_raw_image_from_stdin>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1167 <read_raw_image_from_stdin+0x57>
mov    -0x8(%rbp),%rdi
movslq -0x10(%rbp),%rax
shl    $0x1,%rax
add    %rax,%rdi
mov    0x2ea0(%rip),%rax
mov    (%rax),%ecx
mov    $0x2,%esi
mov    $0x1,%edx
call   1030 <fread@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1126 <read_raw_image_from_stdin+0x16>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<read_raw_image_from_stdin>:
push   %r15
push   %r14
push   %rbx
test   %esi,%esi
jle    114f <read_raw_image_from_stdin+0x3f>
mov    %rdi,%rbx
mov    %esi,%r14d
mov    0x2ec2(%rip),%r15
cs nopw 0x0(%rax,%rax,1)
mov    (%r15),%ecx
mov    %rbx,%rdi
mov    $0x2,%esi
mov    $0x1,%edx
call   1030 <fread@plt>
add    $0x2,%rbx
add    $0xffffffffffffffff,%r14
jne    1130 <read_raw_image_from_stdin+0x20>
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@stdin = global i32 0
define void @read_raw_image_from_stdin(i16* %0, i32 %1) {
%3 = alloca i16*
%4 = alloca i32
%5 = alloca i32
store i16* %0, i16** %3
store i32 %1, i32* %4
store i32 0, i32* %5
br label %6
6: ; preds = %17, %2
%7 = load i32, i32* %5
%8 = load i32, i32* %4
%9 = icmp slt i32 %7, %8
br i1 %9, label %10, label %20
10: ; preds = %6
%11 = load i16*, i16** %3
%12 = load i32, i32* %5
%13 = sext i32 %12 to i64
%14 = getelementptr inbounds i16, i16* %11, i64 %13
%15 = load i32, i32* @stdin
%16 = call i32 @fread(i16* %14, i32 2, i32 1, i32 %15)
br label %17
17: ; preds = %10
%18 = load i32, i32* %5
%19 = add nsw i32 %18, 1
store i32 %19, i32* %5
br label %6
20: ; preds = %6
ret void
}

LLVM IR (-O2):
@stdin = global i32 0
define void @read_raw_image_from_stdin(i16* %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %13
4: ; preds = %2
%5 = zext i32 %1 to i64
br label %6
6: ; preds = %4, %6
%7 = phi i64 [ 0, %4 ], [ %11, %6 ]
%8 = getelementptr inbounds i16, i16* %0, i64 %7
%9 = load i32, i32* @stdin
%10 = tail call i32 @fread(i16* %8, i32 2, i32 1, i32 %9)
%11 = add nuw nsw i64 %7, 1
%12 = icmp eq i64 %11, %5
br i1 %12, label %13, label %6
13: ; preds = %6, %2
ret void
}
int test_imm_97int64_midword_mem(long long *val) {
  return ((*val >> 16) & (0x97 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_97int64_midword_mem>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rdx
sar    $0x10,%rdx
and    $0x97,%rdx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%rdx
cmovne %ecx,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @test_imm_97int64_midword_mem(i64* %0) {
%2 = alloca i64*
store i64* %0, i64** %2
%3 = load i64*, i64** %2
%4 = load i64, i64* %3
%5 = ashr i64 %4, 16
%6 = and i64 %5, 151
%7 = icmp ne i64 %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_97int64_midword_mem(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = and i64 %2, 9895936
%4 = icmp eq i64 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Type definitions */
typedef int int64_t;

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


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

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

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

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


x86 assembly (clang, -O0):
<touch_memory>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    $0x0,%al
call   1030 <getpagesize@plt>
mov    %eax,-0x14(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1156 <touch_memory+0x46>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
movb   $0xef,(%rax,%rcx,1)
mov    -0x14(%rbp),%eax
add    -0x10(%rbp),%eax
mov    %eax,-0x10(%rbp)
jmp    1130 <touch_memory+0x20>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<touch_memory>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebp
mov    %rdi,%rbx
xor    %eax,%eax
call   1030 <getpagesize@plt>
test   %ebp,%ebp
jle    113c <touch_memory+0x2c>
cltq
mov    %ebp,%ecx
xor    %edx,%edx
nopl   0x0(%rax)
movb   $0xef,(%rbx,%rdx,1)
add    %rax,%rdx
cmp    %rcx,%rdx
jl     1130 <touch_memory+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
define void @touch_memory(i8* nocapture writeonly %0, i32 %1) {
%3 = tail call i32 (...) @getpagesize()
%4 = icmp sgt i32 %1, 0
br i1 %4, label %5, label %13
5: ; preds = %2
%6 = sext i32 %3 to i64
%7 = zext i32 %1 to i64
br label %8
8: ; preds = %5, %8
%9 = phi i64 [ 0, %5 ], [ %11, %8 ]
%10 = getelementptr inbounds i8, i8* %0, i64 %9
store i8 -17, i8* %10
%11 = add i64 %9, %6
%12 = icmp slt i64 %11, %7
br i1 %12, label %8, label %13
13: ; preds = %8, %2
ret void
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
int UINT32_C(int);
uint32_t midr_get_revision(uint32_t midr) {
  return (midr & UINT32_C(0x0000000F)) >> 0;
}


x86 assembly (clang, -O0):
<midr_get_revision>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    $0xf,%edi
call   1030 <UINT32_C@plt>
mov    %eax,%ecx
mov    -0x8(%rbp),%eax
and    %ecx,%eax
sar    $0x0,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<midr_get_revision>:
push   %rbx
mov    %edi,%ebx
mov    $0xf,%edi
call   1030 <UINT32_C@plt>
and    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @midr_get_revision(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @UINT32_C(i32 15)
%5 = and i32 %3, %4
%6 = ashr i32 %5, 0
ret i32 %6
}

LLVM IR (-O2):
define i32 @midr_get_revision(i32 %0) {
%2 = tail call i32 @UINT32_C(i32 15)
%3 = and i32 %2, %0
ret i32 %3
}
/* Variables and functions */
int inl(unsigned int);
unsigned INPORT32(unsigned idx) { return inl(idx); }


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

x86 assembly (clang, -O2):
<INPORT32>:
jmp    1030 <inl@plt>

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

LLVM IR (-O2):
define i32 @INPORT32(i32 %0) {
%2 = tail call i32 @inl(i32 %0)
ret i32 %2
}
void enterIeeeSysPatch(void) {}


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

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

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

LLVM IR (-O2):
define void @enterIeeeSysPatch() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ gpio_finished();
void radio_finished(void) {
  ;
  gpio_finished();
}


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

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

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

LLVM IR (-O2):
define void @radio_finished() {
%1 = tail call i32 (...) @gpio_finished()
ret void
}
/* Variables and functions */
scalar_t__ isascii(int);
scalar_t__ islower(int);
int Cislower(int c) { return isascii(c) && islower(c); }


x86 assembly (clang, -O0):
<Cislower>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1040 <isascii@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    $0x0,%rcx
mov    %al,-0x5(%rbp)
je     1157 <Cislower+0x37>
mov    -0x4(%rbp),%edi
call   1030 <islower@plt>
cmp    $0x0,%rax
setne  %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Cislower>:
push   %rbx
mov    %edi,%ebx
call   1040 <isascii@plt>
test   %rax,%rax
je     1141 <Cislower+0x21>
mov    %ebx,%edi
call   1030 <islower@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
setne  %al
pop    %rbx
ret
xor    %eax,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @Cislower(i32 %0) {
%2 = tail call i64 @isascii(i32 %0)
%3 = icmp eq i64 %2, 0
br i1 %3, label %8, label %4
4: ; preds = %1
%5 = tail call i64 @islower(i32 %0)
%6 = icmp ne i64 %5, 0
%7 = zext i1 %6 to i32
br label %8
8: ; preds = %4, %1
%9 = phi i32 [ 0, %1 ], [ %7, %4 ]
ret i32 %9
}
int isleap(int year) {
  return year % 4 == 0 && year % 100 != 0 || year % 400 == 0;
}


x86 assembly (clang, -O0):
<isleap>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    $0x4,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    1134 <isleap+0x34>
mov    -0x4(%rbp),%eax
mov    $0x64,%ecx
cltd
idiv   %ecx
mov    $0x1,%al
cmp    $0x0,%edx
mov    %al,-0x5(%rbp)
jne    1148 <isleap+0x48>
mov    -0x4(%rbp),%eax
mov    $0x190,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
sete   %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isleap>:
test   $0x3,%dil
jne    112c <isleap+0x2c>
movslq %edi,%rax
imul   $0x51eb851f,%rax,%rax
mov    %rax,%rcx
shr    $0x3f,%rcx
sar    $0x25,%rax
add    %ecx,%eax
imul   $0x64,%eax,%ecx
mov    %edi,%edx
mov    $0x1,%eax
sub    %ecx,%edx
je     112c <isleap+0x2c>
ret
imul   $0xc28f5c29,%edi,%ecx
add    $0x51eb850,%ecx
ror    $0x4,%ecx
xor    %eax,%eax
cmp    $0xa3d70b,%ecx
setb   %al
ret

LLVM IR (-O0):
define i32 @isleap(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = srem i32 %3, 4
%5 = icmp eq i32 %4, 0
br i1 %5, label %6, label %10
6: ; preds = %1
%7 = load i32, i32* %2
%8 = srem i32 %7, 100
%9 = icmp ne i32 %8, 0
br i1 %9, label %14, label %10
10: ; preds = %6, %1
%11 = load i32, i32* %2
%12 = srem i32 %11, 400
%13 = icmp eq i32 %12, 0
br label %14
14: ; preds = %10, %6
%15 = phi i1 [ true, %6 ], [ %13, %10 ]
%16 = zext i1 %15 to i32
ret i32 %16
}

LLVM IR (-O2):
define i32 @isleap(i32 %0) {
%2 = and i32 %0, 3
%3 = icmp ne i32 %2, 0
%4 = srem i32 %0, 100
%5 = icmp eq i32 %4, 0
%6 = or i1 %3, %5
br i1 %6, label %7, label %11
7: ; preds = %1
%8 = srem i32 %0, 400
%9 = icmp eq i32 %8, 0
%10 = zext i1 %9 to i32
br label %11
11: ; preds = %1, %7
%12 = phi i32 [ %10, %7 ], [ 1, %1 ]
ret i32 %12
}
int test_imm_A3int32_mem(int *val) {
  return ((*val) & (0xA3 << 0)) ? -20 : -40;
}


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

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

LLVM IR (-O0):
define i32 @test_imm_A3int32_mem(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = load i32, i32* %3
%5 = and i32 %4, 163
%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_A3int32_mem(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = and i32 %2, 163
%4 = icmp eq i32 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
int close(int);
int my_close(int fd) {
  do {
  } while (0);
  if (fd != 0x66)
    return close(fd);
  do {
  } while (0);
  return 0;
}


x86 assembly (clang, -O0):
<my_close>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
jmp    1120 <my_close+0x10>
cmpl   $0x66,-0x8(%rbp)
je     113a <my_close+0x2a>
mov    -0x8(%rbp),%edi
call   1030 <close@plt>
mov    %eax,-0x4(%rbp)
jmp    114b <my_close+0x3b>
jmp    113f <my_close+0x2f>
jmp    1144 <my_close+0x34>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<my_close>:
cmp    $0x66,%edi
jne    1118 <my_close+0x8>
xor    %eax,%eax
ret
jmp    1030 <close@plt>

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

LLVM IR (-O2):
define i32 @my_close(i32 %0) {
%2 = icmp eq i32 %0, 102
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = tail call i32 @close(i32 %0)
br label %5
5: ; preds = %1, %3
%6 = phi i32 [ %4, %3 ], [ 0, %1 ]
ret i32 %6
}
void PortableGettimeOfday(void) {}


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

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

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

LLVM IR (-O2):
define void @PortableGettimeOfday() {
ret void
}
void prefetch_for_write(const void *address) { __builtin_prefetch(address, 1); }


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

x86 assembly (clang, -O2):
<prefetch_for_write>:
prefetcht0 (%rdi)
ret

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

LLVM IR (-O2):
define void @prefetch_for_write(i8* nocapture %0) {
tail call void @llvm.prefetch.p0i8(i8* %0, i32 1, i32 3, i32 1)
ret void
}
int f() {
  if (!('0'))
    ;
}


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

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

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

LLVM IR (-O2):
define i32 @f() {
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void printUsage() { printf("usage: msn username@email.com -p password"); }


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

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

LLVM IR (-O0):
@.str = [42 x i8] c"usage: msn username@email.com -p password\00"
define void @printUsage() {
%1 = call i32 @printf(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [42 x i8] c"usage: msn username@email.com -p password\00"
define void @printUsage() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([42 x i8], [42 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
char *reverse(char *);
int /*<<< orphan*/ scanf(char *, char *);
int main(void) {
  char str[100], *rev;
  printf("Enter any string: ");
  scanf("%s", str);
  rev = reverse(str);
  printf("Reversed string is: %s", rev);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x80,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeb7(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    -0x70(%rbp),%rsi
lea    0xecc(%rip),%rdi
call   1050 <scanf@plt>
lea    -0x70(%rbp),%rdi
call   1030 <reverse@plt>
mov    %rax,-0x78(%rbp)
mov    -0x78(%rbp),%rsi
lea    0xe9b(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x80,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x70,%rsp
lea    0xec4(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xedd(%rip),%rdi
mov    %rsp,%rbx
mov    %rbx,%rsi
call   1050 <scanf@plt>
mov    %rbx,%rdi
call   1030 <reverse@plt>
lea    0xeaf(%rip),%rdi
mov    %rax,%rsi
xor    %eax,%eax
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x70,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [19 x i8] c"Enter any string: \00"
@.str.1 = [3 x i8] c"%s\00"
@.str.2 = [23 x i8] c"Reversed string is: %s\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [100 x i8]
%3 = alloca i8*
store i32 0, i32* %1
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
%5 = getelementptr inbounds [100 x i8], [100 x i8]* %2, i64 0, i64 0
%6 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %5)
%7 = getelementptr inbounds [100 x i8], [100 x i8]* %2, i64 0, i64 0
%8 = call i8* @reverse(i8* %7)
store i8* %8, i8** %3
%9 = load i8*, i8** %3
%10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.2, i64 0, i64 0), i8* %9)
ret i32 0
}

LLVM IR (-O2):
@.str = [19 x i8] c"Enter any string: \00"
@.str.1 = [3 x i8] c"%s\00"
@.str.2 = [23 x i8] c"Reversed string is: %s\00"
define i32 @main() {
%1 = alloca [100 x i8]
%2 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 0, i64 0
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 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), i8* %2)
%5 = call i8* @reverse(i8* %2)
%6 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @.str.2, i64 0, i64 0), i8* %5)
ret i32 0
}
int main(void) {
  _Complex double *p = 0;
  if (p[0])
    return 42;
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movq   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm1
movsd  0x8(%rax),%xmm0
xorps  %xmm2,%xmm2
ucomisd %xmm2,%xmm1
setne  %al
setp   %cl
or     %cl,%al
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
setne  %cl
setp   %dl
or     %dl,%cl
or     %cl,%al
test   $0x1,%al
jne    114d <main+0x4d>
jmp    1159 <main+0x59>
movl   $0x2a,-0x4(%rbp)
jmp    1160 <main+0x60>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca { double, double }*
store i32 0, i32* %1
store { double, double }* null, { double, double }** %2
%3 = load { double, double }*, { double, double }** %2
%4 = getelementptr inbounds { double, double }, { double, double }* %3, i64 0
%5 = getelementptr inbounds { double, double }, { double, double }* %4, i32 0, i32 0
%6 = load double, double* %5
%7 = getelementptr inbounds { double, double }, { double, double }* %4, i32 0, i32 1
%8 = load double, double* %7
%9 = fcmp une double %6, 0.000000e+00
%10 = fcmp une double %8, 0.000000e+00
%11 = or i1 %9, %10
br i1 %11, label %12, label %13
12: ; preds = %0
store i32 42, i32* %1
br label %14
13: ; preds = %0
store i32 0, i32* %1
br label %14
14: ; preds = %13, %12
%15 = load i32, i32* %1
ret i32 %15
}

LLVM IR (-O2):
define i32 @main() {
ret i32 42
}
int getBob() { return 2; }


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

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

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

LLVM IR (-O2):
define i32 @getBob() {
ret i32 2
}
/* Variables and functions */
int /*<<< orphan*/ tcp_illinois_unregister();
void module_unregister_fake(void) {
  if (0)
    tcp_illinois_unregister();
}


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

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

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

LLVM IR (-O2):
define void @module_unregister_fake() {
ret void
}
double min2(double a) {
  if (a < 1) {
    return a;
  } else {
    return 1;
  }
}


x86 assembly (clang, -O0):
<min2>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x10(%rbp)
movsd  0xeef(%rip),%xmm0
ucomisd -0x10(%rbp),%xmm0
jbe    112b <min2+0x2b>
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    1138 <min2+0x38>
movsd  0xecd(%rip),%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<min2>:
minsd  0xef8(%rip),%xmm0
ret

LLVM IR (-O0):
define double @min2(double %0) {
%2 = alloca double
%3 = alloca double
store double %0, double* %3
%4 = load double, double* %3
%5 = fcmp olt double %4, 1.000000e+00
br i1 %5, label %6, label %8
6: ; preds = %1
%7 = load double, double* %3
store double %7, double* %2
br label %9
8: ; preds = %1
store double 1.000000e+00, double* %2
br label %9
9: ; preds = %8, %6
%10 = load double, double* %2
ret double %10
}

LLVM IR (-O2):
define double @min2(double %0) {
%2 = fcmp olt double %0, 1.000000e+00
%3 = select i1 %2, double %0, double 1.000000e+00
ret double %3
}
/* Variables and functions */
int /*<<< orphan*/ write_break();
int /*<<< orphan*/ write_fmt(char *, int);
int /*<<< orphan*/ write_nl();
void html_heading1(int ref) {
  write_break();
  write_fmt("<A NAME=\"%d\"></A>", ref);
  write_nl();
}


x86 assembly (clang, -O0):
<html_heading1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x0,%al
call   1050 <write_break@plt>
mov    -0x4(%rbp),%esi
lea    0xeb4(%rip),%rdi
call   1040 <write_fmt@plt>
mov    $0x0,%al
call   1030 <write_nl@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<html_heading1>:
push   %rbx
mov    %edi,%ebx
xor    %eax,%eax
call   1050 <write_break@plt>
lea    0xebf(%rip),%rdi
mov    %ebx,%esi
call   1040 <write_fmt@plt>
xor    %eax,%eax
pop    %rbx
jmp    1030 <write_nl@plt>

LLVM IR (-O0):
@.str = [18 x i8] c"<A NAME=\22%d\22></A>\00"
define void @html_heading1(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 (...) @write_break()
%4 = load i32, i32* %2
%5 = call i32 @write_fmt(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i32 %4)
%6 = call i32 (...) @write_nl()
ret void
}

LLVM IR (-O2):
@.str = [18 x i8] c"<A NAME=\22%d\22></A>\00"
define void @html_heading1(i32 %0) {
%2 = tail call i32 (...) @write_break()
%3 = tail call i32 @write_fmt(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i32 %0)
%4 = tail call i32 (...) @write_nl()
ret void
}
/* Variables and functions */
double floor(double);
double principal_value(double theta) {
  theta -= 2.0 * 3.14159265358979323846 *
           floor(theta / (2.0 * 3.14159265358979323846));
  return (theta);
}


x86 assembly (clang, -O0):
<principal_value>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  0xede(%rip),%xmm1
divsd  %xmm1,%xmm0
call   1030 <floor@plt>
movsd  -0x8(%rbp),%xmm1
movsd  0xec0(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<principal_value>:
push   %rax
movsd  %xmm0,(%rsp)
divsd  0xee2(%rip),%xmm0
call   1030 <floor@plt>
mulsd  0xedd(%rip),%xmm0
addsd  (%rsp),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @principal_value(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fdiv double %3, 0x401921FB54442D18
%5 = call double @llvm.floor.f64(double %4)
%6 = load double, double* %2
%7 = call double @llvm.fmuladd.f64(double 0xC01921FB54442D18, double %5, double %6)
store double %7, double* %2
%8 = load double, double* %2
ret double %8
}

LLVM IR (-O2):
define double @principal_value(double %0) {
%2 = fdiv double %0, 0x401921FB54442D18
%3 = tail call double @llvm.floor.f64(double %2)
%4 = tail call double @llvm.fmuladd.f64(double %3, double 0xC01921FB54442D18, double %0)
ret double %4
}
/* Variables and functions */
float fastsin(float);
float fastsinfull(float x) {
  static const float twopi = 6.2831853071795865f;
  static const float invtwopi = 0.15915494309189534f;
  int k = x * invtwopi;
  float half = (x < 0) ? -0.5f : 0.5f;
  return fastsin((half + k) * twopi - x);
}


x86 assembly (clang, -O0):
<fastsinfull>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  0xee7(%rip),%xmm0
mulss  -0x4(%rbp),%xmm0
cvttss2si %xmm0,%eax
mov    %eax,-0x8(%rbp)
movss  -0x4(%rbp),%xmm0
movss  0xec6(%rip),%xmm3
movss  0xec2(%rip),%xmm2
xorps  %xmm1,%xmm1
cmpltss %xmm1,%xmm0
movaps %xmm0,%xmm1
andps  %xmm3,%xmm1
andnps %xmm2,%xmm0
orps   %xmm1,%xmm0
movss  %xmm0,-0xc(%rbp)
movss  -0xc(%rbp),%xmm0
cvtsi2ssl -0x8(%rbp),%xmm1
addss  %xmm1,%xmm0
movss  -0x4(%rbp),%xmm1
movd   %xmm1,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm1
movss  0xe79(%rip),%xmm2
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
call   1030 <fastsin@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fastsinfull>:
xorps  %xmm1,%xmm1
xor    %eax,%eax
ucomiss %xmm0,%xmm1
seta   %al
movss  0xedd(%rip),%xmm1
mulss  %xmm0,%xmm1
cvttps2dq %xmm1,%xmm1
cvtdq2ps %xmm1,%xmm1
lea    0xed3(%rip),%rcx
addss  (%rcx,%rax,4),%xmm1
mulss  0xec2(%rip),%xmm1
subss  %xmm0,%xmm1
movaps %xmm1,%xmm0
jmp    1030 <fastsin@plt>

LLVM IR (-O0):
@fastsinfull.twopi = internal constant float 0x401921FB60000000
@fastsinfull.invtwopi = internal constant float 0x3FC45F3060000000
define float @fastsinfull(float %0) {
%2 = alloca float
%3 = alloca i32
%4 = alloca float
store float %0, float* %2
%5 = load float, float* %2
%6 = fmul float %5, 0x3FC45F3060000000
%7 = fptosi float %6 to i32
store i32 %7, i32* %3
%8 = load float, float* %2
%9 = fcmp olt float %8, 0.000000e+00
%10 = zext i1 %9 to i64
%11 = select i1 %9, float -5.000000e-01, float 5.000000e-01
store float %11, float* %4
%12 = load float, float* %4
%13 = load i32, i32* %3
%14 = sitofp i32 %13 to float
%15 = fadd float %12, %14
%16 = load float, float* %2
%17 = fneg float %16
%18 = call float @llvm.fmuladd.f32(float %15, float 0x401921FB60000000, float %17)
%19 = call float @fastsin(float %18)
ret float %19
}

LLVM IR (-O2):
define float @fastsinfull(float %0) {
%2 = fmul float %0, 0x3FC45F3060000000
%3 = fptosi float %2 to i32
%4 = fcmp olt float %0, 0.000000e+00
%5 = select i1 %4, float -5.000000e-01, float 5.000000e-01
%6 = sitofp i32 %3 to float
%7 = fadd float %5, %6
%8 = fneg float %0
%9 = tail call float @llvm.fmuladd.f32(float %7, float 0x401921FB60000000, float %8)
%10 = tail call float @fastsin(float %9)
ret float %10
}