// File: /workspace/github_c_makefile_star2_O2/jrrk[P]cbzone/c_gpr.c
// Function: buildgcs
void buildgcs()
{
  XGCValues xgcv;
  XColor BColor, FColor;
  Font f;

  xgcv.foreground = pixels[opt->cpi[COLOR_FG]];
  xgcv.background = pixels[opt->cpi[COLOR_BG]];
  DrawGC = XCreateGC(d, w, GCForeground | GCBackground, &xgcv);
  xgcv.foreground = pixels[opt->cpi[COLOR_TEXT]];
  TextGC = XCreateGC(d, w, GCForeground | GCBackground, &xgcv);
  xgcv.foreground = pixels[opt->cpi[COLOR_BG]];
  EraseGC = XCreateGC(d, w, GCForeground | GCBackground, &xgcv);
  xgcv.function = GXxor;
  xgcv.foreground = pixels[opt->cpi[COLOR_TEXT]] ^ pixels[opt->cpi[COLOR_BG]];
  BitBltGC = XCreateGC(d, w, GCFunction | GCForeground | GCBackground, &xgcv);
  FColor.pixel = pixels[opt->cpi[COLOR_CURSOR]];
  XQueryColor(d, cmap, &FColor);
  BColor.pixel = pixels[opt->cpi[COLOR_BG]];
  XQueryColor(d, cmap, &BColor);
  if (opt->cursor)
    XDefineCursor(d, w,
                  XCreatePixmapCursor(d,
                                      XCreateBitmapFromData(d, w, cursor_bits,
                                                            16, 16),
                                      XCreateBitmapFromData(d, w, cshape_bits,
                                                            16, 16),
                                      &FColor, &BColor, 8, 10 ));
  else {
    f = XLoadFont(d, "fixed");
    XDefineCursor(d, w,
                  XCreateGlyphCursor(d, f, f, ' ', ' ', &FColor, &BColor));
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0xa8, %rsp
movq 0xd18e(%rip), %rax      # 0x13620
leaq 0xd0f7(%rip), %r15      # 0x13590
movq (%r15), %rcx
movslq 0xf4(%rcx), %rdx
movq (%rax,%rdx,8), %rdx
leaq 0x28(%rsp), %rbx
movq %rdx, 0x10(%rbx)
movslq 0xf0(%rcx), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, 0x18(%rbx)
movq 0xd172(%rip), %rdi      # 0x13638
movq 0xd173(%rip), %rsi      # 0x13640
pushq $0xc
popq %r14
movq %r14, %rdx
movq %rbx, %rcx
callq 0x43d0
movq %rax, 0xd1a5(%rip)      # 0x13688
movq 0xd136(%rip), %rax      # 0x13620
movq (%r15), %rcx
movslq 0x114(%rcx), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, 0x10(%rbx)
movq 0xd135(%rip), %rdi      # 0x13638
movq 0xd136(%rip), %rsi      # 0x13640
movq %r14, %rdx
movq %rbx, %rcx
callq 0x43d0
movq %rax, 0xd174(%rip)      # 0x13690
movq 0xd0fd(%rip), %rax      # 0x13620
movq (%r15), %rcx
movslq 0xf0(%rcx), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, 0x10(%rbx)
movq 0xd0fc(%rip), %rdi      # 0x13638
movq 0xd0fd(%rip), %rsi      # 0x13640
movq %r14, %rdx
movq %rbx, %rcx
callq 0x43d0
movq %rax, 0xd143(%rip)      # 0x13698
movl $0x6, (%rbx)
movq 0xd0be(%rip), %rax      # 0x13620
movq (%r15), %rcx
movslq 0x114(%rcx), %rdx
movslq 0xf0(%rcx), %rcx
movq (%rax,%rcx,8), %rcx
xorq (%rax,%rdx,8), %rcx
movq %rcx, 0x10(%rbx)
movq 0xd0b2(%rip), %rdi      # 0x13638
movq 0xd0b3(%rip), %rsi      # 0x13640
pushq $0xd
popq %rdx
movq %rbx, %rcx
callq 0x43d0
movq %rax, 0xd101(%rip)      # 0x136a0
movq 0xd07a(%rip), %rax      # 0x13620
movq (%r15), %rcx
movslq 0xf8(%rcx), %rcx
movq (%rax,%rcx,8), %rax
leaq 0x8(%rsp), %rdx
movq %rax, (%rdx)
movq 0xd075(%rip), %rdi      # 0x13638
movq 0xd086(%rip), %rsi      # 0x13650
callq 0x4420
movq 0xd04a(%rip), %rax      # 0x13620
movq (%r15), %rcx
movslq 0xf0(%rcx), %rcx
movq (%rax,%rcx,8), %rax
leaq 0x18(%rsp), %r14
movq %rax, (%r14)
movq 0xd045(%rip), %rdi      # 0x13638
movq 0xd056(%rip), %rsi      # 0x13650
movq %r14, %rdx
callq 0x4420
movq (%r15), %rax
cmpl $0x0, 0x50(%rax)
movq 0xd028(%rip), %rbx      # 0x13638
je 0x6680
movq 0xd027(%rip), %r14      # 0x13640
leaq 0xc2c0(%rip), %rdx      # 0x128e0
pushq $0x10
popq %rbp
movq %rbx, %rdi
movq %r14, %rsi
movl %ebp, %ecx
movl %ebp, %r8d
callq 0x43a0
movq %rax, %r15
movq 0xcffb(%rip), %rdi      # 0x13638
movq 0xcffc(%rip), %rsi      # 0x13640
leaq 0xc2b5(%rip), %rdx      # 0x12900
movl %ebp, %ecx
movl %ebp, %r8d
callq 0x43a0
movl $0xa, (%rsp)
leaq 0x8(%rsp), %rcx
leaq 0x18(%rsp), %r8
pushq $0x8
popq %r9
movq %rbx, %rdi
movq %r15, %rsi
movq %rax, %rdx
callq 0x42f0
movq %rbx, %rdi
movq %r14, %rsi
jmp 0x66c0
leaq 0x6b4f(%rip), %rsi      # 0xd1d6
movq %rbx, %rdi
callq 0x4040
movq 0xcfa2(%rip), %rbx      # 0x13638
movq 0xcfa3(%rip), %r15      # 0x13640
movq %r14, (%rsp)
pushq $0x20
popq %rcx
leaq 0x8(%rsp), %r9
movq %rbx, %rdi
movq %rax, %rsi
movq %rax, %rdx
movl %ecx, %r8d
callq 0x4080
movq %rbx, %rdi
movq %r15, %rsi
movq %rax, %rdx
callq 0x44c0
addq $0xa8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq