// File: /workspace/github_c_makefile_star2_O0/jrrk[P]cbzone/c_gpr.c
// Function: writecolormap
int writecolormap(status)
     Bool* status;
{
  int i, j;
  XColor color;
  int ind = 0;
  int num = 0;

  *status = True;
  if (pixels != NULL)
    free(pixels);
  pixels = (Pixel*) calloc(cw, sizeof(Pixel));
  for (i=L_COLOR; *status && i>=0; i--)
    if (opt->cpi[i] == i)
      if (opt->fading_colors < 2 || i<FF_COLOR) {
        XParseColor(d, cmap, bases[i].name, &color);
        if (XAllocColor(d, cmap, &color))
          pixels[num++] = color.pixel;
        else
          *status = False;
      }
      else
        for (j=0; *status && j<opt->fading_colors; j++) {
          XParseColor(d, cmap, fcnames[ind++].name, &color);
          if (XAllocColor(d, cmap, &color))
            pixels[num++] = color.pixel;
          else
            *status = False;
        }
  return num;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movl $0x0, -0x24(%rbp)
movl $0x0, -0x28(%rbp)
movq -0x8(%rbp), %rax
movl $0x1, (%rax)
cmpq $0x0, 0x11534(%rip)     # 0x19a80
je 0x855a
movq 0x1152b(%rip), %rdi     # 0x19a80
callq 0x5240
movslq 0x11563(%rip), %rdi     # 0x19ac4
movl $0x8, %esi
callq 0x54c0
movq %rax, 0x1150e(%rip)     # 0x19a80
movl $0x12, -0xc(%rbp)
movq -0x8(%rbp), %rcx
xorl %eax, %eax
cmpl $0x0, (%rcx)
movb %al, -0x29(%rbp)
je 0x8591
cmpl $0x0, -0xc(%rbp)
setge %al
movb %al, -0x29(%rbp)
movb -0x29(%rbp), %al
testb $0x1, %al
jne 0x859d
jmp 0x871c
leaq 0x113bc(%rip), %rax     # 0x19960
movq (%rax), %rax
movslq -0xc(%rbp), %rcx
movl 0xf0(%rax,%rcx,4), %eax
cmpl -0xc(%rbp), %eax
jne 0x870c
leaq 0x1139e(%rip), %rax     # 0x19960
movq (%rax), %rax
cmpl $0x2, 0x148(%rax)
jl 0x85d4
cmpl $0xc, -0xc(%rbp)
jge 0x8647
movq 0x114bd(%rip), %rdi     # 0x19a98
movq 0x114ce(%rip), %rsi     # 0x19ab0
movq 0x1149f(%rip), %rdx     # 0x19a88
movslq -0xc(%rbp), %rax
imulq $0xe, %rax, %rax
addq %rax, %rdx
leaq -0x20(%rbp), %rcx
callq 0x5470
movq 0x11494(%rip), %rdi     # 0x19a98
movq 0x114a5(%rip), %rsi     # 0x19ab0
leaq -0x20(%rbp), %rdx
callq 0x54e0
cmpl $0x0, %eax
je 0x8638
movq -0x20(%rbp), %rdx
movq 0x1145c(%rip), %rax     # 0x19a80
movl -0x28(%rbp), %ecx
movl %ecx, %esi
addl $0x1, %esi
movl %esi, -0x28(%rbp)
movslq %ecx, %rcx
movq %rdx, (%rax,%rcx,8)
jmp 0x8642
movq -0x8(%rbp), %rax
movl $0x0, (%rax)
jmp 0x870a
movl $0x0, -0x10(%rbp)
movq -0x8(%rbp), %rcx
xorl %eax, %eax
cmpl $0x0, (%rcx)
movb %al, -0x2a(%rbp)
je 0x8675
movl -0x10(%rbp), %eax
leaq 0x112fa(%rip), %rcx     # 0x19960
movq (%rcx), %rcx
cmpl 0x148(%rcx), %eax
setl %al
movb %al, -0x2a(%rbp)
movb -0x2a(%rbp), %al
testb $0x1, %al
jne 0x8681
jmp 0x8708
movq 0x11410(%rip), %rdi     # 0x19a98
movq 0x11421(%rip), %rsi     # 0x19ab0
movq 0x113fa(%rip), %rdx     # 0x19a90
movl -0x24(%rbp), %eax
movl %eax, %ecx
addl $0x1, %ecx
movl %ecx, -0x24(%rbp)
cltq
imulq $0xe, %rax, %rax
addq %rax, %rdx
leaq -0x20(%rbp), %rcx
callq 0x5470
movq 0x113de(%rip), %rdi     # 0x19a98
movq 0x113ef(%rip), %rsi     # 0x19ab0
leaq -0x20(%rbp), %rdx
callq 0x54e0
cmpl $0x0, %eax
je 0x86ee
movq -0x20(%rbp), %rdx
movq 0x113a6(%rip), %rax     # 0x19a80
movl -0x28(%rbp), %ecx
movl %ecx, %esi
addl $0x1, %esi
movl %esi, -0x28(%rbp)
movslq %ecx, %rcx
movq %rdx, (%rax,%rcx,8)
jmp 0x86f8
movq -0x8(%rbp), %rax
movl $0x0, (%rax)
jmp 0x86fa
movl -0x10(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x10(%rbp)
jmp 0x864e
jmp 0x870a
jmp 0x870c
jmp 0x870e
movl -0xc(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x8579
movl -0x28(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)