writetimes(t, n) float *t;
int n;
{
  int i, nl = (n + 2) / 3;
  printf("\t\tTime information frame by frame\n");
  printf("frame    time        frame    time        frame    time\n");
  for (i = 1; i <= nl; i++) {
    printf(" %2d   %10.3e      ", i, t[i - 1]);
    if (i + nl <= n)
      printf("%2d   %10.3e      ", i + nl, t[i + nl - 1]);
    if (i + 2 * nl <= n)
      printf("%2d   %10.3e\n", i + 2 * nl, t[i + 2 * nl - 1]);
    else
      printf("\n");
  }
  printf("\n");
}


x86 assembly (clang, -O0):
<writetimes>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x2,%eax
mov    $0x3,%ecx
cltd
idiv   %ecx
mov    %eax,-0x1c(%rbp)
lea    0xec9(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xede(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x1,-0x18(%rbp)
mov    -0x18(%rbp),%eax
cmp    -0x1c(%rbp),%eax
jg     1233 <writetimes+0x123>
mov    -0x18(%rbp),%esi
mov    -0x10(%rbp),%rax
mov    -0x18(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
movss  (%rax,%rcx,4),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xedd(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
mov    -0x18(%rbp),%eax
add    -0x1c(%rbp),%eax
cmp    -0x14(%rbp),%eax
jg     11c2 <writetimes+0xb2>
mov    -0x18(%rbp),%esi
add    -0x1c(%rbp),%esi
mov    -0x10(%rbp),%rax
mov    -0x18(%rbp),%ecx
add    -0x1c(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
movss  (%rax,%rcx,4),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xea2(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
mov    -0x18(%rbp),%eax
mov    -0x1c(%rbp),%ecx
shl    $0x1,%ecx
add    %ecx,%eax
cmp    -0x14(%rbp),%eax
jg     1212 <writetimes+0x102>
mov    -0x18(%rbp),%esi
mov    -0x1c(%rbp),%eax
shl    $0x1,%eax
add    %eax,%esi
mov    -0x10(%rbp),%rax
mov    -0x18(%rbp),%ecx
mov    -0x1c(%rbp),%edx
shl    $0x1,%edx
add    %edx,%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
movss  (%rax,%rcx,4),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xe6a(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
jmp    1220 <writetimes+0x110>
lea    0xe63(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1225 <writetimes+0x115>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    1153 <writetimes+0x43>
lea    0xe42(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<writetimes>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x18,%rsp
mov    %esi,%r14d
mov    %rdi,%rbx
lea    0xed7(%rip),%rdi
call   1040 <puts@plt>
lea    0xeed(%rip),%rdi
call   1040 <puts@plt>
test   %r14d,%r14d
jle    124f <writetimes+0x11f>
lea    0x2(%r14),%eax
cltq
imul   $0x55555556,%rax,%rcx
mov    %rcx,%rax
shr    $0x3f,%rax
shr    $0x20,%rcx
add    %eax,%ecx
movslq %ecx,%rbp
add    %ecx,%ecx
mov    %r14d,%r15d
movslq %ecx,%r12
cmp    $0x2,%ebp
mov    $0x1,%r14d
cmovge %ebp,%r14d
lea    (%rbx,%r12,4),%rax
mov    %rax,0x8(%rsp)
or     $0x1,%rcx
mov    %rcx,0x10(%rsp)
or     $0x1,%r12
lea    (%rbx,%rbp,4),%rax
mov    %rax,(%rsp)
add    $0x1,%rbp
xor    %r13d,%r13d
jmp    11d3 <writetimes+0xa3>
xchg   %ax,%ax
mov    $0xa,%edi
call   1030 <putchar@plt>
add    $0x1,%r13
cmp    %r13,%r14
je     124f <writetimes+0x11f>
movss  (%rbx,%r13,4),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0x1(%r13),%esi
lea    0xe18(%rip),%rdi
mov    $0x1,%al
call   1050 <printf@plt>
mov    %rbp,%rax
add    %r13,%rax
cmp    %r15,%rax
jg     121b <writetimes+0xeb>
mov    (%rsp),%rax
movss  (%rax,%r13,4),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0x0(%rbp,%r13,1),%esi
lea    0xded(%rip),%rdi
mov    $0x1,%al
call   1050 <printf@plt>
lea    (%r12,%r13,1),%rax
cmp    %r15,%rax
jg     11c0 <writetimes+0x90>
mov    0x8(%rsp),%rax
movss  (%rax,%r13,4),%xmm0
cvtss2sd %xmm0,%xmm0
mov    0x10(%rsp),%rax
lea    (%rax,%r13,1),%esi
lea    0xdd1(%rip),%rdi
mov    $0x1,%al
call   1050 <printf@plt>
jmp    11ca <writetimes+0x9a>
mov    $0xa,%edi
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    1030 <putchar@plt>

LLVM IR (-O0):
@.str = [35 x i8] c"\09\09Time information frame by frame\0A\00"
@.str.1 = [57 x i8] c"frame time frame time frame time\0A\00"
@.str.2 = [20 x i8] c" %2d %10.3e \00"
@.str.3 = [19 x i8] c"%2d %10.3e \00"
@.str.4 = [14 x i8] c"%2d %10.3e\0A\00"
@.str.5 = [2 x i8] c"\0A\00"
define i32 @writetimes(float* %0, i32 %1) {
%3 = alloca i32
%4 = alloca float*
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
store float* %0, float** %4
store i32 %1, i32* %5
%8 = load i32, i32* %5
%9 = add nsw i32 %8, 2
%10 = sdiv i32 %9, 3
store i32 %10, i32* %7
%11 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0))
%12 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([57 x i8], [57 x i8]* @.str.1, i64 0, i64 0))
store i32 1, i32* %6
br label %13
13: ; preds = %72, %2
%14 = load i32, i32* %6
%15 = load i32, i32* %7
%16 = icmp sle i32 %14, %15
br i1 %16, label %17, label %75
17: ; preds = %13
%18 = load i32, i32* %6
%19 = load float*, float** %4
%20 = load i32, i32* %6
%21 = sub nsw i32 %20, 1
%22 = sext i32 %21 to i64
%23 = getelementptr inbounds float, float* %19, i64 %22
%24 = load float, float* %23
%25 = fpext float %24 to double
%26 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.2, i64 0, i64 0), i32 %18, double %25)
%27 = load i32, i32* %6
%28 = load i32, i32* %7
%29 = add nsw i32 %27, %28
%30 = load i32, i32* %5
%31 = icmp sle i32 %29, %30
br i1 %31, label %32, label %46
32: ; preds = %17
%33 = load i32, i32* %6
%34 = load i32, i32* %7
%35 = add nsw i32 %33, %34
%36 = load float*, float** %4
%37 = load i32, i32* %6
%38 = load i32, i32* %7
%39 = add nsw i32 %37, %38
%40 = sub nsw i32 %39, 1
%41 = sext i32 %40 to i64
%42 = getelementptr inbounds float, float* %36, i64 %41
%43 = load float, float* %42
%44 = fpext float %43 to double
%45 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.3, i64 0, i64 0), i32 %35, double %44)
br label %46
46: ; preds = %32, %17
%47 = load i32, i32* %6
%48 = load i32, i32* %7
%49 = mul nsw i32 2, %48
%50 = add nsw i32 %47, %49
%51 = load i32, i32* %5
%52 = icmp sle i32 %50, %51
br i1 %52, label %53, label %69
53: ; preds = %46
%54 = load i32, i32* %6
%55 = load i32, i32* %7
%56 = mul nsw i32 2, %55
%57 = add nsw i32 %54, %56
%58 = load float*, float** %4
%59 = load i32, i32* %6
%60 = load i32, i32* %7
%61 = mul nsw i32 2, %60
%62 = add nsw i32 %59, %61
%63 = sub nsw i32 %62, 1
%64 = sext i32 %63 to i64
%65 = getelementptr inbounds float, float* %58, i64 %64
%66 = load float, float* %65
%67 = fpext float %66 to double
%68 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.4, i64 0, i64 0), i32 %57, double %67)
br label %71
69: ; preds = %46
%70 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.5, i64 0, i64 0))
br label %71
71: ; preds = %69, %53
br label %72
72: ; preds = %71
%73 = load i32, i32* %6
%74 = add nsw i32 %73, 1
store i32 %74, i32* %6
br label %13
75: ; preds = %13
%76 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.5, i64 0, i64 0))
%77 = load i32, i32* %3
ret i32 %77
}

