xunge/DecIR huggingface dataset:
long __syscall6(long __n, long __a1, long __a2, long __a3, long __a4, long __a5,
                long __a6) {
  unsigned long __ret;
  register long __r10 __asm__("r10") = __a4;
  register long __r8 __asm__("r8") = __a5;
  register long __r9 __asm__("r9") = __a6;
  __asm__ __volatile__("syscall"
                       : "=a"(__ret)
                       : "a"(__n), "D"(__a1), "S"(__a2), "d"(__a3), "r"(__r10),
                         "r"(__r8), "r"(__r9)
                       : "rcx", "r11", "memory");
  return __ret;
}


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

x86 assembly (clang, -O2):
<__syscall6>:
mov    %r9,%r11
mov    %rdi,%rax
mov    0x8(%rsp),%r9
mov    %rsi,%rdi
mov    %rdx,%rsi
mov    %rcx,%rdx
mov    %r8,%r10
mov    %r11,%r8
syscall
ret

LLVM IR (-O0):
define i64 @__syscall6(i64 %0, i64 %1, i64 %2, i64 %3, i64 %4, i64 %5, i64 %6) {
%8 = alloca i64
%9 = alloca i64
%10 = alloca i64
%11 = alloca i64
%12 = alloca i64
%13 = alloca i64
%14 = alloca i64
%15 = alloca i64
%16 = alloca i64
%17 = alloca i64
%18 = alloca i64
store i64 %0, i64* %8
store i64 %1, i64* %9
store i64 %2, i64* %10
store i64 %3, i64* %11
store i64 %4, i64* %12
store i64 %5, i64* %13
store i64 %6, i64* %14
%19 = load i64, i64* %12
store i64 %19, i64* %16
%20 = load i64, i64* %13
store i64 %20, i64* %17
%21 = load i64, i64* %14
store i64 %21, i64* %18
%22 = load i64, i64* %8
%23 = load i64, i64* %9
%24 = load i64, i64* %10
%25 = load i64, i64* %11
%26 = load i64, i64* %16
%27 = load i64, i64* %17
%28 = load i64, i64* %18
%29 = call i64 asm sideeffect "syscall", "={ax},{ax},{di},{si},{dx},{r10},{r8},{r9},~{rcx},~{r11},~{memory},~{dirflag},~{fpsr},~{flags}"(i64 %22, i64 %23, i64 %24, i64 %25, i64 %26, i64 %27, i64 %28)
store i64 %29, i64* %15
%30 = load i64, i64* %15
ret i64 %30
}

LLVM IR (-O2):
define i64 @__syscall6(i64 %0, i64 %1, i64 %2, i64 %3, i64 %4, i64 %5, i64 %6) {
%8 = tail call i64 asm sideeffect "syscall", "={ax},{ax},{di},{si},{dx},{r10},{r8},{r9},~{rcx},~{r11},~{memory},~{dirflag},~{fpsr},~{flags}"(i64 %0, i64 %1, i64 %2, i64 %3, i64 %4, i64 %5, i64 %6)
ret i64 %8
}
/* Variables and functions */
int test_obstack_alloc();
int test_obstack_printf();
int main(void) {
  int result = 0;
  result |= test_obstack_alloc();
  result |= test_obstack_printf();
  return result;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rbx
xor    %eax,%eax
call   1040 <test_obstack_alloc@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   1030 <test_obstack_printf@plt>
or     %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %2
%3 = call i32 (...) @test_obstack_alloc()
%4 = load i32, i32* %2
%5 = or i32 %4, %3
store i32 %5, i32* %2
%6 = call i32 (...) @test_obstack_printf()
%7 = load i32, i32* %2
%8 = or i32 %7, %6
store i32 %8, i32* %2
%9 = load i32, i32* %2
ret i32 %9
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @test_obstack_alloc()
%2 = tail call i32 (...) @test_obstack_printf()
%3 = or i32 %2, %1
ret i32 %3
}
int f(int b) { return 1 + b; }


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

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

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

LLVM IR (-O2):
define i32 @f(i32 %0) {
%2 = add nsw i32 %0, 1
ret i32 %2
}
int strcmp(const char *cs, const char *ct) {
  unsigned char c1, c2;
  int res = 0;
  do {
    c1 = *cs++;
    c2 = *ct++;
    res = c1 - c2;
    if (res) {
      break;
    }
  } while (c1);
  return res;
}


