LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O3/ke6jjj[P]r-dat/RDATEQDecoder.cc
// Function: RDATEQDecoder::RDATEQDecoder(float)
RDATEQDecoder::RDATEQDecoder(float sampleRate)
: mSyncWindowCurPos(0), mSyncWindowSyncPos(0),
  mClockDetected(false), mClockRatioThreshold(0.97),
  mClockAlpha(1.0 / 30.0)
{
  int i;
  
  //
  // Create a filter bank/window for the clock detector.
  //
  mSyncWindowSize = sampleRate / kSymbolRate;
  mSyncWindow = new float[mSyncWindowSize];
  mSyncWindowEvalPos = mSyncWindowSize / 2;
  mSyncWindowNextEvalPos = mSyncWindowEvalPos;
  
  for (i = 0; i < mSyncWindowSize; i++)
    mSyncWindow[i] = 0.0;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
leaq 0xc912(%rip), %rax      # 0xfae0
movq %rax, (%rdi)
movq $0x0, 0x1c(%rdi)
movb $0x0, 0x2c(%rdi)
movsd 0x60cb(%rip), %xmm1     # 0x92b0
divss 0x60e3(%rip), %xmm0     # 0x92d0
cvttss2si %xmm0, %ebp
movsd %xmm1, 0x30(%rdi)
movl %ebp, 0x18(%rdi)
movslq %ebp, %r14
leaq (,%r14,4), %rax
testl %r14d, %r14d
movq $-0x1, %rdi
cmovnsq %rax, %rdi
callq 0x2030
movl %r14d, %ecx
shrl $0x1f, %ecx
addl %ebp, %ecx
sarl %ecx
movq %rax, 0x10(%rbx)
movl %ecx, 0x24(%rbx)
movl %ecx, 0x28(%rbx)
testl %r14d, %r14d
jle 0x3244
movl %ebp, %edx
shlq $0x2, %rdx
movq %rax, %rdi
xorl %esi, %esi
popq %rbx
popq %r14
popq %rbp
jmp 0x20a0
popq %rbx
popq %r14
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/ke6jjj[P]r-dat/RDATEQDecoder.cc
// Function: RDATEQDecoder::Process(float*, unsigned long)
void
RDATEQDecoder::Process(float *samples, size_t count)
{
  size_t i;
  float signal;
  bool sign, zeroCross;
  
  for (i = 0; i < count; i++) {
    //
    // Look at the sample.
    //
    signal = samples[i];

    //
    // Send the baseband signal to the clock detector.
    // If it returns true, then the clock detector has
    // achieved a good lock and suggests sampling the
    // signal now.
    //
    if (ClockDetect(signal)) {
      //
      // Signal should be sampled now.
      //
      mDecoder->ReceiveSample(signal);
    }
  }
}

// Assembly:
testq %rdx, %rdx
je 0x32e6
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
xorl %r12d, %r12d
movss (%r14,%r12,4), %xmm0
movq %r15, %rdi
movss %xmm0, 0x4(%rsp)
callq 0x32e8
testb %al, %al
je 0x32d3
movq 0x8(%r15), %rdi
movq (%rdi), %rax
movss 0x4(%rsp), %xmm0
callq *0x10(%rax)
incq %r12
cmpq %r12, %rbx
jne 0x32ab
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/ke6jjj[P]r-dat/Track.cc
// Function: Track::AddBlock(DATBlock const&)
void
Track::AddBlock(const DATBlock& block)
{
  if (!BlockHeaderIsValid(block)) {
    //
    // Block doesn't have a valid header, but there might reason to
    // accept it.
    //
    if (mHaveLastBlock && block.Size() == 36) {
      if ((mLastBlockNumber >= 0    && mLastBlockNumber < 0x7f) ||
          (mLastBlockNumber >= 0x88 && mLastBlockNumber < 0x8f) ||
          (mLastBlockNumber >= 0x80 && mLastBlockNumber < 0x88)) {
        //
        // This block doesn't have a valid header but we've received blocks
        // before it that are ok and we're still expecting blocks in this
        // region. It is likely that this block simply has a bad header but
        // its byte payload is just fine. Let's interpret this block as being
        // the next block in the sequence.
        //
        AddGuessedBlock(mLastBlockNumber + 1, block);
        mLastBlockNumber++;
      }
    }
    return;
  }
  
  //
  // Block header checks out. Add the block data to the location
  // that it identifies itself as.
  //
  AddVerifiedBlock(block);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movq %rsi, %rdi
callq 0x2f88
cmpq $0x4, %rax
jae 0x34f7
cmpb $0x1, 0x25af(%rbx)
jne 0x34ef
movq %r14, %rdi
callq 0x2f88
cmpq $0x24, %rax
jne 0x34ef
movzbl 0x25b0(%rbx), %eax
cmpq $0x7f, %rax
setb %cl
leal 0x78(%rax), %edx
cmpb $0x7, %dl
setb %dl
orb %cl, %dl
jne 0x34d0
cmpq $0x7f, %rax
sete %cl
cmpb $-0x78, %al
setae %dl
orb %cl, %dl
jne 0x34ef
movb $0x0, 0x2520(%rbx,%rax)
incq %rax
movzbl %al, %esi
movq %rbx, %rdi
movq %r14, %rdx
callq 0x38f4
incb 0x25b0(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq %r14, %rdi
callq 0x2f94
movzwl 0x2(%rax), %edx
movzwl 0x4(%rax), %ecx
movl %ecx, %esi
orl %edx, %esi
movzwl 0x6(%rax), %eax
movl %eax, %edi
orw %si, %di
js 0x348e
xorl %edx, %ecx
xorl %eax, %ecx
movzbl %cl, %eax
testw %ax, %ax
jne 0x348e
movq %rbx, %rdi
movq %r14, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x354c
// File: /workspace/github_cpp_makefile_star2_O3/ke6jjj[P]r-dat/Track.cc
// Function: Track::DataFill(unsigned char, DATBlock const&)
void
Track::DataFill(uint8_t block_number, const DATBlock& block)
{
  //
  // Copy the bytes into our large block array while also marking
  // those bytes which are valid and invalid.
  //
  size_t count = block.Size();
  if (count < 4)
    return;

  count -= 4;

  if (count > 32)
    count = 32;
  
  const uint16_t *bytes = block.FlaggedBytes();
  for (size_t i = 0; i < count; i++) {
    mData[block_number][i] = bytes[i+4] & 0xff;
    mDataIsValid[block_number][i] = (bytes[i+4] & 0x8000) == 0;
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %r15
movl %esi, %ebp
movq %rdi, %rbx
movq %rdx, %rdi
callq 0x2f88
cmpq $0x4, %rax
jb 0x3961
movq %rax, %r14
movq %r15, %rdi
callq 0x2f94
addq $-0x4, %r14
je 0x3961
cmpq $0x20, %r14
movl $0x20, %ecx
cmovbq %r14, %rcx
movzbl %bpl, %edx
shll $0x5, %edx
addq %rbx, %rdx
addq $0x128f, %rdx           # imm = 0x128F
xorl %esi, %esi
movb 0x8(%rax,%rsi,2), %dil
movb %dil, -0x1200(%rdx,%rsi)
cmpw $0x0, 0x8(%rax,%rsi,2)
setns (%rdx,%rsi)
incq %rsi
cmpq %rsi, %rcx
jne 0x3942
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/ke6jjj[P]r-dat/AudioFrameReceiver.cc
// Function: AudioFrameReceiver::IsFrame(Track const&, Track const&)
bool
AudioFrameReceiver::IsFrame(const Track& A, const Track& B)
{
  //
  // We have a previous track. Are these two a pair or are they
  // separate?
  //
  const uint8_t *A_abstime;
  const uint8_t *B_abstime;
  bool A_good;
  bool B_good;
      
  //
  // Examine their absolute times. (Subcode 2).
  //
  A_good = A.GetSubcode(2, &A_abstime);
  B_good = B.GetSubcode(2, &B_abstime);

  //
  // These two tracks are look like a pair if they have the same, measurable
  // absolute time.
  //
  bool timeGood = A_good && B_good && (memcmp(A_abstime, B_abstime, 7) == 0);
  
  //
  // Finally, just make sure that neither track is in the wrong spot.
  //
  printf("Pair times good: %d\n", timeGood);
  printf("Pairs          : %d %d\n", A.GetHead(), B.GetHead());

  return timeGood
         && A.GetHead() != Track::HEAD_B
         && B.GetHead() != Track::HEAD_A;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdx, %rbx
movq %rsi, %r14
leaq 0x10(%rsp), %rdx
movq %rsi, %rdi
movl $0x2, %esi
callq 0x35ac
movl %eax, %ebp
leaq 0x8(%rsp), %rdx
movq %rbx, %rdi
movl $0x2, %esi
callq 0x35ac
testb %bpl, %bpl
je 0x3bbf
testb %al, %al
je 0x3bbf
movq 0x10(%rsp), %rax
movq 0x8(%rsp), %rcx
movl (%rax), %r12d
movl 0x3(%rax), %r13d
xorl (%rcx), %r12d
xorl 0x3(%rcx), %r13d
xorl %esi, %esi
movl %r12d, %eax
orl %r13d, %eax
sete %sil
leaq 0x6052(%rip), %rdi      # 0x9bcc
xorl %ebp, %ebp
xorl %eax, %eax
callq 0x2040
movq %r14, %rdi
callq 0x346e
movl %eax, %r15d
movq %rbx, %rdi
callq 0x346e
leaq 0x6044(%rip), %rdi      # 0x9be1
movl %r15d, %esi
movl %eax, %edx
xorl %eax, %eax
callq 0x2040
orl %r12d, %r13d
jne 0x3bf7
movq %r14, %rdi
callq 0x346e
cmpl $0x1, %eax
jne 0x3c08
xorl %ebp, %ebp
jmp 0x3bf7
leaq 0x6006(%rip), %rdi      # 0x9bcc
xorl %ebp, %ebp
xorl %esi, %esi
xorl %eax, %eax
callq 0x2040
movq %r14, %rdi
callq 0x346e
movl %eax, %r14d
movq %rbx, %rdi
callq 0x346e
leaq 0x5ff6(%rip), %rdi      # 0x9be1
movl %r14d, %esi
movl %eax, %edx
xorl %eax, %eax
callq 0x2040
movl %ebp, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rbx, %rdi
callq 0x346e
testl %eax, %eax
setne %bpl
jmp 0x3bf7
// File: /workspace/github_cpp_makefile_star2_O3/ke6jjj[P]r-dat/AudioFrameReceiver.cc
// Function: AudioFrameReceiver::SetDumpFile(char const*)
bool
AudioFrameReceiver::SetDumpFile(const char *path)
{
  mFile = fopen(path, "wb");
  mFramesWritten = 0;
  
  if (mFile != NULL) {
    uint8_t header_space[kWAVHeaderSize + kWAVFormatChunkHeaderSize +
                         kWAVDataChunkHeaderSize];
    memset(header_space, 0, sizeof(header_space));
    fwrite(header_space, sizeof(header_space), 1, mFile);
  }
  
  return mFile != NULL;
}

// Assembly:
pushq %rbx
subq $0x30, %rsp
movq %rsi, %rax
movq %rdi, %rbx
leaq 0x5656(%rip), %rsi      # 0x9f42
movq %rax, %rdi
callq 0x2120
movq %rax, 0x8(%rbx)
movq $0x0, 0x10(%rbx)
testq %rax, %rax
je 0x4932
xorps %xmm0, %xmm0
movq %rsp, %rdi
movups %xmm0, 0x1c(%rdi)
movaps %xmm0, 0x10(%rdi)
movaps %xmm0, (%rdi)
movl $0x2c, %esi
movl $0x1, %edx
movq %rax, %rcx
callq 0x21f0
cmpq $0x0, 0x8(%rbx)
setne %al
jmp 0x4934
xorl %eax, %eax
addq $0x30, %rsp
popq %rbx
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/ke6jjj[P]r-dat/DDSFrameReceiver.cc
// Function: DDSFrameReceiver::DumpGroup()
void
DDSFrameReceiver::DumpGroup()
{
  //
  // Perform ECC3 correction on the group. It's likely complete now.
  //
  bool correct = mBasicGroup->Correct();
  uint32_t group_id = mBasicGroup->BasicGroupID();
  printf("Group ECC3    : %s (Group %d)\n", correct ? "GOOD" : "----BAD---",
         group_id);
  printf("------------------------------------------------------------\n");
  
  //
  // Figure out what file name we should store this group's data under.
  //
  char *groupFilename, *validName, *eccName, *eccValidName;
  groupFilename = validName = eccName = eccValidName = NULL;
  GenerateGroupFilenames(group_id, groupFilename, validName, eccName,
    eccValidName);
  
  //
  // Dump the group data to disk.
  //
  mBasicGroup->DumpToFile(groupFilename, validName, eccName, eccValidName);

  free(groupFilename);
  free(validName);
  free(eccName);
  free(eccValidName);

  //
  // Mark that we now have no group.
  //
  mHaveGroup = false;
  delete mBasicGroup;
  mBasicGroup = NULL;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
movq 0x8(%rdi), %rdi
callq 0x6dc2
movl %eax, %r14d
movq 0x8(%rbx), %rdi
callq 0x6e70
movl %eax, %ebp
leaq 0x5521(%rip), %rax      # 0xa23c
leaq 0x551f(%rip), %rsi      # 0xa241
testb %r14b, %r14b
cmovneq %rax, %rsi
leaq 0x54ed(%rip), %rdi      # 0xa21d
xorl %r14d, %r14d
movl %ebp, %edx
xorl %eax, %eax
callq 0x2040
leaq 0x5545(%rip), %rdi      # 0xa288
callq 0x21b0
leaq 0x8(%rsp), %rax
movq %r14, (%rax)
movq %rax, %r9
leaq 0x10(%rsp), %r15
movq %r14, (%r15)
leaq 0x18(%rsp), %r12
movq %r14, (%r12)
leaq 0x20(%rsp), %r13
movq %r14, (%r13)
movq %rbx, %rdi
movl %ebp, %esi
movq %r13, %rdx
movq %r12, %rcx
movq %r15, %r8
movq %rax, %r14
callq 0x4f82
movq 0x8(%rbx), %rdi
movq (%r13), %rsi
movq (%r12), %rdx
movq (%r15), %rcx
movq (%r14), %r8
callq 0x6aec
movq (%r13), %rdi
callq 0x2130
movq (%r12), %rdi
callq 0x2130
movq (%r15), %rdi
callq 0x2130
movq (%r14), %rdi
callq 0x2130
movb $0x0, 0x10(%rbx)
movq 0x8(%rbx), %r14
testq %r14, %r14
je 0x4dd1
movq %r14, %rdi
callq 0x6922
movl $0x40a4c, %esi          # imm = 0x40A4C
movq %r14, %rdi
callq 0x20f0
movq $0x0, 0x8(%rbx)
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/ke6jjj[P]r-dat/DDSFrameReceiver.cc
// Function: DDSFrameReceiver::AddFrame(DDSGroup3&)
void
DDSFrameReceiver::AddFrame(DDSGroup3& frame)
{
  //
  // Is this a continuation of the last group or a new group?
  //
  if (mHaveGroup && mGroupNumber != frame.BasicGroupID()) {
    //
    // We have a basic group but this frame is outside of it.
    // Dump the current group.
    //
    DumpGroup();
  }
  
  //
  // Is this the start of a new group?
  //
  if (!mHaveGroup) {      
    //
    // Prepare a new group with this frame's group number.
    // This may also entail loading anything we currently know about this
    // group from a previous decoding process.
    //
    NewGroup(frame.BasicGroupID());
  }
  
  //
  // De-whiten the data into a G1 group.
  //
  DDSGroup1 g1(frame);
  
  //
  // Copy it into the basic group in the appropriate spot.
  //
  mBasicGroup->AddSubFrame(g1);
    
  //
  // If this was the last frame of the group, dump the group.
  //
  if (frame.IsLastLogicalFrame())
    DumpGroup();
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x2d08, %rsp           # imm = 0x2D08
movq %rsi, %r14
movq %rdi, %rbx
cmpb $0x1, 0x10(%rdi)
jne 0x4e26
movl 0x14(%rbx), %ebp
movq %r14, %rdi
callq 0x5032
cmpl %eax, %ebp
je 0x4e26
movq %rbx, %rdi
callq 0x4cec
cmpb $0x0, 0x10(%rbx)
jne 0x4e3e
movq %r14, %rdi
callq 0x5032
movq %rbx, %rdi
movl %eax, %esi
callq 0x4eae
leaq 0x8(%rsp), %r15
movq %r15, %rdi
movq %r14, %rsi
callq 0x6620
movq 0x8(%rbx), %rdi
movq %r15, %rsi
callq 0x6c74
movq %r14, %rdi
callq 0x503a
testb %al, %al
je 0x4e6e
movq %rbx, %rdi
callq 0x4cec
leaq 0x8(%rsp), %rdi
callq 0x66fa
addq $0x2d08, %rsp           # imm = 0x2D08
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x66fa
movq %rbx, %rdi
callq 0x21d0
nop
// File: /workspace/github_cpp_makefile_star2_O3/ke6jjj[P]r-dat/DDSFrameReceiver.cc
// Function: DDSFrameReceiver::GenerateGroupFilenames(unsigned int, char*&, char*&, char*&, char*&)
void
DDSFrameReceiver::GenerateGroupFilenames(uint32_t group_id,
  char*& groupFilename, char*& validName, char*& eccName, char*& eccValidName)
{
  asprintf(&groupFilename, "%s/g%06d.bin", mOutputDirectory, group_id);
  asprintf(&validName,     "%s/g%06d.val", mOutputDirectory, group_id);
  asprintf(&eccName,       "%s/g%06d.ecc.bin", mOutputDirectory, group_id);
  asprintf(&eccValidName,  "%s/g%06d.ecc.val", mOutputDirectory, group_id);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %r9, %rbx
movq %r8, %r15
movq %rcx, %r12
movq %rdx, %rax
movl %esi, %ebp
movq %rdi, %r14
movq 0x20(%rdi), %rdx
leaq 0x52a6(%rip), %rsi      # 0xa24c
movq %rax, %rdi
movl %ebp, %ecx
xorl %eax, %eax
callq 0x2080
movq 0x20(%r14), %rdx
leaq 0x529c(%rip), %rsi      # 0xa259
movq %r12, %rdi
movl %ebp, %ecx
xorl %eax, %eax
callq 0x2080
movq 0x20(%r14), %rdx
leaq 0x5292(%rip), %rsi      # 0xa266
movq %r15, %rdi
movl %ebp, %ecx
xorl %eax, %eax
callq 0x2080
movq 0x20(%r14), %rdx
leaq 0x528c(%rip), %rsi      # 0xa277
movq %rbx, %rdi
movl %ebp, %ecx
xorl %eax, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x2080
nop
// File: /workspace/github_cpp_makefile_star2_O3/ke6jjj[P]r-dat/DDSGroup3.cc
// Function: DDSGroup3::DecodeFrame(Track const&, Track const&)
DDSGroup3::DecodeError
DDSGroup3::DecodeFrame(const Track& A, const Track& B)
{
  //
  // Retrieve the items from subcode id #3 from both tracks.
  // 
  const uint8_t *a_subcode, *b_subcode;
  
  if (!A.GetSubcode(3, &a_subcode))
    return A_MISSING_SUBCODE_3;
  if (!B.GetSubcode(3, &b_subcode))
    return B_MISSING_SUBCODE_3;
  
  //
  // Every track should have a valid subcode pack 3. Let's fetch it from
  // both tracks and make certain they match. (This may be redundant as
  // the frame pairing protocol is supposed to have checked this earlier).
  //
  DDSSubcodePack3 a3, b3;
  a3.Decode(a_subcode);
  b3.Decode(b_subcode);
    
  //
  // Assert that both tracks contain the same absolute frame number.
  //
  if (a3.mAbsoluteFrameID != b3.mAbsoluteFrameID)
    return ABSOLUTE_FRAME_MISMATCH;
    
  //
  // Record frame numbers and such.
  //
  mPartitionID = PartitionID(a3.mPartitionID);
  mAreaID   = AreaID(a3.mAreaID);
  mAbsoluteFrameID = a3.mAbsoluteFrameID;

  //
  // Fetch additional items, depending on the Area of the tape
  // we're supposedly in.
  //
  switch (mAreaID) {
  case DEVICE_AREA:
  case REFERENCE_AREA:
  case SYSTEM_AREA:
  case EOD_AREA:
    //
    // Not handling these areas yet.
    //
    return DECODE_OK;
  case DATA_AREA:
    //
    // Data area frames also have data, which we should check and store.
    //
    // Assert that both tracks of this famre also agree on their logical
    // frame number (this frame's position within the larger Basic Group).
    //
    if (a3.mLogicalFrameID != b3.mLogicalFrameID)
      return LOGICAL_FRAME_MISMATCH;
    
    return HandleDataAreaFrame(a3, A, B);
    break;
  default:
    return UNKNOWN_AREA_ID;
  }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x30, %rsp
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
leaq 0x18(%rsp), %rdx
movq %rsi, %rdi
movl $0x3, %esi
callq 0x35ac
movl %eax, %ecx
movl $0x1, %eax
testb %cl, %cl
je 0x5132
leaq 0x10(%rsp), %rdx
movq %rbx, %rdi
movl $0x3, %esi
callq 0x35ac
movl %eax, %ecx
movl $0x2, %eax
testb %cl, %cl
je 0x5132
xorl %eax, %eax
movq %rsp, %r12
movb %al, (%r12)
leaq 0x20(%rsp), %r13
movb %al, (%r13)
movq 0x18(%rsp), %rsi
movq %r12, %rdi
callq 0x6568
movq 0x10(%rsp), %rsi
movq %r13, %rdi
callq 0x6568
movl 0x4(%r12), %edx
movl $0x6, %eax
cmpl 0x4(%r13), %edx
jne 0x5132
movzbl 0x1(%rsp), %eax
movl %eax, 0x4(%r15)
movzbl 0x2(%rsp), %ecx
movl %ecx, (%r15)
movl %edx, 0x8(%r15)
cmpl $0x3, %ecx
jae 0x50fc
xorl %eax, %eax
jmp 0x5132
movl $0x0, %eax
cmpl $0x5, %ecx
je 0x5132
cmpl $0x4, %ecx
jne 0x512d
movb 0xa(%rsp), %cl
movl $0x7, %eax
cmpb 0x2a(%rsp), %cl
jne 0x5132
movq %rsp, %rsi
movq %r15, %rdi
movq %r14, %rdx
movq %rbx, %rcx
callq 0x5140
jmp 0x5132
movl $0x8, %eax
addq $0x30, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/ke6jjj[P]r-dat/ECC_C1.cc
// Function: ECC_C1::ComputeSyndrome(unsigned char (&) [4])
bool
ECC_C1::ComputeSyndrome(uint8_t (&syndrome)[ECC_C1::kTwoT])
{
  //
  // Multiply the filled in vector by the check matrix to produce a
  // result vector.
  //
  bool ok = true;
  for (size_t i = 0; i < kTwoT; i++) {
    uint8_t result = 0;
    for (size_t j = 0; j < kN; j++) {
      result ^= ECC_GF28_multiply(mData[j], gHp[i][j]);
    }

    syndrome[i] = result;

    //
    // Everything is ok if all previous entries are zero and this
    // entry is zero.
    //
    ok = ok && result == 0;
  }

  return ok;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, (%rsp)
movq %rdi, %r14
movb $0x1, %bpl
leaq 0x50a2(%rip), %r15      # 0xa400
xorl %r12d, %r12d
xorl %r13d, %r13d
xorl %ecx, %ecx
movl %ecx, %ebx
movzbl (%r14,%r13), %edi
movzbl (%r15,%r13), %esi
callq 0x5b5c
movl %eax, %ecx
xorb %bl, %cl
incq %r13
cmpq $0x20, %r13
jne 0x5366
movq (%rsp), %rdx
movb %cl, (%rdx,%r12)
cmpb %bl, %al
sete %al
andb %al, %bpl
incq %r12
addq $0x20, %r15
cmpq $0x4, %r12
jne 0x5361
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/ke6jjj[P]r-dat/./ReedSolomon_EUA.h
// Function: unsigned char poly_evaluate<4ul>(unsigned char const (&) [4ul], unsigned char)
uint8_t
poly_evaluate(const uint8_t (&in)[n], uint8_t x)
{
  uint8_t y = x;
  uint8_t r = in[0];
  
  for (size_t i = 1; i < n; i++) {
    r ^= ECC_GF28_multiply(in[i], y);
    y = ECC_GF28_multiply(y, x);
  }
  
  return r;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %esi, %eax
movq %rdi, %rbx
movb (%rdi), %bpl
movl $0x1, %r12d
movzbl %al, %r14d
movzbl (%rbx,%r12), %edi
movzbl %al, %r15d
movl %r15d, %esi
callq 0x5b5c
xorb %al, %bpl
movl %r15d, %edi
movl %r14d, %esi
callq 0x5b5c
incq %r12
cmpq $0x4, %r12
jne 0x58dc
movl %ebp, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/ke6jjj[P]r-dat/ECC_GF28.cc
// Function: ECC_GF28_multiply(unsigned char, unsigned char)
uint8_t
ECC_GF28_multiply(uint8_t a, uint8_t b)
{
  if (a == 0 || b == 0)
    return 0;

  if (a == 1)
    return b;

  if (b == 1)
    return a;
  
  //
  // Use the discrete logarithm table to make multiplicaton an O(1)
  // operation.
  //
  return kPowAlpha[(kLogAlpha[a] + kLogAlpha[b]) % 255];
}

// Assembly:
testl %edi, %edi
sete %cl
testl %esi, %esi
sete %dl
orb %cl, %dl
je 0x5b6d
xorl %eax, %eax
retq
movl %esi, %eax
cmpb $0x1, %dil
je 0x5b6c
cmpb $0x1, %al
jne 0x5b7c
movl %edi, %eax
retq
movzbl %dil, %ecx
leaq 0x4a29(%rip), %rdx      # 0xa5b0
movzbl (%rcx,%rdx), %ecx
movzbl %al, %eax
movzbl (%rax,%rdx), %eax
addl %ecx, %eax
imull $0x203, %eax, %ecx      # imm = 0x203
shrl $0x11, %ecx
movl %ecx, %edx
shll $0x8, %edx
subl %edx, %ecx
addl %eax, %ecx
movzwl %cx, %eax
leaq 0x4900(%rip), %rcx      # 0xa4b0
movb (%rax,%rcx), %al
retq
// File: /workspace/github_cpp_makefile_star2_O3/ke6jjj[P]r-dat/ECC_GF28.cc
// Function: ECC_GF28_evaluate(unsigned char const*, unsigned char, unsigned long)
uint8_t
ECC_GF28_evaluate(const uint8_t p[], uint8_t x, size_t n)
{
  uint8_t y = 1;
  uint8_t res = 0;
  
  for (size_t i = 0; i < n; i++) {
    res ^= ECC_GF28_multiply(p[i], y);
    y = ECC_GF28_multiply(y, x);
  }
  
  return res;
}

// Assembly:
testq %rdx, %rdx
je 0x5cba
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
movzbl %sil, %ecx
movb $0x1, %r11b
xorl %r8d, %r8d
leaq 0x49cf(%rip), %r9       # 0xa5b0
leaq 0x48c8(%rip), %r10      # 0xa4b0
xorl %eax, %eax
movzbl (%rdi,%r8), %r14d
testq %r14, %r14
sete %bl
testb %r11b, %r11b
sete %bpl
orb %bl, %bpl
je 0x5c05
xorl %ebx, %ebx
jmp 0x5c46
movl %r11d, %ebx
cmpb $0x1, %r14b
je 0x5c46
movl %esi, %ebp
cmpb $0x1, %r11b
je 0x5ca1
movzbl (%r14,%r9), %ebx
movzbl %r11b, %r14d
movzbl (%r14,%r9), %ebp
addl %ebx, %ebp
imull $0x203, %ebp, %ebx      # imm = 0x203
shrl $0x11, %ebx
movl %ebx, %r14d
shll $0x8, %r14d
subl %r14d, %ebx
addl %ebp, %ebx
movzwl %bx, %ebx
movb (%rbx,%r10), %bl
xorl %ebp, %ebp
testb %sil, %sil
je 0x5c9e
testb %r11b, %r11b
je 0x5c9e
cmpb $0x1, %sil
sete %r14b
cmpb $0x1, %r11b
sete %r15b
movzbl %r11b, %r11d
movl %r11d, %ebp
cmovel %ecx, %ebp
orb %r14b, %r15b
jne 0x5c9e
movzbl (%r11,%r9), %r11d
movzbl (%rcx,%r9), %ebp
addl %r11d, %ebp
imull $0x203, %ebp, %r11d     # imm = 0x203
shrl $0x11, %r11d
movl %r11d, %r14d
shll $0x8, %r14d
subl %r14d, %r11d
addl %ebp, %r11d
movzwl %r11w, %r11d
movb (%r11,%r10), %bpl
movl %ebx, %r14d
xorb %r14b, %al
incq %r8
movl %ebp, %r11d
cmpq %r8, %rdx
jne 0x5bea
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
xorl %eax, %eax
retq
// File: /workspace/github_cpp_makefile_star2_O3/ke6jjj[P]r-dat/ECC_C2.cc
// Function: ECC_C2::ComputeSyndrome(unsigned char*)
bool
ECC_C2::ComputeSyndrome(uint8_t syndrome[ECC_C2::kTwoT])
{
  //
  // Multiply the filled in vector by the check matrix to produce a
  // result vector.
  //
  bool ok = true;
  for (size_t i = 0; i < kTwoT; i++) {
    uint8_t result = 0;
    for (size_t j = 0; j < kN; j++) {
      result ^= ECC_GF28_multiply(mData[j], gHq[i][j]);
    }

    syndrome[i] = result;

    //
    // Everything is ok if all previous entries are zero and this
    // entry is zero.
    //
    ok = ok && result == 0;
  }

  return ok;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, (%rsp)
movq %rdi, %r14
movb $0x1, %bpl
leaq 0x4a8a(%rip), %r15      # 0xa7c0
xorl %r12d, %r12d
xorl %r13d, %r13d
xorl %ecx, %ecx
movl %ecx, %ebx
movzbl (%r14,%r13), %edi
movzbl (%r15,%r13), %esi
callq 0x5b5c
movl %eax, %ecx
xorb %bl, %cl
incq %r13
cmpq $0x20, %r13
jne 0x5d3e
movq (%rsp), %rdx
movb %cl, (%rdx,%r12)
cmpb %bl, %al
sete %al
andb %al, %bpl
incq %r12
addq $0x20, %r15
cmpq $0x6, %r12
jne 0x5d39
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/ke6jjj[P]r-dat/DDSGroup1.cc
// Function: DDSGroup1::DDSGroup1(DDSGroup3&)
DDSGroup1::DDSGroup1(DDSGroup3& g3)
  : mBasicGroupID(g3.BasicGroupID()), mSubFrameID(g3.LogicalFrameID()),
    mIsECCFrame(g3.IsECC3Frame()), mIsLastFrame(g3.IsLastLogicalFrame())
{
  //
  // The data in the G3 is a G2 group wrapper with a header row. The G2
  // group is a G1 group with a data whitening LFSR stream added to it.
  // We need to remove that whitening as we write the data out.
  //
  
  //
  // Fetch a pointer to the data and validity arrays of the G3 frame.
  //
  const DATFrame::DataArray& data = g3.Frame().Data();
  const DATFrame::ValidityArray& valid = g3.Frame().Valid();
  
  uint16_t lfsr = 1;
  
  for (size_t i = 1; i < DATFrame::kUserDataRows; i++) {
    for (size_t j = 0; j < DATFrame::kBytesPerRow; j++) {
      //
      // Look up the data.
      //
      uint8_t byte = data[i][j];
      
      //
      // Dewhiten it.
      //
      byte ^= (lfsr & 0xff);
      
      //
      // Store it in our array.
      //
      mData[(i - 1) * 4 + j] = byte;
      mDataIsValid[(i - 1) * 4 + j] = valid[i][j];
       
      //
      // Crank the LFSR.
      //
      lfsr = (((uint16_t)(G2LFSR[lfsr & 0x1ff])) << 7) | ((lfsr >> 8) & 0xff);
    }
  }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r15
movq %rdi, %rbx
movq %rsi, %rdi
callq 0x5032
movl %eax, 0x2cf8(%rbx)
movq %r15, %rdi
callq 0x5036
movb %al, 0x2cfc(%rbx)
movq %r15, %rdi
callq 0x503a
movb %al, 0x2cfd(%rbx)
movq %r15, %rdi
callq 0x503e
movb %al, 0x2cfe(%rbx)
movq %r15, %rdi
callq 0x5020
movq %rax, %rdi
callq 0x5b20
movq %rax, %r14
movq %r15, %rdi
callq 0x5020
movq %rax, %rdi
callq 0x5b24
addq $0x4, %r14
addq $0x4, %rax
movl $0x1, %ecx
movw $0x1, %dx
leaq 0x4222(%rip), %rsi      # 0xa8c0
xorl %edi, %edi
movzwl %dx, %edx
movb (%r14,%rdi), %r8b
xorb %dl, %r8b
movb %r8b, (%rbx,%rdi)
movb (%rax,%rdi), %r8b
movb %r8b, 0x167c(%rbx,%rdi)
movl %edx, %r8d
andl $0x1ff, %r8d            # imm = 0x1FF
movzbl (%r8,%rsi), %r8d
shll $0x7, %r8d
shrl $0x8, %edx
orl %r8d, %edx
incq %rdi
cmpq $0x4, %rdi
jne 0x66a0
incq %rcx
addq $0x4, %r14
addq $0x4, %rax
addq $0x4, %rbx
cmpq $0x5a0, %rcx            # imm = 0x5A0
jne 0x669e
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/ke6jjj[P]r-dat/File.cc
// Function: File::Open(char const*, unsigned long)
bool
File::Open(const char *path, size_t quanta)
{
  mFd = ::open(path, O_RDONLY);
  if (mFd == -1)
    return false;

  mOpen = true;
  Reset(quanta);

  return true;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rdx, %r14
movq %rdi, %rbx
movq %rsi, %rdi
xorl %esi, %esi
xorl %eax, %eax
callq 0x20b0
movl %eax, %ebp
movl %eax, 0x4(%rbx)
cmpl $-0x1, %eax
je 0x67bf
movb $0x1, (%rbx)
movq 0x8(%rbx), %rdi
movl $0x1, %esi
callq 0x20f0
movq %r14, 0x10(%rbx)
movq %r14, %rdi
callq 0x2030
movq %rax, 0x8(%rbx)
movq $0x0, 0x18(%rbx)
cmpl $-0x1, %ebp
setne %al
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/ke6jjj[P]r-dat/File.cc
// Function: File::Reset(unsigned long)
void
File::Reset(size_t quanta)
{
  delete mResidual;
  mQuanta = quanta;
  mResidual = new char[mQuanta];
  mResidualCount = 0;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movq 0x8(%rdi), %rdi
movl $0x1, %esi
callq 0x20f0
movq %rbx, 0x10(%r14)
movq %rbx, %rdi
callq 0x2030
movq %rax, 0x8(%r14)
movq $0x0, 0x18(%r14)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O3/ke6jjj[P]r-dat/File.cc
// Function: File::Open(int, unsigned long)
bool
File::Open(int fd, size_t quanta)
{
  mFd = fd;
  if (mFd == -1)
    return false;

  mOpen = true;
  Reset(quanta);

  return true;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movl %esi, %ebx
movl %esi, 0x4(%rdi)
cmpl $-0x1, %esi
je 0x6840
movq %rdx, %r15
movq %rdi, %r14
movb $0x1, (%rdi)
movq 0x8(%rdi), %rdi
movl $0x1, %esi
callq 0x20f0
movq %r15, 0x10(%r14)
movq %r15, %rdi
callq 0x2030
movq %rax, 0x8(%r14)
movq $0x0, 0x18(%r14)
cmpl $-0x1, %ebx
setne %al
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/ke6jjj[P]r-dat/File.cc
// Function: File::Read(void*, unsigned long)
size_t
File::Read(void *buf, size_t count)
{
  char *cbuf = (char *) buf;

  if (!mOpen)
    return 0;

  if (count == 0)
    return 0;
  
  size_t total = count * mQuanta;

  //
  // Copy in any residual data first.
  //
  if (mResidualCount > 0) {
    memcpy(cbuf, mResidual, mResidualCount);
    total -= mResidualCount;
  }

  size_t pos = mResidualCount;

  while (total > 0) {
    int nread = ::read(mFd, &cbuf[pos], total);
    if (nread == -1 || nread == 0) {
      //
      // Some sort of error occurred. Probably a signal.
      //
      break;
    }
    total -= nread;
    pos += nread;
  }

  //
  // Is there any residual data?
  //
  size_t residue = pos % mQuanta;
  if (residue != 0) {
    memcpy(mResidual, &cbuf[pos - residue], residue);
    pos -= residue;
  }

  mResidualCount = residue;

  return pos / mQuanta;
}

// Assembly:
xorl %eax, %eax
testq %rdx, %rdx
je 0x6901
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
cmpb $0x0, (%rdi)
je 0x68f6
movq %rdx, %r15
movq %rsi, %r14
imulq 0x10(%rbx), %r15
movq 0x18(%rbx), %rdx
testq %rdx, %rdx
je 0x6894
movq 0x8(%rbx), %rsi
movq %r14, %rdi
callq 0x20c0
movq 0x18(%rbx), %rcx
subq %rcx, %r15
jmp 0x6896
xorl %ecx, %ecx
movq %rcx, %r12
testq %r15, %r15
je 0x68bd
movl 0x4(%rbx), %edi
leaq (%r14,%r12), %rsi
movq %r15, %rdx
callq 0x2190
movslq %eax, %rcx
incl %eax
subq %rcx, %r15
addq %r12, %rcx
cmpl $0x1, %eax
ja 0x6896
movq 0x10(%rbx), %rcx
movq %r12, %rax
xorl %edx, %edx
divq %rcx
movq %rdx, %r15
testq %rdx, %rdx
je 0x68ea
movq 0x8(%rbx), %rdi
subq %r15, %r12
addq %r12, %r14
movq %r14, %rsi
movq %r15, %rdx
callq 0x20c0
movq 0x10(%rbx), %rcx
movq %r15, 0x18(%rbx)
movq %r12, %rax
xorl %edx, %edx
divq %rcx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/ke6jjj[P]r-dat/BasicGroup.cc
// Function: BasicGroup::Correct()
bool
BasicGroup::Correct()
{
  ECC_C3 C3;
  size_t uncorrectableErrors = 0;
  
  for (ECCFill_C3 c3_fill(*this); !c3_fill.End(); c3_fill.Next()) {
    //
    // Fill the error check vector.
    //      
    C3.Fill(c3_fill);

    //
    // Detect errors in this vector and correct them.
    //
    ECC_C3::Status ok = C3.Correct();
    switch (ok) {
    case ECC_C3::NO_ERRORS:
      //
      // No errors. Nothing to be done.
      //
      break;
    case ECC_C3::CORRECTED:
      //
      // There were errors but they were corrected.
      // Put the corrected data back into the track.
      //
      C3.Dump(c3_fill);
      break;
    case ECC_C3::UNCORRECTABLE:
      //
      // Slice was uncorrectable. Leave it as is.
      //
      uncorrectableErrors++;
      break;
    }
  }
  
  return uncorrectableErrors == 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0xa0, %rsp
movq %rdi, %rbx
leaq 0xc(%rsp), %rdi
callq 0x7010
leaq 0x68(%rsp), %rdi
movq %rbx, %rsi
callq 0x6eb0
xorl %r15d, %r15d
leaq 0x68(%rsp), %rbx
leaq 0xc(%rsp), %r14
movq %rbx, %rdi
callq 0x6f5e
testb %al, %al
jne 0x6e38
movq %r14, %rdi
movq %rbx, %rsi
callq 0x7014
movq %r14, %rdi
callq 0x70e8
cmpl $0x1, %eax
je 0x6e23
cmpl $0x2, %eax
jne 0x6e2e
incq %r15
jmp 0x6e2e
movq %r14, %rdi
movq %rbx, %rsi
callq 0x72e4
movq %rbx, %rdi
callq 0x6f0c
jmp 0x6df5
testq %r15, %r15
sete %bl
leaq 0xc(%rsp), %rdi
callq 0x7012
movl %ebx, %eax
addq $0xa0, %rsp
popq %rbx
popq %r14
popq %r15
retq
jmp 0x6e5b
jmp 0x6e5b
movq %rax, %rbx
leaq 0xc(%rsp), %rdi
callq 0x7012
movq %rbx, %rdi
callq 0x21d0
// File: /workspace/github_cpp_makefile_star2_O3/ke6jjj[P]r-dat/ECCFill_C3.cc
// Function: ECCFill_C3::Data(unsigned long)
uint8_t&
ECCFill_C3::Data(size_t position)
{
  bool isECC;
  const size_t offset = compute_offset(position, mByteSlice, mTrackPair,
    mInterleaveSet, isECC);
  
  if (!isECC)
    return mData[offset];
  else
    return mECCData[offset];
}

// Assembly:
movl 0x28(%rdi), %eax
movl 0x2c(%rdi), %edx
movl 0x30(%rdi), %ecx
shll $0x3, %eax
testb $0x1, %sil
jne 0x6f84
leal (%rax,%rdx,2), %eax
addl $0x2, %eax
jmp 0x6f8a
leal (%rdx,%rdx,2), %edx
leal (%rax,%rdx,2), %eax
shrq %rsi
imulq $0x167c, %rsi, %rdx     # imm = 0x167C
xorl %r8d, %r8d
cmpq $0x16, %rsi
cmovneq %rdx, %r8
addl %ecx, %eax
addq %r8, %rax
movq 0x18(%rdi), %rcx
addq %rax, %rcx
addq 0x8(%rdi), %rax
cmpq $0x16, %rsi
cmoveq %rcx, %rax
retq
// File: /workspace/github_cpp_makefile_star2_O3/ke6jjj[P]r-dat/ECCFill_C3.cc
// Function: ECCFill_C3::Valid(unsigned long)
bool&
ECCFill_C3::Valid(size_t position)
{
  bool isECC;
  const size_t offset = compute_offset(position, mByteSlice, mTrackPair,
    mInterleaveSet, isECC);

  if (!isECC)
    return mDataIsValid[offset];
  else
    return mECCDataIsValid[offset];
}

// Assembly:
movl 0x28(%rdi), %eax
movl 0x2c(%rdi), %edx
movl 0x30(%rdi), %ecx
shll $0x3, %eax
testb $0x1, %sil
jne 0x6fd2
leal (%rax,%rdx,2), %eax
addl $0x2, %eax
jmp 0x6fd8
leal (%rdx,%rdx,2), %edx
leal (%rax,%rdx,2), %eax
shrq %rsi
imulq $0x167c, %rsi, %rdx     # imm = 0x167C
xorl %r8d, %r8d
cmpq $0x16, %rsi
cmovneq %rdx, %r8
addl %ecx, %eax
addq %r8, %rax
movq 0x20(%rdi), %rcx
addq %rax, %rcx
addq 0x10(%rdi), %rax
cmpq $0x16, %rsi
cmoveq %rcx, %rax
retq
// File: /workspace/github_cpp_makefile_star2_O3/ke6jjj[P]r-dat/ECC_C3.cc
// Function: ECC_C3::ComputeSyndrome(unsigned char*)
bool
ECC_C3::ComputeSyndrome(uint8_t syndrome[ECC_C3::kTwoT])
{
  //
  // Multiply the filled in vector by the check matrix to produce a
  // result vector.
  //
  bool ok = true;
  for (size_t i = 0; i < kTwoT; i++) {
    uint8_t result = 0;
    for (size_t j = 0; j < kN; j++) {
      result ^= ECC_GF28_multiply(mData[j], gHi[i][j]);
    }

    syndrome[i] = result;

    //
    // Everything is ok if all previous entries are zero and this
    // entry is zero.
    //
    ok = ok && result == 0;
  }

  return ok;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, 0x8(%rsp)
movq %rdi, %r14
movb $0x1, %al
xorl %ecx, %ecx
leaq 0x3af9(%rip), %r12      # 0xab70
movb $0x1, %bpl
movl %eax, 0x4(%rsp)
movq %rcx, 0x10(%rsp)
imulq $0x2e, %rcx, %rbx
xorl %r15d, %r15d
xorl %ecx, %ecx
movl %ecx, %r13d
movzbl (%r14,%r15), %edi
leaq (%rbx,%r15), %rax
movzbl (%r12,%rax), %esi
callq 0x5b5c
movl %eax, %ecx
xorb %r13b, %cl
incq %r15
cmpq $0x2e, %r15
jne 0x708c
movq 0x8(%rsp), %rdx
movq 0x10(%rsp), %rsi
movb %cl, (%rdx,%rsi)
cmpb %r13b, %al
sete %al
andb %al, %bpl
movl $0x1, %ecx
testb $0x1, 0x4(%rsp)
movl $0x0, %eax
jne 0x707a
movl %ebp, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/ke6jjj[P]r-dat/XDR.cc
// Function: XDR::AddString(char const*, unsigned long)
bool
XDR::AddString(const char *str, size_t len)
{
  if (!SizeCheck(len))
    return false;
  
  memcpy(&mData[mPosition], str, len);
  mPosition += len;
  
  return true;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %r14
movq (%rdi), %r15
movq 0x8(%rdi), %rdi
leaq (%rdi,%rdx), %r12
cmpq %r15, %r12
ja 0x76ad
movq %rdx, %rbx
addq 0x10(%r14), %rdi
callq 0x20c0
addq %rbx, 0x8(%r14)
cmpq %r15, %r12
setbe %al
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/ke6jjj[P]r-dat/TimeCode.cc
// Function: TimeCode::TimeCode(unsigned char const*)
TimeCode::TimeCode(const uint8_t *item)
{
  uint8_t pno1 = item[0] & 0x7;
  uint8_t pno23 = item[1];
  
  //
  // Process the program number bits. Certain patterns are
  // special.
  //
  switch (pno23) {
  case 0xaa:
    mProgramId = PROGRAM_NOT_VALID;
    break;
  case 0xbb:
    mProgramId = PROGRAM_LEAD_IN;
    break;
  case 0xee:
    mProgramId = PROGRAM_LEAD_OUT;
    break;
  default:
    mProgramId = ((uint16_t) BCDDecode(pno23)) + 100 * pno1;
    break;
  }
  
  //
  // Process the index id bits.
  //
  uint8_t index_id = item[2];
  if (index_id == 0xaa)
    mIndexId = INDEX_NOT_VALID;
  else
    mIndexId = BCDDecode(item[2]);
  
  mHour = BCDDecode(item[3]);
  mMinute = BCDDecode(item[4]);
  mSecond = BCDDecode(item[5]);
  mFrame = BCDDecode(item[6]);
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
movzbl 0x1(%rsi), %eax
cmpl $0xaa, %eax
je 0x7827
cmpl $0xee, %eax
je 0x7821
cmpl $0xbb, %eax
jne 0x782d
movw $0x80bb, %ax            # imm = 0x80BB
jmp 0x7844
movw $0x80ee, %ax            # imm = 0x80EE
jmp 0x7844
movw $0x80aa, %ax            # imm = 0x80AA
jmp 0x7844
movzbl (%r14), %ebp
andl $0x7, %ebp
movzwl %ax, %edi
callq 0x7978
movzbl %al, %ecx
imull $0x64, %ebp, %eax
addl %ecx, %eax
movw %ax, (%rbx)
movzbl 0x2(%r14), %eax
movzwl %ax, %edi
movb $-0x56, %al
cmpl $0xaa, %edi
je 0x785e
callq 0x7978
movb %al, 0x2(%rbx)
movzbl 0x3(%r14), %edi
callq 0x7978
movb %al, 0x3(%rbx)
movzbl 0x4(%r14), %edi
callq 0x7978
movb %al, 0x4(%rbx)
movzbl 0x5(%r14), %edi
callq 0x7978
movb %al, 0x5(%rbx)
movzbl 0x6(%r14), %edi
callq 0x7978
movb %al, 0x6(%rbx)
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/ke6jjj[P]r-dat/TimeCode.cc
// Function: TimeCode::TimeCode(unsigned int)
TimeCode::TimeCode(uint32_t absoluteFrame)
  : mIndexId(INDEX_NOT_VALID), mProgramId(PROGRAM_NOT_VALID)
{
  //
  // There are 120000 frames an hour.
  //
  mHour = absoluteFrame / 120000;
  absoluteFrame %= 120000;
  
  //
  // There are 2000 frames every minute.
  //
  mMinute = absoluteFrame / 2000;
  absoluteFrame %= 2000;
  
  //
  // There are 100 frames every three seconds.
  //
  uint8_t second = (absoluteFrame / 100) * 3;
  absoluteFrame %= 100;
  second += absoluteFrame / 33;
  uint8_t frame = absoluteFrame % 33;
  second -= absoluteFrame / 99;
  frame += (absoluteFrame / 99) * 33;
  mSecond = second;
  mFrame = frame;
}

// Assembly:
movl %esi, %eax
imulq $0x45e7b273, %rax, %rax # imm = 0x45E7B273
shrq $0x2f, %rax
imull $0x1d4c0, %eax, %ecx    # imm = 0x1D4C0
subl %ecx, %esi
imulq $0x20c49c, %rsi, %rcx   # imm = 0x20C49C
shrq $0x20, %rcx
imull $0x7d0, %ecx, %edx      # imm = 0x7D0
subl %edx, %esi
imull $0x51f, %esi, %edx      # imm = 0x51F
shrl $0x11, %edx
leal (%rdx,%rdx,2), %r8d
imull $0x64, %edx, %edx
subl %edx, %esi
imull $0x7d, %esi, %edx
movzwl %dx, %edx
shrl $0xc, %edx
addl %edx, %r8d
cmpw $0x63, %si
adcb $-0x1, %r8b
xorl %r9d, %r9d
cmpw $0x63, %si
movw $0x80aa, (%rdi)         # imm = 0x80AA
movb $-0x56, 0x2(%rdi)
movb %al, 0x3(%rdi)
movl $0x21, %eax
cmovbl %r9d, %eax
movb %cl, 0x4(%rdi)
movl %edx, %ecx
shll $0x5, %ecx
orl %edx, %ecx
subb %cl, %sil
addb %sil, %al
movb %r8b, 0x5(%rdi)
movb %al, 0x6(%rdi)
retq
// File: /workspace/github_cpp_makefile_star2_O3/ke6jjj[P]r-dat/DifferentialClockDetector.cc
// Function: DifferentialClockDetector::EvaluateClock()
void
DifferentialClockDetector::EvaluateClock()
{
  int i, maxI, minI;
  float max, min, ratio;

  for (max = min = mWindow[0], i = 1, maxI = 0; i < mWindowSize; i++)
  {
    //
    // Find the highest peak.
    //
    if (mWindow[i] > max) {
      max = mWindow[i];
      maxI = i;
    }
    //
    // And the lowest valley.
    //
    if (mWindow[i] < min)
      min = mWindow[i];
  }
  
  if (maxI != mMaximumDiffPos) {
    //
    // We've found a new maximum differential position.
    // In the future we might calculate clock error here.
    //
    mMaximumDiffPos = maxI;

    //
    // Queue up the next firing position.
    //
    mNextSyncPos = FirePosition(mMaximumDiffPos, mWindowSize);
  }
  
  //
  // If there is a significant difference between the highest
  // peak and the lowest valley then we have a good clock signal.
  //
  if (max > 0.0)
    ratio = min / max;
  else
    ratio = 0.0;

  bool newDetectionState = ratio <= mDetectionThresholdRatio;

  if (newDetectionState != mDetected && mListener != NULL) {
    mListener->ClockDetected(newDetectionState);
  }

  mDetected = newDetectionState;
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq (%rdi), %rcx
movq 0x10(%rdi), %rax
movss (%rax), %xmm0
xorl %edx, %edx
cmpq $0x2, %rcx
jb 0x7b60
movl $0x1, %esi
movaps %xmm0, %xmm1
movaps %xmm0, %xmm2
movaps %xmm1, %xmm3
movss (%rax,%rsi,4), %xmm1
ucomiss %xmm0, %xmm1
cmoval %esi, %edx
movaps %xmm1, %xmm0
maxss %xmm2, %xmm0
minss %xmm3, %xmm1
incq %rsi
cmpq %rsi, %rcx
jne 0x7b37
movslq %edx, %rdx
jmp 0x7b63
movaps %xmm0, %xmm1
cmpq %rdx, 0x20(%rbx)
je 0x7b80
movq %rdx, 0x20(%rbx)
leaq -0x1(%rcx), %rax
shrq %rax
addq %rdx, %rax
xorl %edx, %edx
divq %rcx
movq %rdx, 0x30(%rbx)
divss %xmm0, %xmm1
xorps %xmm2, %xmm2
cmpltss %xmm0, %xmm2
andps %xmm1, %xmm2
movss 0xc(%rbx), %xmm0
ucomiss %xmm2, %xmm0
setae %bpl
cmpb %bpl, 0x1c(%rbx)
je 0x7bb8
movq 0x40(%rbx), %rdi
testq %rdi, %rdi
je 0x7bb8
xorl %esi, %esi
ucomiss %xmm2, %xmm0
setae %sil
movq (%rdi), %rax
callq *(%rax)
movb %bpl, 0x1c(%rbx)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/ke6jjj[P]r-dat/RDATSlopeDecoder.cc
// Function: RDATSlopeDecoder::Reset()
void
RDATSlopeDecoder::Reset()
{
  mClockDetector.Reset();
  mSymbolWindow.Reset();
  mOverallSignalLevel = 0.0;
  mTrackInProgress = false;
  mTrackSampleCount = 0;
#if 1
  mSampleNumber = 0;
#endif
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
addq $0x10, %rdi
callq 0x7a24
movq 0x58(%rbx), %rdx
testq %rdx, %rdx
je 0x7d6f
movq 0x60(%rbx), %rdi
shlq $0x2, %rdx
xorl %esi, %esi
callq 0x20a0
movl $0x0, 0x88(%rbx)
movb $0x0, 0x80(%rbx)
xorl %eax, %eax
movq %rax, 0x78(%rbx)
movq %rax, (%rbx)
popq %rbx
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/johnbeard[P]visitor-double-dispatch/visitor-double-dispatch.cpp
// Function: main
int main(int argc, char** argv)
{
    const auto objects = getObjects();

    // The renderer
    DataRenderer renderer;

    // Render each object in the container
    for (const auto& obj: objects)
    {
        obj->accept(renderer);
    }

    return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x30, %rsp
xorps %xmm0, %xmm0
movaps %xmm0, 0x10(%rsp)
movq $0x0, 0x20(%rsp)
leaq 0xdeb(%rip), %rsi       # 0x203e
leaq 0xdea(%rip), %rdx       # 0x2044
leaq 0x8(%rsp), %rdi
callq 0x152e
movq 0x8(%rsp), %rax
movq $0x0, 0x8(%rsp)
movq %rsp, %rsi
movq %rax, (%rsi)
leaq 0x10(%rsp), %rdi
callq 0x1718
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x1291
movq (%rdi), %rax
callq *0x8(%rax)
movq $0x0, (%rsp)
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x12a9
movq (%rdi), %rax
callq *0x8(%rax)
movl $0x10, %edi
callq 0x10a0
leaq 0x2a3e(%rip), %rcx      # 0x3cf8
movq %rcx, (%rax)
movabsq $0x2000000010, %rcx     # imm = 0x2000000010
movq %rcx, 0x8(%rax)
movq %rsp, %rsi
movq %rax, (%rsi)
leaq 0x10(%rsp), %rdi
callq 0x1718
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x12ea
movq (%rdi), %rax
callq *0x8(%rax)
leaq 0x2c(%rsp), %rsi
movl $0x4048f5c3, (%rsi)     # imm = 0x4048F5C3
leaq 0xd4e(%rip), %rdx       # 0x204a
leaq 0x8(%rsp), %rdi
callq 0x1634
movq 0x8(%rsp), %rax
movq $0x0, 0x8(%rsp)
movq %rsp, %rsi
movq %rax, (%rsi)
leaq 0x10(%rsp), %rdi
callq 0x1718
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x1333
movq (%rdi), %rax
callq *0x8(%rax)
movq $0x0, (%rsp)
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x134b
movq (%rdi), %rax
callq *0x8(%rax)
leaq 0x2a36(%rip), %rax      # 0x3d88
movq %rax, (%rsp)
movq 0x10(%rsp), %r14
movq 0x18(%rsp), %r15
cmpq %r15, %r14
je 0x137d
movq %rsp, %rbx
movq (%r14), %rdi
movq (%rdi), %rax
movq %rbx, %rsi
callq *0x10(%rax)
addq $0x8, %r14
cmpq %r15, %r14
jne 0x1368
leaq 0x10(%rsp), %rdi
callq 0x13e6
xorl %eax, %eax
addq $0x30, %rsp
popq %rbx
popq %r14
popq %r15
retq
jmp 0x13a2
jmp 0x13d0
movq %rax, %rbx
movq (%rsp), %rdi
jmp 0x13c1
jmp 0x13d0
movq %rax, %rbx
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x13b4
movq (%rdi), %rax
callq *0x8(%rax)
movq $0x0, (%rsp)
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x13d3
movq (%rdi), %rax
callq *0x8(%rax)
jmp 0x13d3
jmp 0x13d0
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x13e6
movq %rbx, %rdi
callq 0x10c0
nop
// File: /workspace/github_cpp_makefile_star2_O3/ruippeixotog[P]algo-lib/bipartite-matching.cpp
// Function: bpmDfs(int)
bool bpmDfs(int u) {
  for(int v = 0; v < n; v++) {
    if(graph[u][v]) {
      if(seen[v]) continue;
      seen[v] = true;

      if(matchR[v] < 0 || bpmDfs(matchR[v])) {
        matchL[u] = v; matchR[v] = u;
        return true;
      }
    }
  }
  return false;
}

// Assembly:
movl 0x2f02(%rip), %eax      # 0x4044
testl %eax, %eax
jle 0x11b4
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movslq %edi, %rbx
movq %rbx, %r12
shlq $0x7, %r12
leaq 0x716e(%rip), %r14      # 0x82d0
xorl %r15d, %r15d
leaq 0x2ee4(%rip), %r13      # 0x4050
leaq 0x6edd(%rip), %rbp      # 0x8050
leaq (%r12,%r15), %rcx
cmpb $0x1, (%r13,%rcx)
jne 0x11a1
cmpb $0x0, (%r15,%rbp)
jne 0x11a1
movb $0x1, (%r15,%rbp)
movl (%r14), %edi
testl %edi, %edi
js 0x11b7
callq 0x113c
testb %al, %al
jne 0x11b7
movl 0x2ea3(%rip), %eax      # 0x4044
incq %r15
movslq %eax, %rcx
addq $0x4, %r14
cmpq %rcx, %r15
jl 0x1173
xorl %eax, %eax
jmp 0x11c7
xorl %eax, %eax
retq
leaq 0x6f12(%rip), %rax      # 0x80d0
movl %r15d, (%rax,%rbx,4)
movl %ebx, (%r14)
movb $0x1, %al
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/ruippeixotog[P]algo-lib/bipartite-matching.cpp
// Function: bpm()
int bpm() {
  memset(matchL, -1, sizeof(matchL));
  memset(matchR, -1, sizeof(matchR));
  int cnt = 0;
  for(int i = 0; i < m; i++) {
    memset(seen, false, sizeof(seen));
    if(bpmDfs(i)) cnt++;
  }
  return cnt;
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
leaq 0x6ef0(%rip), %rdi      # 0x80d0
movl $0x200, %edx            # imm = 0x200
movl $0xff, %esi
callq 0x1030
leaq 0x70da(%rip), %rdi      # 0x82d0
movl $0x200, %edx            # imm = 0x200
movl $0xff, %esi
callq 0x1030
cmpl $0x0, 0x2e34(%rip)      # 0x4040
jle 0x1265
xorl %ebp, %ebp
xorl %ebx, %ebx
xorps %xmm0, %xmm0
movaps %xmm0, 0x6ea4(%rip)     # 0x80c0
movaps %xmm0, 0x6e8d(%rip)     # 0x80b0
movaps %xmm0, 0x6e76(%rip)     # 0x80a0
movaps %xmm0, 0x6e5f(%rip)     # 0x8090
movaps %xmm0, 0x6e48(%rip)     # 0x8080
movaps %xmm0, 0x6e31(%rip)     # 0x8070
movaps %xmm0, 0x6e1a(%rip)     # 0x8060
movaps %xmm0, 0x6e03(%rip)     # 0x8050
movl %ebp, %edi
callq 0x113c
movzbl %al, %eax
addl %eax, %ebx
incl %ebp
cmpl 0x2ddf(%rip), %ebp      # 0x4040
jl 0x1212
jmp 0x1267
xorl %ebx, %ebx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/prophyle[P]prophasm/src/prophasm.cpp
// Function: int encode_canonical<unsigned long>(char const*, int, unsigned long&)
int32_t encode_canonical(const char *kmers, const int32_t k, _nkmer_T &nkmer){
	_nkmer_T nkmer_f;
	_nkmer_T nkmer_r;

	int32_t error_code;

	error_code=encode_forward(kmers, k, nkmer_f);
	if(error_code!=0){
		return error_code;
	}

	error_code=encode_reverse(kmers, k, nkmer_r);
	if(error_code!=0){
		return error_code;
	}

	nkmer=std::min(nkmer_f,nkmer_r);

	return 0;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
xorl %r9d, %r9d
testl %esi, %esi
jle 0x4b90
movsbq (%rdi), %rax
leaq 0x155f(%rip), %r8       # 0x6040
movb (%rax,%r8), %r9b
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpb $0x4, %r9b
je 0x4b9e
movl %esi, %esi
movl $0x1, %r11d
xorl %ecx, %ecx
movq %r11, %r10
movq %rcx, %r11
shlq $0x2, %r11
movzbl %r9b, %ecx
orq %r11, %rcx
cmpq %r10, %rsi
je 0x4b27
movsbq (%rdi,%r10), %r9
movb (%r9,%r8), %r9b
leaq 0x1(%r10), %r11
cmpb $0x4, %r9b
jne 0x4afe
cmpq %rsi, %r10
jb 0x4b9e
movsbq -0x1(%rdi,%rsi), %r9
movb (%r9,%r8), %r11b
cmpb $0x4, %r11b
je 0x4b9e
addq %rsi, %rdi
addq $-0x2, %rdi
movl $0x1, %r10d
subq %rsi, %r10
xorl %r14d, %r14d
xorl %r9d, %r9d
movq %r14, %rbx
movb $0x3, %bpl
subb %r11b, %bpl
movq %r9, %r11
shlq $0x2, %r11
movzbl %bpl, %r9d
orq %r11, %r9
cmpq %r14, %r10
je 0x4b81
movsbq (%rdi,%rbx), %r11
movb (%r11,%r8), %r11b
leaq -0x1(%rbx), %r14
cmpb $0x4, %r11b
jne 0x4b52
movl $0x1, %edi
subq %rbx, %rdi
cmpq %rsi, %rdi
jae 0x4b92
jmp 0x4b9e
xorl %ecx, %ecx
cmpq %rcx, %r9
cmovbq %r9, %rcx
movq %rcx, (%rdx)
xorl %eax, %eax
popq %rbx
popq %r14
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/prophyle[P]prophasm/src/prophasm.cpp
// Function: int decode_kmer<unsigned long>(unsigned long, int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&)
int32_t decode_kmer(_nkmer_T nkmer, int32_t k, std::string &kmer){
	kmer.resize(k);
	for(int32_t i=0;i<k;i++){
		uint8_t nt4 = nkmer & 0x3;
		nkmer >>=2;
		kmer[k-i-1]=nt4_nt256[nt4];
	}

	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %rbx
movl %esi, %ebp
movq %rdi, %r14
movslq %esi, %r15
movq %rdx, %rdi
movq %r15, %rsi
xorl %edx, %edx
callq 0x20a0
testl %r15d, %r15d
jle 0x5214
movl %ebp, %eax
leaq 0x12d3(%rip), %rcx      # 0x64ca
movl %r14d, %edx
andl $0x3, %edx
shrq $0x2, %r14
movb (%rdx,%rcx), %dl
movq (%rbx), %rsi
movb %dl, -0x1(%rsi,%r15)
decq %r15
decq %rax
jne 0x51f7
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nop