LLVM IR (-O2):
@.str.2 = [20 x i8] c" %2d %10.3e \00"
@.str.3 = [19 x i8] c"%2d %10.3e \00"
@.str.4 = [14 x i8] c"%2d %10.3e\0A\00"
@str = [34 x i8] c"\09\09Time information frame by frame\00"
@str.6 = [56 x i8] c"frame time frame time frame time\00"
define i32 @writetimes(float* nocapture %0, i32 %1) {
%3 = add nsw i32 %1, 2
%4 = sdiv i32 %3, 3
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([34 x i8], [34 x i8]* @str, i64 0, i64 0))
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([56 x i8], [56 x i8]* @str.6, i64 0, i64 0))
%7 = icmp slt i32 %1, 1
br i1 %7, label %48, label %8
8: ; preds = %2
%9 = shl nsw i32 %4, 1
%10 = sext i32 %4 to i64
%11 = zext i32 %1 to i64
%12 = sext i32 %9 to i64
%13 = call i32 @llvm.smax.i32(i32 %4, i32 1)
%14 = add nuw nsw i32 %13, 1
%15 = zext i32 %14 to i64
br label %16
16: ; preds = %8, %45
%17 = phi i64 [ 1, %8 ], [ %46, %45 ]
%18 = add nsw i64 %17, -1
%19 = getelementptr inbounds float, float* %0, i64 %18
%20 = load float, float* %19
%21 = fpext float %20 to double
%22 = trunc i64 %17 to i32
%23 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str.2, i64 0, i64 0), i32 %22, double %21)
%24 = add nsw i64 %17, %10
%25 = icmp sgt i64 %24, %11
br i1 %25, label %33, label %26
26: ; preds = %16
%27 = add nsw i64 %24, -1
%28 = getelementptr inbounds float, float* %0, i64 %27
%29 = load float, float* %28
%30 = fpext float %29 to double
%31 = trunc i64 %24 to i32
%32 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str.3, i64 0, i64 0), i32 %31, double %30)
br label %33
33: ; preds = %26, %16
%34 = add nsw i64 %17, %12
%35 = icmp sgt i64 %34, %11
br i1 %35, label %43, label %36
36: ; preds = %33
%37 = add nsw i64 %34, -1
%38 = getelementptr inbounds float, float* %0, i64 %37
%39 = load float, float* %38
%40 = fpext float %39 to double
%41 = trunc i64 %34 to i32
%42 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str.4, i64 0, i64 0), i32 %41, double %40)
br label %45
43: ; preds = %33
%44 = tail call i32 @putchar(i32 10)
br label %45
45: ; preds = %36, %43
%46 = add nuw nsw i64 %17, 1
%47 = icmp eq i64 %46, %15
br i1 %47, label %48, label %16
48: ; preds = %45, %2
%49 = tail call i32 @putchar(i32 10)
ret i32 undef
}