// File: /workspace/github_c_makefile_star2_O0/rsa9000[P]regfanalysistools/regfwalk.c
// Function: regf_parse_vlst
static int regf_parse_vlst(const char *pref, unsigned off, unsigned num)
{
#define VLST_PR_WARN(__fmt, ...)	PR_WARN(off, "vlst", __fmt, ##__VA_ARGS__)
	const struct regf_cell *rc = st.data + off;
	const uint32_t *vals = (void *)rc->data;
	size_t pref_len = strlen(pref);
	char __pref[pref_len + 3];
	struct cell *cell;
	unsigned i;
	int res, ret = 0;

	if (regf_cell_check_len(st.data, off, "vlst", num * sizeof(vals[0])))
		return -1;

	printf("%svals.{off,len} = 0x%08X, 0x%08X\n", pref, off, -rc->sz);

	snprintf(__pref, sizeof(__pref), "%s  ", pref);

	for (i = 0; i < num; ++i) {
		printf("%svals[%u] = 0x%08X\n", pref, i, vals[i]);
		cell = cache_cell_find(vals[i]);
		if (!cell) {
			VLST_PR_WARN("could not find value cell 0x%08X\n",
				     vals[i]);
			ret = -1;
			continue;
		}
		cache_cell_updref(cell, CT_VK);
		res = regf_parse_vk(__pref, vals[i]);
		if (res) {
			VLST_PR_WARN("could not parse value key in cell 0x%08X\n",
				     vals[i]);
			ret = -1;
			continue;
		}
	}

	return ret;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movl %edx, -0x18(%rbp)
movq 0x6957(%rip), %rax      # 0x9100
movl -0x14(%rbp), %ecx
addq %rcx, %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
addq $0x4, %rax
movq %rax, -0x28(%rbp)
movq -0x10(%rbp), %rdi
callq 0x1080
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rdx
movq %rdx, %rax
addq $0x3, %rax
movq %rax, -0x68(%rbp)
movq %rsp, %rcx
movq %rcx, -0x38(%rbp)
addq $0x12, %rdx
andq $-0x10, %rdx
movq %rsp, %rcx
subq %rdx, %rcx
movq %rcx, -0x60(%rbp)
movq %rcx, %rsp
movq %rax, -0x40(%rbp)
movl $0x0, -0x54(%rbp)
movq 0x68f7(%rip), %rdi      # 0x9100
movl -0x14(%rbp), %esi
movl -0x18(%rbp), %eax
shlq $0x2, %rax
movl %eax, %ecx
leaq 0x4136(%rip), %rdx      # 0x6952
callq 0x4ee0
cmpl $0x0, %eax
je 0x2839
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
movl $0x1, -0x58(%rbp)
jmp 0x2959
movq -0x10(%rbp), %rsi
movl -0x14(%rbp), %edx
movq -0x20(%rbp), %rax
xorl %ecx, %ecx
subl (%rax), %ecx
leaq 0x4108(%rip), %rdi      # 0x6957
movb $0x0, %al
callq 0x10a0
movq -0x60(%rbp), %rdi
movq -0x68(%rbp), %rsi
movq -0x10(%rbp), %rcx
leaq 0x3af4(%rip), %rdx      # 0x635d
movb $0x0, %al
callq 0x10b0
movl $0x0, -0x4c(%rbp)
movl -0x4c(%rbp), %eax
cmpl -0x18(%rbp), %eax
jae 0x294c
movq -0x10(%rbp), %rsi
movl -0x4c(%rbp), %edx
movq -0x28(%rbp), %rax
movl -0x4c(%rbp), %ecx
movl (%rax,%rcx,4), %ecx
leaq 0x40df(%rip), %rdi      # 0x697a
movb $0x0, %al
callq 0x10a0
movq -0x28(%rbp), %rax
movl -0x4c(%rbp), %ecx
movl (%rax,%rcx,4), %edi
callq 0x1c10
movq %rax, -0x48(%rbp)
cmpq $0x0, -0x48(%rbp)
jne 0x28e7
movl -0x14(%rbp), %esi
movq -0x28(%rbp), %rax
movl -0x4c(%rbp), %ecx
movl (%rax,%rcx,4), %ecx
leaq 0x40bf(%rip), %rdi      # 0x698f
leaq 0x407b(%rip), %rdx      # 0x6952
movb $0x0, %al
callq 0x4c10
movl $0xffffffff, -0x54(%rbp) # imm = 0xFFFFFFFF
jmp 0x293e
movq -0x48(%rbp), %rdi
movl $0x40, %esi
callq 0x1c70
movq -0x60(%rbp), %rdi
movq -0x28(%rbp), %rax
movl -0x4c(%rbp), %ecx
movl (%rax,%rcx,4), %esi
callq 0x3010
movl %eax, -0x50(%rbp)
cmpl $0x0, -0x50(%rbp)
je 0x293c
movl -0x14(%rbp), %esi
movq -0x28(%rbp), %rax
movl -0x4c(%rbp), %ecx
movl (%rax,%rcx,4), %ecx
leaq 0x409c(%rip), %rdi      # 0x69c1
leaq 0x4026(%rip), %rdx      # 0x6952
movb $0x0, %al
callq 0x4c10
movl $0xffffffff, -0x54(%rbp) # imm = 0xFFFFFFFF
jmp 0x293e
jmp 0x293e
movl -0x4c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x4c(%rbp)
jmp 0x2877
movl -0x54(%rbp), %eax
movl %eax, -0x4(%rbp)
movl $0x1, -0x58(%rbp)
movq -0x38(%rbp), %rax
movq %rax, %rsp
movl -0x4(%rbp), %eax
movq %rbp, %rsp
popq %rbp
retq
nopl (%rax,%rax)