xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ application_init();
int /*<<< orphan*/ board_init();
int /*<<< orphan*/ rt_system_scheduler_init();
int /*<<< orphan*/ rt_system_scheduler_start();
int /*<<< orphan*/ rt_system_timer_init();
int /*<<< orphan*/ rt_thread_idle_init();
int /*<<< orphan*/ show_version();
int main() {
  board_init();
  show_version();
  rt_system_timer_init();
  rt_system_scheduler_init();
  application_init();
  rt_thread_idle_init();
  rt_system_scheduler_start();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1070 <board_init@plt>
mov    $0x0,%al
call   1030 <show_version@plt>
mov    $0x0,%al
call   1060 <rt_system_timer_init@plt>
mov    $0x0,%al
call   1080 <rt_system_scheduler_init@plt>
mov    $0x0,%al
call   1050 <application_init@plt>
mov    $0x0,%al
call   1090 <rt_thread_idle_init@plt>
mov    $0x0,%al
call   1040 <rt_system_scheduler_start@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1070 <board_init@plt>
xor    %eax,%eax
call   1030 <show_version@plt>
xor    %eax,%eax
call   1060 <rt_system_timer_init@plt>
xor    %eax,%eax
call   1080 <rt_system_scheduler_init@plt>
xor    %eax,%eax
call   1050 <application_init@plt>
xor    %eax,%eax
call   1090 <rt_thread_idle_init@plt>
xor    %eax,%eax
call   1040 <rt_system_scheduler_start@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @board_init()
%3 = call i32 (...) @show_version()
%4 = call i32 (...) @rt_system_timer_init()
%5 = call i32 (...) @rt_system_scheduler_init()
%6 = call i32 (...) @application_init()
%7 = call i32 (...) @rt_thread_idle_init()
%8 = call i32 (...) @rt_system_scheduler_start()
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @board_init()
%2 = tail call i32 (...) @show_version()
%3 = tail call i32 (...) @rt_system_timer_init()
%4 = tail call i32 (...) @rt_system_scheduler_init()
%5 = tail call i32 (...) @application_init()
%6 = tail call i32 (...) @rt_thread_idle_init()
%7 = tail call i32 (...) @rt_system_scheduler_start()
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
long setvbuf(int /*<<< orphan*/ *, int /*<<< orphan*/ *, long, long);
long file___NativeFile_set_buffering_type___impl(FILE *self, long buf_length,
                                                 long mode) {
  return setvbuf(self, NULL, mode, buf_length);
}


x86 assembly (clang, -O0):
<file___NativeFile_set_buffering_type___impl>:
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    -0x18(%rbp),%rdx
mov    -0x10(%rbp),%rcx
xor    %eax,%eax
mov    %eax,%esi
call   1030 <setvbuf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<file___NativeFile_set_buffering_type___impl>:
mov    %rsi,%rcx
xor    %esi,%esi
jmp    1030 <setvbuf@plt>

LLVM IR (-O0):
define i64 @file___NativeFile_set_buffering_type___impl(i32* %0, i64 %1, i64 %2) {
%4 = alloca i32*
%5 = alloca i64
%6 = alloca i64
store i32* %0, i32** %4
store i64 %1, i64* %5
store i64 %2, i64* %6
%7 = load i32*, i32** %4
%8 = load i64, i64* %6
%9 = load i64, i64* %5
%10 = call i64 @setvbuf(i32* %7, i32* null, i64 %8, i64 %9)
ret i64 %10
}

LLVM IR (-O2):
define i64 @file___NativeFile_set_buffering_type___impl(i32* nocapture %0, i64 %1, i64 %2) {
%4 = tail call i64 @setvbuf(i32* %0, i32* null, i64 %2, i64 %1)
ret i64 %4
}
/* Variables and functions */
size_t st_lngsize(const void *k) { return sizeof(long); }


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

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

LLVM IR (-O0):
define i64 @st_lngsize(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
ret i64 8
}

LLVM IR (-O2):
define i64 @st_lngsize(i8* nocapture readnone %0) {
ret i64 8
}
/* Type definitions */
typedef int /*<<< orphan*/ va_list;
struct obstack {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ obstack_grow(struct obstack *, char *, int);
int vasprintf(char **, char const *, int /*<<< orphan*/);
int obstack_vprintf(struct obstack *obstack, const char *format, va_list args) {
  int n;
  char *s;
  n = vasprintf(&s, format, args);
  obstack_grow(obstack, s, n);
  return n;
}


x86 assembly (clang, -O0):
<obstack_vprintf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
lea    -0x20(%rbp),%rdi
call   1030 <vasprintf@plt>
mov    %eax,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x20(%rbp),%rsi
mov    -0x18(%rbp),%edx
call   1040 <obstack_grow@plt>
mov    -0x18(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<obstack_vprintf>:
push   %rbp
push   %rbx
push   %rax
mov    %rdi,%rbx
mov    %rsp,%rdi
call   1030 <vasprintf@plt>
mov    %eax,%ebp
mov    (%rsp),%rsi
mov    %rbx,%rdi
mov    %eax,%edx
call   1040 <obstack_grow@plt>
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
%struct.obstack = type { i32 }
define i32 @obstack_vprintf(%struct.obstack* %0, i8* %1, i32 %2) {
%4 = alloca %struct.obstack*
%5 = alloca i8*
%6 = alloca i32
%7 = alloca i32
%8 = alloca i8*
store %struct.obstack* %0, %struct.obstack** %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%9 = load i8*, i8** %5
%10 = load i32, i32* %6
%11 = call i32 @vasprintf(i8** %8, i8* %9, i32 %10)
store i32 %11, i32* %7
%12 = load %struct.obstack*, %struct.obstack** %4
%13 = load i8*, i8** %8
%14 = load i32, i32* %7
%15 = call i32 @obstack_grow(%struct.obstack* %12, i8* %13, i32 %14)
%16 = load i32, i32* %7
ret i32 %16
}

LLVM IR (-O2):
%struct.obstack = type { i32 }
define i32 @obstack_vprintf(%struct.obstack* %0, i8* %1, i32 %2) {
%4 = alloca i8*
%5 = bitcast i8** %4 to i8*
%6 = call i32 @vasprintf(i8** %4, i8* %1, i32 %2)
%7 = load i8*, i8** %4
%8 = call i32 @obstack_grow(%struct.obstack* %0, i8* %7, i32 %6)
ret i32 %6
}
/* Type definitions */
typedef int /*<<< orphan*/ pthread_mutexattr_t;

/* Variables and functions */
int /*<<< orphan*/ assert(int /*<<< orphan*/);
int pthread_mutexattr_getprioceiling(const pthread_mutexattr_t *a, int *b) {
  assert(0);
}


x86 assembly (clang, -O0):
<pthread_mutexattr_getprioceiling>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
xor    %edi,%edi
call   1030 <assert@plt>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @pthread_mutexattr_getprioceiling(i32* %0, i32* %1) {
%3 = alloca i32
%4 = alloca i32*
%5 = alloca i32*
store i32* %0, i32** %4
store i32* %1, i32** %5
%6 = call i32 @assert(i32 0)
%7 = load i32, i32* %3
ret i32 %7
}

LLVM IR (-O2):
define i32 @pthread_mutexattr_getprioceiling(i32* nocapture readnone %0, i32* nocapture readnone %1) {
%3 = tail call i32 @assert(i32 0)
ret i32 undef
}
/* Variables and functions */
int sscanf(char const *, char *, double *);
int iupStrToDoubleDef(const char *str, double *d, double def) {
  if (!str) {
    *d = def;
    return 1;
  }
  if (sscanf(str, "%lf", d) != 1)
    return 0;
  return 1;
}


x86 assembly (clang, -O0):
<iupStrToDoubleDef>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
movsd  %xmm0,-0x20(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1149 <iupStrToDoubleDef+0x39>
movsd  -0x20(%rbp),%xmm0
mov    -0x18(%rbp),%rax
movsd  %xmm0,(%rax)
movl   $0x1,-0x4(%rbp)
jmp    1179 <iupStrToDoubleDef+0x69>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rdx
lea    0xea8(%rip),%rsi
call   1030 <sscanf@plt>
cmp    $0x1,%eax
je     1172 <iupStrToDoubleDef+0x62>
movl   $0x0,-0x4(%rbp)
jmp    1179 <iupStrToDoubleDef+0x69>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<iupStrToDoubleDef>:
push   %rax
mov    %rsi,%rdx
test   %rdi,%rdi
je     1131 <iupStrToDoubleDef+0x21>
lea    0xee0(%rip),%rsi
call   1030 <sscanf@plt>
mov    %eax,%ecx
xor    %eax,%eax
cmp    $0x1,%ecx
sete   %al
pop    %rcx
ret
movsd  %xmm0,(%rdx)
mov    $0x1,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%lf\00"
define i32 @iupStrToDoubleDef(i8* %0, double* %1, double %2) {
%4 = alloca i32
%5 = alloca i8*
%6 = alloca double*
%7 = alloca double
store i8* %0, i8** %5
store double* %1, double** %6
store double %2, double* %7
%8 = load i8*, i8** %5
%9 = icmp ne i8* %8, null
br i1 %9, label %13, label %10
10: ; preds = %3
%11 = load double, double* %7
%12 = load double*, double** %6
store double %11, double* %12
store i32 1, i32* %4
br label %20
13: ; preds = %3
%14 = load i8*, i8** %5
%15 = load double*, double** %6
%16 = call i32 @sscanf(i8* %14, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), double* %15)
%17 = icmp ne i32 %16, 1
br i1 %17, label %18, label %19
18: ; preds = %13
store i32 0, i32* %4
br label %20
19: ; preds = %13
store i32 1, i32* %4
br label %20
20: ; preds = %19, %18, %10
%21 = load i32, i32* %4
ret i32 %21
}

LLVM IR (-O2):
@.str = [4 x i8] c"%lf\00"
define i32 @iupStrToDoubleDef(i8* %0, double* %1, double %2) {
%4 = icmp eq i8* %0, null
br i1 %4, label %5, label %6
5: ; preds = %3
store double %2, double* %1
br label %10
6: ; preds = %3
%7 = tail call i32 @sscanf(i8* %0, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), double* %1)
%8 = icmp eq i32 %7, 1
%9 = zext i1 %8 to i32
br label %10
10: ; preds = %6, %5
%11 = phi i32 [ 1, %5 ], [ %9, %6 ]
ret i32 %11
}
/* Variables and functions */
char *strcpy(char *, char *);
char *libc_strcpy(char *dest, char *src) { return strcpy(dest, src); }


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

x86 assembly (clang, -O2):
<libc_strcpy>:
jmp    1030 <strcpy@plt>

LLVM IR (-O0):
define i8* @libc_strcpy(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 i8* @strcpy(i8* %5, i8* %6)
ret i8* %7
}

LLVM IR (-O2):
define i8* @libc_strcpy(i8* returned %0, i8* nocapture %1) {
%3 = tail call i8* @strcpy(i8* dereferenceable(1) %0, i8* dereferenceable(1) %1)
ret i8* %0
}
void ft_scrambler(int ***a, int *b, int *******c, int ****d) {
  ****c = a;
  d = ***c;
  b = ***d;
  **a = b;
}


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

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

LLVM IR (-O0):
define void @ft_scrambler(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 = load i32***, i32**** %5
%10 = load i32*******, i32******** %7
%11 = load i32******, i32******* %10
%12 = load i32*****, i32****** %11
%13 = load i32****, i32***** %12
store i32*** %9, i32**** %13
%14 = load i32*******, i32******** %7
%15 = load i32******, i32******* %14
%16 = load i32*****, i32****** %15
%17 = load i32****, i32***** %16
store i32**** %17, i32***** %8
%18 = load i32****, i32***** %8
%19 = load i32***, i32**** %18
%20 = load i32**, i32*** %19
%21 = load i32*, i32** %20
store i32* %21, i32** %6
%22 = load i32*, i32** %6
%23 = load i32***, i32**** %5
%24 = load i32**, i32*** %23
store i32* %22, i32** %24
ret void
}

LLVM IR (-O2):
define void @ft_scrambler(i32*** %0, i32* nocapture readnone %1, i32******* nocapture %2, i32**** nocapture readnone %3) {
%5 = load i32******, i32******* %2
%6 = load i32*****, i32****** %5
%7 = load i32****, i32***** %6
store i32*** %0, i32**** %7
%8 = load i32******, i32******* %2
%9 = load i32*****, i32****** %8
%10 = load i32****, i32***** %9
%11 = load i32***, i32**** %10
%12 = load i32**, i32*** %11
%13 = load i32*, i32** %12
%14 = load i32**, i32*** %0
store i32* %13, i32** %14
ret void
}
/* Variables and functions */
int /*<<< orphan*/ find_range(char *);
void find_range_small_test() {
  find_range("benchmarks"
             ".index.small");
}


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

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

LLVM IR (-O0):
@.str = [23 x i8] c"benchmarks.index.small\00"
define void @find_range_small_test() {
%1 = call i32 @find_range(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [23 x i8] c"benchmarks.index.small\00"
define void @find_range_small_test() {
%1 = tail call i32 @find_range(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ gmx_com(int, char **);
int main(int argc, char *argv[]) {
  gmx_com(argc, argv);
  return 0;
}


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

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

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = load i32, i32* %4
%7 = load i8**, i8*** %5
%8 = call i32 @gmx_com(i32 %6, i8** %7)
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** %1) {
%3 = tail call i32 @gmx_com(i32 %0, i8** %1)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ f(int *, int *, int *);
int main() {
  int *p1;
  if (p1 != NULL) {
    f(p1, p1, p1);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     113b <main+0x2b>
mov    -0x10(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x10(%rbp),%rdx
call   1030 <f@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
int mday_fn(const int time_var, const char *from, const char *to) {
  printf("%s %i %li %li\n", __FUNCTION__, time_var, (long)from, (long)to);
  return generic_fn(time_var, (long)from, (long)to, 1, 31);
}


x86 assembly (clang, -O0):
<mday_fn>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x4(%rbp),%edx
mov    -0x10(%rbp),%rcx
mov    -0x18(%rbp),%r8
lea    0xebb(%rip),%rdi
lea    0xec3(%rip),%rsi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    $0x1,%ecx
mov    $0x1f,%r8d
mov    $0x0,%al
call   1030 <generic_fn@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mday_fn>:
push   %rbp
push   %r14
push   %rbx
mov    %rdx,%r14
mov    %rsi,%rbx
mov    %edi,%ebp
lea    0xecd(%rip),%rdi
lea    0xed5(%rip),%rsi
mov    %ebp,%edx
mov    %rbx,%rcx
mov    %r14,%r8
xor    %eax,%eax
call   1040 <printf@plt>
mov    %ebp,%edi
mov    %rbx,%rsi
mov    %r14,%rdx
mov    $0x1,%ecx
mov    $0x1f,%r8d
xor    %eax,%eax
pop    %rbx
pop    %r14
pop    %rbp
jmp    1030 <generic_fn@plt>

LLVM IR (-O0):
@.str = [15 x i8] c"%s %i %li %li\0A\00"
@__FUNCTION__.mday_fn = [8 x i8] c"mday_fn\00"
define i32 @mday_fn(i32 %0, i8* %1, i8* %2) {
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i8*
store i32 %0, i32* %4
store i8* %1, i8** %5
store i8* %2, i8** %6
%7 = load i32, i32* %4
%8 = load i8*, i8** %5
%9 = ptrtoint i8* %8 to i64
%10 = load i8*, i8** %6
%11 = ptrtoint i8* %10 to i64
%12 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @__FUNCTION__.mday_fn, i64 0, i64 0), i32 %7, i64 %9, i64 %11)
%13 = load i32, i32* %4
%14 = load i8*, i8** %5
%15 = ptrtoint i8* %14 to i64
%16 = load i8*, i8** %6
%17 = ptrtoint i8* %16 to i64
%18 = call i32 (i32, i64, i64, i32, i32, ...) bitcast (i32 (...)* @generic_fn to i32 (i32, i64, i64, i32, i32, ...)*)(i32 %13, i64 %15, i64 %17, i32 1, i32 31)
ret i32 %18
}

LLVM IR (-O2):
@.str = [15 x i8] c"%s %i %li %li\0A\00"
@__FUNCTION__.mday_fn = [8 x i8] c"mday_fn\00"
define i32 @mday_fn(i32 %0, i8* %1, i8* %2) {
%4 = ptrtoint i8* %1 to i64
%5 = ptrtoint i8* %2 to i64
%6 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @__FUNCTION__.mday_fn, i64 0, i64 0), i32 %0, i64 %4, i64 %5)
%7 = tail call i32 (i32, i64, i64, i32, i32, ...) bitcast (i32 (...)* @generic_fn to i32 (i32, i64, i64, i32, i32, ...)*)(i32 %0, i64 %4, i64 %5, i32 1, i32 31)
ret i32 %7
}
/* Variables and functions */
scalar_t__ isPowerOfThree(int);
int /*<<< orphan*/ printf(char *, int);
void test(int n) {
  if (isPowerOfThree(n)) {
    printf("yes %d\n", n);
  } else {
    printf("no %d\n", n);
  }
}


x86 assembly (clang, -O0):
<test>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <isPowerOfThree@plt>
cmp    $0x0,%rax
je     1151 <test+0x31>
mov    -0x4(%rbp),%esi
lea    0xeb9(%rip),%rdi
call   1040 <printf@plt>
jmp    1160 <test+0x40>
mov    -0x4(%rbp),%esi
lea    0xead(%rip),%rdi
call   1040 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test>:
push   %rbx
mov    %edi,%ebx
call   1030 <isPowerOfThree@plt>
test   %rax,%rax
lea    0xed6(%rip),%rax
lea    0xec7(%rip),%rdi
cmove  %rax,%rdi
mov    %ebx,%esi
pop    %rbx
jmp    1040 <printf@plt>

LLVM IR (-O0):
@.str = [8 x i8] c"yes %d\0A\00"
@.str.1 = [7 x i8] c"no %d\0A\00"
define void @test(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i64 @isPowerOfThree(i32 %3)
%5 = icmp ne i64 %4, 0
br i1 %5, label %6, label %9
6: ; preds = %1
%7 = load i32, i32* %2
%8 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 %7)
br label %12
9: ; preds = %1
%10 = load i32, i32* %2
%11 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i32 %10)
br label %12
12: ; preds = %9, %6
ret void
}

LLVM IR (-O2):
@.str = [8 x i8] c"yes %d\0A\00"
@.str.1 = [7 x i8] c"no %d\0A\00"
define void @test(i32 %0) {
%2 = tail call i64 @isPowerOfThree(i32 %0)
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0)
%5 = tail call i32 @printf(i8* %4, i32 %0)
ret void
}
/* Variables and functions */
int fn_sq_ch_79_ch_98_ch_106_ch_101_ch_99_ch_116_ch_73_ch_110_ch_118_ch_101_ch_114_ch_115_ch_101_ch_79_ch_102(
    char const *);
int fn_al_sq_ch_79_ch_98_ch_106_ch_101_ch_99_ch_116_ch_73_ch_110_ch_118_ch_101_ch_114_ch_115_ch_101_ch_79_ch_102(
    const char *text) {
  int pos = 0;
  pos =
      fn_sq_ch_79_ch_98_ch_106_ch_101_ch_99_ch_116_ch_73_ch_110_ch_118_ch_101_ch_114_ch_115_ch_101_ch_79_ch_102(
          text);
  if (pos != -1)
    return pos;
  return -1;
}


x86 assembly (clang, -O0):
<fn_al_sq_ch_79_ch_98_ch_106_ch_101_ch_99_ch_116_ch_73_ch_110_ch_118_ch_101_ch_114_ch_115_ch_101_ch_79_ch_102>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <fn_sq_ch_79_ch_98_ch_106_ch_101_ch_99_ch_116_ch_73_ch_110_ch_118_ch_101_ch_114_ch_115_ch_101_ch_79_ch_102@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0xffffffff,-0x14(%rbp)
je     1144 <fn_al_sq_ch_79_ch_98_ch_106_ch_101_ch_99_ch_116_ch_73_ch_110_ch_118_ch_101_ch_114_ch_115_ch_101_ch_79_ch_102+0x34>
mov    -0x14(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    114b <fn_al_sq_ch_79_ch_98_ch_106_ch_101_ch_99_ch_116_ch_73_ch_110_ch_118_ch_101_ch_114_ch_115_ch_101_ch_79_ch_102+0x3b>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fn_al_sq_ch_79_ch_98_ch_106_ch_101_ch_99_ch_116_ch_73_ch_110_ch_118_ch_101_ch_114_ch_115_ch_101_ch_79_ch_102>:
jmp    1030 <fn_sq_ch_79_ch_98_ch_106_ch_101_ch_99_ch_116_ch_73_ch_110_ch_118_ch_101_ch_114_ch_115_ch_101_ch_79_ch_102@plt>

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

LLVM IR (-O2):
define i32 @fn_al_sq_ch_79_ch_98_ch_106_ch_101_ch_99_ch_116_ch_73_ch_110_ch_118_ch_101_ch_114_ch_115_ch_101_ch_79_ch_102(i8* %0) {
%2 = tail call i32 @fn_sq_ch_79_ch_98_ch_106_ch_101_ch_99_ch_116_ch_73_ch_110_ch_118_ch_101_ch_114_ch_115_ch_101_ch_79_ch_102(i8* %0)
ret i32 %2
}
unsigned Kit_CubeMask(int nVar) { return (~(unsigned)0) >> (32 - nVar); }


x86 assembly (clang, -O0):
<Kit_CubeMask>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    $0x20,%ecx
sub    -0x4(%rbp),%ecx
mov    $0xffffffff,%eax
shr    %cl,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<Kit_CubeMask>:
mov    %edi,%ecx
neg    %cl
mov    $0xffffffff,%eax
shr    %cl,%eax
ret

LLVM IR (-O0):
define i32 @Kit_CubeMask(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = sub nsw i32 32, %3
%5 = lshr i32 -1, %4
ret i32 %5
}

LLVM IR (-O2):
define i32 @Kit_CubeMask(i32 %0) {
%2 = sub nsw i32 32, %0
%3 = lshr i32 -1, %2
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ AltitudeHoldSettingsHandle();
int /*<<< orphan*/ UAVObjLogging(int /*<<< orphan*/);
void AltitudeHoldSettingsLogging() {
  UAVObjLogging(AltitudeHoldSettingsHandle());
}


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

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

LLVM IR (-O0):
define void @AltitudeHoldSettingsLogging() {
%1 = call i32 (...) @AltitudeHoldSettingsHandle()
%2 = call i32 @UAVObjLogging(i32 %1)
ret void
}

LLVM IR (-O2):
define void @AltitudeHoldSettingsLogging() {
%1 = tail call i32 (...) @AltitudeHoldSettingsHandle()
%2 = tail call i32 @UAVObjLogging(i32 %1)
ret void
}
int getIndex(int *list) { return list[0]; }


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

x86 assembly (clang, -O2):
<getIndex>:
mov    (%rdi),%eax
ret

LLVM IR (-O0):
define i32 @getIndex(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = getelementptr inbounds i32, i32* %3, i64 0
%5 = load i32, i32* %4
ret i32 %5
}

LLVM IR (-O2):
define i32 @getIndex(i32* nocapture %0) {
%2 = load i32, i32* %0
ret i32 %2
}
/* Variables and functions */
char *malloc(int);
int /*<<< orphan*/ sprintf(char *, char *, unsigned int, unsigned int);
char *UWAPI_Board_Regular2D_MakeMoveString(unsigned int from, unsigned int to) {
  char *str = malloc(1 + 1 + 10 + 1 + 10 + 1);
  if (str == NULL)
    return str;
  sprintf(str, "M_%d_%d", from, to);
  return str;
}


x86 assembly (clang, -O0):
<UWAPI_Board_Regular2D_MakeMoveString>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0xc(%rbp)
mov    %esi,-0x10(%rbp)
mov    $0x18,%edi
call   1030 <malloc@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    1154 <UWAPI_Board_Regular2D_MakeMoveString+0x34>
mov    -0x18(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    1172 <UWAPI_Board_Regular2D_MakeMoveString+0x52>
mov    -0x18(%rbp),%rdi
mov    -0xc(%rbp),%edx
mov    -0x10(%rbp),%ecx
lea    0xe9b(%rip),%rsi
call   1040 <sprintf@plt>
mov    -0x18(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<UWAPI_Board_Regular2D_MakeMoveString>:
push   %rbp
push   %r14
push   %rbx
mov    %esi,%r14d
mov    %edi,%ebp
mov    $0x18,%edi
call   1030 <malloc@plt>
mov    %rax,%rbx
test   %rax,%rax
je     114f <UWAPI_Board_Regular2D_MakeMoveString+0x2f>
lea    0xebe(%rip),%rsi
mov    %rbx,%rdi
mov    %ebp,%edx
mov    %r14d,%ecx
call   1040 <sprintf@plt>
mov    %rbx,%rax
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
@.str = [8 x i8] c"M_%d_%d\00"
define i8* @UWAPI_Board_Regular2D_MakeMoveString(i32 %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
%5 = alloca i32
%6 = alloca i8*
store i32 %0, i32* %4
store i32 %1, i32* %5
%7 = call i8* @malloc(i32 24)
store i8* %7, i8** %6
%8 = load i8*, i8** %6
%9 = icmp eq i8* %8, null
br i1 %9, label %10, label %12
10: ; preds = %2
%11 = load i8*, i8** %6
store i8* %11, i8** %3
br label %18
12: ; preds = %2
%13 = load i8*, i8** %6
%14 = load i32, i32* %4
%15 = load i32, i32* %5
%16 = call i32 @sprintf(i8* %13, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 %14, i32 %15)
%17 = load i8*, i8** %6
store i8* %17, i8** %3
br label %18
18: ; preds = %12, %10
%19 = load i8*, i8** %3
ret i8* %19
}

LLVM IR (-O2):
@.str = [8 x i8] c"M_%d_%d\00"
define noalias i8* @UWAPI_Board_Regular2D_MakeMoveString(i32 %0, i32 %1) {
%3 = tail call dereferenceable_or_null(24) i8* @malloc(i32 24)
%4 = icmp eq i8* %3, null
br i1 %4, label %7, label %5
5: ; preds = %2
%6 = tail call i32 @sprintf(i8* %3, i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 %0, i32 %1)
br label %7
7: ; preds = %2, %5
ret i8* %3
}
int main(void) {
  int a;
  int *b;
  a = *b;
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x8(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
unsigned xrop3_184_1_1(unsigned char s, unsigned char t) {
  unsigned D = 0x00ff;
  unsigned S = ((unsigned)s << 8) | s;
  unsigned T = ((unsigned)t << 8) | t;
  unsigned stk1;
  unsigned stk2;
  unsigned stk3;
  stk3 = D ^ T;
  stk2 = S & stk3;
  stk1 = T ^ stk2;
  return (stk1 & (~S) & (~T)) | (D & S) | (D & T);
}


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

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

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

LLVM IR (-O2):
define i32 @xrop3_184_1_1(i8 zeroext %0, i8 zeroext %1) {
%3 = or i8 %1, %0
%4 = zext i8 %3 to i32
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, float);
void floatfunc(float a) { printf("float: %f\n", a); }


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

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

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

LLVM IR (-O2):
@.str = [11 x i8] c"float: %f\0A\00"
define void @floatfunc(float %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), float %0)
ret void
}
void mdp4_primary_vsync_lcdc(void) {}


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

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

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

LLVM IR (-O2):
define void @mdp4_primary_vsync_lcdc() {
ret void
}
/* Type definitions */
struct timeval {
  scalar_t__ tv_usec;
  scalar_t__ tv_sec;
};
typedef int int64_t;

/* Variables and functions */
int /*<<< orphan*/ gettimeofday(struct timeval *, int /*<<< orphan*/ *);
double gettime(void) {
  struct timeval tv;
  gettimeofday(&tv, NULL);
  return (double)((int64_t)tv.tv_sec * 1000000 + tv.tv_usec) / 1000000.;
}


x86 assembly (clang, -O0):
<gettime>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    -0x10(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1030 <gettimeofday@plt>
mov    -0x8(%rbp),%rax
imul   $0xf4240,%eax,%eax
cltq
add    -0x10(%rbp),%rax
cvtsi2sd %rax,%xmm0
movsd  0xebe(%rip),%xmm1
divsd  %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gettime>:
sub    $0x18,%rsp
lea    0x8(%rsp),%rdi
xor    %esi,%esi
call   1030 <gettimeofday@plt>
movabs $0xf424000000000,%rax
imul   0x10(%rsp),%rax
sar    $0x20,%rax
add    0x8(%rsp),%rax
cvtsi2sd %rax,%xmm0
divsd  0xeba(%rip),%xmm0
add    $0x18,%rsp
ret

LLVM IR (-O0):
%struct.timeval = type { i64, i64 }
define double @gettime() {
%1 = alloca %struct.timeval
%2 = call i32 @gettimeofday(%struct.timeval* %1, i32* null)
%3 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i32 0, i32 1
%4 = load i64, i64* %3
%5 = trunc i64 %4 to i32
%6 = mul nsw i32 %5, 1000000
%7 = sext i32 %6 to i64
%8 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i32 0, i32 0
%9 = load i64, i64* %8
%10 = add nsw i64 %7, %9
%11 = sitofp i64 %10 to double
%12 = fdiv double %11, 1.000000e+06
ret double %12
}

LLVM IR (-O2):
%struct.timeval = type { i64, i64 }
define double @gettime() {
%1 = alloca %struct.timeval
%2 = bitcast %struct.timeval* %1 to i8*
%3 = call i32 @gettimeofday(%struct.timeval* %1, i32* null)
%4 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 1
%5 = load i64, i64* %4
%6 = mul i64 %5, 4294967296000000
%7 = ashr exact i64 %6, 32
%8 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 0
%9 = load i64, i64* %8
%10 = add nsw i64 %7, %9
%11 = sitofp i64 %10 to double
%12 = fdiv double %11, 1.000000e+06
ret double %12
}
void outb(int port, unsigned char value) {
  __asm__ __volatile__("outb %b0, %w1" : : "a"(value), "Nd"(port));
}


x86 assembly (clang, -O0):
<outb>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %edi,-0x4(%rbp)
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
mov    -0x4(%rbp),%edx
out    %al,(%dx)
pop    %rbp
ret

x86 assembly (clang, -O2):
<outb>:
mov    %esi,%eax
mov    %edi,%edx
out    %al,(%dx)
ret

LLVM IR (-O0):
define void @outb(i32 %0, i8 zeroext %1) {
%3 = alloca i32
%4 = alloca i8
store i32 %0, i32* %3
store i8 %1, i8* %4
%5 = load i8, i8* %4
%6 = load i32, i32* %3
ret void
}

LLVM IR (-O2):
define void @outb(i32 %0, i8 zeroext %1) {
tail call void asm sideeffect "outb ${0:b}, ${1:w}", "{ax},N{dx},~{dirflag},~{fpsr},~{flags}"(i8 %1, i32 %0)
ret void
}
/* Variables and functions */
scalar_t__ atoll(char *);
int /*<<< orphan*/ exit(int);
int main() {
  if (atoll("a") != 0) {
    exit(1);
  }
  if (atoll("") != 0) {
    exit(2);
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1030 <atoll@plt>
cmp    $0x0,%rax
je     1144 <main+0x24>
mov    $0x1,%edi
call   1040 <exit@plt>
lea    0xeb6(%rip),%rdi
call   1030 <atoll@plt>
cmp    $0x0,%rax
je     1164 <main+0x44>
mov    $0x2,%edi
call   1040 <exit@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <atoll@plt>
test   %rax,%rax
jne    1136 <main+0x16>
xor    %eax,%eax
pop    %rcx
ret
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [2 x i8] c"a\00"
@.str.1 = [1 x i8] zeroinitializer
define i32 @main() {
%1 = call i64 @atoll(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%2 = icmp ne i64 %1, 0
br i1 %2, label %3, label %5
3: ; preds = %0
%4 = call i32 @exit(i32 1)
unreachable
5: ; preds = %0
%6 = call i64 @atoll(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0))
%7 = icmp ne i64 %6, 0
br i1 %7, label %8, label %10
8: ; preds = %5
%9 = call i32 @exit(i32 2)
unreachable
10: ; preds = %5
ret i32 0
}

LLVM IR (-O2):
@.str = [2 x i8] c"a\00"
define i32 @main() {
%1 = tail call i64 @atoll(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%2 = icmp eq i64 %1, 0
br i1 %2, label %5, label %3
3: ; preds = %0
%4 = tail call i32 @exit(i32 1)
unreachable
5: ; preds = %0
ret i32 0
}
int compare(const void *a, const void *b) { return *(int *)a < *(int *)b; }


x86 assembly (clang, -O0):
<compare>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
mov    -0x10(%rbp),%rcx
cmp    (%rcx),%eax
setl   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<compare>:
mov    (%rdi),%ecx
xor    %eax,%eax
cmp    (%rsi),%ecx
setl   %al
ret

LLVM IR (-O0):
define i32 @compare(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 = bitcast i8* %5 to i32*
%7 = load i32, i32* %6
%8 = load i8*, i8** %4
%9 = bitcast i8* %8 to i32*
%10 = load i32, i32* %9
%11 = icmp slt i32 %7, %10
%12 = zext i1 %11 to i32
ret i32 %12
}

LLVM IR (-O2):
define i32 @compare(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i32*
%4 = load i32, i32* %3
%5 = bitcast i8* %1 to i32*
%6 = load i32, i32* %5
%7 = icmp slt i32 %4, %6
%8 = zext i1 %7 to i32
ret i32 %8
}
void vdeFun_incref(void) {}


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

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

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

LLVM IR (-O2):
define void @vdeFun_incref() {
ret void
}
float d_sqrt(float number) {
  int i;
  float x, y;
  x = number * 0.5;
  y = number;
  i = *(int *)&y;
  i = 0x5f3759df - (i >> 1);
  y = *(float *)&i;
  x = y * (1.5 - (x * y * y));
  x = y * (1.5 - (x * y * y));
  return number * y;
}


x86 assembly (clang, -O0):
<d_sqrt>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xeee(%rip),%xmm1
mulsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0xc(%rbp)
movss  -0x4(%rbp),%xmm0
movss  %xmm0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%ecx
sar    $0x1,%ecx
mov    $0x5f3759df,%eax
sub    %ecx,%eax
mov    %eax,-0x8(%rbp)
movss  -0x8(%rbp),%xmm0
movss  %xmm0,-0x10(%rbp)
movss  -0x10(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movss  -0xc(%rbp),%xmm1
mulss  -0x10(%rbp),%xmm1
mulss  -0x10(%rbp),%xmm1
cvtss2sd %xmm1,%xmm2
movsd  0xe8b(%rip),%xmm1
subsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0xc(%rbp)
movss  -0x10(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movss  -0xc(%rbp),%xmm1
mulss  -0x10(%rbp),%xmm1
mulss  -0x10(%rbp),%xmm1
cvtss2sd %xmm1,%xmm2
movsd  0xe56(%rip),%xmm1
subsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0xc(%rbp)
movss  -0x4(%rbp),%xmm0
mulss  -0x10(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<d_sqrt>:
movd   %xmm0,%eax
sar    %eax
mov    $0x5f3759df,%ecx
sub    %eax,%ecx
movd   %ecx,%xmm1
mulss  %xmm1,%xmm0
ret

LLVM IR (-O0):
define float @d_sqrt(float %0) {
%2 = alloca float
%3 = alloca i32
%4 = alloca float
%5 = alloca float
store float %0, float* %2
%6 = load float, float* %2
%7 = fpext float %6 to double
%8 = fmul double %7, 5.000000e-01
%9 = fptrunc double %8 to float
store float %9, float* %4
%10 = load float, float* %2
store float %10, float* %5
%11 = bitcast float* %5 to i32*
%12 = load i32, i32* %11
store i32 %12, i32* %3
%13 = load i32, i32* %3
%14 = ashr i32 %13, 1
%15 = sub nsw i32 1597463007, %14
store i32 %15, i32* %3
%16 = bitcast i32* %3 to float*
%17 = load float, float* %16
store float %17, float* %5
%18 = load float, float* %5
%19 = fpext float %18 to double
%20 = load float, float* %4
%21 = load float, float* %5
%22 = fmul float %20, %21
%23 = load float, float* %5
%24 = fmul float %22, %23
%25 = fpext float %24 to double
%26 = fsub double 1.500000e+00, %25
%27 = fmul double %19, %26
%28 = fptrunc double %27 to float
store float %28, float* %4
%29 = load float, float* %5
%30 = fpext float %29 to double
%31 = load float, float* %4
%32 = load float, float* %5
%33 = fmul float %31, %32
%34 = load float, float* %5
%35 = fmul float %33, %34
%36 = fpext float %35 to double
%37 = fsub double 1.500000e+00, %36
%38 = fmul double %30, %37
%39 = fptrunc double %38 to float
store float %39, float* %4
%40 = load float, float* %2
%41 = load float, float* %5
%42 = fmul float %40, %41
ret float %42
}

LLVM IR (-O2):
define float @d_sqrt(float %0) {
%2 = bitcast float %0 to i32
%3 = ashr i32 %2, 1
%4 = sub nsw i32 1597463007, %3
%5 = bitcast i32 %4 to float
%6 = fmul float %5, %0
ret float %6
}
void *f_name(void *p_name, int a_name) {
  p_name++;
  0, ++p_name;
  return p_name += a_name;
}


x86 assembly (clang, -O0):
<f_name>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
mov    -0xc(%rbp),%ecx
mov    -0x8(%rbp),%rax
movslq %ecx,%rcx
add    %rcx,%rax
mov    %rax,-0x8(%rbp)
pop    %rbp
ret

x86 assembly (clang, -O2):
<f_name>:
movslq %esi,%rax
add    %rdi,%rax
add    $0x2,%rax
ret

LLVM IR (-O0):
define i8* @f_name(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i8*, i8** %3
%6 = getelementptr inbounds i8, i8* %5, i32 1
store i8* %6, i8** %3
%7 = load i8*, i8** %3
%8 = getelementptr inbounds i8, i8* %7, i32 1
store i8* %8, i8** %3
%9 = load i32, i32* %4
%10 = load i8*, i8** %3
%11 = sext i32 %9 to i64
%12 = getelementptr i8, i8* %10, i64 %11
store i8* %12, i8** %3
ret i8* %12
}

LLVM IR (-O2):
define i8* @f_name(i8* readnone %0, i32 %1) {
%3 = getelementptr inbounds i8, i8* %0, i64 2
%4 = sext i32 %1 to i64
%5 = getelementptr i8, i8* %3, i64 %4
ret i8* %5
}
/* Variables and functions */
int inp_emulate(int);
char TOSH_READ_UD_PIN() { return 0x01 & (inp_emulate(0x35) >> 1); }


x86 assembly (clang, -O0):
<TOSH_READ_UD_PIN>:
push   %rbp
mov    %rsp,%rbp
mov    $0x35,%edi
call   1030 <inp_emulate@plt>
sar    $0x1,%eax
and    $0x1,%eax
movsbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<TOSH_READ_UD_PIN>:
push   %rax
mov    $0x35,%edi
call   1030 <inp_emulate@plt>
shr    %al
and    $0x1,%al
pop    %rcx
ret

LLVM IR (-O0):
define signext i8 @TOSH_READ_UD_PIN() {
%1 = call i32 @inp_emulate(i32 53)
%2 = ashr i32 %1, 1
%3 = and i32 1, %2
%4 = trunc i32 %3 to i8
ret i8 %4
}

LLVM IR (-O2):
define signext i8 @TOSH_READ_UD_PIN() {
%1 = tail call i32 @inp_emulate(i32 53)
%2 = trunc i32 %1 to i8
%3 = lshr i8 %2, 1
%4 = and i8 %3, 1
ret i8 %4
}
/* Type definitions */
struct pollfd {
  int /*<<< orphan*/ fd;
};

/* Variables and functions */
int /*<<< orphan*/ close(int /*<<< orphan*/);
int /*<<< orphan*/ memset(struct pollfd *, int /*<<< orphan*/, int);
void rdb_gpio_release_poll_fd(struct pollfd *pfd) {
  close(pfd->fd);
  memset(pfd, 0, sizeof(struct pollfd));
}


x86 assembly (clang, -O0):
<rdb_gpio_release_poll_fd>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%edi
call   1040 <close@plt>
mov    -0x8(%rbp),%rdi
xor    %esi,%esi
mov    $0x4,%edx
call   1030 <memset@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rdb_gpio_release_poll_fd>:
push   %rbx
mov    %rdi,%rbx
mov    (%rdi),%edi
call   1040 <close@plt>
mov    %rbx,%rdi
xor    %esi,%esi
mov    $0x4,%edx
pop    %rbx
jmp    1030 <memset@plt>

LLVM IR (-O0):
%struct.pollfd = type { i32 }
define void @rdb_gpio_release_poll_fd(%struct.pollfd* %0) {
%2 = alloca %struct.pollfd*
store %struct.pollfd* %0, %struct.pollfd** %2
%3 = load %struct.pollfd*, %struct.pollfd** %2
%4 = getelementptr inbounds %struct.pollfd, %struct.pollfd* %3, i32 0, i32 0
%5 = load i32, i32* %4
%6 = call i32 @close(i32 %5)
%7 = load %struct.pollfd*, %struct.pollfd** %2
%8 = call i32 @memset(%struct.pollfd* %7, i32 0, i32 4)
ret void
}

LLVM IR (-O2):
%struct.pollfd = type { i32 }
define void @rdb_gpio_release_poll_fd(%struct.pollfd* %0) {
%2 = getelementptr inbounds %struct.pollfd, %struct.pollfd* %0, i64 0, i32 0
%3 = load i32, i32* %2
%4 = tail call i32 @close(i32 %3)
%5 = tail call i32 @memset(%struct.pollfd* %0, i32 0, i32 4)
ret void
}
/* Variables and functions */
scalar_t__ pmlstate_pack_objects();
int pml_pack_objects(void) { return (int)pmlstate_pack_objects(); }


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

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

LLVM IR (-O0):
define i32 @pml_pack_objects() {
%1 = call i64 (...) @pmlstate_pack_objects()
%2 = trunc i64 %1 to i32
ret i32 %2
}

LLVM IR (-O2):
define i32 @pml_pack_objects() {
%1 = tail call i64 (...) @pmlstate_pack_objects()
%2 = trunc i64 %1 to i32
ret i32 %2
}
/* Variables and functions */
unsigned int list_find(int /*<<< orphan*/ *, int /*<<< orphan*/ *,
                       int /*<<< orphan*/ *);
bool test_list_find_null_params(void) {
  bool pass = false;
  unsigned int res = list_find(NULL, NULL, NULL);
  if (res == 1) {
    pass = true;
  }
  return pass;
}


x86 assembly (clang, -O0):
<test_list_find_null_params>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
xor    %eax,%eax
mov    %eax,%edx
mov    %rdx,%rdi
mov    %rdx,%rsi
call   1030 <list_find@plt>
mov    %eax,-0x8(%rbp)
cmpl   $0x1,-0x8(%rbp)
jne    1142 <test_list_find_null_params+0x32>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_list_find_null_params>:
push   %rax
xor    %edi,%edi
xor    %esi,%esi
xor    %edx,%edx
call   1030 <list_find@plt>
xor    %ecx,%ecx
cmp    $0x1,%eax
sete   %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @test_list_find_null_params() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
%3 = call i32 @list_find(i32* null, i32* null, i32* null)
store i32 %3, i32* %2
%4 = load i32, i32* %2
%5 = icmp eq i32 %4, 1
br i1 %5, label %6, label %7
6: ; preds = %0
store i32 1, i32* %1
br label %7
7: ; preds = %6, %0
%8 = load i32, i32* %1
ret i32 %8
}

LLVM IR (-O2):
define i32 @test_list_find_null_params() {
%1 = tail call i32 @list_find(i32* null, i32* null, i32* null)
%2 = icmp eq i32 %1, 1
%3 = zext i1 %2 to i32
ret i32 %3
}