// File: /workspace/github_cpp_makefile_star2_O2/MisakiFx[P]P2PDownload/./httplib.h
// Function: httplib::detail::parse_multipart_formdata(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::multimap<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, httplib::MultipartFile, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, httplib::MultipartFile>>>&)
inline bool parse_multipart_formdata(const std::string &boundary,
                const std::string &body,
                MultipartFiles &files) {
            static std::string dash = "--";
            static std::string crlf = "\r\n";

            static std::regex re_content_type("Content-Type: (.*?)",
                    std::regex_constants::icase);

            static std::regex re_content_disposition(
                    "Content-Disposition: form-data; name=\"(.*?)\"(?:; filename=\"(.*?)\")?",
                    std::regex_constants::icase);

            auto dash_boundary = dash + boundary;

            auto pos = body.find(dash_boundary);
            if (pos != 0) { return false; }

            pos += dash_boundary.size();

            auto next_pos = body.find(crlf, pos);
            if (next_pos == std::string::npos) { return false; }

            pos = next_pos + crlf.size();

            while (pos < body.size()) {
                next_pos = body.find(crlf, pos);
                if (next_pos == std::string::npos) { return false; }

                std::string name;
                MultipartFile file;

                auto header = body.substr(pos, (next_pos - pos));

                while (pos != next_pos) {
                    std::smatch m;
                    if (std::regex_match(header, m, re_content_type)) {
                        file.content_type = m[1];
                    } else if (std::regex_match(header, m, re_content_disposition)) {
                        name = m[1];
                        file.filename = m[2];
                    }

                    pos = next_pos + crlf.size();

                    next_pos = body.find(crlf, pos);
                    if (next_pos == std::string::npos) { return false; }

                    header = body.substr(pos, (next_pos - pos));
                }

                pos = next_pos + crlf.size();

                next_pos = body.find(crlf + dash_boundary, pos);

                if (next_pos == std::string::npos) { return false; }

                file.offset = pos;
                file.length = next_pos - pos;

                pos = next_pos + crlf.size() + dash_boundary.size();

                next_pos = body.find(crlf, pos);
                if (next_pos == std::string::npos) { return false; }

                files.emplace(name, file);

                pos = next_pos + crlf.size();
            }

            return true;
        }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x118, %rsp            # imm = 0x118
