// File: 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
movq %rsp, %rbp
subq $0x120, %rsp            # imm = 0x120
movq %rsi, -0xe8(%rbp)
movq %rdi, %rax
movq -0xe8(%rbp), %rdi
movq %rax, -0xe0(%rbp)
movq %rax, %rcx
movq %rcx, -0xd8(%rbp)
movq %rax, -0x8(%rbp)
movq %rdi, -0x10(%rbp)
callq 0x3330
cmpq $0x0, %rax
jne 0xac28
movq -0xe8(%rbp), %rsi
movq -0xe0(%rbp), %rdi
callq 0x3140
jmp 0xb0d0
movq -0xe8(%rbp), %rax
movb $0x1, -0x11(%rbp)
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rdi
callq 0x31e0
movq %rax, -0x28(%rbp)
movq -0x20(%rbp), %rdi
callq 0x3130
movq %rax, -0x30(%rbp)
leaq -0x28(%rbp), %rdi
leaq -0x30(%rbp), %rsi
callq 0x9180
testb $0x1, %al
jne 0xac64
jmp 0xac8e
leaq -0x28(%rbp), %rdi
callq 0x91c0
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x20, %eax
je 0xac81
movb $0x0, -0x11(%rbp)
jmp 0xac83
leaq -0x28(%rbp), %rdi
callq 0x91e0
jmp 0xac51
testb $0x1, -0x11(%rbp)
je 0xace8
leaq -0x39(%rbp), %rdi
movq %rdi, -0xf0(%rbp)
callq 0x3390
movq -0xe0(%rbp), %rdi
movq -0xf0(%rbp), %rdx
leaq 0xa397(%rip), %rsi      # 0x15050
callq 0x8eb0
jmp 0xacc0
leaq -0x39(%rbp), %rdi
callq 0x3270
jmp 0xb0d0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0x39(%rbp), %rdi
callq 0x3270
jmp 0xb0e0
leaq -0x68(%rbp), %rdi
callq 0xc970
movq -0xe8(%rbp), %rax
movb $0x0, -0x69(%rbp)
movl $0x0, -0x70(%rbp)
movq %rax, -0x78(%rbp)
movq -0x78(%rbp), %rdi
callq 0x31e0
movq %rax, -0x80(%rbp)
movq -0x78(%rbp), %rdi
callq 0x3130
movq %rax, -0x88(%rbp)
leaq -0x80(%rbp), %rdi
leaq -0x88(%rbp), %rsi
callq 0x9180
testb $0x1, %al
jne 0xad3d
jmp 0xadd8
leaq -0x80(%rbp), %rdi
callq 0x91c0
movq %rax, -0x90(%rbp)
movq -0x90(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x22, %eax
jne 0xad5e
jmp 0xadd8
testb $0x1, -0x69(%rbp)
je 0xad95
movq -0x90(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x20, %eax
jne 0xad95
leaq -0x68(%rbp), %rdi
leaq -0x70(%rbp), %rsi
callq 0xc990
jmp 0xad82
jmp 0xad95
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0xb0c5
movq -0x90(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x20, %eax
jne 0xada8
movb $0x1, -0x69(%rbp)
testb $0x1, -0x69(%rbp)
je 0xadc1
movq -0x90(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x20, %eax
je 0xadc1
movb $0x0, -0x69(%rbp)
movl -0x70(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x70(%rbp)
leaq -0x80(%rbp), %rdi
callq 0x91e0
jmp 0xad24
movq -0xe8(%rbp), %rdi
movb $0x0, -0x91(%rbp)
callq 0x3330
movq -0xe8(%rbp), %rdi
movq %rax, %rsi
decq %rsi
callq 0x33c0
movq %rax, -0xf8(%rbp)
jmp 0xae06
movq -0xf8(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x20, %eax
jne 0xae1c
movb $0x1, -0x91(%rbp)
movl $0x1, -0x98(%rbp)
testb $0x1, -0x91(%rbp)
je 0xaeb9
movq -0xe8(%rbp), %rdi
callq 0x3330
movq -0xe8(%rbp), %rdi
movq %rax, %rsi
movslq -0x98(%rbp), %rax
subq %rax, %rsi
callq 0x33c0
movq %rax, -0x100(%rbp)
jmp 0xae61
movq -0x100(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x20, %eax
jne 0xae9e
movq -0xe8(%rbp), %rdi
callq 0x3330
movl -0x98(%rbp), %ecx
subl %ecx, %eax
movl %eax, -0x9c(%rbp)
leaq -0x68(%rbp), %rdi
leaq -0x9c(%rbp), %rsi
callq 0xca00
jmp 0xae9c
jmp 0xaea5
movb $0x0, -0x91(%rbp)
movl -0x98(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x98(%rbp)
jmp 0xae26
movq -0xe8(%rbp), %rdi
movb $0x0, -0x9d(%rbp)
xorl %eax, %eax
movl %eax, %esi
callq 0x33c0
movq %rax, -0x108(%rbp)
jmp 0xaed9
movq -0x108(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x20, %eax
jne 0xaeef
movb $0x1, -0x9d(%rbp)
movl $0x0, -0xa4(%rbp)
testb $0x1, -0x9d(%rbp)
je 0xaf59
movq -0xe8(%rbp), %rdi
movslq -0xa4(%rbp), %rsi
callq 0x33c0
movq %rax, -0x110(%rbp)
jmp 0xaf1e
movq -0x110(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x20, %eax
jne 0xaf41
leaq -0x68(%rbp), %rdi
leaq -0xa4(%rbp), %rsi
callq 0xc990
jmp 0xaf3f
jmp 0xaf48
movb $0x0, -0x9d(%rbp)
movl -0xa4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xa4(%rbp)
jmp 0xaef9
movq -0xe0(%rbp), %rdi
movb $0x0, -0xa5(%rbp)
callq 0x3300
movl $0x0, -0xac(%rbp)
movq -0xe8(%rbp), %rdi
movslq -0xac(%rbp), %rax
movq %rax, -0x118(%rbp)
callq 0x3330
movq %rax, %rcx
movq -0x118(%rbp), %rax
cmpq %rcx, %rax
jae 0xb09e
movb $0x0, -0xad(%rbp)
leaq -0x68(%rbp), %rax
movq %rax, -0xb8(%rbp)
movq -0xb8(%rbp), %rdi
callq 0xca30
movq %rax, -0xc0(%rbp)
movq -0xb8(%rbp), %rdi
callq 0xca60
movq %rax, -0xc8(%rbp)
leaq -0xc0(%rbp), %rdi
leaq -0xc8(%rbp), %rsi
callq 0xca90
testb $0x1, %al
jne 0xaff4
jmp 0xb02f
leaq -0xc0(%rbp), %rdi
callq 0xcad0
movq %rax, -0xd0(%rbp)
movq -0xd0(%rbp), %rax
movl (%rax), %eax
cmpl -0xac(%rbp), %eax
jne 0xb01f
movb $0x1, -0xad(%rbp)
jmp 0xb021
leaq -0xc0(%rbp), %rdi
callq 0xcaf0
jmp 0xafdb
testb $0x1, -0xad(%rbp)
jne 0xb088
movq -0xe8(%rbp), %rdi
movslq -0xac(%rbp), %rsi
callq 0x33c0
movq %rax, -0x120(%rbp)
jmp 0xb054
movq -0xe0(%rbp), %rdi
movq -0x120(%rbp), %rax
movsbl (%rax), %esi
callq 0x3170
jmp 0xb06c
jmp 0xb088
movq -0xe0(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
callq 0x3160
jmp 0xb0c5
jmp 0xb08a
movl -0xac(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xac(%rbp)
jmp 0xaf76
movb $0x1, -0xa5(%rbp)
testb $0x1, -0xa5(%rbp)
jne 0xb0ba
movq -0xe0(%rbp), %rdi
callq 0x3160
leaq -0x68(%rbp), %rdi
callq 0xcb10
jmp 0xb0d0
leaq -0x68(%rbp), %rdi
callq 0xcb10
jmp 0xb0e0
movq -0xd8(%rbp), %rax
addq $0x120, %rsp            # imm = 0x120
popq %rbp
retq
movq -0x48(%rbp), %rdi
callq 0x3380
nopl (%rax)