// File: /workspace/github_c_makefile_star2_O0/aligrudi[P]neatmkfn/otf.c
// Function: otf_gsubtype4
static void otf_gsubtype4(struct otf *otf, void *sub, char *feat, struct gctx *ctx)
{
	int fmt = U16(sub, 0);
	int *cov;
	int n, i, j, k;
	if (fmt != 1)
		return;
	cov = coverage(sub + U16(sub, 2), NULL);
	n = U16(sub, 4);
	for (i = 0; i < n; i++) {
		void *set = sub + U16(sub, 6 + 2 * i);
		int nset = U16(set, 0);
		for (j = 0; j < nset; j++) {
			void *lig = set + U16(set, 2 + 2 * j);
			int nlig = U16(lig, 2);
			printf("gsub %s %d", feat, nlig + 1 + gctx_len(ctx, nlig));
			gctx_backtrack(ctx);
			printf(" -%s", glyph_name[cov[i]]);
			for (k = 0; k < nlig - 1; k++)
				printf(" -%s", glyph_name[U16(lig, 4 + 2 * k)]);
			printf(" +%s", glyph_name[U16(lig, 0)]);
			gctx_lookahead(ctx, nlig);
			printf("\n");
		}
	}
	free(cov);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x90, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq -0x10(%rbp), %rax
movzwl (%rax), %edi
callq 0x3d090
movzwl %ax, %eax
movl %eax, -0x24(%rbp)
cmpl $0x1, -0x24(%rbp)
je 0x42568
jmp 0x42789
movq -0x10(%rbp), %rax
movq %rax, -0x68(%rbp)
movq -0x10(%rbp), %rax
movzwl 0x2(%rax), %edi
callq 0x3d090
movq -0x68(%rbp), %rdi
movzwl %ax, %eax
cltq
addq %rax, %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x431f0
movq %rax, -0x30(%rbp)
movq -0x10(%rbp), %rax
movzwl 0x4(%rax), %edi
callq 0x3d090
movzwl %ax, %eax
movl %eax, -0x34(%rbp)
movl $0x0, -0x38(%rbp)
movl -0x38(%rbp), %eax
cmpl -0x34(%rbp), %eax
jge 0x42780
movq -0x10(%rbp), %rax
movq %rax, -0x70(%rbp)
movq -0x10(%rbp), %rax
movl -0x38(%rbp), %ecx
shll %ecx
addl $0x6, %ecx
movslq %ecx, %rcx
movzwl (%rax,%rcx), %edi
callq 0x3d090
movw %ax, %cx
movq -0x70(%rbp), %rax
movzwl %cx, %ecx
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x48(%rbp)
movq -0x48(%rbp), %rax
movzwl (%rax), %edi
callq 0x3d090
movzwl %ax, %eax
movl %eax, -0x4c(%rbp)
movl $0x0, -0x3c(%rbp)
movl -0x3c(%rbp), %eax
cmpl -0x4c(%rbp), %eax
jge 0x42770
movq -0x48(%rbp), %rax
movq %rax, -0x88(%rbp)
movq -0x48(%rbp), %rax
movl -0x3c(%rbp), %ecx
shll %ecx
addl $0x2, %ecx
movslq %ecx, %rcx
movzwl (%rax,%rcx), %edi
callq 0x3d090
movw %ax, %cx
movq -0x88(%rbp), %rax
movzwl %cx, %ecx
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x58(%rbp)
movq -0x58(%rbp), %rax
movzwl 0x2(%rax), %edi
callq 0x3d090
movzwl %ax, %eax
movl %eax, -0x5c(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x78(%rbp)
movl -0x5c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x7c(%rbp)
movq -0x20(%rbp), %rdi
movl -0x5c(%rbp), %esi
callq 0x43350
movl -0x7c(%rbp), %edx
movq -0x78(%rbp), %rsi
addl %eax, %edx
leaq 0x15539(%rip), %rdi     # 0x57bc8
movb $0x0, %al
callq 0x3d0b0
movq -0x20(%rbp), %rdi
callq 0x433a0
movq -0x30(%rbp), %rax
movslq -0x38(%rbp), %rcx
movslq (%rax,%rcx,4), %rax
leaq 0x3417e(%rip), %rsi     # 0x76830
shlq $0x6, %rax
addq %rax, %rsi
leaq 0x15522(%rip), %rdi     # 0x57be2
movb $0x0, %al
callq 0x3d0b0
movl $0x0, -0x40(%rbp)
movl -0x40(%rbp), %eax
movl -0x5c(%rbp), %ecx
subl $0x1, %ecx
cmpl %ecx, %eax
jge 0x4271d
movq -0x58(%rbp), %rax
movl -0x40(%rbp), %ecx
shll %ecx
addl $0x4, %ecx
movslq %ecx, %rcx
movzwl (%rax,%rcx), %edi
callq 0x3d090
movzwl %ax, %eax
leaq 0x34133(%rip), %rsi     # 0x76830
shlq $0x6, %rax
addq %rax, %rsi
leaq 0x154d7(%rip), %rdi     # 0x57be2
movb $0x0, %al
callq 0x3d0b0
movl -0x40(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x40(%rbp)
jmp 0x426ce
movq -0x58(%rbp), %rax
movzwl (%rax), %edi
callq 0x3d090
movzwl %ax, %eax
leaq 0x340fd(%rip), %rsi     # 0x76830
shlq $0x6, %rax
addq %rax, %rsi
leaq 0x15496(%rip), %rdi     # 0x57bd7
movb $0x0, %al
callq 0x3d0b0
movq -0x20(%rbp), %rdi
movl -0x5c(%rbp), %esi
callq 0x43430
leaq 0x401f(%rip), %rdi      # 0x4677a
movb $0x0, %al
callq 0x3d0b0
movl -0x3c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x3c(%rbp)
jmp 0x42609
jmp 0x42772
movl -0x38(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x38(%rbp)
jmp 0x425b0
movq -0x30(%rbp), %rdi
callq 0x3d030
addq $0x90, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)