xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
void usage(const char *progname) {
  printf("usage: %s [-d] [-p <port>] [-t <timeout>] <ip_range> [hostname]\n",
         progname);
  printf("  If hostname is supplied, print on which IP it resides.\n");
  printf("  Otherwise print all hosts found in the range.\n");
}


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

x86 assembly (clang, -O2):
<usage>:
push   %rax
mov    %rdi,%rsi
lea    0xed5(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xf08(%rip),%rdi
call   1030 <puts@plt>
lea    0xf35(%rip),%rdi
pop    %rax
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [65 x i8] c"usage: %s [-d] [-p <port>] [-t <timeout>] <ip_range> [hostname]\0A\00"
@.str.1 = [58 x i8] c" If hostname is supplied, print on which IP it resides.\0A\00"
@.str.2 = [49 x i8] c" Otherwise print all hosts found in the range.\0A\00"
define void @usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([65 x i8], [65 x i8]* @.str, i64 0, i64 0), i8* %3)
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([58 x i8], [58 x i8]* @.str.1, i64 0, i64 0))
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str.2, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [65 x i8] c"usage: %s [-d] [-p <port>] [-t <timeout>] <ip_range> [hostname]\0A\00"
@str = [57 x i8] c" If hostname is supplied, print on which IP it resides.\00"
@str.3 = [48 x i8] c" Otherwise print all hosts found in the range.\00"
define void @usage(i8* %0) {
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([65 x i8], [65 x i8]* @.str, i64 0, i64 0), i8* %0)
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([57 x i8], [57 x i8]* @str, i64 0, i64 0))
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([48 x i8], [48 x i8]* @str.3, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ rt_InitInfAndNaN(unsigned int);
void estimate_ncf_initialize(void) { rt_InitInfAndNaN(8U); }


x86 assembly (clang, -O0):
<estimate_ncf_initialize>:
push   %rbp
mov    %rsp,%rbp
mov    $0x8,%edi
call   1030 <rt_InitInfAndNaN@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<estimate_ncf_initialize>:
mov    $0x8,%edi
jmp    1030 <rt_InitInfAndNaN@plt>

LLVM IR (-O0):
define void @estimate_ncf_initialize() {
%1 = call i32 @rt_InitInfAndNaN(i32 8)
ret void
}

LLVM IR (-O2):
define void @estimate_ncf_initialize() {
%1 = tail call i32 @rt_InitInfAndNaN(i32 8)
ret void
}
unsigned char m(unsigned char val) { return (unsigned char)((val * 2) + 1); }


x86 assembly (clang, -O0):
<m>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%eax
shl    $0x1,%eax
add    $0x1,%eax
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<m>:
lea    (%rdi,%rdi,1),%eax
or     $0x1,%al
ret

LLVM IR (-O0):
define zeroext i8 @m(i8 zeroext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = zext i8 %3 to i32
%5 = mul nsw i32 %4, 2
%6 = add nsw i32 %5, 1
%7 = trunc i32 %6 to i8
ret i8 %7
}

LLVM IR (-O2):
define zeroext i8 @m(i8 zeroext %0) {
%2 = shl i8 %0, 1
%3 = or i8 %2, 1
ret i8 %3
}
/* Variables and functions */
int /*<<< orphan*/ sprintf(char *, char *, char const *);
int /*<<< orphan*/ system(char *);
void rtk_open_url(const char *url) {
  char tmp[1024];
  sprintf(tmp, "xdg-open %s &", url);
  (void)system(tmp);
}


x86 assembly (clang, -O0):
<rtk_open_url>:
push   %rbp
mov    %rsp,%rbp
sub    $0x410,%rsp
mov    %rdi,-0x8(%rbp)
lea    -0x410(%rbp),%rdi
mov    -0x8(%rbp),%rdx
lea    0xebf(%rip),%rsi
call   1040 <sprintf@plt>
lea    -0x410(%rbp),%rdi
call   1030 <system@plt>
add    $0x410,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rtk_open_url>:
push   %rbx
sub    $0x400,%rsp
mov    %rdi,%rdx
lea    0xece(%rip),%rsi
mov    %rsp,%rbx
mov    %rbx,%rdi
call   1040 <sprintf@plt>
mov    %rbx,%rdi
call   1030 <system@plt>
add    $0x400,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [14 x i8] c"xdg-open %s &\00"
define void @rtk_open_url(i8* %0) {
%2 = alloca i8*
%3 = alloca [1024 x i8]
store i8* %0, i8** %2
%4 = getelementptr inbounds [1024 x i8], [1024 x i8]* %3, i64 0, i64 0
%5 = load i8*, i8** %2
%6 = call i32 @sprintf(i8* %4, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i8* %5)
%7 = getelementptr inbounds [1024 x i8], [1024 x i8]* %3, i64 0, i64 0
%8 = call i32 @system(i8* %7)
ret void
}

LLVM IR (-O2):
@.str = [14 x i8] c"xdg-open %s &\00"
define void @rtk_open_url(i8* %0) {
%2 = alloca [1024 x i8]
%3 = getelementptr inbounds [1024 x i8], [1024 x i8]* %2, i64 0, i64 0
%4 = call i32 @sprintf(i8* %3, i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i8* %0)
%5 = call i32 @system(i8* %3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int, int, int);
main() {
  int a = 10, b = 5, c = 3, d = 3;
  if ((a < b) && (c = d++))
    printf(" %d  %d  %d  %d ", a, b, c, d);
  else
    printf(" %d  %d  %d  %d ", a, b, c, d);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0xa,-0x8(%rbp)
movl   $0x5,-0xc(%rbp)
movl   $0x3,-0x10(%rbp)
movl   $0x3,-0x14(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    117c <main+0x6c>
mov    -0x14(%rbp),%eax
mov    %eax,%ecx
add    $0x1,%ecx
mov    %ecx,-0x14(%rbp)
mov    %eax,-0x10(%rbp)
cmp    $0x0,%eax
je     117c <main+0x6c>
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
mov    -0x10(%rbp),%ecx
mov    -0x14(%rbp),%r8d
lea    0xe8e(%rip),%rdi
call   1030 <printf@plt>
jmp    1195 <main+0x85>
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
mov    -0x10(%rbp),%ecx
mov    -0x14(%rbp),%r8d
lea    0xe70(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rdi
mov    $0xa,%esi
mov    $0x5,%edx
mov    $0x3,%ecx
mov    $0x3,%r8d
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [17 x i8] c" %d %d %d %d \00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 0, i32* %1
store i32 10, i32* %2
store i32 5, i32* %3
store i32 3, i32* %4
store i32 3, i32* %5
%6 = load i32, i32* %2
%7 = load i32, i32* %3
%8 = icmp slt i32 %6, %7
br i1 %8, label %9, label %19
9: ; preds = %0
%10 = load i32, i32* %5
%11 = add nsw i32 %10, 1
store i32 %11, i32* %5
store i32 %10, i32* %4
%12 = icmp ne i32 %10, 0
br i1 %12, label %13, label %19
13: ; preds = %9
%14 = load i32, i32* %2
%15 = load i32, i32* %3
%16 = load i32, i32* %4
%17 = load i32, i32* %5
%18 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i32 %14, i32 %15, i32 %16, i32 %17)
br label %25
19: ; preds = %9, %0
%20 = load i32, i32* %2
%21 = load i32, i32* %3
%22 = load i32, i32* %4
%23 = load i32, i32* %5
%24 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i32 %20, i32 %21, i32 %22, i32 %23)
br label %25
25: ; preds = %19, %13
%26 = load i32, i32* %1
ret i32 %26
}

LLVM IR (-O2):
@.str = [17 x i8] c" %d %d %d %d \00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i32 10, i32 5, i32 3, i32 3)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int pa_make_tcp_socket_low_delay() {
  printf("NOT IMPLEMENTED:"
         "pa_make_tcp_socket_low_delay"
         "\n");
}


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

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

LLVM IR (-O0):
@.str = [46 x i8] c"NOT IMPLEMENTED:pa_make_tcp_socket_low_delay\0A\00"
define i32 @pa_make_tcp_socket_low_delay() {
%1 = alloca i32
%2 = call i32 @printf(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* %1
ret i32 %3
}

LLVM IR (-O2):
@str = [45 x i8] c"NOT IMPLEMENTED:pa_make_tcp_socket_low_delay\00"
define i32 @pa_make_tcp_socket_low_delay() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([45 x i8], [45 x i8]* @str, i64 0, i64 0))
ret i32 undef
}
long long llmin(long long a, long long b) { return a < b ? a : b; }


