xunge/DecIR huggingface dataset:
signed long signedlong_ignoring_signedlonglong(signed long x,
                                               signed long long y) {
  return x;
}


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

x86 assembly (clang, -O2):
<signedlong_ignoring_signedlonglong>:
mov    %rdi,%rax
ret

LLVM IR (-O0):
define i64 @signedlong_ignoring_signedlonglong(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
ret i64 %5
}

LLVM IR (-O2):
define i64 @signedlong_ignoring_signedlonglong(i64 returned %0, i64 %1) {
ret i64 %0
}
void *betrans_ptrref_hook_copy(void *hook) { return hook; }


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

x86 assembly (clang, -O2):
<betrans_ptrref_hook_copy>:
mov    %rdi,%rax
ret

LLVM IR (-O0):
define i8* @betrans_ptrref_hook_copy(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
ret i8* %3
}

LLVM IR (-O2):
define i8* @betrans_ptrref_hook_copy(i8* readnone returned %0) {
ret i8* %0
}
/* Variables and functions */
int /*<<< orphan*/ search_replace_string(char *, char *, char *);
int /*<<< orphan*/ sprintf(char *, char *, char);
char *element_data_delimiter2label_delimiter(char *source_destination) {
  char multi_attribute_drop_down_delimiter_string[2];
  sprintf(multi_attribute_drop_down_delimiter_string, "%c", '^');
  search_replace_string(source_destination,
                        multi_attribute_drop_down_delimiter_string, "---");
  return source_destination;
}


x86 assembly (clang, -O0):
<element_data_delimiter2label_delimiter>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    -0xa(%rbp),%rdi
lea    0xec9(%rip),%rsi
mov    $0x5e,%edx
call   1040 <sprintf@plt>
mov    -0x8(%rbp),%rdi
lea    -0xa(%rbp),%rsi
lea    0xeb3(%rip),%rdx
call   1030 <search_replace_string@plt>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<element_data_delimiter2label_delimiter>:
push   %rbx
sub    $0x10,%rsp
mov    %rdi,%rbx
movw   $0x5e,0xe(%rsp)
lea    0xeda(%rip),%rdx
lea    0xe(%rsp),%rsi
call   1030 <search_replace_string@plt>
mov    %rbx,%rax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%c\00"
@.str.1 = [4 x i8] c"---\00"
define i8* @element_data_delimiter2label_delimiter(i8* %0) {
%2 = alloca i8*
%3 = alloca [2 x i8]
store i8* %0, i8** %2
%4 = getelementptr inbounds [2 x i8], [2 x i8]* %3, i64 0, i64 0
%5 = call i32 @sprintf(i8* %4, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8 signext 94)
%6 = load i8*, i8** %2
%7 = getelementptr inbounds [2 x i8], [2 x i8]* %3, i64 0, i64 0
%8 = call i32 @search_replace_string(i8* %6, i8* %7, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
%9 = load i8*, i8** %2
ret i8* %9
}

LLVM IR (-O2):
@.str.1 = [4 x i8] c"---\00"
define i8* @element_data_delimiter2label_delimiter(i8* returned %0) {
%2 = alloca [2 x i8]
%3 = getelementptr inbounds [2 x i8], [2 x i8]* %2, i64 0, i64 0
store i8 94, i8* %3
%4 = getelementptr inbounds [2 x i8], [2 x i8]* %2, i64 0, i64 1
store i8 0, i8* %4
%5 = call i32 @search_replace_string(i8* %0, i8* %3, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
ret i8* %0
}
void asm_finit() {}


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

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

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

LLVM IR (-O2):
define void @asm_finit() {
ret void
}
int cpu_intensive(void) {
  while (1) {
  };
  return 0;
}


x86 assembly (clang, -O0):
<cpu_intensive>:
push   %rbp
mov    %rsp,%rbp
jmp    1109 <cpu_intensive+0x9>
jmp    1109 <cpu_intensive+0x9>

x86 assembly (clang, -O2):
<cpu_intensive>:
jmp    1100 <cpu_intensive>

LLVM IR (-O0):
define i32 @cpu_intensive() {
br label %1
1: ; preds = %0, %1
br label %1
}

LLVM IR (-O2):
define i32 @cpu_intensive() {
br label %1
1: ; preds = %0, %1
br label %1
}
int fiveeighths(int x) {
  int xl3 = x & 0x7;
  int xl1 = (x & 1) << 2;
  int x_mask = x >> ((sizeof(int) << 3) - 1);
  int bias = x_mask & 7;
  int incr = (xl3 + xl1 + bias) >> 3;
  int s3 = x >> 3;
  int s1 = x >> 1;
  return s1 + s3 + incr;
}


x86 assembly (clang, -O0):
<fiveeighths>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
and    $0x7,%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
and    $0x1,%eax
shl    $0x2,%eax
mov    %eax,-0xc(%rbp)
mov    -0x4(%rbp),%eax
sar    $0x1f,%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
and    $0x7,%eax
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%eax
add    -0xc(%rbp),%eax
add    -0x14(%rbp),%eax
sar    $0x3,%eax
mov    %eax,-0x18(%rbp)
mov    -0x4(%rbp),%eax
sar    $0x3,%eax
mov    %eax,-0x1c(%rbp)
mov    -0x4(%rbp),%eax
sar    $0x1,%eax
mov    %eax,-0x20(%rbp)
mov    -0x20(%rbp),%eax
add    -0x1c(%rbp),%eax
add    -0x18(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<fiveeighths>:
mov    %edi,%eax
and    $0x7,%eax
mov    %edi,%ecx
and    $0x1,%ecx
mov    %edi,%edx
sar    $0x1f,%edx
and    $0x7,%edx
lea    (%rax,%rcx,4),%ecx
add    %edx,%ecx
shr    $0x3,%ecx
mov    %edi,%eax
sar    $0x3,%eax
sar    %edi
add    %edi,%eax
add    %ecx,%eax
ret

LLVM IR (-O0):
define i32 @fiveeighths(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
store i32 %0, i32* %2
%10 = load i32, i32* %2
%11 = and i32 %10, 7
store i32 %11, i32* %3
%12 = load i32, i32* %2
%13 = and i32 %12, 1
%14 = shl i32 %13, 2
store i32 %14, i32* %4
%15 = load i32, i32* %2
%16 = ashr i32 %15, 31
store i32 %16, i32* %5
%17 = load i32, i32* %5
%18 = and i32 %17, 7
store i32 %18, i32* %6
%19 = load i32, i32* %3
%20 = load i32, i32* %4
%21 = add nsw i32 %19, %20
%22 = load i32, i32* %6
%23 = add nsw i32 %21, %22
%24 = ashr i32 %23, 3
store i32 %24, i32* %7
%25 = load i32, i32* %2
%26 = ashr i32 %25, 3
store i32 %26, i32* %8
%27 = load i32, i32* %2
%28 = ashr i32 %27, 1
store i32 %28, i32* %9
%29 = load i32, i32* %9
%30 = load i32, i32* %8
%31 = add nsw i32 %29, %30
%32 = load i32, i32* %7
%33 = add nsw i32 %31, %32
ret i32 %33
}

LLVM IR (-O2):
define i32 @fiveeighths(i32 %0) {
%2 = and i32 %0, 7
%3 = shl i32 %0, 2
%4 = and i32 %3, 4
%5 = icmp slt i32 %0, 0
%6 = select i1 %5, i32 7, i32 0
%7 = add nuw nsw i32 %4, %2
%8 = add nuw nsw i32 %7, %6
%9 = lshr i32 %8, 3
%10 = ashr i32 %0, 3
%11 = ashr i32 %0, 1
%12 = add nsw i32 %11, %10
%13 = add nsw i32 %12, %9
ret i32 %13
}
void operators_equals() {
  int a, b, c, d;
  a = b = c = d = 42;
}


x86 assembly (clang, -O0):
<operators_equals>:
push   %rbp
mov    %rsp,%rbp
movl   $0x2a,-0x10(%rbp)
movl   $0x2a,-0xc(%rbp)
movl   $0x2a,-0x8(%rbp)
movl   $0x2a,-0x4(%rbp)
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @operators_equals() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ SYS_F_IOCTLSOCKET;
int /*<<< orphan*/ SYSerr(int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ errno;
int ioctl(int, long, void *);
int BIO_socket_ioctl(int fd, long type, void *arg) {
  int ret;
  ret = ioctl(fd, type, arg);
  if (ret < 0)
    SYSerr(SYS_F_IOCTLSOCKET, errno);
  return (ret);
}


x86 assembly (clang, -O0):
<BIO_socket_ioctl>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1040 <ioctl@plt>
mov    %eax,-0x1c(%rbp)
cmpl   $0x0,-0x1c(%rbp)
jge    1167 <BIO_socket_ioctl+0x47>
mov    0x2e89(%rip),%rax
mov    (%rax),%edi
mov    0x2e78(%rip),%rax
mov    (%rax),%esi
call   1030 <SYSerr@plt>
mov    -0x1c(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<BIO_socket_ioctl>:
push   %rbx
call   1040 <ioctl@plt>
mov    %eax,%ebx
test   %eax,%eax
jns    1143 <BIO_socket_ioctl+0x23>
mov    0x2ead(%rip),%rax
mov    (%rax),%edi
mov    0x2e9c(%rip),%rax
mov    (%rax),%esi
call   1030 <SYSerr@plt>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
@SYS_F_IOCTLSOCKET = global i32 0
@errno = global i32 0
define i32 @BIO_socket_ioctl(i32 %0, i64 %1, i8* %2) {
%4 = alloca i32
%5 = alloca i64
%6 = alloca i8*
%7 = alloca i32
store i32 %0, i32* %4
store i64 %1, i64* %5
store i8* %2, i8** %6
%8 = load i32, i32* %4
%9 = load i64, i64* %5
%10 = load i8*, i8** %6
%11 = call i32 @ioctl(i32 %8, i64 %9, i8* %10)
store i32 %11, i32* %7
%12 = load i32, i32* %7
%13 = icmp slt i32 %12, 0
br i1 %13, label %14, label %18
14: ; preds = %3
%15 = load i32, i32* @SYS_F_IOCTLSOCKET
%16 = load i32, i32* @errno
%17 = call i32 @SYSerr(i32 %15, i32 %16)
br label %18
18: ; preds = %14, %3
%19 = load i32, i32* %7
ret i32 %19
}

LLVM IR (-O2):
@SYS_F_IOCTLSOCKET = global i32 0
@errno = global i32 0
define i32 @BIO_socket_ioctl(i32 %0, i64 %1, i8* %2) {
%4 = tail call i32 @ioctl(i32 %0, i64 %1, i8* %2)
%5 = icmp slt i32 %4, 0
br i1 %5, label %6, label %10
6: ; preds = %3
%7 = load i32, i32* @SYS_F_IOCTLSOCKET
%8 = load i32, i32* @errno
%9 = tail call i32 @SYSerr(i32 %7, i32 %8)
br label %10
10: ; preds = %6, %3
ret i32 %4
}
double jd2mjd(dj)
double dj;
{ return (dj - 2400000.5); }


x86 assembly (clang, -O0):
<jd2mjd>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  0xeea(%rip),%xmm1
subsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<jd2mjd>:
addsd  0xef8(%rip),%xmm0
ret

LLVM IR (-O0):
define double @jd2mjd(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fsub double %3, 0x41424F8040000000
ret double %4
}

LLVM IR (-O2):
define double @jd2mjd(double %0) {
%2 = fadd double %0, 0xC1424F8040000000
ret double %2
}
/* Variables and functions */
int expr(char const *, size_t *);
int eval_expr(const char *expr_str) {
  size_t cursor = 0;
  return expr(expr_str, &cursor);
}


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

x86 assembly (clang, -O2):
<eval_expr>:
push   %rax
movq   $0x0,(%rsp)
mov    %rsp,%rsi
call   1030 <expr@plt>
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @eval_expr(i8* %0) {
%2 = alloca i64
%3 = bitcast i64* %2 to i8*
store i64 0, i64* %2
%4 = call i32 @expr(i8* %0, i64* %2)
ret i32 %4
}
/* Variables and functions */
int safe_atollu(char const *, unsigned long long *);
int safe_atolu(const char *s, unsigned long *ret_u) {
  do {
    switch (0) {
    case 0:
    case !!(sizeof(unsigned long) == sizeof(unsigned long long)):;
    }
  } while (false);
  return safe_atollu(s, (unsigned long long *)ret_u);
}


x86 assembly (clang, -O0):
<safe_atolu>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
jmp    1125 <safe_atolu+0x15>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <safe_atollu@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<safe_atolu>:
jmp    1030 <safe_atollu@plt>

LLVM IR (-O0):
define i32 @safe_atolu(i8* %0, i64* %1) {
%3 = alloca i8*
%4 = alloca i64*
store i8* %0, i8** %3
store i64* %1, i64** %4
br label %5
5: ; preds = %2
br label %6
6: ; preds = %5
%7 = load i8*, i8** %3
%8 = load i64*, i64** %4
%9 = call i32 @safe_atollu(i8* %7, i64* %8)
ret i32 %9
}

LLVM IR (-O2):
define i32 @safe_atolu(i8* %0, i64* %1) {
%3 = tail call i32 @safe_atollu(i8* %0, i64* %1)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ PC_UART_UartInit();
void PC_UART_Init(void) { PC_UART_UartInit(); }


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

x86 assembly (clang, -O2):
<PC_UART_Init>:
xor    %eax,%eax
jmp    1030 <PC_UART_UartInit@plt>

LLVM IR (-O0):
define void @PC_UART_Init() {
%1 = call i32 (...) @PC_UART_UartInit()
ret void
}

LLVM IR (-O2):
define void @PC_UART_Init() {
%1 = tail call i32 (...) @PC_UART_UartInit()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, unsigned char, char);
main() {
  unsigned char a = 0xff;
  char b = 0xff;
  printf("A: %08x, B: %08x\n", a, b);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movb   $0xff,-0x5(%rbp)
movb   $0xff,-0x6(%rbp)
mov    -0x5(%rbp),%al
lea    0xecf(%rip),%rdi
movzbl %al,%esi
movsbl -0x6(%rbp),%edx
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
@.str = [18 x i8] c"A: %08x, B: %08x\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i8 zeroext -1, i8 signext -1)
ret i32 0
}
unsigned getval_446() { return 2429192671U; }


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

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

LLVM IR (-O0):
define i32 @getval_446() {
ret i32 -1865774625
}

LLVM IR (-O2):
define i32 @getval_446() {
ret i32 -1865774625
}
long _syscall3(long cnum, long a1, long a2, long a3) {
  register long ret __asm__("rax");
  register long r0 __asm__("rax") = cnum;
  register long r1 __asm__("rdi") = a1;
  register long r2 __asm__("rsi") = a2;
  register long r3 __asm__("rdx") = a3;
  __asm__ __volatile__("syscall"
                       : "=r"(ret)
                       : "r"(r0), "r"(r1), "r"(r2), "r"(r3)
                       : "rcx", "r11", "memory");
  return ret;
}


x86 assembly (clang, -O0):
<_syscall3>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x30(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x38(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x40(%rbp)
mov    -0x20(%rbp),%rax
mov    %rax,-0x48(%rbp)
mov    -0x30(%rbp),%rax
mov    -0x38(%rbp),%rdi
mov    -0x40(%rbp),%rsi
mov    -0x48(%rbp),%rdx
syscall
mov    %rax,-0x28(%rbp)
mov    -0x28(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<_syscall3>:
mov    %rdi,%rax
mov    %rsi,%rdi
mov    %rdx,%rsi
mov    %rcx,%rdx
syscall
ret

LLVM IR (-O0):
define i64 @_syscall3(i64 %0, i64 %1, i64 %2, i64 %3) {
%5 = alloca i64
%6 = alloca i64
%7 = alloca i64
%8 = alloca i64
%9 = alloca i64
%10 = alloca i64
%11 = alloca i64
%12 = alloca i64
%13 = alloca i64
store i64 %0, i64* %5
store i64 %1, i64* %6
store i64 %2, i64* %7
store i64 %3, i64* %8
%14 = load i64, i64* %5
store i64 %14, i64* %10
%15 = load i64, i64* %6
store i64 %15, i64* %11
%16 = load i64, i64* %7
store i64 %16, i64* %12
%17 = load i64, i64* %8
store i64 %17, i64* %13
%18 = load i64, i64* %10
%19 = load i64, i64* %11
%20 = load i64, i64* %12
%21 = load i64, i64* %13
%22 = call i64 asm sideeffect "syscall", "={rax},{rax},{rdi},{rsi},{rdx},~{rcx},~{r11},~{memory},~{dirflag},~{fpsr},~{flags}"(i64 %18, i64 %19, i64 %20, i64 %21)
store i64 %22, i64* %9
%23 = load i64, i64* %9
ret i64 %23
}

LLVM IR (-O2):
define i64 @_syscall3(i64 %0, i64 %1, i64 %2, i64 %3) {
%5 = tail call i64 asm sideeffect "syscall", "={rax},{rax},{rdi},{rsi},{rdx},~{rcx},~{r11},~{memory},~{dirflag},~{fpsr},~{flags}"(i64 %0, i64 %1, i64 %2, i64 %3)
ret i64 %5
}
/* Variables and functions */
int /*<<< orphan*/ ft_putchar(char);
void ft_putstr(char *str) {
  while ((*str) != '\0') {
    ft_putchar(*str);
    str = str + 1;
  }
}


x86 assembly (clang, -O0):
<ft_putstr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     1149 <ft_putstr+0x39>
mov    -0x8(%rbp),%rax
movsbl (%rax),%edi
call   1030 <ft_putchar@plt>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    111c <ft_putstr+0xc>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_putstr>:
push   %rbx
mov    (%rdi),%al
test   %al,%al
je     1133 <ft_putstr+0x23>
mov    %rdi,%rbx
add    $0x1,%rbx
xchg   %ax,%ax
movsbl %al,%edi
call   1030 <ft_putchar@plt>
movzbl (%rbx),%eax
add    $0x1,%rbx
test   %al,%al
jne    1120 <ft_putstr+0x10>
pop    %rbx
ret

LLVM IR (-O0):
define void @ft_putstr(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
br label %3
3: ; preds = %8, %1
%4 = load i8*, i8** %2
%5 = load i8, i8* %4
%6 = sext i8 %5 to i32
%7 = icmp ne i32 %6, 0
br i1 %7, label %8, label %14
8: ; preds = %3
%9 = load i8*, i8** %2
%10 = load i8, i8* %9
%11 = call i32 @ft_putchar(i8 signext %10)
%12 = load i8*, i8** %2
%13 = getelementptr inbounds i8, i8* %12, i64 1
store i8* %13, i8** %2
br label %3
14: ; preds = %3
ret void
}

LLVM IR (-O2):
define void @ft_putstr(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %11, label %4
4: ; preds = %1, %4
%5 = phi i8 [ %9, %4 ], [ %2, %1 ]
%6 = phi i8* [ %8, %4 ], [ %0, %1 ]
%7 = tail call i32 @ft_putchar(i8 signext %5)
%8 = getelementptr inbounds i8, i8* %6, i64 1
%9 = load i8, i8* %8
%10 = icmp eq i8 %9, 0
br i1 %10, label %11, label %4
11: ; preds = %4, %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ UpnpResponse_ContentDirectory_GetSortCapabilities(void *,
                                                                     char *);
int /*<<< orphan*/ printf(char *);
void UpnpContentDirectory_GetSortCapabilities(void *upnptoken) {
  printf("UPnP Invoke: UpnpContentDirectory_GetSortCapabilities();\r\n");
  UpnpResponse_ContentDirectory_GetSortCapabilities(upnptoken, "");
}


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

x86 assembly (clang, -O2):
<UpnpContentDirectory_GetSortCapabilities>:
push   %rbx
mov    %rdi,%rbx
lea    0xed5(%rip),%rdi
call   1040 <puts@plt>
lea    0xf02(%rip),%rsi
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <UpnpResponse_ContentDirectory_GetSortCapabilities@plt>

LLVM IR (-O0):
@.str = [59 x i8] c"UPnP Invoke: UpnpContentDirectory_GetSortCapabilities();\0D\0A\00"
@.str.1 = [1 x i8] zeroinitializer
define void @UpnpContentDirectory_GetSortCapabilities(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 @printf(i8* getelementptr inbounds ([59 x i8], [59 x i8]* @.str, i64 0, i64 0))
%4 = load i8*, i8** %2
%5 = call i32 @UpnpResponse_ContentDirectory_GetSortCapabilities(i8* %4, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str.1 = [1 x i8] zeroinitializer
@str = [58 x i8] c"UPnP Invoke: UpnpContentDirectory_GetSortCapabilities();\0D\00"
define void @UpnpContentDirectory_GetSortCapabilities(i8* %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([58 x i8], [58 x i8]* @str, i64 0, i64 0))
%3 = tail call i32 @UpnpResponse_ContentDirectory_GetSortCapabilities(i8* %0, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0))
ret void
}
int clock_nanosleep(int clock_id, int flags, const struct timespec *request,
                    struct timespec *remain) {
  return 0;
}


x86 assembly (clang, -O0):
<clock_nanosleep>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
mov    %rcx,-0x18(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.timespec = type opaque
define i32 @clock_nanosleep(i32 %0, i32 %1, %struct.timespec* %2, %struct.timespec* %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca %struct.timespec*
%8 = alloca %struct.timespec*
store i32 %0, i32* %5
store i32 %1, i32* %6
store %struct.timespec* %2, %struct.timespec** %7
store %struct.timespec* %3, %struct.timespec** %8
ret i32 0
}

LLVM IR (-O2):
%struct.timespec = type opaque
define i32 @clock_nanosleep(i32 %0, i32 %1, %struct.timespec* nocapture readnone %2, %struct.timespec* nocapture readnone %3) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ h_util_cp_dir_se(char const *, char const *, char *, char *);
void h_util_cp_dir(const char *dir1, const char *dir2) {
  h_util_cp_dir_se(dir1, dir2, "", "");
}


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

x86 assembly (clang, -O2):
<h_util_cp_dir>:
lea    0xee9(%rip),%rcx
mov    %rcx,%rdx
jmp    1030 <h_util_cp_dir_se@plt>

LLVM IR (-O0):
@.str = [1 x i8] zeroinitializer
define void @h_util_cp_dir(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %3
%6 = load i8*, i8** %4
%7 = call i32 @h_util_cp_dir_se(i8* %5, i8* %6, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [1 x i8] zeroinitializer
define void @h_util_cp_dir(i8* %0, i8* %1) {
%3 = tail call i32 @h_util_cp_dir_se(i8* %0, i8* %1, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ va_list;
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ LogVfprintf(int /*<<< orphan*/ *, char *,
                               int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *);
void LogForcedDebug(FILE *prFP, char *pcFmt, va_list rVArgList) {
  fprintf(prFP, "FORCED DEBUG: ");
  LogVfprintf(prFP, pcFmt, rVArgList);
}


x86 assembly (clang, -O0):
<LogForcedDebug>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xec2(%rip),%rsi
call   1040 <fprintf@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
call   1030 <LogVfprintf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<LogForcedDebug>:
push   %rbp
push   %r14
push   %rbx
mov    %edx,%r14d
mov    %rsi,%rbx
mov    %rdi,%rbp
lea    0xecc(%rip),%rdi
mov    $0xe,%esi
mov    $0x1,%edx
mov    %rbp,%rcx
call   1040 <fwrite@plt>
mov    %rbp,%rdi
mov    %rbx,%rsi
mov    %r14d,%edx
pop    %rbx
pop    %r14
pop    %rbp
jmp    1030 <LogVfprintf@plt>

LLVM IR (-O0):
@.str = [15 x i8] c"FORCED DEBUG: \00"
define void @LogForcedDebug(i32* %0, i8* %1, i32 %2) {
%4 = alloca i32*
%5 = alloca i8*
%6 = alloca i32
store i32* %0, i32** %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%7 = load i32*, i32** %4
%8 = call i32 @fprintf(i32* %7, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
%9 = load i32*, i32** %4
%10 = load i8*, i8** %5
%11 = load i32, i32* %6
%12 = call i32 @LogVfprintf(i32* %9, i8* %10, i32 %11)
ret void
}

LLVM IR (-O2):
@.str = [15 x i8] c"FORCED DEBUG: \00"
define void @LogForcedDebug(i32* %0, i8* %1, i32 %2) {
%4 = tail call i64 @fwrite(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i64 14, i64 1, i32* %0)
%5 = tail call i32 @LogVfprintf(i32* %0, i8* %1, i32 %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ t1000_emsboard_save();
int /*<<< orphan*/ t1200_state_save();
void t1200_nvr_save(void) {
  t1000_emsboard_save();
  t1200_state_save();
}


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

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

LLVM IR (-O0):
define void @t1200_nvr_save() {
%1 = call i32 (...) @t1000_emsboard_save()
%2 = call i32 (...) @t1200_state_save()
ret void
}

LLVM IR (-O2):
define void @t1200_nvr_save() {
%1 = tail call i32 (...) @t1000_emsboard_save()
%2 = tail call i32 (...) @t1200_state_save()
ret void
}
void rop3_151_1_0(unsigned char *D, unsigned char S, unsigned char T) {
  unsigned char stk1;
  unsigned char stk2;
  unsigned char stk3;
  unsigned char stk4;
  stk4 = T | S;
  stk4 = ~stk4;
  stk3 = *D | stk4;
  stk2 = S ^ stk3;
  stk1 = T ^ stk2;
  *D = (stk1 & (~S)) | (*D & S);
}


x86 assembly (clang, -O0):
<rop3_151_1_0>:
push   %rbp
mov    %rsp,%rbp
mov    %dl,%al
mov    %sil,%cl
mov    %rdi,-0x8(%rbp)
mov    %cl,-0x9(%rbp)
mov    %al,-0xa(%rbp)
movzbl -0xa(%rbp),%eax
movzbl -0x9(%rbp),%ecx
or     %ecx,%eax
mov    %al,-0xe(%rbp)
movzbl -0xe(%rbp),%eax
xor    $0xffffffff,%eax
mov    %al,-0xe(%rbp)
mov    -0x8(%rbp),%rax
movzbl (%rax),%eax
movzbl -0xe(%rbp),%ecx
or     %ecx,%eax
mov    %al,-0xd(%rbp)
movzbl -0x9(%rbp),%eax
movzbl -0xd(%rbp),%ecx
xor    %ecx,%eax
mov    %al,-0xc(%rbp)
movzbl -0xa(%rbp),%eax
movzbl -0xc(%rbp),%ecx
xor    %ecx,%eax
mov    %al,-0xb(%rbp)
movzbl -0xb(%rbp),%eax
movzbl -0x9(%rbp),%ecx
xor    $0xffffffff,%ecx
and    %ecx,%eax
mov    -0x8(%rbp),%rcx
movzbl (%rcx),%ecx
movzbl -0x9(%rbp),%edx
and    %edx,%ecx
or     %ecx,%eax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<rop3_151_1_0>:
mov    %edx,%eax
or     %sil,%al
not    %al
mov    (%rdi),%cl
or     %cl,%al
xor    %sil,%dl
xor    %al,%dl
xor    %dl,%cl
and    %sil,%cl
xor    %dl,%cl
mov    %cl,(%rdi)
ret

LLVM IR (-O0):
define void @rop3_151_1_0(i8* %0, i8 zeroext %1, i8 zeroext %2) {
%4 = alloca i8*
%5 = alloca i8
%6 = alloca i8
%7 = alloca i8
%8 = alloca i8
%9 = alloca i8
%10 = alloca i8
store i8* %0, i8** %4
store i8 %1, i8* %5
store i8 %2, i8* %6
%11 = load i8, i8* %6
%12 = zext i8 %11 to i32
%13 = load i8, i8* %5
%14 = zext i8 %13 to i32
%15 = or i32 %12, %14
%16 = trunc i32 %15 to i8
store i8 %16, i8* %10
%17 = load i8, i8* %10
%18 = zext i8 %17 to i32
%19 = xor i32 %18, -1
%20 = trunc i32 %19 to i8
store i8 %20, i8* %10
%21 = load i8*, i8** %4
%22 = load i8, i8* %21
%23 = zext i8 %22 to i32
%24 = load i8, i8* %10
%25 = zext i8 %24 to i32
%26 = or i32 %23, %25
%27 = trunc i32 %26 to i8
store i8 %27, i8* %9
%28 = load i8, i8* %5
%29 = zext i8 %28 to i32
%30 = load i8, i8* %9
%31 = zext i8 %30 to i32
%32 = xor i32 %29, %31
%33 = trunc i32 %32 to i8
store i8 %33, i8* %8
%34 = load i8, i8* %6
%35 = zext i8 %34 to i32
%36 = load i8, i8* %8
%37 = zext i8 %36 to i32
%38 = xor i32 %35, %37
%39 = trunc i32 %38 to i8
store i8 %39, i8* %7
%40 = load i8, i8* %7
%41 = zext i8 %40 to i32
%42 = load i8, i8* %5
%43 = zext i8 %42 to i32
%44 = xor i32 %43, -1
%45 = and i32 %41, %44
%46 = load i8*, i8** %4
%47 = load i8, i8* %46
%48 = zext i8 %47 to i32
%49 = load i8, i8* %5
%50 = zext i8 %49 to i32
%51 = and i32 %48, %50
%52 = or i32 %45, %51
%53 = trunc i32 %52 to i8
%54 = load i8*, i8** %4
store i8 %53, i8* %54
ret void
}

LLVM IR (-O2):
define void @rop3_151_1_0(i8* nocapture %0, i8 zeroext %1, i8 zeroext %2) {
%4 = or i8 %2, %1
%5 = xor i8 %4, -1
%6 = load i8, i8* %0
%7 = or i8 %6, %5
%8 = xor i8 %2, %1
%9 = xor i8 %8, %7
%10 = xor i8 %1, -1
%11 = and i8 %9, %10
%12 = and i8 %6, %1
%13 = or i8 %11, %12
store i8 %13, i8* %0
ret void
}
/* Variables and functions */
int /*<<< orphan*/ write(int, char *, int);
int main(void) {
  write(1, "main\n", 5);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x1,%edi
lea    0xed5(%rip),%rsi
mov    $0x5,%edx
call   1030 <write@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rsi
mov    $0x1,%edi
mov    $0x5,%edx
call   1030 <write@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [6 x i8] c"main\0A\00"
define i32 @main() {
%1 = tail call i32 @write(i32 1, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 5)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ CDB_RemoveEntry(char const *);
void CDB_RemoveStringEntry(const char *arg_key) { CDB_RemoveEntry(arg_key); }


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

x86 assembly (clang, -O2):
<CDB_RemoveStringEntry>:
jmp    1030 <CDB_RemoveEntry@plt>

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

LLVM IR (-O2):
define void @CDB_RemoveStringEntry(i8* %0) {
%2 = tail call i32 @CDB_RemoveEntry(i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ WriteInstruction(char *);
void CR_DigRight(void) { WriteInstruction("call digr"); }


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

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

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

LLVM IR (-O2):
@.str = [10 x i8] c"call digr\00"
define void @CR_DigRight() {
%1 = tail call i32 @WriteInstruction(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
ret void
}
void DEBUG() {}


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

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

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

LLVM IR (-O2):
define void @DEBUG() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void str_cleanup(void *data) { free((void *)data); }


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

x86 assembly (clang, -O2):
<str_cleanup>:
jmp    1030 <free@plt>

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

LLVM IR (-O2):
define void @str_cleanup(i8* nocapture %0) {
%2 = tail call i32 @free(i8* %0)
ret void
}
/* Variables and functions */
int ig_indirect_table_set(unsigned int, int, unsigned int, int, unsigned int *);
int ig_prc_lut_table_set(unsigned int dev_id, unsigned int index,
                         unsigned int *pentry) {
  if ((index < 0) || (index > 47)) {
    return -1;
  }
  return ig_indirect_table_set(dev_id, 1, index, 10, pentry);
}


x86 assembly (clang, -O0):
<ig_prc_lut_table_set>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
cmpl   $0x0,-0xc(%rbp)
jb     1136 <ig_prc_lut_table_set+0x26>
cmpl   $0x2f,-0xc(%rbp)
jbe    1142 <ig_prc_lut_table_set+0x32>
movl   $0xffffffff,-0x4(%rbp)
jmp    115e <ig_prc_lut_table_set+0x4e>
mov    -0x8(%rbp),%edi
mov    -0xc(%rbp),%edx
mov    -0x18(%rbp),%r8
mov    $0x1,%esi
mov    $0xa,%ecx
call   1030 <ig_indirect_table_set@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ig_prc_lut_table_set>:
cmp    $0x2f,%esi
jbe    111b <ig_prc_lut_table_set+0xb>
mov    $0xffffffff,%eax
ret
mov    %rdx,%r8
mov    %esi,%edx
mov    $0x1,%esi
mov    $0xa,%ecx
jmp    1030 <ig_indirect_table_set@plt>

LLVM IR (-O0):
define i32 @ig_prc_lut_table_set(i32 %0, i32 %1, i32* %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32*
store i32 %0, i32* %5
store i32 %1, i32* %6
store i32* %2, i32** %7
%8 = load i32, i32* %6
%9 = icmp ult i32 %8, 0
br i1 %9, label %13, label %10
10: ; preds = %3
%11 = load i32, i32* %6
%12 = icmp ugt i32 %11, 47
br i1 %12, label %13, label %14
13: ; preds = %10, %3
store i32 -1, i32* %4
br label %19
14: ; preds = %10
%15 = load i32, i32* %5
%16 = load i32, i32* %6
%17 = load i32*, i32** %7
%18 = call i32 @ig_indirect_table_set(i32 %15, i32 1, i32 %16, i32 10, i32* %17)
store i32 %18, i32* %4
br label %19
19: ; preds = %14, %13
%20 = load i32, i32* %4
ret i32 %20
}

LLVM IR (-O2):
define i32 @ig_prc_lut_table_set(i32 %0, i32 %1, i32* %2) {
%4 = icmp ugt i32 %1, 47
br i1 %4, label %7, label %5
5: ; preds = %3
%6 = tail call i32 @ig_indirect_table_set(i32 %0, i32 1, i32 %1, i32 10, i32* %2)
br label %7
7: ; preds = %3, %5
%8 = phi i32 [ %6, %5 ], [ -1, %3 ]
ret i32 %8
}
/* Type definitions */
typedef int /*<<< orphan*/ va_list;
typedef int /*<<< orphan*/ buf;

/* Variables and functions */
int /*<<< orphan*/ Tvba(char *);
int /*<<< orphan*/ assert(int);
int /*<<< orphan*/ vsnprintf(char *, int, char const *, int /*<<< orphan*/);
void Tvbvf(const char *fmt, va_list al) {
  char buf[1000];
  buf[sizeof(buf) - 2] = '\t';
  vsnprintf(buf, sizeof(buf), fmt, al);
  assert(buf[sizeof(buf) - 2] == '\t');
  Tvba(buf);
}


x86 assembly (clang, -O0):
<Tvbvf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x400,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movb   $0x9,-0x1a(%rbp)
lea    -0x400(%rbp),%rdi
mov    -0x8(%rbp),%rdx
mov    -0xc(%rbp),%ecx
mov    $0x3e8,%esi
call   1030 <vsnprintf@plt>
movsbl -0x1a(%rbp),%eax
cmp    $0x9,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1050 <assert@plt>
lea    -0x400(%rbp),%rdi
call   1040 <Tvba@plt>
add    $0x400,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Tvbvf>:
push   %rbx
sub    $0x3f0,%rsp
mov    %esi,%ecx
mov    %rdi,%rdx
movb   $0x9,0x3e6(%rsp)
09
mov    %rsp,%rbx
mov    %rbx,%rdi
mov    $0x3e8,%esi
call   1030 <vsnprintf@plt>
xor    %edi,%edi
cmpb   $0x9,0x3e6(%rsp)
09
sete   %dil
call   1050 <assert@plt>
mov    %rbx,%rdi
call   1040 <Tvba@plt>
add    $0x3f0,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define void @Tvbvf(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
%5 = alloca [1000 x i8]
store i8* %0, i8** %3
store i32 %1, i32* %4
%6 = getelementptr inbounds [1000 x i8], [1000 x i8]* %5, i64 0, i64 998
store i8 9, i8* %6
%7 = getelementptr inbounds [1000 x i8], [1000 x i8]* %5, i64 0, i64 0
%8 = load i8*, i8** %3
%9 = load i32, i32* %4
%10 = call i32 @vsnprintf(i8* %7, i32 1000, i8* %8, i32 %9)
%11 = getelementptr inbounds [1000 x i8], [1000 x i8]* %5, i64 0, i64 998
%12 = load i8, i8* %11
%13 = sext i8 %12 to i32
%14 = icmp eq i32 %13, 9
%15 = zext i1 %14 to i32
%16 = call i32 @assert(i32 %15)
%17 = getelementptr inbounds [1000 x i8], [1000 x i8]* %5, i64 0, i64 0
%18 = call i32 @Tvba(i8* %17)
ret void
}

LLVM IR (-O2):
define void @Tvbvf(i8* nocapture %0, i32 %1) {
%3 = alloca [1000 x i8]
%4 = getelementptr inbounds [1000 x i8], [1000 x i8]* %3, i64 0, i64 0
%5 = getelementptr inbounds [1000 x i8], [1000 x i8]* %3, i64 0, i64 998
store i8 9, i8* %5
%6 = call i32 @vsnprintf(i8* %4, i32 1000, i8* %0, i32 %1)
%7 = load i8, i8* %5
%8 = icmp eq i8 %7, 9
%9 = zext i1 %8 to i32
%10 = tail call i32 @assert(i32 %9)
%11 = call i32 @Tvba(i8* %4)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
main() { exit(0); }


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
xor    %edi,%edi
call   1030 <exit@plt>

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @exit(i32 0)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ _usage_error();
char *strchr(char *, char);
char *_split_group_from_user(char *user_group) {
  char *group = strchr(user_group, ':');
  if (NULL == group) {
    _usage_error();
  }
  *group++ = '\0';
  return group;
}


x86 assembly (clang, -O0):
<_split_group_from_user>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x3a,%esi
call   1030 <strchr@plt>
mov    %rax,-0x10(%rbp)
xor    %eax,%eax
cmp    -0x10(%rbp),%rax
jne    1151 <_split_group_from_user+0x31>
mov    $0x0,%al
call   1040 <_usage_error@plt>
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x10(%rbp)
movb   $0x0,(%rax)
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_split_group_from_user>:
push   %rbx
mov    $0x3a,%esi
call   1030 <strchr@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    113a <_split_group_from_user+0x1a>
xor    %eax,%eax
call   1040 <_usage_error@plt>
mov    %rbx,%rax
add    $0x1,%rax
movb   $0x0,(%rbx)
pop    %rbx
ret

LLVM IR (-O0):
define i8* @_split_group_from_user(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i8* @strchr(i8* %4, i8 signext 58)
store i8* %5, i8** %3
%6 = load i8*, i8** %3
%7 = icmp eq i8* null, %6
br i1 %7, label %8, label %10
8: ; preds = %1
%9 = call i32 (...) @_usage_error()
br label %10
10: ; preds = %8, %1
%11 = load i8*, i8** %3
%12 = getelementptr inbounds i8, i8* %11, i32 1
store i8* %12, i8** %3
store i8 0, i8* %11
%13 = load i8*, i8** %3
ret i8* %13
}

LLVM IR (-O2):
define i8* @_split_group_from_user(i8* %0) {
%2 = tail call i8* @strchr(i8* dereferenceable(1) %0, i8 signext 58)
%3 = icmp eq i8* %2, null
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i32 (...) @_usage_error()
br label %6
6: ; preds = %4, %1
%7 = getelementptr inbounds i8, i8* %2, i64 1
store i8 0, i8* %2
ret i8* %7
}
/* Variables and functions */
int /*<<< orphan*/ comp();
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ relacional();
int main() {
  comp();
  printf("\n");
  relacional();
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1040 <comp@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
xor    %eax,%eax
call   1050 <relacional@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @comp()
%2 = tail call i32 @putchar(i32 10)
%3 = tail call i32 (...) @relacional()
ret i32 0
}
void hrtimer_peek_ahead_timers(void) {}


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

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

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

LLVM IR (-O2):
define void @hrtimer_peek_ahead_timers() {
ret void
}
/* Type definitions */
struct element {
  int dummy;
};

/* Variables and functions */
scalar_t__ calloc(int, int);
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *);
struct element **CreateHashTable(int size) {
  struct element **h =
      (struct element **)calloc(size, sizeof(struct element *));
  if (h == NULL) {
    printf("Error. Couldn't allocate memory!\n");
    exit(1);
  }
  return h;
}


x86 assembly (clang, -O0):
<CreateHashTable>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
mov    $0x8,%esi
call   1040 <calloc@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    116d <CreateHashTable+0x3d>
lea    0xea2(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1050 <exit@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<CreateHashTable>:
push   %rax
mov    $0x8,%esi
call   1040 <calloc@plt>
test   %rax,%rax
je     1142 <CreateHashTable+0x12>
pop    %rcx
ret
lea    0xeb7(%rip),%rdi
call   1030 <puts@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
%struct.element = type { i32 }
@.str = [34 x i8] c"Error. Couldn't allocate memory!\0A\00"
define %struct.element** @CreateHashTable(i32 %0) {
%2 = alloca i32
%3 = alloca %struct.element**
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = call i64 @calloc(i32 %4, i32 8)
%6 = inttoptr i64 %5 to %struct.element**
store %struct.element** %6, %struct.element*** %3
%7 = load %struct.element**, %struct.element*** %3
%8 = icmp eq %struct.element** %7, null
br i1 %8, label %9, label %12
9: ; preds = %1
%10 = call i32 @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0))
%11 = call i32 @exit(i32 1)
unreachable
12: ; preds = %1
%13 = load %struct.element**, %struct.element*** %3
ret %struct.element** %13
}

LLVM IR (-O2):
%struct.element = type { i32 }
@str = [33 x i8] c"Error. Couldn't allocate memory!\00"
define %struct.element** @CreateHashTable(i32 %0) {
%2 = tail call i64 @calloc(i32 %0, i32 8)
%3 = icmp eq i64 %2, 0
br i1 %3, label %4, label %7
4: ; preds = %1
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([33 x i8], [33 x i8]* @str, i64 0, i64 0))
%6 = tail call i32 @exit(i32 1)
unreachable
7: ; preds = %1
%8 = inttoptr i64 %2 to %struct.element**
ret %struct.element** %8
}
/* Variables and functions */
int /*<<< orphan*/ mgetline(char *, int);
double myatof(char *);
int /*<<< orphan*/ printf(char *, double);
int main(void) {
  char str[100];
  double num;
  mgetline(str, 100);
  num = myatof(str);
  printf("%f", num);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x80,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x70(%rbp),%rdi
mov    $0x64,%esi
call   1050 <mgetline@plt>
lea    -0x70(%rbp),%rdi
call   1040 <myatof@plt>
movsd  %xmm0,-0x78(%rbp)
movsd  -0x78(%rbp),%xmm0
lea    0xe96(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x80,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x70,%rsp
mov    %rsp,%rbx
mov    %rbx,%rdi
mov    $0x64,%esi
call   1050 <mgetline@plt>
mov    %rbx,%rdi
call   1040 <myatof@plt>
lea    0xeac(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x70,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%f\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [100 x i8]
%3 = alloca double
store i32 0, i32* %1
%4 = getelementptr inbounds [100 x i8], [100 x i8]* %2, i64 0, i64 0
%5 = call i32 @mgetline(i8* %4, i32 100)
%6 = getelementptr inbounds [100 x i8], [100 x i8]* %2, i64 0, i64 0
%7 = call double @myatof(i8* %6)
store double %7, double* %3
%8 = load double, double* %3
%9 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), double %8)
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%f\00"
define i32 @main() {
%1 = alloca [100 x i8]
%2 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 0, i64 0
%3 = call i32 @mgetline(i8* %2, i32 100)
%4 = call double @myatof(i8* %2)
%5 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), double %4)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ event_error(char *);
void event_stop_extended_overlay() {
  event_error("extended overlay not implemented in abc2abc");
}


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

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

LLVM IR (-O0):
@.str = [44 x i8] c"extended overlay not implemented in abc2abc\00"
define void @event_stop_extended_overlay() {
%1 = call i32 @event_error(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [44 x i8] c"extended overlay not implemented in abc2abc\00"
define void @event_stop_extended_overlay() {
%1 = tail call i32 @event_error(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ int16_t;

/* Variables and functions */
int __int16_t_encoded_array_size(const int16_t *p, int elements) {
  return sizeof(int16_t) * elements;
}


x86 assembly (clang, -O0):
<__int16_t_encoded_array_size>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movslq -0xc(%rbp),%rax
shl    $0x2,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<__int16_t_encoded_array_size>:
lea    0x0(,%rsi,4),%eax
ret

LLVM IR (-O0):
define i32 @__int16_t_encoded_array_size(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 = sext i32 %5 to i64
%7 = mul i64 4, %6
%8 = trunc i64 %7 to i32
ret i32 %8
}

LLVM IR (-O2):
define i32 @__int16_t_encoded_array_size(i32* nocapture readnone %0, i32 %1) {
%3 = shl i32 %1, 2
ret i32 %3
}
/* Type definitions */
struct dirent {
  int /*<<< orphan*/ d_name;
};

/* Variables and functions */
scalar_t__ strcmp(int /*<<< orphan*/, char *);
int only_readme(const struct dirent *entry) {
  int pass;
  if (strcmp(entry->d_name, "README.txt") == 0) {
    pass = 1;
  } else {
    pass = 0;
  }
  return pass;
}


x86 assembly (clang, -O0):
<only_readme>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%edi
lea    0xed7(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%rax
jne    1144 <only_readme+0x34>
movl   $0x1,-0xc(%rbp)
jmp    114b <only_readme+0x3b>
movl   $0x0,-0xc(%rbp)
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<only_readme>:
push   %rax
mov    (%rdi),%edi
lea    0xee6(%rip),%rsi
call   1030 <strcmp@plt>
xor    %ecx,%ecx
test   %rax,%rax
sete   %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.dirent = type { i32 }
@.str = [11 x i8] c"README.txt\00"
define i32 @only_readme(%struct.dirent* %0) {
%2 = alloca %struct.dirent*
%3 = alloca i32
store %struct.dirent* %0, %struct.dirent** %2
%4 = load %struct.dirent*, %struct.dirent** %2
%5 = getelementptr inbounds %struct.dirent, %struct.dirent* %4, i32 0, i32 0
%6 = load i32, i32* %5
%7 = call i64 @strcmp(i32 %6, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
%8 = icmp eq i64 %7, 0
br i1 %8, label %9, label %10
9: ; preds = %1
store i32 1, i32* %3
br label %11
10: ; preds = %1
store i32 0, i32* %3
br label %11
11: ; preds = %10, %9
%12 = load i32, i32* %3
ret i32 %12
}

LLVM IR (-O2):
%struct.dirent = type { i32 }
@.str = [11 x i8] c"README.txt\00"
define i32 @only_readme(%struct.dirent* nocapture %0) {
%2 = getelementptr inbounds %struct.dirent, %struct.dirent* %0, i64 0, i32 0
%3 = load i32, i32* %2
%4 = tail call i64 @strcmp(i32 %3, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
%5 = icmp eq i64 %4, 0
%6 = zext i1 %5 to i32
ret i32 %6
}