// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/psd.c
// Function: do_action_set
static void do_action_set(deark *c, lctx *d, zztype *zz)
{
	i64 ver;
	i64 num_actions;
	i64 action_idx;
	de_ucstring *s = NULL;
	zztype czz;
	int saved_indent_level;
	u8 b;

	de_dbg_indent_save(c, &saved_indent_level);
	ver = psd_getu32zz(zz);
	de_dbg(c, "version: %d", (int)ver);
	if(ver!=16) {
		de_err(c, "Unsupported Action format version: %d", (int)ver);
		goto done;
	}

	s = ucstring_create(c);
	read_unicode_string(c, d, s, zz);
	de_dbg(c, "action set name: \"%s\"", ucstring_getpsz_d(s));

	b = psd_getbytezz(zz);
	de_dbg(c, "set-is-expanded: %d", (int)b);

	num_actions = psd_getu32zz(zz);
	de_dbg(c, "number of actions: %d", (int)num_actions);

	for(action_idx=0; action_idx<num_actions; action_idx++) {
		if(zz_avail(zz)<1) goto done;
		zz_init(&czz, zz);
		de_dbg(c, "action[%d] at %d", (int)action_idx, (int)zz->pos);
		de_dbg_indent(c, 1);
		if(!do_one_action(c, d, &czz)) goto done;
		zz->pos += zz_used(&czz);
		de_dbg_indent(c, -1);
	}

done:
	de_dbg_indent_restore(c, saved_indent_level);
	ucstring_destroy(s);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq $0x0, -0x38(%rbp)
movq -0x8(%rbp), %rdi
leaq -0x54(%rbp), %rsi
callq 0x15b580
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x18(%rbp), %rsi
movq -0x10(%rbp), %rax
movl 0x4(%rax), %edx
callq 0xf3330
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rdi
movq -0x20(%rbp), %rax
movl %eax, %edx
leaq 0xc470a(%rip), %rsi     # 0x1c0210
movb $0x0, %al
callq 0x15b0d0
cmpq $0x10, -0x20(%rbp)
je 0xfbb31
movq -0x8(%rbp), %rdi
movq -0x20(%rbp), %rax
movl %eax, %edx
leaq 0xc492b(%rip), %rsi     # 0x1c0450
movb $0x0, %al
callq 0x15bfb0
jmp 0xfbc8c
movq -0x8(%rbp), %rdi
callq 0x1711d0
movq %rax, -0x38(%rbp)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x38(%rbp), %rdx
movq -0x18(%rbp), %rcx
callq 0xf54d0
movq -0x8(%rbp), %rax
movq %rax, -0x60(%rbp)
movq -0x38(%rbp), %rdi
callq 0x172650
movq -0x60(%rbp), %rdi
movq %rax, %rdx
leaq 0xc4904(%rip), %rsi     # 0x1c0476
movb $0x0, %al
callq 0x15b0d0
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x18(%rbp), %rsi
callq 0xf4120
movb %al, -0x55(%rbp)
movq -0x8(%rbp), %rdi
movzbl -0x55(%rbp), %edx
leaq 0xc48f0(%rip), %rsi     # 0x1c048c
movb $0x0, %al
callq 0x15b0d0
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x18(%rbp), %rsi
movq -0x10(%rbp), %rax
movl 0x4(%rax), %edx
callq 0xf3330
movq %rax, -0x28(%rbp)
movq -0x8(%rbp), %rdi
movq -0x28(%rbp), %rax
movl %eax, %edx
leaq 0xc48d0(%rip), %rsi     # 0x1c04a0
movb $0x0, %al
callq 0x15b0d0
movq $0x0, -0x30(%rbp)
movq -0x30(%rbp), %rax
cmpq -0x28(%rbp), %rax
jge 0xfbc8a
movq -0x18(%rbp), %rdi
callq 0xf40b0
cmpq $0x1, %rax
jge 0xfbc01
jmp 0xfbc8c
movq -0x18(%rbp), %rsi
leaq -0x50(%rbp), %rdi
callq 0xf3580
movq -0x8(%rbp), %rdi
movq -0x30(%rbp), %rax
movl %eax, %edx
movq -0x18(%rbp), %rax
movq (%rax), %rax
movl %eax, %ecx
leaq 0xc488e(%rip), %rsi     # 0x1c04b6
movb $0x0, %al
callq 0x15b0d0
movq -0x8(%rbp), %rdi
movl $0x1, %esi
callq 0x15b560
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
leaq -0x50(%rbp), %rdx
callq 0xfbcb0
cmpl $0x0, %eax
jne 0xfbc55
jmp 0xfbc8c
leaq -0x50(%rbp), %rdi
callq 0xf3820
movq %rax, %rcx
movq -0x18(%rbp), %rax
addq (%rax), %rcx
movq %rcx, (%rax)
movq -0x8(%rbp), %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x15b560
movq -0x30(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x30(%rbp)
jmp 0xfbbdf
jmp 0xfbc8c
movq -0x8(%rbp), %rdi
movl -0x54(%rbp), %esi
callq 0x15b5a0
movq -0x38(%rbp), %rdi
callq 0x171750
addq $0x60, %rsp
popq %rbp
retq
nopw (%rax,%rax)