// File: /workspace/github_c_makefile_star2_O3/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, 0x60(%rsp)
movq $0x0, 0x70(%rsp)
xorl %r13d, %r13d
movq %rsi, 0x8(%rsp)
testq %rsi, %rsi
je 0x2cb1b
movq %rdi, %r15
movq 0x28(%rdi), %r12
movq 0x8(%rsp), %rbx
movq %rbx, %rdi
callq 0x41476
movl (%rbx), %eax
cmpl $0x1, %eax
je 0x2bed8
cmpl $0x2, %eax
je 0x2be68
cmpl $0x3, %eax
jne 0x2bf82
leaq 0x7df0e(%rip), %rsi     # 0xa9d0a
movq 0x8(%rsp), %rdi
callq 0x2b32b
testl %eax, %eax
js 0x2bf68
movq 0x8(%rsp), %rcx
movq 0x28(%rcx), %rcx
movl %eax, %eax
movq (%rcx,%rax,8), %rcx
movzbl (%rcx), %edx
cmpl $0x2a, %edx
je 0x2be50
cmpl $0x3d, %edx
je 0x2be50
leaq 0x7f26f(%rip), %rax     # 0xab0a0
cmpb $0x0, (%rdx,%rax)
je 0x2be50
leaq 0x1(%rcx), %rdx
movzbl (%rdx), %esi
testq %rsi, %rsi
je 0x2bf82
incq %rdx
cmpb $0x0, (%rsi,%rax)
jne 0x2be3b
leaq 0x8069f(%rip), %rsi     # 0xac4f6
leaq 0x806d8(%rip), %rdx     # 0xac536
movl $0x3, %edi
jmp 0x2bf5f
leaq 0x7de9b(%rip), %rsi     # 0xa9d0a
movq 0x8(%rsp), %rdi
callq 0x2b32b
testl %eax, %eax
js 0x2bf68
movq 0x8(%rsp), %rcx
movq 0x28(%rcx), %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 0x2bf49
leaq 0x7f2ed(%rip), %rax     # 0xab1a0
cmpb $0x0, (%rcx,%rax)
je 0x2bf49
leaq 0x1(%r14), %rcx
movzbl (%rcx), %edx
testq %rdx, %rdx
je 0x2bf82
incq %rcx
cmpb $0x0, (%rdx,%rax)
jne 0x2bec1
jmp 0x2bf49
leaq 0x7de2b(%rip), %rsi     # 0xa9d0a
movq 0x8(%rsp), %rdi
callq 0x2b32b
testl %eax, %eax
js 0x2bf68
movq 0x8(%rsp), %rcx
movq 0x28(%rcx), %rcx
movl %eax, %eax
movq (%rcx,%rax,8), %r14
leaq 0x805ed(%rip), %rsi     # 0xac4f0
movq %r14, %rdi
callq 0x46e0
testl %eax, %eax
je 0x2bf82
movzbl (%r14), %ecx
cmpq $0x2e, %rcx
sete %al
leal -0x30(%rcx), %edx
cmpb $0xa, %dl
setb %dl
orb %al, %dl
jne 0x2bf49
leaq 0x7f272(%rip), %rax     # 0xab1a0
cmpb $0x0, (%rcx,%rax)
je 0x2bf49
leaq 0x1(%r14), %rcx
movzbl (%rcx), %edx
testq %rdx, %rdx
je 0x2bf82
incq %rcx
cmpb $0x0, (%rdx,%rax)
jne 0x2bf38
leaq 0x805a6(%rip), %rsi     # 0xac4f6
leaq 0x805f9(%rip), %rdx     # 0xac550
movl $0x3, %edi
movq %r14, %rcx
xorl %eax, %eax
callq 0x942d
jmp 0x2bf82
leaq 0x80587(%rip), %rsi     # 0xac4f6
leaq 0x8058f(%rip), %rdx     # 0xac505
movl $0x3, %edi
xorl %eax, %eax
callq 0x942d
movq 0x8(%rsp), %rbx
movq %rbx, %rdi
callq 0x41476
movl (%rbx), %eax
cmpl $0x3, %eax
movq %r15, 0x40(%rsp)
movq %r12, 0x58(%rsp)
jae 0x2c238
movl $0xffffffff, 0x24(%rsp) # imm = 0xFFFFFFFF
movq 0x8(%rsp), %rcx
cmpl $0x0, 0x18(%rcx)
jle 0x2c2b1
movl $0xffffffff, %r12d      # imm = 0xFFFFFFFF
leaq 0x7babb(%rip), %r13     # 0xa7a83
xorl %r15d, %r15d
movl $0xffffffff, 0x10(%rsp) # imm = 0xFFFFFFFF
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
movq $0x0, 0x18(%rsp)
movq 0x8(%rsp), %rax
movq 0x20(%rax), %rax
movq (%rax,%r15,8), %r14
cmpb $0x49, (%r14)
jne 0x2c006
cmpb $0x44, 0x1(%r14)
jne 0x2c006
cmpb $0x0, 0x2(%r14)
je 0x2c175
movq %r14, %rdi
movq %r13, %rsi
callq 0x46e0
testl %eax, %eax
je 0x2c085
movq %r14, %rdi
leaq 0x80582(%rip), %rsi     # 0xac5a1
callq 0x46e0
testl %eax, %eax
je 0x2c0c9
movq %r14, %rdi
leaq 0x805bf(%rip), %rsi     # 0xac5f5
callq 0x46e0
testl %eax, %eax
jne 0x2c1f8
movq 0x8(%rsp), %rax
movq 0x28(%rax), %rax
movq (%rax,%r15,8), %rdi
movzbl (%rdi), %eax
cmpl $0x46, %eax
jg 0x2c190
cmpl $0x2e, %eax
je 0x2c1b1
cmpl $0x41, %eax
jne 0x2c1c7
cmpb $0x0, 0x1(%rdi)
jne 0x2c1c7
movl $0x2, 0x10(%rsp)
jmp 0x2c1f0
movq 0x8(%rsp), %rax
movq 0x28(%rax), %rax
movq (%rax,%r15,8), %rdi
movq %rdi, 0x38(%rsp)
leaq 0x38(%rsp), %rsi
movl $0xa, %edx
callq 0x46f0
movq %rax, %r12
movq 0x38(%rsp), %rax
cmpb $0x0, (%rax)
jne 0x2c860
cmpl $0x7ffffffe, %r12d      # imm = 0x7FFFFFFE
jb 0x2c1f8
jmp 0x2c860
movq 0x8(%rsp), %rax
movq 0x28(%rax), %rax
movq (%rax,%r15,8), %r14
movq %r14, %rdi
leaq 0x804c6(%rip), %rsi     # 0xac5a6
callq 0x46e0
testl %eax, %eax
je 0x2c189
movq %r14, %rdi
leaq 0x804b7(%rip), %rsi     # 0xac5ae
callq 0x46e0
testl %eax, %eax
je 0x2c1aa
movq %r14, %rdi
leaq 0x80518(%rip), %rsi     # 0xac626
callq 0x46e0
movl $0x3, %ebp
testl %eax, %eax
je 0x2c1f8
movq %r14, %rdi
leaq 0x8048a(%rip), %rsi     # 0xac5b4
callq 0x46e0
testl %eax, %eax
je 0x2c1f8
movq %r14, %rdi
leaq 0x8047d(%rip), %rsi     # 0xac5be
callq 0x46e0
testl %eax, %eax
je 0x2c1e4
movl $0x3, %ebp
movl $0x3, %edi
leaq 0x80408(%rip), %rsi     # 0xac567
leaq 0x8045d(%rip), %rdx     # 0xac5c3
movq %r14, %rcx
xorl %eax, %eax
callq 0x942d
jmp 0x2c1f8
movq 0x8(%rsp), %rax
movq 0x28(%rax), %rax
movq (%rax,%r15,8), %rax
movq %rax, 0x18(%rsp)
jmp 0x2c1f8
movl $0x1, %ebp
jmp 0x2c1f8
cmpl $0x47, %eax
je 0x2c1c1
cmpl $0x52, %eax
jne 0x2c1c7
cmpb $0x0, 0x1(%rdi)
jne 0x2c1c7
movl $0x4, 0x10(%rsp)
jmp 0x2c1f0
movl $0x2, %ebp
jmp 0x2c1f8
cmpb $0x0, 0x1(%rdi)
jne 0x2c1c7
movl $0x1, 0x10(%rsp)
jmp 0x2c1f0
cmpb $0x0, 0x1(%rdi)
je 0x2c1e8
movl $0x0, 0x10(%rsp)
leaq 0x8b18c(%rip), %rsi     # 0xb7362
leaq 0x24(%rsp), %rdx
xorl %eax, %eax
callq 0x44a0
jmp 0x2c1f8
xorl %ebp, %ebp
jmp 0x2c1f8
movl $0x3, 0x10(%rsp)
movl $0xfffff, 0x24(%rsp)    # imm = 0xFFFFF
incq %r15
movq 0x8(%rsp), %rax
movslq 0x18(%rax), %rax
cmpq %rax, %r15
jl 0x2bfe1
movq 0x8(%rsp), %rax
movl (%rax), %eax
decl %eax
cmpl $0x2, %eax
jae 0x2c37e
cmpl $-0x1, %ebp
movl $0x0, %r13d
movq 0x18(%rsp), %r15
jne 0x2c31b
jmp 0x2c2dd
cmpl $0x4, %eax
je 0x2c374
cmpl $0x3, %eax
jne 0x2c513
leaq 0x7e386(%rip), %rsi     # 0xaa5d7
movq 0x8(%rsp), %rdi
callq 0x2b32b
xorl %ebp, %ebp
testl %eax, %eax
js 0x2c3db
movq 0x8(%rsp), %rbx
movq 0x28(%rbx), %rcx
movl %eax, %r14d
movq (%rcx,%r14,8), %rdi
leaq 0x38(%rsp), %r15
movq %rdi, (%r15)
movq %r15, %rsi
movl $0xa, %edx
callq 0x40a0
movq %rax, %r12
movq (%r15), %rax
movq 0x28(%rbx), %rcx
cmpq (%rcx,%r14,8), %rax
setne %al
testq %r12, %r12
setns %cl
andb %al, %cl
cmpb $0x1, %cl
je 0x2c3de
jmp 0x2c87f
decl %eax
movl $0xffffffff, 0x10(%rsp) # imm = 0xFFFFFFFF
xorl %r15d, %r15d
movl $0xffffffff, %r12d      # imm = 0xFFFFFFFF
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
movl $0xffffffff, %r14d      # imm = 0xFFFFFFFF
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
cmpl $0x2, %eax
jae 0x2c47b
movq 0x8(%rsp), %rax
movq 0x8(%rax), %r8
cmpb $0x49, (%r8)
leaq 0x8033c(%rip), %rax     # 0xac62d
leaq 0x7b02c(%rip), %rcx     # 0xa7324
cmoveq %rax, %rcx
leaq 0x80264(%rip), %rsi     # 0xac567
leaq 0x802f2(%rip), %rdx     # 0xac5fc
movl $0x3, %ebp
movl $0x3, %edi
xorl %eax, %eax
callq 0x942d
cmpl $-0x1, 0x10(%rsp)
jne 0x2c363
movq 0x8(%rsp), %rax
movq 0x8(%rax), %r8
cmpb $0x49, (%r8)
leaq 0x802f7(%rip), %rax     # 0xac62d
leaq 0x7afe7(%rip), %rcx     # 0xa7324
cmoveq %rax, %rcx
leaq 0x8021f(%rip), %rsi     # 0xac567
leaq 0x802e1(%rip), %rdx     # 0xac630
movl $0x3, %edi
xorl %eax, %eax
callq 0x942d
movl $0x1, 0x10(%rsp)
movl 0x24(%rsp), %r14d
testl %ebp, %ebp
je 0x2c393
movl %r12d, %ecx
jmp 0x2c47b
movl $0x1, %ebp
jmp 0x2c87f
movl 0x24(%rsp), %r14d
movl %r12d, %ecx
xorl %r13d, %r13d
movq 0x18(%rsp), %r15
jmp 0x2c47b
xorl %ebp, %ebp
orl %r14d, 0x10(%rsp)
je 0x2c46d
movq 0x8(%rsp), %rax
movq 0x8(%rax), %rcx
leaq 0x801b7(%rip), %rsi     # 0xac567
leaq 0x802a9(%rip), %rdx     # 0xac660
xorl %r14d, %r14d
movl $0x3, %edi
movq %r15, %r8
xorl %eax, %eax
callq 0x942d
movl $0x0, 0x24(%rsp)
movl %r12d, %ecx
xorl %ebp, %ebp
jmp 0x2c473
xorl %r12d, %r12d
leaq 0x7d925(%rip), %rsi     # 0xa9d0a
movq 0x8(%rsp), %rdi
callq 0x2b32b
testl %eax, %eax
js 0x2c87f
movq 0x8(%rsp), %rcx
movq 0x28(%rcx), %rcx
movl %eax, %eax
movq (%rcx,%rax,8), %rdi
callq 0x4930
testq %rax, %rax
je 0x2cb15
movq %rax, %rbx
movq 0x40(%rsp), %rax
movq 0x30(%rax), %rdi
movl (%rdi), %eax
testl %eax, %eax
movq %rdi, 0x10(%rsp)
movq %r12, 0x28(%rsp)
je 0x2c70b
movq %rax, 0x50(%rsp)
leal -0x1(%rax), %esi
movb (%rbx), %cl
testb %cl, %cl
je 0x2c713
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 0x2c452
jmp 0x2c719
movl %r12d, %ecx
xorl %r14d, %r14d
movl $0x0, 0x10(%rsp)
testq %r15, %r15
je 0x2c513
movl %ecx, 0x28(%rsp)
movq 0x8(%rsp), %rax
movl (%rax), %r12d
movq %r15, %rdi
callq 0x4930
testq %rax, %rax
je 0x2cb15
movq %rax, %rbx
shll $0xc, %r14d
movl 0x10(%rsp), %eax
andl $0xf, %eax
shll $0x8, %eax
orl %r14d, %eax
shll $0x4, %ebp
movzbl %bpl, %edi
orl %eax, %edi
andl $0xf, %r12d
orl %r12d, %edi
movq 0x40(%rsp), %rax
movq 0x28(%rax), %rsi
movl (%rsi), %eax
testl %eax, %eax
movq %r12, 0x50(%rsp)
movl %edi, 0x4c(%rsp)
je 0x2c51a
movq %rax, 0x80(%rsp)
leal -0x1(%rax), %r8d
movb (%rbx), %cl
testb %cl, %cl
je 0x2c522
movq %rbx, %rax
incq %rax
movl $0x811c9dc5, %r13d      # imm = 0x811C9DC5
movzbl %cl, %ecx
xorl %r13d, %ecx
imull $0x1000193, %ecx, %r13d # imm = 0x1000193
movb (%rax), %cl
incq %rax
testb %cl, %cl
jne 0x2c4fb
jmp 0x2c528
xorl %ebp, %ebp
jmp 0x2c87f
xorl %r14d, %r14d
jmp 0x2c5b2
movl $0x811c9dc5, %r13d      # imm = 0x811C9DC5
andl %r8d, %r13d
movq 0x10(%rsi), %rdi
movl $0x1, %r12d
movl %r13d, %r14d
movq %rsi, 0x10(%rsp)
movl %r8d, 0x18(%rsp)
movq %rdi, 0x30(%rsp)
movl %r14d, %eax
shrl $0x4, %eax
movl (%rdi,%rax,4), %r15d
leal (%r14,%r14), %ebp
andl $0x1e, %ebp
movl %r15d, %eax
movl %ebp, %ecx
shrl %cl, %eax
testb $0x2, %al
jne 0x2c59d
testb $0x1, %al
jne 0x2c58d
movq 0x18(%rsi), %rax
movl %r14d, %ecx
movq (%rax,%rcx,8), %rdi
movq %rbx, %rsi
callq 0x46e0
movq 0x30(%rsp), %rdi
movl 0x18(%rsp), %r8d
movq 0x10(%rsp), %rsi
testl %eax, %eax
je 0x2c59d
addl %r12d, %r14d
andl %r8d, %r14d
incl %r12d
cmpl %r13d, %r14d
jne 0x2c547
jmp 0x2c5bb
movl %ebp, %ecx
shrl %cl, %r15d
testb $0x3, %r15b
movq 0x80(%rsp), %rax
cmovnel %eax, %r14d
cmpl %eax, %r14d
jne 0x2c680
leaq 0x7c(%rsp), %r12
movq %rsi, %r13
movq %rsi, %rdi
movq %rbx, 0x18(%rsp)
movq %rbx, %rsi
movq %r12, %rdx
callq 0x3da10
cmpl $0x0, (%r12)
js 0x2c6b7
movl %eax, %ebp
movq 0x20(%r13), %rax
movl %ebp, %edx
imulq $0x38, %rdx, %r14
movups 0x7e994(%rip), %xmm0    # 0xaaf88
movups %xmm0, 0x20(%rax,%r14)
movups 0x7e977(%rip), %xmm0    # 0xaaf78
movups %xmm0, 0x10(%rax,%r14)
movups 0x7e95a(%rip), %xmm0    # 0xaaf68
movups %xmm0, (%rax,%r14)
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
movq %rcx, 0x30(%rax,%r14)
movl 0x4c(%rsp), %eax
movq 0x20(%r13), %rcx
addq %r14, %rcx
movl 0x50(%rsp), %esi
movq %rax, (%rcx,%rsi,8)
movq 0x8(%rsp), %rax
movq %rax, 0x18(%rcx,%rsi,8)
movq 0x20(%r13), %rcx
movl 0x28(%rsp), %r15d
movl %r15d, 0x30(%rcx,%r14)
addq %r14, %rcx
movq 0x18(%r13), %rax
movq (%rax,%rdx,8), %rdx
movq 0x40(%rsp), %rdi
xorl %esi, %esi
callq 0x414fc
testl %eax, %eax
js 0x2c6ad
movl $0x1, %ebp
cmpl $-0x1, %r15d
jne 0x2c87c
movq 0x20(%r13), %rax
movl 0x30(%rax,%r14), %esi
jmp 0x2ccb4
movq %rsi, %r15
movq %rbx, %rdi
callq 0x45c0
movl %r14d, %eax
imulq $0x38, %rax, %rax
movq 0x20(%r15), %rcx
addq %rax, %rcx
movq 0x50(%rsp), %rdi
cmpq $0x0, 0x18(%rcx,%rdi,8)
je 0x2c6c1
xorl %ebp, %ebp
jmp 0x2c87c
movq %r13, %rdi
movl %ebp, %esi
callq 0x3dc22
movq 0x18(%rsp), %rdi
jmp 0x2caf7
movl 0x4c(%rsp), %edx
shll $0x3, %edi
movq %rdx, (%rcx,%rdi)
movq 0x8(%rsp), %rdx
movq %rdx, 0x18(%rdi,%rcx)
movl $0x1, %ebp
cmpl $-0x1, 0x28(%rsp)
movl $0x0, %r13d
jne 0x2c87f
movq 0x20(%r15), %rcx
movl 0x30(%rcx,%rax), %esi
movq 0x8(%rsp), %rdi
callq 0x2b14c
testl %eax, %eax
jns 0x2c87f
jmp 0x2cb15
xorl %r13d, %r13d
jmp 0x2c79d
movl $0x811c9dc5, %r12d      # imm = 0x811C9DC5
andl %esi, %r12d
movq 0x10(%rdi), %r8
movl $0x1, %r14d
movl %r12d, %r13d
movl %esi, 0x18(%rsp)
movq %r8, 0x30(%rsp)
movl %r13d, %eax
shrl $0x4, %eax
movl (%r8,%rax,4), %r15d
leal (,%r13,2), %ebp
andl $0x1e, %ebp
movl %r15d, %eax
movl %ebp, %ecx
shrl %cl, %eax
testb $0x2, %al
jne 0x2c78b
testb $0x1, %al
jne 0x2c77b
movq 0x18(%rdi), %rax
movl %r13d, %ecx
movq (%rax,%rcx,8), %rdi
movq %rbx, %rsi
callq 0x46e0
movq 0x30(%rsp), %r8
movl 0x18(%rsp), %esi
movq 0x10(%rsp), %rdi
testl %eax, %eax
je 0x2c78b
addl %r14d, %r13d
andl %esi, %r13d
incl %r14d
cmpl %r12d, %r13d
jne 0x2c732
jmp 0x2c7a2
movl %ebp, %ecx
shrl %cl, %r15d
testb $0x3, %r15b
movq 0x50(%rsp), %rax
cmovnel %eax, %r13d
cmpl %eax, %r13d
jne 0x2c7c6
leaq 0x7c(%rsp), %rbp
movq %rbx, %r14
movq %rbx, %rsi
movq %rbp, %rdx
callq 0x3da10
cmpl $0x0, (%rbp)
js 0x2cce6
movl %eax, %r13d
movb $0x1, %bl
jmp 0x2c7f1
movq %rbx, %rdi
callq 0x45c0
movq 0x10(%rsp), %rax
movq 0x20(%rax), %rax
movl %r13d, %ecx
imulq $0x38, %rcx, %rcx
xorl %ebp, %ebp
cmpq $0x0, 0x18(%rax,%rcx)
jne 0x2c87c
xorl %ebx, %ebx
xorl %r14d, %r14d
leaq 0x7b28b(%rip), %rsi     # 0xa7a83
movq 0x8(%rsp), %r15
movq %r15, %rdi
callq 0x2b32b
cmpl $-0x1, %eax
movq 0x28(%rsp), %r12
je 0x2cc16
movq 0x28(%r15), %rcx
cltq
movq (%rcx,%rax,8), %rdi
leaq 0x38(%rsp), %rbp
movq %rdi, (%rbp)
movq %rbp, %rsi
movl $0xa, %edx
callq 0x46f0
movq (%rbp), %rcx
cmpb $0x0, (%rcx)
jne 0x2c847
cmpl $0x7ffffffe, %eax       # imm = 0x7FFFFFFE
jb 0x2cc1b
testb %bl, %bl
movq 0x10(%rsp), %rdi
je 0x2c860
movl %r13d, %esi
callq 0x3dc22
movq %r14, %rdi
callq 0x45c0
leaq 0x7fd00(%rip), %rsi     # 0xac567
leaq 0x7fd0f(%rip), %rdx     # 0xac57d
xorl %ebp, %ebp
movl $0x3, %edi
xorl %eax, %eax
callq 0x942d
xorl %r13d, %r13d
movl %ebp, 0x38(%rsp)
testl %ebp, %ebp
je 0x2c937
movq 0x8(%rsp), %rax
cmpl $0x4, (%rax)
jne 0x2ca63
leaq 0x7d46a(%rip), %rsi     # 0xa9d0a
movq 0x8(%rsp), %rdi
callq 0x2b32b
testl %eax, %eax
js 0x2ca63
movq 0x8(%rsp), %rcx
movq 0x8(%rcx), %rdx
movq 0x28(%rcx), %rcx
movl %eax, %eax
movq (%rcx,%rax,8), %rcx
leaq 0x7ee89(%rip), %rsi     # 0xab755
xorl %r15d, %r15d
leaq 0x60(%rsp), %rdi
xorl %eax, %eax
callq 0x89557
testl %eax, %eax
js 0x2caf2
movq 0x58(%rsp), %rax
movq 0x28(%rax), %rax
movq %rax, 0x10(%rsp)
movl (%rax), %eax
testl %eax, %eax
je 0x2ca5a
movq 0x70(%rsp), %rbx
leal -0x1(%rax), %edx
movb (%rbx), %cl
testb %cl, %cl
movq %rax, 0x28(%rsp)
je 0x2c9cf
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 0x2c91c
jmp 0x2c9d5
movq 0x8(%rsp), %rax
cmpl $0x5, (%rax)
jne 0x2c9c0
movq 0x8(%rsp), %rax
movq 0x8(%rax), %rdx
movq 0x10(%rax), %rcx
leaq 0x7eded(%rip), %rsi     # 0xab742
xorl %r15d, %r15d
leaq 0x60(%rsp), %rdi
xorl %eax, %eax
callq 0x89557
testl %eax, %eax
js 0x2caf2
movq 0x58(%rsp), %rax
movq 0x28(%rax), %rax
movq %rax, 0x10(%rsp)
movl (%rax), %eax
testl %eax, %eax
je 0x2cbbb
movq 0x70(%rsp), %rbx
leal -0x1(%rax), %edx
movb (%rbx), %cl
testb %cl, %cl
movq %rax, 0x28(%rsp)
je 0x2cb30
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 0x2c9a5
jmp 0x2cb36
movq 0x8(%rsp), %rdi
callq 0x2ac82
jmp 0x2cb1b
movl $0x811c9dc5, %r14d      # imm = 0x811C9DC5
andl %edx, %r14d
movq 0x10(%rsp), %rax
movq 0x10(%rax), %rsi
movl $0x1, %r13d
movl %r14d, %r15d
movl %edx, 0x18(%rsp)
movq %rsi, 0x30(%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 0x2ca48
testb $0x1, %al
jne 0x2ca38
movq 0x10(%rsp), %rax
movq 0x18(%rax), %rax
movl %r15d, %ecx
movq (%rax,%rcx,8), %rdi
movq %rbx, %rsi
callq 0x46e0
movq 0x30(%rsp), %rsi
movl 0x18(%rsp), %edx
testl %eax, %eax
je 0x2ca48
addl %r13d, %r15d
andl %edx, %r15d
incl %r13d
cmpl %r14d, %r15d
jne 0x2c9f3
jmp 0x2ca63
movl %ebp, %ecx
shrl %cl, %r12d
testb $0x3, %r12b
movq 0x28(%rsp), %rax
cmovnel %eax, %r15d
cmpl %eax, %r15d
jne 0x2cbfa
movq 0x40(%rsp), %r12
movslq 0x50(%r12), %r15
movq 0x48(%r12), %rdi
leaq 0x8(,%r15,8), %rsi
callq 0x4860
testq %rax, %rax
je 0x2cafe
movq %rax, 0x48(%r12)
movq 0x70(%rsp), %rsi
testq %rsi, %rsi
je 0x2cac7
movq 0x58(%rsp), %r13
movq 0x28(%r13), %rdi
leaq 0x38(%rsp), %r14
movq %r14, %rdx
callq 0x2ba4f
cmpl $0x0, (%r14)
js 0x2caf2
movq 0x28(%r13), %rcx
movq 0x20(%rcx), %rcx
movl %eax, %eax
movq 0x8(%rsp), %rdx
movq %rdx, (%rcx,%rax,8)
movq 0x48(%r12), %rax
incq %r15
movslq 0x50(%r12), %rcx
movq 0x8(%rsp), %rdx
movq %rdx, (%rax,%rcx,8)
movl $0x1, 0x54(%r12)
movl %r15d, 0x50(%r12)
xorl %r13d, %r13d
cmpl $0x5, (%rdx)
setne %r13b
jmp 0x2cb1b
movq 0x70(%rsp), %rdi
callq 0x45c0
jmp 0x2cb15
movq 0x70(%rsp), %rdi
callq 0x45c0
movq %r12, %rdi
movq 0x8(%rsp), %rsi
callq 0x2ccee
movl $0xffffffff, %r13d      # imm = 0xFFFFFFFF
movl %r13d, %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 0x10(%rsp), %rax
movq 0x10(%rax), %rsi
movl $0x1, %r13d
movl %r14d, %r15d
movl %edx, 0x18(%rsp)
movq %rsi, 0x30(%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 0x2cba9
testb $0x1, %al
jne 0x2cb99
movq 0x10(%rsp), %rax
movq 0x18(%rax), %rax
movl %r15d, %ecx
movq (%rax,%rcx,8), %rdi
movq %rbx, %rsi
callq 0x46e0
movq 0x30(%rsp), %rsi
movl 0x18(%rsp), %edx
testl %eax, %eax
je 0x2cba9
addl %r13d, %r15d
andl %edx, %r15d
incl %r13d
cmpl %r14d, %r15d
jne 0x2cb54
jmp 0x2cbc0
movl %ebp, %ecx
shrl %cl, %r12d
testb $0x3, %r12b
movq 0x28(%rsp), %rax
cmovnel %eax, %r15d
cmpl %eax, %r15d
jne 0x2cbfa
movq 0x8(%rsp), %rax
movq 0x8(%rax), %rdi
leaq 0x7eb7a(%rip), %rsi     # 0xab74a
callq 0x46e0
testl %eax, %eax
jne 0x2c88b
movq 0x8(%rsp), %rax
movq 0x10(%rax), %rsi
xorl %edi, %edi
callq 0x2bc61
movq 0x58(%rsp), %rcx
movl %eax, 0x38(%rcx)
jmp 0x2c88b
movq 0x8(%rsp), %rdi
callq 0x2ac82
movq 0x70(%rsp), %rdi
callq 0x45c0
xorl %r13d, %r13d
jmp 0x2cb1b
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
movq 0x10(%rsp), %rsi
movq 0x20(%rsi), %rdi
movl %r13d, %ecx
imulq $0x38, %rcx, %r15
movups 0x7e356(%rip), %xmm0    # 0xaaf88
movups %xmm0, 0x20(%rdi,%r15)
movups 0x7e339(%rip), %xmm0    # 0xaaf78
movups %xmm0, 0x10(%rdi,%r15)
movups 0x7e31c(%rip), %xmm0    # 0xaaf68
movups %xmm0, (%rdi,%r15)
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
movq %rdx, 0x30(%rdi,%r15)
movq 0x20(%rsi), %rdi
movl %eax, 0x30(%rdi,%r15)
movq %r12, (%rdi,%r15)
movq 0x8(%rsp), %rdx
movq %rdx, 0x18(%rdi,%r15)
movq 0x18(%rsi), %rdx
movq (%rdx,%rcx,8), %rdx
movq 0x20(%rsi), %rcx
addq %r15, %rcx
movl $0x1, %ebp
movq %rax, %r12
movq 0x40(%rsp), %rdi
movl $0x1, %esi
callq 0x414fc
testl %eax, %eax
js 0x2ccd1
cmpl $-0x1, %r12d
jne 0x2c87c
movq 0x10(%rsp), %rax
movq 0x20(%rax), %rax
movl 0x30(%rax,%r15), %esi
movq 0x8(%rsp), %rdi
callq 0x2b14c
testl %eax, %eax
movl $0x0, %r13d
jns 0x2c87f
jmp 0x2cb15
testb %bl, %bl
je 0x2cb15
movq 0x10(%rsp), %rdi
movl %r13d, %esi
callq 0x3dc22
movq %r14, %rdi
jmp 0x2caf7