x86 assembly (clang, -O0):
<llmin>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
cmp    -0x10(%rbp),%rax
jge    1127 <llmin+0x27>
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
jmp    112f <llmin+0x2f>
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<llmin>:
mov    %rsi,%rax
cmp    %rsi,%rdi
cmovl  %rdi,%rax
ret

LLVM IR (-O0):
define i64 @llmin(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%5 = load i64, i64* %3
%6 = load i64, i64* %4
%7 = icmp slt i64 %5, %6
br i1 %7, label %8, label %10
8: ; preds = %2
%9 = load i64, i64* %3
br label %12
10: ; preds = %2
%11 = load i64, i64* %4
br label %12
12: ; preds = %10, %8
%13 = phi i64 [ %9, %8 ], [ %11, %10 ]
ret i64 %13
}

LLVM IR (-O2):
define i64 @llmin(i64 %0, i64 %1) {
%3 = icmp slt i64 %0, %1
%4 = select i1 %3, i64 %0, i64 %1
ret i64 %4
}
/* Variables and functions */
int /*<<< orphan*/ puts(char *);
int /*<<< orphan*/ run_test1();
int /*<<< orphan*/ run_test2();
int /*<<< orphan*/ run_test3();
int /*<<< orphan*/ run_test4();
int /*<<< orphan*/ srand(int /*<<< orphan*/);
int /*<<< orphan*/ time(int /*<<< orphan*/ *);
void run_tests(void) {
  srand(time(NULL));
  run_test1();
  puts("");
  run_test2();
  puts("");
  run_test3();
  puts("");
  run_test4();
}


x86 assembly (clang, -O0):
<run_tests>:
push   %rbp
mov    %rsp,%rbp
xor    %eax,%eax
mov    %eax,%edi
call   1070 <time@plt>
mov    %eax,%edi
call   1060 <srand@plt>
mov    $0x0,%al
call   1080 <run_test1@plt>
lea    0xe6e(%rip),%rdi
call   1050 <puts@plt>
mov    $0x0,%al
call   1040 <run_test2@plt>
lea    0xe5b(%rip),%rdi
call   1050 <puts@plt>
mov    $0x0,%al
call   1090 <run_test3@plt>
lea    0xe48(%rip),%rdi
call   1050 <puts@plt>
mov    $0x0,%al
call   1030 <run_test4@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<run_tests>:
push   %rax
xor    %edi,%edi
call   1070 <time@plt>
mov    %eax,%edi
call   1060 <srand@plt>
xor    %eax,%eax
call   1080 <run_test1@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
xor    %eax,%eax
call   1050 <run_test2@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
xor    %eax,%eax
call   1090 <run_test3@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <run_test4@plt>

LLVM IR (-O0):
@.str = [1 x i8] zeroinitializer
define void @run_tests() {
%1 = call i32 @time(i32* null)
%2 = call i32 @srand(i32 %1)
%3 = call i32 (...) @run_test1()
%4 = call i32 @puts(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0))
%5 = call i32 (...) @run_test2()
%6 = call i32 @puts(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0))
%7 = call i32 (...) @run_test3()
%8 = call i32 @puts(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0))
%9 = call i32 (...) @run_test4()
ret void
}

