// File: /workspace/github_cpp_makefile_star2_O2/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 $0x68, %rsp
movq %rdi, %rbx
cmpb $0x1, 0x121(%rdi)
jne 0x3277
leaq 0xb8(%rbx), %r14
movq %r14, %rdi
callq 0x2340
movl 0xd8(%rbx), %eax
testl %eax, %eax
jne 0x3388
leaq 0x38(%rbx), %r15
xorl %eax, %eax
movslq %eax, %rdx
movq (%r14), %rcx
movb (%rcx,%rdx), %dl
cmpb $0x20, %dl
je 0x3317
movsbl %dl, %esi
movq %r15, %rdi
callq 0x21b0
movl 0xd8(%rbx), %eax
incl %eax
movl %eax, 0xd8(%rbx)
jmp 0x324a
movq %rbx, %rdi
callq 0x3c0a
leaq 0x1df5(%rip), %rsi      # 0x507b
leaq -0x90(%rbp), %rdi
leaq -0x2a(%rbp), %rdx
callq 0x2ab0
leaq -0x90(%rbp), %rsi
movq %rbx, %rdi
callq 0x3fee
leaq 0x8(%rbx), %rcx
cmpq %rcx, %rax
je 0x360c
leaq 0x1dc2(%rip), %rsi      # 0x507b
leaq -0x50(%rbp), %rdi
leaq -0x29(%rbp), %rdx
callq 0x2ab0
leaq -0x50(%rbp), %rsi
movq %rbx, %rdi
callq 0x3fee
addq $0x40, %rax
pushq $0xa
popq %rdx
movq %rax, %rdi
xorl %esi, %esi
callq 0x36cf
movslq %eax, %r14
movq 0xa0(%rbx), %r15
leaq -0x50(%rbp), %rdi
callq 0x20f0
leaq -0x90(%rbp), %rdi
callq 0x20f0
cmpq %r14, %r15
jne 0x3618
movb $0x1, 0x122(%rbx)
jmp 0x3618
leaq 0x58(%rbx), %r15
movslq %eax, %rdx
leaq 0x1(%rdx), %rax
movl %eax, 0xd8(%rbx)
movb 0x1(%rcx,%rdx), %dl
cmpb $0x20, %dl
je 0x334b
movsbl %dl, %esi
movq %r15, %rdi
callq 0x21b0
movl 0xd8(%rbx), %eax
movq 0xb8(%rbx), %rcx
jmp 0x331b
leaq 0x78(%rbx), %r15
movslq %eax, %rdx
leaq 0x1(%rdx), %rsi
movl %esi, 0xd8(%rbx)
movb 0x1(%rcx,%rdx), %cl
cmpb $0xd, %cl
je 0x337f
movsbl %cl, %esi
movq %r15, %rdi
callq 0x21b0
movl 0xd8(%rbx), %eax
movq 0xb8(%rbx), %rcx
jmp 0x334f
addl $0x3, %eax
movl %eax, 0xd8(%rbx)
leaq 0x100(%rbx), %r15
leaq 0xe0(%rbx), %r12
leaq -0x90(%rbp), %r13
movslq %eax, %rsi
movq (%r14), %rcx
movb (%rcx,%rsi), %dl
cmpb $0xd, %dl
je 0x3512
cmpb $0xa, 0x1(%rcx,%rsi)
je 0x3512
cmpq %rsi, 0xc0(%rbx)
jbe 0x3512
cmpb $0x0, 0x120(%rbx)
je 0x341d
cmpb $0x3a, %dl
je 0x34fc
movslq %eax, %rsi
cmpb $0x20, 0x1(%rcx,%rsi)
je 0x34fc
cmpq %rsi, 0xc0(%rbx)
jbe 0x34fc
movsbl %dl, %esi
movq %r12, %rdi
callq 0x21b0
movslq 0xd8(%rbx), %rdx
leaq 0x1(%rdx), %rax
movl %eax, 0xd8(%rbx)
movq 0xb8(%rbx), %rcx
movb 0x1(%rcx,%rdx), %dl
jmp 0x33d0
addq %rcx, %rsi
incq %rsi
cmpb $0x20, %dl
jne 0x3457
incl %eax
movl %eax, 0xd8(%rbx)
movb (%rsi), %dl
incq %rsi
jmp 0x3423
movsbl %dl, %esi
movq %r15, %rdi
callq 0x21b0
movl 0xd8(%rbx), %eax
incl %eax
movl %eax, 0xd8(%rbx)
movq 0xb8(%rbx), %rcx
movslq %eax, %rsi
movb (%rcx,%rsi), %dl
cmpb $0xd, %dl
je 0x3472
cmpb $0xa, 0x1(%rcx,%rsi)
je 0x3472
cmpq %rsi, 0xc0(%rbx)
ja 0x3437
addl $0x2, %eax
movl %eax, 0xd8(%rbx)
movq 0xe0(%rbx), %rdi
movq 0xe8(%rbx), %rsi
addq %rdi, %rsi
movq %rdi, %rdx
callq 0x3b62
movq 0x100(%rbx), %rdi
movq 0x108(%rbx), %rsi
addq %rdi, %rsi
movq %rdi, %rdx
callq 0x3b9b
movq %r13, %rdi
movq %r12, %rsi
movq %r15, %rdx
callq 0x3bd4
movq %rbx, %rdi
movq %r13, %rsi
callq 0x38dc
movq %r13, %rdi
callq 0x2ece
andq $0x0, 0xe8(%rbx)
movq 0xe0(%rbx), %rax
xorl %ecx, %ecx
movb %cl, (%rax)
andq $0x0, 0x108(%rbx)
movq 0x100(%rbx), %rax
movb %cl, (%rax)
movl 0xd8(%rbx), %eax
movb $0x1, %cl
jmp 0x3507
addl $0x2, %eax
movl %eax, 0xd8(%rbx)
xorl %ecx, %ecx
movb %cl, 0x120(%rbx)
jmp 0x339d
cmpb $0xd, -0x2(%rcx,%rsi)
jne 0x3618
cmpb $0xd, %dl
jne 0x3618
cmpb $0xa, -0x1(%rcx,%rsi)
jne 0x3618
cmpb $0xa, 0x1(%rcx,%rsi)
jne 0x3618
addl $0x2, %eax
movl %eax, 0xd8(%rbx)
movslq %eax, %rdx
movq 0xc0(%rbx), %rcx
subq %rdx, %rcx
leaq -0x90(%rbp), %r15
movq %r15, %rdi
movq %r14, %rsi
callq 0x2220
movq %rbx, %rdi
movq %r15, %rsi
callq 0x3c0a
leaq -0x90(%rbp), %rdi
callq 0x20f0
movb $0x0, 0x121(%rbx)
leaq 0x1af2(%rip), %rsi      # 0x507b
leaq -0x90(%rbp), %rdi
leaq -0x2a(%rbp), %rdx
callq 0x2ab0
leaq -0x90(%rbp), %rsi
movq %rbx, %rdi
callq 0x3fee
leaq 0x8(%rbx), %rcx
cmpq %rcx, %rax
je 0x360c
leaq 0x1ac3(%rip), %rsi      # 0x507b
leaq -0x50(%rbp), %rdi
leaq -0x29(%rbp), %rdx
callq 0x2ab0
leaq -0x50(%rbp), %rsi
movq %rbx, %rdi
callq 0x3fee
addq $0x40, %rax
pushq $0xa
popq %rdx
movq %rax, %rdi
xorl %esi, %esi
callq 0x36cf
movslq %eax, %r14
movq 0xa0(%rbx), %r15
leaq -0x50(%rbp), %rdi
callq 0x20f0
leaq -0x90(%rbp), %rdi
callq 0x20f0
cmpq %r14, %r15
jae 0x330b
jmp 0x3618
leaq -0x90(%rbp), %rdi
callq 0x20f0
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x3633
jmp 0x3633
jmp 0x3638
jmp 0x3633
jmp 0x363d
jmp 0x3633
movq %rax, %rbx
jmp 0x3649
movq %rax, %rbx
jmp 0x3666
movq %rax, %rbx
leaq -0x50(%rbp), %rdi
callq 0x20f0
leaq -0x90(%rbp), %rdi
callq 0x20f0
jmp 0x3666
movq %rax, %rbx
leaq -0x90(%rbp), %rdi
callq 0x2ece
movq %rbx, %rdi
callq 0x22f0