xunge/DecIR huggingface dataset:
void test_builtin_conjl(_Complex long double ld) {
  if (__builtin_conjl(ld) != __builtin_conjl(ld))
    link_failure_builtin_conjl();
}


x86 assembly (clang, -O0):
<test_builtin_conjl>:
push   %rbp
mov    %rsp,%rbp
lea    0x10(%rbp),%rax
fldt   (%rax)
fldt   0x10(%rax)
fchs
fxch   %st(1)
fucomip %st(0),%st
setp   %al
fucomip %st(0),%st
setp   %cl
or     %cl,%al
test   $0x1,%al
jne    113a <test_builtin_conjl+0x2a>
jmp    1141 <test_builtin_conjl+0x31>
mov    $0x0,%al
call   1030 <link_failure_builtin_conjl@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_builtin_conjl>:
fldt   0x8(%rsp)
fldt   0x18(%rsp)
fxch   %st(1)
fucomip %st(1),%st
fstp   %st(0)
jp     1121 <test_builtin_conjl+0x11>
ret
xor    %eax,%eax
jmp    1030 <link_failure_builtin_conjl@plt>

LLVM IR (-O0):
define void @test_builtin_conjl({ x86_fp80, x86_fp80 }* byval({ x86_fp80, x86_fp80 }) align 16 %0) {
%2 = getelementptr inbounds { x86_fp80, x86_fp80 }, { x86_fp80, x86_fp80 }* %0, i32 0, i32 0
%3 = load x86_fp80, x86_fp80* %2
%4 = getelementptr inbounds { x86_fp80, x86_fp80 }, { x86_fp80, x86_fp80 }* %0, i32 0, i32 1
%5 = load x86_fp80, x86_fp80* %4
%6 = fneg x86_fp80 %5
%7 = getelementptr inbounds { x86_fp80, x86_fp80 }, { x86_fp80, x86_fp80 }* %0, i32 0, i32 0
%8 = load x86_fp80, x86_fp80* %7
%9 = getelementptr inbounds { x86_fp80, x86_fp80 }, { x86_fp80, x86_fp80 }* %0, i32 0, i32 1
%10 = load x86_fp80, x86_fp80* %9
%11 = fneg x86_fp80 %10
%12 = fcmp une x86_fp80 %3, %8
%13 = fcmp une x86_fp80 %6, %11
%14 = or i1 %12, %13
br i1 %14, label %15, label %17
15: ; preds = %1
%16 = call i32 (...) @link_failure_builtin_conjl()
br label %17
17: ; preds = %15, %1
ret void
}

