// File: millanek[P]evo/process_vcf_utils.cpp
// Function: getThisVariantCounts(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>> const&)
Counts getThisVariantCounts(const std::vector<std::string>& fields) {
    Counts thisVariantCounts;
    bool hasGQ = false; bool hasDP = false;
    thisVariantCounts.individualsWithVariant.assign((fields.size()-NUM_NON_GENOTYPE_COLUMNS),0);
    thisVariantCounts.haplotypesWithVariant.assign((fields.size()-NUM_NON_GENOTYPE_COLUMNS)*2,0);
    //std::cerr << "Fields: " << (fields.size()-NUM_NON_GENOTYPE_COLUMNS) << std::endl;
    // Find the position of DP (per sample read depth) in the genotypeData vector below
    std::vector<std::string> format = split(fields[8], ':');
    std::vector<std::string>::iterator DPit; int DPi = std::numeric_limits<int>::min();
    DPit = find (format.begin(), format.end(), "DP");
    if (DPit == format.end()) {
        // std::cerr << "This variant hasn't got associated per-sample DP info" << std::endl;
    } else {
        DPi = (int)std::distance( format.begin(), DPit );
        hasDP = true;
    }
    // Find the position of GQ (genotype quality) in the genotypeData vector below
    std::vector<std::string>::iterator GQit; int GQi = std::numeric_limits<int>::min();
    GQit = find (format.begin(), format.end(), "GQ");
    if (GQit == format.end()) {
        // std::cerr << "This variant hasn't got associated per-sample GQ info" << std::endl;
    } else {
        GQi = (int)std::distance( format.begin(), GQit );
        hasGQ = true;
    }
    
    if (fields[NUM_NON_GENOTYPE_COLUMNS][1] == '|') { thisVariantCounts.bPhased = true; }
    
    for (std::vector<std::string>::size_type i = NUM_NON_GENOTYPE_COLUMNS; i != fields.size(); i++) {
        char v1 = fields[i][0]; char v2 = fields[i][2];
        if (v1 == '.' || v2 == '.') {
            thisVariantCounts.bAnyMissingGenotypes = true;
            thisVariantCounts.missingGenotypesPerIndividual[i- NUM_NON_GENOTYPE_COLUMNS] = true;
        }
        if (thisVariantCounts.bPhased == false) {
            if ((v1 == '0' && v2 == '1') || (v1 == '1' && v2 == '0')) {
            double r = ((double) rand() / (RAND_MAX));
            if (r > 0.5) {
                v1 = '0'; v2 = '1';
            } else {
                v1 = '1'; v2 = '0';
            }
            }
        }
        
        if (v1 == '1') {
            thisVariantCounts.overall++;
            thisVariantCounts.individualsWithVariant[i- NUM_NON_GENOTYPE_COLUMNS]++;
            thisVariantCounts.haplotypesWithVariant[2*(i-NUM_NON_GENOTYPE_COLUMNS)]++;
        }
        if (v2 == '1') {
            thisVariantCounts.overall++;
            thisVariantCounts.individualsWithVariant[i-NUM_NON_GENOTYPE_COLUMNS]++;
            thisVariantCounts.haplotypesWithVariant[2*(i-NUM_NON_GENOTYPE_COLUMNS)+1]++;
        }
            
        std::vector<std::string> genotypeData = split(fields[i], ':');
        
        // read depth at the variant site per individual
        if (hasDP && fields[i][0] != '.') {
            if (atoi(genotypeData[DPi].c_str()) < thisVariantCounts.minimumDepthInAnIndividual) {
                thisVariantCounts.minimumDepthInAnIndividual = atoi(genotypeData[DPi].c_str());
            }
            thisVariantCounts.depthPerIndividual.push_back(atoi(genotypeData[DPi].c_str()));
        }
        // genotype quality at the variant site per individual
        if (hasGQ && fields[i][0] != '.') {
            thisVariantCounts.genotypeQualitiesPerIndividual.push_back(atoi(genotypeData[GQi].c_str()));
        }
    }
    // Also get overall depth for this variant
    std::vector<std::string> info = split(fields[7], ';');
    std::vector<std::string>::iterator overallDPit; int overallDPi = std::numeric_limits<int>::min();
    overallDPit = find_if(info.begin(), info.end(), isDPinfo);
    if (overallDPit == info.end()) {
        // std::cerr << "This variant hasn't got associated overall DP info" << std::endl;
        thisVariantCounts.overallDepth = 0;
    } else {
        overallDPi = (int)std::distance( info.begin(), overallDPit );
        std::vector<std::string> overallDP = split(info[overallDPi], '=');
        thisVariantCounts.overallDepth = atoi((overallDP.back()).c_str());
    }
    
    // Find the position of SGB (Segregation based metric) in the genotypeData vector below
    std::vector<std::string>::iterator SGBit; int SGBi = std::numeric_limits<int>::min();
    SGBit = find_if(format.begin(), format.end(), isSGBinfo);
    if (SGBit != format.end()) {
        // std::cerr << "This variant hasn't got associated per-sample GQ info" << std::endl;
    } else {
        SGBi = (int)std::distance( format.begin(), SGBit );
        std::vector<std::string> overallSGB = split(info[SGBi], '=');
        thisVariantCounts.SGB = stringToDouble(overallSGB.back());
    }
    
    // And get FS (phred-scaled strand-bias p-val) for this variant
    std::vector<std::string>::iterator FSit; int FSi = std::numeric_limits<int>::min();
    FSit = find_if(info.begin(), info.end(), isFSinfo);
    if (FSit == info.end()) {  // Or at least MQSB: Mann-Whitney U test of Mapping Quality vs Strand Bias
        FSit = find_if(info.begin(), info.end(), isMQSBinfo);
        if (FSit != info.end()) {
            FSi = (int)std::distance( info.begin(), FSit );
            std::vector<std::string> overallFS = split(info[FSi], '=');
            thisVariantCounts.MQSBpval = overallFS.back();
        } else {
            // std::cerr << "This variant hasn't got associated FS (strand-bias) info" << std::endl;
        }
    } else {
        FSi = (int)std::distance( info.begin(), FSit );
        std::vector<std::string> overallFS = split(info[FSi], '=');
        thisVariantCounts.FSpval =  overallFS.back();
    }

    // And the inbreeding coefficient
    thisVariantCounts.inbreedingCoefficient = calculateInbreedingCoefficient(thisVariantCounts.individualsWithVariant);
    
    return thisVariantCounts;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x370, %rsp            # imm = 0x370
movq %rdi, -0x2a0(%rbp)
movq %rdi, %rax
movq %rax, -0x2a8(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movb $0x0, -0x11(%rbp)
callq 0x3d960
movq -0x2a0(%rbp), %rdi
movb $0x0, -0x12(%rbp)
movb $0x0, -0x13(%rbp)
addq $0x70, %rdi
movq %rdi, -0x298(%rbp)
movq -0x10(%rbp), %rdi
callq 0x3ffd0
movq -0x298(%rbp), %rdi
movq %rax, %rsi
addq $-0x9, %rsi
movl $0x0, -0x18(%rbp)
leaq -0x18(%rbp), %rdx
callq 0x838d0
jmp 0x7d380
movq -0x2a0(%rbp), %rax
addq $0xb8, %rax
movq %rax, -0x2b0(%rbp)
movq -0x10(%rbp), %rdi
callq 0x3ffd0
movq -0x2b0(%rbp), %rdi
leaq -0x12(%rax,%rax), %rsi
movl $0x0, -0x28(%rbp)
leaq -0x28(%rbp), %rdx
callq 0x838d0
jmp 0x7d3bb
movq -0x10(%rbp), %rdi
movl $0x8, %esi
callq 0x52960
movq %rax, %rsi
leaq -0x40(%rbp), %rdi
movl $0x3a, %edx
callq 0x7bbe0
jmp 0x7d3dc
leaq -0x48(%rbp), %rdi
callq 0x839a0
callq 0x353a0
movl %eax, -0x4c(%rbp)
leaq -0x40(%rbp), %rdi
movq %rdi, -0x2c0(%rbp)
callq 0x44030
movq -0x2c0(%rbp), %rdi
movq %rax, -0x60(%rbp)
callq 0x44060
movq %rax, -0x68(%rbp)
movq -0x60(%rbp), %rdi
movq -0x68(%rbp), %rsi
leaq 0xbdec2(%rip), %rdx     # 0x13b2e2
callq 0x839c0
movq %rax, -0x2b8(%rbp)
jmp 0x7d42e
movq -0x2b8(%rbp), %rax
movq %rax, -0x58(%rbp)
movq -0x58(%rbp), %rax
movq %rax, -0x48(%rbp)
leaq -0x40(%rbp), %rdi
callq 0x44060
movq %rax, -0x70(%rbp)
leaq -0x48(%rbp), %rdi
leaq -0x70(%rbp), %rsi
callq 0x83a10
testb $0x1, %al
jne 0x7d461
jmp 0x7d485
jmp 0x7d4be
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
jmp 0x7e087
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
jmp 0x7e060
leaq -0x40(%rbp), %rdi
callq 0x44030
movq %rax, -0x78(%rbp)
movq -0x48(%rbp), %rax
movq %rax, -0x80(%rbp)
movq -0x78(%rbp), %rdi
movq -0x80(%rbp), %rsi
callq 0x75450
movq %rax, -0x2c8(%rbp)
jmp 0x7d4b0
movq -0x2c8(%rbp), %rax
movl %eax, -0x4c(%rbp)
movb $0x1, -0x13(%rbp)
leaq -0x88(%rbp), %rdi
callq 0x839a0
callq 0x353a0
movl %eax, -0x8c(%rbp)
leaq -0x40(%rbp), %rdi
movq %rdi, -0x2d8(%rbp)
callq 0x44030
movq -0x2d8(%rbp), %rdi
movq %rax, -0xa0(%rbp)
callq 0x44060
movq %rax, -0xa8(%rbp)
movq -0xa0(%rbp), %rdi
movq -0xa8(%rbp), %rsi
leaq 0xbddd1(%rip), %rdx     # 0x13b2e5
callq 0x839c0
movq %rax, -0x2d0(%rbp)
jmp 0x7d522
movq -0x2d0(%rbp), %rax
movq %rax, -0x98(%rbp)
movq -0x98(%rbp), %rax
movq %rax, -0x88(%rbp)
leaq -0x40(%rbp), %rdi
callq 0x44060
movq %rax, -0xb0(%rbp)
leaq -0x88(%rbp), %rdi
leaq -0xb0(%rbp), %rsi
callq 0x83a10
testb $0x1, %al
jne 0x7d567
jmp 0x7d569
jmp 0x7d5b4
leaq -0x40(%rbp), %rdi
callq 0x44030
movq %rax, -0xb8(%rbp)
movq -0x88(%rbp), %rax
movq %rax, -0xc0(%rbp)
movq -0xb8(%rbp), %rdi
movq -0xc0(%rbp), %rsi
callq 0x75450
movq %rax, -0x2e0(%rbp)
jmp 0x7d5a3
movq -0x2e0(%rbp), %rax
movl %eax, -0x8c(%rbp)
movb $0x1, -0x12(%rbp)
movq -0x10(%rbp), %rdi
movl $0x9, %esi
callq 0x52960
movq %rax, %rdi
movl $0x1, %esi
callq 0xa670
movsbl (%rax), %eax
cmpl $0x7c, %eax
jne 0x7d5e2
movq -0x2a0(%rbp), %rax
movb $0x1, 0x68(%rax)
movq $0x9, -0xc8(%rbp)
movq -0xc8(%rbp), %rax
movq %rax, -0x2e8(%rbp)
movq -0x10(%rbp), %rdi
callq 0x3ffd0
movq %rax, %rcx
movq -0x2e8(%rbp), %rax
cmpq %rcx, %rax
je 0x7d9f4
movq -0x10(%rbp), %rdi
movq -0xc8(%rbp), %rsi
callq 0x52960
movq %rax, %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0xa670
movb (%rax), %al
movb %al, -0xc9(%rbp)
movq -0x10(%rbp), %rdi
movq -0xc8(%rbp), %rsi
callq 0x52960
movq %rax, %rdi
movl $0x2, %esi
callq 0xa670
movb (%rax), %al
movb %al, -0xca(%rbp)
movsbl -0xc9(%rbp), %eax
cmpl $0x2e, %eax
je 0x7d678
movsbl -0xca(%rbp), %eax
cmpl $0x2e, %eax
jne 0x7d6da
movq -0x2a0(%rbp), %rdi
movb $0x1, 0xf8(%rdi)
addq $0xd0, %rdi
movq -0xc8(%rbp), %rsi
addq $-0x9, %rsi
callq 0x83940
movq %rdx, -0x2f8(%rbp)
movq %rax, -0x2f0(%rbp)
jmp 0x7d6ad
movq -0x2f8(%rbp), %rax
movq -0x2f0(%rbp), %rcx
movq %rcx, -0xe0(%rbp)
movq %rax, -0xd8(%rbp)
leaq -0xe0(%rbp), %rdi
movl $0x1, %esi
callq 0x480d0
movq -0x2a0(%rbp), %rax
movb 0x68(%rax), %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
jne 0x7d777
movsbl -0xc9(%rbp), %eax
cmpl $0x30, %eax
jne 0x7d70a
movsbl -0xca(%rbp), %eax
cmpl $0x31, %eax
je 0x7d722
movsbl -0xc9(%rbp), %eax
cmpl $0x31, %eax
jne 0x7d775
movsbl -0xca(%rbp), %eax
cmpl $0x30, %eax
jne 0x7d775
callq 0xa180
cvtsi2sd %eax, %xmm0
movsd 0xbd9f5(%rip), %xmm1    # 0x13b128
divsd %xmm1, %xmm0
movsd %xmm0, -0xe8(%rbp)
movsd -0xe8(%rbp), %xmm0
movsd 0xb09b9(%rip), %xmm1    # 0x12e108
ucomisd %xmm1, %xmm0
jbe 0x7d765
movb $0x30, -0xc9(%rbp)
movb $0x31, -0xca(%rbp)
jmp 0x7d773
movb $0x31, -0xc9(%rbp)
movb $0x30, -0xca(%rbp)
jmp 0x7d775
jmp 0x7d777
movsbl -0xc9(%rbp), %eax
cmpl $0x31, %eax
jne 0x7d7d4
movq -0x2a0(%rbp), %rdi
movl (%rdi), %eax
addl $0x1, %eax
movl %eax, (%rdi)
addq $0x70, %rdi
movq -0xc8(%rbp), %rsi
subq $0x9, %rsi
callq 0x4d100
movq -0x2a0(%rbp), %rdi
movl (%rax), %ecx
addl $0x1, %ecx
movl %ecx, (%rax)
addq $0xb8, %rdi
movq -0xc8(%rbp), %rsi
subq $0x9, %rsi
shlq %rsi
callq 0x4d100
movl (%rax), %ecx
addl $0x1, %ecx
movl %ecx, (%rax)
movsbl -0xca(%rbp), %eax
cmpl $0x31, %eax
jne 0x7d835
movq -0x2a0(%rbp), %rdi
movl (%rdi), %eax
addl $0x1, %eax
movl %eax, (%rdi)
addq $0x70, %rdi
movq -0xc8(%rbp), %rsi
subq $0x9, %rsi
callq 0x4d100
movq -0x2a0(%rbp), %rdi
movl (%rax), %ecx
addl $0x1, %ecx
movl %ecx, (%rax)
addq $0xb8, %rdi
movq -0xc8(%rbp), %rsi
subq $0x9, %rsi
shlq %rsi
addq $0x1, %rsi
callq 0x4d100
movl (%rax), %ecx
addl $0x1, %ecx
movl %ecx, (%rax)
movq -0x10(%rbp), %rdi
movq -0xc8(%rbp), %rsi
callq 0x52960
movq %rax, %rsi
leaq -0x100(%rbp), %rdi
movl $0x3a, %edx
callq 0x7bbe0
jmp 0x7d85b
testb $0x1, -0x13(%rbp)
je 0x7d953
movq -0x10(%rbp), %rdi
movq -0xc8(%rbp), %rsi
callq 0x52960
movq %rax, %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0xa670
movsbl (%rax), %eax
cmpl $0x2e, %eax
je 0x7d953
movslq -0x4c(%rbp), %rsi
leaq -0x100(%rbp), %rdi
callq 0x3d940
movq %rax, %rdi
callq 0xa220
movq %rax, %rdi
callq 0xa970
movq -0x2a0(%rbp), %rcx
cmpl 0x4(%rcx), %eax
jge 0x7d8e5
movslq -0x4c(%rbp), %rsi
leaq -0x100(%rbp), %rdi
callq 0x3d940
movq %rax, %rdi
callq 0xa220
movq %rax, %rdi
callq 0xa970
movl %eax, %ecx
movq -0x2a0(%rbp), %rax
movl %ecx, 0x4(%rax)
movq -0x2a0(%rbp), %rax
addq $0x88, %rax
movq %rax, -0x300(%rbp)
movslq -0x4c(%rbp), %rsi
leaq -0x100(%rbp), %rdi
callq 0x3d940
movq %rax, %rdi
callq 0xa220
movq %rax, %rdi
callq 0xa970
movq -0x300(%rbp), %rdi
movl %eax, -0x104(%rbp)
leaq -0x104(%rbp), %rsi
callq 0x4ce80
jmp 0x7d934
jmp 0x7d953
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
leaq -0x100(%rbp), %rdi
callq 0x3dfa0
jmp 0x7e060
testb $0x1, -0x12(%rbp)
je 0x7d9d1
movq -0x10(%rbp), %rdi
movq -0xc8(%rbp), %rsi
callq 0x52960
movq %rax, %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0xa670
movsbl (%rax), %eax
cmpl $0x2e, %eax
je 0x7d9d1
movq -0x2a0(%rbp), %rax
addq $0xa0, %rax
movq %rax, -0x308(%rbp)
movslq -0x8c(%rbp), %rsi
leaq -0x100(%rbp), %rdi
callq 0x3d940
movq %rax, %rdi
callq 0xa220
movq %rax, %rdi
callq 0xa970
movq -0x308(%rbp), %rdi
movl %eax, -0x108(%rbp)
leaq -0x108(%rbp), %rsi
callq 0x4ce80
jmp 0x7d9cf
jmp 0x7d9d1
leaq -0x100(%rbp), %rdi
callq 0x3dfa0
movq -0xc8(%rbp), %rax
addq $0x1, %rax
movq %rax, -0xc8(%rbp)
jmp 0x7d5ed
movq -0x10(%rbp), %rdi
movl $0x7, %esi
callq 0x52960
movq %rax, %rsi
leaq -0x120(%rbp), %rdi
movl $0x3b, %edx
callq 0x7bbe0
jmp 0x7da18
leaq -0x128(%rbp), %rdi
callq 0x839a0
callq 0x353a0
movl %eax, -0x12c(%rbp)
leaq -0x120(%rbp), %rdi
movq %rdi, -0x318(%rbp)
callq 0x44030
movq -0x318(%rbp), %rdi
movq %rax, -0x140(%rbp)
callq 0x44060
movq %rax, -0x148(%rbp)
movq -0x140(%rbp), %rdi
movq -0x148(%rbp), %rsi
leaq -0x1b91(%rip), %rdx     # 0x7bee0
callq 0x83a50
movq %rax, -0x310(%rbp)
jmp 0x7da7f
movq -0x310(%rbp), %rax
movq %rax, -0x138(%rbp)
movq -0x138(%rbp), %rax
movq %rax, -0x128(%rbp)
leaq -0x120(%rbp), %rdi
callq 0x44060
movq %rax, -0x150(%rbp)
leaq -0x128(%rbp), %rdi
leaq -0x150(%rbp), %rsi
callq 0x83a10
testb $0x1, %al
jne 0x7dac7
jmp 0x7daeb
movq -0x2a0(%rbp), %rax
movl $0x0, 0x8(%rax)
jmp 0x7db92
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
jmp 0x7e054
leaq -0x120(%rbp), %rdi
callq 0x44030
movq %rax, -0x158(%rbp)
movq -0x128(%rbp), %rax
movq %rax, -0x160(%rbp)
movq -0x158(%rbp), %rdi
movq -0x160(%rbp), %rsi
callq 0x75450
movq %rax, -0x320(%rbp)
jmp 0x7db28
movq -0x320(%rbp), %rax
movl %eax, -0x12c(%rbp)
movslq -0x12c(%rbp), %rsi
leaq -0x120(%rbp), %rdi
callq 0x3d940
movq %rax, %rsi
leaq -0x178(%rbp), %rdi
movl $0x3d, %edx
callq 0x7bbe0
jmp 0x7db5e
leaq -0x178(%rbp), %rdi
callq 0x5fcc0
movq %rax, %rdi
callq 0xa220
movq %rax, %rdi
callq 0xa970
movl %eax, %ecx
movq -0x2a0(%rbp), %rax
movl %ecx, 0x8(%rax)
leaq -0x178(%rbp), %rdi
callq 0x3dfa0
leaq -0x180(%rbp), %rdi
callq 0x839a0
callq 0x353a0
movl %eax, -0x184(%rbp)
leaq -0x40(%rbp), %rdi
movq %rdi, -0x330(%rbp)
callq 0x44030
movq -0x330(%rbp), %rdi
movq %rax, -0x198(%rbp)
callq 0x44060
movq %rax, -0x1a0(%rbp)
movq -0x198(%rbp), %rdi
movq -0x1a0(%rbp), %rsi
leaq -0x1c48(%rip), %rdx     # 0x7bfa0
callq 0x83a50
movq %rax, -0x328(%rbp)
jmp 0x7dbf6
movq -0x328(%rbp), %rax
movq %rax, -0x190(%rbp)
movq -0x190(%rbp), %rax
movq %rax, -0x180(%rbp)
leaq -0x40(%rbp), %rdi
callq 0x44060
movq %rax, -0x1a8(%rbp)
leaq -0x180(%rbp), %rdi
leaq -0x1a8(%rbp), %rsi
callq 0x44190
testb $0x1, %al
jne 0x7dc3b
jmp 0x7dc40
jmp 0x7dd48
leaq -0x40(%rbp), %rdi
callq 0x44030
movq %rax, -0x1b0(%rbp)
movq -0x180(%rbp), %rax
movq %rax, -0x1b8(%rbp)
movq -0x1b0(%rbp), %rdi
movq -0x1b8(%rbp), %rsi
callq 0x75450
movq %rax, -0x338(%rbp)
jmp 0x7dc7a
movq -0x338(%rbp), %rax
movl %eax, -0x184(%rbp)
movslq -0x184(%rbp), %rsi
leaq -0x120(%rbp), %rdi
callq 0x3d940
movq %rax, %rsi
leaq -0x1d0(%rbp), %rdi
movl $0x3d, %edx
callq 0x7bbe0
jmp 0x7dcb0
leaq -0x1d0(%rbp), %rdi
callq 0x5fcc0
movq %rax, %rsi
leaq -0x1f0(%rbp), %rdi
callq 0xa250
jmp 0x7dccd
leaq -0x1f0(%rbp), %rdi
callq 0x7bab0
movsd %xmm0, -0x340(%rbp)
jmp 0x7dce3
movq -0x2a0(%rbp), %rax
movsd -0x340(%rbp), %xmm0
movsd %xmm0, 0x50(%rax)
leaq -0x1f0(%rbp), %rdi
callq 0xac88
leaq -0x1d0(%rbp), %rdi
callq 0x3dfa0
jmp 0x7dd48
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
jmp 0x7dd37
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
leaq -0x1f0(%rbp), %rdi
callq 0xac88
leaq -0x1d0(%rbp), %rdi
callq 0x3dfa0
jmp 0x7e054
leaq -0x1f8(%rbp), %rdi
callq 0x839a0
callq 0x353a0
movl %eax, -0x1fc(%rbp)
leaq -0x120(%rbp), %rdi
movq %rdi, -0x350(%rbp)
callq 0x44030
movq -0x350(%rbp), %rdi
movq %rax, -0x210(%rbp)
callq 0x44060
movq %rax, -0x218(%rbp)
movq -0x210(%rbp), %rdi
movq -0x218(%rbp), %rsi
leaq -0x1e81(%rip), %rdx     # 0x7bf20
callq 0x83a50
movq %rax, -0x348(%rbp)
jmp 0x7ddaf
movq -0x348(%rbp), %rax
movq %rax, -0x208(%rbp)
movq -0x208(%rbp), %rax
movq %rax, -0x1f8(%rbp)
leaq -0x120(%rbp), %rdi
callq 0x44060
movq %rax, -0x220(%rbp)
leaq -0x1f8(%rbp), %rdi
leaq -0x220(%rbp), %rsi
callq 0x83a10
testb $0x1, %al
jne 0x7ddfa
jmp 0x7df5b
leaq -0x120(%rbp), %rdi
movq %rdi, -0x360(%rbp)
callq 0x44030
movq -0x360(%rbp), %rdi
movq %rax, -0x230(%rbp)
callq 0x44060
movq %rax, -0x238(%rbp)
movq -0x230(%rbp), %rdi
movq -0x238(%rbp), %rsi
leaq -0x1edc(%rip), %rdx     # 0x7bf60
callq 0x83a50
movq %rax, -0x358(%rbp)
jmp 0x7de4a
movq -0x358(%rbp), %rax
movq %rax, -0x228(%rbp)
movq -0x228(%rbp), %rax
movq %rax, -0x1f8(%rbp)
leaq -0x120(%rbp), %rdi
callq 0x44060
movq %rax, -0x240(%rbp)
leaq -0x1f8(%rbp), %rdi
leaq -0x240(%rbp), %rsi
callq 0x44190
testb $0x1, %al
jne 0x7de95
jmp 0x7df54
leaq -0x120(%rbp), %rdi
callq 0x44030
movq %rax, -0x248(%rbp)
movq -0x1f8(%rbp), %rax
movq %rax, -0x250(%rbp)
movq -0x248(%rbp), %rdi
movq -0x250(%rbp), %rsi
callq 0x75450
movq %rax, -0x368(%rbp)
jmp 0x7ded2
movq -0x368(%rbp), %rax
movl %eax, -0x1fc(%rbp)
movslq -0x1fc(%rbp), %rsi
leaq -0x120(%rbp), %rdi
callq 0x3d940
movq %rax, %rsi
leaq -0x268(%rbp), %rdi
movl $0x3d, %edx
callq 0x7bbe0
jmp 0x7df08
leaq -0x268(%rbp), %rdi
callq 0x5fcc0
movq -0x2a0(%rbp), %rdi
movq %rax, %rsi
addq $0x30, %rdi
callq 0xa060
jmp 0x7df29
leaq -0x268(%rbp), %rdi
callq 0x3dfa0
jmp 0x7df56
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
leaq -0x268(%rbp), %rdi
callq 0x3dfa0
jmp 0x7e054
jmp 0x7df56
jmp 0x7e017
leaq -0x120(%rbp), %rdi
callq 0x44030
movq %rax, -0x270(%rbp)
movq -0x1f8(%rbp), %rax
movq %rax, -0x278(%rbp)
movq -0x270(%rbp), %rdi
movq -0x278(%rbp), %rsi
callq 0x75450
movq %rax, -0x370(%rbp)
jmp 0x7df98
movq -0x370(%rbp), %rax
movl %eax, -0x1fc(%rbp)
movslq -0x1fc(%rbp), %rsi
leaq -0x120(%rbp), %rdi
callq 0x3d940
movq %rax, %rsi
leaq -0x290(%rbp), %rdi
movl $0x3d, %edx
callq 0x7bbe0
jmp 0x7dfce
leaq -0x290(%rbp), %rdi
callq 0x5fcc0
movq -0x2a0(%rbp), %rdi
movq %rax, %rsi
addq $0x10, %rdi
callq 0xa060
jmp 0x7dfef
leaq -0x290(%rbp), %rdi
callq 0x3dfa0
jmp 0x7e017
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
leaq -0x290(%rbp), %rdi
callq 0x3dfa0
jmp 0x7e054
movq -0x2a0(%rbp), %rdi
addq $0x70, %rdi
callq 0x7bfe0
movq -0x2a0(%rbp), %rax
movsd %xmm0, 0x58(%rax)
movb $0x1, -0x11(%rbp)
leaq -0x120(%rbp), %rdi
callq 0x3dfa0
leaq -0x40(%rbp), %rdi
callq 0x3dfa0
testb $0x1, -0x11(%rbp)
jne 0x7e077
jmp 0x7e06b
leaq -0x120(%rbp), %rdi
callq 0x3dfa0
leaq -0x40(%rbp), %rdi
callq 0x3dfa0
jmp 0x7e087
movq -0x2a0(%rbp), %rdi
callq 0x3df20
movq -0x2a8(%rbp), %rax
addq $0x370, %rsp            # imm = 0x370
popq %rbp
retq
movq -0x2a0(%rbp), %rdi
callq 0x3df20
movq -0x20(%rbp), %rdi
callq 0xab50
nopl (%rax)