xunge/DecIR huggingface dataset:
/* Variables and functions */
int syscall(int, unsigned int, unsigned int);
int fanotify_init(unsigned int flags, unsigned int event_f_flags) {
  return syscall(300, flags, event_f_flags);
}


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

x86 assembly (clang, -O2):
<fanotify_init>:
mov    %esi,%edx
mov    %edi,%esi
mov    $0x12c,%edi
jmp    1030 <syscall@plt>

LLVM IR (-O0):
define i32 @fanotify_init(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
%6 = load i32, i32* %4
%7 = call i32 @syscall(i32 300, i32 %5, i32 %6)
ret i32 %7
}

LLVM IR (-O2):
define i32 @fanotify_init(i32 %0, i32 %1) {
%3 = tail call i32 @syscall(i32 300, i32 %0, i32 %1)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ CP15DCacheClean();
void CacheDataCleanAll(void) { CP15DCacheClean(); }


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

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

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

LLVM IR (-O2):
define void @CacheDataCleanAll() {
%1 = tail call i32 (...) @CP15DCacheClean()
ret void
}
void lidt(void *pointer) { __asm__ volatile("lidt (%0)" : : "r"(pointer)); }


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

x86 assembly (clang, -O2):
<lidt>:
lidt   (%rdi)
ret

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

LLVM IR (-O2):
define void @lidt(i8* %0) {
tail call void asm sideeffect "lidt ($0)", "r,~{dirflag},~{fpsr},~{flags}"(i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ usleep(int);
void WM_Lock(int *wmlock) {
LOCK_START:
  if (((*wmlock) == 0)) {
    (*wmlock)++;
    if (((*wmlock) == 1)) {
      return;
    }
    (*wmlock)--;
  }
  usleep(500);
  goto LOCK_START;
}


x86 assembly (clang, -O0):
<WM_Lock>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
cmpl   $0x0,(%rax)
jne    1152 <WM_Lock+0x42>
mov    -0x8(%rbp),%rax
mov    (%rax),%ecx
add    $0x1,%ecx
mov    %ecx,(%rax)
mov    -0x8(%rbp),%rax
cmpl   $0x1,(%rax)
jne    1147 <WM_Lock+0x37>
add    $0x10,%rsp
pop    %rbp
ret
mov    -0x8(%rbp),%rax
mov    (%rax),%ecx
add    $0xffffffff,%ecx
mov    %ecx,(%rax)
mov    $0x1f4,%edi
call   1030 <usleep@plt>
jmp    111c <WM_Lock+0xc>

x86 assembly (clang, -O2):
<WM_Lock>:
push   %rbx
mov    %rdi,%rbx
cmpl   $0x0,(%rdi)
je     112f <WM_Lock+0x1f>
nopl   0x0(%rax)
mov    $0x1f4,%edi
call   1030 <usleep@plt>
cmpl   $0x0,(%rbx)
jne    1120 <WM_Lock+0x10>
movl   $0x1,(%rbx)
pop    %rbx
ret

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

LLVM IR (-O2):
define void @WM_Lock(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = icmp eq i32 %2, 0
br i1 %3, label %4, label %5
4: ; preds = %5, %1
store i32 1, i32* %0
ret void
5: ; preds = %1, %5
%6 = tail call i32 @usleep(i32 500)
%7 = load i32, i32* %0
%8 = icmp eq i32 %7, 0
br i1 %8, label %4, label %5
}
/* Variables and functions */
int tocol(int);
int torow(int);
int toblk(int idx) { return (torow(idx) / 3) * 3 + tocol(idx) / 3; }


x86 assembly (clang, -O0):
<toblk>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1040 <torow@plt>
mov    $0x3,%ecx
cltd
idiv   %ecx
imul   $0x3,%eax,%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <tocol@plt>
mov    $0x3,%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
mov    -0x8(%rbp),%eax
add    %ecx,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<toblk>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebx
call   1040 <torow@plt>
cltq
imul   $0x55555556,%rax,%rax
mov    %rax,%rcx
shr    $0x3f,%rcx
shr    $0x20,%rax
add    %ecx,%eax
lea    (%rax,%rax,2),%ebp
mov    %ebx,%edi
call   1030 <tocol@plt>
cltq
imul   $0x55555556,%rax,%rax
mov    %rax,%rcx
shr    $0x3f,%rcx
shr    $0x20,%rax
add    %ecx,%eax
add    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @toblk(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @torow(i32 %3)
%5 = sdiv i32 %4, 3
%6 = mul nsw i32 %5, 3
%7 = load i32, i32* %2
%8 = call i32 @tocol(i32 %7)
%9 = sdiv i32 %8, 3
%10 = add nsw i32 %6, %9
ret i32 %10
}

LLVM IR (-O2):
define i32 @toblk(i32 %0) {
%2 = tail call i32 @torow(i32 %0)
%3 = srem i32 %2, 3
%4 = sub i32 %2, %3
%5 = tail call i32 @tocol(i32 %0)
%6 = sdiv i32 %5, 3
%7 = add nsw i32 %4, %6
ret i32 %7
}
/* Type definitions */
typedef scalar_t__ uint32_t;

/* Variables and functions */
__attribute__((__unused__, __always___)) __attribute__((__artificial__)) void
rdtscp(uint32_t *low, uint32_t *high) {
  *low = *high = 0;
}


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

x86 assembly (clang, -O2):
<rdtscp>:
movq   $0x0,(%rsi)
movq   $0x0,(%rdi)
ret

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

LLVM IR (-O2):
define void @rdtscp(i64* nocapture writeonly %0, i64* nocapture writeonly %1) {
store i64 0, i64* %1
store i64 0, i64* %0
ret void
}
long int fattoriale(int n) {
  if (n > 1) {
    return n * fattoriale(n - 1);
  } else
    return 1;
}


x86 assembly (clang, -O0):
<fattoriale>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0xc(%rbp)
cmpl   $0x1,-0xc(%rbp)
jle    114c <fattoriale+0x3c>
movslq -0xc(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0xc(%rbp),%edi
sub    $0x1,%edi
call   1030 <fattoriale@plt>
mov    %rax,%rcx
mov    -0x18(%rbp),%rax
imul   %rcx,%rax
mov    %rax,-0x8(%rbp)
jmp    1154 <fattoriale+0x44>
movq   $0x1,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fattoriale>:
mov    $0x1,%eax
cmp    $0x2,%edi
jl     1131 <fattoriale+0x31>
mov    %edi,%ecx
mov    $0x1,%eax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
imul   %rcx,%rax
lea    -0x1(%rcx),%rdx
cmp    $0x2,%rcx
mov    %rdx,%rcx
ja     1120 <fattoriale+0x20>
ret

LLVM IR (-O0):
define i64 @fattoriale(i32 %0) {
%2 = alloca i64
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = icmp sgt i32 %4, 1
br i1 %5, label %6, label %13
6: ; preds = %1
%7 = load i32, i32* %3
%8 = sext i32 %7 to i64
%9 = load i32, i32* %3
%10 = sub nsw i32 %9, 1
%11 = call i64 @fattoriale(i32 %10)
%12 = mul nsw i64 %8, %11
store i64 %12, i64* %2
br label %14
13: ; preds = %1
store i64 1, i64* %2
br label %14
14: ; preds = %13, %6
%15 = load i64, i64* %2
ret i64 %15
}

LLVM IR (-O2):
define i64 @fattoriale(i32 %0) {
%2 = icmp sgt i32 %0, 1
br i1 %2, label %3, label %11
3: ; preds = %1
%4 = zext i32 %0 to i64
br label %5
5: ; preds = %3, %5
%6 = phi i64 [ %4, %3 ], [ %8, %5 ]
%7 = phi i64 [ 1, %3 ], [ %9, %5 ]
%8 = add nsw i64 %6, -1
%9 = mul nsw i64 %7, %6
%10 = icmp ugt i64 %6, 2
br i1 %10, label %5, label %11
11: ; preds = %5, %1
%12 = phi i64 [ 1, %1 ], [ %9, %5 ]
ret i64 %12
}
/* Variables and functions */
double tc_core_tick2time(unsigned int);
unsigned tc_calc_xmitsize(unsigned rate, unsigned ticks) {
  return ((double)rate * tc_core_tick2time(ticks)) / 1000000000;
}


x86 assembly (clang, -O0):
<tc_calc_xmitsize>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
cvtsi2sd %rax,%xmm0
movsd  %xmm0,-0x10(%rbp)
mov    -0x8(%rbp),%edi
call   1030 <tc_core_tick2time@plt>
movaps %xmm0,%xmm1
movsd  -0x10(%rbp),%xmm0
mulsd  %xmm1,%xmm0
movsd  0xeb9(%rip),%xmm1
divsd  %xmm1,%xmm0
cvttsd2si %xmm0,%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<tc_calc_xmitsize>:
push   %rax
mov    %edi,%eax
cvtsi2sd %rax,%xmm0
movsd  %xmm0,(%rsp)
mov    %esi,%edi
call   1030 <tc_core_tick2time@plt>
mulsd  (%rsp),%xmm0
divsd  0xecf(%rip),%xmm0
cvttsd2si %xmm0,%rax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @tc_calc_xmitsize(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
%6 = uitofp i32 %5 to double
%7 = load i32, i32* %4
%8 = call double @tc_core_tick2time(i32 %7)
%9 = fmul double %6, %8
%10 = fdiv double %9, 1.000000e+09
%11 = fptoui double %10 to i32
ret i32 %11
}

LLVM IR (-O2):
define i32 @tc_calc_xmitsize(i32 %0, i32 %1) {
%3 = uitofp i32 %0 to double
%4 = tail call double @tc_core_tick2time(i32 %1)
%5 = fmul double %4, %3
%6 = fdiv double %5, 1.000000e+09
%7 = fptoui double %6 to i32
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int x, n;
  scanf("%d", &n);
  printf("%d\n", n);
  x = n % 3;
  return x;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
lea    -0xc(%rbp),%rsi
call   1040 <scanf@plt>
mov    -0xc(%rbp),%esi
lea    0xeba(%rip),%rdi
call   1030 <printf@plt>
mov    -0xc(%rbp),%eax
mov    $0x3,%ecx
cltd
idiv   %ecx
mov    %edx,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1040 <scanf@plt>
mov    0x4(%rsp),%esi
lea    0xec6(%rip),%rdi
call   1030 <printf@plt>
movslq 0x4(%rsp),%rax
imul   $0x55555556,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
shr    $0x20,%rcx
add    %edx,%ecx
lea    (%rcx,%rcx,2),%ecx
sub    %ecx,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@.str.1 = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%4 = load i32, i32* %1
%5 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %4)
%6 = load i32, i32* %1
%7 = srem i32 %6, 3
ret i32 %7
}
/* Variables and functions */
float tancotf(float, int /*<<< orphan*/);
float tanf(float x) { return (tancotf(x, 0)); }


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

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

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

LLVM IR (-O2):
define float @tanf(float %0) {
%2 = tail call float @tancotf(float %0, i32 0)
ret float %2
}
void deallocate_matrix(double ***matrix) {
  free((*matrix)[0]);
  free(*matrix);
}


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

x86 assembly (clang, -O2):
<deallocate_matrix>:
push   %rbx
mov    %rdi,%rbx
mov    (%rdi),%rax
mov    (%rax),%rdi
call   1030 <free@plt>
mov    (%rbx),%rdi
pop    %rbx
jmp    1030 <free@plt>

LLVM IR (-O0):
define void @deallocate_matrix(double*** %0) {
%2 = alloca double***
store double*** %0, double**** %2
%3 = load double***, double**** %2
%4 = load double**, double*** %3
%5 = getelementptr inbounds double*, double** %4, i64 0
%6 = load double*, double** %5
%7 = bitcast double* %6 to i8*
%8 = load double***, double**** %2
%9 = load double**, double*** %8
%10 = bitcast double** %9 to i8*
ret void
}

LLVM IR (-O2):
define void @deallocate_matrix(double*** nocapture %0) {
%2 = bitcast double*** %0 to i8***
%3 = load i8**, i8*** %2
%4 = load i8*, i8** %3
tail call void @free(i8* %4)
%5 = bitcast double*** %0 to i8**
%6 = load i8*, i8** %5
tail call void @free(i8* %6)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
extern void shmem_int_get(int *dest, const int *src, size_t len, int pe) {
  printf("\nOpenSHMEM Analyzer\n");
}


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

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

LLVM IR (-O0):
@.str = [21 x i8] c"\0AOpenSHMEM Analyzer\0A\00"
define void @shmem_int_get(i32* %0, i32* %1, i64 %2, i32 %3) {
%5 = alloca i32*
%6 = alloca i32*
%7 = alloca i64
%8 = alloca i32
store i32* %0, i32** %5
store i32* %1, i32** %6
store i64 %2, i64* %7
store i32 %3, i32* %8
%9 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [20 x i8] c"\0AOpenSHMEM Analyzer\00"
define void @shmem_int_get(i32* nocapture readnone %0, i32* nocapture readnone %1, i64 %2, i32 %3) {
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @str, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ time_t;

/* Variables and functions */
int /*<<< orphan*/ gmtime(int /*<<< orphan*/ *);
int /*<<< orphan*/ printf(char *, char *);
int /*<<< orphan*/ strftime(char *, int, char *, int /*<<< orphan*/);
void unixtime(time_t t) {
  static char buf[] = "YYYY-MM-DD HH:MI:SS";
  strftime(buf, sizeof buf, "%Y-%m-%d %H:%M:%S", gmtime(&t));
  printf("%s\n", buf);
}


x86 assembly (clang, -O0):
<unixtime>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
lea    -0x4(%rbp),%rdi
call   1050 <gmtime@plt>
mov    %eax,%ecx
lea    0x2ef3(%rip),%rdi
mov    $0x14,%esi
lea    0xea7(%rip),%rdx
call   1040 <strftime@plt>
lea    0xead(%rip),%rdi
lea    0x2ed4(%rip),%rsi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<unixtime>:
push   %rbx
sub    $0x10,%rsp
mov    %edi,0xc(%rsp)
lea    0xc(%rsp),%rdi
call   1050 <gmtime@plt>
lea    0x2ef6(%rip),%rbx
lea    0xeaf(%rip),%rdx
mov    %rbx,%rdi
mov    $0x14,%esi
mov    %eax,%ecx
call   1040 <strftime@plt>
lea    0xeab(%rip),%rdi
mov    %rbx,%rsi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@unixtime.buf = internal global [20 x i8] c"YYYY-MM-DD HH:MI:SS\00"
@.str = [18 x i8] c"%Y-%m-%d %H:%M:%S\00"
@.str.1 = [4 x i8] c"%s\0A\00"
define void @unixtime(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @gmtime(i32* %2)
%4 = call i32 @strftime(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @unixtime.buf, i64 0, i64 0), i32 20, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i32 %3)
%5 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([20 x i8], [20 x i8]* @unixtime.buf, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@unixtime.buf = internal global [20 x i8] c"YYYY-MM-DD HH:MI:SS\00"
@.str = [18 x i8] c"%Y-%m-%d %H:%M:%S\00"
@.str.1 = [4 x i8] c"%s\0A\00"
define void @unixtime(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @gmtime(i32* %2)
%4 = call i32 @strftime(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @unixtime.buf, i64 0, i64 0), i32 20, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i32 %3)
%5 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([20 x i8], [20 x i8]* @unixtime.buf, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ getchar();
int /*<<< orphan*/ printf(char *, char const *);
int main() {
  const char *prompt = "Press any key: ";
  printf("%s", prompt);
  getchar();
  return (0);
}


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

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

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

LLVM IR (-O2):
@.str = [16 x i8] c"Press any key: \00"
@.str.1 = [3 x i8] c"%s\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 (...) @getchar()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ io_usleep(int);
int /*<<< orphan*/ pic24_nvmcon_write_completion(int, int);
int /*<<< orphan*/ pic24_program_verify();
int /*<<< orphan*/ pic24_six(int, int);
int /*<<< orphan*/ pic24_standby();
void pic24_dsPIC33FJ_erase(void) {
  pic24_program_verify();
  pic24_six(0x2404FA, 0);
  pic24_six(0x883B0A, 0);
  pic24_six(0x200000, 0);
  pic24_six(0x880190, 0);
  pic24_six(0xA8E761, 4);
  io_usleep(240001);
  pic24_nvmcon_write_completion(0x8000, 0x0000);
  pic24_standby();
}


x86 assembly (clang, -O0):
<pic24_dsPIC33FJ_erase>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1060 <pic24_program_verify@plt>
mov    $0x2404fa,%edi
xor    %esi,%esi
call   1070 <pic24_six@plt>
mov    $0x883b0a,%edi
xor    %esi,%esi
call   1070 <pic24_six@plt>
mov    $0x200000,%edi
xor    %esi,%esi
call   1070 <pic24_six@plt>
mov    $0x880190,%edi
xor    %esi,%esi
call   1070 <pic24_six@plt>
mov    $0xa8e761,%edi
mov    $0x4,%esi
call   1070 <pic24_six@plt>
mov    $0x3a981,%edi
call   1050 <io_usleep@plt>
mov    $0x8000,%edi
xor    %esi,%esi
call   1040 <pic24_nvmcon_write_completion@plt>
mov    $0x0,%al
call   1030 <pic24_standby@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<pic24_dsPIC33FJ_erase>:
push   %rax
xor    %eax,%eax
call   1060 <pic24_program_verify@plt>
mov    $0x2404fa,%edi
xor    %esi,%esi
call   1070 <pic24_six@plt>
mov    $0x883b0a,%edi
xor    %esi,%esi
call   1070 <pic24_six@plt>
mov    $0x200000,%edi
xor    %esi,%esi
call   1070 <pic24_six@plt>
mov    $0x880190,%edi
xor    %esi,%esi
call   1070 <pic24_six@plt>
mov    $0xa8e761,%edi
mov    $0x4,%esi
call   1070 <pic24_six@plt>
mov    $0x3a981,%edi
call   1050 <io_usleep@plt>
mov    $0x8000,%edi
xor    %esi,%esi
call   1040 <pic24_nvmcon_write_completion@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <pic24_standby@plt>

LLVM IR (-O0):
define void @pic24_dsPIC33FJ_erase() {
%1 = call i32 (...) @pic24_program_verify()
%2 = call i32 @pic24_six(i32 2360570, i32 0)
%3 = call i32 @pic24_six(i32 8928010, i32 0)
%4 = call i32 @pic24_six(i32 2097152, i32 0)
%5 = call i32 @pic24_six(i32 8913296, i32 0)
%6 = call i32 @pic24_six(i32 11069281, i32 4)
%7 = call i32 @io_usleep(i32 240001)
%8 = call i32 @pic24_nvmcon_write_completion(i32 32768, i32 0)
%9 = call i32 (...) @pic24_standby()
ret void
}

LLVM IR (-O2):
define void @pic24_dsPIC33FJ_erase() {
%1 = tail call i32 (...) @pic24_program_verify()
%2 = tail call i32 @pic24_six(i32 2360570, i32 0)
%3 = tail call i32 @pic24_six(i32 8928010, i32 0)
%4 = tail call i32 @pic24_six(i32 2097152, i32 0)
%5 = tail call i32 @pic24_six(i32 8913296, i32 0)
%6 = tail call i32 @pic24_six(i32 11069281, i32 4)
%7 = tail call i32 @io_usleep(i32 240001)
%8 = tail call i32 @pic24_nvmcon_write_completion(i32 32768, i32 0)
%9 = tail call i32 (...) @pic24_standby()
ret void
}
/* Variables and functions */
int S_IROTH;
int S_IRWXG;
int S_IRWXU;
int S_IXOTH;
int /*<<< orphan*/ mkdir(char *, int);
int /*<<< orphan*/ rmdir(char *);
int execute_rmdir() {
  mkdir("syscalls_dir", S_IRWXU | S_IRWXG | S_IROTH | S_IXOTH);
  rmdir("syscalls_dir");
  return 0;
}


x86 assembly (clang, -O0):
<execute_rmdir>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ebd(%rip),%rax
mov    (%rax),%esi
mov    0x2ea4(%rip),%rax
or     (%rax),%esi
mov    0x2e8b(%rip),%rax
or     (%rax),%esi
mov    0x2e9a(%rip),%rax
or     (%rax),%esi
lea    0xeb1(%rip),%rdi
call   1030 <mkdir@plt>
lea    0xea5(%rip),%rdi
call   1040 <rmdir@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<execute_rmdir>:
push   %rbx
mov    0x2ec0(%rip),%rax
mov    0x2ea9(%rip),%rcx
mov    (%rcx),%esi
or     (%rax),%esi
mov    0x2e8e(%rip),%rax
or     (%rax),%esi
mov    0x2e9d(%rip),%rax
or     (%rax),%esi
lea    0xeb4(%rip),%rbx
mov    %rbx,%rdi
call   1030 <mkdir@plt>
mov    %rbx,%rdi
call   1040 <rmdir@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [13 x i8] c"syscalls_dir\00"
@S_IRWXU = global i32 0
@S_IRWXG = global i32 0
@S_IROTH = global i32 0
@S_IXOTH = global i32 0
define i32 @execute_rmdir() {
%1 = load i32, i32* @S_IRWXU
%2 = load i32, i32* @S_IRWXG
%3 = or i32 %1, %2
%4 = load i32, i32* @S_IROTH
%5 = or i32 %3, %4
%6 = load i32, i32* @S_IXOTH
%7 = or i32 %5, %6
%8 = call i32 @mkdir(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i32 %7)
%9 = call i32 @rmdir(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [13 x i8] c"syscalls_dir\00"
@S_IRWXU = global i32 0
@S_IRWXG = global i32 0
@S_IROTH = global i32 0
@S_IXOTH = global i32 0
define i32 @execute_rmdir() {
%1 = load i32, i32* @S_IRWXU
%2 = load i32, i32* @S_IRWXG
%3 = or i32 %2, %1
%4 = load i32, i32* @S_IROTH
%5 = or i32 %3, %4
%6 = load i32, i32* @S_IXOTH
%7 = or i32 %5, %6
%8 = tail call i32 @mkdir(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i32 %7)
%9 = tail call i32 @rmdir(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ num_primo(int);
int siguientePrimo(int n) {
  if (!num_primo(n))
    return 0;
  else {
    for (; !num_primo(n); ++n)
      ;
    return n;
  }
}


x86 assembly (clang, -O0):
<siguientePrimo>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%edi
call   1030 <num_primo@plt>
cmp    $0x0,%eax
jne    1138 <siguientePrimo+0x28>
movl   $0x0,-0x4(%rbp)
jmp    1173 <siguientePrimo+0x63>
jmp    113d <siguientePrimo+0x2d>
mov    -0x8(%rbp),%edi
call   1030 <num_primo@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
test   $0x1,%al
jne    115a <siguientePrimo+0x4a>
jmp    116d <siguientePrimo+0x5d>
jmp    115f <siguientePrimo+0x4f>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    113d <siguientePrimo+0x2d>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<siguientePrimo>:
push   %rbx
mov    %edi,%ebx
call   1030 <num_primo@plt>
test   %eax,%eax
je     1133 <siguientePrimo+0x23>
nopl   0x0(%rax)
mov    %ebx,%edi
call   1030 <num_primo@plt>
add    $0x1,%ebx
test   %eax,%eax
je     1120 <siguientePrimo+0x10>
add    $0xffffffff,%ebx
jmp    1135 <siguientePrimo+0x25>
xor    %ebx,%ebx
mov    %ebx,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @siguientePrimo(i32 %0) {
%2 = tail call i32 @num_primo(i32 %0)
%3 = icmp eq i32 %2, 0
br i1 %3, label %9, label %4
4: ; preds = %1, %4
%5 = phi i32 [ %8, %4 ], [ %0, %1 ]
%6 = tail call i32 @num_primo(i32 %5)
%7 = icmp eq i32 %6, 0
%8 = add nsw i32 %5, 1
br i1 %7, label %4, label %9
9: ; preds = %4, %1
%10 = phi i32 [ 0, %1 ], [ %5, %4 ]
ret i32 %10
}
void pcp_print_ktables_stats(struct activity *a, int curr) {}


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

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

LLVM IR (-O0):
%struct.activity = type opaque
define void @pcp_print_ktables_stats(%struct.activity* %0, i32 %1) {
%3 = alloca %struct.activity*
%4 = alloca i32
store %struct.activity* %0, %struct.activity** %3
store i32 %1, i32* %4
ret void
}

LLVM IR (-O2):
%struct.activity = type opaque
define void @pcp_print_ktables_stats(%struct.activity* nocapture %0, i32 %1) {
ret void
}
long function(char test[]) { return (long)&test[0]; }


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

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

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

LLVM IR (-O2):
define i64 @function(i8* %0) {
%2 = ptrtoint i8* %0 to i64
ret i64 %2
}
int get_hdg_diff(int heading1, int heading2) {
  int result;
  result = heading1 - heading2;
  if (result < -180) {
    result = 360 + result;
    return result;
  }
  if (result > 180) {
    result = 0 - (360 - result);
  }
  return result;
}


x86 assembly (clang, -O0):
<get_hdg_diff>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%eax
sub    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
cmpl   $0xffffff4c,-0x10(%rbp)
jge    1136 <get_hdg_diff+0x36>
mov    -0x10(%rbp),%eax
add    $0x168,%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1158 <get_hdg_diff+0x58>
cmpl   $0xb4,-0x10(%rbp)
jle    1152 <get_hdg_diff+0x52>
mov    $0x168,%ecx
sub    -0x10(%rbp),%ecx
xor    %eax,%eax
sub    %ecx,%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_hdg_diff>:
sub    %esi,%edi
lea    -0x168(%rdi),%eax
cmp    $0xb5,%edi
cmovl  %edi,%eax
lea    0x168(%rdi),%ecx
cmp    $0xffffff4c,%edi
cmovl  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @get_hdg_diff(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* %4
%8 = load i32, i32* %5
%9 = sub nsw i32 %7, %8
store i32 %9, i32* %6
%10 = load i32, i32* %6
%11 = icmp slt i32 %10, -180
br i1 %11, label %12, label %16
12: ; preds = %2
%13 = load i32, i32* %6
%14 = add nsw i32 360, %13
store i32 %14, i32* %6
%15 = load i32, i32* %6
store i32 %15, i32* %3
br label %25
16: ; preds = %2
%17 = load i32, i32* %6
%18 = icmp sgt i32 %17, 180
br i1 %18, label %19, label %23
19: ; preds = %16
%20 = load i32, i32* %6
%21 = sub nsw i32 360, %20
%22 = sub nsw i32 0, %21
store i32 %22, i32* %6
br label %23
23: ; preds = %19, %16
%24 = load i32, i32* %6
store i32 %24, i32* %3
br label %25
25: ; preds = %23, %12
%26 = load i32, i32* %3
ret i32 %26
}

LLVM IR (-O2):
define i32 @get_hdg_diff(i32 %0, i32 %1) {
%3 = sub nsw i32 %0, %1
%4 = icmp slt i32 %3, -180
%5 = add nsw i32 %3, 360
%6 = icmp sgt i32 %3, 180
%7 = add i32 %3, -360
%8 = select i1 %6, i32 %7, i32 %3
%9 = select i1 %4, i32 %5, i32 %8
ret i32 %9
}
/* Variables and functions */
scalar_t__ floor(double);
double round(double a) {
  int b;
  if (a >= 0.0)
    b = (int)floor(a + 0.5);
  else {
    a = -a;
    b = (int)floor(a + 0.5);
    b = -b;
  }
  return b;
}


x86 assembly (clang, -O0):
<round>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jb     1149 <round+0x39>
movsd  0xec9(%rip),%xmm0
addsd  -0x8(%rbp),%xmm0
call   1030 <floor@plt>
mov    %eax,-0xc(%rbp)
jmp    1187 <round+0x77>
movsd  -0x8(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  0xe8e(%rip),%xmm0
addsd  -0x8(%rbp),%xmm0
call   1030 <floor@plt>
mov    %eax,-0xc(%rbp)
xor    %eax,%eax
sub    -0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
cvtsi2sdl -0xc(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<round>:
push   %rax
xorpd  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jae    1134 <round+0x24>
movsd  0xedd(%rip),%xmm1
subsd  %xmm0,%xmm1
movapd %xmm1,%xmm0
call   1030 <floor@plt>
neg    %eax
jmp    1141 <round+0x31>
addsd  0xec4(%rip),%xmm0
call   1030 <floor@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @round(double %0) {
%2 = alloca double
%3 = alloca i32
store double %0, double* %2
%4 = load double, double* %2
%5 = fcmp oge double %4, 0.000000e+00
br i1 %5, label %6, label %11
6: ; preds = %1
%7 = load double, double* %2
%8 = fadd double %7, 5.000000e-01
%9 = call i64 @floor(double %8)
%10 = trunc i64 %9 to i32
store i32 %10, i32* %3
br label %20
11: ; preds = %1
%12 = load double, double* %2
%13 = fneg double %12
store double %13, double* %2
%14 = load double, double* %2
%15 = fadd double %14, 5.000000e-01
%16 = call i64 @floor(double %15)
%17 = trunc i64 %16 to i32
store i32 %17, i32* %3
%18 = load i32, i32* %3
%19 = sub nsw i32 0, %18
store i32 %19, i32* %3
br label %20
20: ; preds = %11, %6
%21 = load i32, i32* %3
%22 = sitofp i32 %21 to double
ret double %22
}

LLVM IR (-O2):
define double @round(double %0) {
%2 = fcmp ult double %0, 0.000000e+00
br i1 %2, label %7, label %3
3: ; preds = %1
%4 = fadd double %0, 5.000000e-01
%5 = tail call i64 @floor(double %4)
%6 = trunc i64 %5 to i32
br label %12
7: ; preds = %1
%8 = fsub double 5.000000e-01, %0
%9 = tail call i64 @floor(double %8)
%10 = trunc i64 %9 to i32
%11 = sub nsw i32 0, %10
br label %12
12: ; preds = %7, %3
%13 = phi i32 [ %6, %3 ], [ %11, %7 ]
%14 = sitofp i32 %13 to double
ret double %14
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int XSetICFocus() {
  printf("XSetICFocus called\n");
  return 0;
}


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

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

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

LLVM IR (-O2):
@str = [19 x i8] c"XSetICFocus called\00"
define i32 @XSetICFocus() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  int /*<<< orphan*/ *display;
};
typedef TYPE_1__ XReparentEvent;
typedef int /*<<< orphan*/ Display;

/* Variables and functions */
void set_XReparentEvent_display(void *_p, void *_v) {
  ((XReparentEvent *)_p)->display = (Display *)_v;
}


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

x86 assembly (clang, -O2):
<set_XReparentEvent_display>:
mov    %rsi,(%rdi)
ret

LLVM IR (-O0):
%struct.TYPE_2__ = type { i32* }
define void @set_XReparentEvent_display(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %4
%6 = bitcast i8* %5 to i32*
%7 = load i8*, i8** %3
%8 = bitcast i8* %7 to %struct.TYPE_2__*
%9 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %8, i32 0, i32 0
store i32* %6, i32** %9
ret void
}

LLVM IR (-O2):
define void @set_XReparentEvent_display(i8* nocapture writeonly %0, i8* %1) {
%3 = bitcast i8* %0 to i8**
store i8* %1, i8** %3
ret void
}
int add_4(int n) { return n + 4; }


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

x86 assembly (clang, -O2):
<add_4>:
lea    0x4(%rdi),%eax
ret

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

LLVM IR (-O2):
define i32 @add_4(i32 %0) {
%2 = add nsw i32 %0, 4
ret i32 %2
}
int loop_no_dep1(int k) {
  int p = 0;
  int t = 2 + k;
  for (int i = 0; i < 100; i++) {
    p++;
  }
  return p;
}


x86 assembly (clang, -O0):
<loop_no_dep1>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
mov    -0x4(%rbp),%eax
add    $0x2,%eax
mov    %eax,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
cmpl   $0x64,-0x10(%rbp)
jge    113f <loop_no_dep1+0x3f>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    111e <loop_no_dep1+0x1e>
mov    -0x8(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @loop_no_dep1(i32 %0) {
ret i32 100
}
int foo() {
  int *x = 0, *y = 0;
  return *x + *y;
}


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
movq   $0x0,-0x8(%rbp)
movq   $0x0,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
mov    -0x10(%rbp),%rcx
add    (%rcx),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @foo() {
%1 = alloca i32*
%2 = alloca i32*
store i32* null, i32** %1
store i32* null, i32** %2
%3 = load i32*, i32** %1
%4 = load i32, i32* %3
%5 = load i32*, i32** %2
%6 = load i32, i32* %5
%7 = add nsw i32 %4, %6
ret i32 %7
}

LLVM IR (-O2):
define i32 @foo() {
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ fputs(char *, int /*<<< orphan*/);
int /*<<< orphan*/ stdout;
void fred(void) { fputs("\033[0;31m", stdout); }


x86 assembly (clang, -O0):
<fred>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ec5(%rip),%rax
mov    (%rax),%esi
lea    0xedc(%rip),%rdi
call   1030 <fputs@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<fred>:
mov    0x2ec9(%rip),%rax
mov    (%rax),%esi
lea    0xee0(%rip),%rdi
jmp    1030 <fputs@plt>

LLVM IR (-O0):
@.str = [8 x i8] c"\1B[0;31m\00"
@stdout = global i32 0
define void @fred() {
%1 = load i32, i32* @stdout
%2 = call i32 @fputs(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 %1)
ret void
}

LLVM IR (-O2):
@.str = [8 x i8] c"\1B[0;31m\00"
@stdout = global i32 0
define void @fred() {
%1 = load i32, i32* @stdout
%2 = tail call i32 @fputs(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ default_teardown();
int /*<<< orphan*/ input_teardown();
int /*<<< orphan*/ output_teardown();
void io_teardown() {
  default_teardown();
  input_teardown();
  output_teardown();
}


x86 assembly (clang, -O0):
<io_teardown>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <default_teardown@plt>
mov    $0x0,%al
call   1030 <input_teardown@plt>
mov    $0x0,%al
call   1050 <output_teardown@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<io_teardown>:
push   %rax
xor    %eax,%eax
call   1040 <default_teardown@plt>
xor    %eax,%eax
call   1030 <input_teardown@plt>
xor    %eax,%eax
pop    %rcx
jmp    1050 <output_teardown@plt>

LLVM IR (-O0):
define void @io_teardown() {
%1 = call i32 (...) @default_teardown()
%2 = call i32 (...) @input_teardown()
%3 = call i32 (...) @output_teardown()
ret void
}

LLVM IR (-O2):
define void @io_teardown() {
%1 = tail call i32 (...) @default_teardown()
%2 = tail call i32 (...) @input_teardown()
%3 = tail call i32 (...) @output_teardown()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ bones_initialize_target();
int bones_main();
int main(void) {
  bones_initialize_target();
  int bones_return = bones_main();
  return bones_return;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @bones_initialize_target()
%2 = tail call i32 (...) @bones_main()
ret i32 %2
}
void ScaleRowDown4_C() {}


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

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

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

LLVM IR (-O2):
define void @ScaleRowDown4_C() {
ret void
}
int dist_get_size() { return 1; }


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

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

LLVM IR (-O0):
define i32 @dist_get_size() {
ret i32 1
}

LLVM IR (-O2):
define i32 @dist_get_size() {
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ TCIOFLUSH;
int /*<<< orphan*/ tcflush(int, int /*<<< orphan*/);
void usart_flush(int fd) { tcflush(fd, TCIOFLUSH); }


x86 assembly (clang, -O0):
<usart_flush>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
mov    0x2ebb(%rip),%rax
mov    (%rax),%esi
call   1030 <tcflush@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<usart_flush>:
mov    0x2ec9(%rip),%rax
mov    (%rax),%esi
jmp    1030 <tcflush@plt>

LLVM IR (-O0):
@TCIOFLUSH = global i32 0
define void @usart_flush(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = load i32, i32* @TCIOFLUSH
%5 = call i32 @tcflush(i32 %3, i32 %4)
ret void
}

LLVM IR (-O2):
@TCIOFLUSH = global i32 0
define void @usart_flush(i32 %0) {
%2 = load i32, i32* @TCIOFLUSH
%3 = tail call i32 @tcflush(i32 %0, i32 %2)
ret void
}
int auth_globus_has_delegated_credential(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @auth_globus_has_delegated_credential() {
ret i32 0
}
/* Variables and functions */
size_t _max_size(void) { return 0x3fffffff; }


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

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

LLVM IR (-O0):
define i64 @_max_size() {
ret i64 1073741823
}

LLVM IR (-O2):
define i64 @_max_size() {
ret i64 1073741823
}
int test_3(int x, int n) {
  n &= 0x1f;
  x ^= (0x01 << n);
  return x;
}


x86 assembly (clang, -O0):
<test_3>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
and    $0x1f,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%ecx
mov    $0x1,%eax
shl    %cl,%eax
xor    -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @test_3(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = and i32 %5, 31
store i32 %6, i32* %4
%7 = load i32, i32* %4
%8 = shl i32 1, %7
%9 = load i32, i32* %3
%10 = xor i32 %9, %8
store i32 %10, i32* %3
%11 = load i32, i32* %3
ret i32 %11
}

LLVM IR (-O2):
define i32 @test_3(i32 %0, i32 %1) {
%3 = and i32 %1, 31
%4 = shl nuw i32 1, %3
%5 = xor i32 %4, %0
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
scalar_t__ chess_file(int);
char chess_file_char(int square) {
  assert(square >= 0 && square <= 63);
  return (char)chess_file(square) + 97;
}


x86 assembly (clang, -O0):
<chess_file_char>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
xor    %eax,%eax
cmpl   $0x0,-0x4(%rbp)
mov    %al,-0x5(%rbp)
jl     1144 <chess_file_char+0x24>
cmpl   $0x3f,-0x4(%rbp)
setle  %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
mov    -0x4(%rbp),%edi
call   1040 <chess_file@plt>
movsbl %al,%eax
add    $0x61,%eax
movsbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<chess_file_char>:
push   %rbx
mov    %edi,%ebx
xor    %edi,%edi
cmp    $0x40,%ebx
setb   %dil
call   1030 <assert@plt>
mov    %ebx,%edi
call   1040 <chess_file@plt>
add    $0x61,%al
pop    %rbx
ret

LLVM IR (-O0):
define signext i8 @chess_file_char(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp sge i32 %3, 0
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load i32, i32* %2
%7 = icmp sle i32 %6, 63
br label %8
8: ; preds = %5, %1
%9 = phi i1 [ false, %1 ], [ %7, %5 ]
%10 = zext i1 %9 to i32
%11 = call i32 @assert(i32 %10)
%12 = load i32, i32* %2
%13 = call i64 @chess_file(i32 %12)
%14 = trunc i64 %13 to i8
%15 = sext i8 %14 to i32
%16 = add nsw i32 %15, 97
%17 = trunc i32 %16 to i8
ret i8 %17
}

LLVM IR (-O2):
define signext i8 @chess_file_char(i32 %0) {
%2 = icmp ult i32 %0, 64
%3 = zext i1 %2 to i32
%4 = tail call i32 @assert(i32 %3)
%5 = tail call i64 @chess_file(i32 %0)
%6 = trunc i64 %5 to i8
%7 = add i8 %6, 97
ret i8 %7
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int nrf_802154_delayed_trx_transmit(int /*<<< orphan*/ const *, int,
                                    int /*<<< orphan*/, int /*<<< orphan*/,
                                    int /*<<< orphan*/);
bool nrf_802154_transmit_raw_at(const uint8_t *p_data, bool cca, uint32_t t0,
                                uint32_t dt, uint8_t channel) {
  bool result;
  (void)(0x0009UL);
  result = nrf_802154_delayed_trx_transmit(p_data, cca, t0, dt, channel);
  (void)(0x0009UL);
  return result;
}


x86 assembly (clang, -O0):
<nrf_802154_transmit_raw_at>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
mov    %r8d,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
mov    -0x14(%rbp),%ecx
mov    -0x18(%rbp),%r8d
call   1030 <nrf_802154_delayed_trx_transmit@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<nrf_802154_transmit_raw_at>:
jmp    1030 <nrf_802154_delayed_trx_transmit@plt>

LLVM IR (-O0):
define i32 @nrf_802154_transmit_raw_at(i32* %0, i32 %1, i32 %2, i32 %3, i32 %4) {
%6 = alloca i32*
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
store i32* %0, i32** %6
store i32 %1, i32* %7
store i32 %2, i32* %8
store i32 %3, i32* %9
store i32 %4, i32* %10
%12 = load i32*, i32** %6
%13 = load i32, i32* %7
%14 = load i32, i32* %8
%15 = load i32, i32* %9
%16 = load i32, i32* %10
%17 = call i32 @nrf_802154_delayed_trx_transmit(i32* %12, i32 %13, i32 %14, i32 %15, i32 %16)
store i32 %17, i32* %11
%18 = load i32, i32* %11
ret i32 %18
}

LLVM IR (-O2):
define i32 @nrf_802154_transmit_raw_at(i32* %0, i32 %1, i32 %2, i32 %3, i32 %4) {
%6 = tail call i32 @nrf_802154_delayed_trx_transmit(i32* %0, i32 %1, i32 %2, i32 %3, i32 %4)
ret i32 %6
}
float reluFunc(float input) { return (((0) > (input)) ? (0) : (input)); }


x86 assembly (clang, -O0):
<reluFunc>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
xorps  %xmm0,%xmm0
ucomiss -0x4(%rbp),%xmm0
jbe    1123 <reluFunc+0x23>
xorps  %xmm0,%xmm0
movss  %xmm0,-0x8(%rbp)
jmp    112d <reluFunc+0x2d>
movss  -0x4(%rbp),%xmm0
movss  %xmm0,-0x8(%rbp)
movss  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<reluFunc>:
xorps  %xmm1,%xmm1
maxss  %xmm0,%xmm1
movaps %xmm1,%xmm0
ret

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

LLVM IR (-O2):
define float @reluFunc(float %0) {
%2 = fcmp olt float %0, 0.000000e+00
%3 = select i1 %2, float 0.000000e+00, float %0
ret float %3
}
/* Variables and functions */
int __semihost(int, int *);
int semihost_ensure(int fh) { return __semihost((0xb), &fh); }


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

x86 assembly (clang, -O2):
<semihost_ensure>:
push   %rax
mov    %edi,0x4(%rsp)
lea    0x4(%rsp),%rsi
mov    $0xb,%edi
call   1030 <__semihost@plt>
pop    %rcx
ret

LLVM IR (-O0):
define i32 @semihost_ensure(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @__semihost(i32 11, i32* %2)
ret i32 %3
}

LLVM IR (-O2):
define i32 @semihost_ensure(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @__semihost(i32 11, i32* %2)
ret i32 %3
}
int main() { return -2 >= (unsigned long)-1; }


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

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

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

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}