LLVM IR (-O2):
define void @test_builtin_conjl({ x86_fp80, x86_fp80 }* nocapture byval({ x86_fp80, x86_fp80 }) align 16 %0) {
%2 = getelementptr inbounds { x86_fp80, x86_fp80 }, { x86_fp80, x86_fp80 }* %0, i64 0, i32 0
%3 = load x86_fp80, x86_fp80* %2
%4 = getelementptr inbounds { x86_fp80, x86_fp80 }, { x86_fp80, x86_fp80 }* %0, i64 0, i32 1
%5 = load x86_fp80, x86_fp80* %4
%6 = fcmp uno x86_fp80 %3, %5
br i1 %6, label %7, label %9
7: ; preds = %1
%8 = tail call i32 (...) @link_failure_builtin_conjl()
br label %9
9: ; preds = %7, %1
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ __m256i;

/* Variables and functions */
void _mm256_storeu_epi8(void *, int /*<<< orphan*/);
void test_mm256_storeu_epi8(void *__P, __m256i __A) {
  return _mm256_storeu_epi8(__P, __A);
}


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

x86 assembly (clang, -O2):
<test_mm256_storeu_epi8>:
jmp    1030 <_mm256_storeu_epi8@plt>

LLVM IR (-O0):
define void @test_mm256_storeu_epi8(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 = load i32, i32* %4
ret void
}

LLVM IR (-O2):
define void @test_mm256_storeu_epi8(i8* %0, i32 %1) {
tail call void @_mm256_storeu_epi8(i8* %0, i32 %1)
ret void
}
void g_param_value_defaults() {}


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

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

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

LLVM IR (-O2):
define void @g_param_value_defaults() {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ EVP_PKEY_CTX;
typedef int /*<<< orphan*/ EVP_PKEY;
typedef int /*<<< orphan*/ EC_KEY;

/* Variables and functions */
int /*<<< orphan*/ *EVP_PKEY_get0(int /*<<< orphan*/ *);
int /*<<< orphan*/ gost2001_keygen(int /*<<< orphan*/ *);
int /*<<< orphan*/ pkey_gost01_paramgen(int /*<<< orphan*/ *,
                                        int /*<<< orphan*/ *);
int pkey_gost01cp_keygen(EVP_PKEY_CTX *ctx, EVP_PKEY *pkey) {
  EC_KEY *ec;
  if (!pkey_gost01_paramgen(ctx, pkey))
    return 0;
  ec = EVP_PKEY_get0(pkey);
  gost2001_keygen(ec);
  return 1;
}


x86 assembly (clang, -O0):
<pkey_gost01cp_keygen>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1050 <pkey_gost01_paramgen@plt>
cmp    $0x0,%eax
jne    1162 <pkey_gost01cp_keygen+0x32>
movl   $0x0,-0x4(%rbp)
jmp    117f <pkey_gost01cp_keygen+0x4f>
mov    -0x18(%rbp),%rdi
call   1030 <EVP_PKEY_get0@plt>
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rdi
call   1040 <gost2001_keygen@plt>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pkey_gost01cp_keygen>:
push   %rbx
mov    %rsi,%rbx
call   1050 <pkey_gost01_paramgen@plt>
test   %eax,%eax
je     1154 <pkey_gost01cp_keygen+0x24>
mov    %rbx,%rdi
call   1030 <EVP_PKEY_get0@plt>
mov    %rax,%rdi
call   1040 <gost2001_keygen@plt>
mov    $0x1,%eax
pop    %rbx
ret
xor    %eax,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @pkey_gost01cp_keygen(i32* %0, i32* %1) {
%3 = tail call i32 @pkey_gost01_paramgen(i32* %0, i32* %1)
%4 = icmp eq i32 %3, 0
br i1 %4, label %8, label %5
5: ; preds = %2
%6 = tail call i32* @EVP_PKEY_get0(i32* %1)
%7 = tail call i32 @gost2001_keygen(i32* %6)
br label %8
8: ; preds = %2, %5
%9 = phi i32 [ 1, %5 ], [ 0, %2 ]
ret i32 %9
}
/* Variables and functions */
int goo(int *);
int foo5() {
  short array[10];
  return goo((int *)(array + 5));
}


x86 assembly (clang, -O0):
<foo5>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
lea    -0x20(%rbp),%rdi
add    $0xa,%rdi
call   1030 <goo@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo5>:
sub    $0x18,%rsp
lea    0xa(%rsp),%rdi
call   1030 <goo@plt>
add    $0x18,%rsp
ret

LLVM IR (-O0):
define i32 @foo5() {
%1 = alloca [10 x i16]
%2 = getelementptr inbounds [10 x i16], [10 x i16]* %1, i64 0, i64 0
%3 = getelementptr inbounds i16, i16* %2, i64 5
%4 = bitcast i16* %3 to i32*
%5 = call i32 @goo(i32* %4)
ret i32 %5
}

LLVM IR (-O2):
define i32 @foo5() {
%1 = alloca [10 x i16]
%2 = bitcast [10 x i16]* %1 to i8*
%3 = getelementptr inbounds [10 x i16], [10 x i16]* %1, i64 0, i64 5
%4 = bitcast i16* %3 to i32*
%5 = call i32 @goo(i32* %4)
ret i32 %5
}
/* Type definitions */
struct stat {
  int dummy;
};

/* Variables and functions */
scalar_t__ inc_addr(void *, int);
int stat(char *, struct stat *);
int bad_stat(void *addr) {
  return stat((char *)addr, (struct stat *)inc_addr(addr, 1));
}


x86 assembly (clang, -O0):
<bad_stat>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x1,%esi
call   1030 <inc_addr@plt>
mov    -0x10(%rbp),%rdi
mov    %rax,%rsi
call   1040 <stat@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bad_stat>:
push   %rbx
mov    %rdi,%rbx
mov    $0x1,%esi
call   1030 <inc_addr@plt>
mov    %rbx,%rdi
mov    %rax,%rsi
pop    %rbx
jmp    1040 <stat@plt>

LLVM IR (-O0):
%struct.stat = type { i32 }
define i32 @bad_stat(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = load i8*, i8** %2
%5 = call i64 @inc_addr(i8* %4, i32 1)
%6 = inttoptr i64 %5 to %struct.stat*
%7 = call i32 @stat(i8* %3, %struct.stat* %6)
ret i32 %7
}

LLVM IR (-O2):
%struct.stat = type { i32 }
define i32 @bad_stat(i8* %0) {
%2 = tail call i64 @inc_addr(i8* %0, i32 1)
%3 = inttoptr i64 %2 to %struct.stat*
%4 = tail call i32 @stat(i8* %0, %struct.stat* %3)
ret i32 %4
}
int test_imm_63int64_midword_mem(long long *val) {
  return ((*val >> 16) & (0x63 << 0)) ? -20 : -40;
}


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

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

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

LLVM IR (-O2):
define i32 @test_imm_63int64_midword_mem(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = and i64 %2, 6488064
%4 = icmp eq i64 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
SzToSt(sz, st) char *sz, *st;
{
  int cch = strlen(sz);
  bltb(sz, st + 1, cch);
  *st = cch;
}


x86 assembly (clang, -O0):
<SzToSt>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
add    $0x1,%rsi
mov    -0x1c(%rbp),%edx
mov    $0x0,%al
call   1040 <bltb@plt>
mov    -0x1c(%rbp),%eax
mov    %al,%cl
mov    -0x18(%rbp),%rax
mov    %cl,(%rax)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<SzToSt>:
push   %r15
push   %r14
push   %rbx
mov    %rsi,%r14
mov    %rdi,%rbx
call   1030 <strlen@plt>
mov    %rax,%r15
lea    0x1(%r14),%rsi
mov    %rbx,%rdi
mov    %r15d,%edx
xor    %eax,%eax
call   1040 <bltb@plt>
mov    %r15b,(%r14)
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define i32 @SzToSt(i8* %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i32
store i8* %0, i8** %4
store i8* %1, i8** %5
%7 = load i8*, i8** %4
%8 = call i64 @strlen(i8* %7)
%9 = trunc i64 %8 to i32
store i32 %9, i32* %6
%10 = load i8*, i8** %4
%11 = load i8*, i8** %5
%12 = getelementptr inbounds i8, i8* %11, i64 1
%13 = load i32, i32* %6
%14 = call i32 (i8*, i8*, i32, ...) bitcast (i32 (...)* @bltb to i32 (i8*, i8*, i32, ...)*)(i8* %10, i8* %12, i32 %13)
%15 = load i32, i32* %6
%16 = trunc i32 %15 to i8
%17 = load i8*, i8** %5
store i8 %16, i8* %17
%18 = load i32, i32* %3
ret i32 %18
}

LLVM IR (-O2):
define i32 @SzToSt(i8* %0, i8* %1) {
%3 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%4 = trunc i64 %3 to i32
%5 = getelementptr inbounds i8, i8* %1, i64 1
%6 = tail call i32 (i8*, i8*, i32, ...) bitcast (i32 (...)* @bltb to i32 (i8*, i8*, i32, ...)*)(i8* %0, i8* %5, i32 %4)
%7 = trunc i64 %3 to i8
store i8 %7, i8* %1
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ mmm(int);
int foo(int x, int y) {
  mmm(y);
  if (x != 0) {
    x++;
  }
  return 5 / x;
}


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x8(%rbp),%edi
call   1030 <mmm@plt>
cmpl   $0x0,-0x4(%rbp)
je     1139 <foo+0x29>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
mov    $0x5,%eax
cltd
idivl  -0x4(%rbp)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo>:
push   %rbx
mov    %edi,%ebx
mov    %esi,%edi
call   1030 <mmm@plt>
add    $0x1,%ebx
mov    $0x5,%eax
xor    %edx,%edx
idiv   %ebx
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @foo(i32 %0, i32 %1) {
%3 = tail call i32 @mmm(i32 %1)
%4 = add nsw i32 %0, 1
%5 = sdiv i32 5, %4
ret i32 %5
}
/* Type definitions */
struct __sk_buff {
  int dummy;
};
typedef int /*<<< orphan*/ __u8;

/* Variables and functions */
int skb_store_bytes(struct __sk_buff *, int, int /*<<< orphan*/ *, int,
                    int /*<<< orphan*/);
int eth_store_saddr(struct __sk_buff *skb, __u8 *mac, int off) {
  return skb_store_bytes(skb, off + 6, mac, 6, 0);
}


x86 assembly (clang, -O0):
<eth_store_saddr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x14(%rbp),%esi
add    $0x6,%esi
mov    -0x10(%rbp),%rdx
mov    $0x6,%ecx
xor    %r8d,%r8d
call   1030 <skb_store_bytes@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<eth_store_saddr>:
mov    %rsi,%rax
lea    0x6(%rdx),%esi
mov    %rax,%rdx
mov    $0x6,%ecx
xor    %r8d,%r8d
jmp    1030 <skb_store_bytes@plt>

LLVM IR (-O0):
%struct.__sk_buff = type { i32 }
define i32 @eth_store_saddr(%struct.__sk_buff* %0, i32* %1, i32 %2) {
%4 = alloca %struct.__sk_buff*
%5 = alloca i32*
%6 = alloca i32
store %struct.__sk_buff* %0, %struct.__sk_buff** %4
store i32* %1, i32** %5
store i32 %2, i32* %6
%7 = load %struct.__sk_buff*, %struct.__sk_buff** %4
%8 = load i32, i32* %6
%9 = add nsw i32 %8, 6
%10 = load i32*, i32** %5
%11 = call i32 @skb_store_bytes(%struct.__sk_buff* %7, i32 %9, i32* %10, i32 6, i32 0)
ret i32 %11
}

LLVM IR (-O2):
%struct.__sk_buff = type { i32 }
define i32 @eth_store_saddr(%struct.__sk_buff* %0, i32* %1, i32 %2) {
%4 = add nsw i32 %2, 6
%5 = tail call i32 @skb_store_bytes(%struct.__sk_buff* %0, i32 %4, i32* %1, i32 6, i32 0)
ret i32 %5
}
/* Type definitions */
typedef int uint;
typedef int pid_t;

/* Variables and functions */
uint proc_hash(pid_t tid) { return ((tid >> 4) ^ (tid)) % 1024; }


x86 assembly (clang, -O0):
<proc_hash>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
sar    $0x4,%eax
xor    -0x4(%rbp),%eax
mov    $0x400,%ecx
cltd
idiv   %ecx
mov    %edx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<proc_hash>:
mov    %edi,%eax
sar    $0x4,%eax
xor    %edi,%eax
lea    0x3ff(%rax),%ecx
test   %eax,%eax
cmovns %eax,%ecx
and    $0xfffffc00,%ecx
sub    %ecx,%eax
ret

LLVM IR (-O0):
define i32 @proc_hash(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = ashr i32 %3, 4
%5 = load i32, i32* %2
%6 = xor i32 %4, %5
%7 = srem i32 %6, 1024
ret i32 %7
}

LLVM IR (-O2):
define i32 @proc_hash(i32 %0) {
%2 = ashr i32 %0, 4
%3 = xor i32 %2, %0
%4 = srem i32 %3, 1024
ret i32 %4
}
long long pass_longlong(long long arg) { return arg; }


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

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

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

LLVM IR (-O2):
define i64 @pass_longlong(i64 returned %0) {
ret i64 %0
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ perror(char *);
void erreur_grave(char *msg) {
  perror(msg);
  exit(EXIT_FAILURE);
}


x86 assembly (clang, -O0):
<erreur_grave>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <perror@plt>
mov    0x2ea4(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<erreur_grave>:
push   %rax
call   1030 <perror@plt>
mov    0x2eb3(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@EXIT_FAILURE = global i32 0
define void @erreur_grave(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @perror(i8* %3)
%5 = load i32, i32* @EXIT_FAILURE
%6 = call i32 @exit(i32 %5)
unreachable
}

LLVM IR (-O2):
@EXIT_FAILURE = global i32 0
define void @erreur_grave(i8* nocapture %0) {
%2 = tail call i32 @perror(i8* %0)
%3 = load i32, i32* @EXIT_FAILURE
%4 = tail call i32 @exit(i32 %3)
unreachable
}
char memory_get_bit_from_dword(unsigned int value, unsigned char pos) {
  return ((value >> pos) & 0x1);
}


x86 assembly (clang, -O0):
<memory_get_bit_from_dword>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %edi,-0x4(%rbp)
mov    %al,-0x5(%rbp)
mov    -0x4(%rbp),%eax
movzbl -0x5(%rbp),%ecx
shr    %cl,%eax
and    $0x1,%eax
movsbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<memory_get_bit_from_dword>:
mov    %esi,%ecx
mov    %edi,%eax
shr    %cl,%eax
and    $0x1,%al
ret

LLVM IR (-O0):
define signext i8 @memory_get_bit_from_dword(i32 %0, i8 zeroext %1) {
%3 = alloca i32
%4 = alloca i8
store i32 %0, i32* %3
store i8 %1, i8* %4
%5 = load i32, i32* %3
%6 = load i8, i8* %4
%7 = zext i8 %6 to i32
%8 = lshr i32 %5, %7
%9 = and i32 %8, 1
%10 = trunc i32 %9 to i8
ret i8 %10
}

LLVM IR (-O2):
define signext i8 @memory_get_bit_from_dword(i32 %0, i8 zeroext %1) {
%3 = zext i8 %1 to i32
%4 = lshr i32 %0, %3
%5 = trunc i32 %4 to i8
%6 = and i8 %5, 1
ret i8 %6
}
unsigned long spl_debug_set_mask(unsigned long mask) { return (0); }


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

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

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

LLVM IR (-O2):
define i64 @spl_debug_set_mask(i64 %0) {
ret i64 0
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int /*<<< orphan*/ uint64_t;

/* Variables and functions */
int /*<<< orphan*/ loadN(int /*<<< orphan*/ *, int /*<<< orphan*/, int);
uint64_t fromMemory1(uint8_t *mem) { return loadN(mem, 0, 8); }


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

x86 assembly (clang, -O2):
<fromMemory1>:
xor    %esi,%esi
mov    $0x8,%edx
jmp    1030 <loadN@plt>

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

LLVM IR (-O2):
define i32 @fromMemory1(i32* %0) {
%2 = tail call i32 @loadN(i32* %0, i32 0, i32 8)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
void main() {
  int a = 10;
  int b = 20;
  printf("\n%d", a);
  printf("\na##2");
  printf("\n%d", b);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0xa,-0x4(%rbp)
movl   $0x14,-0x8(%rbp)
mov    -0x4(%rbp),%esi
lea    0xed0(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xec6(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%esi
lea    0xeb1(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xee8(%rip),%rbx
mov    %rbx,%rdi
mov    $0xa,%esi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xed6(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x14,%esi
xor    %eax,%eax
pop    %rbx
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [4 x i8] c"\0A%d\00"
@.str.1 = [6 x i8] c"\0Aa#\00"
define void @main() {
%1 = alloca i32
%2 = alloca i32
store i32 10, i32* %1
store i32 20, i32* %2
%3 = load i32, i32* %1
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %3)
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
%6 = load i32, i32* %2
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %6)
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"\0A%d\00"
@.str.1 = [6 x i8] c"\0Aa#\00"
define void @main() {
%1 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 10)
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 20)
ret void
}
int test_imm_59uint64_midword_reg(unsigned long long val) {
  return ((val >> 16) & (0x59 << 0)) ? -20 : -40;
}


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

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

LLVM IR (-O0):
define i32 @test_imm_59uint64_midword_reg(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = lshr i64 %3, 16
%5 = and i64 %4, 89
%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_59uint64_midword_reg(i64 %0) {
%2 = and i64 %0, 5832704
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Type definitions */
typedef char uint16_t;

/* Variables and functions */
uint16_t le_to_u16(char *buf) { return (buf[0] << 0) | (buf[1] << 8); }


x86 assembly (clang, -O0):
<le_to_u16>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
shl    $0x0,%eax
mov    -0x8(%rbp),%rcx
movsbl 0x1(%rcx),%ecx
shl    $0x8,%ecx
or     %ecx,%eax
movsbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<le_to_u16>:
mov    (%rdi),%al
ret

LLVM IR (-O0):
define signext i8 @le_to_u16(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 = shl i32 %6, 0
%8 = load i8*, i8** %2
%9 = getelementptr inbounds i8, i8* %8, i64 1
%10 = load i8, i8* %9
%11 = sext i8 %10 to i32
%12 = shl i32 %11, 8
%13 = or i32 %7, %12
%14 = trunc i32 %13 to i8
ret i8 %14
}

LLVM IR (-O2):
define signext i8 @le_to_u16(i8* nocapture %0) {
%2 = load i8, i8* %0
ret i8 %2
}
/* Variables and functions */
int /*<<< orphan*/ fetch_done();
int /*<<< orphan*/ insert_done();
void db_term_done(void) {
  fetch_done();
  insert_done();
}


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

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

LLVM IR (-O0):
define void @db_term_done() {
%1 = call i32 (...) @fetch_done()
%2 = call i32 (...) @insert_done()
ret void
}

LLVM IR (-O2):
define void @db_term_done() {
%1 = tail call i32 (...) @fetch_done()
%2 = tail call i32 (...) @insert_done()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ e_ora();
int /*<<< orphan*/ e_zpx();
void e_ora_zpx() {
  e_zpx();
  e_ora();
}


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

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

LLVM IR (-O0):
define void @e_ora_zpx() {
%1 = call i32 (...) @e_zpx()
%2 = call i32 (...) @e_ora()
ret void
}

LLVM IR (-O2):
define void @e_ora_zpx() {
%1 = tail call i32 (...) @e_zpx()
%2 = tail call i32 (...) @e_ora()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ LoadEngineSnapshotBuffers();
int /*<<< orphan*/ LoadEngineSnapshotValues_EM();
int /*<<< orphan*/ LoadEngineSnapshotValues_RND();
int /*<<< orphan*/ LoadEngineSnapshotValues_SP();
void LoadEngineSnapshot() {
  LoadEngineSnapshotBuffers();
  LoadEngineSnapshotValues_RND();
  LoadEngineSnapshotValues_EM();
  LoadEngineSnapshotValues_SP();
}


x86 assembly (clang, -O0):
<LoadEngineSnapshot>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1060 <LoadEngineSnapshotBuffers@plt>
mov    $0x0,%al
call   1040 <LoadEngineSnapshotValues_RND@plt>
mov    $0x0,%al
call   1050 <LoadEngineSnapshotValues_EM@plt>
mov    $0x0,%al
call   1030 <LoadEngineSnapshotValues_SP@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<LoadEngineSnapshot>:
push   %rax
xor    %eax,%eax
call   1060 <LoadEngineSnapshotBuffers@plt>
xor    %eax,%eax
call   1040 <LoadEngineSnapshotValues_RND@plt>
xor    %eax,%eax
call   1050 <LoadEngineSnapshotValues_EM@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <LoadEngineSnapshotValues_SP@plt>

LLVM IR (-O0):
define void @LoadEngineSnapshot() {
%1 = call i32 (...) @LoadEngineSnapshotBuffers()
%2 = call i32 (...) @LoadEngineSnapshotValues_RND()
%3 = call i32 (...) @LoadEngineSnapshotValues_EM()
%4 = call i32 (...) @LoadEngineSnapshotValues_SP()
ret void
}

LLVM IR (-O2):
define void @LoadEngineSnapshot() {
%1 = tail call i32 (...) @LoadEngineSnapshotBuffers()
%2 = tail call i32 (...) @LoadEngineSnapshotValues_RND()
%3 = tail call i32 (...) @LoadEngineSnapshotValues_EM()
%4 = tail call i32 (...) @LoadEngineSnapshotValues_SP()
ret void
}
/* Variables and functions */
bool uadd_is_oor(unsigned a, unsigned b) { return (a + b < a); }


x86 assembly (clang, -O0):
<uadd_is_oor>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
add    -0x8(%rbp),%eax
cmp    -0x4(%rbp),%eax
setb   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<uadd_is_oor>:
xor    %eax,%eax
add    %esi,%edi
setb   %al
ret

LLVM IR (-O0):
define i32 @uadd_is_oor(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = load i32, i32* %4
%7 = add i32 %5, %6
%8 = load i32, i32* %3
%9 = icmp ult i32 %7, %8
%10 = zext i1 %9 to i32
ret i32 %10
}

LLVM IR (-O2):
define i32 @uadd_is_oor(i32 %0, i32 %1) {
%3 = xor i32 %0, -1
%4 = icmp ult i32 %3, %1
%5 = zext i1 %4 to i32
ret i32 %5
}
/* Type definitions */
struct strarray {
  int dummy;
};
struct const_strarray {
  int dummy;
};

/* Variables and functions */
int strarray_cmp(struct strarray const *, struct strarray const *);
__attribute__((always_)) int strarray_cmp_c(const struct const_strarray *a1,
                                            const struct const_strarray *a2) {
  return strarray_cmp((const struct strarray *)a1, (const struct strarray *)a2);
}


x86 assembly (clang, -O0):
<strarray_cmp_c>:
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 <strarray_cmp@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strarray_cmp_c>:
jmp    1030 <strarray_cmp@plt>

LLVM IR (-O0):
%struct.const_strarray = type { i32 }
%struct.strarray = type { i32 }
define i32 @strarray_cmp_c(%struct.const_strarray* %0, %struct.const_strarray* %1) {
%3 = alloca %struct.const_strarray*
%4 = alloca %struct.const_strarray*
store %struct.const_strarray* %0, %struct.const_strarray** %3
store %struct.const_strarray* %1, %struct.const_strarray** %4
%5 = load %struct.const_strarray*, %struct.const_strarray** %3
%6 = bitcast %struct.const_strarray* %5 to %struct.strarray*
%7 = load %struct.const_strarray*, %struct.const_strarray** %4
%8 = bitcast %struct.const_strarray* %7 to %struct.strarray*
%9 = call i32 @strarray_cmp(%struct.strarray* %6, %struct.strarray* %8)
ret i32 %9
}

LLVM IR (-O2):
%struct.const_strarray = type { i32 }
%struct.strarray = type { i32 }
define i32 @strarray_cmp_c(%struct.const_strarray* %0, %struct.const_strarray* %1) {
%3 = bitcast %struct.const_strarray* %0 to %struct.strarray*
%4 = bitcast %struct.const_strarray* %1 to %struct.strarray*
%5 = tail call i32 @strarray_cmp(%struct.strarray* %3, %struct.strarray* %4)
ret i32 %5
}
/* Variables and functions */
int ceil(double);
unsigned int UsecToNsec(double time) {
  int ns = ceil((double)(time * 100000000) / 1000000);
  return ns;
}


x86 assembly (clang, -O0):
<UsecToNsec>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  0xee3(%rip),%xmm0
mulsd  -0x8(%rbp),%xmm0
movsd  0xece(%rip),%xmm1
divsd  %xmm1,%xmm0
call   1030 <ceil@plt>
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<UsecToNsec>:
mulsd  0xee8(%rip),%xmm0
divsd  0xee8(%rip),%xmm0
jmp    1030 <ceil@plt>

LLVM IR (-O0):
define i32 @UsecToNsec(double %0) {
%2 = alloca double
%3 = alloca i32
store double %0, double* %2
%4 = load double, double* %2
%5 = fmul double %4, 1.000000e+08
%6 = fdiv double %5, 1.000000e+06
%7 = call i32 @ceil(double %6)
store i32 %7, i32* %3
%8 = load i32, i32* %3
ret i32 %8
}

LLVM IR (-O2):
define i32 @UsecToNsec(double %0) {
%2 = fmul double %0, 1.000000e+08
%3 = fdiv double %2, 1.000000e+06
%4 = tail call i32 @ceil(double %3)
ret i32 %4
}
void iface_stat_update(dev) {}


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

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

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

LLVM IR (-O2):
define void @iface_stat_update(i32 %0) {
ret void
}
unsigned long int cast_int_ulong(int x) { return (unsigned long int)x; }


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

x86 assembly (clang, -O2):
<cast_int_ulong>:
movslq %edi,%rax
ret

LLVM IR (-O0):
define i64 @cast_int_ulong(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = sext i32 %3 to i64
ret i64 %4
}

LLVM IR (-O2):
define i64 @cast_int_ulong(i32 %0) {
%2 = sext i32 %0 to i64
ret i64 %2
}
/* Variables and functions */
int size_ispow2(const size_t x) { return (x > 0 && (x & (x - 1)) == 0); }


x86 assembly (clang, -O0):
<size_ispow2>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
xor    %eax,%eax
cmpq   $0x0,-0x8(%rbp)
mov    %al,-0x9(%rbp)
jbe    1131 <size_ispow2+0x31>
mov    -0x8(%rbp),%rax
mov    -0x8(%rbp),%rcx
sub    $0x1,%rcx
and    %rcx,%rax
cmp    $0x0,%rax
sete   %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<size_ispow2>:
test   %rdi,%rdi
je     1112 <size_ispow2+0x12>
lea    -0x1(%rdi),%rcx
xor    %eax,%eax
test   %rcx,%rdi
sete   %al
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @size_ispow2(i64 %0) {
%2 = icmp eq i64 %0, 0
br i1 %2, label %7, label %3
3: ; preds = %1
%4 = tail call i64 @llvm.ctpop.i64(i64 %0)
%5 = icmp ult i64 %4, 2
%6 = zext i1 %5 to i32
br label %7
7: ; preds = %3, %1
%8 = phi i32 [ 0, %1 ], [ %6, %3 ]
ret i32 %8
}
/* Type definitions */
struct sqlConnection {
  int dummy;
};

/* Variables and functions */
char *stringFieldInSubmissionSet(struct sqlConnection *, int, char *);
char *genePixItemUrl(struct sqlConnection *conn, int id) {
  return stringFieldInSubmissionSet(conn, id, "itemUrl");
}


x86 assembly (clang, -O0):
<genePixItemUrl>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
lea    0xed3(%rip),%rdx
call   1030 <stringFieldInSubmissionSet@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<genePixItemUrl>:
lea    0xee9(%rip),%rdx
jmp    1030 <stringFieldInSubmissionSet@plt>

LLVM IR (-O0):
%struct.sqlConnection = type { i32 }
@.str = [8 x i8] c"itemUrl\00"
define i8* @genePixItemUrl(%struct.sqlConnection* %0, i32 %1) {
%3 = alloca %struct.sqlConnection*
%4 = alloca i32
store %struct.sqlConnection* %0, %struct.sqlConnection** %3
store i32 %1, i32* %4
%5 = load %struct.sqlConnection*, %struct.sqlConnection** %3
%6 = load i32, i32* %4
%7 = call i8* @stringFieldInSubmissionSet(%struct.sqlConnection* %5, i32 %6, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
ret i8* %7
}

LLVM IR (-O2):
%struct.sqlConnection = type { i32 }
@.str = [8 x i8] c"itemUrl\00"
define i8* @genePixItemUrl(%struct.sqlConnection* %0, i32 %1) {
%3 = tail call i8* @stringFieldInSubmissionSet(%struct.sqlConnection* %0, i32 %1, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
ret i8* %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void usage(void) {
  printf("solo implements a shell singleton. By wrapping acommand invocation "
         "with solo\n"
         "solo, the program is guaranteed to be the only one among others "
         "wrapped with\n"
         "solo that is running at a given time.\n"
         "\n"
         "Usage: solo COMMAND\n"
         "       solo [-l|--lockfile] LOCKFILE COMMAND\n");
}


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

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

LLVM IR (-O0):
@.str = [259 x i8] c"solo implements a shell singleton. By wrapping acommand invocation with solo\0Asolo, the program is guaranteed to be the only one among others wrapped with\0Asolo that is running at a given time.\0A\0AUsage: solo COMMAND\0A solo [-l|--lockfile] LOCKFILE COMMAND\0A\00"
define void @usage() {
%1 = call i32 @printf(i8* getelementptr inbounds ([259 x i8], [259 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [258 x i8] c"solo implements a shell singleton. By wrapping acommand invocation with solo\0Asolo, the program is guaranteed to be the only one among others wrapped with\0Asolo that is running at a given time.\0A\0AUsage: solo COMMAND\0A solo [-l|--lockfile] LOCKFILE COMMAND\00"
define void @usage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([258 x i8], [258 x i8]* @str, i64 0, i64 0))
ret void
}
char *strcpy(char *s1, const char *s2) {
  char *p1;
  const char *p2;
  for (p1 = s1, p2 = s2; (*p1 = *p2) != '\0'; p1++, p2++)
    ;
  return s1;
}


x86 assembly (clang, -O0):
<strcpy>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
mov    (%rax),%al
mov    -0x18(%rbp),%rcx
mov    %al,(%rcx)
movsbl %al,%eax
cmp    $0x0,%eax
je     1156 <strcpy+0x56>
jmp    1139 <strcpy+0x39>
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
mov    -0x20(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x20(%rbp)
jmp    111c <strcpy+0x1c>
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<strcpy>:
mov    %rdi,%rax
mov    (%rsi),%cl
mov    %cl,(%rdi)
test   %cl,%cl
je     111f <strcpy+0x1f>
mov    $0x1,%ecx
movzbl (%rsi,%rcx,1),%edx
mov    %dl,(%rax,%rcx,1)
add    $0x1,%rcx
test   %dl,%dl
jne    1110 <strcpy+0x10>
ret

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

LLVM IR (-O2):
define i8* @strcpy(i8* returned writeonly %0, i8* nocapture %1) {
%3 = load i8, i8* %1
store i8 %3, i8* %0
%4 = icmp eq i8 %3, 0
br i1 %4, label %12, label %5
5: ; preds = %2, %5
%6 = phi i8* [ %9, %5 ], [ %1, %2 ]
%7 = phi i8* [ %8, %5 ], [ %0, %2 ]
%8 = getelementptr inbounds i8, i8* %7, i64 1
%9 = getelementptr inbounds i8, i8* %6, i64 1
%10 = load i8, i8* %9
store i8 %10, i8* %8
%11 = icmp eq i8 %10, 0
br i1 %11, label %12, label %5
12: ; preds = %5, %2
ret i8* %0
}
/* Variables and functions */
double fromRep64(int);
double makeInf64(void) { return fromRep64(0x7ff0000000000000UL); }


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

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

LLVM IR (-O0):
define double @makeInf64() {
%1 = call double @fromRep64(i32 0)
ret double %1
}

LLVM IR (-O2):
define double @makeInf64() {
%1 = tail call double @fromRep64(i32 0)
ret double %1
}
int open_audio_output(int dev, int srate, int chans, int format, int size) {
  return (-1);
}


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

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

LLVM IR (-O0):
define i32 @open_audio_output(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4) {
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
store i32 %0, i32* %6
store i32 %1, i32* %7
store i32 %2, i32* %8
store i32 %3, i32* %9
store i32 %4, i32* %10
ret i32 -1
}

LLVM IR (-O2):
define i32 @open_audio_output(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4) {
ret i32 -1
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void usage() {
  fprintf(
      stderr,
      "USAGE:\n encrypt <target_file> <xor_cypher_file> [<optional_offset>]\n");
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ec5(%rip),%rax
mov    (%rax),%edi
lea    0xedc(%rip),%rsi
call   1030 <fprintf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<usage>:
mov    0x2ec9(%rip),%rax
mov    (%rax),%edi
lea    0xee0(%rip),%rsi
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [69 x i8] c"USAGE:\0A encrypt <target_file> <xor_cypher_file> [<optional_offset>]\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([69 x i8], [69 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [69 x i8] c"USAGE:\0A encrypt <target_file> <xor_cypher_file> [<optional_offset>]\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([69 x i8], [69 x i8]* @.str, i64 0, i64 0))
ret void
}
int test_imm_F8uint8_reg(unsigned char val) {
  return ((val) & (0xF8 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_F8uint8_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%edx
and    $0xf8,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_F8uint8_reg>:
cmp    $0x8,%dil
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmovb  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_F8uint8_reg(i8 zeroext %0) {
%2 = icmp ult i8 %0, 8
%3 = select i1 %2, i32 -40, i32 -20
ret i32 %3
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ ffclose(int /*<<< orphan*/ *);
int fget_lines(int /*<<< orphan*/ *, char ***);
int /*<<< orphan*/ *libopen(char *);
int /*<<< orphan*/ set_warning_line(char *, int);
int get_lines(char *db, char ***strings) {
  FILE *in;
  int nstr;
  set_warning_line(db, 1);
  in = libopen(db);
  nstr = fget_lines(in, strings);
  ffclose(in);
  return nstr;
}


x86 assembly (clang, -O0):
<get_lines>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x1,%esi
call   1030 <set_warning_line@plt>
mov    -0x8(%rbp),%rdi
call   1040 <libopen@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1060 <fget_lines@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x18(%rbp),%rdi
call   1050 <ffclose@plt>
mov    -0x1c(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_lines>:
push   %rbp
push   %r14
push   %rbx
mov    %rsi,%r14
mov    %rdi,%rbx
mov    $0x1,%esi
call   1030 <set_warning_line@plt>
mov    %rbx,%rdi
call   1040 <libopen@plt>
mov    %rax,%rbx
mov    %rax,%rdi
mov    %r14,%rsi
call   1060 <fget_lines@plt>
mov    %eax,%ebp
mov    %rbx,%rdi
call   1050 <ffclose@plt>
mov    %ebp,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
define i32 @get_lines(i8* %0, i8*** %1) {
%3 = alloca i8*
%4 = alloca i8***
%5 = alloca i32*
%6 = alloca i32
store i8* %0, i8** %3
store i8*** %1, i8**** %4
%7 = load i8*, i8** %3
%8 = call i32 @set_warning_line(i8* %7, i32 1)
%9 = load i8*, i8** %3
%10 = call i32* @libopen(i8* %9)
store i32* %10, i32** %5
%11 = load i32*, i32** %5
%12 = load i8***, i8**** %4
%13 = call i32 @fget_lines(i32* %11, i8*** %12)
store i32 %13, i32* %6
%14 = load i32*, i32** %5
%15 = call i32 @ffclose(i32* %14)
%16 = load i32, i32* %6
ret i32 %16
}

LLVM IR (-O2):
define i32 @get_lines(i8* %0, i8*** %1) {
%3 = tail call i32 @set_warning_line(i8* %0, i32 1)
%4 = tail call i32* @libopen(i8* %0)
%5 = tail call i32 @fget_lines(i32* %4, i8*** %1)
%6 = tail call i32 @ffclose(i32* %4)
ret i32 %5
}
unsigned int HSMMCSDIsCardInserted(unsigned int baseAddr) {
  return ((*((volatile unsigned int *)(baseAddr + (0x224)))) & (0x00010000u)) >>
         (0x00000010u);
}


x86 assembly (clang, -O0):
<HSMMCSDIsCardInserted>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x224,%eax
mov    %eax,%eax
mov    (%rax),%eax
and    $0x10000,%eax
shr    $0x10,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<HSMMCSDIsCardInserted>:
add    $0x224,%edi
mov    (%rdi),%eax
shr    $0x10,%eax
and    $0x1,%eax
ret

LLVM IR (-O0):
define i32 @HSMMCSDIsCardInserted(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = add i32 %3, 548
%5 = zext i32 %4 to i64
%6 = inttoptr i64 %5 to i32*
%7 = load volatile i32, i32* %6
%8 = and i32 %7, 65536
%9 = lshr i32 %8, 16
ret i32 %9
}

LLVM IR (-O2):
define i32 @HSMMCSDIsCardInserted(i32 %0) {
%2 = add i32 %0, 548
%3 = zext i32 %2 to i64
%4 = inttoptr i64 %3 to i32*
%5 = load volatile i32, i32* %4
%6 = lshr i32 %5, 16
%7 = and i32 %6, 1
ret i32 %7
}
void BGRAToI420() {}


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

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

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

LLVM IR (-O2):
define void @BGRAToI420() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int munmap(void *, unsigned int);
int /*<<< orphan*/ printf(char *, int);
void *unmapmem(void *addr, unsigned int size) {
  int s = munmap(addr, size);
  if (s != 0) {
    printf("munmap error %d\n", s);
    exit(-1);
  }
}


x86 assembly (clang, -O0):
<unmapmem>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x14(%rbp),%esi
call   1040 <munmap@plt>
mov    %eax,-0x18(%rbp)
cmpl   $0x0,-0x18(%rbp)
je     1171 <unmapmem+0x41>
mov    -0x18(%rbp),%esi
lea    0xe9e(%rip),%rdi
call   1030 <printf@plt>
mov    $0xffffffff,%edi
call   1050 <exit@plt>
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<unmapmem>:
push   %rax
call   1040 <munmap@plt>
test   %eax,%eax
jne    113c <unmapmem+0xc>
pop    %rcx
ret
lea    0xebd(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
mov    $0xffffffff,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [17 x i8] c"munmap error %d\0A\00"
define i8* @unmapmem(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i32
store i8* %0, i8** %4
store i32 %1, i32* %5
%7 = load i8*, i8** %4
%8 = load i32, i32* %5
%9 = call i32 @munmap(i8* %7, i32 %8)
store i32 %9, i32* %6
%10 = load i32, i32* %6
%11 = icmp ne i32 %10, 0
br i1 %11, label %12, label %16
12: ; preds = %2
%13 = load i32, i32* %6
%14 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i32 %13)
%15 = call i32 @exit(i32 -1)
unreachable
16: ; preds = %2
%17 = load i8*, i8** %3
ret i8* %17
}

LLVM IR (-O2):
@.str = [17 x i8] c"munmap error %d\0A\00"
define noalias i8* @unmapmem(i8* %0, i32 %1) {
%3 = tail call i32 @munmap(i8* %0, i32 %1)
%4 = icmp eq i32 %3, 0
br i1 %4, label %8, label %5
5: ; preds = %2
%6 = tail call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i32 %3)
%7 = tail call i32 @exit(i32 -1)
unreachable
8: ; preds = %2
ret i8* undef
}
int main() {
  unsigned int arg = 0x12345678;
  unsigned int out = 0;
  __asm__("bsrl %%eax, %%ecx" : "=c"(out) : "a"(arg));
  return (out == 28);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movl   $0x12345678,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%eax
bsr    %eax,%ecx
mov    %ecx,-0xc(%rbp)
cmpl   $0x1c,-0xc(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
mov    $0x12345678,%eax
bsr    %eax,%ecx
xor    %eax,%eax
cmp    $0x1c,%ecx
sete   %al
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
store i32 305419896, i32* %2
store i32 0, i32* %3
%4 = load i32, i32* %2
%5 = call i32 asm "bsrl %eax, %ecx", "={cx},{ax},~{dirflag},~{fpsr},~{flags}"(i32 %4)
store i32 %5, i32* %3
%6 = load i32, i32* %3
%7 = icmp eq i32 %6, 28
%8 = zext i1 %7 to i32
ret i32 %8
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 asm "bsrl %eax, %ecx", "={cx},{ax},~{dirflag},~{fpsr},~{flags}"(i32 305419896)
%2 = icmp eq i32 %1, 28
%3 = zext i1 %2 to i32
ret i32 %3
}
void ff_hevc_put_hevc_uni_w_epel_v64_10_sse4() {}


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

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

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

LLVM IR (-O2):
define void @ff_hevc_put_hevc_uni_w_epel_v64_10_sse4() {
ret void
}