xunge/DecIR huggingface dataset:
void rotate1_left(int *a, int len) {
  int i, tmp;
  tmp = a[0];
  for (i = 1; i < len; ++i)
    a[i - 1] = a[i];
  a[len - 1] = tmp;
}


x86 assembly (clang, -O0):
<rotate1_left>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x14(%rbp)
movl   $0x1,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1150 <rotate1_left+0x50>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,4),%edx
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    111b <rotate1_left+0x1b>
mov    -0x14(%rbp),%edx
mov    -0x8(%rbp),%rax
mov    -0xc(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
mov    %edx,(%rax,%rcx,4)
pop    %rbp
ret

x86 assembly (clang, -O2):
<rotate1_left>:
push   %rbp
push   %r14
push   %rbx
mov    %esi,%ebx
mov    %rdi,%r14
mov    (%rdi),%ebp
cmp    $0x1,%esi
jle    1139 <rotate1_left+0x29>
lea    0x4(%r14),%rsi
add    $0xffffffff,%ebx
lea    0x0(,%rbx,4),%rdx
mov    %r14,%rdi
call   1030 <memmove@plt>
jmp    113c <rotate1_left+0x2c>
add    $0xffffffff,%ebx
movslq %ebx,%rax
mov    %ebp,(%r14,%rax,4)
pop    %rbx
pop    %r14
pop    %rbp
ret

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

LLVM IR (-O2):
define void @rotate1_left(i32* nocapture %0, i32 %1) {
%3 = load i32, i32* %0
%4 = icmp sgt i32 %1, 1
br i1 %4, label %7, label %5
5: ; preds = %2
%6 = add nsw i32 %1, -1
br label %14
7: ; preds = %2
%8 = bitcast i32* %0 to i8*
%9 = getelementptr i32, i32* %0, i64 1
%10 = bitcast i32* %9 to i8*
%11 = add nsw i32 %1, -1
%12 = zext i32 %11 to i64
%13 = shl nuw nsw i64 %12, 2
br label %14
14: ; preds = %5, %7
%15 = phi i32 [ %6, %5 ], [ %11, %7 ]
%16 = sext i32 %15 to i64
%17 = getelementptr inbounds i32, i32* %0, i64 %16
store i32 %3, i32* %17
ret void
}
void INT_UART1_TX(void) {}


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

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

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

LLVM IR (-O2):
define void @INT_UART1_TX() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ a6(int);
void a5(int n) { a6(n); }


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

x86 assembly (clang, -O2):
<a5>:
jmp    1030 <a6@plt>

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

LLVM IR (-O2):
define void @a5(i32 %0) {
%2 = tail call i32 @a6(i32 %0)
ret void
}
int test_imm_36int64_midword_reg(long long val) {
  return ((val >> 16) & (0x36 << 0)) ? -20 : -40;
}


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

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

LLVM IR (-O0):
define i32 @test_imm_36int64_midword_reg(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = ashr i64 %3, 16
%5 = and i64 %4, 54
%6 = icmp ne i64 %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_36int64_midword_reg(i64 %0) {
%2 = and i64 %0, 3538944
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
int islower(int c) {
  return ((unsigned char)c >= 'a' && (unsigned char)c <= 'z');
}


x86 assembly (clang, -O0):
<islower>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
movzbl %al,%ecx
xor    %eax,%eax
cmp    $0x61,%ecx
mov    %al,-0x5(%rbp)
jl     112a <islower+0x2a>
mov    -0x4(%rbp),%eax
movzbl %al,%eax
cmp    $0x7a,%eax
setle  %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @islower(i32 %0) {
%2 = and i32 %0, 255
%3 = add nsw i32 %2, -97
%4 = icmp ult i32 %3, 26
%5 = zext i1 %4 to i32
ret i32 %5
}
/* Type definitions */
typedef int /*<<< orphan*/ __m128i;

/* Variables and functions */
int _mm_extract_epi16(int /*<<< orphan*/, int);
int test_mm_extract_epi16(__m128i A) { return _mm_extract_epi16(A, 1); }


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

x86 assembly (clang, -O2):
<test_mm_extract_epi16>:
mov    $0x1,%esi
jmp    1030 <_mm_extract_epi16@plt>

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

LLVM IR (-O2):
define i32 @test_mm_extract_epi16(i32 %0) {
%2 = tail call i32 @_mm_extract_epi16(i32 %0, i32 1)
ret i32 %2
}
void io_footprint_start(void *data) { return; }


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

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

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

LLVM IR (-O2):
define void @io_footprint_start(i8* nocapture %0) {
ret void
}
char *get_awl_version(void) { return "v0.3.0"; }


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

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

LLVM IR (-O0):
@.str = [7 x i8] c"v0.3.0\00"
define i8* @get_awl_version() {
ret i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [7 x i8] c"v0.3.0\00"
define i8* @get_awl_version() {
ret i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0)
}
/* Variables and functions */
int /*<<< orphan*/ abort();
void *realloc(void *, size_t);
void *smalloc(size_t);
void *srealloc(void *ptr, size_t size) {
  void *p = NULL;
  if (!ptr)
    return smalloc(size);
  p = realloc(ptr, size);
  if (p)
    return p;
  abort();
}


x86 assembly (clang, -O0):
<srealloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
movq   $0x0,-0x20(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1165 <srealloc+0x35>
mov    -0x18(%rbp),%rdi
call   1050 <smalloc@plt>
mov    %rax,-0x8(%rbp)
jmp    1195 <srealloc+0x65>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1040 <realloc@plt>
mov    %rax,-0x20(%rbp)
cmpq   $0x0,-0x20(%rbp)
je     118e <srealloc+0x5e>
mov    -0x20(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    1195 <srealloc+0x65>
mov    $0x0,%al
call   1030 <abort@plt>
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<srealloc>:
push   %rax
test   %rdi,%rdi
je     1142 <srealloc+0x12>
call   1040 <realloc@plt>
test   %rax,%rax
je     114b <srealloc+0x1b>
pop    %rcx
ret
mov    %rsi,%rdi
pop    %rax
jmp    1050 <smalloc@plt>
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
define i8* @srealloc(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i64
%6 = alloca i8*
store i8* %0, i8** %4
store i64 %1, i64* %5
store i8* null, i8** %6
%7 = load i8*, i8** %4
%8 = icmp ne i8* %7, null
br i1 %8, label %12, label %9
9: ; preds = %2
%10 = load i64, i64* %5
%11 = call i8* @smalloc(i64 %10)
store i8* %11, i8** %3
br label %22
12: ; preds = %2
%13 = load i8*, i8** %4
%14 = load i64, i64* %5
%15 = call i8* @realloc(i8* %13, i64 %14)
store i8* %15, i8** %6
%16 = load i8*, i8** %6
%17 = icmp ne i8* %16, null
br i1 %17, label %18, label %20
18: ; preds = %12
%19 = load i8*, i8** %6
store i8* %19, i8** %3
br label %22
20: ; preds = %12
%21 = call i32 (...) @abort()
unreachable
22: ; preds = %18, %9
%23 = load i8*, i8** %3
ret i8* %23
}

LLVM IR (-O2):
define i8* @srealloc(i8* %0, i64 %1) {
%3 = icmp eq i8* %0, null
br i1 %3, label %4, label %6
4: ; preds = %2
%5 = tail call i8* @smalloc(i64 %1)
br label %11
6: ; preds = %2
%7 = tail call i8* @realloc(i8* %0, i64 %1)
%8 = icmp eq i8* %7, null
br i1 %8, label %9, label %11
9: ; preds = %6
%10 = tail call i32 (...) @abort()
unreachable
11: ; preds = %6, %4
%12 = phi i8* [ %5, %4 ], [ %7, %6 ]
ret i8* %12
}
void g_quark_try_string() {}


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

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

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

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

/* Variables and functions */
uint32_t bne(uint32_t reg1, uint32_t reg2, uint16_t kte, uint32_t *pc) {
  if (reg1 != reg2) {
    kte = kte << 2;
    *pc = *pc + kte;
    return *pc;
  } else {
    return *pc;
  }
}


x86 assembly (clang, -O0):
<bne>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %edx,-0x1c(%rbp)
mov    %rcx,-0x28(%rbp)
mov    -0x10(%rbp),%rax
cmp    -0x18(%rbp),%rax
je     114f <bne+0x4f>
mov    -0x1c(%rbp),%eax
shl    $0x2,%eax
mov    %eax,-0x1c(%rbp)
mov    -0x28(%rbp),%rax
mov    (%rax),%rcx
movslq -0x1c(%rbp),%rax
add    %rax,%rcx
mov    -0x28(%rbp),%rax
mov    %rcx,(%rax)
mov    -0x28(%rbp),%rax
mov    (%rax),%rax
mov    %rax,-0x8(%rbp)
jmp    115a <bne+0x5a>
mov    -0x28(%rbp),%rax
mov    (%rax),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<bne>:
cmp    %rsi,%rdi
jne    1109 <bne+0x9>
mov    (%rcx),%rax
ret
shl    $0x2,%edx
movslq %edx,%rax
add    (%rcx),%rax
mov    %rax,(%rcx)
ret

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

LLVM IR (-O2):
define i64 @bne(i64 %0, i64 %1, i32 %2, i64* nocapture %3) {
%5 = icmp eq i64 %0, %1
br i1 %5, label %11, label %6
6: ; preds = %4
%7 = shl i32 %2, 2
%8 = load i64, i64* %3
%9 = sext i32 %7 to i64
%10 = add nsw i64 %8, %9
store i64 %10, i64* %3
br label %13
11: ; preds = %4
%12 = load i64, i64* %3
br label %13
13: ; preds = %11, %6
%14 = phi i64 [ %10, %6 ], [ %12, %11 ]
ret i64 %14
}
/* Variables and functions */
void *castle_alloc_maybe(size_t, void *, size_t *);
int /*<<< orphan*/ memcpy(void *, void const *, size_t);
void *castle_dup_or_copy(const void *src, size_t src_len, void *dst,
                         size_t *dst_len) {
  if ((dst = castle_alloc_maybe(src_len, dst, dst_len)))
    memcpy(dst, src, src_len);
  return dst;
}


x86 assembly (clang, -O0):
<castle_dup_or_copy>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    -0x20(%rbp),%rdx
call   1030 <castle_alloc_maybe@plt>
mov    %rax,-0x18(%rbp)
cmp    $0x0,%rax
je     1168 <castle_dup_or_copy+0x48>
mov    -0x18(%rbp),%rdi
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
call   1040 <memcpy@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<castle_dup_or_copy>:
push   %r15
push   %r14
push   %rbx
mov    %rsi,%r15
mov    %rdi,%r14
mov    %rsi,%rdi
mov    %rdx,%rsi
mov    %rcx,%rdx
call   1030 <castle_alloc_maybe@plt>
mov    %rax,%rbx
test   %rax,%rax
je     114f <castle_dup_or_copy+0x2f>
mov    %rbx,%rdi
mov    %r14,%rsi
mov    %r15,%rdx
call   1040 <memcpy@plt>
mov    %rbx,%rax
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define i8* @castle_dup_or_copy(i8* %0, i64 %1, i8* %2, i64* %3) {
%5 = alloca i8*
%6 = alloca i64
%7 = alloca i8*
%8 = alloca i64*
store i8* %0, i8** %5
store i64 %1, i64* %6
store i8* %2, i8** %7
store i64* %3, i64** %8
%9 = load i64, i64* %6
%10 = load i8*, i8** %7
%11 = load i64*, i64** %8
%12 = call i8* @castle_alloc_maybe(i64 %9, i8* %10, i64* %11)
store i8* %12, i8** %7
%13 = icmp ne i8* %12, null
br i1 %13, label %14, label %19
14: ; preds = %4
%15 = load i8*, i8** %7
%16 = load i8*, i8** %5
%17 = load i64, i64* %6
%18 = call i32 @memcpy(i8* %15, i8* %16, i64 %17)
br label %19
19: ; preds = %14, %4
%20 = load i8*, i8** %7
ret i8* %20
}

LLVM IR (-O2):
define i8* @castle_dup_or_copy(i8* %0, i64 %1, i8* %2, i64* %3) {
%5 = tail call i8* @castle_alloc_maybe(i64 %1, i8* %2, i64* %3)
%6 = icmp eq i8* %5, null
br i1 %6, label %9, label %7
7: ; preds = %4
%8 = tail call i32 @memcpy(i8* %5, i8* %0, i64 %1)
br label %9
9: ; preds = %7, %4
ret i8* %5
}
/* Type definitions */
typedef int uint8_t;

/* Variables and functions */
void mp2vpicx_set_compositedisplay(uint8_t *p_mp2vpicx) {
  p_mp2vpicx[8] |= 0x40;
}


x86 assembly (clang, -O0):
<mp2vpicx_set_compositedisplay>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    0x20(%rax),%ecx
or     $0x40,%ecx
mov    %ecx,0x20(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<mp2vpicx_set_compositedisplay>:
orb    $0x40,0x20(%rdi)
ret

LLVM IR (-O0):
define void @mp2vpicx_set_compositedisplay(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = getelementptr inbounds i32, i32* %3, i64 8
%5 = load i32, i32* %4
%6 = or i32 %5, 64
store i32 %6, i32* %4
ret void
}

LLVM IR (-O2):
define void @mp2vpicx_set_compositedisplay(i32* nocapture %0) {
%2 = getelementptr inbounds i32, i32* %0, i64 8
%3 = load i32, i32* %2
%4 = or i32 %3, 64
store i32 %4, i32* %2
ret void
}
void rcu_init_one_nocb(struct rcu_node *rnp) {}


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

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

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

LLVM IR (-O2):
%struct.rcu_node = type opaque
define void @rcu_init_one_nocb(%struct.rcu_node* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ err(int, char *, size_t);
void *realloc(void *, size_t);
void *erealloc(void *ptr, size_t nb) {
  void *p = realloc(ptr, nb);
  if (!p)
    err(1, "unable to reallocate %zu bytes", nb);
  return p;
}


x86 assembly (clang, -O0):
<erealloc>:
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   1040 <realloc@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    1161 <erealloc+0x41>
mov    -0x10(%rbp),%rdx
mov    $0x1,%edi
lea    0xea4(%rip),%rsi
call   1030 <err@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<erealloc>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
call   1040 <realloc@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    1148 <erealloc+0x28>
lea    0xec5(%rip),%rsi
mov    $0x1,%edi
mov    %r14,%rdx
call   1030 <err@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [31 x i8] c"unable to reallocate %zu bytes\00"
define i8* @erealloc(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
%5 = alloca i8*
store i8* %0, i8** %3
store i64 %1, i64* %4
%6 = load i8*, i8** %3
%7 = load i64, i64* %4
%8 = call i8* @realloc(i8* %6, i64 %7)
store i8* %8, i8** %5
%9 = load i8*, i8** %5
%10 = icmp ne i8* %9, null
br i1 %10, label %14, label %11
11: ; preds = %2
%12 = load i64, i64* %4
%13 = call i32 @err(i32 1, i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0), i64 %12)
br label %14
14: ; preds = %11, %2
%15 = load i8*, i8** %5
ret i8* %15
}

LLVM IR (-O2):
@.str = [31 x i8] c"unable to reallocate %zu bytes\00"
define noalias i8* @erealloc(i8* nocapture %0, i64 %1) {
%3 = tail call i8* @realloc(i8* %0, i64 %1)
%4 = icmp eq i8* %3, null
br i1 %4, label %5, label %7
5: ; preds = %2
%6 = tail call i32 @err(i32 1, i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0), i64 %1)
br label %7
7: ; preds = %5, %2
ret i8* %3
}
/* Variables and functions */
int /*<<< orphan*/ symlink_empty1();
int /*<<< orphan*/ symlink_empty2();
int /*<<< orphan*/ test_symlink_paths();
void test_symlink(void) {
  test_symlink_paths();
  symlink_empty1();
  symlink_empty2();
}


x86 assembly (clang, -O0):
<test_symlink>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <test_symlink_paths@plt>
mov    $0x0,%al
call   1030 <symlink_empty1@plt>
mov    $0x0,%al
call   1050 <symlink_empty2@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_symlink>:
push   %rax
xor    %eax,%eax
call   1040 <test_symlink_paths@plt>
xor    %eax,%eax
call   1030 <symlink_empty1@plt>
xor    %eax,%eax
pop    %rcx
jmp    1050 <symlink_empty2@plt>

LLVM IR (-O0):
define void @test_symlink() {
%1 = call i32 (...) @test_symlink_paths()
%2 = call i32 (...) @symlink_empty1()
%3 = call i32 (...) @symlink_empty2()
ret void
}

LLVM IR (-O2):
define void @test_symlink() {
%1 = tail call i32 (...) @test_symlink_paths()
%2 = tail call i32 (...) @symlink_empty1()
%3 = tail call i32 (...) @symlink_empty2()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ i387_cache_to_fxsave(void *);
void x86_64_fill_fpregset(void *buf) { i387_cache_to_fxsave(buf); }


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

x86 assembly (clang, -O2):
<x86_64_fill_fpregset>:
jmp    1030 <i387_cache_to_fxsave@plt>

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

LLVM IR (-O2):
define void @x86_64_fill_fpregset(i8* %0) {
%2 = tail call i32 @i387_cache_to_fxsave(i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ b1outp(unsigned int, int, int);
int /*<<< orphan*/ udelay(int);
void b1_reset(unsigned int base) {
  b1outp(base, 0x10, 0);
  udelay(55 * 2 * 1000);
  b1outp(base, 0x10, 1);
  udelay(55 * 2 * 1000);
  b1outp(base, 0x10, 0);
  udelay(55 * 2 * 1000);
}


x86 assembly (clang, -O0):
<b1_reset>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
mov    $0x10,%esi
xor    %edx,%edx
call   1030 <b1outp@plt>
mov    $0x1adb0,%edi
call   1040 <udelay@plt>
mov    -0x4(%rbp),%edi
mov    $0x10,%esi
mov    $0x1,%edx
call   1030 <b1outp@plt>
mov    $0x1adb0,%edi
call   1040 <udelay@plt>
mov    -0x4(%rbp),%edi
mov    $0x10,%esi
xor    %edx,%edx
call   1030 <b1outp@plt>
mov    $0x1adb0,%edi
call   1040 <udelay@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<b1_reset>:
push   %rbx
mov    %edi,%ebx
mov    $0x10,%esi
xor    %edx,%edx
call   1030 <b1outp@plt>
mov    $0x1adb0,%edi
call   1040 <udelay@plt>
mov    %ebx,%edi
mov    $0x10,%esi
mov    $0x1,%edx
call   1030 <b1outp@plt>
mov    $0x1adb0,%edi
call   1040 <udelay@plt>
mov    %ebx,%edi
mov    $0x10,%esi
xor    %edx,%edx
call   1030 <b1outp@plt>
mov    $0x1adb0,%edi
pop    %rbx
jmp    1040 <udelay@plt>

LLVM IR (-O0):
define void @b1_reset(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @b1outp(i32 %3, i32 16, i32 0)
%5 = call i32 @udelay(i32 110000)
%6 = load i32, i32* %2
%7 = call i32 @b1outp(i32 %6, i32 16, i32 1)
%8 = call i32 @udelay(i32 110000)
%9 = load i32, i32* %2
%10 = call i32 @b1outp(i32 %9, i32 16, i32 0)
%11 = call i32 @udelay(i32 110000)
ret void
}

LLVM IR (-O2):
define void @b1_reset(i32 %0) {
%2 = tail call i32 @b1outp(i32 %0, i32 16, i32 0)
%3 = tail call i32 @udelay(i32 110000)
%4 = tail call i32 @b1outp(i32 %0, i32 16, i32 1)
%5 = tail call i32 @udelay(i32 110000)
%6 = tail call i32 @b1outp(i32 %0, i32 16, i32 0)
%7 = tail call i32 @udelay(i32 110000)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ func3();
void func2(void) { func3(); }


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

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

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

LLVM IR (-O2):
define void @func2() {
%1 = tail call i32 (...) @func3()
ret void
}
int usl_pid_init(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @usl_pid_init() {
ret i32 0
}
void g_strconcat() {}


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

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

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

LLVM IR (-O2):
define void @g_strconcat() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ die(char *, int);
void check_signum(int sig) {
  if (sig < 1 || sig >= 32)
    die("BUG: signal out of range: %d", sig);
}


x86 assembly (clang, -O0):
<check_signum>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x1,-0x4(%rbp)
jl     112f <check_signum+0x1f>
cmpl   $0x20,-0x4(%rbp)
jl     113e <check_signum+0x2e>
mov    -0x4(%rbp),%esi
lea    0xec7(%rip),%rdi
call   1030 <die@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<check_signum>:
mov    %edi,%esi
lea    -0x20(%rsi),%eax
cmp    $0xffffffe0,%eax
ja     1126 <check_signum+0x16>
lea    0xedf(%rip),%rdi
jmp    1030 <die@plt>
ret

LLVM IR (-O0):
@.str = [29 x i8] c"BUG: signal out of range: %d\00"
define void @check_signum(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp slt i32 %3, 1
br i1 %4, label %8, label %5
5: ; preds = %1
%6 = load i32, i32* %2
%7 = icmp sge i32 %6, 32
br i1 %7, label %8, label %11
8: ; preds = %5, %1
%9 = load i32, i32* %2
%10 = call i32 @die(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0), i32 %9)
br label %11
11: ; preds = %8, %5
ret void
}

LLVM IR (-O2):
@.str = [29 x i8] c"BUG: signal out of range: %d\00"
define void @check_signum(i32 %0) {
%2 = add i32 %0, -32
%3 = icmp ult i32 %2, -31
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i32 @die(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0), i32 %0)
br label %6
6: ; preds = %1, %4
ret void
}
signed int be_read32(const void *p) {
  unsigned char *i = (unsigned char *)p;
  return i[0] << 24 | i[1] << 16 | i[2] << 8 | i[3];
}


x86 assembly (clang, -O0):
<be_read32>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movzbl (%rax),%eax
shl    $0x18,%eax
mov    -0x10(%rbp),%rcx
movzbl 0x1(%rcx),%ecx
shl    $0x10,%ecx
or     %ecx,%eax
mov    -0x10(%rbp),%rcx
movzbl 0x2(%rcx),%ecx
shl    $0x8,%ecx
or     %ecx,%eax
mov    -0x10(%rbp),%rcx
movzbl 0x3(%rcx),%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<be_read32>:
mov    (%rdi),%eax
bswap  %eax
ret

LLVM IR (-O0):
define i32 @be_read32(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
store i8* %4, i8** %3
%5 = load i8*, i8** %3
%6 = getelementptr inbounds i8, i8* %5, i64 0
%7 = load i8, i8* %6
%8 = zext i8 %7 to i32
%9 = shl i32 %8, 24
%10 = load i8*, i8** %3
%11 = getelementptr inbounds i8, i8* %10, i64 1
%12 = load i8, i8* %11
%13 = zext i8 %12 to i32
%14 = shl i32 %13, 16
%15 = or i32 %9, %14
%16 = load i8*, i8** %3
%17 = getelementptr inbounds i8, i8* %16, i64 2
%18 = load i8, i8* %17
%19 = zext i8 %18 to i32
%20 = shl i32 %19, 8
%21 = or i32 %15, %20
%22 = load i8*, i8** %3
%23 = getelementptr inbounds i8, i8* %22, i64 3
%24 = load i8, i8* %23
%25 = zext i8 %24 to i32
%26 = or i32 %21, %25
ret i32 %26
}

LLVM IR (-O2):
define i32 @be_read32(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = zext i8 %2 to i32
%4 = shl nuw i32 %3, 24
%5 = getelementptr inbounds i8, i8* %0, i64 1
%6 = load i8, i8* %5
%7 = zext i8 %6 to i32
%8 = shl nuw nsw i32 %7, 16
%9 = or i32 %8, %4
%10 = getelementptr inbounds i8, i8* %0, i64 2
%11 = load i8, i8* %10
%12 = zext i8 %11 to i32
%13 = shl nuw nsw i32 %12, 8
%14 = or i32 %9, %13
%15 = getelementptr inbounds i8, i8* %0, i64 3
%16 = load i8, i8* %15
%17 = zext i8 %16 to i32
%18 = or i32 %14, %17
ret i32 %18
}
signed int getdomainname(char *__buf, unsigned long int __buflen) {
  signed int return_value___getdomainname_chk$1;
  signed int return_value___getdomainname_chk_warn$2;
  signed int return_value___getdomainname_alias$3;
  return_value___getdomainname_alias$3 = __getdomainname_alias(__buf, __buflen);
  return return_value___getdomainname_alias$3;
}


x86 assembly (clang, -O0):
<getdomainname>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    $0x0,%al
call   1030 <__getdomainname_alias@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @getdomainname(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
store i8* %0, i8** %3
store i64 %1, i64* %4
%8 = load i8*, i8** %3
%9 = load i64, i64* %4
%10 = call i32 (i8*, i64, ...) bitcast (i32 (...)* @__getdomainname_alias to i32 (i8*, i64, ...)*)(i8* %8, i64 %9)
store i32 %10, i32* %7
%11 = load i32, i32* %7
ret i32 %11
}

LLVM IR (-O2):
define i32 @getdomainname(i8* %0, i64 %1) {
%3 = tail call i32 (i8*, i64, ...) bitcast (i32 (...)* @__getdomainname_alias to i32 (i8*, i64, ...)*)(i8* %0, i64 %1)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ hello(char *);
int main() {
  hello("everyone");
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [9 x i8] c"everyone\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @hello(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [9 x i8] c"everyone\00"
define i32 @main() {
%1 = tail call i32 @hello(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
void PackJicScale(struct bit_stream *bs) {}


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

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

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

LLVM IR (-O2):
%struct.bit_stream = type opaque
define void @PackJicScale(%struct.bit_stream* nocapture %0) {
ret void
}
/* Type definitions */
struct bufsize {
  int dummy;
};
struct buffers {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ codec_bench_dec_fast(struct buffers *,
                                        struct bufsize const *, char *);
int /*<<< orphan*/ codec_bench_enc_fast(struct buffers *,
                                        struct bufsize const *, char *);
void codec_bench_fast(struct buffers *b, const struct bufsize *bs) {
  codec_bench_enc_fast(b, bs, "plain");
  codec_bench_dec_fast(b, bs, "plain");
}


x86 assembly (clang, -O0):
<codec_bench_fast>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
lea    0xec1(%rip),%rdx
call   1040 <codec_bench_enc_fast@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
lea    0xead(%rip),%rdx
call   1030 <codec_bench_dec_fast@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<codec_bench_fast>:
push   %r15
push   %r14
push   %rbx
mov    %rsi,%r14
mov    %rdi,%rbx
lea    0xece(%rip),%r15
mov    %r15,%rdx
call   1040 <codec_bench_enc_fast@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
mov    %r15,%rdx
pop    %rbx
pop    %r14
pop    %r15
jmp    1030 <codec_bench_dec_fast@plt>

LLVM IR (-O0):
%struct.buffers = type { i32 }
%struct.bufsize = type { i32 }
@.str = [6 x i8] c"plain\00"
define void @codec_bench_fast(%struct.buffers* %0, %struct.bufsize* %1) {
%3 = alloca %struct.buffers*
%4 = alloca %struct.bufsize*
store %struct.buffers* %0, %struct.buffers** %3
store %struct.bufsize* %1, %struct.bufsize** %4
%5 = load %struct.buffers*, %struct.buffers** %3
%6 = load %struct.bufsize*, %struct.bufsize** %4
%7 = call i32 @codec_bench_enc_fast(%struct.buffers* %5, %struct.bufsize* %6, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%8 = load %struct.buffers*, %struct.buffers** %3
%9 = load %struct.bufsize*, %struct.bufsize** %4
%10 = call i32 @codec_bench_dec_fast(%struct.buffers* %8, %struct.bufsize* %9, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
%struct.buffers = type { i32 }
%struct.bufsize = type { i32 }
@.str = [6 x i8] c"plain\00"
define void @codec_bench_fast(%struct.buffers* %0, %struct.bufsize* %1) {
%3 = tail call i32 @codec_bench_enc_fast(%struct.buffers* %0, %struct.bufsize* %1, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%4 = tail call i32 @codec_bench_dec_fast(%struct.buffers* %0, %struct.bufsize* %1, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
ret void
}
char *rb_path_skip_prefix(path) const char *path;
{ return (char *)path; }


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

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

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

LLVM IR (-O2):
define i8* @rb_path_skip_prefix(i8* readnone returned %0) {
ret i8* %0
}
/* Type definitions */
typedef int /*<<< orphan*/ uint16_t;

/* Variables and functions */
int /*<<< orphan*/ endswap16(int /*<<< orphan*/);
scalar_t__ is_little_endian();
uint16_t cpu_to_be16(uint16_t x) {
  uint16_t ret = x;
  if (is_little_endian()) {
    ret = endswap16(x);
  }
  return ret;
}


x86 assembly (clang, -O0):
<cpu_to_be16>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    $0x0,%al
call   1040 <is_little_endian@plt>
cmp    $0x0,%rax
je     114d <cpu_to_be16+0x2d>
mov    -0x4(%rbp),%edi
call   1030 <endswap16@plt>
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cpu_to_be16>:
push   %rbx
mov    %edi,%ebx
xor    %eax,%eax
call   1040 <is_little_endian@plt>
test   %rax,%rax
je     1137 <cpu_to_be16+0x17>
mov    %ebx,%edi
pop    %rbx
jmp    1030 <endswap16@plt>
mov    %ebx,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @cpu_to_be16(i32 %0) {
%2 = tail call i64 (...) @is_little_endian()
%3 = icmp eq i64 %2, 0
br i1 %3, label %6, label %4
4: ; preds = %1
%5 = tail call i32 @endswap16(i32 %0)
br label %6
6: ; preds = %4, %1
%7 = phi i32 [ %5, %4 ], [ %0, %1 ]
ret i32 %7
}
/* Variables and functions */
bool strv_isempty(char **l) { return !l || !*l; }


x86 assembly (clang, -O0):
<strv_isempty>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    $0x1,%al
cmpq   $0x0,-0x8(%rbp)
mov    %al,-0x9(%rbp)
je     1128 <strv_isempty+0x28>
mov    -0x8(%rbp),%rax
cmpq   $0x0,(%rax)
setne  %al
xor    $0xff,%al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<strv_isempty>:
test   %rdi,%rdi
je     110f <strv_isempty+0xf>
xor    %eax,%eax
cmpq   $0x0,(%rdi)
sete   %al
ret
mov    $0x1,%eax
ret

LLVM IR (-O0):
define i32 @strv_isempty(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 %10
5: ; preds = %1
%6 = load i8**, i8*** %2
%7 = load i8*, i8** %6
%8 = icmp ne i8* %7, null
%9 = xor i1 %8, true
br label %10
10: ; preds = %5, %1
%11 = phi i1 [ true, %1 ], [ %9, %5 ]
%12 = zext i1 %11 to i32
ret i32 %12
}

LLVM IR (-O2):
define i32 @strv_isempty(i8** %0) {
%2 = icmp eq i8** %0, null
br i1 %2, label %7, label %3
3: ; preds = %1
%4 = load i8*, i8** %0
%5 = icmp eq i8* %4, null
%6 = zext i1 %5 to i32
br label %7
7: ; preds = %3, %1
%8 = phi i32 [ 1, %1 ], [ %6, %3 ]
ret i32 %8
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
struct inflate_state {
  int dummy;
};

/* Variables and functions */
int decode_huffman_code_block_stateless_base(struct inflate_state *,
                                             int /*<<< orphan*/ *);
int decode_huffman_code_block_stateless(struct inflate_state *s,
                                        uint8_t *start_out) {
  return decode_huffman_code_block_stateless_base(s, start_out);
}


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

x86 assembly (clang, -O2):
<decode_huffman_code_block_stateless>:
jmp    1030 <decode_huffman_code_block_stateless_base@plt>

LLVM IR (-O0):
%struct.inflate_state = type { i32 }
define i32 @decode_huffman_code_block_stateless(%struct.inflate_state* %0, i32* %1) {
%3 = alloca %struct.inflate_state*
%4 = alloca i32*
store %struct.inflate_state* %0, %struct.inflate_state** %3
store i32* %1, i32** %4
%5 = load %struct.inflate_state*, %struct.inflate_state** %3
%6 = load i32*, i32** %4
%7 = call i32 @decode_huffman_code_block_stateless_base(%struct.inflate_state* %5, i32* %6)
ret i32 %7
}

LLVM IR (-O2):
%struct.inflate_state = type { i32 }
define i32 @decode_huffman_code_block_stateless(%struct.inflate_state* %0, i32* %1) {
%3 = tail call i32 @decode_huffman_code_block_stateless_base(%struct.inflate_state* %0, i32* %1)
ret i32 %3
}
/* Type definitions */
typedef int w;
typedef int uint32_t;

/* Variables and functions */
uint32_t reverse_endian(uint32_t w) {
  return (((w) & (0xFF << (0) * 8)) << 24) | (((w) & (0xFF << (1) * 8)) << 8) |
         (((w) & (0xFF << (2) * 8)) >> 8) | (((w) & (0xFF << (3) * 8)) >> 24);
}


x86 assembly (clang, -O0):
<reverse_endian>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
and    $0xff,%eax
shl    $0x18,%eax
mov    -0x4(%rbp),%ecx
and    $0xff00,%ecx
shl    $0x8,%ecx
or     %ecx,%eax
mov    -0x4(%rbp),%ecx
and    $0xff0000,%ecx
sar    $0x8,%ecx
or     %ecx,%eax
mov    -0x4(%rbp),%ecx
and    $0xff000000,%ecx
sar    $0x18,%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<reverse_endian>:
mov    %edi,%eax
and    $0xffffff,%eax
bswap  %eax
sar    $0x18,%edi
or     %edi,%eax
ret

LLVM IR (-O0):
define i32 @reverse_endian(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = and i32 %3, 255
%5 = shl i32 %4, 24
%6 = load i32, i32* %2
%7 = and i32 %6, 65280
%8 = shl i32 %7, 8
%9 = or i32 %5, %8
%10 = load i32, i32* %2
%11 = and i32 %10, 16711680
%12 = ashr i32 %11, 8
%13 = or i32 %9, %12
%14 = load i32, i32* %2
%15 = and i32 %14, -16777216
%16 = ashr i32 %15, 24
%17 = or i32 %13, %16
ret i32 %17
}

LLVM IR (-O2):
define i32 @reverse_endian(i32 %0) {
%2 = and i32 %0, 16777215
%3 = tail call i32 @llvm.bswap.i32(i32 %2)
%4 = ashr i32 %0, 24
%5 = or i32 %3, %4
ret i32 %5
}
/* Variables and functions */
scalar_t__ check_desa_cmpa();
scalar_t__ check_desa_cmpm();
scalar_t__ check_desa_eor_cmp();
int /*<<< orphan*/ desa_dcw();
void desa_lineB(void) {
  if (check_desa_cmpa())
    return;
  else if (check_desa_eor_cmp())
    return;
  else if (check_desa_cmpm())
    return;
  else
    desa_dcw();
  return;
}


x86 assembly (clang, -O0):
<desa_lineB>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1050 <check_desa_cmpa@plt>
cmp    $0x0,%rax
je     115a <desa_lineB+0x1a>
jmp    119c <desa_lineB+0x5c>
mov    $0x0,%al
call   1040 <check_desa_eor_cmp@plt>
cmp    $0x0,%rax
je     1170 <desa_lineB+0x30>
jmp    119c <desa_lineB+0x5c>
mov    $0x0,%al
call   1060 <check_desa_cmpm@plt>
cmp    $0x0,%rax
je     1186 <desa_lineB+0x46>
jmp    119c <desa_lineB+0x5c>
mov    $0x0,%al
call   1030 <desa_dcw@plt>
jmp    1192 <desa_lineB+0x52>
jmp    1197 <desa_lineB+0x57>
jmp    119c <desa_lineB+0x5c>
pop    %rbp
ret

x86 assembly (clang, -O2):
<desa_lineB>:
push   %rax
xor    %eax,%eax
call   1050 <check_desa_cmpa@plt>
test   %rax,%rax
jne    1165 <desa_lineB+0x25>
xor    %eax,%eax
call   1040 <check_desa_eor_cmp@plt>
test   %rax,%rax
jne    1165 <desa_lineB+0x25>
xor    %eax,%eax
call   1060 <check_desa_cmpm@plt>
test   %rax,%rax
je     1167 <desa_lineB+0x27>
pop    %rax
ret
xor    %eax,%eax
pop    %rcx
jmp    1030 <desa_dcw@plt>

LLVM IR (-O0):
define void @desa_lineB() {
%1 = call i64 (...) @check_desa_cmpa()
%2 = icmp ne i64 %1, 0
br i1 %2, label %3, label %4
3: ; preds = %0
br label %17
4: ; preds = %0
%5 = call i64 (...) @check_desa_eor_cmp()
%6 = icmp ne i64 %5, 0
br i1 %6, label %7, label %8
7: ; preds = %4
br label %17
8: ; preds = %4
%9 = call i64 (...) @check_desa_cmpm()
%10 = icmp ne i64 %9, 0
br i1 %10, label %11, label %12
11: ; preds = %8
br label %17
12: ; preds = %8
%13 = call i32 (...) @desa_dcw()
br label %14
14: ; preds = %12
br label %15
15: ; preds = %14
br label %16
16: ; preds = %15
br label %17
17: ; preds = %16, %11, %7, %3
ret void
}

LLVM IR (-O2):
define void @desa_lineB() {
%1 = tail call i64 (...) @check_desa_cmpa()
%2 = icmp eq i64 %1, 0
br i1 %2, label %3, label %11
3: ; preds = %0
%4 = tail call i64 (...) @check_desa_eor_cmp()
%5 = icmp eq i64 %4, 0
br i1 %5, label %6, label %11
6: ; preds = %3
%7 = tail call i64 (...) @check_desa_cmpm()
%8 = icmp eq i64 %7, 0
br i1 %8, label %9, label %11
9: ; preds = %6
%10 = tail call i32 (...) @desa_dcw()
br label %11
11: ; preds = %6, %3, %0, %9
ret void
}
int main() { return -1 >> 2; }


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

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

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

LLVM IR (-O2):
define i32 @main() {
ret i32 -1
}
void video_update() {}


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

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

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

LLVM IR (-O2):
define void @video_update() {
ret void
}
/* Type definitions */
struct timeval {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ free(struct timeval *);
int /*<<< orphan*/ printf(char *);
void free_time(void *arg) {
  struct timeval *timev = (struct timeval *)arg;
  printf("free_time:\n");
  free(timev);
}


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

x86 assembly (clang, -O2):
<free_time>:
push   %rbx
mov    %rdi,%rbx
lea    0xed5(%rip),%rdi
call   1040 <puts@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <free@plt>

LLVM IR (-O0):
%struct.timeval = type { i32 }
@.str = [12 x i8] c"free_time:\0A\00"
define void @free_time(i8* %0) {
%2 = alloca i8*
%3 = alloca %struct.timeval*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = bitcast i8* %4 to %struct.timeval*
store %struct.timeval* %5, %struct.timeval** %3
%6 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
%7 = load %struct.timeval*, %struct.timeval** %3
%8 = call i32 @free(%struct.timeval* %7)
ret void
}

LLVM IR (-O2):
%struct.timeval = type { i32 }
@str = [11 x i8] c"free_time:\00"
define void @free_time(i8* nocapture %0) {
%2 = bitcast i8* %0 to %struct.timeval*
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @str, i64 0, i64 0))
%4 = tail call i32 @free(%struct.timeval* %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ addstr(char *);
int /*<<< orphan*/ move(int, int);
mvaddstr(int r, int c, char *s) {
  move(r, c);
  addstr(s);
}


x86 assembly (clang, -O0):
<mvaddstr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%edi
mov    -0xc(%rbp),%esi
call   1040 <move@plt>
mov    -0x18(%rbp),%rdi
call   1030 <addstr@plt>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mvaddstr>:
push   %rbx
mov    %rdx,%rbx
call   1040 <move@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <addstr@plt>

LLVM IR (-O0):
define i32 @mvaddstr(i32 %0, i32 %1, i8* %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i8*
store i32 %0, i32* %5
store i32 %1, i32* %6
store i8* %2, i8** %7
%8 = load i32, i32* %5
%9 = load i32, i32* %6
%10 = call i32 @move(i32 %8, i32 %9)
%11 = load i8*, i8** %7
%12 = call i32 @addstr(i8* %11)
%13 = load i32, i32* %4
ret i32 %13
}

LLVM IR (-O2):
define i32 @mvaddstr(i32 %0, i32 %1, i8* %2) {
%4 = tail call i32 @move(i32 %0, i32 %1)
%5 = tail call i32 @addstr(i8* %2)
ret i32 undef
}
float Hex2DecMain(int *target, float multi, int index) {
  if (index == 1) {
    return *target * multi;
  } else {
    return (*target * multi) + Hex2DecMain(++target, multi / 16, --index);
  }
}


x86 assembly (clang, -O0):
<Hex2DecMain>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
movss  %xmm0,-0x14(%rbp)
mov    %esi,-0x18(%rbp)
cmpl   $0x1,-0x18(%rbp)
jne    1145 <Hex2DecMain+0x35>
mov    -0x10(%rbp),%rax
cvtsi2ssl (%rax),%xmm0
mulss  -0x14(%rbp),%xmm0
movss  %xmm0,-0x4(%rbp)
jmp    11a1 <Hex2DecMain+0x91>
mov    -0x10(%rbp),%rax
cvtsi2ssl (%rax),%xmm0
movss  %xmm0,-0x1c(%rbp)
movss  -0x14(%rbp),%xmm0
movss  %xmm0,-0x20(%rbp)
mov    -0x10(%rbp),%rdi
add    $0x4,%rdi
mov    %rdi,-0x10(%rbp)
movss  -0x14(%rbp),%xmm0
movss  0xe8b(%rip),%xmm1
divss  %xmm1,%xmm0
mov    -0x18(%rbp),%esi
add    $0xffffffff,%esi
mov    %esi,-0x18(%rbp)
call   1030 <Hex2DecMain@plt>
movss  -0x20(%rbp),%xmm2
movaps %xmm0,%xmm1
movss  -0x1c(%rbp),%xmm0
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Hex2DecMain>:
push   %rax
movaps %xmm0,%xmm1
xorps  %xmm0,%xmm0
cvtsi2ssl (%rdi),%xmm0
cmp    $0x1,%esi
jne    1126 <Hex2DecMain+0x16>
mulss  %xmm1,%xmm0
pop    %rax
ret
add    $0x4,%rdi
movss  %xmm0,0x4(%rsp)
movss  0xec8(%rip),%xmm0
mulss  %xmm1,%xmm0
add    $0xffffffff,%esi
movss  %xmm1,(%rsp)
call   1030 <Hex2DecMain@plt>
movss  0x4(%rsp),%xmm1
mulss  (%rsp),%xmm1
addss  %xmm1,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define float @Hex2DecMain(i32* %0, float %1, i32 %2) {
%4 = alloca float
%5 = alloca i32*
%6 = alloca float
%7 = alloca i32
store i32* %0, i32** %5
store float %1, float* %6
store i32 %2, i32* %7
%8 = load i32, i32* %7
%9 = icmp eq i32 %8, 1
br i1 %9, label %10, label %16
10: ; preds = %3
%11 = load i32*, i32** %5
%12 = load i32, i32* %11
%13 = sitofp i32 %12 to float
%14 = load float, float* %6
%15 = fmul float %13, %14
store float %15, float* %4
br label %29
16: ; preds = %3
%17 = load i32*, i32** %5
%18 = load i32, i32* %17
%19 = sitofp i32 %18 to float
%20 = load float, float* %6
%21 = load i32*, i32** %5
%22 = getelementptr inbounds i32, i32* %21, i32 1
store i32* %22, i32** %5
%23 = load float, float* %6
%24 = fdiv float %23, 1.600000e+01
%25 = load i32, i32* %7
%26 = add nsw i32 %25, -1
store i32 %26, i32* %7
%27 = call float @Hex2DecMain(i32* %22, float %24, i32 %26)
%28 = call float @llvm.fmuladd.f32(float %19, float %20, float %27)
store float %28, float* %4
br label %29
29: ; preds = %16, %10
%30 = load float, float* %4
ret float %30
}

LLVM IR (-O2):
define float @Hex2DecMain(i32* nocapture %0, float %1, i32 %2) {
%4 = icmp eq i32 %2, 1
%5 = load i32, i32* %0
%6 = sitofp i32 %5 to float
br i1 %4, label %7, label %11
7: ; preds = %3
%8 = fmul float %6, %1
br label %9
9: ; preds = %7, %11
%10 = phi float [ %16, %11 ], [ %8, %7 ]
ret float %10
11: ; preds = %3
%12 = getelementptr inbounds i32, i32* %0, i64 1
%13 = fmul float %1, 6.250000e-02
%14 = add nsw i32 %2, -1
%15 = tail call float @Hex2DecMain(i32* %12, float %13, i32 %14)
%16 = tail call float @llvm.fmuladd.f32(float %6, float %1, float %15)
br label %9
}
void mock_unbind_ppgtt(struct i915_address_space *vm, struct i915_vma *vma) {}


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

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

LLVM IR (-O0):
%struct.i915_address_space = type opaque
%struct.i915_vma = type opaque
define void @mock_unbind_ppgtt(%struct.i915_address_space* %0, %struct.i915_vma* %1) {
%3 = alloca %struct.i915_address_space*
%4 = alloca %struct.i915_vma*
store %struct.i915_address_space* %0, %struct.i915_address_space** %3
store %struct.i915_vma* %1, %struct.i915_vma** %4
ret void
}

LLVM IR (-O2):
%struct.i915_address_space = type opaque
%struct.i915_vma = type opaque
define void @mock_unbind_ppgtt(%struct.i915_address_space* nocapture %0, %struct.i915_vma* nocapture %1) {
ret void
}