x86 assembly (clang, -O0):
<strcmp>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x18(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
mov    (%rax),%al
mov    %al,-0x11(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x10(%rbp)
mov    (%rax),%al
mov    %al,-0x12(%rbp)
movzbl -0x11(%rbp),%eax
movzbl -0x12(%rbp),%ecx
sub    %ecx,%eax
mov    %eax,-0x18(%rbp)
cmpl   $0x0,-0x18(%rbp)
je     1157 <strcmp+0x57>
jmp    1166 <strcmp+0x66>
jmp    115c <strcmp+0x5c>
cmpb   $0x0,-0x11(%rbp)
jne    1113 <strcmp+0x13>
mov    -0x18(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<strcmp>:
xor    %ecx,%ecx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movzbl (%rdi,%rcx,1),%edx
movzbl (%rsi,%rcx,1),%r8d
mov    %edx,%eax
sub    %r8d,%eax
jne    1128 <strcmp+0x28>
add    $0x1,%rcx
test   %dl,%dl
jne    1110 <strcmp+0x10>
ret

LLVM IR (-O0):
define i32 @strcmp(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i8
%6 = alloca i8
%7 = alloca i32
store i8* %0, i8** %3
store i8* %1, i8** %4
store i32 0, i32* %7
br label %8
8: ; preds = %24, %2
%9 = load i8*, i8** %3
%10 = getelementptr inbounds i8, i8* %9, i32 1
store i8* %10, i8** %3
%11 = load i8, i8* %9
store i8 %11, i8* %5
%12 = load i8*, i8** %4
%13 = getelementptr inbounds i8, i8* %12, i32 1
store i8* %13, i8** %4
%14 = load i8, i8* %12
store i8 %14, i8* %6
%15 = load i8, i8* %5
%16 = zext i8 %15 to i32
%17 = load i8, i8* %6
%18 = zext i8 %17 to i32
%19 = sub nsw i32 %16, %18
store i32 %19, i32* %7
%20 = load i32, i32* %7
%21 = icmp ne i32 %20, 0
br i1 %21, label %22, label %23
22: ; preds = %8
br label %27
23: ; preds = %8
br label %24
24: ; preds = %23
%25 = load i8, i8* %5
%26 = icmp ne i8 %25, 0
br i1 %26, label %8, label %27
27: ; preds = %24, %22
%28 = load i32, i32* %7
ret i32 %28
}

LLVM IR (-O2):
define i32 @strcmp(i8* nocapture %0, i8* nocapture %1) {
br label %3
3: ; preds = %3, %2
%4 = phi i8* [ %1, %2 ], [ %8, %3 ]
%5 = phi i8* [ %0, %2 ], [ %6, %3 ]
%6 = getelementptr inbounds i8, i8* %5, i64 1
%7 = load i8, i8* %5
%8 = getelementptr inbounds i8, i8* %4, i64 1
%9 = load i8, i8* %4
%10 = zext i8 %7 to i32
%11 = zext i8 %9 to i32
%12 = sub nsw i32 %10, %11
%13 = icmp eq i32 %12, 0
%14 = icmp ne i8 %7, 0
%15 = select i1 %13, i1 %14, i1 false
br i1 %15, label %3, label %16
16: ; preds = %3
ret i32 %12
}
/* Type definitions */
struct _pthread_cleanup_context {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ _unsupported();
void _pthread_cleanup_pop(struct _pthread_cleanup_context *_context,
                          int _execute) {
  _unsupported();
}


x86 assembly (clang, -O0):
<_pthread_cleanup_pop>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    $0x0,%al
call   1030 <_unsupported@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
%struct._pthread_cleanup_context = type { i32 }
define void @_pthread_cleanup_pop(%struct._pthread_cleanup_context* %0, i32 %1) {
%3 = alloca %struct._pthread_cleanup_context*
%4 = alloca i32
store %struct._pthread_cleanup_context* %0, %struct._pthread_cleanup_context** %3
store i32 %1, i32* %4
%5 = call i32 (...) @_unsupported()
ret void
}

LLVM IR (-O2):
%struct._pthread_cleanup_context = type { i32 }
define void @_pthread_cleanup_pop(%struct._pthread_cleanup_context* nocapture readnone %0, i32 %1) {
%3 = tail call i32 (...) @_unsupported()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ foo(int (*)());
void bar() {
  int func();
  foo(func);
}


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

x86 assembly (clang, -O2):
<bar>:
mov    0x2ed1(%rip),%rdi
jmp    1030 <foo@plt>

LLVM IR (-O0):
define void @bar() {
%1 = call i32 @foo(i32 (...)* @func)
ret void
}

LLVM IR (-O2):
define void @bar() {
%1 = tail call i32 @foo(i32 (...)* @func)
ret void
}
void ar_dma_no_ack(int my_cid, int src_bid, int src_cid, unsigned int src_adr,
                   int dst_bid, int dst_cid, unsigned int dst_adr, int size,
                   int ignore_dirty_on_src, int clean_on_dst,
                   int write_through_on_dst) {}


x86 assembly (clang, -O0):
<ar_dma_no_ack>:
push   %rbp
mov    %rsp,%rbp
mov    0x30(%rbp),%eax
mov    0x28(%rbp),%eax
mov    0x20(%rbp),%eax
mov    0x18(%rbp),%eax
mov    0x10(%rbp),%eax
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    %r8d,-0x14(%rbp)
mov    %r9d,-0x18(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @ar_dma_no_ack(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4, i32 %5, i32 %6, i32 %7, i32 %8, i32 %9, i32 %10) {
%12 = alloca i32
%13 = alloca i32
%14 = alloca i32
%15 = alloca i32
%16 = alloca i32
%17 = alloca i32
%18 = alloca i32
%19 = alloca i32
%20 = alloca i32
%21 = alloca i32
%22 = alloca i32
store i32 %0, i32* %12
store i32 %1, i32* %13
store i32 %2, i32* %14
store i32 %3, i32* %15
store i32 %4, i32* %16
store i32 %5, i32* %17
store i32 %6, i32* %18
store i32 %7, i32* %19
store i32 %8, i32* %20
store i32 %9, i32* %21
store i32 %10, i32* %22
ret void
}

LLVM IR (-O2):
define void @ar_dma_no_ack(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4, i32 %5, i32 %6, i32 %7, i32 %8, i32 %9, i32 %10) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ add(double *, double *, double *, int);
int /*<<< orphan*/ mult(double *, double *, double, int);
void avg(double z[], double x[], double y[], int n) {
  add(z, x, y, n);
  mult(z, z, .5, n);
}


x86 assembly (clang, -O0):
<avg>:
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    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x1c(%rbp),%ecx
call   1030 <add@plt>
mov    -0x8(%rbp),%rdi
mov    -0x8(%rbp),%rsi
mov    -0x1c(%rbp),%edx
movsd  0xea2(%rip),%xmm0
call   1040 <mult@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<avg>:
push   %rbp
push   %rbx
push   %rax
mov    %ecx,%ebp
mov    %rdi,%rbx
call   1030 <add@plt>
movsd  0xecb(%rip),%xmm0
mov    %rbx,%rdi
mov    %rbx,%rsi
mov    %ebp,%edx
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1040 <mult@plt>

LLVM IR (-O0):
define void @avg(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 double*, double** %5
%10 = load double*, double** %6
%11 = load double*, double** %7
%12 = load i32, i32* %8
%13 = call i32 @add(double* %9, double* %10, double* %11, i32 %12)
%14 = load double*, double** %5
%15 = load double*, double** %5
%16 = load i32, i32* %8
%17 = call i32 @mult(double* %14, double* %15, double 5.000000e-01, i32 %16)
ret void
}

LLVM IR (-O2):
define void @avg(double* %0, double* %1, double* %2, i32 %3) {
%5 = tail call i32 @add(double* %0, double* %1, double* %2, i32 %3)
%6 = tail call i32 @mult(double* %0, double* %0, double 5.000000e-01, i32 %3)
ret void
}
const char *five_morsecode() {
  char *morsecode;
  morsecode = "di-di-di-di-dit";
  return morsecode;
}


x86 assembly (clang, -O0):
<five_morsecode>:
push   %rbp
mov    %rsp,%rbp
lea    0xef5(%rip),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<five_morsecode>:
lea    0xef9(%rip),%rax
ret

LLVM IR (-O0):
@.str = [16 x i8] c"di-di-di-di-dit\00"
define i8* @five_morsecode() {
%1 = alloca i8*
store i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i8** %1
%2 = load i8*, i8** %1
ret i8* %2
}

LLVM IR (-O2):
@.str = [16 x i8] c"di-di-di-di-dit\00"
define i8* @five_morsecode() {
ret i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0)
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
extern void shmem_longlong_wait_until(long long *ivar, int cmp,
                                      long long cmp_value) {
  printf("\nOpenSHMEM Analyzer\n");
}


x86 assembly (clang, -O0):
<shmem_longlong_wait_until>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
lea    0xed6(%rip),%rdi
call   1030 <printf@plt>
add    $0x20,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [21 x i8] c"\0AOpenSHMEM Analyzer\0A\00"
define void @shmem_longlong_wait_until(i64* %0, i32 %1, i64 %2) {
%4 = alloca i64*
%5 = alloca i32
%6 = alloca i64
store i64* %0, i64** %4
store i32 %1, i32* %5
store i64 %2, i64* %6
%7 = 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_longlong_wait_until(i64* nocapture readnone %0, i32 %1, i64 %2) {
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @str, i64 0, i64 0))
ret void
}
int os_release_spinlock(unsigned int *lock) { return -1; }


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

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

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

LLVM IR (-O2):
define i32 @os_release_spinlock(i32* nocapture readnone %0) {
ret i32 -1
}
/* Variables and functions */
int __builtin_clzl(size_t);
size_t next_power(size_t x) { return 1UL << (64 - __builtin_clzl(x - 1)); }


x86 assembly (clang, -O0):
<next_power>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
sub    $0x1,%rax
bsr    %rax,%rax
xor    $0x3f,%rax
mov    %eax,%ecx
mov    $0x40,%eax
sub    %ecx,%eax
mov    %eax,%eax
mov    %eax,%ecx
mov    $0x1,%eax
shl    %cl,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<next_power>:
add    $0xffffffffffffffff,%rdi
bsr    %rdi,%rcx
xor    $0x3f,%ecx
neg    %cl
mov    $0x1,%eax
shl    %cl,%rax
ret

LLVM IR (-O0):
define i64 @next_power(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = sub i64 %3, 1
%5 = call i64 @llvm.ctlz.i64(i64 %4, i1 true)
%6 = trunc i64 %5 to i32
%7 = sub nsw i32 64, %6
%8 = zext i32 %7 to i64
%9 = shl i64 1, %8
ret i64 %9
}

LLVM IR (-O2):
define i64 @next_power(i64 %0) {
%2 = add i64 %0, -1
%3 = tail call i64 @llvm.ctlz.i64(i64 %2, i1 true)
%4 = sub nuw nsw i64 64, %3
%5 = shl nuw i64 1, %4
ret i64 %5
}
void fget(void) { nsc_assert(0, __func__); }


x86 assembly (clang, -O0):
<fget>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
lea    0xee3(%rip),%rsi
mov    $0x0,%al
call   1030 <nsc_assert@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<fget>:
lea    0xee9(%rip),%rsi
xor    %edi,%edi
xor    %eax,%eax
jmp    1030 <nsc_assert@plt>

LLVM IR (-O0):
@__func__.fget = [5 x i8] c"fget\00"
define void @fget() {
%1 = call i32 (i32, i8*, ...) bitcast (i32 (...)* @nsc_assert to i32 (i32, i8*, ...)*)(i32 0, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @__func__.fget, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@__func__.fget = [5 x i8] c"fget\00"
define void @fget() {
%1 = tail call i32 (i32, i8*, ...) bitcast (i32 (...)* @nsc_assert to i32 (i32, i8*, ...)*)(i32 0, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @__func__.fget, i64 0, i64 0))
ret void
}
void get_topabs(cc1, cc) int *cc1, cc;
{
  int bb, ac;
  def_abs2conc(&bb, cc);
  if (bb == 0) {
    *cc1 = cc;
  } else {
    val_abs2conc(&ac, cc);
    valIth_a2c(cc1, ac, 1);
  }
}


x86 assembly (clang, -O0):
<get_topabs>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%esi
lea    -0x10(%rbp),%rdi
mov    $0x0,%al
call   1030 <def_abs2conc@plt>
cmpl   $0x0,-0x10(%rbp)
jne    1165 <get_topabs+0x35>
mov    -0xc(%rbp),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
jmp    1186 <get_topabs+0x56>
mov    -0xc(%rbp),%esi
lea    -0x14(%rbp),%rdi
mov    $0x0,%al
call   1040 <val_abs2conc@plt>
mov    -0x8(%rbp),%rdi
mov    -0x14(%rbp),%esi
mov    $0x1,%edx
mov    $0x0,%al
call   1050 <valIth_a2c@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_topabs>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebp
mov    %rdi,%rbx
lea    0x4(%rsp),%rdi
xor    %eax,%eax
call   1030 <def_abs2conc@plt>
cmpl   $0x0,0x4(%rsp)
je     116b <get_topabs+0x3b>
mov    %rsp,%rdi
mov    %ebp,%esi
xor    %eax,%eax
call   1040 <val_abs2conc@plt>
mov    (%rsp),%esi
mov    %rbx,%rdi
mov    $0x1,%edx
xor    %eax,%eax
call   1050 <valIth_a2c@plt>
jmp    116d <get_topabs+0x3d>
mov    %ebp,(%rbx)
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
define void @get_topabs(i32* %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = bitcast i32* %3 to i8*
%6 = bitcast i32* %4 to i8*
%7 = call i32 (i32*, i32, ...) bitcast (i32 (...)* @def_abs2conc to i32 (i32*, i32, ...)*)(i32* %3, i32 %1)
%8 = load i32, i32* %3
%9 = icmp eq i32 %8, 0
br i1 %9, label %10, label %11
10: ; preds = %2
store i32 %1, i32* %0
br label %15
11: ; preds = %2
%12 = call i32 (i32*, i32, ...) bitcast (i32 (...)* @val_abs2conc to i32 (i32*, i32, ...)*)(i32* %4, i32 %1)
%13 = load i32, i32* %4
%14 = call i32 (i32*, i32, i32, ...) bitcast (i32 (...)* @valIth_a2c to i32 (i32*, i32, i32, ...)*)(i32* %0, i32 %13, i32 1)
br label %15
15: ; preds = %11, %10
ret void
}
/* Type definitions */
struct katcp_notice {
  int dummy;
};
struct katcp_dispatch {
  int dummy;
};

/* Variables and functions */
int configure_notice_katcp(struct katcp_dispatch *, struct katcp_notice *, int,
                           int /*<<< orphan*/ *);
int trigger_notice_katcp(struct katcp_dispatch *d, struct katcp_notice *n) {
  return configure_notice_katcp(d, n, 1, NULL);
}


x86 assembly (clang, -O0):
<trigger_notice_katcp>:
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    $0x1,%edx
xor    %eax,%eax
mov    %eax,%ecx
call   1030 <configure_notice_katcp@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<trigger_notice_katcp>:
mov    $0x1,%edx
xor    %ecx,%ecx
jmp    1030 <configure_notice_katcp@plt>

LLVM IR (-O0):
%struct.katcp_dispatch = type { i32 }
%struct.katcp_notice = type { i32 }
define i32 @trigger_notice_katcp(%struct.katcp_dispatch* %0, %struct.katcp_notice* %1) {
%3 = alloca %struct.katcp_dispatch*
%4 = alloca %struct.katcp_notice*
store %struct.katcp_dispatch* %0, %struct.katcp_dispatch** %3
store %struct.katcp_notice* %1, %struct.katcp_notice** %4
%5 = load %struct.katcp_dispatch*, %struct.katcp_dispatch** %3
%6 = load %struct.katcp_notice*, %struct.katcp_notice** %4
%7 = call i32 @configure_notice_katcp(%struct.katcp_dispatch* %5, %struct.katcp_notice* %6, i32 1, i32* null)
ret i32 %7
}

LLVM IR (-O2):
%struct.katcp_dispatch = type { i32 }
%struct.katcp_notice = type { i32 }
define i32 @trigger_notice_katcp(%struct.katcp_dispatch* %0, %struct.katcp_notice* %1) {
%3 = tail call i32 @configure_notice_katcp(%struct.katcp_dispatch* %0, %struct.katcp_notice* %1, i32 1, i32* null)
ret i32 %3
}
int fun132() { return 132; }


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

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

LLVM IR (-O0):
define i32 @fun132() {
ret i32 132
}

LLVM IR (-O2):
define i32 @fun132() {
ret i32 132
}
int do_915() { return 915; }


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

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

LLVM IR (-O0):
define i32 @do_915() {
ret i32 915
}

LLVM IR (-O2):
define i32 @do_915() {
ret i32 915
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, long);
int /*<<< orphan*/ stderr;
int socket_version() {
  fprintf(stderr, "Socket Wrapper by Eshin Kunishima\nI love POSIX API. (%l)\n",
          200809L);
  return 0;
}


x86 assembly (clang, -O0):
<socket_version>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ec5(%rip),%rax
mov    (%rax),%edi
lea    0xedc(%rip),%rsi
mov    $0x31069,%edx
call   1030 <fprintf@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<socket_version>:
push   %rax
mov    0x2ec8(%rip),%rax
mov    (%rax),%edi
lea    0xedf(%rip),%rsi
mov    $0x31069,%edx
call   1030 <fprintf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@stderr = global i32 0
@.str = [58 x i8] c"Socket Wrapper by Eshin Kunishima\0AI love POSIX API. (%l)\0A\00"
define i32 @socket_version() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([58 x i8], [58 x i8]* @.str, i64 0, i64 0), i64 200809)
ret i32 0
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [58 x i8] c"Socket Wrapper by Eshin Kunishima\0AI love POSIX API. (%l)\0A\00"
define i32 @socket_version() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([58 x i8], [58 x i8]* @.str, i64 0, i64 0), i64 200809)
ret i32 0
}
int ffi_test() { return 42; }


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

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

LLVM IR (-O0):
define i32 @ffi_test() {
ret i32 42
}

LLVM IR (-O2):
define i32 @ffi_test() {
ret i32 42
}
/* Variables and functions */
int dir_Delimitor();
int asciiDirectoryDelimiter(void) { return dir_Delimitor(); }


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

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

LLVM IR (-O0):
define i32 @asciiDirectoryDelimiter() {
%1 = call i32 (...) @dir_Delimitor()
ret i32 %1
}

LLVM IR (-O2):
define i32 @asciiDirectoryDelimiter() {
%1 = tail call i32 (...) @dir_Delimitor()
ret i32 %1
}
/* Variables and functions */
int /*<<< orphan*/ abms_system(char *);
int /*<<< orphan*/ sprintf(char *, char *, char *, char *, char *, char *);
void abms_symlink(char *src, char *dst) {
  char lcmd[255];
  sprintf(lcmd, "%s%s -s %s %s", "/app/os/sys/bin/", "ln", src, dst);
  abms_system(lcmd);
}


x86 assembly (clang, -O0):
<abms_symlink>:
push   %rbp
mov    %rsp,%rbp
sub    $0x110,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    -0x110(%rbp),%rdi
mov    -0x8(%rbp),%r8
mov    -0x10(%rbp),%r9
lea    0xeb7(%rip),%rsi
lea    0xebe(%rip),%rdx
lea    0xec8(%rip),%rcx
call   1040 <sprintf@plt>
lea    -0x110(%rbp),%rdi
call   1030 <abms_system@plt>
add    $0x110,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<abms_symlink>:
push   %rbx
sub    $0x100,%rsp
mov    %rsi,%r9
mov    %rdi,%r8
lea    0xecb(%rip),%rsi
lea    0xed2(%rip),%rdx
lea    0xedc(%rip),%rcx
mov    %rsp,%rbx
mov    %rbx,%rdi
call   1040 <sprintf@plt>
mov    %rbx,%rdi
call   1030 <abms_system@plt>
add    $0x100,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [14 x i8] c"%s%s -s %s %s\00"
@.str.1 = [17 x i8] c"/app/os/sys/bin/\00"
@.str.2 = [3 x i8] c"ln\00"
define void @abms_symlink(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca [255 x i8]
store i8* %0, i8** %3
store i8* %1, i8** %4
%6 = getelementptr inbounds [255 x i8], [255 x i8]* %5, i64 0, i64 0
%7 = load i8*, i8** %3
%8 = load i8*, i8** %4
%9 = call i32 @sprintf(i8* %6, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i8* %7, i8* %8)
%10 = getelementptr inbounds [255 x i8], [255 x i8]* %5, i64 0, i64 0
%11 = call i32 @abms_system(i8* %10)
ret void
}

LLVM IR (-O2):
@.str = [14 x i8] c"%s%s -s %s %s\00"
@.str.1 = [17 x i8] c"/app/os/sys/bin/\00"
@.str.2 = [3 x i8] c"ln\00"
define void @abms_symlink(i8* %0, i8* %1) {
%3 = alloca [255 x i8]
%4 = getelementptr inbounds [255 x i8], [255 x i8]* %3, i64 0, i64 0
%5 = call i32 @sprintf(i8* %4, i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i8* %0, i8* %1)
%6 = call i32 @abms_system(i8* %4)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ errx(char *);
void usage(void) { errx("./prog -A commbindport -b bindaddr -B bindport"); }


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

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

LLVM IR (-O0):
@.str = [47 x i8] c"./prog -A commbindport -b bindaddr -B bindport\00"
define void @usage() {
%1 = call i32 @errx(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [47 x i8] c"./prog -A commbindport -b bindaddr -B bindport\00"
define void @usage() {
%1 = tail call i32 @errx(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ remove_cols(int, int, char *);
int /*<<< orphan*/ remove_diagonals(int, int, char *);
int /*<<< orphan*/ remove_rows(int, int, char *);
void place_piece(int n, int index, char *board) {
  board[index] = 'q';
  remove_rows(n, index, board);
  remove_cols(n, index, board);
  remove_diagonals(n, index, board);
}


x86 assembly (clang, -O0):
<place_piece>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x8(%rbp),%rcx
movb   $0x71,(%rax,%rcx,1)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    -0x10(%rbp),%rdx
call   1050 <remove_rows@plt>
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    -0x10(%rbp),%rdx
call   1040 <remove_cols@plt>
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    -0x10(%rbp),%rdx
call   1030 <remove_diagonals@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<place_piece>:
push   %rbp
push   %r14
push   %rbx
mov    %rdx,%rbx
mov    %edi,%r14d
movslq %esi,%rbp
movb   $0x71,(%rdx,%rbp,1)
mov    %ebp,%esi
call   1050 <remove_rows@plt>
mov    %r14d,%edi
mov    %ebp,%esi
mov    %rbx,%rdx
call   1040 <remove_cols@plt>
mov    %r14d,%edi
mov    %ebp,%esi
mov    %rbx,%rdx
pop    %rbx
pop    %r14
pop    %rbp
jmp    1030 <remove_diagonals@plt>

LLVM IR (-O0):
define void @place_piece(i32 %0, i32 %1, i8* %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i8*
store i32 %0, i32* %4
store i32 %1, i32* %5
store i8* %2, i8** %6
%7 = load i8*, i8** %6
%8 = load i32, i32* %5
%9 = sext i32 %8 to i64
%10 = getelementptr inbounds i8, i8* %7, i64 %9
store i8 113, i8* %10
%11 = load i32, i32* %4
%12 = load i32, i32* %5
%13 = load i8*, i8** %6
%14 = call i32 @remove_rows(i32 %11, i32 %12, i8* %13)
%15 = load i32, i32* %4
%16 = load i32, i32* %5
%17 = load i8*, i8** %6
%18 = call i32 @remove_cols(i32 %15, i32 %16, i8* %17)
%19 = load i32, i32* %4
%20 = load i32, i32* %5
%21 = load i8*, i8** %6
%22 = call i32 @remove_diagonals(i32 %19, i32 %20, i8* %21)
ret void
}

LLVM IR (-O2):
define void @place_piece(i32 %0, i32 %1, i8* %2) {
%4 = sext i32 %1 to i64
%5 = getelementptr inbounds i8, i8* %2, i64 %4
store i8 113, i8* %5
%6 = tail call i32 @remove_rows(i32 %0, i32 %1, i8* %2)
%7 = tail call i32 @remove_cols(i32 %0, i32 %1, i8* %2)
%8 = tail call i32 @remove_diagonals(i32 %0, i32 %1, i8* %2)
ret void
}
int adds_si_test3(int a, int b, int c) {
  int d = a + (b << 3);
  if (d <= 0)
    return a + c;
  else
    return b + d + c;
}


x86 assembly (clang, -O0):
<adds_si_test3>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x8(%rbp),%eax
mov    -0xc(%rbp),%ecx
shl    $0x3,%ecx
add    %ecx,%eax
mov    %eax,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
jg     1133 <adds_si_test3+0x33>
mov    -0x8(%rbp),%eax
add    -0x10(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    113f <adds_si_test3+0x3f>
mov    -0xc(%rbp),%eax
add    -0x14(%rbp),%eax
add    -0x10(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<adds_si_test3>:
lea    (%rdi,%rsi,8),%ecx
lea    (%rsi,%rcx,1),%eax
test   %ecx,%ecx
cmovle %edi,%eax
add    %edx,%eax
ret

LLVM IR (-O0):
define i32 @adds_si_test3(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i32 %0, i32* %5
store i32 %1, i32* %6
store i32 %2, i32* %7
%9 = load i32, i32* %5
%10 = load i32, i32* %6
%11 = shl i32 %10, 3
%12 = add nsw i32 %9, %11
store i32 %12, i32* %8
%13 = load i32, i32* %8
%14 = icmp sle i32 %13, 0
br i1 %14, label %15, label %19
15: ; preds = %3
%16 = load i32, i32* %5
%17 = load i32, i32* %7
%18 = add nsw i32 %16, %17
store i32 %18, i32* %4
br label %25
19: ; preds = %3
%20 = load i32, i32* %6
%21 = load i32, i32* %8
%22 = add nsw i32 %20, %21
%23 = load i32, i32* %7
%24 = add nsw i32 %22, %23
store i32 %24, i32* %4
br label %25
25: ; preds = %19, %15
%26 = load i32, i32* %4
ret i32 %26
}

LLVM IR (-O2):
define i32 @adds_si_test3(i32 %0, i32 %1, i32 %2) {
%4 = shl i32 %1, 3
%5 = add nsw i32 %4, %0
%6 = icmp slt i32 %5, 1
%7 = add nsw i32 %5, %1
%8 = select i1 %6, i32 %0, i32 %7
%9 = add nsw i32 %8, %2
ret i32 %9
}
void dynamic_dname(void) { nsc_assert(0, __func__); }


x86 assembly (clang, -O0):
<dynamic_dname>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
lea    0xee3(%rip),%rsi
mov    $0x0,%al
call   1030 <nsc_assert@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<dynamic_dname>:
lea    0xee9(%rip),%rsi
xor    %edi,%edi
xor    %eax,%eax
jmp    1030 <nsc_assert@plt>

LLVM IR (-O0):
@__func__.dynamic_dname = [14 x i8] c"dynamic_dname\00"
define void @dynamic_dname() {
%1 = call i32 (i32, i8*, ...) bitcast (i32 (...)* @nsc_assert to i32 (i32, i8*, ...)*)(i32 0, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @__func__.dynamic_dname, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@__func__.dynamic_dname = [14 x i8] c"dynamic_dname\00"
define void @dynamic_dname() {
%1 = tail call i32 (i32, i8*, ...) bitcast (i32 (...)* @nsc_assert to i32 (i32, i8*, ...)*)(i32 0, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @__func__.dynamic_dname, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ __m128i;
typedef int /*<<< orphan*/ __m128;

/* Variables and functions */
int /*<<< orphan*/ _mm_cvttps_epi32(int /*<<< orphan*/);
__m128i test_mm_cvttps_epi32(__m128 A) { return _mm_cvttps_epi32(A); }


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

x86 assembly (clang, -O2):
<test_mm_cvttps_epi32>:
jmp    1030 <_mm_cvttps_epi32@plt>

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

LLVM IR (-O2):
define i32 @test_mm_cvttps_epi32(i32 %0) {
%2 = tail call i32 @_mm_cvttps_epi32(i32 %0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void result(void) { printf("\n\n\tResult:\n\t"); }


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

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

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

LLVM IR (-O2):
@.str = [13 x i8] c"\0A\0A\09Result:\0A\09\00"
define void @result() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
scalar_t__ isspace(char);
int strlen(char *);
void trim(char *str) {
  int i, len = strlen(str);
  for (i = len - 1; isspace(str[i]); i--) {
    str[i] = '\0';
  }
}


x86 assembly (clang, -O0):
<trim>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movsbl (%rax,%rcx,1),%edi
call   1040 <isspace@plt>
cmp    $0x0,%rax
je     1176 <trim+0x56>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movb   $0x0,(%rax,%rcx,1)
mov    -0xc(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0xc(%rbp)
jmp    1141 <trim+0x21>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<trim>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
call   1030 <strlen@plt>
movslq %eax,%r14
movsbl -0x1(%r14,%rbx,1),%edi
call   1040 <isspace@plt>
test   %rax,%rax
je     1165 <trim+0x45>
add    %r14,%rbx
add    $0xffffffffffffffff,%rbx
cs nopw 0x0(%rax,%rax,1)
movb   $0x0,(%rbx)
movsbl -0x1(%rbx),%edi
add    $0xffffffffffffffff,%rbx
call   1040 <isspace@plt>
test   %rax,%rax
jne    1150 <trim+0x30>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define void @trim(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
%4 = alloca i32
store i8* %0, i8** %2
%5 = load i8*, i8** %2
%6 = call i32 @strlen(i8* %5)
store i32 %6, i32* %4
%7 = load i32, i32* %4
%8 = sub nsw i32 %7, 1
store i32 %8, i32* %3
br label %9
9: ; preds = %22, %1
%10 = load i8*, i8** %2
%11 = load i32, i32* %3
%12 = sext i32 %11 to i64
%13 = getelementptr inbounds i8, i8* %10, i64 %12
%14 = load i8, i8* %13
%15 = call i64 @isspace(i8 signext %14)
%16 = icmp ne i64 %15, 0
br i1 %16, label %17, label %25
17: ; preds = %9
%18 = load i8*, i8** %2
%19 = load i32, i32* %3
%20 = sext i32 %19 to i64
%21 = getelementptr inbounds i8, i8* %18, i64 %20
store i8 0, i8* %21
br label %22
22: ; preds = %17
%23 = load i32, i32* %3
%24 = add nsw i32 %23, -1
store i32 %24, i32* %3
br label %9
25: ; preds = %9
ret void
}

LLVM IR (-O2):
define void @trim(i8* %0) {
%2 = tail call i32 @strlen(i8* %0)
%3 = add nsw i32 %2, -1
%4 = sext i32 %3 to i64
%5 = getelementptr inbounds i8, i8* %0, i64 %4
%6 = load i8, i8* %5
%7 = tail call i64 @isspace(i8 signext %6)
%8 = icmp eq i64 %7, 0
br i1 %8, label %17, label %9
9: ; preds = %1, %9
%10 = phi i64 [ %12, %9 ], [ %4, %1 ]
%11 = phi i8* [ %13, %9 ], [ %5, %1 ]
store i8 0, i8* %11
%12 = add i64 %10, -1
%13 = getelementptr inbounds i8, i8* %0, i64 %12
%14 = load i8, i8* %13
%15 = tail call i64 @isspace(i8 signext %14)
%16 = icmp eq i64 %15, 0
br i1 %16, label %17, label %9
17: ; preds = %9, %1
ret void
}
/* Variables and functions */
int _ungetch(int);
int ungetch(int c) { return _ungetch(c); }


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

x86 assembly (clang, -O2):
<ungetch>:
jmp    1030 <_ungetch@plt>

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

LLVM IR (-O2):
define i32 @ungetch(i32 %0) {
%2 = tail call i32 @_ungetch(i32 %0)
ret i32 %2
}
void test_builtin_complex(float i, float j) {
  __emit_expression_range(0, __builtin_complex(i, j));
}


x86 assembly (clang, -O0):
<test_builtin_complex>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  -0x4(%rbp),%xmm1
movss  -0x8(%rbp),%xmm0
movss  %xmm1,-0x10(%rbp)
movss  %xmm0,-0xc(%rbp)
movsd  -0x10(%rbp),%xmm0
xor    %eax,%eax
xor    %edi,%edi
mov    $0x1,%al
call   1030 <__emit_expression_range@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_builtin_complex>:
unpcklps %xmm1,%xmm0
xor    %edi,%edi
mov    $0x1,%al
jmp    1030 <__emit_expression_range@plt>

LLVM IR (-O0):
define void @test_builtin_complex(float %0, float %1) {
%3 = alloca float
%4 = alloca float
%5 = alloca { float, float }
store float %0, float* %3
store float %1, float* %4
%6 = load float, float* %3
%7 = load float, float* %4
%8 = getelementptr inbounds { float, float }, { float, float }* %5, i32 0, i32 0
%9 = getelementptr inbounds { float, float }, { float, float }* %5, i32 0, i32 1
store float %6, float* %8
store float %7, float* %9
%10 = bitcast { float, float }* %5 to <2 x float>*
%11 = load <2 x float>, <2 x float>* %10
%12 = call i32 (i32, <2 x float>, ...) bitcast (i32 (...)* @__emit_expression_range to i32 (i32, <2 x float>, ...)*)(i32 0, <2 x float> %11)
ret void
}

LLVM IR (-O2):
define void @test_builtin_complex(float %0, float %1) {
%3 = insertelement <2 x float> undef, float %0, i64 0
%4 = insertelement <2 x float> %3, float %1, i64 1
%5 = tail call i32 (i32, <2 x float>, ...) bitcast (i32 (...)* @__emit_expression_range to i32 (i32, <2 x float>, ...)*)(i32 0, <2 x float> %4)
ret void
}
/* Variables and functions */
int AMI_i2c_send_w(void *, int, int);
int AMI_HighSpeedMea(void *i2c_hnd) {
  return AMI_i2c_send_w(i2c_hnd, 0x5c, 0xa07e);
}


x86 assembly (clang, -O0):
<AMI_HighSpeedMea>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x5c,%esi
mov    $0xa07e,%edx
call   1030 <AMI_i2c_send_w@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<AMI_HighSpeedMea>:
mov    $0x5c,%esi
mov    $0xa07e,%edx
jmp    1030 <AMI_i2c_send_w@plt>

LLVM IR (-O0):
define i32 @AMI_HighSpeedMea(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @AMI_i2c_send_w(i8* %3, i32 92, i32 41086)
ret i32 %4
}

LLVM IR (-O2):
define i32 @AMI_HighSpeedMea(i8* %0) {
%2 = tail call i32 @AMI_i2c_send_w(i8* %0, i32 92, i32 41086)
ret i32 %2
}
int __syscall1(int call, unsigned long arg0) {
  int rc;
  asm volatile("movl %[call], %%eax	\n"
               "movl %[arg0], %%ebx	\n"
               "int  %[xnum]		\n"
               "movl %%eax, %[rc]	\n"
               : [rc] "=g"(rc)
               : [call] "g"(call), [arg0] "g"(arg0), [xnum] "i"(0x80)
               : "%eax", "%ebx", "memory");
  return rc;
}


x86 assembly (clang, -O0):
<__syscall1>:
push   %rbp
mov    %rsp,%rbp
push   %rbx
mov    %edi,-0xc(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0xc(%rbp),%ecx
mov    -0x18(%rbp),%rax
mov    %ecx,-0x20(%rbp)
mov    %rax,-0x28(%rbp)
mov    -0x20(%rbp),%eax
mov    -0x28(%rbp),%ebx
int    $0x80
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
pop    %rbx
pop    %rbp
ret

x86 assembly (clang, -O2):
LLVM IR (-O0):
define i32 @__syscall1(i32 %0, i64 %1) {
%3 = alloca i32
%4 = alloca i64
%5 = alloca i32
store i32 %0, i32* %3
store i64 %1, i64* %4
%6 = load i32, i32* %3
%7 = load i64, i64* %4
%8 = load i32, i32* %5
ret i32 %8
}

LLVM IR (-O2):
/* Variables and functions */
int /*<<< orphan*/ begin();
void reset_and_start_timer() { begin(); }


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

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

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

LLVM IR (-O2):
define void @reset_and_start_timer() {
%1 = tail call i32 (...) @begin()
ret void
}
__attribute__((no, noclone)) signed __int128 t103_2add(signed __int128 y) {
  signed __int128 x = (1);
  signed __int128 r;
  if (__builtin_add_overflow(x, y, &r))
    bar();
  return r;
}


x86 assembly (clang, -O0):
<t103_2add>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
mov    %rdi,-0x20(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x20(%rbp),%rax
mov    -0x18(%rbp),%rcx
mov    %rcx,-0x28(%rbp)
mov    %rax,-0x30(%rbp)
movq   $0x0,-0x38(%rbp)
movq   $0x1,-0x40(%rbp)
mov    -0x40(%rbp),%rdx
mov    -0x38(%rbp),%rcx
mov    -0x30(%rbp),%rsi
mov    -0x28(%rbp),%rax
add    %rsi,%rdx
adc    %rax,%rcx
seto   %al
mov    %rdx,-0x50(%rbp)
mov    %rcx,-0x48(%rbp)
test   $0x1,%al
jne    116e <t103_2add+0x5e>
jmp    1175 <t103_2add+0x65>
mov    $0x0,%al
call   1030 <bar@plt>
mov    -0x50(%rbp),%rax
mov    -0x48(%rbp),%rcx
mov    %rcx,-0x8(%rbp)
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    -0x8(%rbp),%rdx
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<t103_2add>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
add    $0x1,%rbx
adc    $0x0,%r14
jno    112b <t103_2add+0x1b>
xor    %eax,%eax
call   1030 <bar@plt>
mov    %rbx,%rax
mov    %r14,%rdx
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define { i64, i64 } @t103_2add(i64 %0, i64 %1) {
%3 = alloca i128
%4 = alloca i128
%5 = alloca i128
%6 = alloca i128
%7 = alloca i128
%8 = bitcast i128* %4 to { i64, i64 }*
%9 = getelementptr inbounds { i64, i64 }, { i64, i64 }* %8, i32 0, i32 0
store i64 %0, i64* %9
%10 = getelementptr inbounds { i64, i64 }, { i64, i64 }* %8, i32 0, i32 1
store i64 %1, i64* %10
%11 = load i128, i128* %4
store i128 %11, i128* %5
store i128 1, i128* %6
%12 = load i128, i128* %6
%13 = load i128, i128* %5
%14 = call { i128, i1 } @llvm.sadd.with.overflow.i128(i128 %12, i128 %13)
%15 = extractvalue { i128, i1 } %14, 1
%16 = extractvalue { i128, i1 } %14, 0
store i128 %16, i128* %7
br i1 %15, label %17, label %19
17: ; preds = %2
%18 = call i32 (...) @bar()
br label %19
19: ; preds = %17, %2
%20 = load i128, i128* %7
store i128 %20, i128* %3
%21 = bitcast i128* %3 to { i64, i64 }*
%22 = load { i64, i64 }, { i64, i64 }* %21
ret { i64, i64 } %22
}

LLVM IR (-O2):
define { i64, i64 } @t103_2add(i64 %0, i64 %1) {
%3 = zext i64 %1 to i128
%4 = shl nuw i128 %3, 64
%5 = zext i64 %0 to i128
%6 = or i128 %4, %5
%7 = tail call { i128, i1 } @llvm.sadd.with.overflow.i128(i128 %6, i128 1)
%8 = extractvalue { i128, i1 } %7, 1
%9 = extractvalue { i128, i1 } %7, 0
br i1 %8, label %10, label %12
10: ; preds = %2
%11 = tail call i32 (...) @bar()
br label %12
12: ; preds = %10, %2
%13 = trunc i128 %9 to i64
%14 = lshr i128 %9, 64
%15 = trunc i128 %14 to i64
%16 = insertvalue { i64, i64 } poison, i64 %13, 0
%17 = insertvalue { i64, i64 } %16, i64 %15, 1
ret { i64, i64 } %17
}
int is_empty(char *s) {
  while (*s) {
    if ((*s) != ' ' && (*s) != '\t')
      return 0;
    s++;
  }
  return 1;
}


x86 assembly (clang, -O0):
<is_empty>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
cmpb   $0x0,(%rax)
je     1152 <is_empty+0x52>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x20,%eax
je     1141 <is_empty+0x41>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x9,%eax
je     1141 <is_empty+0x41>
movl   $0x0,-0x4(%rbp)
jmp    1159 <is_empty+0x59>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1108 <is_empty+0x8>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_empty>:
jmp    1114 <is_empty+0x14>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
add    $0x1,%rdi
movzbl (%rdi),%eax
cmp    $0x9,%al
je     1110 <is_empty+0x10>
cmp    $0x20,%al
je     1110 <is_empty+0x10>
test   %al,%al
jne    1129 <is_empty+0x29>
mov    $0x1,%eax
ret
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @is_empty(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
store i8* %0, i8** %3
br label %4
4: ; preds = %19, %1
%5 = load i8*, i8** %3
%6 = load i8, i8* %5
%7 = icmp ne i8 %6, 0
br i1 %7, label %8, label %22
8: ; preds = %4
%9 = load i8*, i8** %3
%10 = load i8, i8* %9
%11 = sext i8 %10 to i32
%12 = icmp ne i32 %11, 32
br i1 %12, label %13, label %19
13: ; preds = %8
%14 = load i8*, i8** %3
%15 = load i8, i8* %14
%16 = sext i8 %15 to i32
%17 = icmp ne i32 %16, 9
br i1 %17, label %18, label %19
18: ; preds = %13
store i32 0, i32* %2
br label %23
19: ; preds = %13, %8
%20 = load i8*, i8** %3
%21 = getelementptr inbounds i8, i8* %20, i32 1
store i8* %21, i8** %3
br label %4
22: ; preds = %4
store i32 1, i32* %2
br label %23
23: ; preds = %22, %18
%24 = load i32, i32* %2
ret i32 %24
}

LLVM IR (-O2):
define i32 @is_empty(i8* nocapture %0) {
br label %2
2: ; preds = %5, %1
%3 = phi i8* [ %0, %1 ], [ %6, %5 ]
%4 = load i8, i8* %3
switch i8 %4, label %7 [
i8 0, label %8
i8 32, label %5
i8 9, label %5
]
5: ; preds = %2, %2
%6 = getelementptr inbounds i8, i8* %3, i64 1
br label %2
7: ; preds = %2
br label %8
8: ; preds = %2, %7
%9 = phi i32 [ 0, %7 ], [ 1, %2 ]
ret i32 %9
}
/* Type definitions */
typedef int /*<<< orphan*/ val;

/* Variables and functions */
int /*<<< orphan*/ memcpy(void *, void *, int);
void copy_int(int val, void *buf, int maxbytes) {
  if ((unsigned)maxbytes > sizeof(val)) {
    memcpy(buf, (void *)&val, sizeof(val));
  }
}


x86 assembly (clang, -O0):
<copy_int>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    $0x4,%rax
jbe    1141 <copy_int+0x31>
mov    -0x10(%rbp),%rdi
lea    -0x4(%rbp),%rsi
mov    $0x4,%edx
call   1030 <memcpy@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<copy_int>:
push   %rax
mov    %edi,0x4(%rsp)
cmp    $0x5,%edx
jb     112f <copy_int+0x1f>
lea    0x4(%rsp),%rax
mov    %rsi,%rdi
mov    %rax,%rsi
mov    $0x4,%edx
call   1030 <memcpy@plt>
pop    %rax
ret

LLVM IR (-O0):
define void @copy_int(i32 %0, i8* %1, i32 %2) {
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i32
store i32 %0, i32* %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%7 = load i32, i32* %6
%8 = zext i32 %7 to i64
%9 = icmp ugt i64 %8, 4
br i1 %9, label %10, label %14
10: ; preds = %3
%11 = load i8*, i8** %5
%12 = bitcast i32* %4 to i8*
%13 = call i32 @memcpy(i8* %11, i8* %12, i32 4)
br label %14
14: ; preds = %10, %3
ret void
}

LLVM IR (-O2):
define void @copy_int(i32 %0, i8* %1, i32 %2) {
%4 = alloca i32
store i32 %0, i32* %4
%5 = icmp ugt i32 %2, 4
br i1 %5, label %6, label %9
6: ; preds = %3
%7 = bitcast i32* %4 to i8*
%8 = call i32 @memcpy(i8* %1, i8* %7, i32 4)
br label %9
9: ; preds = %6, %3
ret void
}
/* Variables and functions */
int cplml_vi_platform_deinit();
int cplml_vi_deinit(void) { return cplml_vi_platform_deinit(); }


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

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

LLVM IR (-O0):
define i32 @cplml_vi_deinit() {
%1 = call i32 (...) @cplml_vi_platform_deinit()
ret i32 %1
}

LLVM IR (-O2):
define i32 @cplml_vi_deinit() {
%1 = tail call i32 (...) @cplml_vi_platform_deinit()
ret i32 %1
}
/* Variables and functions */
int core_connection_get_timeout(size_t data_size) {
  return 2000 + data_size * 10;
}


x86 assembly (clang, -O0):
<core_connection_get_timeout>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
imul   $0xa,-0x8(%rbp),%rax
add    $0x7d0,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<core_connection_get_timeout>:
lea    (%rdi,%rdi,4),%eax
add    %eax,%eax
add    $0x7d0,%eax
ret

LLVM IR (-O0):
define i32 @core_connection_get_timeout(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = mul i64 %3, 10
%5 = add i64 2000, %4
%6 = trunc i64 %5 to i32
ret i32 %6
}

LLVM IR (-O2):
define i32 @core_connection_get_timeout(i64 %0) {
%2 = trunc i64 %0 to i32
%3 = mul i32 %2, 10
%4 = add i32 %3, 2000
ret i32 %4
}