// File: /workspace/github_c_makefile_star2_O1/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 0x3200
movq %rax, %r14
addq $0x10, %rax
xorps %xmm0, %xmm0
movaps %xmm0, 0x20(%r14)
movaps %xmm0, (%r14)
movaps %xmm0, 0x10(%r14)
movq $0x0, 0x30(%r14)
movq %rax, 0x20(%r14)
movq %rax, 0x28(%r14)
movl $0x1, 0x78(%r12)
movq %r14, 0x80(%r12)
leaq 0x60(%rsp), %r12
movq %r12, %rdi
movq %rbx, %rsi
callq 0x78ce
movq %r12, %rdi
movl $0x3c, %esi
callq 0x7b5e
movl %eax, %ebp
leaq 0xa0(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x4937
movq 0xa0(%rsp), %rsi
incq %rsi
callq 0x3210
leaq 0x78(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x4952
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x3210
testb %bpl, %bpl
je 0x4d31
leaq 0x60(%rsp), %r12
movq %r12, %rdi
movq %rbx, %rsi
callq 0x78ce
cmpl $0x7, (%r12)
jne 0x4d3d
leaq 0x60(%rsp), %rsi
movq %r15, %rdi
callq 0x3f9e
leaq 0xa0(%rsp), %r15
movq %rax, (%r14)
leaq 0x8(%rsp), %rdi
movq %rbx, %rsi
callq 0x78ce
leaq 0x78(%rsp), %r12
leaq 0x8(%rsp), %rdi
movl $0x3e, %esi
callq 0x7b5e
movl %eax, %ebp
leaq 0x48(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x49cc
movq 0x48(%rsp), %rsi
incq %rsi
callq 0x3210
leaq 0x20(%rsp), %r13
movq -0x10(%r13), %rdi
cmpq %r13, %rdi
je 0x49e7
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x3210
testb %bpl, %bpl
je 0x4d35
leaq 0x8(%rsp), %rdi
movq %rbx, %rsi
callq 0x78ce
leaq 0x8(%rsp), %rdi
movl $0x7b, %esi
callq 0x7b5e
movl %eax, %ebp
movq 0x38(%rsp), %rdi
leaq 0x48(%rsp), %rax
cmpq %rax, %rdi
je 0x4a2a
movq 0x48(%rsp), %rsi
incq %rsi
callq 0x3210
movq 0x10(%rsp), %rdi
cmpq %r13, %rdi
je 0x4a41
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x3210
testb %bpl, %bpl
je 0x4d35
addq $0x8, %r14
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
leaq 0x8(%rsp), %r12
movq %r12, %rdi
movq %rbx, %rsi
callq 0x78ce
movl 0x8(%rsp), %eax
movl %eax, 0x60(%rsp)
leaq 0x68(%rsp), %rdi
leaq 0x10(%rsp), %rsi
callq 0x3270
movq 0x30(%rsp), %rax
movq %rax, 0x88(%rsp)
leaq 0x90(%rsp), %rdi
leaq 0x38(%rsp), %rsi
callq 0x3270
movl 0x58(%rsp), %eax
movl %eax, 0xb0(%rsp)
movl 0x60(%rsp), %r15d
movq 0x38(%rsp), %rdi
leaq 0x48(%rsp), %rax
cmpq %rax, %rdi
je 0x4ac5
movq 0x48(%rsp), %rsi
incq %rsi
callq 0x3210
movq 0x10(%rsp), %rdi
cmpq %r13, %rdi
je 0x4adc
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x3210
cmpl $0x7, %r15d
jne 0x4d1e
leaq 0xc8(%rsp), %rax
movq %rax, 0xb8(%rsp)
movq 0x68(%rsp), %rsi
movq 0x70(%rsp), %rdx
addq %rsi, %rdx
leaq 0xb8(%rsp), %rdi
callq 0x6368
movq %r12, %rdi
movq %rbx, %rsi
callq 0x78ce
movl 0x8(%rsp), %eax
movl %eax, 0x60(%rsp)
leaq 0x68(%rsp), %rdi
leaq 0x10(%rsp), %rsi
callq 0x3270
movq 0x30(%rsp), %rax
movq %rax, 0x88(%rsp)
leaq 0x90(%rsp), %rdi
leaq 0x38(%rsp), %rsi
callq 0x3270
movl 0x58(%rsp), %eax
movl %eax, 0xb0(%rsp)
movq 0x38(%rsp), %rdi
leaq 0x48(%rsp), %rax
cmpq %rax, %rdi
je 0x4b78
movq 0x48(%rsp), %rsi
incq %rsi
callq 0x3210
movq 0x10(%rsp), %rdi
cmpq %r13, %rdi
je 0x4b8f
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x3210
cmpl $0x3, 0x60(%rsp)
jne 0x4c6b
cmpb $0x3d, 0x88(%rsp)
jne 0x4c6b
movq %r12, %rdi
movq %rbx, %rsi
callq 0x78ce
movl 0x34(%rsp), %ebp
movq 0x38(%rsp), %rdi
leaq 0x48(%rsp), %rax
cmpq %rax, %rdi
je 0x4bd3
movq 0x48(%rsp), %rsi
incq %rsi
callq 0x3210
movq 0x10(%rsp), %rdi
cmpq %r13, %rdi
je 0x4bea
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x3210
movq %r12, %rdi
movq %rbx, %rsi
callq 0x78ce
movl 0x8(%rsp), %eax
movl %eax, 0x60(%rsp)
leaq 0x68(%rsp), %rdi
leaq 0x10(%rsp), %rsi
callq 0x3270
movq 0x30(%rsp), %rax
movq %rax, 0x88(%rsp)
leaq 0x90(%rsp), %rdi
leaq 0x38(%rsp), %rsi
callq 0x3270
movl 0x58(%rsp), %eax
movl %eax, 0xb0(%rsp)
movq 0x38(%rsp), %rdi
leaq 0x48(%rsp), %rax
cmpq %rax, %rdi
je 0x4c52
movq 0x48(%rsp), %rsi
incq %rsi
callq 0x3210
movq 0x10(%rsp), %rdi
cmpq %r13, %rdi
je 0x4c6d
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x3210
jmp 0x4c6d
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 0x6368
movl %ebp, 0x28(%rsp)
movq %r14, %rdi
movq %r12, %rsi
callq 0x6a50
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x4cbd
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x3210
leaq 0x60(%rsp), %rdi
leaq 0x5467(%rip), %rsi      # 0xa130
callq 0x7b94
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 0x4d0f
movq 0xc8(%rsp), %rsi
incq %rsi
callq 0x3210
testl %r15d, %r15d
je 0x4a58
cmpl $0x3, %r15d
jne 0x4d39
leaq 0x60(%rsp), %rdi
movl $0x7d, %esi
callq 0x7b5e
movl %eax, %ebp
jmp 0x4d50
xorl %ebp, %ebp
jmp 0x4d91
xorl %ebp, %ebp
jmp 0x4d5d
xorl %ebp, %ebp
jmp 0x4d50
leaq 0x53d6(%rip), %rdx      # 0xa11a
xorl %ebp, %ebp
movq %rbx, %rsi
xorl %eax, %eax
callq 0x3440
leaq 0xa0(%rsp), %r15
leaq 0x78(%rsp), %r12
movq 0x90(%rsp), %rdi
cmpq %r15, %rdi
je 0x4d7a
movq 0xa0(%rsp), %rsi
incq %rsi
callq 0x3210
movq 0x68(%rsp), %rdi
cmpq %r12, %rdi
je 0x4d91
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x3210
movl %ebp, %eax
addq $0xd8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x4e15
jmp 0x4dab
jmp 0x4e15
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x603a
jmp 0x4e18
jmp 0x4e15
jmp 0x4e15
jmp 0x4deb
jmp 0x4deb
jmp 0x4e15
jmp 0x4e15
movq %rax, %rbx
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x4dee
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x3210
jmp 0x4dee
jmp 0x4deb
jmp 0x4deb
movq %rax, %rbx
movq 0xb8(%rsp), %rdi
leaq 0xc8(%rsp), %rax
cmpq %rax, %rdi
je 0x4e18
movq 0xc8(%rsp), %rsi
incq %rsi
callq 0x3210
jmp 0x4e18
movq %rax, %rbx
leaq 0x60(%rsp), %rdi
callq 0x603a
movq %rbx, %rdi
callq 0x33e0