// File: /workspace/github_c_makefile_star2_O0/aligrudi[P]neatmkfn/otf.c
// Function: otf_gpostype2
static void otf_gpostype2(struct otf *otf, void *sub, char *feat)
{
	int fmt = U16(sub, 0);
	int vfmt1 = U16(sub, 4);	/* valuerecord 1 */
	int vfmt2 = U16(sub, 6);	/* valuerecord 2 */
	int fmtoff1, fmtoff2;
	int vrlen;			/* the length of vfmt1 and vfmt2 */
	int i, j;
	vrlen = valuerecord_len(vfmt1) + valuerecord_len(vfmt2);
	if (fmt == 1) {
		int nc1 = U16(sub, 8);
		int *cov = coverage(sub + U16(sub, 2), NULL);
		for (i = 0; i < nc1; i++) {
			void *c2 = sub + U16(sub, 10 + 2 * i);
			int nc2 = U16(c2, 0);
			for (j = 0; j < nc2; j++) {
				int second = U16(c2 + 2 + (2 + vrlen) * j, 0);
				fmtoff1 = 2 + (2 + vrlen) * j + 2;
				fmtoff2 = fmtoff1 + valuerecord_len(vfmt1);
				if (valuerecord_small(vfmt1, c2 + fmtoff1) &&
					valuerecord_small(vfmt2, c2 + fmtoff2))
					continue;
				printf("gpos %s 2", feat);
				printf(" %s", glyph_name[cov[i]]);
				valuerecord_print(vfmt1, c2 + fmtoff1);
				printf(" %s", glyph_name[second]);
				valuerecord_print(vfmt2, c2 + fmtoff2);
				printf("\n");
			}
		}
		free(cov);
	}
	if (fmt == 2) {
		static int gl1[NGLYPHS], gl2[NGLYPHS];
		static int cls1[NGLYPHS], cls2[NGLYPHS];
		static int grp1[NGLYPHS], grp2[NGLYPHS];
		int ngl1 = classdef(sub + U16(sub, 8), gl1, cls1);
		int ngl2 = classdef(sub + U16(sub, 10), gl2, cls2);
		int ncls1 = U16(sub, 12);
		int ncls2 = U16(sub, 14);
		for (i = 0; i < ncls1; i++)
			grp1[i] = ggrp_class(gl1, cls1, ngl1, i);
		for (i = 0; i < ncls2; i++)
			grp2[i] = ggrp_class(gl2, cls2, ngl2, i);
		for (i = 0; i < ncls1; i++) {
			for (j = 0; j < ncls2; j++) {
				fmtoff1 = 16 + (i * ncls2 + j) * vrlen;
				fmtoff2 = fmtoff1 + valuerecord_len(vfmt1);
				if (valuerecord_small(vfmt1, sub + fmtoff1) &&
					valuerecord_small(vfmt2, sub + fmtoff2))
					continue;
				printf("gpos %s %d", feat, 2);
				printf(" @%d", grp1[i]);
				valuerecord_print(vfmt1, sub + fmtoff1);
				printf(" @%d", grp2[j]);
				valuerecord_print(vfmt2, sub + fmtoff2);
				printf("\n");
			}
		}
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xa0, %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)
movq -0x10(%rbp), %rax
movzwl 0x4(%rax), %edi
callq 0x3d090
movzwl %ax, %eax
movl %eax, -0x20(%rbp)
movq -0x10(%rbp), %rax
movzwl 0x6(%rax), %edi
callq 0x3d090
movzwl %ax, %eax
movl %eax, -0x24(%rbp)
movl -0x20(%rbp), %edi
callq 0x44d40
movl %eax, -0x6c(%rbp)
movl -0x24(%rbp), %edi
callq 0x44d40
movl %eax, %ecx
movl -0x6c(%rbp), %eax
addl %ecx, %eax
movl %eax, -0x30(%rbp)
cmpl $0x1, -0x1c(%rbp)
jne 0x43b1f
movq -0x10(%rbp), %rax
movzwl 0x8(%rax), %edi
callq 0x3d090
movzwl %ax, %eax
movl %eax, -0x3c(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x78(%rbp)
movq -0x10(%rbp), %rax
movzwl 0x2(%rax), %edi
callq 0x3d090
movq -0x78(%rbp), %rdi
movzwl %ax, %eax
cltq
addq %rax, %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x431f0
movq %rax, -0x48(%rbp)
movl $0x0, -0x34(%rbp)
movl -0x34(%rbp), %eax
cmpl -0x3c(%rbp), %eax
jge 0x43b16
movq -0x10(%rbp), %rax
movq %rax, -0x80(%rbp)
movq -0x10(%rbp), %rax
movl -0x34(%rbp), %ecx
shll %ecx
addl $0xa, %ecx
movslq %ecx, %rcx
movzwl (%rax,%rcx), %edi
callq 0x3d090
movw %ax, %cx
movq -0x80(%rbp), %rax
movzwl %cx, %ecx
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x50(%rbp)
movq -0x50(%rbp), %rax
movzwl (%rax), %edi
callq 0x3d090
movzwl %ax, %eax
movl %eax, -0x54(%rbp)
movl $0x0, -0x38(%rbp)
movl -0x38(%rbp), %eax
cmpl -0x54(%rbp), %eax
jge 0x43b06
movq -0x50(%rbp), %rax
movl -0x30(%rbp), %ecx
addl $0x2, %ecx
imull -0x38(%rbp), %ecx
movslq %ecx, %rcx
movzwl 0x2(%rax,%rcx), %edi
callq 0x3d090
movzwl %ax, %eax
movl %eax, -0x58(%rbp)
movl -0x30(%rbp), %eax
addl $0x2, %eax
imull -0x38(%rbp), %eax
addl $0x2, %eax
addl $0x2, %eax
movl %eax, -0x28(%rbp)
movl -0x28(%rbp), %eax
movl %eax, -0x84(%rbp)
movl -0x20(%rbp), %edi
callq 0x44d40
movl %eax, %ecx
movl -0x84(%rbp), %eax
addl %ecx, %eax
movl %eax, -0x2c(%rbp)
movl -0x20(%rbp), %edi
movq -0x50(%rbp), %rsi
movslq -0x28(%rbp), %rax
addq %rax, %rsi
callq 0x44d90
cmpl $0x0, %eax
je 0x43a6a
movl -0x24(%rbp), %edi
movq -0x50(%rbp), %rsi
movslq -0x2c(%rbp), %rax
addq %rax, %rsi
callq 0x44d90
cmpl $0x0, %eax
je 0x43a6a
jmp 0x43af8
movq -0x18(%rbp), %rsi
leaq 0x141c6(%rip), %rdi     # 0x57c3b
movb $0x0, %al
callq 0x3d0b0
movq -0x48(%rbp), %rax
movslq -0x34(%rbp), %rcx
movslq (%rax,%rcx,4), %rax
leaq 0x32da1(%rip), %rsi     # 0x76830
shlq $0x6, %rax
addq %rax, %rsi
leaq 0x1418c(%rip), %rdi     # 0x57c29
movb $0x0, %al
callq 0x3d0b0
movl -0x20(%rbp), %edi
movq -0x50(%rbp), %rsi
movslq -0x28(%rbp), %rax
addq %rax, %rsi
callq 0x44e60
movslq -0x58(%rbp), %rax
leaq 0x32d6e(%rip), %rsi     # 0x76830
shlq $0x6, %rax
addq %rax, %rsi
leaq 0x14159(%rip), %rdi     # 0x57c29
movb $0x0, %al
callq 0x3d0b0
movl -0x24(%rbp), %edi
movq -0x50(%rbp), %rsi
movslq -0x2c(%rbp), %rax
addq %rax, %rsi
callq 0x44e60
leaq 0x2c89(%rip), %rdi      # 0x4677a
movb $0x0, %al
callq 0x3d0b0
movl -0x38(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x38(%rbp)
jmp 0x439d7
jmp 0x43b08
movl -0x34(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x34(%rbp)
jmp 0x4397e
movq -0x48(%rbp), %rdi
callq 0x3d030
cmpl $0x2, -0x1c(%rbp)
jne 0x43d7f
movq -0x10(%rbp), %rax
movq %rax, -0x98(%rbp)
movq -0x10(%rbp), %rax
movzwl 0x8(%rax), %edi
callq 0x3d090
movq -0x98(%rbp), %rdi
movzwl %ax, %eax
cltq
addq %rax, %rdi
leaq 0x5b8d09(%rip), %rsi    # 0x5fc860
leaq 0x638d02(%rip), %rdx    # 0x67c860
callq 0x44f10
movl %eax, -0x5c(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x90(%rbp)
movq -0x10(%rbp), %rax
movzwl 0xa(%rax), %edi
callq 0x3d090
movq -0x90(%rbp), %rdi
movzwl %ax, %eax
cltq
addq %rax, %rdi
leaq 0x5f8ccc(%rip), %rsi    # 0x63c860
leaq 0x678cc5(%rip), %rdx    # 0x6bc860
callq 0x44f10
movl %eax, -0x60(%rbp)
movq -0x10(%rbp), %rax
movzwl 0xc(%rax), %edi
callq 0x3d090
movzwl %ax, %eax
movl %eax, -0x64(%rbp)
movq -0x10(%rbp), %rax
movzwl 0xe(%rax), %edi
callq 0x3d090
movzwl %ax, %eax
movl %eax, -0x68(%rbp)
movl $0x0, -0x34(%rbp)
movl -0x34(%rbp), %eax
cmpl -0x64(%rbp), %eax
jge 0x43c0c
movl -0x5c(%rbp), %edx
movl -0x34(%rbp), %ecx
leaq 0x5b8c7b(%rip), %rdi    # 0x5fc860
leaq 0x638c74(%rip), %rsi    # 0x67c860
callq 0x450a0
movl %eax, %edx
movslq -0x34(%rbp), %rcx
leaq 0x6b8c62(%rip), %rax    # 0x6fc860
movl %edx, (%rax,%rcx,4)
movl -0x34(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x34(%rbp)
jmp 0x43bd0
movl $0x0, -0x34(%rbp)
movl -0x34(%rbp), %eax
cmpl -0x68(%rbp), %eax
jge 0x43c4f
movl -0x60(%rbp), %edx
movl -0x34(%rbp), %ecx
leaq 0x5f8c38(%rip), %rdi    # 0x63c860
leaq 0x678c31(%rip), %rsi    # 0x6bc860
callq 0x450a0
movl %eax, %edx
movslq -0x34(%rbp), %rcx
leaq 0x6f8c1f(%rip), %rax    # 0x73c860
movl %edx, (%rax,%rcx,4)
movl -0x34(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x34(%rbp)
jmp 0x43c13
movl $0x0, -0x34(%rbp)
movl -0x34(%rbp), %eax
cmpl -0x64(%rbp), %eax
jge 0x43d7d
movl $0x0, -0x38(%rbp)
movl -0x38(%rbp), %eax
cmpl -0x68(%rbp), %eax
jge 0x43d6d
movl -0x34(%rbp), %eax
imull -0x68(%rbp), %eax
addl -0x38(%rbp), %eax
imull -0x30(%rbp), %eax
addl $0x10, %eax
movl %eax, -0x28(%rbp)
movl -0x28(%rbp), %eax
movl %eax, -0x9c(%rbp)
movl -0x20(%rbp), %edi
callq 0x44d40
movl %eax, %ecx
movl -0x9c(%rbp), %eax
addl %ecx, %eax
movl %eax, -0x2c(%rbp)
movl -0x20(%rbp), %edi
movq -0x10(%rbp), %rsi
movslq -0x28(%rbp), %rax
addq %rax, %rsi
callq 0x44d90
cmpl $0x0, %eax
je 0x43cdc
movl -0x24(%rbp), %edi
movq -0x10(%rbp), %rsi
movslq -0x2c(%rbp), %rax
addq %rax, %rsi
callq 0x44d90
cmpl $0x0, %eax
je 0x43cdc
jmp 0x43d5f
movq -0x18(%rbp), %rsi
leaq 0x13f5e(%rip), %rdi     # 0x57c45
movl $0x2, %edx
movb $0x0, %al
callq 0x3d0b0
movslq -0x34(%rbp), %rcx
leaq 0x6b8b62(%rip), %rax    # 0x6fc860
movl (%rax,%rcx,4), %esi
leaq 0x13f48(%rip), %rdi     # 0x57c50
movb $0x0, %al
callq 0x3d0b0
movl -0x20(%rbp), %edi
movq -0x10(%rbp), %rsi
movslq -0x28(%rbp), %rax
addq %rax, %rsi
callq 0x44e60
movslq -0x38(%rbp), %rcx
leaq 0x6f8b33(%rip), %rax    # 0x73c860
movl (%rax,%rcx,4), %esi
leaq 0x13f19(%rip), %rdi     # 0x57c50
movb $0x0, %al
callq 0x3d0b0
movl -0x24(%rbp), %edi
movq -0x10(%rbp), %rsi
movslq -0x2c(%rbp), %rax
addq %rax, %rsi
callq 0x44e60
leaq 0x2a22(%rip), %rdi      # 0x4677a
movb $0x0, %al
callq 0x3d0b0
movl -0x38(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x38(%rbp)
jmp 0x43c69
jmp 0x43d6f
movl -0x34(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x34(%rbp)
jmp 0x43c56
jmp 0x43d7f
addq $0xa0, %rsp
popq %rbp
retq
nopl (%rax,%rax)