// File: /workspace/github_cpp_makefile_star2_O3/Manuel123cool[P]smiley/regex.cpp
// Function: MyRegex::deleteInessentialSpaces(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
std::string MyRegex::deleteInessentialSpaces(std::string code) 
{
    if (code.length() == 0)
        return code;

    bool allWhiteSpaces{ true };
    for(const auto &c : code)
    {
        if (c != ' ')
            allWhiteSpaces = false;
    }
    if (allWhiteSpaces)
        return "";

    std::vector<int> delNum;
    bool startDel{ false };
    int count{ 0 };
    for(const auto &c : code)
    {
        if (c == '"')
            break;
        if (startDel && c == ' ')
            delNum.push_back(count);
        if (c == ' ')
            startDel = true;
        if (startDel && c != ' ')
            startDel = false;
        ++count;    
    }

    { 
        bool delAtEnd{ false };
        if (code.at(code.length() - 1) == ' ')
            delAtEnd = true;

        int count1{ 1 };
        while (delAtEnd)
        {
            if (code.at(code.length() - count1) == ' ') 
                delNum.push_back(code.length() - count1);
            else
                delAtEnd = false;
            ++count1;
        }
    }
        
    {
        bool delAtStart{ false };
        if (code.at(0) == ' ')
            delAtStart = true;

        int count2{ 0 };
        while (delAtStart)
        {
            if (code.at(count2) == ' ') 
                delNum.push_back(count2);
            else
                delAtStart = false;
            ++count2; 
        }
    }
    std::string codeWithoutSpaces;
    for (int i{ 0 }; i < code.length(); ++i)
    {
        bool elemDel{ false };
        for (const auto &elem : delNum)
        {
            if (elem == i)
                elemDel = true; 
        }
        if (!elemDel)
            codeWithoutSpaces += code.at(i);
    }
    return codeWithoutSpaces; 
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rsi, %r14
movq %rdi, %r12
movq 0x8(%rsi), %r13
testq %r13, %r13
je 0x8350
movq (%r14), %rbp
movb $0x1, %al
xorl %ecx, %ecx
cmpb $0x20, (%rbp,%rcx)
sete %dl
andb %dl, %al
incq %rcx
cmpq %rcx, %r13
jne 0x831a
testb %al, %al
je 0x837a
leaq 0x10(%r12), %rax
movq %rax, (%r12)
leaq 0x5d10(%rip), %rdx      # 0xe050
movq %r12, %rdi
movq %rdx, %rsi
callq 0x79c6
jmp 0x8600
leaq 0x10(%r12), %rcx
movq %rcx, (%r12)
movq (%r14), %rdx
leaq 0x10(%r14), %rax
cmpq %rax, %rdx
je 0x85e7
movq %rdx, (%r12)
movq (%rax), %rcx
movq %rcx, 0x10(%r12)
jmp 0x85ed
movq %r12, 0x30(%rsp)
xorps %xmm0, %xmm0
leaq 0x10(%rsp), %rax
movaps %xmm0, (%rax)
movq $0x0, 0x10(%rax)
leaq 0xc(%rsp), %rax
movl $0x0, (%rax)
xorl %r12d, %r12d
xorl %ebx, %ebx
xorl %eax, %eax
xorl %r15d, %r15d
movb (%rbp,%rbx), %cl
cmpb $0x22, %cl
je 0x8413
cmpb $0x20, %cl
jne 0x83e3
testb $0x1, %r15b
je 0x83e3
movq 0x18(%rsp), %rsi
cmpq 0x20(%rsp), %rsi
je 0x83d4
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x18(%rsp)
jmp 0x83e3
leaq 0x10(%rsp), %rdi
leaq 0xc(%rsp), %rdx
callq 0xa2c2
movzbl %r15b, %r15d
testb $0x1, %r15b
cmovnel %r12d, %r15d
cmpb $0x20, (%rbp,%rbx)
cmovel %r12d, %r15d
movl $0x1, %eax
cmovel %eax, %r15d
movl 0xc(%rsp), %eax
incl %eax
movl %eax, 0xc(%rsp)
incq %rbx
cmpq %rbx, %r13
jne 0x83a7
movq 0x8(%r14), %rax
movq %rax, %rsi
subq $0x1, %rsi
jb 0x8612
movq (%r14), %rcx
cmpb $0x20, (%rcx,%rsi)
movq 0x30(%rsp), %r12
jne 0x84cd
movq 0x8(%r14), %rdx
movq %rdx, %rsi
subq $0x1, %rsi
jb 0x84ad
movl $0x1, %ebp
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
xorl %r13d, %r13d
leaq 0x10(%rsp), %r15
leaq 0x8(%rsp), %r12
movq (%r14), %rax
cmpb $0x20, (%rax,%rsi)
jne 0x84bb
addl %ebx, %edx
movl %edx, 0x8(%rsp)
movq 0x18(%rsp), %rsi
cmpq 0x20(%rsp), %rsi
je 0x8482
movl %edx, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x18(%rsp)
jmp 0x848d
movq %r15, %rdi
movq %r12, %rdx
callq 0xa3fe
incq %rbp
movq 0x8(%r14), %rdx
movq %rdx, %rsi
subq %rbp, %rsi
incq %r13
decl %ebx
cmpq %r13, %rdx
ja 0x845a
notq %r13
addq %rdx, %r13
movq %r13, %rsi
leaq 0x5cd1(%rip), %rdi      # 0xe185
xorl %eax, %eax
callq 0x2210
movq 0x8(%r14), %rax
testq %rax, %rax
movq 0x30(%rsp), %r12
je 0x8622
movq (%r14), %rcx
cmpb $0x20, (%rcx)
movl $0x0, 0x8(%rsp)
jne 0x8545
movq 0x8(%r14), %rdx
xorl %esi, %esi
testq %rdx, %rdx
je 0x8537
leaq 0x10(%rsp), %r15
leaq 0x8(%rsp), %r12
movq (%r14), %rax
cmpb $0x20, (%rax,%rsi)
jne 0x855f
movq 0x18(%rsp), %rax
cmpq 0x20(%rsp), %rax
je 0x8514
movl %esi, (%rax)
addq $0x4, %rax
movq %rax, 0x18(%rsp)
jmp 0x8522
movq %r15, %rdi
movq %rax, %rsi
movq %r12, %rdx
callq 0xa2c2
movslq 0x8(%rsp), %rsi
incq %rsi
movl %esi, 0x8(%rsp)
movq 0x8(%r14), %rdx
cmpq %rsi, %rdx
ja 0x84f2
leaq 0x5c47(%rip), %rdi      # 0xe185
xorl %eax, %eax
callq 0x2210
leaq 0x10(%r12), %r15
movq %r15, (%r12)
movq $0x0, 0x8(%r12)
movb $0x0, 0x10(%r12)
jmp 0x8585
movq 0x8(%r14), %rax
movq 0x30(%rsp), %r12
leaq 0x10(%r12), %r15
movq %r15, (%r12)
movq $0x0, 0x8(%r12)
movb $0x0, 0x10(%r12)
testq %rax, %rax
je 0x85ce
xorl %ebx, %ebx
movq 0x10(%rsp), %rcx
movq 0x18(%rsp), %rdx
cmpq %rdx, %rcx
je 0x85b3
xorl %esi, %esi
movl (%rcx), %edi
cmpq %rdi, %rbx
sete %dil
orb %dil, %sil
addq $0x4, %rcx
cmpq %rdx, %rcx
jne 0x8598
testb $0x1, %sil
jne 0x85c6
movq (%r14), %rax
movsbl (%rax,%rbx), %esi
movq %r12, %rdi
callq 0x2120
movq 0x8(%r14), %rax
incq %rbx
cmpq %rbx, %rax
ja 0x8587
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x8600
movq 0x20(%rsp), %rsi
subq %rdi, %rsi
callq 0x2170
jmp 0x8600
movups (%rax), %xmm0
movups %xmm0, (%rcx)
xorl %ecx, %ecx
movq %rcx, 0x8(%r12)
movq %rax, (%r14)
movq %rcx, 0x8(%r14)
movb $0x0, 0x10(%r14)
movq %r12, %rax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x5b6c(%rip), %rdi      # 0xe185
xorl %edx, %edx
xorl %eax, %eax
callq 0x2210
leaq 0x5b5c(%rip), %rdi      # 0xe185
xorl %esi, %esi
xorl %edx, %edx
xorl %eax, %eax
callq 0x2210
jmp 0x8640
jmp 0x8640
jmp 0x8640
jmp 0x8640
jmp 0x8640
jmp 0x8640
movq %rax, %r14
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x865a
movq 0x20(%rsp), %rsi
subq %rdi, %rsi
callq 0x2170
movq %r14, %rdi
callq 0x2250
movq %rax, %r14
movq (%r12), %rdi
cmpq %r15, %rdi
je 0x8643
movq (%r15), %rsi
incq %rsi
callq 0x2170
jmp 0x8643