#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_int_int(void **, size_t, int *);
int NC_fill_int(void **xpp, size_t nelems) {
  int fillp[16 * sizeof(double) / 4];
  assert(nelems <= sizeof(fillp) / sizeof(fillp[0]));
  {
    int *vp = fillp;
    const int *const end = vp + nelems;
    while (vp < end) {
      *vp++ = (-2147483647L);
    }
  }
  return ncx_putn_int_int(xpp, nelems, fillp);
}


x86 assembly (clang, -O0):
<NC_fill_int>:
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    11a0 <NC_fill_int+0x80>
mov    -0x98(%rbp),%rax
mov    %rax,%rcx
add    $0x4,%rcx
mov    %rcx,-0x98(%rbp)
movl   $0x80000001,(%rax)
jmp    116c <NC_fill_int+0x4c>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
lea    -0x90(%rbp),%rdx
call   1040 <ncx_putn_int_int@plt>
add    $0xa0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<NC_fill_int>:
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_int+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_int+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_int+0x7e>
xor    %edx,%edx
jmp    1221 <NC_fill_int+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_int+0x90>
test   %rsi,%rsi
je     1252 <NC_fill_int+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_int+0x120>
cmp    %r8,%rcx
je     126f <NC_fill_int+0x14f>
lea    (%rsp,%r8,4),%rdx
nopl   0x0(%rax,%rax,1)
movl   $0x80000001,(%rdx)
add    $0x4,%rdx
cmp    %rax,%rdx
jb     1260 <NC_fill_int+0x140>
mov    %rsp,%rdx
mov    %r14,%rdi
mov    %rbx,%rsi
call   1040 <ncx_putn_int_int@plt>
add    $0x88,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i32 @NC_fill_int(i8** %0, i64 %1) {
%3 = alloca i8**
%4 = alloca i64
%5 = alloca [32 x i32]
%6 = alloca i32*
%7 = alloca i32*
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 i32], [32 x i32]* %5, i64 0, i64 0
store i32* %12, i32** %6
%13 = load i32*, i32** %6
%14 = load i64, i64* %4
%15 = getelementptr inbounds i32, i32* %13, i64 %14
store i32* %15, i32** %7
br label %16
16: ; preds = %20, %2
%17 = load i32*, i32** %6
%18 = load i32*, i32** %7
%19 = icmp ult i32* %17, %18
br i1 %19, label %20, label %23
20: ; preds = %16
%21 = load i32*, i32** %6
%22 = getelementptr inbounds i32, i32* %21, i32 1
store i32* %22, i32** %6
store i32 -2147483647, i32* %21
br label %16
23: ; preds = %16
%24 = load i8**, i8*** %3
%25 = load i64, i64* %4
%26 = getelementptr inbounds [32 x i32], [32 x i32]* %5, i64 0, i64 0
%27 = call i32 @ncx_putn_int_int(i8** %24, i64 %25, i32* %26)
ret i32 %27
}

