#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */

/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
void print_bench(unsigned long long *l, size_t llen) {
  size_t i;
  for (i = 0; i < llen - 1; i++) {
    l[i] = l[i + 1] - l[i];
    printf("%llu", l[i] / 50);
    if (i < llen - 2)
      printf(" ");
  }
  printf("\n");
}


x86 assembly (clang, -O0):
<print_bench>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movq   $0x0,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    -0x10(%rbp),%rcx
sub    $0x1,%rcx
cmp    %rcx,%rax
jae    11c2 <print_bench+0xb2>
mov    -0x8(%rbp),%rax
mov    -0x18(%rbp),%rcx
mov    0x8(%rax,%rcx,8),%rdx
mov    -0x8(%rbp),%rax
mov    -0x18(%rbp),%rcx
sub    (%rax,%rcx,8),%rdx
mov    -0x8(%rbp),%rax
mov    -0x18(%rbp),%rcx
mov    %rdx,(%rax,%rcx,8)
mov    -0x8(%rbp),%rax
mov    -0x18(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
mov    $0x32,%ecx
xor    %edx,%edx
div    %rcx
mov    %rax,%rsi
lea    0xe7e(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x18(%rbp),%rax
mov    -0x10(%rbp),%rcx
sub    $0x2,%rcx
cmp    %rcx,%rax
jae    11ac <print_bench+0x9c>
lea    0xe60(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    11b1 <print_bench+0xa1>
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
jmp    1128 <print_bench+0x18>
lea    0xe3e(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_bench>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
mov    %rsi,%r12
add    $0xffffffffffffffff,%r12
je     119b <print_bench+0x7b>
mov    %rsi,%r14
mov    %rdi,%rbx
add    $0xfffffffffffffffe,%r14
lea    0xebb(%rip),%r15
xor    %r13d,%r13d
jmp    1155 <print_bench+0x35>
nopw   0x0(%rax,%rax,1)
cmp    %r13,%r12
je     119b <print_bench+0x7b>
mov    %r13,%rbp
add    $0x1,%r13
mov    0x8(%rbx,%rbp,8),%rax
sub    (%rbx,%rbp,8),%rax
mov    %rax,(%rbx,%rbp,8)
shr    %rax
movabs $0xa3d70a3d70a3d70b,%rcx
0a d7 a3
mul    %rcx
shr    $0x4,%rdx
mov    %r15,%rdi
mov    %rdx,%rsi
xor    %eax,%eax
call   1040 <printf@plt>
cmp    %r14,%rbp
jae    1150 <print_bench+0x30>
mov    $0x20,%edi
call   1030 <putchar@plt>
jmp    1150 <print_bench+0x30>
mov    $0xa,%edi
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    1030 <putchar@plt>

LLVM IR (-O0):
@.str = [5 x i8] c"%llu\00"
@.str.1 = [2 x i8] c" \00"
@.str.2 = [2 x i8] c"\0A\00"
define void @print_bench(i64* %0, i64 %1) {
%3 = alloca i64*
%4 = alloca i64
%5 = alloca i64
store i64* %0, i64** %3
store i64 %1, i64* %4
store i64 0, i64* %5
br label %6
6: ; preds = %38, %2
%7 = load i64, i64* %5
%8 = load i64, i64* %4
%9 = sub i64 %8, 1
%10 = icmp ult i64 %7, %9
br i1 %10, label %11, label %41
11: ; preds = %6
%12 = load i64*, i64** %3
%13 = load i64, i64* %5
%14 = add i64 %13, 1
%15 = getelementptr inbounds i64, i64* %12, i64 %14
%16 = load i64, i64* %15
%17 = load i64*, i64** %3
%18 = load i64, i64* %5
%19 = getelementptr inbounds i64, i64* %17, i64 %18
%20 = load i64, i64* %19
%21 = sub i64 %16, %20
%22 = load i64*, i64** %3
%23 = load i64, i64* %5
%24 = getelementptr inbounds i64, i64* %22, i64 %23
store i64 %21, i64* %24
%25 = load i64*, i64** %3
%26 = load i64, i64* %5
%27 = getelementptr inbounds i64, i64* %25, i64 %26
%28 = load i64, i64* %27
%29 = udiv i64 %28, 50
%30 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i64 %29)
%31 = load i64, i64* %5
%32 = load i64, i64* %4
%33 = sub i64 %32, 2
%34 = icmp ult i64 %31, %33
br i1 %34, label %35, label %37
35: ; preds = %11
%36 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
br label %37
37: ; preds = %35, %11
br label %38
38: ; preds = %37
%39 = load i64, i64* %5
%40 = add i64 %39, 1
store i64 %40, i64* %5
br label %6
41: ; preds = %6
%42 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [5 x i8] c"%llu\00"
define void @print_bench(i64* nocapture %0, i64 %1) {
%3 = add i64 %1, -1
%4 = icmp eq i64 %3, 0
br i1 %4, label %22, label %5
5: ; preds = %2
%6 = add i64 %1, -2
br label %7
7: ; preds = %5, %20
%8 = phi i64 [ 0, %5 ], [ %9, %20 ]
%9 = add nuw i64 %8, 1
%10 = getelementptr inbounds i64, i64* %0, i64 %9
%11 = load i64, i64* %10
%12 = getelementptr inbounds i64, i64* %0, i64 %8
%13 = load i64, i64* %12
%14 = sub i64 %11, %13
store i64 %14, i64* %12
%15 = udiv i64 %14, 50
%16 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i64 %15)
%17 = icmp ult i64 %8, %6
br i1 %17, label %18, label %20
18: ; preds = %7
%19 = tail call i32 @putchar(i32 32)
br label %20
20: ; preds = %7, %18
%21 = icmp eq i64 %9, %3
br i1 %21, label %22, label %7
22: ; preds = %20, %2
%23 = tail call i32 @putchar(i32 10)
ret void
}