#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 int /*<<< orphan*/ fillp;

/* Variables and functions */
int /*<<< orphan*/ assert(int);
int ncx_putn_float_float(void **, size_t, float *);
int NC_fill_float(void **xpp, size_t nelems) {
  float fillp[16 * sizeof(double) / 4];
  assert(nelems <= sizeof(fillp) / sizeof(fillp[0]));
  {
    float *vp = fillp;
    const float *const end = vp + nelems;
    while (vp < end) {
      *vp++ = (9.9692099683868690e+36f);
    }
  }
  return ncx_putn_float_float(xpp, nelems, fillp);
}


x86 assembly (clang, -O0):
<NC_fill_float>:
push   %rbp
mov    %rsp,%rbp
sub    $0xa0,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpq   $0x20,-0x10(%rbp)
setbe  %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
lea    -0x90(%rbp),%rax
mov    %rax,-0x98(%rbp)
mov    -0x98(%rbp),%rax
mov    -0x10(%rbp),%rcx
shl    $0x2,%rcx
add    %rcx,%rax
mov    %rax,-0xa0(%rbp)
mov    -0x98(%rbp),%rax
cmp    -0xa0(%rbp),%rax
jae    11a6 <NC_fill_float+0x86>
mov    -0x98(%rbp),%rax
mov    %rax,%rcx
add    $0x4,%rcx
mov    %rcx,-0x98(%rbp)
movss  0xe63(%rip),%xmm0
movss  %xmm0,(%rax)
jmp    116c <NC_fill_float+0x4c>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
lea    -0x90(%rbp),%rdx
call   1040 <ncx_putn_float_float@plt>
add    $0xa0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<NC_fill_float>:
push   %r14
push   %rbx
sub    $0x88,%rsp
mov    %rsi,%rbx
mov    %rdi,%r14
xor    %edi,%edi
cmp    $0x21,%rsi
setb   %dil
call   1030 <assert@plt>
test   %rbx,%rbx
jle    126f <NC_fill_float+0x14f>
lea    (%rsp,%rbx,4),%rax
lea    0x4(%rsp),%rsi
cmp    %rsi,%rax
cmova  %rax,%rsi
mov    %rsp,%rdx
mov    %rdx,%rcx
not    %rcx
add    %rsi,%rcx
cmp    $0x1c,%rcx
jb     1260 <NC_fill_float+0x140>
shr    $0x2,%rcx
add    $0x1,%rcx
mov    %rcx,%r8
and    $0xfffffffffffffff8,%r8
lea    -0x8(%r8),%rdx
mov    %rdx,%rdi
shr    $0x3,%rdi
add    $0x1,%rdi
mov    %edi,%esi
and    $0x7,%esi
cmp    $0x38,%rdx
jae    119e <NC_fill_float+0x7e>
xor    %edx,%edx
jmp    1221 <NC_fill_float+0x101>
and    $0xfffffffffffffff8,%rdi
xor    %edx,%edx
movaps 0xe55(%rip),%xmm0
nopl   0x0(%rax,%rax,1)
movaps %xmm0,(%rsp,%rdx,4)
movaps %xmm0,0x10(%rsp,%rdx,4)
movaps %xmm0,0x20(%rsp,%rdx,4)
movaps %xmm0,0x30(%rsp,%rdx,4)
movaps %xmm0,0x40(%rsp,%rdx,4)
movaps %xmm0,0x50(%rsp,%rdx,4)
movaps %xmm0,0x60(%rsp,%rdx,4)
movaps %xmm0,0x70(%rsp,%rdx,4)
movaps %xmm0,0x80(%rsp,%rdx,4)
movaps %xmm0,0x90(%rsp,%rdx,4)
movaps %xmm0,0xa0(%rsp,%rdx,4)
movaps %xmm0,0xb0(%rsp,%rdx,4)
movaps %xmm0,0xc0(%rsp,%rdx,4)
movaps %xmm0,0xd0(%rsp,%rdx,4)
movaps %xmm0,0xe0(%rsp,%rdx,4)
movaps %xmm0,0xf0(%rsp,%rdx,4)
add    $0x40,%rdx
add    $0xfffffffffffffff8,%rdi
jne    11b0 <NC_fill_float+0x90>
test   %rsi,%rsi
je     1252 <NC_fill_float+0x132>
lea    (%rsp,%rdx,4),%rdx
add    $0x10,%rdx
shl    $0x5,%rsi
xor    %edi,%edi
movaps 0xdc5(%rip),%xmm0
nopl   0x0(%rax,%rax,1)
movaps %xmm0,-0x10(%rdx,%rdi,1)
movaps %xmm0,(%rdx,%rdi,1)
add    $0x20,%rdi
cmp    %rdi,%rsi
jne    1240 <NC_fill_float+0x120>
cmp    %r8,%rcx
je     126f <NC_fill_float+0x14f>
lea    (%rsp,%r8,4),%rdx
nopl   0x0(%rax,%rax,1)
movl   $0x7cf00000,(%rdx)
add    $0x4,%rdx
cmp    %rax,%rdx
jb     1260 <NC_fill_float+0x140>
mov    %rsp,%rdx
mov    %r14,%rdi
mov    %rbx,%rsi
call   1040 <ncx_putn_float_float@plt>
add    $0x88,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i32 @NC_fill_float(i8** %0, i64 %1) {
%3 = alloca i8**
%4 = alloca i64
%5 = alloca [32 x float]
%6 = alloca float*
%7 = alloca float*
store i8** %0, i8*** %3
store i64 %1, i64* %4
%8 = load i64, i64* %4
%9 = icmp ule i64 %8, 32
%10 = zext i1 %9 to i32
%11 = call i32 @assert(i32 %10)
%12 = getelementptr inbounds [32 x float], [32 x float]* %5, i64 0, i64 0
store float* %12, float** %6
%13 = load float*, float** %6
%14 = load i64, i64* %4
%15 = getelementptr inbounds float, float* %13, i64 %14
store float* %15, float** %7
br label %16
16: ; preds = %20, %2
%17 = load float*, float** %6
%18 = load float*, float** %7
%19 = icmp ult float* %17, %18
br i1 %19, label %20, label %23
20: ; preds = %16
%21 = load float*, float** %6
%22 = getelementptr inbounds float, float* %21, i32 1
store float* %22, float** %6
store float 0x479E000000000000, float* %21
br label %16
23: ; preds = %16
%24 = load i8**, i8*** %3
%25 = load i64, i64* %4
%26 = getelementptr inbounds [32 x float], [32 x float]* %5, i64 0, i64 0
%27 = call i32 @ncx_putn_float_float(i8** %24, i64 %25, float* %26)
ret i32 %27
}

LLVM IR (-O2):
define i32 @NC_fill_float(i8** %0, i64 %1) {
%3 = alloca [32 x float]
%4 = ptrtoint [32 x float]* %3 to i64
%5 = bitcast [32 x float]* %3 to i8*
%6 = icmp ult i64 %1, 33
%7 = zext i1 %6 to i32
%8 = tail call i32 @assert(i32 %7)
%9 = getelementptr inbounds [32 x float], [32 x float]* %3, i64 0, i64 0
%10 = getelementptr inbounds [32 x float], [32 x float]* %3, i64 0, i64 %1
%11 = icmp sgt i64 %1, 0
br i1 %11, label %12, label %98
12: ; preds = %2
%13 = shl i64 %1, 2
%14 = add i64 %13, %4
%15 = or i64 %4, 4
%16 = call i64 @llvm.umax.i64(i64 %14, i64 %15)
%17 = xor i64 %4, -1
%18 = add i64 %16, %17
%19 = lshr i64 %18, 2
%20 = add nuw nsw i64 %19, 1
%21 = icmp ult i64 %18, 28
br i1 %21, label %92, label %22
22: ; preds = %12
%23 = and i64 %20, 9223372036854775800
%24 = getelementptr [32 x float], [32 x float]* %3, i64 0, i64 %23
%25 = add nsw i64 %23, -8
%26 = lshr exact i64 %25, 3
%27 = add nuw nsw i64 %26, 1
%28 = and i64 %27, 7
%29 = icmp ult i64 %25, 56
br i1 %29, label %77, label %30
30: ; preds = %22
%31 = and i64 %27, 4611686018427387896
br label %32
32: ; preds = %32, %30
%33 = phi i64 [ 0, %30 ], [ %74, %32 ]
%34 = phi i64 [ 0, %30 ], [ %75, %32 ]
%35 = getelementptr [32 x float], [32 x float]* %3, i64 0, i64 %33
%36 = bitcast float* %35 to <4 x float>*
store <4 x float> <float 0x479E000000000000, float 0x479E000000000000, float 0x479E000000000000, float 0x479E000000000000>, <4 x float>* %36
%37 = getelementptr float, float* %35, i64 4
%38 = bitcast float* %37 to <4 x float>*
store <4 x float> <float 0x479E000000000000, float 0x479E000000000000, float 0x479E000000000000, float 0x479E000000000000>, <4 x float>* %38
%39 = or i64 %33, 8
%40 = getelementptr [32 x float], [32 x float]* %3, i64 0, i64 %39
%41 = bitcast float* %40 to <4 x float>*
store <4 x float> <float 0x479E000000000000, float 0x479E000000000000, float 0x479E000000000000, float 0x479E000000000000>, <4 x float>* %41
%42 = getelementptr float, float* %40, i64 4
%43 = bitcast float* %42 to <4 x float>*
store <4 x float> <float 0x479E000000000000, float 0x479E000000000000, float 0x479E000000000000, float 0x479E000000000000>, <4 x float>* %43
%44 = or i64 %33, 16
%45 = getelementptr [32 x float], [32 x float]* %3, i64 0, i64 %44
%46 = bitcast float* %45 to <4 x float>*
store <4 x float> <float 0x479E000000000000, float 0x479E000000000000, float 0x479E000000000000, float 0x479E000000000000>, <4 x float>* %46
%47 = getelementptr float, float* %45, i64 4
%48 = bitcast float* %47 to <4 x float>*
store <4 x float> <float 0x479E000000000000, float 0x479E000000000000, float 0x479E000000000000, float 0x479E000000000000>, <4 x float>* %48
%49 = or i64 %33, 24
%50 = getelementptr [32 x float], [32 x float]* %3, i64 0, i64 %49
%51 = bitcast float* %50 to <4 x float>*
store <4 x float> <float 0x479E000000000000, float 0x479E000000000000, float 0x479E000000000000, float 0x479E000000000000>, <4 x float>* %51
%52 = getelementptr float, float* %50, i64 4
%53 = bitcast float* %52 to <4 x float>*
store <4 x float> <float 0x479E000000000000, float 0x479E000000000000, float 0x479E000000000000, float 0x479E000000000000>, <4 x float>* %53
%54 = or i64 %33, 32
%55 = getelementptr [32 x float], [32 x float]* %3, i64 0, i64 %54
%56 = bitcast float* %55 to <4 x float>*
store <4 x float> <float 0x479E000000000000, float 0x479E000000000000, float 0x479E000000000000, float 0x479E000000000000>, <4 x float>* %56
%57 = getelementptr float, float* %55, i64 4
%58 = bitcast float* %57 to <4 x float>*
store <4 x float> <float 0x479E000000000000, float 0x479E000000000000, float 0x479E000000000000, float 0x479E000000000000>, <4 x float>* %58
%59 = or i64 %33, 40
%60 = getelementptr [32 x float], [32 x float]* %3, i64 0, i64 %59
%61 = bitcast float* %60 to <4 x float>*
store <4 x float> <float 0x479E000000000000, float 0x479E000000000000, float 0x479E000000000000, float 0x479E000000000000>, <4 x float>* %61
%62 = getelementptr float, float* %60, i64 4
%63 = bitcast float* %62 to <4 x float>*
store <4 x float> <float 0x479E000000000000, float 0x479E000000000000, float 0x479E000000000000, float 0x479E000000000000>, <4 x float>* %63
%64 = or i64 %33, 48
%65 = getelementptr [32 x float], [32 x float]* %3, i64 0, i64 %64
%66 = bitcast float* %65 to <4 x float>*
store <4 x float> <float 0x479E000000000000, float 0x479E000000000000, float 0x479E000000000000, float 0x479E000000000000>, <4 x float>* %66
%67 = getelementptr float, float* %65, i64 4
%68 = bitcast float* %67 to <4 x float>*
store <4 x float> <float 0x479E000000000000, float 0x479E000000000000, float 0x479E000000000000, float 0x479E000000000000>, <4 x float>* %68
%69 = or i64 %33, 56
%70 = getelementptr [32 x float], [32 x float]* %3, i64 0, i64 %69
%71 = bitcast float* %70 to <4 x float>*
store <4 x float> <float 0x479E000000000000, float 0x479E000000000000, float 0x479E000000000000, float 0x479E000000000000>, <4 x float>* %71
%72 = getelementptr float, float* %70, i64 4
%73 = bitcast float* %72 to <4 x float>*
store <4 x float> <float 0x479E000000000000, float 0x479E000000000000, float 0x479E000000000000, float 0x479E000000000000>, <4 x float>* %73
%74 = add nuw i64 %33, 64
%75 = add nuw i64 %34, 8
%76 = icmp eq i64 %75, %31
br i1 %76, label %77, label %32
77: ; preds = %32, %22
%78 = phi i64 [ 0, %22 ], [ %74, %32 ]
%79 = icmp eq i64 %28, 0
br i1 %79, label %90, label %80
80: ; preds = %77, %80
%81 = phi i64 [ %87, %80 ], [ %78, %77 ]
%82 = phi i64 [ %88, %80 ], [ 0, %77 ]
%83 = getelementptr [32 x float], [32 x float]* %3, i64 0, i64 %81
%84 = bitcast float* %83 to <4 x float>*
store <4 x float> <float 0x479E000000000000, float 0x479E000000000000, float 0x479E000000000000, float 0x479E000000000000>, <4 x float>* %84
%85 = getelementptr float, float* %83, i64 4
%86 = bitcast float* %85 to <4 x float>*
store <4 x float> <float 0x479E000000000000, float 0x479E000000000000, float 0x479E000000000000, float 0x479E000000000000>, <4 x float>* %86
%87 = add nuw i64 %81, 8
%88 = add i64 %82, 1
%89 = icmp eq i64 %88, %28
br i1 %89, label %90, label %80
90: ; preds = %80, %77
%91 = icmp eq i64 %20, %23
br i1 %91, label %98, label %92
92: ; preds = %12, %90
%93 = phi float* [ %9, %12 ], [ %24, %90 ]
br label %94
94: ; preds = %92, %94
%95 = phi float* [ %96, %94 ], [ %93, %92 ]
%96 = getelementptr inbounds float, float* %95, i64 1
store float 0x479E000000000000, float* %95
%97 = icmp ult float* %96, %10
br i1 %97, label %94, label %98
98: ; preds = %94, %90, %2
%99 = call i32 @ncx_putn_float_float(i8** %0, i64 %1, float* %9)
ret i32 %99
}