// File: /workspace/github_cpp_makefile_star2_O3/boomanaiden154[P]HTTPClientHPP/./client.hpp
// Function: HTTPHeader::parse(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
void parse(std::string input)
    {
        if(parsingHeader)
        {
            buffer += input;
            if(bufferIndex == 0)
            {
                while(buffer[bufferIndex] != ' ')
                {
                    headerField1 += buffer[bufferIndex];
                    bufferIndex++;
                }
                bufferIndex++;
                while(buffer[bufferIndex] != ' ')
                {
                    headerField2 += buffer[bufferIndex];
                    bufferIndex++;
                }
                bufferIndex++;
                while(buffer[bufferIndex] != '\r')
                {
                    headerField3 += buffer[bufferIndex];
                    bufferIndex++;
                }
                bufferIndex += 2;
            }
            while(buffer[bufferIndex] != '\r' && buffer[bufferIndex + 1] != '\n' && bufferIndex < buffer.size())
            {
                if(parsingFieldName)
                {
                    while(buffer[bufferIndex] != ':' && buffer[bufferIndex + 1] != ' ' && bufferIndex < buffer.size())
                    {
                        fieldName += buffer[bufferIndex];
                        bufferIndex++;
                    }
                    bufferIndex += 2;
                    parsingFieldName = false;
                }
                else
                {
                    //for some sites that send extra spaces preceding values in the header
                    //not sure if this is compliant with the HTTP specification, but here it is
                    while(buffer[bufferIndex] == ' ')
                    {
                        bufferIndex++;
                    }
                    while(buffer[bufferIndex] != '\r' && buffer[bufferIndex + 1] != '\n' && bufferIndex < buffer.size())
                    {
                        fieldValue += buffer[bufferIndex];
                        bufferIndex++;
                    }
                    bufferIndex += 2;
                    std::transform(fieldName.begin(), fieldName.end(), fieldName.begin(), [](unsigned char c){ return std::tolower(c); });
                    std::transform(fieldValue.begin(), fieldValue.end(), fieldValue.begin(), [](unsigned char c){ return std::tolower(c); });
                    headers.insert(std::pair<std::string,std::string>(fieldName,fieldValue));
                    fieldName.clear();
                    fieldValue.clear();
                    parsingFieldName = true;
                }
            }
            if(buffer[bufferIndex - 2] == '\r' && buffer[bufferIndex - 1] == '\n' && buffer[bufferIndex] == '\r' && buffer[bufferIndex + 1] == '\n')
            {
                bufferIndex += 2; //for final \r\n
                parseData(buffer.substr(bufferIndex, buffer.size() - bufferIndex));
                parsingHeader = false;
                if(headers.find("content-length") != headers.end() && std::stoi(headers.find("content-length")->second) <= body.size())
                {
                    isDone = true;
                }
            }
        }
        else
        {
            parseData(input);
            if(headers.find("content-length") != headers.end() && std::stoi(headers.find("content-length")->second) == body.size())
            {
                isDone = true;
            }
        }
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x88, %rsp
movq %rdi, %rbx
cmpb $0x1, 0x121(%rdi)
jne 0x3be2
leaq 0xb8(%rbx), %rdi
movq (%rsi), %rax
movq 0x8(%rsi), %rdx
movq %rdi, -0x90(%rbp)
movq %rax, %rsi
callq 0x20b0
movl 0xd8(%rbx), %eax
movq 0xb8(%rbx), %rcx
testl %eax, %eax
jne 0x3bcb
movb (%rcx), %dl
movl $0x1, %eax
cmpb $0x20, %dl
je 0x3b3b
leaq 0x38(%rbx), %r15
movsbl %dl, %esi
movq %r15, %rdi
callq 0x21a0
movslq 0xd8(%rbx), %rax
leaq 0x1(%rax), %rcx
movl %ecx, 0xd8(%rbx)
movq 0xb8(%rbx), %rcx
movb 0x1(%rcx,%rax), %dl
cmpb $0x20, %dl
jne 0x3b0c
addl $0x2, %eax
movl %eax, 0xd8(%rbx)
movslq %eax, %rdx
movb (%rcx,%rdx), %dl
cmpb $0x20, %dl
je 0x3b7c
leaq 0x58(%rbx), %r15
movsbl %dl, %esi
movq %r15, %rdi
callq 0x21a0
movslq 0xd8(%rbx), %rdx
leaq 0x1(%rdx), %rax
movl %eax, 0xd8(%rbx)
movq 0xb8(%rbx), %rcx
movb 0x1(%rcx,%rdx), %dl
cmpb $0x20, %dl
jne 0x3b50
movslq %eax, %rdx
leaq 0x1(%rdx), %rsi
movl %esi, 0xd8(%rbx)
movb 0x1(%rcx,%rdx), %dl
cmpb $0xd, %dl
je 0x3bc2
leaq 0x78(%rbx), %r15
movsbl %dl, %esi
movq %r15, %rdi
callq 0x21a0
movslq 0xd8(%rbx), %rax
leaq 0x1(%rax), %rcx
movl %ecx, 0xd8(%rbx)
movq 0xb8(%rbx), %rcx
movb 0x1(%rcx,%rax), %dl
cmpb $0xd, %dl
jne 0x3b96
addl $0x3, %eax
movl %eax, 0xd8(%rbx)
movslq %eax, %rdi
movb (%rcx,%rdi), %dl
cmpb $0xd, %dl
jne 0x3cd5
xorl %r14d, %r14d
jmp 0x3f29
movq %rbx, %rdi
callq 0x45c6
leaq -0x78(%rbp), %r15
movq %r15, -0x10(%r15)
leaq 0x1482(%rip), %rsi      # 0x507b
leaq 0x1489(%rip), %rdx      # 0x5089
leaq -0x88(%rbp), %rdi
callq 0x4a42
leaq -0x88(%rbp), %rsi
movq %rbx, %rdi
callq 0x4ae0
leaq 0x8(%rbx), %rcx
cmpq %rcx, %rax
je 0x3ef3
leaq -0x38(%rbp), %rax
movq %rax, -0x10(%rax)
leaq 0x1444(%rip), %rsi      # 0x507b
leaq 0x144b(%rip), %rdx      # 0x5089
leaq -0x48(%rbp), %rdi
callq 0x4a42
leaq -0x48(%rbp), %rsi
movq %rbx, %rdi
callq 0x4ae0
movq 0x40(%rax), %r15
callq 0x2050
movq %rax, %r14
movl (%rax), %r13d
movl $0x0, (%rax)
leaq -0xa8(%rbp), %r12
movq %r15, %rdi
movq %r12, %rsi
movl $0xa, %edx
callq 0x2260
cmpq %r15, (%r12)
je 0x4074
movslq %eax, %rcx
cmpq %rax, %rcx
jne 0x4080
movl (%r14), %ecx
cmpl $0x22, %ecx
je 0x4080
testl %ecx, %ecx
jne 0x3ca8
movl %r13d, (%r14)
cmpq %rax, 0xa0(%rbx)
sete %r14b
movq -0x48(%rbp), %rdi
leaq -0x38(%rbp), %rax
cmpq %rax, %rdi
je 0x3ccc
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x21f0
leaq -0x78(%rbp), %r15
jmp 0x3ef6
leaq 0x100(%rbx), %r15
leaq 0xe0(%rbx), %r12
movq %r12, -0x98(%rbp)
movq %r15, -0xa0(%rbp)
movslq %eax, %rsi
cmpb $0xa, 0x1(%rcx,%rsi)
sete %r8b
cmpq %rdi, 0xc0(%rbx)
setbe %r14b
orb %r8b, %r14b
jne 0x3f23
cmpb $0x0, 0x120(%rbx)
je 0x3d5d
cmpb $0x3a, %dl
je 0x3d94
movslq %eax, %rdi
cmpb $0x20, 0x1(%rcx,%rdi)
je 0x3d94
cmpq %rsi, 0xc0(%rbx)
jbe 0x3d94
movsbl %dl, %esi
movq %r12, %rdi
callq 0x21a0
movslq 0xd8(%rbx), %rax
leaq 0x1(%rax), %rsi
movl %esi, 0xd8(%rbx)
movq 0xb8(%rbx), %rcx
movb 0x1(%rcx,%rax), %dl
movl %esi, %eax
jmp 0x3d1a
cmpb $0x20, %dl
jne 0x3da9
leaq (%rcx,%rsi), %rdx
incq %rdx
shlq $0x20, %rsi
movabsq $0x100000000, %rdi      # imm = 0x100000000
addq %rdi, %rsi
incl %eax
movl %eax, 0xd8(%rbx)
cmpb $0x20, (%rdx)
leaq 0x1(%rdx), %rdx
je 0x3d77
sarq $0x20, %rsi
movb (%rcx,%rsi), %dl
jmp 0x3da4
addl $0x2, %eax
movl %eax, 0xd8(%rbx)
xorl %edx, %edx
jmp 0x3edc
cmpb $0xd, %dl
je 0x3de7
movslq %eax, %rdi
cmpb $0xa, 0x1(%rcx,%rdi)
je 0x3de7
cmpq %rsi, 0xc0(%rbx)
jbe 0x3de7
movsbl %dl, %esi
movq %r15, %rdi
callq 0x21a0
movslq 0xd8(%rbx), %rax
leaq 0x1(%rax), %rsi
movl %esi, 0xd8(%rbx)
movq 0xb8(%rbx), %rcx
movb 0x1(%rcx,%rax), %dl
movl %esi, %eax
jmp 0x3da4
addl $0x2, %eax
movl %eax, 0xd8(%rbx)
movq 0xe8(%rbx), %r13
testq %r13, %r13
je 0x3e1c
movq 0xe0(%rbx), %r12
xorl %r15d, %r15d
movzbl (%r12,%r15), %edi
callq 0x22a0
movb %al, (%r12,%r15)
incq %r15
cmpq %r15, %r13
jne 0x3e06
movq 0x108(%rbx), %r13
testq %r13, %r13
je 0x3e48
movq 0x100(%rbx), %r12
xorl %r15d, %r15d
movzbl (%r12,%r15), %edi
callq 0x22a0
movb %al, (%r12,%r15)
incq %r15
cmpq %r15, %r13
jne 0x3e32
leaq -0x88(%rbp), %r13
movq %r13, %rdi
movq -0x98(%rbp), %r12
movq %r12, %rsi
movq -0xa0(%rbp), %r15
movq %r15, %rdx
callq 0x4558
movq %rbx, %rdi
movq %r13, %rsi
callq 0x4350
movq -0x68(%rbp), %rdi
leaq -0x58(%rbp), %rax
cmpq %rax, %rdi
je 0x3e8f
movq -0x58(%rbp), %rsi
incq %rsi
callq 0x21f0
movq -0x88(%rbp), %rdi
leaq -0x78(%rbp), %rax
cmpq %rax, %rdi
je 0x3eab
movq -0x78(%rbp), %rsi
incq %rsi
callq 0x21f0
xorl %ecx, %ecx
movq %rcx, 0xe8(%rbx)
movq 0xe0(%rbx), %rax
movb %cl, (%rax)
movq %rcx, 0x108(%rbx)
movq 0x100(%rbx), %rax
movb %cl, (%rax)
movl 0xd8(%rbx), %eax
movq 0xb8(%rbx), %rcx
movb $0x1, %dl
movb %dl, 0x120(%rbx)
movslq %eax, %rdi
movb (%rcx,%rdi), %dl
cmpb $0xd, %dl
jne 0x3cf1
jmp 0x3f29
xorl %r14d, %r14d
movq -0x88(%rbp), %rdi
cmpq %r15, %rdi
je 0x3f0e
movq -0x78(%rbp), %rsi
incq %rsi
callq 0x21f0
testb %r14b, %r14b
je 0x4062
movb $0x1, 0x122(%rbx)
jmp 0x4062
movb $0x1, %r14b
movq %rsi, %rdi
cmpb $0xd, -0x2(%rcx,%rdi)
jne 0x4062
cmpb $0xa, -0x1(%rcx,%rdi)
setne %dl
orb %dl, %r14b
jne 0x4062
cmpb $0xa, 0x1(%rcx,%rdi)
jne 0x4062
addl $0x2, %eax
movl %eax, 0xd8(%rbx)
movslq %eax, %rdx
movq 0xc0(%rbx), %rcx
subq %rdx, %rcx
leaq -0x88(%rbp), %r15
movq %r15, %rdi
movq -0x90(%rbp), %rsi
callq 0x2210
movq %rbx, %rdi
movq %r15, %rsi
callq 0x45c6
leaq -0x78(%rbp), %r14
movq -0x10(%r14), %rdi
cmpq %r14, %rdi
je 0x3fa0
movq -0x78(%rbp), %rsi
incq %rsi
callq 0x21f0
movb $0x0, 0x121(%rbx)
leaq -0x88(%rbp), %rdi
movq %r14, (%rdi)
leaq 0x10c3(%rip), %rsi      # 0x507b
leaq 0x10ca(%rip), %rdx      # 0x5089
callq 0x4a42
leaq -0x88(%rbp), %rsi
movq %rbx, %rdi
callq 0x4ae0
leaq 0x8(%rbx), %rcx
cmpq %rcx, %rax
je 0x403e
leaq -0x38(%rbp), %r15
movq %r15, -0x10(%r15)
leaq 0x1090(%rip), %rsi      # 0x507b
leaq 0x1097(%rip), %rdx      # 0x5089
leaq -0x48(%rbp), %rdi
callq 0x4a42
leaq -0x48(%rbp), %rsi
movq %rbx, %rdi
callq 0x4ae0
addq $0x40, %rax
movq %rax, %rdi
xorl %esi, %esi
movl $0xa, %edx
callq 0x4191
cltq
cmpq %rax, 0xa0(%rbx)
setae %r12b
movq -0x48(%rbp), %rdi
cmpq %r15, %rdi
je 0x4041
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x21f0
jmp 0x4041
xorl %r12d, %r12d
movq -0x88(%rbp), %rdi
cmpq %r14, %rdi
je 0x4059
movq -0x78(%rbp), %rsi
incq %rsi
callq 0x21f0
testb %r12b, %r12b
jne 0x3f17
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0xfcb(%rip), %rdi       # 0x5046
callq 0x2140
leaq 0xfbf(%rip), %rdi       # 0x5046
callq 0x2290
jmp 0x408e
movq %rax, %rbx
jmp 0x40ba
jmp 0x40d4
movq %rax, %rbx
leaq -0x78(%rbp), %rax
movq -0x10(%rax), %rdi
jmp 0x4109
movq %rax, %rbx
movq -0x48(%rbp), %rdi
cmpq %r15, %rdi
je 0x40ba
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x21f0
movq -0x88(%rbp), %rdi
cmpq %r14, %rdi
jne 0x410e
jmp 0x412b
movq %rax, %rbx
jmp 0x40e5
jmp 0x40cf
movq %rax, %rbx
jmp 0x40fe
movq %rax, %rbx
jmp 0x412b
movq %rax, %rbx
cmpl $0x0, (%r14)
jne 0x40e5
movl %r13d, (%r14)
movq -0x48(%rbp), %rdi
leaq -0x38(%rbp), %rax
cmpq %rax, %rdi
je 0x40fe
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x21f0
movq -0x88(%rbp), %rdi
leaq -0x78(%rbp), %rax
cmpq %rax, %rdi
je 0x412b
movq -0x78(%rbp), %rsi
incq %rsi
callq 0x21f0
jmp 0x412b
movq %rax, %rbx
leaq -0x88(%rbp), %rdi
callq 0x339c
movq %rbx, %rdi
callq 0x22f0
nop