// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/rar.c
// Function: get_rar4_flags_descr
static void get_rar4_flags_descr(struct rar4_block *rb, de_ucstring *s)
{
	UI bf = rb->flags;
	UI x;

	ucstring_empty(s);
	if(rb->type==0x73) { // archive hdr
		if(bf & 0x0001) {
			ucstring_append_flags_item(s, "volume");
			bf -= 0x0001;
		}
		if(bf & 0x0002) {
			ucstring_append_flags_item(s, "has comment (old)");
			bf -= 0x0002;
		}
		if(bf & 0x0004) {
			ucstring_append_flags_item(s, "locked");
			bf -= 0x0004;
		}
		if(bf & 0x0008) {
			ucstring_append_flags_item(s, "solid");
			bf -= 0x0008;
		}
		if(bf & 0x0020) {
			ucstring_append_flags_item(s, "has auth info (old)");
			bf -= 0x0020;
		}
		if(bf & 0x0040) {
			ucstring_append_flags_item(s, "has recovery record");
			bf -= 0x0040;
		}
	}
	else if(rb->type==0x74 || rb->type==0x7a) { // file hdr or new subblock
		if(bf & 0x0001) {
			ucstring_append_flags_item(s, "continued from prev vol");
			bf -= 0x0001;
		}
		if(bf & 0x0002) {
			ucstring_append_flags_item(s, "continued in next vol");
			bf -= 0x0002;
		}
		if(bf & 0x0004) {
			ucstring_append_flags_item(s, "encrypted");
			bf -= 0x0004;
		}
		if(bf & 0x0008) {
			ucstring_append_flags_item(s, "has comment (old)");
			bf -= 0x0008;
		}
		if(bf & 0x0010) {
			ucstring_append_flags_item(s, "solid");
			bf -= 0x0010;
		}

		x = bf & 0x00e0;
		bf -= x;
		x >>= 5;
		if(x==0x7) {
			ucstring_append_flags_item(s, "directory");
		}
		else {
			ucstring_append_flags_itemf(s, "dict=%uK", (UI)(64<<x));
		}

		if(bf & 0x0100) {
			ucstring_append_flags_item(s, "large");
			bf -= 0x0100;
		}
		if(bf & 0x0200) {
			ucstring_append_flags_item(s, "Unicode filename");
			bf -= 0x0200;
		}
		if(bf & 0x0400) {
			ucstring_append_flags_item(s, "salt");
			bf -= 0x0400;
		}
		if(bf & 0x0800) {
			ucstring_append_flags_item(s, "old version");
			bf -= 0x0800;
		}
		if(bf & 0x1000) {
			ucstring_append_flags_item(s, "has ext time field");
			bf -= 0x1000;
		}
	}

	if(bf & 0x4000) {
		ucstring_append_flags_item(s, "unsafe to copy");
		bf -= 0x4000;
	}
	if(bf & 0x8000) {
		ucstring_append_flags_item(s, "long block");
		bf -= 0x8000;
	}
	if(bf!=0) {
		ucstring_append_flags_itemf(s, "0x%04x", bf);
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movl 0x14(%rax), %eax
movl %eax, -0x14(%rbp)
movq -0x10(%rbp), %rdi
callq 0x171210
movq -0x8(%rbp), %rax
movzbl 0x18(%rax), %eax
cmpl $0x73, %eax
jne 0x1517e1
movl -0x14(%rbp), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x151728
movq -0x10(%rbp), %rdi
leaq 0x6cc30(%rip), %rsi     # 0x1be34a
callq 0x172680
movl -0x14(%rbp), %eax
subl $0x1, %eax
movl %eax, -0x14(%rbp)
movl -0x14(%rbp), %eax
andl $0x2, %eax
cmpl $0x0, %eax
je 0x15174c
movq -0x10(%rbp), %rdi
leaq 0x7f7c0(%rip), %rsi     # 0x1d0efe
callq 0x172680
movl -0x14(%rbp), %eax
subl $0x2, %eax
movl %eax, -0x14(%rbp)
movl -0x14(%rbp), %eax
andl $0x4, %eax
cmpl $0x0, %eax
je 0x151770
movq -0x10(%rbp), %rdi
leaq 0x69111(%rip), %rsi     # 0x1ba873
callq 0x172680
movl -0x14(%rbp), %eax
subl $0x4, %eax
movl %eax, -0x14(%rbp)
movl -0x14(%rbp), %eax
andl $0x8, %eax
cmpl $0x0, %eax
je 0x151794
movq -0x10(%rbp), %rdi
leaq 0x584d5(%rip), %rsi     # 0x1a9c5b
callq 0x172680
movl -0x14(%rbp), %eax
subl $0x8, %eax
movl %eax, -0x14(%rbp)
movl -0x14(%rbp), %eax
andl $0x20, %eax
cmpl $0x0, %eax
je 0x1517b8
movq -0x10(%rbp), %rdi
leaq 0x7f766(%rip), %rsi     # 0x1d0f10
callq 0x172680
movl -0x14(%rbp), %eax
subl $0x20, %eax
movl %eax, -0x14(%rbp)
movl -0x14(%rbp), %eax
andl $0x40, %eax
cmpl $0x0, %eax
je 0x1517dc
movq -0x10(%rbp), %rdi
leaq 0x7f756(%rip), %rsi     # 0x1d0f24
callq 0x172680
movl -0x14(%rbp), %eax
subl $0x40, %eax
movl %eax, -0x14(%rbp)
jmp 0x1519d2
movq -0x8(%rbp), %rax
movzbl 0x18(%rax), %eax
cmpl $0x74, %eax
je 0x1517ff
movq -0x8(%rbp), %rax
movzbl 0x18(%rax), %eax
cmpl $0x7a, %eax
jne 0x1519d0
movl -0x14(%rbp), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x151823
movq -0x10(%rbp), %rdi
leaq 0x7f723(%rip), %rsi     # 0x1d0f38
callq 0x172680
movl -0x14(%rbp), %eax
subl $0x1, %eax
movl %eax, -0x14(%rbp)
movl -0x14(%rbp), %eax
andl $0x2, %eax
cmpl $0x0, %eax
je 0x151847
movq -0x10(%rbp), %rdi
leaq 0x7f717(%rip), %rsi     # 0x1d0f50
callq 0x172680
movl -0x14(%rbp), %eax
subl $0x2, %eax
movl %eax, -0x14(%rbp)
movl -0x14(%rbp), %eax
andl $0x4, %eax
cmpl $0x0, %eax
je 0x15186b
movq -0x10(%rbp), %rdi
leaq 0x7c5ea(%rip), %rsi     # 0x1cde47
callq 0x172680
movl -0x14(%rbp), %eax
subl $0x4, %eax
movl %eax, -0x14(%rbp)
movl -0x14(%rbp), %eax
andl $0x8, %eax
cmpl $0x0, %eax
je 0x15188f
movq -0x10(%rbp), %rdi
leaq 0x7f67d(%rip), %rsi     # 0x1d0efe
callq 0x172680
movl -0x14(%rbp), %eax
subl $0x8, %eax
movl %eax, -0x14(%rbp)
movl -0x14(%rbp), %eax
andl $0x10, %eax
cmpl $0x0, %eax
je 0x1518b3
movq -0x10(%rbp), %rdi
leaq 0x583b6(%rip), %rsi     # 0x1a9c5b
callq 0x172680
movl -0x14(%rbp), %eax
subl $0x10, %eax
movl %eax, -0x14(%rbp)
movl -0x14(%rbp), %eax
andl $0xe0, %eax
movl %eax, -0x18(%rbp)
movl -0x18(%rbp), %ecx
movl -0x14(%rbp), %eax
subl %ecx, %eax
movl %eax, -0x14(%rbp)
movl -0x18(%rbp), %eax
shrl $0x5, %eax
movl %eax, -0x18(%rbp)
cmpl $0x7, -0x18(%rbp)
jne 0x1518ea
movq -0x10(%rbp), %rdi
leaq 0x4e274(%rip), %rsi     # 0x19fb57
callq 0x172680
jmp 0x151906
movq -0x10(%rbp), %rdi
movl -0x18(%rbp), %ecx
movl $0x40, %edx
shll %cl, %edx
leaq 0x7f667(%rip), %rsi     # 0x1d0f66
movb $0x0, %al
callq 0x1726d0
movl -0x14(%rbp), %eax
andl $0x100, %eax            # imm = 0x100
cmpl $0x0, %eax
je 0x15192e
movq -0x10(%rbp), %rdi
leaq 0x655d6(%rip), %rsi     # 0x1b6ef4
callq 0x172680
movl -0x14(%rbp), %eax
subl $0x100, %eax            # imm = 0x100
movl %eax, -0x14(%rbp)
movl -0x14(%rbp), %eax
andl $0x200, %eax            # imm = 0x200
cmpl $0x0, %eax
je 0x151956
movq -0x10(%rbp), %rdi
leaq 0x7f629(%rip), %rsi     # 0x1d0f6f
callq 0x172680
movl -0x14(%rbp), %eax
subl $0x200, %eax            # imm = 0x200
movl %eax, -0x14(%rbp)
movl -0x14(%rbp), %eax
andl $0x400, %eax            # imm = 0x400
cmpl $0x0, %eax
je 0x15197e
movq -0x10(%rbp), %rdi
leaq 0x7f612(%rip), %rsi     # 0x1d0f80
callq 0x172680
movl -0x14(%rbp), %eax
subl $0x400, %eax            # imm = 0x400
movl %eax, -0x14(%rbp)
movl -0x14(%rbp), %eax
andl $0x800, %eax            # imm = 0x800
cmpl $0x0, %eax
je 0x1519a6
movq -0x10(%rbp), %rdi
leaq 0x7f5ef(%rip), %rsi     # 0x1d0f85
callq 0x172680
movl -0x14(%rbp), %eax
subl $0x800, %eax            # imm = 0x800
movl %eax, -0x14(%rbp)
movl -0x14(%rbp), %eax
andl $0x1000, %eax           # imm = 0x1000
cmpl $0x0, %eax
je 0x1519ce
movq -0x10(%rbp), %rdi
leaq 0x7f5d3(%rip), %rsi     # 0x1d0f91
callq 0x172680
movl -0x14(%rbp), %eax
subl $0x1000, %eax           # imm = 0x1000
movl %eax, -0x14(%rbp)
jmp 0x1519d0
jmp 0x1519d2
movl -0x14(%rbp), %eax
andl $0x4000, %eax           # imm = 0x4000
cmpl $0x0, %eax
je 0x1519fa
movq -0x10(%rbp), %rdi
leaq 0x7f5ba(%rip), %rsi     # 0x1d0fa4
callq 0x172680
movl -0x14(%rbp), %eax
subl $0x4000, %eax           # imm = 0x4000
movl %eax, -0x14(%rbp)
movl -0x14(%rbp), %eax
andl $0x8000, %eax           # imm = 0x8000
cmpl $0x0, %eax
je 0x151a22
movq -0x10(%rbp), %rdi
leaq 0x7f5a1(%rip), %rsi     # 0x1d0fb3
callq 0x172680
movl -0x14(%rbp), %eax
subl $0x8000, %eax           # imm = 0x8000
movl %eax, -0x14(%rbp)
cmpl $0x0, -0x14(%rbp)
je 0x151a3d
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %edx
leaq 0x5feac(%rip), %rsi     # 0x1b18e2
movb $0x0, %al
callq 0x1726d0
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)