void fvecdump(vec, len, head) float *vec;
int len;
char *head;
{
  register int i, j, count;
  int lenmod, lenrem;
  lenmod = len / 6;
  lenrem = len - lenmod * 6;
  printf("%s\n", head);
  count = 0;
  for (j = 0; j < lenmod; j++) {
    printf("%3d|", count);
    for (i = 0; i < 6; i++, vec++, count++)
      printf("%12.4e", *vec);
    printf("\n");
  }
  if (lenrem) {
    printf("%3d|", count);
    for (i = 0; i < lenrem; i++, vec++)
      printf("%12.4e", *vec);
    printf("\n");
  }
  printf("\n");
}


x86 assembly (clang, -O0):
<fvecdump>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0xc(%rbp),%eax
mov    $0x6,%ecx
cltd
idiv   %ecx
mov    %eax,-0x28(%rbp)
mov    -0xc(%rbp),%eax
imul   $0x6,-0x28(%rbp),%ecx
sub    %ecx,%eax
mov    %eax,-0x2c(%rbp)
mov    -0x18(%rbp),%rsi
lea    0xeb8(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x24(%rbp)
movl   $0x0,-0x20(%rbp)
mov    -0x20(%rbp),%eax
cmp    -0x28(%rbp),%eax
jge    11e4 <fvecdump+0xd4>
mov    -0x24(%rbp),%esi
lea    0xe91(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x1c(%rbp)
cmpl   $0x6,-0x1c(%rbp)
jge    11c8 <fvecdump+0xb8>
mov    -0x8(%rbp),%rax
movss  (%rax),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xe6b(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
mov    -0x8(%rbp),%rax
add    $0x4,%rax
mov    %rax,-0x8(%rbp)
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    1181 <fvecdump+0x71>
lea    0xe33(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x20(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20(%rbp)
jmp    115d <fvecdump+0x4d>
cmpl   $0x0,-0x2c(%rbp)
je     1254 <fvecdump+0x144>
mov    -0x24(%rbp),%esi
lea    0xe0c(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
cmp    -0x2c(%rbp),%eax
jge    1246 <fvecdump+0x136>
mov    -0x8(%rbp),%rax
movss  (%rax),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xde4(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
mov    -0x8(%rbp),%rax
add    $0x4,%rax
mov    %rax,-0x8(%rbp)
jmp    1206 <fvecdump+0xf6>
lea    0xdb5(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xda7(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fvecdump>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
mov    %rdi,%rbx
movslq %esi,%r14
imul   $0x2aaaaaab,%r14,%r13
mov    %r13,%rax
shr    $0x3f,%rax
shr    $0x20,%r13
add    %eax,%r13d
lea    0x0(%r13,%r13,1),%eax
lea    (%rax,%rax,2),%eax
mov    %r14d,%r12d
sub    %eax,%r12d
mov    %rdx,%rdi
call   1040 <puts@plt>
xor    %ebp,%ebp
cmp    $0x6,%r14d
jl     1228 <fvecdump+0xf8>
lea    0xe81(%rip),%r14
lea    0xe7f(%rip),%r15
xor    %ebp,%ebp
nopl   0x0(%rax,%rax,1)
mov    %r14,%rdi
mov    %ebp,%esi
xor    %eax,%eax
call   1050 <printf@plt>
movss  (%rbx),%xmm0
cvtss2sd %xmm0,%xmm0
mov    %r15,%rdi
mov    $0x1,%al
call   1050 <printf@plt>
movss  0x4(%rbx),%xmm0
cvtss2sd %xmm0,%xmm0
mov    %r15,%rdi
mov    $0x1,%al
call   1050 <printf@plt>
movss  0x8(%rbx),%xmm0
cvtss2sd %xmm0,%xmm0
mov    %r15,%rdi
mov    $0x1,%al
call   1050 <printf@plt>
movss  0xc(%rbx),%xmm0
cvtss2sd %xmm0,%xmm0
mov    %r15,%rdi
mov    $0x1,%al
call   1050 <printf@plt>
movss  0x10(%rbx),%xmm0
cvtss2sd %xmm0,%xmm0
mov    %r15,%rdi
mov    $0x1,%al
call   1050 <printf@plt>
movss  0x14(%rbx),%xmm0
cvtss2sd %xmm0,%xmm0
mov    %r15,%rdi
mov    $0x1,%al
call   1050 <printf@plt>
add    $0x18,%rbx
add    $0x6,%ebp
mov    $0xa,%edi
call   1030 <putchar@plt>
add    $0xffffffff,%r13d
jne    1190 <fvecdump+0x60>
test   %r12d,%r12d
je     1276 <fvecdump+0x146>
lea    0xdcc(%rip),%rdi
mov    %ebp,%esi
xor    %eax,%eax
call   1050 <printf@plt>
test   %r12d,%r12d
jle    126c <fvecdump+0x13c>
mov    %r12d,%r15d
xor    %ebp,%ebp
lea    0xdb7(%rip),%r14
xchg   %ax,%ax
movss  (%rbx,%rbp,4),%xmm0
cvtss2sd %xmm0,%xmm0
mov    %r14,%rdi
mov    $0x1,%al
call   1050 <printf@plt>
add    $0x1,%rbp
cmp    %ebp,%r15d
jne    1250 <fvecdump+0x120>
mov    $0xa,%edi
call   1030 <putchar@plt>
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 = [4 x i8] c"%s\0A\00"
@.str.1 = [5 x i8] c"%3d|\00"
@.str.2 = [7 x i8] c"%12.4e\00"
@.str.3 = [2 x i8] c"\0A\00"
define void @fvecdump(float* %0, i32 %1, i8* %2) {
%4 = alloca float*
%5 = alloca i32
%6 = alloca i8*
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
store float* %0, float** %4
store i32 %1, i32* %5
store i8* %2, i8** %6
%12 = load i32, i32* %5
%13 = sdiv i32 %12, 6
store i32 %13, i32* %10
%14 = load i32, i32* %5
%15 = load i32, i32* %10
%16 = mul nsw i32 %15, 6
%17 = sub nsw i32 %14, %16
store i32 %17, i32* %11
%18 = load i8*, i8** %6
%19 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %18)
store i32 0, i32* %9
store i32 0, i32* %8
br label %20
20: ; preds = %44, %3
%21 = load i32, i32* %8
%22 = load i32, i32* %10
%23 = icmp slt i32 %21, %22
br i1 %23, label %24, label %47
24: ; preds = %20
%25 = load i32, i32* %9
%26 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i32 %25)
store i32 0, i32* %7
br label %27
27: ; preds = %35, %24
%28 = load i32, i32* %7
%29 = icmp slt i32 %28, 6
br i1 %29, label %30, label %42
30: ; preds = %27
%31 = load float*, float** %4
%32 = load float, float* %31
%33 = fpext float %32 to double
%34 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0), double %33)
br label %35
35: ; preds = %30
%36 = load i32, i32* %7
%37 = add nsw i32 %36, 1
store i32 %37, i32* %7
%38 = load float*, float** %4
%39 = getelementptr inbounds float, float* %38, i32 1
store float* %39, float** %4
%40 = load i32, i32* %9
%41 = add nsw i32 %40, 1
store i32 %41, i32* %9
br label %27
42: ; preds = %27
%43 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
br label %44
44: ; preds = %42
%45 = load i32, i32* %8
%46 = add nsw i32 %45, 1
store i32 %46, i32* %8
br label %20
47: ; preds = %20
%48 = load i32, i32* %11
%49 = icmp ne i32 %48, 0
br i1 %49, label %50, label %69
50: ; preds = %47
%51 = load i32, i32* %9
%52 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i32 %51)
store i32 0, i32* %7
br label %53
53: ; preds = %62, %50
%54 = load i32, i32* %7
%55 = load i32, i32* %11
%56 = icmp slt i32 %54, %55
br i1 %56, label %57, label %67
57: ; preds = %53
%58 = load float*, float** %4
%59 = load float, float* %58
%60 = fpext float %59 to double
%61 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0), double %60)
br label %62
62: ; preds = %57
%63 = load i32, i32* %7
%64 = add nsw i32 %63, 1
store i32 %64, i32* %7
%65 = load float*, float** %4
%66 = getelementptr inbounds float, float* %65, i32 1
store float* %66, float** %4
br label %53
67: ; preds = %53
%68 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
br label %69
69: ; preds = %67, %47
%70 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str.1 = [5 x i8] c"%3d|\00"
@.str.2 = [7 x i8] c"%12.4e\00"
define void @fvecdump(float* nocapture %0, i32 %1, i8* nocapture %2) {
%4 = sdiv i32 %1, 6
%5 = mul nsw i32 %4, -6
%6 = add i32 %5, %1
%7 = tail call i32 @puts(i8* dereferenceable(1) %2)
%8 = icmp sgt i32 %1, 5
br i1 %8, label %9, label %42
9: ; preds = %3, %9
%10 = phi float* [ %37, %9 ], [ %0, %3 ]
%11 = phi i32 [ %38, %9 ], [ 0, %3 ]
%12 = phi i32 [ %40, %9 ], [ 0, %3 ]
%13 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i32 %11)
%14 = load float, float* %10
%15 = fpext float %14 to double
%16 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0), double %15)
%17 = getelementptr inbounds float, float* %10, i64 1
%18 = load float, float* %17
%19 = fpext float %18 to double
%20 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0), double %19)
%21 = getelementptr inbounds float, float* %10, i64 2
%22 = load float, float* %21
%23 = fpext float %22 to double
%24 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0), double %23)
%25 = getelementptr inbounds float, float* %10, i64 3
%26 = load float, float* %25
%27 = fpext float %26 to double
%28 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0), double %27)
%29 = getelementptr inbounds float, float* %10, i64 4
%30 = load float, float* %29
%31 = fpext float %30 to double
%32 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0), double %31)
%33 = getelementptr inbounds float, float* %10, i64 5
%34 = load float, float* %33
%35 = fpext float %34 to double
%36 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0), double %35)
%37 = getelementptr inbounds float, float* %10, i64 6
%38 = add nuw i32 %11, 6
%39 = tail call i32 @putchar(i32 10)
%40 = add nuw nsw i32 %12, 1
%41 = icmp eq i32 %40, %4
br i1 %41, label %42, label %9
42: ; preds = %9, %3
%43 = phi i32 [ 0, %3 ], [ %38, %9 ]
%44 = phi float* [ %0, %3 ], [ %37, %9 ]
%45 = icmp eq i32 %6, 0
br i1 %45, label %60, label %46
46: ; preds = %42
%47 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i32 %43)
%48 = icmp sgt i32 %6, 0
br i1 %48, label %49, label %58
49: ; preds = %46, %49
%50 = phi float* [ %56, %49 ], [ %44, %46 ]
%51 = phi i32 [ %55, %49 ], [ 0, %46 ]
%52 = load float, float* %50
%53 = fpext float %52 to double
%54 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0), double %53)
%55 = add nuw nsw i32 %51, 1
%56 = getelementptr inbounds float, float* %50, i64 1
%57 = icmp eq i32 %55, %6
br i1 %57, label %58, label %49
58: ; preds = %49, %46
%59 = tail call i32 @putchar(i32 10)
br label %60
60: ; preds = %58, %42
%61 = tail call i32 @putchar(i32 10)
ret void
}