// File: /workspace/github_c_makefile_star2_O3/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 0xeeb91
leaq 0xa450f(%rip), %rsi     # 0x12c96f
movq %r14, %rdi
movl %eax, %edx
xorl %eax, %eax
callq 0xe8617
movq 0x18(%r14), %rdi
movq %r12, %rsi
callq 0xeed31
movq %rax, %rbx
movq 0x18(%r14), %rdi
movq %r12, %rsi
callq 0xeed31
leaq 0xa44f6(%rip), %rsi     # 0x12c984
movq %r14, %rdi
movq %rbx, %rdx
movq %rax, %rcx
xorl %eax, %eax
callq 0xe8617
movq 0x18(%r14), %rdi
movq %r12, %rsi
callq 0xeed31
movq %rax, %rbx
movq 0x18(%r14), %rdi
movq %r12, %rsi
callq 0xeed31
leaq 0xa44eb(%rip), %rsi     # 0x12c9ab
movq %r14, %rdi
movq %rbx, %rdx
movq %rax, %rcx
xorl %eax, %eax
callq 0xe8617
movq 0x18(%r14), %rdi
movq %r12, %rsi
callq 0xeed31
movq %rax, %rbx
movq 0x18(%r14), %rdi
movq %r12, %rsi
callq 0xeed31
leaq 0xa44d7(%rip), %rsi     # 0x12c9c9
movq %r14, %rdi
movq %rbx, %rdx
movq %rax, %rcx
xorl %eax, %eax
callq 0xe8617
movq 0x18(%r14), %rdi
movq %r12, %rsi
callq 0xeed31
movq %rax, %rbx
movq 0x18(%r14), %rdi
movq %r12, %rsi
callq 0xeed31
leaq 0xa44cc(%rip), %rsi     # 0x12c9f0
movq %r14, %rdi
movq %rbx, %rdx
movq %rax, %rcx
xorl %eax, %eax
callq 0xe8617
movq 0x18(%r14), %rdi
movq %r12, %rsi
callq 0xeeb91
movq %rax, %r12
leaq 0x8db83(%rip), %rsi     # 0x1160cd
movq %r14, %rdi
movl %r12d, %edx
xorl %eax, %eax
callq 0xe8617
testq %r12, %r12
jle 0x8860a
addq %r15, 0x8(%rsp)
leaq 0x10(%rsp), %r13
leaq 0xa44b7(%rip), %r15     # 0x12ca28
xorl %ebx, %ebx
movq 0x10(%rsp), %rcx
cmpq 0x8(%rsp), %rcx
jge 0x8860a
movq %r14, %rdi
leaq 0xa4481(%rip), %rsi     # 0x12ca0e
movl %ebx, %edx
xorl %eax, %eax
callq 0xe8617
movq %r14, %rdi
movl $0x1, %esi
callq 0xe8a15
movq 0x18(%r14), %rdi
movq %r13, %rsi
callq 0xeeb4b
movzbl %al, %edx
movq %r14, %rdi
leaq 0xa31eb(%rip), %rsi     # 0x12b7a7
xorl %eax, %eax
callq 0xe8617
movq 0x18(%r14), %rdi
movq %r13, %rsi
callq 0xeeb4b
movl %eax, %ebp
movq 0x18(%r14), %rdi
movq %r13, %rsi
callq 0xeeb4b
movzbl %bpl, %edx
movzbl %al, %ecx
movq %r14, %rdi
movq %r15, %rsi
xorl %eax, %eax
callq 0xe8617
movq %r14, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0xe8a15
incq %rbx
cmpq %rbx, %r12
jne 0x88573
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq