// File: /workspace/github_c_makefile_star2_O3/mrkite[P]regs/docmaker/parser.cc
// Function: Parser::parseEnum(Symbol*, File*)
bool Parser::parseEnum(Symbol *s, File *f) {
  Enum *e = new Enum();
  s->kind = isEnum;
  s->asEnum = e;
  if (!f->token().expect('<')) {
    return false;
  }
  Token token = f->token();
  if (token.type != VAR) {
    error(f, "Expected a type name\n");
    return false;
  }
  e->type = find(token);
  if (!f->token().expect('>')) {
    return false;
  }
  if (!f->token().expect('{')) {
    return false;
  }
  int32_t prevVal = -1;
  while ((token = f->token()).type == VAR) {
    std::string key = token.asStr;
    token = f->token();
    if (token.type == SYMBOL && token.asSym == '=') {
      prevVal = f->token().asNum;
      token = f->token();
    } else {
      prevVal++;
    }
    e->entries.insert(std::pair<std::string, int32_t>(key, prevVal));
    if (!token.expect(",}")) {
      return false;
    }
    if (token.asSym == '}') {
      break;
    }
  }
  return token.expect('}');
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xd8, %rsp
movq %rdx, %rbx
movq %rsi, %r12
movq %rdi, %r15
movl $0x38, %edi
callq 0x31f0
movq %rax, %r14
addq $0x10, %rax
xorps %xmm0, %xmm0
movaps %xmm0, (%r14)
movaps %xmm0, 0x10(%r14)
movq %rax, 0x20(%r14)
movq %rax, 0x28(%r14)
movq $0x0, 0x30(%r14)
movl $0x1, 0x78(%r12)
movq %r14, 0x80(%r12)
leaq 0x60(%rsp), %r12
movq %r12, %rdi
movq %rbx, %rsi
callq 0x7862
movq %r12, %rdi
movl $0x3c, %esi
callq 0x7afc
movl %eax, %ebp
leaq 0xa0(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x4926
movq 0xa0(%rsp), %rsi
incq %rsi
callq 0x3200
leaq 0x78(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x4941
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x3200
testb %bpl, %bpl
je 0x4d20
leaq 0x60(%rsp), %r12
movq %r12, %rdi
movq %rbx, %rsi
callq 0x7862
cmpl $0x7, (%r12)
jne 0x4d2c
leaq 0x60(%rsp), %rsi
movq %r15, %rdi
callq 0x3f92
leaq 0xa0(%rsp), %r15
movq %rax, (%r14)
leaq 0x8(%rsp), %rdi
movq %rbx, %rsi
callq 0x7862
leaq 0x78(%rsp), %r12
leaq 0x8(%rsp), %rdi
movl $0x3e, %esi
callq 0x7afc
movl %eax, %ebp
leaq 0x48(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x49bb
movq 0x48(%rsp), %rsi
incq %rsi
callq 0x3200
leaq 0x20(%rsp), %r13
movq -0x10(%r13), %rdi
cmpq %r13, %rdi
je 0x49d6
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x3200
testb %bpl, %bpl
je 0x4d24
leaq 0x8(%rsp), %rdi
movq %rbx, %rsi
callq 0x7862
leaq 0x8(%rsp), %rdi
movl $0x7b, %esi
callq 0x7afc
movl %eax, %ebp
movq 0x38(%rsp), %rdi
leaq 0x48(%rsp), %rax
cmpq %rax, %rdi
je 0x4a19
movq 0x48(%rsp), %rsi
incq %rsi
callq 0x3200
movq 0x10(%rsp), %rdi
cmpq %r13, %rdi
je 0x4a30
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x3200
testb %bpl, %bpl
je 0x4d24
addq $0x8, %r14
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
leaq 0x8(%rsp), %r12
movq %r12, %rdi
movq %rbx, %rsi
callq 0x7862
movl 0x8(%rsp), %eax
movl %eax, 0x60(%rsp)
leaq 0x68(%rsp), %rdi
leaq 0x10(%rsp), %rsi
callq 0x3260
movq 0x30(%rsp), %rax
movq %rax, 0x88(%rsp)
leaq 0x90(%rsp), %rdi
leaq 0x38(%rsp), %rsi
callq 0x3260
movl 0x58(%rsp), %eax
movl %eax, 0xb0(%rsp)
movl 0x60(%rsp), %r15d
movq 0x38(%rsp), %rdi
leaq 0x48(%rsp), %rax
cmpq %rax, %rdi
je 0x4ab4
movq 0x48(%rsp), %rsi
incq %rsi
callq 0x3200
movq 0x10(%rsp), %rdi
cmpq %r13, %rdi
je 0x4acb
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x3200
cmpl $0x7, %r15d
jne 0x4d0d
leaq 0xc8(%rsp), %rax
movq %rax, 0xb8(%rsp)
movq 0x68(%rsp), %rsi
movq 0x70(%rsp), %rdx
addq %rsi, %rdx
leaq 0xb8(%rsp), %rdi
callq 0x6342
movq %r12, %rdi
movq %rbx, %rsi
callq 0x7862
movl 0x8(%rsp), %eax
movl %eax, 0x60(%rsp)
leaq 0x68(%rsp), %rdi
leaq 0x10(%rsp), %rsi
callq 0x3260
movq 0x30(%rsp), %rax
movq %rax, 0x88(%rsp)
leaq 0x90(%rsp), %rdi
leaq 0x38(%rsp), %rsi
callq 0x3260
movl 0x58(%rsp), %eax
movl %eax, 0xb0(%rsp)
movq 0x38(%rsp), %rdi
leaq 0x48(%rsp), %rax
cmpq %rax, %rdi
je 0x4b67
movq 0x48(%rsp), %rsi
incq %rsi
callq 0x3200
movq 0x10(%rsp), %rdi
cmpq %r13, %rdi
je 0x4b7e
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x3200
cmpl $0x3, 0x60(%rsp)
jne 0x4c5a
cmpb $0x3d, 0x88(%rsp)
jne 0x4c5a
movq %r12, %rdi
movq %rbx, %rsi
callq 0x7862
movl 0x34(%rsp), %ebp
movq 0x38(%rsp), %rdi
leaq 0x48(%rsp), %rax
cmpq %rax, %rdi
je 0x4bc2
movq 0x48(%rsp), %rsi
incq %rsi
callq 0x3200
movq 0x10(%rsp), %rdi
cmpq %r13, %rdi
je 0x4bd9
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x3200
movq %r12, %rdi
movq %rbx, %rsi
callq 0x7862
movl 0x8(%rsp), %eax
movl %eax, 0x60(%rsp)
leaq 0x68(%rsp), %rdi
leaq 0x10(%rsp), %rsi
callq 0x3260
movq 0x30(%rsp), %rax
movq %rax, 0x88(%rsp)
leaq 0x90(%rsp), %rdi
leaq 0x38(%rsp), %rsi
callq 0x3260
movl 0x58(%rsp), %eax
movl %eax, 0xb0(%rsp)
movq 0x38(%rsp), %rdi
leaq 0x48(%rsp), %rax
cmpq %rax, %rdi
je 0x4c41
movq 0x48(%rsp), %rsi
incq %rsi
callq 0x3200
movq 0x10(%rsp), %rdi
cmpq %r13, %rdi
je 0x4c5c
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x3200
jmp 0x4c5c
incl %ebp
leaq 0x18(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0xb8(%rsp), %rsi
movq 0xc0(%rsp), %rdx
addq %rsi, %rdx
movq %r12, %rdi
callq 0x6342
movl %ebp, 0x28(%rsp)
movq %r14, %rdi
movq %r12, %rsi
callq 0x6a10
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x4cac
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x3200
leaq 0x60(%rsp), %rdi
leaq 0x5478(%rip), %rsi      # 0xa130
callq 0x7b32
xorl %ecx, %ecx
cmpb $0x7d, 0x88(%rsp)
sete %cl
leal (%rcx,%rcx,2), %r15d
testb %al, %al
movl $0x1, %eax
cmovel %eax, %r15d
movq 0xb8(%rsp), %rdi
leaq 0xc8(%rsp), %rax
cmpq %rax, %rdi
je 0x4cfe
movq 0xc8(%rsp), %rsi
incq %rsi
callq 0x3200
testl %r15d, %r15d
je 0x4a47
cmpl $0x3, %r15d
jne 0x4d28
leaq 0x60(%rsp), %rdi
movl $0x7d, %esi
callq 0x7afc
movl %eax, %ebp
jmp 0x4d3f
xorl %ebp, %ebp
jmp 0x4d80
xorl %ebp, %ebp
jmp 0x4d4c
xorl %ebp, %ebp
jmp 0x4d3f
leaq 0x53e7(%rip), %rdx      # 0xa11a
xorl %ebp, %ebp
movq %rbx, %rsi
xorl %eax, %eax
callq 0x3430
leaq 0xa0(%rsp), %r15
leaq 0x78(%rsp), %r12
movq 0x90(%rsp), %rdi
cmpq %r15, %rdi
je 0x4d69
movq 0xa0(%rsp), %rsi
incq %rsi
callq 0x3200
movq 0x68(%rsp), %rdi
cmpq %r12, %rdi
je 0x4d80
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x3200
movl %ebp, %eax
addq $0xd8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x4e04
jmp 0x4d9a
jmp 0x4e04
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x6014
jmp 0x4e07
jmp 0x4e04
jmp 0x4e04
jmp 0x4dda
jmp 0x4dda
jmp 0x4e04
jmp 0x4e04
movq %rax, %rbx
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x4ddd
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x3200
jmp 0x4ddd
jmp 0x4dda
jmp 0x4dda
movq %rax, %rbx
movq 0xb8(%rsp), %rdi
leaq 0xc8(%rsp), %rax
cmpq %rax, %rdi
je 0x4e07
movq 0xc8(%rsp), %rsi
incq %rsi
callq 0x3200
jmp 0x4e07
movq %rax, %rbx
leaq 0x60(%rsp), %rdi
callq 0x6014
movq %rbx, %rdi
callq 0x33d0
nop