// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/pcf.c
// Function: handler_properties
static void handler_properties(deark *c, lctx *d, struct table_entry *te)
{
	i64 pos = te->offset;
	i64 nprops;
	int saved_indent_level;
	i64 props_idx_pos;
	i64 props_idx_size_padded;
	i64 string_data_area_pos;
	i64 string_data_area_size;
	i64 k;

	de_dbg(c, "properties table at %"I64_FMT, pos);
	de_dbg_indent_save(c, &saved_indent_level);
	de_dbg_indent(c, 1);

	if(!read_and_check_format_field(c, d, te, pos)) goto done;
	pos += 4;

	nprops = dbuf_getu32x(c->infile, pos, te->fmt.is_le);
	pos += 4;
	de_dbg(c, "nprops: %d", (int)nprops);

	props_idx_pos = pos;
	props_idx_size_padded = de_pad_to_4(nprops*9);
	de_dbg(c, "properties index at %"I64_FMT, props_idx_pos);

	pos += props_idx_size_padded;

	string_data_area_size = dbuf_getu32x(c->infile, pos, te->fmt.is_le);
	pos += 4;
	string_data_area_pos = pos;
	de_dbg(c, "string data area at %"I64_FMT", len=%d", string_data_area_pos,
		(int)string_data_area_size);

	// Go back and read the properties table
	pos = props_idx_pos;
	for(k=0; k<nprops; k++) {
		if(pos+9 > te->offset + te->size) break;
		read_one_property(c, d, te, pos, k, string_data_area_pos);
		pos += 9;
	}

done:
	de_dbg_indent_restore(c, saved_indent_level);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq 0x30(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rdi
movq -0x20(%rbp), %rdx
leaq 0xa9638(%rip), %rsi     # 0x1c5417
movb $0x0, %al
callq 0x15b0d0
movq -0x8(%rbp), %rdi
leaq -0x2c(%rbp), %rsi
callq 0x15b580
movq -0x8(%rbp), %rdi
movl $0x1, %esi
callq 0x15b560
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
movq -0x20(%rbp), %rcx
callq 0x11cb10
cmpl $0x0, %eax
jne 0x11be20
jmp 0x11bf62
movq -0x20(%rbp), %rax
addq $0x4, %rax
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x20(%rbp), %rsi
movq -0x18(%rbp), %rax
movl 0x10(%rax), %edx
callq 0x1658c0
movq %rax, -0x28(%rbp)
movq -0x20(%rbp), %rax
addq $0x4, %rax
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rdi
movq -0x28(%rbp), %rax
movl %eax, %edx
leaq 0xa95ca(%rip), %rsi     # 0x1c542f
movb $0x0, %al
callq 0x15b0d0
movq -0x20(%rbp), %rax
movq %rax, -0x38(%rbp)
imulq $0x9, -0x28(%rbp), %rdi
callq 0x15ce30
movq %rax, -0x40(%rbp)
movq -0x8(%rbp), %rdi
movq -0x38(%rbp), %rdx
leaq 0xa95a9(%rip), %rsi     # 0x1c543a
movb $0x0, %al
callq 0x15b0d0
movq -0x40(%rbp), %rax
addq -0x20(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x20(%rbp), %rsi
movq -0x18(%rbp), %rax
movl 0x10(%rax), %edx
callq 0x1658c0
movq %rax, -0x50(%rbp)
movq -0x20(%rbp), %rax
addq $0x4, %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x48(%rbp)
movq -0x8(%rbp), %rdi
movq -0x48(%rbp), %rdx
movq -0x50(%rbp), %rax
movl %eax, %ecx
leaq 0xa9569(%rip), %rsi     # 0x1c5452
movb $0x0, %al
callq 0x15b0d0
movq -0x38(%rbp), %rax
movq %rax, -0x20(%rbp)
movq $0x0, -0x58(%rbp)
movq -0x58(%rbp), %rax
cmpq -0x28(%rbp), %rax
jge 0x11bf60
movq -0x20(%rbp), %rax
addq $0x9, %rax
movq -0x18(%rbp), %rcx
movq 0x30(%rcx), %rcx
movq -0x18(%rbp), %rdx
addq 0x28(%rdx), %rcx
cmpq %rcx, %rax
jle 0x11bf29
jmp 0x11bf60
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
movq -0x20(%rbp), %rcx
movq -0x58(%rbp), %r8
movq -0x48(%rbp), %r9
callq 0x11cb90
movq -0x20(%rbp), %rax
addq $0x9, %rax
movq %rax, -0x20(%rbp)
movq -0x58(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x58(%rbp)
jmp 0x11bf00
jmp 0x11bf62
movq -0x8(%rbp), %rdi
movl -0x2c(%rbp), %esi
callq 0x15b5a0
addq $0x60, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)