// File: /workspace/github_c_makefile_star2_O3/mrkite[P]regs/docmaker/docmaker.cc
// Function: main
int main(int argc, char **argv) {
  if (argc != 2) {
    std::cerr << "Usage: " << argv[0] << " <directory>" << std::endl;
    return -1;
  }

  Parser parser;
  parser.add("uint8", U8);
  parser.add("uint16", U16);
  parser.add("uint32", U32);
  parser.add("int8", S8);
  parser.add("int16", S16);
  parser.add("int32", S32);

  if (!parser.run(argv[1])) {
    return -1;
  }
  Compiler compiler;
  if (!compiler.run(parser.symbols)) {
    return -1;
  }
  std::string outname;
  outname = argv[1];
  outname += ".dat";

  Output output;
  output.save(parser.symbols, outname);
  return 0;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0xb0, %rsp
movq %rsi, %rbx
cmpl $0x2, %edi
jne 0x3b60
leaq 0x30(%rsp), %rax
movl $0x0, (%rax)
xorl %ecx, %ecx
movq %rcx, 0x8(%rax)
movq %rax, 0x10(%rax)
movq %rax, 0x18(%rax)
movq %rcx, 0x20(%rax)
leaq 0x6652(%rip), %rsi      # 0xa019
leaq 0x28(%rsp), %rdi
xorl %edx, %edx
callq 0x3e80
leaq 0x6645(%rip), %rsi      # 0xa01f
leaq 0x28(%rsp), %rdi
movl $0x1, %edx
callq 0x3e80
leaq 0x6636(%rip), %rsi      # 0xa026
leaq 0x28(%rsp), %rdi
movl $0x2, %edx
callq 0x3e80
leaq 0x6614(%rip), %rsi      # 0xa01a
leaq 0x28(%rsp), %rdi
movl $0x3, %edx
callq 0x3e80
leaq 0x6604(%rip), %rsi      # 0xa020
leaq 0x28(%rsp), %rdi
movl $0x4, %edx
callq 0x3e80
leaq 0x65f5(%rip), %rsi      # 0xa027
leaq 0x28(%rsp), %rdi
movl $0x5, %edx
callq 0x3e80
movq 0x8(%rbx), %rsi
leaq 0x60(%rsp), %rdi
leaq 0x80(%rsp), %rdx
callq 0x3c64
leaq 0x28(%rsp), %rdi
leaq 0x60(%rsp), %rsi
callq 0x41ce
movl %eax, %r14d
leaq 0x70(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x3a84
movq 0x70(%rsp), %rsi
incq %rsi
callq 0x3200
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
testb %r14b, %r14b
je 0x3b51
leaq 0x5c(%rsp), %rdi
leaq 0x28(%rsp), %rsi
callq 0x72d8
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
testb %al, %al
je 0x3b51
leaq 0x18(%rsp), %r14
movq %r14, -0x10(%r14)
movq $0x0, -0x8(%r14)
movb $0x0, (%r14)
movq 0x8(%rbx), %rbx
movq %rbx, %rdi
callq 0x3110
leaq 0x8(%rsp), %rdi
xorl %esi, %esi
xorl %edx, %edx
movq %rbx, %rcx
movq %rax, %r8
callq 0x3350
leaq 0x6543(%rip), %rsi      # 0xa02d
leaq 0x8(%rsp), %rdi
callq 0x33f0
leaq 0x88(%rsp), %rax
movl $0x0, (%rax)
xorl %ecx, %ecx
movq %rcx, 0x8(%rax)
movq %rax, 0x10(%rax)
movq %rax, 0x18(%rax)
movq %rcx, 0x20(%rax)
leaq 0x80(%rsp), %rdi
leaq 0x28(%rsp), %rsi
leaq 0x8(%rsp), %rdx
callq 0x8758
leaq 0x80(%rsp), %rdi
callq 0x3cac
movq 0x8(%rsp), %rdi
cmpq %r14, %rdi
je 0x3b4f
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x3200
xorl %ebp, %ebp
leaq 0x28(%rsp), %rdi
callq 0x3d24
jmp 0x3bf7
movq 0xa489(%rip), %r14      # 0xdff0
leaq 0x6496(%rip), %rsi      # 0xa004
movl $0x7, %edx
movq %r14, %rdi
callq 0x3230
movq (%rbx), %rbx
testq %rbx, %rbx
je 0x3b9f
movq %rbx, %rdi
callq 0x3110
movq 0xa45e(%rip), %rdi      # 0xdff0
movq %rbx, %rsi
movq %rax, %rdx
callq 0x3230
jmp 0x3bb7
movq (%r14), %rax
movq -0x18(%rax), %rax
leaq (%r14,%rax), %rdi
movl 0x20(%r14,%rax), %esi
orl $0x1, %esi
callq 0x33b0
leaq 0x644e(%rip), %rsi      # 0xa00c
movl $0xc, %edx
movq %r14, %rdi
callq 0x3230
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x31d0
movsbl %al, %esi
movq %r14, %rdi
callq 0x3040
movq %rax, %rdi
callq 0x3150
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
movl %ebp, %eax
addq $0xb0, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movq %rax, %rbx
leaq 0x80(%rsp), %rdi
callq 0x3cac
jmp 0x3c1a
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r14, %rdi
je 0x3c52
movq 0x18(%rsp), %rsi
jmp 0x3c43
jmp 0x3c4f
movq %rax, %rbx
leaq 0x70(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x3c52
movq 0x70(%rsp), %rsi
incq %rsi
callq 0x3200
jmp 0x3c52
jmp 0x3c4f
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
callq 0x3d24
movq %rbx, %rdi
callq 0x33d0