LLVM IR (-O2):
define i32 @NC_fill_int(i8** %0, i64 %1) {
%3 = alloca [32 x i32]
%4 = ptrtoint [32 x i32]* %3 to i64
%5 = bitcast [32 x i32]* %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 i32], [32 x i32]* %3, i64 0, i64 0
%10 = getelementptr inbounds [32 x i32], [32 x i32]* %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 i32], [32 x i32]* %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 i32], [32 x i32]* %3, i64 0, i64 %33
%36 = bitcast i32* %35 to <4 x i32>*
store <4 x i32> <i32 -2147483647, i32 -2147483647, i32 -2147483647, i32 -2147483647>, <4 x i32>* %36
%37 = getelementptr i32, i32* %35, i64 4
%38 = bitcast i32* %37 to <4 x i32>*
store <4 x i32> <i32 -2147483647, i32 -2147483647, i32 -2147483647, i32 -2147483647>, <4 x i32>* %38
%39 = or i64 %33, 8
%40 = getelementptr [32 x i32], [32 x i32]* %3, i64 0, i64 %39
%41 = bitcast i32* %40 to <4 x i32>*
store <4 x i32> <i32 -2147483647, i32 -2147483647, i32 -2147483647, i32 -2147483647>, <4 x i32>* %41
%42 = getelementptr i32, i32* %40, i64 4
%43 = bitcast i32* %42 to <4 x i32>*
store <4 x i32> <i32 -2147483647, i32 -2147483647, i32 -2147483647, i32 -2147483647>, <4 x i32>* %43
%44 = or i64 %33, 16
%45 = getelementptr [32 x i32], [32 x i32]* %3, i64 0, i64 %44
%46 = bitcast i32* %45 to <4 x i32>*
store <4 x i32> <i32 -2147483647, i32 -2147483647, i32 -2147483647, i32 -2147483647>, <4 x i32>* %46
%47 = getelementptr i32, i32* %45, i64 4
%48 = bitcast i32* %47 to <4 x i32>*
store <4 x i32> <i32 -2147483647, i32 -2147483647, i32 -2147483647, i32 -2147483647>, <4 x i32>* %48
%49 = or i64 %33, 24
%50 = getelementptr [32 x i32], [32 x i32]* %3, i64 0, i64 %49
%51 = bitcast i32* %50 to <4 x i32>*
store <4 x i32> <i32 -2147483647, i32 -2147483647, i32 -2147483647, i32 -2147483647>, <4 x i32>* %51
%52 = getelementptr i32, i32* %50, i64 4
%53 = bitcast i32* %52 to <4 x i32>*
store <4 x i32> <i32 -2147483647, i32 -2147483647, i32 -2147483647, i32 -2147483647>, <4 x i32>* %53
%54 = or i64 %33, 32
%55 = getelementptr [32 x i32], [32 x i32]* %3, i64 0, i64 %54
%56 = bitcast i32* %55 to <4 x i32>*
store <4 x i32> <i32 -2147483647, i32 -2147483647, i32 -2147483647, i32 -2147483647>, <4 x i32>* %56
%57 = getelementptr i32, i32* %55, i64 4
%58 = bitcast i32* %57 to <4 x i32>*
store <4 x i32> <i32 -2147483647, i32 -2147483647, i32 -2147483647, i32 -2147483647>, <4 x i32>* %58
%59 = or i64 %33, 40
%60 = getelementptr [32 x i32], [32 x i32]* %3, i64 0, i64 %59
%61 = bitcast i32* %60 to <4 x i32>*
store <4 x i32> <i32 -2147483647, i32 -2147483647, i32 -2147483647, i32 -2147483647>, <4 x i32>* %61
%62 = getelementptr i32, i32* %60, i64 4
%63 = bitcast i32* %62 to <4 x i32>*
store <4 x i32> <i32 -2147483647, i32 -2147483647, i32 -2147483647, i32 -2147483647>, <4 x i32>* %63
%64 = or i64 %33, 48
%65 = getelementptr [32 x i32], [32 x i32]* %3, i64 0, i64 %64
%66 = bitcast i32* %65 to <4 x i32>*
store <4 x i32> <i32 -2147483647, i32 -2147483647, i32 -2147483647, i32 -2147483647>, <4 x i32>* %66
%67 = getelementptr i32, i32* %65, i64 4
%68 = bitcast i32* %67 to <4 x i32>*
store <4 x i32> <i32 -2147483647, i32 -2147483647, i32 -2147483647, i32 -2147483647>, <4 x i32>* %68
%69 = or i64 %33, 56
%70 = getelementptr [32 x i32], [32 x i32]* %3, i64 0, i64 %69
%71 = bitcast i32* %70 to <4 x i32>*
store <4 x i32> <i32 -2147483647, i32 -2147483647, i32 -2147483647, i32 -2147483647>, <4 x i32>* %71
%72 = getelementptr i32, i32* %70, i64 4
%73 = bitcast i32* %72 to <4 x i32>*
store <4 x i32> <i32 -2147483647, i32 -2147483647, i32 -2147483647, i32 -2147483647>, <4 x i32>* %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 i32], [32 x i32]* %3, i64 0, i64 %81
%84 = bitcast i32* %83 to <4 x i32>*
store <4 x i32> <i32 -2147483647, i32 -2147483647, i32 -2147483647, i32 -2147483647>, <4 x i32>* %84
%85 = getelementptr i32, i32* %83, i64 4
%86 = bitcast i32* %85 to <4 x i32>*
store <4 x i32> <i32 -2147483647, i32 -2147483647, i32 -2147483647, i32 -2147483647>, <4 x i32>* %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 i32* [ %9, %12 ], [ %24, %90 ]
br label %94
94: ; preds = %92, %94
%95 = phi i32* [ %96, %94 ], [ %93, %92 ]
%96 = getelementptr inbounds i32, i32* %95, i64 1
store i32 -2147483647, i32* %95
%97 = icmp ult i32* %96, %10
br i1 %97, label %94, label %98
98: ; preds = %94, %90, %2
%99 = call i32 @ncx_putn_int_int(i8** %0, i64 %1, i32* %9)
ret i32 %99
}