// File: /workspace/github_c_makefile_star2_O0/felipelouza[P]egap/util.c
// Function: mergeBWT128ext
void mergeBWT128ext(g_data *g, bool lastRound)
{
  if(sizeof(symbol)>sizeof(palette)) die("Sorry, alphabet is too large (mergeBWT128ext");
  assert(!g->lcpMerge && g->extMem && g->numBwt<=128);
  FILE *daOutFile=NULL;
  FILE *colorsOutFile=NULL;
  FILE *saOutFile=NULL;
  FILE *slOutFile=NULL;
  FILE *qsOutFile=NULL;

  check_g_data(g);
  array_clear(g->inCnt,g->numBwt,0);

  if(g->outputSA && lastRound)
    saOutFile = openSAFile(g);
  if(g->outputSL && lastRound)
    slOutFile = openSLFile(g);
  if(g->outputDA && lastRound)
    daOutFile = openDAFile(g);  
  if(g->outputColors && lastRound)
    colorsOutFile = openColorFile(g);  
  if(g->outputQS && lastRound)
    qsOutFile = openQSFile(g);

  open_bw_files(g);     // open files in read mode
  rewind_bw_files(g);   // set file pointers at the beginning of each BWT

  if(g->outputSA && lastRound){
    snprintf(g->safname,Filename_size,"%s.%d.%s",g->outPath,g->outputSA, SA_BL_EXT);
    open_sa_files(g);
    rewind_sa_files(g);   // set file pointers at the beginning of each SA
  }
  if(g->outputSL && lastRound){
    snprintf(g->slfname,Filename_size,"%s.%d.%s",g->outPath,g->outputSL, SL_BL_EXT);
    open_sl_files(g);
    rewind_sl_files(g);   // set file pointers at the beginning of each SL
  }
  if(g->outputDA && lastRound){
    snprintf(g->dafname,Filename_size,"%s.%d.%s",g->outPath,g->outputDA, DA_BL_EXT);
    open_da_files(g);
    rewind_da_files(g);   // set file pointers at the beginning of each DA
  }
  if(g->outputQS && lastRound){
    snprintf(g->qsfname,Filename_size,"%s.%s",g->outPath, QS_BL_EXT);
    open_qs_files(g);
    rewind_qs_files(g);   // set file pointers at the beginning of each DA
  }

  // mmap merge values so we can read/write simultaneously 
  int fd = open(g->merge_fname,O_RDWR);
  if(fd == -1) die(__func__);
  g->mergeColor = mmap(NULL,g->mergeLen*sizeof(palette),PROT_READ|PROT_WRITE,MAP_SHARED,fd,0);
  if(g->mergeColor == MAP_FAILED) die(__func__);
  #ifdef USE_MMAP_ADVISE
  madvise(g->mergeColor, g->mergeLen*sizeof(palette), MADV_SEQUENTIAL);
  #endif
  if(close(fd)!=0) die(__func__);

  symbol *bwtout = (symbol *) g->mergeColor;   // merged BWT stored in mergeColor
  for (customInt i = 0; i < g->mergeLen; ++i) {
    int currentColor = g->mergeColor[i] & 0x7F; // delete additional bit
    assert(currentColor < g->numBwt);
    // if requested output merge array
    if(g->outputSA && lastRound){ 
      int sa_value=0;
      int e = fread(&sa_value, g->outputSA, 1, g->saf[currentColor]);
      if(e!=1) die(__func__);
      if(fwrite(&sa_value, g->outputSA, 1, saOutFile)==EOF)
        die("mergeBWT128ext: Error writing to Suffix Array file");   
    } 
    if(g->outputSL && lastRound){ 
      int sl_value=0;
      int e = fread(&sl_value, g->outputSL, 1, g->slf[currentColor]);
      if(e!=1) die(__func__);
      if(fwrite(&sl_value, g->outputSL, 1, slOutFile)==EOF)
        die("mergeBWT128ext: Error writing to Suffix Array file");   
    } 
    if(g->outputDA && lastRound){ 
      int da_value=0;
      int e = fread(&da_value, g->outputDA, 1, g->daf[currentColor]);
      if(e!=1) die(__func__);
      da_value+=g->bwtDocs[currentColor];
      //printf("%d (%d)\n", da_value, currentColor);
      //if(fputc(currentColor, daOutFile)==EOF)
      if(fwrite(&da_value, g->outputDA, 1, daOutFile)==EOF)
        die("mergeBWT128ext: Error writing to Document Array file");   
      //printf("%d ==> %d\n", currentColor, da_value);
    } 
    if(g->outputColors && lastRound){ 
      int da_value=currentColor;
      if(fwrite(&da_value, g->outputColors, 1, colorsOutFile)==EOF)
        die("mergeBWT128ext: Error writing to Document Array (Color) file");   
    } 
    if(g->outputQS && lastRound){ 
      symbol qs_value=0;
      int e = fread(&qs_value, sizeof(symbol), 1, g->qsf[currentColor]);
      if(e!=1) die(__func__);
      if(fwrite(&qs_value, sizeof(symbol), 1, qsOutFile)==EOF)
        die("mergeBWT128ext: Error writing to QS file");   
    } 
    // save new BWT char overwriting mergeColor[i]
    int e = fread(bwtout+i,sizeof(symbol),1,g->bwf[currentColor]);
    if(e!=1) die(__func__);
    if(lastRound) bwtout[i] = alpha_enlarge(bwtout[i]);     
    g->inCnt[currentColor]++; // one more char read from currentColor BWT
  }  
  close_bw_files(g);
  if(g->outputSA  && lastRound) close_sa_files(g);
  if(g->outputSL  && lastRound) close_sl_files(g);
  if(g->outputDA  && lastRound) close_da_files(g);
  if(g->outputQS  && lastRound) close_qs_files(g);
  // final check on the merging 
  for(int i=0;i<g->numBwt;i++) assert(g->inCnt[i]==g->bwtLen[i]);

  // merging done: copy back to file
  fd = open(g->bwfname,O_WRONLY);
  if(fd == -1) die(__func__);
  huge_pwrite(fd, bwtout,sizeof(symbol)*g->mergeLen,sizeof(symbol)*g->symb_offset);
  if(close(fd)!=0) die(__func__);
  // unmap mergeColor
  fd = munmap(g->mergeColor,g->mergeLen*sizeof(palette));
  if(fd == -1) die(__func__);
  g->mergeColor=NULL;  
  // close suffix array file 
  if(g->outputSA && lastRound){
    if(fclose(saOutFile)!=0) die("mergeBWT128ext: Error closing Suffix Array file");   
    remove(g->safname);
  }
  // close suffixes's length file 
  if(g->outputSL && lastRound){
    if(fclose(slOutFile)!=0) die("mergeBWT128ext: Error closing Suffixes' Lengths file");   
    remove(g->slfname);
  }
  // close document array file 
  if(g->outputDA && lastRound){
    if(fclose(daOutFile)!=0) die("mergeBWT128ext: Error closing Document Array file");   
    remove(g->dafname);
  }
  //close DA (color) file
  if(g->outputColors && lastRound){
    if(fclose(colorsOutFile)!=0) die("mergeBWT128ext: Error closing Document Array (Color) file");   
  }
  // close QS file 
  if(g->outputQS && lastRound){
    if(fclose(qsOutFile)!=0) die("mergeBWT128ext: Error closing QS file");   
    remove(g->qsfname);
  }
}

