// File: /workspace/github_cpp_makefile_star2_O2/MisakiFx[P]P2PDownload/./httplib.h
// Function: httplib::detail::encode_url(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
inline std::string encode_url(const std::string &s) {
            std::string result;

            for (auto i = 0; s[i]; i++) {
                switch (s[i]) {
                    case ' ': result += "%20"; break;
                    case '+': result += "%2B"; break;
                    case '\r': result += "%0D"; break;
                    case '\n': result += "%0A"; break;
                    case '\'': result += "%27"; break;
                    case ',': result += "%2C"; break;
                    case ':': result += "%3A"; break;
                    case ';': result += "%3B"; break;
                    default:
                              auto c = static_cast<uint8_t>(s[i]);
                              if (c >= 0x80) {
                                  result += '%';
                                  char hex[4];
                                  size_t len = snprintf(hex, sizeof(hex) - 1, "%02X", c);
                                  assert(len == 2);
                                  result.append(hex, len);
                              } else {
                                  result += s[i];
                              }
                              break;
                }
            }

            return result;
        }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x10(%rdi), %rax
movq %rax, (%rdi)
andq $0x0, 0x8(%rdi)
movq %rsi, %r14
movb $0x0, 0x10(%rdi)
xorl %r13d, %r13d
movq (%r14), %rax
movzbl (%rax,%r13), %r15d
cmpl $0xa, %r15d
je 0x227ad
cmpl $0xd, %r15d
je 0x22789
cmpl $0x20, %r15d
je 0x227a4
cmpl $0x27, %r15d
je 0x2279b
leaq 0x2d3a(%rip), %rsi      # 0x2547d
cmpl $0x2b, %r15d
je 0x227b4
cmpl $0x2c, %r15d
je 0x22780
cmpl $0x3a, %r15d
je 0x22777
cmpl $0x3b, %r15d
je 0x22792
testl %r15d, %r15d
je 0x227ff
testb %r15b, %r15b
js 0x227c4
movsbl %r15b, %esi
movq %rbx, %rdi
callq 0x8480
jmp 0x227bc
leaq 0x2d13(%rip), %rsi      # 0x25491
jmp 0x227b4
leaq 0x2d06(%rip), %rsi      # 0x2548d
jmp 0x227b4
leaq 0x2cf1(%rip), %rsi      # 0x25481
jmp 0x227b4
leaq 0x2cfc(%rip), %rsi      # 0x25495
jmp 0x227b4
leaq 0x2ce7(%rip), %rsi      # 0x25489
jmp 0x227b4
leaq 0x2cce(%rip), %rsi      # 0x25479
jmp 0x227b4
leaq 0x2cd1(%rip), %rsi      # 0x25485
movq %rbx, %rdi
callq 0x8a30
incq %r13
jmp 0x22718
movq %rbx, %rdi
pushq $0x25
popq %rsi
callq 0x8480
leaq -0x2c(%rbp), %r12
movq %r12, %rdi
pushq $0x3
popq %rsi
leaq 0x2cb9(%rip), %rdx      # 0x25499
movl %r15d, %ecx
xorl %eax, %eax
callq 0x88c0
cmpl $0x2, %eax
jne 0x22811
movq %rbx, %rdi
movq %r12, %rsi
pushq $0x2
popq %rdx
callq 0x8060
jmp 0x227bc
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x2c86(%rip), %rdi      # 0x2549e
leaq 0x2980(%rip), %rsi      # 0x2519f
leaq 0x2c81(%rip), %rcx      # 0x254a7
movl $0x3d2, %edx            # imm = 0x3D2
callq 0x8370
jmp 0x22834
jmp 0x22834
movq %rax, %r14
movq %rbx, %rdi
callq 0x8aa8
movq %r14, %rdi
callq 0x8990