xunge/DecIR huggingface dataset:
/* Type definitions */
struct sockaddr_in6 {
  int /*<<< orphan*/ sin6_family;
};

/* Variables and functions */
int /*<<< orphan*/ PF_INET6;
int main() {
  struct sockaddr_in6 sa;
  sa.sin6_family = PF_INET6;
  (void)sa;
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
mov    0x2ed6(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x8(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.sockaddr_in6 = type { i32 }
@PF_INET6 = global i32 0
define i32 @main() {
%1 = alloca i32
%2 = alloca %struct.sockaddr_in6
store i32 0, i32* %1
%3 = load i32, i32* @PF_INET6
%4 = getelementptr inbounds %struct.sockaddr_in6, %struct.sockaddr_in6* %2, i32 0, i32 0
store i32 %3, i32* %4
ret i32 0
}

LLVM IR (-O2):
@PF_INET6 = global i32 0
define i32 @main() {
ret i32 0
}
const char *scamper_do_sniff_usage(void) {
  return "sniff [-c limit-pktc] [-G limit-time] [-S ipaddr] [-U userid] "
         "<expression>\n";
}


x86 assembly (clang, -O0):
<scamper_do_sniff_usage>:
push   %rbp
mov    %rsp,%rbp
lea    0xef5(%rip),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<scamper_do_sniff_usage>:
lea    0xef9(%rip),%rax
ret

LLVM IR (-O0):
@.str = [76 x i8] c"sniff [-c limit-pktc] [-G limit-time] [-S ipaddr] [-U userid] <expression>\0A\00"
define i8* @scamper_do_sniff_usage() {
ret i8* getelementptr inbounds ([76 x i8], [76 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [76 x i8] c"sniff [-c limit-pktc] [-G limit-time] [-S ipaddr] [-U userid] <expression>\0A\00"
define i8* @scamper_do_sniff_usage() {
ret i8* getelementptr inbounds ([76 x i8], [76 x i8]* @.str, i64 0, i64 0)
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void main(void) {
  printf("This is a quick test \n\n \"quotes\" with \\r \n\n");
  return;
}


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

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

LLVM IR (-O0):
@.str = [44 x i8] c"This is a quick test \0A\0A \22quotes\22 with \\r \0A\0A\00"
define void @main() {
%1 = call i32 @printf(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [43 x i8] c"This is a quick test \0A\0A \22quotes\22 with \\r \0A\00"
define void @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([43 x i8], [43 x i8]* @str, i64 0, i64 0))
ret void
}
int ISNANf(float x) { return x != x; }


x86 assembly (clang, -O0):
<ISNANf>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
ucomiss -0x4(%rbp),%xmm0
setne  %al
setp   %cl
or     %cl,%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ISNANf>:
xor    %eax,%eax
ucomiss %xmm0,%xmm0
setp   %al
ret

LLVM IR (-O0):
define i32 @ISNANf(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = load float, float* %2
%5 = fcmp une float %3, %4
%6 = zext i1 %5 to i32
ret i32 %6
}

LLVM IR (-O2):
define i32 @ISNANf(float %0) {
%2 = fcmp uno float %0, 0.000000e+00
%3 = zext i1 %2 to i32
ret i32 %3
}
long long power(long long a, long long b) {
  long long i = 1;
  while (b--)
    i = a * i;
  return i;
}


x86 assembly (clang, -O0):
<power>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movq   $0x1,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0xffffffffffffffff,%rcx
mov    %rcx,-0x10(%rbp)
cmp    $0x0,%rax
je     113f <power+0x3f>
mov    -0x8(%rbp),%rax
imul   -0x18(%rbp),%rax
mov    %rax,-0x18(%rbp)
jmp    1114 <power+0x14>
mov    -0x18(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<power>:
test   %rsi,%rsi
je     111b <power+0x1b>
lea    -0x1(%rsi),%rax
mov    %esi,%ecx
and    $0x7,%ecx
cmp    $0x7,%rax
jae    1121 <power+0x21>
mov    $0x1,%eax
jmp    1156 <power+0x56>
mov    $0x1,%eax
ret
and    $0xfffffffffffffff8,%rsi
mov    $0x1,%eax
nopw   0x0(%rax,%rax,1)
imul   %rdi,%rax
imul   %rdi,%rax
imul   %rdi,%rax
imul   %rdi,%rax
imul   %rdi,%rax
imul   %rdi,%rax
imul   %rdi,%rax
imul   %rdi,%rax
add    $0xfffffffffffffff8,%rsi
jne    1130 <power+0x30>
test   %rcx,%rcx
je     116a <power+0x6a>
nopl   0x0(%rax,%rax,1)
imul   %rdi,%rax
add    $0xffffffffffffffff,%rcx
jne    1160 <power+0x60>
ret

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

LLVM IR (-O2):
define i64 @power(i64 %0, i64 %1) {
%3 = icmp eq i64 %1, 0
br i1 %3, label %33, label %4
4: ; preds = %2
%5 = add i64 %1, -1
%6 = and i64 %1, 7
%7 = icmp ult i64 %5, 7
br i1 %7, label %23, label %8
8: ; preds = %4
%9 = and i64 %1, -8
br label %10
10: ; preds = %10, %8
%11 = phi i64 [ 1, %8 ], [ %20, %10 ]
%12 = phi i64 [ 0, %8 ], [ %21, %10 ]
%13 = mul nsw i64 %11, %0
%14 = mul nsw i64 %13, %0
%15 = mul nsw i64 %14, %0
%16 = mul nsw i64 %15, %0
%17 = mul nsw i64 %16, %0
%18 = mul nsw i64 %17, %0
%19 = mul nsw i64 %18, %0
%20 = mul nsw i64 %19, %0
%21 = add i64 %12, 8
%22 = icmp eq i64 %21, %9
br i1 %22, label %23, label %10
23: ; preds = %10, %4
%24 = phi i64 [ undef, %4 ], [ %20, %10 ]
%25 = phi i64 [ 1, %4 ], [ %20, %10 ]
%26 = icmp eq i64 %6, 0
br i1 %26, label %33, label %27
27: ; preds = %23, %27
%28 = phi i64 [ %30, %27 ], [ %25, %23 ]
%29 = phi i64 [ %31, %27 ], [ 0, %23 ]
%30 = mul nsw i64 %28, %0
%31 = add i64 %29, 1
%32 = icmp eq i64 %31, %6
br i1 %32, label %33, label %27
33: ; preds = %23, %27, %2
%34 = phi i64 [ 1, %2 ], [ %24, %23 ], [ %30, %27 ]
ret i64 %34
}
void Injector4ISR() {}


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

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

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

LLVM IR (-O2):
define void @Injector4ISR() {
ret void
}
int st_numhash(char *x, int size) { return ((unsigned long)(x) % (size)); }


x86 assembly (clang, -O0):
<st_numhash>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
xor    %edx,%edx
div    %rcx
mov    %edx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<st_numhash>:
mov    %rdi,%rax
movslq %esi,%rcx
mov    %rdi,%rdx
or     %rcx,%rdx
shr    $0x20,%rdx
je     111b <st_numhash+0x1b>
xor    %edx,%edx
div    %rcx
mov    %rdx,%rax
ret
xor    %edx,%edx
div    %esi
mov    %edx,%eax
ret

LLVM IR (-O0):
define i32 @st_numhash(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i8*, i8** %3
%6 = ptrtoint i8* %5 to i64
%7 = load i32, i32* %4
%8 = sext i32 %7 to i64
%9 = urem i64 %6, %8
%10 = trunc i64 %9 to i32
ret i32 %10
}

LLVM IR (-O2):
define i32 @st_numhash(i8* %0, i32 %1) {
%3 = ptrtoint i8* %0 to i64
%4 = sext i32 %1 to i64
%5 = urem i64 %3, %4
%6 = trunc i64 %5 to i32
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ put32(unsigned long);
int /*<<< orphan*/ put8(unsigned long);
void and_reg32_m32(unsigned long reg32, void *_m32) {
  unsigned long *m32 = (unsigned long *)_m32;
  put8(0x23);
  put8((reg32 << 3) | 5);
  put32((unsigned long)(m32));
}


x86 assembly (clang, -O0):
<and_reg32_m32>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    $0x23,%edi
call   1030 <put8@plt>
mov    -0x8(%rbp),%rdi
shl    $0x3,%rdi
or     $0x5,%rdi
call   1030 <put8@plt>
mov    -0x18(%rbp),%rdi
call   1040 <put32@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<and_reg32_m32>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
mov    $0x23,%edi
call   1030 <put8@plt>
lea    0x5(,%rbx,8),%rdi
call   1030 <put8@plt>
mov    %r14,%rdi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <put32@plt>

LLVM IR (-O0):
define void @and_reg32_m32(i64 %0, i8* %1) {
%3 = alloca i64
%4 = alloca i8*
%5 = alloca i64*
store i64 %0, i64* %3
store i8* %1, i8** %4
%6 = load i8*, i8** %4
%7 = bitcast i8* %6 to i64*
store i64* %7, i64** %5
%8 = call i32 @put8(i64 35)
%9 = load i64, i64* %3
%10 = shl i64 %9, 3
%11 = or i64 %10, 5
%12 = call i32 @put8(i64 %11)
%13 = load i64*, i64** %5
%14 = ptrtoint i64* %13 to i64
%15 = call i32 @put32(i64 %14)
ret void
}

LLVM IR (-O2):
define void @and_reg32_m32(i64 %0, i8* %1) {
%3 = tail call i32 @put8(i64 35)
%4 = shl i64 %0, 3
%5 = or i64 %4, 5
%6 = tail call i32 @put8(i64 %5)
%7 = ptrtoint i8* %1 to i64
%8 = tail call i32 @put32(i64 %7)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ JobInterrupt(int /*<<< orphan*/, int);
void JobPassSig_term(int signo) { JobInterrupt(0, signo); }


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

x86 assembly (clang, -O2):
<JobPassSig_term>:
mov    %edi,%esi
xor    %edi,%edi
jmp    1030 <JobInterrupt@plt>

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

LLVM IR (-O2):
define void @JobPassSig_term(i32 %0) {
%2 = tail call i32 @JobInterrupt(i32 0, i32 %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ smbhash(unsigned char *, unsigned char *, unsigned char *);
void E_P16(unsigned char *p14, unsigned char *p16) {
  unsigned char sp8[8] = {0x4b, 0x47, 0x53, 0x21, 0x40, 0x23, 0x24, 0x25};
  smbhash(p16, sp8, p14);
  smbhash(p16 + 8, sp8, p14 + 7);
}


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

x86 assembly (clang, -O2):
<E_P16>:
push   %r15
push   %r14
push   %rbx
sub    $0x10,%rsp
mov    %rsi,%rbx
mov    %rdi,%r14
movabs $0x252423402153474b,%rax
23 24 25
mov    %rax,0x8(%rsp)
lea    0x8(%rsp),%r15
mov    %rsi,%rdi
mov    %r15,%rsi
mov    %r14,%rdx
call   1030 <smbhash@plt>
add    $0x8,%rbx
add    $0x7,%r14
mov    %rbx,%rdi
mov    %r15,%rsi
mov    %r14,%rdx
call   1030 <smbhash@plt>
add    $0x10,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@__const.E_P16.sp8 = [8 x i8] c"KGS!@#$%"
define void @E_P16(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca [8 x i8]
store i8* %0, i8** %3
store i8* %1, i8** %4
%6 = bitcast [8 x i8]* %5 to i8*
%7 = load i8*, i8** %4
%8 = getelementptr inbounds [8 x i8], [8 x i8]* %5, i64 0, i64 0
%9 = load i8*, i8** %3
%10 = call i32 @smbhash(i8* %7, i8* %8, i8* %9)
%11 = load i8*, i8** %4
%12 = getelementptr inbounds i8, i8* %11, i64 8
%13 = getelementptr inbounds [8 x i8], [8 x i8]* %5, i64 0, i64 0
%14 = load i8*, i8** %3
%15 = getelementptr inbounds i8, i8* %14, i64 7
%16 = call i32 @smbhash(i8* %12, i8* %13, i8* %15)
ret void
}

LLVM IR (-O2):
define void @E_P16(i8* %0, i8* %1) {
%3 = alloca i64
%4 = bitcast i64* %3 to i8*
store i64 2676302836908902219, i64* %3
%5 = call i32 @smbhash(i8* %1, i8* %4, i8* %0)
%6 = getelementptr inbounds i8, i8* %1, i64 8
%7 = getelementptr inbounds i8, i8* %0, i64 7
%8 = call i32 @smbhash(i8* %6, i8* %4, i8* %7)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ a();
int /*<<< orphan*/ r();
void warn_goto2(void) {
  a();
  goto label;
  r();
label:
  a();
  r();
}


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

x86 assembly (clang, -O2):
<warn_goto2>:
push   %rax
xor    %eax,%eax
call   1040 <a@plt>
xor    %eax,%eax
call   1040 <a@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <r@plt>

LLVM IR (-O0):
define void @warn_goto2() {
%1 = call i32 (...) @a()
br label %2
2: ; preds = %0
%3 = call i32 (...) @a()
%4 = call i32 (...) @r()
ret void
}

LLVM IR (-O2):
define void @warn_goto2() {
%1 = tail call i32 (...) @a()
%2 = tail call i32 (...) @a()
%3 = tail call i32 (...) @r()
ret void
}
unsigned xrop3_171_0_1(unsigned char s, unsigned char t) {
  unsigned D = 0x00ff;
  unsigned S = ((unsigned)s << 8) | s;
  unsigned T = ((unsigned)t << 8) | t;
  unsigned stk1;
  unsigned stk2;
  stk2 = T | S;
  stk2 = ~stk2;
  stk1 = D | stk2;
  return (stk1 & S) | (stk1 & (~T)) | (T & (~S) & D);
}


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

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

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

LLVM IR (-O2):
define i32 @xrop3_171_0_1(i8 zeroext %0, i8 zeroext %1) {
%3 = zext i8 %0 to i32
%4 = shl nuw nsw i32 %3, 8
%5 = zext i8 %1 to i32
%6 = shl nuw nsw i32 %5, 8
%7 = or i32 %4, %5
%8 = or i32 %7, %6
%9 = xor i32 %8, -1
%10 = or i8 %1, %0
%11 = zext i8 %10 to i32
%12 = or i32 %11, %9
ret i32 %12
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
void TimerControlStall(uint32_t ui32Base, uint32_t ui32Timer, bool bStall) {
  ;

  ;
  ui32Timer &= 0x00000002 | 0x00000200;
  (*((volatile uint32_t *)(ui32Base + 0x0000000C))) =
      (bStall ? ((*((volatile uint32_t *)(ui32Base + 0x0000000C))) | ui32Timer)
              : ((*((volatile uint32_t *)(ui32Base + 0x0000000C))) &
                 ~(ui32Timer)));
}


x86 assembly (clang, -O0):
<TimerControlStall>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x8(%rbp),%eax
and    $0x202,%eax
mov    %eax,-0x8(%rbp)
cmpl   $0x0,-0xc(%rbp)
je     1137 <TimerControlStall+0x37>
mov    -0x4(%rbp),%eax
add    $0xc,%eax
cltq
mov    (%rax),%eax
or     -0x8(%rbp),%eax
mov    %eax,-0x10(%rbp)
jmp    114c <TimerControlStall+0x4c>
mov    -0x4(%rbp),%eax
add    $0xc,%eax
cltq
mov    (%rax),%eax
mov    -0x8(%rbp),%ecx
xor    $0xffffffff,%ecx
and    %ecx,%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%ecx
mov    -0x4(%rbp),%eax
add    $0xc,%eax
cltq
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<TimerControlStall>:
and    $0x202,%esi
movslq %edi,%rax
mov    0xc(%rax),%ecx
mov    %esi,%edi
not    %edi
and    %ecx,%edi
or     %ecx,%esi
test   %edx,%edx
cmove  %edi,%esi
mov    %esi,0xc(%rax)
ret

LLVM IR (-O0):
define void @TimerControlStall(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load i32, i32* %5
%8 = and i32 %7, 514
store i32 %8, i32* %5
%9 = load i32, i32* %6
%10 = icmp ne i32 %9, 0
br i1 %10, label %11, label %19
11: ; preds = %3
%12 = load i32, i32* %4
%13 = add nsw i32 %12, 12
%14 = sext i32 %13 to i64
%15 = inttoptr i64 %14 to i32*
%16 = load volatile i32, i32* %15
%17 = load i32, i32* %5
%18 = or i32 %16, %17
br label %28
19: ; preds = %3
%20 = load i32, i32* %4
%21 = add nsw i32 %20, 12
%22 = sext i32 %21 to i64
%23 = inttoptr i64 %22 to i32*
%24 = load volatile i32, i32* %23
%25 = load i32, i32* %5
%26 = xor i32 %25, -1
%27 = and i32 %24, %26
br label %28
28: ; preds = %19, %11
%29 = phi i32 [ %18, %11 ], [ %27, %19 ]
%30 = load i32, i32* %4
%31 = add nsw i32 %30, 12
%32 = sext i32 %31 to i64
%33 = inttoptr i64 %32 to i32*
store volatile i32 %29, i32* %33
ret void
}

LLVM IR (-O2):
define void @TimerControlStall(i32 %0, i32 %1, i32 %2) {
%4 = and i32 %1, 514
%5 = icmp eq i32 %2, 0
%6 = add nsw i32 %0, 12
%7 = sext i32 %6 to i64
%8 = inttoptr i64 %7 to i32*
%9 = load volatile i32, i32* %8
%10 = xor i32 %4, -1
%11 = and i32 %9, %10
%12 = or i32 %9, %4
%13 = select i1 %5, i32 %11, i32 %12
store volatile i32 %13, i32* %8
ret void
}
/* Variables and functions */
char *strdup(char const *);
char *xstrdup(const char *p) { return strdup(p); }


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

x86 assembly (clang, -O2):
<xstrdup>:
jmp    1030 <strdup@plt>

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

LLVM IR (-O2):
define noalias i8* @xstrdup(i8* nocapture %0) {
%2 = tail call i8* @strdup(i8* %0)
ret i8* %2
}
long func_negative_enum(short a, unsigned short b, int c, unsigned d, long e,
                        unsigned long f) {
  return -1;
}


x86 assembly (clang, -O0):
<func_negative_enum>:
push   %rbp
mov    %rsp,%rbp
mov    %si,%ax
mov    %di,%si
mov    %si,-0x2(%rbp)
mov    %ax,-0x4(%rbp)
mov    %edx,-0x8(%rbp)
mov    %ecx,-0xc(%rbp)
mov    %r8,-0x18(%rbp)
mov    %r9,-0x20(%rbp)
mov    $0xffffffffffffffff,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<func_negative_enum>:
mov    $0xffffffffffffffff,%rax
ret

LLVM IR (-O0):
define i64 @func_negative_enum(i16 signext %0, i16 zeroext %1, i32 %2, i32 %3, i64 %4, i64 %5) {
%7 = alloca i16
%8 = alloca i16
%9 = alloca i32
%10 = alloca i32
%11 = alloca i64
%12 = alloca i64
store i16 %0, i16* %7
store i16 %1, i16* %8
store i32 %2, i32* %9
store i32 %3, i32* %10
store i64 %4, i64* %11
store i64 %5, i64* %12
ret i64 -1
}

LLVM IR (-O2):
define i64 @func_negative_enum(i16 signext %0, i16 zeroext %1, i32 %2, i32 %3, i64 %4, i64 %5) {
ret i64 -1
}
/* Variables and functions */
long compile(long);
int /*<<< orphan*/ compiler_init();
long parse();
int /*<<< orphan*/ print(long);
int /*<<< orphan*/ require64BitLongs();
int /*<<< orphan*/ runtime_init();
int main(void) {
  long hi;
  long fi;
  require64BitLongs();
  runtime_init();
  compiler_init();
  hi = parse();
  fi = compile(hi);
  print(fi);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1050 <require64BitLongs@plt>
mov    $0x0,%al
call   1070 <runtime_init@plt>
mov    $0x0,%al
call   1060 <compiler_init@plt>
mov    $0x0,%al
call   1080 <parse@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <compile@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
call   1040 <print@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1050 <require64BitLongs@plt>
xor    %eax,%eax
call   1070 <runtime_init@plt>
xor    %eax,%eax
call   1060 <compiler_init@plt>
xor    %eax,%eax
call   1080 <parse@plt>
mov    %rax,%rdi
call   1030 <compile@plt>
mov    %rax,%rdi
call   1040 <print@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i64
%3 = alloca i64
store i32 0, i32* %1
%4 = call i32 (...) @require64BitLongs()
%5 = call i32 (...) @runtime_init()
%6 = call i32 (...) @compiler_init()
%7 = call i64 (...) @parse()
store i64 %7, i64* %2
%8 = load i64, i64* %2
%9 = call i64 @compile(i64 %8)
store i64 %9, i64* %3
%10 = load i64, i64* %3
%11 = call i32 @print(i64 %10)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @require64BitLongs()
%2 = tail call i32 (...) @runtime_init()
%3 = tail call i32 (...) @compiler_init()
%4 = tail call i64 (...) @parse()
%5 = tail call i64 @compile(i64 %4)
%6 = tail call i32 @print(i64 %5)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ glColor3d(double, double, double);
void Color3d(double r, double g, double b) { glColor3d(r, g, b); }


x86 assembly (clang, -O0):
<Color3d>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
movsd  -0x18(%rbp),%xmm2
call   1030 <glColor3d@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Color3d>:
jmp    1030 <glColor3d@plt>

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

LLVM IR (-O2):
define void @Color3d(double %0, double %1, double %2) {
%4 = tail call i32 @glColor3d(double %0, double %1, double %2)
ret void
}
int keycmp(key1, key2, t1, t2) {
  if (key1 < t1)
    return -1;
  else if (key1 > t1)
    return 1;
  else if (key2 == -1)
    return 0;
  else if (key2 < t2)
    return -1;
  else if (key2 > t2)
    return 1;
  else
    return 0;
}


x86 assembly (clang, -O0):
<keycmp>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0x10(%rbp),%eax
jge    1128 <keycmp+0x28>
movl   $0xffffffff,-0x4(%rbp)
jmp    118d <keycmp+0x8d>
mov    -0x8(%rbp),%eax
cmp    -0x10(%rbp),%eax
jle    1140 <keycmp+0x40>
movl   $0x1,-0x4(%rbp)
jmp    118d <keycmp+0x8d>
cmpl   $0xffffffff,-0xc(%rbp)
jne    1156 <keycmp+0x56>
movl   $0x0,-0x4(%rbp)
jmp    118d <keycmp+0x8d>
mov    -0xc(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    116e <keycmp+0x6e>
movl   $0xffffffff,-0x4(%rbp)
jmp    118d <keycmp+0x8d>
mov    -0xc(%rbp),%eax
cmp    -0x14(%rbp),%eax
jle    1186 <keycmp+0x86>
movl   $0x1,-0x4(%rbp)
jmp    118d <keycmp+0x8d>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<keycmp>:
mov    $0xffffffff,%eax
cmp    %edx,%edi
jl     1124 <keycmp+0x24>
mov    $0x1,%eax
jg     1124 <keycmp+0x24>
cmp    $0xffffffff,%esi
je     1125 <keycmp+0x25>
mov    $0xffffffff,%eax
cmp    %ecx,%esi
jl     1124 <keycmp+0x24>
setg   %al
movzbl %al,%eax
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @keycmp(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = icmp slt i32 %0, %2
br i1 %5, label %15, label %6
6: ; preds = %4
%7 = icmp sgt i32 %0, %2
br i1 %7, label %15, label %8
8: ; preds = %6
%9 = icmp eq i32 %1, -1
br i1 %9, label %15, label %10
10: ; preds = %8
%11 = icmp slt i32 %1, %3
br i1 %11, label %15, label %12
12: ; preds = %10
%13 = icmp sgt i32 %1, %3
%14 = zext i1 %13 to i32
br label %15
15: ; preds = %12, %10, %8, %6, %4
%16 = phi i32 [ -1, %4 ], [ 1, %6 ], [ 0, %8 ], [ -1, %10 ], [ %14, %12 ]
ret i32 %16
}
/* Type definitions */
struct stat {
  int st_size;
};

/* Variables and functions */
scalar_t__ fstat(int, struct stat *);
int get_file_size(int fd) {
  struct stat fileStat;
  if (fstat(fd, &fileStat) < 0)
    return 0;
  return fileStat.st_size;
}


x86 assembly (clang, -O0):
<get_file_size>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%edi
lea    -0x10(%rbp),%rsi
call   1030 <fstat@plt>
cmp    $0x0,%rax
jge    113d <get_file_size+0x2d>
movl   $0x0,-0x4(%rbp)
jmp    1143 <get_file_size+0x33>
mov    -0x10(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_file_size>:
push   %rax
mov    %rsp,%rsi
call   1030 <fstat@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
js     1126 <get_file_size+0x16>
mov    (%rsp),%eax
pop    %rcx
ret

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

LLVM IR (-O2):
%struct.stat = type { i32 }
define i32 @get_file_size(i32 %0) {
%2 = alloca %struct.stat
%3 = bitcast %struct.stat* %2 to i8*
%4 = call i64 @fstat(i32 %0, %struct.stat* %2)
%5 = icmp slt i64 %4, 0
%6 = getelementptr inbounds %struct.stat, %struct.stat* %2, i64 0, i32 0
%7 = load i32, i32* %6
%8 = select i1 %5, i32 0, i32 %7
ret i32 %8
}
char toChar(int digit) {
  if (0 <= digit && digit <= 9)
    return digit + '0';
  if (10 <= digit && digit <= 15)
    return digit - 10 + 'A';
  return '0';
}


x86 assembly (clang, -O0):
<toChar>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
xor    %eax,%eax
cmp    -0x8(%rbp),%eax
jg     112a <toChar+0x2a>
cmpl   $0x9,-0x8(%rbp)
jg     112a <toChar+0x2a>
mov    -0x8(%rbp),%eax
add    $0x30,%eax
mov    %al,-0x1(%rbp)
jmp    1157 <toChar+0x57>
mov    $0xa,%eax
cmp    -0x8(%rbp),%eax
jg     1153 <toChar+0x53>
cmpl   $0xf,-0x8(%rbp)
jg     1153 <toChar+0x53>
mov    -0x8(%rbp),%eax
sub    $0xa,%eax
add    $0x41,%eax
mov    %al,-0x1(%rbp)
jmp    1157 <toChar+0x57>
movb   $0x30,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<toChar>:
cmp    $0x9,%edi
ja     110b <toChar+0xb>
add    $0x30,%dil
jmp    1119 <toChar+0x19>
lea    -0xa(%rdi),%ecx
mov    $0x30,%al
cmp    $0x5,%ecx
ja     111b <toChar+0x1b>
add    $0x37,%dil
mov    %edi,%eax
ret

LLVM IR (-O0):
define signext i8 @toChar(i32 %0) {
%2 = alloca i8
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = icmp sle i32 0, %4
br i1 %5, label %6, label %13
6: ; preds = %1
%7 = load i32, i32* %3
%8 = icmp sle i32 %7, 9
br i1 %8, label %9, label %13
9: ; preds = %6
%10 = load i32, i32* %3
%11 = add nsw i32 %10, 48
%12 = trunc i32 %11 to i8
store i8 %12, i8* %2
br label %25
13: ; preds = %6, %1
%14 = load i32, i32* %3
%15 = icmp sle i32 10, %14
br i1 %15, label %16, label %24
16: ; preds = %13
%17 = load i32, i32* %3
%18 = icmp sle i32 %17, 15
br i1 %18, label %19, label %24
19: ; preds = %16
%20 = load i32, i32* %3
%21 = sub nsw i32 %20, 10
%22 = add nsw i32 %21, 65
%23 = trunc i32 %22 to i8
store i8 %23, i8* %2
br label %25
24: ; preds = %16, %13
store i8 48, i8* %2
br label %25
25: ; preds = %24, %19, %9
%26 = load i8, i8* %2
ret i8 %26
}

LLVM IR (-O2):
define signext i8 @toChar(i32 %0) {
%2 = icmp ult i32 %0, 10
br i1 %2, label %3, label %6
3: ; preds = %1
%4 = trunc i32 %0 to i8
%5 = add nuw nsw i8 %4, 48
br label %12
6: ; preds = %1
%7 = add i32 %0, -10
%8 = icmp ult i32 %7, 6
br i1 %8, label %9, label %12
9: ; preds = %6
%10 = trunc i32 %0 to i8
%11 = add nuw nsw i8 %10, 55
br label %12
12: ; preds = %6, %9, %3
%13 = phi i8 [ %5, %3 ], [ %11, %9 ], [ 48, %6 ]
ret i8 %13
}
int ___pskb_trim(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @___pskb_trim() {
ret i32 0
}
void X509_get_ex_data(void) {}


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

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

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

LLVM IR (-O2):
define void @X509_get_ex_data() {
ret void
}
/* Variables and functions */
int __iscsymf(int);
int iscsymf(int c) { return __iscsymf(c); }


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

x86 assembly (clang, -O2):
<iscsymf>:
jmp    1030 <__iscsymf@plt>

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

LLVM IR (-O2):
define i32 @iscsymf(i32 %0) {
%2 = tail call i32 @__iscsymf(i32 %0)
ret i32 %2
}
unsigned xrop3_191_1_1(unsigned char s, unsigned char t) {
  unsigned D = 0x00ff;
  unsigned S = ((unsigned)s << 8) | s;
  unsigned T = ((unsigned)t << 8) | t;
  unsigned stk1;
  unsigned stk2;
  stk2 = T & S;
  stk2 = ~stk2;
  stk1 = D | stk2;
  return (stk1 & (~S) & (~T)) | (D & S) | (D & T);
}


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

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

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

LLVM IR (-O2):
define i32 @xrop3_191_1_1(i8 zeroext %0, i8 zeroext %1) {
%3 = zext i8 %0 to i32
%4 = mul nuw nsw i32 %3, 257
%5 = zext i8 %1 to i32
%6 = mul nuw nsw i32 %5, 257
%7 = or i32 %6, %4
%8 = xor i32 %7, -1
%9 = or i8 %1, %0
%10 = zext i8 %9 to i32
%11 = or i32 %10, %8
ret i32 %11
}
int t(int a, int b) {
  if (a > 0)
    goto L1;
  else
    goto L2;
L1:
  if (b > 0)
    goto L2;
  return 5;
L2:
  return 6;
}


x86 assembly (clang, -O0):
<t>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
cmpl   $0x0,-0x8(%rbp)
jle    1119 <t+0x19>
jmp    111e <t+0x1e>
jmp    1139 <t+0x39>
cmpl   $0x0,-0xc(%rbp)
jle    112d <t+0x2d>
jmp    1139 <t+0x39>
movl   $0x5,-0x4(%rbp)
jmp    1140 <t+0x40>
movl   $0x6,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<t>:
test   %edi,%edi
setle  %al
test   %esi,%esi
setg   %cl
or     %al,%cl
movzbl %cl,%eax
add    $0x5,%eax
ret

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

LLVM IR (-O2):
define i32 @t(i32 %0, i32 %1) {
%3 = icmp slt i32 %0, 1
%4 = icmp sgt i32 %1, 0
%5 = or i1 %3, %4
%6 = select i1 %5, i32 6, i32 5
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void zfree_20160308(const void *ptr) {
  if (ptr) {
    free((void *)ptr);
  }
}


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

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

LLVM IR (-O0):
define void @zfree_20160308(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 @zfree_20160308(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
}
/* Type definitions */
struct Cyc_Absyn_Exp {
  int dummy;
};

/* Variables and functions */
int Cyc_Evexp_uint_exp_cmp(struct Cyc_Absyn_Exp *, struct Cyc_Absyn_Exp *);
int Cyc_Evexp_same_uint_const_exp(struct Cyc_Absyn_Exp *e1,
                                  struct Cyc_Absyn_Exp *e2) {
  int _T0;
  int _T1;
  _T0 = Cyc_Evexp_uint_exp_cmp(e1, e2);
  _T1 = _T0 == 0;
  return _T1;
}


x86 assembly (clang, -O0):
<Cyc_Evexp_same_uint_const_exp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <Cyc_Evexp_uint_exp_cmp@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x18(%rbp)
mov    -0x18(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.Cyc_Absyn_Exp = type { i32 }
define i32 @Cyc_Evexp_same_uint_const_exp(%struct.Cyc_Absyn_Exp* %0, %struct.Cyc_Absyn_Exp* %1) {
%3 = alloca %struct.Cyc_Absyn_Exp*
%4 = alloca %struct.Cyc_Absyn_Exp*
%5 = alloca i32
%6 = alloca i32
store %struct.Cyc_Absyn_Exp* %0, %struct.Cyc_Absyn_Exp** %3
store %struct.Cyc_Absyn_Exp* %1, %struct.Cyc_Absyn_Exp** %4
%7 = load %struct.Cyc_Absyn_Exp*, %struct.Cyc_Absyn_Exp** %3
%8 = load %struct.Cyc_Absyn_Exp*, %struct.Cyc_Absyn_Exp** %4
%9 = call i32 @Cyc_Evexp_uint_exp_cmp(%struct.Cyc_Absyn_Exp* %7, %struct.Cyc_Absyn_Exp* %8)
store i32 %9, i32* %5
%10 = load i32, i32* %5
%11 = icmp eq i32 %10, 0
%12 = zext i1 %11 to i32
store i32 %12, i32* %6
%13 = load i32, i32* %6
ret i32 %13
}

LLVM IR (-O2):
%struct.Cyc_Absyn_Exp = type { i32 }
define i32 @Cyc_Evexp_same_uint_const_exp(%struct.Cyc_Absyn_Exp* %0, %struct.Cyc_Absyn_Exp* %1) {
%3 = tail call i32 @Cyc_Evexp_uint_exp_cmp(%struct.Cyc_Absyn_Exp* %0, %struct.Cyc_Absyn_Exp* %1)
%4 = icmp eq i32 %3, 0
%5 = zext i1 %4 to i32
ret i32 %5
}
/* Variables and functions */
double ceil(double);
double floor(double);
double round(double x) { return (x >= 0 ? floor(x + 0.5) : ceil(x + 0.5)); }


x86 assembly (clang, -O0):
<round>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jb     115b <round+0x3b>
movsd  0xeb9(%rip),%xmm0
addsd  -0x8(%rbp),%xmm0
call   1040 <floor@plt>
movsd  %xmm0,-0x10(%rbp)
jmp    1172 <round+0x52>
movsd  0xe9d(%rip),%xmm0
addsd  -0x8(%rbp),%xmm0
call   1030 <ceil@plt>
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<round>:
xorpd  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
addsd  0xed0(%rip),%xmm0
jae    1137 <round+0x17>
jmp    1030 <ceil@plt>
jmp    1040 <floor@plt>

LLVM IR (-O0):
define double @round(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fcmp oge double %3, 0.000000e+00
br i1 %4, label %5, label %9
5: ; preds = %1
%6 = load double, double* %2
%7 = fadd double %6, 5.000000e-01
%8 = call double @llvm.floor.f64(double %7)
br label %13
9: ; preds = %1
%10 = load double, double* %2
%11 = fadd double %10, 5.000000e-01
%12 = call double @llvm.ceil.f64(double %11)
br label %13
13: ; preds = %9, %5
%14 = phi double [ %8, %5 ], [ %12, %9 ]
ret double %14
}

LLVM IR (-O2):
define double @round(double %0) {
%2 = fcmp ult double %0, 0.000000e+00
%3 = fadd double %0, 5.000000e-01
br i1 %2, label %6, label %4
4: ; preds = %1
%5 = tail call double @llvm.floor.f64(double %3)
br label %8
6: ; preds = %1
%7 = tail call double @llvm.ceil.f64(double %3)
br label %8
8: ; preds = %6, %4
%9 = phi double [ %5, %4 ], [ %7, %6 ]
ret double %9
}
void *run(void *arg) {
  char *carg = (char *)arg;
  char *result = (char *)malloc(strlen(carg) * 2 + 1);
  sprintf(result, "%s%s", carg, carg);
  return result;
}


x86 assembly (clang, -O0):
<run>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <strlen@plt>
mov    %rax,%rdi
shl    $0x1,%rdi
add    $0x1,%rdi
call   1040 <malloc@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x10(%rbp),%rdx
mov    -0x10(%rbp),%rcx
lea    0xe8c(%rip),%rsi
mov    $0x0,%al
call   1050 <sprintf@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<run>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
call   1030 <strlen@plt>
lea    (%rax,%rax,1),%rdi
add    $0x1,%rdi
call   1040 <malloc@plt>
mov    %rax,%r14
lea    0xead(%rip),%rsi
mov    %rax,%rdi
mov    %rbx,%rdx
mov    %rbx,%rcx
xor    %eax,%eax
call   1050 <sprintf@plt>
mov    %r14,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
@.str = [5 x i8] c"%s%s\00"
define noalias i8* @run(i8* %0) {
%2 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%3 = shl i64 %2, 1
%4 = or i64 %3, 1
%5 = tail call i8* @malloc(i64 %4)
%6 = tail call i32 (i8*, i8*, ...) @sprintf(i8* dereferenceable(1) %5, i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* %0, i8* %0)
ret i8* %5
}
/* Variables and functions */
int strnatcmp0(char const *, char const *, int /*<<< orphan*/);
int strnatcmp(char const *a, char const *b) { return strnatcmp0(a, b, 0); }


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

x86 assembly (clang, -O2):
<strnatcmp>:
xor    %edx,%edx
jmp    1030 <strnatcmp0@plt>

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

LLVM IR (-O2):
define i32 @strnatcmp(i8* %0, i8* %1) {
%3 = tail call i32 @strnatcmp0(i8* %0, i8* %1, i32 0)
ret i32 %3
}
/* Variables and functions */
int strlen(char *);
void delendpath(char *path) {
  if (path[0] && path[strlen(path) - 1] == '/')
    path[strlen(path) - 1] = 0;
}


x86 assembly (clang, -O0):
<delendpath>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     1177 <delendpath+0x67>
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,%ecx
mov    -0x10(%rbp),%rax
sub    $0x1,%ecx
movslq %ecx,%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x2f,%eax
jne    1177 <delendpath+0x67>
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,%ecx
mov    -0x18(%rbp),%rax
sub    $0x1,%ecx
movslq %ecx,%rcx
movb   $0x0,(%rax,%rcx,1)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<delendpath>:
push   %rbx
cmpb   $0x0,(%rdi)
je     1136 <delendpath+0x26>
mov    %rdi,%rbx
call   1030 <strlen@plt>
cltq
cmpb   $0x2f,-0x1(%rax,%rbx,1)
jne    1136 <delendpath+0x26>
mov    %rbx,%rdi
call   1030 <strlen@plt>
cltq
movb   $0x0,-0x1(%rax,%rbx,1)
pop    %rbx
ret

LLVM IR (-O0):
define void @delendpath(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = getelementptr inbounds i8, i8* %3, i64 0
%5 = load i8, i8* %4
%6 = sext i8 %5 to i32
%7 = icmp ne i32 %6, 0
br i1 %7, label %8, label %25
8: ; preds = %1
%9 = load i8*, i8** %2
%10 = load i8*, i8** %2
%11 = call i32 @strlen(i8* %10)
%12 = sub nsw i32 %11, 1
%13 = sext i32 %12 to i64
%14 = getelementptr inbounds i8, i8* %9, i64 %13
%15 = load i8, i8* %14
%16 = sext i8 %15 to i32
%17 = icmp eq i32 %16, 47
br i1 %17, label %18, label %25
18: ; preds = %8
%19 = load i8*, i8** %2
%20 = load i8*, i8** %2
%21 = call i32 @strlen(i8* %20)
%22 = sub nsw i32 %21, 1
%23 = sext i32 %22 to i64
%24 = getelementptr inbounds i8, i8* %19, i64 %23
store i8 0, i8* %24
br label %25
25: ; preds = %18, %8, %1
ret void
}

LLVM IR (-O2):
define void @delendpath(i8* %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %16, label %4
4: ; preds = %1
%5 = tail call i32 @strlen(i8* %0)
%6 = add nsw i32 %5, -1
%7 = sext i32 %6 to i64
%8 = getelementptr inbounds i8, i8* %0, i64 %7
%9 = load i8, i8* %8
%10 = icmp eq i8 %9, 47
br i1 %10, label %11, label %16
11: ; preds = %4
%12 = tail call i32 @strlen(i8* %0)
%13 = add nsw i32 %12, -1
%14 = sext i32 %13 to i64
%15 = getelementptr inbounds i8, i8* %0, i64 %14
store i8 0, i8* %15
br label %16
16: ; preds = %11, %4, %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void printIntArray(int *x, int n) {
  int i;
  for (i = 0; i < n; i++)
    printf("%i:", x[i]);
}


x86 assembly (clang, -O0):
<printIntArray>:
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    1157 <printIntArray+0x47>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,4),%esi
lea    0xebc(%rip),%rdi
call   1030 <printf@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1126 <printIntArray+0x16>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<printIntArray>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
test   %esi,%esi
jle    1145 <printIntArray+0x35>
mov    %rdi,%r15
mov    %esi,%r12d
xor    %ebx,%ebx
lea    0xed5(%rip),%r14
nopl   0x0(%rax,%rax,1)
mov    (%r15,%rbx,4),%esi
mov    %r14,%rdi
call   1030 <printf@plt>
add    $0x1,%rbx
cmp    %rbx,%r12
jne    1130 <printIntArray+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%i:\00"
define void @printIntArray(i32* %0, i32 %1) {
%3 = alloca i32*
%4 = alloca i32
%5 = alloca i32
store i32* %0, i32** %3
store i32 %1, i32* %4
store i32 0, i32* %5
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 i32*, i32** %3
%12 = load i32, i32* %5
%13 = sext i32 %12 to i64
%14 = getelementptr inbounds i32, i32* %11, i64 %13
%15 = load i32, i32* %14
%16 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), 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):
@.str = [4 x i8] c"%i:\00"
define void @printIntArray(i32* nocapture %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 i32, i32* %0, i64 %7
%9 = load i32, i32* %8
%10 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), 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
}