#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 vector_col7_printf_decimated(double *v1, double *v2, double *v3,
                                  double *v4, double *v5, double *v6,
                                  double *v7, int length, char *format) {
  int stride = 1;
  int i;
  const int maxlen = 2000;
  if (length > maxlen)
    stride = length / maxlen;
  for (i = 0; i < length; i += stride) {
    printf(format, v1[i]);
    printf(" ");
    printf(format, v2[i]);
    printf(" ");
    printf(format, v3[i]);
    printf(" ");
    printf(format, v4[i]);
    printf(" ");
    printf(format, v5[i]);
    printf(" ");
    printf(format, v6[i]);
    printf(" ");
    printf(format, v7[i]);
    printf("\n");
  }
}


x86 assembly (clang, -O0):
<vector_col7_printf_decimated>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    0x20(%rbp),%rax
mov    0x18(%rbp),%eax
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)
movl   $0x1,-0x34(%rbp)
movl   $0x7d0,-0x3c(%rbp)
cmpl   $0x7d0,0x18(%rbp)
jle    1164 <vector_col7_printf_decimated+0x54>
mov    0x18(%rbp),%eax
mov    $0x7d0,%ecx
cltd
idiv   %ecx
mov    %eax,-0x34(%rbp)
movl   $0x0,-0x38(%rbp)
mov    -0x38(%rbp),%eax
cmp    0x18(%rbp),%eax
jge    128f <vector_col7_printf_decimated+0x17f>
mov    0x20(%rbp),%rdi
mov    -0x8(%rbp),%rax
movslq -0x38(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    $0x1,%al
call   1030 <printf@plt>
lea    0xe6a(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    0x20(%rbp),%rdi
mov    -0x10(%rbp),%rax
movslq -0x38(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    $0x1,%al
call   1030 <printf@plt>
lea    0xe44(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    0x20(%rbp),%rdi
mov    -0x18(%rbp),%rax
movslq -0x38(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    $0x1,%al
call   1030 <printf@plt>
lea    0xe1e(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    0x20(%rbp),%rdi
mov    -0x20(%rbp),%rax
movslq -0x38(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    $0x1,%al
call   1030 <printf@plt>
lea    0xdf8(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    0x20(%rbp),%rdi
mov    -0x28(%rbp),%rax
movslq -0x38(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    $0x1,%al
call   1030 <printf@plt>
lea    0xdd2(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    0x20(%rbp),%rdi
mov    -0x30(%rbp),%rax
movslq -0x38(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    $0x1,%al
call   1030 <printf@plt>
lea    0xdac(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    0x20(%rbp),%rdi
mov    0x10(%rbp),%rax
movslq -0x38(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    $0x1,%al
call   1030 <printf@plt>
lea    0xd88(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x34(%rbp),%eax
add    -0x38(%rbp),%eax
mov    %eax,-0x38(%rbp)
jmp    116b <vector_col7_printf_decimated+0x5b>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<vector_col7_printf_decimated>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x28,%rsp
mov    %rdi,%rbp
mov    0x68(%rsp),%edi
test   %edi,%edi
jle    1259 <vector_col7_printf_decimated+0x139>
mov    %rsi,%rbx
mov    %rdx,%r12
mov    $0x1,%eax
mov    %edi,%r15d
cmp    $0x7d1,%edi
jb     115e <vector_col7_printf_decimated+0x3e>
imul   $0x10624dd3,%r15,%rax
shr    $0x27,%rax
mov    0x70(%rsp),%r14
mov    %eax,%eax
mov    %rax,0x20(%rsp)
xor    %r13d,%r13d
mov    %r9,0x18(%rsp)
mov    %r8,0x10(%rsp)
mov    %rcx,0x8(%rsp)
nopl   0x0(%rax)
movsd  0x0(%rbp,%r13,8),%xmm0
mov    %r14,%rdi
mov    $0x1,%al
call   1040 <printf@plt>
mov    $0x20,%edi
call   1030 <putchar@plt>
movsd  (%rbx,%r13,8),%xmm0
mov    %r14,%rdi
mov    $0x1,%al
call   1040 <printf@plt>
mov    $0x20,%edi
call   1030 <putchar@plt>
movsd  (%r12,%r13,8),%xmm0
mov    %r14,%rdi
mov    $0x1,%al
call   1040 <printf@plt>
mov    $0x20,%edi
call   1030 <putchar@plt>
mov    0x8(%rsp),%rax
movsd  (%rax,%r13,8),%xmm0
mov    %r14,%rdi
mov    $0x1,%al
call   1040 <printf@plt>
mov    $0x20,%edi
call   1030 <putchar@plt>
mov    0x10(%rsp),%rax
movsd  (%rax,%r13,8),%xmm0
mov    %r14,%rdi
mov    $0x1,%al
call   1040 <printf@plt>
mov    $0x20,%edi
call   1030 <putchar@plt>
mov    0x18(%rsp),%rax
movsd  (%rax,%r13,8),%xmm0
mov    %r14,%rdi
mov    $0x1,%al
call   1040 <printf@plt>
mov    $0x20,%edi
call   1030 <putchar@plt>
mov    0x60(%rsp),%rax
movsd  (%rax,%r13,8),%xmm0
mov    %r14,%rdi
mov    $0x1,%al
call   1040 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
add    0x20(%rsp),%r13
cmp    %r15,%r13
jl     1180 <vector_col7_printf_decimated+0x60>
add    $0x28,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [2 x i8] c" \00"
@.str.1 = [2 x i8] c"\0A\00"
define void @vector_col7_printf_decimated(double* %0, double* %1, double* %2, double* %3, double* %4, double* %5, double* %6, i32 %7, i8* %8) {
%10 = alloca double*
%11 = alloca double*
%12 = alloca double*
%13 = alloca double*
%14 = alloca double*
%15 = alloca double*
%16 = alloca double*
%17 = alloca i32
%18 = alloca i8*
%19 = alloca i32
%20 = alloca i32
%21 = alloca i32
store double* %0, double** %10
store double* %1, double** %11
store double* %2, double** %12
store double* %3, double** %13
store double* %4, double** %14
store double* %5, double** %15
store double* %6, double** %16
store i32 %7, i32* %17
store i8* %8, i8** %18
store i32 1, i32* %19
store i32 2000, i32* %21
%22 = load i32, i32* %17
%23 = icmp sgt i32 %22, 2000
br i1 %23, label %24, label %27
24: ; preds = %9
%25 = load i32, i32* %17
%26 = sdiv i32 %25, 2000
store i32 %26, i32* %19
br label %27
27: ; preds = %24, %9
store i32 0, i32* %20
br label %28
28: ; preds = %89, %27
%29 = load i32, i32* %20
%30 = load i32, i32* %17
%31 = icmp slt i32 %29, %30
br i1 %31, label %32, label %93
32: ; preds = %28
%33 = load i8*, i8** %18
%34 = load double*, double** %10
%35 = load i32, i32* %20
%36 = sext i32 %35 to i64
%37 = getelementptr inbounds double, double* %34, i64 %36
%38 = load double, double* %37
%39 = call i32 (i8*, ...) @printf(i8* %33, double %38)
%40 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%41 = load i8*, i8** %18
%42 = load double*, double** %11
%43 = load i32, i32* %20
%44 = sext i32 %43 to i64
%45 = getelementptr inbounds double, double* %42, i64 %44
%46 = load double, double* %45
%47 = call i32 (i8*, ...) @printf(i8* %41, double %46)
%48 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%49 = load i8*, i8** %18
%50 = load double*, double** %12
%51 = load i32, i32* %20
%52 = sext i32 %51 to i64
%53 = getelementptr inbounds double, double* %50, i64 %52
%54 = load double, double* %53
%55 = call i32 (i8*, ...) @printf(i8* %49, double %54)
%56 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%57 = load i8*, i8** %18
%58 = load double*, double** %13
%59 = load i32, i32* %20
%60 = sext i32 %59 to i64
%61 = getelementptr inbounds double, double* %58, i64 %60
%62 = load double, double* %61
%63 = call i32 (i8*, ...) @printf(i8* %57, double %62)
%64 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%65 = load i8*, i8** %18
%66 = load double*, double** %14
%67 = load i32, i32* %20
%68 = sext i32 %67 to i64
%69 = getelementptr inbounds double, double* %66, i64 %68
%70 = load double, double* %69
%71 = call i32 (i8*, ...) @printf(i8* %65, double %70)
%72 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%73 = load i8*, i8** %18
%74 = load double*, double** %15
%75 = load i32, i32* %20
%76 = sext i32 %75 to i64
%77 = getelementptr inbounds double, double* %74, i64 %76
%78 = load double, double* %77
%79 = call i32 (i8*, ...) @printf(i8* %73, double %78)
%80 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%81 = load i8*, i8** %18
%82 = load double*, double** %16
%83 = load i32, i32* %20
%84 = sext i32 %83 to i64
%85 = getelementptr inbounds double, double* %82, i64 %84
%86 = load double, double* %85
%87 = call i32 (i8*, ...) @printf(i8* %81, double %86)
%88 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
br label %89
89: ; preds = %32
%90 = load i32, i32* %19
%91 = load i32, i32* %20
%92 = add nsw i32 %91, %90
store i32 %92, i32* %20
br label %28
93: ; preds = %28
ret void
}

LLVM IR (-O2):
define void @vector_col7_printf_decimated(double* nocapture %0, double* nocapture %1, double* nocapture %2, double* nocapture %3, double* nocapture %4, double* nocapture %5, double* nocapture %6, i32 %7, i8* nocapture %8) {
%10 = icmp sgt i32 %7, 0
br i1 %10, label %11, label %49
11: ; preds = %9
%12 = icmp ugt i32 %7, 2000
%13 = udiv i32 %7, 2000
%14 = select i1 %12, i32 %13, i32 1
%15 = zext i32 %14 to i64
%16 = zext i32 %7 to i64
br label %17
17: ; preds = %11, %17
%18 = phi i64 [ 0, %11 ], [ %47, %17 ]
%19 = getelementptr inbounds double, double* %0, i64 %18
%20 = load double, double* %19
%21 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) %8, double %20)
%22 = tail call i32 @putchar(i32 32)
%23 = getelementptr inbounds double, double* %1, i64 %18
%24 = load double, double* %23
%25 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) %8, double %24)
%26 = tail call i32 @putchar(i32 32)
%27 = getelementptr inbounds double, double* %2, i64 %18
%28 = load double, double* %27
%29 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) %8, double %28)
%30 = tail call i32 @putchar(i32 32)
%31 = getelementptr inbounds double, double* %3, i64 %18
%32 = load double, double* %31
%33 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) %8, double %32)
%34 = tail call i32 @putchar(i32 32)
%35 = getelementptr inbounds double, double* %4, i64 %18
%36 = load double, double* %35
%37 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) %8, double %36)
%38 = tail call i32 @putchar(i32 32)
%39 = getelementptr inbounds double, double* %5, i64 %18
%40 = load double, double* %39
%41 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) %8, double %40)
%42 = tail call i32 @putchar(i32 32)
%43 = getelementptr inbounds double, double* %6, i64 %18
%44 = load double, double* %43
%45 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) %8, double %44)
%46 = tail call i32 @putchar(i32 10)
%47 = add i64 %18, %15
%48 = icmp slt i64 %47, %16
br i1 %48, label %17, label %49
49: ; preds = %17, %9
ret void
}