// File: /workspace/github_cpp_makefile_star2_O1/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 $0x78, %rsp
movq %rdi, %rbx
cmpb $0x1, 0x121(%rdi)
jne 0x3f4b
leaq 0xb8(%rbx), %rdi
movq (%rsi), %rax
movq 0x8(%rsi), %rdx
movq %rdi, -0x38(%rbp)
movq %rax, %rsi
callq 0x20b0
cmpl $0x0, 0xd8(%rbx)
jne 0x3be9
movslq 0xd8(%rbx), %rax
movq 0xb8(%rbx), %rcx
movb (%rcx,%rax), %al
cmpb $0x20, %al
je 0x3b40
leaq 0x38(%rbx), %r15
movsbl %al, %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), %al
cmpb $0x20, %al
jne 0x3b15
movslq 0xd8(%rbx), %rax
leaq 0x1(%rax), %rcx
movl %ecx, 0xd8(%rbx)
movq 0xb8(%rbx), %rcx
movb 0x1(%rcx,%rax), %al
cmpb $0x20, %al
je 0x3b8f
leaq 0x58(%rbx), %r15
movsbl %al, %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), %al
cmpb $0x20, %al
jne 0x3b64
movslq 0xd8(%rbx), %rax
leaq 0x1(%rax), %rcx
movl %ecx, 0xd8(%rbx)
movq 0xb8(%rbx), %rcx
movb 0x1(%rcx,%rax), %cl
cmpb $0xd, %cl
je 0x3be0
leaq 0x78(%rbx), %r15
movsbl %cl, %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), %cl
cmpb $0xd, %cl
jne 0x3bb4
addl $0x3, %eax
movl %eax, 0xd8(%rbx)
movl 0xd8(%rbx), %ecx
movslq %ecx, %rsi
movq 0xb8(%rbx), %rax
cmpb $0xd, (%rax,%rsi)
setne %dl
je 0x3e3a
cmpb $0xa, 0x1(%rax,%rsi)
je 0x3e3a
cmpq %rsi, 0xc0(%rbx)
jbe 0x3e3a
leaq 0x100(%rbx), %r14
leaq 0xe0(%rbx), %r12
movq %r14, -0x30(%rbp)
movl 0xd8(%rbx), %edx
movslq %edx, %rcx
cmpb $0x0, 0x120(%rbx)
je 0x3c9a
movq -0x38(%rbp), %rax
movq (%rax), %rsi
movb (%rsi,%rcx), %al
cmpb $0x3a, %al
je 0x3d0f
movslq %edx, %rdi
cmpb $0x20, 0x1(%rsi,%rdi)
je 0x3d0f
cmpq %rcx, 0xc0(%rbx)
jbe 0x3d0f
movsbl %al, %esi
movq %r12, %rdi
callq 0x21a0
movslq 0xd8(%rbx), %rax
leaq 0x1(%rax), %rcx
movl %ecx, 0xd8(%rbx)
movq 0xb8(%rbx), %rsi
movb 0x1(%rsi,%rax), %al
movl %ecx, %edx
jmp 0x3c4c
cmpb $0x20, (%rax,%rcx)
jne 0x3cb9
addq %rcx, %rax
incq %rax
incl %ecx
movl %ecx, 0xd8(%rbx)
incl %ecx
cmpb $0x20, (%rax)
leaq 0x1(%rax), %rax
je 0x3ca8
movl 0xd8(%rbx), %eax
movslq %eax, %rdx
movq 0xb8(%rbx), %rsi
movb (%rsi,%rdx), %cl
cmpb $0xd, %cl
je 0x3d1f
movslq %eax, %rdi
cmpb $0xa, 0x1(%rsi,%rdi)
je 0x3d1f
cmpq %rdx, 0xc0(%rbx)
jbe 0x3d1f
movsbl %cl, %esi
movq %r14, %rdi
callq 0x21a0
movslq 0xd8(%rbx), %rax
leaq 0x1(%rax), %rdx
movl %edx, 0xd8(%rbx)
movq 0xb8(%rbx), %rsi
movb 0x1(%rsi,%rax), %cl
movl %edx, %eax
jmp 0x3ccc
addl $0x2, %edx
movl %edx, 0xd8(%rbx)
xorl %eax, %eax
jmp 0x3e07
addl $0x2, %eax
movl %eax, 0xd8(%rbx)
movq 0xe8(%rbx), %r14
testq %r14, %r14
je 0x3d56
movq 0xe0(%rbx), %r13
xorl %r15d, %r15d
movzbl (%r13,%r15), %edi
callq 0x22a0
movb %al, (%r13,%r15)
incq %r15
cmpq %r15, %r14
jne 0x3d3e
movq 0x108(%rbx), %r14
testq %r14, %r14
je 0x3d84
movq 0x100(%rbx), %r13
xorl %r15d, %r15d
movzbl (%r13,%r15), %edi
callq 0x22a0
movb %al, (%r13,%r15)
incq %r15
cmpq %r15, %r14
jne 0x3d6c
leaq -0x98(%rbp), %r15
movq %r15, %rdi
movq %r12, %rsi
movq -0x30(%rbp), %r14
movq %r14, %rdx
callq 0x45c0
movq %rbx, %rdi
movq %r15, %rsi
callq 0x43ba
movq -0x78(%rbp), %rdi
leaq -0x68(%rbp), %rax
cmpq %rax, %rdi
je 0x3dc1
movq -0x68(%rbp), %rsi
incq %rsi
callq 0x21f0
movq -0x98(%rbp), %rdi
leaq -0x88(%rbp), %rax
cmpq %rax, %rdi
je 0x3de3
movq -0x88(%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)
movb $0x1, %al
movb %al, 0x120(%rbx)
movl 0xd8(%rbx), %ecx
movslq %ecx, %rsi
movq 0xb8(%rbx), %rax
cmpb $0xd, (%rax,%rsi)
setne %dl
je 0x3e3a
cmpb $0xa, 0x1(%rax,%rsi)
je 0x3e3a
cmpq %rsi, 0xc0(%rbx)
ja 0x3c30
movslq %ecx, %rsi
cmpb $0xd, -0x2(%rax,%rsi)
jne 0x4084
cmpb $0xa, -0x1(%rax,%rsi)
setne %dil
orb %dil, %dl
jne 0x4084
cmpb $0xa, 0x1(%rax,%rsi)
jne 0x4084
addl $0x2, %ecx
movl %ecx, 0xd8(%rbx)
movslq %ecx, %rdx
movq 0xc0(%rbx), %rcx
subq %rdx, %rcx
leaq -0x98(%rbp), %r15
movq %r15, %rdi
movq -0x38(%rbp), %rsi
callq 0x2210
movq %rbx, %rdi
movq %r15, %rsi
callq 0x462e
leaq -0x88(%rbp), %r15
movq -0x10(%r15), %rdi
cmpq %r15, %rdi
je 0x3eb8
movq -0x88(%rbp), %rsi
incq %rsi
callq 0x21f0
movb $0x0, 0x121(%rbx)
leaq -0x98(%rbp), %rdi
movq %r15, (%rdi)
leaq 0x11ab(%rip), %rsi      # 0x507b
leaq 0x11b2(%rip), %rdx      # 0x5089
callq 0x4abc
leaq -0x98(%rbp), %rsi
movq %rbx, %rdi
callq 0x4b56
movq %rax, %r14
leaq 0x8(%rbx), %r12
cmpq %r12, %rax
je 0x4093
leaq -0x48(%rbp), %r13
movq %r13, -0x10(%r13)
leaq 0x1171(%rip), %rsi      # 0x507b
leaq 0x1178(%rip), %rdx      # 0x5089
leaq -0x58(%rbp), %rdi
callq 0x4abc
leaq -0x58(%rbp), %rsi
movq %rbx, %rdi
callq 0x4b56
addq $0x40, %rax
movq %rax, %rdi
xorl %esi, %esi
movl $0xa, %edx
callq 0x41ff
cltq
cmpq %rax, 0xa0(%rbx)
setae %r13b
jmp 0x4096
movq %rbx, %rdi
callq 0x462e
leaq -0x88(%rbp), %r12
movq %r12, -0x10(%r12)
leaq 0x1115(%rip), %rsi      # 0x507b
leaq 0x111c(%rip), %rdx      # 0x5089
leaq -0x98(%rbp), %rdi
callq 0x4abc
leaq -0x98(%rbp), %rsi
movq %rbx, %rdi
callq 0x4b56
movq %rax, %r13
leaq 0x8(%rbx), %r14
cmpq %r14, %rax
je 0x403c
leaq -0x48(%rbp), %rax
movq %rax, -0x10(%rax)
leaq 0x10d4(%rip), %rsi      # 0x507b
leaq 0x10db(%rip), %rdx      # 0x5089
leaq -0x58(%rbp), %rdi
callq 0x4abc
movq %r13, -0x38(%rbp)
leaq -0x58(%rbp), %rsi
movq %rbx, %rdi
callq 0x4b56
movq 0x40(%rax), %r12
callq 0x2050
movq %rax, %r15
movl (%rax), %eax
movl %eax, -0x30(%rbp)
movl $0x0, (%r15)
leaq -0xa0(%rbp), %r13
movq %r12, %rdi
movq %r13, %rsi
movl $0xa, %edx
callq 0x2260
cmpq %r12, (%r13)
je 0x40d6
movslq %eax, %rcx
cmpq %rax, %rcx
leaq -0x88(%rbp), %r12
movq -0x38(%rbp), %r13
jne 0x40e2
movl (%r15), %ecx
cmpl $0x22, %ecx
je 0x40e2
testl %ecx, %ecx
jne 0x402d
movl -0x30(%rbp), %ecx
movl %ecx, (%r15)
cltq
cmpq %rax, 0xa0(%rbx)
sete %r15b
jmp 0x403f
xorl %r15d, %r15d
cmpq %r14, %r13
je 0x405d
leaq -0x48(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x405d
movq -0x48(%rbp), %rsi
incq %rsi
callq 0x21f0
movq -0x98(%rbp), %rdi
cmpq %r12, %rdi
je 0x4078
movq -0x88(%rbp), %rsi
incq %rsi
callq 0x21f0
testb %r15b, %r15b
je 0x4084
movb $0x1, 0x122(%rbx)
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
xorl %r13d, %r13d
cmpq %r12, %r14
je 0x40b4
leaq -0x48(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x40b4
movq -0x48(%rbp), %rsi
incq %rsi
callq 0x21f0
movq -0x98(%rbp), %rdi
cmpq %r15, %rdi
je 0x40cf
movq -0x88(%rbp), %rsi
incq %rsi
callq 0x21f0
testb %r13b, %r13b
jne 0x407d
jmp 0x4084
leaq 0xf69(%rip), %rdi       # 0x5046
callq 0x2140
leaq 0xf5d(%rip), %rdi       # 0x5046
callq 0x2290
jmp 0x40f0
movq %rax, %rbx
jmp 0x411f
jmp 0x4139
movq %rax, %rbx
leaq -0x88(%rbp), %rax
movq -0x10(%rax), %rdi
jmp 0x4174
movq %rax, %rbx
movq -0x58(%rbp), %rdi
cmpq %r13, %rdi
je 0x411f
movq -0x48(%rbp), %rsi
incq %rsi
callq 0x21f0
movq -0x98(%rbp), %rdi
cmpq %r15, %rdi
jne 0x4179
jmp 0x4199
movq %rax, %rbx
jmp 0x414d
jmp 0x4134
movq %rax, %rbx
jmp 0x4166
movq %rax, %rbx
jmp 0x4199
movq %rax, %rbx
cmpl $0x0, (%r15)
jne 0x414d
movl -0x30(%rbp), %eax
movl %eax, (%r15)
movq -0x58(%rbp), %rdi
leaq -0x48(%rbp), %rax
cmpq %rax, %rdi
je 0x4166
movq -0x48(%rbp), %rsi
incq %rsi
callq 0x21f0
movq -0x98(%rbp), %rdi
leaq -0x88(%rbp), %rax
cmpq %rax, %rdi
je 0x4199
movq -0x88(%rbp), %rsi
incq %rsi
callq 0x21f0
jmp 0x4199
movq %rax, %rbx
leaq -0x98(%rbp), %rdi
callq 0x33aa
movq %rbx, %rdi
callq 0x22f0
nop