xunge/DecIR huggingface dataset:
int test_imm_12uint64_midword_mem(unsigned long long *val) {
  return ((*val >> 16) & (0x12 << 0)) ? -20 : -40;
}


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

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

LLVM IR (-O0):
define i32 @test_imm_12uint64_midword_mem(i64* %0) {
%2 = alloca i64*
store i64* %0, i64** %2
%3 = load i64*, i64** %2
%4 = load i64, i64* %3
%5 = lshr i64 %4, 16
%6 = and i64 %5, 18
%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_12uint64_midword_mem(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = and i64 %2, 1179648
%4 = icmp eq i64 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
__typeof__(puts(1)) test_puts_203(void) { return puts(1); }


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

x86 assembly (clang, -O2):
<test_puts_203>:
mov    $0x1,%edi
xor    %eax,%eax
jmp    1030 <puts@plt>

LLVM IR (-O0):
define i32 @test_puts_203() {
%1 = call i32 (i32, ...) bitcast (i32 (...)* @puts to i32 (i32, ...)*)(i32 1)
ret i32 %1
}

LLVM IR (-O2):
define i32 @test_puts_203() {
%1 = tail call i32 (i32, ...) bitcast (i32 (...)* @puts to i32 (i32, ...)*)(i32 1)
ret i32 %1
}
__attribute__((no, noclone)) unsigned __int128 t154_5sub(unsigned __int128 x) {
  unsigned __int128 r;
  if (__builtin_sub_overflow(x, (signed __int128)(6), &r))
    bar();
  return r;
}


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

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

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

LLVM IR (-O2):
define { i64, i64 } @t154_5sub(i64 %0, i64 %1) {
%3 = zext i64 %1 to i128
%4 = shl nuw i128 %3, 64
%5 = zext i64 %0 to i128
%6 = or i128 %4, %5
%7 = zext i128 %6 to i129
%8 = add nsw i129 %7, -6
%9 = icmp ult i128 %6, 6
br i1 %9, label %10, label %12
10: ; preds = %2
%11 = tail call i32 (...) @bar()
br label %12
12: ; preds = %10, %2
%13 = trunc i129 %8 to i64
%14 = lshr i129 %8, 64
%15 = trunc i129 %14 to i64
%16 = insertvalue { i64, i64 } poison, i64 %13, 0
%17 = insertvalue { i64, i64 } %16, i64 %15, 1
ret { i64, i64 } %17
}
/* Variables and functions */
int unlink(char *);
int fb_lfs_unlink(char *path) { return (unlink(path)); }


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

x86 assembly (clang, -O2):
<fb_lfs_unlink>:
jmp    1030 <unlink@plt>

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

LLVM IR (-O2):
define i32 @fb_lfs_unlink(i8* nocapture %0) {
%2 = tail call i32 @unlink(i8* %0)
ret i32 %2
}
int main() {
  const i;
  const const *const ii;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
/* Variables and functions */
int compress_javascript_chunk(unsigned char const *, int, unsigned char *);
int hopt_pack_javascript(const unsigned char *src, int srclen,
                         unsigned char *dst) {
  return (compress_javascript_chunk(src, srclen, dst));
}


x86 assembly (clang, -O0):
<hopt_pack_javascript>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x18(%rbp),%rdx
call   1030 <compress_javascript_chunk@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<hopt_pack_javascript>:
jmp    1030 <compress_javascript_chunk@plt>

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

LLVM IR (-O2):
define i32 @hopt_pack_javascript(i8* %0, i32 %1, i8* %2) {
%4 = tail call i32 @compress_javascript_chunk(i8* %0, i32 %1, i8* %2)
ret i32 %4
}
void cmpxchg_386_u16(void) { nsc_assert(0, __func__); }


x86 assembly (clang, -O0):
<cmpxchg_386_u16>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
lea    0xee3(%rip),%rsi
mov    $0x0,%al
call   1030 <nsc_assert@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<cmpxchg_386_u16>:
lea    0xee9(%rip),%rsi
xor    %edi,%edi
xor    %eax,%eax
jmp    1030 <nsc_assert@plt>

LLVM IR (-O0):
@__func__.cmpxchg_386_u16 = [16 x i8] c"cmpxchg_386_u16\00"
define void @cmpxchg_386_u16() {
%1 = call i32 (i32, i8*, ...) bitcast (i32 (...)* @nsc_assert to i32 (i32, i8*, ...)*)(i32 0, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @__func__.cmpxchg_386_u16, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@__func__.cmpxchg_386_u16 = [16 x i8] c"cmpxchg_386_u16\00"
define void @cmpxchg_386_u16() {
%1 = tail call i32 (i32, i8*, ...) bitcast (i32 (...)* @nsc_assert to i32 (i32, i8*, ...)*)(i32 0, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @__func__.cmpxchg_386_u16, i64 0, i64 0))
ret void
}
void dummy_clear(int x1 __attribute__((unused)), int y1 __attribute__((unused)),
                 int x2 __attribute__((unused)), int y2 __attribute__((unused)),
                 int c __attribute__((unused))) {}


x86 assembly (clang, -O0):
<dummy_clear>:
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)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @dummy_clear(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 void
}

LLVM IR (-O2):
define void @dummy_clear(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4) {
ret void
}
int pinctrl_bind_pins(struct vmm_device *dev) { return 0; }


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

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

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

LLVM IR (-O2):
%struct.vmm_device = type opaque
define i32 @pinctrl_bind_pins(%struct.vmm_device* nocapture readnone %0) {
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int fwrite(void *, size_t, int, int /*<<< orphan*/ *);
int fput(void *up, void *down, FILE *fp) {
  size_t size = (size_t)((char *)down - (char *)up);
  if (fwrite(up, size, 1, fp) != 1)
    return 0;
  return 1;
}


x86 assembly (clang, -O0):
<fput>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    -0x18(%rbp),%rax
mov    -0x10(%rbp),%rcx
sub    %rcx,%rax
mov    %rax,-0x28(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x28(%rbp),%rsi
mov    -0x20(%rbp),%rcx
mov    $0x1,%edx
call   1030 <fwrite@plt>
cmp    $0x1,%eax
je     115e <fput+0x4e>
movl   $0x0,-0x4(%rbp)
jmp    1165 <fput+0x55>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fput>:
push   %rax
mov    %rdx,%rcx
sub    %rdi,%rsi
mov    $0x1,%edx
call   1030 <fwrite@plt>
xor    %ecx,%ecx
cmp    $0x1,%eax
sete   %cl
mov    %ecx,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @fput(i8* %0, i8* %1, i32* nocapture %2) {
%4 = ptrtoint i8* %1 to i64
%5 = ptrtoint i8* %0 to i64
%6 = sub i64 %4, %5
%7 = tail call i32 @fwrite(i8* %0, i64 %6, i32 1, i32* %2)
%8 = icmp eq i32 %7, 1
%9 = zext i1 %8 to i32
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ getegid();
int /*<<< orphan*/ getgid();
int /*<<< orphan*/ quit(char *);
scalar_t__ setregid(int /*<<< orphan*/, int /*<<< orphan*/);
void safe_setuid_drop(void) {
  if (setregid(getegid(), getgid()) != 0) {
    quit("setregid(): cannot set permissions correctly!");
  }
}


x86 assembly (clang, -O0):
<safe_setuid_drop>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1050 <getegid@plt>
mov    %eax,-0x4(%rbp)
mov    $0x0,%al
call   1040 <getgid@plt>
mov    -0x4(%rbp),%edi
mov    %eax,%esi
call   1060 <setregid@plt>
cmp    $0x0,%rax
je     1179 <safe_setuid_drop+0x39>
lea    0xe8c(%rip),%rdi
call   1030 <quit@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<safe_setuid_drop>:
push   %rbx
xor    %eax,%eax
call   1050 <getegid@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   1040 <getgid@plt>
mov    %ebx,%edi
mov    %eax,%esi
call   1060 <setregid@plt>
test   %rax,%rax
je     116c <safe_setuid_drop+0x2c>
lea    0xe9a(%rip),%rdi
pop    %rbx
jmp    1030 <quit@plt>
pop    %rbx
ret

LLVM IR (-O0):
@.str = [46 x i8] c"setregid(): cannot set permissions correctly!\00"
define void @safe_setuid_drop() {
%1 = call i32 (...) @getegid()
%2 = call i32 (...) @getgid()
%3 = call i64 @setregid(i32 %1, i32 %2)
%4 = icmp ne i64 %3, 0
br i1 %4, label %5, label %7
5: ; preds = %0
%6 = call i32 @quit(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str, i64 0, i64 0))
br label %7
7: ; preds = %5, %0
ret void
}

LLVM IR (-O2):
@.str = [46 x i8] c"setregid(): cannot set permissions correctly!\00"
define void @safe_setuid_drop() {
%1 = tail call i32 (...) @getegid()
%2 = tail call i32 (...) @getgid()
%3 = tail call i64 @setregid(i32 %1, i32 %2)
%4 = icmp eq i64 %3, 0
br i1 %4, label %7, label %5
5: ; preds = %0
%6 = tail call i32 @quit(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str, i64 0, i64 0))
br label %7
7: ; preds = %5, %0
ret void
}
/* Variables and functions */
int SerialAPI_request(unsigned char *, int);
int ZW_GetSerialCapability() {
  unsigned char buf[255];
  buf[0] = 0x00;
  buf[1] = 0x7;
  return SerialAPI_request(buf, 2);
}


x86 assembly (clang, -O0):
<ZW_GetSerialCapability>:
push   %rbp
mov    %rsp,%rbp
sub    $0x100,%rsp
movb   $0x0,-0x100(%rbp)
movb   $0x7,-0xff(%rbp)
lea    -0x100(%rbp),%rdi
mov    $0x2,%esi
call   1030 <SerialAPI_request@plt>
add    $0x100,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ZW_GetSerialCapability>:
sub    $0x108,%rsp
movw   $0x700,(%rsp)
mov    %rsp,%rdi
mov    $0x2,%esi
call   1030 <SerialAPI_request@plt>
add    $0x108,%rsp
ret

LLVM IR (-O0):
define i32 @ZW_GetSerialCapability() {
%1 = alloca [255 x i8]
%2 = getelementptr inbounds [255 x i8], [255 x i8]* %1, i64 0, i64 0
store i8 0, i8* %2
%3 = getelementptr inbounds [255 x i8], [255 x i8]* %1, i64 0, i64 1
store i8 7, i8* %3
%4 = getelementptr inbounds [255 x i8], [255 x i8]* %1, i64 0, i64 0
%5 = call i32 @SerialAPI_request(i8* %4, i32 2)
ret i32 %5
}

LLVM IR (-O2):
define i32 @ZW_GetSerialCapability() {
%1 = alloca [255 x i8]
%2 = getelementptr inbounds [255 x i8], [255 x i8]* %1, i64 0, i64 0
store i8 0, i8* %2
%3 = getelementptr inbounds [255 x i8], [255 x i8]* %1, i64 0, i64 1
store i8 7, i8* %3
%4 = call i32 @SerialAPI_request(i8* %2, i32 2)
ret i32 %4
}
/* Variables and functions */
int __VERIFIER_nondet_int();
int main() {
  int i;
  i = __VERIFIER_nondet_int();
  while (i <= 2147483647) {
    i = i + 1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <__VERIFIER_nondet_int@plt>
mov    %eax,-0x8(%rbp)
cmpl   $0x7fffffff,-0x8(%rbp)
jg     1144 <main+0x34>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1129 <main+0x19>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
%3 = call i32 (...) @__VERIFIER_nondet_int()
store i32 %3, i32* %2
br label %4
4: ; preds = %7, %0
%5 = load i32, i32* %2
%6 = icmp sle i32 %5, 2147483647
br i1 %6, label %7, label %10
7: ; preds = %4
%8 = load i32, i32* %2
%9 = add nsw i32 %8, 1
store i32 %9, i32* %2
br label %4
10: ; preds = %4
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @__VERIFIER_nondet_int()
unreachable
}
/* Variables and functions */
int sprintf(char *, char *, long);
char *long2s(char buffer[], long int value) {
  if (sprintf(buffer, "%ld", value) < 1)
    return ((char *)NULL);
  return (buffer);
}


x86 assembly (clang, -O0):
<long2s>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rdx
lea    0xed1(%rip),%rsi
call   1030 <sprintf@plt>
cmp    $0x1,%eax
jge    114a <long2s+0x3a>
movq   $0x0,-0x8(%rbp)
jmp    1152 <long2s+0x42>
mov    -0x10(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<long2s>:
push   %rbx
mov    %rsi,%rdx
mov    %rdi,%rbx
lea    0xee2(%rip),%rsi
call   1030 <sprintf@plt>
xor    %ecx,%ecx
test   %eax,%eax
cmovg  %rbx,%rcx
mov    %rcx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%ld\00"
define i8* @long2s(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i64
store i8* %0, i8** %4
store i64 %1, i64* %5
%6 = load i8*, i8** %4
%7 = load i64, i64* %5
%8 = call i32 @sprintf(i8* %6, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i64 %7)
%9 = icmp slt i32 %8, 1
br i1 %9, label %10, label %11
10: ; preds = %2
store i8* null, i8** %3
br label %13
11: ; preds = %2
%12 = load i8*, i8** %4
store i8* %12, i8** %3
br label %13
13: ; preds = %11, %10
%14 = load i8*, i8** %3
ret i8* %14
}

LLVM IR (-O2):
@.str = [4 x i8] c"%ld\00"
define i8* @long2s(i8* writeonly %0, i64 %1) {
%3 = tail call i32 @sprintf(i8* dereferenceable(1) %0, i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i64 %1)
%4 = icmp slt i32 %3, 1
%5 = select i1 %4, i8* null, i8* %0
ret i8* %5
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void usage() {
  printf("\n");
  printf("\n -r : Mbps ");
  printf("\n -t : Trial time ");
  printf("\n\n");
}


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

x86 assembly (clang, -O2):
<usage>:
push   %rax
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0xebe(%rip),%rdi
call   1050 <printf@plt>
lea    0xebf(%rip),%rdi
call   1050 <printf@plt>
lea    0xec6(%rip),%rdi
pop    %rax
jmp    1040 <puts@plt>

LLVM IR (-O0):
@.str = [2 x i8] c"\0A\00"
@.str.1 = [13 x i8] c"\0A -r : Mbps \00"
@.str.2 = [19 x i8] c"\0A -t : Trial time \00"
@.str.3 = [3 x i8] c"\0A\0A\00"
define void @usage() {
%1 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.2, i64 0, i64 0))
%4 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str.1 = [13 x i8] c"\0A -r : Mbps \00"
@.str.2 = [19 x i8] c"\0A -t : Trial time \00"
@str = [2 x i8] c"\0A\00"
define void @usage() {
%1 = tail call i32 @putchar(i32 10)
%2 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0))
%3 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str.2, i64 0, i64 0))
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([2 x i8], [2 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int putchar(int);
int jerry_port_putchar(int c) { return putchar(c); }


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

x86 assembly (clang, -O2):
<jerry_port_putchar>:
jmp    1030 <putchar@plt>

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

LLVM IR (-O2):
define i32 @jerry_port_putchar(i32 %0) {
%2 = tail call i32 @putchar(i32 %0)
ret i32 %2
}
void foo126() {}


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

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

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

LLVM IR (-O2):
define void @foo126() {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
void setPinModes_dummy(uint8_t pos, char mode) {}


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

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

LLVM IR (-O0):
define void @setPinModes_dummy(i32 %0, i8 signext %1) {
%3 = alloca i32
%4 = alloca i8
store i32 %0, i32* %3
store i8 %1, i8* %4
ret void
}

LLVM IR (-O2):
define void @setPinModes_dummy(i32 %0, i8 signext %1) {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint64_t;

/* Variables and functions */
void g_swap(uint64_t *a, uint64_t *b) {
  uint64_t t = *a;
  *a = *b;
  *b = t;
}


x86 assembly (clang, -O0):
<g_swap>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x14(%rbp),%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<g_swap>:
mov    (%rdi),%eax
mov    (%rsi),%ecx
mov    %ecx,(%rdi)
mov    %eax,(%rsi)
ret

LLVM IR (-O0):
define void @g_swap(i32* %0, i32* %1) {
%3 = alloca i32*
%4 = alloca i32*
%5 = alloca i32
store i32* %0, i32** %3
store i32* %1, i32** %4
%6 = load i32*, i32** %3
%7 = load i32, i32* %6
store i32 %7, i32* %5
%8 = load i32*, i32** %4
%9 = load i32, i32* %8
%10 = load i32*, i32** %3
store i32 %9, i32* %10
%11 = load i32, i32* %5
%12 = load i32*, i32** %4
store i32 %11, i32* %12
ret void
}

LLVM IR (-O2):
define void @g_swap(i32* nocapture %0, i32* nocapture %1) {
%3 = load i32, i32* %0
%4 = load i32, i32* %1
store i32 %4, i32* %0
store i32 %3, i32* %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ __morestack_fail(char const *);
void foo(void) {
  static const char msg[] = "munmap of stack space failed: errno ";
  __morestack_fail(msg);
}


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
lea    0x1dd5(%rip),%rdi
call   1240 <__morestack_fail>
pop    %rbp
ret
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)

x86 assembly (clang, -O2):
<foo>:
lea    0x1dd9(%rip),%rdi
jmp    1230 <__morestack_fail>
nopl   0x0(%rax)

LLVM IR (-O0):
@foo.msg = internal constant [37 x i8] c"munmap of stack space failed: errno \00"
define void @foo() {
%1 = call i32 @__morestack_fail(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @foo.msg, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@foo.msg = internal constant [37 x i8] c"munmap of stack space failed: errno \00"
define void @foo() {
%1 = tail call i32 @__morestack_fail(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @foo.msg, i64 0, i64 0))
ret void
}
char const *foo() { return __func__; }


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

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

LLVM IR (-O0):
@__func__.foo = [4 x i8] c"foo\00"
define i8* @foo() {
ret i8* getelementptr inbounds ([4 x i8], [4 x i8]* @__func__.foo, i64 0, i64 0)
}

LLVM IR (-O2):
@__func__.foo = [4 x i8] c"foo\00"
define i8* @foo() {
ret i8* getelementptr inbounds ([4 x i8], [4 x i8]* @__func__.foo, i64 0, i64 0)
}
/* Variables and functions */
int /*<<< orphan*/ assert_perror(int /*<<< orphan*/);
void assert2(void) { assert_perror(0); }


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

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

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

LLVM IR (-O2):
define void @assert2() {
%1 = tail call i32 @assert_perror(i32 0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exec_sar(int, int, int);
void test_sar(void) {
  int i;
  for (i = 0; i < 32; i++)
    exec_sar(0x21ad3d34, 0x12345678, i);
  for (i = 0; i < 32; i++)
    exec_sar(0x813f3421, 0x82345678, i);
}


x86 assembly (clang, -O0):
<test_sar>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
cmpl   $0x20,-0x4(%rbp)
jge    1149 <test_sar+0x39>
mov    -0x4(%rbp),%edx
mov    $0x21ad3d34,%edi
mov    $0x12345678,%esi
call   1030 <exec_sar@plt>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    111f <test_sar+0xf>
movl   $0x0,-0x4(%rbp)
cmpl   $0x20,-0x4(%rbp)
jge    117a <test_sar+0x6a>
mov    -0x4(%rbp),%edx
mov    $0x813f3421,%edi
mov    $0x82345678,%esi
call   1030 <exec_sar@plt>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    1150 <test_sar+0x40>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_sar>:
push   %rbx
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    $0x21ad3d34,%edi
mov    $0x12345678,%esi
mov    %ebx,%edx
call   1030 <exec_sar@plt>
add    $0x1,%ebx
cmp    $0x20,%ebx
jne    1120 <test_sar+0x10>
xor    %ebx,%ebx
nopl   0x0(%rax,%rax,1)
mov    $0x813f3421,%edi
mov    $0x82345678,%esi
mov    %ebx,%edx
call   1030 <exec_sar@plt>
add    $0x1,%ebx
cmp    $0x20,%ebx
jne    1140 <test_sar+0x30>
pop    %rbx
ret

LLVM IR (-O0):
define void @test_sar() {
%1 = alloca i32
store i32 0, i32* %1
br label %2
2: ; preds = %8, %0
%3 = load i32, i32* %1
%4 = icmp slt i32 %3, 32
br i1 %4, label %5, label %11
5: ; preds = %2
%6 = load i32, i32* %1
%7 = call i32 @exec_sar(i32 565001524, i32 305419896, i32 %6)
br label %8
8: ; preds = %5
%9 = load i32, i32* %1
%10 = add nsw i32 %9, 1
store i32 %10, i32* %1
br label %2
11: ; preds = %2
store i32 0, i32* %1
br label %12
12: ; preds = %18, %11
%13 = load i32, i32* %1
%14 = icmp slt i32 %13, 32
br i1 %14, label %15, label %21
15: ; preds = %12
%16 = load i32, i32* %1
%17 = call i32 @exec_sar(i32 -2126564319, i32 -2110499208, i32 %16)
br label %18
18: ; preds = %15
%19 = load i32, i32* %1
%20 = add nsw i32 %19, 1
store i32 %20, i32* %1
br label %12
21: ; preds = %12
ret void
}

LLVM IR (-O2):
define void @test_sar() {
br label %1
1: ; preds = %0, %1
%2 = phi i32 [ 0, %0 ], [ %4, %1 ]
%3 = tail call i32 @exec_sar(i32 565001524, i32 305419896, i32 %2)
%4 = add nuw nsw i32 %2, 1
%5 = icmp eq i32 %4, 32
br i1 %5, label %6, label %1
6: ; preds = %1, %6
%7 = phi i32 [ %9, %6 ], [ 0, %1 ]
%8 = tail call i32 @exec_sar(i32 -2126564319, i32 -2110499208, i32 %7)
%9 = add nuw nsw i32 %7, 1
%10 = icmp eq i32 %9, 32
br i1 %10, label %11, label %6
11: ; preds = %6
ret void
}
int call_back_7(void *target, void *routine_ptr) {
  return ((((int (*)(void *))routine_ptr)(target)));
}


x86 assembly (clang, -O0):
<call_back_7>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    -0x8(%rbp),%rdi
call   *%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<call_back_7>:
jmp    *%rsi

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

LLVM IR (-O2):
define i32 @call_back_7(i8* %0, i8* nocapture %1) {
%3 = bitcast i8* %1 to i32 (i8*)*
%4 = tail call i32 %3(i8* %0)
ret i32 %4
}
/* Type definitions */
struct MixSegment {
  int dummy;
};

/* Variables and functions */
struct MixSegment *NewMixSegment(char const *, char const *, char const *);
struct MixSegment *mix_engine(const char *DICT_PATH, const char *HMM_PATH,
                              const char *USER_DICT) {
  return NewMixSegment(DICT_PATH, HMM_PATH, USER_DICT);
}


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

x86 assembly (clang, -O2):
<mix_engine>:
jmp    1030 <NewMixSegment@plt>

LLVM IR (-O0):
%struct.MixSegment = type { i32 }
define %struct.MixSegment* @mix_engine(i8* %0, i8* %1, i8* %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i8*
store i8* %0, i8** %4
store i8* %1, i8** %5
store i8* %2, i8** %6
%7 = load i8*, i8** %4
%8 = load i8*, i8** %5
%9 = load i8*, i8** %6
%10 = call %struct.MixSegment* @NewMixSegment(i8* %7, i8* %8, i8* %9)
ret %struct.MixSegment* %10
}

LLVM IR (-O2):
%struct.MixSegment = type { i32 }
define %struct.MixSegment* @mix_engine(i8* %0, i8* %1, i8* %2) {
%4 = tail call %struct.MixSegment* @NewMixSegment(i8* %0, i8* %1, i8* %2)
ret %struct.MixSegment* %4
}
void io_set_label_size(int r, int c) {}


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

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

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

LLVM IR (-O2):
define void @io_set_label_size(i32 %0, i32 %1) {
ret void
}
unsigned int umin(unsigned int a, unsigned int b) {
  if (a < b)
    return (a);
  return (b);
}


x86 assembly (clang, -O0):
<umin>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jae    1121 <umin+0x21>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1127 <umin+0x27>
mov    -0xc(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<umin>:
mov    %esi,%eax
cmp    %esi,%edi
cmovb  %edi,%eax
ret

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

LLVM IR (-O2):
define i32 @umin(i32 %0, i32 %1) {
%3 = icmp ult i32 %0, %1
%4 = select i1 %3, i32 %0, i32 %1
ret i32 %4
}
int digit(int x) { return (x >= '0' && x <= '9'); }


x86 assembly (clang, -O0):
<digit>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
xor    %eax,%eax
cmpl   $0x30,-0x4(%rbp)
mov    %al,-0x5(%rbp)
jl     1120 <digit+0x20>
cmpl   $0x39,-0x4(%rbp)
setle  %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<digit>:
add    $0xffffffd0,%edi
xor    %eax,%eax
cmp    $0xa,%edi
setb   %al
ret

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

LLVM IR (-O2):
define i32 @digit(i32 %0) {
%2 = add i32 %0, -48
%3 = icmp ult i32 %2, 10
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Type definitions */
typedef int uint8_t;
typedef int uint64_t;

/* Variables and functions */
void to_array(uint8_t *result, const uint64_t src) {
  for (size_t i = 0; i < 8; ++i) {
    result[i] = (src >> (8 * i)) & 0xFF;
  }
}


x86 assembly (clang, -O0):
<to_array>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movq   $0x0,-0x18(%rbp)
cmpq   $0x8,-0x18(%rbp)
jae    114f <to_array+0x4f>
mov    -0xc(%rbp),%edx
mov    -0x18(%rbp),%rax
shl    $0x3,%rax
mov    %eax,%ecx
sar    %cl,%edx
and    $0xff,%edx
mov    -0x8(%rbp),%rax
mov    -0x18(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
jmp    1113 <to_array+0x13>
pop    %rbp
ret

x86 assembly (clang, -O2):
<to_array>:
mov    %esi,%eax
movzbl %al,%ecx
mov    %ecx,(%rdi)
movzbl %ah,%ecx
mov    %ecx,0x4(%rdi)
mov    %esi,%ecx
shr    $0x10,%ecx
movzbl %cl,%ecx
mov    %ecx,0x8(%rdi)
shr    $0x18,%eax
mov    %eax,0xc(%rdi)
ret

LLVM IR (-O0):
define void @to_array(i32* %0, i32 %1) {
%3 = alloca i32*
%4 = alloca i32
%5 = alloca i64
store i32* %0, i32** %3
store i32 %1, i32* %4
store i64 0, i64* %5
br label %6
6: ; preds = %19, %2
%7 = load i64, i64* %5
%8 = icmp ult i64 %7, 8
br i1 %8, label %9, label %22
9: ; preds = %6
%10 = load i32, i32* %4
%11 = load i64, i64* %5
%12 = mul i64 8, %11
%13 = trunc i64 %12 to i32
%14 = ashr i32 %10, %13
%15 = and i32 %14, 255
%16 = load i32*, i32** %3
%17 = load i64, i64* %5
%18 = getelementptr inbounds i32, i32* %16, i64 %17
store i32 %15, i32* %18
br label %19
19: ; preds = %9
%20 = load i64, i64* %5
%21 = add i64 %20, 1
store i64 %21, i64* %5
br label %6
22: ; preds = %6
ret void
}

LLVM IR (-O2):
define void @to_array(i32* nocapture writeonly %0, i32 %1) {
%3 = and i32 %1, 255
store i32 %3, i32* %0
%4 = lshr i32 %1, 8
%5 = and i32 %4, 255
%6 = getelementptr inbounds i32, i32* %0, i64 1
store i32 %5, i32* %6
%7 = lshr i32 %1, 16
%8 = and i32 %7, 255
%9 = getelementptr inbounds i32, i32* %0, i64 2
store i32 %8, i32* %9
%10 = lshr i32 %1, 24
%11 = getelementptr inbounds i32, i32* %0, i64 3
store i32 %10, i32* %11
ret void
}
int fun775() { return 775; }


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

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

LLVM IR (-O0):
define i32 @fun775() {
ret i32 775
}

LLVM IR (-O2):
define i32 @fun775() {
ret i32 775
}
void XTranslateCoordinates() {}


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

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

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

LLVM IR (-O2):
define void @XTranslateCoordinates() {
ret void
}
int isprint(int c) { return (((c) <= (0x7e)) && ((c) >= (0x20))); }


x86 assembly (clang, -O0):
<isprint>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
xor    %eax,%eax
cmpl   $0x7e,-0x4(%rbp)
mov    %al,-0x5(%rbp)
jg     1120 <isprint+0x20>
cmpl   $0x20,-0x4(%rbp)
setge  %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isprint>:
add    $0xffffffe0,%edi
xor    %eax,%eax
cmp    $0x5f,%edi
setb   %al
ret

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

LLVM IR (-O2):
define i32 @isprint(i32 %0) {
%2 = add i32 %0, -32
%3 = icmp ult i32 %2, 95
%4 = zext i1 %3 to i32
ret i32 %4
}
int utf8_unichar_to_encoded_len(int unichar) {
  if (unichar < 0x80)
    return 1;
  if (unichar < 0x800)
    return 2;
  if (unichar < 0x10000)
    return 3;
  if (unichar < 0x200000)
    return 4;
  if (unichar < 0x4000000)
    return 5;
  return 6;
}


x86 assembly (clang, -O0):
<utf8_unichar_to_encoded_len>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0x80,-0x8(%rbp)
jge    1120 <utf8_unichar_to_encoded_len+0x20>
movl   $0x1,-0x4(%rbp)
jmp    118b <utf8_unichar_to_encoded_len+0x8b>
cmpl   $0x800,-0x8(%rbp)
jge    1139 <utf8_unichar_to_encoded_len+0x39>
movl   $0x2,-0x4(%rbp)
jmp    118b <utf8_unichar_to_encoded_len+0x8b>
cmpl   $0x10000,-0x8(%rbp)
jge    1152 <utf8_unichar_to_encoded_len+0x52>
movl   $0x3,-0x4(%rbp)
jmp    118b <utf8_unichar_to_encoded_len+0x8b>
cmpl   $0x200000,-0x8(%rbp)
jge    116b <utf8_unichar_to_encoded_len+0x6b>
movl   $0x4,-0x4(%rbp)
jmp    118b <utf8_unichar_to_encoded_len+0x8b>
cmpl   $0x4000000,-0x8(%rbp)
jge    1184 <utf8_unichar_to_encoded_len+0x84>
movl   $0x5,-0x4(%rbp)
jmp    118b <utf8_unichar_to_encoded_len+0x8b>
movl   $0x6,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<utf8_unichar_to_encoded_len>:
mov    $0x1,%eax
cmp    $0x80,%edi
jl     1142 <utf8_unichar_to_encoded_len+0x42>
mov    $0x2,%eax
cmp    $0x800,%edi
jb     1142 <utf8_unichar_to_encoded_len+0x42>
mov    $0x3,%eax
cmp    $0x10000,%edi
jb     1142 <utf8_unichar_to_encoded_len+0x42>
mov    $0x4,%eax
cmp    $0x200000,%edi
jb     1142 <utf8_unichar_to_encoded_len+0x42>
cmp    $0x4000000,%edi
mov    $0x6,%eax
sbb    $0x0,%eax
ret

LLVM IR (-O0):
define i32 @utf8_unichar_to_encoded_len(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = icmp slt i32 %4, 128
br i1 %5, label %6, label %7
6: ; preds = %1
store i32 1, i32* %2
br label %24
7: ; preds = %1
%8 = load i32, i32* %3
%9 = icmp slt i32 %8, 2048
br i1 %9, label %10, label %11
10: ; preds = %7
store i32 2, i32* %2
br label %24
11: ; preds = %7
%12 = load i32, i32* %3
%13 = icmp slt i32 %12, 65536
br i1 %13, label %14, label %15
14: ; preds = %11
store i32 3, i32* %2
br label %24
15: ; preds = %11
%16 = load i32, i32* %3
%17 = icmp slt i32 %16, 2097152
br i1 %17, label %18, label %19
18: ; preds = %15
store i32 4, i32* %2
br label %24
19: ; preds = %15
%20 = load i32, i32* %3
%21 = icmp slt i32 %20, 67108864
br i1 %21, label %22, label %23
22: ; preds = %19
store i32 5, i32* %2
br label %24
23: ; preds = %19
store i32 6, i32* %2
br label %24
24: ; preds = %23, %22, %18, %14, %10, %6
%25 = load i32, i32* %2
ret i32 %25
}

LLVM IR (-O2):
define i32 @utf8_unichar_to_encoded_len(i32 %0) {
%2 = icmp slt i32 %0, 128
br i1 %2, label %12, label %3
3: ; preds = %1
%4 = icmp ult i32 %0, 2048
br i1 %4, label %12, label %5
5: ; preds = %3
%6 = icmp ult i32 %0, 65536
br i1 %6, label %12, label %7
7: ; preds = %5
%8 = icmp ult i32 %0, 2097152
br i1 %8, label %12, label %9
9: ; preds = %7
%10 = icmp ult i32 %0, 67108864
%11 = select i1 %10, i32 5, i32 6
br label %12
12: ; preds = %9, %7, %5, %3, %1
%13 = phi i32 [ 1, %1 ], [ 2, %3 ], [ 3, %5 ], [ 4, %7 ], [ %11, %9 ]
ret i32 %13
}
int decode_init() { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @decode_init() {
ret i32 0
}
/* Variables and functions */
scalar_t__ cos(double);
float cosf(float _X) { return ((float)cos((double)_X)); }


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

x86 assembly (clang, -O2):
<cosf>:
push   %rax
cvtss2sd %xmm0,%xmm0
call   1030 <cos@plt>
xorps  %xmm0,%xmm0
cvtsi2ss %rax,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define float @cosf(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = fpext float %3 to double
%5 = call i64 @cos(double %4)
%6 = sitofp i64 %5 to float
ret float %6
}

LLVM IR (-O2):
define float @cosf(float %0) {
%2 = fpext float %0 to double
%3 = tail call i64 @cos(double %2)
%4 = sitofp i64 %3 to float
ret float %4
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void _clean_str(void *data) {
  if (data)
    free(data);
}


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

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

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

LLVM IR (-O2):
define void @_clean_str(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = tail call i32 @free(i8* %0)
br label %5
5: ; preds = %3, %1
ret void
}
/* Variables and functions */
int rand();
void array_init(int *arr, int size) {
  int i;
  for (i = 0; i < size; i++) {
    arr[i] = rand() % 90 + 10;
  }
}


x86 assembly (clang, -O0):
<array_init>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    115d <array_init+0x4d>
mov    $0x0,%al
call   1030 <rand@plt>
mov    $0x5a,%ecx
cltd
idiv   %ecx
add    $0xa,%edx
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1126 <array_init+0x16>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<array_init>:
push   %r15
push   %r14
push   %rbx
test   %esi,%esi
jle    1167 <array_init+0x57>
mov    %rdi,%r14
mov    %esi,%r15d
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1030 <rand@plt>
cltq
imul   $0xffffffffb60b60b7,%rax,%rcx
shr    $0x20,%rcx
add    %eax,%ecx
mov    %ecx,%edx
shr    $0x1f,%edx
sar    $0x6,%ecx
add    %edx,%ecx
imul   $0x5a,%ecx,%ecx
neg    %ecx
add    %ecx,%eax
add    $0xa,%eax
mov    %eax,(%r14,%rbx,4)
add    $0x1,%rbx
cmp    %rbx,%r15
jne    1130 <array_init+0x20>
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
define void @array_init(i32* nocapture writeonly %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %14
4: ; preds = %2
%5 = zext i32 %1 to i64
br label %6
6: ; preds = %4, %6
%7 = phi i64 [ 0, %4 ], [ %12, %6 ]
%8 = tail call i32 (...) @rand()
%9 = srem i32 %8, 90
%10 = add nsw i32 %9, 10
%11 = getelementptr inbounds i32, i32* %0, i64 %7
store i32 %10, i32* %11
%12 = add nuw nsw i64 %7, 1
%13 = icmp eq i64 %12, %5
br i1 %13, label %14, label %6
14: ; preds = %6, %2
ret void
}
void I422ToARGB1555Row_NEON() {}


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

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

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

LLVM IR (-O2):
define void @I422ToARGB1555Row_NEON() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ display_message_panel_show_text(char *);
void display_home_message() {
  display_message_panel_show_text("Enjoy your trip!");
}


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

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

LLVM IR (-O0):
@.str = [17 x i8] c"Enjoy your trip!\00"
define void @display_home_message() {
%1 = call i32 @display_message_panel_show_text(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [17 x i8] c"Enjoy your trip!\00"
define void @display_home_message() {
%1 = tail call i32 @display_message_panel_show_text(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void printCliHelp(void) {
  printf("Usage:\t<executable> [-e <code>] [-f <file>] [-s <snapshot file>] "
         "[-b <kernel dir>]\n"
         "\t-e evaluate code\n"
         "\t-f compile classes and evaluate code within specified file\n"
         "\t-s path to snapshot file\n"
         "\t-b bootstrap from kernel directory\n"
         "\t-h prints this help\n");
}


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

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

LLVM IR (-O0):
@.str = [245 x i8] c"Usage:\09<executable> [-e <code>] [-f <file>] [-s <snapshot file>] [-b <kernel dir>]\0A\09-e evaluate code\0A\09-f compile classes and evaluate code within specified file\0A\09-s path to snapshot file\0A\09-b bootstrap from kernel directory\0A\09-h prints this help\0A\00"
define void @printCliHelp() {
%1 = call i32 @printf(i8* getelementptr inbounds ([245 x i8], [245 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [244 x i8] c"Usage:\09<executable> [-e <code>] [-f <file>] [-s <snapshot file>] [-b <kernel dir>]\0A\09-e evaluate code\0A\09-f compile classes and evaluate code within specified file\0A\09-s path to snapshot file\0A\09-b bootstrap from kernel directory\0A\09-h prints this help\00"
define void @printCliHelp() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([244 x i8], [244 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ DEBUG_ASSERT(int);
void LPCIntClear(unsigned long ulBase, unsigned long ulIntFlags) {
  DEBUG_ASSERT(ulBase == 0x40080000);
  (*((volatile unsigned long *)(ulBase + 0x0000010C))) = ulIntFlags;
}


x86 assembly (clang, -O0):
<LPCIntClear>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpq   $0x40080000,-0x8(%rbp)
40
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <DEBUG_ASSERT@plt>
mov    -0x10(%rbp),%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,0x10c(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<LPCIntClear>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
xor    %edi,%edi
cmp    $0x40080000,%rbx
sete   %dil
call   1030 <DEBUG_ASSERT@plt>
mov    %r14,0x10c(%rbx)
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define void @LPCIntClear(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%5 = load i64, i64* %3
%6 = icmp eq i64 %5, 1074266112
%7 = zext i1 %6 to i32
%8 = call i32 @DEBUG_ASSERT(i32 %7)
%9 = load i64, i64* %4
%10 = load i64, i64* %3
%11 = add i64 %10, 268
%12 = inttoptr i64 %11 to i64*
store volatile i64 %9, i64* %12
ret void
}

LLVM IR (-O2):
define void @LPCIntClear(i64 %0, i64 %1) {
%3 = icmp eq i64 %0, 1074266112
%4 = zext i1 %3 to i32
%5 = tail call i32 @DEBUG_ASSERT(i32 %4)
%6 = add i64 %0, 268
%7 = inttoptr i64 %6 to i64*
store volatile i64 %1, i64* %7
ret void
}