// File: /workspace/github_cpp_makefile_star2_O1/yhwu[P]sam2psl/sam2psl.cpp
// Function: main
int main(int argc, char* argv[])
{
  
  if ( argc>=2 ) {
    for( int i=1; i<argc; ++i) {
      if( string( argv[i]).find("-h")!=string::npos) 
	cout << "matches\tmisMatches\trepMatches\tnCount\tqNumInsert\t"
	     << "qBaseInsert\ttNumInsert\ttBaseInsert\tstrand\tqName\t"
	     << "qSize\tqStart\tqEnd\ttName\ttSize\t"
	     << "tStart\ttEnd\tblockCount\tblockSizes\tqStarts\t"
	     << "tStarts\tqBlocks\ttBlocks\t"
	     << "RI\tRNEXT\tPNEXT\tTLEN\tMAPQ\t"
	     << "AS\tMAPS\tFPAIRED\tFPROPER_PAIR\tFSECONDARY\t"
	     << "FQC\tFDUP"
	     << "\n";
    } 
  }
  
  string line;
  map<string,int> targetLen;  
  
  while( getline(cin, line) ) {
    istringstream iss(line);
    if ( line[0]=='@' ) {
      if ( line.find("@SQ")==string::npos ) continue; 
      string tmps, SN, LN;
      iss >> tmps >> SN >> LN;
      size_t p1=SN.find("SN:");
      if ( p1==string::npos ) continue; 
      SN=SN.substr(p1+3);
      p1=LN.find("LN:");
      if ( p1==string::npos ) continue; 
      LN=LN.substr(p1+3);
      targetLen[SN]=atoi(LN.c_str());
    }
    vector<string> field(0);
    string tmps;
    while( iss>>tmps ) field.push_back(tmps); 
    if( field.size()<11 ) continue;
    if( field[0][0]=='@' ) continue;
    
    PSL_st psl;
    SAM_st sam;
    FLAG_st flag;
    PSLComment_st pslc;
    
    sam.QNAME=field[0];
    sam.FLAG=atoi(field[1].c_str());
    sam.RNAME=field[2];
    sam.POS=atoi(field[3].c_str());
    sam.MAPQ=atoi(field[4].c_str());
    sam.CIGAR=field[5];
    sam.RNEXT=field[6];
    sam.PNEXT=atoi(field[7].c_str());
    sam.TLEN=atoi(field[8].c_str());
    sam.SEQ=field[9];
    sam.QUAL=field[10];
    sam.AS=-sam.SEQ.length();
    sam.NM=sam.SEQ.length();
    sam.MD="";
    int optionalField=0;
    for(int i=11; i<(int)field.size(); ++i) {
      if( field[i].substr(0,3)=="AS:" ) {
	size_t p=field[i].rfind(':');
	sam.AS=atoi( field[i].substr(p+1).c_str() );
	optionalField+=1;
      }
      if( field[i].substr(0,3)=="NM:" ) {
	size_t p=field[i].rfind(':');
	sam.NM=atoi( field[i].substr(p+1).c_str() );
	optionalField+=1;
      }
      if( field[i].substr(0,3)=="MD:" ) {
	size_t p=field[i].rfind(':');
	sam.MD=field[i].substr(p+1);
	optionalField+=1;
      }
      if( optionalField==3 ) break;
    }
    
    flag.FPAIRED = bool(sam.FLAG & BAM_FPAIRED);
    flag.FPROPER_PAIR = bool(sam.FLAG & BAM_FPROPER_PAIR);
    flag.FUNMAP = bool(sam.FLAG & BAM_FUNMAP);
    flag.FMUNMAP = bool(sam.FLAG & BAM_FMUNMAP);
    flag.FREVERSE = bool(sam.FLAG & BAM_FREVERSE); 
    flag.FMREVERSE = bool(sam.FLAG & BAM_FMREVERSE);
    flag.FREAD1 = bool(sam.FLAG & BAM_FREAD1);
    flag.FREAD2 = bool(sam.FLAG & BAM_FREAD2);
    flag.FSECONDARY = bool(sam.FLAG & BAM_FSECONDARY);
    flag.FQCFAIL = bool(sam.FLAG & BAM_FQCFAIL);
    flag.FDUP = bool(sam.FLAG & BAM_FDUP);

    POSCIGAR_st m;
    resolve_cigar_pos(sam.POS-1, sam.CIGAR, m);  // sam is 1-based, psl is 0-based
    if ( sam.SEQ.size() != m.l_qseq && m.l_qseq>0 ) {
      cerr << "SEQ length not calculated correctly\t"
	   << line << endl
	   << sam.SEQ.size() << "\t" << m.l_qseq << endl;
      exit(1);
    }
    
    psl.matches=0;
    psl.misMatches=sam.NM;
    psl.repMatches=0;
    psl.nCount=0;
    psl.qNumInsert=0;
    psl.qBaseInsert=0;
    psl.tNumInsert=0;
    psl.tBaseInsert=0;
    psl.strand= (sam.FLAG & BAM_FREVERSE) > 0 ? "-":"+";
    psl.qName=sam.QNAME;
    psl.qSize=sam.SEQ.size();
    psl.qStart=m.qStart;
    psl.qEnd=m.qEnd+1;  // m is 0-base closed, psl is 0-base half open
    psl.tName=sam.RNAME;
    psl.tSize=targetLen[sam.RNAME];
    psl.tStart=m.tStart;
    psl.tEnd=m.tEnd+1;  // m is 0-base closed, psl is 0-base half open
    psl.blockCount=0;
    psl.blockSizes.resize(0);
    psl.qStarts.resize(0);
    psl.tStarts.resize(0);
    for( int i=0; i<sam.SEQ.size(); ++i) {
      if( sam.SEQ[i]=='N' || sam.SEQ[i]=='n' ) psl.nCount+=1;
    }
    for( int i=0; i<m.op.size(); ++i) {
      if ( m.op[i] == BAM_CMATCH || 
	   m.op[i] == BAM_CDEL || 
	   m.op[i] == BAM_CEQUAL || 
	   m.op[i] == BAM_CDIFF) psl.matches+=m.nop[i];
      
      if ( m.op[i] == BAM_CINS ) {
	psl.qNumInsert+=1;
	psl.qBaseInsert+=m.nop[i];
      }
      
      if ( m.op[i] == BAM_CDEL ) {
	psl.tNumInsert+=1;
	psl.tBaseInsert+=m.nop[i];
      }
      
      if ( m.op[i] == BAM_CMATCH ) {
	psl.blockCount+=1;
	psl.blockSizes.push_back( m.nop[i] );
	psl.qStarts.push_back( m.qop[i] );
	psl.tStarts.push_back( m.top[i] );
      }
    }
    // note so far it is assumed strand is +
    if ( psl.strand=="-" ) {
      psl.qStart=psl.qSize-psl.qEnd;
      psl.qEnd=psl.qSize-psl.qStart;
      for(int i=0; i<psl.blockSizes.size(); ++i) {
	int qEndOnPlus=psl.qStarts[i]+psl.blockSizes[i];
	psl.qStarts[i]=psl.qSize-qEndOnPlus;
	// note tStart remain same
      }
      reverse(psl.blockSizes.begin(), psl.blockSizes.end());
      reverse(psl.qStarts.begin(), psl.qStarts.end());
      reverse(psl.tStarts.begin(), psl.tStarts.end());
    }
    
    pslc.RI=1;
    pslc.RNEXT=sam.RNEXT;
    pslc.PNEXT=sam.PNEXT-1; //SAM is 1-based
    pslc.TLEN=sam.TLEN;
    pslc.MAPQ=sam.MAPQ;
    pslc.AS=sam.AS;
    pslc.MAPS=psl.matches-psl.misMatches;
    pslc.FPAIRED=flag.FPAIRED;
    pslc.FPROPER_PAIR=flag.FPROPER_PAIR;
    pslc.FSECONDARY=flag.FSECONDARY;
    pslc.FQCFAIL=flag.FQCFAIL;
    pslc.FDUP=flag.FDUP;
    if ( !flag.FPAIRED ) pslc.RI=1;
    else {
      pslc.RI=0;
      if( flag.FREAD1 ) pslc.RI=1;
      if( flag.FREAD2 ) pslc.RI=2;
      if( pslc.RI==0 | flag.FREAD1==flag.FREAD2 ) {
	cerr << "check flag" << endl
	     << line << endl;
	exit(1);
      }
    }
    
    cout << "#"<< line << "\n";
    cout << psl.matches << "\t"
	 << psl.misMatches << "\t"
	 << psl.repMatches << "\t"
	 << psl.nCount << "\t"
	 << psl.qNumInsert << "\t"
	 << psl.qBaseInsert << "\t"
	 << psl.tNumInsert << "\t"
	 << psl.tBaseInsert << "\t"
	 << psl.strand << "\t"
	 << psl.qName << "\t"
	 << psl.qSize << "\t"
	 << psl.qStart << "\t"
	 << psl.qEnd << "\t"
	 << psl.tName << "\t"
	 << psl.tSize << "\t"
	 << psl.tStart << "\t"
	 << psl.tEnd << "\t"
	 << psl.blockCount << "\t";
    for(int i=0; i<psl.blockSizes.size(); ++i) cout << psl.blockSizes[i] << ",";
    cout << "\t";
    for(int i=0; i<psl.qStarts.size(); ++i) cout << psl.qStarts[i] << ",";
    cout << "\t";
    for(int i=0; i<psl.tStarts.size(); ++i) cout << psl.tStarts[i] << ",";
    cout << "\t";
    
    cout << "," << "\t";  // reserve for pslx
    cout << "," << "\t";  // reserve for pslx
    
    cout << pslc.RI << "\t"
	 << pslc.RNEXT << "\t"
	 << pslc.PNEXT << "\t"
	 << pslc.TLEN << "\t"
	 << pslc.MAPQ << "\t"
	 << pslc.AS << "\t"
	 << pslc.MAPS << "\t"
	 << "SP"[pslc.FPAIRED] << "\t"
	 << "UP"[pslc.FPROPER_PAIR] << "\t"
	 << "PS"[pslc.FSECONDARY] << "\t"
	 << "PF"[pslc.FQCFAIL] << "\t"
	 << "PD"[pslc.FDUP];
    
    cout << endl;
  }
  
  return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x578, %rsp            # imm = 0x578
cmpl $0x2, %edi
jl 0x2ab7
movq %rsi, %rbx
movl %edi, %r15d
movl $0x1, %r12d
leaq 0x3f8(%rsp), %r14
movq 0x562d(%rip), %r13      # 0x7fc8
movq (%rbx,%r12,8), %rsi
movq %r14, %rdi
leaq 0x170(%rsp), %rdx
callq 0x43bc
movl $0x2, %ecx
movq %r14, %rdi
leaq 0x36cb(%rip), %rsi      # 0x6089
xorl %edx, %edx
callq 0x22a0
movq %rax, %rbp
movq 0x3f8(%rsp), %rdi
leaq 0x408(%rsp), %rax
cmpq %rax, %rdi
je 0x29ed
movq 0x408(%rsp), %rsi
incq %rsi
callq 0x2190
cmpq $-0x1, %rbp
je 0x2aab
movl $0x30, %edx
movq %r13, %rdi
leaq 0x3686(%rip), %rsi      # 0x608c
callq 0x21c0
movl $0x30, %edx
movq %r13, %rdi
leaq 0x36a3(%rip), %rsi      # 0x60bd
callq 0x21c0
movl $0x1e, %edx
movq %r13, %rdi
leaq 0x36c0(%rip), %rsi      # 0x60ee
callq 0x21c0
movl $0x2a, %edx
movq %r13, %rdi
leaq 0x36cb(%rip), %rsi      # 0x610d
callq 0x21c0
movl $0x18, %edx
movq %r13, %rdi
leaq 0x36e2(%rip), %rsi      # 0x6138
callq 0x21c0
movl $0x19, %edx
movq %r13, %rdi
leaq 0x36e7(%rip), %rsi      # 0x6151
callq 0x21c0
movl $0x28, %edx
movq %r13, %rdi
leaq 0x36ed(%rip), %rsi      # 0x616b
callq 0x21c0
movl $0x8, %edx
movq %r13, %rdi
leaq 0x3702(%rip), %rsi      # 0x6194
callq 0x21c0
movl $0x1, %edx
movq %r13, %rdi
leaq 0x35cb(%rip), %rsi      # 0x6071
callq 0x21c0
incq %r12
cmpq %r12, %r15
jne 0x299b
leaq 0x40(%rsp), %rax
movq %rax, -0x10(%rax)
xorl %ebx, %ebx
movq %rbx, -0x8(%rax)
movb $0x0, (%rax)
leaq 0x3d0(%rsp), %rax
movl $0x0, (%rax)
movq %rbx, 0x8(%rax)
movq %rax, 0x10(%rax)
movq %rax, 0x18(%rax)
movq %rbx, 0x20(%rax)
leaq 0x2c0(%rsp), %r13
movl $0x80, %eax
leaq 0x170(%rsp), %rcx
leaq (%rcx,%rax), %rdx
movq %rdx, 0x3b8(%rsp)
leaq 0x2b0(%rsp), %rdx
addq %rdx, %rax
movq %rax, 0x3c0(%rsp)
movl $0xb8, %eax
addq %rax, %rdx
movq %rdx, 0x3b0(%rsp)
addq %rcx, %rax
movq %rax, 0x288(%rsp)
leaq 0x470(%rsp), %r12
movq 0x5493(%rip), %rbp      # 0x7fd8
leaq 0x3f8(%rsp), %r14
leaq 0x290(%rsp), %r15
movq (%rbp), %rax
movq -0x18(%rax), %rdi
addq %rbp, %rdi
movl $0xa, %esi
callq 0x2170
movsbl %al, %edx
movq %rbp, %rdi
leaq 0x30(%rsp), %rsi
callq 0x22d0
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0x4168
movq %r14, %rdi
leaq 0x30(%rsp), %rsi
movl $0x8, %edx
callq 0x2280
movq 0x30(%rsp), %rax
cmpb $0x40, (%rax)
jne 0x2dd1
movl $0x3, %ecx
leaq 0x30(%rsp), %rdi
leaq 0x35e0(%rip), %rsi      # 0x619d
xorl %edx, %edx
callq 0x22a0
cmpq $-0x1, %rax
je 0x4145
leaq 0x180(%rsp), %rax
movq %rax, 0x170(%rsp)
movq %rbx, 0x178(%rsp)
movb %bl, 0x180(%rsp)
movq %r13, 0x2b0(%rsp)
movq %rbx, 0x2b8(%rsp)
movb %bl, 0x2c0(%rsp)
leaq 0xf0(%rsp), %rax
movq %rax, 0xe0(%rsp)
movq %rbx, 0xe8(%rsp)
movb %bl, 0xf0(%rsp)
movq %r14, %rdi
leaq 0x170(%rsp), %rsi
callq 0x21f0
movq %rax, %rdi
leaq 0x2b0(%rsp), %rsi
callq 0x21f0
movq %rax, %rdi
leaq 0xe0(%rsp), %rsi
callq 0x21f0
movl $0x3, %ecx
leaq 0x2b0(%rsp), %rdi
leaq 0x353a(%rip), %rsi      # 0x61a1
xorl %edx, %edx
callq 0x22a0
cmpq $-0x1, %rax
je 0x38fe
addq $0x3, %rax
leaq 0x50(%rsp), %rbp
movq %rbp, %rdi
leaq 0x2b0(%rsp), %r12
movq %r12, %rsi
movq %rax, %rdx
movq $-0x1, %rcx
callq 0x21a0
movq %r12, %rdi
movq %rbp, %rsi
callq 0x21e0
movq 0x50(%rsp), %rdi
leaq 0x60(%rsp), %rax
cmpq %rax, %rdi
je 0x2cc5
movq 0x60(%rsp), %rsi
incq %rsi
callq 0x2190
movl $0x3, %ecx
leaq 0xe0(%rsp), %rdi
leaq 0x34cc(%rip), %rsi      # 0x61a5
xorl %edx, %edx
callq 0x22a0
cmpq $-0x1, %rax
leaq 0x470(%rsp), %r12
je 0x38fe
addq $0x3, %rax
leaq 0x50(%rsp), %rbp
movq %rbp, %rdi
leaq 0xe0(%rsp), %rbx
movq %rbx, %rsi
movq %rax, %rdx
movq $-0x1, %rcx
callq 0x21a0
movq %rbx, %rdi
movq %rbp, %rsi
callq 0x21e0
movq 0x50(%rsp), %rdi
leaq 0x60(%rsp), %rax
cmpq %rax, %rdi
je 0x2d3f
movq 0x60(%rsp), %rsi
incq %rsi
callq 0x2190
movq 0xe0(%rsp), %rdi
callq 0x2250
movl %eax, %ebx
leaq 0x3c8(%rsp), %rdi
leaq 0x2b0(%rsp), %rsi
callq 0x442c
movl %ebx, (%rax)
movq 0xe0(%rsp), %rdi
leaq 0xf0(%rsp), %rax
cmpq %rax, %rdi
je 0x2d8a
movq 0xf0(%rsp), %rsi
incq %rsi
callq 0x2190
movq 0x2b0(%rsp), %rdi
cmpq %r13, %rdi
movl $0x0, %ebx
je 0x2dac
movq 0x2c0(%rsp), %rsi
incq %rsi
callq 0x2190
movq 0x170(%rsp), %rdi
leaq 0x180(%rsp), %rax
cmpq %rax, %rdi
je 0x2dd1
movq 0x180(%rsp), %rsi
incq %rsi
callq 0x2190
pxor %xmm0, %xmm0
movdqa %xmm0, 0x10(%rsp)
movq %rbx, 0x20(%rsp)
leaq 0x2a0(%rsp), %rax
movq %rax, 0x290(%rsp)
movq %rbx, 0x298(%rsp)
movb $0x0, 0x2a0(%rsp)
movq %r14, %rdi
movq %r15, %rsi
callq 0x21f0
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0x2e28
leaq 0x10(%rsp), %rdi
movq %r15, %rsi
callq 0x44a8
jmp 0x2e00
movq 0x10(%rsp), %rsi
movq 0x18(%rsp), %rax
subq %rsi, %rax
cmpq $0x160, %rax            # imm = 0x160
jb 0x4116
movq (%rsi), %rax
cmpb $0x40, (%rax)
je 0x4116
leaq 0x1a0(%rsp), %rax
movq %rax, 0x190(%rsp)
movq %rbx, 0x198(%rsp)
movb %bl, 0x1a0(%rsp)
leaq 0x1c0(%rsp), %rax
movq %rax, 0x1b0(%rsp)
movq %rbx, 0x1b8(%rsp)
movb %bl, 0x1c0(%rsp)
movq 0x3b8(%rsp), %rax
movq %rax, 0x1e0(%rsp)
movq %rbx, 0x1e8(%rsp)
movb %bl, 0x1f0(%rsp)
leaq 0x210(%rsp), %rax
movq %rbx, 0x70(%rax)
pxor %xmm0, %xmm0
movdqu %xmm0, 0x60(%rax)
movdqu %xmm0, 0x50(%rax)
movdqu %xmm0, 0x40(%rax)
movdqu %xmm0, 0x30(%rax)
movdqu %xmm0, 0x20(%rax)
movdqu %xmm0, 0x10(%rax)
movdqu %xmm0, (%rax)
movq %r13, 0x2b0(%rsp)
movq %rbx, 0x2b8(%rsp)
movb %bl, 0x2c0(%rsp)
leaq 0x2e8(%rsp), %rax
movq %rax, 0x2d8(%rsp)
movq %rbx, 0x2e0(%rsp)
movb %bl, 0x2e8(%rsp)
leaq 0x310(%rsp), %rax
movq %rax, 0x300(%rsp)
movq %rbx, 0x308(%rsp)
movb %bl, 0x310(%rsp)
movq 0x3c0(%rsp), %rax
movq %rax, 0x320(%rsp)
movq %rbx, 0x328(%rsp)
movb %bl, 0x330(%rsp)
leaq 0x358(%rsp), %rax
movq %rax, 0x348(%rsp)
movq %rbx, 0x350(%rsp)
movb %bl, 0x358(%rsp)
leaq 0x378(%rsp), %rax
movq %rax, 0x368(%rsp)
movq %rbx, 0x370(%rsp)
movb %bl, 0x378(%rsp)
leaq 0x3a0(%rsp), %rax
movq %rax, 0x390(%rsp)
movq %rbx, 0x398(%rsp)
movb %bl, 0x3a0(%rsp)
leaq 0xf8(%rsp), %rax
movq %rax, 0xe8(%rsp)
movq %rbx, 0xf0(%rsp)
movb %bl, 0xf8(%rsp)
leaq 0xf0(%rsp), %rax
movq %rbx, 0x78(%rax)
movdqu %xmm0, 0x68(%rax)
movdqu %xmm0, 0x58(%rax)
movdqu %xmm0, 0x48(%rax)
movdqu %xmm0, 0x38(%rax)
leaq 0x2b0(%rsp), %rdi
callq 0x20e0
movq 0x10(%rsp), %rbx
movq 0x20(%rbx), %rdi
callq 0x2250
movl %eax, 0x2d0(%rsp)
addq $0x40, %rbx
leaq 0x2d8(%rsp), %rdi
movq %rbx, %rsi
callq 0x20e0
movq 0x10(%rsp), %rbx
movq 0x60(%rbx), %rdi
callq 0x2250
movl %eax, 0x2f8(%rsp)
movq 0x80(%rbx), %rdi
callq 0x2250
movl %eax, 0x2fc(%rsp)
addq $0xa0, %rbx
leaq 0x300(%rsp), %rdi
movq %rbx, %rsi
callq 0x20e0
movq 0x10(%rsp), %rsi
movl $0xc0, %eax
addq %rax, %rsi
leaq 0x320(%rsp), %rdi
callq 0x20e0
movq 0x10(%rsp), %rbx
movq 0xe0(%rbx), %rdi
callq 0x2250
movl %eax, 0x340(%rsp)
movq 0x100(%rbx), %rdi
callq 0x2250
movl %eax, 0x344(%rsp)
addq $0x120, %rbx            # imm = 0x120
leaq 0x348(%rsp), %rdi
movq %rbx, %rsi
callq 0x20e0
movq 0x10(%rsp), %rsi
movl $0x140, %eax            # imm = 0x140
addq %rax, %rsi
movq 0x3b0(%rsp), %rdi
callq 0x20e0
movl 0x350(%rsp), %eax
movl %eax, %ecx
negl %ecx
movl %ecx, 0x388(%rsp)
movl %eax, 0x38c(%rsp)
movq 0x398(%rsp), %rdx
leaq 0x390(%rsp), %rdi
xorl %esi, %esi
leaq 0x2f67(%rip), %rcx      # 0x6070
xorl %r8d, %r8d
callq 0x2240
movq 0x10(%rsp), %rsi
movq 0x18(%rsp), %rax
subq %rsi, %rax
shrq $0x5, %rax
cmpl $0xc, %eax
leaq 0x50(%rsp), %rbx
jl 0x3381
xorl %r12d, %r12d
movl $0xb, %r13d
movl $0x160, %ebp            # imm = 0x160
addq %rbp, %rsi
movl $0x3, %ecx
movq %rbx, %rdi
xorl %edx, %edx
callq 0x21a0
movq %rbx, %rdi
leaq 0x304f(%rip), %rsi      # 0x61a9
callq 0x2070
movl %eax, %ebx
movq 0x50(%rsp), %rdi
leaq 0x60(%rsp), %rax
cmpq %rax, %rdi
je 0x317d
movq 0x60(%rsp), %rsi
incq %rsi
callq 0x2190
testl %ebx, %ebx
jne 0x31e8
movq 0x10(%rsp), %rdi
addq %rbp, %rdi
movl $0x3a, %esi
movq $-0x1, %rdx
callq 0x22e0
movq 0x10(%rsp), %rsi
addq %rbp, %rsi
leaq 0x1(%rax), %rdx
leaq 0x50(%rsp), %rdi
movq $-0x1, %rcx
callq 0x21a0
movq 0x50(%rsp), %rbx
movq %rbx, %rdi
callq 0x2250
movl %eax, 0x388(%rsp)
leaq 0x60(%rsp), %rax
cmpq %rax, %rbx
je 0x31e5
movq 0x60(%rsp), %rsi
incq %rsi
movq %rbx, %rdi
callq 0x2190
incl %r12d
leaq 0x50(%rsp), %rbx
movq 0x10(%rsp), %rsi
addq %rbp, %rsi
movl $0x3, %ecx
movq %rbx, %rdi
xorl %edx, %edx
callq 0x21a0
movq %rbx, %rdi
leaq 0x2f9f(%rip), %rsi      # 0x61ad
callq 0x2070
movl %eax, %ebx
movq 0x50(%rsp), %rdi
leaq 0x60(%rsp), %rax
cmpq %rax, %rdi
je 0x3231
movq 0x60(%rsp), %rsi
incq %rsi
callq 0x2190
testl %ebx, %ebx
jne 0x329c
movq 0x10(%rsp), %rdi
addq %rbp, %rdi
movl $0x3a, %esi
movq $-0x1, %rdx
callq 0x22e0
movq 0x10(%rsp), %rsi
addq %rbp, %rsi
leaq 0x1(%rax), %rdx
leaq 0x50(%rsp), %rdi
movq $-0x1, %rcx
callq 0x21a0
movq 0x50(%rsp), %rbx
movq %rbx, %rdi
callq 0x2250
movl %eax, 0x38c(%rsp)
leaq 0x60(%rsp), %rax
cmpq %rax, %rbx
je 0x3299
movq 0x60(%rsp), %rsi
incq %rsi
movq %rbx, %rdi
callq 0x2190
incl %r12d
leaq 0x50(%rsp), %rbx
movq 0x10(%rsp), %rsi
addq %rbp, %rsi
movl $0x3, %ecx
movq %rbx, %rdi
xorl %edx, %edx
callq 0x21a0
movq %rbx, %rdi
leaq 0x2eef(%rip), %rsi      # 0x61b1
callq 0x2070
movl %eax, %ebx
movq 0x50(%rsp), %rdi
leaq 0x60(%rsp), %rax
cmpq %rax, %rdi
je 0x32e5
movq 0x60(%rsp), %rsi
incq %rsi
callq 0x2190
testl %ebx, %ebx
je 0x32f0
leaq 0x50(%rsp), %rbx
jmp 0x3358
movq 0x10(%rsp), %rdi
addq %rbp, %rdi
movl $0x3a, %esi
movq $-0x1, %rdx
callq 0x22e0
movq 0x10(%rsp), %rsi
addq %rbp, %rsi
leaq 0x1(%rax), %rdx
leaq 0x50(%rsp), %rbx
movq %rbx, %rdi
movq $-0x1, %rcx
callq 0x21a0
leaq 0x390(%rsp), %rdi
movq %rbx, %rsi
callq 0x21e0
movq 0x50(%rsp), %rdi
leaq 0x60(%rsp), %rax
cmpq %rax, %rdi
je 0x3355
movq 0x60(%rsp), %rsi
incq %rsi
callq 0x2190
incl %r12d
cmpl $0x3, %r12d
je 0x3381
incq %r13
movq 0x10(%rsp), %rsi
movq 0x18(%rsp), %rax
subq %rsi, %rax
shrq $0x5, %rax
cltq
addq $0x20, %rbp
cmpq %rax, %r13
jl 0x313e
movq %rbx, %rdx
movl 0x2d0(%rsp), %ebx
pcmpeqd %xmm0, %xmm0
movdqu %xmm0, 0x6c(%rsp)
movdqa %xmm0, 0x60(%rsp)
movdqa %xmm0, 0x50(%rsp)
leaq 0x60(%rsp), %rax
pxor %xmm0, %xmm0
movdqu %xmm0, 0x70(%rax)
movdqu %xmm0, 0x60(%rax)
movdqu %xmm0, 0x50(%rax)
movdqu %xmm0, 0x40(%rax)
movdqu %xmm0, 0x30(%rax)
movdqu %xmm0, 0x20(%rax)
movl 0x2f8(%rsp), %edi
decl %edi
leaq 0x300(%rsp), %rsi
callq 0x243c
leaq 0x180(%rsp), %rcx
leaq 0x2b0(%rsp), %r12
movslq 0x78(%rsp), %rax
testq %rax, %rax
jle 0x3406
cmpq %rax, 0x350(%rsp)
jne 0x41a5
movl $0x0, 0x170(%rsp)
movl 0x38c(%rsp), %eax
movl %eax, 0x174(%rsp)
pxor %xmm0, %xmm0
movdqu %xmm0, -0x8(%rcx)
movq $0x0, 0x8(%rcx)
testb $0x10, 0x2d0(%rsp)
leaq 0x2d9b(%rip), %rcx      # 0x61da
leaq 0x2d96(%rip), %rax      # 0x61dc
cmoveq %rax, %rcx
movq 0x198(%rsp), %rdx
movl $0x1, %r8d
leaq 0x190(%rsp), %rdi
xorl %esi, %esi
callq 0x2240
leaq 0x1b0(%rsp), %rdi
movq %r12, %rsi
callq 0x20e0
movl 0x350(%rsp), %eax
movl %eax, 0x1d0(%rsp)
movl 0x5c(%rsp), %eax
movl 0x64(%rsp), %ecx
movl %eax, 0x1d4(%rsp)
incl %ecx
movl %ecx, 0x1d8(%rsp)
leaq 0x1e0(%rsp), %rdi
leaq 0x2d8(%rsp), %rsi
callq 0x20e0
leaq 0x3c8(%rsp), %rdi
leaq 0x2d8(%rsp), %rsi
callq 0x442c
movl (%rax), %eax
movl %eax, 0x200(%rsp)
movl 0x60(%rsp), %eax
movl 0x68(%rsp), %ecx
movl %eax, 0x204(%rsp)
incl %ecx
movl %ecx, 0x208(%rsp)
movl $0x0, 0x20c(%rsp)
leaq 0x210(%rsp), %rdi
xorl %esi, %esi
callq 0x43fa
movq 0x288(%rsp), %rdi
xorl %esi, %esi
callq 0x43fa
leaq 0x240(%rsp), %rdi
xorl %esi, %esi
callq 0x43fa
movq 0x350(%rsp), %rax
testq %rax, %rax
je 0x355b
movl 0x17c(%rsp), %ecx
movq 0x348(%rsp), %rdx
xorl %esi, %esi
movzbl (%rdx,%rsi), %edi
orl $0x20, %edi
cmpl $0x6e, %edi
jne 0x3553
incl %ecx
movl %ecx, 0x17c(%rsp)
incq %rsi
cmpq %rsi, %rax
jne 0x353e
movq 0x80(%rsp), %rax
cmpq %rax, 0x88(%rsp)
je 0x36cc
xorl %r12d, %r12d
xorl %r13d, %r13d
movl (%rax,%r12), %ecx
cmpl $0x8, %ecx
ja 0x359d
movl $0x185, %edx            # imm = 0x185
btl %ecx, %edx
jae 0x359d
movq 0x98(%rsp), %rcx
movl (%rcx,%r12), %ecx
addl %ecx, 0x170(%rsp)
cmpl $0x1, (%rax,%r12)
jne 0x35be
incl 0x180(%rsp)
movq 0x98(%rsp), %rcx
movl (%rcx,%r12), %ecx
addl %ecx, 0x184(%rsp)
cmpl $0x2, (%rax,%r12)
jne 0x35df
incl 0x188(%rsp)
movq 0x98(%rsp), %rcx
movl (%rcx,%r12), %ecx
addl %ecx, 0x18c(%rsp)
cmpl $0x0, (%rax,%r12)
jne 0x36a5
incl 0x20c(%rsp)
movq 0x98(%rsp), %rdx
addq %r12, %rdx
movq 0x218(%rsp), %rsi
cmpq 0x220(%rsp), %rsi
je 0x3620
movl (%rdx), %eax
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x218(%rsp)
jmp 0x362d
leaq 0x210(%rsp), %rdi
callq 0x5102
movq 0xb0(%rsp), %rdx
addq %r12, %rdx
movq 0x230(%rsp), %rsi
cmpq 0x238(%rsp), %rsi
je 0x365c
movl (%rdx), %eax
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x230(%rsp)
jmp 0x3669
movq 0x288(%rsp), %rdi
callq 0x5102
movq 0xc8(%rsp), %rdx
addq %r12, %rdx
movq 0x248(%rsp), %rsi
cmpq 0x250(%rsp), %rsi
je 0x3698
movl (%rdx), %eax
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x248(%rsp)
jmp 0x36a5
leaq 0x240(%rsp), %rdi
callq 0x5102
incq %r13
movq 0x80(%rsp), %rax
movq 0x88(%rsp), %rcx
subq %rax, %rcx
sarq $0x2, %rcx
addq $0x4, %r12
cmpq %r13, %rcx
ja 0x3577
leaq 0x190(%rsp), %rdi
leaq 0x2aff(%rip), %rsi      # 0x61da
callq 0x2070
testl %eax, %eax
movq 0x48df(%rip), %r12      # 0x7fc8
leaq 0x297f(%rip), %r13      # 0x606f
jne 0x3820
movl 0x1d0(%rsp), %eax
subl 0x1d8(%rsp), %eax
movl %eax, 0x1d4(%rsp)
movq 0x218(%rsp), %rax
movq 0x210(%rsp), %rcx
movq %rax, %rdx
subq %rcx, %rdx
je 0x3758
sarq $0x2, %rdx
movq 0x228(%rsp), %rsi
cmpq $0x1, %rdx
adcq $0x0, %rdx
xorl %edi, %edi
movl (%rcx,%rdi,4), %r8d
movl 0x1d0(%rsp), %r9d
addl (%rsi,%rdi,4), %r8d
subl %r8d, %r9d
movl %r9d, (%rsi,%rdi,4)
incq %rdi
cmpq %rdi, %rdx
jne 0x3739
cmpq %rax, %rcx
setne %dl
addq $-0x4, %rax
cmpq %rcx, %rax
seta %sil
andb %dl, %sil
cmpb $0x1, %sil
jne 0x3790
addq $0x4, %rcx
movl -0x4(%rcx), %edx
movl (%rax), %esi
movl %esi, -0x4(%rcx)
movl %edx, (%rax)
addq $-0x4, %rax
leaq 0x4(%rcx), %rdx
cmpq %rax, %rcx
movq %rdx, %rcx
jb 0x3776
movq 0x228(%rsp), %rax
movq 0x230(%rsp), %rcx
cmpq %rcx, %rax
setne %dl
addq $-0x4, %rcx
cmpq %rax, %rcx
seta %sil
andb %dl, %sil
cmpb $0x1, %sil
jne 0x37d8
addq $0x4, %rax
movl -0x4(%rax), %edx
movl (%rcx), %esi
movl %esi, -0x4(%rax)
movl %edx, (%rcx)
addq $-0x4, %rcx
leaq 0x4(%rax), %rdx
cmpq %rcx, %rax
movq %rdx, %rax
jb 0x37be
movq 0x240(%rsp), %rax
movq 0x248(%rsp), %rcx
cmpq %rcx, %rax
setne %dl
addq $-0x4, %rcx
cmpq %rax, %rcx
seta %sil
andb %dl, %sil
cmpb $0x1, %sil
jne 0x3820
addq $0x4, %rax
movl -0x4(%rax), %edx
movl (%rcx), %esi
movl %esi, -0x4(%rax)
movl %edx, (%rcx)
addq $-0x4, %rcx
leaq 0x4(%rax), %rdx
cmpq %rcx, %rax
movq %rdx, %rax
jb 0x3806
movl $0x1, 0xe0(%rsp)
leaq 0xe8(%rsp), %rdi
leaq 0x320(%rsp), %rsi
callq 0x20e0
movl %ebx, %eax
andl $0x1, %eax
movl %ebx, %ecx
shrb %cl
andb $0x1, %cl
movl %ebx, %edx
shrl $0x8, %edx
andb $0x1, %dl
movl %ebx, %esi
shrl $0x9, %esi
andb $0x1, %sil
movl %ebx, %edi
shrl $0xa, %edi
andb $0x1, %dil
movl 0x2fc(%rsp), %r8d
movl 0x340(%rsp), %r9d
decl %r9d
movl %r9d, 0x108(%rsp)
movl 0x344(%rsp), %r9d
movl %r9d, 0x10c(%rsp)
movl %r8d, 0x110(%rsp)
movl 0x388(%rsp), %r8d
movl 0x170(%rsp), %r9d
subl 0x174(%rsp), %r9d
movl %r8d, 0x114(%rsp)
movl %r9d, 0x118(%rsp)
movb %al, 0x11c(%rsp)
movb %cl, 0x11d(%rsp)
movb %dl, 0x11e(%rsp)
movb %sil, 0x11f(%rsp)
movb %dil, 0x120(%rsp)
testl %eax, %eax
jne 0x396e
movl $0x1, 0xe0(%rsp)
jmp 0x39a0
movq 0xe0(%rsp), %rdi
leaq 0xf0(%rsp), %rax
cmpq %rax, %rdi
je 0x3923
movq 0xf0(%rsp), %rsi
incq %rsi
callq 0x2190
movq 0x2b0(%rsp), %rdi
cmpq %r13, %rdi
je 0x3940
movq 0x2c0(%rsp), %rsi
incq %rsi
callq 0x2190
movq 0x170(%rsp), %rdi
leaq 0x180(%rsp), %rax
cmpq %rax, %rdi
je 0x4145
movq 0x180(%rsp), %rsi
incq %rsi
callq 0x2190
jmp 0x4145
movl %ebx, %ecx
andl $0x40, %ecx
andl $0x80, %ebx
shrl $0x6, %ecx
testl %ebx, %ebx
movl $0x2, %eax
cmovel %ecx, %eax
movl %eax, 0xe0(%rsp)
shrl $0x7, %ebx
cmpl %ebx, %ecx
je 0x4218
testl %eax, %eax
je 0x4218
movl $0x1, %edx
movq %r12, %rdi
leaq 0x283a(%rip), %rsi      # 0x61e9
callq 0x21c0
movq 0x30(%rsp), %rsi
movq 0x38(%rsp), %rdx
movq %r12, %rdi
callq 0x21c0
movl $0x1, %edx
movq %rax, %rdi
leaq 0x269c(%rip), %rsi      # 0x6071
callq 0x21c0
movl 0x170(%rsp), %esi
movq %r12, %rdi
callq 0x2290
movq %rax, %rbx
movl $0x1, %edx
movq %rax, %rdi
movq %r13, %rsi
callq 0x21c0
movl 0x174(%rsp), %esi
movq %rbx, %rdi
callq 0x2290
movq %rax, %rbx
movl $0x1, %edx
movq %rax, %rdi
movq %r13, %rsi
callq 0x21c0
movl 0x178(%rsp), %esi
movq %rbx, %rdi
callq 0x2290
movq %rax, %rbx
movl $0x1, %edx
movq %rax, %rdi
movq %r13, %rsi
callq 0x21c0
movl 0x17c(%rsp), %esi
movq %rbx, %rdi
callq 0x2290
movq %rax, %rbx
movl $0x1, %edx
movq %rax, %rdi
movq %r13, %rsi
callq 0x21c0
movl 0x180(%rsp), %esi
movq %rbx, %rdi
callq 0x2290
movq %rax, %rbx
movl $0x1, %edx
movq %rax, %rdi
movq %r13, %rsi
callq 0x21c0
movl 0x184(%rsp), %esi
movq %rbx, %rdi
callq 0x2290
movq %rax, %rbx
movl $0x1, %edx
movq %rax, %rdi
movq %r13, %rsi
callq 0x21c0
movl 0x188(%rsp), %esi
movq %rbx, %rdi
callq 0x2290
movq %rax, %rbx
movl $0x1, %edx
movq %rax, %rdi
movq %r13, %rsi
callq 0x21c0
movl 0x18c(%rsp), %esi
movq %rbx, %rdi
callq 0x2290
movq %rax, %rbx
movl $0x1, %edx
movq %rax, %rdi
movq %r13, %rsi
callq 0x21c0
movq 0x190(%rsp), %rsi
movq 0x198(%rsp), %rdx
movq %rbx, %rdi
callq 0x21c0
movq %rax, %rbx
movl $0x1, %edx
movq %rax, %rdi
movq %r13, %rsi
callq 0x21c0
movq 0x1b0(%rsp), %rsi
movq 0x1b8(%rsp), %rdx
movq %rbx, %rdi
callq 0x21c0
movq %rax, %rbx
movl $0x1, %edx
movq %rax, %rdi
movq %r13, %rsi
callq 0x21c0
movl 0x1d0(%rsp), %esi
movq %rbx, %rdi
callq 0x2290
movq %rax, %rbx
movl $0x1, %edx
movq %rax, %rdi
movq %r13, %rsi
callq 0x21c0
movl 0x1d4(%rsp), %esi
movq %rbx, %rdi
callq 0x2290
movq %rax, %rbx
movl $0x1, %edx
movq %rax, %rdi
movq %r13, %rsi
callq 0x21c0
movl 0x1d8(%rsp), %esi
movq %rbx, %rdi
callq 0x2290
movq %rax, %rbx
movl $0x1, %edx
movq %rax, %rdi
movq %r13, %rsi
callq 0x21c0
movq 0x1e0(%rsp), %rsi
movq 0x1e8(%rsp), %rdx
movq %rbx, %rdi
callq 0x21c0
movq %rax, %rbx
movl $0x1, %edx
movq %rax, %rdi
movq %r13, %rsi
callq 0x21c0
movl 0x200(%rsp), %esi
movq %rbx, %rdi
callq 0x2290
movq %rax, %rbx
movl $0x1, %edx
movq %rax, %rdi
movq %r13, %rsi
callq 0x21c0
movl 0x204(%rsp), %esi
movq %rbx, %rdi
callq 0x2290
movq %rax, %rbx
movl $0x1, %edx
movq %rax, %rdi
movq %r13, %rsi
callq 0x21c0
movl 0x208(%rsp), %esi
movq %rbx, %rdi
callq 0x2290
movq %rax, %rbx
movl $0x1, %edx
movq %rax, %rdi
movq %r13, %rsi
callq 0x21c0
movl 0x20c(%rsp), %esi
movq %rbx, %rdi
callq 0x2290
movl $0x1, %edx
movq %rax, %rdi
movq %r13, %rsi
callq 0x21c0
movq 0x210(%rsp), %rax
cmpq %rax, 0x218(%rsp)
je 0x3ca8
xorl %ebx, %ebx
movl (%rax,%rbx,4), %esi
movq %r12, %rdi
callq 0x2290
movl $0x1, %edx
movq %rax, %rdi
leaq 0x2567(%rip), %rsi      # 0x61eb
callq 0x21c0
incq %rbx
movq 0x210(%rsp), %rax
movq 0x218(%rsp), %rcx
subq %rax, %rcx
sarq $0x2, %rcx
cmpq %rbx, %rcx
ja 0x3c6a
movl $0x1, %edx
movq %r12, %rdi
movq %r13, %rsi
callq 0x21c0
movq 0x228(%rsp), %rax
cmpq %rax, 0x230(%rsp)
je 0x3d0a
xorl %ebx, %ebx
movl (%rax,%rbx,4), %esi
movq %r12, %rdi
callq 0x2290
movl $0x1, %edx
movq %rax, %rdi
leaq 0x2505(%rip), %rsi      # 0x61eb
callq 0x21c0
incq %rbx
movq 0x228(%rsp), %rax
movq 0x230(%rsp), %rcx
subq %rax, %rcx
sarq $0x2, %rcx
cmpq %rbx, %rcx
ja 0x3ccc
movl $0x1, %edx
movq %r12, %rdi
movq %r13, %rsi
callq 0x21c0
movq 0x240(%rsp), %rax
cmpq %rax, 0x248(%rsp)
je 0x3d6c
xorl %ebx, %ebx
movl (%rax,%rbx,4), %esi
movq %r12, %rdi
callq 0x2290
movl $0x1, %edx
movq %rax, %rdi
leaq 0x24a3(%rip), %rsi      # 0x61eb
callq 0x21c0
incq %rbx
movq 0x240(%rsp), %rax
movq 0x248(%rsp), %rcx
subq %rax, %rcx
sarq $0x2, %rcx
cmpq %rbx, %rcx
ja 0x3d2e
movl $0x1, %edx
movq %r12, %rdi
movq %r13, %rsi
callq 0x21c0
movl $0x1, %edx
movq %r12, %rdi
leaq 0x2460(%rip), %rsi      # 0x61eb
callq 0x21c0
movl $0x1, %edx
movq %r12, %rdi
movq %r13, %rsi
callq 0x21c0
movl $0x1, %edx
movq %r12, %rdi
leaq 0x243c(%rip), %rsi      # 0x61eb
callq 0x21c0
movl $0x1, %edx
movq %r12, %rdi
movq %r13, %rsi
callq 0x21c0
movl 0xe0(%rsp), %esi
movq %r12, %rdi
callq 0x2290
movq %rax, %rbx
movl $0x1, %edx
movq %rax, %rdi
movq %r13, %rsi
callq 0x21c0
movq 0xe8(%rsp), %rsi
movq 0xf0(%rsp), %rdx
movq %rbx, %rdi
callq 0x21c0
movq %rax, %rbx
movl $0x1, %edx
movq %rax, %rdi
movq %r13, %rsi
callq 0x21c0
movl 0x108(%rsp), %esi
movq %rbx, %rdi
callq 0x2290
movq %rax, %rbx
movl $0x1, %edx
movq %rax, %rdi
movq %r13, %rsi
callq 0x21c0
movl 0x10c(%rsp), %esi
movq %rbx, %rdi
callq 0x2290
movq %rax, %rbx
movl $0x1, %edx
movq %rax, %rdi
movq %r13, %rsi
callq 0x21c0
movl 0x110(%rsp), %esi
movq %rbx, %rdi
callq 0x2290
movq %rax, %rbx
movl $0x1, %edx
movq %rax, %rdi
movq %r13, %rsi
callq 0x21c0
movl 0x114(%rsp), %esi
movq %rbx, %rdi
callq 0x2290
movq %rax, %rbx
movl $0x1, %edx
movq %rax, %rdi
movq %r13, %rsi
callq 0x21c0
movl 0x118(%rsp), %esi
movq %rbx, %rdi
callq 0x2290
movq %rax, %rbx
movl $0x1, %edx
movq %rax, %rdi
movq %r13, %rsi
callq 0x21c0
movzbl 0x11c(%rsp), %eax
leaq 0x2323(%rip), %rcx      # 0x61ed
movb (%rax,%rcx), %al
movb %al, 0xf(%rsp)
movl $0x1, %edx
movq %rbx, %rdi
leaq 0xf(%rsp), %rsi
callq 0x21c0
movq %rax, %rbx
movl $0x1, %edx
movq %rax, %rdi
movq %r13, %rsi
callq 0x21c0
movzbl 0x11d(%rsp), %eax
leaq 0x2295(%rip), %rcx      # 0x619a
movb (%rax,%rcx), %al
movb %al, 0xf(%rsp)
movl $0x1, %edx
movq %rbx, %rdi
leaq 0xf(%rsp), %rsi
callq 0x21c0
movq %rax, %rbx
movl $0x1, %edx
movq %rax, %rdi
movq %r13, %rsi
callq 0x21c0
movzbl 0x11e(%rsp), %eax
leaq 0x22b0(%rip), %rcx      # 0x61f0
movb (%rax,%rcx), %al
movb %al, 0xf(%rsp)
movl $0x1, %edx
movq %rbx, %rdi
leaq 0xf(%rsp), %rsi
callq 0x21c0
movq %rax, %rbx
movl $0x1, %edx
movq %rax, %rdi
movq %r13, %rsi
callq 0x21c0
movzbl 0x11f(%rsp), %eax
leaq 0x2278(%rip), %rcx      # 0x61f3
movb (%rax,%rcx), %al
movb %al, 0xf(%rsp)
movl $0x1, %edx
movq %rbx, %rdi
leaq 0xf(%rsp), %rsi
callq 0x21c0
movq %rax, %rbx
movl $0x1, %edx
movq %rax, %rdi
movq %r13, %rsi
callq 0x21c0
movzbl 0x120(%rsp), %eax
leaq 0x2240(%rip), %rcx      # 0x61f6
movb (%rax,%rcx), %al
movb %al, 0xf(%rsp)
movl $0x1, %edx
movq %rbx, %rdi
leaq 0xf(%rsp), %rsi
callq 0x21c0
movq (%r12), %rax
movq -0x18(%rax), %rdi
addq %r12, %rdi
movl $0xa, %esi
callq 0x2170
movsbl %al, %esi
movq %r12, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2110
movq 0xc8(%rsp), %rdi
testq %rdi, %rdi
je 0x4014
movq 0xd8(%rsp), %rsi
subq %rdi, %rsi
callq 0x2190
movq 0xb0(%rsp), %rdi
testq %rdi, %rdi
movl $0x0, %ebx
leaq 0x470(%rsp), %r12
je 0x403e
movq 0xc0(%rsp), %rsi
subq %rdi, %rsi
callq 0x2190
movq 0x98(%rsp), %rdi
testq %rdi, %rdi
leaq 0x2c0(%rsp), %r13
je 0x4063
movq 0xa8(%rsp), %rsi
subq %rdi, %rsi
callq 0x2190
movq 0x80(%rsp), %rdi
testq %rdi, %rdi
je 0x4080
movq 0x90(%rsp), %rsi
subq %rdi, %rsi
callq 0x2190
movq 0x158(%rsp), %rdi
testq %rdi, %rdi
je 0x409d
movq 0x168(%rsp), %rsi
subq %rdi, %rsi
callq 0x2190
movq 0x140(%rsp), %rdi
testq %rdi, %rdi
je 0x40ba
movq 0x150(%rsp), %rsi
subq %rdi, %rsi
callq 0x2190
movq 0x128(%rsp), %rdi
testq %rdi, %rdi
je 0x40d7
movq 0x138(%rsp), %rsi
subq %rdi, %rsi
callq 0x2190
movq 0xe8(%rsp), %rdi
leaq 0xf8(%rsp), %rax
cmpq %rax, %rdi
je 0x40fc
movq 0xf8(%rsp), %rsi
incq %rsi
callq 0x2190
leaq 0x2b0(%rsp), %rdi
callq 0x45a6
leaq 0x170(%rsp), %rdi
callq 0x466a
movq 0x290(%rsp), %rdi
leaq 0x2a0(%rsp), %rax
cmpq %rax, %rdi
je 0x413b
movq 0x2a0(%rsp), %rsi
incq %rsi
callq 0x2190
leaq 0x10(%rsp), %rdi
callq 0x4726
movq %r14, %rdi
movq 0x3e71(%rip), %rsi      # 0x7fc0
callq 0x2210
movq %r12, %rdi
callq 0x2080
movq 0x3e75(%rip), %rbp      # 0x7fd8
jmp 0x2b55
leaq 0x3c8(%rsp), %rdi
callq 0x478c
movq 0x30(%rsp), %rdi
leaq 0x40(%rsp), %rax
cmpq %rax, %rdi
je 0x4191
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x2190
xorl %eax, %eax
addq $0x578, %rsp            # imm = 0x578
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x3e44(%rip), %rdi      # 0x7ff0
leaq 0x2002(%rip), %rsi      # 0x61b5
movl $0x24, %edx
callq 0x21c0
movq 0x30(%rsp), %rsi
movq 0x38(%rsp), %rdx
movq 0x3e22(%rip), %rdi      # 0x7ff0
callq 0x21c0
movq %rax, %rdi
callq 0x20c0
movq 0x350(%rsp), %rsi
movq %rax, %rdi
callq 0x2100
movq %rax, %rbx
leaq 0x1e7a(%rip), %rsi      # 0x606f
movl $0x1, %edx
movq %rax, %rdi
callq 0x21c0
movl 0x78(%rsp), %esi
movq %rbx, %rdi
callq 0x2290
movq %rax, %rdi
callq 0x20c0
jmp 0x4256
movq 0x3dd1(%rip), %rdi      # 0x7ff0
leaq 0x1fb8(%rip), %rsi      # 0x61de
movl $0xa, %edx
callq 0x21c0
movq 0x3db9(%rip), %rdi      # 0x7ff0
callq 0x20c0
movq 0x30(%rsp), %rsi
movq 0x38(%rsp), %rdx
movq %rax, %rdi
callq 0x21c0
movq %rax, %rdi
callq 0x20c0
movl $0x1, %edi
callq 0x21d0
jmp 0x4271
jmp 0x4271
jmp 0x4271
jmp 0x4301
jmp 0x42ec
jmp 0x42ec
jmp 0x42ec
movq %rax, %rbx
movq 0xe0(%rsp), %rdi
leaq 0xf0(%rsp), %rax
cmpq %rax, %rdi
je 0x4299
movq 0xf0(%rsp), %rsi
incq %rsi
callq 0x2190
movq 0x2b0(%rsp), %rdi
cmpq %r13, %rdi
je 0x42b6
movq 0x2c0(%rsp), %rsi
incq %rsi
callq 0x2190
movq 0x170(%rsp), %rdi
leaq 0x180(%rsp), %rax
cmpq %rax, %rdi
je 0x4369
movq 0x180(%rsp), %rsi
incq %rsi
callq 0x2190
jmp 0x4369
jmp 0x42f3
jmp 0x42ec
jmp 0x42ec
jmp 0x42ec
movq %rax, %rbx
jmp 0x430e
jmp 0x4301
movq %rax, %rbx
jmp 0x438a
jmp 0x4301
jmp 0x4301
jmp 0x4301
movq %rax, %rbx
leaq 0x50(%rsp), %rdi
callq 0x44e6
leaq 0xe0(%rsp), %rdi
callq 0x4544
leaq 0x2b0(%rsp), %rdi
callq 0x45a6
leaq 0x170(%rsp), %rdi
callq 0x466a
jmp 0x433a
movq %rax, %rbx
movq 0x290(%rsp), %rdi
leaq 0x2a0(%rsp), %rax
cmpq %rax, %rdi
je 0x435f
movq 0x2a0(%rsp), %rsi
incq %rsi
callq 0x2190
leaq 0x10(%rsp), %rdi
callq 0x4726
movq 0x3c50(%rip), %rsi      # 0x7fc0
leaq 0x3f8(%rsp), %rdi
callq 0x2210
leaq 0x470(%rsp), %rdi
callq 0x2080
leaq 0x3c8(%rsp), %rdi
callq 0x478c
movq 0x30(%rsp), %rdi
leaq 0x40(%rsp), %rax
cmpq %rax, %rdi
je 0x43b3
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x2190
movq %rbx, %rdi
callq 0x22b0
nop