// File: /workspace/github_cpp_makefile_star2_O1/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 0x8686
movq (%r14), %rbp
movb $0x1, %al
xorl %ecx, %ecx
xorl %edx, %edx
cmpb $0x20, (%rbp,%rdx)
movzbl %al, %eax
cmovnel %ecx, %eax
incq %rdx
cmpq %rdx, %r13
jne 0x864f
testb $0x1, %al
je 0x86b0
leaq 0x10(%r12), %rax
movq %rax, (%r12)
leaq 0x59da(%rip), %rdx      # 0xe050
movq %r12, %rdi
movq %rdx, %rsi
callq 0x7c60
jmp 0x88fc
leaq 0x10(%r12), %rcx
movq %rcx, (%r12)
movq (%r14), %rdx
leaq 0x10(%r14), %rax
cmpq %rax, %rdx
je 0x88e1
movq %rdx, (%r12)
movq (%rax), %rcx
movq %rcx, 0x10(%r12)
jmp 0x88e7
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)
decq %r13
xorl %r15d, %r15d
xorl %ebx, %ebx
movb (%rbp,%r15), %r12b
cmpb $0x22, %r12b
je 0x8740
cmpb $0x20, %r12b
jne 0x871d
testb $0x1, %bl
je 0x871d
movq 0x18(%rsp), %rsi
cmpq 0x20(%rsp), %rsi
je 0x870e
movl 0xc(%rsp), %eax
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x18(%rsp)
jmp 0x871d
leaq 0x10(%rsp), %rdi
leaq 0xc(%rsp), %rdx
callq 0xa61e
movzbl %bl, %ebx
testb $0x1, %bl
movl $0x0, %eax
cmovnel %eax, %ebx
cmpb $0x20, (%rbp,%r15)
cmovel %eax, %ebx
movl $0x1, %eax
cmovel %eax, %ebx
incl 0xc(%rsp)
cmpb $0x22, %r12b
je 0x8752
leaq 0x1(%r15), %rax
cmpq %r15, %r13
movq %rax, %r15
jne 0x86db
movq 0x8(%r14), %rdx
movq %rdx, %rsi
subq $0x1, %rsi
jb 0x892a
movq (%r14), %rax
cmpb $0x20, (%rax,%rsi)
jne 0x87df
sete %bpl
movl $0x1, %r13d
movq $-0x1, %r15
leaq 0x10(%rsp), %rbx
leaq 0x8(%rsp), %r12
movq 0x8(%r14), %rdx
movq %rdx, %rsi
subq %r13, %rsi
jb 0x890e
movq (%r14), %rax
addq %rdx, %rax
cmpb $0x20, (%r15,%rax)
jne 0x87c4
addq %r15, %rdx
movl %edx, 0x8(%rsp)
movq 0x18(%rsp), %rsi
cmpq 0x20(%rsp), %rsi
je 0x87c8
movl %edx, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x18(%rsp)
jmp 0x87d3
xorl %ebp, %ebp
jmp 0x87d3
movq %rbx, %rdi
movq %r12, %rdx
callq 0xa75a
incq %r13
decq %r15
testb $0x1, %bpl
jne 0x8787
movq 0x8(%r14), %rdx
testq %rdx, %rdx
je 0x8938
movq (%r14), %rax
cmpb $0x20, (%rax)
movl $0x0, 0x8(%rsp)
jne 0x885b
sete %bl
xorl %eax, %eax
leaq 0x10(%rsp), %r15
leaq 0x8(%rsp), %r12
movslq %eax, %rsi
movq 0x8(%r14), %rdx
cmpq %rsi, %rdx
jbe 0x891c
movq (%r14), %rcx
cmpb $0x20, (%rcx,%rsi)
jne 0x883d
movq 0x18(%rsp), %rsi
cmpq 0x20(%rsp), %rsi
je 0x8841
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x18(%rsp)
jmp 0x884c
xorl %ebx, %ebx
jmp 0x884c
movq %r15, %rdi
movq %r12, %rdx
callq 0xa61e
movl 0x8(%rsp), %eax
incl %eax
movl %eax, 0x8(%rsp)
testb $0x1, %bl
jne 0x880b
movq 0x30(%rsp), %r12
leaq 0x10(%r12), %r15
movq %r15, (%r12)
movq $0x0, 0x8(%r12)
movb $0x0, 0x10(%r12)
cmpq $0x0, 0x8(%r14)
je 0x88c8
xorl %ebx, %ebx
movl $0x1, %ebp
movq 0x10(%rsp), %rax
movq 0x18(%rsp), %rcx
cmpq %rcx, %rax
je 0x88b0
xorl %edx, %edx
movl (%rax), %esi
cmpq %rsi, %rbx
movzbl %dl, %edx
cmovel %ebp, %edx
addq $0x4, %rax
cmpq %rcx, %rax
jne 0x8897
testb $0x1, %dl
jne 0x88bf
movq (%r14), %rax
movsbl (%rax,%rbx), %esi
movq %r12, %rdi
callq 0x2120
incq %rbx
cmpq %rbx, 0x8(%r14)
ja 0x8886
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x88fc
movq 0x20(%rsp), %rsi
subq %rdi, %rsi
callq 0x2170
jmp 0x88fc
movups (%rax), %xmm0
movups %xmm0, (%rcx)
movq %r13, 0x8(%r12)
movq %rax, (%r14)
movq $0x0, 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 0x5870(%rip), %rdi      # 0xe185
xorl %eax, %eax
callq 0x2210
leaq 0x5862(%rip), %rdi      # 0xe185
xorl %eax, %eax
callq 0x2210
leaq 0x5854(%rip), %rdi      # 0xe185
xorl %eax, %eax
callq 0x2210
leaq 0x5846(%rip), %rdi      # 0xe185
xorl %esi, %esi
xorl %eax, %eax
callq 0x2210
jmp 0x896d
jmp 0x896d
jmp 0x896d
jmp 0x896d
jmp 0x896d
movq %rax, %r14
movq (%r12), %rdi
cmpq %r15, %rdi
je 0x8970
movq (%r15), %rsi
incq %rsi
callq 0x2170
jmp 0x8970
jmp 0x896d
movq %rax, %r14
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x8987
movq 0x20(%rsp), %rsi
subq %rdi, %rsi
callq 0x2170
movq %r14, %rdi
callq 0x2250