// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/j2c.c
// Function: handler_siz
static void handler_siz(deark *c, lctx *d, struct page_ctx *pg,
	const struct marker_info *mi, i64 pos1, i64 len)
{
	unsigned int capa;
	i64 w, h;
	i64 pos = pos1;
	i64 ncomp;
	i64 k;

	capa = (unsigned int)de_getu16be_p(&pos);
	de_dbg(c, "capabilities: 0x%04x", capa);

	w = de_getu32be_p(&pos);
	h = de_getu32be_p(&pos);
	de_dbg(c, "dimensions of reference grid: %"I64_FMT DE_CHAR_TIMES "%"I64_FMT, w, h);

	w = de_getu32be_p(&pos);
	h = de_getu32be_p(&pos);
	de_dbg(c, "offset to image area: %"I64_FMT",%"I64_FMT, w, h);

	w = de_getu32be_p(&pos);
	h = de_getu32be_p(&pos);
	de_dbg(c, "dimensions of reference tile: %"I64_FMT DE_CHAR_TIMES "%"I64_FMT, w, h);

	w = de_getu32be_p(&pos);
	h = de_getu32be_p(&pos);
	de_dbg(c, "offset to first tile: %"I64_FMT",%"I64_FMT, w, h);

	ncomp = de_getu16be_p(&pos);
	de_dbg(c, "number of components: %d", (int)ncomp);

	for(k=0; k<ncomp; k++) {
		u8 prec, xr, yr;

		if(pos >= pos1+len) goto done;
		de_dbg(c, "component[%d] info at %"I64_FMT, (int)k, pos);
		de_dbg_indent(c, 1);
		prec = de_getbyte_p(&pos);
		de_dbg(c, "precision: %d", (int)prec);
		xr = de_getbyte_p(&pos);
		yr = de_getbyte_p(&pos);
		de_dbg(c, "separation: %d,%d", (int)xr, (int)yr);
		de_dbg_indent(c, -1);
	}

done:
	;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r9, %rbp
movq %r8, %r12
movq %rdi, %r14
movq %rsp, %r15
movq %r8, (%r15)
movq 0x18(%rdi), %rdi
movq %r15, %rsi
callq 0xe3f6e
leaq 0x9c27d(%rip), %rsi     # 0x11f6ff
movq %r14, %rdi
movl %eax, %edx
xorl %eax, %eax
callq 0xde896
movq 0x18(%r14), %rdi
movq %r15, %rsi
callq 0xe4071
movq %rax, %rbx
movq 0x18(%r14), %rdi
movq %r15, %rsi
callq 0xe4071
leaq 0x9c264(%rip), %rsi     # 0x11f714
movq %r14, %rdi
movq %rbx, %rdx
movq %rax, %rcx
xorl %eax, %eax
callq 0xde896
movq 0x18(%r14), %rdi
movq %r15, %rsi
callq 0xe4071
movq %rax, %rbx
movq 0x18(%r14), %rdi
movq %r15, %rsi
callq 0xe4071
leaq 0x9c259(%rip), %rsi     # 0x11f73b
movq %r14, %rdi
movq %rbx, %rdx
movq %rax, %rcx
xorl %eax, %eax
callq 0xde896
movq 0x18(%r14), %rdi
movq %r15, %rsi
callq 0xe4071
movq %rax, %rbx
movq 0x18(%r14), %rdi
movq %r15, %rsi
callq 0xe4071
leaq 0x9c245(%rip), %rsi     # 0x11f759
movq %r14, %rdi
movq %rbx, %rdx
movq %rax, %rcx
xorl %eax, %eax
callq 0xde896
movq 0x18(%r14), %rdi
movq %r15, %rsi
callq 0xe4071
movq %rax, %rbx
movq 0x18(%r14), %rdi
movq %r15, %rsi
callq 0xe4071
leaq 0x9c23a(%rip), %rsi     # 0x11f780
movq %r14, %rdi
movq %rbx, %rdx
movq %rax, %rcx
xorl %eax, %eax
callq 0xde896
movq 0x18(%r14), %rdi
movq %r15, %rsi
callq 0xe3f6e
movq %rax, %r13
leaq 0x85ad1(%rip), %rsi     # 0x10903d
movq %r14, %rdi
movl %r13d, %edx
xorl %eax, %eax
callq 0xde896
addq %r12, %rbp
testq %r13, %r13
movl $0x0, %eax
cmovleq %rax, %r13
xorl %ebx, %ebx
cmpq %rbx, %r13
je 0x83624
movq (%rsp), %rcx
cmpq %rbp, %rcx
jge 0x83624
movq %r14, %rdi
leaq 0x9c1f4(%rip), %rsi     # 0x11f79e
movl %ebx, %edx
xorl %eax, %eax
callq 0xde896
movq %r14, %rdi
pushq $0x1
popq %rsi
callq 0xdeba7
movq 0x18(%r14), %rdi
movq %r15, %rsi
callq 0xe3f2a
movzbl %al, %edx
movq %r14, %rdi
leaq 0x9af60(%rip), %rsi     # 0x11e537
xorl %eax, %eax
callq 0xde896
movq 0x18(%r14), %rdi
movq %r15, %rsi
callq 0xe3f2a
movl %eax, %r12d
movq 0x18(%r14), %rdi
movq %r15, %rsi
callq 0xe3f2a
movzbl %r12b, %edx
movzbl %al, %ecx
movq %r14, %rdi
leaq 0x9c1ae(%rip), %rsi     # 0x11f7b8
xorl %eax, %eax
callq 0xde896
movq %r14, %rdi
pushq $-0x1
popq %rsi
callq 0xdeba7
incq %rbx
jmp 0x8358a
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq