// File: 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
subq $0x140, %rsp            # imm = 0x140
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0xe0(%rbp)
movq -0x10(%rbp), %rdi
callq 0x31e0
cmpq $0x2, %rax
jbe 0x77da
movq -0xe0(%rbp), %rdi
movl $0x0, -0x14(%rbp)
movslq 0x124(%rdi), %rax
movq %rax, -0xe8(%rbp)
addq $0x128, %rdi            # imm = 0x128
callq 0x31e0
movq %rax, %rcx
movq -0xe8(%rbp), %rax
subq %rcx, %rax
cmpq $0x0, %rax
jne 0x7523
movq -0xe0(%rbp), %rdi
movq %rdi, %rsi
addq $0x128, %rsi            # imm = 0x128
addq $0x98, %rdi
callq 0x3380
movq -0xe0(%rbp), %rdi
addq $0x128, %rdi            # imm = 0x128
callq 0x33a0
movq -0xe0(%rbp), %rax
movl $0x0, 0x124(%rax)
leaq -0x38(%rbp), %rdi
callq 0x33c0
movq -0x10(%rbp), %rdi
movslq -0x14(%rbp), %rsi
callq 0x3320
movsbl (%rax), %eax
cmpl $0xd, %eax
jne 0x7428
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
movq -0x10(%rbp), %rdi
movslq -0x14(%rbp), %rsi
callq 0x3320
movsbl (%rax), %eax
cmpl $0xa, %eax
jne 0x7446
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x7448
movq -0x10(%rbp), %rdi
movslq -0x14(%rbp), %rsi
callq 0x3320
movsbl (%rax), %ecx
xorl %eax, %eax
cmpl $0xd, %ecx
movb %al, -0xe9(%rbp)
je 0x7481
movq -0x10(%rbp), %rdi
movslq -0x14(%rbp), %rsi
callq 0x3320
movsbl (%rax), %eax
cmpl $0xa, %eax
setne %al
movb %al, -0xe9(%rbp)
movb -0xe9(%rbp), %al
testb $0x1, %al
jne 0x748d
jmp 0x74cd
movq -0x10(%rbp), %rdi
movslq -0x14(%rbp), %rsi
callq 0x3320
movsbl (%rax), %esi
leaq -0x38(%rbp), %rdi
callq 0x31b0
jmp 0x74a8
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x7448
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x38(%rbp), %rdi
callq 0x31a0
jmp 0x77e3
xorl %eax, %eax
movl %eax, %esi
leaq -0x38(%rbp), %rdi
movl $0x10, %edx
callq 0x5f00
movl %eax, -0xf0(%rbp)
jmp 0x74e7
movq -0xe0(%rbp), %rax
movl -0xf0(%rbp), %ecx
movl %ecx, 0x124(%rax)
cmpl $0x0, 0x124(%rax)
jne 0x7511
movq -0xe0(%rbp), %rax
movb $0x1, 0x122(%rax)
movl -0x14(%rbp), %eax
addl $0x2, %eax
movl %eax, -0x14(%rbp)
leaq -0x38(%rbp), %rdi
callq 0x31a0
movq -0xe0(%rbp), %rax
testb $0x1, 0x122(%rax)
jne 0x77d8
movq -0xe0(%rbp), %rdi
movslq 0x124(%rdi), %rax
movq %rax, -0x100(%rbp)
addq $0x128, %rdi            # imm = 0x128
callq 0x31e0
movq %rax, %rcx
movq -0x100(%rbp), %rax
subq %rcx, %rax
movq %rax, -0xf8(%rbp)
movq -0x10(%rbp), %rdi
callq 0x31e0
movq %rax, %rcx
movq -0xf8(%rbp), %rax
movslq -0x14(%rbp), %rdx
subq %rdx, %rcx
cmpq %rcx, %rax
jae 0x774c
movq -0xe0(%rbp), %rdi
movl 0x124(%rdi), %eax
movl %eax, -0x114(%rbp)
addq $0x128, %rdi            # imm = 0x128
movq %rdi, -0x110(%rbp)
callq 0x31e0
movq %rax, %rcx
movl -0x114(%rbp), %eax
subl %ecx, %eax
movl %eax, -0x48(%rbp)
movq -0x10(%rbp), %rsi
movslq -0x14(%rbp), %rdx
movslq -0x48(%rbp), %rcx
leaq -0x68(%rbp), %rdi
movq %rdi, -0x108(%rbp)
callq 0x32d0
movq -0x110(%rbp), %rdi
movq -0x108(%rbp), %rsi
callq 0x3380
jmp 0x75f4
leaq -0x68(%rbp), %rdi
callq 0x31a0
movl -0x14(%rbp), %eax
addl -0x48(%rbp), %eax
addl $0x2, %eax
cltq
movq %rax, -0x120(%rbp)
movq -0x10(%rbp), %rdi
callq 0x31e0
movq %rax, %rcx
movq -0x120(%rbp), %rax
cmpq %rcx, %rax
jae 0x7747
movq -0x10(%rbp), %rdi
callq 0x3280
movq %rax, -0xa8(%rbp)
movslq -0x14(%rbp), %rsi
leaq -0xa8(%rbp), %rdi
callq 0x77f0
movq %rax, -0xa0(%rbp)
movslq -0x48(%rbp), %rsi
leaq -0xa0(%rbp), %rdi
callq 0x77f0
movq %rax, -0x98(%rbp)
leaq -0x98(%rbp), %rdi
movl $0x2, %esi
callq 0x77f0
movq %rax, -0x90(%rbp)
movq -0x10(%rbp), %rdi
callq 0x3470
movq %rax, -0xb0(%rbp)
leaq -0xb1(%rbp), %rdi
movq %rdi, -0x128(%rbp)
callq 0x3450
movq -0x128(%rbp), %rcx
movq -0x90(%rbp), %rsi
movq -0xb0(%rbp), %rdx
leaq -0x88(%rbp), %rdi
callq 0x7830
jmp 0x76c7
movq -0xe0(%rbp), %rdi
leaq -0x88(%rbp), %rsi
callq 0x7350
jmp 0x76dc
leaq -0x88(%rbp), %rdi
callq 0x31a0
leaq -0xb1(%rbp), %rdi
callq 0x3300
jmp 0x7747
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x68(%rbp), %rdi
callq 0x31a0
jmp 0x77e3
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0x7736
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x88(%rbp), %rdi
callq 0x31a0
leaq -0xb1(%rbp), %rdi
callq 0x3300
jmp 0x77e3
jmp 0x77d6
movq -0x10(%rbp), %rdi
movq %rdi, -0x140(%rbp)
movslq -0x14(%rbp), %rax
movq %rax, -0x138(%rbp)
callq 0x31e0
movq -0x140(%rbp), %rsi
movq -0x138(%rbp), %rdx
movq %rax, %rcx
movslq -0x14(%rbp), %rax
subq %rax, %rcx
leaq -0xd8(%rbp), %rdi
movq %rdi, -0x130(%rbp)
callq 0x32d0
movq -0xe0(%rbp), %rdi
movq -0x130(%rbp), %rsi
addq $0x128, %rdi            # imm = 0x128
callq 0x3380
jmp 0x77ae
leaq -0xd8(%rbp), %rdi
callq 0x31a0
jmp 0x77d6
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0xd8(%rbp), %rdi
callq 0x31a0
jmp 0x77e3
jmp 0x77d8
jmp 0x77da
addq $0x140, %rsp            # imm = 0x140
popq %rbp
retq
movq -0x40(%rbp), %rdi
callq 0x3440
nopl (%rax)