LLVM IR (-O2):
define void @run_tests() {
%1 = tail call i32 @time(i32* null)
%2 = tail call i32 @srand(i32 %1)
%3 = tail call i32 (...) @run_test1()
%4 = tail call i32 @putchar(i32 10)
%5 = tail call i32 (...) @run_test2()
%6 = tail call i32 @putchar(i32 10)
%7 = tail call i32 (...) @run_test3()
%8 = tail call i32 @putchar(i32 10)
%9 = tail call i32 (...) @run_test4()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fail(char const *, int, char const *);
int /*<<< orphan*/ pass(char const *);
void check(int flag, const char *cond, const char *func, int line) {
  if (flag)
    pass(func);
  else
    fail(func, line, cond);
}


x86 assembly (clang, -O0):
<check>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
cmpl   $0x0,-0x4(%rbp)
je     114e <check+0x2e>
mov    -0x18(%rbp),%rdi
call   1040 <pass@plt>
jmp    115e <check+0x3e>
mov    -0x18(%rbp),%rdi
mov    -0x1c(%rbp),%esi
mov    -0x10(%rbp),%rdx
call   1030 <fail@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<check>:
test   %edi,%edi
je     112c <check+0xc>
mov    %rdx,%rdi
jmp    1040 <pass@plt>
mov    %rsi,%rax
mov    %rdx,%rdi
mov    %ecx,%esi
mov    %rax,%rdx
jmp    1030 <fail@plt>

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

LLVM IR (-O2):
define void @check(i32 %0, i8* %1, i8* %2, i32 %3) {
%5 = icmp eq i32 %0, 0
br i1 %5, label %8, label %6
6: ; preds = %4
%7 = tail call i32 @pass(i8* %2)
br label %10
8: ; preds = %4
%9 = tail call i32 @fail(i8* %2, i32 %3, i8* %1)
br label %10
10: ; preds = %8, %6
ret void
}
/* Variables and functions */
int /*<<< orphan*/ clear_screen(int);
int /*<<< orphan*/ disable_cursor();
int /*<<< orphan*/ draw_taskbar(unsigned int);
void show_desktop(unsigned int desktop_id) {
  disable_cursor();
  clear_screen(0x08);
  draw_taskbar(desktop_id);
}


x86 assembly (clang, -O0):
<show_desktop>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x0,%al
call   1030 <disable_cursor@plt>
mov    $0x8,%edi
call   1050 <clear_screen@plt>
mov    -0x4(%rbp),%edi
call   1040 <draw_taskbar@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<show_desktop>:
push   %rbx
mov    %edi,%ebx
xor    %eax,%eax
call   1030 <disable_cursor@plt>
mov    $0x8,%edi
call   1050 <clear_screen@plt>
mov    %ebx,%edi
pop    %rbx
jmp    1040 <draw_taskbar@plt>

LLVM IR (-O0):
define void @show_desktop(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 (...) @disable_cursor()
%4 = call i32 @clear_screen(i32 8)
%5 = load i32, i32* %2
%6 = call i32 @draw_taskbar(i32 %5)
ret void
}

LLVM IR (-O2):
define void @show_desktop(i32 %0) {
%2 = tail call i32 (...) @disable_cursor()
%3 = tail call i32 @clear_screen(i32 8)
%4 = tail call i32 @draw_taskbar(i32 %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
int main() {
  int n = 10;
  int *iptr = &n;
  char c = 'a';
  char *cptr = &c;
  printf("n is %d\n", n);
  printf("iptr is %p\n", iptr);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0xa,-0x4(%rbp)
lea    -0x4(%rbp),%rax
mov    %rax,-0x10(%rbp)
movb   $0x61,-0x11(%rbp)
lea    -0x11(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x4(%rbp),%esi
lea    0xec3(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x10(%rbp),%rsi
lea    0xeba(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
movl   $0xa,0x4(%rsp)
lea    0xee0(%rip),%rdi
mov    $0xa,%esi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xed6(%rip),%rdi
lea    0x4(%rsp),%rsi
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [9 x i8] c"n is %d\0A\00"
@.str.1 = [12 x i8] c"iptr is %p\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32*
%3 = alloca i8
%4 = alloca i8*
store i32 10, i32* %1
store i32* %1, i32** %2
store i8 97, i8* %3
store i8* %3, i8** %4
%5 = load i32, i32* %1
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 %5)
%7 = load i32*, i32** %2
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0), i32* %7)
ret i32 0
}

LLVM IR (-O2):
@.str = [9 x i8] c"n is %d\0A\00"
@.str.1 = [12 x i8] c"iptr is %p\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
store i32 10, i32* %1
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 10)
%4 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0), i32* %1)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
int main(void) {
  int jane, tarzan, cheeta;
  cheeta = tarzan = jane = 68;
  printf("                  cheeta   tarzan   jane\n");
  printf("First round score %4d %8d %8d\n", cheeta, tarzan, jane);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x44,-0x8(%rbp)
movl   $0x44,-0xc(%rbp)
movl   $0x44,-0x10(%rbp)
lea    0xec5(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x10(%rbp),%esi
mov    -0xc(%rbp),%edx
mov    -0x8(%rbp),%ecx
lea    0xed8(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xef7(%rip),%rdi
call   1030 <puts@plt>
lea    0xecc(%rip),%rdi
mov    $0x44,%esi
mov    $0x44,%edx
mov    $0x44,%ecx
xor    %eax,%eax
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [42 x i8] c" cheeta tarzan jane\0A\00"
@.str.1 = [31 x i8] c"First round score %4d %8d %8d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 0, i32* %1
store i32 68, i32* %2
store i32 68, i32* %3
store i32 68, i32* %4
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str, i64 0, i64 0))
%6 = load i32, i32* %4
%7 = load i32, i32* %3
%8 = load i32, i32* %2
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.1, i64 0, i64 0), i32 %6, i32 %7, i32 %8)
ret i32 0
}

LLVM IR (-O2):
@.str.1 = [31 x i8] c"First round score %4d %8d %8d\0A\00"
@str = [41 x i8] c" cheeta tarzan jane\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([41 x i8], [41 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([31 x i8], [31 x i8]* @.str.1, i64 0, i64 0), i32 68, i32 68, i32 68)
ret i32 0
}
/* Type definitions */
typedef int uint8_t;

