xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ assert(int);
char *strstr(char *, char *);
int main(int argc, char **argv) {
  char *r = 0;
  char s2[] = "c";
  char s1[] = {'a', 'c'};
  char s3 = 0;
  r = strstr(s1, s2);
  assert(r == s1 + 1);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movq   $0x0,-0x18(%rbp)
mov    0xebb(%rip),%ax
mov    %ax,-0x1a(%rbp)
mov    0xeb2(%rip),%ax
mov    %ax,-0x1c(%rbp)
movb   $0x0,-0x1d(%rbp)
lea    -0x1c(%rbp),%rdi
lea    -0x1a(%rbp),%rsi
call   1040 <strstr@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
lea    -0x1c(%rbp),%rcx
add    $0x1,%rcx
cmp    %rcx,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
movw   $0x6361,0x6(%rsp)
lea    0x6(%rsp),%rdi
mov    $0x63,%esi
call   1030 <strchr@plt>
lea    0x7(%rsp),%rcx
xor    %edi,%edi
cmp    %rcx,%rax
sete   %dil
call   1040 <assert@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@__const.main.s2 = [2 x i8] c"c\00"
@__const.main.s1 = [2 x i8] c"ac"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i8*
%7 = alloca [2 x i8]
%8 = alloca [2 x i8]
%9 = alloca i8
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i8* null, i8** %6
%10 = bitcast [2 x i8]* %7 to i8*
%11 = bitcast [2 x i8]* %8 to i8*
store i8 0, i8* %9
%12 = getelementptr inbounds [2 x i8], [2 x i8]* %8, i64 0, i64 0
%13 = getelementptr inbounds [2 x i8], [2 x i8]* %7, i64 0, i64 0
%14 = call i8* @strstr(i8* %12, i8* %13)
store i8* %14, i8** %6
%15 = load i8*, i8** %6
%16 = getelementptr inbounds [2 x i8], [2 x i8]* %8, i64 0, i64 0
%17 = getelementptr inbounds i8, i8* %16, i64 1
%18 = icmp eq i8* %15, %17
%19 = zext i1 %18 to i32
%20 = call i32 @assert(i32 %19)
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca i16
%4 = bitcast i16* %3 to i8*
store i16 25441, i16* %3
%5 = call i8* @strchr(i8* %4, i32 99)
%6 = getelementptr inbounds i8, i8* %4, i64 1
%7 = icmp eq i8* %5, %6
%8 = zext i1 %7 to i32
%9 = call i32 @assert(i32 %8)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ link_failure_llrintl();
scalar_t__ llrintl(long double);
void test_llrintl(long double ld) {
  if (llrintl(ld) != llrintl(ld))
    link_failure_llrintl();
}


x86 assembly (clang, -O0):
<test_llrintl>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
fldt   0x10(%rbp)
fstpt  -0x10(%rbp)
fldt   -0x10(%rbp)
mov    %rsp,%rax
fstpt  (%rax)
call   1040 <llrintl@plt>
mov    %rax,-0x18(%rbp)
fldt   -0x10(%rbp)
mov    %rsp,%rax
fstpt  (%rax)
call   1040 <llrintl@plt>
mov    %rax,%rcx
mov    -0x18(%rbp),%rax
cmp    %rcx,%rax
je     1163 <test_llrintl+0x43>
mov    $0x0,%al
call   1030 <link_failure_llrintl@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_llrintl>:
push   %rbx
sub    $0x20,%rsp
fldt   0x30(%rsp)
fld    %st(0)
fstpt  0x14(%rsp)
fstpt  (%rsp)
call   1040 <llrintl@plt>
mov    %rax,%rbx
fldt   0x14(%rsp)
fstpt  (%rsp)
call   1040 <llrintl@plt>
cmp    %rax,%rbx
jne    1151 <test_llrintl+0x31>
add    $0x20,%rsp
pop    %rbx
ret
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbx
jmp    1030 <link_failure_llrintl@plt>

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

LLVM IR (-O2):
define void @test_llrintl(x86_fp80 %0) {
%2 = tail call i64 @llrintl(x86_fp80 %0)
%3 = tail call i64 @llrintl(x86_fp80 %0)
%4 = icmp eq i64 %2, %3
br i1 %4, label %7, label %5
5: ; preds = %1
%6 = tail call i32 (...) @link_failure_llrintl()
br label %7
7: ; preds = %5, %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ handle_44(int /*<<< orphan*/);
int gen_44() { handle_44(0); }


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

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

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

LLVM IR (-O2):
define i32 @gen_44() {
%1 = tail call i32 @handle_44(i32 0)
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ GenericFaultHandler(unsigned long *);
void UsageFault_Handler(unsigned long *hardfault_args) {
  GenericFaultHandler(hardfault_args);
}


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

x86 assembly (clang, -O2):
<UsageFault_Handler>:
jmp    1030 <GenericFaultHandler@plt>

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

LLVM IR (-O2):
define void @UsageFault_Handler(i64* %0) {
%2 = tail call i32 @GenericFaultHandler(i64* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void about(void) {
  printf("Copyright (c) 2015-16. Al Poole <netstar@gmail.com>\n");
}


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

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

LLVM IR (-O0):
@.str = [53 x i8] c"Copyright (c) 2015-16. Al Poole <netstar@gmail.com>\0A\00"
define void @about() {
%1 = call i32 @printf(i8* getelementptr inbounds ([53 x i8], [53 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [52 x i8] c"Copyright (c) 2015-16. Al Poole <netstar@gmail.com>\00"
define void @about() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([52 x i8], [52 x i8]* @str, i64 0, i64 0))
ret void
}
int test7(int x) { return x / -10 <= 2; }


x86 assembly (clang, -O0):
<test7>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    $0xfffffff6,%ecx
cltd
idiv   %ecx
cmp    $0x2,%eax
setle  %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test7>:
xor    %eax,%eax
cmp    $0xffffffe3,%edi
setge  %al
ret

LLVM IR (-O0):
define i32 @test7(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = sdiv i32 %3, -10
%5 = icmp sle i32 %4, 2
%6 = zext i1 %5 to i32
ret i32 %6
}

LLVM IR (-O2):
define i32 @test7(i32 %0) {
%2 = icmp sgt i32 %0, -30
%3 = zext i1 %2 to i32
ret i32 %3
}
/* Type definitions */
typedef int /*<<< orphan*/ off_t;
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ flockfile(int /*<<< orphan*/ *);
int /*<<< orphan*/ ftello_unlocked(int /*<<< orphan*/ *);
int /*<<< orphan*/ funlockfile(int /*<<< orphan*/ *);
off_t ftello(FILE *file) {
  flockfile(file);
  off_t result = ftello_unlocked(file);
  funlockfile(file);
  return result;
}


x86 assembly (clang, -O0):
<ftello>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <flockfile@plt>
mov    -0x8(%rbp),%rdi
call   1050 <ftello_unlocked@plt>
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <funlockfile@plt>
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ftello>:
push   %rbp
push   %rbx
push   %rax
mov    %rdi,%rbx
call   1040 <flockfile@plt>
mov    %rbx,%rdi
call   1050 <ftello_unlocked@plt>
mov    %eax,%ebp
mov    %rbx,%rdi
call   1030 <funlockfile@plt>
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @ftello(i32* %0) {
%2 = alloca i32*
%3 = alloca i32
store i32* %0, i32** %2
%4 = load i32*, i32** %2
%5 = call i32 @flockfile(i32* %4)
%6 = load i32*, i32** %2
%7 = call i32 @ftello_unlocked(i32* %6)
store i32 %7, i32* %3
%8 = load i32*, i32** %2
%9 = call i32 @funlockfile(i32* %8)
%10 = load i32, i32* %3
ret i32 %10
}

LLVM IR (-O2):
define i32 @ftello(i32* %0) {
%2 = tail call i32 @flockfile(i32* %0)
%3 = tail call i32 @ftello_unlocked(i32* %0)
%4 = tail call i32 @funlockfile(i32* %0)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char const *);
void __autopush_status_fn(void *arg, const char *msg) { printf("%s\n", msg); }


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

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

LLVM IR (-O0):
@.str = [4 x i8] c"%s\0A\00"
define void @__autopush_status_fn(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 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %5)
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"%s\0A\00"
define void @__autopush_status_fn(i8* nocapture readnone %0, i8* %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %1)
ret void
}
int adhoc_countS(float item) { return sizeof(item) / sizeof(float); }


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

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

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

LLVM IR (-O2):
define i32 @adhoc_countS(float %0) {
ret i32 1
}
void g_hook_find_func_data() {}


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

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

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

LLVM IR (-O2):
define void @g_hook_find_func_data() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int XSetCloseDownMode() {
  printf("XSetCloseDownMode called\n");
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [26 x i8] c"XSetCloseDownMode called\0A\00"
define i32 @XSetCloseDownMode() {
%1 = call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [25 x i8] c"XSetCloseDownMode called\00"
define i32 @XSetCloseDownMode() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @str, i64 0, i64 0))
ret i32 0
}
int rdx_min(int a, int b) { return a > b ? b : a; }


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

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

LLVM IR (-O0):
define i32 @rdx_min(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 = icmp sgt i32 %5, %6
br i1 %7, label %8, label %10
8: ; preds = %2
%9 = load i32, i32* %4
br label %12
10: ; preds = %2
%11 = load i32, i32* %3
br label %12
12: ; preds = %10, %8
%13 = phi i32 [ %9, %8 ], [ %11, %10 ]
ret i32 %13
}

LLVM IR (-O2):
define i32 @rdx_min(i32 %0, i32 %1) {
%3 = icmp sgt i32 %0, %1
%4 = select i1 %3, i32 %1, i32 %0
ret i32 %4
}
int parasail_sse2_dummy() { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @parasail_sse2_dummy() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ fputc(char, int /*<<< orphan*/);
int fputs(char const *, int /*<<< orphan*/);
int /*<<< orphan*/ stdout;
int stub1(char const *, int /*<<< orphan*/);
int /*<<< orphan*/ stub2(char, int /*<<< orphan*/);
int puts(const char *s) {
  int written = (*fputs)(s, stdout);
  (*fputc)('\n', stdout);
  return written;
}


x86 assembly (clang, -O0):
<puts>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    0x2ea9(%rip),%rax
mov    (%rax),%esi
call   1030 <fputs@plt>
mov    %eax,-0xc(%rbp)
mov    0x2e98(%rip),%rax
mov    (%rax),%esi
mov    $0xa,%edi
call   1040 <fputc@plt>
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<puts>:
push   %r14
push   %rbx
push   %rax
mov    0x2eb5(%rip),%r14
mov    (%r14),%esi
call   1030 <fputs@plt>
mov    %eax,%ebx
mov    (%r14),%esi
mov    $0xa,%edi
call   1040 <fputc@plt>
mov    %ebx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@stdout = global i32 0
define i32 @puts(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = load i32, i32* @stdout
%6 = call i32 @fputs(i8* %4, i32 %5)
store i32 %6, i32* %3
%7 = load i32, i32* @stdout
%8 = call i32 @fputc(i8 signext 10, i32 %7)
%9 = load i32, i32* %3
ret i32 %9
}

LLVM IR (-O2):
@stdout = global i32 0
define i32 @puts(i8* %0) {
%2 = load i32, i32* @stdout
%3 = tail call i32 @fputs(i8* %0, i32 %2)
%4 = load i32, i32* @stdout
%5 = tail call i32 @fputc(i8 signext 10, i32 %4)
ret i32 %3
}
unsigned int r2h_bits(int cmd) {
  unsigned int mask = (((cmd) > 0) ? (1 << ((cmd)-1)) : 0);
  if (cmd == 13)
    mask |= ((((14) > 0) ? (1 << ((14) - 1)) : 0) |
             (((15) > 0) ? (1 << ((15) - 1)) : 0) |
             (((9) > 0) ? (1 << ((9) - 1)) : 0) |
             (((16) > 0) ? (1 << ((16) - 1)) : 0));
  else if (cmd == 4)
    mask |= ((((14) > 0) ? (1 << ((14) - 1)) : 0) |
             (((15) > 0) ? (1 << ((15) - 1)) : 0) |
             (((13) > 0) ? (1 << ((13) - 1)) : 0));
  return (mask |= (((32) > 0) ? (1 << ((32) - 1)) : 0));
}


x86 assembly (clang, -O0):
<r2h_bits>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
jle    1126 <r2h_bits+0x26>
mov    -0x4(%rbp),%ecx
sub    $0x1,%ecx
mov    $0x1,%eax
shl    %cl,%eax
mov    %eax,-0xc(%rbp)
jmp    1130 <r2h_bits+0x30>
xor    %eax,%eax
mov    %eax,-0xc(%rbp)
jmp    1130 <r2h_bits+0x30>
mov    -0xc(%rbp),%eax
mov    %eax,-0x8(%rbp)
cmpl   $0xd,-0x4(%rbp)
jne    1150 <r2h_bits+0x50>
mov    -0x8(%rbp),%eax
or     $0xe100,%eax
mov    %eax,-0x8(%rbp)
jmp    116a <r2h_bits+0x6a>
cmpl   $0x4,-0x4(%rbp)
jne    1165 <r2h_bits+0x65>
mov    -0x8(%rbp),%eax
or     $0x7000,%eax
mov    %eax,-0x8(%rbp)
jmp    116a <r2h_bits+0x6a>
mov    -0x8(%rbp),%eax
or     $0x80000000,%eax
mov    %eax,-0x8(%rbp)
pop    %rbp
ret

x86 assembly (clang, -O2):
<r2h_bits>:
lea    -0x1(%rdi),%ecx
mov    $0x1,%edx
shl    %cl,%edx
xor    %eax,%eax
test   %edi,%edi
cmovg  %edx,%eax
cmp    $0x4,%edi
je     1126 <r2h_bits+0x26>
cmp    $0xd,%edi
jne    112b <r2h_bits+0x2b>
or     $0xe100,%eax
or     $0x80000000,%eax
ret
or     $0x7000,%eax
or     $0x80000000,%eax
ret

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

LLVM IR (-O2):
define i32 @r2h_bits(i32 %0) {
%2 = icmp sgt i32 %0, 0
%3 = add nsw i32 %0, -1
%4 = shl nuw i32 1, %3
%5 = select i1 %2, i32 %4, i32 0
switch i32 %0, label %10 [
i32 13, label %6
i32 4, label %8
]
6: ; preds = %1
%7 = or i32 %5, 57600
br label %10
8: ; preds = %1
%9 = or i32 %5, 28672
br label %10
10: ; preds = %1, %8, %6
%11 = phi i32 [ %7, %6 ], [ %9, %8 ], [ %5, %1 ]
%12 = or i32 %11, -2147483648
ret i32 %12
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, unsigned int);
int /*<<< orphan*/ trace_print();
int main(void) {
  printf("TRACE_SIZE: %u\n", (4U));
  trace_print();
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
mov    $0x4,%esi
call   1030 <printf@plt>
xor    %eax,%eax
call   1040 <trace_print@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [16 x i8] c"TRACE_SIZE: %u\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i32 4)
%3 = call i32 (...) @trace_print()
ret i32 0
}

LLVM IR (-O2):
@.str = [16 x i8] c"TRACE_SIZE: %u\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i32 4)
%2 = tail call i32 (...) @trace_print()
ret i32 0
}
/* Variables and functions */
int atoi(char const *);
int /*<<< orphan*/ error(int, char *, char const *, int);
__attribute__((visibility("default"))) int
positive_int(const char *str, const char *param_name) {
  int ret = atoi(str);
  if (ret < 0)
    error(1, "Bad param for %s: %d", param_name, ret);
  return ret;
}


x86 assembly (clang, -O0):
<positive_int>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <atoi@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
jge    115e <positive_int+0x3e>
mov    -0x10(%rbp),%rdx
mov    -0x14(%rbp),%ecx
mov    $0x1,%edi
lea    0xea7(%rip),%rsi
call   1030 <error@plt>
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<positive_int>:
push   %rbp
push   %rbx
push   %rax
mov    %rsi,%rbx
call   1040 <atoi@plt>
mov    %eax,%ebp
test   %eax,%eax
jns    1147 <positive_int+0x27>
lea    0xec8(%rip),%rsi
mov    $0x1,%edi
mov    %rbx,%rdx
mov    %ebp,%ecx
call   1030 <error@plt>
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
@.str = [21 x i8] c"Bad param for %s: %d\00"
define i32 @positive_int(i8* nocapture %0, i8* %1) {
%3 = tail call i32 @atoi(i8* %0)
%4 = icmp slt i32 %3, 0
br i1 %4, label %5, label %7
5: ; preds = %2
%6 = tail call i32 @error(i32 1, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i8* %1, i32 %3)
br label %7
7: ; preds = %5, %2
ret i32 %3
}
int varintlen(unsigned int value) {
  int len = 0;
  do {
    value >>= 7;
    len++;
  } while (len < 4 && value != 0);
  return len;
}


x86 assembly (clang, -O0):
<varintlen>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
mov    -0x4(%rbp),%eax
shr    $0x7,%eax
mov    %eax,-0x4(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
xor    %eax,%eax
cmpl   $0x4,-0x8(%rbp)
mov    %al,-0x9(%rbp)
jge    1139 <varintlen+0x39>
cmpl   $0x0,-0x4(%rbp)
setne  %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
test   $0x1,%al
jne    110e <varintlen+0xe>
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<varintlen>:
mov    $0x1,%eax
cmp    $0x80,%edi
jb     1128 <varintlen+0x28>
mov    $0x2,%eax
cmp    $0x4000,%edi
jb     1128 <varintlen+0x28>
cmp    $0x200000,%edi
mov    $0x3,%eax
sbb    $0xffffffff,%eax
ret

LLVM IR (-O0):
define i32 @varintlen(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
store i32 0, i32* %3
br label %4
4: ; preds = %15, %1
%5 = load i32, i32* %2
%6 = lshr i32 %5, 7
store i32 %6, i32* %2
%7 = load i32, i32* %3
%8 = add nsw i32 %7, 1
store i32 %8, i32* %3
br label %9
9: ; preds = %4
%10 = load i32, i32* %3
%11 = icmp slt i32 %10, 4
br i1 %11, label %12, label %15
12: ; preds = %9
%13 = load i32, i32* %2
%14 = icmp ne i32 %13, 0
br label %15
15: ; preds = %12, %9
%16 = phi i1 [ false, %9 ], [ %14, %12 ]
br i1 %16, label %4, label %17
17: ; preds = %15
%18 = load i32, i32* %3
ret i32 %18
}

LLVM IR (-O2):
define i32 @varintlen(i32 %0) {
%2 = icmp ugt i32 %0, 127
br i1 %2, label %3, label %8
3: ; preds = %1
%4 = icmp ugt i32 %0, 16383
br i1 %4, label %5, label %8
5: ; preds = %3
%6 = icmp ugt i32 %0, 2097151
%7 = select i1 %6, i32 4, i32 3
br label %8
8: ; preds = %5, %3, %1
%9 = phi i32 [ 1, %1 ], [ 2, %3 ], [ %7, %5 ]
ret i32 %9
}
int e_samoglaska(char c) {
  return c == 'a' || c == 'e' || c == 'i' || c == 'o' || c == 'u';
}


x86 assembly (clang, -O0):
<e_samoglaska>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0x61,%ecx
mov    %al,-0x2(%rbp)
je     115f <e_samoglaska+0x5f>
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0x65,%ecx
mov    %al,-0x2(%rbp)
je     115f <e_samoglaska+0x5f>
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0x69,%ecx
mov    %al,-0x2(%rbp)
je     115f <e_samoglaska+0x5f>
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0x6f,%ecx
mov    %al,-0x2(%rbp)
je     115f <e_samoglaska+0x5f>
movsbl -0x1(%rbp),%eax
cmp    $0x75,%eax
sete   %al
mov    %al,-0x2(%rbp)
mov    -0x2(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<e_samoglaska>:
lea    -0x61(%rdi),%eax
ror    %al
cmp    $0x8,%al
jae    111b <e_samoglaska+0x1b>
movzbl %al,%ecx
mov    $0x1,%eax
mov    $0x95,%edx
bt     %ecx,%edx
jb     1124 <e_samoglaska+0x24>
xor    %eax,%eax
cmp    $0x75,%dil
sete   %al
ret

LLVM IR (-O0):
define i32 @e_samoglaska(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
%5 = icmp eq i32 %4, 97
br i1 %5, label %22, label %6
6: ; preds = %1
%7 = load i8, i8* %2
%8 = sext i8 %7 to i32
%9 = icmp eq i32 %8, 101
br i1 %9, label %22, label %10
10: ; preds = %6
%11 = load i8, i8* %2
%12 = sext i8 %11 to i32
%13 = icmp eq i32 %12, 105
br i1 %13, label %22, label %14
14: ; preds = %10
%15 = load i8, i8* %2
%16 = sext i8 %15 to i32
%17 = icmp eq i32 %16, 111
br i1 %17, label %22, label %18
18: ; preds = %14
%19 = load i8, i8* %2
%20 = sext i8 %19 to i32
%21 = icmp eq i32 %20, 117
br label %22
22: ; preds = %18, %14, %10, %6, %1
%23 = phi i1 [ true, %14 ], [ true, %10 ], [ true, %6 ], [ true, %1 ], [ %21, %18 ]
%24 = zext i1 %23 to i32
ret i32 %24
}

LLVM IR (-O2):
define i32 @e_samoglaska(i8 signext %0) {
%2 = add i8 %0, -97
%3 = tail call i8 @llvm.fshl.i8(i8 %2, i8 %2, i8 7)
%4 = icmp ult i8 %3, 8
br i1 %4, label %8, label %5
5: ; preds = %8, %1
%6 = icmp eq i8 %0, 117
%7 = zext i1 %6 to i32
br label %12
8: ; preds = %1
%9 = lshr i8 -107, %3
%10 = and i8 %9, 1
%11 = icmp eq i8 %10, 0
br i1 %11, label %5, label %12
12: ; preds = %8, %5
%13 = phi i32 [ %7, %5 ], [ 1, %8 ]
ret i32 %13
}
void _start() {
  asm("movl $1, %eax\n\t"
      "xorl %ebx, %ebx\n\t"
      "int $0x80");
}


x86 assembly (clang, -O0):
<_start>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1,%eax
xor    %ebx,%ebx
int    $0x80
pop    %rbp
ret

x86 assembly (clang, -O2):
<_start>:
mov    $0x1,%eax
xor    %ebx,%ebx
int    $0x80
ret

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

LLVM IR (-O2):
define void @_start() {
tail call void asm sideeffect "movl $$1, %eax\0A\09xorl %ebx, %ebx\0A\09int $$0x80", "~{dirflag},~{fpsr},~{flags}"()
ret void
}
void assertions2NWORDBOUNDARY() {}


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

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

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

LLVM IR (-O2):
define void @assertions2NWORDBOUNDARY() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ atan(double);
double cos(int /*<<< orphan*/);
double __attribute__((no, optimize("Ofast"))) cosatan(double x) {
  return cos(atan(x));
}


x86 assembly (clang, -O0):
<cosatan>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1030 <atan@plt>
mov    %eax,%edi
call   1040 <cos@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cosatan>:
push   %rax
call   1030 <atan@plt>
mov    %eax,%edi
pop    %rax
jmp    1040 <cos@plt>

LLVM IR (-O0):
define double @cosatan(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = call i32 @atan(double %3)
%5 = call double @cos(i32 %4)
ret double %5
}

LLVM IR (-O2):
define double @cosatan(double %0) {
%2 = tail call i32 @atan(double %0)
%3 = tail call double @cos(i32 %2)
ret double %3
}
void show_shell_version(extended) int extended;
{
  printf("GNU bash, version %s (%s)\n", shell_version_string(), "unknown");
  if (extended)
    printf("Copyright 2000 Free Software Foundation, Inc.\n");
}


x86 assembly (clang, -O0):
<show_shell_version>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x0,%al
call   1030 <shell_version_string@plt>
mov    %eax,%esi
lea    0xec5(%rip),%rdi
lea    0xed9(%rip),%rdx
mov    $0x0,%al
call   1040 <printf@plt>
cmpl   $0x0,-0x4(%rbp)
je     1161 <show_shell_version+0x41>
lea    0xec9(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<show_shell_version>:
push   %rbx
mov    %edi,%ebx
xor    %eax,%eax
call   1040 <shell_version_string@plt>
lea    0xebf(%rip),%rdi
lea    0xed3(%rip),%rdx
mov    %eax,%esi
xor    %eax,%eax
call   1050 <printf@plt>
test   %ebx,%ebx
je     1162 <show_shell_version+0x32>
lea    0xec7(%rip),%rdi
pop    %rbx
jmp    1030 <puts@plt>
pop    %rbx
ret

LLVM IR (-O0):
@.str = [27 x i8] c"GNU bash, version %s (%s)\0A\00"
@.str.1 = [8 x i8] c"unknown\00"
@.str.2 = [47 x i8] c"Copyright 2000 Free Software Foundation, Inc.\0A\00"
define void @show_shell_version(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 (...) @shell_version_string()
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0), i32 %3, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0))
%5 = load i32, i32* %2
%6 = icmp ne i32 %5, 0
br i1 %6, label %7, label %9
7: ; preds = %1
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str.2, i64 0, i64 0))
br label %9
9: ; preds = %7, %1
ret void
}

LLVM IR (-O2):
@.str = [27 x i8] c"GNU bash, version %s (%s)\0A\00"
@.str.1 = [8 x i8] c"unknown\00"
@str = [46 x i8] c"Copyright 2000 Free Software Foundation, Inc.\00"
define void @show_shell_version(i32 %0) {
%2 = tail call i32 (...) @shell_version_string()
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0), i32 %2, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0))
%4 = icmp eq i32 %0, 0
br i1 %4, label %7, label %5
5: ; preds = %1
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([46 x i8], [46 x i8]* @str, i64 0, i64 0))
br label %7
7: ; preds = %5, %1
ret void
}
/* Variables and functions */
char *to_octal(char *);
void convert_to_octal(char *input[2], char **output) {
  for (int i = 0; i < 2; i++) {
    output[i] = to_octal(input[i]);
  }
}


