// File: /workspace/github_cpp_makefile_star2_O3/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 0x4941
movq %rsi, %r14
movq %rdi, %rbx
movslq 0x124(%rdi), %rdx
xorl %r13d, %r13d
cmpq %rdx, 0x130(%rdi)
jne 0x4833
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
movzbl (%rax,%r13), %eax
cmpl $0xa, %eax
je 0x47ad
cmpl $0xd, %eax
je 0x47ad
movsbl %al, %esi
movq %r15, %rdi
callq 0x21a0
incq %r13
movq (%r14), %rax
jmp 0x478b
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 0x4950
movslq %eax, %rcx
cmpq %rax, %rcx
jne 0x495c
movl (%r15), %ecx
cmpl $0x22, %ecx
je 0x495c
testl %ecx, %ecx
leaq -0x38(%rbp), %rcx
jne 0x4809
movl -0x50(%rbp), %edx
movl %edx, (%r15)
movl %eax, 0x124(%rbx)
testl %eax, %eax
jne 0x481a
movb $0x1, 0x122(%rbx)
addq $0x2, %r13
movq -0x48(%rbp), %rdi
cmpq %rcx, %rdi
je 0x4833
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x21f0
cmpb $0x0, 0x122(%rbx)
jne 0x4941
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 0x4906
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 0x48b8
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x21f0
leal (%r12,%r13), %eax
addl $0x2, %eax
cltq
movq 0x8(%r14), %rdx
cmpq %rax, %rdx
jbe 0x4941
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 0x49c0
leaq -0x48(%rbp), %rsi
movq %rbx, %rdi
callq 0x46fa
movq -0x48(%rbp), %rdi
cmpq %r14, %rdi
jne 0x4935
jmp 0x4941
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 0x4941
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 0x6ef(%rip), %rdi       # 0x5046
callq 0x2140
leaq 0x6e3(%rip), %rdi       # 0x5046
callq 0x2290
movq %rax, %rbx
movq -0x48(%rbp), %rdi
cmpq %r14, %rdi
jne 0x49ab
jmp 0x49b7
movq %rax, %rbx
jmp 0x49b7
jmp 0x497d
movq %rax, %rbx
leaq -0x38(%rbp), %rax
movq -0x10(%rax), %rdi
jmp 0x49a6
movq %rax, %rbx
cmpl $0x0, (%r15)
jne 0x499e
movl -0x50(%rbp), %eax
movl %eax, (%r15)
jmp 0x499e
movq %rax, %rbx
movq -0x48(%rbp), %rdi
leaq -0x38(%rbp), %rax
cmpq %rax, %rdi
je 0x49b7
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x21f0
movq %rbx, %rdi
callq 0x22f0
nop