// File: /workspace/github_c_makefile_star2_O3/mrdotx[P]st/x.c
// Function: xloadsparefonts
void
xloadsparefonts(void)
{
	FcPattern *pattern;
	double sizeshift, fontval;
	int fc;
	char **fp;

	if (frclen != 0)
		die("can't embed spare fonts. cache isn't empty");

	/* Calculate count of spare fonts */
	fc = sizeof(font2) / sizeof(*font2);
	if (fc == 0)
		return;

	/* Allocate memory for cache entries. */
	if (frccap < 4 * fc) {
		frccap += 4 * fc - frccap;
		frc = xrealloc(frc, frccap * sizeof(Fontcache));
	}

	for (fp = font2; fp - font2 < fc; ++fp) {
	
		if (**fp == '-')
			pattern = XftXlfdParse(*fp, False, False);
		else
			pattern = FcNameParse((FcChar8 *)*fp);
	
		if (!pattern)
			die("can't open spare font %s\n", *fp);
	   		
		if (defaultfontsize > 0) {
			sizeshift = usedfontsize - defaultfontsize;
			if (sizeshift != 0 &&
					FcPatternGetDouble(pattern, FC_PIXEL_SIZE, 0, &fontval) ==
					FcResultMatch) {	
				fontval += sizeshift;
				FcPatternDel(pattern, FC_PIXEL_SIZE);
				FcPatternDel(pattern, FC_SIZE);
				FcPatternAddDouble(pattern, FC_PIXEL_SIZE, fontval);
			}
		}
	
		FcPatternAddBool(pattern, FC_SCALABLE, 1);
	
		FcConfigSubstitute(NULL, pattern, FcMatchPattern);
		XftDefaultSubstitute(xw.dpy, xw.scr, pattern);
	
		if (xloadsparefont(pattern, FRC_NORMAL))
			die("can't open spare font %s\n", *fp);
	
		FcPatternDel(pattern, FC_SLANT);
		FcPatternAddInteger(pattern, FC_SLANT, FC_SLANT_ITALIC);
		if (xloadsparefont(pattern, FRC_ITALIC))
			die("can't open spare font %s\n", *fp);
			
		FcPatternDel(pattern, FC_WEIGHT);
		FcPatternAddInteger(pattern, FC_WEIGHT, FC_WEIGHT_BOLD);
		if (xloadsparefont(pattern, FRC_ITALICBOLD))
			die("can't open spare font %s\n", *fp);
	
		FcPatternDel(pattern, FC_SLANT);
		FcPatternAddInteger(pattern, FC_SLANT, FC_SLANT_ROMAN);
		if (xloadsparefont(pattern, FRC_BOLD))
			die("can't open spare font %s\n", *fp);
	
		FcPatternDestroy(pattern);
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
cmpl $0x0, 0xe327(%rip)      # 0x1dca0
je 0xf989
leaq 0x38ce(%rip), %rdi      # 0x13250
xorl %eax, %eax
callq 0x6f9f
cmpl $0xb, 0xe320(%rip)      # 0x1dcb0
jg 0xf9b4
movl $0xc, 0xe314(%rip)      # 0x1dcb0
movq 0xe305(%rip), %rdi      # 0x1dca8
movl $0xc0, %esi
callq 0x7039
movq %rax, 0xe2f4(%rip)      # 0x1dca8
leaq 0x9bf5(%rip), %r14      # 0x195b0
leaq 0x38b9(%rip), %rbx      # 0x1327b
leaq 0x3843(%rip), %rbp      # 0x1320c
xorl %r13d, %r13d
movq (%r13,%r14), %rdi
cmpb $0x2d, (%rdi)
jne 0xf9e1
xorl %esi, %esi
xorl %edx, %edx
callq 0x6740
jmp 0xf9e6
callq 0x6970
movq %rax, %r15
testq %rax, %rax
jne 0xf9fd
movq (%r13,%r14), %rsi
movq %rbx, %rdi
xorl %eax, %eax
callq 0x6f9f
movsd 0xe2c3(%rip), %xmm0     # 0x1dcc8
ucomisd 0x32a3(%rip), %xmm0     # 0x12cb0
jbe 0xfa96
movsd 0xe2a5(%rip), %xmm1     # 0x1dcc0
subsd %xmm0, %xmm1
movsd %xmm1, 0x10(%rsp)
ucomisd 0x3283(%rip), %xmm1     # 0x12cb0
jne 0xfa31
jnp 0xfa96
movq %r15, %rdi
leaq 0x37c7(%rip), %rsi      # 0x13202
xorl %edx, %edx
leaq 0x8(%rsp), %rcx
callq 0x61a0
testl %eax, %eax
jne 0xfa96
movsd 0x10(%rsp), %xmm0
addsd 0x8(%rsp), %xmm0
movsd %xmm0, 0x8(%rsp)
movq %r15, %rdi
leaq 0x379b(%rip), %r12      # 0x13202
movq %r12, %rsi
callq 0x6140
movq %r15, %rdi
leaq 0x378e(%rip), %rsi      # 0x13207
callq 0x6140
movsd 0x8(%rsp), %xmm0
movq %r15, %rdi
movq %r12, %rsi
leaq 0x37ea(%rip), %rbx      # 0x1327b
callq 0x6160
movq %r15, %rdi
leaq 0x3585(%rip), %rsi      # 0x13025
movl $0x1, %edx
callq 0x6620
xorl %edi, %edi
movq %r15, %rsi
xorl %edx, %edx
callq 0x67f0
movq 0xe033(%rip), %rdi      # 0x1daf0
movl 0xe11d(%rip), %esi      # 0x1dbe0
movq %r15, %rdx
callq 0x6690
movq %r15, %rdi
xorl %esi, %esi
callq 0xfff1
testl %eax, %eax
je 0xfae8
movq (%r13,%r14), %rsi
movq %rbx, %rdi
xorl %eax, %eax
callq 0x6f9f
movq %r15, %rdi
movq %rbp, %rsi
callq 0x6140
movq %r15, %rdi
movq %rbp, %rsi
movl $0x64, %edx
callq 0x6880
movq %r15, %rdi
movl $0x1, %esi
callq 0xfff1
testl %eax, %eax
je 0xfb23
movq (%r13,%r14), %rsi
movq %rbx, %rdi
xorl %eax, %eax
callq 0x6f9f
movq %r15, %rdi
leaq 0x36e5(%rip), %r12      # 0x13212
movq %r12, %rsi
callq 0x6140
movq %r15, %rdi
movq %r12, %rsi
movl $0xc8, %edx
callq 0x6880
movq %r15, %rdi
movl $0x3, %esi
callq 0xfff1
testl %eax, %eax
je 0xfb65
movq (%r13,%r14), %rsi
movq %rbx, %rdi
xorl %eax, %eax
callq 0x6f9f
movq %r15, %rdi
movq %rbp, %rsi
callq 0x6140
movq %r15, %rdi
movq %rbp, %rsi
xorl %edx, %edx
callq 0x6880
movq %r15, %rdi
movl $0x2, %esi
callq 0xfff1
testl %eax, %eax
je 0xfb9d
movq (%r13,%r14), %rsi
movq %rbx, %rdi
xorl %eax, %eax
callq 0x6f9f
movq %r15, %rdi
callq 0x6050
addq $0x8, %r13
cmpq $0x11, %r13
jl 0xf9cc
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq