// File: /workspace/github_cpp_makefile_star2_O3/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 0x4646(%rip), %rsi      # 0xfdd0
leaq 0x4646(%rip), %rdx      # 0xfdd7
leaq 0x40(%rsp), %rdi
callq 0x6a64
movl $0x1, %eax
cmpl $0xa, %ebp
jb 0xb7e9
movl $0x4, %eax
movl $0xd1b71759, %ecx       # imm = 0xD1B71759
movl %ebp, %edx
cmpl $0x63, %edx
jbe 0xb7e2
cmpl $0x3e7, %edx            # imm = 0x3E7
jbe 0xb7e7
cmpl $0x2710, %edx           # imm = 0x2710
jb 0xb7e9
movl %edx, %esi
imulq %rcx, %rsi
shrq $0x2d, %rsi
addl $0x4, %eax
cmpl $0x1869f, %edx          # imm = 0x1869F
movl %esi, %edx
ja 0xb7b1
addl $-0x3, %eax
jmp 0xb7e9
addl $-0x2, %eax
jmp 0xb7e9
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 0x6961
movq 0x40(%rsp), %rcx
movq 0x48(%rsp), %r8
movq 0x28(%rsp), %rdx
leaq (%rdx,%r8), %rax
movl $0xf, %edi
cmpq %r15, %rcx
je 0xb833
movq 0x50(%rsp), %rdi
movq 0x20(%rsp), %rsi
cmpq %rdi, %rax
jbe 0xb851
movl $0xf, %edi
cmpq %r12, %rsi
je 0xb84c
movq 0x30(%rsp), %rdi
cmpq %rdi, %rax
jbe 0xb85d
leaq 0x40(%rsp), %rdi
callq 0x2090
jmp 0xb86b
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 0xb88e
movq %rsi, (%rsp)
movq (%rcx), %rdx
movq %rdx, 0x10(%rsp)
jmp 0xb894
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 0xb8c8
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x21c0
movq 0x40(%rsp), %rdi
cmpq %r15, %rdi
je 0xb8df
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 0xb94b
leaq (%rcx,%rcx,4), %rcx
shlq $0x4, %rcx
cmpb $0x0, 0x2d(%rax,%rcx)
je 0xb95d
addq %rcx, %rax
leaq 0x10(%rbx), %rcx
movq %rcx, (%rbx)
movq (%rax), %rsi
movq 0x8(%rax), %rdx
addq %rsi, %rdx
movq %rbx, %rdi
callq 0x69ce
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xb99f
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x21c0
jmp 0xb99f
leaq 0x4486(%rip), %rdi      # 0xfdd8
movl %ebp, %esi
xorl %eax, %eax
callq 0x21d0
jmp 0xb96d
leaq 0x4474(%rip), %rdi      # 0xfdd8
movl %ebp, %esi
xorl %eax, %eax
callq 0x21d0
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
leaq 0x10(%rsp), %rcx
movq -0x10(%rcx), %rdx
cmpq %rcx, %rdx
je 0xb990
movq %rdx, (%rbx)
movq 0x10(%rsp), %rax
movq %rax, 0x10(%rbx)
jmp 0xb996
movups (%rcx), %xmm0
movups %xmm0, (%rax)
movq 0x8(%rsp), %rax
movq %rax, 0x8(%rbx)
movq %rbx, %rax
addq $0x60, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
jmp 0xb9b1
movq %rax, %rbx
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xba04
movq 0x10(%rsp), %rsi
jmp 0xb9f7
movq %rax, %rbx
movq 0x20(%rsp), %rdi
cmpq %r12, %rdi
je 0xb9e8
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x21c0
jmp 0xb9e8
movq %rax, %rbx
movq 0x40(%rsp), %rdi
cmpq %r15, %rdi
je 0xba04
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x21c0
jmp 0xba04
movq %rax, %rbx
movq %rbx, %rdi
callq 0x22c0