// File: /workspace/github_cpp_makefile_star2_O1/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, %rbx
movq (%rsi), %rcx
movq 0x8(%rsi), %rdi
testq %rdi, %rdi
je 0x84d9
movq %rdi, 0x20(%rsp)
leaq -0x1(%rdi), %rsi
xorl %r8d, %r8d
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
xorl %r9d, %r9d
xorl %r10d, %r10d
xorl %r15d, %r15d
xorl %edx, %edx
xorl %r11d, %r11d
testb $0x1, %r10b
je 0x8475
cmpb $0x28, (%rcx,%r9)
sete %bpl
cmpl $-0x1, %edi
sete %r12b
leal -0x1(%r11), %r13d
testb %r12b, %bpl
cmovnel %r13d, %edi
movzbl %r10b, %r10d
cmovel %r8d, %r10d
jmp 0x8478
xorl %r10d, %r10d
movb (%rcx,%r9), %r12b
cmpb $0x28, %r12b
sete %bpl
andb %r15b, %bpl
je 0x848e
movl %r11d, %edx
jmp 0x84b9
cmpl $-0x1, %edi
setne %r13b
testb $0x1, %r10b
movzbl %r10b, %eax
movl $0x1, %r10d
cmovnel %eax, %r10d
cmpb $0x3a, %r12b
sete %r15b
cmovnel %eax, %r10d
andb %r13b, %r15b
incl %r11d
cmpq %r9, %rsi
sete %al
orb %al, %bpl
incq %r9
cmpb $0x1, %bpl
jne 0x844a
movslq %edi, %rbp
movq 0x20(%rsp), %rdi
jmp 0x84e2
movq $-0x1, %rbp
xorl %edx, %edx
leaq 0x10(%rsp), %r8
movq %r8, -0x10(%r8)
movq $0x0, -0x8(%r8)
movb $0x0, (%r8)
testl %edx, %edx
je 0x856e
cmpq $0x0, 0x8(%r14)
je 0x854b
movslq %edx, %r13
xorl %r15d, %r15d
movq %rsp, %r12
cmpq %rbp, %r15
jge 0x8520
movq (%r14), %rax
movsbl (%rax,%r15), %esi
movq %r12, %rdi
callq 0x2120
cmpq %r13, %r15
jle 0x8542
movq 0x8(%r14), %rdx
cmpq %r15, %rdx
jbe 0x85f0
movq (%r14), %rax
movsbl (%rax,%r15), %esi
movq %r12, %rdi
callq 0x2120
incq %r15
cmpq %r15, 0x8(%r14)
ja 0x850b
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
movq (%rsp), %rcx
leaq 0x10(%rsp), %r8
cmpq %r8, %rcx
je 0x858a
movq %rcx, (%rbx)
movq 0x10(%rsp), %rax
movq %rax, 0x10(%rbx)
jmp 0x8591
leaq 0x10(%rbx), %rsi
movq %rsi, (%rbx)
leaq 0x10(%r14), %rdx
cmpq %rdx, %rcx
je 0x85ae
movq %rcx, (%rbx)
movq (%rdx), %rax
movq %rax, 0x10(%rbx)
jmp 0x85b4
movups (%r8), %xmm0
movups %xmm0, (%rax)
movq 0x8(%rsp), %rax
movq %rax, 0x8(%rbx)
movq %r8, (%rsp)
movq $0x0, 0x8(%rsp)
movb $0x0, 0x10(%rsp)
jmp 0x85c8
movups (%rdx), %xmm0
movups %xmm0, (%rsi)
movq %rdi, 0x8(%rbx)
movq %rdx, (%r14)
movq $0x0, 0x8(%r14)
movb $0x0, 0x10(%r14)
movq (%rsp), %rdi
cmpq %r8, %rdi
je 0x85de
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x2170
movq %rbx, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x5b8e(%rip), %rdi      # 0xe185
movq %r15, %rsi
xorl %eax, %eax
callq 0x2210
jmp 0x8603
movq %rax, %rbx
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x8621
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x2170
movq %rbx, %rdi
callq 0x2250