// File: /workspace/github_cpp_makefile_star2_O3/trisolaris233[P]httpc/src/connection.hpp
// Function: httpc::Connection::HandleRead_(boost::system::error_code const&, unsigned long)
void HandleRead_(
            boost::system::error_code const& ec, std::size_t bytes_transferred
        ) {
            auto parse_res = 
                this->parser_.Parse(
                    this->request_, this->buffer_.data(),
                    this->buffer_.data() + bytes_transferred
                );
            auto res_enum = std::get<0>(parse_res);
            // if a request if parsed completely
            if (res_enum == RequestParser::kGood) {
                // all the headers is read
                // then check the alive state
                this->CheckKeepAlive_();
                // update the uri required
                this->request_.uri.Update();
                auto itr = this->request_.FindHeader("Content-Length");
                if (itr == this->request_.HeaderCEnd()) {
                    // if not found
                    // find the route
                    this->http_router_.Route(
                        this->request_.method,
                        this->request_.uri.GetUri(), 
                        this->request_, 
                        this->response_
                    );
                    this->handler_.Respond(
                        this->request_,
                        this->response_
                    );
                    this->DoWrite();
                } else {
                    // call once the user bussiness
                    // pass the judgement of whether receive the next file
                    // to user.
                    this->http_router_.Route(
                        this->request_.method,
                        this->request_.uri.GetUri(), 
                        this->request_, 
                        this->response_
                    );

                    auto itr2 = this->request_.FindHeader("Content-Type");
                    if (itr2 != this->request_.HeaderCEnd()
                        && itr2->value.find_first_of("multipart/formdata") != std::string::npos) {

                        if (this->request_.RecvNextFileOrNot()) {
                            debug().dg("here try to read post body").lf();
                            // debug().dg(this->socket_.available()).lf();
                            this->ReadBody();
                            return;
                        }
                    }
                    this->handler_.Respond(
                        this->request_,
                        this->response_
                    );
                    this->DoWrite();
                    
                    
                }
                // debug().dg("invoke this->readbody()").lf();
                //this->ResetKeepAliveTimer();
            } else if (res_enum == RequestParser::kIndeterminate) {
                //this->ResetKeepAliveTimer();
                this->DoRead();
            } else {   // make a bad request.
                this->response_.SetDefault(HTTPStatusCodeEnum::kBadRequest);
                this->DoWrite();
            }
        }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
leaq 0x268(%rdi), %rsi
leaq 0x2a8(%rdi), %r14
leaq 0x68(%rdi), %rcx
leaq 0x68(%rdi,%rdx), %r8
leaq -0x38(%rbp), %r15
movq %r15, %rdi
movq %r14, %rdx
callq 0x16ad4
movl 0x8(%r15), %eax
cmpl $0x2, %eax
je 0x169cb
testl %eax, %eax
jne 0x169d8
movq %rbx, %rdi
callq 0x16bc8
leaq 0x2c8(%rbx), %rdi
movq %rdi, %rsi
callq 0x177d4
movq 0x340(%rbx), %r15
cmpq 0x348(%rbx), %r15
je 0x16a4e
leaq 0xde12(%rip), %r12      # 0x247b9
movq %r15, %rdi
movq %r12, %rsi
callq 0x81a0
movq 0x348(%rbx), %rcx
testl %eax, %eax
je 0x169ee
addq $0x40, %r15
cmpq %rcx, %r15
jne 0x169a7
jmp 0x16a4e
movq %rbx, %rdi
callq 0x1542a
jmp 0x16a88
leaq 0x3d0(%rbx), %rdi
movl $0x190, %esi            # imm = 0x190
callq 0xa54e
jmp 0x16a80
cmpq %rcx, %r15
je 0x16a4e
movq 0x10(%rbx), %rdi
leaq 0x2e8(%rbx), %rdx
leaq 0x3d0(%rbx), %r15
movq %r14, %rsi
movq %r14, %rcx
movq %r15, %r8
callq 0x16e1e
movq 0x340(%rbx), %r12
movq 0x348(%rbx), %rdi
cmpq %rdi, %r12
je 0x16a97
leaq 0xdd19(%rip), %r13      # 0x24746
movq %r12, %rdi
movq %r13, %rsi
callq 0x81a0
movq 0x348(%rbx), %rcx
testl %eax, %eax
je 0x16a9c
addq $0x40, %r12
cmpq %rcx, %r12
jne 0x16a2d
jmp 0x16a6e
movq 0x10(%rbx), %rdi
leaq 0x2e8(%rbx), %rdx
leaq 0x3d0(%rbx), %r15
movq %r14, %rsi
movq %r14, %rcx
movq %r15, %r8
callq 0x16e1e
leaq 0x490(%rbx), %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x22dac
movq %rbx, %rdi
callq 0x172d6
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %r12, %rcx
jmp 0x16a9f
movq %r12, %rdi
cmpq %rcx, %rdi
je 0x16a6e
addq $0x20, %rdi
leaq 0xe106(%rip), %rsi      # 0x24bb5
movl $0x12, %ecx
xorl %edx, %edx
callq 0x8760
cmpq $-0x1, %rax
je 0x16a6e
cmpb $0x1, 0x3c8(%rbx)
jne 0x16a6e
movq %rbx, %rdi
callq 0x1737c
jmp 0x16a88