x86 assembly (clang, -O0):
<convert_to_octal>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
cmpl   $0x2,-0x14(%rbp)
jge    115f <convert_to_octal+0x4f>
mov    -0x8(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
call   1030 <to_octal@plt>
mov    %rax,%rdx
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    %rdx,(%rax,%rcx,8)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1127 <convert_to_octal+0x17>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<convert_to_octal>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
mov    (%rdi),%rdi
call   1030 <to_octal@plt>
mov    %rax,(%r14)
mov    0x8(%rbx),%rdi
call   1030 <to_octal@plt>
mov    %rax,0x8(%r14)
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define void @convert_to_octal(i8** nocapture %0, i8** nocapture writeonly %1) {
%3 = load i8*, i8** %0
%4 = tail call i8* @to_octal(i8* %3)
store i8* %4, i8** %1
%5 = getelementptr inbounds i8*, i8** %0, i64 1
%6 = load i8*, i8** %5
%7 = tail call i8* @to_octal(i8* %6)
%8 = getelementptr inbounds i8*, i8** %1, i64 1
store i8* %7, i8** %8
ret void
}
/* Variables and functions */
#define SSL_ERROR_NONE 132
#define SSL_ERROR_WANT_ACCEPT 131
#define SSL_ERROR_WANT_CONNECT 130
#define SSL_ERROR_WANT_READ 129
#define SSL_ERROR_WANT_WRITE 128
int ssl_is_fatal_error(int ssl_error) {
  switch (ssl_error) {
  case SSL_ERROR_NONE:
  case SSL_ERROR_WANT_READ:
  case SSL_ERROR_WANT_WRITE:
  case SSL_ERROR_WANT_CONNECT:
  case SSL_ERROR_WANT_ACCEPT:
    return 0;
  }
  return 1;
}


x86 assembly (clang, -O0):
<ssl_is_fatal_error>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0xffffff80,%eax
sub    $0x4,%eax
ja     1127 <ssl_is_fatal_error+0x27>
jmp    111b <ssl_is_fatal_error+0x1b>
movl   $0x0,-0x4(%rbp)
jmp    112e <ssl_is_fatal_error+0x2e>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ssl_is_fatal_error>:
add    $0xffffff7b,%edi
xor    %eax,%eax
cmp    $0xfffffffb,%edi
setb   %al
ret

LLVM IR (-O0):
define i32 @ssl_is_fatal_error(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
switch i32 %4, label %6 [
i32 132, label %5
i32 129, label %5
i32 128, label %5
i32 130, label %5
i32 131, label %5
]
5: ; preds = %1, %1, %1, %1, %1
store i32 0, i32* %2
br label %7
6: ; preds = %1
store i32 1, i32* %2
br label %7
7: ; preds = %6, %5
%8 = load i32, i32* %2
ret i32 %8
}

LLVM IR (-O2):
define i32 @ssl_is_fatal_error(i32 %0) {
%2 = add i32 %0, -133
%3 = icmp ult i32 %2, -5
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ ActuatorSettingsHandle();
int /*<<< orphan*/ UAVObjRequestUpdate(int /*<<< orphan*/);
void ActuatorSettingsRequestUpdate() {
  UAVObjRequestUpdate(ActuatorSettingsHandle());
}


x86 assembly (clang, -O0):
<ActuatorSettingsRequestUpdate>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <ActuatorSettingsHandle@plt>
mov    %eax,%edi
call   1040 <UAVObjRequestUpdate@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<ActuatorSettingsRequestUpdate>:
push   %rax
xor    %eax,%eax
call   1030 <ActuatorSettingsHandle@plt>
mov    %eax,%edi
pop    %rax
jmp    1040 <UAVObjRequestUpdate@plt>

LLVM IR (-O0):
define void @ActuatorSettingsRequestUpdate() {
%1 = call i32 (...) @ActuatorSettingsHandle()
%2 = call i32 @UAVObjRequestUpdate(i32 %1)
ret void
}

LLVM IR (-O2):
define void @ActuatorSettingsRequestUpdate() {
%1 = tail call i32 (...) @ActuatorSettingsHandle()
%2 = tail call i32 @UAVObjRequestUpdate(i32 %1)
ret void
}
/* Type definitions */
typedef scalar_t__ pid_t;

/* Variables and functions */
int /*<<< orphan*/ init_fork();
scalar_t__ orig_fork();
int /*<<< orphan*/ report_fork(scalar_t__);
pid_t my_fork(void) {
  pid_t retval = 0;
  init_fork();
  retval = orig_fork();
  if (retval > 0)
    report_fork(retval);
  return retval;
}


x86 assembly (clang, -O0):
<my_fork>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movq   $0x0,-0x8(%rbp)
mov    $0x0,%al
call   1040 <init_fork@plt>
mov    $0x0,%al
call   1030 <orig_fork@plt>
mov    %rax,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
jle    1166 <my_fork+0x36>
mov    -0x8(%rbp),%rdi
call   1050 <report_fork@plt>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<my_fork>:
push   %rbx
xor    %eax,%eax
call   1040 <init_fork@plt>
xor    %eax,%eax
call   1030 <orig_fork@plt>
mov    %rax,%rbx
test   %rax,%rax
jle    114f <my_fork+0x1f>
mov    %rbx,%rdi
call   1050 <report_fork@plt>
mov    %rbx,%rax
pop    %rbx
ret

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

LLVM IR (-O2):
define i64 @my_fork() {
%1 = tail call i32 (...) @init_fork()
%2 = tail call i64 (...) @orig_fork()
%3 = icmp sgt i64 %2, 0
br i1 %3, label %4, label %6
4: ; preds = %0
%5 = tail call i32 @report_fork(i64 %2)
br label %6
6: ; preds = %4, %0
ret i64 %2
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ stderr;
int gstat(char *error_msg) {
  fprintf(stderr, "wdbpltc: %s\n", error_msg);
  return (0);
}


x86 assembly (clang, -O0):
<gstat>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ebd(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xed0(%rip),%rsi
call   1030 <fprintf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gstat>:
push   %rax
mov    %rdi,%rdx
mov    0x2ec5(%rip),%rax
mov    (%rax),%edi
lea    0xedc(%rip),%rsi
call   1030 <fprintf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@stderr = global i32 0
@.str = [13 x i8] c"wdbpltc: %s\0A\00"
define i32 @gstat(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = load i8*, i8** %2
%5 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* %4)
ret i32 0
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [13 x i8] c"wdbpltc: %s\0A\00"
define i32 @gstat(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* %0)
ret i32 0
}
void INT_Excep_SCI8_RXI8(void) {}


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

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

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

LLVM IR (-O2):
define void @INT_Excep_SCI8_RXI8() {
ret void
}
int main(int y) {
  int x;
  if (y) {
    return 0;
    x++;
  };
  y = x + 1;
  return y;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
je     1124 <main+0x24>
movl   $0x0,-0x4(%rbp)
jmp    1133 <main+0x33>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main(i32 %0) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ stats();
void term(void) {
  stats();
  exit(0);
}


x86 assembly (clang, -O0):
<term>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <stats@plt>
xor    %edi,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<term>:
push   %rax
xor    %eax,%eax
call   1030 <stats@plt>
xor    %edi,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
define void @term() {
%1 = call i32 (...) @stats()
%2 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
define void @term() {
%1 = tail call i32 (...) @stats()
%2 = tail call i32 @exit(i32 0)
unreachable
}
unsigned xrop3_215_0_0(unsigned char s, unsigned char t) {
  unsigned D = 0x00ff;
  unsigned S = ((unsigned)s << 8) | s;
  unsigned T = ((unsigned)t << 8) | t;
  unsigned stk1;
  unsigned stk2;
  stk2 = T ^ S;
  stk1 = D & stk2;
  stk1 = ~stk1;
  return stk1;
}


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

x86 assembly (clang, -O2):
<xrop3_215_0_0>:
mov    %edi,%eax
xor    %esi,%eax
not    %eax
ret

LLVM IR (-O0):
define i32 @xrop3_215_0_0(i8 zeroext %0, i8 zeroext %1) {
%3 = alloca i8
%4 = alloca i8
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
store i8 %0, i8* %3
store i8 %1, i8* %4
store i32 255, i32* %5
%10 = load i8, i8* %3
%11 = zext i8 %10 to i32
%12 = shl i32 %11, 8
%13 = load i8, i8* %3
%14 = zext i8 %13 to i32
%15 = or i32 %12, %14
store i32 %15, i32* %6
%16 = load i8, i8* %4
%17 = zext i8 %16 to i32
%18 = shl i32 %17, 8
%19 = load i8, i8* %4
%20 = zext i8 %19 to i32
%21 = or i32 %18, %20
store i32 %21, i32* %7
%22 = load i32, i32* %7
%23 = load i32, i32* %6
%24 = xor i32 %22, %23
store i32 %24, i32* %9
%25 = load i32, i32* %5
%26 = load i32, i32* %9
%27 = and i32 %25, %26
store i32 %27, i32* %8
%28 = load i32, i32* %8
%29 = xor i32 %28, -1
store i32 %29, i32* %8
%30 = load i32, i32* %8
ret i32 %30
}

LLVM IR (-O2):
define i32 @xrop3_215_0_0(i8 zeroext %0, i8 zeroext %1) {
%3 = xor i8 %1, %0
%4 = zext i8 %3 to i32
%5 = xor i32 %4, -1
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ kernel_dgemm_nt_2x4_vs_lib4(int, int, int, double *,
                                               double *, double *, double *,
                                               int, int, int);
void kernel_dgemm_nt_2x4_lib4(int kmax, double *A, double *B, double *C,
                              double *D, int alg, int tc, int td) {
  kernel_dgemm_nt_2x4_vs_lib4(2, 4, kmax, A, B, C, D, alg, tc, td);
}


x86 assembly (clang, -O0):
<kernel_dgemm_nt_2x4_lib4>:
push   %rbp
mov    %rsp,%rbp
push   %rbx
sub    $0x58,%rsp
mov    0x18(%rbp),%eax
mov    0x10(%rbp),%eax
mov    %edi,-0xc(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    %rcx,-0x28(%rbp)
mov    %r8,-0x30(%rbp)
mov    %r9d,-0x34(%rbp)
mov    -0xc(%rbp),%edx
mov    -0x18(%rbp),%rcx
mov    -0x20(%rbp),%r8
mov    -0x28(%rbp),%r9
mov    -0x30(%rbp),%rbx
mov    -0x34(%rbp),%r11d
mov    0x10(%rbp),%r10d
mov    0x18(%rbp),%eax
mov    $0x2,%edi
mov    $0x4,%esi
mov    %rbx,(%rsp)
mov    %r11d,0x8(%rsp)
mov    %r10d,0x10(%rsp)
mov    %eax,0x18(%rsp)
call   1030 <kernel_dgemm_nt_2x4_vs_lib4@plt>
add    $0x58,%rsp
pop    %rbx
pop    %rbp
ret

x86 assembly (clang, -O2):
<kernel_dgemm_nt_2x4_lib4>:
push   %rbx
mov    %r9d,%eax
mov    %r8,%r10
mov    %rcx,%r9
mov    %rdx,%r8
mov    %rsi,%rcx
mov    %edi,%edx
mov    0x10(%rsp),%r11d
mov    0x18(%rsp),%ebx
mov    $0x2,%edi
mov    $0x4,%esi
push   %rbx
push   %r11
push   %rax
push   %r10
call   1030 <kernel_dgemm_nt_2x4_vs_lib4@plt>
add    $0x20,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define void @kernel_dgemm_nt_2x4_lib4(i32 %0, double* %1, double* %2, double* %3, double* %4, i32 %5, i32 %6, i32 %7) {
%9 = alloca i32
%10 = alloca double*
%11 = alloca double*
%12 = alloca double*
%13 = alloca double*
%14 = alloca i32
%15 = alloca i32
%16 = alloca i32
store i32 %0, i32* %9
store double* %1, double** %10
store double* %2, double** %11
store double* %3, double** %12
store double* %4, double** %13
store i32 %5, i32* %14
store i32 %6, i32* %15
store i32 %7, i32* %16
%17 = load i32, i32* %9
%18 = load double*, double** %10
%19 = load double*, double** %11
%20 = load double*, double** %12
%21 = load double*, double** %13
%22 = load i32, i32* %14
%23 = load i32, i32* %15
%24 = load i32, i32* %16
%25 = call i32 @kernel_dgemm_nt_2x4_vs_lib4(i32 2, i32 4, i32 %17, double* %18, double* %19, double* %20, double* %21, i32 %22, i32 %23, i32 %24)
ret void
}

LLVM IR (-O2):
define void @kernel_dgemm_nt_2x4_lib4(i32 %0, double* %1, double* %2, double* %3, double* %4, i32 %5, i32 %6, i32 %7) {
%9 = tail call i32 @kernel_dgemm_nt_2x4_vs_lib4(i32 2, i32 4, i32 %0, double* %1, double* %2, double* %3, double* %4, i32 %5, i32 %6, i32 %7)
ret void
}
/* Type definitions */
typedef unsigned long volatile uint32_t;

/* Variables and functions */
uint32_t UARTIntStatus(uint32_t ui32Base, bool bMasked) {
  ;
  if (bMasked) {
    return ((*((volatile unsigned long *)(ui32Base + 0x00000040))));
  } else {
    return ((*((volatile unsigned long *)(ui32Base + 0x0000003C))));
  }
}


x86 assembly (clang, -O0):
<UARTIntStatus>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
je     1126 <UARTIntStatus+0x26>
mov    -0x10(%rbp),%rax
mov    0x40(%rax),%rax
mov    %rax,-0x8(%rbp)
jmp    1132 <UARTIntStatus+0x32>
mov    -0x10(%rbp),%rax
mov    0x3c(%rax),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<UARTIntStatus>:
mov    %rdi,-0x8(%rsp)
xor    %eax,%eax
test   %esi,%esi
setne  %al
mov    -0x8(%rsp),%rcx
mov    0x3c(%rcx,%rax,4),%rax
ret

LLVM IR (-O0):
define i64 @UARTIntStatus(i64 %0, i32 %1) {
%3 = alloca i64
%4 = alloca i64
%5 = alloca i32
store volatile i64 %0, i64* %4
store i32 %1, i32* %5
%6 = load i32, i32* %5
%7 = icmp ne i32 %6, 0
br i1 %7, label %8, label %13
8: ; preds = %2
%9 = load volatile i64, i64* %4
%10 = add i64 %9, 64
%11 = inttoptr i64 %10 to i64*
%12 = load volatile i64, i64* %11
store i64 %12, i64* %3
br label %18
13: ; preds = %2
%14 = load volatile i64, i64* %4
%15 = add i64 %14, 60
%16 = inttoptr i64 %15 to i64*
%17 = load volatile i64, i64* %16
store i64 %17, i64* %3
br label %18
18: ; preds = %13, %8
%19 = load i64, i64* %3
ret i64 %19
}

LLVM IR (-O2):
define i64 @UARTIntStatus(i64 %0, i32 %1) {
%3 = alloca i64
store volatile i64 %0, i64* %3
%4 = icmp eq i32 %1, 0
%5 = load volatile i64, i64* %3
%6 = select i1 %4, i64 60, i64 64
%7 = add i64 %5, %6
%8 = inttoptr i64 %7 to i64*
%9 = load volatile i64, i64* %8
ret i64 %9
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ perror(char *);
void readerr(void) {
  perror("infile");
  exit(1);
}


x86 assembly (clang, -O0):
<readerr>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1030 <perror@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<readerr>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <perror@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [7 x i8] c"infile\00"
define void @readerr() {
%1 = call i32 @perror(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@.str = [7 x i8] c"infile\00"
define void @readerr() {
%1 = tail call i32 @perror(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ DrawTextlnXY127(char const *, long, long, unsigned long);
void drawtextlnxy(const char *s, long x, long y, unsigned long cfg) {
  DrawTextlnXY127(s, x, y, cfg);
}


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

x86 assembly (clang, -O2):
<drawtextlnxy>:
jmp    1030 <DrawTextlnXY127@plt>

LLVM IR (-O0):
define void @drawtextlnxy(i8* %0, i64 %1, i64 %2, i64 %3) {
%5 = alloca i8*
%6 = alloca i64
%7 = alloca i64
%8 = alloca i64
store i8* %0, i8** %5
store i64 %1, i64* %6
store i64 %2, i64* %7
store i64 %3, i64* %8
%9 = load i8*, i8** %5
%10 = load i64, i64* %6
%11 = load i64, i64* %7
%12 = load i64, i64* %8
%13 = call i32 @DrawTextlnXY127(i8* %9, i64 %10, i64 %11, i64 %12)
ret void
}

LLVM IR (-O2):
define void @drawtextlnxy(i8* %0, i64 %1, i64 %2, i64 %3) {
%5 = tail call i32 @DrawTextlnXY127(i8* %0, i64 %1, i64 %2, i64 %3)
ret void
}
void gtk_file_chooser_button_set_title() {}


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

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

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

LLVM IR (-O2):
define void @gtk_file_chooser_button_set_title() {
ret void
}
int test_imm_AEuint8_reg(unsigned char val) {
  return ((val) & (-0xAE << 0)) ? -20 : -40;
}


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

x86 assembly (clang, -O2):
<test_imm_AEuint8_reg>:
test   $0x52,%dil
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_AEuint8_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, -174
%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_AEuint8_reg(i8 zeroext %0) {
%2 = and i8 %0, 82
%3 = icmp eq i8 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
void mlx5_esw_indir_table_destroy(struct mlx5_esw_indir_table *indir) {}


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

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

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

LLVM IR (-O2):
%struct.mlx5_esw_indir_table = type opaque
define void @mlx5_esw_indir_table_destroy(%struct.mlx5_esw_indir_table* nocapture %0) {
ret void
}