#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 *, ...);
int /*<<< orphan*/ puts(char *);
int strlen(char const *);
void printm(const char *name, size_t size, double *m) {
  printf("%s\t", name);
  if (strlen(name) < 8)
    printf("\t");
  for (size_t i = 0; i < size; i++)
    printf("%.2f\t", m[i]);
  puts("");
}


x86 assembly (clang, -O0):
<printm>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xeb1(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0x8(%rbp),%rdi
call   1040 <strlen@plt>
cmp    $0x8,%eax
jge    1176 <printm+0x46>
lea    0xe99(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
movq   $0x0,-0x20(%rbp)
mov    -0x20(%rbp),%rax
cmp    -0x10(%rbp),%rax
jae    11b8 <printm+0x88>
mov    -0x18(%rbp),%rax
mov    -0x20(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
lea    0xe64(%rip),%rdi
mov    $0x1,%al
call   1050 <printf@plt>
mov    -0x20(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x20(%rbp)
jmp    117e <printm+0x4e>
lea    0xe4a(%rip),%rdi
call   1030 <puts@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<printm>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
mov    %rdx,%r14
mov    %rsi,%r12
mov    %rdi,%r15
lea    0xeb8(%rip),%rdi
mov    %r15,%rsi
xor    %eax,%eax
call   1050 <printf@plt>
mov    %r15,%rdi
call   1040 <strlen@plt>
cmp    $0x7,%eax
jg     1169 <printm+0x39>
mov    $0x9,%edi
call   1030 <putchar@plt>
test   %r12,%r12
je     1199 <printm+0x69>
xor    %ebx,%ebx
lea    0xe8d(%rip),%r15
nopw   0x0(%rax,%rax,1)
movsd  (%r14,%rbx,8),%xmm0
mov    %r15,%rdi
mov    $0x1,%al
call   1050 <printf@plt>
add    $0x1,%rbx
cmp    %rbx,%r12
jne    1180 <printm+0x50>
mov    $0xa,%edi
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
jmp    1030 <putchar@plt>

LLVM IR (-O0):
@.str = [4 x i8] c"%s\09\00"
@.str.1 = [2 x i8] c"\09\00"
@.str.2 = [6 x i8] c"%.2f\09\00"
@.str.3 = [1 x i8] zeroinitializer
define void @printm(i8* %0, i64 %1, double* %2) {
%4 = alloca i8*
%5 = alloca i64
%6 = alloca double*
%7 = alloca i64
store i8* %0, i8** %4
store i64 %1, i64* %5
store double* %2, double** %6
%8 = load i8*, i8** %4
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %8)
%10 = load i8*, i8** %4
%11 = call i32 @strlen(i8* %10)
%12 = icmp slt i32 %11, 8
br i1 %12, label %13, label %15
13: ; preds = %3
%14 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
br label %15
15: ; preds = %13, %3
store i64 0, i64* %7
br label %16
16: ; preds = %26, %15
%17 = load i64, i64* %7
%18 = load i64, i64* %5
%19 = icmp ult i64 %17, %18
br i1 %19, label %20, label %29
20: ; preds = %16
%21 = load double*, double** %6
%22 = load i64, i64* %7
%23 = getelementptr inbounds double, double* %21, i64 %22
%24 = load double, double* %23
%25 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0), double %24)
br label %26
26: ; preds = %20
%27 = load i64, i64* %7
%28 = add i64 %27, 1
store i64 %28, i64* %7
br label %16
29: ; preds = %16
%30 = call i32 @puts(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.3, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"%s\09\00"
@.str.2 = [6 x i8] c"%.2f\09\00"
define void @printm(i8* %0, i64 %1, double* nocapture %2) {
%4 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %0)
%5 = tail call i32 @strlen(i8* %0)
%6 = icmp slt i32 %5, 8
br i1 %6, label %7, label %9
7: ; preds = %3
%8 = tail call i32 @putchar(i32 9)
br label %9
9: ; preds = %7, %3
%10 = icmp eq i64 %1, 0
br i1 %10, label %11, label %13
11: ; preds = %13, %9
%12 = tail call i32 @putchar(i32 10)
ret void
13: ; preds = %9, %13
%14 = phi i64 [ %18, %13 ], [ 0, %9 ]
%15 = getelementptr inbounds double, double* %2, i64 %14
%16 = load double, double* %15
%17 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0), double %16)
%18 = add nuw i64 %14, 1
%19 = icmp eq i64 %18, %1
br i1 %19, label %11, label %13
}