// File: millanek[P]evo/process_vcf_utils.cpp
// Function: GeneralSetCounts::checkForGenotypeLikelihoodsOrProbabilities(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&)
int GeneralSetCounts::checkForGenotypeLikelihoodsOrProbabilities(const std::vector<std::string>& vcfLineFields) {
    std::vector<std::string> format = split(vcfLineFields[8], ':');
    if (format.size() == 1) return LikelihoodsProbabilitiesAbsent; // The GT tag must be present in the first place
    
    int likelihoodsOrProbabilitiesTagPosition = returnFormatTagPosition(format, "GP");
    if (likelihoodsOrProbabilitiesTagPosition != std::numeric_limits<int>::min()) { likelihoodsProbabilitiesType = LikelihoodsProbabilitiesGP; }
    else {
        likelihoodsOrProbabilitiesTagPosition = returnFormatTagPosition(format, "GL");
        if (likelihoodsOrProbabilitiesTagPosition != std::numeric_limits<int>::min()) { likelihoodsProbabilitiesType = LikelihoodsProbabilitiesGL; }
        else {
            likelihoodsOrProbabilitiesTagPosition = returnFormatTagPosition(format, "PL");
            if (likelihoodsOrProbabilitiesTagPosition != std::numeric_limits<int>::min()) { likelihoodsProbabilitiesType = LikelihoodsProbabilitiesPL; }
        }
    }
    return likelihoodsOrProbabilitiesTagPosition;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x100, %rsp            # imm = 0x100
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0xc8(%rbp)
movq -0x18(%rbp), %rdi
movl $0x8, %esi
callq 0x52960
movq %rax, %rsi
leaq -0x30(%rbp), %rdi
movl $0x3a, %edx
callq 0x7bbe0
leaq -0x30(%rbp), %rdi
callq 0x3ffd0
cmpq $0x1, %rax
jne 0x82def
movl $0x0, -0x4(%rbp)
movl $0x1, -0x34(%rbp)
jmp 0x83067
leaq -0x59(%rbp), %rdi
movq %rdi, -0xd0(%rbp)
callq 0xab60
movq -0xd0(%rbp), %rdx
leaq 0xb8624(%rip), %rsi     # 0x13b431
leaq -0x58(%rbp), %rdi
callq 0x2d6c0
jmp 0x82e18
movq -0xc8(%rbp), %rdi
leaq -0x30(%rbp), %rsi
leaq -0x58(%rbp), %rdx
callq 0x82ce0
movl %eax, -0xd4(%rbp)
jmp 0x82e34
leaq -0x58(%rbp), %rdi
callq 0xac88
leaq -0x59(%rbp), %rdi
callq 0xa640
movl -0xd4(%rbp), %eax
movl %eax, -0x38(%rbp)
movl -0x38(%rbp), %eax
movl %eax, -0xd8(%rbp)
callq 0x353a0
movl %eax, %ecx
movl -0xd8(%rbp), %eax
cmpl %ecx, %eax
je 0x82eb0
movq -0xc8(%rbp), %rax
movl $0x1, 0x1d8(%rax)
jmp 0x8305a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
jmp 0x82ea2
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
leaq -0x58(%rbp), %rdi
callq 0xac88
leaq -0x59(%rbp), %rdi
callq 0xa640
jmp 0x8307c
leaq -0x91(%rbp), %rdi
movq %rdi, -0xe0(%rbp)
callq 0xab60
movq -0xe0(%rbp), %rdx
leaq 0xb8563(%rip), %rsi     # 0x13b434
leaq -0x90(%rbp), %rdi
callq 0x2d6c0
jmp 0x82edf
movq -0xc8(%rbp), %rdi
leaq -0x30(%rbp), %rsi
leaq -0x90(%rbp), %rdx
callq 0x82ce0
movl %eax, -0xe4(%rbp)
jmp 0x82efe
movl -0xe4(%rbp), %eax
movl %eax, -0x38(%rbp)
leaq -0x90(%rbp), %rdi
callq 0xac88
leaq -0x91(%rbp), %rdi
callq 0xa640
movl -0x38(%rbp), %eax
movl %eax, -0xe8(%rbp)
callq 0x353a0
movl %eax, %ecx
movl -0xe8(%rbp), %eax
cmpl %ecx, %eax
je 0x82f86
movq -0xc8(%rbp), %rax
movl $0x2, 0x1d8(%rax)
jmp 0x83058
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
jmp 0x82f75
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
leaq -0x90(%rbp), %rdi
callq 0xac88
leaq -0x91(%rbp), %rdi
callq 0xa640
jmp 0x8307c
leaq -0xb9(%rbp), %rdi
movq %rdi, -0xf0(%rbp)
callq 0xab60
movq -0xf0(%rbp), %rdx
leaq 0xb8490(%rip), %rsi     # 0x13b437
leaq -0xb8(%rbp), %rdi
callq 0x2d6c0
jmp 0x82fb5
movq -0xc8(%rbp), %rdi
leaq -0x30(%rbp), %rsi
leaq -0xb8(%rbp), %rdx
callq 0x82ce0
movl %eax, -0xf4(%rbp)
jmp 0x82fd4
movl -0xf4(%rbp), %eax
movl %eax, -0x38(%rbp)
leaq -0xb8(%rbp), %rdi
callq 0xac88
leaq -0xb9(%rbp), %rdi
callq 0xa640
movl -0x38(%rbp), %eax
movl %eax, -0xf8(%rbp)
callq 0x353a0
movl %eax, %ecx
movl -0xf8(%rbp), %eax
cmpl %ecx, %eax
je 0x83056
movq -0xc8(%rbp), %rax
movl $0x3, 0x1d8(%rax)
jmp 0x83056
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
jmp 0x83048
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
leaq -0xb8(%rbp), %rdi
callq 0xac88
leaq -0xb9(%rbp), %rdi
callq 0xa640
jmp 0x8307c
jmp 0x83058
jmp 0x8305a
movl -0x38(%rbp), %eax
movl %eax, -0x4(%rbp)
movl $0x1, -0x34(%rbp)
leaq -0x30(%rbp), %rdi
callq 0x3dfa0
movl -0x4(%rbp), %eax
addq $0x100, %rsp            # imm = 0x100
popq %rbp
retq
leaq -0x30(%rbp), %rdi
callq 0x3dfa0
movq -0x68(%rbp), %rdi
callq 0xab50
nop