// File: Eronana[P]strawberry/src/lexer.cpp
// Function: Lexer::skipComment(Token&)
bool Lexer::skipComment(Token &t)
{
    skipWhiteSpace();
    if (lookHead() != '/') return true;
    if (lookHead(1) == '/')
    {
        for (clearChar(2); lookHead() != CHAR_EOF && lookHead() != '\n'; clearChar());
        if (lookHead() == CHAR_EOF) return true;
        line_number++;
        col_number = 0;
        clearChar();
        return skipComment(t);
    }

    else if (lookHead(1) == '*')
    {
        int comment_nest = 1;
        for (clearChar(2); comment_nest; clearChar())
        {
            switch (lookHead())
            {
            case CHAR_EOF:
                t = createToken(TOKEN_ERROR, 0, "Unterminated comment");
                return false;
            case '\n':
                line_number++;
                col_number = 0;
                break;
            case '/':
                if (lookHead(1) == '*')
                {
                    comment_nest++;
                    clearChar();
                }
                else if (lookHead(1) != '/') clearChar();
                break;
            case '*':
                if (lookHead(1) == '/')
                {
                    comment_nest--;
                    clearChar();
                }
                else if (lookHead(1) != '*') clearChar();
                break;
            }
        }
        return skipComment(t);
    }
    return true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xc0, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rdi
movq %rdi, -0xb0(%rbp)
callq 0x4e7b0
movq -0xb0(%rbp), %rdi
xorl %esi, %esi
callq 0x4e350
movsbl %al, %eax
cmpl $0x2f, %eax
je 0x4e872
movb $0x1, -0x1(%rbp)
jmp 0x4ebc6
movq -0xb0(%rbp), %rdi
movl $0x1, %esi
callq 0x4e350
movsbl %al, %eax
cmpl $0x2f, %eax
jne 0x4e956
movq -0xb0(%rbp), %rdi
movl $0x2, %esi
callq 0x4e3d0
movq -0xb0(%rbp), %rdi
xorl %esi, %esi
callq 0x4e350
movsbl %al, %ecx
xorl %eax, %eax
cmpl $-0x1, %ecx
movb %al, -0xb1(%rbp)
je 0x4e8db
movq -0xb0(%rbp), %rdi
xorl %esi, %esi
callq 0x4e350
movsbl %al, %eax
cmpl $0xa, %eax
setne %al
movb %al, -0xb1(%rbp)
movb -0xb1(%rbp), %al
testb $0x1, %al
jne 0x4e8e7
jmp 0x4e8fc
jmp 0x4e8e9
movq -0xb0(%rbp), %rdi
movl $0x1, %esi
callq 0x4e3d0
jmp 0x4e8a0
movq -0xb0(%rbp), %rdi
xorl %esi, %esi
callq 0x4e350
movsbl %al, %eax
cmpl $-0x1, %eax
jne 0x4e91b
movb $0x1, -0x1(%rbp)
jmp 0x4ebc6
movq -0xb0(%rbp), %rdi
movl 0x28(%rdi), %eax
addl $0x1, %eax
movl %eax, 0x28(%rdi)
movl $0x0, 0x2c(%rdi)
movl $0x1, %esi
callq 0x4e3d0
movq -0xb0(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x4e830
andb $0x1, %al
movb %al, -0x1(%rbp)
jmp 0x4ebc6
movq -0xb0(%rbp), %rdi
movl $0x1, %esi
callq 0x4e350
movsbl %al, %eax
cmpl $0x2a, %eax
jne 0x4ebc0
movq -0xb0(%rbp), %rdi
movl $0x1, -0x1c(%rbp)
movl $0x2, %esi
callq 0x4e3d0
cmpl $0x0, -0x1c(%rbp)
je 0x4eba9
movq -0xb0(%rbp), %rdi
xorl %esi, %esi
callq 0x4e350
movsbl %al, %eax
movl %eax, -0xb8(%rbp)
subl $-0x1, %eax
je 0x4e9e9
jmp 0x4e9b3
movl -0xb8(%rbp), %eax
subl $0xa, %eax
je 0x4eaaf
jmp 0x4e9c4
movl -0xb8(%rbp), %eax
subl $0x2a, %eax
je 0x4eb2e
jmp 0x4e9d5
movl -0xb8(%rbp), %eax
subl $0x2f, %eax
je 0x4eacb
jmp 0x4eb91
leaq -0x91(%rbp), %rdi
movq %rdi, -0xc0(%rbp)
callq 0x75f0
movq -0xc0(%rbp), %rdx
leaq 0xab42(%rip), %rsi      # 0x5954c
leaq -0x90(%rbp), %rdi
callq 0xf990
jmp 0x4ea18
movq -0xb0(%rbp), %rsi
leaq -0x70(%rbp), %rdi
xorl %ecx, %ecx
leaq -0x90(%rbp), %r8
movl %ecx, %edx
callq 0x4e720
jmp 0x4ea35
movq -0x18(%rbp), %rdi
leaq -0x70(%rbp), %rsi
callq 0x504f0
leaq -0x70(%rbp), %rdi
callq 0x9600
leaq -0x90(%rbp), %rdi
callq 0x71d0
leaq -0x91(%rbp), %rdi
callq 0x7310
movb $0x0, -0x1(%rbp)
jmp 0x4ebc6
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xa0(%rbp)
movl %eax, -0xa4(%rbp)
jmp 0x4ea9e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xa0(%rbp)
movl %eax, -0xa4(%rbp)
leaq -0x90(%rbp), %rdi
callq 0x71d0
leaq -0x91(%rbp), %rdi
callq 0x7310
jmp 0x4ebd4
movq -0xb0(%rbp), %rax
movl 0x28(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x28(%rax)
movl $0x0, 0x2c(%rax)
jmp 0x4eb91
movq -0xb0(%rbp), %rdi
movl $0x1, %esi
callq 0x4e350
movsbl %al, %eax
cmpl $0x2a, %eax
jne 0x4eb00
movq -0xb0(%rbp), %rdi
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
movl $0x1, %esi
callq 0x4e3d0
jmp 0x4eb2c
movq -0xb0(%rbp), %rdi
movl $0x1, %esi
callq 0x4e350
movsbl %al, %eax
cmpl $0x2f, %eax
je 0x4eb2a
movq -0xb0(%rbp), %rdi
movl $0x1, %esi
callq 0x4e3d0
jmp 0x4eb2c
jmp 0x4eb91
movq -0xb0(%rbp), %rdi
movl $0x1, %esi
callq 0x4e350
movsbl %al, %eax
cmpl $0x2f, %eax
jne 0x4eb63
movq -0xb0(%rbp), %rdi
movl -0x1c(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x1c(%rbp)
movl $0x1, %esi
callq 0x4e3d0
jmp 0x4eb8f
movq -0xb0(%rbp), %rdi
movl $0x1, %esi
callq 0x4e350
movsbl %al, %eax
cmpl $0x2a, %eax
je 0x4eb8d
movq -0xb0(%rbp), %rdi
movl $0x1, %esi
callq 0x4e3d0
jmp 0x4eb8f
jmp 0x4eb91
jmp 0x4eb93
movq -0xb0(%rbp), %rdi
movl $0x1, %esi
callq 0x4e3d0
jmp 0x4e98b
movq -0xb0(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x4e830
andb $0x1, %al
movb %al, -0x1(%rbp)
jmp 0x4ebc6
jmp 0x4ebc2
movb $0x1, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0xc0, %rsp
popq %rbp
retq
movq -0xa0(%rbp), %rdi
callq 0x75e0