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

	if (fontstr[0] == '-')
		pattern = XftXlfdParse(fontstr, False, False);
	else
		pattern = FcNameParse((const 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);

	FcPatternDel(pattern, FC_SLANT);
	FcPatternAddInteger(pattern, FC_SLANT, FC_SLANT_ITALIC);
	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 0x126d0
movq -0x8(%rbp), %rdi
xorl %edx, %edx
movl %edx, %esi
callq 0x6760
movq %rax, -0x18(%rbp)
jmp 0x126dd
movq -0x8(%rbp), %rdi
callq 0x6980
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
jne 0x126f6
movq -0x8(%rbp), %rsi
leaq 0x4d9f(%rip), %rdi      # 0x1748e
movb $0x0, %al
callq 0x6bb0
movsd -0x10(%rbp), %xmm0
movsd 0x4885(%rip), %xmm1     # 0x16f88
ucomisd %xmm1, %xmm0
jbe 0x12750
movq -0x18(%rbp), %rdi
leaq 0x4d8e(%rip), %rsi      # 0x174a2
callq 0x6140
movq -0x18(%rbp), %rdi
leaq 0x4d83(%rip), %rsi      # 0x174a7
callq 0x6140
movq -0x18(%rbp), %rdi
movsd -0x10(%rbp), %xmm0
leaq 0x4d69(%rip), %rsi      # 0x174a2
callq 0x6160
movsd -0x10(%rbp), %xmm0
movsd %xmm0, 0xf33d(%rip)     # 0x21a88
jmp 0x127e1
movq -0x18(%rbp), %rdi
leaq 0x4d47(%rip), %rsi      # 0x174a2
xorl %edx, %edx
leaq -0x20(%rbp), %rcx
callq 0x61a0
cmpl $0x0, %eax
jne 0x1277a
movsd -0x20(%rbp), %xmm0
movsd %xmm0, 0xf310(%rip)     # 0x21a88
jmp 0x127d1
movq -0x18(%rbp), %rdi
leaq 0x4d22(%rip), %rsi      # 0x174a7
xorl %edx, %edx
leaq -0x20(%rbp), %rcx
callq 0x61a0
cmpl $0x0, %eax
jne 0x127a7
movsd 0x47d3(%rip), %xmm0     # 0x16f70
movsd %xmm0, 0xf2e3(%rip)     # 0x21a88
jmp 0x127cf
movq -0x18(%rbp), %rdi
leaq 0x4cf0(%rip), %rsi      # 0x174a2
movsd 0x47d6(%rip), %xmm0     # 0x16f90
callq 0x6160
movsd 0x47c9(%rip), %xmm0     # 0x16f90
movsd %xmm0, 0xf2b9(%rip)     # 0x21a88
jmp 0x127d1
movsd 0xf2af(%rip), %xmm0     # 0x21a88
movsd %xmm0, 0xf2af(%rip)     # 0x21a90
movq -0x18(%rbp), %rsi
leaq 0xefcc(%rip), %rdi      # 0x217b8
addq $0x10, %rdi
callq 0x13070
cmpl $0x0, %eax
je 0x1280c
movq -0x8(%rbp), %rsi
leaq 0x4c89(%rip), %rdi      # 0x1748e
movb $0x0, %al
callq 0x6bb0
xorps %xmm0, %xmm0
ucomisd 0xf271(%rip), %xmm0     # 0x21a88
jbe 0x12862
movq 0xefc8(%rip), %rax      # 0x217e8
movq 0x18(%rax), %rdi
leaq 0x4c77(%rip), %rsi      # 0x174a2
xorl %edx, %edx
leaq -0x20(%rbp), %rcx
callq 0x61a0
movsd -0x20(%rbp), %xmm0
movsd %xmm0, 0xf245(%rip)     # 0x21a88
movsd -0x10(%rbp), %xmm0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0x12860
jp 0x12860
movsd -0x20(%rbp), %xmm0
movsd %xmm0, 0xf230(%rip)     # 0x21a90
jmp 0x12862
cvtsi2ssl 0xef62(%rip), %xmm0 # 0x217cc
mulss 0x97c6(%rip), %xmm0     # 0x1c038
callq 0x67c0
cvttss2si %xmm0, %eax
movl %eax, 0xf153(%rip)      # 0x219d4
cvtsi2ssl 0xef3f(%rip), %xmm0 # 0x217c8
mulss 0x97ab(%rip), %xmm0     # 0x1c03c
callq 0x67c0
cvttss2si %xmm0, %eax
movl %eax, 0xf130(%rip)      # 0x219d0
movq -0x18(%rbp), %rdi
leaq 0x4c01(%rip), %rsi      # 0x174ac
callq 0x6140
movq -0x18(%rbp), %rdi
leaq 0x4bf1(%rip), %rsi      # 0x174ac
movl $0x64, %edx
callq 0x6890
movq -0x18(%rbp), %rsi
leaq 0xeee8(%rip), %rdi      # 0x217b8
addq $0x80, %rdi
callq 0x13070
cmpl $0x0, %eax
je 0x128f3
movq -0x8(%rbp), %rsi
leaq 0x4ba2(%rip), %rdi      # 0x1748e
movb $0x0, %al
callq 0x6bb0
movq -0x18(%rbp), %rdi
leaq 0x4bb4(%rip), %rsi      # 0x174b2
callq 0x6140
movq -0x18(%rbp), %rdi
leaq 0x4ba4(%rip), %rsi      # 0x174b2
movl $0xc8, %edx
callq 0x6890
movq -0x18(%rbp), %rsi
leaq 0xee95(%rip), %rdi      # 0x217b8
addq $0xb8, %rdi
callq 0x13070
cmpl $0x0, %eax
je 0x12946
movq -0x8(%rbp), %rsi
leaq 0x4b4f(%rip), %rdi      # 0x1748e
movb $0x0, %al
callq 0x6bb0
movq -0x18(%rbp), %rdi
leaq 0x4b5b(%rip), %rsi      # 0x174ac
callq 0x6140
movq -0x18(%rbp), %rdi
leaq 0x4b4b(%rip), %rsi      # 0x174ac
xorl %edx, %edx
callq 0x6890
movq -0x18(%rbp), %rsi
leaq 0xee45(%rip), %rdi      # 0x217b8
addq $0x48, %rdi
callq 0x13070
cmpl $0x0, %eax
je 0x12993
movq -0x8(%rbp), %rsi
leaq 0x4b02(%rip), %rdi      # 0x1748e
movb $0x0, %al
callq 0x6bb0
movq -0x18(%rbp), %rdi
callq 0x6050
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)