// File: /workspace/github_cpp_makefile_star2_O3/trisolaris233[P]httpc/src/request_parser.hpp
// Function: httpc::RequestParser::ResultType httpc::RequestParser::ParseFormData<char*>(httpc::Request&, char*, char*)
ResultType ParseFormData (
            Request& request, InputIterator begin, InputIterator end
        ) {
            try {
                this->ptr_form_data_ = std::make_shared<FormDataBodyTmp_>();
            } catch(const std::bad_alloc& e) {
                throw e;
            }

            std::vector<std::string> res;
            auto itr = request.FindHeader("Content-Type");
            if (itr == request.HeaderCEnd()) {
                return kBad;
            }
            
            auto pos = itr->value.find("boundary=");
            if (pos == std::string::npos) {
                return kBad;
            }
            std::string src(begin, end),
                        start_boundary(std::string("--") + std::string(
                            itr->value.begin() + pos + 9,
                            itr->value.end()
                        )),
                        end_boundary(start_boundary + "--");
            boost::split(res, src, boost::is_any_of("\r\n"));
            std::cout   << "start_boundary => " << start_boundary << std::endl
                        << "end_boundary => " << end_boundary << std::endl << std::endl;
            bool    void_line_flag = false,
                    boundary_start_flag = false;
            for (const auto& line : res) {
                if (line.empty()) {
                    if (void_line_flag) {
                        if (boundary_start_flag) {
                            
                        }
                    }
                }
                if (line == start_boundary) {

                } else if (line == end_boundary) {

                }
                for (auto chr : line) {
                    if (chr == '\n') {
                        std::cout << "\\n";
                    } else {
                        std::cout << chr;
                    }
                    
                }  
                std::cout << std::endl;    
                
            } 


            // ResultType res = kBad;
            // for (; begin != end; ++begin) {
            //     res = this->ParseFormData_(request, *begin);
            //     if (res == kBad) {
            //         return std::make_pair(res, end);
            //     } else if (res == kGood) {
            //         break;
            //     }
            // }

            // if (!this->ptr_form_data_->filename_.empty()
            //     || this->ptr_form_data_->filetype_.empty()) {
            //     request.files_.emplace_back(
            //         this->ptr_form_data_->filename_
            //     );
            //     request.files_.back().SetType(
            //         this->ptr_form_data_->filetype_
            //     );
            //     this->ptr_form_data_->filename_.clear();
            //     this->ptr_form_data_->filetype_.clear();
            // }
        }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xc8, %rsp
