// File: afinit[P]afin/afin.cpp
// Function: main
int main( int argc, char** argv ){
  //////////////////////////////////
  // Process Command Line Options //
  //////////////////////////////////
  max_search_loops = 10;
  contig_sub_len = 100;
  extend_len = 40;
  max_sort_char = 4;
  min_cov = 3;
  min_overlap = 20;
  max_threads = 4;
  initial_trim = 0;
  max_missed = 5;
  stop_ext = .5;
  mismatch_threshold = 0.1;
  test_run = false;
  print_fused = 0;
  screen_output = 1;
  log_output = 1;
  verbose = 0;
  no_fusion = 0;

  int c;
  bool quit_flag = false;
  Process process;
  
  // initialize global Log object
  Log::Inst();
  
  // prevent output to stderr if erroneous option is found
  opterr = 0;
  
  int option_index = 0;

  static struct option long_options[] =
  {
    {"silent",        no_argument,  &screen_output, 0},
    {"no_log",        no_argument,  &log_output,  0},
    {"no_fusion",     no_argument,  &no_fusion,  1},
    {"verbose",       no_argument,  &verbose,  1},
    {"print_fused",   no_argument,  &print_fused, 1},
    {"contigsfiles",  required_argument,  0,  'c'},
    {"readsfiles",    required_argument,  0,  'r'},
    {"outfile",       required_argument,  0,  'o'},
    {"sort_char",     required_argument,  0,  'm'},
    {"sub_len",       required_argument,  0,  's'},
    {"search_loops",  required_argument,  0,  'l'},
    {"min_cov",       required_argument,  0,  'i'},
    {"min_overlap",   required_argument,  0,  'p'},
    {"max_threads",   required_argument,  0,  't'},
    {"initial_trim",  required_argument,  0,  'd'},
    {"max_missed",    required_argument,  0,  'e'},
    {"mismatch",      required_argument,  0,  'g'},
    {"extend_len",    required_argument,  0,  'x'},
    {"stop_ext",      required_argument,  0,  'f'},
    {"help",          no_argument,        0,  'h'},
    {"test_run",      no_argument,        0,  'z'},
    {0, 0, 0, 0}
  };
  
  // get all options that have been provided on the command line
  while (( c = getopt_long(argc, argv, "hr:c:o:s:l:x:m:i:p:t:d:e:f:g:z", long_options, &option_index )) != -1 ) {
    switch( c ) {
      case 0:
        /* If this option set a flag, do nothing else now. */
        if (long_options[option_index].flag != 0)
          break;
        printf ("option %s", long_options[option_index].name);
        if (optarg)
          printf (" with arg %s", optarg);
        printf ("\n");
        break;
      case 'h':
        print_usage( argv[0] );
        exit(0);
        break;
      // max_sort_char option
      case 'm':
        max_sort_char = atoi(optarg);
        break;
      // contig_sub_len option
      case 's':
        contig_sub_len = atoi(optarg);
        break;
      // extend_len option
      case 'x':
        extend_len = atoi(optarg);
        break;
      // max_sort_char option
      case 'l':
        max_search_loops = atoi(optarg);
        break;
      // min_cov option
      case 'i':
        min_cov = atoi(optarg);
        break;
      // min_overlap option
      case 'p':
        min_overlap = atoi(optarg);
        break;
      // max_threads option
      case 't':
        max_threads = atoi(optarg);
        break;
      // initial_trim option
      case 'd':
        initial_trim = atoi(optarg);
        break;
      // max_missed option
      case 'e':
        max_missed = atoi(optarg);
        break;
      // stop_ext option
      case 'f':
        stop_ext = atof(optarg);
        break;
      // mismatch_threshold option
      case 'g':
        mismatch_threshold = atof(optarg);
        break;
      // outputfile option
      case 'o':
        process.outfile = optarg;
        break;
      // readfile option
      case 'r':
        optind--;
        // loop through each file
        while ( optind < argc && argv[optind][0] != '-' ) { 
          if( process.readsfiles != "" ){
            process.readsfiles.append( "," );
          }
          process.readsfiles.append( argv[optind] );
          optind++;
        }   
        break;
      // contig file option
      case 'c':
        optind--;
        // loop through each file
        while ( optind < argc && argv[optind][0] != '-' ) { 
          if( process.contigsfiles != "" ){
            process.contigsfiles.append( "," );
          }
          process.contigsfiles.append( argv[optind] );
          optind++;
        }   
        break;
      // test_run option
      case 'z':
        test_run = true;
        break;
      case '?':
        if ( optopt == 'r' ){
          fprintf( stderr, "%s: Error: Option -r requires an argument. ", argv[0] );
          print_usage( argv[0] );
        }
        else if ( optopt == 'o' ){
          fprintf( stderr, "%s: Error: Option -o requires an argument. ", argv[0] );
          print_usage( argv[0] );
        }
        else if ( optopt == 'c' ){
          fprintf( stderr, "%s: Error: Option -c requires an argument. ", argv[0] );
          print_usage( argv[0] );
        }
        else if ( isprint( optopt )){
          fprintf( stderr, "%s: Error: Unknown option -%c. \n", argv[0], optopt );
          print_usage( argv[0] );
        }
        else{
          fprintf( stderr, "%s: Error: Unknown option character %x.\n", argv[0], optopt );
          print_usage( argv[0] );
        }
        return 1;
      default:
        abort();
    }
  }
  
  /////////////////
  // End Options //
  /////////////////

  //////////////////
  // Input Errors //
  //////////////////
  if( process.contigsfiles == "" ){
    fprintf( stderr, "%s: Error: contigsfile(s) must be provided.\n", argv[0] );
    quit_flag = true;
  }

  if( process.readsfiles == "" ){
    fprintf( stderr, "%s: Error: readsfile(s) must be provided.\n", argv[0] );
    quit_flag = true;
  }

  if( min_overlap < max_sort_char ){
    fprintf( stderr, "%s: Error: min_overlap must be >= max_sort_char.\n", argv[0] );
    quit_flag = true;
  }

  if( quit_flag ){
    exit(1);
  }

  ////////////////
  // End Errors //
  ////////////////

  // start run
  process.start_run();

  Log::Inst()->close_log();
  return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x210, %rsp            # imm = 0x210
movl $0x0, -0x4(%rbp)
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
leaq 0x39918(%rip), %rax     # 0x3e6b8
movl $0xa, (%rax)
leaq 0x3990f(%rip), %rax     # 0x3e6bc
movl $0x64, (%rax)
leaq 0x39906(%rip), %rax     # 0x3e6c0
movl $0x28, (%rax)
leaq 0x398fd(%rip), %rax     # 0x3e6c4
movl $0x4, (%rax)
leaq 0x398f4(%rip), %rax     # 0x3e6c8
movl $0x3, (%rax)
leaq 0x398eb(%rip), %rax     # 0x3e6cc
movl $0x14, (%rax)
leaq 0x398e2(%rip), %rax     # 0x3e6d0
movl $0x4, (%rax)
leaq 0x398d9(%rip), %rax     # 0x3e6d4
movl $0x0, (%rax)
leaq 0x398d0(%rip), %rax     # 0x3e6d8
movl $0x5, (%rax)
leaq 0x398cb(%rip), %rax     # 0x3e6e0
movabsq $0x3fe0000000000000, %rcx # imm = 0x3FE0000000000000
movq %rcx, (%rax)
leaq 0x398d7(%rip), %rax     # 0x3e700
movabsq $0x3fb999999999999a, %rcx # imm = 0x3FB999999999999A
movq %rcx, (%rax)
leaq 0x398ab(%rip), %rax     # 0x3e6e8
movb $0x0, (%rax)
leaq 0x398a5(%rip), %rax     # 0x3e6ec
movl $0x0, (%rax)
leaq 0x3989c(%rip), %rax     # 0x3e6f0
movl $0x1, (%rax)
leaq 0x39893(%rip), %rax     # 0x3e6f4
movl $0x1, (%rax)
leaq 0x3988a(%rip), %rax     # 0x3e6f8
movl $0x0, (%rax)
leaq 0x39881(%rip), %rax     # 0x3e6fc
movl $0x0, (%rax)
movb $0x0, -0x15(%rbp)
leaq -0x90(%rbp), %rdi
callq 0x9b70
callq 0x100d0
jmp 0x4e98
movq 0x39139(%rip), %rax     # 0x3dfd8
movl $0x0, (%rax)
movl $0x0, -0xa0(%rbp)
movl -0x8(%rbp), %edi
movq -0x10(%rbp), %rsi
leaq 0x26d2d(%rip), %rdx     # 0x2bbea
leaq 0x3951c(%rip), %rcx     # 0x3e3e0
leaq -0xa0(%rbp), %r8
callq 0x4660
movl %eax, -0x14(%rbp)
cmpl $-0x1, %eax
je 0x57d4
movl -0x14(%rbp), %eax
movq %rax, -0x198(%rbp)
subq $0x7a, %rax
ja 0x57ca
movq -0x198(%rbp), %rax
leaq 0x26106(%rip), %rcx     # 0x2b004
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x98(%rbp)
movl %eax, -0x9c(%rbp)
jmp 0x58fc
movslq -0xa0(%rbp), %rcx
leaq 0x394b4(%rip), %rax     # 0x3e3e0
shlq $0x5, %rcx
addq %rcx, %rax
cmpq $0x0, 0x10(%rax)
je 0x4f3f
jmp 0x57cf
movslq -0xa0(%rbp), %rax
shlq $0x5, %rax
leaq 0x3948f(%rip), %rcx     # 0x3e3e0
movq (%rax,%rcx), %rsi
leaq 0x26cad(%rip), %rdi     # 0x2bc09
xorl %eax, %eax
callq 0x4070
jmp 0x4f65
movq 0x3902c(%rip), %rax     # 0x3df98
cmpq $0x0, (%rax)
je 0x4f8e
movq 0x3901f(%rip), %rax     # 0x3df98
movq (%rax), %rsi
leaq 0x26c90(%rip), %rdi     # 0x2bc13
xorl %eax, %eax
callq 0x4070
jmp 0x4f8c
jmp 0x4f8e
leaq 0x26d30(%rip), %rdi     # 0x2bcc5
xorl %eax, %eax
callq 0x4070
jmp 0x4f9e
jmp 0x57cf
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x1a8(%rbp)
leaq -0xc1(%rbp), %rdi
movq %rdi, -0x1a0(%rbp)
callq 0x46e0
movq -0x1a8(%rbp), %rsi
movq -0x1a0(%rbp), %rdx
leaq -0xc0(%rbp), %rdi
callq 0x4530
jmp 0x4fe0
leaq -0xc0(%rbp), %rdi
callq 0x49c0
jmp 0x4fee
leaq -0xc0(%rbp), %rdi
callq 0x4270
leaq -0xc1(%rbp), %rdi
callq 0x4420
xorl %edi, %edi
callq 0x4470
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x98(%rbp)
movl %eax, -0x9c(%rbp)
jmp 0x503f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x98(%rbp)
movl %eax, -0x9c(%rbp)
leaq -0xc0(%rbp), %rdi
callq 0x4270
leaq -0xc1(%rbp), %rdi
callq 0x4420
jmp 0x58fc
movq 0x38f41(%rip), %rax     # 0x3df98
movq (%rax), %rdi
callq 0x4600
movl %eax, %ecx
leaq 0x3965c(%rip), %rax     # 0x3e6c4
movl %ecx, (%rax)
jmp 0x57cf
movq 0x38f22(%rip), %rax     # 0x3df98
movq (%rax), %rdi
callq 0x4600
movl %eax, %ecx
leaq 0x39635(%rip), %rax     # 0x3e6bc
movl %ecx, (%rax)
jmp 0x57cf
movq 0x38f03(%rip), %rax     # 0x3df98
movq (%rax), %rdi
callq 0x4600
movl %eax, %ecx
leaq 0x3961a(%rip), %rax     # 0x3e6c0
movl %ecx, (%rax)
jmp 0x57cf
movq 0x38ee4(%rip), %rax     # 0x3df98
movq (%rax), %rdi
callq 0x4600
movl %eax, %ecx
leaq 0x395f3(%rip), %rax     # 0x3e6b8
movl %ecx, (%rax)
jmp 0x57cf
movq 0x38ec5(%rip), %rax     # 0x3df98
movq (%rax), %rdi
callq 0x4600
movl %eax, %ecx
leaq 0x395e4(%rip), %rax     # 0x3e6c8
movl %ecx, (%rax)
jmp 0x57cf
movq 0x38ea6(%rip), %rax     # 0x3df98
movq (%rax), %rdi
callq 0x4600
movl %eax, %ecx
leaq 0x395c9(%rip), %rax     # 0x3e6cc
movl %ecx, (%rax)
jmp 0x57cf
movq 0x38e87(%rip), %rax     # 0x3df98
movq (%rax), %rdi
callq 0x4600
movl %eax, %ecx
leaq 0x395ae(%rip), %rax     # 0x3e6d0
movl %ecx, (%rax)
jmp 0x57cf
movq 0x38e68(%rip), %rax     # 0x3df98
movq (%rax), %rdi
callq 0x4600
movl %eax, %ecx
leaq 0x39593(%rip), %rax     # 0x3e6d4
movl %ecx, (%rax)
jmp 0x57cf
movq 0x38e49(%rip), %rax     # 0x3df98
movq (%rax), %rdi
callq 0x4600
movl %eax, %ecx
leaq 0x39578(%rip), %rax     # 0x3e6d8
movl %ecx, (%rax)
jmp 0x57cf
movq 0x38e2a(%rip), %rax     # 0x3df98
movq (%rax), %rdi
callq 0x44a0
leaq 0x39563(%rip), %rax     # 0x3e6e0
movsd %xmm0, (%rax)
jmp 0x57cf
movq 0x38e0b(%rip), %rax     # 0x3df98
movq (%rax), %rdi
callq 0x44a0
leaq 0x39564(%rip), %rax     # 0x3e700
movsd %xmm0, (%rax)
jmp 0x57cf
movq 0x38dec(%rip), %rax     # 0x3df98
movq (%rax), %rsi
leaq -0x78(%rbp), %rdi
callq 0x4520
jmp 0x51ba
jmp 0x57cf
movq 0x38e0a(%rip), %rax     # 0x3dfd0
movl (%rax), %ecx
addl $-0x1, %ecx
movq 0x38dfe(%rip), %rax     # 0x3dfd0
movl %ecx, (%rax)
movq 0x38df5(%rip), %rax     # 0x3dfd0
movl (%rax), %ecx
xorl %eax, %eax
cmpl -0x8(%rbp), %ecx
movb %al, -0x1a9(%rbp)
jge 0x520b
movq -0x10(%rbp), %rax
movq 0x38ddb(%rip), %rcx     # 0x3dfd0
movslq (%rcx), %rcx
movq (%rax,%rcx,8), %rax
movsbl (%rax), %eax
cmpl $0x2d, %eax
setne %al
movb %al, -0x1a9(%rbp)
movb -0x1a9(%rbp), %al
testb $0x1, %al
jne 0x5217
jmp 0x5286
leaq -0x58(%rbp), %rdi
leaq 0x26f96(%rip), %rsi     # 0x2c1b8
callq 0x5920
movb %al, -0x1aa(%rbp)
jmp 0x522f
movb -0x1aa(%rbp), %al
testb $0x1, %al
jne 0x523b
jmp 0x524f
leaq -0x58(%rbp), %rdi
leaq 0x269da(%rip), %rsi     # 0x2bc20
callq 0x4730
jmp 0x524d
jmp 0x524f
leaq -0x58(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x38d72(%rip), %rcx     # 0x3dfd0
movslq (%rcx), %rcx
movq (%rax,%rcx,8), %rsi
callq 0x4730
jmp 0x526c
movq 0x38d5d(%rip), %rax     # 0x3dfd0
movl (%rax), %ecx
addl $0x1, %ecx
movq 0x38d51(%rip), %rax     # 0x3dfd0
movl %ecx, (%rax)
jmp 0x51d4
jmp 0x57cf
movq 0x38d3e(%rip), %rax     # 0x3dfd0
movl (%rax), %ecx
addl $-0x1, %ecx
movq 0x38d32(%rip), %rax     # 0x3dfd0
movl %ecx, (%rax)
movq 0x38d29(%rip), %rax     # 0x3dfd0
movl (%rax), %ecx
xorl %eax, %eax
cmpl -0x8(%rbp), %ecx
movb %al, -0x1ab(%rbp)
jge 0x52d7
movq -0x10(%rbp), %rax
movq 0x38d0f(%rip), %rcx     # 0x3dfd0
movslq (%rcx), %rcx
movq (%rax,%rcx,8), %rax
movsbl (%rax), %eax
cmpl $0x2d, %eax
setne %al
movb %al, -0x1ab(%rbp)
movb -0x1ab(%rbp), %al
testb $0x1, %al
jne 0x52e3
jmp 0x5352
leaq -0x38(%rbp), %rdi
leaq 0x26eca(%rip), %rsi     # 0x2c1b8
callq 0x5920
movb %al, -0x1ac(%rbp)
jmp 0x52fb
movb -0x1ac(%rbp), %al
testb $0x1, %al
jne 0x5307
jmp 0x531b
leaq -0x38(%rbp), %rdi
leaq 0x2690e(%rip), %rsi     # 0x2bc20
callq 0x4730
jmp 0x5319
jmp 0x531b
leaq -0x38(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x38ca6(%rip), %rcx     # 0x3dfd0
movslq (%rcx), %rcx
movq (%rax,%rcx,8), %rsi
callq 0x4730
jmp 0x5338
movq 0x38c91(%rip), %rax     # 0x3dfd0
movl (%rax), %ecx
addl $0x1, %ecx
movq 0x38c85(%rip), %rax     # 0x3dfd0
movl %ecx, (%rax)
jmp 0x52a0
jmp 0x57cf
leaq 0x3938a(%rip), %rax     # 0x3e6e8
movb $0x1, (%rax)
jmp 0x57cf
movq 0x38c4b(%rip), %rax     # 0x3dfb8
cmpl $0x72, (%rax)
jne 0x5440
movq 0x38c4b(%rip), %rax     # 0x3dfc8
movq (%rax), %rdi
movq -0x10(%rbp), %rax
movq (%rax), %rdx
leaq 0x26894(%rip), %rsi     # 0x2bc22
xorl %eax, %eax
callq 0x4580
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x1c0(%rbp)
leaq -0xe9(%rbp), %rdi
movq %rdi, -0x1b8(%rbp)
callq 0x46e0
movq -0x1c0(%rbp), %rsi
movq -0x1b8(%rbp), %rdx
leaq -0xe8(%rbp), %rdi
callq 0x4530
jmp 0x53d2
leaq -0xe8(%rbp), %rdi
callq 0x49c0
jmp 0x53e0
leaq -0xe8(%rbp), %rdi
callq 0x4270
leaq -0xe9(%rbp), %rdi
callq 0x4420
jmp 0x57b4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x98(%rbp)
movl %eax, -0x9c(%rbp)
jmp 0x542f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x98(%rbp)
movl %eax, -0x9c(%rbp)
leaq -0xe8(%rbp), %rdi
callq 0x4270
leaq -0xe9(%rbp), %rdi
callq 0x4420
jmp 0x58fc
movq 0x38b71(%rip), %rax     # 0x3dfb8
cmpl $0x6f, (%rax)
jne 0x551a
movq 0x38b71(%rip), %rax     # 0x3dfc8
movq (%rax), %rdi
movq -0x10(%rbp), %rax
movq (%rax), %rdx
leaq 0x267e6(%rip), %rsi     # 0x2bc4e
xorl %eax, %eax
callq 0x4580
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x1d0(%rbp)
leaq -0x111(%rbp), %rdi
movq %rdi, -0x1c8(%rbp)
callq 0x46e0
movq -0x1d0(%rbp), %rsi
movq -0x1c8(%rbp), %rdx
leaq -0x110(%rbp), %rdi
callq 0x4530
jmp 0x54ac
leaq -0x110(%rbp), %rdi
callq 0x49c0
jmp 0x54ba
leaq -0x110(%rbp), %rdi
callq 0x4270
leaq -0x111(%rbp), %rdi
callq 0x4420
jmp 0x57b2
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x98(%rbp)
movl %eax, -0x9c(%rbp)
jmp 0x5509
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x98(%rbp)
movl %eax, -0x9c(%rbp)
leaq -0x110(%rbp), %rdi
callq 0x4270
leaq -0x111(%rbp), %rdi
callq 0x4420
jmp 0x58fc
movq 0x38a97(%rip), %rax     # 0x3dfb8
cmpl $0x63, (%rax)
jne 0x55f4
movq 0x38a97(%rip), %rax     # 0x3dfc8
movq (%rax), %rdi
movq -0x10(%rbp), %rax
movq (%rax), %rdx
leaq 0x26738(%rip), %rsi     # 0x2bc7a
xorl %eax, %eax
callq 0x4580
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x1e0(%rbp)
leaq -0x139(%rbp), %rdi
movq %rdi, -0x1d8(%rbp)
callq 0x46e0
movq -0x1e0(%rbp), %rsi
movq -0x1d8(%rbp), %rdx
leaq -0x138(%rbp), %rdi
callq 0x4530
jmp 0x5586
leaq -0x138(%rbp), %rdi
callq 0x49c0
jmp 0x5594
leaq -0x138(%rbp), %rdi
callq 0x4270
leaq -0x139(%rbp), %rdi
callq 0x4420
jmp 0x57b0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x98(%rbp)
movl %eax, -0x9c(%rbp)
jmp 0x55e3
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x98(%rbp)
movl %eax, -0x9c(%rbp)
leaq -0x138(%rbp), %rdi
callq 0x4270
leaq -0x139(%rbp), %rdi
callq 0x4420
jmp 0x58fc
movq 0x389bd(%rip), %rax     # 0x3dfb8
movl (%rax), %edi
callq 0x46d0
cmpl $0x0, %eax
je 0x56de
movq 0x389b6(%rip), %rax     # 0x3dfc8
movq (%rax), %rdi
movq -0x10(%rbp), %rax
movq (%rax), %rdx
movq 0x38995(%rip), %rax     # 0x3dfb8
movl (%rax), %ecx
leaq 0x2667a(%rip), %rsi     # 0x2bca6
xorl %eax, %eax
callq 0x4580
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x1f0(%rbp)
leaq -0x161(%rbp), %rdi
movq %rdi, -0x1e8(%rbp)
callq 0x46e0
movq -0x1f0(%rbp), %rsi
movq -0x1e8(%rbp), %rdx
leaq -0x160(%rbp), %rdi
callq 0x4530
jmp 0x5670
leaq -0x160(%rbp), %rdi
callq 0x49c0
jmp 0x567e
leaq -0x160(%rbp), %rdi
callq 0x4270
leaq -0x161(%rbp), %rdi
callq 0x4420
jmp 0x57ae
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x98(%rbp)
movl %eax, -0x9c(%rbp)
jmp 0x56cd
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x98(%rbp)
movl %eax, -0x9c(%rbp)
leaq -0x160(%rbp), %rdi
callq 0x4270
leaq -0x161(%rbp), %rdi
callq 0x4420
jmp 0x58fc
movq 0x388e3(%rip), %rax     # 0x3dfc8
movq (%rax), %rdi
movq -0x10(%rbp), %rax
movq (%rax), %rdx
movq 0x388c2(%rip), %rax     # 0x3dfb8
movl (%rax), %ecx
leaq 0x265c8(%rip), %rsi     # 0x2bcc7
xorl %eax, %eax
callq 0x4580
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x200(%rbp)
leaq -0x189(%rbp), %rdi
movq %rdi, -0x1f8(%rbp)
callq 0x46e0
movq -0x200(%rbp), %rsi
movq -0x1f8(%rbp), %rdx
leaq -0x188(%rbp), %rdi
callq 0x4530
jmp 0x5743
leaq -0x188(%rbp), %rdi
callq 0x49c0
jmp 0x5751
leaq -0x188(%rbp), %rdi
callq 0x4270
leaq -0x189(%rbp), %rdi
callq 0x4420
jmp 0x57ae
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x98(%rbp)
movl %eax, -0x9c(%rbp)
jmp 0x579d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x98(%rbp)
movl %eax, -0x9c(%rbp)
leaq -0x188(%rbp), %rdi
callq 0x4270
leaq -0x189(%rbp), %rdi
callq 0x4420
jmp 0x58fc
jmp 0x57b0
jmp 0x57b2
jmp 0x57b4
movl $0x1, -0x4(%rbp)
movl $0x1, -0x190(%rbp)
jmp 0x58e4
callq 0x4240
jmp 0x4eaf
leaq -0x38(%rbp), %rdi
leaq 0x269d9(%rip), %rsi     # 0x2c1b8
callq 0x5950
movb %al, -0x201(%rbp)
jmp 0x57ec
movb -0x201(%rbp), %al
testb $0x1, %al
jne 0x57f8
jmp 0x581b
movq 0x387c9(%rip), %rax     # 0x3dfc8
movq (%rax), %rdi
movq -0x10(%rbp), %rax
movq (%rax), %rdx
leaq 0x264e0(%rip), %rsi     # 0x2bcf0
movb $0x0, %al
callq 0x4580
movb $0x1, -0x15(%rbp)
leaq -0x58(%rbp), %rdi
leaq 0x26992(%rip), %rsi     # 0x2c1b8
callq 0x5950
movb %al, -0x202(%rbp)
jmp 0x5833
movb -0x202(%rbp), %al
testb $0x1, %al
jne 0x583f
jmp 0x5862
movq 0x38782(%rip), %rax     # 0x3dfc8
movq (%rax), %rdi
movq -0x10(%rbp), %rax
movq (%rax), %rdx
leaq 0x264c6(%rip), %rsi     # 0x2bd1d
movb $0x0, %al
callq 0x4580
movb $0x1, -0x15(%rbp)
leaq 0x38e63(%rip), %rax     # 0x3e6cc
movl (%rax), %eax
leaq 0x38e52(%rip), %rcx     # 0x3e6c4
cmpl (%rcx), %eax
jge 0x5899
movq 0x3874b(%rip), %rax     # 0x3dfc8
movq (%rax), %rdi
movq -0x10(%rbp), %rax
movq (%rax), %rdx
leaq 0x264ba(%rip), %rsi     # 0x2bd48
movb $0x0, %al
callq 0x4580
movb $0x1, -0x15(%rbp)
testb $0x1, -0x15(%rbp)
je 0x58a9
movl $0x1, %edi
callq 0x4470
leaq -0x90(%rbp), %rdi
callq 0xa480
jmp 0x58b7
callq 0x100d0
movq %rax, -0x210(%rbp)
jmp 0x58c5
movq -0x210(%rbp), %rdi
callq 0x101e0
jmp 0x58d3
movl $0x0, -0x4(%rbp)
movl $0x1, -0x190(%rbp)
leaq -0x90(%rbp), %rdi
callq 0x9c50
movl -0x4(%rbp), %eax
addq $0x210, %rsp            # imm = 0x210
popq %rbp
retq
leaq -0x90(%rbp), %rdi
callq 0x9c50
movq -0x98(%rbp), %rdi
callq 0x46c0
nopw %cs:(%rax,%rax)
nop