// File: /workspace/github_c_makefile_star2_O0/sadistech[P]nesromtool2/./src/nrt_main.c
// Function: main
int main(int argc, char **argv, char **env) {
  if (argc == 1) {
    print_usage();
    exit(EXIT_SUCCESS);
  }

  char *appname = *(argv++); argc--;
  char *subcommand= *(argv++); argc--;

  if (subcommand[0] == '\0') {
    fprintf(stderr, "Please supply a subcommand.\n");
    print_usage();
    exit(EXIT_FAILURE);
  } else if (is_subcommand(subcommand, "help", "--help", "-h", NULL)) {
    print_usage();
  } else if (is_subcommand(subcommand, "info", NULL)) {
    subcommand_info(argc - 1, argv);
  } else if (is_subcommand(subcommand, "chr", NULL)) {
    subcommand_chr(argc - 1, argv);
  } else if (is_subcommand(subcommand, "prg", NULL)) {
    subcommand_prg(argc - 1, argv);
  } else if (is_subcommand(subcommand, "title", NULL)) {
    subcommand_title(argc - 1, argv);
  } else {
    fprintf(stderr, "Unknown subcommand: %s\n", subcommand);
    print_usage();
    exit(EXIT_FAILURE);
  }

  exit(EXIT_SUCCESS);

  return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movl $0x0, -0x4(%rbp)
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
cmpl $0x1, -0x8(%rbp)
jne 0x6b6e
movb $0x0, %al
callq 0x4080
xorl %edi, %edi
callq 0x22e0
movq -0x10(%rbp), %rax
movq %rax, %rcx
addq $0x8, %rcx
movq %rcx, -0x10(%rbp)
movq (%rax), %rax
movq %rax, -0x20(%rbp)
movl -0x8(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x8(%rbp)
movq -0x10(%rbp), %rax
movq %rax, %rcx
addq $0x8, %rcx
movq %rcx, -0x10(%rbp)
movq (%rax), %rax
movq %rax, -0x28(%rbp)
movl -0x8(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x8(%rbp)
movq -0x28(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x0, %eax
jne 0x6be1
movq 0x4439(%rip), %rax      # 0xaff8
movq (%rax), %rdi
leaq 0x1ca1(%rip), %rsi      # 0x886a
movb $0x0, %al
callq 0x21c0
movb $0x0, %al
callq 0x4080
movl $0x1, %edi
callq 0x22e0
movq -0x28(%rbp), %rdi
leaq 0x8ea(%rip), %rsi       # 0x74d6
leaq 0x8cf(%rip), %rdx       # 0x74c2
leaq 0x1c8d(%rip), %rcx      # 0x8887
xorl %eax, %eax
movl %eax, %r8d
movb $0x0, %al
callq 0x4a80
testb $0x1, %al
jne 0x6c0c
jmp 0x6c18
movb $0x0, %al
callq 0x4080
jmp 0x6d07
movq -0x28(%rbp), %rdi
leaq 0x6b5(%rip), %rsi       # 0x72d8
xorl %eax, %eax
movl %eax, %edx
movb $0x0, %al
callq 0x4a80
testb $0x1, %al
jne 0x6c34
jmp 0x6c48
movl -0x8(%rbp), %edi
subl $0x1, %edi
movq -0x10(%rbp), %rsi
callq 0x4c90
jmp 0x6d05
movq -0x28(%rbp), %rdi
leaq 0xaef(%rip), %rsi       # 0x7742
xorl %eax, %eax
movl %eax, %edx
movb $0x0, %al
callq 0x4a80
testb $0x1, %al
jne 0x6c64
jmp 0x6c78
movl -0x8(%rbp), %edi
subl $0x1, %edi
movq -0x10(%rbp), %rsi
callq 0x5ea0
jmp 0x6d03
movq -0x28(%rbp), %rdi
leaq 0x718(%rip), %rsi       # 0x739b
xorl %eax, %eax
movl %eax, %edx
movb $0x0, %al
callq 0x4a80
testb $0x1, %al
jne 0x6c94
jmp 0x6ca5
movl -0x8(%rbp), %edi
subl $0x1, %edi
movq -0x10(%rbp), %rsi
callq 0x5430
jmp 0x6d01
movq -0x28(%rbp), %rdi
leaq 0x128b(%rip), %rsi      # 0x7f3b
xorl %eax, %eax
movl %eax, %edx
movb $0x0, %al
callq 0x4a80
testb $0x1, %al
jne 0x6cc1
jmp 0x6cd2
movl -0x8(%rbp), %edi
subl $0x1, %edi
movq -0x10(%rbp), %rsi
callq 0x6840
jmp 0x6cff
movq 0x431f(%rip), %rax      # 0xaff8
movq (%rax), %rdi
movq -0x28(%rbp), %rdx
leaq 0x1ba3(%rip), %rsi      # 0x888a
movb $0x0, %al
callq 0x21c0
movb $0x0, %al
callq 0x4080
movl $0x1, %edi
callq 0x22e0
jmp 0x6d01
jmp 0x6d03
jmp 0x6d05
jmp 0x6d07
jmp 0x6d09
xorl %edi, %edi
callq 0x22e0