// File: /workspace/github_c_makefile_star2_O0/sc932[P]ALE/src/ALElike.c
// Function: computeReadPlacements
void computeReadPlacements(samfile_t *ins, assemblyT *theAssembly, libraryParametersT *libParams, samfile_t *placementBam, FILE *snpPhaseFile) {
  int i;

  // creates an empty set of containers for reads and alignments
  alignSet_t alignments[N_PLACEMENTS];
  for(i=0; i < N_PLACEMENTS; i++) {
    initAlignment(&alignments[i]);
  }

  int samReadPairIdx = 0;
  int qOff = libParams->qOff;

  alignSet_t *currentAlignment = NULL;
  alignSet_t *head = NULL;

  int doRealign = realignParameters == NULL ? 0 : 1;
  long readCount = 0;

  void *mateTree1 = NULL;
  void *mateTree2 = NULL;
  enum MATE_ORIENTATION orientation, lastOrientation;
  int numberMapped;
  int stop = 0;
  while(stop == 0){ // read through all reads
    bam1_t *thisRead = bam_init1(); // allocate new memory for every read
    alignSet_t *thisAlignment = &alignments[samReadPairIdx]; // starts empty
    samReadPairIdx++;

    // reads in the next read from file (ins)
    orientation = readNextBAM(ins, thisRead);

    readCount++;
    if (readCount%1000000 == 0){
      printf("Read %ld reads...\n", readCount);
    }
    if (orientation == NO_READS){
      if (head != NULL) {
    	//fprintf(stderr, "last alignment.\n");
        numberMapped = applyPlacement(head, theAssembly, libParams, placementBam, snpPhaseFile);
        countPlacements(numberMapped, &libParams->mateParameters[lastOrientation], lastOrientation);
      }
      break; // end of file
    }

    // realign the read around the existing alignment if desired
    if (doRealign) {
    	realign(thisRead, theAssembly);
    }
    if (placementBam != NULL && libParams->isSortedByName != 1) {
    	// preserve the ordering of the bamfile (i.e. do not wait for mate to be found)
    	bam_write1(placementBam->x.bam, thisRead);
    }

    // populates thisAlignment, finds orientation relative to mate (if any)
    orientation = setAlignment(ins->header, theAssembly, thisAlignment, &mateTree1, &mateTree2, libParams, orientation, thisRead);
    libraryMateParametersT *mateParameters = &libParams->mateParameters[orientation];
    //fprintf(stderr, "Processing %s %d %s\n", bam1_qname(thisRead), orientation, MATE_ORIENTATION_LABELS[orientation]);


    if (orientation == NO_READS){
      bam_destroy1(thisRead); thisRead = 0;
      stop = 1;
      //fprintf(stderr, "no reads\n");
      // need to continue to apply the last alignment
    }else if (orientation == HALF_VALID_MATE) {
      // wait for the mate to be read
      // we placed current half mate in a tree to be retrieved when the mate is found
      // do not destroy thisRead
      samReadPairIdx--; // overwrite container we just used on next read
      //fprintf(stderr, "half valid mate\n");
      continue;
    }else if (orientation == UNMAPPED_PAIR || orientation == UNMAPPED_SINGLE || orientation == UNMAPPED_MATE || thisAlignment->likelihood == 0.0) {
      applyUnmapped(thisRead, theAssembly, libParams);
      samReadPairIdx--; // overwrite container we just used on next read
      bam_destroy1(thisRead); thisRead = 0;
      countPlacements(0, &libParams->mateParameters[orientation], orientation);
      //fprintf(stderr, "unmapped pair\n");
      continue;
    }

    // organize linked list of alignments for a specific read based on current state of input stream
    if(currentAlignment == NULL || head == NULL){ // first alignment
      //copyAlignment(&alignments[0], thisAlignment);
      currentAlignment = thisAlignment;
      head = currentAlignment;
      lastOrientation = orientation;
      //fprintf(stderr, "first alignment\n");
    } else if(stop == 0 && thisAlignment != NULL && libParams->isSortedByName == 1 && strcmp(head->name, thisAlignment->name) == 0){
      // if there is more than one placement/mapping/alignment per read the bam file must be sorted by name
      // test to see if this is another alignment of the current set or a new one
      // extend the set of alignments
      currentAlignment->nextAlignment = thisAlignment;
      currentAlignment = thisAlignment;
      //fprintf(stderr, "looking for another alignment\n");
    } else if (head == NULL) {
      assert(0);
    } else {
      numberMapped = applyPlacement(head, theAssembly, libParams, placementBam, snpPhaseFile);
      //fprintf(stderr, "new alignment: %s\n", thisAlignment->name);
      countPlacements(numberMapped, &libParams->mateParameters[lastOrientation], lastOrientation);

      // set this read as next head
      currentAlignment = &alignments[0];
      copyAlignment(currentAlignment, thisAlignment);
      samReadPairIdx = 1;
      head = currentAlignment;
      lastOrientation = orientation;
    } // end of setting a new alignment

    // make sure we do not overflow the number of placements
    if (samReadPairIdx >= N_PLACEMENTS) {
      printf("WARNING: Exceeded maximum number of duplicate placements: %s\n", thisAlignment->name);
      int previous = N_PLACEMENTS-2;
      currentAlignment = &alignments[previous];
      alignSet_t *tmp = head;
      alignSet_t *leastLikely = head;
      double least = head->likelihood*head->likelihoodInsert;
      while (tmp != NULL) {
        if (tmp->likelihood*tmp->likelihoodInsert < least) {
          least = tmp->likelihood*tmp->likelihoodInsert;
          leastLikely = tmp;
        }
        tmp = tmp->nextAlignment;
      }
      if (thisAlignment->likelihood*thisAlignment->likelihoodInsert > least) {
        // overwrite previous with current
        // printf("WARNING: exceeded maximum placements. Replacing %f with %f\n", leastLikely->likelihood, thisAlignment->likelihood);
        tmp = leastLikely->nextAlignment;
        copyAlignment(leastLikely, thisAlignment);
        leastLikely->nextAlignment = tmp;
      } else {
        // printf("WARNING: exceeded maximum placements.  Dropping low probability placement %f\n", thisAlignment->likelihood);
      }
      currentAlignment->nextAlignment = NULL;
      samReadPairIdx = N_PLACEMENTS-1;
    } // end of placement overflow protection
  } // end of BAM reading

  if (getMultiplePrimaryAlignments() > 0)
	  printf("WARNING: There were %ld reads with multiple primary alignments.  ALE ignored these and treated them as secondary alignments\n", getMultiplePrimaryAlignments());

  // tear down array cached variables
  for(i=0; i < N_PLACEMENTS; i++) {
    destroyAlignment(&alignments[i]);
  }

  if (mateTreeCount > 0) {
      printf("WARNING: There were  (%d) inconsistant/remaining/missing/orphaned mated reads.\nThese should not exist... Consider fixing your input BAM.... For example:\n", mateTreeCount);
      // //printf("Orphaned Read1:\n");
  }
  twalk(mateTree1, mateTreeApplyRemainderPlacement);
  tdestroy(mateTree1,mateTreeFreeNode);

  if (mateTreeCount > 0) {
      //printf("Orphaned Read2 %d\n", mateTreeCount);
  }
  twalk(mateTree2, mateTreeApplyRemainderPlacement);
  tdestroy(mateTree2,mateTreeFreeNode);

  //printf("Destroyed mateTree (%d)\n", mateTreeCount);
  if (mateTreeCount != 0)
	  printf("WARNING: twalk & tdestroy did not clean up the %d orphaned reads\n", mateTreeCount);

  for(orientation = 0; orientation < MATE_ORIENTATION_MAX; orientation++) {
    libraryMateParametersT *mateParams = &libParams->mateParameters[orientation];

    printf("%s orientation with %ld reads, %ld mapped, %ld unmapped, %ld placed, %ld mappedButNotPlaced\n", MATE_ORIENTATION_LABELS[orientation], mateParams->count, mateParams->mapped, mateParams->count - mateParams->mapped, mateParams->placed, mateParams->mapped - mateParams->placed);
    theAssembly->totalReads += mateParams->count;
    theAssembly->totalUnmappedReads += mateParams->count - mateParams->mapped;
    theAssembly->totalMappedReads += mateParams->mapped;
    theAssembly->totalPlacedReads += mateParams->placed;
  }
  printf("Total mapped reads: %ld\n", theAssembly->totalMappedReads);
  printf("Total placed reads: %ld\n", theAssembly->totalPlacedReads);
  printf("Total unmapped reads: %ld\n", theAssembly->totalUnmappedReads);
  printf("Total unplaced reads: %ld\n", theAssembly->totalReads - theAssembly->totalPlacedReads);

  // this is done in applyUnmapped now...
  // theAssembly->totalScore += getMinLogLike()*theAssembly->totalUnmappedReads;

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x13950, %rsp          # imm = 0x13950
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movl $0x0, -0x2c(%rbp)
cmpl $0x3e8, -0x2c(%rbp)     # imm = 0x3E8
jge 0xa221
movslq -0x2c(%rbp), %rax
leaq -0x138b0(%rbp), %rdi
imulq $0x50, %rax, %rax
addq %rax, %rdi
callq 0xcb40
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0xa1f6
movl $0x0, -0x138b4(%rbp)
movq -0x18(%rbp), %rax
movl 0x3b0(%rax), %eax
movl %eax, -0x138b8(%rbp)
movq $0x0, -0x138c0(%rbp)
movq $0x0, -0x138c8(%rbp)
movq 0x2fee0(%rip), %rdx     # 0x3a138
movl $0x1, %eax
xorl %ecx, %ecx
cmpq $0x0, %rdx
cmovel %ecx, %eax
movl %eax, -0x138cc(%rbp)
movq $0x0, -0x138d8(%rbp)
movq $0x0, -0x138e0(%rbp)
movq $0x0, -0x138e8(%rbp)
movl $0x0, -0x138f8(%rbp)
cmpl $0x0, -0x138f8(%rbp)
jne 0xa81d
movl $0x1, %edi
movl $0x38, %esi
callq 0x3310
movq %rax, -0x13900(%rbp)
movslq -0x138b4(%rbp), %rcx
leaq -0x138b0(%rbp), %rax
imulq $0x50, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x13908(%rbp)
movl -0x138b4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x138b4(%rbp)
movq -0x8(%rbp), %rdi
movq -0x13900(%rbp), %rsi
callq 0xe250
movl %eax, -0x138ec(%rbp)
movq -0x138d8(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x138d8(%rbp)
movq -0x138d8(%rbp), %rax
movl $0xf4240, %ecx          # imm = 0xF4240
cqto
idivq %rcx
cmpq $0x0, %rdx
jne 0xa339
movq -0x138d8(%rbp), %rsi
leaq 0x2696d(%rip), %rdi     # 0x30c9f
movb $0x0, %al
callq 0x3200
cmpl $0xd, -0x138ec(%rbp)
jne 0xa395
cmpq $0x0, -0x138c8(%rbp)
je 0xa390
movq -0x138c8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
movq -0x20(%rbp), %rcx
movq -0x28(%rbp), %r8
callq 0x78c0
movl %eax, -0x138f4(%rbp)
movl -0x138f4(%rbp), %edi
movq -0x18(%rbp), %rsi
movl -0x138f0(%rbp), %eax
shlq $0x6, %rax
addq %rax, %rsi
movl -0x138f0(%rbp), %edx
callq 0xa170
jmp 0xa81d
cmpl $0x0, -0x138cc(%rbp)
je 0xa3ae
movq -0x13900(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0xaab0
cmpq $0x0, -0x20(%rbp)
je 0xa3d6
movq -0x18(%rbp), %rax
cmpl $0x1, 0x3b4(%rax)
je 0xa3d6
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rdi
movq -0x13900(%rbp), %rsi
callq 0x17770
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rdi
movq -0x10(%rbp), %rsi
movq -0x13908(%rbp), %rdx
movq -0x18(%rbp), %r9
movl -0x138ec(%rbp), %r10d
movq -0x13900(%rbp), %rax
leaq -0x138e0(%rbp), %rcx
leaq -0x138e8(%rbp), %r8
movl %r10d, (%rsp)
movq %rax, 0x8(%rsp)
callq 0x9a30
movl %eax, -0x138ec(%rbp)
movq -0x18(%rbp), %rax
movl -0x138ec(%rbp), %ecx
shlq $0x6, %rcx
addq %rcx, %rax
movq %rax, -0x13910(%rbp)
cmpl $0xd, -0x138ec(%rbp)
jne 0xa482
jmp 0xa440
cmpq $0x0, -0x13900(%rbp)
je 0xa466
movq -0x13900(%rbp), %rax
movq 0x30(%rax), %rdi
callq 0x3050
movq -0x13900(%rbp), %rdi
callq 0x3050
jmp 0xa468
movq $0x0, -0x13900(%rbp)
movl $0x1, -0x138f8(%rbp)
jmp 0xa54d
cmpl $0xa, -0x138ec(%rbp)
jne 0xa49f
movl -0x138b4(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x138b4(%rbp)
jmp 0xa297
cmpl $0x6, -0x138ec(%rbp)
je 0xa4d0
cmpl $0xc, -0x138ec(%rbp)
je 0xa4d0
cmpl $0x9, -0x138ec(%rbp)
je 0xa4d0
movq -0x13908(%rbp), %rax
movsd (%rax), %xmm0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0xa549
jp 0xa549
movq -0x13900(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
callq 0x7070
movl -0x138b4(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x138b4(%rbp)
cmpq $0x0, -0x13900(%rbp)
je 0xa519
movq -0x13900(%rbp), %rax
movq 0x30(%rax), %rdi
callq 0x3050
movq -0x13900(%rbp), %rdi
callq 0x3050
jmp 0xa51b
movq $0x0, -0x13900(%rbp)
movq -0x18(%rbp), %rsi
movl -0x138ec(%rbp), %eax
shlq $0x6, %rax
addq %rax, %rsi
movl -0x138ec(%rbp), %edx
xorl %edi, %edi
callq 0xa170
jmp 0xa297
jmp 0xa54b
jmp 0xa54d
cmpq $0x0, -0x138c0(%rbp)
je 0xa561
cmpq $0x0, -0x138c8(%rbp)
jne 0xa58e
movq -0x13908(%rbp), %rax
movq %rax, -0x138c0(%rbp)
movq -0x138c0(%rbp), %rax
movq %rax, -0x138c8(%rbp)
movl -0x138ec(%rbp), %eax
movl %eax, -0x138f0(%rbp)
jmp 0xa6a9
cmpl $0x0, -0x138f8(%rbp)
jne 0xa5f3
cmpq $0x0, -0x13908(%rbp)
je 0xa5f3
movq -0x18(%rbp), %rax
cmpl $0x1, 0x3b4(%rax)
jne 0xa5f3
movq -0x138c8(%rbp), %rax
movq 0x28(%rax), %rdi
movq -0x13908(%rbp), %rax
movq 0x28(%rax), %rsi
callq 0x3330
cmpl $0x0, %eax
jne 0xa5f3
movq -0x13908(%rbp), %rcx
movq -0x138c0(%rbp), %rax
movq %rcx, 0x48(%rax)
movq -0x13908(%rbp), %rax
movq %rax, -0x138c0(%rbp)
jmp 0xa6a7
cmpq $0x0, -0x138c8(%rbp)
jne 0xa61c
leaq 0x260e4(%rip), %rdi     # 0x306e8
leaq 0x257ba(%rip), %rsi     # 0x2fdc5
movl $0x905, %edx            # imm = 0x905
leaq 0x2669b(%rip), %rcx     # 0x30cb2
callq 0x3220
movq -0x138c8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
movq -0x20(%rbp), %rcx
movq -0x28(%rbp), %r8
callq 0x78c0
movl %eax, -0x138f4(%rbp)
movl -0x138f4(%rbp), %edi
movq -0x18(%rbp), %rsi
movl -0x138f0(%rbp), %eax
shlq $0x6, %rax
addq %rax, %rsi
movl -0x138f0(%rbp), %edx
callq 0xa170
leaq -0x138b0(%rbp), %rax
movq %rax, -0x138c0(%rbp)
movq -0x138c0(%rbp), %rdi
movq -0x13908(%rbp), %rsi
callq 0xcc30
movl $0x1, -0x138b4(%rbp)
movq -0x138c0(%rbp), %rax
movq %rax, -0x138c8(%rbp)
movl -0x138ec(%rbp), %eax
movl %eax, -0x138f0(%rbp)
jmp 0xa6a7
jmp 0xa6a9
cmpl $0x3e8, -0x138b4(%rbp)  # imm = 0x3E8
jl 0xa818
movq -0x13908(%rbp), %rax
movq 0x28(%rax), %rsi
leaq 0x26647(%rip), %rdi     # 0x30d12
movb $0x0, %al
callq 0x3200
movl $0x3e6, -0x13914(%rbp)  # imm = 0x3E6
movslq -0x13914(%rbp), %rcx
leaq -0x138b0(%rbp), %rax
imulq $0x50, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x138c0(%rbp)
movq -0x138c8(%rbp), %rax
movq %rax, -0x13920(%rbp)
movq -0x138c8(%rbp), %rax
movq %rax, -0x13928(%rbp)
movq -0x138c8(%rbp), %rax
movsd (%rax), %xmm0
movq -0x138c8(%rbp), %rax
mulsd 0x8(%rax), %xmm0
movsd %xmm0, -0x13930(%rbp)
cmpq $0x0, -0x13920(%rbp)
je 0xa7a3
movq -0x13920(%rbp), %rax
movsd (%rax), %xmm1
movq -0x13920(%rbp), %rax
mulsd 0x8(%rax), %xmm1
movsd -0x13930(%rbp), %xmm0
ucomisd %xmm1, %xmm0
jbe 0xa78f
movq -0x13920(%rbp), %rax
movsd (%rax), %xmm0
movq -0x13920(%rbp), %rax
mulsd 0x8(%rax), %xmm0
movsd %xmm0, -0x13930(%rbp)
movq -0x13920(%rbp), %rax
movq %rax, -0x13928(%rbp)
movq -0x13920(%rbp), %rax
movq 0x48(%rax), %rax
movq %rax, -0x13920(%rbp)
jmp 0xa733
movq -0x13908(%rbp), %rax
movsd (%rax), %xmm0
movq -0x13908(%rbp), %rax
mulsd 0x8(%rax), %xmm0
ucomisd -0x13930(%rbp), %xmm0
jbe 0xa7fd
movq -0x13928(%rbp), %rax
movq 0x48(%rax), %rax
movq %rax, -0x13920(%rbp)
movq -0x13928(%rbp), %rdi
movq -0x13908(%rbp), %rsi
callq 0xcc30
movq -0x13920(%rbp), %rcx
movq -0x13928(%rbp), %rax
movq %rcx, 0x48(%rax)
jmp 0xa7ff
jmp 0xa7ff
movq -0x138c0(%rbp), %rax
movq $0x0, 0x48(%rax)
movl $0x3e7, -0x138b4(%rbp)  # imm = 0x3E7
jmp 0xa297
movb $0x0, %al
callq 0xbf40
cmpq $0x0, %rax
jle 0xa842
movb $0x0, %al
callq 0xbf40
movq %rax, %rsi
leaq 0x26515(%rip), %rdi     # 0x30d50
movb $0x0, %al
callq 0x3200
movl $0x0, -0x2c(%rbp)
cmpl $0x3e8, -0x2c(%rbp)     # imm = 0x3E8
jge 0xa874
movslq -0x2c(%rbp), %rax
leaq -0x138b0(%rbp), %rdi
imulq $0x50, %rax, %rax
addq %rax, %rdi
callq 0xcbd0
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0xa849
cmpl $0x0, 0x2f8c5(%rip)     # 0x3a140
jle 0xa891
movl 0x2f8bd(%rip), %esi     # 0x3a140
leaq 0x26543(%rip), %rdi     # 0x30dcd
movb $0x0, %al
callq 0x3200
movq -0x138e0(%rbp), %rdi
leaq -0x17ff(%rip), %rsi     # 0x90a0
callq 0x34d0
movq -0x138e0(%rbp), %rdi
leaq -0x1772(%rip), %rsi     # 0x9140
callq 0x3650
cmpl $0x0, 0x2f882(%rip)     # 0x3a140
jle 0xa8c2
jmp 0xa8c2
movq -0x138e8(%rbp), %rdi
leaq -0x1830(%rip), %rsi     # 0x90a0
callq 0x34d0
movq -0x138e8(%rbp), %rdi
leaq -0x17a3(%rip), %rsi     # 0x9140
callq 0x3650
cmpl $0x0, 0x2f851(%rip)     # 0x3a140
je 0xa905
movl 0x2f849(%rip), %esi     # 0x3a140
leaq 0x26569(%rip), %rdi     # 0x30e67
movb $0x0, %al
callq 0x3200
movl $0x0, -0x138ec(%rbp)
cmpl $0xe, -0x138ec(%rbp)
jae 0xaa33
movq -0x18(%rbp), %rax
movl -0x138ec(%rbp), %ecx
shlq $0x6, %rcx
addq %rcx, %rax
movq %rax, -0x13938(%rbp)
movl -0x138ec(%rbp), %eax
movl %eax, %ecx
leaq 0x2eb9d(%rip), %rax     # 0x394e0
movq (%rax,%rcx,8), %rsi
movq -0x13938(%rbp), %rax
movq 0x20(%rax), %rdx
movq -0x13938(%rbp), %rax
movq 0x28(%rax), %rcx
movq -0x13938(%rbp), %rax
movq 0x20(%rax), %r8
movq -0x13938(%rbp), %rax
subq 0x28(%rax), %r8
movq -0x13938(%rbp), %rax
movq 0x30(%rax), %r9
movq -0x13938(%rbp), %rax
movq 0x28(%rax), %rax
movq -0x13938(%rbp), %rdi
subq 0x30(%rdi), %rax
leaq 0x2650e(%rip), %rdi     # 0x30ea9
movq %rax, (%rsp)
movb $0x0, %al
callq 0x3200
movq -0x13938(%rbp), %rax
movq 0x20(%rax), %rcx
movq -0x10(%rbp), %rax
addq 0x78(%rax), %rcx
movq %rcx, 0x78(%rax)
movq -0x13938(%rbp), %rax
movq 0x20(%rax), %rcx
movq -0x13938(%rbp), %rax
subq 0x28(%rax), %rcx
movq -0x10(%rbp), %rax
addq 0x80(%rax), %rcx
movq %rcx, 0x80(%rax)
movq -0x13938(%rbp), %rax
movq 0x28(%rax), %rcx
movq -0x10(%rbp), %rax
addq 0x88(%rax), %rcx
movq %rcx, 0x88(%rax)
movq -0x13938(%rbp), %rax
movq 0x30(%rax), %rcx
movq -0x10(%rbp), %rax
addq 0x90(%rax), %rcx
movq %rcx, 0x90(%rax)
movl -0x138ec(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x138ec(%rbp)
jmp 0xa90f
movq -0x10(%rbp), %rax
movq 0x88(%rax), %rsi
leaq 0x264c1(%rip), %rdi     # 0x30f06
movb $0x0, %al
callq 0x3200
movq -0x10(%rbp), %rax
movq 0x90(%rax), %rsi
leaq 0x264c1(%rip), %rdi     # 0x30f1f
movb $0x0, %al
callq 0x3200
movq -0x10(%rbp), %rax
movq 0x80(%rax), %rsi
leaq 0x264c1(%rip), %rdi     # 0x30f38
movb $0x0, %al
callq 0x3200
movq -0x10(%rbp), %rax
movq 0x78(%rax), %rsi
movq -0x10(%rbp), %rax
subq 0x90(%rax), %rsi
leaq 0x264bb(%rip), %rdi     # 0x30f53
movb $0x0, %al
callq 0x3200
addq $0x13950, %rsp          # imm = 0x13950
popq %rbp
retq
nopl (%rax,%rax)