// File: /workspace/github_c_makefile_star2_O2/samtools[P]htslib/tbx.c
// Function: tbx_parse1
int tbx_parse1(const tbx_conf_t *conf, size_t len, char *line, tbx_intv_t *intv)
{
    size_t i, b = 0;
    int id = 1, getlen = 0, alcnt = 0, haveins = 0, lenpos = -1;
    char *s, *t;
    uint8_t insals[8192];
    int64_t reflen = 0, svlen = 0, fmtlen = 0, tmp = 0;

    intv->ss = intv->se = 0; intv->beg = intv->end = -1;
    for (i = 0; i <= len; ++i) {
        if (line[i] == '\t' || line[i] == 0) {
            if (id == conf->sc) {
                intv->ss = line + b; intv->se = line + i;
            } else if (id == conf->bc) {
                // here ->beg is 0-based.
                if ((conf->preset&0xffff) == TBX_GAF){
                    // if gaf find the smallest and largest node id
                    char *t;
                    int64_t nodeid = -1;
                    for (s = line + b + 1; s < line + i;) {
                        nodeid = strtoll(s, &t, 0);
                        if(intv->beg == -1){
                            intv->beg = intv->end = nodeid;
                        } else {
                            if(nodeid < intv->beg){
                                intv->beg = nodeid;
                            }

                            if(nodeid > intv->end){
                                intv->end = nodeid;
                            }
                        }
                        s = t + 1;
                    }
                } else {
                    intv->beg = strtoll(line + b, &s, 0);

                    if (conf->bc <= conf->ec) // don't overwrite an already set end point
                        intv->end = intv->beg;

                    if ( s==line+b ) return -1; // expected int

                    if (!(conf->preset&TBX_UCSC))
                        --intv->beg;
                    else if (conf->bc <= conf->ec)
                        ++intv->end;

                    if (intv->beg < 0) {
                        hts_log_warning("Coordinate <= 0 detected. "
                                        "Did you forget to use the -0 option?");
                        intv->beg = 0;
                    }
                    if (intv->end < 1) intv->end = 1;
                }
            } else {
                if ((conf->preset&0xffff) == TBX_GENERIC) {
                    if (id == conf->ec)
                    {
                        intv->end = strtoll(line + b, &s, 0);
                        if ( s==line+b ) return -1; // expected int
                    }
                } else if ((conf->preset&0xffff) == TBX_SAM) {
                    if (id == 6) { // CIGAR
                        int l = 0;
                        char *t;
                        for (s = line + b; s < line + i;) {
                            long x = strtol(s, &t, 10);
                            char op = toupper_c(*t);
                            if (op == 'M' || op == 'D' || op == 'N') l += x;
                            s = t + 1;
                        }
                        if (l == 0) l = 1;
                        intv->end = intv->beg + l;
                    }
                } else if ((conf->preset&0xffff) == TBX_VCF) {
                    if (id == 4) { //ref allele
                        if (b < i) intv->end = intv->beg + (i - b);
                        ++alcnt;
                        reflen = i - b;
                    } if (id == 5) {    //alt allele
                        int lastbyte = 0, c = line[i];
                        insals[lastbyte] = 0;
                        line[i] = 0;
                        s = line + b;
                        do {
                            t = strchr(s, ',');
                            if (alcnt >> 3 != lastbyte) {   //initialize insals
                                lastbyte = alcnt >> 3;
                                insals[lastbyte] = 0;
                            }
                            ++alcnt;
                            if (t) {
                                *t = 0;
                            }
                            if (s[0] == '<') {
                                if (!strcmp("<INS>", s)) {  //note inserts
                                    insals[lastbyte] |= 1 << ((alcnt - 1) & 7);
                                    haveins = 1;
                                } else if (!strcmp("<*>", s) ||
                                    !strcmp("<NON_REF>", s)) {  //note gvcf
                                    getlen = 1;
                                }
                            }
                            if (t) {
                                *t = ',';
                                s = t + 1;
                            }
                        } while (t && alcnt < 65536);   //max allcnt is 65535
                        line[i] = c;
                    } else if (id == 8) { //INFO, look for "END=" / "SVLEN"
                        int c = line[i], d = 1;
                        line[i] = 0;
                        s = strstr(line + b, "END=");
                        if (s == line + b) s += 4;
                        else if (s) {
                            s = strstr(line + b, ";END=");
                            if (s) s += 5;
                        }
                        if (s && *s != '.') {
                            long long end = strtoll(s, &s, 0);
                            if (end <= intv->beg) {
                                static int reported = 0;
                                if (!reported) {
                                    int l = intv->ss ? (int) (intv->se - intv->ss) : 0;
                                    hts_log_warning("VCF INFO/END=%lld is smaller than POS at %.*s:%"PRIhts_pos"\n"
                                                    "This tag will be ignored. "
                                                    "Note: only one invalid END tag will be reported.",
                                                    end, l >= 0 ? l : 0,
                                                    intv->ss ? intv->ss : "",
                                                    intv->beg);
                                    reported = 1;
                                }
                            } else {
                                intv->end = end;
                            }
                        }
                        s = strstr(line + b, "SVLEN=");
                        if (s == line + b) s += 6;  //at start of info
                        else if (s) {               //not at the start
                            s = strstr(line + b, ";SVLEN=");
                            if (s) s += 7;
                        }
                        while (s && d < alcnt) {
                            t = strchr(s, ',');
                            if ((haveins) && (insals[d >> 3] & (1 << (d & 7)))) {
                                tmp = 1;    //<INS>
                            } else {
                                tmp = atoll(s);
                                tmp = tmp < 0 ? llabs(tmp) : tmp;
                            }
                            svlen = svlen < tmp ? tmp : svlen;
                            s = t ? t + 1 : NULL;
                            ++d;
                        }
                        line[i] = c;
                    } else if (getlen && id == 9 ) {    //FORMAT
                        int c = line[i], pos = -1;
                        line[i] = 0;
                        s = line + b;
                        while (s) {
                            ++pos;
                            if (!(t = strchr(s, ':'))) {    //no further fields
                                if (!strcmp(s, "LEN")) {
                                    lenpos = pos;
                                }
                                break;  //not present at all!
                            } else {
                                *t = '\0';
                                if (!strcmp(s, "LEN")) {
                                    lenpos = pos;
                                    *t = ':';
                                    break;
                                }
                                *t = ':';
                                s = t + 1;  //check next one
                            }
                        }
                        line[i] = c;
                        if (lenpos == -1) { //not present
                            break;
                        }
                    } else if (id > 9 && getlen && lenpos != -1) {
                        //get LEN from sample
                        int c = line[i], d = 0;
                        line[i] = 0; tmp = 0;
                        s = line + b;
                        for (d = 0; d <= lenpos; ++d) {
                            if (d == lenpos) {
                                tmp = atoll(s);
                                break;
                            }
                            if ((t = strchr(s, ':'))) {
                                s = t + 1;
                            } else {
                                break;    //not in sycn with fmt def!
                            }
                        }
                        fmtlen = fmtlen < tmp ? tmp : fmtlen;
                        line[i] = c;
                    }
                }
            }
            b = i + 1;  //beginning if current field
            ++id;
        }
    }
    if ((conf->preset&0xffff) == TBX_VCF) {
        tmp = reflen < svlen ?
                svlen < fmtlen ? fmtlen : svlen :
                reflen < fmtlen ? fmtlen : reflen ;
        tmp += intv->beg;
        intv->end = intv->end < tmp ? tmp : intv->end;

        //NOTE: 'end' calculation be in sync with end/rlen in vcf.c:get_rlen
    }
    if (intv->ss == 0 || intv->se == 0 || intv->beg < 0 || intv->end < 0) return -1;
    return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x2098, %rsp           # imm = 0x2098
movq %rdx, %r15
leaq 0x10(%rcx), %rax
movq %rax, 0x88(%rsp)
leaq 0x8(%rcx), %rbp
pxor %xmm0, %xmm0
movdqu %xmm0, 0x10(%rcx)
pcmpeqd %xmm0, %xmm0
movq %rcx, 0x40(%rsp)
movdqu %xmm0, (%rcx)
pushq $0x1
popq %r9
pushq $-0x1
popq %rcx
pushq $0x1
popq %r8
movq $0x0, 0x68(%rsp)
movq $0x0, 0x78(%rsp)
movq $0x0, 0x70(%rsp)
movl %ecx, 0x50(%rsp)
movl $0x0, 0x64(%rsp)
movq $0x0, 0x58(%rsp)
movl $0x0, 0x3c(%rsp)
xorl %ebx, %ebx
movq %rbx, %r12
movq %r8, %rax
cmpq %rsi, %r12
ja 0x77ae0
movzbl (%r15,%r12), %r14d
testl %r14d, %r14d
je 0x7733b
cmpl $0x9, %r14d
je 0x7733b
incq %r12
incq %rax
jmp 0x7731a
leaq (%r15,%r12), %rcx
cmpl 0x4(%rdi), %r9d
jne 0x7735a
addq %r15, %rbx
movq 0x40(%rsp), %rax
movq %rbx, 0x10(%rax)
movq %rcx, 0x18(%rax)
jmp 0x77986
movq %rcx, 0x30(%rsp)
movq %rsi, 0x20(%rsp)
movzwl (%rdi), %ecx
movq %rdi, 0x18(%rsp)
cmpl 0x8(%rdi), %r9d
movl %r9d, 0x14(%rsp)
jne 0x773e0
addq %r15, %rbx
cmpl $0x3, %ecx
jne 0x7744f
movq 0x30(%rsp), %r14
incq %rbx
movq %rbx, 0x28(%rsp)
cmpq %r14, %rbx
jae 0x774b6
movq %rbx, %rdi
leaq 0x80(%rsp), %rsi
xorl %edx, %edx
callq 0x40a0
movq 0x40(%rsp), %rdx
movq (%rdx), %rcx
cmpq $-0x1, %rcx
je 0x773cc
cmpq %rcx, %rax
jge 0x773c1
movq %rax, (%rdx)
movq %rbp, %rcx
cmpq (%rbp), %rax
jg 0x773d3
jmp 0x773d6
movq %rax, (%rbp)
movq %rdx, %rcx
movq %rax, (%rcx)
movq 0x80(%rsp), %rbx
jmp 0x77388
testl %ecx, %ecx
je 0x77541
cmpl $0x1, %ecx
je 0x774ce
cmpl $0x2, %ecx
jne 0x77585
cmpl $0x8, %r9d
movq 0x18(%rsp), %rdi
movq 0x20(%rsp), %rsi
je 0x7774d
cmpl $0x5, %r9d
je 0x7763e
cmpl $0x4, %r9d
jne 0x7779a
cmpq %r12, %rbx
jae 0x77803
movq 0x40(%rsp), %rdx
movq (%rdx), %rcx
addq %rax, %rcx
decq %rcx
decq %rax
movq %rcx, 0x8(%rdx)
movq 0x20(%rsp), %rsi
movq 0x18(%rsp), %rdi
jmp 0x77806
movq %rbx, %rdi
leaq 0x28(%rsp), %rsi
xorl %edx, %edx
callq 0x40a0
movq 0x40(%rsp), %rcx
movq %rax, (%rcx)
movq 0x18(%rsp), %rdx
movl 0x8(%rdx), %ecx
movl 0xc(%rdx), %edx
cmpl %edx, %ecx
jg 0x77479
movq %rax, (%rbp)
cmpq %rbx, 0x28(%rsp)
je 0x77b42
movq 0x18(%rsp), %rsi
testb $0x1, 0x2(%rsi)
jne 0x77594
decq %rax
movq 0x40(%rsp), %rbx
movq %rax, (%rbx)
movq 0x18(%rsp), %rdi
movq 0x20(%rsp), %rsi
pushq $0x1
popq %r8
movl 0x14(%rsp), %r9d
jmp 0x775b4
movq 0x18(%rsp), %rdi
movq 0x20(%rsp), %rsi
pushq $0x1
popq %r8
movl 0x14(%rsp), %r9d
jmp 0x77986
cmpl $0x6, %r9d
movq 0x20(%rsp), %rsi
jne 0x77600
movq %rbp, 0x48(%rsp)
addq %r15, %rbx
xorl %r14d, %r14d
cmpq 0x30(%rsp), %rbx
jae 0x7760a
movq %rbx, %rdi
leaq 0x80(%rsp), %rsi
pushq $0xa
popq %rdx
callq 0x46f0
movq %rax, %rbp
movq 0x80(%rsp), %rbx
movzbl (%rbx), %r13d
callq 0x4090
movq (%rax), %rax
movzbl (%rax,%r13,4), %eax
addl $-0x44, %eax
cmpl $0xa, %eax
ja 0x77537
movl $0x601, %ecx            # imm = 0x601
btl %eax, %ecx
jae 0x77537
addl %ebp, %r14d
movl 0x14(%rsp), %r9d
incq %rbx
jmp 0x774e8
movq 0x18(%rsp), %rdi
cmpl 0xc(%rdi), %r9d
jne 0x7758a
addq %r15, %rbx
movq %rbx, %rdi
leaq 0x28(%rsp), %rsi
xorl %edx, %edx
callq 0x40a0
movl 0x14(%rsp), %r9d
pushq $0x1
popq %r8
movq 0x18(%rsp), %rdi
movq %rax, (%rbp)
cmpq %rbx, 0x28(%rsp)
movq 0x20(%rsp), %rsi
jne 0x77986
jmp 0x77b42
movq 0x18(%rsp), %rdi
movq 0x20(%rsp), %rsi
jmp 0x77986
cmpl %edx, %ecx
movq 0x40(%rsp), %rbx
pushq $0x1
popq %r8
movl 0x14(%rsp), %r9d
jg 0x775aa
incq (%rbp)
movq 0x18(%rsp), %rdi
movq 0x20(%rsp), %rsi
testq %rax, %rax
jns 0x775e8
pushq $0x3
popq %rdi
leaq 0x1a4e9(%rip), %rsi     # 0x91aac
leaq 0x1a4ed(%rip), %rdx     # 0x91ab7
xorl %eax, %eax
callq 0x8132
movl 0x14(%rsp), %r9d
pushq $0x1
popq %r8
movq 0x20(%rsp), %rsi
movq 0x18(%rsp), %rdi
andq $0x0, (%rbx)
cmpq $0x0, (%rbp)
jg 0x77986
movq $0x1, (%rbp)
jmp 0x77986
movq 0x18(%rsp), %rdi
jmp 0x77986
movq %rbx, 0x28(%rsp)
cmpl $0x1, %r14d
adcl $0x0, %r14d
movslq %r14d, %rax
movq 0x40(%rsp), %rcx
addq (%rcx), %rax
movq %rax, 0x8(%rcx)
movq 0x48(%rsp), %rbp
movq 0x18(%rsp), %rdi
movq 0x20(%rsp), %rsi
pushq $0x1
popq %r8
jmp 0x77986
movq %rbp, 0x48(%rsp)
xorl %ecx, %ecx
movb %cl, 0x90(%rsp)
movq 0x30(%rsp), %rax
movl $0x0, 0x54(%rsp)
movb %cl, (%rax)
addq %r15, %rbx
movq 0x58(%rsp), %rcx
movl %ecx, %r13d
movq %rbx, %rdi
pushq $0x2c
popq %rsi
callq 0x4180
movq %rax, %rbp
movl %r13d, %eax
sarl $0x3, %eax
cmpl 0x54(%rsp), %eax
je 0x7768f
movslq %eax, %rcx
movb $0x0, 0x90(%rsp,%rcx)
movl %eax, 0x54(%rsp)
testq %rbp, %rbp
je 0x77698
movb $0x0, (%rbp)
cmpb $0x3c, (%rbx)
jne 0x776fc
leaq 0x10758(%rip), %rdi     # 0x87dfc
movq %rbx, %rsi
callq 0x46e0
testl %eax, %eax
je 0x776df
leaq 0x1074b(%rip), %rdi     # 0x87e02
movq %rbx, %rsi
callq 0x46e0
testl %eax, %eax
je 0x776d6
leaq 0x1073c(%rip), %rdi     # 0x87e06
movq %rbx, %rsi
callq 0x46e0
testl %eax, %eax
jne 0x776fc
pushq $0x1
popq %rax
movl %eax, 0x3c(%rsp)
jmp 0x776fc
movl %r13d, %ecx
andb $0x7, %cl
pushq $0x1
popq %rdx
movl %edx, %eax
shll %cl, %eax
movslq 0x54(%rsp), %rcx
orb %al, 0x90(%rsp,%rcx)
movl %edx, 0x64(%rsp)
movq 0x18(%rsp), %rdi
movq 0x20(%rsp), %rsi
pushq $0x1
popq %r8
testq %rbp, %rbp
je 0x7772b
leal 0x1(%r13), %ecx
movb $0x2c, (%rbp)
incq %rbp
leal -0x1(%rcx), %eax
movq %rbp, %rbx
cmpl $0xffff, %eax           # imm = 0xFFFF
jl 0x77663
movq %rbx, 0x28(%rsp)
movq 0x30(%rsp), %rax
movb %r14b, (%rax)
incl %r13d
movl %r13d, %eax
movq %rax, 0x58(%rsp)
movq 0x48(%rsp), %rbp
jmp 0x774c4
movq 0x30(%rsp), %rax
movb $0x0, (%rax)
addq %r15, %rbx
movq %rbx, %rdi
leaq 0x1a395(%rip), %rsi     # 0x91af7
callq 0x40d0
cmpq %rbx, %rax
je 0x778a7
testq %rax, %rax
je 0x779f7
movq %rbx, %rdi
leaq 0x1a373(%rip), %rsi     # 0x91af6
callq 0x40d0
testq %rax, %rax
je 0x779f7
addq $0x5, %rax
jmp 0x778ab
cmpl $0x0, 0x3c(%rsp)
setne %al
cmpl $0x9, %r9d
sete %cl
andb %al, %cl
cmpb $0x1, %cl
jne 0x77826
movq %rbp, 0x48(%rsp)
movq 0x30(%rsp), %rax
movb $0x0, (%rax)
addq %r15, %rbx
xorl %r13d, %r13d
movq %rbx, %rdi
pushq $0x3a
popq %rsi
callq 0x4180
testq %rax, %rax
je 0x778e2
movq %rax, %rbp
movb $0x0, (%rax)
movq %rbx, %rdi
leaq 0xf720(%rip), %rsi      # 0x86f07
callq 0x46e0
testl %eax, %eax
je 0x77947
movb $0x3a, (%rbp)
incq %rbp
incl %r13d
movq %rbp, %rbx
jmp 0x777c3
decq %rax
movq %rax, 0x68(%rsp)
movq 0x30(%rsp), %rcx
movq 0x58(%rsp), %rax
incl %eax
movq %rax, 0x58(%rsp)
cmpl $0x0, 0x3c(%rsp)
setne %al
jmp 0x77835
movq 0x18(%rsp), %rdi
movq 0x20(%rsp), %rsi
movq 0x30(%rsp), %rcx
cmpl $0xa, %r9d
jb 0x77986
testb %al, %al
je 0x77986
cmpl $-0x1, 0x50(%rsp)
je 0x77986
movq %rbp, 0x48(%rsp)
movb (%rcx), %bpl
movb $0x0, (%rcx)
addq %r15, %rbx
xorl %r14d, %r14d
cmpl 0x50(%rsp), %r14d
jg 0x7789e
je 0x77900
movq %rbx, %rdi
pushq $0x3a
popq %rsi
callq 0x4180
testq %rax, %rax
movq 0x18(%rsp), %rdi
movq 0x20(%rsp), %rsi
pushq $0x1
popq %r8
movl 0x14(%rsp), %r9d
je 0x7789e
incq %rax
incl %r14d
movq %rax, %rbx
jmp 0x77863
movq %rbx, 0x28(%rsp)
xorl %eax, %eax
jmp 0x77920
addq $0x4, %rax
movq %rax, 0x28(%rsp)
cmpb $0x2e, (%rax)
je 0x779f7
movq %rax, %rdi
leaq 0x28(%rsp), %rsi
xorl %edx, %edx
callq 0x40a0
movq 0x40(%rsp), %rcx
movq (%rcx), %rcx
cmpq %rcx, %rax
jle 0x77994
movq %rax, (%rbp)
jmp 0x779f7
movq %rbx, 0x28(%rsp)
movq %rbx, %rdi
leaq 0xf616(%rip), %rsi      # 0x86f07
callq 0x46e0
testl %eax, %eax
cmovnel 0x50(%rsp), %r13d
jmp 0x77950
movq %rbx, 0x28(%rsp)
movq %rbx, %rdi
callq 0x4350
movq 0x18(%rsp), %rdi
movq 0x20(%rsp), %rsi
pushq $0x1
popq %r8
movl 0x14(%rsp), %r9d
movq 0x70(%rsp), %rcx
cmpq %rax, %rcx
cmovleq %rax, %rcx
movq %rcx, 0x70(%rsp)
movq 0x30(%rsp), %rax
movb %bpl, (%rax)
pushq $0x1
popq %rax
movl %eax, 0x3c(%rsp)
movq 0x48(%rsp), %rbp
jmp 0x77986
movq %rbx, 0x28(%rsp)
movb $0x3a, (%rbp)
movq 0x18(%rsp), %rdi
movq 0x20(%rsp), %rsi
pushq $0x1
popq %r8
movq 0x30(%rsp), %rax
movb %r14b, (%rax)
cmpl $-0x1, %r13d
movq 0x48(%rsp), %rbp
movl 0x14(%rsp), %r9d
je 0x77ae0
movl %r13d, 0x50(%rsp)
pushq $0x1
popq %rax
movl %eax, 0x3c(%rsp)
incq %r12
incl %r9d
movq %r12, %rbx
jmp 0x77317
cmpb $0x0, 0x3853d(%rip)     # 0xafed8
jne 0x779f7
movq 0x88(%rsp), %rdx
movq (%rdx), %r9
testq %r9, %r9
je 0x779bb
movq 0x40(%rsp), %rdx
movl 0x18(%rdx), %r8d
subl %r9d, %r8d
jmp 0x779c5
xorl %r8d, %r8d
leaq 0xb061(%rip), %r9       # 0x82a26
testl %r8d, %r8d
movl $0x0, %edx
cmovlel %edx, %r8d
movq %rcx, (%rsp)
pushq $0x3
popq %rdi
leaq 0x1a0cd(%rip), %rsi     # 0x91aac
leaq 0x1a116(%rip), %rdx     # 0x91afc
movq %rax, %rcx
xorl %eax, %eax
callq 0x8132
movb $0x1, 0x384e1(%rip)     # 0xafed8
movq %rbp, 0x48(%rsp)
movq %rbx, %rdi
leaq 0x1a174(%rip), %rsi     # 0x91b7a
callq 0x40d0
movq %rax, %rbp
cmpq %rbx, %rax
je 0x77a34
testq %rbp, %rbp
je 0x77a3a
movq %rbx, %rdi
leaq 0x1a157(%rip), %rsi     # 0x91b79
callq 0x40d0
leaq 0x7(%rax), %rbp
testq %rax, %rax
cmoveq %rax, %rbp
jmp 0x77a3c
addq $0x6, %rbp
jmp 0x77a3c
xorl %ebp, %ebp
pushq $0x1
popq %r13
pushq $0x1
popq %r8
movq 0x58(%rsp), %rax
testq %rbp, %rbp
je 0x77abf
cmpl %eax, %r13d
jge 0x77abf
movq %rbp, %rdi
pushq $0x2c
popq %rsi
callq 0x4180
pushq $0x1
popq %r8
movq %rax, %rbx
cmpl $0x0, 0x64(%rsp)
je 0x77a88
movl %r13d, %eax
shrl $0x3, %eax
movzbl 0x90(%rsp,%rax), %eax
movl %r13d, %ecx
andl $0x7, %ecx
btl %ecx, %eax
movq %r8, %rcx
jb 0x77a9e
movq %rbp, %rdi
callq 0x4350
pushq $0x1
popq %r8
movq %rax, %rcx
negq %rcx
cmovsq %rax, %rcx
movq 0x78(%rsp), %rax
cmpq %rcx, %rax
cmovleq %rcx, %rax
movq %rax, 0x78(%rsp)
leaq 0x1(%rbx), %rbp
testq %rbx, %rbx
cmoveq %rbx, %rbp
incl %r13d
jmp 0x77a44
movq %rbp, 0x28(%rsp)
movq 0x30(%rsp), %rax
movb %r14b, (%rax)
movq 0x48(%rsp), %rbp
movq 0x18(%rsp), %rdi
movq 0x20(%rsp), %rsi
jmp 0x774c4
cmpw $0x2, (%rdi)
movq 0x40(%rsp), %rcx
jne 0x77b1a
movq 0x78(%rsp), %rdx
movq 0x68(%rsp), %rax
cmpq %rdx, %rax
cmovgq %rax, %rdx
movq 0x70(%rsp), %rax
cmpq %rax, %rdx
cmovleq %rax, %rdx
addq (%rcx), %rdx
movq 0x8(%rcx), %rax
cmpq %rdx, %rax
cmovgq %rax, %rdx
movq %rdx, 0x8(%rcx)
movq 0x88(%rsp), %rax
cmpq $0x0, (%rax)
je 0x77b42
cmpq $0x0, 0x18(%rcx)
je 0x77b42
cmpq $0x0, (%rcx)
pushq $-0x1
popq %rax
js 0x77b45
movq (%rbp), %rax
sarq $0x3f, %rax
jmp 0x77b45
pushq $-0x1
popq %rax
addq $0x2098, %rsp           # imm = 0x2098
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq