// File: /workspace/github_cpp_makefile_star2_O2/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, %rbx
movq 0x8(%rsi), %r13
testq %r13, %r13
je 0x6249
movq (%r14), %rbp
movb $0x1, %al
xorl %ecx, %ecx
cmpq %rcx, %r13
je 0x622c
cmpb $0x20, (%rbp,%rcx)
sete %dl
andb %dl, %al
incq %rcx
jmp 0x6218
testb $0x1, %al
je 0x6259
leaq 0x3e19(%rip), %rsi      # 0xa050
leaq 0x10(%rsp), %rdx
movq %rbx, %rdi
callq 0x57ec
jmp 0x63e9
movq %rbx, %rdi
movq %r14, %rsi
callq 0x21d0
jmp 0x63e9
movq %rbx, 0x30(%rsp)
xorps %xmm0, %xmm0
leaq 0x10(%rsp), %rax
movaps %xmm0, (%rax)
andq $0x0, 0x10(%rax)
leaq 0xc(%rsp), %rax
andl $0x0, (%rax)
xorl %r12d, %r12d
xorl %ebx, %ebx
xorl %eax, %eax
xorl %r15d, %r15d
cmpq %rbx, %r13
je 0x62d5
movb (%rbp,%rbx), %cl
cmpb $0x22, %cl
je 0x62d5
cmpb $0x20, %cl
jne 0x62b0
testb $0x1, %r15b
je 0x62b0
leaq 0x10(%rsp), %rdi
leaq 0xc(%rsp), %rsi
callq 0x7256
movb (%rbp,%rbx), %cl
movl 0xc(%rsp), %eax
movzbl %r15b, %r15d
testb $0x1, %r15b
cmovnel %r12d, %r15d
cmpb $0x20, %cl
cmovel %r12d, %r15d
pushq $0x1
popq %rcx
cmovel %ecx, %r15d
incl %eax
movl %eax, 0xc(%rsp)
incq %rbx
jmp 0x6280
movq 0x8(%r14), %rsi
decq %rsi
movq %r14, %rdi
callq 0x2290
cmpb $0x20, (%rax)
sete %bpl
pushq $-0x1
popq %rbx
leaq 0x10(%rsp), %r15
leaq 0x8(%rsp), %r12
testb $0x1, %bpl
je 0x6330
movq 0x8(%r14), %rsi
addq %rbx, %rsi
movq %r14, %rdi
callq 0x2290
cmpb $0x20, (%rax)
sete %bpl
jne 0x632b
movl 0x8(%r14), %eax
addl %ebx, %eax
movl %eax, 0x8(%rsp)
movq %r15, %rdi
movq %r12, %rsi
callq 0x7648
decq %rbx
jmp 0x62f8
xorl %ebx, %ebx
movq %r14, %rdi
xorl %esi, %esi
callq 0x2290
cmpb $0x20, (%rax)
sete %bpl
leaq 0x10(%rsp), %r15
leaq 0x8(%rsp), %r12
movl %ebx, 0x8(%rsp)
testb $0x1, %bpl
je 0x637e
movslq %ebx, %rsi
movq %r14, %rdi
callq 0x2290
cmpb $0x20, (%rax)
sete %bpl
jne 0x6376
movq %r15, %rdi
movq %r12, %rsi
callq 0x7256
movl 0x8(%rsp), %ebx
incl %ebx
jmp 0x634d
movq 0x30(%rsp), %rbx
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
andq $0x0, 0x8(%rbx)
movb $0x0, 0x10(%rbx)
xorl %r15d, %r15d
cmpq %r15, 0x8(%r14)
jbe 0x63df
movq 0x10(%rsp), %rax
movq 0x18(%rsp), %rdx
xorl %ecx, %ecx
cmpq %rdx, %rax
je 0x63bf
movl (%rax), %esi
cmpq %rsi, %r15
sete %sil
orb %sil, %cl
addq $0x4, %rax
jmp 0x63a8
testb $0x1, %cl
jne 0x63da
movq %r14, %rdi
movq %r15, %rsi
callq 0x2290
movsbl (%rax), %esi
movq %rbx, %rdi
callq 0x2140
incq %r15
jmp 0x6396
leaq 0x10(%rsp), %rdi
callq 0x74d2
movq %rbx, %rax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x6412
jmp 0x6412
jmp 0x6412
jmp 0x6412
movq %rax, %r14
movq %rbx, %rdi
callq 0x20c0
jmp 0x6415
jmp 0x6412
movq %rax, %r14
leaq 0x10(%rsp), %rdi
callq 0x74d2
movq %r14, %rdi
callq 0x2250