// File: /workspace/github_c_makefile_star2_O1/felipelouza[P]egap/gap.c
// Function: main
int main(int argc, char *argv[]) {
  extern int optind, opterr, optopt;
  extern char *optarg;
  int c, group_size;
  char *path;
  g_data g;

  // default option values
  g.verbose=0; g.solid_limit = 256;
  group_size=MAX_NUMBER_OF_BWTS;      
  g.mwXMerge = g.bwtOnly = true;
  bool hm = false;
  g.unsortedLcp = NULL;
  g.outPath = NULL;
  g.algorithm = 0;
  g.extMem = g.smallAlpha=g.mmapZ=g.mmapBWT=g.mmapB= g.lcpMerge = g.lcpCompute = false;
  g.outputDA = 0;
  g.outputColors = 0;
  g.outputSA = 0;
  g.outputSL = 0;
  g.outputQS = 0;
  g.dbOrder = 0;           // order for deBruijn graph 
  int num_threads = 0;
  while ((c=getopt(argc, argv, "vhalrxmd:c:p:g:A:s:o:EZTBD:S:qL:")) != -1) {
    switch (c) 
      {
      case 'v':
        g.verbose++; break;         // verbose output (can be repeated)
      case 'o':
        g.outPath=optarg; break;    // basename for output files 
      case 'l':
        g.lcpCompute = true;        // compute lcp array from scratch 
        g.bwtOnly=false; break;  
      case 'r':
        g.lcpMerge = true;          // merge lcp values 
        g.bwtOnly=false; break;  
      case 'x':
        g.mwXMerge=false; break;      // do not use external multiway merge sort for computing lcp values
      case 'd':
        g.outputDA = atoi(optarg); break;  // output Document Array (for last iteration only) 
      case 'c':
        g.outputColors = atoi(optarg); break;  // output Document Array (one color for each chunk/file) 
      case 'S':
        g.outputSA = atoi(optarg); break;  // output Suffix Array (for last iteration only) 
      case 'L':
        g.outputSL = atoi(optarg); break;  // output Suffixes' lengths (for last iteration only) 
      case 'q':
        g.outputQS = 1; break;  // output QS permuted according to the BWT (for last iteration only) 
      case 'm':
        hm=true; break;                 // use hm algorithm 
      case 'a':
        g.smallAlpha=true; break;       // assume alphabet is small and use bwtOcc[][]
      case 'g':
        group_size = atoi(optarg);      // size for multigroup algorithm 
        break;      
      case 'A':
        g.algorithm = atoi(optarg);     // preferred algorithm 
        break;      
      case 'D':
        g.dbOrder = atoi(optarg);       // if > 1 compute order-k db graph 
        break;      
      case 's':
        g.solid_limit = atoi(optarg);   // smallest solid block 
        break;                
      case 'p':
        num_threads = atoi(optarg);     // number of consumer threads 
        break;       
      case 'E':
        g.extMem=true; break;           // use external memory (see mergegap.c)
      case 'Z':
        g.mmapZ=true; break;      // mmap merge and newmerge
      case 'B':
        g.mmapB=true; break;      // mmap B array
      case 'T':
        g.mmapBWT=true; break;    // mmap input BWTs
      case 'h':                   // usage instruction 
      case '?':
        usage(argv[0],&g);
        exit(EXIT_FAILURE);
      }
  }
  if(g.dbOrder<0 || g.dbOrder==1) { // illegal order
    printf("dbOrder must be at least 2\n");
    exit(EXIT_FAILURE);
  }
  if(g.dbOrder>1) { // valid order !=0
    if(!g.extMem) {
      printf("Option -D forces option -E\n");
      g.extMem = true;
    }
    if(g.algorithm!=128) {
      printf("Option -D forces option -A 128\n");
      g.algorithm = 128;
    }
    if(g.lcpMerge) {
      printf("Option -D incompatible with merging lcp values\n");
      exit(EXIT_FAILURE);
    }
  }
  if(num_threads <0) {
    printf("Invalid number of threads, must be non negative\n");
    exit(EXIT_FAILURE);
  }
  if(group_size<2 || group_size>MAX_NUMBER_OF_BWTS) {
    printf("Invalid group size. Must be in range [2,%llu]\n",MAX_NUMBER_OF_BWTS);
    exit(EXIT_FAILURE);
  } 
  if(hm && g.lcpCompute) {// not sure this is required, maybe changing something inside holtMcMillan() will suffice 
    printf("You cannot compute lcp values with H&M (only merge)\n");
    exit(EXIT_FAILURE);
  }
  if(g.lcpMerge && g.lcpCompute) {
    printf("You can *either* merge *or* compute lcp values\n");
    exit(EXIT_FAILURE);
  }
  if(!g.mwXMerge && !g.lcpCompute) {
    printf("Option -x can only be used with -l\n");
    exit(EXIT_FAILURE);
  }
  if(g.extMem) {
    if(hm) {
      printf("You cannot run H&M in external memory\n");
      exit(EXIT_FAILURE);
    }
    if(g.mmapBWT) { // extMem reads from the input bwt files from disk, it does not mmap them
      printf("Option -E incompatible with -T\n");
      exit(EXIT_FAILURE);
    }
    if(!g.smallAlpha) {
      printf("Option -E forces option -a\n");
      g.smallAlpha = true;
    }
  }
  if(optind+1==argc) {
    path=argv[optind];
  }
  else  {
    usage(argv[0],&g);
    exit(EXIT_FAILURE);
  }

  if(g.verbose>0) {
    puts("Command line:");
    for(int i=0;i<argc;i++)
      printf(" %s",argv[i]);
    puts("");
  }

  if(g.verbose>1) {
    puts(                    "***************************************************");
    if(g.bwtOnly)       puts("* Merge BWTs");
    else if(g.lcpMerge) puts("* Merge BWTs and LCPs");
    else                puts("* Merge BWTs and compute LCPs");
    if(hm)              puts("* Using multiround HM algorithm");
    else                puts("* Using multiround Gap algorithm");
    printf(                  "* Max #BWT %llu, Max LCP: %llu, Max mergeSize: %llu\n",
                     MAX_NUMBER_OF_BWTS, MAX_LCP_SIZE, MAX_OUTPUT_SIZE);  
    puts(                    "* Using Timo Bingmann's malloc_count to measure heap usage");
    puts(            "***************************************************");
  }

  // input check completed start measuring time 
  clock_t start = clock();
  time_t start_wc = time(NULL);
  double elapsed, elapsed_wc;

  // read BWT values. init g.numBWT, g.bwtLen[]; if !extMem also g.bws[]
  // also  remap BWTs init g->sizeOfAlpha and if g->smallAlpha is true init also g>bwtOcc[i]
  g.bwtOcc=NULL; g.sizeOfAlpha = 0;      //these two will be initialized later
  bool something_to_do = readBWTsingle(path, &g);
  
  if(g.numBwt> group_size) { // multiround computation required
    if(g.outputDA>0 || g.outputSA>0 || g.outputQS>0 || g.outputSL>0) {
      puts("Sorry, multiround DA, SA, QS or SL computation not supported");
      exit(EXIT_FAILURE);
    }
  }
  if(g.mmapBWT) { 
    if(g.outputDA>0 || g.outputSA>0 || g.outputQS>0 || g.outputSL>0) {
      puts("Sorry, internal memory DA, SA, QS or SL computation not supported");
      exit(EXIT_FAILURE);
    }
  }
  if(!something_to_do) {
    puts("Single BWT in input and no LCP/dBG computation. I have nothing to do!"); 
    //g.mergeLen = g.sizeOfAlpha = 1;
  }
  else {
    // init additional g fields 
    g.lcpinPath = path;
    if(g.outPath==NULL) g.outPath = path;  
    g.symb_offset = 0;
    g.blockBeginsAt = NULL; g.lcps = NULL; // prevent unintended use
    // if requested allocate space for and read lcp Values (B array)
    if(g.lcpMerge)
       initLCPmem(&g); // init g.lcps. lcp values are stored in mmapped memory 
          
    elapsed = (clock()-start)/(double)(CLOCKS_PER_SEC);
    elapsed_wc = difftime(time(NULL),start_wc);
    // printf("Partial elapsed time: %.4lf secs\n", elapsed_wc);
    // printf("Partial computing time: %.4lf secs\n", elapsed);    
    #if MALLOC_COUNT_FLAG
      printf("Merge starting (%d bwts). Mem: %zu peak, %zu current\n", g.numBwt, malloc_count_peak(), malloc_count_current());
    #else
      printf("Merge starting (%d bwts).\n", g.numBwt);
    #endif
      
    // do the merging
    multiround(hm,group_size,path,&g, num_threads);
    
    // computation done the result is in g->bws[0], and g->lcps[0] (if lcpMerge) 
    // if lcpCompute the result is already in the outputfile or in the pair files 
    // and a message is printed to run mergelcp 
  
    // write content of g.bws[0] to output file (if necessary) and/or free/munmap it 
    if(g.mmapBWT) {
      int e = munmap(g.bws[0],g.mergeLen*sizeof(symbol));
      if(e) die("main (unmap bws)");
    }
    else if(!g.extMem) { 
      writeOutputBWT(&g,path,hm); // if we are working in external memory output overwrites input
      free(g.bws[0]); // deallocate all bwt's (they are contiguous)
    }
    // free other bwt related stuff
    free(g.bws);
    if(g.smallAlpha) {free(g.bwtOcc[0]); free(g.bwtOcc);}
    free(g.bwtLen);
    // free lcp related stuff
    if(g.lcpMerge) {
      int e = munmap(g.lcps[0],g.mergeLen*sizeof(lcpInt));
      if(e) die("main (unmap lcps)");
      free(g.lcps);      
    }
  }
  
  // report running times  
  elapsed = (clock()-start)/(double)(CLOCKS_PER_SEC);
  elapsed_wc = difftime(time(NULL),start_wc);
  printf("##\n");
  printf("Elapsed time: %.4lf secs\n", elapsed_wc);
  // fprintf(stderr, "%.6lf\n", elapsed_wc);
  printf("Computing time: %.4lf secs\n", elapsed);
  printf("##\n");
  printf("Size of merged BWT: "CUSTOM_FORMAT, g.mergeLen);
  printf(" Alphabet size: %d\n", g.sizeOfAlpha);
  printf("##\n");
  printf("Microseconds per symbol: %.4lf\n", elapsed_wc*1000000.0/g.mergeLen);
  //  fprintf(stderr, "%.6lf\n", elapsed_wc*1000000.0/g.mergeLen);
  #if MALLOC_COUNT_FLAG
    printf("Peak memory allocation: %zu bytes, %.4lf bytes/symbol\n",
           malloc_count_peak(), (double)malloc_count_peak()/g.mergeLen);
  #endif
  printf("##\n");

  return 0; // Done!!!
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x6148, %rsp           # imm = 0x6148
movq %rsi, %r15
movl %edi, %ebp
movq $0x100, 0xb0(%rsp) # imm = 0x100
movq $0x0, 0xa0(%rsp)
movl $0x1000001, 0x5c(%rsp)  # imm = 0x1000001
movw $0x0, 0x88(%rsp)
xorps %xmm0, %xmm0
movups %xmm0, 0x60(%rsp)
movups %xmm0, 0x70(%rsp)
xorl %eax, %eax
movl %eax, 0x8c(%rsp)
movl $0x0, 0x1c(%rsp)
movl %eax, 0x8f(%rsp)
movl $0x100, %eax            # imm = 0x100
movq %rax, 0x10(%rsp)
leaq 0xbaf9(%rip), %r12      # 0xe5aa
leaq 0xb578(%rip), %r13      # 0xe030
movq 0x11519(%rip), %r14     # 0x13fd8
leaq 0xb5a2(%rip), %rbx      # 0xe068
movl $0x0, 0x8(%rsp)
movl %ebp, %edi
movq %r15, %rsi
movq %r12, %rdx
callq 0x2340
leal -0x53(%rax), %ecx
cmpl $0x25, %ecx
ja 0x2afa
movslq (%rbx,%rcx,4), %rax
addq %rbx, %rax
jmpq *%rax
movq (%r14), %rdi
callq 0x2360
movl %eax, 0x6c(%rsp)
jmp 0x2ace
leal -0x3f(%rax), %ecx
cmpl $0xd, %ecx
ja 0x2c2d
movslq (%r13,%rcx,4), %rax
addq %r13, %rax
jmpq *%rax
movq (%r14), %rdi
callq 0x2360
movl %eax, 0x8c(%rsp)
jmp 0x2ace
movq (%r14), %rdi
callq 0x2360
movl %eax, 0xb0(%rsp)
jmp 0x2ace
movw $0x100, 0x5c(%rsp)      # imm = 0x100
jmp 0x2ace
movb $0x1, %al
movl %eax, 0x8(%rsp)
jmp 0x2ace
movb $0x1, 0x5e(%rsp)
movb $0x0, 0x5c(%rsp)
jmp 0x2ace
movb $0x0, 0x5f(%rsp)
jmp 0x2ace
movb $0x1, 0x92(%rsp)
jmp 0x2ace
movb $0x1, 0x88(%rsp)
jmp 0x2ace
movq (%r14), %rdi
callq 0x2360
movl %eax, 0x64(%rsp)
jmp 0x2ace
movq (%r14), %rdi
callq 0x2360
movl %eax, 0x68(%rsp)
jmp 0x2ace
movb $0x1, 0x90(%rsp)
jmp 0x2ace
movq (%r14), %rdi
callq 0x2360
movl %eax, 0x1c(%rsp)
jmp 0x2ace
movq (%r14), %rdi
callq 0x2360
movq %rax, 0x10(%rsp)
jmp 0x2ace
movq (%r14), %rax
movq %rax, 0xa0(%rsp)
jmp 0x2ace
movl $0x1, 0x74(%rsp)
jmp 0x2ace
incl 0xb4(%rsp)
jmp 0x2ace
movq (%r14), %rdi
callq 0x2360
movl %eax, 0x60(%rsp)
jmp 0x2ace
movq (%r14), %rdi
callq 0x2360
movl %eax, 0x70(%rsp)
jmp 0x2ace
movb $0x1, 0x91(%rsp)
jmp 0x2ace
movb $0x1, 0x89(%rsp)
jmp 0x2ace
cmpl $-0x1, %eax
jne 0x2ace
movl 0x60(%rsp), %eax
testl %eax, %eax
js 0x328e
cmpl $0x1, %eax
je 0x328e
movl 0x8(%rsp), %r13d
movq 0x10(%rsp), %rbx
jle 0x2ca4
cmpb $0x0, 0x89(%rsp)
jne 0x2c75
leaq 0xbcf0(%rip), %rdi      # 0xe958
callq 0x2090
movb $0x1, 0x89(%rsp)
cmpl $0x80, 0x8c(%rsp)
je 0x2c99
leaq 0xbcea(%rip), %rdi      # 0xe973
callq 0x2090
movl $0x80, 0x8c(%rsp)
cmpb $0x1, 0x5d(%rsp)
je 0x32b5
cmpl $0x0, 0x1c(%rsp)
js 0x3297
leal -0x101(%rbx), %eax
cmpl $0xffffff00, %eax       # imm = 0xFFFFFF00
jbe 0x32a0
testb $0x1, %r13b
je 0x2cd1
cmpb $0x1, 0x5e(%rsp)
je 0x32be
cmpb $0x1, 0x5d(%rsp)
jne 0x2ce3
cmpb $0x1, 0x5e(%rsp)
je 0x32c7
cmpb $0x0, 0x5f(%rsp)
jne 0x2cf5
cmpb $0x0, 0x5e(%rsp)
je 0x32d0
cmpb $0x1, 0x89(%rsp)
jne 0x2d35
testb $0x1, %r13b
jne 0x32d9
cmpb $0x1, 0x92(%rsp)
je 0x32e2
cmpb $0x0, 0x88(%rsp)
jne 0x2d35
leaq 0xbc8d(%rip), %rdi      # 0xe9b5
callq 0x2090
movb $0x1, 0x88(%rsp)
movq 0x11294(%rip), %rax     # 0x13fd0
movslq (%rax), %rax
leal 0x1(%rax), %ecx
cmpl %ebp, %ecx
jne 0x3277
movq (%r15,%rax,8), %r12
cmpl $0x0, 0xb4(%rsp)
movl %r13d, 0x8(%rsp)
jle 0x2da9
movq %r12, %r13
leaq 0xb893(%rip), %rdi      # 0xe5fa
callq 0x2090
testl %ebp, %ebp
jle 0x2d92
movl %ebp, %ebx
leaq 0xb88f(%rip), %r12      # 0xe608
xorl %r14d, %r14d
movq (%r15,%r14,8), %rsi
movq %r12, %rdi
xorl %eax, %eax
callq 0x2100
incq %r14
cmpq %r14, %rbx
jne 0x2d7c
movl $0xa, %edi
callq 0x2040
movq 0x10(%rsp), %rbx
movq %r13, %r12
movl 0x8(%rsp), %r13d
cmpl $0x2, 0xb4(%rsp)
jl 0x2e40
leaq 0xb84e(%rip), %r15      # 0xe60c
movq %r15, %rdi
callq 0x2090
leaq 0xb880(%rip), %rax      # 0xe64d
testb $0x1, 0x5d(%rsp)
leaq 0xb88a(%rip), %rcx      # 0xe663
cmovneq %rax, %rcx
leaq 0xb85c(%rip), %rdi      # 0xe640
cmpb $0x0, 0x5c(%rsp)
cmoveq %rcx, %rdi
callq 0x2090
leaq 0xb888(%rip), %rax      # 0xe681
leaq 0xb8a1(%rip), %rdi      # 0xe6a1
testb $0x1, %r13b
cmovneq %rax, %rdi
callq 0x2090
leaq 0xb8ae(%rip), %rdi      # 0xe6c2
movl $0x100, %esi            # imm = 0x100
movl $0xff, %edx
movq $-0x2, %rcx
xorl %eax, %eax
callq 0x2100
leaq 0xb8c4(%rip), %rdi      # 0xe6f7
callq 0x2090
movq %r15, %rdi
callq 0x2090
callq 0x20d0
movq %rax, %r15
xorl %edi, %edi
callq 0x2200
movq %rax, %r14
leaq 0x20(%rsp), %rbp
movq $0x0, 0x18(%rbp)
movl $0x0, 0x38(%rbp)
movq %r12, %rdi
movq %rbp, %rsi
callq 0x339c
cmpl %ebx, 0x20(%rbp)
jle 0x2ea2
cmpl $0x0, 0x64(%rsp)
jg 0x32eb
cmpl $0x0, 0x6c(%rsp)
jg 0x32eb
cmpl $0x0, 0x74(%rsp)
jg 0x32eb
cmpl $0x0, 0x70(%rsp)
jg 0x32eb
cmpb $0x1, 0x92(%rsp)
jne 0x2ed8
cmpl $0x0, 0x64(%rsp)
jg 0x32f4
cmpl $0x0, 0x6c(%rsp)
jg 0x32f4
cmpl $0x0, 0x74(%rsp)
jg 0x32f4
cmpl $0x0, 0x70(%rsp)
jg 0x32f4
testb %al, %al
je 0x2fba
movq %r14, 0x10(%rsp)
movq %r12, 0x98(%rsp)
cmpq $0x0, 0xa0(%rsp)
jne 0x2f00
movq %r12, 0xa0(%rsp)
movq %r12, %r13
movq %r15, %r14
xorl %eax, %eax
movq %rax, 0x50(%rsp)
movq %rax, 0xb8(%rsp)
movq %rax, 0xa8(%rsp)
cmpb $0x1, 0x5d(%rsp)
jne 0x2f2e
leaq 0x20(%rsp), %rdi
callq 0x3b91
callq 0x20d0
xorl %edi, %edi
callq 0x2200
leaq 0x20(%rsp), %rbp
movl 0x20(%rbp), %r15d
callq 0xc614
movq %rax, %r12
callq 0xc60c
leaq 0xb8a0(%rip), %rdi      # 0xe7f7
movl %r15d, %esi
movq %r12, %rdx
movq %rax, %rcx
xorl %eax, %eax
callq 0x2100
movzbl 0x8(%rsp), %edi
andl $0x1, %edi
movl %ebx, %esi
movq %r13, %rdx
movq %rbp, %rcx
movl 0x1c(%rsp), %r8d
callq 0xcd24
cmpb $0x1, 0x72(%rbp)
jne 0x2fcb
movq 0x20(%rsp), %rax
movq 0x48(%rsp), %rsi
movq (%rax), %rdi
callq 0x2290
testl %eax, %eax
movq %r14, %r15
movq 0x10(%rsp), %r14
je 0x30a4
leaq 0xb87d(%rip), %rdi      # 0xe82d
callq 0x3973
jmp 0x30a4
leaq 0xb7f0(%rip), %rdi      # 0xe7b1
callq 0x2090
jmp 0x3112
cmpb $0x0, 0x89(%rsp)
movq %r14, %r15
movq 0x10(%rsp), %r14
jne 0x30a4
cmpl $0x2, 0xb4(%rsp)
jl 0x2ff7
leaq 0xb917(%rip), %rdi      # 0xe909
callq 0x2090
leaq 0xb926(%rip), %rax      # 0xe924
leaq 0xb925(%rip), %r8       # 0xe92a
testb $0x1, 0x8(%rsp)
cmovneq %rax, %r8
leaq 0xb909(%rip), %rdx      # 0xe91e
leaq 0x5140(%rsp), %rbx
movl $0x1000, %esi           # imm = 0x1000
movq %rbx, %rdi
movq %r13, %rcx
xorl %eax, %eax
callq 0x2140
leaq 0xb8f8(%rip), %rsi      # 0xe92e
movq %rbx, %rdi
callq 0x21e0
movq %rax, %rbx
testq %rax, %rax
jne 0x3052
leaq 0xb8e4(%rip), %rdi      # 0xe931
callq 0x3973
movq 0x20(%rsp), %rax
movq 0x48(%rsp), %rdx
movq (%rax), %rdi
movl $0x1, %esi
movq %rbx, %rcx
callq 0x2390
cmpq 0x48(%rsp), %rax
je 0x307f
leaq 0xb8c6(%rip), %rdi      # 0xe940
callq 0x3973
movq %rbx, %rdi
callq 0x20e0
testl %eax, %eax
je 0x3097
leaq 0xb89f(%rip), %rdi      # 0xe931
callq 0x3973
movq 0x20(%rsp), %rax
movq (%rax), %rdi
callq 0xc6e6
movq 0x20(%rsp), %rdi
callq 0xc6e6
cmpb $0x1, 0x88(%rsp)
jne 0x30cf
movq 0x38(%rsp), %rax
movq (%rax), %rdi
callq 0xc6e6
movq 0x38(%rsp), %rdi
callq 0xc6e6
movq 0x28(%rsp), %rdi
callq 0xc6e6
cmpb $0x1, 0x5d(%rsp)
jne 0x3112
movq 0x48(%rsp), %rsi
movq 0xa8(%rsp), %rax
movq (%rax), %rdi
callq 0x2290
testl %eax, %eax
je 0x3105
leaq 0xb73e(%rip), %rdi      # 0xe83e
callq 0x3973
movq 0xa8(%rsp), %rdi
callq 0xc6e6
callq 0x20d0
subq %r15, %rax
cvtsi2sd %rax, %xmm0
divsd 0xaee1(%rip), %xmm0     # 0xe008
movsd %xmm0, 0x10(%rsp)
xorl %edi, %edi
callq 0x2200
movq %rax, %rdi
movq %r14, %rsi
callq 0x2110
movsd %xmm0, 0x8(%rsp)
leaq 0xb884(%rip), %rbx      # 0xe9d0
movq %rbx, %rdi
callq 0x2090
leaq 0xb6f5(%rip), %rdi      # 0xe850
movsd 0x8(%rsp), %xmm0
movb $0x1, %al
callq 0x2100
leaq 0xb6fb(%rip), %rdi      # 0xe86a
movsd 0x10(%rsp), %xmm0
movb $0x1, %al
callq 0x2100
movq %rbx, %rdi
callq 0x2090
movq 0x48(%rsp), %rsi
leaq 0xb6f6(%rip), %rdi      # 0xe886
xorl %eax, %eax
callq 0x2100
movl 0x58(%rsp), %esi
leaq 0xb6fc(%rip), %rdi      # 0xe89e
xorl %eax, %eax
callq 0x2100
movq %rbx, %rdi
callq 0x2090
movsd 0x8(%rsp), %xmm2
mulsd 0xae49(%rip), %xmm2     # 0xe008
movsd 0x48(%rsp), %xmm0
unpcklps 0xae44(%rip), %xmm0     # xmm0 = xmm0[0],mem[0],xmm0[1],mem[1]
subpd 0xae4c(%rip), %xmm0     # 0xe020
movapd %xmm0, %xmm1
unpckhpd %xmm0, %xmm1            # xmm1 = xmm1[1],xmm0[1]
addsd %xmm0, %xmm1
divsd %xmm1, %xmm2
movapd %xmm2, %xmm0
leaq 0xb6c3(%rip), %rdi      # 0xe8b2
movb $0x1, %al
callq 0x2100
callq 0xc614
movq %rax, %r14
callq 0xc614
movq %rax, %xmm1
movq 0xae00(%rip), %xmm2     # 0xe010
punpckldq %xmm2, %xmm1    # xmm1 = xmm1[0],xmm2[0],xmm1[1],xmm2[1]
movapd 0xae04(%rip), %xmm3     # 0xe020
subpd %xmm3, %xmm1
movapd %xmm1, %xmm0
unpckhpd %xmm1, %xmm0            # xmm0 = xmm0[1],xmm1[1]
addsd %xmm1, %xmm0
movq 0x48(%rsp), %xmm1
punpckldq %xmm2, %xmm1    # xmm1 = xmm1[0],xmm2[0],xmm1[1],xmm2[1]
subpd %xmm3, %xmm1
movapd %xmm1, %xmm2
unpckhpd %xmm1, %xmm2            # xmm2 = xmm2[1],xmm1[1]
addsd %xmm1, %xmm2
divsd %xmm2, %xmm0
leaq 0xb681(%rip), %rdi      # 0xe8d2
movq %r14, %rsi
movb $0x1, %al
callq 0x2100
movq %rbx, %rdi
callq 0x2090
xorl %eax, %eax
addq $0x6148, %rsp           # imm = 0x6148
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq (%r15), %rdi
leaq 0x20(%rsp), %rsi
callq 0x28dc
movl $0x1, %edi
callq 0x2380
leaq 0xb845(%rip), %rdi      # 0xeada
jmp 0x32fb
leaq 0xb7dd(%rip), %rdi      # 0xea7b
jmp 0x32fb
leaq 0xb324(%rip), %rdi      # 0xe5cb
movl $0x100, %esi            # imm = 0x100
xorl %eax, %eax
callq 0x2100
jmp 0x3284
leaq 0xb7ef(%rip), %rdi      # 0xeaab
jmp 0x32fb
leaq 0xb782(%rip), %rdi      # 0xea47
jmp 0x32fb
leaq 0xb74a(%rip), %rdi      # 0xea18
jmp 0x32fb
leaq 0xb6bb(%rip), %rdi      # 0xe992
jmp 0x32fb
leaq 0xb712(%rip), %rdi      # 0xe9f2
jmp 0x32fb
leaq 0xb6ea(%rip), %rdi      # 0xe9d3
jmp 0x32fb
leaq 0xb440(%rip), %rdi      # 0xe732
jmp 0x32fb
leaq 0xb474(%rip), %rdi      # 0xe76f
callq 0x2090
jmp 0x3284
nop