// File: /workspace/github_c_makefile_star2_O2/samtools[P]htslib/vcf.c
// Function: bcf_hdr_add_hrec
int bcf_hdr_add_hrec(bcf_hdr_t *hdr, bcf_hrec_t *hrec)
{
    kstring_t str = {0,0,0};
    bcf_hdr_aux_t *aux = get_hdr_aux(hdr);

    int res;
    if ( !hrec ) return 0;

    bcf_hrec_check(hrec);   // todo: check return status and propagate errors up

    res = bcf_hdr_register_hrec(hdr,hrec);
    if (res < 0) return -1;
    if ( !res )
    {
        // If one of the hashed field, then it is already present
        if ( hrec->type != BCF_HL_GEN )
        {
            bcf_hrec_destroy(hrec);
            return 0;
        }
        // Is one of the generic fields and already present?
        if ( ksprintf(&str, "##%s=%s", hrec->key,hrec->value) < 0 )
        {
            free(str.s);
            return -1;
        }
        khint_t k = kh_get(hdict, aux->gen, str.s);
        if ( k != kh_end(aux->gen) )
        {
            // duplicate record
            bcf_hrec_destroy(hrec);
            free(str.s);
            return 0;
        }
        if (!strcmp(hrec->key, "fileformat")) {
            aux->version = bcf_get_version(NULL, hrec->value);
        }
    }

    int i;
    if ( hrec->type==BCF_HL_STR && (i=bcf_hrec_find_key(hrec,"ID"))>=0 )
    {
        if ( ksprintf(&str, "##%s=<ID=%s>", hrec->key,hrec->vals[i]) < 0 )
        {
            free(str.s);
            return -1;
        }
        khint_t k = kh_get(hdict, aux->gen, str.s);
        if ( k != kh_end(aux->gen) )
        {
            // duplicate record
            bcf_hrec_destroy(hrec);
            free(str.s);
            return 0;
        }
    }

    // New record, needs to be added
    int n = hdr->nhrec + 1;
    bcf_hrec_t **new_hrec = realloc(hdr->hrec, n*sizeof(bcf_hrec_t*));
    if (!new_hrec) {
        free(str.s);
        bcf_hdr_unregister_hrec(hdr, hrec);
        return -1;
    }
    hdr->hrec = new_hrec;

    if ( str.s )
    {
        khint_t k = kh_put(hdict, aux->gen, str.s, &res);
        if ( res<0 )
        {
            free(str.s);
            return -1;
        }
        kh_val(aux->gen,k) = hrec;
    }

    hdr->hrec[hdr->nhrec] = hrec;
    hdr->dirty = 1;
    hdr->nhrec = n;

    return hrec->type==BCF_HL_GEN ? 0 : 1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
andq $0x0, 0x50(%rsp)
xorps %xmm0, %xmm0
movaps %xmm0, 0x40(%rsp)
xorl %r15d, %r15d
testq %rsi, %rsi
je 0x24193
movq %rsi, %rbx
movq %rdi, %rbp
movq 0x28(%rdi), %r13
movq %rsi, %rdi
callq 0x30ce3
movl (%rbx), %eax
cmpl $0x1, %eax
je 0x23a03
cmpl $0x2, %eax
je 0x2399a
cmpl $0x3, %eax
jne 0x23aa2
leaq 0x6139e(%rip), %rsi     # 0x84cd5
movq %rbx, %rdi
callq 0x22ef9
testl %eax, %eax
js 0x23a8a
movq 0x28(%rbx), %rcx
movl %eax, %eax
movq (%rcx,%rax,8), %rcx
movzbl (%rcx), %edx
cmpl $0x2a, %edx
je 0x23984
cmpl $0x3d, %edx
je 0x23984
leaq 0x6248b(%rip), %rax     # 0x85df0
cmpb $0x0, (%rdx,%rax)
je 0x23984
leaq 0x1(%rcx), %rdx
movzbl (%rdx), %esi
testq %rsi, %rsi
je 0x23aa2
incq %rdx
cmpb $0x0, (%rsi,%rax)
jne 0x2396f
leaq 0x638c7(%rip), %rsi     # 0x87252
leaq 0x63900(%rip), %rdx     # 0x87292
pushq $0x3
popq %rdi
jmp 0x23a81
leaq 0x61334(%rip), %rsi     # 0x84cd5
movq %rbx, %rdi
callq 0x22ef9
testl %eax, %eax
js 0x23a8a
movq 0x28(%rbx), %rcx
movl %eax, %eax
movq (%rcx,%rax,8), %r14
movzbl (%r14), %ecx
cmpq $0x2e, %rcx
sete %al
leal -0x30(%rcx), %edx
cmpb $0xa, %dl
setb %dl
orb %al, %dl
jne 0x23a6d
leaq 0x62512(%rip), %rax     # 0x85ef0
cmpb $0x0, (%rcx,%rax)
je 0x23a6d
leaq 0x1(%r14), %rcx
movzbl (%rcx), %edx
testq %rdx, %rdx
je 0x23aa2
incq %rcx
cmpb $0x0, (%rdx,%rax)
jne 0x239ec
jmp 0x23a6d
leaq 0x612cb(%rip), %rsi     # 0x84cd5
movq %rbx, %rdi
callq 0x22ef9
testl %eax, %eax
js 0x23a8a
movq 0x28(%rbx), %rcx
movl %eax, %eax
movq (%rcx,%rax,8), %r14
leaq 0x63825(%rip), %rsi     # 0x8724c
movq %r14, %rdi
callq 0x46e0
testl %eax, %eax
je 0x23aa2
movzbl (%r14), %ecx
cmpq $0x2e, %rcx
sete %al
leal -0x30(%rcx), %edx
cmpb $0xa, %dl
setb %dl
orb %al, %dl
jne 0x23a6d
leaq 0x6249e(%rip), %rax     # 0x85ef0
cmpb $0x0, (%rcx,%rax)
je 0x23a6d
leaq 0x1(%r14), %rcx
movzbl (%rcx), %edx
testq %rdx, %rdx
je 0x23aa2
incq %rcx
cmpb $0x0, (%rdx,%rax)
jne 0x23a5c
leaq 0x637de(%rip), %rsi     # 0x87252
leaq 0x63831(%rip), %rdx     # 0x872ac
pushq $0x3
popq %rdi
movq %r14, %rcx
xorl %eax, %eax
callq 0x8132
jmp 0x23aa2
leaq 0x637c1(%rip), %rsi     # 0x87252
leaq 0x637c9(%rip), %rdx     # 0x87261
pushq $0x3
popq %rdi
xorl %eax, %eax
callq 0x8132
movq %rbx, %rdi
callq 0x30ce3
movl (%rbx), %eax
cmpl $0x3, %eax
jae 0x23cc8
movq %r13, 0x30(%rsp)
movq %rbp, 0x20(%rsp)
leaq 0x18(%rsp), %rax
orl $-0x1, (%rax)
pushq $-0x1
popq %r13
leaq 0x5eff8(%rip), %r14     # 0x82aca
xorl %ebp, %ebp
movq $0x0, 0x10(%rsp)
movl %r13d, 0x8(%rsp)
movl %r13d, %r15d
movslq 0x18(%rbx), %rax
cmpq %rax, %rbp
jge 0x23d44
movq 0x20(%rbx), %rax
movq (%rax,%rbp,8), %r12
cmpb $0x49, (%r12)
jne 0x23b15
cmpb $0x44, 0x1(%r12)
jne 0x23b15
cmpb $0x0, 0x2(%r12)
je 0x23c5c
movq %r12, %rdi
movq %r14, %rsi
callq 0x46e0
testl %eax, %eax
je 0x23b8c
movq %r12, %rdi
leaq 0x637cf(%rip), %rsi     # 0x872fd
callq 0x46e0
testl %eax, %eax
je 0x23bc9
movq %r12, %rdi
leaq 0x6380c(%rip), %rsi     # 0x87351
callq 0x46e0
testl %eax, %eax
jne 0x23cc0
movq 0x28(%rbx), %rax
movq (%rax,%rbp,8), %rdi
movzbl (%rdi), %eax
cmpl $0x2e, %eax
je 0x23c89
cmpl $0x52, %eax
je 0x23c79
cmpl $0x47, %eax
je 0x23c81
cmpl $0x41, %eax
jne 0x23c92
cmpb $0x0, 0x1(%rdi)
pushq $0x2
jmp 0x23c8f
movq 0x28(%rbx), %rax
movq (%rax,%rbp,8), %rdi
movq %rdi, 0x38(%rsp)
leaq 0x38(%rsp), %rsi
pushq $0xa
popq %rdx
callq 0x46f0
movq %rax, %r15
movq 0x38(%rsp), %rax
cmpb $0x0, (%rax)
jne 0x23f6c
cmpl $0x7ffffffe, %r15d      # imm = 0x7FFFFFFE
jb 0x23cc0
jmp 0x23f6c
movq 0x28(%rbx), %rax
movq (%rax,%rbp,8), %r13
movq %r13, %rdi
leaq 0x63727(%rip), %rsi     # 0x87302
callq 0x46e0
testl %eax, %eax
je 0x23c6b
movq %r13, %rdi
leaq 0x63718(%rip), %rsi     # 0x8730a
callq 0x46e0
testl %eax, %eax
je 0x23c73
movq %r13, %rdi
leaq 0x6377d(%rip), %rsi     # 0x87382
callq 0x46e0
testl %eax, %eax
je 0x23c6f
movq %r13, %rdi
leaq 0x636f8(%rip), %rsi     # 0x87310
callq 0x46e0
testl %eax, %eax
je 0x23c6f
movq %r13, %rdi
leaq 0x636ef(%rip), %rsi     # 0x8731a
callq 0x46e0
testl %eax, %eax
je 0x23cbd
pushq $0x3
popq %r12
movl %r12d, %edi
leaq 0x6367d(%rip), %rsi     # 0x872c3
leaq 0x636d2(%rip), %rdx     # 0x8731f
movq %r13, %rcx
xorl %eax, %eax
callq 0x8132
movl %r12d, %r13d
jmp 0x23cc0
movq 0x28(%rbx), %rax
movq (%rax,%rbp,8), %rax
movq %rax, 0x10(%rsp)
jmp 0x23cc0
pushq $0x1
jmp 0x23c75
pushq $0x3
jmp 0x23c75
pushq $0x2
popq %r13
jmp 0x23cc0
cmpb $0x0, 0x1(%rdi)
pushq $0x4
jmp 0x23c8f
cmpb $0x0, 0x1(%rdi)
pushq $0x3
jmp 0x23c8f
cmpb $0x0, 0x1(%rdi)
pushq $0x1
popq %rax
je 0x23caf
movl $0x0, 0x8(%rsp)
leaq 0x6dd48(%rip), %rsi     # 0x919e9
leaq 0x18(%rsp), %rdx
xorl %eax, %eax
callq 0x44a0
jmp 0x23cc0
movl %eax, 0x8(%rsp)
movl $0xfffff, 0x18(%rsp)    # imm = 0xFFFFF
jmp 0x23cc0
xorl %r13d, %r13d
incq %rbp
jmp 0x23ae5
cmpl $0x4, %eax
je 0x23f5b
cmpl $0x3, %eax
jne 0x23f64
leaq 0x618c6(%rip), %rsi     # 0x855a7
movq %rbx, %rdi
callq 0x22ef9
xorl %r14d, %r14d
testl %eax, %eax
js 0x241a5
movq 0x28(%rbx), %rcx
movq %r13, %r15
movl %eax, %r13d
movq (%rcx,%r13,8), %rdi
leaq 0x38(%rsp), %r12
movq %rdi, (%r12)
pushq $0xa
popq %rdx
movq %r12, %rsi
callq 0x40a0
movq (%r12), %rdx
movq 0x28(%rbx), %rcx
cmpq (%rcx,%r13,8), %rdx
movq %r15, %r13
movl $0x0, %r15d
setne %dl
testq %rax, %rax
setns %cl
andb %dl, %cl
cmpb $0x1, %cl
jne 0x23ffc
jmp 0x241a7
movl (%rbx), %eax
decl %eax
cmpl $0x2, %eax
jae 0x23e27
leaq 0x63631(%rip), %r14     # 0x87389
cmpl $-0x1, %r13d
movq 0x10(%rsp), %r8
movl 0x8(%rsp), %r12d
jne 0x23da1
movq 0x8(%rbx), %r8
cmpb $0x49, (%r8)
leaq 0x5e5ad(%rip), %rcx     # 0x82324
cmoveq %r14, %rcx
leaq 0x63541(%rip), %rsi     # 0x872c3
leaq 0x635cf(%rip), %rdx     # 0x87358
pushq $0x3
popq %r13
movl %r13d, %edi
xorl %eax, %eax
callq 0x8132
movl 0x8(%rsp), %r12d
movq 0x10(%rsp), %r8
cmpl $-0x1, %r12d
jne 0x23ddb
movq 0x8(%rbx), %r8
cmpb $0x49, (%r8)
leaq 0x5e56e(%rip), %rcx     # 0x82324
cmoveq %r14, %rcx
leaq 0x63502(%rip), %rsi     # 0x872c3
leaq 0x635c4(%rip), %rdx     # 0x8738c
pushq $0x3
popq %rdi
xorl %eax, %eax
callq 0x8132
movq 0x10(%rsp), %r8
pushq $0x1
popq %r12
movl 0x18(%rsp), %ebp
testl %r13d, %r13d
jne 0x23e35
xorl %r13d, %r13d
orl %ebp, %r12d
movl $0x0, %ebp
movl $0x0, %r12d
je 0x23e35
movq 0x8(%rbx), %rcx
leaq 0x634c1(%rip), %rsi     # 0x872c3
leaq 0x635b3(%rip), %rdx     # 0x873bc
xorl %ebp, %ebp
pushq $0x3
popq %rdi
xorl %eax, %eax
callq 0x8132
movq 0x10(%rsp), %r8
andl $0x0, 0x18(%rsp)
xorl %r13d, %r13d
xorl %r12d, %r12d
jmp 0x23e35
movl 0x18(%rsp), %ebp
movq 0x10(%rsp), %r8
movl 0x8(%rsp), %r12d
movq $0x0, 0x8(%rsp)
testq %r8, %r8
je 0x23fea
movl (%rbx), %r14d
movq %r8, %rdi
callq 0x4930
testq %rax, %rax
je 0x2416e
movq %r14, %rcx
movq %rax, %r14
shll $0xc, %ebp
andl $0xf, %r12d
shll $0x8, %r12d
orl %ebp, %r12d
shll $0x4, %r13d
movzbl %r13b, %r13d
orl %r12d, %r13d
andl $0xf, %ecx
movq %rcx, 0x10(%rsp)
orl %ecx, %r13d
movq 0x20(%rsp), %rax
movq 0x28(%rax), %r12
movq %r12, %rdi
movq %r14, %rsi
callq 0x246ef
cmpl (%r12), %eax
jne 0x23f8f
leaq 0x5c(%rsp), %rbp
movq %r12, %rdi
movq %r14, %rsi
movq %rbp, %rdx
callq 0x2e007
cmpl $0x0, (%rbp)
js 0x242b1
movq 0x20(%r12), %rsi
movl %eax, 0x8(%rsp)
movl %eax, %edx
imulq $0x38, %rdx, %rbp
movups 0x61dfa(%rip), %xmm0    # 0x85cd0
movups %xmm0, 0x20(%rsi,%rbp)
movups 0x61dde(%rip), %xmm0    # 0x85cc0
movups %xmm0, 0x10(%rsi,%rbp)
movups 0x61dc2(%rip), %xmm0    # 0x85cb0
movups %xmm0, (%rsi,%rbp)
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
movq %rcx, 0x30(%rsi,%rbp)
movl %r13d, %eax
movq 0x20(%r12), %rcx
addq %rbp, %rcx
movl 0x10(%rsp), %esi
movq %rax, (%rcx,%rsi,8)
movq %rbx, 0x18(%rcx,%rsi,8)
movq 0x20(%r12), %rcx
movl %r15d, 0x30(%rcx,%rbp)
addq %rbp, %rcx
movq 0x18(%r12), %rax
movq (%rax,%rdx,8), %rdx
movq 0x20(%rsp), %rdi
xorl %esi, %esi
callq 0x30d61
testl %eax, %eax
js 0x242a5
pushq $0x1
popq %rax
movq %rax, 0x8(%rsp)
cmpl $-0x1, %r15d
jne 0x23fea
movq 0x20(%r12), %rax
movl 0x30(%rax,%rbp), %esi
jmp 0x23fda
pushq $0x1
popq %r14
jmp 0x23ffc
xorl %r14d, %r14d
jmp 0x23ffc
leaq 0x63350(%rip), %rsi     # 0x872c3
leaq 0x6335f(%rip), %rdx     # 0x872d9
movq $0x0, 0x8(%rsp)
pushq $0x3
popq %rdi
xorl %eax, %eax
callq 0x8132
jmp 0x23fea
movl %eax, %ebp
movq %r14, %rdi
callq 0x45c0
movl %ebp, %eax
imulq $0x38, %rax, %rax
movq 0x20(%r12), %rcx
addq %rax, %rcx
movq 0x10(%rsp), %rsi
cmpq $0x0, 0x18(%rcx,%rsi,8)
jne 0x23fea
movl %r13d, %edx
shll $0x3, %esi
movq %rdx, (%rcx,%rsi)
movq %rbx, 0x18(%rsi,%rcx)
pushq $0x1
popq %rcx
movq %rcx, 0x8(%rsp)
cmpl $-0x1, %r15d
jne 0x23fea
movq 0x20(%r12), %rcx
movl 0x30(%rcx,%rax), %esi
movq %rbx, %rdi
callq 0x22ddf
testl %eax, %eax
js 0x2416e
movq 0x20(%rsp), %rbp
movq 0x30(%rsp), %r13
xorl %r15d, %r15d
movq 0x8(%rsp), %r14
movl %r14d, 0x38(%rsp)
testl %r14d, %r14d
je 0x240e3
cmpl $0x4, (%rbx)
jne 0x24065
leaq 0x60cbf(%rip), %rsi     # 0x84cd5
movq %rbx, %rdi
callq 0x22ef9
testl %eax, %eax
js 0x24065
movq 0x8(%rbx), %rdx
movq 0x28(%rbx), %rcx
movl %eax, %eax
movq (%rcx,%rax,8), %rcx
leaq 0x6246e(%rip), %rsi     # 0x864a5
leaq 0x40(%rsp), %rdi
xorl %eax, %eax
callq 0x69048
testl %eax, %eax
js 0x2414d
movq 0x28(%r13), %r14
movq 0x50(%rsp), %rsi
movq %r14, %rdi
callq 0x243d3
cmpl (%r14), %eax
jne 0x2417e
movslq 0x50(%rbp), %r15
movq 0x48(%rbp), %rdi
leaq 0x8(,%r15,8), %rsi
callq 0x4860
testq %rax, %rax
je 0x24159
movq %rax, 0x48(%rbp)
movq 0x50(%rsp), %rsi
testq %rsi, %rsi
je 0x240be
movq 0x28(%r13), %rdi
leaq 0x38(%rsp), %r14
movq %r14, %rdx
callq 0x235cf
cmpl $0x0, (%r14)
js 0x2414d
movq 0x28(%r13), %rcx
movq 0x20(%rcx), %rcx
movl %eax, %eax
movq %rbx, (%rcx,%rax,8)
movq 0x48(%rbp), %rax
incq %r15
movslq 0x50(%rbp), %rcx
movq %rbx, (%rax,%rcx,8)
movl $0x1, 0x54(%rbp)
movl %r15d, 0x50(%rbp)
xorl %r15d, %r15d
cmpl $0x5, (%rbx)
setne %r15b
jmp 0x24193
cmpl $0x5, (%rbx)
jne 0x24174
movq 0x8(%rbx), %rdx
movq 0x10(%rbx), %rcx
leaq 0x62397(%rip), %rsi     # 0x86492
leaq 0x40(%rsp), %rdi
xorl %eax, %eax
callq 0x69048
testl %eax, %eax
js 0x2414d
movq 0x28(%r13), %r14
movq 0x50(%rsp), %rsi
movq %r14, %rdi
callq 0x243d3
cmpl (%r14), %eax
jne 0x2417e
movq 0x8(%rbx), %rdi
leaq 0x6236e(%rip), %rsi     # 0x8649a
callq 0x46e0
testl %eax, %eax
jne 0x2400a
movq 0x10(%rbx), %rsi
xorl %edi, %edi
callq 0x237b5
movl %eax, 0x38(%r13)
jmp 0x2400a
movq 0x50(%rsp), %rdi
callq 0x45c0
jmp 0x2416e
movq 0x50(%rsp), %rdi
callq 0x45c0
movq %rbp, %rdi
movq %rbx, %rsi
callq 0x24494
pushq $-0x1
popq %r15
jmp 0x24193
movq %rbx, %rdi
callq 0x22854
jmp 0x24193
movq %rbx, %rdi
callq 0x22854
movq 0x50(%rsp), %rdi
callq 0x45c0
xorl %r15d, %r15d
movl %r15d, %eax
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
xorl %eax, %eax
movq %rax, 0x8(%rsp)
leaq 0x60b22(%rip), %rsi     # 0x84cd5
movq %rbx, %rdi
callq 0x22ef9
testl %eax, %eax
js 0x23ffc
movq 0x28(%rbx), %rcx
movl %eax, %eax
movq (%rcx,%rax,8), %rdi
callq 0x4930
testq %rax, %rax
je 0x2416e
movq %rax, %r12
movq %r13, 0x30(%rsp)
movq 0x30(%rbp), %r13
movq %r13, %rdi
movq %rax, %rsi
callq 0x246ef
movl %eax, %r14d
movl (%r13), %eax
movl %eax, 0x10(%rsp)
cmpl %eax, %r14d
jne 0x24226
movl %r14d, 0x2c(%rsp)
leaq 0x5c(%rsp), %r14
movq %r13, %rdi
movq %r12, %rsi
movq %r14, %rdx
callq 0x2e007
cmpl $0x0, (%r14)
js 0x243a4
movl %eax, 0x1c(%rsp)
jmp 0x24256
movq %r12, %rdi
callq 0x45c0
movq 0x20(%r13), %rax
movl %r14d, %ecx
imulq $0x38, %rcx, %rcx
movl %r14d, %edx
xorl %r14d, %r14d
cmpq $0x0, 0x18(%rax,%rcx)
jne 0x24380
xorl %r12d, %r12d
movl %edx, 0x2c(%rsp)
movl %edx, 0x1c(%rsp)
leaq 0x5e86d(%rip), %rsi     # 0x82aca
movq %rbx, %rdi
callq 0x22ef9
cmpl $-0x1, %eax
je 0x242b9
movq 0x28(%rbx), %rcx
cltq
movq (%rcx,%rax,8), %rdi
leaq 0x38(%rsp), %r14
movq %rdi, (%r14)
pushq $0xa
popq %rdx
movq %r14, %rsi
callq 0x46f0
movq (%r14), %rcx
cmpb $0x0, (%rcx)
jne 0x24347
cmpl $0x7ffffffe, %eax       # imm = 0x7FFFFFFE
jae 0x24347
movq %rbp, 0x20(%rsp)
jmp 0x242c1
movq %r12, %rdi
movl 0x8(%rsp), %esi
callq 0x2e1ed
movq %r14, %rdi
jmp 0x24152
movq %rbp, 0x20(%rsp)
pushq $-0x1
popq %rax
movq %rax, 0x60(%rsp)
movq 0x20(%r13), %rsi
movl 0x1c(%rsp), %ecx
imulq $0x38, %rcx, %rbp
movups 0x619f7(%rip), %xmm0    # 0x85cd0
movups %xmm0, 0x20(%rsi,%rbp)
movups 0x619db(%rip), %xmm0    # 0x85cc0
movups %xmm0, 0x10(%rsi,%rbp)
movups 0x619bf(%rip), %xmm0    # 0x85cb0
movups %xmm0, (%rsi,%rbp)
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
movq %rdx, 0x30(%rsi,%rbp)
movq 0x20(%r13), %rsi
movl %eax, 0x30(%rsi,%rbp)
movq 0x8(%rsp), %rdx
movq %rdx, (%rsi,%rbp)
movq %rbx, 0x18(%rsi,%rbp)
movq 0x18(%r13), %rdx
movq (%rdx,%rcx,8), %rdx
movq 0x20(%r13), %rcx
addq %rbp, %rcx
pushq $0x1
popq %r14
movq 0x20(%rsp), %rdi
movl %r14d, %esi
callq 0x30d61
testl %eax, %eax
js 0x2438a
cmpl $-0x1, 0x60(%rsp)
je 0x243ac
movq 0x20(%rsp), %rbp
jmp 0x24380
movl 0x10(%rsp), %eax
cmpl %eax, 0x2c(%rsp)
jne 0x24365
movq %r13, %rdi
movl 0x1c(%rsp), %esi
callq 0x2e1ed
movq %r12, %rdi
callq 0x45c0
leaq 0x62f57(%rip), %rsi     # 0x872c3
leaq 0x62f66(%rip), %rdx     # 0x872d9
xorl %r14d, %r14d
pushq $0x3
popq %rdi
xorl %eax, %eax
callq 0x8132
movq 0x30(%rsp), %r13
jmp 0x23ffc
movl 0x10(%rsp), %eax
cmpl %eax, 0x2c(%rsp)
jne 0x2416e
movq %r13, %rdi
movl 0x1c(%rsp), %esi
callq 0x2e1ed
movq %r12, %rdi
jmp 0x24152
movq 0x20(%r13), %rax
movl 0x30(%rax,%rbp), %esi
movq %rbx, %rdi
callq 0x22ddf
testl %eax, %eax
movq 0x20(%rsp), %rbp
movq 0x30(%rsp), %r13
jns 0x23ffc
jmp 0x2416e