// File: /workspace/github_c_makefile_star2_O2/felipelouza[P]egap/mergegap.c
// Function: gap
void gap(g_data *g, bool lastRound) {
  
  // maybe there is nothing to do
  if(g->numBwt<2 && !g->lcpCompute && g->dbOrder==0) {
    assert(g->numBwt==1);
    if(g->verbose>0) puts("Single BWT/LCP merging: nothing to do!");
    return;
  }
  // try preferred algorithm
  if(g->algorithm==8 && g->numBwt <=8 && !g->lcpMerge)
    return gap8(g,lastRound);
  else if(g->algorithm==16 && g->numBwt <=16 && !g->extMem &&!g->lcpCompute)
    return gap16(g,lastRound);    
  else if(g->algorithm==128 && g->numBwt <=128 && !g->lcpMerge)
    return g->extMem ? gap128ext(g,lastRound) : gap128(g,lastRound);    
  else if(g->algorithm==256 && g->numBwt <=256 && g->lcpCompute && !g->mwXMerge)
    return gap256(g,lastRound);
  else if(!g->algorithm) {      
    // use a best fit strategy
    if(g->numBwt<=128 && g->extMem)
      return gap128ext(g,lastRound); // gap128ext is the best extMem also since uses o(n) RAM 
    // case of lcpCompute or bwtOnly not in external memory for at most 128 bwts
    if(!g->lcpMerge && g->numBwt <= 128 && !g->extMem) 
      return gap128(g,lastRound);  // possibly use gap8 or gap16      
    // case <=16 with lcpMerge not in external memory
    if(g->numBwt<=16 && g->lcpMerge && !g->extMem) return gap16(g,lastRound);
  }

  // everything else is handled here!
  if(g->verbose>0) {
    if(g->lcpCompute) puts("BWT Merge + LCP compute with gap");
    else if(g->lcpMerge) puts("BWT/LCP Merge with gap");  
    else puts("BWT only merging with gap");
  }
  assert(g->numBwt <= MAX_NUMBER_OF_BWTS);
  if(g->lcpCompute) {       // we compute LCP values only if we are at the last round 
    assert(!g->bwtOnly && lastRound);
    open_unsortedLCP_files(g);
  }
  else assert(g->bwtOnly || g->lcpMerge);
  
  // init local global vars
  check_g_data(g);
  if(g->extMem) open_bw_files(g);
  // allocate and clear bit/int array B 
  if(!g->lcpMerge) g->bitB = tba_alloc(g->mergeLen, g->mmapB);
  else alloc0_B_array(g); // alloc and clear blockBeginsAt array
        
  // allocate Z (merge) Znew 
  alloc_merge_arrays(g);
  // allocate other useful arrays
  g->inCnt = malloc(g->numBwt*sizeof(customInt));
  g->firstColumn = malloc(g->sizeOfAlpha*sizeof(customInt));
  g->F = malloc(g->sizeOfAlpha*sizeof(customInt));
  if(!g->inCnt || !g->firstColumn || !g->F)  die(__func__);
  // init the above arrays
  if(g->smallAlpha) init_arrays(g);
  else init_arrays_largealpha(g);
  // we are now ready to give mmap advise
  #ifdef USE_MMAP_ADVISE
  if(g->mmapZ) { // advise on g->mergeColor
    for (int i = 0; i < g->sizeOfAlpha-1; ++i)
      madvise(g->mergeColor + g->firstColumn[i], (g->firstColumn[i+1]-g->firstColumn[i])*sizeof(palette), MADV_SEQUENTIAL);
    madvise(g->mergeColor + g->firstColumn[g->sizeOfAlpha-1], (g->mergeLen-g->firstColumn[g->sizeOfAlpha-1])*sizeof(palette), MADV_SEQUENTIAL);
  }
  #endif

  // init liquid block (containing list of allocated mem)
  liquidBlock *liquid = liquid_new(g); 
  // init list (on disk) of irrelevant blocks, initially empty 
  solidBlockFile *ibList = ibHead_new(g);

  // main loop
  customInt prefixLength = 1;      
  int lcpSize = POS_SIZE + BSIZE;   // number of bytes for each pos,lcp pair: see writeLcp()
  int round=0;
  bool merge_completed; 
  do {
    prefixLength+= 1;
    if(prefixLength>MAX_LCP_SIZE && g->lcpMerge) {fprintf(stderr,"LCP too large (use --lbytes=4)\n");exit(EXIT_FAILURE);}
    if(g->lcpCompute && prefixLength-2>MAX_LCP_SIZE) {fprintf(stderr,"LCP too large (2) (use --lbytes=4)\n");exit(EXIT_FAILURE);}
    bool mergeChanged = false; // the Z vector has changed in this iteration (used when g->bwtOnly)
    ibList->fout = gap_tmpfile(g->outPath);
    merge_completed=addCharToPrefix(ibList,liquid,prefixLength,&mergeChanged,round,g);
    if (g->verbose>1 && lastRound) {
      #if MALLOC_COUNT_FLAG
        printf("Lcp: "CUSTOM_FORMAT". Memory peak/current: %.2lf/%.2lf bytes/symbol. ibList: %ju\n", prefixLength-1, (double)malloc_count_peak()/g->mergeLen, (double)malloc_count_current()/g->mergeLen, (uintmax_t) ftello(ibList->fout));
      #else
        printf("Lcp: "CUSTOM_FORMAT". ibList: %ju\n", prefixLength-1, (uintmax_t) ftello(ibList->fout));
      #endif
      // also EOF are written to unsortedLcp file so percentages are not accurate     
      if(g->unsortedLcp) printf("   unsorted lcp values: %ju (%.2lf%%)\n",  
      (uintmax_t) ftello(g->unsortedLcp)/lcpSize, (double) 100*ftello(g->unsortedLcp)/(lcpSize*g->mergeLen));
    }
    round  = 1 - round; // change round parity
    if(g->bwtOnly && !mergeChanged) {
      if(g->verbose>1) puts("Gap bwt-only early termination");
      fclose(ibList->fout);
      break;
    }
    if(ibList->fin!=NULL) fclose(ibList->fin);
    rewind(ibList->fout);
    ibList->fin = ibList->fout;
  } while(!merge_completed);  // end main loop
  if(ibList->fin!=NULL) fclose(ibList->fin);

  #if MALLOC_COUNT_FLAG
    if (g->verbose>0) {
      if(lastRound)
        printf("Merge completed (%d bwts). Mem: %zu peak, %zu current, %.2lf/%.2lf bytes/symbol\n", g->numBwt, malloc_count_peak(),
             malloc_count_current(), (double)malloc_count_peak()/g->mergeLen,
             (double)malloc_count_current()/g->mergeLen);
      else if(g->verbose>1)
        printf("Merge completed (%d bwts). Mem: %zu peak, %zu current\n", g->numBwt, malloc_count_peak(),
             malloc_count_current());
    }
  #else
    if (g->verbose>0) {
        printf("Merge completed (%d bwts).\n", g->numBwt);
    }
  #endif
  liquid_free(liquid);
  ibHead_free(ibList);
  if(g->extMem) close_bw_files(g);

  // computation complete, do the merging. The following call writes the
  // (possibly remapped) merged BWT back to g->bws[0]; and if lcpMerge==true the merged LCP to g->lcps[0] 
  mergeBWTandLCP(g,lastRound);
  if(g->lcpCompute) {
    assert(lastRound);
    // close lcp file (and merge them?)
    close_unsortedLCP_files(g);
    if(g->verbose>0) printf("Remind to run mergelcp to obtain the final LCP array\n"); 
  }

  // free B array 
  if(!g->lcpMerge) tba_free(g->bitB, g->mergeLen, g->mmapB);
  else free_B_array(g); 
  free(g->F); // last five arrays deallocated
  free(g->firstColumn); 
  free(g->inCnt);
  free_merge_arrays(g);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movl %esi, %ebp
movq %rdi, %rbx
movl 0x20(%rdi), %eax
cmpl $0x1, %eax
jg 0x9ec9
cmpb $0x0, 0x3e(%rbx)
jne 0x9ec9
cmpl $0x0, 0x40(%rbx)
je 0x9fc2
movl 0x6c(%rbx), %ecx
testl %ecx, %ecx
je 0x9f9b
cmpl $0x100, %ecx            # imm = 0x100
je 0x9f23
cmpl $0x10, %ecx
je 0x9f7c
cmpl $0x80, %ecx
je 0x9f5c
cmpl $0x8, %ecx
jne 0xa01b
cmpl $0x8, %eax
jg 0xa01b
cmpb $0x0, 0x3d(%rbx)
jne 0xa01b
movzbl %bpl, %esi
movq %rbx, %rdi
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x6643
cmpl $0x100, %eax            # imm = 0x100
jg 0xa01b
cmpb $0x1, 0x3e(%rbx)
jne 0xa01b
cmpb $0x0, 0x3f(%rbx)
jne 0xa01b
movzbl %bpl, %esi
movq %rbx, %rdi
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x94de
cmpl $0x80, %eax
jg 0xa01b
cmpb $0x0, 0x3d(%rbx)
jne 0xa01b
cmpb $0x1, 0x69(%rbx)
je 0x9fa8
jmp 0xa654
cmpl $0x10, %eax
jg 0xa01b
cmpb $0x0, 0x69(%rbx)
jne 0xa01b
cmpb $0x0, 0x3e(%rbx)
jne 0xa01b
jmp 0xa001
cmpl $0x80, %eax
jg 0xa01b
cmpb $0x1, 0x69(%rbx)
jne 0x9fe9
movzbl %bpl, %esi
movq %rbx, %rdi
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x88e9
cmpl $0x0, 0x94(%rbx)
jle 0xa66e
leaq 0x4e69(%rip), %rdi      # 0xee3f
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2090
movb 0x3d(%rbx), %cl
testb %cl, %cl
je 0xa654
xorb $0x1, %cl
cmpl $0x11, %eax
setge %al
orb %cl, %al
jne 0xa01b
movzbl %bpl, %esi
movq %rbx, %rdi
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x7228
cmpl $0x0, 0x94(%rbx)
jle 0xa04e
cmpb $0x0, 0x3e(%rbx)
je 0xa033
leaq 0x4e35(%rip), %rdi      # 0xee66
jmp 0xa049
leaq 0x4e4d(%rip), %rax      # 0xee87
leaq 0x4e5d(%rip), %rdi      # 0xee9e
cmpb $0x0, 0x3d(%rbx)
cmovneq %rax, %rdi
callq 0x2090
cmpb $0x1, 0x3e(%rbx)
jne 0xa05c
movq %rbx, %rdi
callq 0x3611
movq %rbx, %rdi
callq 0x3610
cmpb $0x1, 0x69(%rbx)
jne 0xa072
movq %rbx, %rdi
callq 0x52fc
cmpb $0x0, 0x3d(%rbx)
movl %ebp, 0x14(%rsp)
je 0xa086
movq %rbx, %rdi
callq 0x5110
jmp 0xa09a
movq 0x28(%rbx), %rdi
movzbl 0x71(%rbx), %esi
callq 0x65a3
movq %rax, 0x98(%rbx)
movq %rbx, %rdi
callq 0x4df5
movslq 0x20(%rbx), %rdi
shlq $0x3, %rdi
callq 0xbce0
movq %rax, %r15
movq %rax, 0x5118(%rbx)
movslq 0x38(%rbx), %r12
shlq $0x3, %r12
movq %r12, %rdi
callq 0xbce0
movq %rax, %r14
movq %rax, 0x5108(%rbx)
movq %r12, %rdi
callq 0xbce0
movq %rax, 0x5110(%rbx)
testq %r15, %r15
je 0xa0f7
testq %r14, %r14
setne %cl
testq %rax, %rax
setne %al
testb %al, %cl
jne 0xa103
leaq 0x4d9c(%rip), %rdi      # 0xee9a
callq 0x35b7
cmpb $0x1, 0x68(%rbx)
jne 0xa116
movq %rbx, %rdi
callq 0xa6b6
jmp 0xa1c9
movslq 0x20(%rbx), %rdi
shlq $0x3, %rdi
callq 0xbce0
movq %rax, 0x18(%rbx)
testq %rax, %rax
jne 0xa138
leaq 0x5105(%rip), %rdi      # 0xf238
callq 0x35b7
xorl %r12d, %r12d
pushq $0x8
popq %r14
leaq 0x50f2(%rip), %r15      # 0xf238
movslq 0x20(%rbx), %rax
cmpq %rax, %r12
jge 0xa199
movslq 0x38(%rbx), %rdi
movq %r14, %rsi
callq 0xbe60
movq 0x18(%rbx), %rcx
movq %rax, (%rcx,%r12,8)
movq 0x18(%rbx), %rax
movq (%rax,%r12,8), %rdx
testq %rdx, %rdx
jne 0xa180
movq %r15, %rdi
callq 0x35b7
movq 0x18(%rbx), %rax
movq (%rax,%r12,8), %rdx
movq (%rbx), %rax
movq 0x8(%rbx), %rcx
movq (%rax,%r12,8), %rdi
movq (%rcx,%r12,8), %rsi
callq 0xbad1
incq %r12
jmp 0xa146
movq %rbx, %rdi
callq 0xa6b6
xorl %r14d, %r14d
movslq 0x20(%rbx), %rax
movq 0x18(%rbx), %rdi
cmpq %rax, %r14
jge 0xa1bf
movq (%rdi,%r14,8), %rdi
callq 0xbdb4
incq %r14
jmp 0xa1a4
callq 0xbdb4
andq $0x0, 0x18(%rbx)
cmpb $0x1, 0x70(%rbx)
jne 0xa222
xorl %r14d, %r14d
pushq $0x2
popq %rbp
movslq 0x38(%rbx), %rax
leaq -0x1(%rax), %rdx
movq 0x50e8(%rbx), %rdi
movq 0x5108(%rbx), %rcx
cmpq %rdx, %r14
jge 0xa20b
movq (%rcx,%r14,8), %rax
movq 0x8(%rcx,%r14,8), %rsi
addq %rax, %rdi
incq %r14
subq %rax, %rsi
movl %ebp, %edx
callq 0x22e0
jmp 0xa1d5
movq -0x8(%rcx,%rax,8), %rax
addq %rax, %rdi
movq 0x28(%rbx), %rsi
subq %rax, %rsi
pushq $0x2
popq %rdx
callq 0x22e0
movq %rbx, %rdi
callq 0x606e
movq %rax, 0x18(%rsp)
movq %rbx, %rdi
callq 0x610b
movq %rax, 0x8(%rsp)
xorl %ebp, %ebp
movq $-0x100, %r14
movl 0x14(%rsp), %eax
xorb $0x1, %al
movb %al, 0x20(%rsp)
leaq 0x102(%r14), %r12
cmpq $0x100, %r12            # imm = 0x100
jb 0xa269
cmpb $0x1, 0x3d(%rbx)
je 0xa692
cmpq $-0x101, %r14           # imm = 0xFEFF
ja 0xa27c
cmpb $0x0, 0x3e(%rbx)
jne 0xa67d
movb $0x0, 0x7(%rsp)
movq 0x80(%rbx), %rdi
callq 0x58cd
movq 0x8(%rsp), %rdi
movq %rax, 0x8(%rdi)
movq 0x18(%rsp), %rsi
movq %r12, %rdx
leaq 0x7(%rsp), %rcx
movl %ebp, %r8d
movq %rbx, %r9
callq 0xa891
movl %eax, %r15d
cmpl $0x2, 0x94(%rbx)
setl %al
orb 0x20(%rsp), %al
jne 0xa40e
leaq 0x101(%r14), %r12
callq 0xbc94
movq %rax, %xmm0
movq 0x2d32(%rip), %xmm4     # 0xd010
punpckldq %xmm4, %xmm0    # xmm0 = xmm0[0],xmm4[0],xmm0[1],xmm4[1]
movapd 0x2d36(%rip), %xmm3     # 0xd020
subpd %xmm3, %xmm0
movapd %xmm0, %xmm1
unpckhpd %xmm0, %xmm1            # xmm1 = xmm1[1],xmm0[1]
addsd %xmm0, %xmm1
movapd %xmm1, %xmm2
movq 0x28(%rbx), %xmm0
punpckldq %xmm4, %xmm0    # xmm0 = xmm0[0],xmm4[0],xmm0[1],xmm4[1]
subpd %xmm3, %xmm0
movapd %xmm0, %xmm1
unpckhpd %xmm0, %xmm1            # xmm1 = xmm1[1],xmm0[1]
addsd %xmm0, %xmm1
divsd %xmm1, %xmm2
movapd %xmm2, 0x40(%rsp)
callq 0xbc8c
movq %rax, %xmm0
movq 0x2cdd(%rip), %xmm3     # 0xd010
punpckldq %xmm3, %xmm0    # xmm0 = xmm0[0],xmm3[0],xmm0[1],xmm3[1]
movapd 0x2ce1(%rip), %xmm2     # 0xd020
subpd %xmm2, %xmm0
movapd %xmm0, %xmm1
unpckhpd %xmm0, %xmm1            # xmm1 = xmm1[1],xmm0[1]
addsd %xmm0, %xmm1
movapd %xmm1, %xmm4
movq 0x28(%rbx), %xmm0
punpckldq %xmm3, %xmm0    # xmm0 = xmm0[0],xmm3[0],xmm0[1],xmm3[1]
subpd %xmm2, %xmm0
movapd %xmm0, %xmm1
unpckhpd %xmm0, %xmm1            # xmm1 = xmm1[1],xmm0[1]
addsd %xmm0, %xmm1
divsd %xmm1, %xmm4
movapd %xmm4, 0x30(%rsp)
movq 0x8(%rsp), %rax
movq 0x8(%rax), %rdi
callq 0x2190
leaq 0x4b71(%rip), %rdi      # 0xeefc
movq %r12, %rsi
movapd 0x40(%rsp), %xmm0
movapd 0x30(%rsp), %xmm1
movq %rax, %rdx
movb $0x2, %al
callq 0x2100
movq 0x58(%rbx), %rdi
testq %rdi, %rdi
je 0xa40e
callq 0x2190
xorl %edx, %edx
pushq $0x6
popq %rcx
divq %rcx
movq %rax, %r12
movq 0x58(%rbx), %rdi
callq 0x2190
cvtsi2sd %rax, %xmm0
imulq $0x6, 0x28(%rbx), %rax
mulsd 0x44e0(%rip), %xmm0     # 0xe8b8
movq %rax, %xmm1
punpckldq 0x2c2b(%rip), %xmm1 # xmm1 = xmm1[0],mem[0],xmm1[1],mem[1]
subpd 0x2c33(%rip), %xmm1     # 0xd020
movapd %xmm1, %xmm2
unpckhpd %xmm1, %xmm2            # xmm2 = xmm2[1],xmm1[1]
addsd %xmm1, %xmm2
divsd %xmm2, %xmm0
leaq 0x4629(%rip), %rdi      # 0xea2d
movq %r12, %rsi
movb $0x1, %al
callq 0x2100
cmpb $0x1, 0x3c(%rbx)
jne 0xa41b
cmpb $0x0, 0x7(%rsp)
je 0xa45a
movq 0x8(%rsp), %rax
movq (%rax), %rdi
testq %rdi, %rdi
je 0xa42d
callq 0x20e0
pushq $0x1
popq %r13
subl %ebp, %r13d
movq 0x8(%rsp), %rbp
movq 0x8(%rbp), %r12
movq %r12, %rdi
callq 0x2120
movq %r12, (%rbp)
incq %r14
movl %r13d, %ebp
testb %r15b, %r15b
je 0xa24f
jmp 0xa480
cmpl $0x2, 0x94(%rbx)
jl 0xa46f
leaq 0x45ea(%rip), %rdi      # 0xea54
callq 0x2090
movq 0x8(%rsp), %r14
movq 0x8(%r14), %rdi
callq 0x20e0
movq (%r14), %r12
testq %r12, %r12
je 0xa48d
movq %r12, %rdi
callq 0x20e0
movl 0x94(%rbx), %eax
testl %eax, %eax
movl 0x14(%rsp), %r14d
jle 0xa5a5
testb %r14b, %r14b
je 0xa57a
movl 0x20(%rbx), %ebp
callq 0xbc94
movq %rax, %r12
callq 0xbc8c
movq %rax, %r13
callq 0xbc94
movq %rax, %xmm0
movq 0x2b42(%rip), %xmm4     # 0xd010
punpckldq %xmm4, %xmm0    # xmm0 = xmm0[0],xmm4[0],xmm0[1],xmm4[1]
movapd 0x2b46(%rip), %xmm3     # 0xd020
subpd %xmm3, %xmm0
movapd %xmm0, %xmm1
unpckhpd %xmm0, %xmm1            # xmm1 = xmm1[1],xmm0[1]
addsd %xmm0, %xmm1
movapd %xmm1, %xmm2
movq 0x28(%rbx), %xmm0
punpckldq %xmm4, %xmm0    # xmm0 = xmm0[0],xmm4[0],xmm0[1],xmm4[1]
subpd %xmm3, %xmm0
movapd %xmm0, %xmm1
unpckhpd %xmm0, %xmm1            # xmm1 = xmm1[1],xmm0[1]
addsd %xmm0, %xmm1
divsd %xmm1, %xmm2
movapd %xmm2, 0x20(%rsp)
callq 0xbc8c
movq %rax, %xmm0
movq 0x2aed(%rip), %xmm3     # 0xd010
punpckldq %xmm3, %xmm0    # xmm0 = xmm0[0],xmm3[0],xmm0[1],xmm3[1]
movapd 0x2af1(%rip), %xmm2     # 0xd020
subpd %xmm2, %xmm0
movapd %xmm0, %xmm1
unpckhpd %xmm0, %xmm1            # xmm1 = xmm1[1],xmm0[1]
addsd %xmm0, %xmm1
movq 0x28(%rbx), %xmm0
punpckldq %xmm3, %xmm0    # xmm0 = xmm0[0],xmm3[0],xmm0[1],xmm3[1]
subpd %xmm2, %xmm0
movapd %xmm0, %xmm2
unpckhpd %xmm0, %xmm2            # xmm2 = xmm2[1],xmm0[1]
addsd %xmm0, %xmm2
divsd %xmm2, %xmm1
leaq 0x49df(%rip), %rdi      # 0xef42
movl %ebp, %esi
movq %r12, %rdx
movq %r13, %rcx
movapd 0x20(%rsp), %xmm0
movb $0x2, %al
callq 0x2100
jmp 0xa5a5
cmpl $0x1, %eax
je 0xa5a5
movl 0x20(%rbx), %ebp
callq 0xbc94
movq %rax, %r12
callq 0xbc8c
leaq 0x49fd(%rip), %rdi      # 0xef93
movl %ebp, %esi
movq %r12, %rdx
movq %rax, %rcx
xorl %eax, %eax
callq 0x2100
movq 0x18(%rsp), %rdi
callq 0x60f5
movq 0x8(%rsp), %rdi
callq 0x6154
cmpb $0x1, 0x69(%rbx)
jne 0xa5c7
movq %rbx, %rdi
callq 0x53db
movzbl %r14b, %esi
movq %rbx, %rdi
callq 0x38c8
cmpb $0x1, 0x3e(%rbx)
jne 0xa5f6
movq %rbx, %rdi
callq 0x37b5
cmpl $0x0, 0x94(%rbx)
jle 0xa5f6
leaq 0x4c93(%rip), %rdi      # 0xf284
callq 0x2090
cmpb $0x0, 0x3d(%rbx)
je 0xa606
movq %rbx, %rdi
callq 0x5167
jmp 0xa61a
movq 0x28(%rbx), %rsi
movq 0x98(%rbx), %rdi
movzbl 0x71(%rbx), %edx
callq 0x6601
movq 0x5110(%rbx), %rdi
callq 0xbdb4
movq 0x5108(%rbx), %rdi
callq 0xbdb4
movq 0x5118(%rbx), %rdi
callq 0xbdb4
movq %rbx, %rdi
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x4f88
movzbl %bpl, %esi
movq %rbx, %rdi
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x7cf4
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x8974(%rip), %rax      # 0x12ff8
movq (%rax), %rcx
leaq 0x484a(%rip), %rdi      # 0xeed8
pushq $0x23
jmp 0xa6a5
movq 0x895f(%rip), %rax      # 0x12ff8
movq (%rax), %rcx
leaq 0x4815(%rip), %rdi      # 0xeeb8
pushq $0x1f
popq %rsi
pushq $0x1
popq %rdx
callq 0x2390
pushq $0x1
popq %rdi
callq 0x2380