// File: /workspace/github_cpp_makefile_star2_O2/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 0x3e9d
movq %rsi, %r14
movq %rdi, %rbx
movslq 0x124(%rdi), %rax
leaq 0x128(%rdi), %r15
xorl %r13d, %r13d
cmpq %rax, 0x130(%rdi)
jne 0x3dcd
leaq 0x98(%rbx), %rdi
movq %r15, %rsi
callq 0x2340
andq $0x0, 0x130(%rbx)
movq 0x128(%rbx), %rax
xorl %ecx, %ecx
movb %cl, (%rax)
andl $0x0, 0x124(%rbx)
leaq -0x38(%rbp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
movb %cl, (%rax)
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), %r12
movzbl (%rax,%r13), %eax
cmpl $0xa, %eax
je 0x3da1
cmpl $0xd, %eax
je 0x3da1
movsbl %al, %esi
movq %r12, %rdi
callq 0x21b0
incq %r13
movq (%r14), %rax
jmp 0x3d7f
leaq -0x48(%rbp), %rdi
pushq $0x10
popq %rdx
xorl %esi, %esi
callq 0x36cf
movl %eax, 0x124(%rbx)
testl %eax, %eax
jne 0x3dc0
movb $0x1, 0x122(%rbx)
addl $0x2, %r13d
leaq -0x48(%rbp), %rdi
callq 0x20f0
cmpb $0x0, 0x122(%rbx)
jne 0x3e9d
movq %r15, -0x50(%rbp)
movslq 0x124(%rbx), %r15
movq 0x130(%rbx), %rax
movq %r15, %rdx
subq %rax, %rdx
movq 0x8(%r14), %rcx
movslq %r13d, %r12
subq %r12, %rcx
cmpq %rcx, %rdx
jae 0x3e76
subl %eax, %r15d
movslq %r15d, %rcx
leaq -0x48(%rbp), %rdi
movq %r14, %rsi
movq %r12, %rdx
movq %rcx, -0x58(%rbp)
callq 0x2220
movq -0x50(%rbp), %rdi
leaq -0x48(%rbp), %rsi
callq 0x2340
leaq -0x48(%rbp), %rdi
callq 0x20f0
leal (%r15,%r13), %eax
addl $0x2, %eax
cltq
movq 0x8(%r14), %rdx
cmpq %rax, %rdx
jbe 0x3e9d
movq (%r14), %rax
addq %rax, %r12
movq -0x58(%rbp), %rcx
leaq (%rcx,%r12), %rsi
addq $0x2, %rsi
addq %rax, %rdx
leaq -0x38(%rbp), %rax
movq %rax, -0x10(%rax)
leaq -0x48(%rbp), %rdi
callq 0x3ece
leaq -0x48(%rbp), %rsi
movq %rbx, %rdi
callq 0x3cec
jmp 0x3e94
leaq -0x48(%rbp), %rbx
movq %rbx, %rdi
movq %r14, %rsi
movq %r12, %rdx
callq 0x2220
movq -0x50(%rbp), %rdi
movq %rbx, %rsi
callq 0x2340
leaq -0x48(%rbp), %rdi
callq 0x20f0
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x3eb9
movq %rax, %rbx
jmp 0x3ec5
jmp 0x3eb9
jmp 0x3eb9
jmp 0x3eb9
movq %rax, %rbx
leaq -0x48(%rbp), %rdi
callq 0x20f0
movq %rbx, %rdi
callq 0x22f0
nop