// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/psd.c
// Function: hrsrc_slices
static void hrsrc_slices(deark *c, lctx *d, zztype *zz, const struct rsrc_info *ri)
{
	i64 sver;

	if(zz_avail(zz)<4) return;
	sver = psd_getu32(zz->pos);
	de_dbg(c, "slices resource format version: %d", (int)sver);

	if(sver==6) {
		do_slices_v6(c, d, zz);
	}
	else if(sver==7 || sver==8) {
		do_slices_v7_8(c, d, zz);
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x78, %rsp
movq %rdx, %r13
movq %rsi, %r15
movq %rdi, %r14
movq %rdx, %rdi
callq 0x9ff2f
cmpq $0x4, %rax
jl 0xa0d9a
movq 0x18(%r14), %rdi
movq (%r13), %rsi
movl 0x4(%r15), %edx
callq 0xe41cb
movq %rax, %r12
leaq 0x85bdf(%rip), %rsi     # 0x1265de
movq %r14, %rdi
movl %r12d, %edx
xorl %eax, %eax
callq 0xde896
cmpq $0x6, %r12
jne 0xa0d5b
addq $0x4, (%r13)
leaq 0x85bdf(%rip), %rcx     # 0x126601
movq %r14, %rdi
movq %r15, %rsi
movq %r13, %rdx
callq 0xa1409
movq (%r13), %rax
cmpq 0x10(%r13), %rax
jge 0xa0d90
movq %r14, %rdi
callq 0xeac74
movq %rax, %rbx
movq %r14, %rdi
movq %r15, %rsi
movq %rax, %rdx
movq %r13, %rcx
callq 0xa1369
movq %rbx, %rdi
callq 0xeb877
leaq 0x85bab(%rip), %rsi     # 0x126614
movq %r14, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0xde896
movq (%r13), %rax
cmpq 0x10(%r13), %rax
jge 0xa0d92
movq %rbx, 0x10(%rsp)
movq 0x18(%r14), %rdi
movl 0x4(%r15), %edx
movq %r13, %rsi
callq 0x9fe70
movq %rax, %r12
leaq 0x85b8f(%rip), %rsi     # 0x126632
xorl %ebx, %ebx
movq %r14, %rdi
movl %r12d, %edx
xorl %eax, %eax
callq 0xde896
testq %r12, %r12
movq %r12, 0x38(%rsp)
cmovleq %rbx, %r12
movq %r12, 0x48(%rsp)
movq (%r13), %rcx
leaq 0x20(%rsp), %rbp
xorl %r8d, %r8d
movq %r13, 0x40(%rsp)
movq 0x10(%r13), %rax
cmpq 0x48(%rsp), %r8
je 0xa0da9
cmpq %rax, %rcx
jge 0xa0dcd
movq %r14, %rdi
leaq 0x85b75(%rip), %rsi     # 0x12666b
movq %r8, 0x18(%rsp)
movl %r8d, %edx
xorl %eax, %eax
callq 0xde896
movq %r14, %rdi
pushq $0x1
popq %rsi
callq 0xdeba7
movq (%r13), %rax
movq 0x10(%r13), %rcx
movq %rax, 0x28(%rsp)
movq %rax, 0x20(%rsp)
movq %rcx, 0x30(%rsp)
movq %r14, %rdi
callq 0xeac74
movq %rax, %r12
movq 0x18(%r14), %rdi
movl 0x4(%r15), %edx
movq %rbp, %rsi
callq 0x9fe70
movq %r14, %rdi
leaq 0x7cfa1(%rip), %rsi     # 0x11daed
movl %eax, %edx
xorl %eax, %eax
callq 0xde896
movq 0x18(%r14), %rdi
movl 0x4(%r15), %edx
movq %rbp, %rsi
callq 0x9fe70
movq %r14, %rdi
leaq 0x85b2e(%rip), %rsi     # 0x12669d
movl %eax, %edx
xorl %eax, %eax
callq 0xde896
movq 0x18(%r14), %rdi
movl 0x4(%r15), %edx
movq %rbp, %rsi
callq 0x9fe70
movq %rax, %r13
movq %r14, %rdi
leaq 0x85b15(%rip), %rsi     # 0x1266aa
movl %r13d, %edx
xorl %eax, %eax
callq 0xde896
cmpq $0x1, %r13
jne 0xa0bc8
movq 0x18(%r14), %rdi
movl 0x4(%r15), %edx
movq %rbp, %rsi
callq 0x9fe70
movq %r14, %rdi
leaq 0x85af6(%rip), %rsi     # 0x1266b5
movl %eax, %edx
xorl %eax, %eax
callq 0xde896
movq %r14, %rdi
movq %r15, %rsi
movq %r12, %rdx
movq %rbp, %rcx
callq 0xa1369
cmpq $0x0, 0x10(%r12)
jle 0xa0bfd
movq %r12, %rdi
callq 0xeb7e4
movq %r14, %rdi
leaq 0x749c8(%rip), %rsi     # 0x1155bb
movq %rax, %rdx
xorl %eax, %eax
callq 0xde896
movq %r12, %rdi
callq 0xeac85
movq 0x18(%r14), %rdi
movl 0x4(%r15), %edx
movq %rbp, %rsi
callq 0x9fe70
movq %r14, %rdi
leaq 0x86680(%rip), %rsi     # 0x12729f
movl %eax, %edx
xorl %eax, %eax
callq 0xde896
xorl %r13d, %r13d
cmpq $0x4, %r13
je 0xa0c4b
movq 0x18(%r14), %rdi
movl 0x4(%r15), %edx
movq %rbp, %rsi
callq 0xa17af
movq %rax, 0x50(%rsp,%r13,8)
incq %r13
jmp 0xa0c2b
movl 0x50(%rsp), %ecx
movl 0x58(%rsp), %r8d
movl 0x60(%rsp), %r9d
movl 0x68(%rsp), %eax
movl %eax, (%rsp)
movq %r14, %rdi
leaq 0x85a1f(%rip), %rsi     # 0x126689
leaq 0x7553b(%rip), %rdx     # 0x1161ac
xorl %eax, %eax
callq 0xde896
movq %r14, %rdi
movq %r15, %rsi
movq %r12, %rdx
movq %rbp, %rcx
callq 0xa1369
movq %r12, %rdi
callq 0xeac85
movq %r14, %rdi
movq %r15, %rsi
movq %r12, %rdx
movq %rbp, %rcx
callq 0xa1369
movq %r12, %rdi
callq 0xeac85
movq %r14, %rdi
movq %r15, %rsi
movq %r12, %rdx
movq %rbp, %rcx
callq 0xa1369
movq %r12, %rdi
callq 0xeac85
movq %r14, %rdi
movq %r15, %rsi
movq %r12, %rdx
movq %rbp, %rcx
callq 0xa1369
movq %r12, %rdi
callq 0xeac85
incq 0x20(%rsp)
movq %r14, %rdi
movq %r15, %rsi
movq %r12, %rdx
movq %rbp, %rcx
callq 0xa1369
movq %r12, %rdi
callq 0xeac85
movq 0x20(%rsp), %r13
movq 0x30(%rsp), %rbx
addq $0xc, %r13
movq %r13, 0x20(%rsp)
movq %r12, %rdi
callq 0xeaf3c
movq %r14, %rdi
pushq $-0x1
popq %rsi
callq 0xdeba7
movq 0x28(%rsp), %rax
movq %rbx, %rcx
subq %rax, %rcx
jle 0xa0d3f
cmpq %rbx, %r13
movq 0x18(%rsp), %r8
jg 0xa0d46
subq %rax, %r13
movq %r13, %rcx
jmp 0xa0d46
xorl %ecx, %ecx
movq 0x18(%rsp), %r8
movq 0x40(%rsp), %r13
addq (%r13), %rcx
movq %rcx, (%r13)
incq %r8
jmp 0xa0ad4
addq $-0x7, %r12
cmpq $0x1, %r12
ja 0xa0d9a
addq $0x4, (%r13)
leaq 0x96eef(%rip), %r8      # 0x137c60
pushq $0x1
popq %rcx
movq %r14, %rdi
movq %r15, %rsi
movq %r13, %rdx
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xa147d
xorl %ebx, %ebx
movq %rbx, %rdi
callq 0xeaf3c
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
cmpq %rax, %rcx
movq 0x10(%rsp), %rbx
jge 0xa0d92
leaq 0x858c1(%rip), %r8      # 0x12667b
pushq $0x1
popq %rcx
movq %r14, %rdi
movq %r15, %rsi
movq %r13, %rdx
callq 0xa147d
jmp 0xa0d92
leaq 0x85873(%rip), %rsi     # 0x126647
movq %r14, %rdi
movq 0x38(%rsp), %rdx
movl %r8d, %ecx
xorl %eax, %eax
callq 0xde896
movq 0x10(%rsp), %rbx
jmp 0xa0d92