// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x70, %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, -0x2c(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x48(%rbp)
movq -0x10(%rbp), %rax
movzwl 0x2(%rax), %edi
callq 0x3d090
movq -0x48(%rbp), %rdi
movzwl %ax, %eax
cltq
addq %rax, %rdi
leaq -0x30(%rbp), %rsi
callq 0x431f0
movq %rax, -0x28(%rbp)
cmpl $0x1, -0x2c(%rbp)
jne 0x42270
movl $0x0, -0x34(%rbp)
movl -0x34(%rbp), %eax
cmpl -0x30(%rbp), %eax
jge 0x4226e
movq -0x28(%rbp), %rax
movslq -0x34(%rbp), %rcx
movl (%rax,%rcx,4), %eax
movl %eax, -0x4c(%rbp)
movq -0x10(%rbp), %rax
movzwl 0x4(%rax), %edi
callq 0x3d090
movw %ax, %cx
movl -0x4c(%rbp), %eax
movswl %cx, %ecx
addl %ecx, %eax
movl %eax, -0x38(%rbp)
movl -0x38(%rbp), %eax
cmpl 0x3465d(%rip), %eax     # 0x76824
jge 0x421cf
cmpl $0x0, -0x38(%rbp)
jge 0x421d4
jmp 0x42260
movq -0x18(%rbp), %rax
movq %rax, -0x58(%rbp)
movq -0x20(%rbp), %rdi
movl $0x1, %esi
callq 0x43350
movq -0x58(%rbp), %rsi
movl %eax, %edx
addl $0x2, %edx
leaq 0x159ce(%rip), %rdi     # 0x57bc8
movb $0x0, %al
callq 0x3d0b0
movq -0x20(%rbp), %rdi
callq 0x433a0
movq -0x28(%rbp), %rax
movslq -0x34(%rbp), %rcx
movslq (%rax,%rcx,4), %rax
leaq 0x34613(%rip), %rsi     # 0x76830
shlq $0x6, %rax
addq %rax, %rsi
movslq -0x38(%rbp), %rax
leaq 0x34601(%rip), %rdx     # 0x76830
shlq $0x6, %rax
addq %rax, %rdx
leaq 0x15996(%rip), %rdi     # 0x57bd3
movb $0x0, %al
callq 0x3d0b0
movq -0x20(%rbp), %rdi
movl $0x1, %esi
callq 0x43430
leaq 0x4521(%rip), %rdi      # 0x4677a
movb $0x0, %al
callq 0x3d0b0
movl -0x34(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x34(%rbp)
jmp 0x42189
jmp 0x42270
cmpl $0x2, -0x2c(%rbp)
jne 0x4235b
movq -0x10(%rbp), %rax
movzwl 0x4(%rax), %edi
callq 0x3d090
movzwl %ax, %eax
movl %eax, -0x3c(%rbp)
movl $0x0, -0x34(%rbp)
movl -0x34(%rbp), %eax
cmpl -0x3c(%rbp), %eax
jge 0x42359
movq -0x18(%rbp), %rax
movq %rax, -0x68(%rbp)
movq -0x20(%rbp), %rdi
movl $0x1, %esi
callq 0x43350
movq -0x68(%rbp), %rsi
movl %eax, %edx
addl $0x2, %edx
leaq 0x15902(%rip), %rdi     # 0x57bc8
movb $0x0, %al
callq 0x3d0b0
movq -0x20(%rbp), %rdi
callq 0x433a0
movq -0x28(%rbp), %rax
movslq -0x34(%rbp), %rcx
movslq (%rax,%rcx,4), %rcx
leaq 0x34547(%rip), %rax     # 0x76830
shlq $0x6, %rcx
addq %rcx, %rax
movq %rax, -0x60(%rbp)
movq -0x10(%rbp), %rax
movl -0x34(%rbp), %ecx
shll %ecx
addl $0x6, %ecx
movslq %ecx, %rcx
movzwl (%rax,%rcx), %edi
callq 0x3d090
movq -0x60(%rbp), %rsi
movzwl %ax, %eax
leaq 0x34516(%rip), %rdx     # 0x76830
shlq $0x6, %rax
addq %rax, %rdx
leaq 0x158ab(%rip), %rdi     # 0x57bd3
movb $0x0, %al
callq 0x3d0b0
movq -0x20(%rbp), %rdi
movl $0x1, %esi
callq 0x43430
leaq 0x4436(%rip), %rdi      # 0x4677a
movb $0x0, %al
callq 0x3d0b0
movl -0x34(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x34(%rbp)
jmp 0x42294
jmp 0x4235b
movq -0x28(%rbp), %rdi
callq 0x3d030
addq $0x70, %rsp
popq %rbp
retq
nopw (%rax,%rax)