xunge/DecIR huggingface dataset:
int OR_ASSIGN(int x, int y) { return x |= y; }


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

x86 assembly (clang, -O2):
<OR_ASSIGN>:
mov    %edi,%eax
or     %esi,%eax
ret

LLVM IR (-O0):
define i32 @OR_ASSIGN(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 = load i32, i32* %3
%7 = or i32 %6, %5
store i32 %7, i32* %3
ret i32 %7
}

LLVM IR (-O2):
define i32 @OR_ASSIGN(i32 %0, i32 %1) {
%3 = or i32 %1, %0
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ IPC_removeTimer(void (*)(void *, unsigned long,
                                            unsigned long));
int /*<<< orphan*/ timerHandler(char *, unsigned long, unsigned long);
void timer2Handler(void *string, unsigned long currentTime,
                   unsigned long scheduledTime) {
  static int count = 0;
  timerHandler((char *)string, currentTime, scheduledTime);
  count++;
  if (count == 10)
    IPC_removeTimer(timer2Handler);
}


x86 assembly (clang, -O0):
<timer2Handler>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1040 <timerHandler@plt>
mov    0x2ee9(%rip),%eax
add    $0x1,%eax
mov    %eax,0x2ee0(%rip)
cmpl   $0xa,0x2ed9(%rip)
jne    116d <timer2Handler+0x4d>
mov    0x2e78(%rip),%rdi
call   1030 <IPC_removeTimer@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<timer2Handler>:
push   %rax
call   1040 <timerHandler@plt>
mov    0x2f08(%rip),%eax
add    $0x1,%eax
mov    %eax,0x2eff(%rip)
cmp    $0xa,%eax
jne    1147 <timer2Handler+0x27>
mov    0x2e9f(%rip),%rdi
pop    %rax
jmp    1030 <IPC_removeTimer@plt>
pop    %rax
ret

LLVM IR (-O0):
@timer2Handler.count = internal global i32 0
define void @timer2Handler(i8* %0, i64 %1, i64 %2) {
%4 = alloca i8*
%5 = alloca i64
%6 = alloca i64
store i8* %0, i8** %4
store i64 %1, i64* %5
store i64 %2, i64* %6
%7 = load i8*, i8** %4
%8 = load i64, i64* %5
%9 = load i64, i64* %6
%10 = call i32 @timerHandler(i8* %7, i64 %8, i64 %9)
%11 = load i32, i32* @timer2Handler.count
%12 = add nsw i32 %11, 1
store i32 %12, i32* @timer2Handler.count
%13 = load i32, i32* @timer2Handler.count
%14 = icmp eq i32 %13, 10
br i1 %14, label %15, label %17
15: ; preds = %3
%16 = call i32 @IPC_removeTimer(void (i8*, i64, i64)* @timer2Handler)
br label %17
17: ; preds = %15, %3
ret void
}

LLVM IR (-O2):
@timer2Handler.count = internal unnamed_addr global i32 0
define void @timer2Handler(i8* %0, i64 %1, i64 %2) {
%4 = tail call i32 @timerHandler(i8* %0, i64 %1, i64 %2)
%5 = load i32, i32* @timer2Handler.count
%6 = add nsw i32 %5, 1
store i32 %6, i32* @timer2Handler.count
%7 = icmp eq i32 %6, 10
br i1 %7, label %8, label %10
8: ; preds = %3
%9 = tail call i32 @IPC_removeTimer(void (i8*, i64, i64)* @timer2Handler)
br label %10
10: ; preds = %8, %3
ret void
}
/* Variables and functions */
int /*<<< orphan*/ neo430_uart_putc(char);
void neo430_uart_print_hex_char(char c) {
  char d = c & 15;
  if (d < 10)
    d += '0';
  else
    d += 'a' - 10;
  neo430_uart_putc(d);
}


x86 assembly (clang, -O0):
<neo430_uart_print_hex_char>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
and    $0xf,%eax
mov    %al,-0x2(%rbp)
movsbl -0x2(%rbp),%eax
cmp    $0xa,%eax
jge    1144 <neo430_uart_print_hex_char+0x34>
movsbl -0x2(%rbp),%eax
add    $0x30,%eax
mov    %al,-0x2(%rbp)
jmp    114e <neo430_uart_print_hex_char+0x3e>
movsbl -0x2(%rbp),%eax
add    $0x57,%eax
mov    %al,-0x2(%rbp)
movsbl -0x2(%rbp),%edi
call   1030 <neo430_uart_putc@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<neo430_uart_print_hex_char>:
and    $0xf,%dil
lea    0x30(%rdi),%eax
lea    0x57(%rdi),%ecx
cmp    $0xa,%dil
movzbl %al,%eax
movzbl %cl,%ecx
cmovb  %eax,%ecx
movzbl %cl,%edi
jmp    1030 <neo430_uart_putc@plt>

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

LLVM IR (-O2):
define void @neo430_uart_print_hex_char(i8 signext %0) {
%2 = and i8 %0, 15
%3 = icmp ult i8 %2, 10
%4 = or i8 %2, 48
%5 = add nuw nsw i8 %2, 87
%6 = select i1 %3, i8 %4, i8 %5
%7 = tail call i32 @neo430_uart_putc(i8 signext %6)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
main() {
  int a;
  a = 7 / 22 * (3.14 + 2) * 3 / 5;
  printf("%d\n", a);
}


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

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

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 0)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ puts(char *);
void usage(int exit_status) {
  puts("EasyLogo 1.0 (C) 2000 by Paolo Scaffardi\n"
       "\n"
       "Syntax:	easylogo [options] inputfile [outputvar [outputfile]]\n"
       "\n"
       "Options:\n"
       "  -r     Output RGB888 instead of YUYV\n"
       "  -s     Output RGB565 instead of YUYV\n"
       "  -g     Compress with gzip\n"
       "  -b     Preallocate space in bss for decompressing image\n"
       "  -h     Help output\n"
       "\n"
       "Where: 'inputfile'   is the TGA image to load\n"
       "       'outputvar'   is the variable name to create\n"
       "       'outputfile'  is the output header file (default is "
       "'inputfile.h')");
  exit(exit_status);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
lea    0xece(%rip),%rdi
call   1030 <puts@plt>
mov    -0x4(%rbp),%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %rbx
mov    %edi,%ebx
lea    0xed6(%rip),%rdi
call   1030 <puts@plt>
mov    %ebx,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [472 x i8] c"EasyLogo 1.0 (C) 2000 by Paolo Scaffardi\0A\0ASyntax:\09easylogo [options] inputfile [outputvar [outputfile]]\0A\0AOptions:\0A -r Output RGB888 instead of YUYV\0A -s Output RGB565 instead of YUYV\0A -g Compress with gzip\0A -b Preallocate space in bss for decompressing image\0A -h Help output\0A\0AWhere: 'inputfile' is the TGA image to load\0A 'outputvar' is the variable name to create\0A 'outputfile' is the output header file (default is 'inputfile.h')\00"
define void @usage(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @puts(i8* getelementptr inbounds ([472 x i8], [472 x i8]* @.str, i64 0, i64 0))
%4 = load i32, i32* %2
%5 = call i32 @exit(i32 %4)
unreachable
}

LLVM IR (-O2):
@.str = [472 x i8] c"EasyLogo 1.0 (C) 2000 by Paolo Scaffardi\0A\0ASyntax:\09easylogo [options] inputfile [outputvar [outputfile]]\0A\0AOptions:\0A -r Output RGB888 instead of YUYV\0A -s Output RGB565 instead of YUYV\0A -g Compress with gzip\0A -b Preallocate space in bss for decompressing image\0A -h Help output\0A\0AWhere: 'inputfile' is the TGA image to load\0A 'outputvar' is the variable name to create\0A 'outputfile' is the output header file (default is 'inputfile.h')\00"
define void @usage(i32 %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([472 x i8], [472 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @exit(i32 %0)
unreachable
}
void g_log_default_handler() {}


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

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

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

LLVM IR (-O2):
define void @g_log_default_handler() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fatal_error(int /*<<< orphan*/, char *, char *, char *, int);
void gmx_sync_ring(int nodeid, int nnodes, int left, int right) {
  fatal_error(0, "Routine %s called in %s, %d", "gmx_sync_ring",
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/Chadi-akel/cere/refs/heads/master/"
              "tests/test_07/network.c",
              287);
}


x86 assembly (clang, -O0):
<gmx_sync_ring>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
xor    %edi,%edi
lea    0xed3(%rip),%rsi
lea    0xee8(%rip),%rdx
lea    0xeef(%rip),%rcx
mov    $0x11f,%r8d
call   1030 <fatal_error@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gmx_sync_ring>:
lea    0xee9(%rip),%rsi
lea    0xefe(%rip),%rdx
lea    0xf05(%rip),%rcx
xor    %edi,%edi
mov    $0x11f,%r8d
jmp    1030 <fatal_error@plt>

LLVM IR (-O0):
@.str = [28 x i8] c"Routine %s called in %s, %d\00"
@.str.1 = [14 x i8] c"gmx_sync_ring\00"
@.str.2 = [148 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/Chadi-akel/cere/refs/heads/master/tests/test_07/network.c\00"
define void @gmx_sync_ring(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i32 %0, i32* %5
store i32 %1, i32* %6
store i32 %2, i32* %7
store i32 %3, i32* %8
%9 = call i32 @fatal_error(i32 0, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([148 x i8], [148 x i8]* @.str.2, i64 0, i64 0), i32 287)
ret void
}

LLVM IR (-O2):
@.str = [28 x i8] c"Routine %s called in %s, %d\00"
@.str.1 = [14 x i8] c"gmx_sync_ring\00"
@.str.2 = [148 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/Chadi-akel/cere/refs/heads/master/tests/test_07/network.c\00"
define void @gmx_sync_ring(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = tail call i32 @fatal_error(i32 0, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([148 x i8], [148 x i8]* @.str.2, i64 0, i64 0), i32 287)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ DIR;

/* Variables and functions */
int /*<<< orphan*/ ENOSYS;
int /*<<< orphan*/ errno;
DIR *fdopendir(int __fd) {
  (void)__fd;
  errno = ENOSYS;
  return NULL;
}


x86 assembly (clang, -O0):
<fdopendir>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    0x2eda(%rip),%rax
mov    (%rax),%ecx
mov    0x2ec1(%rip),%rax
mov    %ecx,(%rax)
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<fdopendir>:
mov    0x2ee1(%rip),%rax
mov    (%rax),%eax
mov    0x2ec8(%rip),%rcx
mov    %eax,(%rcx)
xor    %eax,%eax
ret

LLVM IR (-O0):
@ENOSYS = global i32 0
@errno = global i32 0
define i32* @fdopendir(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = load i32, i32* @ENOSYS
store i32 %4, i32* @errno
ret i32* null
}

LLVM IR (-O2):
@ENOSYS = global i32 0
@errno = global i32 0
define noalias i32* @fdopendir(i32 %0) {
%2 = load i32, i32* @ENOSYS
store i32 %2, i32* @errno
ret i32* null
}
/* Variables and functions */
size_t MR_utf8_encode(char *, int);
int /*<<< orphan*/ putchar(char);
void put_utf8(int c) {
  char s[4];
  size_t n;
  size_t i;
  n = MR_utf8_encode(s, c);
  for (i = 0; i < n; i++) {
    putchar(s[i]);
  }
}


x86 assembly (clang, -O0):
<put_utf8>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
lea    -0x8(%rbp),%rdi
mov    -0x4(%rbp),%esi
call   1040 <MR_utf8_encode@plt>
mov    %rax,-0x10(%rbp)
movq   $0x0,-0x18(%rbp)
mov    -0x18(%rbp),%rax
cmp    -0x10(%rbp),%rax
jae    1170 <put_utf8+0x50>
mov    -0x18(%rbp),%rax
movsbl -0x8(%rbp,%rax,1),%edi
call   1030 <putchar@plt>
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
jmp    1143 <put_utf8+0x23>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<put_utf8>:
push   %r14
push   %rbx
push   %rax
mov    %edi,%esi
lea    0x4(%rsp),%rdi
call   1040 <MR_utf8_encode@plt>
test   %rax,%rax
je     1153 <put_utf8+0x33>
mov    %rax,%r14
xor    %ebx,%ebx
nopw   0x0(%rax,%rax,1)
movsbl 0x4(%rsp,%rbx,1),%edi
call   1030 <putchar@plt>
add    $0x1,%rbx
cmp    %rbx,%r14
jne    1140 <put_utf8+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define void @put_utf8(i32 %0) {
%2 = alloca i32
%3 = alloca [4 x i8]
%4 = alloca i64
%5 = alloca i64
store i32 %0, i32* %2
%6 = getelementptr inbounds [4 x i8], [4 x i8]* %3, i64 0, i64 0
%7 = load i32, i32* %2
%8 = call i64 @MR_utf8_encode(i8* %6, i32 %7)
store i64 %8, i64* %4
store i64 0, i64* %5
br label %9
9: ; preds = %18, %1
%10 = load i64, i64* %5
%11 = load i64, i64* %4
%12 = icmp ult i64 %10, %11
br i1 %12, label %13, label %21
13: ; preds = %9
%14 = load i64, i64* %5
%15 = getelementptr inbounds [4 x i8], [4 x i8]* %3, i64 0, i64 %14
%16 = load i8, i8* %15
%17 = call i32 @putchar(i8 signext %16)
br label %18
18: ; preds = %13
%19 = load i64, i64* %5
%20 = add i64 %19, 1
store i64 %20, i64* %5
br label %9
21: ; preds = %9
ret void
}

LLVM IR (-O2):
define void @put_utf8(i32 %0) {
%2 = alloca [4 x i8]
%3 = getelementptr inbounds [4 x i8], [4 x i8]* %2, i64 0, i64 0
%4 = call i64 @MR_utf8_encode(i8* %3, i32 %0)
%5 = icmp eq i64 %4, 0
br i1 %5, label %13, label %6
6: ; preds = %1, %6
%7 = phi i64 [ %11, %6 ], [ 0, %1 ]
%8 = getelementptr inbounds [4 x i8], [4 x i8]* %2, i64 0, i64 %7
%9 = load i8, i8* %8
%10 = call i32 @putchar(i8 signext %9)
%11 = add nuw i64 %7, 1
%12 = icmp eq i64 %11, %4
br i1 %12, label %13, label %6
13: ; preds = %6, %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ abort();
int /*<<< orphan*/ system_log(char *, char *, int, char *);
void sig_segv(int signo) {
  system_log("<F>",
             "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
             "2022-01-22/02-19-57/repos/holger24/AFD/refs/heads/master/src/"
             "init_afd/init_afd.c",
             3531, ("Aaarrrggh! Received SIGSEGV."));
  abort();
}


x86 assembly (clang, -O0):
<sig_segv>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
lea    0xece(%rip),%rdi
lea    0xecb(%rip),%rsi
mov    $0xdcb,%edx
lea    0xf50(%rip),%rcx
call   1040 <system_log@plt>
mov    $0x0,%al
call   1030 <abort@plt>

x86 assembly (clang, -O2):
<sig_segv>:
push   %rax
lea    0xed8(%rip),%rdi
lea    0xed5(%rip),%rsi
lea    0xf5f(%rip),%rcx
mov    $0xdcb,%edx
call   1040 <system_log@plt>
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
@.str = [4 x i8] c"<F>\00"
@.str.1 = [145 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/holger24/AFD/refs/heads/master/src/init_afd/init_afd.c\00"
@.str.2 = [29 x i8] c"Aaarrrggh! Received SIGSEGV.\00"
define void @sig_segv(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @system_log(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([145 x i8], [145 x i8]* @.str.1, i64 0, i64 0), i32 3531, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.2, i64 0, i64 0))
%4 = call i32 (...) @abort()
unreachable
}

LLVM IR (-O2):
@.str = [4 x i8] c"<F>\00"
@.str.1 = [145 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/holger24/AFD/refs/heads/master/src/init_afd/init_afd.c\00"
@.str.2 = [29 x i8] c"Aaarrrggh! Received SIGSEGV.\00"
define void @sig_segv(i32 %0) {
%2 = tail call i32 @system_log(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([145 x i8], [145 x i8]* @.str.1, i64 0, i64 0), i32 3531, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.2, i64 0, i64 0))
%3 = tail call i32 (...) @abort()
unreachable
}
/* Type definitions */
typedef int time_t;

/* Variables and functions */
int time(int /*<<< orphan*/ *);
void get_tomorrow(time_t *startDate, time_t *endDate) {
  time_t t = time(NULL);
  t += 86400;
  *startDate = t;
  *endDate = t;
}


x86 assembly (clang, -O0):
<get_tomorrow>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
xor    %eax,%eax
mov    %eax,%edi
call   1030 <time@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x15180,%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x14(%rbp),%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_tomorrow>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
xor    %edi,%edi
call   1030 <time@plt>
add    $0x15180,%eax
mov    %eax,(%rbx)
mov    %eax,(%r14)
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define void @get_tomorrow(i32* nocapture writeonly %0, i32* nocapture writeonly %1) {
%3 = tail call i32 @time(i32* null)
%4 = add nsw i32 %3, 86400
store i32 %4, i32* %0
store i32 %4, i32* %1
ret void
}
/* Variables and functions */
int gob_encode_start_struct(char *buf, size_t buf_size) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @gob_encode_start_struct(i8* nocapture readnone %0, i64 %1) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ R_OK;
int access(char const *, int /*<<< orphan*/);
unsigned int braf_fileExists(const char *fileName) {
  if (access(fileName, R_OK) != -1) {
    return 1;
  } else {
    return 0;
  }
}


x86 assembly (clang, -O0):
<braf_fileExists>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    0x2eb9(%rip),%rax
mov    (%rax),%esi
call   1030 <access@plt>
cmp    $0xffffffff,%eax
je     1143 <braf_fileExists+0x33>
movl   $0x1,-0x4(%rbp)
jmp    114a <braf_fileExists+0x3a>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<braf_fileExists>:
push   %rax
mov    0x2ec8(%rip),%rax
mov    (%rax),%esi
call   1030 <access@plt>
xor    %ecx,%ecx
cmp    $0xffffffff,%eax
setne  %cl
mov    %ecx,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@R_OK = global i32 0
define i32 @braf_fileExists(i8* nocapture %0) {
%2 = load i32, i32* @R_OK
%3 = tail call i32 @access(i8* %0, i32 %2)
%4 = icmp ne i32 %3, -1
%5 = zext i1 %4 to i32
ret i32 %5
}
const char *__malidrv_build_info(void) {
  return "malidrv:  API_VERSION=401 REPO_URL=heads/cm-12.1 REVISION=-3cf8887 "
         "CHANGED_REVISION=3cf8887 CHANGE_DATE=2015-12-02 05:08:52 -0600 "
         "BUILD_DATE=Wed Dec  2 05:53:57 CST 2015 BUILD=debug TARGET_PLATFORM= "
         "MALI_PLATFORM= KDIR= OS_MEMORY_KERNEL_BUFFER_SIZE_IN_MB=16 "
         "USING_UMP= USING_PROFILING=y USING_INTERNAL_PROFILING=y "
         "USING_GPU_UTILIZATION=1 USING_POWER_PERFORMANCE_POLICY= "
         "MALI_UPPER_HALF_SCHEDULING=1";
}


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

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

LLVM IR (-O0):
@.str = [399 x i8] c"malidrv: API_VERSION=401 REPO_URL=heads/cm-12.1 REVISION=-3cf8887 CHANGED_REVISION=3cf8887 CHANGE_DATE=2015-12-02 05:08:52 -0600 BUILD_DATE=Wed Dec 2 05:53:57 CST 2015 BUILD=debug TARGET_PLATFORM= MALI_PLATFORM= KDIR= OS_MEMORY_KERNEL_BUFFER_SIZE_IN_MB=16 USING_UMP= USING_PROFILING=y USING_INTERNAL_PROFILING=y USING_GPU_UTILIZATION=1 USING_POWER_PERFORMANCE_POLICY= MALI_UPPER_HALF_SCHEDULING=1\00"
define i8* @__malidrv_build_info() {
ret i8* getelementptr inbounds ([399 x i8], [399 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [399 x i8] c"malidrv: API_VERSION=401 REPO_URL=heads/cm-12.1 REVISION=-3cf8887 CHANGED_REVISION=3cf8887 CHANGE_DATE=2015-12-02 05:08:52 -0600 BUILD_DATE=Wed Dec 2 05:53:57 CST 2015 BUILD=debug TARGET_PLATFORM= MALI_PLATFORM= KDIR= OS_MEMORY_KERNEL_BUFFER_SIZE_IN_MB=16 USING_UMP= USING_PROFILING=y USING_INTERNAL_PROFILING=y USING_GPU_UTILIZATION=1 USING_POWER_PERFORMANCE_POLICY= MALI_UPPER_HALF_SCHEDULING=1\00"
define i8* @__malidrv_build_info() {
ret i8* getelementptr inbounds ([399 x i8], [399 x i8]* @.str, i64 0, i64 0)
}
/* Variables and functions */
int /*<<< orphan*/ LC_ALL;
int /*<<< orphan*/ printf(char *, int, int);
int /*<<< orphan*/ setlocale(int /*<<< orphan*/, char *);
int main(void) {
  int positivo = 32767;
  int negativo = -32768;
  setlocale(LC_ALL, "Portuguese");
  printf("%d +1 é %d\n", positivo, positivo + 1);
  printf("%d -1 é %d\n", negativo, negativo - 1);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x7fff,-0x4(%rbp)
movl   $0xffff8000,-0x8(%rbp)
mov    0x2ea3(%rip),%rax
mov    (%rax),%edi
lea    0xeba(%rip),%rsi
call   1040 <setlocale@plt>
mov    -0x4(%rbp),%esi
mov    -0x4(%rbp),%edx
add    $0x1,%edx
lea    0xeb0(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%esi
mov    -0x8(%rbp),%edx
sub    $0x1,%edx
lea    0xea8(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    0x2eb8(%rip),%rax
mov    (%rax),%edi
lea    0xecf(%rip),%rsi
call   1040 <setlocale@plt>
lea    0xece(%rip),%rdi
mov    $0x7fff,%esi
mov    $0x8000,%edx
call   1030 <printf@plt>
lea    0xec5(%rip),%rdi
mov    $0xffff8000,%esi
mov    $0xffff7fff,%edx
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@LC_ALL = global i32 0
@.str = [11 x i8] c"Portuguese\00"
@.str.1 = [13 x i8] c"%d +1 \C3\A9 %d\0A\00"
@.str.2 = [13 x i8] c"%d -1 \C3\A9 %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 32767, i32* %1
store i32 -32768, i32* %2
%3 = load i32, i32* @LC_ALL
%4 = call i32 @setlocale(i32 %3, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
%5 = load i32, i32* %1
%6 = load i32, i32* %1
%7 = add nsw i32 %6, 1
%8 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), i32 %5, i32 %7)
%9 = load i32, i32* %2
%10 = load i32, i32* %2
%11 = sub nsw i32 %10, 1
%12 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.2, i64 0, i64 0), i32 %9, i32 %11)
ret i32 0
}

LLVM IR (-O2):
@LC_ALL = global i32 0
@.str = [11 x i8] c"Portuguese\00"
@.str.1 = [13 x i8] c"%d +1 \C3\A9 %d\0A\00"
@.str.2 = [13 x i8] c"%d -1 \C3\A9 %d\0A\00"
define i32 @main() {
%1 = load i32, i32* @LC_ALL
%2 = tail call i32 @setlocale(i32 %1, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), i32 32767, i32 32768)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.2, i64 0, i64 0), i32 -32768, i32 -32769)
ret i32 0
}
int main(void) {
  int xor_n = 0;
  for (int i = 7; i <= 17; i++)
    xor_n ^= i;
  int x = xor(7 - 1) ^ xor(17);
  printf("%d\n", x);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
movl   $0x7,-0xc(%rbp)
cmpl   $0x11,-0xc(%rbp)
jg     115e <main+0x3e>
mov    -0xc(%rbp),%eax
xor    -0x8(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    113d <main+0x1d>
mov    $0x6,%edi
mov    $0x0,%al
call   1040 <xor@plt>
mov    %eax,-0x14(%rbp)
mov    $0x11,%edi
mov    $0x0,%al
call   1040 <xor@plt>
mov    %eax,%ecx
mov    -0x14(%rbp),%eax
xor    %ecx,%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%esi
lea    0xe73(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    $0x6,%edi
xor    %eax,%eax
call   1040 <xor@plt>
mov    %eax,%ebx
mov    $0x11,%edi
xor    %eax,%eax
call   1040 <xor@plt>
xor    %eax,%ebx
lea    0xebc(%rip),%rdi
mov    %ebx,%esi
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = tail call i32 (i32, ...) bitcast (i32 (...)* @xor to i32 (i32, ...)*)(i32 6)
%2 = tail call i32 (i32, ...) bitcast (i32 (...)* @xor to i32 (i32, ...)*)(i32 17)
%3 = xor i32 %2, %1
%4 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %3)
ret i32 0
}
float Activator_Sgn(float Input) {
  if (Input > 0)
    return 1;
  else
    return -1;
}


x86 assembly (clang, -O0):
<Activator_Sgn>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x8(%rbp)
movss  -0x8(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomiss %xmm1,%xmm0
jbe    112c <Activator_Sgn+0x2c>
movss  0xee2(%rip),%xmm0
movss  %xmm0,-0x4(%rbp)
jmp    1139 <Activator_Sgn+0x39>
movss  0xecc(%rip),%xmm0
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<Activator_Sgn>:
xorps  %xmm1,%xmm1
xor    %eax,%eax
ucomiss %xmm1,%xmm0
seta   %al
lea    0xeee(%rip),%rcx
movss  (%rcx,%rax,4),%xmm0
ret

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

LLVM IR (-O2):
define float @Activator_Sgn(float %0) {
%2 = fcmp ogt float %0, 0.000000e+00
%3 = select i1 %2, float 1.000000e+00, float -1.000000e+00
ret float %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main(int argc, char *argv[]) {
  int i, j;
  printf("0\n");
  while (i < 20) {
    printf("1\n");
  }
  if (j == 0) {
    printf("2\n");
  } else if (j == -1) {
    printf("3\n");
  }
  printf("4\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xed3(%rip),%rdi
call   1030 <printf@plt>
cmpl   $0x14,-0x14(%rbp)
jge    114d <main+0x3d>
lea    0xec0(%rip),%rdi
call   1030 <printf@plt>
jmp    1132 <main+0x22>
cmpl   $0x0,-0x18(%rbp)
jne    1168 <main+0x58>
lea    0xea8(%rip),%rdi
call   1030 <printf@plt>
jmp    1183 <main+0x73>
cmpl   $0xffffffff,-0x18(%rbp)
jne    117e <main+0x6e>
lea    0xe90(%rip),%rdi
call   1030 <printf@plt>
jmp    1183 <main+0x73>
lea    0xe82(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
@str = [2 x i8] c"0\00"
@str.5 = [2 x i8] c"4\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([2 x i8], [2 x i8]* @str, i64 0, i64 0))
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([2 x i8], [2 x i8]* @str.5, i64 0, i64 0))
ret i32 0
}
void write_char(int x, int y, char c) {
  volatile char *character_buffer = (char *)(0x09000000 + (y << 7) + x);
  *character_buffer = c;
}


x86 assembly (clang, -O0):
<write_char>:
push   %rbp
mov    %rsp,%rbp
mov    %dl,%al
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %al,-0x9(%rbp)
mov    -0x8(%rbp),%eax
shl    $0x7,%eax
add    $0x9000000,%eax
add    -0x4(%rbp),%eax
cltq
mov    %rax,-0x18(%rbp)
mov    -0x9(%rbp),%cl
mov    -0x18(%rbp),%rax
mov    %cl,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<write_char>:
shl    $0x7,%esi
lea    (%rdi,%rsi,1),%eax
add    $0x9000000,%eax
cltq
mov    %dl,(%rax)
ret

LLVM IR (-O0):
define void @write_char(i32 %0, i32 %1, i8 signext %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i8
%7 = alloca i8*
store i32 %0, i32* %4
store i32 %1, i32* %5
store i8 %2, i8* %6
%8 = load i32, i32* %5
%9 = shl i32 %8, 7
%10 = add nsw i32 150994944, %9
%11 = load i32, i32* %4
%12 = add nsw i32 %10, %11
%13 = sext i32 %12 to i64
%14 = inttoptr i64 %13 to i8*
store i8* %14, i8** %7
%15 = load i8, i8* %6
%16 = load i8*, i8** %7
store volatile i8 %15, i8* %16
ret void
}

LLVM IR (-O2):
define void @write_char(i32 %0, i32 %1, i8 signext %2) {
%4 = shl i32 %1, 7
%5 = add i32 %0, 150994944
%6 = add i32 %5, %4
%7 = sext i32 %6 to i64
%8 = inttoptr i64 %7 to i8*
store volatile i8 %2, i8* %8
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void print_usage() {
  printf("Usage   : dhcplease <DHCP Lease File>\n");
  printf("Example : dhcplease /var/lib/dhcpcd/dhcpcd-wlp3s0.lease\n");
  printf("Also    : dhcplease --help\n");
  printf("Also    : dhcplease --version\n");
}


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

x86 assembly (clang, -O2):
<print_usage>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <puts@plt>
lea    0xf02(%rip),%rdi
call   1030 <puts@plt>
lea    0xf2e(%rip),%rdi
call   1030 <puts@plt>
lea    0xf3d(%rip),%rdi
pop    %rax
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [39 x i8] c"Usage : dhcplease <DHCP Lease File>\0A\00"
@.str.1 = [57 x i8] c"Example : dhcplease /var/lib/dhcpcd/dhcpcd-wlp3s0.lease\0A\00"
@.str.2 = [28 x i8] c"Also : dhcplease --help\0A\00"
@.str.3 = [31 x i8] c"Also : dhcplease --version\0A\00"
define void @print_usage() {
%1 = call i32 @printf(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @printf(i8* getelementptr inbounds ([57 x i8], [57 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.2, i64 0, i64 0))
%4 = call i32 @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.3, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [38 x i8] c"Usage : dhcplease <DHCP Lease File>\00"
@str.4 = [56 x i8] c"Example : dhcplease /var/lib/dhcpcd/dhcpcd-wlp3s0.lease\00"
@str.5 = [27 x i8] c"Also : dhcplease --help\00"
@str.6 = [30 x i8] c"Also : dhcplease --version\00"
define void @print_usage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([38 x i8], [38 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([56 x i8], [56 x i8]* @str.4, i64 0, i64 0))
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @str.5, i64 0, i64 0))
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @str.6, i64 0, i64 0))
ret void
}
const char *fpp_config_get_plugin_name(void) { return "Shockwave Flash"; }


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

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

LLVM IR (-O0):
@.str = [16 x i8] c"Shockwave Flash\00"
define i8* @fpp_config_get_plugin_name() {
ret i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [16 x i8] c"Shockwave Flash\00"
define i8* @fpp_config_get_plugin_name() {
ret i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0)
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void output_color_white() { printf("\033[1;37m"); }


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

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

LLVM IR (-O0):
@.str = [8 x i8] c"\1B[1;37m\00"
define void @output_color_white() {
%1 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [8 x i8] c"\1B[1;37m\00"
define void @output_color_white() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ R_ADC_Stop();
char adcStop(void *parameters) {
  R_ADC_Stop();
  return 0;
}


x86 assembly (clang, -O0):
<adcStop>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x0,%al
call   1030 <R_ADC_Stop@plt>
xor    %eax,%eax
movsbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<adcStop>:
push   %rax
xor    %eax,%eax
call   1030 <R_ADC_Stop@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define signext i8 @adcStop(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 (...) @R_ADC_Stop()
ret i8 0
}

LLVM IR (-O2):
define signext i8 @adcStop(i8* nocapture readnone %0) {
%2 = tail call i32 (...) @R_ADC_Stop()
ret i8 0
}
/* Variables and functions */
int /*<<< orphan*/ test_write_buf();
int /*<<< orphan*/ test_write_fd();
void test_write(void) {
  test_write_fd();
  test_write_buf();
}


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

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

LLVM IR (-O0):
define void @test_write() {
%1 = call i32 (...) @test_write_fd()
%2 = call i32 (...) @test_write_buf()
ret void
}

LLVM IR (-O2):
define void @test_write() {
%1 = tail call i32 (...) @test_write_fd()
%2 = tail call i32 (...) @test_write_buf()
ret void
}
/* Variables and functions */
int strlen(char *);
void permutations(char *iterable) { int n = strlen(iterable); }


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

x86 assembly (clang, -O2):
<permutations>:
jmp    1030 <strlen@plt>

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

LLVM IR (-O2):
define void @permutations(i8* %0) {
%2 = tail call i32 @strlen(i8* %0)
ret void
}
/* Type definitions */
struct RSConfig {
  int dummy;
};

/* Variables and functions */
int decode_rs(struct RSConfig *);
int /*<<< orphan*/ printf(char *);
int decodeWithRS(struct RSConfig *rsConfig) {
  if (rsConfig == NULL) {
    printf("\nError : RS - decodeWithRS - rsConfig = NULL\n");
    return -1;
  }
  int status = 0;
  status = decode_rs(rsConfig);
  return status;
}


x86 assembly (clang, -O0):
<decodeWithRS>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    114f <decodeWithRS+0x2f>
lea    0xec2(%rip),%rdi
call   1030 <printf@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    1168 <decodeWithRS+0x48>
movl   $0x0,-0x14(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <decode_rs@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<decodeWithRS>:
test   %rdi,%rdi
je     112a <decodeWithRS+0xa>
jmp    1040 <decode_rs@plt>
push   %rax
lea    0xece(%rip),%rdi
call   1030 <puts@plt>
mov    $0xffffffff,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.RSConfig = type { i32 }
@.str = [46 x i8] c"\0AError : RS - decodeWithRS - rsConfig = NULL\0A\00"
define i32 @decodeWithRS(%struct.RSConfig* %0) {
%2 = alloca i32
%3 = alloca %struct.RSConfig*
%4 = alloca i32
store %struct.RSConfig* %0, %struct.RSConfig** %3
%5 = load %struct.RSConfig*, %struct.RSConfig** %3
%6 = icmp eq %struct.RSConfig* %5, null
br i1 %6, label %7, label %9
7: ; preds = %1
%8 = call i32 @printf(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str, i64 0, i64 0))
store i32 -1, i32* %2
br label %13
9: ; preds = %1
store i32 0, i32* %4
%10 = load %struct.RSConfig*, %struct.RSConfig** %3
%11 = call i32 @decode_rs(%struct.RSConfig* %10)
store i32 %11, i32* %4
%12 = load i32, i32* %4
store i32 %12, i32* %2
br label %13
13: ; preds = %9, %7
%14 = load i32, i32* %2
ret i32 %14
}

LLVM IR (-O2):
%struct.RSConfig = type { i32 }
@str = [45 x i8] c"\0AError : RS - decodeWithRS - rsConfig = NULL\00"
define i32 @decodeWithRS(%struct.RSConfig* %0) {
%2 = icmp eq %struct.RSConfig* %0, null
br i1 %2, label %3, label %5
3: ; preds = %1
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([45 x i8], [45 x i8]* @str, i64 0, i64 0))
br label %7
5: ; preds = %1
%6 = tail call i32 @decode_rs(%struct.RSConfig* %0)
br label %7
7: ; preds = %5, %3
%8 = phi i32 [ -1, %3 ], [ %6, %5 ]
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ glShadeModel(unsigned int);
void ShadeModel(unsigned int m) { glShadeModel(m); }


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

x86 assembly (clang, -O2):
<ShadeModel>:
jmp    1030 <glShadeModel@plt>

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

LLVM IR (-O2):
define void @ShadeModel(i32 %0) {
%2 = tail call i32 @glShadeModel(i32 %0)
ret void
}
__attribute__((weak)) void fbo_draw(void) { ; }


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

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

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

LLVM IR (-O2):
define weak void @fbo_draw() {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ fpos_t;
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fsetpos(int /*<<< orphan*/ *, int /*<<< orphan*/ *);
void uninitvar_fsetpos(void) {
  FILE *stream;
  fpos_t *ptr;
  (void)fsetpos(stream, ptr);
}


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

x86 assembly (clang, -O2):
<uninitvar_fsetpos>:
jmp    1030 <fsetpos@plt>

LLVM IR (-O0):
define void @uninitvar_fsetpos() {
%1 = alloca i32*
%2 = alloca i32*
%3 = load i32*, i32** %1
%4 = load i32*, i32** %2
%5 = call i32 @fsetpos(i32* %3, i32* %4)
ret void
}

LLVM IR (-O2):
define void @uninitvar_fsetpos() {
%1 = tail call i32 @fsetpos(i32* undef, i32* undef)
ret void
}
/* Variables and functions */
void *memcpy(void *, void const *, size_t);
void *mm_array_memcopy(void *dst, const void *src, size_t size) {
  return memcpy(dst, src, size);
}


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

x86 assembly (clang, -O2):
<mm_array_memcopy>:
jmp    1030 <memcpy@plt>

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

LLVM IR (-O2):
define i8* @mm_array_memcopy(i8* returned writeonly %0, i8* nocapture %1, i64 %2) {
tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 1 %0, i8* align 1 %1, i64 %2, i1 false)
ret i8* %0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
int print_usage() {
  printf(" Usage: sor_data [options]\n");
  printf(" Option:\n");
  printf(" \t[ -s <vector size> ] (default: %d)\n", 1024);
  return 1;
}


x86 assembly (clang, -O0):
<print_usage>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xef3(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xeef(%rip),%rdi
mov    $0x400,%esi
mov    $0x0,%al
call   1030 <printf@plt>
mov    $0x1,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_usage>:
push   %rax
lea    0xefe(%rip),%rdi
call   1030 <puts@plt>
lea    0xf0d(%rip),%rdi
call   1030 <puts@plt>
lea    0xec0(%rip),%rdi
mov    $0x400,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0x1,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [28 x i8] c" Usage: sor_data [options]\0A\00"
@.str.1 = [10 x i8] c" Option:\0A\00"
@.str.2 = [38 x i8] c" \09[ -s <vector size> ] (default: %d)\0A\00"
define i32 @print_usage() {
%1 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0))
%2 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.2, i64 0, i64 0), i32 1024)
ret i32 1
}

LLVM IR (-O2):
@.str.2 = [38 x i8] c" \09[ -s <vector size> ] (default: %d)\0A\00"
@str = [27 x i8] c" Usage: sor_data [options]\00"
@str.3 = [9 x i8] c" Option:\00"
define i32 @print_usage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @str.3, i64 0, i64 0))
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([38 x i8], [38 x i8]* @.str.2, i64 0, i64 0), i32 1024)
ret i32 1
}