// File: /workspace/github_c_makefile_star2_O0/aligrudi[P]neatmkfn/otf.c
// Function: otf_cmap4
static void otf_cmap4(struct otf *otf, void *cmap4)
{
	int nsegs;
	void *ends, *begs, *deltas, *offsets;
	int beg, end, delta, offset;
	int i, j;
	nsegs = U16(cmap4, 6) / 2;
	ends = cmap4 + 14;
	begs = ends + 2 * nsegs + 2;
	deltas = begs + 2 * nsegs;
	offsets = deltas + 2 * nsegs;
	for (i = 0; i < nsegs; i++) {
		beg = U16(begs, 2 * i);
		end = U16(ends, 2 * i);
		delta = U16(deltas, 2 * i);
		offset = U16(offsets, 2 * i);
		if (offset) {
			for (j = beg; j <= end; j++)
				glyph_code[(U16(offsets + 2 * i,
					offset + (j - beg) * 2) + delta) & 0xffff] = j;
		} else {
			for (j = beg; j <= end; j++)
				glyph_code[(j + delta) & 0xffff] = j;
		}
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movzwl 0x6(%rax), %edi
callq 0x3d090
movzwl %ax, %eax
movl $0x2, %ecx
cltd
idivl %ecx
movl %eax, -0x14(%rbp)
movq -0x10(%rbp), %rax
addq $0xe, %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movl -0x14(%rbp), %ecx
shll %ecx
movslq %ecx, %rcx
addq %rcx, %rax
addq $0x2, %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
movl -0x14(%rbp), %ecx
shll %ecx
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
movl -0x14(%rbp), %ecx
shll %ecx
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x38(%rbp)
movl $0x0, -0x4c(%rbp)
movl -0x4c(%rbp), %eax
cmpl -0x14(%rbp), %eax
jge 0x41213
movq -0x28(%rbp), %rax
movl -0x4c(%rbp), %ecx
shll %ecx
movslq %ecx, %rcx
movzwl (%rax,%rcx), %edi
callq 0x3d090
movzwl %ax, %eax
movl %eax, -0x3c(%rbp)
movq -0x20(%rbp), %rax
movl -0x4c(%rbp), %ecx
shll %ecx
movslq %ecx, %rcx
movzwl (%rax,%rcx), %edi
callq 0x3d090
movzwl %ax, %eax
movl %eax, -0x40(%rbp)
movq -0x30(%rbp), %rax
movl -0x4c(%rbp), %ecx
shll %ecx
movslq %ecx, %rcx
movzwl (%rax,%rcx), %edi
callq 0x3d090
movzwl %ax, %eax
movl %eax, -0x44(%rbp)
movq -0x38(%rbp), %rax
movl -0x4c(%rbp), %ecx
shll %ecx
movslq %ecx, %rcx
movzwl (%rax,%rcx), %edi
callq 0x3d090
movzwl %ax, %eax
movl %eax, -0x48(%rbp)
cmpl $0x0, -0x48(%rbp)
je 0x411cd
movl -0x3c(%rbp), %eax
movl %eax, -0x50(%rbp)
movl -0x50(%rbp), %eax
cmpl -0x40(%rbp), %eax
jg 0x411cb
movl -0x50(%rbp), %eax
movl %eax, -0x54(%rbp)
movq -0x38(%rbp), %rax
movl -0x4c(%rbp), %ecx
shll %ecx
movslq %ecx, %rcx
addq %rcx, %rax
movl -0x48(%rbp), %ecx
movl -0x50(%rbp), %edx
subl -0x3c(%rbp), %edx
shll %edx
addl %edx, %ecx
movslq %ecx, %rcx
movzwl (%rax,%rcx), %edi
callq 0x3d090
movl -0x54(%rbp), %edx
movzwl %ax, %eax
addl -0x44(%rbp), %eax
andl $0xffff, %eax           # imm = 0xFFFF
movslq %eax, %rcx
leaq 0x435673(%rip), %rax    # 0x476830
movl %edx, (%rax,%rcx,4)
movl -0x50(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x50(%rbp)
jmp 0x4116f
jmp 0x41203
movl -0x3c(%rbp), %eax
movl %eax, -0x50(%rbp)
movl -0x50(%rbp), %eax
cmpl -0x40(%rbp), %eax
jg 0x41201
movl -0x50(%rbp), %edx
movl -0x50(%rbp), %eax
addl -0x44(%rbp), %eax
andl $0xffff, %eax           # imm = 0xFFFF
movslq %eax, %rcx
leaq 0x43563d(%rip), %rax    # 0x476830
movl %edx, (%rax,%rcx,4)
movl -0x50(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x50(%rbp)
jmp 0x411d3
jmp 0x41203
jmp 0x41205
movl -0x4c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x4c(%rbp)
jmp 0x410eb
addq $0x60, %rsp
popq %rbp
retq
nopl (%rax)