// File: /workspace/github_c_makefile_star2_O1/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 $0x68, %rsp
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r14
movq (%rdx), %rsi
movq 0x10(%rdx), %rcx
movq %rcx, %rax
subq %rsi, %rax
jle 0xa75ab
movq 0x8(%rbx), %rdx
cmpq %rdx, %rsi
jge 0xa75ad
subq %rdx, %rcx
movq %rcx, %rax
jmp 0xa75ad
xorl %eax, %eax
cmpq $0x4, %rax
jl 0xa79cc
movq 0x18(%r14), %rdi
movl 0x4(%r15), %edx
callq 0xef614
movq %rax, %r12
leaq 0x8bef0(%rip), %rsi     # 0x1334be
movq %r14, %rdi
movl %r12d, %edx
xorl %eax, %eax
callq 0xe9226
cmpq $0x6, %r12
jne 0xa7970
addq $0x4, (%rbx)
leaq 0x8bef1(%rip), %rcx     # 0x1334e1
movq %r14, %rdi
movq %r15, %rsi
movq %rbx, %rdx
callq 0xa80fd
movq (%rbx), %rax
cmpq 0x10(%rbx), %rax
jge 0xa79a6
movq %r14, %rdi
callq 0xf6870
movq %rax, %r12
movq %r14, %rdi
movq %r15, %rsi
movq %rax, %rdx
movq %rbx, %rcx
callq 0xa803f
movq %r12, 0x20(%rsp)
movq %r12, %rdi
callq 0xf7557
leaq 0x8beb9(%rip), %rsi     # 0x1334f4
movq %r14, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0xe9226
movq (%rbx), %rsi
cmpq 0x10(%rbx), %rsi
jge 0xa79c2
movq 0x18(%r14), %rdi
movl 0x4(%r15), %edx
callq 0xef614
movq %rax, %r12
addq $0x4, (%rbx)
leaq 0x8bea2(%rip), %rsi     # 0x133512
movq %r14, %rdi
movl %r12d, %edx
xorl %eax, %eax
callq 0xe9226
movq %r12, 0x28(%rsp)
testq %r12, %r12
jle 0xa794b
xorl %eax, %eax
movq %rbx, 0x30(%rsp)
movq (%rbx), %rcx
cmpq 0x10(%rbx), %rcx
jge 0xa79aa
movq %r14, %rdi
leaq 0x8bea2(%rip), %rsi     # 0x13354b
movq %rax, 0x38(%rsp)
movl %eax, %edx
xorl %eax, %eax
callq 0xe9226
movq %r14, %rdi
movl $0x1, %esi
callq 0xe9585
movq (%rbx), %r12
movq 0x10(%rbx), %rax
movq %r12, 0x10(%rsp)
movq %r12, 0x8(%rsp)
movq %rax, 0x18(%rsp)
movq %r14, %rdi
callq 0xf6870
movq %rax, %r13
movq 0x18(%r14), %rdi
movl 0x4(%r15), %edx
movq %r12, %rsi
callq 0xef614
leaq 0x4(%r12), %rbp
movq %rbp, 0x8(%rsp)
movq %r14, %rdi
leaq 0x83384(%rip), %rsi     # 0x12aa8d
movl %eax, %edx
xorl %eax, %eax
callq 0xe9226
movq 0x18(%r14), %rdi
movl 0x4(%r15), %edx
movq %rbp, %rsi
callq 0xef614
leaq 0x8(%r12), %rbp
movq %rbp, 0x8(%rsp)
movq %r14, %rdi
leaq 0x8be47(%rip), %rsi     # 0x13357d
movl %eax, %edx
xorl %eax, %eax
callq 0xe9226
movq 0x18(%r14), %rdi
movl 0x4(%r15), %edx
movq %rbp, %rsi
callq 0xef614
movq %rax, %rbx
leaq 0xc(%r12), %rbp
movq %rbp, 0x8(%rsp)
movq %r14, %rdi
leaq 0x8be24(%rip), %rsi     # 0x13358a
movl %ebx, %edx
xorl %eax, %eax
callq 0xe9226
cmpq $0x1, %rbx
jne 0xa77a1
movq 0x18(%r14), %rdi
movl 0x4(%r15), %edx
movq %rbp, %rsi
callq 0xef614
addq $0x10, %r12
movq %r12, 0x8(%rsp)
movq %r14, %rdi
leaq 0x8bdfd(%rip), %rsi     # 0x133595
movl %eax, %edx
xorl %eax, %eax
callq 0xe9226
movq %r14, %rdi
movq %r15, %rsi
movq %r13, %rdx
leaq 0x8(%rsp), %rbp
movq %rbp, %rcx
callq 0xa803f
cmpq $0x0, 0x10(%r13)
jle 0xa77da
movq %r13, %rdi
callq 0xf74bd
movq %r14, %rdi
leaq 0x7ada3(%rip), %rsi     # 0x122573
movq %rax, %rdx
xorl %eax, %eax
callq 0xe9226
movq %r13, %rdi
callq 0xf6883
movq 0x18(%r14), %rdi
movl 0x4(%r15), %edx
movq 0x8(%rsp), %r12
movq %r12, %rsi
callq 0xef614
addq $0x4, %r12
movq %r12, 0x8(%rsp)
movq %r14, %rdi
leaq 0x8c975(%rip), %rsi     # 0x13417f
movl %eax, %edx
xorl %eax, %eax
callq 0xe9226
xorl %ebx, %ebx
leaq (%r12,%rbx), %rsi
movq 0x18(%r14), %rdi
movl 0x4(%r15), %edx
callq 0xef654
movq %rax, 0x40(%rsp,%rbx,2)
addq $0x4, %rbx
cmpq $0x10, %rbx
jne 0xa7815
addq %rbx, %r12
movq %r12, 0x8(%rsp)
movl 0x40(%rsp), %ecx
movl 0x48(%rsp), %r8d
movl 0x50(%rsp), %r9d
movl 0x58(%rsp), %eax
movl %eax, (%rsp)
movq %r14, %rdi
leaq 0x8bd0d(%rip), %rsi     # 0x133569
leaq 0x7b929(%rip), %rdx     # 0x12318c
xorl %eax, %eax
callq 0xe9226
movq %r14, %rdi
movq %r15, %rsi
movq %r13, %rdx
movq %rbp, %rcx
callq 0xa803f
movq %r13, %rdi
callq 0xf6883
movq %r14, %rdi
movq %r15, %rsi
movq %r13, %rdx
movq %rbp, %rcx
callq 0xa803f
movq %r13, %rdi
callq 0xf6883
movq %r14, %rdi
movq %r15, %rsi
movq %r13, %rdx
movq %rbp, %rcx
callq 0xa803f
movq %r13, %rdi
callq 0xf6883
movq %r14, %rdi
movq %r15, %rsi
movq %r13, %rdx
movq %rbp, %rcx
callq 0xa803f
movq %r13, %rdi
callq 0xf6883
incq 0x8(%rsp)
movq %r14, %rdi
movq %r15, %rsi
movq %r13, %rdx
movq %rbp, %rcx
callq 0xa803f
movq %r13, %rdi
callq 0xf6883
movq 0x8(%rsp), %rbx
movq 0x18(%rsp), %r12
addq $0xc, %rbx
movq %rbx, 0x8(%rsp)
movq %r13, %rdi
callq 0xf6bb0
movq %r14, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0xe9585
movq 0x10(%rsp), %rcx
movq %r12, %rax
subq %rcx, %rax
jle 0xa792e
cmpq %r12, %rbx
jg 0xa7930
subq %rcx, %rbx
movq %rbx, %rax
jmp 0xa7930
xorl %eax, %eax
movq 0x30(%rsp), %rbx
addq %rax, (%rbx)
movq 0x38(%rsp), %rax
incq %rax
cmpq 0x28(%rsp), %rax
jne 0xa7692
movq (%rbx), %rax
cmpq 0x10(%rbx), %rax
jge 0xa79c2
leaq 0x8bc00(%rip), %r8      # 0x13355b
movq %r14, %rdi
movq %r15, %rsi
movq %rbx, %rdx
movl $0x1, %ecx
callq 0xa8173
jmp 0xa79c2
addq $-0x7, %r12
cmpq $0x1, %r12
ja 0xa79cc
addq $0x4, (%rbx)
leaq 0x9d24b(%rip), %r8      # 0x144bd0
movq %r14, %rdi
movq %r15, %rsi
movq %rbx, %rdx
movl $0x1, %ecx
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xa8173
xorl %edi, %edi
jmp 0xa79c7
leaq 0x8bb76(%rip), %rsi     # 0x133527
movq %r14, %rdi
movq 0x28(%rsp), %rdx
movl %eax, %ecx
xorl %eax, %eax
callq 0xe9226
movq 0x20(%rsp), %rdi
callq 0xf6bb0
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq