xunge/DecIR huggingface dataset:
/* Variables and functions */
double floor(double);
double ILLutil_our_floor(double x) { return floor(x); }


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

x86 assembly (clang, -O2):
<ILLutil_our_floor>:
jmp    1030 <floor@plt>

LLVM IR (-O0):
define double @ILLutil_our_floor(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = call double @llvm.floor.f64(double %3)
ret double %4
}

LLVM IR (-O2):
define double @ILLutil_our_floor(double %0) {
%2 = tail call double @llvm.floor.f64(double %0)
ret double %2
}
extern long long shmem_longlong_g(long long *addr, int pe) { return *addr; }


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

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

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

LLVM IR (-O2):
define i64 @shmem_longlong_g(i64* nocapture %0, i32 %1) {
%3 = load i64, i64* %0
ret i64 %3
}
int handle_lng(long ret) {
  if (ret >= 0) {
    return 0;
  }
  if (ret == -1) {
    return -1;
  }
  if (ret < -1) {
    return -2;
  }
  return -2;
}


x86 assembly (clang, -O0):
<handle_lng>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jl     111f <handle_lng+0x1f>
movl   $0x0,-0x4(%rbp)
jmp    1154 <handle_lng+0x54>
cmpq   $0xffffffffffffffff,-0x10(%rbp)
jne    1136 <handle_lng+0x36>
movl   $0xffffffff,-0x4(%rbp)
jmp    1154 <handle_lng+0x54>
cmpq   $0xffffffffffffffff,-0x10(%rbp)
jge    114d <handle_lng+0x4d>
movl   $0xfffffffe,-0x4(%rbp)
jmp    1154 <handle_lng+0x54>
movl   $0xfffffffe,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<handle_lng>:
xor    %ecx,%ecx
cmp    $0xffffffffffffffff,%rdi
sete   %cl
or     $0xfffffffe,%ecx
xor    %eax,%eax
test   %rdi,%rdi
cmovs  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @handle_lng(i64 %0) {
%2 = icmp sgt i64 %0, -1
%3 = icmp eq i64 %0, -1
%4 = select i1 %3, i32 -1, i32 -2
%5 = select i1 %2, i32 0, i32 %4
ret i32 %5
}
/* Variables and functions */
int setenv(char const *, char const *, int);
int os_setenv(const char *name, const char *value, int overwrite) {
  return setenv(name, value, overwrite);
}


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

x86 assembly (clang, -O2):
<os_setenv>:
jmp    1030 <setenv@plt>

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

LLVM IR (-O2):
define i32 @os_setenv(i8* %0, i8* %1, i32 %2) {
%4 = tail call i32 @setenv(i8* %0, i8* %1, i32 %2)
ret i32 %4
}
int fib(int n) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @fib(i32 %0) {
ret i32 0
}
long long r14(void *x) { return *(long long *)(x + 32754); }


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

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

LLVM IR (-O0):
define i64 @r14(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = getelementptr i8, i8* %3, i64 32754
%5 = bitcast i8* %4 to i64*
%6 = load i64, i64* %5
ret i64 %6
}

LLVM IR (-O2):
define i64 @r14(i8* nocapture %0) {
%2 = getelementptr i8, i8* %0, i64 32754
%3 = bitcast i8* %2 to i64*
%4 = load i64, i64* %3
ret i64 %4
}
__attribute((always_)) int f(void) { return 3; }


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

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

LLVM IR (-O0):
define i32 @f() {
ret i32 3
}

LLVM IR (-O2):
define i32 @f() {
ret i32 3
}
/* Variables and functions */
char *strdup(char const *);
char *get_path(const char *x) { return strdup(x); }


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

x86 assembly (clang, -O2):
<get_path>:
jmp    1030 <strdup@plt>

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

LLVM IR (-O2):
define noalias i8* @get_path(i8* nocapture %0) {
%2 = tail call i8* @strdup(i8* %0)
ret i8* %2
}
void g_queue_free() {}


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

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

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

LLVM IR (-O2):
define void @g_queue_free() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free_matrix(double ***, int);
void free_memory(double **P, double **U, double **V, int nx) {
  free_matrix(&P, nx + 2);
  free_matrix(&U, nx + 2);
  free_matrix(&V, nx + 2);
}


x86 assembly (clang, -O0):
<free_memory>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    -0x1c(%rbp),%esi
add    $0x2,%esi
lea    -0x8(%rbp),%rdi
call   1030 <free_matrix@plt>
mov    -0x1c(%rbp),%esi
add    $0x2,%esi
lea    -0x10(%rbp),%rdi
call   1030 <free_matrix@plt>
mov    -0x1c(%rbp),%esi
add    $0x2,%esi
lea    -0x18(%rbp),%rdi
call   1030 <free_matrix@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<free_memory>:
push   %rbx
sub    $0x20,%rsp
mov    %rdi,0x18(%rsp)
mov    %rsi,0x10(%rsp)
mov    %rdx,0x8(%rsp)
lea    0x2(%rcx),%ebx
lea    0x18(%rsp),%rdi
mov    %ebx,%esi
call   1030 <free_matrix@plt>
lea    0x10(%rsp),%rdi
mov    %ebx,%esi
call   1030 <free_matrix@plt>
lea    0x8(%rsp),%rdi
mov    %ebx,%esi
call   1030 <free_matrix@plt>
add    $0x20,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define void @free_memory(double** %0, double** %1, double** %2, i32 %3) {
%5 = alloca double**
%6 = alloca double**
%7 = alloca double**
%8 = alloca i32
store double** %0, double*** %5
store double** %1, double*** %6
store double** %2, double*** %7
store i32 %3, i32* %8
%9 = load i32, i32* %8
%10 = add nsw i32 %9, 2
%11 = call i32 @free_matrix(double*** %5, i32 %10)
%12 = load i32, i32* %8
%13 = add nsw i32 %12, 2
%14 = call i32 @free_matrix(double*** %6, i32 %13)
%15 = load i32, i32* %8
%16 = add nsw i32 %15, 2
%17 = call i32 @free_matrix(double*** %7, i32 %16)
ret void
}

