// File: /workspace/github_cpp_makefile_star2_O1/boomanaiden154[P]HTTPClientHPP/./client.hpp
// Function: HTTPHeader::parseChunk(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
void parseChunk(const std::string& input)
    {
        if(input.size() > 2)
        {
            int inputIndex = 0;
            if(currentChunkLength - currentChunk.size() == 0)
            {
                body += currentChunk;
                currentChunk.clear();
                currentChunkLength = 0;
                //parse chunk header
                std::string chunkLength;
                if(input[inputIndex] == '\r')
                {
                    inputIndex++;
                }
                if(input[inputIndex] == '\n')
                {
                    inputIndex++;
                }
                while(input[inputIndex] != '\r' && input[inputIndex] != '\n')
                {
                    chunkLength += input[inputIndex];
                    inputIndex++;
                }
                currentChunkLength = std::stoi(chunkLength, nullptr, 16);
                if(currentChunkLength == 0)
                {
                    isDone = true;
                }
                inputIndex += 2;
            }
            if(!isDone)
            {
                if(currentChunkLength - currentChunk.size() < input.size() - inputIndex)
                {
                    int deltaChunkLength = currentChunkLength - currentChunk.size();
                    currentChunk += input.substr(inputIndex, deltaChunkLength);
                    //parseChunk(input.substr(inputIndex + deltaChunkLength + 2, input.size() - (inputIndex + deltaChunkLength + 2)));
                    if((inputIndex + deltaChunkLength + 2) < input.size())
                    {
                        parseChunk(std::string(input.begin() + inputIndex + deltaChunkLength + 2, input.end()));
                    }
                }
                else
                {
                    currentChunk += input.substr(inputIndex, input.size() - inputIndex); 
                }
            }
        }
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
cmpq $0x3, 0x8(%rsi)
jb 0x49c0
movq %rsi, %r14
movq %rdi, %rbx
movslq 0x124(%rdi), %rax
movq 0x130(%rdi), %rdx
xorl %r13d, %r13d
cmpq %rax, %rdx
jne 0x48b2
leaq 0x98(%rbx), %rdi
movq 0x128(%rbx), %rsi
callq 0x20b0
xorl %eax, %eax
movq %rax, 0x130(%rbx)
movq 0x128(%rbx), %rcx
movb %al, (%rcx)
movl $0x0, 0x124(%rbx)
leaq -0x38(%rbp), %rcx
movq %rcx, -0x10(%rcx)
movq %rax, -0x8(%rcx)
movb %al, (%rcx)
movq (%r14), %rax
xorl %ecx, %ecx
cmpb $0xd, (%rax)
sete %cl
cmpb $0xa, (%rax,%rcx)
leaq 0x1(%rcx), %r13
cmovneq %rcx, %r13
leaq -0x48(%rbp), %r15
movq (%r14), %rax
movzbl (%rax,%r13), %eax
cmpl $0xa, %eax
je 0x482c
cmpl $0xd, %eax
je 0x482c
movsbl %al, %esi
movq %r15, %rdi
callq 0x21a0
incq %r13
jmp 0x480a
movq -0x48(%rbp), %r12
callq 0x2050
movq %rax, %r15
movl (%rax), %eax
movl %eax, -0x50(%rbp)
movl $0x0, (%r15)
leaq -0x60(%rbp), %rsi
movq %r12, %rdi
movl $0x10, %edx
callq 0x2260
leaq -0x60(%rbp), %rcx
cmpq %r12, (%rcx)
je 0x49cf
movslq %eax, %rcx
cmpq %rax, %rcx
jne 0x49db
movl (%r15), %ecx
cmpl $0x22, %ecx
je 0x49db
testl %ecx, %ecx
leaq -0x38(%rbp), %rcx
jne 0x4888
movl -0x50(%rbp), %edx
movl %edx, (%r15)
movl %eax, 0x124(%rbx)
testl %eax, %eax
jne 0x4899
movb $0x1, 0x122(%rbx)
addq $0x2, %r13
movq -0x48(%rbp), %rdi
cmpq %rcx, %rdi
je 0x48b2
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x21f0
cmpb $0x0, 0x122(%rbx)
jne 0x49c0
leaq 0x128(%rbx), %rax
movq %rax, -0x50(%rbp)
movslq 0x124(%rbx), %r12
movq 0x130(%rbx), %rax
movq %r12, %rdx
subq %rax, %rdx
movq 0x8(%r14), %rcx
movslq %r13d, %r15
subq %r15, %rcx
cmpq %rcx, %rdx
jae 0x4985
subl %eax, %r12d
movslq %r12d, %rcx
leaq -0x48(%rbp), %rdi
movq %r14, %rsi
movq %r15, %rdx
movq %rcx, -0x58(%rbp)
callq 0x2210
leaq -0x48(%rbp), %rax
movq (%rax), %rsi
movq 0x8(%rax), %rdx
movq -0x50(%rbp), %rdi
callq 0x20b0
leaq -0x38(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x4937
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x21f0
leal (%r12,%r13), %eax
addl $0x2, %eax
cltq
movq 0x8(%r14), %rdx
cmpq %rax, %rdx
jbe 0x49c0
movq (%r14), %rax
addq %rax, %r15
movq -0x58(%rbp), %rcx
leaq (%rcx,%r15), %rsi
addq $0x2, %rsi
addq %rax, %rdx
leaq -0x48(%rbp), %rdi
leaq -0x38(%rbp), %r14
movq %r14, (%rdi)
callq 0x4a3e
leaq -0x48(%rbp), %rsi
movq %rbx, %rdi
callq 0x4776
movq -0x48(%rbp), %rdi
cmpq %r14, %rdi
jne 0x49b4
jmp 0x49c0
leaq -0x48(%rbp), %rbx
movq %rbx, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x2210
movq (%rbx), %rsi
movq 0x8(%rbx), %rdx
movq -0x50(%rbp), %rdi
callq 0x20b0
leaq -0x38(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x49c0
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x21f0
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x670(%rip), %rdi       # 0x5046
callq 0x2140
leaq 0x664(%rip), %rdi       # 0x5046
callq 0x2290
movq %rax, %rbx
movq -0x48(%rbp), %rdi
cmpq %r14, %rdi
jne 0x4a2a
jmp 0x4a36
movq %rax, %rbx
jmp 0x4a36
jmp 0x49fc
movq %rax, %rbx
leaq -0x38(%rbp), %rax
movq -0x10(%rax), %rdi
jmp 0x4a25
movq %rax, %rbx
cmpl $0x0, (%r15)
jne 0x4a1d
movl -0x50(%rbp), %eax
movl %eax, (%r15)
jmp 0x4a1d
movq %rax, %rbx
movq -0x48(%rbp), %rdi
leaq -0x38(%rbp), %rax
cmpq %rax, %rdi
je 0x4a36
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x21f0
movq %rbx, %rdi
callq 0x22f0