// File: /workspace/github_c_makefile_star2_O0/aligrudi[P]neatmkfn/afm.c
// Function: afm_read
int afm_read(void)
{
	char ln[1024];
	char ch[TOKLEN] = "", pos[TOKLEN] = "";
	char c1[TOKLEN] = "", c2[TOKLEN] = "";
	char wid[TOKLEN] = "", field[TOKLEN] = "";
	char llx[TOKLEN] = "0", lly[TOKLEN] = "0";
	char urx[TOKLEN] = "0", ury[TOKLEN] = "0";
	char fontname[128];
	char *s;
	while (fgets(ln, sizeof(ln), stdin)) {
		if (ln[0] == '#')
			continue;
		if (!strncmp("FontName ", ln, 8)) {
			sscanf(ln, "FontName %s", fontname);
			continue;
		}
		if (!strncmp("StartCharMetrics", ln, 16))
			break;
	}
	while (fgets(ln, sizeof(ln), stdin)) {
		if (ln[0] == '#')
			continue;
		if (!strncmp("EndCharMetrics", ln, 14))
			break;
		s = ln;
		while (*s) {
			s = afm_charfield(s, field);
			if (!strcmp("C", field)) {
				s = afm_charfield(s, pos);
				continue;
			}
			if (!strcmp("WX", field)) {
				s = afm_charfield(s, wid);
				continue;
			}
			if (!strcmp("N", field)) {
				s = afm_charfield(s, ch);
				continue;
			}
			if (!strcmp("B", field)) {
				s = afm_charfield(s, llx);
				s = afm_charfield(s, lly);
				s = afm_charfield(s, urx);
				s = afm_charfield(s, ury);
				continue;
			}
			if (!strcmp("L", field)) {
				s = afm_charfield(s, c1);
				s = afm_charfield(s, c2);
				continue;
			}
			break;
		}
		if (ch[0] && pos[0] && wid[0])
			mkfn_char(ch, atoi(pos), 0, uwid(atoi(wid)),
				uwid(atoi(llx)), uwid(atoi(lly)),
				uwid(atoi(urx)), uwid(atoi(ury)));
	}
	mkfn_header(fontname);
	while (fgets(ln, sizeof(ln), stdin)) {
		if (ln[0] == '#')
			continue;
		if (!strncmp("StartKernPairs", ln, 14))
			break;
	}
	while (fgets(ln, sizeof(ln), stdin)) {
		if (ln[0] == '#')
			continue;
		if (!strncmp("EndKernPairs", ln, 12))
			break;
		if (sscanf(ln, "KPX %s %s %s", c1, c2, wid) == 3)
			mkfn_kern(c1, c2, uwid(atoi(wid)));
	}
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xed0, %rsp            # imm = 0xED0
leaq -0x500(%rbp), %rdi
xorl %esi, %esi
movl $0x100, %edx            # imm = 0x100
callq 0x3d0f0
leaq -0x600(%rbp), %rdi
xorl %esi, %esi
movl $0x100, %edx            # imm = 0x100
callq 0x3d0f0
leaq -0x700(%rbp), %rdi
xorl %esi, %esi
movl $0x100, %edx            # imm = 0x100
callq 0x3d0f0
leaq -0x800(%rbp), %rdi
xorl %esi, %esi
movl $0x100, %edx            # imm = 0x100
callq 0x3d0f0
leaq -0x900(%rbp), %rdi
xorl %esi, %esi
movl $0x100, %edx            # imm = 0x100
callq 0x3d0f0
leaq -0xa00(%rbp), %rdi
xorl %esi, %esi
movl $0x100, %edx            # imm = 0x100
callq 0x3d0f0
leaq -0xb00(%rbp), %rdi
xorl %esi, %esi
movl $0x100, %edx            # imm = 0x100
callq 0x3d0f0
movb $0x30, -0xb00(%rbp)
leaq -0xc00(%rbp), %rdi
xorl %esi, %esi
movl $0x100, %edx            # imm = 0x100
callq 0x3d0f0
movb $0x30, -0xc00(%rbp)
leaq -0xd00(%rbp), %rdi
xorl %esi, %esi
movl $0x100, %edx            # imm = 0x100
callq 0x3d0f0
movb $0x30, -0xd00(%rbp)
leaq -0xe00(%rbp), %rdi
xorl %esi, %esi
movl $0x100, %edx            # imm = 0x100
callq 0x3d0f0
movb $0x30, -0xe00(%rbp)
leaq -0x400(%rbp), %rdi
movq 0x1a915(%rip), %rax     # 0x59fd8
movq (%rax), %rdx
movl $0x400, %esi            # imm = 0x400
callq 0x3d110
cmpq $0x0, %rax
je 0x3f743
movsbl -0x400(%rbp), %eax
cmpl $0x23, %eax
jne 0x3f6e4
jmp 0x3f6b5
leaq -0x400(%rbp), %rsi
leaq 0x18339(%rip), %rdi     # 0x57a2b
movl $0x8, %edx
callq 0x3d040
cmpl $0x0, %eax
jne 0x3f71f
leaq -0x400(%rbp), %rdi
leaq -0xe80(%rbp), %rdx
leaq 0x1831f(%rip), %rsi     # 0x57a35
movb $0x0, %al
callq 0x3d160
jmp 0x3f6b5
leaq -0x400(%rbp), %rsi
leaq 0x18314(%rip), %rdi     # 0x57a41
movl $0x10, %edx
callq 0x3d040
cmpl $0x0, %eax
jne 0x3f73e
jmp 0x3f743
jmp 0x3f6b5
jmp 0x3f745
leaq -0x400(%rbp), %rdi
movq 0x1a885(%rip), %rax     # 0x59fd8
movq (%rax), %rdx
movl $0x400, %esi            # imm = 0x400
callq 0x3d110
cmpq $0x0, %rax
je 0x3fa4f
movsbl -0x400(%rbp), %eax
cmpl $0x23, %eax
jne 0x3f778
jmp 0x3f745
leaq -0x400(%rbp), %rsi
leaq 0x182cc(%rip), %rdi     # 0x57a52
movl $0xe, %edx
callq 0x3d040
cmpl $0x0, %eax
jne 0x3f79a
jmp 0x3fa4f
leaq -0x400(%rbp), %rax
movq %rax, -0xe88(%rbp)
movq -0xe88(%rbp), %rax
cmpb $0x0, (%rax)
je 0x3f94c
movq -0xe88(%rbp), %rdi
leaq -0xa00(%rbp), %rsi
callq 0x3fb90
movq %rax, -0xe88(%rbp)
leaq -0xa00(%rbp), %rsi
leaq 0x17d92(%rip), %rdi     # 0x57572
callq 0x3d120
cmpl $0x0, %eax
jne 0x3f806
movq -0xe88(%rbp), %rdi
leaq -0x600(%rbp), %rsi
callq 0x3fb90
movq %rax, -0xe88(%rbp)
jmp 0x3f7a8
leaq -0xa00(%rbp), %rsi
leaq 0x1824d(%rip), %rdi     # 0x57a61
callq 0x3d120
cmpl $0x0, %eax
jne 0x3f83d
movq -0xe88(%rbp), %rdi
leaq -0x900(%rbp), %rsi
callq 0x3fb90
movq %rax, -0xe88(%rbp)
jmp 0x3f7a8
leaq -0xa00(%rbp), %rsi
leaq 0x17d21(%rip), %rdi     # 0x5756c
callq 0x3d120
cmpl $0x0, %eax
jne 0x3f874
movq -0xe88(%rbp), %rdi
leaq -0x500(%rbp), %rsi
callq 0x3fb90
movq %rax, -0xe88(%rbp)
jmp 0x3f7a8
leaq -0xa00(%rbp), %rsi
leaq 0x17cae(%rip), %rdi     # 0x57530
callq 0x3d120
cmpl $0x0, %eax
jne 0x3f8f9
movq -0xe88(%rbp), %rdi
leaq -0xb00(%rbp), %rsi
callq 0x3fb90
movq %rax, -0xe88(%rbp)
movq -0xe88(%rbp), %rdi
leaq -0xc00(%rbp), %rsi
callq 0x3fb90
movq %rax, -0xe88(%rbp)
movq -0xe88(%rbp), %rdi
leaq -0xd00(%rbp), %rsi
callq 0x3fb90
movq %rax, -0xe88(%rbp)
movq -0xe88(%rbp), %rdi
leaq -0xe00(%rbp), %rsi
callq 0x3fb90
movq %rax, -0xe88(%rbp)
jmp 0x3f7a8
leaq -0xa00(%rbp), %rsi
leaq 0x17c59(%rip), %rdi     # 0x57560
callq 0x3d120
cmpl $0x0, %eax
jne 0x3f94a
movq -0xe88(%rbp), %rdi
leaq -0x700(%rbp), %rsi
callq 0x3fb90
movq %rax, -0xe88(%rbp)
movq -0xe88(%rbp), %rdi
leaq -0x800(%rbp), %rsi
callq 0x3fb90
movq %rax, -0xe88(%rbp)
jmp 0x3f7a8
jmp 0x3f94c
movsbl -0x500(%rbp), %eax
cmpl $0x0, %eax
je 0x3fa4a
movsbl -0x600(%rbp), %eax
cmpl $0x0, %eax
je 0x3fa4a
movsbl -0x900(%rbp), %eax
cmpl $0x0, %eax
je 0x3fa4a
leaq -0x500(%rbp), %rax
movq %rax, -0xea8(%rbp)
leaq -0x600(%rbp), %rdi
callq 0x3d170
movl %eax, -0xe9c(%rbp)
leaq -0x900(%rbp), %rdi
callq 0x3d170
movl %eax, %edi
callq 0x3fc80
movl %eax, -0xe98(%rbp)
leaq -0xb00(%rbp), %rdi
callq 0x3d170
movl %eax, %edi
callq 0x3fc80
movl %eax, -0xe94(%rbp)
leaq -0xc00(%rbp), %rdi
callq 0x3d170
movl %eax, %edi
callq 0x3fc80
movl %eax, -0xe90(%rbp)
leaq -0xd00(%rbp), %rdi
callq 0x3d170
movl %eax, %edi
callq 0x3fc80
movl %eax, -0xe8c(%rbp)
leaq -0xe00(%rbp), %rdi
callq 0x3d170
movl %eax, %edi
callq 0x3fc80
movq -0xea8(%rbp), %rdi
movl -0xe9c(%rbp), %esi
movl -0xe98(%rbp), %ecx
movl -0xe94(%rbp), %r8d
movl -0xe90(%rbp), %r9d
movl -0xe8c(%rbp), %r10d
xorl %edx, %edx
movl %r10d, (%rsp)
movl %eax, 0x8(%rsp)
callq 0x3dbb0
jmp 0x3f745
leaq -0xe80(%rbp), %rdi
callq 0x3d650
leaq -0x400(%rbp), %rdi
movq 0x1a56f(%rip), %rax     # 0x59fd8
movq (%rax), %rdx
movl $0x400, %esi            # imm = 0x400
callq 0x3d110
cmpq $0x0, %rax
je 0x3faab
movsbl -0x400(%rbp), %eax
cmpl $0x23, %eax
jne 0x3fa8a
jmp 0x3fa5b
leaq -0x400(%rbp), %rsi
leaq 0x17fcc(%rip), %rdi     # 0x57a64
movl $0xe, %edx
callq 0x3d040
cmpl $0x0, %eax
jne 0x3faa9
jmp 0x3faab
jmp 0x3fa5b
jmp 0x3faad
leaq -0x400(%rbp), %rdi
movq 0x1a51d(%rip), %rax     # 0x59fd8
movq (%rax), %rdx
movl $0x400, %esi            # imm = 0x400
callq 0x3d110
cmpq $0x0, %rax
je 0x3fb77
movsbl -0x400(%rbp), %eax
cmpl $0x23, %eax
jne 0x3fae0
jmp 0x3faad
leaq -0x400(%rbp), %rsi
leaq 0x17f85(%rip), %rdi     # 0x57a73
movl $0xc, %edx
callq 0x3d040
cmpl $0x0, %eax
jne 0x3faff
jmp 0x3fb77
leaq -0x400(%rbp), %rdi
leaq -0x700(%rbp), %rdx
leaq -0x800(%rbp), %rcx
leaq -0x900(%rbp), %r8
leaq 0x17f5e(%rip), %rsi     # 0x57a80
movb $0x0, %al
callq 0x3d160
cmpl $0x3, %eax
jne 0x3fb72
leaq -0x700(%rbp), %rax
movq %rax, -0xeb8(%rbp)
leaq -0x800(%rbp), %rax
movq %rax, -0xeb0(%rbp)
leaq -0x900(%rbp), %rdi
callq 0x3d170
movl %eax, %edi
callq 0x3fc80
movq -0xeb8(%rbp), %rdi
movq -0xeb0(%rbp), %rsi
movl %eax, %edx
callq 0x3e430
jmp 0x3faad
xorl %eax, %eax
addq $0xed0, %rsp            # imm = 0xED0
popq %rbp
retq
nopw %cs:(%rax,%rax)