LLVM IR (-O2):
define void @free_memory(double** %0, double** %1, double** %2, i32 %3) {
%5 = alloca double**
%6 = alloca double**
%7 = alloca double**
store double** %0, double*** %5
store double** %1, double*** %6
store double** %2, double*** %7
%8 = add nsw i32 %3, 2
%9 = call i32 @free_matrix(double*** %5, i32 %8)
%10 = call i32 @free_matrix(double*** %6, i32 %8)
%11 = call i32 @free_matrix(double*** %7, i32 %8)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int, int);
int main() {
  int i;
  int height = 100;
  int current_height = height;
  int times = 0;
  int sum = 0;
  times = 10;
  for (i = 0; i < times; i++) {
    current_height = current_height / 2;
    sum = sum + current_height * 2 + current_height;
  }
  printf("init height:%d\t after %d times,sum=%d", height, times, sum);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x64,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
movl   $0x0,-0x18(%rbp)
movl   $0xa,-0x14(%rbp)
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    1181 <main+0x71>
mov    -0x10(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,-0x10(%rbp)
mov    -0x18(%rbp),%eax
mov    -0x10(%rbp),%ecx
shl    $0x1,%ecx
add    %ecx,%eax
add    -0x10(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1148 <main+0x38>
mov    -0xc(%rbp),%esi
mov    -0x14(%rbp),%edx
mov    -0x18(%rbp),%ecx
lea    0xe6f(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
@.str = [38 x i8] c"init height:%d\09 after %d times,sum=%d\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str, i64 0, i64 0), i32 100, i32 10, i32 291)
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ wint_t;

/* Variables and functions */
int /*<<< orphan*/ toupper(int /*<<< orphan*/);
wint_t towupper(wint_t wc) { return toupper(wc); }


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

x86 assembly (clang, -O2):
<towupper>:
jmp    1030 <toupper@plt>

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

LLVM IR (-O2):
define i32 @towupper(i32 %0) {
%2 = tail call i32 @toupper(i32 %0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int pa_stream_flush() {
  printf("NOT IMPLEMENTED:"
         "pa_stream_flush"
         "\n");
}


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

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

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

LLVM IR (-O2):
@str = [32 x i8] c"NOT IMPLEMENTED:pa_stream_flush\00"
define i32 @pa_stream_flush() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @str, i64 0, i64 0))
ret i32 undef
}
/* Type definitions */
typedef int /*<<< orphan*/ CRL_DIST_POINTS;
typedef int /*<<< orphan*/ ASN1_VALUE;

/* Variables and functions */
int ASN1_item_i2d(int /*<<< orphan*/ *, unsigned char **, int /*<<< orphan*/ *);
int /*<<< orphan*/ CRL_DIST_POINTS_it;
int i2d_CRL_DIST_POINTS(CRL_DIST_POINTS *a, unsigned char **out) {
  return ASN1_item_i2d((ASN1_VALUE *)a, out, &CRL_DIST_POINTS_it);
}


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

x86 assembly (clang, -O2):
<i2d_CRL_DIST_POINTS>:
mov    0x2ed9(%rip),%rdx
jmp    1030 <ASN1_item_i2d@plt>

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

LLVM IR (-O2):
@CRL_DIST_POINTS_it = global i32 0
define i32 @i2d_CRL_DIST_POINTS(i32* %0, i8** %1) {
%3 = tail call i32 @ASN1_item_i2d(i32* %0, i8** %1, i32* @CRL_DIST_POINTS_it)
ret i32 %3
}
/* Type definitions */
struct sembuf {
  int sem_op;
  int /*<<< orphan*/ sem_flg;
  scalar_t__ sem_num;
};

/* Variables and functions */
int /*<<< orphan*/ SEM_UNDO;
int semop(int, struct sembuf *, int);
int sem_lock(int semid) {
  struct sembuf buf;
  buf.sem_num = 0;
  buf.sem_op = -1;
  buf.sem_flg = SEM_UNDO;
  return semop(semid, &buf, 1);
}


x86 assembly (clang, -O0):
<sem_lock>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
movq   $0x0,-0x10(%rbp)
movl   $0xffffffff,-0x18(%rbp)
mov    0x2ebf(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x14(%rbp)
mov    -0x4(%rbp),%edi
lea    -0x18(%rbp),%rsi
mov    $0x1,%edx
call   1030 <semop@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sem_lock>:
sub    $0x18,%rsp
movq   $0x0,0x10(%rsp)
movl   $0xffffffff,0x8(%rsp)
ff
mov    0x2ec4(%rip),%rax
mov    (%rax),%eax
mov    %eax,0xc(%rsp)
lea    0x8(%rsp),%rsi
mov    $0x1,%edx
call   1030 <semop@plt>
add    $0x18,%rsp
ret

LLVM IR (-O0):
%struct.sembuf = type { i32, i32, i64 }
@SEM_UNDO = global i32 0
define i32 @sem_lock(i32 %0) {
%2 = alloca i32
%3 = alloca %struct.sembuf
store i32 %0, i32* %2
%4 = getelementptr inbounds %struct.sembuf, %struct.sembuf* %3, i32 0, i32 2
store i64 0, i64* %4
%5 = getelementptr inbounds %struct.sembuf, %struct.sembuf* %3, i32 0, i32 0
store i32 -1, i32* %5
%6 = load i32, i32* @SEM_UNDO
%7 = getelementptr inbounds %struct.sembuf, %struct.sembuf* %3, i32 0, i32 1
store i32 %6, i32* %7
%8 = load i32, i32* %2
%9 = call i32 @semop(i32 %8, %struct.sembuf* %3, i32 1)
ret i32 %9
}

LLVM IR (-O2):
%struct.sembuf = type { i32, i32, i64 }
@SEM_UNDO = global i32 0
define i32 @sem_lock(i32 %0) {
%2 = alloca %struct.sembuf
%3 = bitcast %struct.sembuf* %2 to i8*
%4 = getelementptr inbounds %struct.sembuf, %struct.sembuf* %2, i64 0, i32 2
store i64 0, i64* %4
%5 = getelementptr inbounds %struct.sembuf, %struct.sembuf* %2, i64 0, i32 0
store i32 -1, i32* %5
%6 = load i32, i32* @SEM_UNDO
%7 = getelementptr inbounds %struct.sembuf, %struct.sembuf* %2, i64 0, i32 1
store i32 %6, i32* %7
%8 = call i32 @semop(i32 %0, %struct.sembuf* %2, i32 1)
ret i32 %8
}
int main(int argc, char *argvp[]) { return 0; }


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

x86 assembly (clang, -O2):
<main>:
xor    %eax,%eax
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
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
ret i32 0
}
/* Variables and functions */
scalar_t__ bmp_iter_set();
int /*<<< orphan*/ something();
void bitmap_print_value_set(void) {
  unsigned first;
  for (; bmp_iter_set();) {
    if (!first)
      something();
    first = 0;
  }
}


x86 assembly (clang, -O0):
<bitmap_print_value_set>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1040 <bmp_iter_set@plt>
cmp    $0x0,%rax
je     1156 <bitmap_print_value_set+0x36>
cmpl   $0x0,-0x4(%rbp)
jne    114a <bitmap_print_value_set+0x2a>
mov    $0x0,%al
call   1030 <something@plt>
movl   $0x0,-0x4(%rbp)
jmp    1128 <bitmap_print_value_set+0x8>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bitmap_print_value_set>:
push   %rax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1040 <bmp_iter_set@plt>
test   %rax,%rax
je     1145 <bitmap_print_value_set+0x25>
xor    %eax,%eax
call   1030 <something@plt>
jmp    1130 <bitmap_print_value_set+0x10>
pop    %rax
ret

LLVM IR (-O0):
define void @bitmap_print_value_set() {
%1 = alloca i32
br label %2
2: ; preds = %10, %0
%3 = call i64 (...) @bmp_iter_set()
%4 = icmp ne i64 %3, 0
br i1 %4, label %5, label %11
5: ; preds = %2
%6 = load i32, i32* %1
%7 = icmp ne i32 %6, 0
br i1 %7, label %10, label %8
8: ; preds = %5
%9 = call i32 (...) @something()
br label %10
10: ; preds = %8, %5
store i32 0, i32* %1
br label %2
11: ; preds = %2
ret void
}

LLVM IR (-O2):
define void @bitmap_print_value_set() {
%1 = tail call i64 (...) @bmp_iter_set()
%2 = icmp eq i64 %1, 0
br i1 %2, label %7, label %3
3: ; preds = %0, %3
%4 = tail call i32 (...) @something()
%5 = tail call i64 (...) @bmp_iter_set()
%6 = icmp eq i64 %5, 0
br i1 %6, label %7, label %3
7: ; preds = %3, %0
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int /*<<< orphan*/ uint64_t;

/* Variables and functions */
void __attribute__((weak))
usr_mlme_disassociate_ind(uint64_t DeviceAddress, uint8_t DisassociateReason) {
  DeviceAddress = DeviceAddress;
  DisassociateReason = DisassociateReason;
}


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

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

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

LLVM IR (-O2):
define weak void @usr_mlme_disassociate_ind(i32 %0, i32 %1) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, ...);
int main(void) {
  int a = 1;
  float b = 2.0;
  char *f = "hello";
  printf("%v\n", a);
  printf("%y, %l, %z\n", a, b, f);
  return 1;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x1,-0x8(%rbp)
movss  0xed2(%rip),%xmm0
movss  %xmm0,-0xc(%rbp)
lea    0xeca(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%esi
lea    0xec2(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%esi
movss  -0xc(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
mov    -0x18(%rbp),%rdx
lea    0xea8(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
mov    $0x1,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xef6(%rip),%rdi
mov    $0x1,%esi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xee7(%rip),%rdi
lea    0xed6(%rip),%rdx
movsd  0xec6(%rip),%xmm0
mov    $0x1,%esi
mov    $0x1,%al
call   1030 <printf@plt>
mov    $0x1,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [6 x i8] c"hello\00"
@.str.1 = [4 x i8] c"%v\0A\00"
@.str.2 = [12 x i8] c"%y, %l, %z\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca float
%4 = alloca i8*
store i32 0, i32* %1
store i32 1, i32* %2
store float 2.000000e+00, float* %3
store i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8** %4
%5 = load i32, i32* %2
%6 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %5)
%7 = load i32, i32* %2
%8 = load float, float* %3
%9 = fpext float %8 to double
%10 = load i8*, i8** %4
%11 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.2, i64 0, i64 0), i32 %7, double %9, i8* %10)
ret i32 1
}

LLVM IR (-O2):
@.str = [6 x i8] c"hello\00"
@.str.1 = [4 x i8] c"%v\0A\00"
@.str.2 = [12 x i8] c"%y, %l, %z\0A\00"
define i32 @main() {
%1 = tail call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 1)
%2 = tail call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.2, i64 0, i64 0), i32 1, double 2.000000e+00, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
ret i32 1
}
rplstr(oldstr, newstr) char **oldstr, *newstr;
{
  free(*oldstr);
  *oldstr = newstr;
}


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

x86 assembly (clang, -O2):
<rplstr>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
mov    (%rdi),%rdi
call   1030 <free@plt>
mov    %r14,(%rbx)
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define i32 @rplstr(i8** nocapture %0, i8* %1) {
%3 = load i8*, i8** %0
tail call void @free(i8* %3)
store i8* %1, i8** %0
ret i32 undef
}
unsigned int calc_timediff(unsigned int start, unsigned int stop) {
  if (start <= stop) {
    return (stop - start);
  }
  return (4294967295UL - start + stop);
}


x86 assembly (clang, -O0):
<calc_timediff>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
ja     1124 <calc_timediff+0x24>
mov    -0xc(%rbp),%eax
sub    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    113a <calc_timediff+0x3a>
mov    -0x8(%rbp),%eax
mov    %eax,%ecx
mov    $0xffffffff,%eax
sub    %rcx,%rax
mov    -0xc(%rbp),%ecx
add    %rcx,%rax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<calc_timediff>:
mov    %edi,%eax
neg    %eax
cmp    %edi,%esi
not    %edi
cmovb  %edi,%eax
add    %esi,%eax
ret

LLVM IR (-O0):
define i32 @calc_timediff(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
%6 = load i32, i32* %4
%7 = load i32, i32* %5
%8 = icmp ule i32 %6, %7
br i1 %8, label %9, label %13
9: ; preds = %2
%10 = load i32, i32* %5
%11 = load i32, i32* %4
%12 = sub i32 %10, %11
store i32 %12, i32* %3
br label %21
13: ; preds = %2
%14 = load i32, i32* %4
%15 = zext i32 %14 to i64
%16 = sub i64 4294967295, %15
%17 = load i32, i32* %5
%18 = zext i32 %17 to i64
%19 = add i64 %16, %18
%20 = trunc i64 %19 to i32
store i32 %20, i32* %3
br label %21
21: ; preds = %13, %9
%22 = load i32, i32* %3
ret i32 %22
}

LLVM IR (-O2):
define i32 @calc_timediff(i32 %0, i32 %1) {
%3 = icmp ult i32 %1, %0
%4 = xor i32 %0, -1
%5 = sub i32 0, %0
%6 = select i1 %3, i32 %4, i32 %5
%7 = add i32 %6, %1
ret i32 %7
}
/* Type definitions */
typedef scalar_t__ int64_t;

/* Variables and functions */
scalar_t__ truncf(float const);
void trunc_l_s(const float *source, int64_t *dest) {
  *dest = (int64_t)truncf(*source);
}


x86 assembly (clang, -O0):
<trunc_l_s>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movss  (%rax),%xmm0
call   1030 <truncf@plt>
mov    %rax,%rcx
mov    -0x10(%rbp),%rax
mov    %rcx,(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<trunc_l_s>:
push   %rbx
mov    %rsi,%rbx
movss  (%rdi),%xmm0
call   1030 <truncf@plt>
mov    %rax,(%rbx)
pop    %rbx
ret

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

LLVM IR (-O2):
define void @trunc_l_s(float* nocapture %0, i64* nocapture writeonly %1) {
%3 = load float, float* %0
%4 = tail call i64 @truncf(float %3)
store i64 %4, i64* %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ close(int);
int /*<<< orphan*/ doit(int);
int /*<<< orphan*/ pthread_exit(char *);
void *create_worker(void *args) {
  int *pConnfd = (int *)args;
  doit(*pConnfd);
  close(*pConnfd);
  pthread_exit("thread exit sucessfully");
}


x86 assembly (clang, -O0):
<create_worker>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    (%rax),%edi
call   1050 <doit@plt>
mov    -0x18(%rbp),%rax
mov    (%rax),%edi
call   1030 <close@plt>
lea    0xe9f(%rip),%rdi
call   1040 <pthread_exit@plt>
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<create_worker>:
push   %rbx
mov    %rdi,%rbx
mov    (%rdi),%edi
call   1050 <doit@plt>
mov    (%rbx),%edi
call   1030 <close@plt>
lea    0xeb7(%rip),%rdi
pop    %rbx
jmp    1040 <pthread_exit@plt>

LLVM IR (-O0):
@.str = [24 x i8] c"thread exit sucessfully\00"
define i8* @create_worker(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
%4 = alloca i32*
store i8* %0, i8** %3
%5 = load i8*, i8** %3
%6 = bitcast i8* %5 to i32*
store i32* %6, i32** %4
%7 = load i32*, i32** %4
%8 = load i32, i32* %7
%9 = call i32 @doit(i32 %8)
%10 = load i32*, i32** %4
%11 = load i32, i32* %10
%12 = call i32 @close(i32 %11)
%13 = call i32 @pthread_exit(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
%14 = load i8*, i8** %2
ret i8* %14
}

LLVM IR (-O2):
@.str = [24 x i8] c"thread exit sucessfully\00"
define noalias i8* @create_worker(i8* nocapture %0) {
%2 = bitcast i8* %0 to i32*
%3 = load i32, i32* %2
%4 = tail call i32 @doit(i32 %3)
%5 = load i32, i32* %2
%6 = tail call i32 @close(i32 %5)
%7 = tail call i32 @pthread_exit(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
ret i8* undef
}
void gtk_rc_token_type_get_type() {}


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

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

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

LLVM IR (-O2):
define void @gtk_rc_token_type_get_type() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char, char, char);
int main() {
  char c1 = 'A', c2 = 'B', c3 = 'C';
  char *p1, *p2, *p3;
  p3 = &c3;
  p2 = &c2;
  p1 = &c1;
  printf("%c, %c, %c\n", *p1, *p2, *p3);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movb   $0x41,-0x5(%rbp)
movb   $0x42,-0x6(%rbp)
movb   $0x43,-0x7(%rbp)
lea    -0x7(%rbp),%rax
mov    %rax,-0x20(%rbp)
lea    -0x6(%rbp),%rax
mov    %rax,-0x18(%rbp)
lea    -0x5(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%dl
mov    -0x18(%rbp),%rax
mov    (%rax),%cl
mov    -0x20(%rbp),%rax
lea    0xea6(%rip),%rdi
movsbl %dl,%esi
movsbl %cl,%edx
movsbl (%rax),%ecx
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [12 x i8] c"%c, %c, %c\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i8
%3 = alloca i8
%4 = alloca i8
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i8*
store i32 0, i32* %1
store i8 65, i8* %2
store i8 66, i8* %3
store i8 67, i8* %4
store i8* %4, i8** %7
store i8* %3, i8** %6
store i8* %2, i8** %5
%8 = load i8*, i8** %5
%9 = load i8, i8* %8
%10 = load i8*, i8** %6
%11 = load i8, i8* %10
%12 = load i8*, i8** %7
%13 = load i8, i8* %12
%14 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8 signext %9, i8 signext %11, i8 signext %13)
ret i32 0
}

LLVM IR (-O2):
@.str = [12 x i8] c"%c, %c, %c\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8 signext 65, i8 signext 66, i8 signext 67)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ die(char *, size_t);
void *malloc(size_t);
void *xmalloc(size_t nbytes) {
  void *p = malloc(nbytes);
  if (!p)
    die("xmalloc: allocation of "
        "%d"
        " bytes failed",
        nbytes);
  else
    return p;
}


x86 assembly (clang, -O0):
<xmalloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <malloc@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    1159 <xmalloc+0x39>
mov    -0x10(%rbp),%rsi
lea    0xeb1(%rip),%rdi
call   1040 <die@plt>
jmp    1161 <xmalloc+0x41>
mov    -0x18(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xmalloc>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
call   1030 <malloc@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    1143 <xmalloc+0x23>
lea    0xec5(%rip),%rdi
mov    %r14,%rsi
call   1040 <die@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [39 x i8] c"xmalloc: allocation of %d bytes failed\00"
define i8* @xmalloc(i64 %0) {
%2 = alloca i8*
%3 = alloca i64
%4 = alloca i8*
store i64 %0, i64* %3
%5 = load i64, i64* %3
%6 = call i8* @malloc(i64 %5)
store i8* %6, i8** %4
%7 = load i8*, i8** %4
%8 = icmp ne i8* %7, null
br i1 %8, label %12, label %9
9: ; preds = %1
%10 = load i64, i64* %3
%11 = call i32 @die(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str, i64 0, i64 0), i64 %10)
br label %14
12: ; preds = %1
%13 = load i8*, i8** %4
store i8* %13, i8** %2
br label %14
14: ; preds = %12, %9
%15 = load i8*, i8** %2
ret i8* %15
}

LLVM IR (-O2):
@.str = [39 x i8] c"xmalloc: allocation of %d bytes failed\00"
define noalias i8* @xmalloc(i64 %0) {
%2 = tail call i8* @malloc(i64 %0)
%3 = icmp eq i8* %2, null
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i32 @die(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str, i64 0, i64 0), i64 %0)
br label %6
6: ; preds = %1, %4
ret i8* %2
}
/* Variables and functions */
int EXIT_SUCCESS;
int /*<<< orphan*/ afficherEcranTitre();
int /*<<< orphan*/ creerTableCaractereNiveau();
int /*<<< orphan*/ menuPrincipal();
int /*<<< orphan*/ srand(int /*<<< orphan*/);
int /*<<< orphan*/ time(int /*<<< orphan*/ *);
int main(void) {
  srand(time(NULL));
  creerTableCaractereNiveau();
  afficherEcranTitre();
  menuPrincipal();
  return EXIT_SUCCESS;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
xor    %eax,%eax
mov    %eax,%edi
call   1070 <time@plt>
mov    %eax,%edi
call   1060 <srand@plt>
mov    $0x0,%al
call   1030 <creerTableCaractereNiveau@plt>
mov    $0x0,%al
call   1040 <afficherEcranTitre@plt>
mov    $0x0,%al
call   1050 <menuPrincipal@plt>
mov    0x2e55(%rip),%rax
mov    (%rax),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %edi,%edi
call   1070 <time@plt>
mov    %eax,%edi
call   1060 <srand@plt>
xor    %eax,%eax
call   1030 <creerTableCaractereNiveau@plt>
xor    %eax,%eax
call   1040 <afficherEcranTitre@plt>
xor    %eax,%eax
call   1050 <menuPrincipal@plt>
mov    0x2e65(%rip),%rax
mov    (%rax),%eax
pop    %rcx
ret

LLVM IR (-O0):
@EXIT_SUCCESS = global i32 0
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @time(i32* null)
%3 = call i32 @srand(i32 %2)
%4 = call i32 (...) @creerTableCaractereNiveau()
%5 = call i32 (...) @afficherEcranTitre()
%6 = call i32 (...) @menuPrincipal()
%7 = load i32, i32* @EXIT_SUCCESS
ret i32 %7
}

LLVM IR (-O2):
@EXIT_SUCCESS = global i32 0
define i32 @main() {
%1 = tail call i32 @time(i32* null)
%2 = tail call i32 @srand(i32 %1)
%3 = tail call i32 (...) @creerTableCaractereNiveau()
%4 = tail call i32 (...) @afficherEcranTitre()
%5 = tail call i32 (...) @menuPrincipal()
%6 = load i32, i32* @EXIT_SUCCESS
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
int /*<<< orphan*/ test_swab();
void run_unistd_tests() {
  printf("\nRunning Test Case: %s\n", "Test POSIX unistd.h functions");
  ;
  test_swab();
}


x86 assembly (clang, -O0):
<run_unistd_tests>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
lea    0xee6(%rip),%rsi
call   1040 <printf@plt>
mov    $0x0,%al
call   1030 <test_swab@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<run_unistd_tests>:
push   %rax
lea    0xed8(%rip),%rdi
lea    0xee9(%rip),%rsi
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <test_swab@plt>

LLVM IR (-O0):
@.str = [24 x i8] c"\0ARunning Test Case: %s\0A\00"
@.str.1 = [30 x i8] c"Test POSIX unistd.h functions\00"
define void @run_unistd_tests() {
%1 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0))
%2 = call i32 (...) @test_swab()
ret void
}

LLVM IR (-O2):
@.str = [24 x i8] c"\0ARunning Test Case: %s\0A\00"
@.str.1 = [30 x i8] c"Test POSIX unistd.h functions\00"
define void @run_unistd_tests() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0))
%2 = tail call i32 (...) @test_swab()
ret void
}
/* Variables and functions */
int f244(int *);
int f245(int *p) { return f244(p); }


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

x86 assembly (clang, -O2):
<f245>:
jmp    1030 <f244@plt>

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

LLVM IR (-O2):
define i32 @f245(i32* %0) {
%2 = tail call i32 @f244(i32* %0)
ret i32 %2
}
void ff_hevc_idct_16x16_10_sse2() {}


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

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

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

LLVM IR (-O2):
define void @ff_hevc_idct_16x16_10_sse2() {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ strval;

/* Variables and functions */
int /*<<< orphan*/ setvar(char *, char *);
int /*<<< orphan*/ snprintf(char *, int, char *, unsigned long);
int setnumvar(char *var, unsigned long val) {
  char strval[40];
  snprintf(strval, sizeof(strval) - 2, "%lu", val);
  setvar(var, strval);
  return (0);
}


x86 assembly (clang, -O0):
<setnumvar>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    -0x40(%rbp),%rdi
mov    -0x10(%rbp),%rcx
mov    $0x26,%esi
lea    0xebc(%rip),%rdx
call   1030 <snprintf@plt>
mov    -0x8(%rbp),%rdi
lea    -0x40(%rbp),%rsi
call   1040 <setvar@plt>
xor    %eax,%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<setnumvar>:
push   %r14
push   %rbx
sub    $0x28,%rsp
mov    %rsi,%rcx
mov    %rdi,%rbx
lea    0xecc(%rip),%rdx
mov    %rsp,%r14
mov    %r14,%rdi
mov    $0x26,%esi
call   1030 <snprintf@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
call   1040 <setvar@plt>
xor    %eax,%eax
add    $0x28,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%lu\00"
define i32 @setnumvar(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
%5 = alloca [40 x i8]
store i8* %0, i8** %3
store i64 %1, i64* %4
%6 = getelementptr inbounds [40 x i8], [40 x i8]* %5, i64 0, i64 0
%7 = load i64, i64* %4
%8 = call i32 @snprintf(i8* %6, i32 38, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i64 %7)
%9 = load i8*, i8** %3
%10 = getelementptr inbounds [40 x i8], [40 x i8]* %5, i64 0, i64 0
%11 = call i32 @setvar(i8* %9, i8* %10)
ret i32 0
}

LLVM IR (-O2):
@.str = [4 x i8] c"%lu\00"
define i32 @setnumvar(i8* %0, i64 %1) {
%3 = alloca [40 x i8]
%4 = getelementptr inbounds [40 x i8], [40 x i8]* %3, i64 0, i64 0
%5 = call i32 @snprintf(i8* %4, i32 38, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i64 %1)
%6 = call i32 @setvar(i8* %0, i8* %4)
ret i32 0
}
/* Type definitions */
typedef unsigned char uint8_t;

/* Variables and functions */
void u8_to_le(unsigned char *x, const uint8_t u) { x[0] = u; }


x86 assembly (clang, -O0):
<u8_to_le>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %rdi,-0x8(%rbp)
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<u8_to_le>:
mov    %sil,(%rdi)
ret

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

LLVM IR (-O2):
define void @u8_to_le(i8* nocapture writeonly %0, i8 zeroext %1) {
store i8 %1, i8* %0
ret void
}
/* Type definitions */
struct wl_shm_sigbus_data {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ free(struct wl_shm_sigbus_data *);
void destroy_sigbus_data(void *data) {
  struct wl_shm_sigbus_data *sigbus_data = data;
  free(sigbus_data);
}


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

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

LLVM IR (-O0):
%struct.wl_shm_sigbus_data = type { i32 }
define void @destroy_sigbus_data(i8* %0) {
%2 = alloca i8*
%3 = alloca %struct.wl_shm_sigbus_data*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = bitcast i8* %4 to %struct.wl_shm_sigbus_data*
store %struct.wl_shm_sigbus_data* %5, %struct.wl_shm_sigbus_data** %3
%6 = load %struct.wl_shm_sigbus_data*, %struct.wl_shm_sigbus_data** %3
%7 = call i32 @free(%struct.wl_shm_sigbus_data* %6)
ret void
}

LLVM IR (-O2):
%struct.wl_shm_sigbus_data = type { i32 }
define void @destroy_sigbus_data(i8* nocapture %0) {
%2 = bitcast i8* %0 to %struct.wl_shm_sigbus_data*
%3 = tail call i32 @free(%struct.wl_shm_sigbus_data* %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ debug(char *, ...);
int M756_f(char *s) {
  debug("M756_f(const char *s) is not yet implemented!\n");
  debug("%s\n", s);
  return 1;
}


x86 assembly (clang, -O0):
<M756_f>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xedd(%rip),%rdi
mov    $0x0,%al
call   1030 <debug@plt>
mov    -0x8(%rbp),%rsi
lea    0xefa(%rip),%rdi
mov    $0x0,%al
call   1030 <debug@plt>
mov    $0x1,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<M756_f>:
push   %rbx
mov    %rdi,%rbx
lea    0xee5(%rip),%rdi
xor    %eax,%eax
call   1030 <debug@plt>
lea    0xf06(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1030 <debug@plt>
mov    $0x1,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [47 x i8] c"M756_f(const char *s) is not yet implemented!\0A\00"
@.str.1 = [4 x i8] c"%s\0A\00"
define i32 @M756_f(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 (i8*, ...) @debug(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str, i64 0, i64 0))
%4 = load i8*, i8** %2
%5 = call i32 (i8*, ...) @debug(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %4)
ret i32 1
}

LLVM IR (-O2):
@.str = [47 x i8] c"M756_f(const char *s) is not yet implemented!\0A\00"
@.str.1 = [4 x i8] c"%s\0A\00"
define i32 @M756_f(i8* %0) {
%2 = tail call i32 (i8*, ...) @debug(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 (i8*, ...) @debug(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %0)
ret i32 1
}
/* Type definitions */
typedef unsigned int uint16_t;
struct can_frame {
  int /*<<< orphan*/ data;
};
typedef int /*<<< orphan*/ result;

/* Variables and functions */
int /*<<< orphan*/ byteorder(unsigned int *, int /*<<< orphan*/, int);
unsigned int emcy_get_code(const struct can_frame *frame) {
  uint16_t result = 0;
  byteorder(&result, frame->data, sizeof(result));
  return result;
}


x86 assembly (clang, -O0):
<emcy_get_code>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%esi
lea    -0xc(%rbp),%rdi
mov    $0x4,%edx
call   1030 <byteorder@plt>
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<emcy_get_code>:
push   %rax
movl   $0x0,0x4(%rsp)
mov    (%rdi),%esi
lea    0x4(%rsp),%rdi
mov    $0x4,%edx
call   1030 <byteorder@plt>
mov    0x4(%rsp),%eax
pop    %rcx
ret

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

LLVM IR (-O2):
%struct.can_frame = type { i32 }
define i32 @emcy_get_code(%struct.can_frame* nocapture %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
store i32 0, i32* %2
%4 = getelementptr inbounds %struct.can_frame, %struct.can_frame* %0, i64 0, i32 0
%5 = load i32, i32* %4
%6 = call i32 @byteorder(i32* %2, i32 %5, i32 4)
%7 = load i32, i32* %2
ret i32 %7
}
/* Variables and functions */
scalar_t__ f();
int main(void) {
  f() + 1;
  return 0;
}


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

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i64 (...) @f()
%3 = add nsw i64 %2, 1
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i64 (...) @f()
ret i32 0
}
/* Type definitions */
typedef scalar_t__ uint16_t;

/* Variables and functions */
void subMov(uint16_t *dst, uint16_t *src) {
  while (*src) {
    if (!(*dst))
      break;
    (*dst)--;
    (*src)--;
  }
}


x86 assembly (clang, -O0):
<subMov>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
cmpq   $0x0,(%rax)
je     114e <subMov+0x4e>
mov    -0x8(%rbp),%rax
cmpq   $0x0,(%rax)
jne    112d <subMov+0x2d>
jmp    114e <subMov+0x4e>
mov    -0x8(%rbp),%rax
mov    (%rax),%rcx
add    $0xffffffffffffffff,%rcx
mov    %rcx,(%rax)
mov    -0x10(%rbp),%rax
mov    (%rax),%rcx
add    $0xffffffffffffffff,%rcx
mov    %rcx,(%rax)
jmp    110c <subMov+0xc>
pop    %rbp
ret

x86 assembly (clang, -O2):
<subMov>:
cmpq   $0x0,(%rsi)
je     1125 <subMov+0x25>
cs nopw 0x0(%rax,%rax,1)
mov    (%rdi),%rax
test   %rax,%rax
je     1125 <subMov+0x25>
add    $0xffffffffffffffff,%rax
mov    %rax,(%rdi)
addq   $0xffffffffffffffff,(%rsi)
jne    1110 <subMov+0x10>
ret

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

LLVM IR (-O2):
define void @subMov(i64* nocapture %0, i64* nocapture %1) {
%3 = load i64, i64* %1
%4 = icmp eq i64 %3, 0
br i1 %4, label %13, label %5
5: ; preds = %2, %8
%6 = load i64, i64* %0
%7 = icmp eq i64 %6, 0
br i1 %7, label %13, label %8
8: ; preds = %5
%9 = add nsw i64 %6, -1
store i64 %9, i64* %0
%10 = load i64, i64* %1
%11 = add nsw i64 %10, -1
store i64 %11, i64* %1
%12 = icmp eq i64 %11, 0
br i1 %12, label %13, label %5
13: ; preds = %8, %5, %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void foo() { printf("foo()\n"); }


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

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

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

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


x86 assembly (clang, -O0):
<write_dobldobl_target_Laurent_system>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    $0x2fe,%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):
<write_dobldobl_target_Laurent_system>:
mov    $0x2fe,%edi
xor    %r8d,%r8d
jmp    1030 <_ada_use_c2phc4c@plt>

LLVM IR (-O0):
define i32 @write_dobldobl_target_Laurent_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 766, 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 @write_dobldobl_target_Laurent_system() {
%1 = tail call i32 @_ada_use_c2phc4c(i32 766, i32* undef, i32* undef, double* undef, i32 0)
ret i32 %1
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main(int argc, char *argv[]) {
  printf("a dummy program\n");
  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)
lea    0xed3(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [17 x i8] c"a dummy program\0A\00"
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 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [16 x i8] c"a dummy program\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @str, i64 0, i64 0))
ret i32 0
}