movq %rdx, -0x68(%rbp)
movq %rsi, %r14
movq %rdi, %rbx
movb 0x1cd08(%rip), %al      # 0x38a68
testb %al, %al
movq %rsi, -0x30(%rbp)
je 0x1c150
movb 0x1cd1e(%rip), %al      # 0x38a90
testb %al, %al
je 0x1c1ad
movb 0x1cd38(%rip), %al      # 0x38ab8
testb %al, %al
je 0x1c20a
movb 0x1cd52(%rip), %al      # 0x38ae0
testb %al, %al
je 0x1c263
leaq 0x1ccab(%rip), %rsi     # 0x38a48
leaq -0xf8(%rbp), %r15
movq %r15, %rdi
movq %rbx, %rdx
callq 0x1f9cb
movq $0x0, -0x38(%rbp)
movq %r14, %rdi
movq %r15, %rsi
xorl %edx, %edx
callq 0x8a80
testq %rax, %rax
jne 0x1c12e
movq -0xf0(%rbp), %rdx
leaq 0x1cc95(%rip), %rsi     # 0x38a70
movq %r14, %rdi
callq 0x8a80
cmpq $-0x1, %rax
je 0x1c11e
movq %rax, %r12
addq 0x1cc81(%rip), %r12     # 0x38a78
leaq -0x60(%rbp), %r13
leaq -0x138(%rbp), %r15
cmpq 0x8(%r14), %r12
setae %al
jae 0x1c128
movq %rax, -0x38(%rbp)
movq %r14, %rdi
leaq 0x1cc53(%rip), %rsi     # 0x38a70
movq %r12, %rdx
callq 0x8a80
cmpq $-0x1, %rax
je 0x1c11e
movq %rax, %rbx
leaq -0x78(%rbp), %rax
movq %rax, -0x88(%rbp)
andq $0x0, -0x80(%rbp)
xorl %edx, %edx
movb %dl, -0x78(%rbp)
leaq -0xc8(%rbp), %rax
movq %rax, -0xd8(%rbp)
andq $0x0, -0xd0(%rbp)
movb %dl, -0xc8(%rbp)
leaq -0xa8(%rbp), %rcx
movq %rcx, -0xb8(%rbp)
andq $0x0, -0xb0(%rbp)
movb %dl, -0xa8(%rbp)
xorps %xmm0, %xmm0
movups %xmm0, 0x30(%rax)
movq %rbx, %rcx
subq %r12, %rcx
leaq -0x118(%rbp), %rdi
movq %r14, %rsi
movq %r12, %rdx
callq 0x8590
cmpq %rbx, %r12
je 0x1c034
xorps %xmm0, %xmm0
movaps %xmm0, -0x50(%rbp)
movaps %xmm0, -0x60(%rbp)
leaq -0x118(%rbp), %r12
movq %r12, %rdi
movq %r13, %rsi
leaq 0x1cbd2(%rip), %rdx     # 0x38a98
xorl %ecx, %ecx
callq 0x1fa03
movq -0x30(%rbp), %r14
testb %al, %al
je 0x1befd
movq -0x60(%rbp), %rsi
movq -0x58(%rbp), %rcx
subq %rsi, %rcx
je 0x1bf41
movq %rcx, %rax
cqto
pushq $0x18
popq %rdi
idivq %rdi
addq $-0x5, %rax
cmpq $-0x3, %rax
ja 0x1bf41
addq $0x18, %rsi
jmp 0x1bf48
movq %r12, %rdi
movq %r13, %rsi
leaq 0x1cbb6(%rip), %rdx     # 0x38ac0
xorl %ecx, %ecx
callq 0x1fa03
testb %al, %al
je 0x1bfcd
movq -0x60(%rbp), %rsi
movq -0x58(%rbp), %rcx
subq %rsi, %rcx
je 0x1bf59
movq %rcx, %rax
cqto
pushq $0x18
popq %rdi
idivq %rdi
addq $-0x5, %rax
cmpq $-0x3, %rax
ja 0x1bf59
addq $0x18, %rsi
jmp 0x1bf60
addq %rcx, %rsi
addq $-0x48, %rsi
movq %r15, %rdi
callq 0x21b3c
leaq -0xb8(%rbp), %rdi
jmp 0x1bfbd
addq %rcx, %rsi
addq $-0x48, %rsi
movq %r15, %rdi
callq 0x21b3c
leaq -0x88(%rbp), %rdi
movq %r15, %rsi
callq 0x86c0
movq %r15, %rdi
callq 0x8aa8
movq -0x60(%rbp), %rsi
movq -0x58(%rbp), %rcx
subq %rsi, %rcx
je 0x1bfa7
movq %rcx, %rax
cqto
pushq $0x18
popq %rdi
idivq %rdi
addq $-0x6, %rax
cmpq $-0x4, %rax
ja 0x1bfa7
addq $0x30, %rsi
jmp 0x1bfae
addq %rcx, %rsi
addq $-0x48, %rsi
movq %r15, %rdi
callq 0x21b3c
leaq -0xd8(%rbp), %rdi
movq %r15, %rsi
callq 0x86c0
movq %r15, %rdi
callq 0x8aa8
addq 0x1caa4(%rip), %rbx     # 0x38a78
movq %r14, %rdi
leaq 0x1ca92(%rip), %rsi     # 0x38a70
movq %rbx, %rdx
callq 0x8a80
cmpq $-0x1, %rax
je 0x1c0d7
movq %rax, %r13
movq %rax, %rcx
subq %rbx, %rcx
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x8590
movq %r12, %rdi
movq %r15, %rsi
callq 0x86c0
movq %r15, %rdi
callq 0x8aa8
leaq -0x60(%rbp), %r14
movq %r14, %rdi
callq 0x1703c
movq %rbx, %r12
movq %r13, %rbx
movq %r14, %r13
jmp 0x1be9e
addq 0x1ca3d(%rip), %r12     # 0x38a78
movq %r13, %rdi
leaq 0x1ca2b(%rip), %rsi     # 0x38a70
leaq -0xf8(%rbp), %rdx
callq 0x1f9cb
movq -0x30(%rbp), %r14
movq %r14, %rdi
movq %r13, %rsi
movq %r12, %rdx
callq 0x8a80
movq %rax, %rbx
movq %r13, %rdi
callq 0x8aa8
cmpq $-0x1, %rbx
je 0x1c0e8
movq %r12, -0x98(%rbp)
movq %rbx, %rax
subq %r12, %rax
movq %rax, -0x90(%rbp)
movq 0x1c9e9(%rip), %r12     # 0x38a78
addq %rbx, %r12
addq -0xf0(%rbp), %r12
movq %r14, %rdi
leaq 0x1c9cd(%rip), %rsi     # 0x38a70
movq %r12, %rdx
callq 0x8a80
cmpq $-0x1, %rax
je 0x1c0e8
movq %rax, %rbx
movq -0x68(%rbp), %rdi
leaq -0x88(%rbp), %rsi
leaq -0xd8(%rbp), %rdx
callq 0x21c02
addq 0x1c9a6(%rip), %rbx     # 0x38a78
movb $0x1, %r13b
jmp 0x1c0e3
leaq -0x60(%rbp), %rdi
callq 0x1703c
xorl %r13d, %r13d
movq %rbx, %r12
jmp 0x1c0eb
xorl %r13d, %r13d
leaq -0x118(%rbp), %rdi
callq 0x8aa8
leaq -0xd8(%rbp), %rdi
callq 0x166b2
leaq -0x88(%rbp), %rdi
callq 0x8aa8
testb %r13b, %r13b
leaq -0x60(%rbp), %r13
jne 0x1be02
jmp 0x1c12e
movq $0x0, -0x38(%rbp)
jmp 0x1c12e
movb $0x1, %al
movq %rax, -0x38(%rbp)
leaq -0xf8(%rbp), %rdi
callq 0x8aa8
movq -0x38(%rbp), %rax
addq $0x118, %rsp            # imm = 0x118
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x1c911(%rip), %rdi     # 0x38a68
callq 0x89c0
testl %eax, %eax
je 0x1bd6c
leaq 0x1c8dd(%rip), %rdi     # 0x38a48
leaq 0x925d(%rip), %rsi      # 0x253cf
leaq -0xd8(%rbp), %rdx
callq 0x81d0
movq 0x1bdeb(%rip), %rdi     # 0x37f70
leaq 0x1c8bc(%rip), %rsi     # 0x38a48
leaq 0x1c3c5(%rip), %rdx     # 0x38558
callq 0x84a0
leaq 0x1c8c9(%rip), %rdi     # 0x38a68
callq 0x8360
movq -0x30(%rbp), %r14
jmp 0x1bd6c
leaq 0x1c8dc(%rip), %rdi     # 0x38a90
callq 0x89c0
testl %eax, %eax
je 0x1bd7a
leaq 0x1c8a8(%rip), %rdi     # 0x38a70
leaq 0x91d8(%rip), %rsi      # 0x253a7
leaq -0xd8(%rbp), %rdx
callq 0x81d0
movq 0x1bd8e(%rip), %rdi     # 0x37f70
leaq 0x1c887(%rip), %rsi     # 0x38a70
leaq 0x1c368(%rip), %rdx     # 0x38558
callq 0x84a0
leaq 0x1c894(%rip), %rdi     # 0x38a90
callq 0x8360
movq -0x30(%rbp), %r14
jmp 0x1bd7a
leaq 0x1c8a7(%rip), %rdi     # 0x38ab8
callq 0x89c0
testl %eax, %eax
je 0x1bd88
leaq 0x1c873(%rip), %rdi     # 0x38a98
leaq 0x91a6(%rip), %rsi      # 0x253d2
pushq $0x1
popq %rdx
callq 0xa008
leaq -0x121a9(%rip), %rdi    # 0xa092
leaq 0x1c856(%rip), %rsi     # 0x38a98
leaq 0x1c30f(%rip), %rdx     # 0x38558
callq 0x84a0
leaq 0x1c863(%rip), %rdi     # 0x38ab8
callq 0x8360
movq -0x30(%rbp), %r14
jmp 0x1bd88
leaq 0x1c876(%rip), %rdi     # 0x38ae0
callq 0x89c0
testl %eax, %eax
je 0x1bd96
leaq 0x1c842(%rip), %rdi     # 0x38ac0
leaq 0x9161(%rip), %rsi      # 0x253e6
pushq $0x1
popq %rdx
callq 0xa008
leaq -0x12202(%rip), %rdi    # 0xa092
leaq 0x1c825(%rip), %rsi     # 0x38ac0
leaq 0x1c2b6(%rip), %rdx     # 0x38558
callq 0x84a0
leaq 0x1c832(%rip), %rdi     # 0x38ae0
callq 0x8360
movq -0x30(%rbp), %r14
jmp 0x1bd96
movq %rax, %rbx
leaq 0x1c81a(%rip), %rdi     # 0x38ae0
jmp 0x1c2ea
movq %rax, %rbx
leaq 0x1c7e6(%rip), %rdi     # 0x38ab8
jmp 0x1c2ea
movq %rax, %rbx
leaq 0x1c7b2(%rip), %rdi     # 0x38a90
jmp 0x1c2ea
movq %rax, %rbx
leaq 0x1c77e(%rip), %rdi     # 0x38a68
callq 0x8350
jmp 0x1c341
jmp 0x1c2f3
movq %rax, %rbx
jmp 0x1c311
movq %rax, %rbx
jmp 0x1c31d
jmp 0x1c305
jmp 0x1c305
jmp 0x1c305
jmp 0x1c305
movq %rax, %rbx
leaq -0x60(%rbp), %rdi
callq 0x1703c
leaq -0x118(%rbp), %rdi
callq 0x8aa8
leaq -0xd8(%rbp), %rdi
callq 0x166b2
leaq -0x88(%rbp), %rdi
callq 0x8aa8
leaq -0xf8(%rbp), %rdi
callq 0x8aa8
movq %rbx, %rdi
callq 0x8990
nop