// File: /workspace/github_cpp_makefile_star2_O3/night-shift[P]Srl/src/lib/PMsgPack.cpp
// Function: (anonymous namespace)::write_str(Srl::Lib::MemBlock const&, Srl::Lib::Out&)
void write_str(const MemBlock& block, Out& out)
    {
        if(block.size <= 0x1F) {
            out.write_byte(0xA0 | block.size);

        } else if(block.size <= 0xFE) {
            out.write_byte(0xD9);
            out.write_byte(block.size);

        } else if (block.size <= 0xFFFE) {
            uint16_t sz = block.size;
            out.write_byte(0xDA);
            out.write(sz);

        } else {
            uint32_t sz = block.size;
            out.write_byte(0xDB);
            out.write(sz);
        }

        out.write(block.ptr, block.size);
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movq 0x8(%rdi), %r15
cmpq $0x1f, %r15
ja 0x17f2e
incq 0x50(%rbx)
orb $-0x60, %r15b
cmpb $0x0, 0x80(%rbx)
je 0x17f7d
cmpq $0x0, 0x58(%rbx)
jne 0x17f08
movq %rbx, %rdi
callq 0xb460
cmpq $0x0, 0x60(%rbx)
jne 0x17f1c
movl $0x1, %esi
movq %rbx, %rdi
callq 0xbc90
decq 0x58(%rbx)
movq 0x70(%rbx), %rax
leaq 0x1(%rax), %rcx
movq %rcx, 0x70(%rbx)
jmp 0x17f8a
cmpq $0xfe, %r15
ja 0x17f92
incq 0x50(%rbx)
cmpb $0x0, 0x80(%rbx)
je 0x17fee
cmpq $0x0, 0x58(%rbx)
jne 0x17f57
movq %rbx, %rdi
callq 0xb460
cmpq $0x0, 0x60(%rbx)
jne 0x17f6b
movl $0x1, %esi
movq %rbx, %rdi
callq 0xbc90
decq 0x58(%rbx)
movq 0x70(%rbx), %rax
leaq 0x1(%rax), %rcx
movq %rcx, 0x70(%rbx)
jmp 0x17ffb
movl $0x1, %esi
movq %rbx, %rdi
callq 0xb4f0
movb %r15b, (%rax)
jmp 0x180d9
cmpq $0xfffe, %r15           # imm = 0xFFFE
ja 0x18044
movw %r15w, 0x2(%rsp)
incq 0x50(%rbx)
cmpb $0x0, 0x80(%rbx)
je 0x1809d
cmpq $0x0, 0x58(%rbx)
jne 0x17fc5
movq %rbx, %rdi
callq 0xb460
cmpq $0x0, 0x60(%rbx)
jne 0x17fd9
movl $0x1, %esi
movq %rbx, %rdi
callq 0xbc90
decq 0x58(%rbx)
movq 0x70(%rbx), %rax
leaq 0x1(%rax), %rcx
movq %rcx, 0x70(%rbx)
jmp 0x180aa
movl $0x1, %esi
movq %rbx, %rdi
callq 0xb4f0
movb $-0x27, (%rax)
movb 0x8(%r14), %bpl
incq 0x50(%rbx)
cmpb $0x0, 0x80(%rbx)
je 0x1808b
cmpq $0x0, 0x58(%rbx)
jne 0x1801e
movq %rbx, %rdi
callq 0xb460
cmpq $0x0, 0x60(%rbx)
jne 0x18032
movl $0x1, %esi
movq %rbx, %rdi
callq 0xbc90
decq 0x58(%rbx)
movq 0x70(%rbx), %rax
leaq 0x1(%rax), %rcx
movq %rcx, 0x70(%rbx)
jmp 0x18098
movl %r15d, 0x4(%rsp)
incq 0x50(%rbx)
cmpb $0x0, 0x80(%rbx)
je 0x180bc
cmpq $0x0, 0x58(%rbx)
jne 0x18065
movq %rbx, %rdi
callq 0xb460
cmpq $0x0, 0x60(%rbx)
jne 0x18079
movl $0x1, %esi
movq %rbx, %rdi
callq 0xbc90
decq 0x58(%rbx)
movq 0x70(%rbx), %rax
leaq 0x1(%rax), %rcx
movq %rcx, 0x70(%rbx)
jmp 0x180c9
movl $0x1, %esi
movq %rbx, %rdi
callq 0xb4f0
movb %bpl, (%rax)
jmp 0x180d9
movl $0x1, %esi
movq %rbx, %rdi
callq 0xb4f0
movb $-0x26, (%rax)
leaq 0x2(%rsp), %rsi
movq %rbx, %rdi
callq 0xb4d0
jmp 0x180d9
movl $0x1, %esi
movq %rbx, %rdi
callq 0xb4f0
movb $-0x25, (%rax)
leaq 0x4(%rsp), %rsi
movq %rbx, %rdi
callq 0xb0a0
movq (%r14), %r15
movq 0x8(%r14), %r14
addq %r14, 0x50(%rbx)
cmpb $0x0, 0x80(%rbx)
je 0x1811e
cmpq %r14, 0x58(%rbx)
jae 0x180fb
movq %rbx, %rdi
callq 0xb460
cmpq %r14, 0x60(%rbx)
jae 0x1810c
movq %rbx, %rdi
movq %r14, %rsi
callq 0xbc90
subq %r14, 0x58(%rbx)
movq 0x70(%rbx), %rax
leaq (%rax,%r14), %rcx
movq %rcx, 0x70(%rbx)
jmp 0x18129
movq %rbx, %rdi
movq %r14, %rsi
callq 0xb4f0
cmpq $0x1, %r14
jne 0x18136
movb (%r15), %cl
movb %cl, (%rax)
jmp 0x18144
movq %rax, %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0xb790
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nop