// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x100, %rsp            # imm = 0x100
movl $0x0, -0x4(%rbp)
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
cmpl $0x2, -0x8(%rbp)
je 0x375b
movq 0x158da(%rip), %rdi     # 0x18ff0
leaq 0xd8e7(%rip), %rsi      # 0x11004
callq 0x3230
movq %rax, %rdi
movq -0x10(%rbp), %rax
movq (%rax), %rsi
callq 0x3230
movq %rax, %rdi
leaq 0xd8d1(%rip), %rsi      # 0x1100c
callq 0x3230
movq %rax, %rdi
movq 0x1586e(%rip), %rsi     # 0x18fb8
callq 0x3280
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x39d3
leaq -0x40(%rbp), %rdi
movq %rdi, -0xd8(%rbp)
callq 0x39f0
movq -0xd8(%rbp), %rdi
leaq 0xd8a0(%rip), %rsi      # 0x11019
xorl %edx, %edx
callq 0x4700
jmp 0x3782
leaq 0xd896(%rip), %rsi      # 0x1101f
leaq -0x40(%rbp), %rdi
movl $0x1, %edx
callq 0x4700
jmp 0x3799
leaq 0xd886(%rip), %rsi      # 0x11026
leaq -0x40(%rbp), %rdi
movl $0x2, %edx
callq 0x4700
jmp 0x37b0
leaq 0xd863(%rip), %rsi      # 0x1101a
leaq -0x40(%rbp), %rdi
movl $0x3, %edx
callq 0x4700
jmp 0x37c7
leaq 0xd852(%rip), %rsi      # 0x11020
leaq -0x40(%rbp), %rdi
movl $0x4, %edx
callq 0x4700
jmp 0x37de
leaq 0xd842(%rip), %rsi      # 0x11027
leaq -0x40(%rbp), %rdi
movl $0x5, %edx
callq 0x4700
jmp 0x37f5
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0xe8(%rbp)
leaq -0x71(%rbp), %rdi
movq %rdi, -0xe0(%rbp)
callq 0x34a0
movq -0xe8(%rbp), %rsi
movq -0xe0(%rbp), %rdx
leaq -0x70(%rbp), %rdi
callq 0x3a10
jmp 0x382d
leaq -0x40(%rbp), %rdi
leaq -0x70(%rbp), %rsi
callq 0x49b0
movb %al, -0xe9(%rbp)
jmp 0x3842
movb -0xe9(%rbp), %al
xorb $-0x1, %al
movb %al, -0xea(%rbp)
leaq -0x70(%rbp), %rdi
callq 0x3160
leaq -0x71(%rbp), %rdi
callq 0x32a0
movb -0xea(%rbp), %al
testb $0x1, %al
jne 0x386e
jmp 0x38c3
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
movl $0x1, -0x78(%rbp)
jmp 0x39bd
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x39c8
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x38b5
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0x70(%rbp), %rdi
callq 0x3160
leaq -0x71(%rbp), %rdi
callq 0x32a0
jmp 0x39c8
leaq -0x7c(%rbp), %rdi
leaq -0x40(%rbp), %rsi
callq 0xb2d0
movb %al, -0xeb(%rbp)
jmp 0x38d8
movb -0xeb(%rbp), %al
testb $0x1, %al
jne 0x38f7
jmp 0x38e4
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
movl $0x1, -0x78(%rbp)
jmp 0x39bd
leaq -0xa0(%rbp), %rdi
movq %rdi, -0xf8(%rbp)
callq 0x3370
movq -0xf8(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rsi
callq 0x3360
jmp 0x3920
leaq 0xd706(%rip), %rsi      # 0x1102d
leaq -0xa0(%rbp), %rdi
callq 0x3220
jmp 0x3935
leaq -0xd0(%rbp), %rdi
movq %rdi, -0x100(%rbp)
callq 0x3ac0
movq -0x100(%rbp), %rdi
leaq -0x40(%rbp), %rsi
leaq -0xa0(%rbp), %rdx
callq 0xebe0
jmp 0x3961
movl $0x0, -0x4(%rbp)
movl $0x1, -0x78(%rbp)
leaq -0xd0(%rbp), %rdi
callq 0x3ae0
leaq -0xa0(%rbp), %rdi
callq 0x3160
jmp 0x39bd
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x39af
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0xd0(%rbp), %rdi
callq 0x3ae0
leaq -0xa0(%rbp), %rdi
callq 0x3160
jmp 0x39c8
leaq -0x40(%rbp), %rdi
callq 0x3b00
jmp 0x39d3
leaq -0x40(%rbp), %rdi
callq 0x3b00
jmp 0x39df
movl -0x4(%rbp), %eax
addq $0x100, %rsp            # imm = 0x100
popq %rbp
retq
movq -0x48(%rbp), %rdi
callq 0x3490
nopl (%rax,%rax)