// File: /workspace/github_c_makefile_star2_O1/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 $0x88, %rsp
xorps %xmm0, %xmm0
movaps %xmm0, 0x50(%rsp)
movq $0x0, 0x60(%rsp)
xorl %eax, %eax
movq %rsi, (%rsp)
testq %rsi, %rsi
je 0x2dd83
movq %rdi, %r12
movq 0x28(%rdi), %r13
movq (%rsp), %rbx
movq %rbx, %rdi
callq 0x42375
movl (%rbx), %eax
cmpl $0x1, %eax
je 0x2cf7b
cmpl $0x2, %eax
je 0x2cf0a
cmpl $0x3, %eax
jne 0x2d034
leaq 0x7feb2(%rip), %rsi     # 0xacd57
movq (%rsp), %rdi
callq 0x2c40b
testl %eax, %eax
js 0x2d01a
movq (%rsp), %rcx
movq 0x28(%rcx), %rcx
movl %eax, %eax
movq (%rcx,%rax,8), %rcx
movzbl (%rcx), %edx
cmpl $0x2a, %edx
je 0x2cef7
cmpl $0x3d, %edx
je 0x2cef7
leaq 0x81218(%rip), %rax     # 0xae0f0
cmpb $0x0, (%rdx,%rax)
je 0x2cef7
leaq 0x1(%rcx), %rdx
movzbl (%rdx), %esi
testq %rsi, %rsi
je 0x2d034
incq %rdx
cmpb $0x0, (%rsi,%rax)
jne 0x2cee2
leaq 0x82648(%rip), %rsi     # 0xaf546
leaq 0x82681(%rip), %rdx     # 0xaf586
jmp 0x2d00c
leaq 0x7fe46(%rip), %rsi     # 0xacd57
movq (%rsp), %rdi
callq 0x2c40b
testl %eax, %eax
js 0x2d01a
movl %eax, %ebp
movq (%rsp), %rax
movq 0x28(%rax), %rax
movl %ebp, %ecx
movq (%rax,%rcx,8), %rax
movzbl (%rax), %edx
cmpq $0x2e, %rdx
sete %cl
leal -0x30(%rdx), %esi
cmpb $0xa, %sil
setb %sil
orb %cl, %sil
jne 0x2cff0
leaq 0x81299(%rip), %rcx     # 0xae1f0
cmpb $0x0, (%rdx,%rcx)
je 0x2cff0
incq %rax
movzbl (%rax), %edx
testq %rdx, %rdx
je 0x2d034
incq %rax
cmpb $0x0, (%rdx,%rcx)
jne 0x2cf64
jmp 0x2cff0
leaq 0x7fdd5(%rip), %rsi     # 0xacd57
movq (%rsp), %rdi
callq 0x2c40b
testl %eax, %eax
js 0x2d01a
movl %eax, %ebp
movq (%rsp), %rax
movq 0x28(%rax), %rax
movl %ebp, %ecx
movq (%rax,%rcx,8), %r14
leaq 0x82596(%rip), %rsi     # 0xaf540
movq %r14, %rdi
callq 0x46e0
testl %eax, %eax
je 0x2d034
movzbl (%r14), %ecx
cmpq $0x2e, %rcx
sete %al
leal -0x30(%rcx), %edx
cmpb $0xa, %dl
setb %dl
orb %al, %dl
jne 0x2cff0
leaq 0x8121b(%rip), %rax     # 0xae1f0
cmpb $0x0, (%rcx,%rax)
je 0x2cff0
incq %r14
movzbl (%r14), %ecx
testq %rcx, %rcx
je 0x2d034
incq %r14
cmpb $0x0, (%rcx,%rax)
jne 0x2cfde
movq (%rsp), %rax
movq 0x28(%rax), %rax
movl %ebp, %ecx
movq (%rax,%rcx,8), %rcx
leaq 0x82541(%rip), %rsi     # 0xaf546
leaq 0x82594(%rip), %rdx     # 0xaf5a0
movl $0x3, %edi
xorl %eax, %eax
callq 0x9774
jmp 0x2d034
leaq 0x82525(%rip), %rsi     # 0xaf546
leaq 0x8252d(%rip), %rdx     # 0xaf555
movl $0x3, %edi
xorl %eax, %eax
callq 0x9774
movq (%rsp), %rbx
movq %rbx, %rdi
callq 0x42375
movl (%rbx), %eax
cmpl $0x3, %eax
jae 0x2d300
movq %r13, 0x10(%rsp)
movq %r12, 0x20(%rsp)
movl $0xffffffff, 0x34(%rsp) # imm = 0xFFFFFFFF
movq (%rsp), %rax
cmpl $0x0, 0x18(%rax)
jle 0x2d374
movl $0xffffffff, %r15d      # imm = 0xFFFFFFFF
leaq 0x7fcdf(%rip), %r13     # 0xacd57
xorl %r14d, %r14d
movl $0xffffffff, 0x8(%rsp)  # imm = 0xFFFFFFFF
movl $0xffffffff, 0x18(%rsp) # imm = 0xFFFFFFFF
xorl %r12d, %r12d
movq (%rsp), %rax
movq 0x20(%rax), %rax
movq (%rax,%r14,8), %rbp
movq %rbp, %rdi
movq %r13, %rsi
callq 0x46e0
testl %eax, %eax
je 0x2d181
movq %rbp, %rdi
leaq 0x7d96c(%rip), %rsi     # 0xaaa23
callq 0x46e0
testl %eax, %eax
je 0x2d18f
movq %rbp, %rdi
leaq 0x82523(%rip), %rsi     # 0xaf5f1
callq 0x46e0
testl %eax, %eax
je 0x2d1e6
movq %rbp, %rdi
leaq 0x82560(%rip), %rsi     # 0xaf645
callq 0x46e0
testl %eax, %eax
jne 0x2d1cd
movq (%rsp), %rax
movq 0x28(%rax), %rax
movq (%rax,%r14,8), %rbp
movq %rbp, %rdi
leaq 0x7d21c(%rip), %rsi     # 0xaa324
callq 0x46e0
xorl %ecx, %ecx
testl %eax, %eax
je 0x2d2a0
movq %rbp, %rdi
leaq 0x7f2f1(%rip), %rsi     # 0xac412
callq 0x46e0
testl %eax, %eax
je 0x2d2b7
movq %rbp, %rdi
leaq 0x8240c(%rip), %rsi     # 0xaf544
callq 0x46e0
testl %eax, %eax
je 0x2d2c1
movq %rbp, %rdi
leaq 0x8b1a3(%rip), %rsi     # 0xb82f2
callq 0x46e0
movl $0x0, 0x8(%rsp)
testl %eax, %eax
je 0x2d2cb
movq %rbp, %rdi
leaq 0x8caad(%rip), %rsi     # 0xb9c1b
leaq 0x34(%rsp), %rdx
xorl %eax, %eax
callq 0x44a0
movb $0x1, %cl
jmp 0x2d2d5
movq (%rsp), %rax
movq 0x28(%rax), %rax
movq (%rax,%r14,8), %r12
jmp 0x2d1cd
movq (%rsp), %rax
movq 0x28(%rax), %rax
movq (%rax,%r14,8), %rdi
movq %rdi, 0x48(%rsp)
leaq 0x48(%rsp), %rsi
movl $0xa, %edx
callq 0x46f0
movq %rax, %r15
movq 0x48(%rsp), %rax
cmpb $0x0, (%rax)
jne 0x2d5eb
cmpl $0x7ffffffe, %r15d      # imm = 0x7FFFFFFE
jae 0x2d5eb
incq %r14
movq (%rsp), %rax
movslq 0x18(%rax), %rax
cmpq %rax, %r14
jl 0x2d08e
jmp 0x2d38d
movq (%rsp), %rax
movq 0x28(%rax), %rax
movq (%rax,%r14,8), %rbp
movq %rbp, %rdi
leaq 0x823fa(%rip), %rsi     # 0xaf5f6
callq 0x46e0
testl %eax, %eax
je 0x2d293
movq %rbp, %rdi
leaq 0x823eb(%rip), %rsi     # 0xaf5fe
callq 0x46e0
testl %eax, %eax
je 0x2d2aa
movq %rbp, %rdi
leaq 0x8244c(%rip), %rsi     # 0xaf676
callq 0x46e0
movl $0x3, 0x18(%rsp)
testl %eax, %eax
je 0x2d1cd
movq %rbp, %rdi
leaq 0x823bf(%rip), %rsi     # 0xaf604
callq 0x46e0
testl %eax, %eax
je 0x2d1cd
movq %rbp, %rdi
leaq 0x823b2(%rip), %rsi     # 0xaf60e
callq 0x46e0
testl %eax, %eax
je 0x2d2f3
movl $0x3, 0x18(%rsp)
movl $0x3, %edi
leaq 0x8233a(%rip), %rsi     # 0xaf5b7
leaq 0x8238f(%rip), %rdx     # 0xaf613
movq %rbp, %rcx
xorl %eax, %eax
callq 0x9774
jmp 0x2d1cd
movl $0x1, 0x18(%rsp)
jmp 0x2d1cd
movl $0x2, 0x8(%rsp)
jmp 0x2d2d5
movl $0x2, 0x18(%rsp)
jmp 0x2d1cd
movl $0x4, 0x8(%rsp)
jmp 0x2d2d3
movl $0x3, 0x8(%rsp)
jmp 0x2d2d3
movl $0x1, 0x8(%rsp)
xorl %ecx, %ecx
testb %cl, %cl
je 0x2d2e6
movl $0x0, 0x8(%rsp)
jmp 0x2d1cd
movl $0xfffff, 0x34(%rsp)    # imm = 0xFFFFF
jmp 0x2d1cd
movl $0x0, 0x18(%rsp)
jmp 0x2d1cd
cmpl $0x4, %eax
je 0x2da7a
cmpl $0x3, %eax
jne 0x2d52e
leaq 0x8030e(%rip), %rsi     # 0xad627
movq (%rsp), %rdi
callq 0x2c40b
xorl %ebp, %ebp
testl %eax, %eax
js 0x2d553
movq (%rsp), %rbx
movq 0x28(%rbx), %rcx
movl %eax, %r14d
movq (%rcx,%r14,8), %rdi
leaq 0x48(%rsp), %r15
movq %rdi, (%r15)
movq %r15, %rsi
movl $0xa, %edx
callq 0x40a0
movq (%r15), %rdx
movq 0x28(%rbx), %rcx
cmpq (%rcx,%r14,8), %rdx
setne %dl
testq %rax, %rax
setns %cl
andb %dl, %cl
cmpb $0x1, %cl
je 0x2d555
jmp 0x2daa6
movl $0xffffffff, 0x18(%rsp) # imm = 0xFFFFFFFF
xorl %r12d, %r12d
movl $0xffffffff, 0x8(%rsp)  # imm = 0xFFFFFFFF
movl $0xffffffff, %r15d      # imm = 0xFFFFFFFF
movq (%rsp), %rax
movl (%rax), %eax
decl %eax
cmpl $0x1, %eax
ja 0x2d487
movl 0x18(%rsp), %r14d
cmpl $-0x1, %r14d
movq 0x10(%rsp), %r13
jne 0x2d3ec
movq (%rsp), %rax
movq 0x8(%rax), %r8
cmpb $0x49, (%r8)
leaq 0x822bc(%rip), %rax     # 0xaf67d
leaq 0x7cf5c(%rip), %rcx     # 0xaa324
cmoveq %rax, %rcx
leaq 0x821e4(%rip), %rsi     # 0xaf5b7
leaq 0x82272(%rip), %rdx     # 0xaf64c
movl $0x3, %r14d
movl $0x3, %edi
xorl %eax, %eax
callq 0x9774
cmpl $-0x1, 0x8(%rsp)
jne 0x2d433
movq (%rsp), %rax
movq 0x8(%rax), %r8
cmpb $0x49, (%r8)
leaq 0x82277(%rip), %rax     # 0xaf67d
leaq 0x7cf17(%rip), %rcx     # 0xaa324
cmoveq %rax, %rcx
leaq 0x8219f(%rip), %rsi     # 0xaf5b7
leaq 0x82261(%rip), %rdx     # 0xaf680
movl $0x3, %edi
xorl %eax, %eax
callq 0x9774
movl $0x1, 0x8(%rsp)
testl %r14d, %r14d
jne 0x2d491
xorl %r14d, %r14d
movl 0x8(%rsp), %eax
orl 0x34(%rsp), %eax
movl $0x0, 0x8(%rsp)
je 0x2d491
movq (%rsp), %rax
movq 0x8(%rax), %rcx
leaq 0x8215b(%rip), %rsi     # 0xaf5b7
leaq 0x8224d(%rip), %rdx     # 0xaf6b0
xorl %r14d, %r14d
movl $0x3, %edi
movq %r12, %r8
xorl %eax, %eax
callq 0x9774
movl $0x0, 0x34(%rsp)
movl $0x0, 0x8(%rsp)
jmp 0x2d491
movq 0x10(%rsp), %r13
movl 0x18(%rsp), %r14d
testq %r12, %r12
je 0x2d535
movl 0x34(%rsp), %ebp
movq (%rsp), %rax
movl (%rax), %ebx
movq %r12, %rdi
callq 0x4930
testq %rax, %rax
je 0x2d541
movq %rax, %rdx
shll $0xc, %ebp
movl 0x8(%rsp), %eax
andl $0xf, %eax
shll $0x8, %eax
orl %ebp, %eax
shll $0x4, %r14d
movzbl %r14b, %ecx
orl %eax, %ecx
andl $0xf, %ebx
movq %rbx, 0x40(%rsp)
movq 0x20(%rsp), %r12
movq 0x28(%r12), %rbx
movl (%rbx), %eax
testl %eax, %eax
je 0x2d54b
movl %ecx, 0x28(%rsp)
movq %rax, 0x78(%rsp)
leal -0x1(%rax), %esi
movb (%rdx), %cl
testb %cl, %cl
movq %r15, 0x80(%rsp)
je 0x2d611
movq %rdx, %rax
incq %rax
movl $0x811c9dc5, %r12d      # imm = 0x811C9DC5
movzbl %cl, %ecx
xorl %r12d, %ecx
imull $0x1000193, %ecx, %r12d # imm = 0x1000193
movb (%rax), %cl
incq %rax
testb %cl, %cl
jne 0x2d513
jmp 0x2d617
xorl %ebp, %ebp
jmp 0x2daa6
xorl %ebp, %ebp
movq 0x20(%rsp), %r12
jmp 0x2daa6
movq 0x20(%rsp), %r12
jmp 0x2d9c9
xorl %r13d, %r13d
jmp 0x2d6bf
xorl %eax, %eax
movq %rax, 0x28(%rsp)
leaq 0x7f7f6(%rip), %rsi     # 0xacd57
movq (%rsp), %rdi
callq 0x2c40b
testl %eax, %eax
js 0x2daa6
movq (%rsp), %rcx
movq 0x28(%rcx), %rcx
movl %eax, %eax
movq (%rcx,%rax,8), %rdi
callq 0x4930
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
testq %rax, %rax
je 0x2daa6
movq %rax, %rbx
movq 0x30(%r12), %r14
movl (%r14), %r15d
testl %r15d, %r15d
movq %r15, 0x40(%rsp)
movq %r13, 0x10(%rsp)
je 0x2d82c
movq %r12, 0x20(%rsp)
leal -0x1(%r15), %esi
movb (%rbx), %cl
testb %cl, %cl
je 0x2d834
movq %rbx, %rax
incq %rax
movl $0x811c9dc5, %r12d      # imm = 0x811C9DC5
movzbl %cl, %ecx
xorl %r12d, %ecx
imull $0x1000193, %ecx, %r12d # imm = 0x1000193
movb (%rax), %cl
incq %rax
testb %cl, %cl
jne 0x2d5d0
jmp 0x2d83a
leaq 0x81fc5(%rip), %rsi     # 0xaf5b7
leaq 0x81fd4(%rip), %rdx     # 0xaf5cd
xorl %ebp, %ebp
movl $0x3, %edi
xorl %eax, %eax
callq 0x9774
movq 0x20(%rsp), %r12
jmp 0x2daa1
movl $0x811c9dc5, %r12d      # imm = 0x811C9DC5
andl %esi, %r12d
movq 0x10(%rbx), %rdi
movl $0x1, %r14d
movl %r12d, %r13d
movq %rbx, 0x8(%rsp)
movl %esi, 0x18(%rsp)
movq %rdi, 0x38(%rsp)
movl %r13d, %eax
shrl $0x4, %eax
movl (%rdi,%rax,4), %r15d
leal (,%r13,2), %ebp
andl $0x1e, %ebp
movl %r15d, %eax
movl %ebp, %ecx
shrl %cl, %eax
testb $0x2, %al
jne 0x2d69c
testb $0x1, %al
jne 0x2d684
movq 0x18(%rbx), %rax
movl %r13d, %ecx
movq (%rax,%rcx,8), %rdi
movq %rdx, %rbx
movq %rdx, %rsi
callq 0x46e0
movq 0x38(%rsp), %rdi
movl 0x18(%rsp), %esi
movq %rbx, %rdx
movq 0x8(%rsp), %rbx
testl %eax, %eax
je 0x2d69c
addl %r14d, %r13d
andl %esi, %r13d
incl %r14d
cmpl %r12d, %r13d
jne 0x2d635
movq 0x78(%rsp), %rax
movl %eax, %r13d
jmp 0x2d6ae
movl %ebp, %ecx
shrl %cl, %r15d
testb $0x3, %r15b
movq 0x78(%rsp), %rax
cmovnel %eax, %r13d
movq 0x20(%rsp), %r12
movq 0x80(%rsp), %r15
movl 0x28(%rsp), %ecx
movq 0x40(%rsp), %r14
orl %r14d, %ecx
movl %ecx, 0x28(%rsp)
cmpl %eax, %r13d
jne 0x2d798
leaq 0x74(%rsp), %rbp
movq %rbx, %rdi
movq %rdx, %r14
movq %rdx, %rsi
movq %rbp, %rdx
callq 0x3e804
cmpl $0x0, (%rbp)
movq 0x10(%rsp), %r13
js 0x2d7c2
movq %r14, 0x18(%rsp)
movq 0x20(%rbx), %rsi
movl %eax, 0x38(%rsp)
movl %eax, %edx
imulq $0x38, %rdx, %r14
movups 0x808c5(%rip), %xmm0    # 0xadfd8
movups %xmm0, 0x20(%rsi,%r14)
movups 0x808a8(%rip), %xmm0    # 0xadfc8
movups %xmm0, 0x10(%rsi,%r14)
movups 0x8088b(%rip), %xmm0    # 0xadfb8
movups %xmm0, (%rsi,%r14)
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
movq %rcx, 0x30(%rsi,%r14)
movl 0x28(%rsp), %eax
movq 0x20(%rbx), %rcx
addq %r14, %rcx
movl 0x40(%rsp), %esi
movq %rax, (%rcx,%rsi,8)
movq (%rsp), %rax
movq %rax, 0x18(%rcx,%rsi,8)
movq 0x20(%rbx), %rcx
movl %r15d, 0x30(%rcx,%r14)
addq %r14, %rcx
movq 0x18(%rbx), %rax
movq (%rax,%rdx,8), %rdx
movq %r12, %rdi
xorl %esi, %esi
callq 0x423fb
testl %eax, %eax
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
js 0x2d811
cmpl $-0x1, %r15d
jne 0x2da7a
movq 0x20(%rbx), %rax
movl 0x30(%rax,%r14), %esi
jmp 0x2d7fb
movq %rdx, %rdi
callq 0x45c0
movl %r13d, %eax
imulq $0x38, %rax, %rax
movq 0x20(%rbx), %rcx
addq %rax, %rcx
cmpq $0x0, 0x18(%rcx,%r14,8)
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
je 0x2d7cf
xorl %ebp, %ebp
jmp 0x2daa1
movq %r14, %rdi
callq 0x45c0
jmp 0x2d9c9
movl 0x28(%rsp), %edx
shll $0x3, %r14d
movq %rdx, (%rcx,%r14)
movq (%rsp), %rdx
movq %rdx, 0x18(%r14,%rcx)
cmpl $-0x1, %r15d
movq 0x10(%rsp), %r13
jne 0x2da7a
movq 0x20(%rbx), %rcx
movl 0x30(%rcx,%rax), %esi
movq (%rsp), %rdi
callq 0x2c20b
testl %eax, %eax
jns 0x2da7a
jmp 0x2daa6
movq %rbx, %rdi
movl 0x38(%rsp), %esi
callq 0x3e9f7
movq 0x18(%rsp), %rdi
callq 0x45c0
jmp 0x2daa6
xorl %r13d, %r13d
jmp 0x2d8d5
movl $0x811c9dc5, %r12d      # imm = 0x811C9DC5
andl %esi, %r12d
movq %r14, 0x8(%rsp)
movq 0x10(%r14), %rdi
movl $0x1, %r14d
movl %r12d, %r13d
movl %esi, 0x18(%rsp)
movq %rdi, 0x38(%rsp)
movl %r13d, %eax
shrl $0x4, %eax
movl (%rdi,%rax,4), %r15d
leal (,%r13,2), %ebp
andl $0x1e, %ebp
movl %r15d, %eax
movl %ebp, %ecx
shrl %cl, %eax
testb $0x2, %al
jne 0x2d8b9
testb $0x1, %al
jne 0x2d8a1
movq 0x8(%rsp), %rax
movq 0x18(%rax), %rax
movl %r13d, %ecx
movq (%rax,%rcx,8), %rdi
movq %rbx, %rsi
callq 0x46e0
movq 0x38(%rsp), %rdi
movl 0x18(%rsp), %esi
testl %eax, %eax
je 0x2d8b9
addl %r14d, %r13d
andl %esi, %r13d
incl %r14d
cmpl %r12d, %r13d
jne 0x2d858
movq 0x40(%rsp), %r15
movl %r15d, %r13d
jmp 0x2d8cb
movl %ebp, %ecx
shrl %cl, %r15d
testb $0x3, %r15b
movq 0x40(%rsp), %r15
cmovnel %r15d, %r13d
movq 0x20(%rsp), %r12
movq 0x8(%rsp), %r14
cmpl %r15d, %r13d
jne 0x2d908
leaq 0x74(%rsp), %rbp
movq %r14, %rdi
movq %rbx, %r15
movq %rbx, %rsi
movq %rbp, %rdx
callq 0x3e804
cmpl $0x0, (%rbp)
js 0x2d9bc
movl %eax, %ebx
movq %r15, 0x8(%rsp)
movq 0x40(%rsp), %r15
jmp 0x2d935
movq %rbx, %rdi
callq 0x45c0
movq 0x20(%r14), %rax
movl %r13d, %ecx
imulq $0x38, %rcx, %rcx
xorl %ebp, %ebp
cmpq $0x0, 0x18(%rax,%rcx)
jne 0x2daa1
movq $0x0, 0x8(%rsp)
movl %r13d, %ebx
leaq 0x7d0e7(%rip), %rsi     # 0xaaa23
movq (%rsp), %rdi
callq 0x2c40b
cmpl $-0x1, %eax
je 0x2d9d3
movq (%rsp), %rcx
movq 0x28(%rcx), %rcx
cltq
movq (%rcx,%rax,8), %rdi
leaq 0x48(%rsp), %rbp
movq %rdi, (%rbp)
movq %rbp, %rsi
movl $0xa, %edx
callq 0x46f0
movq (%rbp), %rcx
cmpb $0x0, (%rcx)
jne 0x2d982
cmpl $0x7ffffffe, %eax       # imm = 0x7FFFFFFE
jb 0x2d9d8
cmpl %r15d, %r13d
jne 0x2d99b
movq %r14, %rdi
movl %ebx, %esi
callq 0x3e9f7
movq 0x8(%rsp), %rdi
callq 0x45c0
leaq 0x81c15(%rip), %rsi     # 0xaf5b7
leaq 0x81c24(%rip), %rdx     # 0xaf5cd
xorl %ebp, %ebp
movl $0x3, %edi
xorl %eax, %eax
callq 0x9774
jmp 0x2daa1
movq %r15, %rdi
callq 0x45c0
movq 0x10(%rsp), %r13
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
jmp 0x2daa6
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
movq 0x20(%r14), %rdi
movl %ebx, %ecx
movq %r14, %rsi
imulq $0x38, %rcx, %r14
movups 0x805ec(%rip), %xmm0    # 0xadfd8
movups %xmm0, 0x20(%rdi,%r14)
movups 0x805cf(%rip), %xmm0    # 0xadfc8
movups %xmm0, 0x10(%rdi,%r14)
movups 0x805b2(%rip), %xmm0    # 0xadfb8
movups %xmm0, (%rdi,%r14)
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
movq %rdx, 0x30(%rdi,%r14)
movq 0x20(%rsi), %rdi
movl %eax, 0x30(%rdi,%r14)
movq 0x28(%rsp), %rdx
movq %rdx, (%rdi,%r14)
movq (%rsp), %rdx
movq %rdx, 0x18(%rdi,%r14)
movq 0x18(%rsi), %rdx
movq (%rdx,%rcx,8), %rdx
movq %rsi, %r15
movq 0x20(%rsi), %rcx
addq %r14, %rcx
movq %rax, %rbp
movq %r12, %rdi
movl $0x1, %esi
callq 0x423fb
testl %eax, %eax
js 0x2da81
cmpl $-0x1, %ebp
movq 0x10(%rsp), %r13
jne 0x2da7a
movq 0x20(%r15), %rax
movl 0x30(%rax,%r14), %esi
movq (%rsp), %rdi
callq 0x2c20b
testl %eax, %eax
js 0x2d9c9
movl $0x1, %ebp
jmp 0x2daa6
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
cmpl 0x40(%rsp), %r13d
jne 0x2daa1
movq %r15, %rdi
movl %ebx, %esi
callq 0x3e9f7
movq 0x8(%rsp), %rdi
callq 0x45c0
movq 0x10(%rsp), %r13
movl %ebp, 0x48(%rsp)
testl %ebp, %ebp
js 0x2dd27
je 0x2db66
movq (%rsp), %rax
cmpl $0x4, (%rax)
jne 0x2dcb8
leaq 0x7f28b(%rip), %rsi     # 0xacd57
movq (%rsp), %rdi
callq 0x2c40b
testl %eax, %eax
js 0x2dcb8
movq (%rsp), %rcx
movq 0x8(%rcx), %rdx
movq 0x28(%rcx), %rcx
movl %eax, %eax
movq (%rcx,%rax,8), %rcx
leaq 0x80caf(%rip), %rsi     # 0xae7a5
xorl %r15d, %r15d
leaq 0x50(%rsp), %rdi
xorl %eax, %eax
callq 0x8b533
testl %eax, %eax
js 0x2dc03
movq 0x28(%r13), %rax
movq %rax, 0x8(%rsp)
movl (%rax), %eax
testl %eax, %eax
je 0x2dcaf
movq 0x60(%rsp), %rbx
leal -0x1(%rax), %edx
movb (%rbx), %cl
testb %cl, %cl
movq %r12, 0x20(%rsp)
movq %r13, 0x10(%rsp)
movq %rax, 0x28(%rsp)
je 0x2dc12
leaq 0x1(%rbx), %rax
movl $0x811c9dc5, %r14d      # imm = 0x811C9DC5
movzbl %cl, %ecx
xorl %r14d, %ecx
imull $0x1000193, %ecx, %r14d # imm = 0x1000193
movb (%rax), %cl
incq %rax
testb %cl, %cl
jne 0x2db4b
jmp 0x2dc18
movq (%rsp), %rax
cmpl $0x5, (%rax)
jne 0x2dbf5
movq %r12, 0x20(%rsp)
movq (%rsp), %rax
movq 0x8(%rax), %rdx
movq 0x10(%rax), %rcx
leaq 0x80c07(%rip), %rsi     # 0xae792
xorl %r12d, %r12d
leaq 0x50(%rsp), %rdi
xorl %eax, %eax
callq 0x8b533
testl %eax, %eax
js 0x2dc03
movq 0x28(%r13), %rax
movq %rax, 0x8(%rsp)
movl (%rax), %r14d
testl %r14d, %r14d
je 0x2de2d
movq 0x60(%rsp), %rbx
leal -0x1(%r14), %edx
movb (%rbx), %cl
testb %cl, %cl
movq %r13, 0x10(%rsp)
movq %r14, 0x28(%rsp)
je 0x2dd95
leaq 0x1(%rbx), %rax
movl $0x811c9dc5, %r14d      # imm = 0x811C9DC5
movzbl %cl, %ecx
xorl %r14d, %ecx
imull $0x1000193, %ecx, %r14d # imm = 0x1000193
movb (%rax), %cl
incq %rax
testb %cl, %cl
jne 0x2dbda
jmp 0x2dd9b
movq (%rsp), %rdi
callq 0x2bd39
jmp 0x2dd81
movq 0x60(%rsp), %rdi
callq 0x45c0
jmp 0x2dd27
movl $0x811c9dc5, %r14d      # imm = 0x811C9DC5
andl %edx, %r14d
movq 0x8(%rsp), %rax
movq 0x10(%rax), %rsi
movl $0x1, %r13d
movl %r14d, %r15d
movl %edx, 0x18(%rsp)
movq %rsi, 0x38(%rsp)
movl %r15d, %eax
shrl $0x4, %eax
movl (%rsi,%rax,4), %r12d
leal (%r15,%r15), %ebp
andl $0x1e, %ebp
movl %r12d, %eax
movl %ebp, %ecx
shrl %cl, %eax
testb $0x2, %al
jne 0x2dc93
testb $0x1, %al
jne 0x2dc7b
movq 0x8(%rsp), %rax
movq 0x18(%rax), %rax
movl %r15d, %ecx
movq (%rax,%rcx,8), %rdi
movq %rbx, %rsi
callq 0x46e0
movq 0x38(%rsp), %rsi
movl 0x18(%rsp), %edx
testl %eax, %eax
je 0x2dc93
addl %r13d, %r15d
andl %edx, %r15d
incl %r13d
cmpl %r14d, %r15d
jne 0x2dc36
movq 0x28(%rsp), %rax
movl %eax, %r15d
jmp 0x2dca5
movl %ebp, %ecx
shrl %cl, %r12d
testb $0x3, %r12b
movq 0x28(%rsp), %rax
cmovnel %eax, %r15d
movq 0x20(%rsp), %r12
movq 0x10(%rsp), %r13
cmpl %eax, %r15d
jne 0x2dd6e
movslq 0x50(%r12), %r15
movq 0x48(%r12), %rdi
leaq 0x8(,%r15,8), %rsi
callq 0x4860
testq %rax, %rax
je 0x2dd11
movq %rax, 0x48(%r12)
movq 0x60(%rsp), %rsi
testq %rsi, %rsi
je 0x2dd41
movq 0x28(%r13), %rdi
leaq 0x48(%rsp), %r14
movq %r14, %rdx
callq 0x2cb20
movl (%r14), %ebp
testl %ebp, %ebp
js 0x2dd2e
movq 0x28(%r13), %rcx
movq 0x20(%rcx), %rcx
movl %eax, %eax
movq (%rsp), %rdx
movq %rdx, (%rcx,%rax,8)
xorl %eax, %eax
jmp 0x2dd3d
movq 0x60(%rsp), %rdi
callq 0x45c0
movq %r12, %rdi
movq (%rsp), %rsi
callq 0x2de87
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
jmp 0x2dd83
movq 0x60(%rsp), %rdi
callq 0x45c0
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
testl %ebp, %ebp
js 0x2dd83
incq %r15
movq 0x48(%r12), %rax
movslq 0x50(%r12), %rcx
movq (%rsp), %rdx
movq %rdx, (%rax,%rcx,8)
movl $0x1, 0x54(%r12)
movl %r15d, 0x50(%r12)
xorl %eax, %eax
cmpl $0x5, (%rdx)
setne %al
jmp 0x2dd83
movq (%rsp), %rdi
callq 0x2bd39
movq 0x60(%rsp), %rdi
callq 0x45c0
xorl %eax, %eax
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x811c9dc5, %r14d      # imm = 0x811C9DC5
andl %edx, %r14d
movq 0x8(%rsp), %rax
movq 0x10(%rax), %rsi
movl $0x1, %r15d
movl %r14d, %r12d
movl %edx, 0x18(%rsp)
movq %rsi, 0x38(%rsp)
movl %r12d, %eax
shrl $0x4, %eax
movl (%rsi,%rax,4), %r13d
leal (%r12,%r12), %ebp
andl $0x1e, %ebp
movl %r13d, %eax
movl %ebp, %ecx
shrl %cl, %eax
testb $0x2, %al
jne 0x2de16
testb $0x1, %al
jne 0x2ddfe
movq 0x8(%rsp), %rax
movq 0x18(%rax), %rax
movl %r12d, %ecx
movq (%rax,%rcx,8), %rdi
movq %rbx, %rsi
callq 0x46e0
movq 0x38(%rsp), %rsi
movl 0x18(%rsp), %edx
testl %eax, %eax
je 0x2de16
addl %r15d, %r12d
andl %edx, %r12d
incl %r15d
cmpl %r14d, %r12d
jne 0x2ddb9
movq 0x28(%rsp), %r14
movl %r14d, %r12d
jmp 0x2de28
movl %ebp, %ecx
shrl %cl, %r13d
testb $0x3, %r13b
movq 0x28(%rsp), %r14
cmovnel %r14d, %r12d
movq 0x10(%rsp), %r13
cmpl %r14d, %r12d
jne 0x2de5f
movq (%rsp), %rax
movq 0x8(%rax), %rdi
leaq 0x80959(%rip), %rsi     # 0xae79a
callq 0x46e0
testl %eax, %eax
jne 0x2de72
movq (%rsp), %rax
movq 0x10(%rax), %rsi
xorl %edi, %edi
callq 0x2cd13
movl %eax, 0x38(%r13)
jmp 0x2de72
movq (%rsp), %rdi
callq 0x2bd39
movq 0x60(%rsp), %rdi
callq 0x45c0
xorl %eax, %eax
cmpl %r14d, %r12d
movq 0x20(%rsp), %r12
je 0x2dab8
jmp 0x2dd83