// File: Manuel123cool[P]smiley/regex.cpp
// Function: MyRegex::processComments(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
std::string MyRegex::processComments(std::string code)
{
    bool firstEmojiStart{ false };
    bool secondEmojiStart{ false };
    int numOfDelStart{ -1 };
    int numOfDelEnd{ 0 };
    int count{ 0 };
    for(const auto &c : code)
    {
        if (firstEmojiStart && c == '(' && numOfDelStart == -1)
        {
            numOfDelStart = count - 1; 
        }
        else
        {
            firstEmojiStart = false;
        }
        
        
        if (secondEmojiStart && c == '(')
        {
            numOfDelEnd = count;
            break;
        }
        else 
        {
            secondEmojiStart = false;
        }
            
        if (!secondEmojiStart && c == ':' && numOfDelStart != -1)
            secondEmojiStart = true;
    
        if (c == ':' && !firstEmojiStart)
            firstEmojiStart = true; 
        ++count;
    }
    
    std::string codeWithoutCom;
    
    if (numOfDelEnd == 0)
        return code;

    for (int i{ 0 }; i < code.length(); ++i)
    {
        if (i < numOfDelStart)
            codeWithoutCom += code.at(i); 
        if (i > numOfDelEnd)
            codeWithoutCom += code.at(i); 
    }
    return codeWithoutCom;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xb0, %rsp
movq %rsi, -0x90(%rbp)
movq %rdi, -0x88(%rbp)
movq %rdi, %rax
movq %rax, -0x80(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movb $0x0, -0x11(%rbp)
movb $0x0, -0x12(%rbp)
movl $0xffffffff, -0x18(%rbp) # imm = 0xFFFFFFFF
movl $0x0, -0x1c(%rbp)
movl $0x0, -0x20(%rbp)
movq %rsi, -0x28(%rbp)
movq -0x28(%rbp), %rdi
callq 0x31e0
movq %rax, -0x30(%rbp)
movq -0x28(%rbp), %rdi
callq 0x3130
movq %rax, -0x38(%rbp)
leaq -0x30(%rbp), %rdi
leaq -0x38(%rbp), %rsi
callq 0x9180
testb $0x1, %al
jne 0xaa09
jmp 0xaaa4
leaq -0x30(%rbp), %rdi
callq 0x91c0
movq %rax, -0x40(%rbp)
testb $0x1, -0x11(%rbp)
je 0xaa39
movq -0x40(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x28, %eax
jne 0xaa39
cmpl $-0x1, -0x18(%rbp)
jne 0xaa39
movl -0x20(%rbp), %eax
subl $0x1, %eax
movl %eax, -0x18(%rbp)
jmp 0xaa3d
movb $0x0, -0x11(%rbp)
testb $0x1, -0x12(%rbp)
je 0xaa57
movq -0x40(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x28, %eax
jne 0xaa57
movl -0x20(%rbp), %eax
movl %eax, -0x1c(%rbp)
jmp 0xaaa4
movb $0x0, -0x12(%rbp)
testb $0x1, -0x12(%rbp)
jne 0xaa77
movq -0x40(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x3a, %eax
jne 0xaa77
cmpl $-0x1, -0x18(%rbp)
je 0xaa77
movb $0x1, -0x12(%rbp)
movq -0x40(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x3a, %eax
jne 0xaa8d
testb $0x1, -0x11(%rbp)
jne 0xaa8d
movb $0x1, -0x11(%rbp)
movl -0x20(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x20(%rbp)
leaq -0x30(%rbp), %rdi
callq 0x91e0
jmp 0xa9f3
leaq -0x60(%rbp), %rdi
callq 0x3300
cmpl $0x0, -0x1c(%rbp)
jne 0xaad2
movq -0x90(%rbp), %rsi
movq -0x88(%rbp), %rdi
callq 0x3140
movl $0x1, -0x64(%rbp)
jmp 0xabb1
movl $0x0, -0x68(%rbp)
movq -0x90(%rbp), %rdi
movslq -0x68(%rbp), %rax
movq %rax, -0x98(%rbp)
callq 0x3330
movq %rax, %rcx
movq -0x98(%rbp), %rax
cmpq %rcx, %rax
jae 0xab9a
movl -0x68(%rbp), %eax
cmpl -0x18(%rbp), %eax
jge 0xab52
movq -0x90(%rbp), %rdi
movslq -0x68(%rbp), %rsi
callq 0x33c0
movq %rax, -0xa0(%rbp)
jmp 0xab24
movq -0xa0(%rbp), %rax
movsbl (%rax), %esi
leaq -0x60(%rbp), %rdi
callq 0x3170
jmp 0xab39
jmp 0xab52
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x70(%rbp)
movl %eax, -0x74(%rbp)
leaq -0x60(%rbp), %rdi
callq 0x3160
jmp 0xabc7
movl -0x68(%rbp), %eax
cmpl -0x1c(%rbp), %eax
jle 0xab8a
movq -0x90(%rbp), %rdi
movslq -0x68(%rbp), %rsi
callq 0x33c0
movq %rax, -0xa8(%rbp)
jmp 0xab73
movq -0xa8(%rbp), %rax
movsbl (%rax), %esi
leaq -0x60(%rbp), %rdi
callq 0x3170
jmp 0xab88
jmp 0xab8a
jmp 0xab8c
movl -0x68(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x68(%rbp)
jmp 0xaad9
movq -0x88(%rbp), %rdi
leaq -0x60(%rbp), %rsi
callq 0x3140
movl $0x1, -0x64(%rbp)
leaq -0x60(%rbp), %rdi
callq 0x3160
movq -0x80(%rbp), %rax
addq $0xb0, %rsp
popq %rbp
retq
movq -0x70(%rbp), %rdi
callq 0x3380