// File: /workspace/github_c_makefile_star2_O0/aligrudi[P]neatmkfn/otf.c
// Function: otf_gpos
static void otf_gpos(struct otf *otf, void *gpos)
{
	struct otflookup lookups[NLOOKUPS];
	void *lookuplist = gpos + U16(gpos, 8);
	int nlookups = otf_gtab(otf, gpos, lookups);
	int i, j;
	if (mkfn_dry)
		return;
	for (i = 0; i < nlookups; i++) {
		void *lookup = lookuplist + U16(lookuplist, 2 + 2 * lookups[i].lookup);
		int ltype = U16(lookup, 0);
		int ntabs = U16(lookup, 4);
		char *tag = lookuptag(&lookups[i]);
		sec = (i + 1) * 10;
		printf("gsec %d %s\n", sec, tag);
		for (j = 0; j < ntabs; j++) {
			void *tab = lookup + U16(lookup, 6 + 2 * j);
			int type = ltype;
			if (type == 9) {	/* extension positioning */
				type = U16(tab, 2);
				tab = tab + U32(tab, 4);
			}
			switch (type) {
			case 1:
				otf_gpostype1(otf, tab, tag);
				break;
			case 2:
				otf_gpostype2(otf, tab, tag);
				break;
			case 3:
				otf_gpostype3(otf, tab, tag);
				break;
			case 4:
				otf_gpostype4(otf, tab, tag);
				break;
			case 5:
				otf_gpostype5(otf, tab, tag);
				break;
			default:
				otf_unsupported("GPOS", type, 0);
			}
		}
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x1c080, %rsp          # imm = 0x1C080
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x1c058(%rbp)
movq -0x10(%rbp), %rax
movzwl 0x8(%rax), %edi
callq 0x3d090
movw %ax, %cx
movq -0x1c058(%rbp), %rax
movzwl %cx, %ecx
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x1c018(%rbp)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
leaq -0x1c010(%rbp), %rdx
callq 0x41dc0
movl %eax, -0x1c01c(%rbp)
leaq 0x30cba(%rip), %rax     # 0x727c0
cmpl $0x0, (%rax)
je 0x41b10
jmp 0x41db3
movl $0x0, -0x1c020(%rbp)
movl -0x1c020(%rbp), %eax
cmpl -0x1c01c(%rbp), %eax
jge 0x41db3
movq -0x1c018(%rbp), %rax
movq %rax, -0x1c060(%rbp)
movq -0x1c018(%rbp), %rax
movslq -0x1c020(%rbp), %rdx
leaq -0x1c010(%rbp), %rcx
imulq $0x1c, %rdx, %rdx
addq %rdx, %rcx
movl 0x18(%rcx), %ecx
shll %ecx
addl $0x2, %ecx
movslq %ecx, %rcx
movzwl (%rax,%rcx), %edi
callq 0x3d090
movw %ax, %cx
movq -0x1c060(%rbp), %rax
movzwl %cx, %ecx
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x1c030(%rbp)
movq -0x1c030(%rbp), %rax
movzwl (%rax), %edi
callq 0x3d090
movzwl %ax, %eax
movl %eax, -0x1c034(%rbp)
movq -0x1c030(%rbp), %rax
movzwl 0x4(%rax), %edi
callq 0x3d090
movzwl %ax, %eax
movl %eax, -0x1c038(%rbp)
movslq -0x1c020(%rbp), %rax
leaq -0x1c010(%rbp), %rdi
imulq $0x1c, %rax, %rax
addq %rax, %rdi
callq 0x42080
movq %rax, -0x1c040(%rbp)
movl -0x1c020(%rbp), %eax
addl $0x1, %eax
imull $0xa, %eax, %eax
movl %eax, 0x5b4c48(%rip)    # 0x5f6830
movl 0x5b4c42(%rip), %esi    # 0x5f6830
movq -0x1c040(%rbp), %rdx
leaq 0x15fba(%rip), %rdi     # 0x57bb6
movb $0x0, %al
callq 0x3d0b0
movl $0x0, -0x1c024(%rbp)
movl -0x1c024(%rbp), %eax
cmpl -0x1c038(%rbp), %eax
jge 0x41d9d
movq -0x1c030(%rbp), %rax
movq %rax, -0x1c068(%rbp)
movq -0x1c030(%rbp), %rax
movl -0x1c024(%rbp), %ecx
shll %ecx
addl $0x6, %ecx
movslq %ecx, %rcx
movzwl (%rax,%rcx), %edi
callq 0x3d090
movw %ax, %cx
movq -0x1c068(%rbp), %rax
movzwl %cx, %ecx
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x1c048(%rbp)
movl -0x1c034(%rbp), %eax
movl %eax, -0x1c04c(%rbp)
cmpl $0x9, -0x1c04c(%rbp)
jne 0x41cc5
movq -0x1c048(%rbp), %rax
movzwl 0x2(%rax), %edi
callq 0x3d090
movzwl %ax, %eax
movl %eax, -0x1c04c(%rbp)
movq -0x1c048(%rbp), %rax
movq %rax, -0x1c070(%rbp)
movq -0x1c048(%rbp), %rax
movl 0x4(%rax), %edi
callq 0x3d0e0
movl %eax, %ecx
movq -0x1c070(%rbp), %rax
movl %ecx, %ecx
addq %rcx, %rax
movq %rax, -0x1c048(%rbp)
movl -0x1c04c(%rbp), %eax
decl %eax
movl %eax, %ecx
movq %rcx, -0x1c078(%rbp)
subl $0x4, %eax
ja 0x41d73
movq -0x1c078(%rbp), %rax
leaq 0x15dbb(%rip), %rcx     # 0x57aa8
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq -0x8(%rbp), %rdi
movq -0x1c048(%rbp), %rsi
movq -0x1c040(%rbp), %rdx
callq 0x43710
jmp 0x41d87
movq -0x8(%rbp), %rdi
movq -0x1c048(%rbp), %rsi
movq -0x1c040(%rbp), %rdx
callq 0x438c0
jmp 0x41d87
movq -0x8(%rbp), %rdi
movq -0x1c048(%rbp), %rsi
movq -0x1c040(%rbp), %rdx
callq 0x43d90
jmp 0x41d87
movq -0x8(%rbp), %rdi
movq -0x1c048(%rbp), %rsi
movq -0x1c040(%rbp), %rdx
callq 0x44150
jmp 0x41d87
movq -0x8(%rbp), %rdi
movq -0x1c048(%rbp), %rsi
movq -0x1c040(%rbp), %rdx
callq 0x446f0
jmp 0x41d87
movl -0x1c04c(%rbp), %esi
leaq 0x15e31(%rip), %rdi     # 0x57bb1
xorl %edx, %edx
callq 0x42d60
jmp 0x41d89
movl -0x1c024(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c024(%rbp)
jmp 0x41c0d
jmp 0x41d9f
movl -0x1c020(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c020(%rbp)
jmp 0x41b1a
addq $0x1c080, %rsp          # imm = 0x1C080
popq %rbp
retq
nopl (%rax)