// File: /workspace/github_cpp_makefile_star2_O1/ksherlock[P]wdc-utils/zrdz_disassembler.cpp
// Function: zrdz_disassembler::section_name[abi:cxx11](unsigned int) const
std::string zrdz_disassembler::section_name(unsigned section) const {

	std::string defname = std::string("section") + std::to_string(section);

	if (section >= _sections.size()) {
		warnx("Invalid section %d", section);
		return defname;
	}
	auto &e = _sections[section];
	if (!e.valid) {
		warnx("Invalid section %d", section);
		return defname;
	}

	return e.name;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x60, %rsp
movl %edx, %ebp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x50(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x4480(%rip), %rsi      # 0xfdd0
leaq 0x4480(%rip), %rdx      # 0xfdd7
leaq 0x40(%rsp), %rdi
callq 0x6b90
movl $0x1, %eax
cmpl $0xa, %ebp
jb 0xb9af
movl $0x4, %eax
movl $0xd1b71759, %ecx       # imm = 0xD1B71759
movl %ebp, %edx
cmpl $0x63, %edx
jbe 0xb9a8
cmpl $0x3e7, %edx            # imm = 0x3E7
jbe 0xb9ad
cmpl $0x2710, %edx           # imm = 0x2710
jb 0xb9af
movl %edx, %esi
imulq %rcx, %rsi
shrq $0x2d, %rsi
addl $0x4, %eax
cmpl $0x1869f, %edx          # imm = 0x1869F
movl %esi, %edx
ja 0xb977
addl $-0x3, %eax
jmp 0xb9af
addl $-0x2, %eax
jmp 0xb9af
decl %eax
movl %eax, %esi
leaq 0x30(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0x20(%rsp), %rdi
xorl %edx, %edx
callq 0x2200
movq 0x20(%rsp), %rdi
movl 0x28(%rsp), %esi
movl %ebp, %edx
callq 0x6a93
movq 0x40(%rsp), %rcx
movq 0x48(%rsp), %r8
movq 0x28(%rsp), %rdx
leaq (%rdx,%r8), %rax
movl $0xf, %esi
cmpq %r15, %rcx
je 0xb9f9
movq 0x50(%rsp), %rsi
cmpq %rsi, %rax
jbe 0xba14
movl $0xf, %esi
cmpq %r12, 0x20(%rsp)
je 0xba0f
movq 0x30(%rsp), %rsi
cmpq %rsi, %rax
jbe 0xba25
movq 0x20(%rsp), %rsi
leaq 0x40(%rsp), %rdi
callq 0x2090
jmp 0xba33
leaq 0x20(%rsp), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x21f0
leaq 0x10(%rsp), %rdx
movq %rdx, -0x10(%rdx)
movq (%rax), %rsi
leaq 0x10(%rax), %rcx
cmpq %rcx, %rsi
je 0xba56
movq %rsi, (%rsp)
movq (%rcx), %rdx
movq %rdx, 0x10(%rsp)
jmp 0xba5c
movups (%rcx), %xmm0
movups %xmm0, (%rdx)
movq %rax, %rdx
addq $0x8, %rdx
movq 0x8(%rax), %rsi
movq %rsi, 0x8(%rsp)
movq %rcx, (%rax)
movq $0x0, (%rdx)
movb $0x0, (%rcx)
movq 0x20(%rsp), %rdi
cmpq %r12, %rdi
je 0xba90
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x21c0
movq 0x40(%rsp), %rdi
cmpq %r15, %rdi
je 0xbaa7
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x21c0
movl %ebp, %ecx
movq 0x50(%r14), %rax
movq 0x58(%r14), %rdx
subq %rax, %rdx
sarq $0x4, %rdx
movabsq $-0x3333333333333333, %rsi # imm = 0xCCCCCCCCCCCCCCCD
imulq %rdx, %rsi
cmpq %rcx, %rsi
jbe 0xbaf8
leaq (%rcx,%rcx,4), %rcx
shlq $0x4, %rcx
cmpb $0x0, 0x2d(%rax,%rcx)
je 0xbb0a
addq %rcx, %rax
leaq 0x10(%rbx), %rcx
movq %rcx, (%rbx)
movq (%rax), %rsi
movq 0x8(%rax), %rdx
addq %rsi, %rdx
movq %rbx, %rdi
callq 0x6b00
jmp 0xbb5e
leaq 0x42d9(%rip), %rdi      # 0xfdd8
movl %ebp, %esi
xorl %eax, %eax
callq 0x21d0
jmp 0xbb1a
leaq 0x42c7(%rip), %rdi      # 0xfdd8
movl %ebp, %esi
xorl %eax, %eax
callq 0x21d0
leaq 0x10(%rbx), %rcx
movq %rcx, (%rbx)
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdx
cmpq %rax, %rdx
je 0xbb3d
movq %rdx, (%rbx)
movq 0x10(%rsp), %rcx
movq %rcx, 0x10(%rbx)
jmp 0xbb43
movups (%rax), %xmm0
movups %xmm0, (%rcx)
movq 0x8(%rsp), %rcx
movq %rcx, 0x8(%rbx)
movq %rax, (%rsp)
movq $0x0, 0x8(%rsp)
movb $0x0, 0x10(%rsp)
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xbb79
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x21c0
movq %rbx, %rax
addq $0x60, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
jmp 0xbb8b
movq %rax, %rbx
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xbbde
movq 0x10(%rsp), %rsi
jmp 0xbbd1
movq %rax, %rbx
movq 0x20(%rsp), %rdi
cmpq %r12, %rdi
je 0xbbc2
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x21c0
jmp 0xbbc2
movq %rax, %rbx
movq 0x40(%rsp), %rdi
cmpq %r15, %rdi
je 0xbbde
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x21c0
jmp 0xbbde
movq %rax, %rbx
movq %rbx, %rdi
callq 0x22c0