// File: /workspace/github_c_makefile_star2_O3/aligrudi[P]neatmkfn/otf.c
// Function: otf_gsubtype1
static void otf_gsubtype1(struct otf *otf, void *sub, char *feat, struct gctx *ctx)
{
	int *cov;
	int fmt = U16(sub, 0);
	int ncov;
	int i;
	cov = coverage(sub + U16(sub, 2), &ncov);
	if (fmt == 1) {
		for (i = 0; i < ncov; i++) {
			int dst = cov[i] + S16(sub, 4);
			if (dst >= glyph_n || dst < 0)
				continue;
			printf("gsub %s %d", feat, 2 + gctx_len(ctx, 1));
			gctx_backtrack(ctx);
			printf(" -%s +%s", glyph_name[cov[i]], glyph_name[dst]);
			gctx_lookahead(ctx, 1);
			printf("\n");
		}
	}
	if (fmt == 2) {
		int n = U16(sub, 4);
		for (i = 0; i < n; i++) {
			printf("gsub %s %d", feat, 2 + gctx_len(ctx, 1));
			gctx_backtrack(ctx);
			printf(" -%s +%s", glyph_name[cov[i]],
				glyph_name[U16(sub, 6 + 2 * i)]);
			gctx_lookahead(ctx, 1);
			printf("\n");
		}
	}
	free(cov);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movzwl (%rdi), %r12d
movl %r12d, %ebp
rolw $0x8, %bp
movzwl 0x2(%rdi), %eax
rolw $0x8, %ax
movzwl %ax, %edi
addq %r14, %rdi
leaq 0x4(%rsp), %rsi
callq 0x42748
movq %rax, %r15
cmpw $0x2, %bp
je 0x4204f
movzwl %bp, %eax
cmpl $0x1, %eax
jne 0x42109
movw %r12w, 0x2(%rsp)
movl 0x4(%rsp), %eax
testl %eax, %eax
jle 0x4203f
movl 0x31c55(%rip), %ecx     # 0x73bd4
xorl %r13d, %r13d
movslq (%r15,%r13,4), %r12
movzwl 0x4(%r14), %edx
rolw $0x8, %dx
movswl %dx, %ebp
addl %r12d, %ebp
sets %dl
cmpl %ecx, %ebp
setge %sil
orb %dl, %sil
jne 0x42030
testq %rbx, %rbx
je 0x41fc5
movl 0xc0(%rbx), %eax
movl 0xc8(%rbx), %ecx
addl 0xc4(%rbx), %eax
leal (%rcx,%rax), %edx
incl %edx
jmp 0x41fca
movl $0x2, %edx
leaq 0x12dc7(%rip), %rdi     # 0x54d98
leaq 0x5b1c18(%rip), %rsi    # 0x5f3bf0
xorl %eax, %eax
callq 0x3d0c0
movq %rbx, %rdi
callq 0x42828
shlq $0x6, %r12
leaq 0x31bee(%rip), %rax     # 0x73be0
addq %rax, %r12
movl %ebp, %edx
shlq $0x6, %rdx
addq %rax, %rdx
leaq 0x12d9e(%rip), %rdi     # 0x54da3
movq %r12, %rsi
xorl %eax, %eax
callq 0x3d0c0
movq %rbx, %rdi
movl $0x1, %esi
callq 0x4289c
movl $0xa, %edi
callq 0x3d040
movl 0x31ba8(%rip), %ecx     # 0x73bd4
movl 0x4(%rsp), %eax
incq %r13
movslq %eax, %rdx
cmpq %rdx, %r13
jl 0x41f82
movzwl 0x2(%rsp), %eax
cmpl $0x200, %eax            # imm = 0x200
jne 0x42109
movzwl 0x4(%r14), %eax
testw %ax, %ax
je 0x42109
rolw $0x8, %ax
cmpw $0x2, %ax
movl $0x1, %ecx
cmovael %eax, %ecx
movzwl %cx, %r12d
leaq 0x31b68(%rip), %r13     # 0x73be0
xorl %ebp, %ebp
testq %rbx, %rbx
je 0x42098
movl 0xc0(%rbx), %eax
movl 0xc8(%rbx), %ecx
addl 0xc4(%rbx), %eax
leal (%rcx,%rax), %edx
incl %edx
jmp 0x4209d
movl $0x2, %edx
leaq 0x12cf4(%rip), %rdi     # 0x54d98
leaq 0x5b1b45(%rip), %rsi    # 0x5f3bf0
xorl %eax, %eax
callq 0x3d0c0
movq %rbx, %rdi
callq 0x42828
movslq (%r15,%rbp,4), %rsi
shlq $0x6, %rsi
movzwl 0x6(%r14,%rbp,2), %eax
rolw $0x8, %ax
addq %r13, %rsi
movzwl %ax, %edx
shll $0x6, %edx
addq %r13, %rdx
leaq 0x12cc4(%rip), %rdi     # 0x54da3
xorl %eax, %eax
callq 0x3d0c0
movq %rbx, %rdi
movl $0x1, %esi
callq 0x4289c
movl $0xa, %edi
callq 0x3d040
incq %rbp
cmpq %rbp, %r12
jne 0x4207a
movq %r15, %rdi
callq 0x3d030
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq