// File: /workspace/github_cpp_makefile_star2_O1/zeeev[P]DASVC/bamtools/src/api/internal/io/HttpHeader_p.cpp
// Function: BamTools::Internal::HttpHeader::Parse(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
void HttpHeader::Parse(const string& s) {

    // trim whitespace from input string
    const string trimmed = Trim(s);

    // split into list of header lines
    vector<string> rawFields = Split(trimmed, Constants::NEWLINE_CHAR);

    // prep our 'cleaned' fields container
    vector<string> cleanFields;
    cleanFields.reserve(rawFields.size());

    // remove any empty fields and clean any trailing windows-style carriage returns ('\r')
    vector<string>::iterator rawFieldIter = rawFields.begin();
    vector<string>::iterator rawFieldEnd  = rawFields.end();
    for ( ; rawFieldIter != rawFieldEnd; ++rawFieldIter ) {
        string& field = (*rawFieldIter);

        // skip empty fields
        if ( field.empty() )
            continue;

        // remove carriage returns
        const size_t fieldSize = field.size();
        if ( field[fieldSize-1] == Constants::CAR_RET_CHAR )
            field.resize(fieldSize-1);

        // store cleaned field
        cleanFields.push_back(field);
    }

    // skip add'l processing if nothing here
    if ( cleanFields.empty() )
        return;

    // parse header lines
    int lineNumber = 0;
    vector<string>::const_iterator fieldIter = cleanFields.begin();
    vector<string>::const_iterator fieldEnd  = cleanFields.end();
    for ( ; fieldIter != fieldEnd; ++fieldIter, ++lineNumber ) {
        if ( !ParseLine( (*fieldIter), lineNumber ) ) {
            m_isValid = false;
            return;
        }
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1e8, %rsp            # imm = 0x1E8
movq %rdi, %rbx
leaq 0x40(%rsp), %r14
movq %r14, %rdi
callq 0x4c69c
leaq 0x60(%rsp), %rdi
movq %r14, %rsi
movl $0x18, %edx
callq 0x28750
leaq 0x30(%rsp), %r13
movq %r13, -0x10(%r13)
xorl %eax, %eax
movq %rax, -0x8(%r13)
movb $0x0, (%r13)
xorps %xmm0, %xmm0
movq %rsp, %r14
movaps %xmm0, (%r14)
movq %rax, 0x10(%r14)
leaq 0x60(%rsp), %r15
leaq 0x20(%rsp), %r12
movq %r15, %rdi
movq %r12, %rsi
movl $0xa, %edx
callq 0x28eb0
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0x4c45c
movq %r14, %rdi
movq %r12, %rsi
callq 0x26ab0
jmp 0x4c431
movq 0x20(%rsp), %rdi
cmpq %r13, %rdi
je 0x4c46b
callq 0x27560
leaq 0x60(%rsp), %rdi
callq 0x270d0
xorps %xmm0, %xmm0
leaq 0x60(%rsp), %rdi
movaps %xmm0, (%rdi)
movq $0x0, 0x10(%rdi)
movq 0x8(%rsp), %rsi
subq (%rsp), %rsi
sarq $0x5, %rsi
callq 0x27ce0
movq (%rsp), %r14
movq 0x8(%rsp), %r12
cmpq %r12, %r14
je 0x4c4e1
leaq 0x60(%rsp), %r15
movq 0x8(%r14), %rsi
testq %rsi, %rsi
je 0x4c4d8
movq (%r14), %rax
cmpb $0xd, -0x1(%rax,%rsi)
jne 0x4c4cd
decq %rsi
movq %r14, %rdi
xorl %edx, %edx
callq 0x26590
movq %r15, %rdi
movq %r14, %rsi
callq 0x26ab0
addq $0x20, %r14
cmpq %r12, %r14
jne 0x4c4ad
movq 0x60(%rsp), %r14
movq 0x68(%rsp), %r15
cmpq %r15, %r14
je 0x4c515
xorl %ebp, %ebp
movq (%rbx), %rax
movq %rbx, %rdi
movq %r14, %rsi
movl %ebp, %edx
callq *0x18(%rax)
testb %al, %al
je 0x4c511
addq $0x20, %r14
incl %ebp
cmpq %r15, %r14
jne 0x4c4f2
jmp 0x4c515
movb $0x0, 0x38(%rbx)
leaq 0x60(%rsp), %rdi
callq 0x270a0
movq %rsp, %rdi
callq 0x270a0
leaq 0x50(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x4c53a
callq 0x27560
addq $0x1e8, %rsp            # imm = 0x1E8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
jmp 0x4c567
jmp 0x4c55a
movq %rax, %rbx
jmp 0x4c597
jmp 0x4c55a
movq %rax, %rbx
leaq 0x60(%rsp), %rdi
callq 0x270a0
movq %rsp, %rdi
callq 0x270a0
jmp 0x4c597
jmp 0x4c5b2
movq %rax, %rbx
movq %rsp, %rdi
callq 0x270a0
movq 0x20(%rsp), %rdi
cmpq %r13, %rdi
je 0x4c58d
callq 0x27560
leaq 0x60(%rsp), %rdi
callq 0x270d0
leaq 0x50(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x4c5aa
callq 0x27560
movq %rbx, %rdi
callq 0x28c20
movq %rax, %rdi
callq 0x2f0bd