// File: /workspace/github_cpp_makefile_star2_O2/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rsi, %r14
movq %rdi, %r12
movq (%rsi), %rsi
movq 0x8(%r14), %rax
pushq $-0x1
popq %rcx
xorl %edx, %edx
pushq $0x1
popq %r8
xorl %edi, %edi
xorl %r9d, %r9d
xorl %r11d, %r11d
cmpq %rdi, %rax
je 0x6107
movb (%rsi,%rdi), %r10b
testb $0x1, %r11b
je 0x60cd
cmpb $0x28, %r10b
sete %bl
cmpl $-0x1, %ecx
sete %bpl
leal -0x1(%rdi), %r15d
testb %bpl, %bl
cmovnel %r15d, %ecx
movzbl %r11b, %r11d
cmovel %edx, %r11d
jmp 0x60d0
xorl %r11d, %r11d
cmpb $0x28, %r10b
sete %bl
testb %bl, %r9b
jne 0x6105
cmpl $-0x1, %ecx
setne %bl
testb $0x1, %r11b
movzbl %r11b, %ebp
movl %r8d, %r11d
cmovnel %ebp, %r11d
cmpb $0x3a, %r10b
sete %r9b
cmovnel %ebp, %r11d
andb %bl, %r9b
incq %rdi
jmp 0x609b
movl %edi, %edx
leaq 0x10(%rsp), %r13
movq %r13, -0x10(%r13)
andq $0x0, -0x8(%r13)
movb $0x0, (%r13)
testl %edx, %edx
je 0x6199
movq %r12, 0x20(%rsp)
movslq %ecx, %rbp
movl %edx, %ebx
xorl %r15d, %r15d
movq %rsp, %r12
cmpq %r15, %rax
jbe 0x6172
cmpq %rbp, %r15
jge 0x614e
movq %r14, %rdi
movq %r15, %rsi
callq 0x2290
movsbl (%rax), %esi
movq %r12, %rdi
callq 0x2140
cmpq %rbx, %r15
jbe 0x6169
movq %r14, %rdi
movq %r15, %rsi
callq 0x2290
movsbl (%rax), %esi
movq %r12, %rdi
callq 0x2140
incq %r15
movq 0x8(%r14), %rax
jmp 0x612e
movq 0x20(%rsp), %r12
leaq 0x10(%r12), %rax
movq %rax, (%r12)
movq (%rsp), %rcx
cmpq %r13, %rcx
je 0x61a6
movq %rcx, (%r12)
movq 0x10(%rsp), %rax
movq %rax, 0x10(%r12)
jmp 0x61ae
movq %r12, %rdi
movq %r14, %rsi
callq 0x21d0
jmp 0x61c7
movups (%r13), %xmm0
movups %xmm0, (%rax)
movq 0x8(%rsp), %rax
movq %rax, 0x8(%r12)
movq %r13, (%rsp)
andq $0x0, 0x8(%rsp)
movb $0x0, 0x10(%rsp)
movq %rsp, %rdi
callq 0x20c0
movq %r12, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq %rsp, %rdi
callq 0x20c0
movq %rbx, %rdi
callq 0x2250