// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x30, %rsp
cmpl $0x0, 0xf0a1(%rip)      # 0x21a60
je 0x129cf
leaq 0x4b28(%rip), %rdi      # 0x174f0
movb $0x0, %al
callq 0x6bb0
movl $0x3, -0x1c(%rbp)
cmpl $0x0, -0x1c(%rbp)
jne 0x129e1
jmp 0x12c9c
movl 0xf089(%rip), %eax      # 0x21a70
movl -0x1c(%rbp), %ecx
shll $0x2, %ecx
cmpl %ecx, %eax
jge 0x12a27
movl -0x1c(%rbp), %eax
shll $0x2, %eax
subl 0xf073(%rip), %eax      # 0x21a70
addl 0xf06d(%rip), %eax      # 0x21a70
movl %eax, 0xf067(%rip)      # 0x21a70
movq 0xf058(%rip), %rdi      # 0x21a68
movslq 0xf059(%rip), %rsi      # 0x21a70
shlq $0x4, %rsi
callq 0x6c60
movq %rax, 0xf041(%rip)      # 0x21a68
leaq 0x8db2(%rip), %rax      # 0x1b7e0
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
leaq 0x8da3(%rip), %rcx      # 0x1b7e0
subq %rcx, %rax
sarq $0x3, %rax
movslq -0x1c(%rbp), %rcx
cmpq %rcx, %rax
jge 0x12c9c
movq -0x28(%rbp), %rax
movq (%rax), %rax
movsbl (%rax), %eax
cmpl $0x2d, %eax
jne 0x12a76
movq -0x28(%rbp), %rax
movq (%rax), %rdi
xorl %edx, %edx
movl %edx, %esi
callq 0x6760
movq %rax, -0x8(%rbp)
jmp 0x12a86
movq -0x28(%rbp), %rax
movq (%rax), %rdi
callq 0x6980
movq %rax, -0x8(%rbp)
cmpq $0x0, -0x8(%rbp)
jne 0x12aa2
movq -0x28(%rbp), %rax
movq (%rax), %rsi
leaq 0x4a80(%rip), %rdi      # 0x1751b
movb $0x0, %al
callq 0x6bb0
movsd 0xefe6(%rip), %xmm0     # 0x21a90
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jbe 0x12b3f
movsd 0xefc9(%rip), %xmm0     # 0x21a88
subsd 0xefc9(%rip), %xmm0     # 0x21a90
movsd %xmm0, -0x10(%rbp)
movsd -0x10(%rbp), %xmm0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0x12ade
jp 0x12ade
jmp 0x12b3d
movq -0x8(%rbp), %rdi
leaq 0x49b9(%rip), %rsi      # 0x174a2
xorl %edx, %edx
leaq -0x18(%rbp), %rcx
callq 0x61a0
cmpl $0x0, %eax
jne 0x12b3d
movsd -0x10(%rbp), %xmm0
addsd -0x18(%rbp), %xmm0
movsd %xmm0, -0x18(%rbp)
movq -0x8(%rbp), %rdi
leaq 0x498f(%rip), %rsi      # 0x174a2
callq 0x6140
movq -0x8(%rbp), %rdi
leaq 0x4984(%rip), %rsi      # 0x174a7
callq 0x6140
movq -0x8(%rbp), %rdi
movsd -0x18(%rbp), %xmm0
leaq 0x496a(%rip), %rsi      # 0x174a2
callq 0x6160
jmp 0x12b3f
movq -0x8(%rbp), %rdi
leaq 0x477b(%rip), %rsi      # 0x172c5
movl $0x1, %edx
callq 0x6630
movq -0x8(%rbp), %rsi
xorl %eax, %eax
movl %eax, %edi
xorl %edx, %edx
callq 0x6810
movq 0xed46(%rip), %rdi      # 0x218b0
movl 0xee30(%rip), %esi      # 0x219a0
movq -0x8(%rbp), %rdx
callq 0x66b0
movq -0x8(%rbp), %rdi
xorl %esi, %esi
callq 0x13310
cmpl $0x0, %eax
je 0x12b9e
movq -0x28(%rbp), %rax
movq (%rax), %rsi
leaq 0x4984(%rip), %rdi      # 0x1751b
movb $0x0, %al
callq 0x6bb0
movq -0x8(%rbp), %rdi
leaq 0x4903(%rip), %rsi      # 0x174ac
callq 0x6140
movq -0x8(%rbp), %rdi
leaq 0x48f3(%rip), %rsi      # 0x174ac
movl $0x64, %edx
callq 0x6890
movq -0x8(%rbp), %rdi
movl $0x1, %esi
callq 0x13310
cmpl $0x0, %eax
je 0x12beb
movq -0x28(%rbp), %rax
movq (%rax), %rsi
leaq 0x4937(%rip), %rdi      # 0x1751b
movb $0x0, %al
callq 0x6bb0
movq -0x8(%rbp), %rdi
leaq 0x48bc(%rip), %rsi      # 0x174b2
callq 0x6140
movq -0x8(%rbp), %rdi
leaq 0x48ac(%rip), %rsi      # 0x174b2
movl $0xc8, %edx
callq 0x6890
movq -0x8(%rbp), %rdi
movl $0x3, %esi
callq 0x13310
cmpl $0x0, %eax
je 0x12c38
movq -0x28(%rbp), %rax
movq (%rax), %rsi
leaq 0x48ea(%rip), %rdi      # 0x1751b
movb $0x0, %al
callq 0x6bb0
movq -0x8(%rbp), %rdi
leaq 0x4869(%rip), %rsi      # 0x174ac
callq 0x6140
movq -0x8(%rbp), %rdi
leaq 0x4859(%rip), %rsi      # 0x174ac
xorl %edx, %edx
callq 0x6890
movq -0x8(%rbp), %rdi
movl $0x2, %esi
callq 0x13310
cmpl $0x0, %eax
je 0x12c82
movq -0x28(%rbp), %rax
movq (%rax), %rsi
leaq 0x48a0(%rip), %rdi      # 0x1751b
movb $0x0, %al
callq 0x6bb0
movq -0x8(%rbp), %rdi
callq 0x6050
movq -0x28(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x28(%rbp)
jmp 0x12a32
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)