// File: /workspace/github_cpp_makefile_star2_O3/fulhax[P]ncpamixer/src/config.cpp
// Function: Config::getKeycodeName[abi:cxx11](char const*)
std::string Config::getKeycodeName(const char *keycode)
{
    if (keycode == nullptr) return {};
    if (keycode[0] == 0) return {};
    if (memcmp(keycode, KEY, KEY_SIZE) != 0) return {};
    if (strlen(keycode) < KEY_SIZE + 2) return {};
    const auto key_val{keycode + KEY_SIZE + 1};
    const auto is_vt100{key_val[0] == 'f' && key_val[1] == '.'};
    int k{0};
    try { k = std::stoi((is_vt100) ? key_val + 2 : key_val); }
    catch (const std::exception&) { return{}; }
    if (is_vt100) return { "VT100_F" + std::to_string(k - 79) };
    return {keyname(k)};
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rdi, %rbx
testq %rsi, %rsi
je 0x99d1
movq %rsi, %r14
cmpb $0x0, (%rsi)
je 0x99d1
movl $0x6379656b, %eax       # imm = 0x6379656B
xorl (%r14), %eax
movl $0x65646f63, %ecx       # imm = 0x65646F63
xorl 0x3(%r14), %ecx
orl %eax, %ecx
jne 0x99d1
movq %r14, %rdi
callq 0x62b0
cmpq $0x8, %rax
ja 0x99f6
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
movq $0x0, 0x8(%rbx)
movb $0x0, 0x10(%rbx)
movq %rbx, %rax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x8(%r14), %r15
cmpb $0x66, 0x8(%r14)
jne 0x9a14
cmpb $0x2e, 0x9(%r14)
leaq 0xa(%r14), %rax
sete %bpl
cmoveq %rax, %r15
jmp 0x9a16
xorl %ebp, %ebp
leaq 0x20(%rsp), %rax
movq %rax, -0x10(%rax)
movq %r15, %rdi
callq 0x62b0
leaq (%rax,%r15), %rdx
leaq 0x10(%rsp), %rdi
movq %r15, %rsi
callq 0x73f0
movq 0x10(%rsp), %r12
callq 0x6060
movq %rax, %r15
movl (%rax), %eax
movl %eax, 0xc(%rsp)
movl $0x0, (%r15)
leaq 0x30(%rsp), %r13
movq %r12, %rdi
movq %r13, %rsi
movl $0xa, %edx
callq 0x6800
cmpq %r12, (%r13)
je 0x9bdd
movq %rax, %r14
movslq %r14d, %rax
cmpq %r14, %rax
jne 0x9be9
movl (%r15), %eax
cmpl $0x22, %eax
je 0x9be9
testl %eax, %eax
leaq 0x20(%rsp), %r13
jne 0x9a9c
movl 0xc(%rsp), %eax
movl %eax, (%r15)
movq 0x10(%rsp), %rdi
cmpq %r13, %rdi
je 0x9ab3
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x65c0
testb %bpl, %bpl
je 0x9b10
addl $-0x4f, %r14d
movl %r14d, %ebp
negl %ebp
cmovsl %r14d, %ebp
movl $0x1, %r15d
cmpl $0xa, %ebp
jb 0x9b36
movl $0x4, %r15d
movl $0xd1b71759, %eax       # imm = 0xD1B71759
movl %ebp, %ecx
cmpl $0x63, %ecx
jbe 0x9b2d
cmpl $0x3e7, %ecx            # imm = 0x3E7
jbe 0x9b33
cmpl $0x2710, %ecx           # imm = 0x2710
jb 0x9b36
movl %ecx, %edx
imulq %rax, %rdx
shrq $0x2d, %rdx
addl $0x4, %r15d
cmpl $0x1869f, %ecx          # imm = 0x1869F
movl %edx, %ecx
ja 0x9add
addl $-0x3, %r15d
jmp 0x9b36
movl %r14d, %edi
callq 0x6820
leaq 0x10(%rsp), %rdx
movq %rbx, %rdi
movq %rax, %rsi
callq 0xa8ae
jmp 0x99e4
addl $-0x2, %r15d
jmp 0x9b36
decl %r15d
shrl $0x1f, %r14d
leal (%r15,%r14), %esi
leaq 0x10(%rsp), %r12
movq %r13, (%r12)
movq %r12, %rdi
movl $0x2d, %edx
callq 0x66b0
addq (%r12), %r14
movq %r14, %rdi
movl %r15d, %esi
movl %ebp, %edx
callq 0xaba1
leaq 0x786c(%rip), %rcx      # 0x113d8
movl $0x7, %r8d
movq %r12, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x6660
leaq 0x10(%rbx), %rdx
movq %rdx, (%rbx)
movq (%rax), %rsi
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rsi
je 0x9ba0
movq %rsi, (%rbx)
movq (%rcx), %rdx
movq %rdx, 0x10(%rbx)
jmp 0x9ba6
movups (%rcx), %xmm0
movups %xmm0, (%rdx)
movq 0x8(%rax), %rdx
movq %rdx, 0x8(%rbx)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq 0x10(%rsp), %rdi
cmpq %r13, %rdi
je 0x99e4
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x65c0
jmp 0x99e4
leaq 0x898e(%rip), %rdi      # 0x12572
callq 0x63c0
leaq 0x8982(%rip), %rdi      # 0x12572
callq 0x6850
movq %rax, %r14
movq 0x10(%rsp), %rdi
cmpq %r13, %rdi
je 0x9c0f
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x65c0
movq %r14, %rdi
callq 0x6a80
movq %rdx, %r12
movq %rax, %r14
jmp 0x9c4e
movq %rdx, %r12
movq %rax, %r14
cmpl $0x0, (%r15)
jne 0x9c32
movl 0xc(%rsp), %eax
movl %eax, (%r15)
movq 0x10(%rsp), %rdi
leaq 0x20(%rsp), %rax
cmpq %rax, %rdi
je 0x9c4e
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x65c0
cmpl $0x1, %r12d
jne 0x9c0f
movq %r14, %rdi
callq 0x6290
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
movq $0x0, 0x8(%rbx)
movb $0x0, 0x10(%rbx)
callq 0x69b0
jmp 0x99e4
nop