#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 polyprint(double *pol) {
  int i;
  for (i = 0; i <= 100 - 1 && pol[i] != 99999999; i++) {
    printf("%.1f   ", pol[i]);
  }
  printf("\n");
}


x86 assembly (clang, -O0):
<polyprint>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
xor    %eax,%eax
cmpl   $0x63,-0xc(%rbp)
mov    %al,-0xd(%rbp)
jg     1156 <polyprint+0x46>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  0xeb9(%rip),%xmm1
ucomisd %xmm1,%xmm0
setne  %al
setp   %cl
or     %cl,%al
mov    %al,-0xd(%rbp)
mov    -0xd(%rbp),%al
test   $0x1,%al
jne    1166 <polyprint+0x56>
jmp    118f <polyprint+0x7f>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
lea    0xe8e(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1123 <polyprint+0x13>
lea    0xe7a(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<polyprint>:
push   %r15
push   %r14
push   %rbx
mov    %rdi,%r15
xor    %ebx,%ebx
lea    0xed7(%rip),%r14
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
movsd  (%r15,%rbx,8),%xmm0
ucomisd 0xeb2(%rip),%xmm0
jne    1152 <polyprint+0x32>
jnp    1166 <polyprint+0x46>
mov    %r14,%rdi
mov    $0x1,%al
call   1040 <printf@plt>
add    $0x1,%rbx
cmp    $0x64,%rbx
jne    1140 <polyprint+0x20>
mov    $0xa,%edi
pop    %rbx
pop    %r14
pop    %r15
jmp    1030 <putchar@plt>

LLVM IR (-O0):
@.str = [8 x i8] c"%.1f \00"
@.str.1 = [2 x i8] c"\0A\00"
define void @polyprint(double* %0) {
%2 = alloca double*
%3 = alloca i32
store double* %0, double** %2
store i32 0, i32* %3
br label %4
4: ; preds = %23, %1
%5 = load i32, i32* %3
%6 = icmp sle i32 %5, 99
br i1 %6, label %7, label %14
7: ; preds = %4
%8 = load double*, double** %2
%9 = load i32, i32* %3
%10 = sext i32 %9 to i64
%11 = getelementptr inbounds double, double* %8, i64 %10
%12 = load double, double* %11
%13 = fcmp une double %12, 0x4197D783FC000000
br label %14
14: ; preds = %7, %4
%15 = phi i1 [ false, %4 ], [ %13, %7 ]
br i1 %15, label %16, label %26
16: ; preds = %14
%17 = load double*, double** %2
%18 = load i32, i32* %3
%19 = sext i32 %18 to i64
%20 = getelementptr inbounds double, double* %17, i64 %19
%21 = load double, double* %20
%22 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), double %21)
br label %23
23: ; preds = %16
%24 = load i32, i32* %3
%25 = add nsw i32 %24, 1
store i32 %25, i32* %3
br label %4
26: ; preds = %14
%27 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [8 x i8] c"%.1f \00"
define void @polyprint(double* nocapture %0) {
br label %2
2: ; preds = %1, %7
%3 = phi i64 [ 0, %1 ], [ %9, %7 ]
%4 = getelementptr inbounds double, double* %0, i64 %3
%5 = load double, double* %4
%6 = fcmp une double %5, 0x4197D783FC000000
br i1 %6, label %7, label %11
7: ; preds = %2
%8 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), double %5)
%9 = add nuw nsw i64 %3, 1
%10 = icmp eq i64 %9, 100
br i1 %10, label %11, label %2
11: ; preds = %7, %2
%12 = tail call i32 @putchar(i32 10)
ret void
}