movq %rcx, %rbx
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %r12
movl $0x90, %edi
callq 0x8510
movabsq $0x100000001, %rcx      # imm = 0x100000001
movq %rcx, 0x8(%rax)
leaq 0x17929(%rip), %rcx     # 0x348c0
movq %rcx, (%rax)
leaq 0x10(%rax), %rcx
leaq 0x20(%rax), %rdx
xorps %xmm0, %xmm0
movups %xmm0, 0x30(%rax)
movups %xmm0, 0x50(%rax)
movups %xmm0, 0x70(%rax)
movups %xmm0, 0x20(%rax)
movups %xmm0, 0x40(%rax)
movups %xmm0, 0x60(%rax)
movups %xmm0, 0x80(%rax)
movq %rdx, 0x10(%rax)
movq $0x0, 0x18(%rax)
leaq 0x40(%rax), %rdx
movq %rdx, 0x30(%rax)
leaq 0x60(%rax), %rdx
movq %rdx, 0x50(%rax)
movq %rax, %rdx
subq $-0x80, %rdx
movq %rdx, 0x70(%rax)
movq %rcx, 0x30(%r12)
movq 0x38(%r12), %rdi
movq %rax, 0x38(%r12)
testq %rdi, %rdi
je 0x1d007
callq 0x118ea
xorps %xmm0, %xmm0
movaps %xmm0, -0x90(%rbp)
movq $0x0, -0x80(%rbp)
movq 0x98(%r15), %r12
movq 0xa0(%r15), %r13
cmpq %r13, %r12
je 0x1d051
leaq 0x7716(%rip), %r13      # 0x24746
movq %r12, %rdi
movq %r13, %rsi
callq 0x81a0
movq 0xa0(%r15), %rcx
testl %eax, %eax
je 0x1d056
addq $0x40, %r12
cmpq %rcx, %r12
jne 0x1d030
jmp 0x1d07b
movq %r12, %rcx
jmp 0x1d059
movq %r12, %r13
cmpq %rcx, %r13
je 0x1d07b
leaq 0x20(%r13), %rdi
leaq 0x7dfe(%rip), %rsi      # 0x24e67
movl $0x9, %ecx
xorl %edx, %edx
callq 0x8820
cmpq $-0x1, %rax
jne 0x1d09e
leaq -0x90(%rbp), %rdi
callq 0x1d4e0
movl $0x1, %eax
addq $0xc8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r15
leaq -0xd8(%rbp), %rax
movq %rax, -0x10(%rax)
leaq -0xe8(%rbp), %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0xb088
leaq -0x40(%rbp), %rax
movq %rax, -0x10(%rax)
leaq 0x7d89(%rip), %rsi      # 0x24e56
leaq 0x7d84(%rip), %rdx      # 0x24e58
leaq -0x50(%rbp), %rdi
callq 0x11e6e
movq 0x20(%r13), %rdx
leaq (%rdx,%r15), %rsi
addq $0x9, %rsi
addq 0x28(%r13), %rdx
leaq -0x60(%rbp), %r14
movq %r14, -0x10(%r14)
leaq -0x70(%rbp), %rdi
callq 0x1de4e
leaq -0xc8(%rbp), %rdi
leaq -0x50(%rbp), %rsi
leaq -0x70(%rbp), %rdx
callq 0x1dae7
movq -0x70(%rbp), %rdi
cmpq %r14, %rdi
je 0x1d127
movq -0x60(%rbp), %rsi
incq %rsi
callq 0x8520
movq -0x50(%rbp), %rdi
leaq -0x40(%rbp), %rax
cmpq %rax, %rdi
je 0x1d140
movq -0x40(%rbp), %rsi
incq %rsi
callq 0x8520
leaq 0x7d0f(%rip), %rdx      # 0x24e56
leaq -0x50(%rbp), %rdi
leaq -0xc8(%rbp), %rsi
callq 0x17cc9
leaq 0x7b2b(%rip), %rsi      # 0x24c89
leaq -0xa8(%rbp), %rdi
callq 0x1dd1b
leaq -0x90(%rbp), %rdi
leaq -0xe8(%rbp), %rsi
leaq -0xa8(%rbp), %rdx
movl $0x1, %ecx
callq 0x1db99
cmpq $0x11, -0x98(%rbp)
jb 0x1d1a4
movq -0xa8(%rbp), %rdi
testq %rdi, %rdi
je 0x1d1a4
callq 0x8640
movq 0x17de5(%rip), %rdi     # 0x34f90
leaq 0x7cbf(%rip), %rsi      # 0x24e71
movl $0x12, %edx
callq 0x85b0
movq -0xc8(%rbp), %rsi
movq -0xc0(%rbp), %rdx
movq 0x17dbf(%rip), %rdi     # 0x34f90
callq 0x85b0
movq %rax, %rdi
callq 0x82b0
movq %rax, %rbx
leaq 0x7c9c(%rip), %rsi      # 0x24e84
movl $0x10, %edx
movq %rax, %rdi
callq 0x85b0
movq -0x50(%rbp), %rsi
movq -0x48(%rbp), %rdx
movq %rbx, %rdi
callq 0x85b0
movq %rax, %rdi
callq 0x82b0
movq %rax, %rdi
callq 0x82b0
movq -0x90(%rbp), %rax
movq %rax, -0x30(%rbp)
movq 0x17d69(%rip), %rbx     # 0x34f90
leaq -0x70(%rbp), %r15
movq -0x30(%rbp), %rax
movq 0x8(%rax), %r12
testq %r12, %r12
je 0x1d27c
movq -0x30(%rbp), %rax
movq (%rax), %r13
xorl %r14d, %r14d
movb (%r13,%r14), %al
cmpb $0xa, %al
jne 0x1d261
movl $0x2, %edx
movq %rbx, %rdi
leaq 0x7be5(%rip), %rsi      # 0x24e3f
callq 0x85b0
jmp 0x1d274
movb %al, -0x70(%rbp)
movl $0x1, %edx
movq %rbx, %rdi
movq %r15, %rsi
callq 0x85b0
incq %r14
cmpq %r14, %r12
jne 0x1d242
movq %rbx, %rdi
callq 0x82b0
addq $0x20, -0x30(%rbp)
jmp 0x1d22b
jmp 0x1d2af
jmp 0x1d2af
movq %rax, %rbx
cmpq $0x11, -0x98(%rbp)
jb 0x1d2b2
movq -0xa8(%rbp), %rdi
testq %rdi, %rdi
je 0x1d2b2
callq 0x8640
jmp 0x1d2b2
movq %rax, %rbx
movq -0x50(%rbp), %rdi
leaq -0x40(%rbp), %rax
cmpq %rax, %rdi
je 0x1d2d0
movq -0x40(%rbp), %rsi
incq %rsi
callq 0x8520
jmp 0x1d2d0
movq %rax, %rbx
leaq -0xb8(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x1d324
movq -0xb8(%rbp), %rsi
jmp 0x1d317
movq %rax, %rbx
movq -0x70(%rbp), %rdi
cmpq %r14, %rdi
je 0x1d306
movq -0x60(%rbp), %rsi
incq %rsi
callq 0x8520
jmp 0x1d306
movq %rax, %rbx
movq -0x50(%rbp), %rdi
leaq -0x40(%rbp), %rax
cmpq %rax, %rdi
je 0x1d324
movq -0x40(%rbp), %rsi
incq %rsi
callq 0x8520
jmp 0x1d324
movq %rax, %rbx
movq -0xe8(%rbp), %rdi
leaq -0xd8(%rbp), %rax
cmpq %rax, %rdi
je 0x1d34b
movq -0xd8(%rbp), %rsi
incq %rsi
callq 0x8520
jmp 0x1d34b
movq %rax, %rbx
leaq -0x90(%rbp), %rdi
callq 0x1d4e0
jmp 0x1d39f
movq %rax, %rbx
cmpl $0x1, %edx
jne 0x1d39f
movq %rbx, %rdi
callq 0x8230
movl $0x8, %edi
callq 0x82c0
movq 0x17bf6(%rip), %rcx     # 0x34f70
addq $0x10, %rcx
movq %rcx, (%rax)
movq 0x17c10(%rip), %rsi     # 0x34f98
movq 0x17bc1(%rip), %rdx     # 0x34f50
movq %rax, %rdi
callq 0x8800
movq %rax, %rbx
callq 0x87e0
movq %rbx, %rdi
callq 0x8830
movq %rax, %rdi
callq 0x9e2e