// File: /workspace/github_c_makefile_star2_O1/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
subq $0x18, %rsp
movq %r9, 0x8(%rsp)
movq %r8, %r15
movq %rdi, %r14
leaq 0x10(%rsp), %r12
movq %r8, (%r12)
movq 0x18(%rdi), %rdi
movq %r12, %rsi
callq 0xef193
leaq 0xa3b36(%rip), %rsi     # 0x12c687
movq %r14, %rdi
movl %eax, %edx
xorl %eax, %eax
callq 0xe9226
movq 0x18(%r14), %rdi
movq %r12, %rsi
callq 0xef34e
movq %rax, %rbx
movq 0x18(%r14), %rdi
movq %r12, %rsi
callq 0xef34e
leaq 0xa3b1d(%rip), %rsi     # 0x12c69c
movq %r14, %rdi
movq %rbx, %rdx
movq %rax, %rcx
xorl %eax, %eax
callq 0xe9226
movq 0x18(%r14), %rdi
movq %r12, %rsi
callq 0xef34e
movq %rax, %rbx
movq 0x18(%r14), %rdi
movq %r12, %rsi
callq 0xef34e
leaq 0xa3b12(%rip), %rsi     # 0x12c6c3
movq %r14, %rdi
movq %rbx, %rdx
movq %rax, %rcx
xorl %eax, %eax
callq 0xe9226
movq 0x18(%r14), %rdi
movq %r12, %rsi
callq 0xef34e
movq %rax, %rbx
movq 0x18(%r14), %rdi
movq %r12, %rsi
callq 0xef34e
leaq 0xa3afe(%rip), %rsi     # 0x12c6e1
movq %r14, %rdi
movq %rbx, %rdx
movq %rax, %rcx
xorl %eax, %eax
callq 0xe9226
movq 0x18(%r14), %rdi
movq %r12, %rsi
callq 0xef34e
movq %rax, %rbx
movq 0x18(%r14), %rdi
movq %r12, %rsi
callq 0xef34e
leaq 0xa3af3(%rip), %rsi     # 0x12c708
movq %r14, %rdi
movq %rbx, %rdx
movq %rax, %rcx
xorl %eax, %eax
callq 0xe9226
movq 0x18(%r14), %rdi
movq %r12, %rsi
callq 0xef193
movq %rax, %r12
leaq 0x8d3e2(%rip), %rsi     # 0x11601d
movq %r14, %rdi
movl %r12d, %edx
xorl %eax, %eax
callq 0xe9226
testq %r12, %r12
jle 0x88cfb
addq %r15, 0x8(%rsp)
leaq 0x10(%rsp), %r13
leaq 0xa3ade(%rip), %r15     # 0x12c740
xorl %ebx, %ebx
movq 0x10(%rsp), %rcx
cmpq 0x8(%rsp), %rcx
jge 0x88cfb
movq %r14, %rdi
leaq 0xa3aa8(%rip), %rsi     # 0x12c726
movl %ebx, %edx
xorl %eax, %eax
callq 0xe9226
movq %r14, %rdi
movl $0x1, %esi
callq 0xe9585
movq 0x18(%r14), %rdi
movq %r13, %rsi
callq 0xef14d
movzbl %al, %edx
movq %r14, %rdi
leaq 0xa282a(%rip), %rsi     # 0x12b4d7
xorl %eax, %eax
callq 0xe9226
movq 0x18(%r14), %rdi
movq %r13, %rsi
callq 0xef14d
movl %eax, %ebp
movq 0x18(%r14), %rdi
movq %r13, %rsi
callq 0xef14d
movzbl %bpl, %edx
movzbl %al, %ecx
movq %r14, %rdi
movq %r15, %rsi
xorl %eax, %eax
callq 0xe9226
movq %r14, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0xe9585
incq %rbx
cmpq %rbx, %r12
jne 0x88c64
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq