// File: /workspace/github_c_makefile_star2_O0/rsa9000[P]regfanalysistools/regfwalk.c
// Function: regf_parse_nk_flags
static const char *regf_parse_nk_flags(uint16_t flags)
{
	static char buf[0x100];
	char *p = buf, *e = buf + sizeof(buf);

	if (!flags)
		return "";
	if (flags & ~REGF_NK_F_KNOWN_M)
		p += snprintf(p, e - p, ", unkn");
	if (flags & REGF_NK_F_PREDEF)
		p += snprintf(p, e - p, ", predef");
	if (flags & REGF_NK_F_ASCII)
		p += snprintf(p, e - p, ", ascii");
	if (flags & REGF_NK_F_SYMLINK)
		p += snprintf(p, e - p, ", symlink");
	if (flags & REGF_NK_F_NODEL)
		p += snprintf(p, e - p, ", nodel");
	if (flags & REGF_NK_F_ENTRY)
		p += snprintf(p, e - p, ", entry");
	if (flags & REGF_NK_F_EXIT)
		p += snprintf(p, e - p, ", exit");
	if (flags & REGF_NK_F_VOLATILE)
		p += snprintf(p, e - p, ", volatile");

	return &buf[2];
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movw %di, %ax
movw %ax, -0xa(%rbp)
leaq 0x6eca(%rip), %rax      # 0x9220
movq %rax, -0x18(%rbp)
leaq 0x6ebf(%rip), %rax      # 0x9220
addq $0x100, %rax            # imm = 0x100
movq %rax, -0x20(%rbp)
cmpw $0x0, -0xa(%rbp)
jne 0x2382
leaq 0x3f4b(%rip), %rax      # 0x62c4
movq %rax, -0x8(%rbp)
jmp 0x2559
movzwl -0xa(%rbp), %eax
andl $-0x80, %eax
cmpl $0x0, %eax
je 0x23bb
movq -0x18(%rbp), %rdi
movq -0x20(%rbp), %rsi
movq -0x18(%rbp), %rax
subq %rax, %rsi
leaq 0x430d(%rip), %rdx      # 0x66b1
movb $0x0, %al
callq 0x10b0
movl %eax, %ecx
movq -0x18(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x18(%rbp)
movzwl -0xa(%rbp), %eax
andl $0x40, %eax
cmpl $0x0, %eax
je 0x23f4
movq -0x18(%rbp), %rdi
movq -0x20(%rbp), %rsi
movq -0x18(%rbp), %rax
subq %rax, %rsi
leaq 0x42db(%rip), %rdx      # 0x66b8
movb $0x0, %al
callq 0x10b0
movl %eax, %ecx
movq -0x18(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x18(%rbp)
movzwl -0xa(%rbp), %eax
andl $0x20, %eax
cmpl $0x0, %eax
je 0x242d
movq -0x18(%rbp), %rdi
movq -0x20(%rbp), %rsi
movq -0x18(%rbp), %rax
subq %rax, %rsi
leaq 0x42ab(%rip), %rdx      # 0x66c1
movb $0x0, %al
callq 0x10b0
movl %eax, %ecx
movq -0x18(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x18(%rbp)
movzwl -0xa(%rbp), %eax
andl $0x10, %eax
cmpl $0x0, %eax
je 0x2466
movq -0x18(%rbp), %rdi
movq -0x20(%rbp), %rsi
movq -0x18(%rbp), %rax
subq %rax, %rsi
leaq 0x427a(%rip), %rdx      # 0x66c9
movb $0x0, %al
callq 0x10b0
movl %eax, %ecx
movq -0x18(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x18(%rbp)
movzwl -0xa(%rbp), %eax
andl $0x8, %eax
cmpl $0x0, %eax
je 0x249f
movq -0x18(%rbp), %rdi
movq -0x20(%rbp), %rsi
movq -0x18(%rbp), %rax
subq %rax, %rsi
leaq 0x424b(%rip), %rdx      # 0x66d3
movb $0x0, %al
callq 0x10b0
movl %eax, %ecx
movq -0x18(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x18(%rbp)
movzwl -0xa(%rbp), %eax
andl $0x4, %eax
cmpl $0x0, %eax
je 0x24d8
movq -0x18(%rbp), %rdi
movq -0x20(%rbp), %rsi
movq -0x18(%rbp), %rax
subq %rax, %rsi
leaq 0x421a(%rip), %rdx      # 0x66db
movb $0x0, %al
callq 0x10b0
movl %eax, %ecx
movq -0x18(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x18(%rbp)
movzwl -0xa(%rbp), %eax
andl $0x2, %eax
cmpl $0x0, %eax
je 0x2511
movq -0x18(%rbp), %rdi
movq -0x20(%rbp), %rsi
movq -0x18(%rbp), %rax
subq %rax, %rsi
leaq 0x41e9(%rip), %rdx      # 0x66e3
movb $0x0, %al
callq 0x10b0
movl %eax, %ecx
movq -0x18(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x18(%rbp)
movzwl -0xa(%rbp), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x254a
movq -0x18(%rbp), %rdi
movq -0x20(%rbp), %rsi
movq -0x18(%rbp), %rax
subq %rax, %rsi
leaq 0x41b7(%rip), %rdx      # 0x66ea
movb $0x0, %al
callq 0x10b0
movl %eax, %ecx
movq -0x18(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x18(%rbp)
leaq 0x6ccf(%rip), %rax      # 0x9220
addq $0x2, %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)