// File: matthewarcus[P]mmps/stars.cpp
// Function: main
int main(int argc, char* argv[])
{
  const char* outfilename = NULL;
  const char* backfilename = NULL;
  const char* starlist = NULL;
  int width = 800;
  int height = 600;

  bool adjust = false;
  bool addgrid = false;
  TransformParams params;
  params.gridcolor = Rgb(0,0,60);

  Rgb bg(0,0,0);

  const char* type = "perspective";
  bool typeset = false;

  // array of pointers. Dynamic allocation is less typing than
  // stack allocating everything.
  OptSpec *optspecs [] = {
    // General options
    new IntSpec ("-w", width),
    new IntSpec ("-h", height),
    new BoolSpec ("-adjust", adjust),
    new StringSpec ("-f", starlist),
    new StringSpec ("-out", outfilename),
    new StringSpec ("-back", backfilename),
    new RgbSpec ("-bg", bg),
    new DoubleSpec("-year", year),
    new DoubleSpec("-magfact", magfact),
    new DoubleSpec("-topmag", topmag),
    new BoolSpec("-bv", dobv),
    new DoubleSpec("-bvfact", bvfact),

    // First the params options
    new DoubleSpec ("-tilt", params.tilt, 2 * pi / 360.0 ),
    new DoubleSpec ("-turn", params.turn, 2 * pi / 360.0 ),
    new DoubleSpec ("-dec", params.lat, 2 * pi / 360.0 ),
    new DoubleSpec ("-ra", params.lon, -2 * pi / 24.0 ),
    new DoubleSpec ("-scale", params.scale),
    new DoubleSpec ("-x", params.x),
    new DoubleSpec ("-y", params.y),
    new DoubleSpec ("-z", params.z),
    new DoubleSpec ("-a", params.a),
    new DoubleSpec ("-date", params.date),
    new DoubleSpec ("-time", params.time, 2 * pi / 24.0),
    new DoubleSpec ("-p", params.p, 2 * pi / 360.0),
    new DoubleSpec ("-aw", params.aw, 2 * pi / 360.0),
    new DoubleSpec ("-conic", params.conic),
    new DoubleSpec ("-conicr", params.conicr),
    new DoubleSpec ("-xoff", params.xoff),
    new DoubleSpec ("-yoff", params.yoff),

    // Grid options
    new BoolSpec ("-grid", addgrid),
    new IntSpec ("-gridx", params.gridx),
    new IntSpec ("-gridy", params.gridy),
    new RgbSpec ("-gridcolor", params.gridcolor),

    NULL // Finish up
  };

  char *progname = argv[0];
  argc--;argv++;
  if (argc == 1 && strcmp(argv[0],"-v") == 0) {
    fprintf(stderr,"MMPS Version %s\n", VERSION);
    exit(0);
  }
  while (argc > 0) {
    int result = OptSpec::ReadOpts(argc, argv, optspecs);
    if (result == -1) {
      error(usage, progname);
    } else if (result != 1) {
      if (typeset) { error(usage, progname); };
      type = argv[0];
      typeset = true;
    }
    argc--; argv++;
  }

  Transform* transform = Transform::GetTransform(type);
  if (transform == NULL) {
    error(usage, progname);
  }

  if (adjust) {
    transform->AdjustSize(width, height, params);
  }
  Image outImage(width,height);
  transform->Init(params);
  if (backfilename != NULL) {
    Image backImage;
    backImage.Read(backfilename);
    outImage.Copy(backImage);
  } else {
    outImage.Fill(bg);
  }
  if (addgrid) {
    transform->AddLines(outImage, params);
  }
  AddStars(starlist, outImage, *transform, params);
  outImage.Write(outfilename);
  return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x4f0, %rsp            # imm = 0x4F0
movl $0x0, -0x4(%rbp)
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq $0x0, -0x18(%rbp)
movq $0x0, -0x20(%rbp)
movq $0x0, -0x28(%rbp)
movl $0x320, -0x2c(%rbp)     # imm = 0x320
movl $0x258, -0x30(%rbp)     # imm = 0x258
movb $0x0, -0x31(%rbp)
movb $0x0, -0x32(%rbp)
leaq -0x128(%rbp), %rdi
callq 0x8340
leaq -0x12b(%rbp), %rdi
xorl %edx, %edx
movl %edx, -0x2e4(%rbp)
movl $0x3c, %ecx
movl %edx, %esi
callq 0x74b0
movl -0x2e4(%rbp), %ecx
movb -0x129(%rbp), %al
movb %al, -0x5a(%rbp)
movw -0x12b(%rbp), %ax
movw %ax, -0x5c(%rbp)
leaq -0x12e(%rbp), %rdi
movl %ecx, %esi
movl %ecx, %edx
callq 0x74b0
leaq 0xf05b(%rip), %rax      # 0x152ea
movq %rax, -0x138(%rbp)
movb $0x0, -0x139(%rbp)
movl $0x18, %edi
callq 0x52b0
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0x2e0(%rbp)
leaq 0xf03b(%rip), %rsi      # 0x152f6
leaq -0x2c(%rbp), %rdx
callq 0x10170
jmp 0x62c6
movq -0x2e0(%rbp), %rax
movq %rax, -0x250(%rbp)
leaq -0x248(%rbp), %rax
movq %rax, -0x2f8(%rbp)
movl $0x18, %edi
callq 0x52b0
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0x2f0(%rbp)
leaq 0xeff9(%rip), %rsi      # 0x152f9
leaq -0x30(%rbp), %rdx
callq 0x10170
jmp 0x630b
movq -0x2f8(%rbp), %rax
movq -0x2f0(%rbp), %rcx
movq %rcx, (%rax)
leaq -0x240(%rbp), %rax
movq %rax, -0x308(%rbp)
movl $0x18, %edi
callq 0x52b0
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0x300(%rbp)
leaq 0xefb4(%rip), %rsi      # 0x152fc
leaq -0x31(%rbp), %rdx
callq 0xffc0
jmp 0x6353
movq -0x308(%rbp), %rax
movq -0x300(%rbp), %rcx
movq %rcx, (%rax)
leaq -0x238(%rbp), %rax
movq %rax, -0x318(%rbp)
movl $0x18, %edi
callq 0x52b0
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0x310(%rbp)
leaq 0xef74(%rip), %rsi      # 0x15304
leaq -0x28(%rbp), %rdx
callq 0x10070
jmp 0x639b
movq -0x318(%rbp), %rax
movq -0x310(%rbp), %rcx
movq %rcx, (%rax)
leaq -0x230(%rbp), %rax
movq %rax, -0x328(%rbp)
movl $0x18, %edi
callq 0x52b0
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0x320(%rbp)
leaq 0xef2f(%rip), %rsi      # 0x15307
leaq -0x18(%rbp), %rdx
callq 0x10070
jmp 0x63e3
movq -0x328(%rbp), %rax
movq -0x320(%rbp), %rcx
movq %rcx, (%rax)
leaq -0x228(%rbp), %rax
movq %rax, -0x338(%rbp)
movl $0x18, %edi
callq 0x52b0
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0x330(%rbp)
leaq 0xeeec(%rip), %rsi      # 0x1530c
leaq -0x20(%rbp), %rdx
callq 0x10070
jmp 0x642b
movq -0x338(%rbp), %rax
movq -0x330(%rbp), %rcx
movq %rcx, (%rax)
leaq -0x220(%rbp), %rax
movq %rax, -0x348(%rbp)
movl $0x18, %edi
callq 0x52b0
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0x340(%rbp)
leaq 0xeeaa(%rip), %rsi      # 0x15312
leaq -0x12e(%rbp), %rdx
callq 0x7600
jmp 0x6476
movq -0x348(%rbp), %rax
movq -0x340(%rbp), %rcx
movq %rcx, (%rax)
leaq -0x218(%rbp), %rax
movq %rax, -0x358(%rbp)
movl $0x20, %edi
callq 0x52b0
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0x350(%rbp)
leaq 0xee63(%rip), %rsi      # 0x15316
leaq 0x16df6(%rip), %rdx     # 0x1d2b0
movsd 0xeb86(%rip), %xmm0     # 0x15048
callq 0x10280
jmp 0x64c9
movq -0x358(%rbp), %rax
movq -0x350(%rbp), %rcx
movq %rcx, (%rax)
leaq -0x210(%rbp), %rax
movq %rax, -0x368(%rbp)
movl $0x20, %edi
callq 0x52b0
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0x360(%rbp)
leaq 0xee16(%rip), %rsi      # 0x1531c
leaq 0x16d5b(%rip), %rdx     # 0x1d268
movsd 0xeb33(%rip), %xmm0     # 0x15048
callq 0x10280
jmp 0x651c
movq -0x368(%rbp), %rax
movq -0x360(%rbp), %rcx
movq %rcx, (%rax)
leaq -0x208(%rbp), %rax
movq %rax, -0x378(%rbp)
movl $0x20, %edi
callq 0x52b0
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0x370(%rbp)
leaq 0xedcc(%rip), %rsi      # 0x15325
leaq 0x16d00(%rip), %rdx     # 0x1d260
movsd 0xeae0(%rip), %xmm0     # 0x15048
callq 0x10280
jmp 0x656f
movq -0x378(%rbp), %rax
movq -0x370(%rbp), %rcx
movq %rcx, (%rax)
leaq -0x200(%rbp), %rax
movq %rax, -0x388(%rbp)
movl $0x18, %edi
callq 0x52b0
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0x380(%rbp)
leaq 0xed81(%rip), %rsi      # 0x1532d
leaq 0x16cf8(%rip), %rdx     # 0x1d2ab
callq 0xffc0
jmp 0x65ba
movq -0x388(%rbp), %rax
movq -0x380(%rbp), %rcx
movq %rcx, (%rax)
leaq -0x1f8(%rbp), %rax
movq %rax, -0x398(%rbp)
movl $0x20, %edi
callq 0x52b0
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0x390(%rbp)
leaq 0xed3a(%rip), %rsi      # 0x15331
leaq 0x16c72(%rip), %rdx     # 0x1d270
movsd 0xea42(%rip), %xmm0     # 0x15048
callq 0x10280
jmp 0x660d
movq -0x398(%rbp), %rax
movq -0x390(%rbp), %rcx
movq %rcx, (%rax)
leaq -0x1f0(%rbp), %rax
movq %rax, -0x3a8(%rbp)
movl $0x20, %edi
callq 0x52b0
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0x3a0(%rbp)
leaq 0xecef(%rip), %rsi      # 0x15339
leaq -0x128(%rbp), %rdx
movsd 0xe9f7(%rip), %xmm0     # 0x15050
callq 0x10280
jmp 0x6660
movq -0x3a8(%rbp), %rax
movq -0x3a0(%rbp), %rcx
movq %rcx, (%rax)
leaq -0x1e8(%rbp), %rax
movq %rax, -0x3b8(%rbp)
movl $0x20, %edi
callq 0x52b0
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0x3b0(%rbp)
leaq -0x120(%rbp), %rdx
leaq 0xec9b(%rip), %rsi      # 0x1533f
movsd 0xe9a4(%rip), %xmm0     # 0x15050
callq 0x10280
jmp 0x66b3
movq -0x3b8(%rbp), %rax
movq -0x3b0(%rbp), %rcx
movq %rcx, (%rax)
leaq -0x1e0(%rbp), %rax
movq %rax, -0x3c8(%rbp)
movl $0x20, %edi
callq 0x52b0
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0x3c0(%rbp)
leaq -0x110(%rbp), %rdx
leaq 0xec4e(%rip), %rsi      # 0x15345
movsd 0xe951(%rip), %xmm0     # 0x15050
callq 0x10280
jmp 0x6706
movq -0x3c8(%rbp), %rax
movq -0x3c0(%rbp), %rcx
movq %rcx, (%rax)
leaq -0x1d8(%rbp), %rax
movq %rax, -0x3d8(%rbp)
movl $0x20, %edi
callq 0x52b0
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0x3d0(%rbp)
leaq -0x108(%rbp), %rdx
leaq 0xec00(%rip), %rsi      # 0x1534a
movsd 0xe906(%rip), %xmm0     # 0x15058
callq 0x10280
jmp 0x6759
movq -0x3d8(%rbp), %rax
movq -0x3d0(%rbp), %rcx
movq %rcx, (%rax)
leaq -0x1d0(%rbp), %rax
movq %rax, -0x3e8(%rbp)
movl $0x20, %edi
callq 0x52b0
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0x3e0(%rbp)
leaq -0x100(%rbp), %rdx
leaq 0xebb1(%rip), %rsi      # 0x1534e
movsd 0xe8a3(%rip), %xmm0     # 0x15048
callq 0x10280
jmp 0x67ac
movq -0x3e8(%rbp), %rax
movq -0x3e0(%rbp), %rcx
movq %rcx, (%rax)
leaq -0x1c8(%rbp), %rax
movq %rax, -0x3f8(%rbp)
movl $0x20, %edi
callq 0x52b0
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0x3f0(%rbp)
leaq -0xe0(%rbp), %rdx
leaq 0xeb65(%rip), %rsi      # 0x15355
movsd 0xe850(%rip), %xmm0     # 0x15048
callq 0x10280
jmp 0x67ff
movq -0x3f8(%rbp), %rax
movq -0x3f0(%rbp), %rcx
movq %rcx, (%rax)
leaq -0x1c0(%rbp), %rax
movq %rax, -0x408(%rbp)
movl $0x20, %edi
callq 0x52b0
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0x400(%rbp)
leaq -0xd8(%rbp), %rdx
leaq 0xeb15(%rip), %rsi      # 0x15358
movsd 0xe7fd(%rip), %xmm0     # 0x15048
callq 0x10280
jmp 0x6852
movq -0x408(%rbp), %rax
movq -0x400(%rbp), %rcx
movq %rcx, (%rax)
leaq -0x1b8(%rbp), %rax
movq %rax, -0x418(%rbp)
movl $0x20, %edi
callq 0x52b0
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0x410(%rbp)
leaq -0xd0(%rbp), %rdx
leaq 0xeac5(%rip), %rsi      # 0x1535b
movsd 0xe7aa(%rip), %xmm0     # 0x15048
callq 0x10280
jmp 0x68a5
movq -0x418(%rbp), %rax
movq -0x410(%rbp), %rcx
movq %rcx, (%rax)
leaq -0x1b0(%rbp), %rax
movq %rax, -0x428(%rbp)
movl $0x20, %edi
callq 0x52b0
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0x420(%rbp)
leaq -0xf0(%rbp), %rdx
leaq 0xea75(%rip), %rsi      # 0x1535e
movsd 0xe757(%rip), %xmm0     # 0x15048
callq 0x10280
jmp 0x68f8
movq -0x428(%rbp), %rax
movq -0x420(%rbp), %rcx
movq %rcx, (%rax)
leaq -0x1a8(%rbp), %rax
movq %rax, -0x438(%rbp)
movl $0x20, %edi
callq 0x52b0
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0x430(%rbp)
leaq -0x98(%rbp), %rdx
leaq 0xea25(%rip), %rsi      # 0x15361
movsd 0xe704(%rip), %xmm0     # 0x15048
callq 0x10280
jmp 0x694b
movq -0x438(%rbp), %rax
movq -0x430(%rbp), %rcx
movq %rcx, (%rax)
leaq -0x1a0(%rbp), %rax
movq %rax, -0x448(%rbp)
movl $0x20, %edi
callq 0x52b0
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0x440(%rbp)
leaq -0xa0(%rbp), %rdx
leaq 0xe9d8(%rip), %rsi      # 0x15367
movsd 0xe6c9(%rip), %xmm0     # 0x15060
callq 0x10280
jmp 0x699e
movq -0x448(%rbp), %rax
movq -0x440(%rbp), %rcx
movq %rcx, (%rax)
leaq -0x198(%rbp), %rax
movq %rax, -0x458(%rbp)
movl $0x20, %edi
callq 0x52b0
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0x450(%rbp)
leaq -0xa8(%rbp), %rdx
leaq 0xe98b(%rip), %rsi      # 0x1536d
movsd 0xe666(%rip), %xmm0     # 0x15050
callq 0x10280
jmp 0x69f1
movq -0x458(%rbp), %rax
movq -0x450(%rbp), %rcx
movq %rcx, (%rax)
leaq -0x190(%rbp), %rax
movq %rax, -0x468(%rbp)
movl $0x20, %edi
callq 0x52b0
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0x460(%rbp)
leaq -0xe8(%rbp), %rdx
leaq 0xe93b(%rip), %rsi      # 0x15370
movsd 0xe613(%rip), %xmm0     # 0x15050
callq 0x10280
jmp 0x6a44
movq -0x468(%rbp), %rax
movq -0x460(%rbp), %rcx
movq %rcx, (%rax)
leaq -0x188(%rbp), %rax
movq %rax, -0x478(%rbp)
movl $0x20, %edi
callq 0x52b0
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0x470(%rbp)
leaq -0x88(%rbp), %rdx
leaq 0xe8ec(%rip), %rsi      # 0x15374
movsd 0xe5b8(%rip), %xmm0     # 0x15048
callq 0x10280
jmp 0x6a97
movq -0x478(%rbp), %rax
movq -0x470(%rbp), %rcx
movq %rcx, (%rax)
leaq -0x180(%rbp), %rax
movq %rax, -0x488(%rbp)
movl $0x20, %edi
callq 0x52b0
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0x480(%rbp)
leaq -0x80(%rbp), %rdx
leaq 0xe8a3(%rip), %rsi      # 0x1537b
movsd 0xe568(%rip), %xmm0     # 0x15048
callq 0x10280
jmp 0x6ae7
movq -0x488(%rbp), %rax
movq -0x480(%rbp), %rcx
movq %rcx, (%rax)
leaq -0x178(%rbp), %rax
movq %rax, -0x498(%rbp)
movl $0x20, %edi
callq 0x52b0
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0x490(%rbp)
leaq -0x78(%rbp), %rdx
leaq 0xe85b(%rip), %rsi      # 0x15383
movsd 0xe518(%rip), %xmm0     # 0x15048
callq 0x10280
jmp 0x6b37
movq -0x498(%rbp), %rax
movq -0x490(%rbp), %rcx
movq %rcx, (%rax)
leaq -0x170(%rbp), %rax
movq %rax, -0x4a8(%rbp)
movl $0x20, %edi
callq 0x52b0
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0x4a0(%rbp)
leaq -0x70(%rbp), %rdx
leaq 0xe811(%rip), %rsi      # 0x15389
movsd 0xe4c8(%rip), %xmm0     # 0x15048
callq 0x10280
jmp 0x6b87
movq -0x4a8(%rbp), %rax
movq -0x4a0(%rbp), %rcx
movq %rcx, (%rax)
leaq -0x168(%rbp), %rax
movq %rax, -0x4b8(%rbp)
movl $0x18, %edi
callq 0x52b0
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0x4b0(%rbp)
leaq 0xe7cb(%rip), %rsi      # 0x1538f
leaq -0x32(%rbp), %rdx
callq 0xffc0
jmp 0x6bcf
movq -0x4b8(%rbp), %rax
movq -0x4b0(%rbp), %rcx
movq %rcx, (%rax)
leaq -0x160(%rbp), %rax
movq %rax, -0x4c8(%rbp)
movl $0x18, %edi
callq 0x52b0
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0x4c0(%rbp)
leaq -0x64(%rbp), %rdx
leaq 0xe785(%rip), %rsi      # 0x15395
callq 0x10170
jmp 0x6c17
movq -0x4c8(%rbp), %rax
movq -0x4c0(%rbp), %rcx
movq %rcx, (%rax)
leaq -0x158(%rbp), %rax
movq %rax, -0x4d8(%rbp)
movl $0x18, %edi
callq 0x52b0
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0x4d0(%rbp)
leaq -0x60(%rbp), %rdx
leaq 0xe744(%rip), %rsi      # 0x1539c
callq 0x10170
jmp 0x6c5f
movq -0x4d8(%rbp), %rax
movq -0x4d0(%rbp), %rcx
movq %rcx, (%rax)
leaq -0x150(%rbp), %rax
movq %rax, -0x4e8(%rbp)
movl $0x18, %edi
callq 0x52b0
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0x4e0(%rbp)
leaq -0x5c(%rbp), %rdx
leaq 0xe703(%rip), %rsi      # 0x153a3
callq 0x7600
jmp 0x6ca7
movq -0x4e8(%rbp), %rax
movq -0x4e0(%rbp), %rcx
movq %rcx, (%rax)
movq $0x0, -0x148(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x268(%rbp)
movl -0x8(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x8(%rbp)
movq -0x10(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x10(%rbp)
cmpl $0x1, -0x8(%rbp)
jne 0x725a
movq -0x10(%rbp), %rax
movq (%rax), %rdi
leaq 0xe6b0(%rip), %rsi      # 0x153ae
callq 0x5350
cmpl $0x0, %eax
jne 0x725a
movq 0x162cd(%rip), %rax     # 0x1cfe0
movq (%rax), %rdi
leaq 0xe694(%rip), %rsi      # 0x153b1
leaq 0xe69e(%rip), %rdx      # 0x153c2
movb $0x0, %al
callq 0x5370
xorl %edi, %edi
callq 0x5320
movq -0x2e0(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x258(%rbp)
movl %eax, -0x25c(%rbp)
movl $0x18, %esi
callq 0x52c0
jmp 0x749c
movq -0x2f0(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x258(%rbp)
movl %eax, -0x25c(%rbp)
movl $0x18, %esi
callq 0x52c0
jmp 0x749c
movq -0x300(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x258(%rbp)
movl %eax, -0x25c(%rbp)
movl $0x18, %esi
callq 0x52c0
jmp 0x749c
movq -0x310(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x258(%rbp)
movl %eax, -0x25c(%rbp)
movl $0x18, %esi
callq 0x52c0
jmp 0x749c
movq -0x320(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x258(%rbp)
movl %eax, -0x25c(%rbp)
movl $0x18, %esi
callq 0x52c0
jmp 0x749c
movq -0x330(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x258(%rbp)
movl %eax, -0x25c(%rbp)
movl $0x18, %esi
callq 0x52c0
jmp 0x749c
movq -0x340(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x258(%rbp)
movl %eax, -0x25c(%rbp)
movl $0x18, %esi
callq 0x52c0
jmp 0x749c
movq -0x350(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x258(%rbp)
movl %eax, -0x25c(%rbp)
movl $0x20, %esi
callq 0x52c0
jmp 0x749c
movq -0x360(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x258(%rbp)
movl %eax, -0x25c(%rbp)
movl $0x20, %esi
callq 0x52c0
jmp 0x749c
movq -0x370(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x258(%rbp)
movl %eax, -0x25c(%rbp)
movl $0x20, %esi
callq 0x52c0
jmp 0x749c
movq -0x380(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x258(%rbp)
movl %eax, -0x25c(%rbp)
movl $0x18, %esi
callq 0x52c0
jmp 0x749c
movq -0x390(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x258(%rbp)
movl %eax, -0x25c(%rbp)
movl $0x20, %esi
callq 0x52c0
jmp 0x749c
movq -0x3a0(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x258(%rbp)
movl %eax, -0x25c(%rbp)
movl $0x20, %esi
callq 0x52c0
jmp 0x749c
movq -0x3b0(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x258(%rbp)
movl %eax, -0x25c(%rbp)
movl $0x20, %esi
callq 0x52c0
jmp 0x749c
movq -0x3c0(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x258(%rbp)
movl %eax, -0x25c(%rbp)
movl $0x20, %esi
callq 0x52c0
jmp 0x749c
movq -0x3d0(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x258(%rbp)
movl %eax, -0x25c(%rbp)
movl $0x20, %esi
callq 0x52c0
jmp 0x749c
movq -0x3e0(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x258(%rbp)
movl %eax, -0x25c(%rbp)
movl $0x20, %esi
callq 0x52c0
jmp 0x749c
movq -0x3f0(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x258(%rbp)
movl %eax, -0x25c(%rbp)
movl $0x20, %esi
callq 0x52c0
jmp 0x749c
movq -0x400(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x258(%rbp)
movl %eax, -0x25c(%rbp)
movl $0x20, %esi
callq 0x52c0
jmp 0x749c
movq -0x410(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x258(%rbp)
movl %eax, -0x25c(%rbp)
movl $0x20, %esi
callq 0x52c0
jmp 0x749c
movq -0x420(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x258(%rbp)
movl %eax, -0x25c(%rbp)
movl $0x20, %esi
callq 0x52c0
jmp 0x749c
movq -0x430(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x258(%rbp)
movl %eax, -0x25c(%rbp)
movl $0x20, %esi
callq 0x52c0
jmp 0x749c
movq -0x440(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x258(%rbp)
movl %eax, -0x25c(%rbp)
movl $0x20, %esi
callq 0x52c0
jmp 0x749c
movq -0x450(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x258(%rbp)
movl %eax, -0x25c(%rbp)
movl $0x20, %esi
callq 0x52c0
jmp 0x749c
movq -0x460(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x258(%rbp)
movl %eax, -0x25c(%rbp)
movl $0x20, %esi
callq 0x52c0
jmp 0x749c
movq -0x470(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x258(%rbp)
movl %eax, -0x25c(%rbp)
movl $0x20, %esi
callq 0x52c0
jmp 0x749c
movq -0x480(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x258(%rbp)
movl %eax, -0x25c(%rbp)
movl $0x20, %esi
callq 0x52c0
jmp 0x749c
movq -0x490(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x258(%rbp)
movl %eax, -0x25c(%rbp)
movl $0x20, %esi
callq 0x52c0
jmp 0x749c
movq -0x4a0(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x258(%rbp)
movl %eax, -0x25c(%rbp)
movl $0x20, %esi
callq 0x52c0
jmp 0x749c
movq -0x4b0(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x258(%rbp)
movl %eax, -0x25c(%rbp)
movl $0x18, %esi
callq 0x52c0
jmp 0x749c
movq -0x4c0(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x258(%rbp)
movl %eax, -0x25c(%rbp)
movl $0x18, %esi
callq 0x52c0
jmp 0x749c
movq -0x4d0(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x258(%rbp)
movl %eax, -0x25c(%rbp)
movl $0x18, %esi
callq 0x52c0
jmp 0x749c
movq -0x4e0(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x258(%rbp)
movl %eax, -0x25c(%rbp)
movl $0x18, %esi
callq 0x52c0
jmp 0x749c
jmp 0x725c
cmpl $0x0, -0x8(%rbp)
jle 0x72f4
leaq -0x250(%rbp), %rdx
leaq -0x8(%rbp), %rdi
leaq -0x10(%rbp), %rsi
callq 0xff50
movl %eax, -0x26c(%rbp)
cmpl $-0x1, -0x26c(%rbp)
jne 0x729e
movq 0x15fe8(%rip), %rdi     # 0x1d278
movq -0x268(%rbp), %rsi
callq 0x7650
jmp 0x72da
cmpl $0x1, -0x26c(%rbp)
je 0x72d8
testb $0x1, -0x139(%rbp)
je 0x72c3
movq 0x15fc1(%rip), %rdi     # 0x1d278
movq -0x268(%rbp), %rsi
callq 0x7650
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x138(%rbp)
movb $0x1, -0x139(%rbp)
jmp 0x72da
movl -0x8(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x8(%rbp)
movq -0x10(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x10(%rbp)
jmp 0x725c
movq -0x138(%rbp), %rdi
callq 0x9650
movq %rax, -0x278(%rbp)
cmpq $0x0, -0x278(%rbp)
jne 0x7324
movq 0x15f60(%rip), %rdi     # 0x1d278
movq -0x268(%rbp), %rsi
callq 0x7650
testb $0x1, -0x31(%rbp)
je 0x7346
movq -0x278(%rbp), %rdi
movq (%rdi), %rax
leaq -0x2c(%rbp), %rsi
leaq -0x30(%rbp), %rdx
leaq -0x128(%rbp), %rcx
callq *0x10(%rax)
movslq -0x2c(%rbp), %rsi
movslq -0x30(%rbp), %rdx
leaq -0x2a8(%rbp), %rdi
callq 0x12ed0
movq -0x278(%rbp), %rdi
movq (%rdi), %rax
movq 0x8(%rax), %rax
leaq -0x128(%rbp), %rsi
callq *%rax
jmp 0x7373
cmpq $0x0, -0x20(%rbp)
je 0x7404
xorl %eax, %eax
movl %eax, %edx
leaq -0x2d8(%rbp), %rdi
movq %rdx, %rsi
callq 0x12ed0
jmp 0x7393
movq -0x20(%rbp), %rsi
leaq -0x2d8(%rbp), %rdi
xorl %edx, %edx
callq 0x13220
jmp 0x73a7
leaq -0x2a8(%rbp), %rdi
leaq -0x2d8(%rbp), %rsi
callq 0x13070
jmp 0x73bc
leaq -0x2d8(%rbp), %rdi
callq 0x12f90
jmp 0x741b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x258(%rbp)
movl %eax, -0x25c(%rbp)
jmp 0x7490
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x258(%rbp)
movl %eax, -0x25c(%rbp)
leaq -0x2d8(%rbp), %rdi
callq 0x12f90
jmp 0x7490
leaq -0x2a8(%rbp), %rdi
leaq -0x12e(%rbp), %rsi
callq 0x131c0
jmp 0x7419
jmp 0x741b
testb $0x1, -0x32(%rbp)
je 0x743f
movq -0x278(%rbp), %rdi
leaq -0x2a8(%rbp), %rsi
leaq -0x128(%rbp), %rdx
callq 0xcba0
jmp 0x743d
jmp 0x743f
movq -0x28(%rbp), %rdi
movq -0x278(%rbp), %rdx
leaq -0x2a8(%rbp), %rsi
leaq -0x128(%rbp), %rcx
callq 0x5b90
jmp 0x745f
movq -0x18(%rbp), %rsi
leaq -0x2a8(%rbp), %rdi
callq 0x135c0
jmp 0x7471
movl $0x0, -0x4(%rbp)
leaq -0x2a8(%rbp), %rdi
callq 0x12f90
movl -0x4(%rbp), %eax
addq $0x4f0, %rsp            # imm = 0x4F0
popq %rbp
retq
leaq -0x2a8(%rbp), %rdi
callq 0x12f90
movq -0x258(%rbp), %rdi
callq 0x5420
nopl (%rax,%rax)