// File: /workspace/github_cpp_makefile_star2_O1/trisolaris233[P]httpc/src/request_parser.hpp
// Function: httpc::RequestParser::ResultType httpc::RequestParser::ParseBody<char*>(httpc::Request&, char*, char*)
ResultType ParseBody(
            Request& request_, InputIterator begin, InputIterator end
        ) {
            // debug().dg(std::string(begin, end)).lf();
            bool flag = false;
            for (auto itr = begin; itr != end; ++itr) {
                if (*itr != '\r' && *itr != '\n') {
                    std::cout << *itr;
                } else if (*itr == '\r') {
                    std::cout << "\\r";
                    flag = true;
                } else {
                    if (flag) {
                        flag = false;
                    }
                    std::cout << "\\n" << std::endl;
                }
            }

            auto itr = request_.FindHeader("Content-Type");
            if (itr != request_.HeaderCEnd()) {
                auto pos = itr->value.find_first_of(';');
                std::string content_type(std::move(itr->value.substr(0, pos)));
                
                if (content_type == "multipart/form-data") {
                    if (pos != std::string::npos) {
                        std::string boundary(
                            std::move(
                                itr->value.substr(
                                    itr->value.find_first_of('=', pos + 1) + 1
                                )
                            )
                        );
                        std::string str(begin, end), tmp;
                        // bool flag = false;
                        bool start_flag = false;
                        bool flag = false;
                        auto metadata_line = 0;
                        std::vector<std::string> metadatas;
                        // std::string content;
                        // debug().dg("boundary => ").dg(boundary).lf();
                        std::string start_boundary("--" + boundary),
                                    end_boundary("--" + boundary + "--\r");

                        for (; begin != end; ++begin) {
                            if (*begin == '\r' && !start_flag) {
                                flag = true;
                                continue;
                            }
                            if (*begin == '\n') {
                                flag = false;
                                if (tmp == start_boundary) {
                                    tmp.clear();
                                    metadata_line = 0;
                                    metadatas.clear();
                                    start_flag = true;
                                    continue;
                                } else if (tmp == end_boundary) {
                                    tmp.clear();
                                    metadata_line = 0;
                                    metadatas.clear();
                                    start_flag = false;
                                    continue;
                                } else {
                                    if (start_flag) {
                                        if (metadata_line < 2) {
                                            metadatas.emplace_back(tmp);
                                            metadata_line++;
                                        } else if (metadata_line == 2) {
                                            std::string str(metadatas[0]), token_to_find("filename=");
                                            auto pos_token = str.find(token_to_find);
                                            if (pos_token == std::string::npos 
                                                || pos_token + token_to_find.length() >= str.length()) {
                                                request_.file_recv_successfully_flag_ = false;
                                                request_.file_recv_complete_flag_ = true;
                                                return kBad;
                                            }
                                            std::string filename_with_quote_flag(
                                                std::move(
                                                    str.substr(pos_token + token_to_find.length() + 1)
                                                )
                                            );
                                            request_.files_.emplace_back(
                                                std::string(
                                                    filename_with_quote_flag.substr(
                                                        1, 
                                                        filename_with_quote_flag.find_first_of(2, '"') 
                                                    )
                                                )
                                            );
                                            // flag = true;
                                            // std::string content_type(std::move(metadatas[1].find()))
                                            auto content_type_pos = metadatas[1].find_first_of(':');
                                            if (content_type_pos == std::string::npos
                                                || content_type_pos + 1 >= metadatas[1].length()) {
                                                request_.file_recv_successfully_flag_ = false;
                                                request_.file_recv_complete_flag_ = true;
                                                return kBad;
                                            }
                                            std::string content_type_tmp(std::move(metadatas[1].substr(content_type_pos + 2)));
                                            request_.files_.back().SetType(std::move(content_type_tmp.substr(1, content_type_tmp.length() - 1)));
                                            metadata_line++;
                                            // start_flag = false;
                                        } else {
                                            tmp.push_back(*begin);
                                            request_.files_.back().AppendContent(tmp);
                                        }
                                    }
                                    tmp.clear();
                                }
                            } else {
                                // debug().dg(static_cast<int>(*begin)).lf();
                                tmp.push_back(*begin);
                            }
                        }
                    } else {
                        request_.file_recv_successfully_flag_ = false;
                        request_.file_recv_complete_flag_ = true;
                        return kBad;
                    }
                }
            }
            request_.file_recv_successfully_flag_ = 
            request_.file_recv_complete_flag_ = true;
            return kGood;
        }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1a8, %rsp            # imm = 0x1A8
movq %rsi, -0x38(%rbp)
movq %rcx, -0x80(%rbp)
movq %rdx, -0x108(%rbp)
cmpq %rcx, %rdx
je 0x1ca0b
movq 0x18615(%rip), %r12     # 0x34f90
leaq 0x84bd(%rip), %r13      # 0x24e3f
leaq 0x84b3(%rip), %rbx      # 0x24e3c
leaq -0x100(%rbp), %r14
movq -0x108(%rbp), %r15
movzbl (%r15), %eax
cmpl $0xa, %eax
je 0x1c9b2
cmpl $0xd, %eax
jne 0x1c9ec
movl $0x2, %edx
movq %r12, %rdi
movq %rbx, %rsi
jmp 0x1c9fd
movl $0x2, %edx
movq %r12, %rdi
movq %r13, %rsi
callq 0x85b0
movq (%r12), %rax
movq -0x18(%rax), %rdi
addq %r12, %rdi
movl $0xa, %esi
callq 0x8500
movsbl %al, %esi
movq %r12, %rdi
callq 0x8050
movq %rax, %rdi
callq 0x83b0
jmp 0x1ca02
movb %al, -0x100(%rbp)
movl $0x1, %edx
movq %r12, %rdi
movq %r14, %rsi
callq 0x85b0
incq %r15
cmpq -0x80(%rbp), %r15
jne 0x1c997
leaq 0x7d34(%rip), %rsi      # 0x24746
movq -0x38(%rbp), %r13
movq %r13, %rdi
callq 0x176f6
cmpq 0xa0(%r13), %rax
je 0x1cad3
movq %rax, %rbx
addq $0x20, %rbx
movq %rbx, %rdi
movl $0x3b, %esi
xorl %edx, %edx
callq 0x8680
movq %rax, %r14
leaq -0xe0(%rbp), %r12
movq %r12, %rdi
movq %rbx, %rsi
xorl %edx, %edx
movq %rax, %rcx
callq 0x8550
leaq -0xf0(%rbp), %r15
movq %r15, -0x10(%r15)
movq (%r12), %rax
leaq -0xd0(%rbp), %r12
cmpq %r12, %rax
je 0x1ca8d
movq %rax, -0x100(%rbp)
movq -0xd0(%rbp), %rax
movq %rax, -0xf0(%rbp)
jmp 0x1ca96
movups (%r12), %xmm0
movups %xmm0, (%r15)
movq -0xd8(%rbp), %rax
leaq -0x100(%rbp), %rdi
movq %rax, 0x8(%rdi)
leaq 0x8393(%rip), %rsi      # 0x24e42
callq 0x81a0
testl %eax, %eax
je 0x1caf1
movq -0x100(%rbp), %rdi
cmpq %r15, %rdi
je 0x1cad3
movq -0xf0(%rbp), %rsi
incq %rsi
callq 0x8520
movw $0x101, 0x121(%r13)     # imm = 0x101
xorl %eax, %eax
addq $0x1a8, %rsp            # imm = 0x1A8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
cmpq $-0x1, %r14
je 0x1cb59
incq %r14
movq %rbx, %rdi
movl $0x3d, %esi
movq %r14, %rdx
callq 0x8680
leaq 0x1(%rax), %rdx
leaq -0x1a8(%rbp), %rdi
movq %rbx, %rsi
movq $-0x1, %rcx
callq 0x8550
movq %r12, -0xe0(%rbp)
leaq -0x198(%rbp), %rcx
movq -0x10(%rcx), %rax
cmpq %rcx, %rax
movq -0x108(%rbp), %r15
je 0x1cb68
movq %rax, -0xe0(%rbp)
movq -0x198(%rbp), %rax
movq %rax, -0xd0(%rbp)
jmp 0x1cb70
movw $0x1, 0x121(%r13)
jmp 0x1d220
movups (%rcx), %xmm0
movups %xmm0, (%r12)
leaq -0x1a8(%rbp), %rdi
movq 0x8(%rdi), %rax
movq %rax, -0xd8(%rbp)
movq %rcx, (%rdi)
movq %r15, %rsi
movq -0x80(%rbp), %rdx
callq 0xb0fe
leaq -0x68(%rbp), %rcx
movq %rcx, -0x10(%rcx)
xorl %eax, %eax
movq %rax, -0x8(%rcx)
movb $0x0, (%rcx)
movq %rax, -0x90(%rbp)
xorps %xmm0, %xmm0
movaps %xmm0, -0xa0(%rbp)
leaq 0x829c(%rip), %rsi      # 0x24e56
leaq -0x1d0(%rbp), %rdi
leaq -0xe0(%rbp), %rdx
callq 0x1d863
leaq 0x8282(%rip), %rsi      # 0x24e56
leaq -0xc0(%rbp), %rdi
leaq -0xe0(%rbp), %rdx
callq 0x1d863
leaq 0x826b(%rip), %rsi      # 0x24e59
leaq -0xc0(%rbp), %rdi
callq 0x88d0
leaq -0x178(%rbp), %rsi
movq %rsi, -0x10(%rsi)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x1cc27
movq %rdx, -0x188(%rbp)
movq (%rcx), %rdx
movq %rdx, -0x178(%rbp)
jmp 0x1cc2d
movups (%rcx), %xmm0
movups %xmm0, (%rsi)
movq 0x8(%rax), %rdx
movq %rdx, -0x180(%rbp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq -0xb0(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x1cc66
movq -0xb0(%rbp), %rsi
incq %rsi
callq 0x8520
cmpq -0x80(%rbp), %r15
sete %r13b
je 0x1d161
movq -0x38(%rbp), %rax
addq $0xd0, %rax
movq %rax, -0x1b0(%rbp)
xorl %r12d, %r12d
movl $0x0, -0x2c(%rbp)
movzbl (%r15), %r14d
cmpl $0xa, %r14d
je 0x1ccb7
cmpl $0xd, %r14d
jne 0x1cd42
testb $0x1, -0x2c(%rbp)
je 0x1d150
cmpb $0xa, %r14b
jne 0x1cd42
movq -0x70(%rbp), %rbx
cmpq -0x1c8(%rbp), %rbx
jne 0x1cce4
testq %rbx, %rbx
je 0x1cd54
movq -0x1d0(%rbp), %rsi
movq -0x78(%rbp), %rdi
movq %rbx, %rdx
callq 0x8540
testl %eax, %eax
je 0x1cd54
cmpq -0x180(%rbp), %rbx
jne 0x1cd11
testq %rbx, %rbx
je 0x1cdb3
movq -0x188(%rbp), %rsi
movq -0x78(%rbp), %rdi
movq %rbx, %rdx
callq 0x8540
testl %eax, %eax
je 0x1cdb3
testb $0x1, -0x2c(%rbp)
je 0x1d141
movq %r12, %rbx
cmpl $0x1, %ebx
jg 0x1ce1d
leaq -0xa0(%rbp), %rdi
leaq -0x78(%rbp), %rsi
callq 0x1d8f6
movq %rbx, %r12
incl %r12d
jmp 0x1d141
movsbl %r14b, %esi
leaq -0x78(%rbp), %rdi
callq 0x8480
jmp 0x1d150
movq $0x0, -0x70(%rbp)
movq -0x78(%rbp), %rax
movb $0x0, (%rax)
movq -0xa0(%rbp), %rbx
movq -0x98(%rbp), %r14
movb $0x1, %al
movl %eax, -0x2c(%rbp)
cmpq %rbx, %r14
je 0x1ce15
movq %r15, %r13
leaq 0x10(%rbx), %r15
movq -0x10(%r15), %rdi
cmpq %rdi, %r15
je 0x1cd9a
movq (%r15), %rsi
incq %rsi
callq 0x8520
leaq 0x20(%r15), %rax
addq $0x10, %r15
cmpq %r14, %r15
movq %rax, %r15
jne 0x1cd86
movq %rbx, -0x98(%rbp)
jmp 0x1ce12
movq $0x0, -0x70(%rbp)
movq -0x78(%rbp), %rax
movb $0x0, (%rax)
movq -0xa0(%rbp), %rbx
movq -0x98(%rbp), %r14
cmpq %rbx, %r14
je 0x1ceff
movq %r15, %r13
leaq 0x10(%rbx), %r15
movq -0x10(%r15), %rdi
cmpq %rdi, %r15
je 0x1cdf4
movq (%r15), %rsi
incq %rsi
callq 0x8520
leaq 0x20(%r15), %rax
addq $0x10, %r15
cmpq %r14, %r15
movq %rax, %r15
jne 0x1cde0
movq %rbx, -0x98(%rbp)
movl $0x0, -0x2c(%rbp)
movq %r13, %r15
xorl %r12d, %r12d
jmp 0x1d150
cmpl $0x2, %ebx
jne 0x1cf0b
movq -0xa0(%rbp), %rax
leaq -0xb0(%rbp), %rcx
movq %rcx, -0xc0(%rbp)
movq (%rax), %rsi
movq 0x8(%rax), %rdx
addq %rsi, %rdx
leaq -0xc0(%rbp), %rdi
callq 0xb0fe
leaq -0x158(%rbp), %rax
movq %rax, -0x168(%rbp)
leaq -0x168(%rbp), %rdi
leaq 0x7ff0(%rip), %rsi      # 0x24e5d
leaq 0x7ff2(%rip), %rdx      # 0x24e66
callq 0x120b6
movq -0x168(%rbp), %rsi
movq -0x160(%rbp), %rcx
leaq -0xc0(%rbp), %rdi
xorl %edx, %edx
callq 0x8820
cmpq $-0x1, %rax
je 0x1cf39
addq -0x160(%rbp), %rax
cmpq -0xb8(%rbp), %rax
jae 0x1cf39
incq %rax
leaq -0x58(%rbp), %rdi
leaq -0xc0(%rbp), %rsi
movq %rax, %rdx
movq $-0x1, %rcx
callq 0x8550
leaq -0x138(%rbp), %rcx
movq %rcx, -0x148(%rbp)
movq -0x58(%rbp), %rax
leaq -0x48(%rbp), %rdx
cmpq %rdx, %rax
je 0x1cf53
movq %rax, -0x148(%rbp)
movq -0x48(%rbp), %rax
movq %rax, -0x138(%rbp)
jmp 0x1cf59
movl $0x0, -0x2c(%rbp)
jmp 0x1ce15
movsbl %r14b, %esi
leaq -0x78(%rbp), %rdi
callq 0x8480
movq -0x38(%rbp), %rax
movq 0xd8(%rax), %rdi
addq $-0x40, %rdi
movq -0x78(%rbp), %rsi
movq -0x70(%rbp), %rdx
callq 0x81b0
jmp 0x1d141
movq -0x38(%rbp), %rax
movw $0x1, 0x121(%rax)
movl $0x2, %r12d
xorl %ebx, %ebx
jmp 0x1d0f9
movups (%rdx), %xmm0
movups %xmm0, (%rcx)
movq -0x50(%rbp), %rax
movq %rax, -0x140(%rbp)
movl $0x22, %edx
leaq -0x148(%rbp), %r14
movq %r14, %rdi
movl $0x2, %esi
callq 0x8680
movl $0x1, %edx
leaq -0x58(%rbp), %rbx
movq %rbx, %rdi
movq %r14, %rsi
movq %rax, %rcx
callq 0x8550
movq -0x1b0(%rbp), %rdi
movq %rbx, %rsi
callq 0x1d946
movq -0x58(%rbp), %rdi
leaq -0x48(%rbp), %rax
cmpq %rax, %rdi
je 0x1cfbc
movq -0x48(%rbp), %rsi
incq %rsi
callq 0x8520
movq -0xa0(%rbp), %rdi
addq $0x20, %rdi
movl $0x3a, %esi
xorl %edx, %edx
callq 0x8680
cmpq $-0x1, %rax
je 0x1d034
leaq 0x1(%rax), %rcx
movq -0xa0(%rbp), %rsi
cmpq 0x28(%rsi), %rcx
jae 0x1d034
addq $0x20, %rsi
addq $0x2, %rax
leaq -0x128(%rbp), %rdi
movq %rax, %rdx
movq $-0x1, %rcx
callq 0x8550
leaq -0x48(%rbp), %rcx
movq %rcx, -0x58(%rbp)
movq -0x128(%rbp), %rax
leaq -0x118(%rbp), %rdx
cmpq %rdx, %rax
je 0x1d04e
movq %rax, -0x58(%rbp)
movq -0x118(%rbp), %rax
movq %rax, -0x48(%rbp)
jmp 0x1d054
movq -0x38(%rbp), %rax
movw $0x1, 0x121(%rax)
movl $0x2, %r12d
xorl %ebx, %ebx
jmp 0x1d0d7
movups (%rdx), %xmm0
movups %xmm0, (%rcx)
movq -0x120(%rbp), %rcx
movq %rcx, -0x50(%rbp)
movq -0x38(%rbp), %rax
movq 0xd8(%rax), %rbx
decq %rcx
movl $0x1, %edx
leaq -0x128(%rbp), %r14
movq %r14, %rdi
leaq -0x58(%rbp), %rsi
callq 0x8550
addq $-0x20, %rbx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x8310
movq -0x128(%rbp), %rdi
leaq -0x118(%rbp), %rax
cmpq %rax, %rdi
je 0x1d0b6
movq -0x118(%rbp), %rsi
incq %rsi
callq 0x8520
movq -0x58(%rbp), %rdi
leaq -0x48(%rbp), %rax
cmpq %rax, %rdi
je 0x1d0cf
movq -0x48(%rbp), %rsi
incq %rsi
callq 0x8520
movb $0x1, %bl
movl $0x3, %r12d
movq -0x148(%rbp), %rdi
leaq -0x138(%rbp), %rax
cmpq %rax, %rdi
je 0x1d0f9
movq -0x138(%rbp), %rsi
incq %rsi
callq 0x8520
movq -0x168(%rbp), %rdi
leaq -0x158(%rbp), %rax
cmpq %rax, %rdi
je 0x1d11b
movq -0x158(%rbp), %rsi
incq %rsi
callq 0x8520
movq -0xc0(%rbp), %rdi
leaq -0xb0(%rbp), %rax
cmpq %rax, %rdi
je 0x1d13d
movq -0xb0(%rbp), %rsi
incq %rsi
callq 0x8520
testb %bl, %bl
je 0x1d161
movq $0x0, -0x70(%rbp)
movq -0x78(%rbp), %rax
movb $0x0, (%rax)
incq %r15
cmpq -0x80(%rbp), %r15
sete %r13b
jne 0x1cc8f
movq -0x188(%rbp), %rdi
leaq -0x178(%rbp), %rax
cmpq %rax, %rdi
je 0x1d183
movq -0x178(%rbp), %rsi
incq %rsi
callq 0x8520
leaq -0x1c0(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x1d1a2
movq -0x1c0(%rbp), %rsi
incq %rsi
callq 0x8520
leaq -0xa0(%rbp), %rdi
callq 0x1d986
movq -0x78(%rbp), %rdi
leaq -0x68(%rbp), %rax
cmpq %rax, %rdi
je 0x1d1c7
movq -0x68(%rbp), %rsi
incq %rsi
callq 0x8520
movq -0x1a8(%rbp), %rdi
leaq -0x198(%rbp), %rax
cmpq %rax, %rdi
je 0x1d1e9
movq -0x198(%rbp), %rsi
incq %rsi
callq 0x8520
movq -0xe0(%rbp), %rdi
leaq -0xd0(%rbp), %rax
cmpq %rax, %rdi
je 0x1d20b
movq -0xd0(%rbp), %rsi
incq %rsi
callq 0x8520
testb $0x1, %r13b
leaq -0xf0(%rbp), %r15
movq -0x38(%rbp), %r13
jne 0x1cab8
movq -0x100(%rbp), %rdi
cmpq %r15, %rdi
je 0x1d23b
movq -0xf0(%rbp), %rsi
incq %rsi
callq 0x8520
movl $0x1, %eax
jmp 0x1cadf
movq %rax, %rbx
movq -0x128(%rbp), %rdi
leaq -0x118(%rbp), %rax
cmpq %rax, %rdi
je 0x1d273
movq -0x118(%rbp), %rsi
incq %rsi
callq 0x8520
jmp 0x1d273
jmp 0x1d270
jmp 0x1d28e
movq %rax, %rbx
movq -0x58(%rbp), %rdi
leaq -0x48(%rbp), %rax
cmpq %rax, %rdi
je 0x1d291
movq -0x48(%rbp), %rsi
incq %rsi
callq 0x8520
jmp 0x1d291
movq %rax, %rbx
movq -0x148(%rbp), %rdi
leaq -0x138(%rbp), %rax
cmpq %rax, %rdi
je 0x1d2b8
movq -0x138(%rbp), %rsi
incq %rsi
callq 0x8520
jmp 0x1d2b8
movq %rax, %rbx
movq -0x168(%rbp), %rdi
leaq -0x158(%rbp), %rax
cmpq %rax, %rdi
je 0x1d2df
movq -0x158(%rbp), %rsi
incq %rsi
callq 0x8520
jmp 0x1d2df
movq %rax, %rbx
movq -0xc0(%rbp), %rdi
leaq -0xb0(%rbp), %rax
cmpq %rax, %rdi
je 0x1d33e
movq -0xb0(%rbp), %rsi
incq %rsi
callq 0x8520
jmp 0x1d33e
jmp 0x1d33b
movq %rax, %rbx
leaq -0xb0(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x1d360
movq -0xb0(%rbp), %rsi
jmp 0x1d358
movq %rax, %rbx
jmp 0x1d360
movq %rax, %rbx
jmp 0x1d37f
movq %rax, %rbx
jmp 0x1d3c6
movq %rax, %rbx
jmp 0x1d3e8
movq %rax, %rbx
movq -0x188(%rbp), %rdi
leaq -0x178(%rbp), %rax
cmpq %rax, %rdi
je 0x1d360
movq -0x178(%rbp), %rsi
incq %rsi
callq 0x8520
leaq -0x1c0(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x1d37f
movq -0x1c0(%rbp), %rsi
incq %rsi
callq 0x8520
leaq -0xa0(%rbp), %rdi
callq 0x1d986
movq -0x78(%rbp), %rdi
leaq -0x68(%rbp), %rax
cmpq %rax, %rdi
je 0x1d3a4
movq -0x68(%rbp), %rsi
incq %rsi
callq 0x8520
movq -0x1a8(%rbp), %rdi
leaq -0x198(%rbp), %rax
cmpq %rax, %rdi
je 0x1d3c6
movq -0x198(%rbp), %rsi
incq %rsi
callq 0x8520
movq -0xe0(%rbp), %rdi
leaq -0xd0(%rbp), %rax
cmpq %rax, %rdi
je 0x1d3e8
movq -0xd0(%rbp), %rsi
incq %rsi
callq 0x8520
movq -0x100(%rbp), %rdi
leaq -0xf0(%rbp), %rax
cmpq %rax, %rdi
je 0x1d40a
movq -0xf0(%rbp), %rsi
incq %rsi
callq 0x8520
movq %rbx, %rdi
callq 0x8830