/* Variables and functions */
void set_pal(uint8_t *pal, uint8_t v) {
  pal[0] = v & 0x03;
  pal[1] = (v & 0x0C) >> 2;
  pal[2] = (v & 0x30) >> 4;
  pal[3] = (v & 0xC0) >> 6;
}


x86 assembly (clang, -O0):
<set_pal>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%ecx
and    $0x3,%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
mov    -0xc(%rbp),%ecx
and    $0xc,%ecx
sar    $0x2,%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,0x4(%rax)
mov    -0xc(%rbp),%ecx
and    $0x30,%ecx
sar    $0x4,%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,0x8(%rax)
mov    -0xc(%rbp),%ecx
and    $0xc0,%ecx
sar    $0x6,%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,0xc(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_pal>:
mov    %esi,%eax
and    $0x3,%eax
mov    %eax,(%rdi)
mov    %esi,%eax
shr    $0x2,%eax
and    $0x3,%eax
mov    %eax,0x4(%rdi)
mov    %esi,%eax
shr    $0x4,%eax
and    $0x3,%eax
mov    %eax,0x8(%rdi)
shr    $0x6,%esi
and    $0x3,%esi
mov    %esi,0xc(%rdi)
ret

LLVM IR (-O0):
define void @set_pal(i32* %0, i32 %1) {
%3 = alloca i32*
%4 = alloca i32
store i32* %0, i32** %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = and i32 %5, 3
%7 = load i32*, i32** %3
%8 = getelementptr inbounds i32, i32* %7, i64 0
store i32 %6, i32* %8
%9 = load i32, i32* %4
%10 = and i32 %9, 12
%11 = ashr i32 %10, 2
%12 = load i32*, i32** %3
%13 = getelementptr inbounds i32, i32* %12, i64 1
store i32 %11, i32* %13
%14 = load i32, i32* %4
%15 = and i32 %14, 48
%16 = ashr i32 %15, 4
%17 = load i32*, i32** %3
%18 = getelementptr inbounds i32, i32* %17, i64 2
store i32 %16, i32* %18
%19 = load i32, i32* %4
%20 = and i32 %19, 192
%21 = ashr i32 %20, 6
%22 = load i32*, i32** %3
%23 = getelementptr inbounds i32, i32* %22, i64 3
store i32 %21, i32* %23
ret void
}

LLVM IR (-O2):
define void @set_pal(i32* nocapture writeonly %0, i32 %1) {
%3 = and i32 %1, 3
store i32 %3, i32* %0
%4 = lshr i32 %1, 2
%5 = and i32 %4, 3
%6 = getelementptr inbounds i32, i32* %0, i64 1
store i32 %5, i32* %6
%7 = lshr i32 %1, 4
%8 = and i32 %7, 3
%9 = getelementptr inbounds i32, i32* %0, i64 2
store i32 %8, i32* %9
%10 = lshr i32 %1, 6
%11 = and i32 %10, 3
%12 = getelementptr inbounds i32, i32* %0, i64 3
store i32 %11, i32* %12
ret void
}
cbuf29(f, n) int f, n;
{ cbuf(f, n, 29); }


x86 assembly (clang, -O0):
<cbuf29>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%edi
mov    -0xc(%rbp),%esi
mov    $0x1d,%edx
mov    $0x0,%al
call   1030 <cbuf@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cbuf29>:
mov    $0x1d,%edx
xor    %eax,%eax
jmp    1030 <cbuf@plt>

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

LLVM IR (-O2):
define i32 @cbuf29(i32 %0, i32 %1) {
%3 = tail call i32 (i32, i32, i32, ...) bitcast (i32 (...)* @cbuf to i32 (i32, i32, i32, ...)*)(i32 %0, i32 %1, i32 29)
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ mvaddch(int, int, char);
int seas() {
  mvaddch(4, 1, 'S');
  mvaddch(6, 1, 'E');
  mvaddch(8, 1, 'A');
  mvaddch(10, 1, 'S');
  mvaddch(12, 1, 'O');
  mvaddch(14, 1, 'N');
  mvaddch(16, 1, '`');
  mvaddch(18, 1, 'S');
  return (0);
}


x86 assembly (clang, -O0):
<seas>:
push   %rbp
mov    %rsp,%rbp
mov    $0x4,%edi
mov    $0x1,%esi
mov    $0x53,%edx
call   1030 <mvaddch@plt>
mov    $0x6,%edi
mov    $0x1,%esi
mov    $0x45,%edx
call   1030 <mvaddch@plt>
mov    $0x8,%edi
mov    $0x1,%esi
mov    $0x41,%edx
call   1030 <mvaddch@plt>
mov    $0xa,%edi
mov    $0x1,%esi
mov    $0x53,%edx
call   1030 <mvaddch@plt>
mov    $0xc,%edi
mov    $0x1,%esi
mov    $0x4f,%edx
call   1030 <mvaddch@plt>
mov    $0xe,%edi
mov    $0x1,%esi
mov    $0x4e,%edx
call   1030 <mvaddch@plt>
mov    $0x10,%edi
mov    $0x1,%esi
mov    $0x60,%edx
call   1030 <mvaddch@plt>
mov    $0x12,%edi
mov    $0x1,%esi
mov    $0x53,%edx
call   1030 <mvaddch@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<seas>:
push   %rax
mov    $0x4,%edi
mov    $0x1,%esi
mov    $0x53,%edx
call   1030 <mvaddch@plt>
mov    $0x6,%edi
mov    $0x1,%esi
mov    $0x45,%edx
call   1030 <mvaddch@plt>
mov    $0x8,%edi
mov    $0x1,%esi
mov    $0x41,%edx
call   1030 <mvaddch@plt>
mov    $0xa,%edi
mov    $0x1,%esi
mov    $0x53,%edx
call   1030 <mvaddch@plt>
mov    $0xc,%edi
mov    $0x1,%esi
mov    $0x4f,%edx
call   1030 <mvaddch@plt>
mov    $0xe,%edi
mov    $0x1,%esi
mov    $0x4e,%edx
call   1030 <mvaddch@plt>
mov    $0x10,%edi
mov    $0x1,%esi
mov    $0x60,%edx
call   1030 <mvaddch@plt>
mov    $0x12,%edi
mov    $0x1,%esi
mov    $0x53,%edx
call   1030 <mvaddch@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @seas() {
%1 = call i32 @mvaddch(i32 4, i32 1, i8 signext 83)
%2 = call i32 @mvaddch(i32 6, i32 1, i8 signext 69)
%3 = call i32 @mvaddch(i32 8, i32 1, i8 signext 65)
%4 = call i32 @mvaddch(i32 10, i32 1, i8 signext 83)
%5 = call i32 @mvaddch(i32 12, i32 1, i8 signext 79)
%6 = call i32 @mvaddch(i32 14, i32 1, i8 signext 78)
%7 = call i32 @mvaddch(i32 16, i32 1, i8 signext 96)
%8 = call i32 @mvaddch(i32 18, i32 1, i8 signext 83)
ret i32 0
}

LLVM IR (-O2):
define i32 @seas() {
%1 = tail call i32 @mvaddch(i32 4, i32 1, i8 signext 83)
%2 = tail call i32 @mvaddch(i32 6, i32 1, i8 signext 69)
%3 = tail call i32 @mvaddch(i32 8, i32 1, i8 signext 65)
%4 = tail call i32 @mvaddch(i32 10, i32 1, i8 signext 83)
%5 = tail call i32 @mvaddch(i32 12, i32 1, i8 signext 79)
%6 = tail call i32 @mvaddch(i32 14, i32 1, i8 signext 78)
%7 = tail call i32 @mvaddch(i32 16, i32 1, i8 signext 96)
%8 = tail call i32 @mvaddch(i32 18, i32 1, i8 signext 83)
ret i32 0
}
void args_initialize(const int argc, const char *const *const argv) {
  if (argc == 1) {
    args_initiliaze_none();
  } else if (argc == 2) {
    args_initialize_one(argc, argv);
  } else {
    args_initialize_many(argc, argv);
  }
}


x86 assembly (clang, -O0):
<args_initialize>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x1,-0x4(%rbp)
jne    1155 <args_initialize+0x25>
mov    $0x0,%al
call   1050 <args_initiliaze_none@plt>
jmp    1185 <args_initialize+0x55>
cmpl   $0x2,-0x4(%rbp)
jne    1172 <args_initialize+0x42>
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    $0x0,%al
call   1040 <args_initialize_one@plt>
jmp    1180 <args_initialize+0x50>
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    $0x0,%al
call   1030 <args_initialize_many@plt>
jmp    1185 <args_initialize+0x55>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<args_initialize>:
cmp    $0x2,%edi
je     1141 <args_initialize+0x11>
xor    %eax,%eax
cmp    $0x1,%edi
jne    114d <args_initialize+0x1d>
jmp    1050 <args_initiliaze_none@plt>
mov    $0x2,%edi
xor    %eax,%eax
jmp    1040 <args_initialize_one@plt>
jmp    1030 <args_initialize_many@plt>

LLVM IR (-O0):
define void @args_initialize(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
store i32 %0, i32* %3
store i8** %1, i8*** %4
%5 = load i32, i32* %3
%6 = icmp eq i32 %5, 1
br i1 %6, label %7, label %9
7: ; preds = %2
%8 = call i32 (...) @args_initiliaze_none()
br label %21
9: ; preds = %2
%10 = load i32, i32* %3
%11 = icmp eq i32 %10, 2
br i1 %11, label %12, label %16
12: ; preds = %9
%13 = load i32, i32* %3
%14 = load i8**, i8*** %4
%15 = call i32 (i32, i8**, ...) bitcast (i32 (...)* @args_initialize_one to i32 (i32, i8**, ...)*)(i32 %13, i8** %14)
br label %20
16: ; preds = %9
%17 = load i32, i32* %3
%18 = load i8**, i8*** %4
%19 = call i32 (i32, i8**, ...) bitcast (i32 (...)* @args_initialize_many to i32 (i32, i8**, ...)*)(i32 %17, i8** %18)
br label %20
20: ; preds = %16, %12
br label %21
21: ; preds = %20, %7
ret void
}

LLVM IR (-O2):
define void @args_initialize(i32 %0, i8** %1) {
switch i32 %0, label %7 [
i32 1, label %3
i32 2, label %5
]
3: ; preds = %2
%4 = tail call i32 (...) @args_initiliaze_none()
br label %9
5: ; preds = %2
%6 = tail call i32 (i32, i8**, ...) bitcast (i32 (...)* @args_initialize_one to i32 (i32, i8**, ...)*)(i32 2, i8** %1)
br label %9
7: ; preds = %2
%8 = tail call i32 (i32, i8**, ...) bitcast (i32 (...)* @args_initialize_many to i32 (i32, i8**, ...)*)(i32 %0, i8** %1)
br label %9
9: ; preds = %5, %7, %3
ret void
}
void trimLine(char *line) {
  char *crs = line;
  while (*crs)
    if (*crs == '\n' || *crs == '\r') {
      *crs = 0;
      crs--;
      return;
    } else
      crs++;
}


x86 assembly (clang, -O0):
<trimLine>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
cmpb   $0x0,(%rax)
je     1166 <trimLine+0x66>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0xa,%eax
je     113d <trimLine+0x3d>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0xd,%eax
jne    1155 <trimLine+0x55>
mov    -0x10(%rbp),%rax
movb   $0x0,(%rax)
mov    -0x10(%rbp),%rax
add    $0xffffffffffffffff,%rax
mov    %rax,-0x10(%rbp)
jmp    1166 <trimLine+0x66>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1110 <trimLine+0x10>
pop    %rbp
ret

x86 assembly (clang, -O2):
<trimLine>:
movzbl (%rdi),%eax
test   %al,%al
je     1118 <trimLine+0x18>
cmp    $0xd,%al
je     1115 <trimLine+0x15>
cmp    $0xa,%al
je     1115 <trimLine+0x15>
add    $0x1,%rdi
jmp    1100 <trimLine>
movb   $0x0,(%rdi)
ret

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

LLVM IR (-O2):
define void @trimLine(i8* nocapture %0) {
br label %2
2: ; preds = %6, %1
%3 = phi i8* [ %0, %1 ], [ %7, %6 ]
%4 = load i8, i8* %3
switch i8 %4, label %6 [
i8 0, label %8
i8 10, label %5
i8 13, label %5
]
5: ; preds = %2, %2
store i8 0, i8* %3
br label %8
6: ; preds = %2
%7 = getelementptr inbounds i8, i8* %3, i64 1
br label %2
8: ; preds = %2, %5
ret void
}
/* Variables and functions */
int /*<<< orphan*/ csi_disable(unsigned int);
int /*<<< orphan*/ csi_enable(unsigned int);
void bsp_csi_reset(unsigned int sel) {
  csi_disable(sel);
  csi_enable(sel);
}


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

x86 assembly (clang, -O2):
<bsp_csi_reset>:
push   %rbx
mov    %edi,%ebx
call   1030 <csi_disable@plt>
mov    %ebx,%edi
pop    %rbx
jmp    1040 <csi_enable@plt>

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

LLVM IR (-O2):
define void @bsp_csi_reset(i32 %0) {
%2 = tail call i32 @csi_disable(i32 %0)
%3 = tail call i32 @csi_enable(i32 %0)
ret void
}
/* Type definitions */
typedef scalar_t__ uint64_t;

/* Variables and functions */
void status_add(uint64_t *dest, uint64_t add) {
  ((void)0);
  *dest += add;
}


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

x86 assembly (clang, -O2):
<status_add>:
add    %rsi,(%rdi)
ret

LLVM IR (-O0):
define void @status_add(i64* %0, i64 %1) {
%3 = alloca i64*
%4 = alloca i64
store i64* %0, i64** %3
store i64 %1, i64* %4
%5 = load i64, i64* %4
%6 = load i64*, i64** %3
%7 = load i64, i64* %6
%8 = add nsw i64 %7, %5
store i64 %8, i64* %6
ret void
}

LLVM IR (-O2):
define void @status_add(i64* nocapture %0, i64 %1) {
%3 = load i64, i64* %0
%4 = add nsw i64 %3, %1
store i64 %4, i64* %0
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, float *);
main() {
  float C, F;
  printf("Informe Celsius: ");
  scanf("%f", &C);
  F = ((9 * C + 160) / 5);
  printf("\nFahrenheit: %f", F);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xedd(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xeee(%rip),%rdi
lea    -0x4(%rbp),%rsi
call   1040 <scanf@plt>
movss  -0x4(%rbp),%xmm0
movss  0xeb1(%rip),%xmm1
mulss  %xmm1,%xmm0
movss  0xea9(%rip),%xmm1
addss  %xmm1,%xmm0
movss  0xe95(%rip),%xmm1
divss  %xmm1,%xmm0
movss  %xmm0,-0x8(%rbp)
movss  -0x8(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xe9a(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee4(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xef5(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1040 <scanf@plt>
movss  0x4(%rsp),%xmm0
mulss  0xeb2(%rip),%xmm0
addss  0xeae(%rip),%xmm0
divss  0xeaa(%rip),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xeb5(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [18 x i8] c"Informe Celsius: \00"
@.str.1 = [3 x i8] c"%f\00"
@.str.2 = [16 x i8] c"\0AFahrenheit: %f\00"
define i32 @main() {
%1 = alloca float
%2 = alloca float
%3 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), float* %1)
%5 = load float, float* %1
%6 = call float @llvm.fmuladd.f32(float 9.000000e+00, float %5, float 1.600000e+02)
%7 = fdiv float %6, 5.000000e+00
store float %7, float* %2
%8 = load float, float* %2
%9 = fpext float %8 to double
%10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.2, i64 0, i64 0), double %9)
ret i32 0
}

LLVM IR (-O2):
@.str = [18 x i8] c"Informe Celsius: \00"
@.str.1 = [3 x i8] c"%f\00"
@.str.2 = [16 x i8] c"\0AFahrenheit: %f\00"
define i32 @main() {
%1 = alloca float
%2 = bitcast float* %1 to i8*
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), float* %1)
%5 = load float, float* %1
%6 = call float @llvm.fmuladd.f32(float %5, float 9.000000e+00, float 1.600000e+02)
%7 = fdiv float %6, 5.000000e+00
%8 = fpext float %7 to double
%9 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @.str.2, i64 0, i64 0), double %8)
ret i32 0
}
int okn_thread_dest(struct okn_thread *thread) {
  ;
  return 1;
}


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

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

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

LLVM IR (-O2):
%struct.okn_thread = type opaque
define i32 @okn_thread_dest(%struct.okn_thread* nocapture readnone %0) {
ret i32 1
}
int readAndSum(int n) {
  int i, sum = 0;
  for (i = 0; i < n; i++) {
    sum += i;
  }
  return sum;
}


x86 assembly (clang, -O0):
<readAndSum>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0xc(%rbp)
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    1138 <readAndSum+0x38>
mov    -0x8(%rbp),%eax
add    -0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1115 <readAndSum+0x15>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<readAndSum>:
test   %edi,%edi
jle    1118 <readAndSum+0x18>
lea    -0x1(%rdi),%eax
lea    -0x2(%rdi),%ecx
imul   %rax,%rcx
shr    %rcx
lea    (%rcx,%rdi,1),%eax
add    $0xffffffff,%eax
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @readAndSum(i32 %0) {
%2 = icmp sgt i32 %0, 0
br i1 %2, label %3, label %13
3: ; preds = %1
%4 = add nsw i32 %0, -1
%5 = zext i32 %4 to i33
%6 = add nsw i32 %0, -2
%7 = zext i32 %6 to i33
%8 = mul i33 %5, %7
%9 = lshr i33 %8, 1
%10 = trunc i33 %9 to i32
%11 = add i32 %10, %0
%12 = add i32 %11, -1
br label %13
13: ; preds = %3, %1
%14 = phi i32 [ 0, %1 ], [ %12, %3 ]
ret i32 %14
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int);
extern int Blue6(int one, int two) {
  printf("Hello from Blue6: one = %d, two = %d!\n ", one, two);
  return one + two;
}


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

x86 assembly (clang, -O2):
<Blue6>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
lea    0xee2(%rip),%rdi
mov    %ebp,%esi
mov    %ebx,%edx
call   1030 <printf@plt>
add    %ebp,%ebx
mov    %ebx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@.str = [40 x i8] c"Hello from Blue6: one = %d, two = %d!\0A \00"
define i32 @Blue6(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 @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str, i64 0, i64 0), i32 %5, i32 %6)
%8 = load i32, i32* %3
%9 = load i32, i32* %4
%10 = add nsw i32 %8, %9
ret i32 %10
}

