// File: night-shift[P]Srl/include/Srl/In.hpp
// Function: unsigned long Srl::Lib::In::substitute_token<char, std::array<char const, 2ul>, char, std::array<char const, 2ul>, char, std::array<char const, 2ul>, char, std::array<char const, 2ul>, char, std::array<char const, 2ul>, char, std::array<char const, 2ul>, char, std::array<char const, 2ul>, char, std::array<char const, 2ul>, char, std::array<char const, 2ul>, std::function<unsigned long (Srl::Lib::In&, std::vector<unsigned char, std::allocator<unsigned char>>&, unsigned long)>, std::array<char const, 2ul>>(std::vector<unsigned char, std::allocator<unsigned char>>&, unsigned long, unsigned long, char const&, std::array<char const, 2ul> const&, char const&, std::array<char const, 2ul> const&, char const&, std::array<char const, 2ul> const&, char const&, std::array<char const, 2ul> const&, char const&, std::array<char const, 2ul> const&, char const&, std::array<char const, 2ul> const&, char const&, std::array<char const, 2ul> const&, char const&, std::array<char const, 2ul> const&, char const&, std::array<char const, 2ul> const&, std::function<unsigned long (Srl::Lib::In&, std::vector<unsigned char, std::allocator<unsigned char>>&, unsigned long)> const&, std::array<char const, 2ul> const&)
size_t In::substitute_token(std::vector<uint8_t>& buf, size_t idx, size_t left,
                                const Sub& sub, const Token& token, const Tail&... tail)
    {
        const auto N = std::tuple_size<Token>::value;

        return left >= N && Aux::comp<N>(this->pos, token.data())
                ? this->replace<Sub, N>(sub, buf, idx)
                : this->substitute_token(buf, idx, left, tail...);
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x118, %rsp            # imm = 0x118
movq 0x98(%rbp), %rax
movq 0x90(%rbp), %rax
movq 0x88(%rbp), %rax
movq 0x80(%rbp), %rax
movq 0x78(%rbp), %rax
movq 0x70(%rbp), %rax
movq 0x68(%rbp), %rax
movq 0x60(%rbp), %rax
movq 0x58(%rbp), %rax
movq 0x50(%rbp), %rax
movq 0x48(%rbp), %rax
movq 0x40(%rbp), %rax
movq 0x38(%rbp), %rax
movq 0x30(%rbp), %rax
movq 0x28(%rbp), %rax
movq 0x20(%rbp), %rax
movq 0x18(%rbp), %rax
movq 0x10(%rbp), %rax
movq %rdi, -0x30(%rbp)
movq %rsi, -0x38(%rbp)
movq %rdx, -0x40(%rbp)
movq %rcx, -0x48(%rbp)
movq %r8, -0x50(%rbp)
movq %r9, -0x58(%rbp)
movq -0x30(%rbp), %rax
movq %rax, -0x68(%rbp)
movq $0x2, -0x60(%rbp)
cmpq $0x2, -0x48(%rbp)
jb 0x5515c
movq -0x68(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x70(%rbp)
movq -0x58(%rbp), %rdi
callq 0x35380
movq -0x70(%rbp), %rdi
movq %rax, %rsi
callq 0x359b0
testb $0x1, %al
jne 0x5513e
jmp 0x5515c
movq -0x68(%rbp), %rdi
movq -0x50(%rbp), %rsi
movq -0x38(%rbp), %rdx
movq -0x40(%rbp), %rcx
callq 0x37cf0
movq %rax, -0x78(%rbp)
jmp 0x55282
movq -0x38(%rbp), %rsi
movq -0x40(%rbp), %rdx
movq -0x48(%rbp), %rcx
movq 0x10(%rbp), %r8
movq 0x18(%rbp), %r9
movq 0x20(%rbp), %rax
movq 0x28(%rbp), %rdi
movq %rdi, -0xb8(%rbp)
movq 0x30(%rbp), %rdi
movq %rdi, -0xb0(%rbp)
movq 0x38(%rbp), %rdi
movq %rdi, -0xa8(%rbp)
movq 0x40(%rbp), %rdi
movq %rdi, -0xa0(%rbp)
movq 0x48(%rbp), %rdi
movq %rdi, -0x98(%rbp)
movq 0x50(%rbp), %rdi
movq %rdi, -0x90(%rbp)
movq 0x58(%rbp), %rdi
movq %rdi, -0x88(%rbp)
movq 0x60(%rbp), %r13
movq 0x68(%rbp), %r12
movq 0x70(%rbp), %r15
movq 0x78(%rbp), %r14
movq 0x80(%rbp), %rbx
movq 0x88(%rbp), %r11
movq 0x90(%rbp), %r10
movq 0x98(%rbp), %rdi
movq %rdi, -0x80(%rbp)
movq -0x68(%rbp), %rdi
movq %rax, (%rsp)
movq -0xb8(%rbp), %rax
movq %rax, 0x8(%rsp)
movq -0xb0(%rbp), %rax
movq %rax, 0x10(%rsp)
movq -0xa8(%rbp), %rax
movq %rax, 0x18(%rsp)
movq -0xa0(%rbp), %rax
movq %rax, 0x20(%rsp)
movq -0x98(%rbp), %rax
movq %rax, 0x28(%rsp)
movq -0x90(%rbp), %rax
movq %rax, 0x30(%rsp)
movq -0x88(%rbp), %rax
movq %rax, 0x38(%rsp)
movq -0x80(%rbp), %rax
movq %r13, 0x40(%rsp)
movq %r12, 0x48(%rsp)
movq %r15, 0x50(%rsp)
movq %r14, 0x58(%rsp)
movq %rbx, 0x60(%rsp)
movq %r11, 0x68(%rsp)
movq %r10, 0x70(%rsp)
movq %rax, 0x78(%rsp)
callq 0x34a70
movq %rax, -0x78(%rbp)
movq -0x78(%rbp), %rax
addq $0x118, %rsp            # imm = 0x118
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nopl (%rax,%rax)