#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 */
typedef struct TYPE_5__ TYPE_1__;

/* Type definitions */
struct TYPE_5__ {
  int flags;
  int red;
  int green;
  int blue;
  unsigned long pixel;
};
typedef TYPE_1__ XColor;
typedef int /*<<< orphan*/ Visual;
typedef int /*<<< orphan*/ Screen;
typedef int /*<<< orphan*/ Display;
typedef int /*<<< orphan*/ Colormap;
typedef int Bool;

/* Variables and functions */
int /*<<< orphan*/ *DefaultScreenOfDisplay(int /*<<< orphan*/ *);
int DoBlue;
int DoGreen;
int DoRed;
int False;
int /*<<< orphan*/ XAllocColor(int /*<<< orphan*/ *, int /*<<< orphan*/,
                               TYPE_1__ *);
int /*<<< orphan*/ XStoreColors(int /*<<< orphan*/ *, int /*<<< orphan*/,
                                TYPE_1__ *, int);
int /*<<< orphan*/ allocate_writable_colors(int /*<<< orphan*/ *,
                                            int /*<<< orphan*/, unsigned long *,
                                            int *);
int /*<<< orphan*/ complain(int, int, int, int);
int /*<<< orphan*/ free(unsigned long *);
int /*<<< orphan*/ has_writable_cells(int /*<<< orphan*/ *,
                                      int /*<<< orphan*/ *);
int /*<<< orphan*/ hsv_to_rgb(int, float, float, int *, int *, int *);
scalar_t__ malloc(int);
int random();
void make_random_colormap(Display *dpy, Visual *visual, Colormap cmap,
                          XColor *colors, int *ncolorsP, Bool bright_p,
                          Bool allocate_p, Bool *writable_pP, Bool verbose_p) {
  Bool wanted_writable = (allocate_p && writable_pP && *writable_pP);
  int ncolors = *ncolorsP;
  int i;
  Screen *screen = DefaultScreenOfDisplay(dpy);
  if (*ncolorsP <= 0)
    return;
  if (wanted_writable && !has_writable_cells(screen, visual))
    *writable_pP = False;
  for (i = 0; i < ncolors; i++) {
    colors[i].flags = DoRed | DoGreen | DoBlue;
    if (bright_p) {
      int H = random() % 360;
      float S = ((float)(random() % 70) + 30) / 100.0;
      float V = ((float)(random() % 34) + 66) / 100.0;
      hsv_to_rgb(H, S, V, &colors[i].red, &colors[i].green, &colors[i].blue);
    } else {
      colors[i].red = random() % 0xFFFF;
      colors[i].green = random() % 0xFFFF;
      colors[i].blue = random() % 0xFFFF;
    }
  }
  if (!allocate_p)
    return;
RETRY_NON_WRITABLE:
  if (writable_pP && *writable_pP) {
    unsigned long *pixels =
        (unsigned long *)malloc(sizeof(*pixels) * (ncolors + 1));
    allocate_writable_colors(dpy, cmap, pixels, &ncolors);
    if (ncolors > 0)
      for (i = 0; i < ncolors; i++)
        colors[i].pixel = pixels[i];
    free(pixels);
    if (ncolors > 0)
      XStoreColors(dpy, cmap, colors, ncolors);
  } else {
    for (i = 0; i < ncolors; i++) {
      XColor color;
      color = colors[i];
      if (!XAllocColor(dpy, cmap, &color))
        break;
      colors[i].pixel = color.pixel;
    }
    ncolors = i;
  }
  if (allocate_p && ncolors == 0 && writable_pP && *writable_pP) {
    ncolors = *ncolorsP;
    *writable_pP = False;
    goto RETRY_NON_WRITABLE;
  }
  if (verbose_p)
    complain(*ncolorsP, ncolors, wanted_writable,
             wanted_writable && *writable_pP);
  *ncolorsP = ncolors;
}


