#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 */
typedef size_t GLint;
typedef double GLfloat;

/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
void print3DcolorVertex(GLint size, GLint *count, GLfloat *buffer) {
  int i;
  printf("  ");
  for (i = 0; i < 7; i++) {
    printf("%4.2f ", buffer[size - (*count)]);
    *count = *count - 1;
  }
  printf("\n");
}


x86 assembly (clang, -O0):
<print3DcolorVertex>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
lea    0xed5(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x1c(%rbp)
cmpl   $0x7,-0x1c(%rbp)
jge    1185 <print3DcolorVertex+0x75>
mov    -0x18(%rbp),%rax
mov    -0x8(%rbp),%rcx
mov    -0x10(%rbp),%rdx
sub    (%rdx),%rcx
movsd  (%rax,%rcx,8),%xmm0
lea    0xea5(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
mov    -0x10(%rbp),%rax
mov    (%rax),%rcx
sub    $0x1,%rcx
mov    -0x10(%rbp),%rax
mov    %rcx,(%rax)
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    1139 <print3DcolorVertex+0x29>
lea    0xe7e(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print3DcolorVertex>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
mov    %rdx,%r14
mov    %rsi,%rbx
mov    %rdi,%r15
lea    0xec8(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %r15,%rax
sub    (%rbx),%rax
movsd  (%r14,%rax,8),%xmm0
lea    0xeb1(%rip),%r12
mov    %r12,%rdi
mov    $0x1,%al
call   1040 <printf@plt>
mov    (%rbx),%rax
add    $0xffffffffffffffff,%rax
mov    %rax,(%rbx)
mov    %r15,%rcx
sub    %rax,%rcx
movsd  (%r14,%rcx,8),%xmm0
mov    %r12,%rdi
mov    $0x1,%al
call   1040 <printf@plt>
mov    (%rbx),%rax
add    $0xffffffffffffffff,%rax
mov    %rax,(%rbx)
mov    %r15,%rcx
sub    %rax,%rcx
movsd  (%r14,%rcx,8),%xmm0
mov    %r12,%rdi
mov    $0x1,%al
call   1040 <printf@plt>
mov    (%rbx),%rax
add    $0xffffffffffffffff,%rax
mov    %rax,(%rbx)
mov    %r15,%rcx
sub    %rax,%rcx
movsd  (%r14,%rcx,8),%xmm0
mov    %r12,%rdi
mov    $0x1,%al
call   1040 <printf@plt>
mov    (%rbx),%rax
add    $0xffffffffffffffff,%rax
mov    %rax,(%rbx)
mov    %r15,%rcx
sub    %rax,%rcx
movsd  (%r14,%rcx,8),%xmm0
mov    %r12,%rdi
mov    $0x1,%al
call   1040 <printf@plt>
mov    (%rbx),%rax
add    $0xffffffffffffffff,%rax
mov    %rax,(%rbx)
mov    %r15,%rcx
sub    %rax,%rcx
movsd  (%r14,%rcx,8),%xmm0
mov    %r12,%rdi
mov    $0x1,%al
call   1040 <printf@plt>
mov    (%rbx),%rax
add    $0xffffffffffffffff,%rax
mov    %rax,(%rbx)
sub    %rax,%r15
movsd  (%r14,%r15,8),%xmm0
mov    %r12,%rdi
mov    $0x1,%al
call   1040 <printf@plt>
addq   $0xffffffffffffffff,(%rbx)
mov    $0xa,%edi
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
jmp    1030 <putchar@plt>

LLVM IR (-O0):
@.str = [3 x i8] c" \00"
@.str.1 = [7 x i8] c"%4.2f \00"
@.str.2 = [2 x i8] c"\0A\00"
define void @print3DcolorVertex(i64 %0, i64* %1, double* %2) {
%4 = alloca i64
%5 = alloca i64*
%6 = alloca double*
%7 = alloca i32
store i64 %0, i64* %4
store i64* %1, i64** %5
store double* %2, double** %6
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
store i32 0, i32* %7
br label %9
9: ; preds = %25, %3
%10 = load i32, i32* %7
%11 = icmp slt i32 %10, 7
br i1 %11, label %12, label %28
12: ; preds = %9
%13 = load double*, double** %6
%14 = load i64, i64* %4
%15 = load i64*, i64** %5
%16 = load i64, i64* %15
%17 = sub i64 %14, %16
%18 = getelementptr inbounds double, double* %13, i64 %17
%19 = load double, double* %18
%20 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), double %19)
%21 = load i64*, i64** %5
%22 = load i64, i64* %21
%23 = sub i64 %22, 1
%24 = load i64*, i64** %5
store i64 %23, i64* %24
br label %25
25: ; preds = %12
%26 = load i32, i32* %7
%27 = add nsw i32 %26, 1
store i32 %27, i32* %7
br label %9
28: ; preds = %9
%29 = 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 = [3 x i8] c" \00"
@.str.1 = [7 x i8] c"%4.2f \00"
define void @print3DcolorVertex(i64 %0, i64* nocapture %1, double* nocapture %2) {
%4 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%5 = load i64, i64* %1
%6 = sub i64 %0, %5
%7 = getelementptr inbounds double, double* %2, i64 %6
%8 = load double, double* %7
%9 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), double %8)
%10 = load i64, i64* %1
%11 = add i64 %10, -1
store i64 %11, i64* %1
%12 = sub i64 %0, %11
%13 = getelementptr inbounds double, double* %2, i64 %12
%14 = load double, double* %13
%15 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), double %14)
%16 = load i64, i64* %1
%17 = add i64 %16, -1
store i64 %17, i64* %1
%18 = sub i64 %0, %17
%19 = getelementptr inbounds double, double* %2, i64 %18
%20 = load double, double* %19
%21 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), double %20)
%22 = load i64, i64* %1
%23 = add i64 %22, -1
store i64 %23, i64* %1
%24 = sub i64 %0, %23
%25 = getelementptr inbounds double, double* %2, i64 %24
%26 = load double, double* %25
%27 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), double %26)
%28 = load i64, i64* %1
%29 = add i64 %28, -1
store i64 %29, i64* %1
%30 = sub i64 %0, %29
%31 = getelementptr inbounds double, double* %2, i64 %30
%32 = load double, double* %31
%33 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), double %32)
%34 = load i64, i64* %1
%35 = add i64 %34, -1
store i64 %35, i64* %1
%36 = sub i64 %0, %35
%37 = getelementptr inbounds double, double* %2, i64 %36
%38 = load double, double* %37
%39 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), double %38)
%40 = load i64, i64* %1
%41 = add i64 %40, -1
store i64 %41, i64* %1
%42 = sub i64 %0, %41
%43 = getelementptr inbounds double, double* %2, i64 %42
%44 = load double, double* %43
%45 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), double %44)
%46 = load i64, i64* %1
%47 = add i64 %46, -1
store i64 %47, i64* %1
%48 = tail call i32 @putchar(i32 10)
ret void
}