// Assembly:
subq $0x88, %rsp
movb %sil, %al
movq %rdi, 0x80(%rsp)
andb $0x1, %al
movb %al, 0x7f(%rsp)
movq $0x0, 0x70(%rsp)
movq $0x0, 0x68(%rsp)
movq $0x0, 0x60(%rsp)
movq $0x0, 0x58(%rsp)
movq $0x0, 0x50(%rsp)
movq 0x80(%rsp), %rdi
callq 0x3dd0
movq 0x80(%rsp), %rax
movq 0x5118(%rax), %rdi
movq 0x80(%rsp), %rax
movslq 0x20(%rax), %rsi
xorl %eax, %eax
movl %eax, %edx
callq 0x3310
movq 0x80(%rsp), %rax
cmpl $0x0, 0x4c(%rax)
je 0x49ad
testb $0x1, 0x7f(%rsp)
je 0x49ad
movq 0x80(%rsp), %rdi
callq 0x53a0
movq %rax, 0x60(%rsp)
movq 0x80(%rsp), %rax
cmpl $0x0, 0x50(%rax)
je 0x49d4
testb $0x1, 0x7f(%rsp)
je 0x49d4
movq 0x80(%rsp), %rdi
callq 0x5440
movq %rax, 0x58(%rsp)
movq 0x80(%rsp), %rax
cmpl $0x0, 0x44(%rax)
je 0x49fb
testb $0x1, 0x7f(%rsp)
je 0x49fb
movq 0x80(%rsp), %rdi
callq 0x4870
movq %rax, 0x70(%rsp)
movq 0x80(%rsp), %rax
cmpl $0x0, 0x48(%rax)
je 0x4a22
testb $0x1, 0x7f(%rsp)
je 0x4a22
movq 0x80(%rsp), %rdi
callq 0x54e0
movq %rax, 0x68(%rsp)
movq 0x80(%rsp), %rax
cmpl $0x0, 0x54(%rax)
je 0x4a49
testb $0x1, 0x7f(%rsp)
je 0x4a49
movq 0x80(%rsp), %rdi
callq 0x5580
movq %rax, 0x50(%rsp)
movq 0x80(%rsp), %rdi
callq 0x6da0
movq 0x80(%rsp), %rdi
callq 0x6e70
movq 0x80(%rsp), %rax
cmpl $0x0, 0x4c(%rax)
je 0x4ad6
testb $0x1, 0x7f(%rsp)
je 0x4ad6
movq 0x80(%rsp), %rdi
addq $0x20a0, %rdi           # imm = 0x20A0
movq 0x80(%rsp), %rax
movq 0x80(%rax), %rcx
movq 0x80(%rsp), %rax
movl 0x4c(%rax), %r8d
movl $0x1000, %esi           # imm = 0x1000
leaq 0x100af(%rip), %rdx     # 0x14b5d
leaq 0x100b1(%rip), %r9      # 0x14b66
movb $0x0, %al
callq 0x2130
movq 0x80(%rsp), %rdi
callq 0x6f90
movq 0x80(%rsp), %rdi
callq 0x7060
movq 0x80(%rsp), %rax
cmpl $0x0, 0x50(%rax)
je 0x4b49
testb $0x1, 0x7f(%rsp)
je 0x4b49
movq 0x80(%rsp), %rdi
addq $0x30a0, %rdi           # imm = 0x30A0
movq 0x80(%rsp), %rax
movq 0x80(%rax), %rcx
movq 0x80(%rsp), %rax
movl 0x50(%rax), %r8d
movl $0x1000, %esi           # imm = 0x1000
leaq 0x1003c(%rip), %rdx     # 0x14b5d
leaq 0x10096(%rip), %r9      # 0x14bbe
movb $0x0, %al
callq 0x2130
movq 0x80(%rsp), %rdi
callq 0x7180
movq 0x80(%rsp), %rdi
callq 0x7250
movq 0x80(%rsp), %rax
cmpl $0x0, 0x44(%rax)
je 0x4bbc
testb $0x1, 0x7f(%rsp)
je 0x4bbc
movq 0x80(%rsp), %rdi
addq $0x10a0, %rdi           # imm = 0x10A0
movq 0x80(%rsp), %rax
movq 0x80(%rax), %rcx
movq 0x80(%rsp), %rax
movl 0x44(%rax), %r8d
movl $0x1000, %esi           # imm = 0x1000
leaq 0xffc9(%rip), %rdx      # 0x14b5d
leaq 0xffe7(%rip), %r9       # 0x14b82
movb $0x0, %al
callq 0x2130
movq 0x80(%rsp), %rdi
callq 0x7560
movq 0x80(%rsp), %rdi
callq 0x7630
movq 0x80(%rsp), %rax
cmpl $0x0, 0x54(%rax)
je 0x4c23
testb $0x1, 0x7f(%rsp)
je 0x4c23
movq 0x80(%rsp), %rdi
addq $0x40a0, %rdi           # imm = 0x40A0
movq 0x80(%rsp), %rax
movq 0x80(%rax), %rcx
movl $0x1000, %esi           # imm = 0x1000
leaq 0xfee4(%rip), %rdx      # 0x14adf
leaq 0xff9c(%rip), %r8       # 0x14b9e
movb $0x0, %al
callq 0x2130
movq 0x80(%rsp), %rdi
callq 0x7370
movq 0x80(%rsp), %rdi
callq 0x7440
movq 0x80(%rsp), %rax
movq 0x50d8(%rax), %rdi
movl $0x2, %esi
movb $0x0, %al
callq 0x22e0
movl %eax, 0x4c(%rsp)
cmpl $-0x1, 0x4c(%rsp)
jne 0x4c55
leaq 0x100da(%rip), %rdi     # 0x14d2a
callq 0x3ce0
movq 0x80(%rsp), %rax
movq 0x28(%rax), %rsi
shlq $0x0, %rsi
movl 0x4c(%rsp), %r8d
xorl %eax, %eax
movl %eax, %r9d
movl $0x3, %edx
movl $0x1, %ecx
movq %r9, %rdi
callq 0x2220
movq %rax, %rcx
movq 0x80(%rsp), %rax
movq %rcx, 0x50e8(%rax)
movq 0x80(%rsp), %rax
movq $-0x1, %rcx
cmpq %rcx, 0x50e8(%rax)
jne 0x4cb7
leaq 0x10078(%rip), %rdi     # 0x14d2a
callq 0x3ce0
movq 0x80(%rsp), %rax
movq 0x50e8(%rax), %rdi
movq 0x80(%rsp), %rax
movq 0x28(%rax), %rsi
shlq $0x0, %rsi
movl $0x2, %edx
callq 0x22d0
movl 0x4c(%rsp), %edi
callq 0x2150
cmpl $0x0, %eax
je 0x4cfa
leaq 0x10035(%rip), %rdi     # 0x14d2a
callq 0x3ce0
movq 0x80(%rsp), %rax
movq 0x50e8(%rax), %rax
movq %rax, 0x40(%rsp)
movq $0x0, 0x38(%rsp)
movq 0x38(%rsp), %rax
movq 0x80(%rsp), %rcx
cmpq 0x28(%rcx), %rax
jae 0x50d0
movq 0x80(%rsp), %rax
movq 0x50e8(%rax), %rax
movq 0x38(%rsp), %rcx
movzbl (%rax,%rcx), %eax
andl $0x7f, %eax
movl %eax, 0x34(%rsp)
movq 0x80(%rsp), %rax
cmpl $0x0, 0x4c(%rax)
je 0x4df0
testb $0x1, 0x7f(%rsp)
je 0x4df0
movl $0x0, 0x30(%rsp)
movq 0x80(%rsp), %rax
movslq 0x4c(%rax), %rsi
movq 0x80(%rsp), %rax
movq 0x50b0(%rax), %rax
movslq 0x34(%rsp), %rcx
movq (%rax,%rcx,8), %rcx
leaq 0x30(%rsp), %rdi
movl $0x1, %edx
callq 0x2090
movl %eax, 0x2c(%rsp)
cmpl $0x1, 0x2c(%rsp)
je 0x4dbc
leaq 0xff73(%rip), %rdi      # 0x14d2a
callq 0x3ce0
movq 0x80(%rsp), %rax
movslq 0x4c(%rax), %rsi
movq 0x60(%rsp), %rcx
leaq 0x30(%rsp), %rdi
movl $0x1, %edx
callq 0x2380
cmpq $-0x1, %rax
jne 0x4dee
leaq 0xff50(%rip), %rdi      # 0x14d39
callq 0x3ce0
jmp 0x4df0
movq 0x80(%rsp), %rax
cmpl $0x0, 0x50(%rax)
je 0x4e93
testb $0x1, 0x7f(%rsp)
je 0x4e93
movl $0x0, 0x28(%rsp)
movq 0x80(%rsp), %rax
movslq 0x50(%rax), %rsi
movq 0x80(%rsp), %rax
movq 0x50b8(%rax), %rax
movslq 0x34(%rsp), %rcx
movq (%rax,%rcx,8), %rcx
leaq 0x28(%rsp), %rdi
movl $0x1, %edx
callq 0x2090
movl %eax, 0x24(%rsp)
cmpl $0x1, 0x24(%rsp)
je 0x4e5f
leaq 0xfed0(%rip), %rdi      # 0x14d2a
callq 0x3ce0
movq 0x80(%rsp), %rax
movslq 0x50(%rax), %rsi
movq 0x58(%rsp), %rcx
leaq 0x28(%rsp), %rdi
movl $0x1, %edx
callq 0x2380
cmpq $-0x1, %rax
jne 0x4e91
leaq 0xfead(%rip), %rdi      # 0x14d39
callq 0x3ce0
jmp 0x4e93
movq 0x80(%rsp), %rax
cmpl $0x0, 0x44(%rax)
je 0x4f57
testb $0x1, 0x7f(%rsp)
je 0x4f57
movl $0x0, 0x20(%rsp)
movq 0x80(%rsp), %rax
movslq 0x44(%rax), %rsi
movq 0x80(%rsp), %rax
movq 0x50a8(%rax), %rax
movslq 0x34(%rsp), %rcx
movq (%rax,%rcx,8), %rcx
leaq 0x20(%rsp), %rdi
movl $0x1, %edx
callq 0x2090
movl %eax, 0x1c(%rsp)
cmpl $0x1, 0x1c(%rsp)
je 0x4f02
leaq 0xfe2d(%rip), %rdi      # 0x14d2a
callq 0x3ce0
movq 0x80(%rsp), %rax
movq 0x10(%rax), %rax
movslq 0x34(%rsp), %rcx
movq (%rax,%rcx,8), %rcx
movslq 0x20(%rsp), %rax
addq %rcx, %rax
movl %eax, 0x20(%rsp)
movq 0x80(%rsp), %rax
movslq 0x44(%rax), %rsi
movq 0x70(%rsp), %rcx
leaq 0x20(%rsp), %rdi
movl $0x1, %edx
callq 0x2380
cmpq $-0x1, %rax
jne 0x4f55
leaq 0xfe1c(%rip), %rdi      # 0x14d6c
callq 0x3ce0
jmp 0x4f57
movq 0x80(%rsp), %rax
cmpl $0x0, 0x48(%rax)
je 0x4fa8
testb $0x1, 0x7f(%rsp)
je 0x4fa8
movl 0x34(%rsp), %eax
movl %eax, 0x18(%rsp)
movq 0x80(%rsp), %rax
movslq 0x48(%rax), %rsi
movq 0x68(%rsp), %rcx
leaq 0x18(%rsp), %rdi
movl $0x1, %edx
callq 0x2380
cmpq $-0x1, %rax
jne 0x4fa6
leaq 0xfe00(%rip), %rdi      # 0x14da1
callq 0x3ce0
jmp 0x4fa8
movq 0x80(%rsp), %rax
cmpl $0x0, 0x54(%rax)
je 0x502e
testb $0x1, 0x7f(%rsp)
je 0x502e
movb $0x0, 0x17(%rsp)
movq 0x80(%rsp), %rax
movq 0x50c0(%rax), %rax
movslq 0x34(%rsp), %rcx
movq (%rax,%rcx,8), %rcx
leaq 0x17(%rsp), %rdi
movl $0x1, %edx
movq %rdx, %rsi
callq 0x2090
movl %eax, 0x10(%rsp)
cmpl $0x1, 0x10(%rsp)
je 0x5003
leaq 0xfd2c(%rip), %rdi      # 0x14d2a
callq 0x3ce0
movq 0x50(%rsp), %rcx
leaq 0x17(%rsp), %rdi
movl $0x1, %edx
movq %rdx, %rsi
callq 0x2380
cmpq $-0x1, %rax
jne 0x502c
leaq 0xfdb7(%rip), %rdi      # 0x14dde
callq 0x3ce0
jmp 0x502e
movq 0x40(%rsp), %rdi
addq 0x38(%rsp), %rdi
movq 0x80(%rsp), %rax
movq 0x50a0(%rax), %rax
movslq 0x34(%rsp), %rcx
movq (%rax,%rcx,8), %rcx
movl $0x1, %edx
movq %rdx, %rsi
callq 0x2090
movl %eax, 0xc(%rsp)
cmpl $0x1, 0xc(%rsp)
je 0x5074
leaq 0xfcbb(%rip), %rdi      # 0x14d2a
callq 0x3ce0
testb $0x1, 0x7f(%rsp)
je 0x509d
movq 0x40(%rsp), %rax
movq 0x38(%rsp), %rcx
movzbl (%rax,%rcx), %edi
callq 0x124e0
movb %al, %dl
movq 0x40(%rsp), %rax
movq 0x38(%rsp), %rcx
movb %dl, (%rax,%rcx)
movq 0x80(%rsp), %rax
movq 0x5118(%rax), %rax
movslq 0x34(%rsp), %rcx
movq (%rax,%rcx,8), %rdx
addq $0x1, %rdx
movq %rdx, (%rax,%rcx,8)
movq 0x38(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x38(%rsp)
jmp 0x4d17
movq 0x80(%rsp), %rdi
callq 0x6f10
movq 0x80(%rsp), %rax
cmpl $0x0, 0x4c(%rax)
je 0x50ff
testb $0x1, 0x7f(%rsp)
je 0x50ff
movq 0x80(%rsp), %rdi
callq 0x7100
movq 0x80(%rsp), %rax
cmpl $0x0, 0x50(%rax)
je 0x5121
testb $0x1, 0x7f(%rsp)
je 0x5121
movq 0x80(%rsp), %rdi
callq 0x72f0
movq 0x80(%rsp), %rax
cmpl $0x0, 0x44(%rax)
je 0x5143
testb $0x1, 0x7f(%rsp)
je 0x5143
movq 0x80(%rsp), %rdi
callq 0x76d0
movq 0x80(%rsp), %rax
cmpl $0x0, 0x54(%rax)
je 0x5165
testb $0x1, 0x7f(%rsp)
je 0x5165
movq 0x80(%rsp), %rdi
callq 0x74e0
movl $0x0, 0x8(%rsp)
movl 0x8(%rsp), %eax
movq 0x80(%rsp), %rcx
cmpl 0x20(%rcx), %eax
jge 0x518d
jmp 0x5180
movl 0x8(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x8(%rsp)
jmp 0x516d
movq 0x80(%rsp), %rdi
addq $0xa0, %rdi
movl $0x1, %esi
movb $0x0, %al
callq 0x22e0
movl %eax, 0x4c(%rsp)
cmpl $-0x1, 0x4c(%rsp)
jne 0x51bf
leaq 0xfb70(%rip), %rdi      # 0x14d2a
callq 0x3ce0
movl 0x4c(%rsp), %edi
movq 0x40(%rsp), %rsi
movq 0x80(%rsp), %rax
movq 0x28(%rax), %rdx
shlq $0x0, %rdx
movq 0x80(%rsp), %rax
movq 0x30(%rax), %rcx
shlq $0x0, %rcx
callq 0x7820
movl 0x4c(%rsp), %edi
callq 0x2150
cmpl $0x0, %eax
je 0x5207
leaq 0xfb28(%rip), %rdi      # 0x14d2a
callq 0x3ce0
movq 0x80(%rsp), %rax
movq 0x50e8(%rax), %rdi
movq 0x80(%rsp), %rax
movq 0x28(%rax), %rsi
shlq $0x0, %rsi
callq 0x2280
movl %eax, 0x4c(%rsp)
cmpl $-0x1, 0x4c(%rsp)
jne 0x5242
leaq 0xfaed(%rip), %rdi      # 0x14d2a
callq 0x3ce0
movq 0x80(%rsp), %rax
movq $0x0, 0x50e8(%rax)
movq 0x80(%rsp), %rax
cmpl $0x0, 0x4c(%rax)
je 0x5299
testb $0x1, 0x7f(%rsp)
je 0x5299
movq 0x60(%rsp), %rdi
callq 0x20d0
cmpl $0x0, %eax
je 0x5285
leaq 0xfb87(%rip), %rdi      # 0x14e07
callq 0x3ce0
movq 0x80(%rsp), %rdi
addq $0x20a0, %rdi           # imm = 0x20A0
callq 0x2060
movq 0x80(%rsp), %rax
cmpl $0x0, 0x50(%rax)
je 0x52dd
testb $0x1, 0x7f(%rsp)
je 0x52dd
movq 0x58(%rsp), %rdi
callq 0x20d0
cmpl $0x0, %eax
je 0x52c9
leaq 0xfb73(%rip), %rdi      # 0x14e37
callq 0x3ce0
movq 0x80(%rsp), %rdi
addq $0x30a0, %rdi           # imm = 0x30A0
callq 0x2060
movq 0x80(%rsp), %rax
cmpl $0x0, 0x44(%rax)
je 0x5321
testb $0x1, 0x7f(%rsp)
je 0x5321
movq 0x70(%rsp), %rdi
callq 0x20d0
cmpl $0x0, %eax
je 0x530d
leaq 0xfb64(%rip), %rdi      # 0x14e6c
callq 0x3ce0
movq 0x80(%rsp), %rdi
addq $0x10a0, %rdi           # imm = 0x10A0
callq 0x2060
movq 0x80(%rsp), %rax
cmpl $0x0, 0x48(%rax)
je 0x5353
testb $0x1, 0x7f(%rsp)
je 0x5353
movq 0x68(%rsp), %rdi
callq 0x20d0
cmpl $0x0, %eax
je 0x5351
leaq 0xfb52(%rip), %rdi      # 0x14e9e
callq 0x3ce0
jmp 0x5353
movq 0x80(%rsp), %rax
cmpl $0x0, 0x54(%rax)
je 0x5397
testb $0x1, 0x7f(%rsp)
je 0x5397
movq 0x50(%rsp), %rdi
callq 0x20d0
cmpl $0x0, %eax
je 0x5383
leaq 0xfb5a(%rip), %rdi      # 0x14ed8
callq 0x3ce0
movq 0x80(%rsp), %rdi
addq $0x40a0, %rdi           # imm = 0x40A0
callq 0x2060
addq $0x88, %rsp
retq
nop