// File: /workspace/github_cpp_makefile_star2_O3/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), %rax
movq 0x8(%rsi), %rdx
testq %rdx, %rdx
je 0x8263
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
xorl %esi, %esi
xorl %r13d, %r13d
xorl %r8d, %r8d
xorl %edi, %edi
movb (%rax,%r13), %r9b
testb $0x1, %r8b
je 0x8193
cmpb $0x28, %r9b
sete %r10b
cmpl $-0x1, %ecx
sete %r11b
leal -0x1(%r13), %ebp
testb %r11b, %r10b
cmovnel %ebp, %ecx
movzbl %r8b, %r8d
cmovel %esi, %r8d
jmp 0x8196
xorl %r8d, %r8d
cmpb $0x28, %r9b
sete %r10b
testb %r10b, %dil
jne 0x81d8
cmpl $-0x1, %ecx
setne %r10b
testb $0x1, %r8b
movzbl %r8b, %edi
movl $0x1, %r8d
cmovnel %edi, %r8d
cmpb $0x3a, %r9b
cmovnel %edi, %r8d
sete %dil
andb %r10b, %dil
incq %r13
cmpq %r13, %rdx
jne 0x8166
jmp 0x8263
leaq 0x18(%rsp), %rsi
movq %rsi, -0x10(%rsi)
movq $0x0, -0x8(%rsi)
movb $0x0, (%rsi)
testl %r13d, %r13d
je 0x8263
movslq %ecx, %rbp
xorl %r15d, %r15d
leaq 0x8(%rsp), %r12
cmpq %rbp, %r15
jge 0x8215
movq (%r14), %rax
movsbl (%rax,%r15), %esi
movq %r12, %rdi
callq 0x2120
movq 0x8(%r14), %rdx
cmpq %r13, %r15
jbe 0x8237
cmpq %r15, %rdx
jbe 0x82bc
movq (%r14), %rax
movsbl (%rax,%r15), %esi
movq %r12, %rdi
callq 0x2120
movq 0x8(%r14), %rdx
incq %r15
cmpq %r15, %rdx
ja 0x81fc
movq 0x8(%rsp), %rax
leaq 0x10(%rbx), %rcx
movq %rcx, (%rbx)
leaq 0x18(%rsp), %rdx
cmpq %rdx, %rax
je 0x82ab
movq %rax, (%rbx)
movq 0x18(%rsp), %rax
movq %rax, 0x10(%rbx)
jmp 0x82b1
leaq 0x10(%rbx), %rsi
movq %rsi, (%rbx)
leaq 0x10(%r14), %rcx
cmpq %rcx, %rax
je 0x827f
movq %rax, (%rbx)
movq (%rcx), %rax
movq %rax, 0x10(%rbx)
jmp 0x8285
movups (%rcx), %xmm0
movups %xmm0, (%rsi)
movq %rdx, 0x8(%rbx)
movq %rcx, (%r14)
movq $0x0, 0x8(%r14)
movb $0x0, 0x10(%r14)
movq %rbx, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movups (%rdx), %xmm0
movups %xmm0, (%rcx)
movq 0x10(%rsp), %rax
movq %rax, 0x8(%rbx)
jmp 0x8299
leaq 0x5ec2(%rip), %rdi      # 0xe185
movq %r15, %rsi
xorl %eax, %eax
callq 0x2210
jmp 0x82cf
movq %rax, %rbx
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x82ee
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x2170
movq %rbx, %rdi
callq 0x2250