// File: /workspace/github_c_makefile_star2_O0/aligrudi[P]neatmkfn/otf.c
// Function: otf_gpostype3
static void otf_gpostype3(struct otf *otf, void *sub, char *feat)
{
	int fmt = U16(sub, 0);
	int *cov, *icov, *ocov;
	int i, n;
	int icnt = 0;
	int ocnt = 0;
	int igrp, ogrp;
	if (fmt != 1)
		return;
	cov = coverage(sub + U16(sub, 2), NULL);
	n = U16(sub, 4);
	icov = malloc(n * sizeof(icov[0]));
	ocov = malloc(n * sizeof(ocov[0]));
	for (i = 0; i < n; i++)
		if (U16(sub, 6 + 4 * i))
			ocov[ocnt++] = cov[i];
	for (i = 0; i < n; i++)
		if (U16(sub, 6 + 4 * i + 2))
			icov[icnt++] = cov[i];
	igrp = ggrp_coverage(icov, icnt);
	ogrp = ggrp_coverage(ocov, ocnt);
	free(icov);
	free(ocov);
	for (i = 0; i < n; i++) {
		int prev = U16(sub, 6 + 4 * i);
		int next = U16(sub, 6 + 4 * i + 2);
		if (prev) {
			int dx = -uwid(S16(sub, prev + 2));
			int dy = -uwid(S16(sub, prev + 4));
			if (otf_r2l(feat))
				dx += uwid(glyph_wid[cov[i]]);
			printf("gpos %s 2 @%d %s:%+d%+d%+d%+d\n",
				feat, igrp, glyph_name[cov[i]],
				0, 0, dx, dy);
		}
		if (next) {
			int dx = uwid(S16(sub, next + 2)) - uwid(glyph_wid[cov[i]]);
			int dy = uwid(S16(sub, next + 4));
			if (otf_r2l(feat)) {
				dx += uwid(glyph_wid[cov[i]]);
			}
			printf("gpos %s 2 %s @%d:%+d%+d%+d%+d\n",
				feat, glyph_name[cov[i]], ogrp,
				0, 0, dx, dy);
		}
	}
	free(cov);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x90, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x10(%rbp), %rax
movzwl (%rax), %edi
callq 0x3d090
movzwl %ax, %eax
movl %eax, -0x1c(%rbp)
movl $0x0, -0x44(%rbp)
movl $0x0, -0x48(%rbp)
cmpl $0x1, -0x1c(%rbp)
je 0x43dd2
jmp 0x4413a
movq -0x10(%rbp), %rax
movq %rax, -0x70(%rbp)
movq -0x10(%rbp), %rax
movzwl 0x2(%rax), %edi
callq 0x3d090
movq -0x70(%rbp), %rdi
movzwl %ax, %eax
cltq
addq %rax, %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x431f0
movq %rax, -0x28(%rbp)
movq -0x10(%rbp), %rax
movzwl 0x4(%rax), %edi
callq 0x3d090
movzwl %ax, %eax
movl %eax, -0x40(%rbp)
movslq -0x40(%rbp), %rdi
shlq $0x2, %rdi
callq 0x3d150
movq %rax, -0x30(%rbp)
movslq -0x40(%rbp), %rdi
shlq $0x2, %rdi
callq 0x3d150
movq %rax, -0x38(%rbp)
movl $0x0, -0x3c(%rbp)
movl -0x3c(%rbp), %eax
cmpl -0x40(%rbp), %eax
jge 0x43e90
movq -0x10(%rbp), %rax
movl -0x3c(%rbp), %ecx
shll $0x2, %ecx
addl $0x6, %ecx
movslq %ecx, %rcx
movzwl (%rax,%rcx), %edi
callq 0x3d090
cmpw $0x0, %ax
je 0x43e83
movq -0x28(%rbp), %rax
movslq -0x3c(%rbp), %rcx
movl (%rax,%rcx,4), %edx
movq -0x38(%rbp), %rax
movl -0x48(%rbp), %ecx
movl %ecx, %esi
addl $0x1, %esi
movl %esi, -0x48(%rbp)
movslq %ecx, %rcx
movl %edx, (%rax,%rcx,4)
jmp 0x43e85
movl -0x3c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x3c(%rbp)
jmp 0x43e3c
movl $0x0, -0x3c(%rbp)
movl -0x3c(%rbp), %eax
cmpl -0x40(%rbp), %eax
jge 0x43eee
movq -0x10(%rbp), %rax
movl -0x3c(%rbp), %ecx
shll $0x2, %ecx
addl $0x6, %ecx
addl $0x2, %ecx
movslq %ecx, %rcx
movzwl (%rax,%rcx), %edi
callq 0x3d090
cmpw $0x0, %ax
je 0x43ee1
movq -0x28(%rbp), %rax
movslq -0x3c(%rbp), %rcx
movl (%rax,%rcx,4), %edx
movq -0x30(%rbp), %rax
movl -0x44(%rbp), %ecx
movl %ecx, %esi
addl $0x1, %esi
movl %esi, -0x44(%rbp)
movslq %ecx, %rcx
movl %edx, (%rax,%rcx,4)
jmp 0x43ee3
movl -0x3c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x3c(%rbp)
jmp 0x43e97
movq -0x30(%rbp), %rdi
movl -0x44(%rbp), %esi
callq 0x434e0
movl %eax, -0x4c(%rbp)
movq -0x38(%rbp), %rdi
movl -0x48(%rbp), %esi
callq 0x434e0
movl %eax, -0x50(%rbp)
movq -0x30(%rbp), %rdi
callq 0x3d030
movq -0x38(%rbp), %rdi
callq 0x3d030
movl $0x0, -0x3c(%rbp)
movl -0x3c(%rbp), %eax
cmpl -0x40(%rbp), %eax
jge 0x44131
movq -0x10(%rbp), %rax
movl -0x3c(%rbp), %ecx
shll $0x2, %ecx
addl $0x6, %ecx
movslq %ecx, %rcx
movzwl (%rax,%rcx), %edi
callq 0x3d090
movzwl %ax, %eax
movl %eax, -0x54(%rbp)
movq -0x10(%rbp), %rax
movl -0x3c(%rbp), %ecx
shll $0x2, %ecx
addl $0x6, %ecx
addl $0x2, %ecx
movslq %ecx, %rcx
movzwl (%rax,%rcx), %edi
callq 0x3d090
movzwl %ax, %eax
movl %eax, -0x58(%rbp)
cmpl $0x0, -0x54(%rbp)
je 0x4403d
movq -0x10(%rbp), %rax
movl -0x54(%rbp), %ecx
addl $0x2, %ecx
movslq %ecx, %rcx
movzwl (%rax,%rcx), %edi
callq 0x3d090
movswl %ax, %edi
callq 0x40ca0
movl %eax, %ecx
xorl %eax, %eax
subl %ecx, %eax
movl %eax, -0x5c(%rbp)
movq -0x10(%rbp), %rax
movl -0x54(%rbp), %ecx
addl $0x4, %ecx
movslq %ecx, %rcx
movzwl (%rax,%rcx), %edi
callq 0x3d090
movswl %ax, %edi
callq 0x40ca0
movl %eax, %ecx
xorl %eax, %eax
subl %ecx, %eax
movl %eax, -0x60(%rbp)
movq -0x18(%rbp), %rdi
callq 0x45160
cmpl $0x0, %eax
je 0x43ff9
movq -0x28(%rbp), %rax
movslq -0x3c(%rbp), %rcx
movslq (%rax,%rcx,4), %rcx
leaq 0x472845(%rip), %rax    # 0x4b6830
movl (%rax,%rcx,4), %edi
callq 0x40ca0
addl -0x5c(%rbp), %eax
movl %eax, -0x5c(%rbp)
movq -0x18(%rbp), %rsi
movl -0x4c(%rbp), %edx
movq -0x28(%rbp), %rax
movslq -0x3c(%rbp), %rcx
movslq (%rax,%rcx,4), %rax
leaq 0x3281d(%rip), %rcx     # 0x76830
shlq $0x6, %rax
addq %rax, %rcx
movl -0x5c(%rbp), %r10d
movl -0x60(%rbp), %eax
leaq 0x13c2d(%rip), %rdi     # 0x57c55
xorl %r9d, %r9d
movl %r9d, %r8d
movl %r10d, (%rsp)
movl %eax, 0x8(%rsp)
movb $0x0, %al
callq 0x3d0b0
cmpl $0x0, -0x58(%rbp)
je 0x44121
movq -0x10(%rbp), %rax
movl -0x58(%rbp), %ecx
addl $0x2, %ecx
movslq %ecx, %rcx
movzwl (%rax,%rcx), %edi
callq 0x3d090
movswl %ax, %edi
callq 0x40ca0
movl %eax, -0x74(%rbp)
movq -0x28(%rbp), %rax
movslq -0x3c(%rbp), %rcx
movslq (%rax,%rcx,4), %rcx
leaq 0x4727b5(%rip), %rax    # 0x4b6830
movl (%rax,%rcx,4), %edi
callq 0x40ca0
movl %eax, %ecx
movl -0x74(%rbp), %eax
subl %ecx, %eax
movl %eax, -0x64(%rbp)
movq -0x10(%rbp), %rax
movl -0x58(%rbp), %ecx
addl $0x4, %ecx
movslq %ecx, %rcx
movzwl (%rax,%rcx), %edi
callq 0x3d090
movswl %ax, %edi
callq 0x40ca0
movl %eax, -0x68(%rbp)
movq -0x18(%rbp), %rdi
callq 0x45160
cmpl $0x0, %eax
je 0x440dd
movq -0x28(%rbp), %rax
movslq -0x3c(%rbp), %rcx
movslq (%rax,%rcx,4), %rcx
leaq 0x472761(%rip), %rax    # 0x4b6830
movl (%rax,%rcx,4), %edi
callq 0x40ca0
addl -0x64(%rbp), %eax
movl %eax, -0x64(%rbp)
movq -0x18(%rbp), %rsi
movq -0x28(%rbp), %rax
movslq -0x3c(%rbp), %rcx
movslq (%rax,%rcx,4), %rax
leaq 0x3273c(%rip), %rdx     # 0x76830
shlq $0x6, %rax
addq %rax, %rdx
movl -0x50(%rbp), %ecx
movl -0x64(%rbp), %r10d
movl -0x68(%rbp), %eax
leaq 0x13b68(%rip), %rdi     # 0x57c74
xorl %r9d, %r9d
movl %r9d, %r8d
movl %r10d, (%rsp)
movl %eax, 0x8(%rsp)
movb $0x0, %al
callq 0x3d0b0
jmp 0x44123
movl -0x3c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x3c(%rbp)
jmp 0x43f25
movq -0x28(%rbp), %rdi
callq 0x3d030
addq $0x90, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)