xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ getchar();
int /*<<< orphan*/ header();
int /*<<< orphan*/ txt_ctrd(char *, char);
void win_scr() {
  header();
  txt_ctrd("YOU WON !", '\n');
  txt_ctrd("Press a key to continue...", '\n');
  getchar();
}


x86 assembly (clang, -O0):
<win_scr>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <header@plt>
lea    0xebe(%rip),%rdi
mov    $0xa,%esi
call   1050 <txt_ctrd@plt>
lea    0xeb7(%rip),%rdi
mov    $0xa,%esi
call   1050 <txt_ctrd@plt>
mov    $0x0,%al
call   1040 <getchar@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<win_scr>:
push   %rax
xor    %eax,%eax
call   1030 <header@plt>
lea    0xec1(%rip),%rdi
mov    $0xa,%esi
call   1050 <txt_ctrd@plt>
lea    0xeba(%rip),%rdi
mov    $0xa,%esi
call   1050 <txt_ctrd@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <getchar@plt>

LLVM IR (-O0):
@.str = [10 x i8] c"YOU WON !\00"
@.str.1 = [27 x i8] c"Press a key to continue...\00"
define void @win_scr() {
%1 = call i32 (...) @header()
%2 = call i32 @txt_ctrd(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8 signext 10)
%3 = call i32 @txt_ctrd(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0), i8 signext 10)
%4 = call i32 (...) @getchar()
ret void
}

LLVM IR (-O2):
@.str = [10 x i8] c"YOU WON !\00"
@.str.1 = [27 x i8] c"Press a key to continue...\00"
define void @win_scr() {
%1 = tail call i32 (...) @header()
%2 = tail call i32 @txt_ctrd(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8 signext 10)
%3 = tail call i32 @txt_ctrd(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0), i8 signext 10)
%4 = tail call i32 (...) @getchar()
ret void
}
/* Variables and functions */
int ioctl(int const, int const, void *);
int wr_ioctl(const int d, const int request, void *argp) {
  return ioctl(d, request, argp);
}


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

x86 assembly (clang, -O2):
<wr_ioctl>:
jmp    1030 <ioctl@plt>

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

LLVM IR (-O2):
define i32 @wr_ioctl(i32 %0, i32 %1, i8* %2) {
%4 = tail call i32 @ioctl(i32 %0, i32 %1, i8* %2)
ret i32 %4
}
void entity_Init(void) {}


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

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

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

LLVM IR (-O2):
define void @entity_Init() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
void printUsage(char *commandName) {
  printf("Usage: %s [-t] -s [array size] -f [filling percentage]\n",
         commandName);
}


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

x86 assembly (clang, -O2):
<printUsage>:
mov    %rdi,%rsi
lea    0xee6(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [56 x i8] c"Usage: %s [-t] -s [array size] -f [filling percentage]\0A\00"
define void @printUsage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @printf(i8* getelementptr inbounds ([56 x i8], [56 x i8]* @.str, i64 0, i64 0), i8* %3)
ret void
}

LLVM IR (-O2):
@.str = [56 x i8] c"Usage: %s [-t] -s [array size] -f [filling percentage]\0A\00"
define void @printUsage(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([56 x i8], [56 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
void check_for_GL_errors(const char *calling_location) {}


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

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

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

LLVM IR (-O2):
define void @check_for_GL_errors(i8* nocapture %0) {
ret void
}
/* Variables and functions */
scalar_t__ printf(char *);
main() {
  if (printf("hello"))
    return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeda(%rip),%rdi
call   1030 <printf@plt>
cmp    $0x0,%rax
je     113c <main+0x2c>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [6 x i8] c"hello\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i64 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%3 = icmp ne i64 %2, 0
br i1 %3, label %4, label %5
4: ; preds = %0
store i32 0, i32* %1
br label %5
5: ; preds = %4, %0
%6 = load i32, i32* %1
ret i32 %6
}

LLVM IR (-O2):
@.str = [6 x i8] c"hello\00"
define i32 @main() {
%1 = tail call i64 @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int _ada_use_c2phc4c(int, int *, int *, double *, int /*<<< orphan*/);
int copy_quaddobl_Laurent_container_to_target_system(void) {
  int *a, *b, fail;
  double *c;
  fail = _ada_use_c2phc4c(782, a, b, c, 0);
  return fail;
}


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

x86 assembly (clang, -O2):
<copy_quaddobl_Laurent_container_to_target_system>:
mov    $0x30e,%edi
xor    %r8d,%r8d
jmp    1030 <_ada_use_c2phc4c@plt>

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

LLVM IR (-O2):
define i32 @copy_quaddobl_Laurent_container_to_target_system() {
%1 = tail call i32 @_ada_use_c2phc4c(i32 782, i32* undef, i32* undef, double* undef, i32 0)
ret i32 %1
}
/* Type definitions */
typedef int /*<<< orphan*/ wchar_t;
struct tm {
  int dummy;
};

/* Variables and functions */
int __infer_nondet_int();
size_t wcsftime(wchar_t *s, size_t maxsize, const wchar_t *format,
                const struct tm *timeptr) {
  int res;
  res = __infer_nondet_int();
  if (res < 0)
    while (1)
      ;
  return res;
}


x86 assembly (clang, -O0):
<wcsftime>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    $0x0,%al
call   1030 <__infer_nondet_int@plt>
mov    %eax,-0x24(%rbp)
cmpl   $0x0,-0x24(%rbp)
jge    1146 <wcsftime+0x36>
jmp    1141 <wcsftime+0x31>
jmp    1141 <wcsftime+0x31>
movslq -0x24(%rbp),%rax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<wcsftime>:
push   %rax
xor    %eax,%eax
call   1030 <__infer_nondet_int@plt>
test   %eax,%eax
js     1120 <wcsftime+0x10>
mov    %eax,%eax
pop    %rcx
ret
jmp    1120 <wcsftime+0x10>

LLVM IR (-O0):
%struct.tm = type { i32 }
define i64 @wcsftime(i32* %0, i64 %1, i32* %2, %struct.tm* %3) {
%5 = alloca i32*
%6 = alloca i64
%7 = alloca i32*
%8 = alloca %struct.tm*
%9 = alloca i32
store i32* %0, i32** %5
store i64 %1, i64* %6
store i32* %2, i32** %7
store %struct.tm* %3, %struct.tm** %8
%10 = call i32 (...) @__infer_nondet_int()
store i32 %10, i32* %9
%11 = load i32, i32* %9
%12 = icmp slt i32 %11, 0
br i1 %12, label %13, label %15
13: ; preds = %4
br label %14
14: ; preds = %13, %14
br label %14
15: ; preds = %4
%16 = load i32, i32* %9
%17 = sext i32 %16 to i64
ret i64 %17
}

LLVM IR (-O2):
%struct.tm = type { i32 }
define i64 @wcsftime(i32* nocapture readnone %0, i64 %1, i32* nocapture readnone %2, %struct.tm* nocapture readnone %3) {
%5 = tail call i32 (...) @__infer_nondet_int()
%6 = icmp slt i32 %5, 0
br i1 %6, label %7, label %8
7: ; preds = %4, %7
br label %7
8: ; preds = %4
%9 = zext i32 %5 to i64
ret i64 %9
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
int main() {
  printf("Course: EG1304A - Spring 2014 \n");
  printf("Name: Evelia Salinas \n");
  printf("Date Created: %d/%d/%d \n", 1, 28, 2014);
  printf("Assignment: Assignment05                        \n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeda(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xeec(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xef5(%rip),%rdi
mov    $0x1,%esi
mov    $0x1c,%edx
mov    $0x7de,%ecx
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xef1(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [32 x i8] c"Course: EG1304A - Spring 2014 \0A\00"
@.str.1 = [23 x i8] c"Name: Evelia Salinas \0A\00"
@.str.2 = [25 x i8] c"Date Created: %d/%d/%d \0A\00"
@.str.3 = [50 x i8] c"Assignment: Assignment05 \0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0))
%3 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.1, i64 0, i64 0))
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.2, i64 0, i64 0), i32 1, i32 28, i32 2014)
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str.3, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str.2 = [25 x i8] c"Date Created: %d/%d/%d \0A\00"
@str = [31 x i8] c"Course: EG1304A - Spring 2014 \00"
@str.4 = [22 x i8] c"Name: Evelia Salinas \00"
@str.5 = [49 x i8] c"Assignment: Assignment05 \00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([31 x i8], [31 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @str.4, i64 0, i64 0))
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @.str.2, i64 0, i64 0), i32 1, i32 28, i32 2014)
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([49 x i8], [49 x i8]* @str.5, i64 0, i64 0))
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ pthread_mutexattr_t;
typedef int /*<<< orphan*/ pthread_mutex_t;

/* Variables and functions */
int /*<<< orphan*/ *malloc(int);
int pthread_mutex_init(int /*<<< orphan*/ *, int /*<<< orphan*/ const *);
int my_pthread_mutex_init(pthread_mutex_t *__mutex,
                          __const pthread_mutexattr_t *__mutexattr) {
  pthread_mutex_t *realmutex = malloc(sizeof(pthread_mutex_t));
  *((int *)__mutex) = (int)realmutex;
  return pthread_mutex_init(realmutex, __mutexattr);
}


x86 assembly (clang, -O0):
<my_pthread_mutex_init>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x4,%edi
call   1030 <malloc@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    %eax,%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x18(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1040 <pthread_mutex_init@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<my_pthread_mutex_init>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
mov    $0x4,%edi
call   1030 <malloc@plt>
mov    %eax,(%rbx)
mov    %rax,%rdi
mov    %r14,%rsi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <pthread_mutex_init@plt>

LLVM IR (-O0):
define i32 @my_pthread_mutex_init(i32* %0, i32* %1) {
%3 = alloca i32*
%4 = alloca i32*
%5 = alloca i32*
store i32* %0, i32** %3
store i32* %1, i32** %4
%6 = call i32* @malloc(i32 4)
store i32* %6, i32** %5
%7 = load i32*, i32** %5
%8 = ptrtoint i32* %7 to i32
%9 = load i32*, i32** %3
store i32 %8, i32* %9
%10 = load i32*, i32** %5
%11 = load i32*, i32** %4
%12 = call i32 @pthread_mutex_init(i32* %10, i32* %11)
ret i32 %12
}

LLVM IR (-O2):
define i32 @my_pthread_mutex_init(i32* nocapture writeonly %0, i32* %1) {
%3 = tail call i32* @malloc(i32 4)
%4 = ptrtoint i32* %3 to i64
%5 = trunc i64 %4 to i32
store i32 %5, i32* %0
%6 = tail call i32 @pthread_mutex_init(i32* %3, i32* %1)
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char const *, int);
int xerbla_(const char *srname, int *info) {
  printf("** On entry to %6s, parameter number %2d had an illegal value\n",
         srname, *info);
  return 0;
}


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

x86 assembly (clang, -O2):
<xerbla_>:
push   %rax
mov    %rdi,%rax
mov    (%rsi),%edx
lea    0xee3(%rip),%rdi
mov    %rax,%rsi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [63 x i8] c"** On entry to %6s, parameter number %2d had an illegal value\0A\00"
define i32 @xerbla_(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 = load i32*, i32** %4
%7 = load i32, i32* %6
%8 = call i32 @printf(i8* getelementptr inbounds ([63 x i8], [63 x i8]* @.str, i64 0, i64 0), i8* %5, i32 %7)
ret i32 0
}

LLVM IR (-O2):
@.str = [63 x i8] c"** On entry to %6s, parameter number %2d had an illegal value\0A\00"
define i32 @xerbla_(i8* %0, i32* nocapture %1) {
%3 = load i32, i32* %1
%4 = tail call i32 @printf(i8* getelementptr inbounds ([63 x i8], [63 x i8]* @.str, i64 0, i64 0), i8* %0, i32 %3)
ret i32 0
}
int calc_taps(int dim_in, int dim_out) {
  int tmp;
  if (dim_out > dim_in) {
    return 4;
  }
  tmp = 4 * dim_in / dim_out;
  return tmp - (tmp & 1);
}


x86 assembly (clang, -O0):
<calc_taps>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x8(%rbp),%eax
jle    1122 <calc_taps+0x22>
movl   $0x4,-0x4(%rbp)
jmp    113d <calc_taps+0x3d>
mov    -0x8(%rbp),%eax
shl    $0x2,%eax
cltd
idivl  -0xc(%rbp)
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
mov    -0x10(%rbp),%ecx
and    $0x1,%ecx
sub    %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<calc_taps>:
mov    $0x4,%eax
cmp    %edi,%esi
jg     1114 <calc_taps+0x14>
shl    $0x2,%edi
mov    %edi,%eax
cltd
idiv   %esi
and    $0xfffffffe,%eax
ret

LLVM IR (-O0):
define i32 @calc_taps(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
%7 = load i32, i32* %5
%8 = load i32, i32* %4
%9 = icmp sgt i32 %7, %8
br i1 %9, label %10, label %11
10: ; preds = %2
store i32 4, i32* %3
br label %20
11: ; preds = %2
%12 = load i32, i32* %4
%13 = mul nsw i32 4, %12
%14 = load i32, i32* %5
%15 = sdiv i32 %13, %14
store i32 %15, i32* %6
%16 = load i32, i32* %6
%17 = load i32, i32* %6
%18 = and i32 %17, 1
%19 = sub nsw i32 %16, %18
store i32 %19, i32* %3
br label %20
20: ; preds = %11, %10
%21 = load i32, i32* %3
ret i32 %21
}

LLVM IR (-O2):
define i32 @calc_taps(i32 %0, i32 %1) {
%3 = icmp sgt i32 %1, %0
br i1 %3, label %8, label %4
4: ; preds = %2
%5 = shl nsw i32 %0, 2
%6 = sdiv i32 %5, %1
%7 = and i32 %6, -2
br label %8
8: ; preds = %2, %4
%9 = phi i32 [ %7, %4 ], [ 4, %2 ]
ret i32 %9
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  scalar_t__ send_event;
};
typedef TYPE_1__ XPointerMovedEvent;

/* Variables and functions */
int get_XPointerMovedEvent_send_event(void *_p) {
  return (int)((XPointerMovedEvent *)_p)->send_event;
}


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

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

LLVM IR (-O0):
%struct.TYPE_2__ = type { i64 }
define i32 @get_XPointerMovedEvent_send_event(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = bitcast i8* %3 to %struct.TYPE_2__*
%5 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %4, i32 0, i32 0
%6 = load i64, i64* %5
%7 = trunc i64 %6 to i32
ret i32 %7
}

LLVM IR (-O2):
define i32 @get_XPointerMovedEvent_send_event(i8* nocapture %0) {
%2 = bitcast i8* %0 to i64*
%3 = load i64, i64* %2
%4 = trunc i64 %3 to i32
ret i32 %4
}
int fun161() { return 161; }


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

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

LLVM IR (-O0):
define i32 @fun161() {
ret i32 161
}

LLVM IR (-O2):
define i32 @fun161() {
ret i32 161
}
/* Variables and functions */
int crc16(unsigned char *, unsigned int);
void modbus_crc_write(unsigned char *frame, unsigned int len) {
  do {
    *(frame + len) = (unsigned char)((crc16(frame, len)) & 0xff);
    *(frame + len + 1) = (unsigned char)(((crc16(frame, len)) >> 8) & 0xff);
  } while (0);
  ;
}


x86 assembly (clang, -O0):
<modbus_crc_write>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
call   1030 <crc16@plt>
and    $0xff,%eax
mov    %al,%dl
mov    -0x8(%rbp),%rax
mov    -0xc(%rbp),%ecx
mov    %dl,(%rax,%rcx,1)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
call   1030 <crc16@plt>
sar    $0x8,%eax
and    $0xff,%eax
mov    %al,%dl
mov    -0x8(%rbp),%rax
mov    -0xc(%rbp),%ecx
mov    %dl,0x1(%rax,%rcx,1)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<modbus_crc_write>:
push   %rbp
push   %r14
push   %rbx
mov    %esi,%ebp
mov    %rdi,%rbx
call   1030 <crc16@plt>
mov    %ebp,%ecx
mov    %al,(%rbx,%rcx,1)
mov    %rcx,%r14
mov    %rbx,%rdi
mov    %ebp,%esi
call   1030 <crc16@plt>
mov    %r14,%rcx
mov    %ah,0x1(%rbx,%rcx,1)
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
define void @modbus_crc_write(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
br label %5
5: ; preds = %2
%6 = load i8*, i8** %3
%7 = load i32, i32* %4
%8 = call i32 @crc16(i8* %6, i32 %7)
%9 = and i32 %8, 255
%10 = trunc i32 %9 to i8
%11 = load i8*, i8** %3
%12 = load i32, i32* %4
%13 = zext i32 %12 to i64
%14 = getelementptr inbounds i8, i8* %11, i64 %13
store i8 %10, i8* %14
%15 = load i8*, i8** %3
%16 = load i32, i32* %4
%17 = call i32 @crc16(i8* %15, i32 %16)
%18 = ashr i32 %17, 8
%19 = and i32 %18, 255
%20 = trunc i32 %19 to i8
%21 = load i8*, i8** %3
%22 = load i32, i32* %4
%23 = zext i32 %22 to i64
%24 = getelementptr inbounds i8, i8* %21, i64 %23
%25 = getelementptr inbounds i8, i8* %24, i64 1
store i8 %20, i8* %25
br label %26
26: ; preds = %5
ret void
}

LLVM IR (-O2):
define void @modbus_crc_write(i8* %0, i32 %1) {
%3 = tail call i32 @crc16(i8* %0, i32 %1)
%4 = trunc i32 %3 to i8
%5 = zext i32 %1 to i64
%6 = getelementptr inbounds i8, i8* %0, i64 %5
store i8 %4, i8* %6
%7 = tail call i32 @crc16(i8* %0, i32 %1)
%8 = lshr i32 %7, 8
%9 = trunc i32 %8 to i8
%10 = getelementptr inbounds i8, i8* %6, i64 1
store i8 %9, i8* %10
ret void
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
int /*<<< orphan*/ hide(char const *);
void hide_in_container(const char *path) {
  assert(path[0] == '/');
  hide(path + 1);
}


x86 assembly (clang, -O0):
<hide_in_container>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x2f,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
mov    -0x8(%rbp),%rdi
add    $0x1,%rdi
call   1030 <hide@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<hide_in_container>:
push   %rbx
mov    %rdi,%rbx
xor    %edi,%edi
cmpb   $0x2f,(%rbx)
sete   %dil
call   1040 <assert@plt>
add    $0x1,%rbx
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <hide@plt>

LLVM IR (-O0):
define void @hide_in_container(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = getelementptr inbounds i8, i8* %3, i64 0
%5 = load i8, i8* %4
%6 = sext i8 %5 to i32
%7 = icmp eq i32 %6, 47
%8 = zext i1 %7 to i32
%9 = call i32 @assert(i32 %8)
%10 = load i8*, i8** %2
%11 = getelementptr inbounds i8, i8* %10, i64 1
%12 = call i32 @hide(i8* %11)
ret void
}

LLVM IR (-O2):
define void @hide_in_container(i8* %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 47
%4 = zext i1 %3 to i32
%5 = tail call i32 @assert(i32 %4)
%6 = getelementptr inbounds i8, i8* %0, i64 1
%7 = tail call i32 @hide(i8* %6)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ sigset_t;

/* Variables and functions */
int SIGALRM;
int sigaddset(int /*<<< orphan*/ *, int);
int test(void) {
  sigset_t signal_set;
  int signal_number;
  int result;
  signal_number = SIGALRM;
  result = sigaddset(&signal_set, signal_number);
  return result;
}


x86 assembly (clang, -O0):
<test>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    0x2ec9(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%esi
lea    -0x4(%rbp),%rdi
call   1030 <sigaddset@plt>
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test>:
push   %rax
mov    0x2ed0(%rip),%rax
mov    (%rax),%esi
lea    0x4(%rsp),%rdi
call   1030 <sigaddset@plt>
pop    %rcx
ret

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

LLVM IR (-O2):
@SIGALRM = global i32 0
define i32 @test() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = load i32, i32* @SIGALRM
%4 = call i32 @sigaddset(i32* %1, i32 %3)
ret i32 %4
}
/* Type definitions */
struct dns_resolver {
  int dummy;
};
struct dns_res_frame {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ dns_res_frame_destroy(struct dns_resolver *,
                                         struct dns_res_frame *);
int /*<<< orphan*/ dns_res_frame_init(struct dns_resolver *,
                                      struct dns_res_frame *);
void dns_res_frame_reset(struct dns_resolver *R, struct dns_res_frame *frame) {
  dns_res_frame_destroy(R, frame);
  dns_res_frame_init(R, frame);
}


x86 assembly (clang, -O0):
<dns_res_frame_reset>:
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 <dns_res_frame_destroy@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1040 <dns_res_frame_init@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dns_res_frame_reset>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
call   1030 <dns_res_frame_destroy@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <dns_res_frame_init@plt>

LLVM IR (-O0):
%struct.dns_resolver = type { i32 }
%struct.dns_res_frame = type { i32 }
define void @dns_res_frame_reset(%struct.dns_resolver* %0, %struct.dns_res_frame* %1) {
%3 = alloca %struct.dns_resolver*
%4 = alloca %struct.dns_res_frame*
store %struct.dns_resolver* %0, %struct.dns_resolver** %3
store %struct.dns_res_frame* %1, %struct.dns_res_frame** %4
%5 = load %struct.dns_resolver*, %struct.dns_resolver** %3
%6 = load %struct.dns_res_frame*, %struct.dns_res_frame** %4
%7 = call i32 @dns_res_frame_destroy(%struct.dns_resolver* %5, %struct.dns_res_frame* %6)
%8 = load %struct.dns_resolver*, %struct.dns_resolver** %3
%9 = load %struct.dns_res_frame*, %struct.dns_res_frame** %4
%10 = call i32 @dns_res_frame_init(%struct.dns_resolver* %8, %struct.dns_res_frame* %9)
ret void
}

LLVM IR (-O2):
%struct.dns_resolver = type { i32 }
%struct.dns_res_frame = type { i32 }
define void @dns_res_frame_reset(%struct.dns_resolver* %0, %struct.dns_res_frame* %1) {
%3 = tail call i32 @dns_res_frame_destroy(%struct.dns_resolver* %0, %struct.dns_res_frame* %1)
%4 = tail call i32 @dns_res_frame_init(%struct.dns_resolver* %0, %struct.dns_res_frame* %1)
ret void
}
int compareTimeValue(double t1, double t2) {
  double diff;
  diff = t1 - t2;
  if (diff > 0.0001)
    return (1);
  if (diff < -0.0001)
    return (-1);
  return (0);
}


x86 assembly (clang, -O0):
<compareTimeValue>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x10(%rbp)
movsd  %xmm1,-0x18(%rbp)
movsd  -0x10(%rbp),%xmm0
subsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x20(%rbp),%xmm0
movsd  0xed6(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    1140 <compareTimeValue+0x40>
movl   $0x1,-0x4(%rbp)
jmp    1166 <compareTimeValue+0x66>
movsd  0xec0(%rip),%xmm0
ucomisd -0x20(%rbp),%xmm0
jbe    115f <compareTimeValue+0x5f>
movl   $0xffffffff,-0x4(%rbp)
jmp    1166 <compareTimeValue+0x66>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<compareTimeValue>:
subsd  %xmm1,%xmm0
movsd  0xef4(%rip),%xmm1
xor    %ecx,%ecx
ucomisd %xmm0,%xmm1
seta   %cl
neg    %ecx
ucomisd 0xee9(%rip),%xmm0
mov    $0x1,%eax
cmovbe %ecx,%eax
ret

LLVM IR (-O0):
define i32 @compareTimeValue(double %0, double %1) {
%3 = alloca i32
%4 = alloca double
%5 = alloca double
%6 = alloca double
store double %0, double* %4
store double %1, double* %5
%7 = load double, double* %4
%8 = load double, double* %5
%9 = fsub double %7, %8
store double %9, double* %6
%10 = load double, double* %6
%11 = fcmp ogt double %10, 1.000000e-04
br i1 %11, label %12, label %13
12: ; preds = %2
store i32 1, i32* %3
br label %18
13: ; preds = %2
%14 = load double, double* %6
%15 = fcmp olt double %14, -1.000000e-04
br i1 %15, label %16, label %17
16: ; preds = %13
store i32 -1, i32* %3
br label %18
17: ; preds = %13
store i32 0, i32* %3
br label %18
18: ; preds = %17, %16, %12
%19 = load i32, i32* %3
ret i32 %19
}

LLVM IR (-O2):
define i32 @compareTimeValue(double %0, double %1) {
%3 = fsub double %0, %1
%4 = fcmp ogt double %3, 1.000000e-04
%5 = fcmp olt double %3, -1.000000e-04
%6 = sext i1 %5 to i32
%7 = select i1 %4, i32 1, i32 %6
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
main() { printf("Mabuhay! Welcome to C programming.\n"); }


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

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

LLVM IR (-O0):
@.str = [36 x i8] c"Mabuhay! Welcome to C programming.\0A\00"
define i32 @main() {
%1 = call i32 @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [35 x i8] c"Mabuhay! Welcome to C programming.\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @str, i64 0, i64 0))
ret i32 0
}
void f(int i2, int L2, int a[20]) {}


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

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

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

LLVM IR (-O2):
define void @f(i32 %0, i32 %1, i32* nocapture %2) {
ret void
}
void arch_unmap(struct mm_struct *mm, struct vm_area_struct *vma,
                unsigned long start, unsigned long end) {}


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

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

LLVM IR (-O0):
%struct.mm_struct = type opaque
%struct.vm_area_struct = type opaque
define void @arch_unmap(%struct.mm_struct* %0, %struct.vm_area_struct* %1, i64 %2, i64 %3) {
%5 = alloca %struct.mm_struct*
%6 = alloca %struct.vm_area_struct*
%7 = alloca i64
%8 = alloca i64
store %struct.mm_struct* %0, %struct.mm_struct** %5
store %struct.vm_area_struct* %1, %struct.vm_area_struct** %6
store i64 %2, i64* %7
store i64 %3, i64* %8
ret void
}

LLVM IR (-O2):
%struct.mm_struct = type opaque
%struct.vm_area_struct = type opaque
define void @arch_unmap(%struct.mm_struct* nocapture %0, %struct.vm_area_struct* nocapture %1, i64 %2, i64 %3) {
ret void
}
int get_most_significant_byte(int x) { return (0xFF000000 & x); }


x86 assembly (clang, -O0):
<get_most_significant_byte>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
and    $0xff000000,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_most_significant_byte>:
mov    %edi,%eax
and    $0xff000000,%eax
ret

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

LLVM IR (-O2):
define i32 @get_most_significant_byte(i32 %0) {
%2 = and i32 %0, -16777216
ret i32 %2
}
/* Variables and functions */
size_t get_data_tag_in_Logon(size_t __tag) {
  (void)__tag;
  return 0;
}


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

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

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

LLVM IR (-O2):
define i64 @get_data_tag_in_Logon(i64 %0) {
ret i64 0
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int getpid();
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ wait_fence(int);
void process(int nbproc) {
  printf("[%d]: avant barriere\n", getpid());
  wait_fence(nbproc);
  printf("[%d]: apres barriere\n", getpid());
  exit(0);
}


x86 assembly (clang, -O0):
<process>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x0,%al
call   1030 <getpid@plt>
mov    %eax,%esi
lea    0xea5(%rip),%rdi
call   1040 <printf@plt>
mov    -0x4(%rbp),%edi
call   1050 <wait_fence@plt>
mov    $0x0,%al
call   1030 <getpid@plt>
mov    %eax,%esi
lea    0xe9e(%rip),%rdi
call   1040 <printf@plt>
xor    %edi,%edi
call   1060 <exit@plt>

x86 assembly (clang, -O2):
<process>:
push   %rbx
mov    %edi,%ebx
xor    %eax,%eax
call   1030 <getpid@plt>
lea    0xeaf(%rip),%rdi
mov    %eax,%esi
call   1040 <printf@plt>
mov    %ebx,%edi
call   1050 <wait_fence@plt>
xor    %eax,%eax
call   1030 <getpid@plt>
lea    0xea9(%rip),%rdi
mov    %eax,%esi
call   1040 <printf@plt>
xor    %edi,%edi
call   1060 <exit@plt>

LLVM IR (-O0):
@.str = [22 x i8] c"[%d]: avant barriere\0A\00"
@.str.1 = [22 x i8] c"[%d]: apres barriere\0A\00"
define void @process(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 (...) @getpid()
%4 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i32 %3)
%5 = load i32, i32* %2
%6 = call i32 @wait_fence(i32 %5)
%7 = call i32 (...) @getpid()
%8 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0), i32 %7)
%9 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@.str = [22 x i8] c"[%d]: avant barriere\0A\00"
@.str.1 = [22 x i8] c"[%d]: apres barriere\0A\00"
define void @process(i32 %0) {
%2 = tail call i32 (...) @getpid()
%3 = tail call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i32 %2)
%4 = tail call i32 @wait_fence(i32 %0)
%5 = tail call i32 (...) @getpid()
%6 = tail call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0), i32 %5)
%7 = tail call i32 @exit(i32 0)
unreachable
}
/* Variables and functions */
scalar_t__ strcmp(char *, char *);
void strcmp_constant_and_var_1() {
  char *x = "123";
  if (strcmp("123", x) != 0)
    (void)*(char *)0;
}


x86 assembly (clang, -O0):
<strcmp_constant_and_var_1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xee1(%rip),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xed2(%rip),%rdi
call   1030 <strcmp@plt>
cmp    $0x0,%rax
je     113d <strcmp_constant_and_var_1+0x2d>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strcmp_constant_and_var_1>:
lea    0xee9(%rip),%rdi
mov    %rdi,%rsi
jmp    1030 <strcmp@plt>

LLVM IR (-O0):
@.str = [4 x i8] c"123\00"
define void @strcmp_constant_and_var_1() {
%1 = alloca i8*
store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8** %1
%2 = load i8*, i8** %1
%3 = call i64 @strcmp(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %2)
%4 = icmp ne i64 %3, 0
br i1 %4, label %5, label %7
5: ; preds = %0
%6 = load i8, i8* null
br label %7
7: ; preds = %5, %0
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"123\00"
define void @strcmp_constant_and_var_1() {
%1 = tail call i64 @strcmp(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ print(char *);
int /*<<< orphan*/ printid(float *);
int main() {
  float a[2] = {2, 3};
  float r;
  r = a[1] /= a[0];
  print("a 2.000000 1.500000");
  printid(a);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    0xeca(%rip),%rax
mov    %rax,-0xc(%rbp)
movss  -0xc(%rbp),%xmm1
movss  -0x8(%rbp),%xmm0
divss  %xmm1,%xmm0
movss  %xmm0,-0x8(%rbp)
movss  %xmm0,-0x10(%rbp)
lea    0xeaf(%rip),%rdi
call   1030 <print@plt>
lea    -0xc(%rbp),%rdi
call   1040 <printid@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
movabs $0x4040000040000000,%rax
mov    %rax,(%rsp)
movl   $0x3fc00000,0x4(%rsp)
3f
lea    0xec2(%rip),%rdi
call   1030 <print@plt>
mov    %rsp,%rdi
call   1040 <printid@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@__const.main.a = [2 x float] [float 2.000000e+00, float 3.000000e+00]
@.str = [20 x i8] c"a 2.000000 1.500000\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [2 x float]
%3 = alloca float
store i32 0, i32* %1
%4 = bitcast [2 x float]* %2 to i8*
%5 = getelementptr inbounds [2 x float], [2 x float]* %2, i64 0, i64 0
%6 = load float, float* %5
%7 = getelementptr inbounds [2 x float], [2 x float]* %2, i64 0, i64 1
%8 = load float, float* %7
%9 = fdiv float %8, %6
store float %9, float* %7
store float %9, float* %3
%10 = call i32 @print(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
%11 = getelementptr inbounds [2 x float], [2 x float]* %2, i64 0, i64 0
%12 = call i32 @printid(float* %11)
ret i32 0
}

LLVM IR (-O2):
@.str = [20 x i8] c"a 2.000000 1.500000\00"
define i32 @main() {
%1 = alloca i64
%2 = bitcast i64* %1 to [2 x float]*
%3 = bitcast i64* %1 to i8*
store i64 4629700418010611712, i64* %1
%4 = bitcast i64* %1 to float*
%5 = getelementptr inbounds [2 x float], [2 x float]* %2, i64 0, i64 1
store float 1.500000e+00, float* %5
%6 = tail call i32 @print(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
%7 = call i32 @printid(float* %4)
ret i32 0
}
void ContactH36(double *CC, double *q, double *L, double *addl) {}


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

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

LLVM IR (-O0):
define void @ContactH36(double* %0, double* %1, double* %2, double* %3) {
%5 = alloca double*
%6 = alloca double*
%7 = alloca double*
%8 = alloca double*
store double* %0, double** %5
store double* %1, double** %6
store double* %2, double** %7
store double* %3, double** %8
ret void
}

LLVM IR (-O2):
define void @ContactH36(double* nocapture %0, double* nocapture %1, double* nocapture %2, double* nocapture %3) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ for1(int);
void op_for1s() { for1(1); }


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

x86 assembly (clang, -O2):
<op_for1s>:
mov    $0x1,%edi
jmp    1030 <for1@plt>

LLVM IR (-O0):
define void @op_for1s() {
%1 = call i32 @for1(i32 1)
ret void
}

LLVM IR (-O2):
define void @op_for1s() {
%1 = tail call i32 @for1(i32 1)
ret void
}
int star() {}


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

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

LLVM IR (-O0):
define i32 @star() {
%1 = alloca i32
%2 = load i32, i32* %1
ret i32 %2
}

LLVM IR (-O2):
define i32 @star() {
ret i32 undef
}
dysize(y) {
  if ((y % 4) == 0)
    return (366);
  return (365);
}


x86 assembly (clang, -O0):
<dysize>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    $0x4,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    1127 <dysize+0x27>
movl   $0x16e,-0x4(%rbp)
jmp    112e <dysize+0x2e>
movl   $0x16d,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<dysize>:
and    $0x3,%edi
cmp    $0x1,%edi
mov    $0x16d,%eax
adc    $0x0,%eax
ret

LLVM IR (-O0):
define i32 @dysize(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = srem i32 %4, 4
%6 = icmp eq i32 %5, 0
br i1 %6, label %7, label %8
7: ; preds = %1
store i32 366, i32* %2
br label %9
8: ; preds = %1
store i32 365, i32* %2
br label %9
9: ; preds = %8, %7
%10 = load i32, i32* %2
ret i32 %10
}

LLVM IR (-O2):
define i32 @dysize(i32 %0) {
%2 = and i32 %0, 3
%3 = icmp eq i32 %2, 0
%4 = select i1 %3, i32 366, i32 365
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ SaveNor();
int /*<<< orphan*/ SaveStates();
void wqxSaveNC1020() {
  SaveNor();
  SaveStates();
}


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

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

LLVM IR (-O0):
define void @wqxSaveNC1020() {
%1 = call i32 (...) @SaveNor()
%2 = call i32 (...) @SaveStates()
ret void
}

LLVM IR (-O2):
define void @wqxSaveNC1020() {
%1 = tail call i32 (...) @SaveNor()
%2 = tail call i32 (...) @SaveStates()
ret void
}
/* Type definitions */
struct in_addr {
  scalar_t__ s_addr;
};

/* Variables and functions */
int /*<<< orphan*/ INADDR_LOOPBACK;
scalar_t__ htonl(int /*<<< orphan*/);
bool ipv4_addr_loopback(const struct in_addr *a) {
  return a->s_addr == htonl(INADDR_LOOPBACK);
}


x86 assembly (clang, -O0):
<ipv4_addr_loopback>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
mov    %rax,-0x10(%rbp)
mov    0x2eba(%rip),%rax
mov    (%rax),%edi
call   1030 <htonl@plt>
mov    %rax,%rcx
mov    -0x10(%rbp),%rax
cmp    %rcx,%rax
sete   %al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ipv4_addr_loopback>:
push   %rbx
mov    (%rdi),%rbx
mov    0x2ecd(%rip),%rax
mov    (%rax),%edi
call   1030 <htonl@plt>
xor    %ecx,%ecx
cmp    %rax,%rbx
sete   %cl
mov    %ecx,%eax
pop    %rbx
ret

LLVM IR (-O0):
%struct.in_addr = type { i64 }
@INADDR_LOOPBACK = global i32 0
define i32 @ipv4_addr_loopback(%struct.in_addr* %0) {
%2 = alloca %struct.in_addr*
store %struct.in_addr* %0, %struct.in_addr** %2
%3 = load %struct.in_addr*, %struct.in_addr** %2
%4 = getelementptr inbounds %struct.in_addr, %struct.in_addr* %3, i32 0, i32 0
%5 = load i64, i64* %4
%6 = load i32, i32* @INADDR_LOOPBACK
%7 = call i64 @htonl(i32 %6)
%8 = icmp eq i64 %5, %7
%9 = zext i1 %8 to i32
ret i32 %9
}

LLVM IR (-O2):
%struct.in_addr = type { i64 }
@INADDR_LOOPBACK = global i32 0
define i32 @ipv4_addr_loopback(%struct.in_addr* nocapture %0) {
%2 = getelementptr inbounds %struct.in_addr, %struct.in_addr* %0, i64 0, i32 0
%3 = load i64, i64* %2
%4 = load i32, i32* @INADDR_LOOPBACK
%5 = tail call i64 @htonl(i32 %4)
%6 = icmp eq i64 %3, %5
%7 = zext i1 %6 to i32
ret i32 %7
}
int execute_set_zone_reclaim() { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @execute_set_zone_reclaim() {
ret i32 0
}
/* Variables and functions */
size_t strlen(char const *);
size_t safestrlen(const char *s) { return s ? strlen(s) : 0; }


x86 assembly (clang, -O0):
<safestrlen>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1139 <safestrlen+0x29>
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
mov    %rax,-0x10(%rbp)
jmp    1144 <safestrlen+0x34>
xor    %eax,%eax
mov    %rax,-0x10(%rbp)
jmp    1144 <safestrlen+0x34>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<safestrlen>:
test   %rdi,%rdi
je     111a <safestrlen+0xa>
jmp    1030 <strlen@plt>
xor    %eax,%eax
ret

LLVM IR (-O0):
define i64 @safestrlen(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = icmp ne i8* %3, null
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load i8*, i8** %2
%7 = call i64 @strlen(i8* %6)
br label %9
8: ; preds = %1
br label %9
9: ; preds = %8, %5
%10 = phi i64 [ %7, %5 ], [ 0, %8 ]
ret i64 %10
}

LLVM IR (-O2):
define i64 @safestrlen(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = tail call i64 @strlen(i8* %0)
br label %5
5: ; preds = %1, %3
%6 = phi i64 [ %4, %3 ], [ 0, %1 ]
ret i64 %6
}
/* Type definitions */
struct Var {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ pA(char *, char const *, char const *, char const *);
void __func_and_ptr(struct Var *avar, const char *areg, const char *lreg,
                    const char *rreg) {
  pA("%s = %s & %s;", areg, lreg, rreg);
}


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

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

LLVM IR (-O0):
%struct.Var = type { i32 }
@.str = [14 x i8] c"%s = %s & %s;\00"
define void @__func_and_ptr(%struct.Var* %0, i8* %1, i8* %2, i8* %3) {
%5 = alloca %struct.Var*
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i8*
store %struct.Var* %0, %struct.Var** %5
store i8* %1, i8** %6
store i8* %2, i8** %7
store i8* %3, i8** %8
%9 = load i8*, i8** %6
%10 = load i8*, i8** %7
%11 = load i8*, i8** %8
%12 = call i32 @pA(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i8* %9, i8* %10, i8* %11)
ret void
}

LLVM IR (-O2):
%struct.Var = type { i32 }
@.str = [14 x i8] c"%s = %s & %s;\00"
define void @__func_and_ptr(%struct.Var* nocapture readnone %0, i8* %1, i8* %2, i8* %3) {
%5 = tail call i32 @pA(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i8* %1, i8* %2, i8* %3)
ret void
}
/* Type definitions */
struct timeval {
  int tv_sec;
  int tv_usec;
};

/* Variables and functions */
int select(int /*<<< orphan*/, int /*<<< orphan*/ *, int /*<<< orphan*/ *,
           int /*<<< orphan*/ *, struct timeval *);
int usecsleep(int secs, int usecs) {
  struct timeval tv;
  tv.tv_sec = secs;
  tv.tv_usec = usecs;
  return select(0, NULL, NULL, NULL, &tv);
}


x86 assembly (clang, -O0):
<usecsleep>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
xor    %edi,%edi
xor    %eax,%eax
mov    %eax,%ecx
lea    -0x10(%rbp),%r8
mov    %rcx,%rsi
mov    %rcx,%rdx
call   1030 <select@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<usecsleep>:
push   %rax
mov    %edi,(%rsp)
mov    %esi,0x4(%rsp)
mov    %rsp,%r8
xor    %edi,%edi
xor    %esi,%esi
xor    %edx,%edx
xor    %ecx,%ecx
call   1030 <select@plt>
pop    %rcx
ret

LLVM IR (-O0):
%struct.timeval = type { i32, i32 }
define i32 @usecsleep(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca %struct.timeval
store i32 %0, i32* %3
store i32 %1, i32* %4
%6 = load i32, i32* %3
%7 = getelementptr inbounds %struct.timeval, %struct.timeval* %5, i32 0, i32 0
store i32 %6, i32* %7
%8 = load i32, i32* %4
%9 = getelementptr inbounds %struct.timeval, %struct.timeval* %5, i32 0, i32 1
store i32 %8, i32* %9
%10 = call i32 @select(i32 0, i32* null, i32* null, i32* null, %struct.timeval* %5)
ret i32 %10
}

LLVM IR (-O2):
%struct.timeval = type { i32, i32 }
define i32 @usecsleep(i32 %0, i32 %1) {
%3 = alloca %struct.timeval
%4 = bitcast %struct.timeval* %3 to i8*
%5 = getelementptr inbounds %struct.timeval, %struct.timeval* %3, i64 0, i32 0
store i32 %0, i32* %5
%6 = getelementptr inbounds %struct.timeval, %struct.timeval* %3, i64 0, i32 1
store i32 %1, i32* %6
%7 = call i32 @select(i32 0, i32* null, i32* null, i32* null, %struct.timeval* %3)
ret i32 %7
}
/* Type definitions */
struct vec2i {
  int dummy;
};
struct vec2 {
  int dummy;
};
typedef int /*<<< orphan*/ int32_t;

/* Variables and functions */
int /*<<< orphan*/ vec2i_floor(int /*<<< orphan*/ *, float *);
__attribute__((always_)) struct vec2i *psvec2i_floor(struct vec2i *result,
                                                     struct vec2 *a) {
  vec2i_floor((int32_t *)result, (float *)a);
  return result;
}


x86 assembly (clang, -O0):
<psvec2i_floor>:
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 <vec2i_floor@plt>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<psvec2i_floor>:
push   %rbx
mov    %rdi,%rbx
call   1030 <vec2i_floor@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
%struct.vec2i = type { i32 }
%struct.vec2 = type { i32 }
define %struct.vec2i* @psvec2i_floor(%struct.vec2i* %0, %struct.vec2* %1) {
%3 = alloca %struct.vec2i*
%4 = alloca %struct.vec2*
store %struct.vec2i* %0, %struct.vec2i** %3
store %struct.vec2* %1, %struct.vec2** %4
%5 = load %struct.vec2i*, %struct.vec2i** %3
%6 = bitcast %struct.vec2i* %5 to i32*
%7 = load %struct.vec2*, %struct.vec2** %4
%8 = bitcast %struct.vec2* %7 to float*
%9 = call i32 @vec2i_floor(i32* %6, float* %8)
%10 = load %struct.vec2i*, %struct.vec2i** %3
ret %struct.vec2i* %10
}

LLVM IR (-O2):
%struct.vec2i = type { i32 }
%struct.vec2 = type { i32 }
define %struct.vec2i* @psvec2i_floor(%struct.vec2i* returned %0, %struct.vec2* %1) {
%3 = getelementptr %struct.vec2i, %struct.vec2i* %0, i64 0, i32 0
%4 = bitcast %struct.vec2* %1 to float*
%5 = tail call i32 @vec2i_floor(i32* %3, float* %4)
ret %struct.vec2i* %0
}