LLVM IR (-O2):
@.str = [40 x i8] c"Hello from Blue6: one = %d, two = %d!\0A \00"
define i32 @Blue6(i32 %0, i32 %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str, i64 0, i64 0), i32 %0, i32 %1)
%4 = add nsw i32 %1, %0
ret i32 %4
}
void dump_payload(struct trusted_key_payload *p) {}


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

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

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

LLVM IR (-O2):
%struct.trusted_key_payload = type opaque
define void @dump_payload(%struct.trusted_key_payload* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ put_s(char *);
void main() { put_s("salut"); }


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

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

LLVM IR (-O0):
@.str = [6 x i8] c"salut\00"
define void @main() {
%1 = call i32 @put_s(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [6 x i8] c"salut\00"
define void @main() {
%1 = tail call i32 @put_s(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ compute();
int /*<<< orphan*/ use2(int *, int /*<<< orphan*/);
void passThrough(int *p) { use2(p, compute()); }


x86 assembly (clang, -O0):
<passThrough>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    $0x0,%al
call   1040 <compute@plt>
mov    -0x10(%rbp),%rdi
mov    %eax,%esi
call   1030 <use2@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<passThrough>:
push   %rbx
mov    %rdi,%rbx
xor    %eax,%eax
call   1040 <compute@plt>
mov    %rbx,%rdi
mov    %eax,%esi
pop    %rbx
jmp    1030 <use2@plt>

LLVM IR (-O0):
define void @passThrough(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = call i32 (...) @compute()
%5 = call i32 @use2(i32* %3, i32 %4)
ret void
}

LLVM IR (-O2):
define void @passThrough(i32* %0) {
%2 = tail call i32 (...) @compute()
%3 = tail call i32 @use2(i32* %0, i32 %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char const *, int,
                           char const *);
int /*<<< orphan*/ stderr;
void _assert(const char *file, int line, const char *expression) {
  fprintf(stderr,
          "FATAL ERROR: Assertion in file '%s' on line %d failed:\n%s\n", file,
          line, expression);
  exit(EXIT_FAILURE);
}


x86 assembly (clang, -O0):
<_assert>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    0x2ea6(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
mov    -0xc(%rbp),%ecx
mov    -0x18(%rbp),%r8
lea    0xeb2(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2e7e(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<_assert>:
push   %rax
mov    %rdx,%r8
mov    %esi,%ecx
mov    %rdi,%rdx
mov    0x2eb0(%rip),%rax
mov    (%rax),%edi
lea    0xec7(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2e93(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [59 x i8] c"FATAL ERROR: Assertion in file '%s' on line %d failed:\0A%s\0A\00"
@EXIT_FAILURE = global i32 0
define void @_assert(i8* %0, i32 %1, i8* %2) {
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i8*
store i8* %0, i8** %4
store i32 %1, i32* %5
store i8* %2, i8** %6
%7 = load i32, i32* @stderr
%8 = load i8*, i8** %4
%9 = load i32, i32* %5
%10 = load i8*, i8** %6
%11 = call i32 @fprintf(i32 %7, i8* getelementptr inbounds ([59 x i8], [59 x i8]* @.str, i64 0, i64 0), i8* %8, i32 %9, i8* %10)
%12 = load i32, i32* @EXIT_FAILURE
%13 = call i32 @exit(i32 %12)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [59 x i8] c"FATAL ERROR: Assertion in file '%s' on line %d failed:\0A%s\0A\00"
@EXIT_FAILURE = global i32 0
define void @_assert(i8* %0, i32 %1, i8* %2) {
%4 = load i32, i32* @stderr
%5 = tail call i32 @fprintf(i32 %4, i8* getelementptr inbounds ([59 x i8], [59 x i8]* @.str, i64 0, i64 0), i8* %0, i32 %1, i8* %2)
%6 = load i32, i32* @EXIT_FAILURE
%7 = tail call i32 @exit(i32 %6)
unreachable
}
/* Variables and functions */
int _ada_use_c2phc4c(int, int *, int *, double *, int /*<<< orphan*/);
int intcelcon_mixed_volume(int i, int *mv) {
  int fail;
  double *c;
  fail = _ada_use_c2phc4c(751, &i, mv, c, 0);
  return fail;
}


x86 assembly (clang, -O0):
<intcelcon_mixed_volume>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    $0x2ef,%edi
lea    -0x4(%rbp),%rsi
xor    %r8d,%r8d
call   1030 <_ada_use_c2phc4c@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<intcelcon_mixed_volume>:
push   %rax
mov    %rsi,%rdx
mov    %edi,0x4(%rsp)
lea    0x4(%rsp),%rsi
mov    $0x2ef,%edi
xor    %r8d,%r8d
call   1030 <_ada_use_c2phc4c@plt>
pop    %rcx
ret

LLVM IR (-O0):
define i32 @intcelcon_mixed_volume(i32 %0, i32* %1) {
%3 = alloca i32
%4 = alloca i32*
%5 = alloca i32
%6 = alloca double*
store i32 %0, i32* %3
store i32* %1, i32** %4
%7 = load i32*, i32** %4
%8 = load double*, double** %6
%9 = call i32 @_ada_use_c2phc4c(i32 751, i32* %3, i32* %7, double* %8, i32 0)
store i32 %9, i32* %5
%10 = load i32, i32* %5
ret i32 %10
}

LLVM IR (-O2):
define i32 @intcelcon_mixed_volume(i32 %0, i32* %1) {
%3 = alloca i32
store i32 %0, i32* %3
%4 = call i32 @_ada_use_c2phc4c(i32 751, i32* %3, i32* %1, double* undef, i32 0)
ret i32 %4
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;
typedef int /*<<< orphan*/ uint16_t;

/* Variables and functions */
int /*<<< orphan*/ flash_eeprom_read_uint16(int /*<<< orphan*/);
uint16_t read_uint16(uint32_t offset) {
  return flash_eeprom_read_uint16(offset);
}


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

x86 assembly (clang, -O2):
<read_uint16>:
jmp    1030 <flash_eeprom_read_uint16@plt>

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

LLVM IR (-O2):
define i32 @read_uint16(i32 %0) {
%2 = tail call i32 @flash_eeprom_read_uint16(i32 %0)
ret i32 %2
}
float clamp(float value, float min, float max) {
  return value > max ? max : value < min ? min : value;
}


x86 assembly (clang, -O0):
<clamp>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  %xmm2,-0xc(%rbp)
movss  -0x4(%rbp),%xmm0
ucomiss -0xc(%rbp),%xmm0
jbe    1131 <clamp+0x31>
movss  -0xc(%rbp),%xmm0
movss  %xmm0,-0x10(%rbp)
jmp    1167 <clamp+0x67>
movss  -0x4(%rbp),%xmm1
movss  -0x8(%rbp),%xmm0
ucomiss %xmm1,%xmm0
jbe    1153 <clamp+0x53>
movss  -0x8(%rbp),%xmm0
movss  %xmm0,-0x14(%rbp)
jmp    115d <clamp+0x5d>
movss  -0x4(%rbp),%xmm0
movss  %xmm0,-0x14(%rbp)
movss  -0x14(%rbp),%xmm0
movss  %xmm0,-0x10(%rbp)
movss  -0x10(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<clamp>:
maxss  %xmm0,%xmm1
movaps %xmm2,%xmm3
cmpltss %xmm0,%xmm3
movaps %xmm3,%xmm0
andnps %xmm1,%xmm0
andps  %xmm2,%xmm3
orps   %xmm0,%xmm3
movaps %xmm3,%xmm0
ret

LLVM IR (-O0):
define float @clamp(float %0, float %1, float %2) {
%4 = alloca float
%5 = alloca float
%6 = alloca float
store float %0, float* %4
store float %1, float* %5
store float %2, float* %6
%7 = load float, float* %4
%8 = load float, float* %6
%9 = fcmp ogt float %7, %8
br i1 %9, label %10, label %12
10: ; preds = %3
%11 = load float, float* %6
br label %22
12: ; preds = %3
%13 = load float, float* %4
%14 = load float, float* %5
%15 = fcmp olt float %13, %14
br i1 %15, label %16, label %18
16: ; preds = %12
%17 = load float, float* %5
br label %20
18: ; preds = %12
%19 = load float, float* %4
br label %20
20: ; preds = %18, %16
%21 = phi float [ %17, %16 ], [ %19, %18 ]
br label %22
22: ; preds = %20, %10
%23 = phi float [ %11, %10 ], [ %21, %20 ]
ret float %23
}

LLVM IR (-O2):
define float @clamp(float %0, float %1, float %2) {
%4 = fcmp ogt float %0, %2
%5 = fcmp olt float %0, %1
%6 = select i1 %5, float %1, float %0
%7 = select i1 %4, float %2, float %6
ret float %7
}
int greg_is_leap_year(const int year) {
  if (year % 4 != 0)
    return 0;
  if (year % 100 != 0)
    return 1;
  return year % 400;
}


x86 assembly (clang, -O0):
<greg_is_leap_year>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    $0x4,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
je     1127 <greg_is_leap_year+0x27>
movl   $0x0,-0x4(%rbp)
jmp    1155 <greg_is_leap_year+0x55>
mov    -0x8(%rbp),%eax
mov    $0x64,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
je     1147 <greg_is_leap_year+0x47>
movl   $0x1,-0x4(%rbp)
jmp    1155 <greg_is_leap_year+0x55>
mov    -0x8(%rbp),%eax
mov    $0x190,%ecx
cltd
idiv   %ecx
mov    %edx,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<greg_is_leap_year>:
xor    %eax,%eax
test   $0x3,%dil
je     1109 <greg_is_leap_year+0x9>
ret
imul   $0xc28f5c29,%edi,%ecx
add    $0x51eb850,%ecx
ror    $0x2,%ecx
mov    $0x1,%eax
cmp    $0x28f5c28,%ecx
ja     1108 <greg_is_leap_year+0x8>
movslq %edi,%rax
imul   $0x51eb851f,%rax,%rax
mov    %rax,%rcx
shr    $0x3f,%rcx
sar    $0x27,%rax
add    %ecx,%eax
imul   $0x190,%eax,%eax
sub    %eax,%edi
mov    %edi,%eax
ret

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

LLVM IR (-O2):
define i32 @greg_is_leap_year(i32 %0) {
%2 = and i32 %0, 3
%3 = icmp eq i32 %2, 0
br i1 %3, label %4, label %9
4: ; preds = %1
%5 = srem i32 %0, 100
%6 = icmp eq i32 %5, 0
br i1 %6, label %7, label %9
7: ; preds = %4
%8 = srem i32 %0, 400
br label %9
9: ; preds = %4, %1, %7
%10 = phi i32 [ %8, %7 ], [ 0, %1 ], [ 1, %4 ]
ret i32 %10
}