// File: /workspace/github_cpp_makefile_star2_O2/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 $0x198, %rsp            # imm = 0x198
movq %rcx, %r14
movq %rdx, %r15
movq %rsi, -0x30(%rbp)
movq 0x1d389(%rip), %r12     # 0x36f90
leaq 0x8238(%rip), %r13      # 0x21e46
leaq 0x822e(%rip), %rbx      # 0x21e43
movq %rdx, -0x78(%rbp)
cmpq %r14, %r15
je 0x19c5e
movzbl (%r15), %eax
cmpl $0xa, %eax
je 0x19c39
cmpl $0xd, %eax
jne 0x19c4e
movq %r12, %rdi
movq %rbx, %rsi
callq 0x8530
jmp 0x19c59
movq %r12, %rdi
movq %r13, %rsi
callq 0x8530
movq %rax, %rdi
callq 0x82c0
jmp 0x19c59
movsbl %al, %esi
movq %r12, %rdi
callq 0x85e0
incq %r15
jmp 0x19c19
leaq 0x7ae1(%rip), %rsi      # 0x21746
movq -0x30(%rbp), %rbx
movq %rbx, %rdi
callq 0x14ab6
cmpq 0xa0(%rbx), %rax
je 0x1a245
movq %rax, %r12
addq $0x20, %r12
pushq $0x3b
popq %rsi
movq %r12, %rdi
xorl %edx, %edx
callq 0x86b0
movq %rax, %r13
leaq -0xb8(%rbp), %rbx
movq %rbx, %rdi
movq %r12, %rsi
xorl %edx, %edx
movq %rax, %rcx
callq 0x8580
leaq -0x150(%rbp), %rax
movq %rax, -0x10(%rax)
movq (%rbx), %rcx
leaq -0xa8(%rbp), %r15
cmpq %r15, %rcx
je 0x19cdd
movq %rcx, -0x160(%rbp)
movq -0xa8(%rbp), %rax
movq %rax, -0x150(%rbp)
jmp 0x19ce4
movups (%r15), %xmm0
movups %xmm0, (%rax)
leaq -0xb8(%rbp), %rdi
movq 0x8(%rdi), %rax
leaq -0x160(%rbp), %rbx
movq %rax, 0x8(%rbx)
movq %r15, (%rdi)
andq $0x0, 0x8(%rdi)
movb $0x0, 0x10(%rdi)
callq 0x8280
leaq 0x8137(%rip), %rsi      # 0x21e49
movq %rbx, %rdi
callq 0xaa85
testb %al, %al
je 0x1a235
cmpq $-0x1, %r13
je 0x19d80
incq %r13
pushq $0x3d
popq %rsi
movq %r12, %rdi
movq %r13, %rdx
callq 0x86b0
leaq 0x1(%rax), %rdx
leaq -0x140(%rbp), %rdi
pushq $-0x1
popq %rcx
movq %r12, %rsi
callq 0x8580
movq %r15, -0xb8(%rbp)
movq %r15, %rcx
leaq -0x130(%rbp), %r15
movq -0x10(%r15), %rax
cmpq %r15, %rax
je 0x19d92
movq %rax, -0xb8(%rbp)
movq -0x130(%rbp), %rax
movq %rax, -0xa8(%rbp)
jmp 0x19d99
movq -0x30(%rbp), %rax
movw $0x1, 0x121(%rax)
jmp 0x1a224
movups (%r15), %xmm0
movups %xmm0, (%rcx)
leaq -0x140(%rbp), %rbx
movq 0x8(%rbx), %rax
movq %rax, -0xb0(%rbp)
movq %r15, (%rbx)
andq $0x0, 0x8(%rbx)
movb $0x0, 0x10(%rbx)
movq %rbx, %rdi
callq 0x8280
movq %r15, (%rbx)
leaq -0x140(%rbp), %rdi
movq -0x78(%rbp), %rsi
movq %r14, %rdx
callq 0xa388
leaq -0x88(%rbp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
movb $0x0, (%rax)
xorps %xmm0, %xmm0
movaps %xmm0, -0x70(%rbp)
andq $0x0, -0x60(%rbp)
leaq 0x8062(%rip), %rsi      # 0x21e5d
leaq -0x1c0(%rbp), %rdi
leaq -0xb8(%rbp), %rdx
callq 0x1a688
movq -0x30(%rbp), %rbx
leaq 0x8044(%rip), %rsi      # 0x21e5d
leaq -0xf8(%rbp), %rdi
leaq -0xb8(%rbp), %rdx
callq 0x1a688
leaq 0x802d(%rip), %rdx      # 0x21e60
leaq -0x1a0(%rbp), %rdi
leaq -0xf8(%rbp), %rsi
callq 0x1a6fe
leaq -0xf8(%rbp), %rdi
callq 0x8280
leaq 0xd0(%rbx), %rax
movq %rax, -0x120(%rbp)
xorl %ebx, %ebx
xorl %r12d, %r12d
movq -0x78(%rbp), %r13
cmpq %r14, %r13
je 0x1a1da
movq %r13, %r15
movzbl (%r13), %eax
cmpl $0xa, %eax
je 0x19e9d
cmpl $0xd, %eax
leaq -0x98(%rbp), %rdi
jne 0x19e90
testb $0x1, %bl
je 0x19f0c
movsbl %al, %esi
callq 0x84a0
movq %r15, %r13
jmp 0x19f0f
leaq -0x98(%rbp), %r13
movq %r13, %rdi
leaq -0x1c0(%rbp), %rsi
callq 0xa708
testb %al, %al
je 0x19ed9
andq $0x0, -0x90(%rbp)
movq -0x98(%rbp), %rax
movb $0x0, (%rax)
leaq -0x70(%rbp), %rdi
callq 0x1a728
xorl %r12d, %r12d
movb $0x1, %bl
jmp 0x19f0c
movq %r13, %rdi
leaq -0x1a0(%rbp), %rsi
callq 0xa708
testb %al, %al
je 0x19f17
andq $0x0, -0x90(%rbp)
movq -0x98(%rbp), %rax
movb $0x0, (%rax)
leaq -0x70(%rbp), %rdi
callq 0x1a728
xorl %ebx, %ebx
xorl %r12d, %r12d
movq %r15, %r13
incq %r13
jmp 0x19e69
testb $0x1, %bl
je 0x19f36
cmpl $0x1, %r12d
jg 0x19f4d
leaq -0x70(%rbp), %rdi
movq %r13, %rsi
callq 0x1a736
movq %r15, %r13
incl %r12d
jmp 0x19f39
movq %r15, %r13
andq $0x0, -0x90(%rbp)
movq -0x98(%rbp), %rax
movb $0x0, (%rax)
jmp 0x19f0f
cmpl $0x2, %r12d
jne 0x19ff7
movq -0x70(%rbp), %rsi
leaq -0xf8(%rbp), %rdi
callq 0x8720
leaq -0x180(%rbp), %r13
movq %r13, %rdi
leaq 0x7eec(%rip), %rsi      # 0x21e64
leaq -0x118(%rbp), %rdx
callq 0x9dd6
leaq -0x108(%rbp), %r12
leaq -0xf8(%rbp), %rdi
movq %r13, %rsi
xorl %edx, %edx
callq 0x8970
cmpq $-0x1, %rax
je 0x1a026
addq -0x178(%rbp), %rax
cmpq -0xf0(%rbp), %rax
jae 0x1a026
incq %rax
leaq -0x50(%rbp), %rdi
leaq -0xf8(%rbp), %rsi
movq %rax, %rdx
pushq $-0x1
popq %rcx
callq 0x8580
movq %r12, -0x118(%rbp)
movq -0x50(%rbp), %rax
leaq -0x40(%rbp), %r13
cmpq %r13, %rax
je 0x1a03f
movq %rax, -0x118(%rbp)
movq -0x40(%rbp), %rax
movq %rax, -0x108(%rbp)
jmp 0x1a049
movq %r13, %rdi
movq %r15, %r13
movsbl (%r15), %esi
callq 0x84a0
movq -0x30(%rbp), %rax
movq 0xd8(%rax), %rdi
addq $-0x40, %rdi
leaq -0x98(%rbp), %rsi
callq 0x8930
jmp 0x19f39
movq -0x30(%rbp), %rax
movw $0x1, 0x121(%rax)
xorl %r13d, %r13d
pushq $0x2
popq %r12
jmp 0x1a1b6
movups (%r13), %xmm0
movups %xmm0, (%r12)
movq -0x48(%rbp), %rax
movq %rax, -0x110(%rbp)
movq %r13, -0x50(%rbp)
andq $0x0, -0x48(%rbp)
movb $0x0, -0x40(%rbp)
leaq -0x50(%rbp), %r13
movq %r13, %rdi
callq 0x8280
leaq -0x118(%rbp), %r12
movq %r12, %rdi
pushq $0x2
popq %rsi
pushq $0x22
popq %rdx
callq 0x86b0
movq %r13, %rdi
movq %r12, %rsi
pushq $0x1
popq %rdx
movq %rax, %rcx
callq 0x8580
leaq -0x40(%rbp), %r12
movq -0x120(%rbp), %rdi
movq %r13, %rsi
callq 0x1a77c
movq %r13, %rdi
callq 0x8280
movq -0x70(%rbp), %rdi
addq $0x20, %rdi
pushq $0x3a
popq %rsi
xorl %edx, %edx
callq 0x86b0
cmpq $-0x1, %rax
je 0x1a116
leaq 0x1(%rax), %rcx
movq -0x70(%rbp), %rsi
cmpq 0x28(%rsi), %rcx
jae 0x1a116
addq $0x20, %rsi
addq $0x2, %rax
leaq -0xd8(%rbp), %rdi
movq %rax, %rdx
pushq $-0x1
popq %rcx
callq 0x8580
movq %r12, -0x50(%rbp)
movq -0xd8(%rbp), %rax
leaq -0xc8(%rbp), %rcx
cmpq %rcx, %rax
je 0x1a12a
movq %rax, -0x50(%rbp)
movq -0xc8(%rbp), %rax
movq %rax, -0x40(%rbp)
jmp 0x1a132
movq -0x30(%rbp), %rax
movw $0x1, 0x121(%rax)
xorl %r13d, %r13d
pushq $0x2
jmp 0x1a1a8
movups (%rcx), %xmm0
movups %xmm0, (%r12)
movq -0xd0(%rbp), %rax
movq %rax, -0x48(%rbp)
movq %rcx, -0xd8(%rbp)
andq $0x0, -0xd0(%rbp)
movb $0x0, -0xc8(%rbp)
leaq -0xd8(%rbp), %r12
movq %r12, %rdi
callq 0x8280
movq -0x30(%rbp), %rax
movq 0xd8(%rax), %r13
movq -0x48(%rbp), %rcx
decq %rcx
movq %r12, %rdi
leaq -0x50(%rbp), %rsi
pushq $0x1
popq %rdx
callq 0x8580
addq $-0x20, %r13
movq %r13, %rdi
movq %r12, %rsi
callq 0x8330
movq %r12, %rdi
callq 0x8280
leaq -0x50(%rbp), %rdi
callq 0x8280
movb $0x1, %r13b
pushq $0x3
popq %r12
leaq -0x118(%rbp), %rdi
callq 0x8280
leaq -0x180(%rbp), %rdi
callq 0x8280
leaq -0xf8(%rbp), %rdi
callq 0x8280
testb %r13b, %r13b
movq %r15, %r13
jne 0x19f39
leaq -0x1a0(%rbp), %rdi
callq 0x8280
leaq -0x1c0(%rbp), %rdi
callq 0x8280
leaq -0x70(%rbp), %rdi
callq 0x1a7c2
leaq -0x98(%rbp), %rdi
callq 0x8280
leaq -0x140(%rbp), %rdi
callq 0x8280
leaq -0xb8(%rbp), %rdi
callq 0x8280
cmpq %r14, %r13
je 0x1a235
leaq -0x160(%rbp), %rdi
callq 0x8280
pushq $0x1
popq %rax
jmp 0x1a250
leaq -0x160(%rbp), %rdi
callq 0x8280
movq -0x30(%rbp), %rbx
movw $0x101, 0x121(%rbx)     # imm = 0x101
xorl %eax, %eax
addq $0x198, %rsp            # imm = 0x198
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq -0xd8(%rbp), %rdi
callq 0x8280
jmp 0x1a27a
jmp 0x1a277
jmp 0x1a285
movq %rax, %rbx
leaq -0x50(%rbp), %rdi
callq 0x8280
jmp 0x1a288
movq %rax, %rbx
leaq -0x118(%rbp), %rdi
callq 0x8280
jmp 0x1a299
movq %rax, %rbx
leaq -0x180(%rbp), %rdi
callq 0x8280
jmp 0x1a2aa
movq %rax, %rbx
leaq -0xf8(%rbp), %rdi
callq 0x8280
jmp 0x1a2dd
jmp 0x1a2da
movq %rax, %rbx
leaq -0xf8(%rbp), %rdi
jmp 0x1a2e4
movq %rax, %rbx
jmp 0x1a2e9
movq %rax, %rbx
jmp 0x1a2f5
movq %rax, %rbx
jmp 0x1a316
movq %rax, %rbx
jmp 0x1a322
movq %rax, %rbx
leaq -0x1a0(%rbp), %rdi
callq 0x8280
leaq -0x1c0(%rbp), %rdi
callq 0x8280
leaq -0x70(%rbp), %rdi
callq 0x1a7c2
leaq -0x98(%rbp), %rdi
callq 0x8280
leaq -0x140(%rbp), %rdi
callq 0x8280
leaq -0xb8(%rbp), %rdi
callq 0x8280
leaq -0x160(%rbp), %rdi
callq 0x8280
movq %rbx, %rdi
callq 0x8850