xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ islower(int);
void t_islower_0x41() {
  Assert_real((islower(65) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_islower.c",
              330, ("islower should be 0 for A"));
}


x86 assembly (clang, -O0):
<t_islower_0x41>:
push   %rbp
mov    %rsp,%rbp
mov    $0x41,%edi
call   1030 <islower@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xebf(%rip),%rsi
mov    $0x14a,%edx
lea    0xf5b(%rip),%rcx
call   1040 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_islower_0x41>:
push   %rax
mov    $0x41,%edi
call   1030 <islower@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x14a,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

LLVM IR (-O0):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_islower.c\00"
@.str.1 = [26 x i8] c"islower should be 0 for A\00"
define void @t_islower_0x41() {
%1 = call i64 @islower(i32 65)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 330, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_islower.c\00"
@.str.1 = [26 x i8] c"islower should be 0 for A\00"
define void @t_islower_0x41() {
%1 = tail call i64 @islower(i32 65)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 330, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}
void g_arith_sqrt_f_s64(void *s, void *d, void *o) {}


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

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

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

LLVM IR (-O2):
define void @g_arith_sqrt_f_s64(i8* nocapture %0, i8* nocapture %1, i8* nocapture %2) {
ret void
}
/* Variables and functions */
scalar_t__ EOF;
int EXIT_SUCCESS;
scalar_t__ getchar();
int /*<<< orphan*/ printf(char *, int);
int main() {
  int c = (getchar() != EOF);
  printf("The value of expression 'getchar() != EOF' is %d\n", c);
  return EXIT_SUCCESS;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1040 <getchar@plt>
mov    0x2eab(%rip),%rcx
cmp    (%rcx),%rax
setne  %al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%esi
lea    0xeab(%rip),%rdi
call   1030 <printf@plt>
mov    0x2e77(%rip),%rax
mov    (%rax),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1040 <getchar@plt>
mov    0x2eb9(%rip),%rcx
xor    %esi,%esi
cmp    (%rcx),%rax
setne  %sil
lea    0xec1(%rip),%rdi
call   1030 <printf@plt>
mov    0x2e8d(%rip),%rax
mov    (%rax),%eax
pop    %rcx
ret

LLVM IR (-O0):
@EOF = global i64 0
@.str = [50 x i8] c"The value of expression 'getchar() != EOF' is %d\0A\00"
@EXIT_SUCCESS = global i32 0
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
%3 = call i64 (...) @getchar()
%4 = load i64, i64* @EOF
%5 = icmp ne i64 %3, %4
%6 = zext i1 %5 to i32
store i32 %6, i32* %2
%7 = load i32, i32* %2
%8 = call i32 @printf(i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str, i64 0, i64 0), i32 %7)
%9 = load i32, i32* @EXIT_SUCCESS
ret i32 %9
}

LLVM IR (-O2):
@EOF = global i64 0
@.str = [50 x i8] c"The value of expression 'getchar() != EOF' is %d\0A\00"
@EXIT_SUCCESS = global i32 0
define i32 @main() {
%1 = tail call i64 (...) @getchar()
%2 = load i64, i64* @EOF
%3 = icmp ne i64 %1, %2
%4 = zext i1 %3 to i32
%5 = tail call i32 @printf(i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str, i64 0, i64 0), i32 %4)
%6 = load i32, i32* @EXIT_SUCCESS
ret i32 %6
}
int main(void) {
  int i;
  int x[1000];
  for (i = 0; i < 101; i++)
    x[i] = x[i + 100];
  return x[12];
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0xf30,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x65,-0x8(%rbp)
jge    114b <main+0x4b>
mov    -0x8(%rbp),%eax
add    $0x64,%eax
cltq
mov    -0xfb0(%rbp,%rax,4),%ecx
movslq -0x8(%rbp),%rax
mov    %ecx,-0xfb0(%rbp,%rax,4)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1119 <main+0x19>
mov    -0xf80(%rbp),%eax
add    $0xf30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x328,%rsp
lea    0x190(%rsp),%rsi
mov    %rsp,%rdi
mov    $0x194,%edx
call   1030 <memmove@plt>
mov    0x30(%rsp),%eax
add    $0x328,%rsp
ret

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

LLVM IR (-O2):
define i32 @main() {
%1 = alloca [201 x i32]
%2 = bitcast [201 x i32]* %1 to i8*
%3 = getelementptr inbounds [201 x i32], [201 x i32]* %1, i64 0, i64 100
%4 = bitcast i32* %3 to i8*
%5 = getelementptr inbounds [201 x i32], [201 x i32]* %1, i64 0, i64 12
%6 = load i32, i32* %5
ret i32 %6
}
int cairo_code_draw_pwrstartcLabel_get_height() { return 119; }


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

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

LLVM IR (-O0):
define i32 @cairo_code_draw_pwrstartcLabel_get_height() {
ret i32 119
}

LLVM IR (-O2):
define i32 @cairo_code_draw_pwrstartcLabel_get_height() {
ret i32 119
}
/* Variables and functions */
int /*<<< orphan*/ abort();
int /*<<< orphan*/ test4();
int main(int argc, char **argv) {
  if (!test4())
    abort();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x0,%al
call   1040 <test4@plt>
cmp    $0x0,%eax
jne    114d <main+0x2d>
mov    $0x0,%al
call   1030 <abort@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1040 <test4@plt>
test   %eax,%eax
je     1130 <main+0x10>
xor    %eax,%eax
pop    %rcx
ret
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = call i32 (...) @test4()
%7 = icmp ne i32 %6, 0
br i1 %7, label %10, label %8
8: ; preds = %2
%9 = call i32 (...) @abort()
unreachable
10: ; preds = %2
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @test4()
%4 = icmp eq i32 %3, 0
br i1 %4, label %5, label %7
5: ; preds = %2
%6 = tail call i32 (...) @abort()
unreachable
7: ; preds = %2
ret i32 0
}
unsigned short __inwc(unsigned short port) {
  unsigned short _v;
  __asm__ __volatile__("in"
                       "w"
                       " %"
                       ""
                       "1,%"
                       ""
                       "0"
                       : "=a"(_v)
                       : "id"(port));
  return _v;
}


x86 assembly (clang, -O0):
<__inwc>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
mov    -0x2(%rbp),%dx
in     (%dx),%ax
mov    %ax,-0x4(%rbp)
movzwl -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<__inwc>:
mov    %edi,%edx
in     (%dx),%ax
ret

LLVM IR (-O0):
define zeroext i16 @__inwc(i16 zeroext %0) {
%2 = alloca i16
%3 = alloca i16
store i16 %0, i16* %2
%4 = load i16, i16* %2
%5 = call i16 asm sideeffect "inw $1,$0", "={ax},i{dx},~{dirflag},~{fpsr},~{flags}"(i16 %4)
store i16 %5, i16* %3
%6 = load i16, i16* %3
ret i16 %6
}

LLVM IR (-O2):
define zeroext i16 @__inwc(i16 zeroext %0) {
%2 = tail call i16 asm sideeffect "inw $1,$0", "={ax},i{dx},~{dirflag},~{fpsr},~{flags}"(i16 %0)
ret i16 %2
}
int f(int a, int b) { return a == b; }


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

x86 assembly (clang, -O2):
<f>:
xor    %eax,%eax
cmp    %esi,%edi
sete   %al
ret

LLVM IR (-O0):
define i32 @f(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 eq i32 %5, %6
%8 = zext i1 %7 to i32
ret i32 %8
}

LLVM IR (-O2):
define i32 @f(i32 %0, i32 %1) {
%3 = icmp eq i32 %0, %1
%4 = zext i1 %3 to i32
ret i32 %4
}
void gdk_x11_get_xatom_by_name_for_display() {}


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

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

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

LLVM IR (-O2):
define void @gdk_x11_get_xatom_by_name_for_display() {
ret void
}
/* Variables and functions */
int inet_addr(char *);
int misc_inet_addr(char *ip) { return inet_addr(ip); }


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

x86 assembly (clang, -O2):
<misc_inet_addr>:
jmp    1030 <inet_addr@plt>

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

LLVM IR (-O2):
define i32 @misc_inet_addr(i8* %0) {
%2 = tail call i32 @inet_addr(i8* %0)
ret i32 %2
}
int aa_pro_vid_b02(int chan, unsigned char *buf, int len) { return (0); }


x86 assembly (clang, -O0):
<aa_pro_vid_b02>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @aa_pro_vid_b02(i32 %0, i8* %1, i32 %2) {
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i32
store i32 %0, i32* %4
store i8* %1, i8** %5
store i32 %2, i32* %6
ret i32 0
}

LLVM IR (-O2):
define i32 @aa_pro_vid_b02(i32 %0, i8* nocapture readnone %1, i32 %2) {
ret i32 0
}
void CopyRow_Any_AVX() {}


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

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

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

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

/* Variables and functions */
int /*<<< orphan*/ _mm_stream_si128(int /*<<< orphan*/ *, int /*<<< orphan*/);
void test_mm_stream_si128(__m128i *A, __m128i B) { _mm_stream_si128(A, B); }


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

x86 assembly (clang, -O2):
<test_mm_stream_si128>:
jmp    1030 <_mm_stream_si128@plt>

LLVM IR (-O0):
define void @test_mm_stream_si128(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 = call i32 @_mm_stream_si128(i32* %5, i32 %6)
ret void
}

LLVM IR (-O2):
define void @test_mm_stream_si128(i32* %0, i32 %1) {
%3 = tail call i32 @_mm_stream_si128(i32* %0, i32 %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ abort();
int /*<<< orphan*/ exit(int /*<<< orphan*/);
__attribute__((no)) t(int i) {
  if (i == 0)
    exit(0);
  if (i > 255)
    abort();
}


x86 assembly (clang, -O0):
<t>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jne    113c <t+0x1c>
xor    %edi,%edi
call   1040 <exit@plt>
cmpl   $0xff,-0x8(%rbp)
jle    1150 <t+0x30>
mov    $0x0,%al
call   1030 <abort@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<t>:
push   %rax
test   %edi,%edi
je     112f <t+0xf>
cmp    $0x100,%edi
jge    1136 <t+0x16>
pop    %rcx
ret
xor    %edi,%edi
call   1040 <exit@plt>
xor    %eax,%eax
call   1030 <abort@plt>

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

LLVM IR (-O2):
define i32 @t(i32 %0) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %3, label %5
3: ; preds = %1
%4 = tail call i32 @exit(i32 0)
unreachable
5: ; preds = %1
%6 = icmp sgt i32 %0, 255
br i1 %6, label %7, label %9
7: ; preds = %5
%8 = tail call i32 (...) @abort()
unreachable
9: ; preds = %5
ret i32 undef
}
void *test_anti_range_67(unsigned n) {
  extern void *alloc_anti_range_67(unsigned) __attribute__((alloc_size(1)));
  if (0 <= n && n <= 12)
    n = 0 - 1;
  return alloc_anti_range_67(n);
}


x86 assembly (clang, -O0):
<test_anti_range_67>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
xor    %eax,%eax
cmp    -0x4(%rbp),%eax
ja     1137 <test_anti_range_67+0x27>
cmpl   $0xc,-0x4(%rbp)
ja     1137 <test_anti_range_67+0x27>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <alloc_anti_range_67@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_anti_range_67>:
cmp    $0xd,%edi
mov    $0xffffffff,%eax
cmovb  %eax,%edi
jmp    1030 <alloc_anti_range_67@plt>

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

LLVM IR (-O2):
define i8* @test_anti_range_67(i32 %0) {
%2 = icmp ult i32 %0, 13
%3 = select i1 %2, i32 -1, i32 %0
%4 = tail call i8* @alloc_anti_range_67(i32 %3)
ret i8* %4
}
/* Variables and functions */
int /*<<< orphan*/ puts(char *);
void print_usage() { puts("Usage: postm <progfile> <memfile>"); }


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

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

LLVM IR (-O0):
@.str = [34 x i8] c"Usage: postm <progfile> <memfile>\00"
define void @print_usage() {
%1 = call i32 @puts(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [34 x i8] c"Usage: postm <progfile> <memfile>\00"
define void @print_usage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0))
ret void
}
double MAP_CHEBYSHEV(double x_n, int iteration) {
  return ((cos(iteration * (acos(x_n)))) * 0.5);
}


x86 assembly (clang, -O0):
<MAP_CHEBYSHEV>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
mov    %edi,-0xc(%rbp)
cvtsi2sdl -0xc(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1030 <acos@plt>
movaps %xmm0,%xmm1
movsd  -0x18(%rbp),%xmm0
mulsd  %xmm1,%xmm0
call   1040 <cos@plt>
movsd  0xea3(%rip),%xmm1
mulsd  %xmm1,%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<MAP_CHEBYSHEV>:
push   %rax
cvtsi2sd %edi,%xmm1
movsd  %xmm1,(%rsp)
call   1030 <acos@plt>
mulsd  (%rsp),%xmm0
call   1040 <cos@plt>
mulsd  0xebf(%rip),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @MAP_CHEBYSHEV(double %0, i32 %1) {
%3 = alloca double
%4 = alloca i32
store double %0, double* %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = sitofp i32 %5 to double
%7 = load double, double* %3
%8 = call double @acos(double %7)
%9 = fmul double %6, %8
%10 = call double @cos(double %9)
%11 = fmul double %10, 5.000000e-01
ret double %11
}

LLVM IR (-O2):
define double @MAP_CHEBYSHEV(double %0, i32 %1) {
%3 = sitofp i32 %1 to double
%4 = tail call double @acos(double %0)
%5 = fmul double %4, %3
%6 = tail call double @cos(double %5)
%7 = fmul double %6, 5.000000e-01
ret double %7
}
int findTriviality(int *divisors, int num) {}


x86 assembly (clang, -O0):
<findTriviality>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @findTriviality(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* %3
ret i32 %6
}

LLVM IR (-O2):
define i32 @findTriviality(i32* nocapture readnone %0, i32 %1) {
ret i32 undef
}
int atoi(const char *str) {
  int result = 0;
  while ('0' <= *str && *str <= '9') {
    result *= 10;
    result += (*str - '0');
    ++str;
  }
  return result;
}


x86 assembly (clang, -O0):
<atoi>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%edx
xor    %eax,%eax
mov    $0x30,%ecx
cmp    %edx,%ecx
mov    %al,-0xd(%rbp)
jg     1138 <atoi+0x38>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x39,%eax
setle  %al
mov    %al,-0xd(%rbp)
mov    -0xd(%rbp),%al
test   $0x1,%al
jne    1148 <atoi+0x48>
jmp    1170 <atoi+0x70>
imul   $0xa,-0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
sub    $0x30,%eax
add    -0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    110f <atoi+0xf>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<atoi>:
mov    (%rdi),%cl
lea    -0x30(%rcx),%edx
xor    %eax,%eax
cmp    $0x9,%dl
ja     113b <atoi+0x3b>
add    $0x1,%rdi
xor    %eax,%eax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movzbl %cl,%ecx
lea    (%rax,%rax,4),%eax
lea    (%rcx,%rax,2),%eax
add    $0xffffffd0,%eax
movzbl (%rdi),%ecx
lea    -0x30(%rcx),%edx
add    $0x1,%rdi
cmp    $0xa,%dl
jb     1120 <atoi+0x20>
ret

LLVM IR (-O0):
define i32 @atoi(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
store i32 0, i32* %3
br label %4
4: ; preds = %16, %1
%5 = load i8*, i8** %2
%6 = load i8, i8* %5
%7 = sext i8 %6 to i32
%8 = icmp sle i32 48, %7
br i1 %8, label %9, label %14
9: ; preds = %4
%10 = load i8*, i8** %2
%11 = load i8, i8* %10
%12 = sext i8 %11 to i32
%13 = icmp sle i32 %12, 57
br label %14
14: ; preds = %9, %4
%15 = phi i1 [ false, %4 ], [ %13, %9 ]
br i1 %15, label %16, label %27
16: ; preds = %14
%17 = load i32, i32* %3
%18 = mul nsw i32 %17, 10
store i32 %18, i32* %3
%19 = load i8*, i8** %2
%20 = load i8, i8* %19
%21 = sext i8 %20 to i32
%22 = sub nsw i32 %21, 48
%23 = load i32, i32* %3
%24 = add nsw i32 %23, %22
store i32 %24, i32* %3
%25 = load i8*, i8** %2
%26 = getelementptr inbounds i8, i8* %25, i32 1
store i8* %26, i8** %2
br label %4
27: ; preds = %14
%28 = load i32, i32* %3
ret i32 %28
}

LLVM IR (-O2):
define i32 @atoi(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = add i8 %2, -48
%4 = icmp ult i8 %3, 10
br i1 %4, label %5, label %17
5: ; preds = %1, %5
%6 = phi i8 [ %14, %5 ], [ %2, %1 ]
%7 = phi i32 [ %12, %5 ], [ 0, %1 ]
%8 = phi i8* [ %13, %5 ], [ %0, %1 ]
%9 = zext i8 %6 to i32
%10 = mul nsw i32 %7, 10
%11 = add i32 %10, -48
%12 = add i32 %11, %9
%13 = getelementptr inbounds i8, i8* %8, i64 1
%14 = load i8, i8* %13
%15 = add i8 %14, -48
%16 = icmp ult i8 %15, 10
br i1 %16, label %5, label %17
17: ; preds = %5, %1
%18 = phi i32 [ 0, %1 ], [ %12, %5 ]
ret i32 %18
}
void uart_deinit(void) {}


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

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

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

LLVM IR (-O2):
define void @uart_deinit() {
ret void
}
/* Variables and functions */
scalar_t__ Malloc(scalar_t__);
int /*<<< orphan*/ strcat(char *, char *);
int /*<<< orphan*/ strcpy(char *, char *);
scalar_t__ strlen(char *);
char *concatenate(char *a, char *b) {
  char *base;
  base = (char *)Malloc(strlen(a) + strlen(b) + 1);
  strcpy(base, a);
  strcat(base, b);
  return base;
}


x86 assembly (clang, -O0):
<concatenate>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1050 <strlen@plt>
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%rdi
call   1050 <strlen@plt>
mov    -0x20(%rbp),%rdi
add    %rax,%rdi
add    $0x1,%rdi
call   1030 <Malloc@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x8(%rbp),%rsi
call   1040 <strcpy@plt>
mov    -0x18(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1060 <strcat@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<concatenate>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%r12
call   1050 <strlen@plt>
mov    %rax,%r15
mov    %r14,%rdi
call   1050 <strlen@plt>
lea    (%r15,%rax,1),%rdi
add    $0x1,%rdi
call   1030 <Malloc@plt>
mov    %rax,%rbx
mov    %rax,%rdi
mov    %r12,%rsi
call   1040 <strcpy@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
call   1060 <strcat@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define i8* @concatenate(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%6 = load i8*, i8** %3
%7 = call i64 @strlen(i8* %6)
%8 = load i8*, i8** %4
%9 = call i64 @strlen(i8* %8)
%10 = add nsw i64 %7, %9
%11 = add nsw i64 %10, 1
%12 = call i64 @Malloc(i64 %11)
%13 = inttoptr i64 %12 to i8*
store i8* %13, i8** %5
%14 = load i8*, i8** %5
%15 = load i8*, i8** %3
%16 = call i32 @strcpy(i8* %14, i8* %15)
%17 = load i8*, i8** %5
%18 = load i8*, i8** %4
%19 = call i32 @strcat(i8* %17, i8* %18)
%20 = load i8*, i8** %5
ret i8* %20
}

LLVM IR (-O2):
define i8* @concatenate(i8* %0, i8* %1) {
%3 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%4 = tail call i64 @strlen(i8* dereferenceable(1) %1)
%5 = add i64 %3, 1
%6 = add i64 %5, %4
%7 = tail call i64 @Malloc(i64 %6)
%8 = inttoptr i64 %7 to i8*
%9 = tail call i32 @strcpy(i8* %8, i8* %0)
%10 = tail call i32 @strcat(i8* %8, i8* %1)
ret i8* %8
}
/* Variables and functions */
int printf(char *, char);
int print_char(char v) { return printf("%c", v); }


x86 assembly (clang, -O0):
<print_char>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
lea    0xedb(%rip),%rdi
movsbl -0x1(%rbp),%esi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_char>:
mov    %edi,%esi
lea    0xee7(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [3 x i8] c"%c\00"
define i32 @print_char(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8 signext %3)
ret i32 %4
}

LLVM IR (-O2):
@.str = [3 x i8] c"%c\00"
define i32 @print_char(i8 signext %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8 signext %0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void usage(const char *use) { printf("Usage: doppler <command>\n"); }


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

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

LLVM IR (-O0):
@.str = [26 x i8] c"Usage: doppler <command>\0A\00"
define void @usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [25 x i8] c"Usage: doppler <command>\00"
define void @usage(i8* nocapture readnone %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ serverReceiveLocal();
int /*<<< orphan*/ serverReceiveNet();
int serverReceive() {
  serverReceiveNet();
  serverReceiveLocal();
  return 0;
}


x86 assembly (clang, -O0):
<serverReceive>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <serverReceiveNet@plt>
mov    $0x0,%al
call   1040 <serverReceiveLocal@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<serverReceive>:
push   %rax
xor    %eax,%eax
call   1030 <serverReceiveNet@plt>
xor    %eax,%eax
call   1040 <serverReceiveLocal@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @serverReceive() {
%1 = call i32 (...) @serverReceiveNet()
%2 = call i32 (...) @serverReceiveLocal()
ret i32 0
}

LLVM IR (-O2):
define i32 @serverReceive() {
%1 = tail call i32 (...) @serverReceiveNet()
%2 = tail call i32 (...) @serverReceiveLocal()
ret i32 0
}
/* Type definitions */
struct pollfd {
  int dummy;
};

/* Variables and functions */
int poll(struct pollfd *, int, int);
int do_poll(struct pollfd *fds, int nfds, int timeout) {
  return poll(fds, nfds, timeout);
}


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

x86 assembly (clang, -O2):
<do_poll>:
jmp    1030 <poll@plt>

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

LLVM IR (-O2):
%struct.pollfd = type { i32 }
define i32 @do_poll(%struct.pollfd* %0, i32 %1, i32 %2) {
%4 = tail call i32 @poll(%struct.pollfd* %0, i32 %1, i32 %2)
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int mocksuspend_exit(void) {
  printf("mocksuspend exit\n");
  return 0;
}


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

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

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

LLVM IR (-O2):
@str = [17 x i8] c"mocksuspend exit\00"
define i32 @mocksuspend_exit() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @str, i64 0, i64 0))
ret i32 0
}
int tst_avx512_aux(void) { return 77; }


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

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

LLVM IR (-O0):
define i32 @tst_avx512_aux() {
ret i32 77
}

LLVM IR (-O2):
define i32 @tst_avx512_aux() {
ret i32 77
}
/* Variables and functions */
char *memmove(char *, char *, scalar_t__);
scalar_t__ strlen(char *);
char *strmove(char *to, char *from) {
  return memmove(to, from, strlen(from) + 1);
}


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

x86 assembly (clang, -O2):
<strmove>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %rdi,%r14
mov    %rsi,%rdi
call   1030 <strlen@plt>
lea    0x1(%rax),%rdx
mov    %r14,%rdi
mov    %rbx,%rsi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <memmove@plt>

LLVM IR (-O0):
define i8* @strmove(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %3
%6 = load i8*, i8** %4
%7 = load i8*, i8** %4
%8 = call i64 @strlen(i8* %7)
%9 = add nsw i64 %8, 1
%10 = call i8* @memmove(i8* %5, i8* %6, i64 %9)
ret i8* %10
}

LLVM IR (-O2):
define i8* @strmove(i8* returned writeonly %0, i8* nocapture %1) {
%3 = tail call i64 @strlen(i8* dereferenceable(1) %1)
%4 = add nsw i64 %3, 1
tail call void @llvm.memmove.p0i8.p0i8.i64(i8* align 1 %0, i8* align 1 %1, i64 %4, i1 false)
ret i8* %0
}
void UART_1_ScbModeStop(void) {}


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

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

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

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


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

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

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

LLVM IR (-O2):
define void @test_array_max() {
ret void
}
/* Variables and functions */
int chdir(char *);
int chroot(char *);
int sysapi_chroot_dir(char *directory) {
  int ret;
  ret = chdir(directory);
  if (ret == 0)
    return chroot(directory);
  return -1;
}


x86 assembly (clang, -O0):
<sysapi_chroot_dir>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <chdir@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
jne    1153 <sysapi_chroot_dir+0x33>
mov    -0x10(%rbp),%rdi
call   1030 <chroot@plt>
mov    %eax,-0x4(%rbp)
jmp    115a <sysapi_chroot_dir+0x3a>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sysapi_chroot_dir>:
push   %rbx
mov    %rdi,%rbx
call   1040 <chdir@plt>
test   %eax,%eax
je     1134 <sysapi_chroot_dir+0x14>
mov    $0xffffffff,%eax
pop    %rbx
ret
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <chroot@plt>

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

LLVM IR (-O2):
define i32 @sysapi_chroot_dir(i8* %0) {
%2 = tail call i32 @chdir(i8* %0)
%3 = icmp eq i32 %2, 0
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i32 @chroot(i8* %0)
br label %6
6: ; preds = %1, %4
%7 = phi i32 [ %5, %4 ], [ -1, %1 ]
ret i32 %7
}
int Diss_Index_Get8BitRegCount(unsigned char OpcodeIndex) {
  if ((OpcodeIndex == 4) || (OpcodeIndex == 5))
    return 1;
  if (OpcodeIndex == 6)
    return 2;
  return 0;
}


x86 assembly (clang, -O0):
<Diss_Index_Get8BitRegCount>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x5(%rbp)
movzbl -0x5(%rbp),%eax
cmp    $0x4,%eax
je     1124 <Diss_Index_Get8BitRegCount+0x24>
movzbl -0x5(%rbp),%eax
cmp    $0x5,%eax
jne    1130 <Diss_Index_Get8BitRegCount+0x30>
movl   $0x1,-0x4(%rbp)
jmp    1150 <Diss_Index_Get8BitRegCount+0x50>
movzbl -0x5(%rbp),%eax
cmp    $0x6,%eax
jne    1149 <Diss_Index_Get8BitRegCount+0x49>
movl   $0x2,-0x4(%rbp)
jmp    1150 <Diss_Index_Get8BitRegCount+0x50>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<Diss_Index_Get8BitRegCount>:
mov    %edi,%eax
and    $0xfe,%al
xor    %ecx,%ecx
cmp    $0x6,%dil
sete   %cl
add    %ecx,%ecx
cmp    $0x4,%al
mov    $0x1,%eax
cmovne %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @Diss_Index_Get8BitRegCount(i8 zeroext %0) {
%2 = and i8 %0, -2
%3 = icmp eq i8 %2, 4
%4 = icmp eq i8 %0, 6
%5 = select i1 %4, i32 2, i32 0
%6 = select i1 %3, i32 1, i32 %5
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ Controller_Run();
int /*<<< orphan*/ Display_Run();
int /*<<< orphan*/ Initialize();
int /*<<< orphan*/ LED_Run();
int main(void) {
  Initialize();
  for (;;) {
    Controller_Run();
    Display_Run();
    LED_Run();
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1060 <Initialize@plt>
mov    $0x0,%al
call   1050 <Controller_Run@plt>
mov    $0x0,%al
call   1030 <Display_Run@plt>
mov    $0x0,%al
call   1040 <LED_Run@plt>
jmp    1156 <main+0x16>

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1060 <Initialize@plt>
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1050 <Controller_Run@plt>
xor    %eax,%eax
call   1030 <Display_Run@plt>
xor    %eax,%eax
call   1040 <LED_Run@plt>
jmp    1150 <main+0x10>

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @Initialize()
br label %3
3: ; preds = %3, %0
%4 = call i32 (...) @Controller_Run()
%5 = call i32 (...) @Display_Run()
%6 = call i32 (...) @LED_Run()
br label %3
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @Initialize()
br label %2
2: ; preds = %2, %0
%3 = tail call i32 (...) @Controller_Run()
%4 = tail call i32 (...) @Display_Run()
%5 = tail call i32 (...) @LED_Run()
br label %2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ pthread_exit(int /*<<< orphan*/ *);
int pthread_self();
void *PrintHello(void *arg) {
  int tid = pthread_self();
  printf("Thread %u says: HELLO! I AM A COMPUTER\n", tid);
  pthread_exit(NULL);
}


x86 assembly (clang, -O0):
<PrintHello>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    $0x0,%al
call   1050 <pthread_self@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%esi
lea    0xeb0(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
mov    %eax,%edi
call   1040 <pthread_exit@plt>
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<PrintHello>:
push   %rax
xor    %eax,%eax
call   1050 <pthread_self@plt>
lea    0xec1(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
xor    %edi,%edi
pop    %rax
jmp    1040 <pthread_exit@plt>

LLVM IR (-O0):
@.str = [40 x i8] c"Thread %u says: HELLO! I AM A COMPUTER\0A\00"
define i8* @PrintHello(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
%5 = call i32 (...) @pthread_self()
store i32 %5, i32* %4
%6 = load i32, i32* %4
%7 = call i32 @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str, i64 0, i64 0), i32 %6)
%8 = call i32 @pthread_exit(i32* null)
%9 = load i8*, i8** %2
ret i8* %9
}

LLVM IR (-O2):
@.str = [40 x i8] c"Thread %u says: HELLO! I AM A COMPUTER\0A\00"
define noalias i8* @PrintHello(i8* nocapture readnone %0) {
%2 = tail call i32 (...) @pthread_self()
%3 = tail call i32 @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str, i64 0, i64 0), i32 %2)
%4 = tail call i32 @pthread_exit(i32* null)
ret i8* undef
}
/* Variables and functions */
unsigned long rand();
int /*<<< orphan*/ srand(int /*<<< orphan*/);
int /*<<< orphan*/ time(int /*<<< orphan*/);
unsigned long random_xid(void) {
  static int initialized;
  if (!initialized) {
    srand(time(0));
    initialized++;
  }
  return rand();
}


x86 assembly (clang, -O0):
<random_xid>:
push   %rbp
mov    %rsp,%rbp
cmpl   $0x0,0x2f01(%rip)
jne    115e <random_xid+0x2e>
xor    %edi,%edi
call   1040 <time@plt>
mov    %eax,%edi
call   1030 <srand@plt>
mov    0x2ee7(%rip),%eax
add    $0x1,%eax
mov    %eax,0x2ede(%rip)
mov    $0x0,%al
call   1050 <rand@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<random_xid>:
push   %rax
cmpl   $0x0,0x2f04(%rip)
jne    114f <random_xid+0x1f>
xor    %edi,%edi
call   1040 <time@plt>
mov    %eax,%edi
call   1030 <srand@plt>
addl   $0x1,0x2eed(%rip)
xor    %eax,%eax
pop    %rcx
jmp    1050 <rand@plt>

LLVM IR (-O0):
@random_xid.initialized = internal global i32 0
define i64 @random_xid() {
%1 = load i32, i32* @random_xid.initialized
%2 = icmp ne i32 %1, 0
br i1 %2, label %8, label %3
3: ; preds = %0
%4 = call i32 @time(i32 0)
%5 = call i32 @srand(i32 %4)
%6 = load i32, i32* @random_xid.initialized
%7 = add nsw i32 %6, 1
store i32 %7, i32* @random_xid.initialized
br label %8
8: ; preds = %3, %0
%9 = call i64 (...) @rand()
ret i64 %9
}

LLVM IR (-O2):
@random_xid.initialized = internal unnamed_addr global i32 0
define i64 @random_xid() {
%1 = load i32, i32* @random_xid.initialized
%2 = icmp eq i32 %1, 0
br i1 %2, label %3, label %8
3: ; preds = %0
%4 = tail call i32 @time(i32 0)
%5 = tail call i32 @srand(i32 %4)
%6 = load i32, i32* @random_xid.initialized
%7 = add nsw i32 %6, 1
store i32 %7, i32* @random_xid.initialized
br label %8
8: ; preds = %3, %0
%9 = tail call i64 (...) @rand()
ret i64 %9
}
int execute_sched_get_priority_min() { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @execute_sched_get_priority_min() {
ret i32 0
}
void IntPriorityThresholdSet(unsigned int threshold) {
  (*((volatile unsigned int *)((0x48200000) + (0x68)))) =
      threshold & (0x000000FFu);
}


x86 assembly (clang, -O0):
<IntPriorityThresholdSet>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%ecx
and    $0xff,%ecx
mov    $0x48200068,%eax
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<IntPriorityThresholdSet>:
movzbl %dil,%eax
mov    %eax,0x48200068
ret

LLVM IR (-O0):
define void @IntPriorityThresholdSet(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = and i32 %3, 255
store volatile i32 %4, i32* inttoptr (i64 1210056808 to i32*)
ret void
}

LLVM IR (-O2):
define void @IntPriorityThresholdSet(i32 %0) {
%2 = and i32 %0, 255
store volatile i32 %2, i32* inttoptr (i64 1210056808 to i32*)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int, int);
int hello_world(int a, int b, int c) {
  printf("a: %i, b: %i, c: %c\n", a, b, c);
  return 0;
}


x86 assembly (clang, -O0):
<hello_world>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x4(%rbp),%esi
mov    -0x8(%rbp),%edx
mov    -0xc(%rbp),%ecx
lea    0xecf(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<hello_world>:
push   %rax
mov    %edx,%ecx
mov    %esi,%edx
mov    %edi,%esi
lea    0xee2(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [21 x i8] c"a: %i, b: %i, c: %c\0A\00"
define i32 @hello_world(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load i32, i32* %4
%8 = load i32, i32* %5
%9 = load i32, i32* %6
%10 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i32 %7, i32 %8, i32 %9)
ret i32 0
}

LLVM IR (-O2):
@.str = [21 x i8] c"a: %i, b: %i, c: %c\0A\00"
define i32 @hello_world(i32 %0, i32 %1, i32 %2) {
%4 = tail call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i32 %0, i32 %1, i32 %2)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ printerror(int /*<<< orphan*/, char *, char *, int);
void signalhandler(int sig) {
  printerror(0, "+INFO", "caught signal #%d", sig);
  exit(0);
}


x86 assembly (clang, -O0):
<signalhandler>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%ecx
xor    %edi,%edi
lea    0xec9(%rip),%rsi
lea    0xec8(%rip),%rdx
call   1030 <printerror@plt>
xor    %edi,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<signalhandler>:
push   %rax
mov    %edi,%ecx
lea    0xed6(%rip),%rsi
lea    0xed5(%rip),%rdx
xor    %edi,%edi
call   1030 <printerror@plt>
xor    %edi,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [6 x i8] c"+INFO\00"
@.str.1 = [18 x i8] c"caught signal #%d\00"
define void @signalhandler(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @printerror(i32 0, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.1, i64 0, i64 0), i32 %3)
%5 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@.str = [6 x i8] c"+INFO\00"
@.str.1 = [18 x i8] c"caught signal #%d\00"
define void @signalhandler(i32 %0) {
%2 = tail call i32 @printerror(i32 0, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.1, i64 0, i64 0), i32 %0)
%3 = tail call i32 @exit(i32 0)
unreachable
}
/* Variables and functions */
scalar_t__ finite(float);
float limat_number_is_finite(float value) {
  if (finite(value))
    return 1;
  return 0;
}


x86 assembly (clang, -O0):
<limat_number_is_finite>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x8(%rbp)
movss  -0x8(%rbp),%xmm0
call   1030 <finite@plt>
cmp    $0x0,%rax
je     1143 <limat_number_is_finite+0x33>
movss  0xec7(%rip),%xmm0
movss  %xmm0,-0x4(%rbp)
jmp    114b <limat_number_is_finite+0x3b>
xorps  %xmm0,%xmm0
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<limat_number_is_finite>:
push   %rax
call   1030 <finite@plt>
xorps  %xmm0,%xmm0
test   %rax,%rax
je     1126 <limat_number_is_finite+0x16>
movss  0xeda(%rip),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define float @limat_number_is_finite(float %0) {
%2 = alloca float
%3 = alloca float
store float %0, float* %3
%4 = load float, float* %3
%5 = call i64 @finite(float %4)
%6 = icmp ne i64 %5, 0
br i1 %6, label %7, label %8
7: ; preds = %1
store float 1.000000e+00, float* %2
br label %9
8: ; preds = %1
store float 0.000000e+00, float* %2
br label %9
9: ; preds = %8, %7
%10 = load float, float* %2
ret float %10
}

LLVM IR (-O2):
define float @limat_number_is_finite(float %0) {
%2 = tail call i64 @finite(float %0)
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, float 0.000000e+00, float 1.000000e+00
ret float %4
}
/* Variables and functions */
scalar_t__ malloc(int);
char *strcpy(char *, char *);
int strlen(char *);
char *copy_string(char *s) {
  char *tmp;
  tmp = (char *)malloc((strlen(s) + 1) * sizeof(char));
  return strcpy(tmp, s);
}


x86 assembly (clang, -O0):
<copy_string>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <strlen@plt>
add    $0x1,%eax
cltq
shl    $0x0,%rax
mov    %eax,%edi
call   1050 <malloc@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rsi
call   1030 <strcpy@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<copy_string>:
push   %rbx
mov    %rdi,%rbx
call   1040 <strlen@plt>
lea    0x1(%rax),%edi
call   1050 <malloc@plt>
mov    %rax,%rdi
mov    %rbx,%rsi
pop    %rbx
jmp    1030 <strcpy@plt>

LLVM IR (-O0):
define i8* @copy_string(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i32 @strlen(i8* %4)
%6 = add nsw i32 %5, 1
%7 = sext i32 %6 to i64
%8 = mul i64 %7, 1
%9 = trunc i64 %8 to i32
%10 = call i64 @malloc(i32 %9)
%11 = inttoptr i64 %10 to i8*
store i8* %11, i8** %3
%12 = load i8*, i8** %3
%13 = load i8*, i8** %2
%14 = call i8* @strcpy(i8* %12, i8* %13)
ret i8* %14
}

LLVM IR (-O2):
define i8* @copy_string(i8* %0) {
%2 = tail call i32 @strlen(i8* %0)
%3 = add nsw i32 %2, 1
%4 = tail call i64 @malloc(i32 %3)
%5 = inttoptr i64 %4 to i8*
%6 = tail call i8* @strcpy(i8* dereferenceable(1) %5, i8* dereferenceable(1) %0)
ret i8* %5
}
/* Variables and functions */
int /*<<< orphan*/ Fib1(int, int *);
int CountFib1(int n) {
  int calls = 0;
  Fib1(n, &calls);
  return calls;
}


x86 assembly (clang, -O0):
<CountFib1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
mov    -0x4(%rbp),%edi
lea    -0x8(%rbp),%rsi
call   1030 <Fib1@plt>
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<CountFib1>:
push   %rax
movl   $0x0,0x4(%rsp)
lea    0x4(%rsp),%rsi
call   1030 <Fib1@plt>
mov    0x4(%rsp),%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @CountFib1(i32 %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
store i32 0, i32* %2
%4 = call i32 @Fib1(i32 %0, i32* %2)
%5 = load i32, i32* %2
ret i32 %5
}
/* Variables and functions */
int SIZE_MAX;
size_t elstrMBGetMaxLength() { return (SIZE_MAX >> 3); }


x86 assembly (clang, -O0):
<elstrMBGetMaxLength>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ecd(%rip),%rax
mov    (%rax),%eax
sar    $0x3,%eax
cltq
pop    %rbp
ret

x86 assembly (clang, -O2):
<elstrMBGetMaxLength>:
mov    0x2ed1(%rip),%rax
mov    (%rax),%eax
sar    $0x3,%eax
cltq
ret

LLVM IR (-O0):
@SIZE_MAX = global i32 0
define i64 @elstrMBGetMaxLength() {
%1 = load i32, i32* @SIZE_MAX
%2 = ashr i32 %1, 3
%3 = sext i32 %2 to i64
ret i64 %3
}

LLVM IR (-O2):
@SIZE_MAX = global i32 0
define i64 @elstrMBGetMaxLength() {
%1 = load i32, i32* @SIZE_MAX
%2 = ashr i32 %1, 3
%3 = sext i32 %2 to i64
ret i64 %3
}
void gdb_register_method(struct vm_method *method) {}


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

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

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

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