// File: ksherlock[P]wdc-utils/zrdz_disassembler.cpp
// Function: zrdz_disassembler::print_section(zrdz_disassembler::entry const&)
void zrdz_disassembler::print_section(const entry &e) {
	std::string attr;
	bool comma = false;


	if (e.processed || e.number < 5) {
		emit("", e.name);
		return;
	}

	if (e.flags & SEC_OFFSET) {
		if (comma) attr += ", ";
		attr += "SEC_OFFSET $";
		attr += to_x(e.org, 4);
		comma = true;
	}
	if (e.flags & SEC_INDIRECT) {
		if (comma) attr += ", ";
		attr += "SEC_INDIRECT $";
		attr += to_x(e.org, 4);
		comma = true;
	}
#define _(x) if (e.flags & x) { if (comma) attr += ", "; attr += #x; comma = true; }
	_(SEC_STACKED)
	_(SEC_REF_ONLY)
	_(SEC_CONST)
	_(SEC_DIRECT)
	_(SEC_NONAME)
	_(SEC_DATA)
#undef _

	emit(e.name, "section", attr);
	putchar('\n');
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xf0, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
leaq -0x30(%rbp), %rdi
callq 0x3380
movb $0x0, -0x31(%rbp)
movq -0x10(%rbp), %rax
testb $0x1, 0x2c(%rax)
jne 0x12a9b
movq -0x10(%rbp), %rax
movzbl 0x20(%rax), %eax
cmpl $0x5, %eax
jge 0x12b22
leaq -0x59(%rbp), %rdi
movq %rdi, -0xe0(%rbp)
callq 0x3460
movq -0xe0(%rbp), %rdx
leaq 0x88bb(%rip), %rsi      # 0x1b374
leaq -0x58(%rbp), %rdi
callq 0x8060
jmp 0x12ac4
movq -0x10(%rbp), %rsi
leaq -0x58(%rbp), %rdi
callq 0xcd80
jmp 0x12ad3
leaq -0x58(%rbp), %rdi
callq 0x3160
leaq -0x59(%rbp), %rdi
callq 0x32b0
movl $0x1, -0x70(%rbp)
jmp 0x12e6d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
jmp 0x12b14
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
leaq -0x58(%rbp), %rdi
callq 0x3160
leaq -0x59(%rbp), %rdi
callq 0x32b0
jmp 0x12eb1
movq -0x10(%rbp), %rax
movzbl 0x21(%rax), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x12bd0
testb $0x1, -0x31(%rbp)
je 0x12b61
leaq 0x86ff(%rip), %rsi      # 0x1b242
leaq -0x30(%rbp), %rdi
callq 0x3260
jmp 0x12b4e
jmp 0x12b61
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
jmp 0x12eb1
leaq 0x91d6(%rip), %rsi      # 0x1bd3e
leaq -0x30(%rbp), %rdi
callq 0x3260
jmp 0x12b73
movq -0x10(%rbp), %rax
movl 0x28(%rax), %esi
leaq -0x90(%rbp), %rdi
movl $0x4, %edx
xorl %ecx, %ecx
callq 0xcb90
jmp 0x12b8f
leaq -0x30(%rbp), %rdi
leaq -0x90(%rbp), %rsi
callq 0x3340
jmp 0x12ba1
leaq -0x90(%rbp), %rdi
callq 0x3160
movb $0x1, -0x31(%rbp)
jmp 0x12bd0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
leaq -0x90(%rbp), %rdi
callq 0x3160
jmp 0x12eb1
movq -0x10(%rbp), %rax
movzbl 0x21(%rax), %eax
andl $0x2, %eax
cmpl $0x0, %eax
je 0x12c6d
testb $0x1, -0x31(%rbp)
je 0x12bfe
leaq 0x8651(%rip), %rsi      # 0x1b242
leaq -0x30(%rbp), %rdi
callq 0x3260
jmp 0x12bfc
jmp 0x12bfe
leaq 0x9146(%rip), %rsi      # 0x1bd4b
leaq -0x30(%rbp), %rdi
callq 0x3260
jmp 0x12c10
movq -0x10(%rbp), %rax
movl 0x28(%rax), %esi
leaq -0xb0(%rbp), %rdi
movl $0x4, %edx
xorl %ecx, %ecx
callq 0xcb90
jmp 0x12c2c
leaq -0x30(%rbp), %rdi
leaq -0xb0(%rbp), %rsi
callq 0x3340
jmp 0x12c3e
leaq -0xb0(%rbp), %rdi
callq 0x3160
movb $0x1, -0x31(%rbp)
jmp 0x12c6d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
leaq -0xb0(%rbp), %rdi
callq 0x3160
jmp 0x12eb1
movq -0x10(%rbp), %rax
movzbl 0x21(%rax), %eax
andl $0x4, %eax
cmpl $0x0, %eax
je 0x12cad
testb $0x1, -0x31(%rbp)
je 0x12c97
leaq 0x85b8(%rip), %rsi      # 0x1b242
leaq -0x30(%rbp), %rdi
callq 0x3260
jmp 0x12c95
jmp 0x12c97
leaq 0x90bc(%rip), %rsi      # 0x1bd5a
leaq -0x30(%rbp), %rdi
callq 0x3260
jmp 0x12ca9
movb $0x1, -0x31(%rbp)
movq -0x10(%rbp), %rax
movzbl 0x21(%rax), %eax
andl $0x8, %eax
cmpl $0x0, %eax
je 0x12ced
testb $0x1, -0x31(%rbp)
je 0x12cd7
leaq 0x8578(%rip), %rsi      # 0x1b242
leaq -0x30(%rbp), %rdi
callq 0x3260
jmp 0x12cd5
jmp 0x12cd7
leaq 0x9088(%rip), %rsi      # 0x1bd66
leaq -0x30(%rbp), %rdi
callq 0x3260
jmp 0x12ce9
movb $0x1, -0x31(%rbp)
movq -0x10(%rbp), %rax
movzbl 0x21(%rax), %eax
andl $0x10, %eax
cmpl $0x0, %eax
je 0x12d2d
testb $0x1, -0x31(%rbp)
je 0x12d17
leaq 0x8538(%rip), %rsi      # 0x1b242
leaq -0x30(%rbp), %rdi
callq 0x3260
jmp 0x12d15
jmp 0x12d17
leaq 0x9055(%rip), %rsi      # 0x1bd73
leaq -0x30(%rbp), %rdi
callq 0x3260
jmp 0x12d29
movb $0x1, -0x31(%rbp)
movq -0x10(%rbp), %rax
movzbl 0x21(%rax), %eax
andl $0x20, %eax
cmpl $0x0, %eax
je 0x12d6d
testb $0x1, -0x31(%rbp)
je 0x12d57
leaq 0x84f8(%rip), %rsi      # 0x1b242
leaq -0x30(%rbp), %rdi
callq 0x3260
jmp 0x12d55
jmp 0x12d57
leaq 0x901f(%rip), %rsi      # 0x1bd7d
leaq -0x30(%rbp), %rdi
callq 0x3260
jmp 0x12d69
movb $0x1, -0x31(%rbp)
movq -0x10(%rbp), %rax
movzbl 0x21(%rax), %eax
andl $0x40, %eax
cmpl $0x0, %eax
je 0x12dad
testb $0x1, -0x31(%rbp)
je 0x12d97
leaq 0x84b8(%rip), %rsi      # 0x1b242
leaq -0x30(%rbp), %rdi
callq 0x3260
jmp 0x12d95
jmp 0x12d97
leaq 0x8fea(%rip), %rsi      # 0x1bd88
leaq -0x30(%rbp), %rdi
callq 0x3260
jmp 0x12da9
movb $0x1, -0x31(%rbp)
movq -0x10(%rbp), %rax
movzbl 0x21(%rax), %eax
andl $0x80, %eax
cmpl $0x0, %eax
je 0x12def
testb $0x1, -0x31(%rbp)
je 0x12dd9
leaq 0x8476(%rip), %rsi      # 0x1b242
leaq -0x30(%rbp), %rdi
callq 0x3260
jmp 0x12dd7
jmp 0x12dd9
leaq 0x8fb3(%rip), %rsi      # 0x1bd93
leaq -0x30(%rbp), %rdi
callq 0x3260
jmp 0x12deb
movb $0x1, -0x31(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0xf0(%rbp)
leaq -0xd1(%rbp), %rdi
movq %rdi, -0xe8(%rbp)
callq 0x3460
movq -0xe8(%rbp), %rdx
leaq 0x8f81(%rip), %rsi      # 0x1bd9c
leaq -0xd0(%rbp), %rdi
callq 0x8060
jmp 0x12e29
movq -0xf0(%rbp), %rdi
leaq -0xd0(%rbp), %rsi
leaq -0x30(%rbp), %rdx
callq 0xce40
jmp 0x12e42
leaq -0xd0(%rbp), %rdi
callq 0x3160
leaq -0xd1(%rbp), %rdi
callq 0x32b0
movl $0xa, %edi
callq 0x3390
jmp 0x12e66
movl $0x0, -0x70(%rbp)
leaq -0x30(%rbp), %rdi
callq 0x3160
addq $0xf0, %rsp
popq %rbp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
jmp 0x12ea5
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
leaq -0xd0(%rbp), %rdi
callq 0x3160
leaq -0xd1(%rbp), %rdi
callq 0x32b0
leaq -0x30(%rbp), %rdi
callq 0x3160
movq -0x68(%rbp), %rdi
callq 0x3440
nopw %cs:(%rax,%rax)