// File: rfotino[P]consolite-compiler/src/syntax.cpp
// Function: LabelStatement::parse(Tokenizer*)
bool LabelStatement::parse(Tokenizer *tokenizer) {
  _lineNum = tokenizer->peekNext().line();
  // Make sure it is a valid label declaration.
  AtomToken t = tokenizer->getNext();
  if (t.str().empty()) {
    _error("Unexpected EOF.", t.line());
    return false;
  } else if (!isLabelDeclaration(t.str())) {
    _error("Invalid label declaration.", t.line());
    return false;
  }
  // Name is the label declaration minus the trailing colon.
  _name = t.str().substr(0, t.str().size() - 1);
  return true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x1c0, %rsp            # imm = 0x1C0
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x190(%rbp)
movq -0x18(%rbp), %rsi
leaq -0x48(%rbp), %rdi
movq %rdi, -0x188(%rbp)
callq 0x6bae0
movq -0x188(%rbp), %rdi
callq 0x32270
movl %eax, -0x17c(%rbp)
jmp 0x2de66
movq -0x190(%rbp), %rax
movl -0x17c(%rbp), %ecx
movl %ecx, 0x8(%rax)
leaq -0x48(%rbp), %rdi
callq 0x99b0
movq -0x18(%rbp), %rsi
leaq -0x88(%rbp), %rdi
movq %rdi, -0x198(%rbp)
callq 0x6ae20
movq -0x198(%rbp), %rsi
leaq -0xa8(%rbp), %rdi
callq 0xd5c0
jmp 0x2deab
leaq -0xa8(%rbp), %rdi
callq 0x8690
movb %al, -0x199(%rbp)
leaq -0xa8(%rbp), %rdi
callq 0x8848
movb -0x199(%rbp), %al
testb $0x1, %al
jne 0x2ded8
jmp 0x2dfbc
leaq -0xc9(%rbp), %rdi
movq %rdi, -0x1a8(%rbp)
callq 0x8760
movq -0x1a8(%rbp), %rdx
leaq 0x41b6e(%rip), %rsi     # 0x6fa67
leaq -0xc8(%rbp), %rdi
callq 0xced0
jmp 0x2df07
leaq -0x88(%rbp), %rdi
callq 0x32270
movl %eax, -0x1ac(%rbp)
jmp 0x2df1b
movl -0x1ac(%rbp), %esi
leaq -0xc8(%rbp), %rdi
callq 0x6d960
jmp 0x2df2f
leaq -0xc8(%rbp), %rdi
callq 0x8848
leaq -0xc9(%rbp), %rdi
callq 0x8460
movb $0x0, -0x1(%rbp)
movl $0x1, -0xd0(%rbp)
jmp 0x2e1ba
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
leaq -0x48(%rbp), %rdi
callq 0x99b0
jmp 0x2e1e0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
jmp 0x2e1d4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
jmp 0x2dfab
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
leaq -0xc8(%rbp), %rdi
callq 0x8848
leaq -0xc9(%rbp), %rdi
callq 0x8460
jmp 0x2e1d4
leaq -0xf0(%rbp), %rdi
leaq -0x88(%rbp), %rsi
callq 0xd5c0
jmp 0x2dfd1
leaq -0xf0(%rbp), %rdi
callq 0x6cda0
movb %al, -0x1ad(%rbp)
jmp 0x2dfe5
movb -0x1ad(%rbp), %al
xorb $-0x1, %al
movb %al, -0x1ae(%rbp)
leaq -0xf0(%rbp), %rdi
callq 0x8848
movb -0x1ae(%rbp), %al
testb $0x1, %al
jne 0x2e00e
jmp 0x2e0e4
leaq -0x111(%rbp), %rdi
movq %rdi, -0x1b8(%rbp)
callq 0x8760
movq -0x1b8(%rbp), %rdx
leaq 0x4205f(%rip), %rsi     # 0x7008e
leaq -0x110(%rbp), %rdi
callq 0xced0
jmp 0x2e03d
leaq -0x88(%rbp), %rdi
callq 0x32270
movl %eax, -0x1bc(%rbp)
jmp 0x2e051
movl -0x1bc(%rbp), %esi
leaq -0x110(%rbp), %rdi
callq 0x6d960
jmp 0x2e065
leaq -0x110(%rbp), %rdi
callq 0x8848
leaq -0x111(%rbp), %rdi
callq 0x8460
movb $0x0, -0x1(%rbp)
movl $0x1, -0xd0(%rbp)
jmp 0x2e1ba
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
leaq -0xf0(%rbp), %rdi
callq 0x8848
jmp 0x2e1d4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
jmp 0x2e0d3
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
leaq -0x110(%rbp), %rdi
callq 0x8848
leaq -0x111(%rbp), %rdi
callq 0x8460
jmp 0x2e1d4
jmp 0x2e0e6
leaq -0x158(%rbp), %rdi
leaq -0x88(%rbp), %rsi
callq 0xd5c0
jmp 0x2e0fb
leaq -0x178(%rbp), %rdi
leaq -0x88(%rbp), %rsi
callq 0xd5c0
jmp 0x2e110
leaq -0x178(%rbp), %rdi
callq 0x8300
movq %rax, %rcx
decq %rcx
xorl %eax, %eax
movl %eax, %edx
leaq -0x138(%rbp), %rdi
leaq -0x158(%rbp), %rsi
callq 0x8410
jmp 0x2e13b
movq -0x190(%rbp), %rdi
addq $0x10, %rdi
leaq -0x138(%rbp), %rsi
callq 0x84e0
leaq -0x138(%rbp), %rdi
callq 0x8848
leaq -0x178(%rbp), %rdi
callq 0x8848
leaq -0x158(%rbp), %rdi
callq 0x8848
movb $0x1, -0x1(%rbp)
movl $0x1, -0xd0(%rbp)
jmp 0x2e1ba
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
jmp 0x2e1ac
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
leaq -0x178(%rbp), %rdi
callq 0x8848
leaq -0x158(%rbp), %rdi
callq 0x8848
jmp 0x2e1d4
leaq -0x88(%rbp), %rdi
callq 0x99b0
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x1c0, %rsp            # imm = 0x1C0
popq %rbp
retq
leaq -0x88(%rbp), %rdi
callq 0x99b0
movq -0x50(%rbp), %rdi
callq 0x8750
nopl (%rax)