x86 assembly (clang, -O0):
<make_random_colormap>:
push   %rbp
mov    %rsp,%rbp
sub    $0x80,%rsp
mov    0x20(%rbp),%eax
mov    0x18(%rbp),%rax
mov    0x10(%rbp),%eax
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9d,-0x2c(%rbp)
xor    %eax,%eax
cmpl   $0x0,0x10(%rbp)
mov    %al,-0x71(%rbp)
je     11f8 <make_random_colormap+0x58>
xor    %eax,%eax
cmpq   $0x0,0x18(%rbp)
mov    %al,-0x71(%rbp)
je     11f8 <make_random_colormap+0x58>
mov    0x18(%rbp),%rax
cmpl   $0x0,(%rax)
setne  %al
mov    %al,-0x71(%rbp)
mov    -0x71(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x30(%rbp)
mov    -0x28(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x34(%rbp)
mov    -0x8(%rbp),%rdi
call   1070 <DefaultScreenOfDisplay@plt>
mov    %rax,-0x40(%rbp)
mov    -0x28(%rbp),%rax
cmpl   $0x0,(%rax)
jg     122b <make_random_colormap+0x8b>
jmp    15e1 <make_random_colormap+0x441>
cmpl   $0x0,-0x30(%rbp)
je     125a <make_random_colormap+0xba>
mov    -0x40(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   10c0 <has_writable_cells@plt>
cmp    $0x0,%eax
jne    125a <make_random_colormap+0xba>
mov    0x2d96(%rip),%rax
mov    (%rax),%ecx
mov    0x18(%rbp),%rax
mov    %ecx,(%rax)
movl   $0x0,-0x38(%rbp)
mov    -0x38(%rbp),%eax
cmp    -0x34(%rbp),%eax
jge    13eb <make_random_colormap+0x24b>
mov    0x2d6c(%rip),%rax
mov    (%rax),%ecx
mov    0x2d4b(%rip),%rax
or     (%rax),%ecx
mov    0x2d4a(%rip),%rax
or     (%rax),%ecx
mov    -0x20(%rbp),%rax
movslq -0x38(%rbp),%rdx
imul   $0x18,%rdx,%rdx
add    %rdx,%rax
mov    %ecx,(%rax)
cmpl   $0x0,-0x2c(%rbp)
je     1375 <make_random_colormap+0x1d5>
mov    $0x0,%al
call   1080 <random@plt>
mov    $0x168,%ecx
cltd
idiv   %ecx
mov    %edx,-0x44(%rbp)
mov    $0x0,%al
call   1080 <random@plt>
mov    $0x46,%ecx
cltd
idiv   %ecx
cvtsi2ss %edx,%xmm0
movss  0xd3c(%rip),%xmm1
addss  %xmm1,%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xd20(%rip),%xmm1
divsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x48(%rbp)
mov    $0x0,%al
call   1080 <random@plt>
mov    $0x22,%ecx
cltd
idiv   %ecx
cvtsi2ss %edx,%xmm0
movss  0xd00(%rip),%xmm1
addss  %xmm1,%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xce8(%rip),%xmm1
divsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x4c(%rbp)
mov    -0x44(%rbp),%edi
movss  -0x48(%rbp),%xmm0
movss  -0x4c(%rbp),%xmm1
mov    -0x20(%rbp),%rsi
movslq -0x38(%rbp),%rax
imul   $0x18,%rax,%rax
add    %rax,%rsi
add    $0x4,%rsi
mov    -0x20(%rbp),%rdx
movslq -0x38(%rbp),%rax
imul   $0x18,%rax,%rax
add    %rax,%rdx
add    $0x8,%rdx
mov    -0x20(%rbp),%rcx
movslq -0x38(%rbp),%rax
imul   $0x18,%rax,%rax
add    %rax,%rcx
add    $0xc,%rcx
call   1040 <hsv_to_rgb@plt>
jmp    13d8 <make_random_colormap+0x238>
mov    $0x0,%al
call   1080 <random@plt>
mov    $0xffff,%ecx
cltd
idiv   %ecx
mov    -0x20(%rbp),%rax
movslq -0x38(%rbp),%rcx
imul   $0x18,%rcx,%rcx
add    %rcx,%rax
mov    %edx,0x4(%rax)
mov    $0x0,%al
call   1080 <random@plt>
mov    $0xffff,%ecx
cltd
idiv   %ecx
mov    -0x20(%rbp),%rax
movslq -0x38(%rbp),%rcx
imul   $0x18,%rcx,%rcx
add    %rcx,%rax
mov    %edx,0x8(%rax)
mov    $0x0,%al
call   1080 <random@plt>
mov    $0xffff,%ecx
cltd
idiv   %ecx
mov    -0x20(%rbp),%rax
movslq -0x38(%rbp),%rcx
imul   $0x18,%rcx,%rcx
add    %rcx,%rax
mov    %edx,0xc(%rax)
jmp    13dd <make_random_colormap+0x23d>
mov    -0x38(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x38(%rbp)
jmp    1261 <make_random_colormap+0xc1>
cmpl   $0x0,0x10(%rbp)
jne    13fa <make_random_colormap+0x25a>
jmp    15e1 <make_random_colormap+0x441>
jmp    13ff <make_random_colormap+0x25f>
cmpq   $0x0,0x18(%rbp)
je     14bc <make_random_colormap+0x31c>
mov    0x18(%rbp),%rax
cmpl   $0x0,(%rax)
je     14bc <make_random_colormap+0x31c>
mov    -0x34(%rbp),%eax
add    $0x1,%eax
cltq
shl    $0x3,%rax
mov    %eax,%edi
call   1090 <malloc@plt>
mov    %rax,-0x58(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x14(%rbp),%esi
mov    -0x58(%rbp),%rdx
lea    -0x34(%rbp),%rcx
call   1060 <allocate_writable_colors@plt>
cmpl   $0x0,-0x34(%rbp)
jle    1491 <make_random_colormap+0x2f1>
movl   $0x0,-0x38(%rbp)
mov    -0x38(%rbp),%eax
cmp    -0x34(%rbp),%eax
jge    148c <make_random_colormap+0x2ec>
mov    -0x58(%rbp),%rax
movslq -0x38(%rbp),%rcx
mov    (%rax,%rcx,8),%rcx
mov    -0x20(%rbp),%rax
movslq -0x38(%rbp),%rdx
imul   $0x18,%rdx,%rdx
add    %rdx,%rax
mov    %rcx,0x10(%rax)
mov    -0x38(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x38(%rbp)
jmp    1453 <make_random_colormap+0x2b3>
jmp    1491 <make_random_colormap+0x2f1>
mov    -0x58(%rbp),%rdi
call   1030 <free@plt>
cmpl   $0x0,-0x34(%rbp)
jle    14b7 <make_random_colormap+0x317>
mov    -0x8(%rbp),%rdi
mov    -0x14(%rbp),%esi
mov    -0x20(%rbp),%rdx
mov    -0x34(%rbp),%ecx
call   10a0 <XStoreColors@plt>
jmp    153e <make_random_colormap+0x39e>
movl   $0x0,-0x38(%rbp)
mov    -0x38(%rbp),%eax
cmp    -0x34(%rbp),%eax
jge    1538 <make_random_colormap+0x398>
mov    -0x20(%rbp),%rax
movslq -0x38(%rbp),%rcx
imul   $0x18,%rcx,%rcx
add    %rcx,%rax
mov    (%rax),%rcx
mov    %rcx,-0x70(%rbp)
mov    0x8(%rax),%rcx
mov    %rcx,-0x68(%rbp)
mov    0x10(%rax),%rax
mov    %rax,-0x60(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x14(%rbp),%esi
lea    -0x70(%rbp),%rdx
call   1050 <XAllocColor@plt>
cmp    $0x0,%eax
jne    1513 <make_random_colormap+0x373>
jmp    1538 <make_random_colormap+0x398>
mov    -0x60(%rbp),%rcx
mov    -0x20(%rbp),%rax
movslq -0x38(%rbp),%rdx
imul   $0x18,%rdx,%rdx
add    %rdx,%rax
mov    %rcx,0x10(%rax)
mov    -0x38(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x38(%rbp)
jmp    14c3 <make_random_colormap+0x323>
mov    -0x38(%rbp),%eax
mov    %eax,-0x34(%rbp)
cmpl   $0x0,0x10(%rbp)
je     1587 <make_random_colormap+0x3e7>
cmpl   $0x0,-0x34(%rbp)
jne    1587 <make_random_colormap+0x3e7>
cmpq   $0x0,0x18(%rbp)
je     1587 <make_random_colormap+0x3e7>
mov    0x18(%rbp),%rax
cmpl   $0x0,(%rax)
je     1587 <make_random_colormap+0x3e7>
mov    -0x28(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x34(%rbp)
mov    0x2a6e(%rip),%rax
mov    (%rax),%ecx
mov    0x18(%rbp),%rax
mov    %ecx,(%rax)
jmp    13ff <make_random_colormap+0x25f>
cmpl   $0x0,0x20(%rbp)
je     15d8 <make_random_colormap+0x438>
mov    -0x28(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x80(%rbp)
mov    -0x34(%rbp),%eax
mov    %eax,-0x7c(%rbp)
mov    -0x30(%rbp),%eax
mov    %eax,-0x78(%rbp)
xor    %eax,%eax
cmpl   $0x0,-0x30(%rbp)
mov    %al,-0x72(%rbp)
je     15c2 <make_random_colormap+0x422>
mov    0x18(%rbp),%rax
cmpl   $0x0,(%rax)
setne  %al
mov    %al,-0x72(%rbp)
mov    -0x78(%rbp),%edx
mov    -0x7c(%rbp),%esi
mov    -0x80(%rbp),%edi
mov    -0x72(%rbp),%al
and    $0x1,%al
movzbl %al,%ecx
call   10b0 <complain@plt>
mov    -0x34(%rbp),%ecx
mov    -0x28(%rbp),%rax
mov    %ecx,(%rax)
add    $0x80,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<make_random_colormap>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x58,%rsp
mov    %r9d,%r13d
mov    %r8,%rbp
mov    %rcx,0x20(%rsp)
mov    %edx,%r15d
mov    %rsi,%r14
mov    %rdi,%rbx
mov    0x98(%rsp),%rax
xor    %r12d,%r12d
cmpl   $0x0,0x90(%rsp)
je     11e3 <make_random_colormap+0x43>
test   %rax,%rax
je     11e3 <make_random_colormap+0x43>
cmpl   $0x0,(%rax)
setne  %r12b
mov    0x0(%rbp),%eax
mov    %rax,0x18(%rsp)
mov    %eax,0xc(%rsp)
mov    %rbx,%rdi
call   1070 <DefaultScreenOfDisplay@plt>
cmpl   $0x0,0x0(%rbp)
jle    160a <make_random_colormap+0x46a>
mov    %rbp,0x38(%rsp)
movzbl %r12b,%ecx
mov    %ecx,0x2c(%rsp)
test   %ecx,%ecx
je     1234 <make_random_colormap+0x94>
mov    %rax,%rdi
mov    %r14,%rsi
call   10c0 <has_writable_cells@plt>
test   %eax,%eax
jne    1234 <make_random_colormap+0x94>
mov    0x2dc0(%rip),%rax
mov    (%rax),%eax
mov    0x98(%rsp),%rcx
mov    %eax,(%rcx)
cmpl   $0x0,0x18(%rsp)
jle    13e0 <make_random_colormap+0x240>
mov    0x20(%rsp),%rax
lea    0x8(%rax),%r14
mov    0x18(%rsp),%r12
jmp    12ee <make_random_colormap+0x14e>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movslq %eax,%rcx
imul   $0xffffffff80008001,%rcx,%rcx
shr    $0x20,%rcx
add    %eax,%ecx
mov    %ecx,%edx
shr    $0x1f,%edx
sar    $0xf,%ecx
add    %edx,%ecx
mov    %ecx,%edx
shl    $0x10,%edx
sub    %edx,%ecx
add    %eax,%ecx
mov    %ecx,-0x4(%r14)
xor    %eax,%eax
call   1080 <random@plt>
cltq
imul   $0xffffffff80008001,%rax,%rcx
shr    $0x20,%rcx
add    %eax,%ecx
mov    %ecx,%edx
shr    $0x1f,%edx
sar    $0xf,%ecx
add    %edx,%ecx
mov    %ecx,%edx
shl    $0x10,%edx
sub    %edx,%ecx
add    %eax,%ecx
mov    %ecx,(%r14)
xor    %eax,%eax
call   1080 <random@plt>
cltq
imul   $0xffffffff80008001,%rax,%rcx
shr    $0x20,%rcx
add    %eax,%ecx
mov    %ecx,%edx
shr    $0x1f,%edx
sar    $0xf,%ecx
add    %edx,%ecx
mov    %ecx,%edx
shl    $0x10,%edx
sub    %edx,%ecx
add    %eax,%ecx
mov    %ecx,0x4(%r14)
add    $0x18,%r14
add    $0xffffffffffffffff,%r12
je     13e0 <make_random_colormap+0x240>
mov    0x2cd3(%rip),%rax
mov    (%rax),%eax
mov    0x2ce2(%rip),%rcx
or     (%rcx),%eax
mov    0x2cc9(%rip),%rcx
or     (%rcx),%eax
mov    %eax,-0x8(%r14)
xor    %eax,%eax
call   1080 <random@plt>
test   %r13d,%r13d
je     1260 <make_random_colormap+0xc0>
movslq %eax,%rbp
imul   $0xffffffffb60b60b7,%rbp,%rax
shr    $0x20,%rax
add    %ebp,%eax
mov    %eax,%ecx
shr    $0x1f,%ecx
sar    $0x8,%eax
add    %ecx,%eax
imul   $0x168,%eax,%eax
sub    %eax,%ebp
xor    %eax,%eax
call   1080 <random@plt>
cltq
imul   $0xffffffffea0ea0eb,%rax,%rcx
shr    $0x20,%rcx
add    %eax,%ecx
mov    %ecx,%edx
shr    $0x1f,%edx
sar    $0x6,%ecx
add    %edx,%ecx
imul   $0x46,%ecx,%ecx
sub    %ecx,%eax
xorps  %xmm1,%xmm1
cvtsi2ss %eax,%xmm1
addss  0xc8d(%rip),%xmm1
movss  0xc89(%rip),%xmm0
divss  %xmm0,%xmm1
movss  %xmm1,0x10(%rsp)
xor    %eax,%eax
call   1080 <random@plt>
cltq
imul   $0x78787879,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
sar    $0x24,%rcx
add    %edx,%ecx
mov    %ecx,%edx
shl    $0x5,%edx
lea    (%rdx,%rcx,2),%ecx
sub    %ecx,%eax
xorps  %xmm1,%xmm1
cvtsi2ss %eax,%xmm1
addss  0xc4d(%rip),%xmm1
divss  0xc41(%rip),%xmm1
lea    -0x4(%r14),%rsi
lea    0x4(%r14),%rcx
mov    %ebp,%edi
movss  0x10(%rsp),%xmm0
mov    %r14,%rdx
call   1040 <hsv_to_rgb@plt>
jmp    12e0 <make_random_colormap+0x140>
cmpl   $0x0,0x90(%rsp)
mov    0x38(%rsp),%r12
je     160a <make_random_colormap+0x46a>
mov    0x20(%rsp),%rax
lea    0x58(%rax),%rcx
mov    %rcx,0x30(%rsp)
add    $0x10,%rax
mov    %rax,0x10(%rsp)
lea    0x40(%rsp),%r13
mov    0x98(%rsp),%rbp
mov    0x18(%rsp),%rcx
test   %rbp,%rbp
je     1530 <make_random_colormap+0x390>
cs nopw 0x0(%rax,%rax,1)
nop
cmpl   $0x0,0x0(%rbp)
je     1530 <make_random_colormap+0x390>
lea    0x8(,%rcx,8),%edi
call   1090 <malloc@plt>
mov    %rax,%rbp
mov    %rbx,%rdi
mov    %r15d,%esi
mov    %rax,%rdx
lea    0xc(%rsp),%rcx
call   1060 <allocate_writable_colors@plt>
mov    0xc(%rsp),%ecx
test   %ecx,%ecx
jle    14f4 <make_random_colormap+0x354>
lea    -0x1(%rcx),%rdx
mov    %ecx,%eax
and    $0x3,%eax
cmp    $0x3,%rdx
jae    147b <make_random_colormap+0x2db>
xor    %edx,%edx
jmp    14c0 <make_random_colormap+0x320>
and    $0xfffffffc,%ecx
mov    0x30(%rsp),%rsi
xor    %edx,%edx
cs nopw 0x0(%rax,%rax,1)
nop
mov    0x0(%rbp,%rdx,8),%rdi
mov    %rdi,-0x48(%rsi)
mov    0x8(%rbp,%rdx,8),%rdi
mov    %rdi,-0x30(%rsi)
mov    0x10(%rbp,%rdx,8),%rdi
mov    %rdi,-0x18(%rsi)
mov    0x18(%rbp,%rdx,8),%rdi
mov    %rdi,(%rsi)
add    $0x4,%rdx
add    $0x60,%rsi
cmp    %rdx,%rcx
jne    1490 <make_random_colormap+0x2f0>
test   %rax,%rax
je     14f4 <make_random_colormap+0x354>
lea    (%rdx,%rdx,2),%rcx
mov    0x10(%rsp),%rsi
lea    (%rsi,%rcx,8),%rcx
lea    0x0(,%rdx,8),%rdx
add    %rbp,%rdx
xor    %esi,%esi
nop
mov    (%rdx,%rsi,8),%rdi
mov    %rdi,(%rcx)
add    $0x1,%rsi
add    $0x18,%rcx
cmp    %rsi,%rax
jne    14e0 <make_random_colormap+0x340>
mov    %rbp,%rdi
call   1030 <free@plt>
mov    0xc(%rsp),%r14d
test   %r14d,%r14d
jle    151e <make_random_colormap+0x37e>
mov    %rbx,%rdi
mov    %r15d,%esi
mov    0x20(%rsp),%rdx
mov    %r14d,%ecx
call   10a0 <XStoreColors@plt>
mov    0xc(%rsp),%r14d
mov    0x98(%rsp),%rbp
test   %rbp,%rbp
jne    159d <make_random_colormap+0x3fd>
jmp    15ca <make_random_colormap+0x42a>
test   %ecx,%ecx
jle    1590 <make_random_colormap+0x3f0>
mov    0x10(%rsp),%rbp
xor    %r14d,%r14d
nopl   0x0(%rax)
mov    0x0(%rbp),%rax
mov    %rax,0x50(%rsp)
movups -0x10(%rbp),%xmm0
movaps %xmm0,0x40(%rsp)
mov    %rbx,%rdi
mov    %r15d,%esi
mov    %r13,%rdx
call   1050 <XAllocColor@plt>
test   %eax,%eax
je     157f <make_random_colormap+0x3df>
mov    0x50(%rsp),%rax
mov    %rax,0x0(%rbp)
add    $0x1,%r14
movslq 0xc(%rsp),%rax
add    $0x18,%rbp
cmp    %rax,%r14
jl     1540 <make_random_colormap+0x3a0>
mov    0x98(%rsp),%rbp
jmp    1593 <make_random_colormap+0x3f3>
nopl   0x0(%rax)
xor    %r14d,%r14d
mov    %r14d,0xc(%rsp)
test   %rbp,%rbp
je     15ca <make_random_colormap+0x42a>
test   %r14d,%r14d
jne    15ca <make_random_colormap+0x42a>
cmpl   $0x0,0x0(%rbp)
je     15d9 <make_random_colormap+0x439>
mov    (%r12),%ecx
mov    %ecx,0xc(%rsp)
mov    0x2a31(%rip),%rax
mov    (%rax),%eax
mov    %eax,0x0(%rbp)
test   %rbp,%rbp
jne    1430 <make_random_colormap+0x290>
jmp    1530 <make_random_colormap+0x390>
mov    %r14d,%esi
cmpl   $0x0,0xa0(%rsp)
jne    15e5 <make_random_colormap+0x445>
jmp    1606 <make_random_colormap+0x466>
xor    %esi,%esi
cmpl   $0x0,0xa0(%rsp)
je     1606 <make_random_colormap+0x466>
mov    (%r12),%edi
xor    %ecx,%ecx
mov    0x2c(%rsp),%edx
test   %edx,%edx
je     15fc <make_random_colormap+0x45c>
xor    %ecx,%ecx
cmpl   $0x0,0x0(%rbp)
setne  %cl
call   10b0 <complain@plt>
mov    0xc(%rsp),%r14d
mov    %r14d,(%r12)
add    $0x58,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
%struct.TYPE_5__ = type { i32, i32, i32, i32, i64 }
@False = global i32 0
@DoRed = global i32 0
@DoGreen = global i32 0
@DoBlue = global i32 0
define void @make_random_colormap(i32* %0, i32* %1, i32 %2, %struct.TYPE_5__* %3, i32* %4, i32 %5, i32 %6, i32* %7, i32 %8) {
%10 = alloca i32*
%11 = alloca i32*
%12 = alloca i32
%13 = alloca %struct.TYPE_5__*
%14 = alloca i32*
%15 = alloca i32
%16 = alloca i32
%17 = alloca i32*
%18 = alloca i32
%19 = alloca i32
%20 = alloca i32
%21 = alloca i32
%22 = alloca i32*
%23 = alloca i32
%24 = alloca float
%25 = alloca float
%26 = alloca i64*
%27 = alloca %struct.TYPE_5__
store i32* %0, i32** %10
store i32* %1, i32** %11
store i32 %2, i32* %12
store %struct.TYPE_5__* %3, %struct.TYPE_5__** %13
store i32* %4, i32** %14
store i32 %5, i32* %15
store i32 %6, i32* %16
store i32* %7, i32** %17
store i32 %8, i32* %18
%28 = load i32, i32* %16
%29 = icmp ne i32 %28, 0
br i1 %29, label %30, label %37
30: ; preds = %9
%31 = load i32*, i32** %17
%32 = icmp ne i32* %31, null
br i1 %32, label %33, label %37
33: ; preds = %30
%34 = load i32*, i32** %17
%35 = load i32, i32* %34
%36 = icmp ne i32 %35, 0
br label %37
37: ; preds = %33, %30, %9
%38 = phi i1 [ false, %30 ], [ false, %9 ], [ %36, %33 ]
%39 = zext i1 %38 to i32
store i32 %39, i32* %19
%40 = load i32*, i32** %14
%41 = load i32, i32* %40
store i32 %41, i32* %20
%42 = load i32*, i32** %10
%43 = call i32* @DefaultScreenOfDisplay(i32* %42)
store i32* %43, i32** %22
%44 = load i32*, i32** %14
%45 = load i32, i32* %44
%46 = icmp sle i32 %45, 0
br i1 %46, label %47, label %48
47: ; preds = %37
br label %266
48: ; preds = %37
%49 = load i32, i32* %19
%50 = icmp ne i32 %49, 0
br i1 %50, label %51, label %59
51: ; preds = %48
%52 = load i32*, i32** %22
%53 = load i32*, i32** %11
%54 = call i32 @has_writable_cells(i32* %52, i32* %53)
%55 = icmp ne i32 %54, 0
br i1 %55, label %59, label %56
56: ; preds = %51
%57 = load i32, i32* @False
%58 = load i32*, i32** %17
store i32 %57, i32* %58
br label %59
59: ; preds = %56, %51, %48
store i32 0, i32* %21
br label %60
60: ; preds = %136, %59
%61 = load i32, i32* %21
%62 = load i32, i32* %20
%63 = icmp slt i32 %61, %62
br i1 %63, label %64, label %139
64: ; preds = %60
%65 = load i32, i32* @DoRed
%66 = load i32, i32* @DoGreen
%67 = or i32 %65, %66
%68 = load i32, i32* @DoBlue
%69 = or i32 %67, %68
%70 = load %struct.TYPE_5__*, %struct.TYPE_5__** %13
%71 = load i32, i32* %21
%72 = sext i32 %71 to i64
%73 = getelementptr inbounds %struct.TYPE_5__, %struct.TYPE_5__* %70, i64 %72
%74 = getelementptr inbounds %struct.TYPE_5__, %struct.TYPE_5__* %73, i32 0, i32 0
store i32 %69, i32* %74
%75 = load i32, i32* %15
%76 = icmp ne i32 %75, 0
br i1 %76, label %77, label %113
77: ; preds = %64
%78 = call i32 (...) @random()
%79 = srem i32 %78, 360
store i32 %79, i32* %23
%80 = call i32 (...) @random()
%81 = srem i32 %80, 70
%82 = sitofp i32 %81 to float
%83 = fadd float %82, 3.000000e+01
%84 = fpext float %83 to double
%85 = fdiv double %84, 1.000000e+02
%86 = fptrunc double %85 to float
store float %86, float* %24
%87 = call i32 (...) @random()
%88 = srem i32 %87, 34
%89 = sitofp i32 %88 to float
%90 = fadd float %89, 6.600000e+01
%91 = fpext float %90 to double
%92 = fdiv double %91, 1.000000e+02
%93 = fptrunc double %92 to float
store float %93, float* %25
%94 = load i32, i32* %23
%95 = load float, float* %24
%96 = load float, float* %25
%97 = load %struct.TYPE_5__*, %struct.TYPE_5__** %13
%98 = load i32, i32* %21
%99 = sext i32 %98 to i64
%100 = getelementptr inbounds %struct.TYPE_5__, %struct.TYPE_5__* %97, i64 %99
%101 = getelementptr inbounds %struct.TYPE_5__, %struct.TYPE_5__* %100, i32 0, i32 1
%102 = load %struct.TYPE_5__*, %struct.TYPE_5__** %13
%103 = load i32, i32* %21
%104 = sext i32 %103 to i64
%105 = getelementptr inbounds %struct.TYPE_5__, %struct.TYPE_5__* %102, i64 %104
%106 = getelementptr inbounds %struct.TYPE_5__, %struct.TYPE_5__* %105, i32 0, i32 2
%107 = load %struct.TYPE_5__*, %struct.TYPE_5__** %13
%108 = load i32, i32* %21
%109 = sext i32 %108 to i64
%110 = getelementptr inbounds %struct.TYPE_5__, %struct.TYPE_5__* %107, i64 %109
%111 = getelementptr inbounds %struct.TYPE_5__, %struct.TYPE_5__* %110, i32 0, i32 3
%112 = call i32 @hsv_to_rgb(i32 %94, float %95, float %96, i32* %101, i32* %106, i32* %111)
br label %135
113: ; preds = %64
%114 = call i32 (...) @random()
%115 = srem i32 %114, 65535
%116 = load %struct.TYPE_5__*, %struct.TYPE_5__** %13
%117 = load i32, i32* %21
%118 = sext i32 %117 to i64
%119 = getelementptr inbounds %struct.TYPE_5__, %struct.TYPE_5__* %116, i64 %118
%120 = getelementptr inbounds %struct.TYPE_5__, %struct.TYPE_5__* %119, i32 0, i32 1
store i32 %115, i32* %120
%121 = call i32 (...) @random()
%122 = srem i32 %121, 65535
%123 = load %struct.TYPE_5__*, %struct.TYPE_5__** %13
%124 = load i32, i32* %21
%125 = sext i32 %124 to i64
%126 = getelementptr inbounds %struct.TYPE_5__, %struct.TYPE_5__* %123, i64 %125
%127 = getelementptr inbounds %struct.TYPE_5__, %struct.TYPE_5__* %126, i32 0, i32 2
store i32 %122, i32* %127
%128 = call i32 (...) @random()
%129 = srem i32 %128, 65535
%130 = load %struct.TYPE_5__*, %struct.TYPE_5__** %13
%131 = load i32, i32* %21
%132 = sext i32 %131 to i64
%133 = getelementptr inbounds %struct.TYPE_5__, %struct.TYPE_5__* %130, i64 %132
%134 = getelementptr inbounds %struct.TYPE_5__, %struct.TYPE_5__* %133, i32 0, i32 3
store i32 %129, i32* %134
br label %135
135: ; preds = %113, %77
br label %136
136: ; preds = %135
%137 = load i32, i32* %21
%138 = add nsw i32 %137, 1
store i32 %138, i32* %21
br label %60
139: ; preds = %60
%140 = load i32, i32* %16
%141 = icmp ne i32 %140, 0
br i1 %141, label %143, label %142
142: ; preds = %139
br label %266
143: ; preds = %139
br label %144
144: ; preds = %240, %143
%145 = load i32*, i32** %17
%146 = icmp ne i32* %145, null
br i1 %146, label %147, label %197
147: ; preds = %144
%148 = load i32*, i32** %17
%149 = load i32, i32* %148
%150 = icmp ne i32 %149, 0
br i1 %150, label %151, label %197
151: ; preds = %147
%152 = load i32, i32* %20
%153 = add nsw i32 %152, 1
%154 = sext i32 %153 to i64
%155 = mul i64 8, %154
%156 = trunc i64 %155 to i32
%157 = call i64 @malloc(i32 %156)
%158 = inttoptr i64 %157 to i64*
store i64* %158, i64** %26
%159 = load i32*, i32** %10
%160 = load i32, i32* %12
%161 = load i64*, i64** %26
%162 = call i32 @allocate_writable_colors(i32* %159, i32 %160, i64* %161, i32* %20)
%163 = load i32, i32* %20
%164 = icmp sgt i32 %163, 0
br i1 %164, label %165, label %185
165: ; preds = %151
store i32 0, i32* %21
br label %166
166: ; preds = %181, %165
%167 = load i32, i32* %21
%168 = load i32, i32* %20
%169 = icmp slt i32 %167, %168
br i1 %169, label %170, label %184
170: ; preds = %166
%171 = load i64*, i64** %26
%172 = load i32, i32* %21
%173 = sext i32 %172 to i64
%174 = getelementptr inbounds i64, i64* %171, i64 %173
%175 = load i64, i64* %174
%176 = load %struct.TYPE_5__*, %struct.TYPE_5__** %13
%177 = load i32, i32* %21
%178 = sext i32 %177 to i64
%179 = getelementptr inbounds %struct.TYPE_5__, %struct.TYPE_5__* %176, i64 %178
%180 = getelementptr inbounds %struct.TYPE_5__, %struct.TYPE_5__* %179, i32 0, i32 4
store i64 %175, i64* %180
br label %181
181: ; preds = %170
%182 = load i32, i32* %21
%183 = add nsw i32 %182, 1
store i32 %183, i32* %21
br label %166
184: ; preds = %166
br label %185
185: ; preds = %184, %151
%186 = load i64*, i64** %26
%187 = call i32 @free(i64* %186)
%188 = load i32, i32* %20
%189 = icmp sgt i32 %188, 0
br i1 %189, label %190, label %196
190: ; preds = %185
%191 = load i32*, i32** %10
%192 = load i32, i32* %12
%193 = load %struct.TYPE_5__*, %struct.TYPE_5__** %13
%194 = load i32, i32* %20
%195 = call i32 @XStoreColors(i32* %191, i32 %192, %struct.TYPE_5__* %193, i32 %194)
br label %196
196: ; preds = %190, %185
br label %227
197: ; preds = %147, %144
store i32 0, i32* %21
br label %198
198: ; preds = %222, %197
%199 = load i32, i32* %21
%200 = load i32, i32* %20
%201 = icmp slt i32 %199, %200
br i1 %201, label %202, label %225
202: ; preds = %198
%203 = load %struct.TYPE_5__*, %struct.TYPE_5__** %13
%204 = load i32, i32* %21
%205 = sext i32 %204 to i64
%206 = getelementptr inbounds %struct.TYPE_5__, %struct.TYPE_5__* %203, i64 %205
%207 = bitcast %struct.TYPE_5__* %27 to i8*
%208 = bitcast %struct.TYPE_5__* %206 to i8*
%209 = load i32*, i32** %10
%210 = load i32, i32* %12
%211 = call i32 @XAllocColor(i32* %209, i32 %210, %struct.TYPE_5__* %27)
%212 = icmp ne i32 %211, 0
br i1 %212, label %214, label %213
213: ; preds = %202
br label %225
214: ; preds = %202
%215 = getelementptr inbounds %struct.TYPE_5__, %struct.TYPE_5__* %27, i32 0, i32 4
%216 = load i64, i64* %215
%217 = load %struct.TYPE_5__*, %struct.TYPE_5__** %13
%218 = load i32, i32* %21
%219 = sext i32 %218 to i64
%220 = getelementptr inbounds %struct.TYPE_5__, %struct.TYPE_5__* %217, i64 %219
%221 = getelementptr inbounds %struct.TYPE_5__, %struct.TYPE_5__* %220, i32 0, i32 4
store i64 %216, i64* %221
br label %222
222: ; preds = %214
%223 = load i32, i32* %21
%224 = add nsw i32 %223, 1
store i32 %224, i32* %21
br label %198
225: ; preds = %213, %198
%226 = load i32, i32* %21
store i32 %226, i32* %20
br label %227
227: ; preds = %225, %196
%228 = load i32, i32* %16
%229 = icmp ne i32 %228, 0
br i1 %229, label %230, label %245
230: ; preds = %227
%231 = load i32, i32* %20
%232 = icmp eq i32 %231, 0
br i1 %232, label %233, label %245
233: ; preds = %230
%234 = load i32*, i32** %17
%235 = icmp ne i32* %234, null
br i1 %235, label %236, label %245
236: ; preds = %233
%237 = load i32*, i32** %17
%238 = load i32, i32* %237
%239 = icmp ne i32 %238, 0
br i1 %239, label %240, label %245
240: ; preds = %236
%241 = load i32*, i32** %14
%242 = load i32, i32* %241
store i32 %242, i32* %20
%243 = load i32, i32* @False
%244 = load i32*, i32** %17
store i32 %243, i32* %244
br label %144
245: ; preds = %236, %233, %230, %227
%246 = load i32, i32* %18
%247 = icmp ne i32 %246, 0
br i1 %247, label %248, label %263
248: ; preds = %245
%249 = load i32*, i32** %14
%250 = load i32, i32* %249
%251 = load i32, i32* %20
%252 = load i32, i32* %19
%253 = load i32, i32* %19
%254 = icmp ne i32 %253, 0
br i1 %254, label %255, label %259
255: ; preds = %248
%256 = load i32*, i32** %17
%257 = load i32, i32* %256
%258 = icmp ne i32 %257, 0
br label %259
259: ; preds = %255, %248
%260 = phi i1 [ false, %248 ], [ %258, %255 ]
%261 = zext i1 %260 to i32
%262 = call i32 @complain(i32 %250, i32 %251, i32 %252, i32 %261)
br label %263
263: ; preds = %259, %245
%264 = load i32, i32* %20
%265 = load i32*, i32** %14
store i32 %264, i32* %265
br label %266
266: ; preds = %263, %142, %47
ret void
}

LLVM IR (-O2):
%struct.TYPE_5__ = type { i32, i32, i32, i32, i64 }
@False = global i32 0
@DoRed = global i32 0
@DoGreen = global i32 0
@DoBlue = global i32 0
define void @make_random_colormap(i32* %0, i32* %1, i32 %2, %struct.TYPE_5__* %3, i32* nocapture %4, i32 %5, i32 %6, i32* %7, i32 %8) {
%10 = alloca i32
%11 = alloca %struct.TYPE_5__
%12 = icmp ne i32 %6, 0
%13 = icmp ne i32* %7, null
%14 = and i1 %12, %13
br i1 %14, label %15, label %18
15: ; preds = %9
%16 = load i32, i32* %7
%17 = icmp ne i32 %16, 0
br label %18
18: ; preds = %15, %9
%19 = phi i1 [ false, %9 ], [ %17, %15 ]
%20 = zext i1 %19 to i32
%21 = bitcast i32* %10 to i8*
%22 = load i32, i32* %4
store i32 %22, i32* %10
%23 = tail call i32* @DefaultScreenOfDisplay(i32* %0)
%24 = load i32, i32* %4
%25 = icmp slt i32 %24, 1
br i1 %25, label %184, label %26
26: ; preds = %18
br i1 %19, label %27, label %32
27: ; preds = %26
%28 = tail call i32 @has_writable_cells(i32* %23, i32* %1)
%29 = icmp eq i32 %28, 0
br i1 %29, label %30, label %32
30: ; preds = %27
%31 = load i32, i32* @False
store i32 %31, i32* %7
br label %32
32: ; preds = %30, %27, %26
%33 = icmp sgt i32 %22, 0
br i1 %33, label %34, label %74
34: ; preds = %32
%35 = icmp eq i32 %5, 0
%36 = zext i32 %22 to i64
br label %37
37: ; preds = %34, %71
%38 = phi i64 [ 0, %34 ], [ %72, %71 ]
%39 = load i32, i32* @DoRed
%40 = load i32, i32* @DoGreen
%41 = or i32 %40, %39
%42 = load i32, i32* @DoBlue
%43 = or i32 %41, %42
%44 = getelementptr inbounds %struct.TYPE_5__, %struct.TYPE_5__* %3, i64 %38, i32 0
store i32 %43, i32* %44
%45 = tail call i32 (...) @random()
br i1 %35, label %62, label %46
46: ; preds = %37
%47 = srem i32 %45, 360
%48 = tail call i32 (...) @random()
%49 = srem i32 %48, 70
%50 = sitofp i32 %49 to float
%51 = fadd float %50, 3.000000e+01
%52 = fdiv float %51, 1.000000e+02
%53 = tail call i32 (...) @random()
%54 = srem i32 %53, 34
%55 = sitofp i32 %54 to float
%56 = fadd float %55, 6.600000e+01
%57 = fdiv float %56, 1.000000e+02
%58 = getelementptr inbounds %struct.TYPE_5__, %struct.TYPE_5__* %3, i64 %38, i32 1
%59 = getelementptr inbounds %struct.TYPE_5__, %struct.TYPE_5__* %3, i64 %38, i32 2
%60 = getelementptr inbounds %struct.TYPE_5__, %struct.TYPE_5__* %3, i64 %38, i32 3
%61 = tail call i32 @hsv_to_rgb(i32 %47, float %52, float %57, i32* %58, i32* %59, i32* %60)
br label %71
62: ; preds = %37
%63 = srem i32 %45, 65535
%64 = getelementptr inbounds %struct.TYPE_5__, %struct.TYPE_5__* %3, i64 %38, i32 1
store i32 %63, i32* %64
%65 = tail call i32 (...) @random()
%66 = srem i32 %65, 65535
%67 = getelementptr inbounds %struct.TYPE_5__, %struct.TYPE_5__* %3, i64 %38, i32 2
store i32 %66, i32* %67
%68 = tail call i32 (...) @random()
%69 = srem i32 %68, 65535
%70 = getelementptr inbounds %struct.TYPE_5__, %struct.TYPE_5__* %3, i64 %38, i32 3
store i32 %69, i32* %70
br label %71
71: ; preds = %46, %62
%72 = add nuw nsw i64 %38, 1
%73 = icmp eq i64 %72, %36
br i1 %73, label %74, label %37
74: ; preds = %71, %32
br i1 %12, label %75, label %184
75: ; preds = %74
%76 = bitcast %struct.TYPE_5__* %11 to i8*
%77 = getelementptr inbounds %struct.TYPE_5__, %struct.TYPE_5__* %11, i64 0, i32 4
br label %78
78: ; preds = %75, %166
%79 = phi i32 [ %22, %75 ], [ %167, %166 ]
br i1 %13, label %80, label %138
80: ; preds = %78
%81 = load i32, i32* %7
%82 = icmp eq i32 %81, 0
br i1 %82, label %138, label %83
83: ; preds = %80
%84 = shl i32 %79, 3
%85 = add i32 %84, 8
%86 = call i64 @malloc(i32 %85)
%87 = inttoptr i64 %86 to i64*
%88 = call i32 @allocate_writable_colors(i32* %0, i32 %2, i64* %87, i32* %10)
%89 = load i32, i32* %10
%90 = icmp sgt i32 %89, 0
br i1 %90, label %91, label %131
91: ; preds = %83
%92 = zext i32 %89 to i64
%93 = add nsw i64 %92, -1
%94 = and i64 %92, 3
%95 = icmp ult i64 %93, 3
br i1 %95, label %119, label %96
96: ; preds = %91
%97 = and i64 %92, 4294967292
br label %98
98: ; preds = %98, %96
%99 = phi i64 [ 0, %96 ], [ %116, %98 ]
%100 = phi i64 [ 0, %96 ], [ %117, %98 ]
%101 = getelementptr inbounds i64, i64* %87, i64 %99
%102 = load i64, i64* %101
%103 = getelementptr inbounds %struct.TYPE_5__, %struct.TYPE_5__* %3, i64 %99, i32 4
store i64 %102, i64* %103
%104 = or i64 %99, 1
%105 = getelementptr inbounds i64, i64* %87, i64 %104
%106 = load i64, i64* %105
%107 = getelementptr inbounds %struct.TYPE_5__, %struct.TYPE_5__* %3, i64 %104, i32 4
store i64 %106, i64* %107
%108 = or i64 %99, 2
%109 = getelementptr inbounds i64, i64* %87, i64 %108
%110 = load i64, i64* %109
%111 = getelementptr inbounds %struct.TYPE_5__, %struct.TYPE_5__* %3, i64 %108, i32 4
store i64 %110, i64* %111
%112 = or i64 %99, 3
%113 = getelementptr inbounds i64, i64* %87, i64 %112
%114 = load i64, i64* %113
%115 = getelementptr inbounds %struct.TYPE_5__, %struct.TYPE_5__* %3, i64 %112, i32 4
store i64 %114, i64* %115
%116 = add nuw nsw i64 %99, 4
%117 = add i64 %100, 4
%118 = icmp eq i64 %117, %97
br i1 %118, label %119, label %98
119: ; preds = %98, %91
%120 = phi i64 [ 0, %91 ], [ %116, %98 ]
%121 = icmp eq i64 %94, 0
br i1 %121, label %131, label %122
122: ; preds = %119, %122
%123 = phi i64 [ %128, %122 ], [ %120, %119 ]
%124 = phi i64 [ %129, %122 ], [ 0, %119 ]
%125 = getelementptr inbounds i64, i64* %87, i64 %123
%126 = load i64, i64* %125
%127 = getelementptr inbounds %struct.TYPE_5__, %struct.TYPE_5__* %3, i64 %123, i32 4
store i64 %126, i64* %127
%128 = add nuw nsw i64 %123, 1
%129 = add i64 %124, 1
%130 = icmp eq i64 %129, %94
br i1 %130, label %131, label %122
131: ; preds = %119, %122, %83
%132 = call i32 @free(i64* %87)
%133 = load i32, i32* %10
%134 = icmp sgt i32 %133, 0
br i1 %134, label %135, label %159
135: ; preds = %131
%136 = call i32 @XStoreColors(i32* %0, i32 %2, %struct.TYPE_5__* %3, i32 %133)
%137 = load i32, i32* %10
br label %159
138: ; preds = %80, %78
%139 = icmp sgt i32 %79, 0
br i1 %139, label %140, label %157
140: ; preds = %138, %148
%141 = phi i64 [ %151, %148 ], [ 0, %138 ]
%142 = getelementptr inbounds %struct.TYPE_5__, %struct.TYPE_5__* %3, i64 %141
%143 = bitcast %struct.TYPE_5__* %142 to i8*
%144 = call i32 @XAllocColor(i32* %0, i32 %2, %struct.TYPE_5__* %11)
%145 = icmp eq i32 %144, 0
br i1 %145, label %146, label %148
146: ; preds = %140
%147 = trunc i64 %141 to i32
br label %157
148: ; preds = %140
%149 = load i64, i64* %77
%150 = getelementptr inbounds %struct.TYPE_5__, %struct.TYPE_5__* %3, i64 %141, i32 4
store i64 %149, i64* %150
%151 = add nuw nsw i64 %141, 1
%152 = load i32, i32* %10
%153 = sext i32 %152 to i64
%154 = icmp slt i64 %151, %153
br i1 %154, label %140, label %155
155: ; preds = %148
%156 = trunc i64 %151 to i32
br label %157
157: ; preds = %155, %138, %146
%158 = phi i32 [ %147, %146 ], [ 0, %138 ], [ %156, %155 ]
store i32 %158, i32* %10
br label %159
159: ; preds = %131, %135, %157
%160 = phi i32 [ %133, %131 ], [ %137, %135 ], [ %158, %157 ]
%161 = icmp eq i32 %160, 0
%162 = and i1 %13, %161
br i1 %162, label %163, label %169
163: ; preds = %159
%164 = load i32, i32* %7
%165 = icmp eq i32 %164, 0
br i1 %165, label %169, label %166
166: ; preds = %163
%167 = load i32, i32* %4
store i32 %167, i32* %10
%168 = load i32, i32* @False
store i32 %168, i32* %7
br label %78
169: ; preds = %163, %159
%170 = phi i32 [ 0, %163 ], [ %160, %159 ]
%171 = icmp eq i32 %8, 0
br i1 %171, label %182, label %172
172: ; preds = %169
%173 = load i32, i32* %4
br i1 %19, label %174, label %178
174: ; preds = %172
%175 = load i32, i32* %7
%176 = icmp ne i32 %175, 0
%177 = zext i1 %176 to i32
br label %178
178: ; preds = %174, %172
%179 = phi i32 [ 0, %172 ], [ %177, %174 ]
%180 = call i32 @complain(i32 %173, i32 %170, i32 %20, i32 %179)
%181 = load i32, i32* %10
br label %182
182: ; preds = %178, %169
%183 = phi i32 [ %181, %178 ], [ %160, %169 ]
store i32 %183, i32* %4
br label %184
184: ; preds = %74, %18, %182
ret void
}