// File: /workspace/github_c_makefile_star2_O0/jaimecgomezz[P]st/x.c
// Function: xloadfonts
void xloadfonts(char *fontstr, double fontsize) {
  FcPattern *pattern;
  double fontval;

  if (fontstr[0] == '-')
    pattern = XftXlfdParse(fontstr, False, False);
  else
    pattern = FcNameParse((FcChar8 *)fontstr);

  if (!pattern)
    die("can't open font %s\n", fontstr);

  if (fontsize > 1) {
    FcPatternDel(pattern, FC_PIXEL_SIZE);
    FcPatternDel(pattern, FC_SIZE);
    FcPatternAddDouble(pattern, FC_PIXEL_SIZE, (double)fontsize);
    usedfontsize = fontsize;
  } else {
    if (FcPatternGetDouble(pattern, FC_PIXEL_SIZE, 0, &fontval) ==
        FcResultMatch) {
      usedfontsize = fontval;
    } else if (FcPatternGetDouble(pattern, FC_SIZE, 0, &fontval) ==
               FcResultMatch) {
      usedfontsize = -1;
    } else {
      /*
       * Default font size is 12, if none given. This is to
       * have a known usedfontsize value.
       */
      FcPatternAddDouble(pattern, FC_PIXEL_SIZE, 12);
      usedfontsize = 12;
    }
    defaultfontsize = usedfontsize;
  }

  if (xloadfont(&dc.font, pattern))
    die("can't open font %s\n", fontstr);

  if (usedfontsize < 0) {
    FcPatternGetDouble(dc.font.match->pattern, FC_PIXEL_SIZE, 0, &fontval);
    usedfontsize = fontval;
    if (fontsize == 0)
      defaultfontsize = fontval;
  }

  /* Setting character width and height. */
  win.cw = ceilf(dc.font.width * cwscale);
  win.ch = ceilf(dc.font.height * chscale);
  // >>>>>>>>>>>>>>>>>>>> vertcenter
  // ==================== vertcenter
  // ==================== vertcenter
  // <<<<<<<<<<<<<<<<<<<< vertcenter

  // >>>>>>>>>>>>>>>>>>>> relative-border
  // ==================== relative-border
  // ==================== relative-border
  // <<<<<<<<<<<<<<<<<<<< relative-border

  FcPatternDel(pattern, FC_SLANT);
  // >>>>>>>>>>>>>>>>>>>> disable-bold-italic-fonts
  // ==================== disable-bold-italic-fonts
  FcPatternAddInteger(pattern, FC_SLANT, FC_SLANT_ITALIC);
  // ==================== disable-bold-italic-fonts
  // <<<<<<<<<<<<<<<<<<<< disable-bold-italic-fonts
  if (xloadfont(&dc.ifont, pattern))
    die("can't open font %s\n", fontstr);

  FcPatternDel(pattern, FC_WEIGHT);
  FcPatternAddInteger(pattern, FC_WEIGHT, FC_WEIGHT_BOLD);
  if (xloadfont(&dc.ibfont, pattern))
    die("can't open font %s\n", fontstr);

  FcPatternDel(pattern, FC_SLANT);
  FcPatternAddInteger(pattern, FC_SLANT, FC_SLANT_ROMAN);
  if (xloadfont(&dc.bfont, pattern))
    die("can't open font %s\n", fontstr);

  FcPatternDestroy(pattern);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movsd %xmm0, -0x10(%rbp)
movq -0x8(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x2d, %eax
jne 0xee20
movq -0x8(%rbp), %rdi
xorl %edx, %edx
movl %edx, %esi
callq 0x56f0
movq %rax, -0x18(%rbp)
jmp 0xee2d
movq -0x8(%rbp), %rdi
callq 0x58d0
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
jne 0xee46
movq -0x8(%rbp), %rsi
leaq 0x32ac(%rip), %rdi      # 0x120eb
movb $0x0, %al
callq 0x5a70
movsd -0x10(%rbp), %xmm0
movsd 0x2f55(%rip), %xmm1     # 0x11da8
ucomisd %xmm1, %xmm0
jbe 0xeea0
movq -0x18(%rbp), %rdi
leaq 0x329b(%rip), %rsi      # 0x120ff
callq 0x5140
movq -0x18(%rbp), %rdi
leaq 0x3290(%rip), %rsi      # 0x12104
callq 0x5140
movq -0x18(%rbp), %rdi
movsd -0x10(%rbp), %xmm0
leaq 0x3276(%rip), %rsi      # 0x120ff
callq 0x5160
movsd -0x10(%rbp), %xmm0
movsd %xmm0, 0xc5d5(%rip)     # 0x1b470
jmp 0xef31
movq -0x18(%rbp), %rdi
leaq 0x3254(%rip), %rsi      # 0x120ff
xorl %edx, %edx
leaq -0x20(%rbp), %rcx
callq 0x5190
cmpl $0x0, %eax
jne 0xeeca
movsd -0x20(%rbp), %xmm0
movsd %xmm0, 0xc5a8(%rip)     # 0x1b470
jmp 0xef21
movq -0x18(%rbp), %rdi
leaq 0x322f(%rip), %rsi      # 0x12104
xorl %edx, %edx
leaq -0x20(%rbp), %rcx
callq 0x5190
cmpl $0x0, %eax
jne 0xeef7
movsd 0x2e9b(%rip), %xmm0     # 0x11d88
movsd %xmm0, 0xc57b(%rip)     # 0x1b470
jmp 0xef1f
movq -0x18(%rbp), %rdi
leaq 0x31fd(%rip), %rsi      # 0x120ff
movsd 0x2ea6(%rip), %xmm0     # 0x11db0
callq 0x5160
movsd 0x2e99(%rip), %xmm0     # 0x11db0
movsd %xmm0, 0xc551(%rip)     # 0x1b470
jmp 0xef21
movsd 0xc547(%rip), %xmm0     # 0x1b470
movsd %xmm0, 0xc547(%rip)     # 0x1b478
movq -0x18(%rbp), %rsi
leaq 0xc26c(%rip), %rdi      # 0x1b1a8
addq $0x10, %rdi
callq 0xf4c0
cmpl $0x0, %eax
je 0xef5c
movq -0x8(%rbp), %rsi
leaq 0x3196(%rip), %rdi      # 0x120eb
movb $0x0, %al
callq 0x5a70
xorps %xmm0, %xmm0
ucomisd 0xc509(%rip), %xmm0     # 0x1b470
jbe 0xefb2
movq 0xc268(%rip), %rax      # 0x1b1d8
movq 0x18(%rax), %rdi
leaq 0x3184(%rip), %rsi      # 0x120ff
xorl %edx, %edx
leaq -0x20(%rbp), %rcx
callq 0x5190
movsd -0x20(%rbp), %xmm0
movsd %xmm0, 0xc4dd(%rip)     # 0x1b470
movsd -0x10(%rbp), %xmm0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0xefb0
jp 0xefb0
movsd -0x20(%rbp), %xmm0
movsd %xmm0, 0xc4c8(%rip)     # 0x1b478
jmp 0xefb2
cvtsi2ssl 0xc202(%rip), %xmm0 # 0x1b1bc
mulss 0x7f8e(%rip), %xmm0     # 0x16f50
callq 0x5740
cvttss2si %xmm0, %eax
movl %eax, 0xc3e3(%rip)      # 0x1b3b4
cvtsi2ssl 0xc1df(%rip), %xmm0 # 0x1b1b8
mulss 0x7f73(%rip), %xmm0     # 0x16f54
callq 0x5740
cvttss2si %xmm0, %eax
movl %eax, 0xc3c0(%rip)      # 0x1b3b0
movq -0x18(%rbp), %rdi
leaq 0x310e(%rip), %rsi      # 0x12109
callq 0x5140
movq -0x18(%rbp), %rdi
leaq 0x30fe(%rip), %rsi      # 0x12109
movl $0x64, %edx
callq 0x5800
movq -0x18(%rbp), %rsi
leaq 0xc188(%rip), %rdi      # 0x1b1a8
addq $0x80, %rdi
callq 0xf4c0
cmpl $0x0, %eax
je 0xf043
movq -0x8(%rbp), %rsi
leaq 0x30af(%rip), %rdi      # 0x120eb
movb $0x0, %al
callq 0x5a70
movq -0x18(%rbp), %rdi
leaq 0x30c1(%rip), %rsi      # 0x1210f
callq 0x5140
movq -0x18(%rbp), %rdi
leaq 0x30b1(%rip), %rsi      # 0x1210f
movl $0xc8, %edx
callq 0x5800
movq -0x18(%rbp), %rsi
leaq 0xc135(%rip), %rdi      # 0x1b1a8
addq $0xb8, %rdi
callq 0xf4c0
cmpl $0x0, %eax
je 0xf096
movq -0x8(%rbp), %rsi
leaq 0x305c(%rip), %rdi      # 0x120eb
movb $0x0, %al
callq 0x5a70
movq -0x18(%rbp), %rdi
leaq 0x3068(%rip), %rsi      # 0x12109
callq 0x5140
movq -0x18(%rbp), %rdi
leaq 0x3058(%rip), %rsi      # 0x12109
xorl %edx, %edx
callq 0x5800
movq -0x18(%rbp), %rsi
leaq 0xc0e5(%rip), %rdi      # 0x1b1a8
addq $0x48, %rdi
callq 0xf4c0
cmpl $0x0, %eax
je 0xf0e3
movq -0x8(%rbp), %rsi
leaq 0x300f(%rip), %rdi      # 0x120eb
movb $0x0, %al
callq 0x5a70
movq -0x18(%rbp), %rdi
callq 0x5050
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)