// File: /workspace/github_c_makefile_star2_O1/samtools[P]htslib/header.c
// Function: sam_hrecs_update_hashes
static int sam_hrecs_update_hashes(sam_hrecs_t *hrecs,
                                   khint32_t type,
                                   sam_hrec_type_t *h_type) {
    /* Add to reference hash? */
    if (type == TYPEKEY("SQ")) {
        sam_hrec_tag_t *tag = h_type->tag;
        int nref = hrecs->nref;
        const char *name = NULL;
        const char *altnames = NULL;
        hts_pos_t len = -1;
        int r, invLN = 0;
        khint_t k;

        while (tag) {
            if (tag->str[0] == 'S' && tag->str[1] == 'N') {
                assert(tag->len >= 3);
                name = tag->str+3;
            } else if (tag->str[0] == 'L' && tag->str[1] == 'N') {
                assert(tag->len >= 3);
                hts_pos_t tmp = len;
                len = strtoll(tag->str+3, NULL, 10);
                if (tmp != -1 && tmp != len) {  //duplicate and different LN
                    invLN = 1;
                }
            } else if (tag->str[0] == 'A' && tag->str[1] == 'N') {
                assert(tag->len >= 3);
                altnames = tag->str+3;
            }
            tag = tag->next;
        }

        if (!name) {
            hts_log_error("Header includes @SQ line with no SN: tag");
            return -1; // SN should be present, according to spec.
        }

        if (len == -1) {
            hts_log_error("Header includes @SQ line \"%s\" with no LN: tag",
                          name);
            return -1; // LN should be present, according to spec.
        }

        if (invLN) {
            hts_log_error("Header includes @SQ line \"%s\" with multiple LN:"
            " tag with different values.", name);
            return -1; // LN should not be duplicated or be same
        }

        // Seen already?
        k = kh_get(m_s2i, hrecs->ref_hash, name);
        if (k < kh_end(hrecs->ref_hash)) {
            nref = kh_val(hrecs->ref_hash, k);
            int ref_changed_flag = 0;

            // Check for hash entry added by sam_hrecs_refs_from_targets_array()
            if (hrecs->ref[nref].ty == NULL) {
                // Attach header line to existing stub entry.
                hrecs->ref[nref].ty = h_type;
                // Check lengths match; correct if not.
                if (len != hrecs->ref[nref].len) {
                    char tmp[32];
                    snprintf(tmp, sizeof(tmp), "%" PRIhts_pos,
                             hrecs->ref[nref].len);
                    if (sam_hrecs_update(hrecs, h_type, "LN", tmp, NULL) < 0)
                        return -1;
                    ref_changed_flag = 1;
                }
                if (sam_hrecs_add_ref_altnames(hrecs, nref, altnames) < 0)
                    return -1;

                if (ref_changed_flag && (hrecs->refs_changed < 0 || hrecs->refs_changed > nref))
                    hrecs->refs_changed = nref;
                return 0;
            }

            // Check to see if an existing entry is being updated
            if (hrecs->ref[nref].ty == h_type) {
                if (hrecs->ref[nref].len != len) {
                    hrecs->ref[nref].len = len;
                    ref_changed_flag = 1;
                }
                if (!hrecs->ref[nref].name || strcmp(hrecs->ref[nref].name, name)) {
                    hrecs->ref[nref].name = name;
                    ref_changed_flag = 1;
                }
                if (sam_hrecs_add_ref_altnames(hrecs, nref, altnames) < 0)
                    return -1;

                if (ref_changed_flag && (hrecs->refs_changed < 0 || hrecs->refs_changed > nref))
                    hrecs->refs_changed = nref;
                return 0;
            }

            // If here, the name is a duplicate.
            // Check to see if it matches the SN: tag from the earlier record.
            if (strcmp(hrecs->ref[nref].name, name) == 0) {
                hts_log_error("Duplicate entry \"%s\" in sam header",
                                name);
                return -1;
            }

            // Clash with an already-seen altname
            // As SN: should be preferred to AN: add this as a new
            // record and update the hash entry to point to it.
            hts_log_warning("Ref name SN:\"%s\" is a duplicate of an existing AN key", name);
            nref = hrecs->nref;
        }

        if (nref == hrecs->ref_sz) {
            size_t new_sz = hrecs->ref_sz >= 4 ? hrecs->ref_sz + (hrecs->ref_sz / 4) : 32;
            sam_hrec_sq_t *new_ref = realloc(hrecs->ref, sizeof(*hrecs->ref) * new_sz);
            if (!new_ref)
                return -1;
            hrecs->ref = new_ref;
            hrecs->ref_sz = new_sz;
        }

        hrecs->ref[nref].name = name;
        hrecs->ref[nref].len  = len;
        hrecs->ref[nref].ty = h_type;

        k = kh_put(m_s2i, hrecs->ref_hash, hrecs->ref[nref].name, &r);
        if (-1 == r) return -1;
        kh_val(hrecs->ref_hash, k) = nref;

        if (sam_hrecs_add_ref_altnames(hrecs, nref, altnames) < 0)
            return -1;

        if (hrecs->refs_changed < 0 || hrecs->refs_changed > hrecs->nref)
            hrecs->refs_changed = hrecs->nref;
        hrecs->nref++;
    }

    /* Add to read-group hash? */
    if (type == TYPEKEY("RG")) {
        sam_hrec_tag_t *tag = sam_hrecs_find_key(h_type, "ID", NULL);
        int nrg = hrecs->nrg, r;
        khint_t k;

        if (!tag) {
            hts_log_error("Header includes @RG line with no ID: tag");
            return -1;  // ID should be present, according to spec.
        }
        assert(tag->str && tag->len >= 3);

        // Seen already?
        k = kh_get(m_s2i, hrecs->rg_hash, tag->str + 3);
        if (k < kh_end(hrecs->rg_hash)) {
            nrg = kh_val(hrecs->rg_hash, k);
            assert(hrecs->rg[nrg].ty != NULL);
            if (hrecs->rg[nrg].ty != h_type) {
                hts_log_warning("Duplicate entry \"%s\" in sam header",
                                tag->str + 3);
            } else {
                hrecs->rg[nrg].name = tag->str + 3;
                hrecs->rg[nrg].name_len = tag->len - 3;
            }
            return 0;
        }

        if (nrg == hrecs->rg_sz) {
            size_t new_sz = hrecs->rg_sz >= 4 ? hrecs->rg_sz + hrecs->rg_sz / 4 : 4;
            sam_hrec_rg_t *new_rg = realloc(hrecs->rg, sizeof(*hrecs->rg) * new_sz);
            if (!new_rg)
                return -1;
            hrecs->rg = new_rg;
            hrecs->rg_sz = new_sz;
        }

        hrecs->rg[nrg].name = tag->str + 3;
        hrecs->rg[nrg].name_len = tag->len - 3;
        hrecs->rg[nrg].ty   = h_type;
        hrecs->rg[nrg].id   = nrg;

        k = kh_put(m_s2i, hrecs->rg_hash, hrecs->rg[nrg].name, &r);
        if (-1 == r) return -1;
        kh_val(hrecs->rg_hash, k) = nrg;

        hrecs->nrg++;
    }

    /* Add to program hash? */
    if (type == TYPEKEY("PG")) {
        sam_hrec_tag_t *tag;
        sam_hrec_pg_t *new_pg;
        int npg = hrecs->npg;

        if (npg == hrecs->pg_sz) {
            size_t new_sz = hrecs->pg_sz >= 4 ? hrecs->pg_sz + hrecs->pg_sz / 4 : 4;
            new_pg = realloc(hrecs->pg, sizeof(*hrecs->pg) * new_sz);
            if (!new_pg)
                return -1;
            hrecs->pg = new_pg;
            hrecs->pg_sz = new_sz;
        }

        tag = h_type->tag;
        hrecs->pg[npg].name = NULL;
        hrecs->pg[npg].name_len = 0;
        hrecs->pg[npg].ty  = h_type;
        hrecs->pg[npg].id   = npg;
        hrecs->pg[npg].prev_id = -1;

        while (tag) {
            if (tag->str[0] == 'I' && tag->str[1] == 'D') {
                /* Avoid duplicate ID tags coming from other applications */
                if (!hrecs->pg[npg].name) {
                    assert(tag->len >= 3);
                    hrecs->pg[npg].name = tag->str + 3;
                    hrecs->pg[npg].name_len = tag->len - 3;
                } else {
                    hts_log_warning("PG line with multiple ID tags. The first encountered was preferred - ID:%s", hrecs->pg[npg].name);
                }
            } else if (tag->str[0] == 'P' && tag->str[1] == 'P') {
                // Resolve later if needed
                khint_t k;
                k = kh_get(m_s2i, hrecs->pg_hash, tag->str+3);

                if (k != kh_end(hrecs->pg_hash)) {
                    int p_id = kh_val(hrecs->pg_hash, k);
                    hrecs->pg[npg].prev_id = hrecs->pg[p_id].id;

                    /* Unmark previous entry as a PG termination */
                    if (hrecs->npg_end > 0 &&
                        hrecs->pg_end[hrecs->npg_end-1] == p_id) {
                        hrecs->npg_end--;
                    } else {
                        int i;
                        for (i = 0; i < hrecs->npg_end; i++) {
                            if (hrecs->pg_end[i] == p_id) {
                                memmove(&hrecs->pg_end[i], &hrecs->pg_end[i+1],
                                        (hrecs->npg_end-i-1)*sizeof(*hrecs->pg_end));
                                hrecs->npg_end--;
                            }
                        }
                    }
                } else {
                    hrecs->pg[npg].prev_id = -1;
                }
            }
            tag = tag->next;
        }

        if (hrecs->pg[npg].name) {
            khint_t k;
            int r;
            k = kh_put(m_s2i, hrecs->pg_hash, hrecs->pg[npg].name, &r);
            if (-1 == r) return -1;
            kh_val(hrecs->pg_hash, k) = npg;
        } else {
            return -1; // ID should be present, according to spec.
        }

        /* Add to npg_end[] array. Remove later if we find a PP line */
        if (hrecs->npg_end >= hrecs->npg_end_alloc) {
            int *new_pg_end;
            int  new_alloc = hrecs->npg_end_alloc ? hrecs->npg_end_alloc*2 : 4;

            new_pg_end = realloc(hrecs->pg_end, new_alloc * sizeof(int));
            if (!new_pg_end)
                return -1;
            hrecs->npg_end_alloc = new_alloc;
            hrecs->pg_end = new_pg_end;
        }
        hrecs->pg_end[hrecs->npg_end++] = npg;

        hrecs->npg++;
    }

    return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x88, %rsp
movq %rdx, %r12
movl %esi, %r14d
movq %rdi, %r13
cmpl $0x5351, %esi           # imm = 0x5351
jne 0x89e35
movq %r12, 0x8(%rsp)
movq 0x20(%r12), %r15
movl 0x28(%r13), %ebx
xorl %ebp, %ebp
testq %r15, %r15
je 0x89d4e
movl %ebx, 0x18(%rsp)
movq $-0x1, %rdx
xorl %ebx, %ebx
movq $0x0, 0x20(%rsp)
movq 0x8(%r15), %rdi
movzbl (%rdi), %eax
cmpl $0x41, %eax
je 0x89d1a
cmpl $0x4c, %eax
je 0x89cd9
cmpl $0x53, %eax
jne 0x89d34
cmpb $0x4e, 0x1(%rdi)
jne 0x89ccf
cmpl $0x2, 0x10(%r15)
jle 0x8a848
addq $0x3, %rdi
movq %rdi, %rbx
jmp 0x89d34
cmpl $0x41, %eax
je 0x89d1a
cmpl $0x4c, %eax
jne 0x89d34
cmpb $0x4e, 0x1(%rdi)
jne 0x89d15
cmpl $0x2, 0x10(%r15)
jle 0x8a829
movq %rdx, %r12
addq $0x3, %rdi
xorl %esi, %esi
movl $0xa, %edx
callq 0x40b0
movl %ebp, %ecx
cmpq %rax, %r12
je 0x89d09
movl $0x1, %ecx
cmpq $-0x1, %r12
cmovnel %ecx, %ebp
movq %rax, %rdx
jmp 0x89d34
cmpl $0x41, %eax
jne 0x89d34
cmpb $0x4e, 0x1(%rdi)
jne 0x89d34
cmpl $0x2, 0x10(%r15)
jle 0x8a80a
addq $0x3, %rdi
movq %rdi, 0x20(%rsp)
movq (%r15), %r15
testq %r15, %r15
jne 0x89c9f
testl %ebp, %ebp
sete %al
movq %rbx, %rcx
movl 0x18(%rsp), %ebx
jmp 0x89d62
movq $-0x1, %rdx
movb $0x1, %al
movq $0x0, 0x20(%rsp)
xorl %ecx, %ecx
testq %rcx, %rcx
movq 0x8(%rsp), %r12
je 0x89ddd
cmpq $-0x1, %rdx
je 0x89dfb
testb %al, %al
je 0x89e0b
movq %rdx, 0x30(%rsp)
movq 0x38(%r13), %rax
movq %rax, 0x48(%rsp)
movl (%rax), %eax
testl %eax, %eax
movq %rcx, 0x38(%rsp)
je 0x8a08a
movl %ebx, 0x18(%rsp)
movq %rax, 0x50(%rsp)
leal -0x1(%rax), %esi
movb (%rcx), %dl
testb %dl, %dl
movq %r13, 0x40(%rsp)
movl %r14d, 0x28(%rsp)
je 0x8a091
leaq 0x1(%rcx), %rax
movl $0x811c9dc5, %ebx       # imm = 0x811C9DC5
movzbl %dl, %ecx
xorl %ebx, %ecx
imull $0x1000193, %ecx, %ebx  # imm = 0x1000193
movb (%rax), %dl
incq %rax
testb %dl, %dl
jne 0x89dc4
jmp 0x8a096
leaq 0x1b015(%rip), %rsi     # 0xa4df9
leaq 0x1b026(%rip), %rdx     # 0xa4e11
xorl %ebx, %ebx
movl $0x1, %edi
xorl %eax, %eax
callq 0x14378
jmp 0x89e27
leaq 0x1aff7(%rip), %rsi     # 0xa4df9
leaq 0x1b031(%rip), %rdx     # 0xa4e3a
jmp 0x89e19
leaq 0x1afe7(%rip), %rsi     # 0xa4df9
leaq 0x113e1(%rip), %rdx     # 0x9b1fa
xorl %ebx, %ebx
movl $0x1, %edi
xorl %eax, %eax
callq 0x14378
movl $0xffffffff, %r15d      # imm = 0xFFFFFFFF
testb %bl, %bl
je 0x8a62b
cmpl $0x5247, %r14d          # imm = 0x5247
jne 0x8a222
movl %r14d, 0x28(%rsp)
testq %r12, %r12
je 0x89e6a
movq 0x20(%r12), %r14
testq %r14, %r14
je 0x89e6a
movq 0x8(%r14), %rax
cmpb $0x49, (%rax)
jne 0x89e65
cmpb $0x44, 0x1(%rax)
je 0x89e6d
movq (%r14), %r14
jmp 0x89e51
xorl %r14d, %r14d
testq %r14, %r14
je 0x89ee8
movq 0x8(%r14), %rax
testq %rax, %rax
je 0x8a867
movl 0x10(%r14), %ecx
movl %ecx, 0x5c(%rsp)
cmpl $0x2, %ecx
jle 0x8a867
movl 0x40(%r13), %ebp
movq 0x50(%r13), %rcx
leaq 0x3(%rax), %r8
movq %rcx, 0x20(%rsp)
movl (%rcx), %ecx
testl %ecx, %ecx
movq %r12, 0x8(%rsp)
je 0x89f0f
movq %rcx, 0x50(%rsp)
leal -0x1(%rcx), %edx
movb (%r8), %cl
testb %cl, %cl
movq %r13, 0x40(%rsp)
movl %r15d, 0x14(%rsp)
movl %ebp, 0x30(%rsp)
je 0x89f17
addq $0x4, %rax
movl $0x811c9dc5, %ebx       # imm = 0x811C9DC5
movzbl %cl, %ecx
xorl %ebx, %ecx
imull $0x1000193, %ecx, %ebx  # imm = 0x1000193
movb (%rax), %cl
incq %rax
testb %cl, %cl
jne 0x89ed2
jmp 0x89f1c
leaq 0x1af0a(%rip), %rsi     # 0xa4df9
leaq 0x1afcb(%rip), %rdx     # 0xa4ec1
xorl %ebx, %ebx
movl $0x1, %edi
xorl %eax, %eax
callq 0x14378
movl $0xffffffff, %r15d      # imm = 0xFFFFFFFF
jmp 0x8a215
xorl %r12d, %r12d
jmp 0x89fc0
movl $0x811c9dc5, %ebx       # imm = 0x811C9DC5
andl %edx, %ebx
movq 0x20(%rsp), %rax
movq 0x10(%rax), %rsi
movl $0x1, %r15d
movl %ebx, %r12d
movq %r8, 0x18(%rsp)
movl %edx, 0x48(%rsp)
movq %rsi, 0x38(%rsp)
movl %r12d, %eax
shrl $0x4, %eax
movl (%rsi,%rax,4), %ebp
leal (%r12,%r12), %r13d
andl $0x1e, %r13d
movl %ebp, %eax
movl %r13d, %ecx
shrl %cl, %eax
testb $0x2, %al
jne 0x89fa0
testb $0x1, %al
jne 0x89f88
movq 0x20(%rsp), %rax
movq 0x18(%rax), %rax
movl %r12d, %ecx
movq (%rax,%rcx,8), %rdi
movq %r8, %rsi
callq 0x46c0
movq 0x38(%rsp), %rsi
movl 0x48(%rsp), %edx
movq 0x18(%rsp), %r8
testl %eax, %eax
je 0x89fa0
addl %r15d, %r12d
andl %edx, %r12d
incl %r15d
cmpl %ebx, %r12d
jne 0x89f3e
movq 0x50(%rsp), %rcx
movl %ecx, %r12d
jmp 0x89fb2
movl %r13d, %ecx
shrl %cl, %ebp
testb $0x3, %bpl
movq 0x50(%rsp), %rcx
cmovnel %ecx, %r12d
movq 0x40(%rsp), %r13
movl 0x14(%rsp), %r15d
movl 0x30(%rsp), %ebp
cmpl %ecx, %r12d
jae 0x8a01b
movq 0x20(%rsp), %rax
movq 0x20(%rax), %rax
movl %r12d, %ecx
movslq (%rax,%rcx,4), %rcx
movq 0x48(%r13), %rax
leaq (%rcx,%rcx,2), %rcx
movq 0x8(%rax,%rcx,8), %rdx
testq %rdx, %rdx
je 0x8a8a5
movq 0x8(%rsp), %r12
cmpq %r12, %rdx
movl 0x28(%rsp), %r14d
je 0x8a06f
leaq 0x1adf8(%rip), %rsi     # 0xa4df9
leaq 0x1ae60(%rip), %rdx     # 0xa4e68
xorl %ebx, %ebx
movl $0x3, %edi
movq %r8, %rcx
xorl %eax, %eax
callq 0x14378
jmp 0x8a082
movl 0x44(%r13), %eax
cmpl %eax, %ebp
jne 0x8a065
movl %eax, %ecx
shrl $0x2, %ecx
addl %eax, %ecx
cmpl $0x4, %eax
movl $0x4, %ebx
cmovgel %ecx, %ebx
movq 0x48(%r13), %rdi
leaq (,%rbx,8), %rax
leaq (%rax,%rax,2), %rsi
callq 0x4840
testq %rax, %rax
movq 0x8(%rsp), %r12
je 0x8a1ab
movq %rax, 0x48(%r13)
movl %ebx, 0x44(%r13)
jmp 0x8a1b1
movq 0x8(%rsp), %r12
jmp 0x8a1b6
leaq (%rax,%rcx,8), %rax
movq %r8, (%rax)
movl 0x5c(%rsp), %ecx
addl $-0x3, %ecx
movl %ecx, 0x10(%rax)
xorl %ebx, %ebx
xorl %r15d, %r15d
jmp 0x8a21a
xorl %ebp, %ebp
jmp 0x8a129
movl $0x811c9dc5, %ebx       # imm = 0x811C9DC5
andl %esi, %ebx
movq 0x48(%rsp), %rax
movq 0x10(%rax), %r13
movl $0x1, %r12d
movl %ebx, %ebp
movl %esi, 0x14(%rsp)
movl %ebp, %eax
shrl $0x4, %eax
movl (%r13,%rax,4), %r14d
leal (,%rbp,2), %r15d
andl $0x1e, %r15d
movl %r14d, %eax
movl %r15d, %ecx
shrl %cl, %eax
testb $0x2, %al
jne 0x8a109
testb $0x1, %al
jne 0x8a0f4
movq 0x48(%rsp), %rax
movq 0x18(%rax), %rax
movl %ebp, %ecx
movq (%rax,%rcx,8), %rdi
movq 0x38(%rsp), %rsi
callq 0x46c0
movl 0x14(%rsp), %esi
testl %eax, %eax
je 0x8a109
addl %r12d, %ebp
andl %esi, %ebp
incl %r12d
cmpl %ebx, %ebp
jne 0x8a0ad
movq 0x50(%rsp), %rax
movl %eax, %ebp
jmp 0x8a11b
movl %r15d, %ecx
shrl %cl, %r14d
testb $0x3, %r14b
movq 0x50(%rsp), %rax
cmovnel %eax, %ebp
movq 0x40(%rsp), %r13
movl 0x28(%rsp), %r14d
movl 0x18(%rsp), %ebx
cmpl %eax, %ebp
jae 0x8a6f0
movq 0x48(%rsp), %rax
movq 0x20(%rax), %rax
movl %ebp, %ecx
movl (%rax,%rcx,4), %ecx
movq 0x30(%r13), %rax
movl %ecx, 0x18(%rsp)
movslq %ecx, %rcx
leaq (%rcx,%rcx,2), %rcx
leaq (%rax,%rcx,8), %rbx
movq 0x10(%rbx), %rdx
testq %rdx, %rdx
je 0x8a580
cmpq 0x8(%rsp), %rdx
je 0x8a640
movq (%rbx), %rdi
movq 0x38(%rsp), %rbx
movq %rbx, %rsi
callq 0x46c0
leaq 0x1ac78(%rip), %rsi     # 0xa4df9
testl %eax, %eax
je 0x8a6be
leaq 0x1acfb(%rip), %rdx     # 0xa4e8b
movl $0x3, %edi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x14378
movl 0x28(%r13), %ebx
movb $0x1, %bpl
jmp 0x8a6eb
movl $0xffffffff, %r15d      # imm = 0xFFFFFFFF
testq %rax, %rax
je 0x8a213
movslq %ebp, %rax
movq 0x8(%r14), %rsi
addq $0x3, %rsi
movq 0x48(%r13), %rcx
leaq (%rax,%rax,2), %rax
movq %rsi, (%rcx,%rax,8)
movl 0x10(%r14), %edx
addl $-0x3, %edx
movl %edx, 0x10(%rcx,%rax,8)
movq %r12, 0x8(%rcx,%rax,8)
movl %ebp, 0x14(%rcx,%rax,8)
movq 0x50(%r13), %rdi
leaq 0x60(%rsp), %r14
movq %r14, %rdx
callq 0x89a57
cmpl $-0x1, (%r14)
je 0x8a20d
movq 0x50(%r13), %rcx
movq 0x20(%rcx), %rcx
movl %eax, %eax
movl %ebp, (%rcx,%rax,4)
incl 0x40(%r13)
movb $0x1, %bl
jmp 0x8a215
movl $0xffffffff, %r15d      # imm = 0xFFFFFFFF
xorl %ebx, %ebx
movl 0x28(%rsp), %r14d
testb %bl, %bl
je 0x8a62b
cmpl $0x5047, %r14d          # imm = 0x5047
jne 0x8a628
movl 0x58(%r13), %ebp
movl 0x5c(%r13), %eax
cmpl %eax, %ebp
jne 0x8a27b
movl %eax, %ecx
shrl $0x2, %ecx
addl %eax, %ecx
cmpl $0x4, %eax
movl $0x4, %ebx
cmovgel %ecx, %ebx
movq 0x68(%r13), %rdi
movq %rbx, %rsi
shlq $0x5, %rsi
callq 0x4840
testq %rax, %rax
je 0x8a26c
movq %rax, 0x68(%r13)
movl %ebx, 0x5c(%r13)
jmp 0x8a272
movl $0xffffffff, %r15d      # imm = 0xFFFFFFFF
testq %rax, %rax
je 0x8a622
movl %r15d, 0x14(%rsp)
movslq %ebp, %rcx
movq 0x20(%r12), %r15
movq 0x68(%r13), %rax
shlq $0x5, %rcx
movq $0x0, (%rax,%rcx)
movl $0x0, 0x10(%rax,%rcx)
movq %r12, 0x8(%rax,%rcx)
movq %rcx, %r12
movl %ebp, 0x30(%rsp)
movl %ebp, 0x14(%rax,%rcx)
movl $0xffffffff, 0x18(%rax,%rcx) # imm = 0xFFFFFFFF
testq %r15, %r15
je 0x8a4e3
movq %r12, 0x28(%rsp)
movq %r13, 0x40(%rsp)
movq 0x8(%r15), %rax
movzbl (%rax), %ecx
cmpl $0x50, %ecx
je 0x8a31b
cmpl $0x49, %ecx
jne 0x8a4d7
cmpb $0x44, 0x1(%rax)
jne 0x8a312
movq 0x68(%r13), %rdx
movq (%rdx,%r12), %rcx
testq %rcx, %rcx
je 0x8a36a
movl $0x3, %edi
leaq 0x1aafa(%rip), %rsi     # 0xa4df9
leaq 0x1ac18(%rip), %rdx     # 0xa4f1e
xorl %eax, %eax
callq 0x14378
jmp 0x8a4d7
cmpb $0x50, %cl
jne 0x8a4d7
cmpb $0x50, 0x1(%rax)
jne 0x8a4d7
movq 0x70(%r13), %rcx
movq %rcx, 0x20(%rsp)
movl (%rcx), %edx
testl %edx, %edx
je 0x8a362
leaq 0x3(%rax), %rcx
movq %rcx, 0x8(%rsp)
movb (%rcx), %cl
testb %cl, %cl
je 0x8a38f
addq $0x4, %rax
movl $0x811c9dc5, %ebx       # imm = 0x811C9DC5
movzbl %cl, %ecx
xorl %ebx, %ecx
imull $0x1000193, %ecx, %ebx  # imm = 0x1000193
movb (%rax), %cl
incq %rax
testb %cl, %cl
jne 0x8a34c
jmp 0x8a394
xorl %r14d, %r14d
jmp 0x8a43b
movl 0x10(%r15), %ecx
cmpl $0x2, %ecx
jle 0x8a886
leaq (%rdx,%r12), %rsi
addq $0x3, %rax
movq %rax, (%rsi)
addl $-0x3, %ecx
movl %ecx, 0x10(%rdx,%r12)
jmp 0x8a4d7
movl $0x811c9dc5, %ebx       # imm = 0x811C9DC5
movq %rdx, 0x38(%rsp)
decl %edx
andl %edx, %ebx
movq 0x20(%rsp), %rax
movq 0x10(%rax), %rsi
movl $0x1, %r13d
movl %ebx, %r14d
movq %r15, 0x18(%rsp)
movq %rsi, 0x48(%rsp)
movl %r14d, %eax
shrl $0x4, %eax
movl (%rsi,%rax,4), %r12d
leal (%r14,%r14), %ebp
andl $0x1e, %ebp
movl %r12d, %eax
movl %ebp, %ecx
shrl %cl, %eax
testb $0x2, %al
jne 0x8a41f
testb $0x1, %al
jne 0x8a407
movq 0x20(%rsp), %rax
movq 0x18(%rax), %rax
movl %r14d, %ecx
movq (%rax,%rcx,8), %rdi
movq 0x8(%rsp), %rsi
movl %edx, %r15d
callq 0x46c0
movq 0x48(%rsp), %rsi
movl %r15d, %edx
movq 0x18(%rsp), %r15
testl %eax, %eax
je 0x8a41f
addl %r13d, %r14d
andl %edx, %r14d
incl %r13d
cmpl %ebx, %r14d
jne 0x8a3b9
movq 0x38(%rsp), %rdx
movl %edx, %r14d
jmp 0x8a431
movl %ebp, %ecx
shrl %cl, %r12d
testb $0x3, %r12b
movq 0x38(%rsp), %rdx
cmovnel %edx, %r14d
movq 0x40(%rsp), %r13
movq 0x28(%rsp), %r12
cmpl %edx, %r14d
jne 0x8a452
movq 0x68(%r13), %rax
movl $0xffffffff, 0x18(%rax,%r12) # imm = 0xFFFFFFFF
jmp 0x8a4d7
movq 0x20(%rsp), %rax
movq 0x20(%rax), %rax
movl %r14d, %ecx
movslq (%rax,%rcx,4), %rbx
movq 0x68(%r13), %rax
movq %rbx, %rcx
shlq $0x5, %rcx
movl 0x14(%rax,%rcx), %ecx
movl %ecx, 0x18(%rax,%r12)
movslq 0x60(%r13), %rax
testq %rax, %rax
jle 0x8a491
movq 0x78(%r13), %rcx
cmpl %ebx, -0x4(%rcx,%rax,4)
jne 0x8a491
decl %eax
movl %eax, 0x60(%r13)
jmp 0x8a4d7
movl 0x60(%r13), %eax
testl %eax, %eax
jle 0x8a4d7
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
xorl %r14d, %r14d
movq 0x78(%r13), %rcx
cmpl %ebx, (%rcx,%r14,4)
jne 0x8a4c9
leaq (%rcx,%r14,4), %rdi
leaq (%rcx,%r14,4), %rsi
addq $0x4, %rsi
addl %ebp, %eax
movslq %eax, %rdx
shlq $0x2, %rdx
callq 0x4830
decl 0x60(%r13)
incq %r14
movslq 0x60(%r13), %rax
decl %ebp
cmpq %rax, %r14
jl 0x8a4a1
movq (%r15), %r15
testq %r15, %r15
jne 0x8a2cb
movq 0x68(%r13), %rax
movq (%rax,%r12), %rsi
testq %rsi, %rsi
movl 0x14(%rsp), %r15d
je 0x8a521
movq 0x70(%r13), %rdi
leaq 0x60(%rsp), %r14
movq %r14, %rdx
callq 0x89a57
movl (%r14), %ecx
cmpl $-0x1, %ecx
je 0x8a52c
movq 0x70(%r13), %rdx
movq 0x20(%rdx), %rdx
movl %eax, %eax
movl 0x30(%rsp), %ebp
movl %ebp, (%rdx,%rax,4)
jmp 0x8a536
movl $0xffffffff, %r15d      # imm = 0xFFFFFFFF
jmp 0x8a622
movl $0xffffffff, %r15d      # imm = 0xFFFFFFFF
movl 0x30(%rsp), %ebp
cmpl $-0x1, %ecx
je 0x8a622
movl 0x64(%r13), %eax
cmpl %eax, 0x60(%r13)
jl 0x8a608
leal (%rax,%rax), %ecx
testl %eax, %eax
movl $0x4, %ebx
cmovnel %ecx, %ebx
movq 0x78(%r13), %rdi
movslq %ebx, %rsi
shlq $0x2, %rsi
callq 0x4840
testq %rax, %rax
je 0x8a5fd
movl %ebx, 0x64(%r13)
movq %rax, 0x78(%r13)
jmp 0x8a603
movq 0x8(%rsp), %rsi
movq %rsi, 0x10(%rbx)
xorl %ebp, %ebp
movq 0x30(%rsp), %rdx
cmpq 0x8(%rax,%rcx,8), %rdx
movl 0x18(%rsp), %ebx
je 0x8a5f5
movl %ebx, %r12d
leaq (%rax,%rcx,8), %rax
addq $0x8, %rax
movq (%rax), %rcx
leaq 0xef61(%rip), %rdx      # 0x99511
movq %rsi, %rbx
xorl %ebp, %ebp
leaq 0x60(%rsp), %r15
movl $0x20, %esi
movq %r15, %rdi
xorl %eax, %eax
callq 0x4800
leaq 0x13da5(%rip), %rdx     # 0x9e375
movq %r13, %rdi
movq %rbx, %rsi
movq %r15, %rcx
xorl %r8d, %r8d
xorl %eax, %eax
callq 0x8d5b2
testl %eax, %eax
js 0x8a6e2
notl %eax
shrl $0x1f, %eax
movl %r12d, %ebx
movl %eax, %ebp
movq %r13, %rdi
jmp 0x8a67e
movl $0xffffffff, %r15d      # imm = 0xFFFFFFFF
testq %rax, %rax
je 0x8a622
movq 0x78(%r13), %rax
movslq 0x60(%r13), %rcx
leal 0x1(%rcx), %edx
movl %edx, 0x60(%r13)
movl %ebp, (%rax,%rcx,4)
incl 0x58(%r13)
movb $0x1, %al
jmp 0x8a624
xorl %eax, %eax
testb %al, %al
je 0x8a62b
xorl %r15d, %r15d
movl %r15d, %eax
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
xorl %ebp, %ebp
movq 0x30(%rsp), %rax
cmpq %rax, 0x8(%rbx)
movq 0x38(%rsp), %r15
je 0x8a65b
movq %rax, 0x8(%rbx)
movl $0x1, %ebp
movq (%rbx), %rdi
testq %rdi, %rdi
je 0x8a66f
movq %r15, %rsi
callq 0x46c0
testl %eax, %eax
je 0x8a677
movq %r15, (%rbx)
movl $0x1, %ebp
movq %r13, %rdi
movl 0x18(%rsp), %ebx
movl %ebx, %esi
movq 0x20(%rsp), %rdx
callq 0x8d636
xorl %r15d, %r15d
testl %eax, %eax
js 0x8a6b4
testl %ebp, %ebp
je 0x8a6ba
movl 0x94(%r13), %eax
testl %eax, %eax
js 0x8a6a6
xorl %ebp, %ebp
cmpl %ebx, %eax
jle 0x8a6af
movl %ebx, 0x94(%r13)
xorl %ebp, %ebp
xorl %r15d, %r15d
jmp 0x8a6eb
movl $0xffffffff, %r15d      # imm = 0xFFFFFFFF
xorl %ebp, %ebp
jmp 0x8a6eb
leaq 0x1a7a3(%rip), %rdx     # 0xa4e68
xorl %ebp, %ebp
movl $0x1, %edi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x14378
movl $0xffffffff, %r15d      # imm = 0xFFFFFFFF
movl 0x18(%rsp), %ebx
jmp 0x8a6eb
movl $0xffffffff, %r15d      # imm = 0xFFFFFFFF
movl %r12d, %ebx
testb %bpl, %bpl
je 0x8a73f
movl 0x2c(%r13), %eax
cmpl %eax, %ebx
jne 0x8a735
movl %ebx, 0x18(%rsp)
movl %eax, %ecx
shrl $0x2, %ecx
addl %eax, %ecx
cmpl $0x4, %eax
movl $0x20, %ebx
cmovgel %ecx, %ebx
movq 0x30(%r13), %rdi
leaq (,%rbx,8), %rax
leaq (%rax,%rax,2), %rsi
callq 0x4840
movl %r14d, %ebp
testq %rax, %rax
je 0x8a746
movq %rax, 0x30(%r13)
movl %ebx, 0x2c(%r13)
jmp 0x8a74c
movl %r14d, %ebp
movq 0x30(%rsp), %rdx
jmp 0x8a75e
xorl %ebx, %ebx
jmp 0x8a800
movl $0xffffffff, %r15d      # imm = 0xFFFFFFFF
testq %rax, %rax
movl 0x18(%rsp), %ebx
movq 0x30(%rsp), %rdx
je 0x8a7fb
movq 0x30(%r13), %rax
movslq %ebx, %rcx
leaq (%rcx,%rcx,2), %rcx
movq 0x38(%rsp), %rsi
movq %rsi, (%rax,%rcx,8)
movq %rdx, 0x8(%rax,%rcx,8)
movq 0x8(%rsp), %rdx
movq %rdx, 0x10(%rax,%rcx,8)
movq 0x38(%r13), %rdi
leaq 0x60(%rsp), %r14
movq %r14, %rdx
callq 0x89a57
cmpl $-0x1, (%r14)
je 0x8a7e7
movq 0x38(%r13), %rcx
movq 0x20(%rcx), %rcx
movl %eax, %eax
movl %ebx, (%rcx,%rax,4)
movq %r13, %rdi
movl %ebx, %esi
movq 0x20(%rsp), %rdx
callq 0x8d636
testl %eax, %eax
movl %ebp, %r14d
js 0x8a7f1
movl 0x94(%r13), %eax
testl %eax, %eax
movq 0x8(%rsp), %r12
js 0x8a7d1
cmpl 0x28(%r13), %eax
jle 0x8a7dc
movl 0x28(%r13), %eax
movl %eax, 0x94(%r13)
incl 0x28(%r13)
movb $0x1, %bl
jmp 0x89e2d
xorl %ebx, %ebx
movl $0xffffffff, %r15d      # imm = 0xFFFFFFFF
jmp 0x8a7fd
xorl %ebx, %ebx
movl $0xffffffff, %r15d      # imm = 0xFFFFFFFF
jmp 0x8a800
xorl %ebx, %ebx
movl %ebp, %r14d
movq 0x8(%rsp), %r12
jmp 0x89e2d
leaq 0x1a6e5(%rip), %rdi     # 0xa4ef6
leaq 0x19ed4(%rip), %rsi     # 0xa46ec
leaq 0x1a591(%rip), %rcx     # 0xa4db0
movl $0xa3, %edx
callq 0x42f0
leaq 0x1a6c6(%rip), %rdi     # 0xa4ef6
leaq 0x19eb5(%rip), %rsi     # 0xa46ec
leaq 0x1a572(%rip), %rcx     # 0xa4db0
movl $0x9c, %edx
callq 0x42f0
leaq 0x1a6a7(%rip), %rdi     # 0xa4ef6
leaq 0x19e96(%rip), %rsi     # 0xa46ec
leaq 0x1a553(%rip), %rcx     # 0xa4db0
movl $0x99, %edx
callq 0x42f0
leaq 0x1a67c(%rip), %rdi     # 0xa4eea
leaq 0x19e77(%rip), %rsi     # 0xa46ec
leaq 0x1a534(%rip), %rcx     # 0xa4db0
movl $0x119, %edx            # imm = 0x119
callq 0x42f0
leaq 0x1a669(%rip), %rdi     # 0xa4ef6
leaq 0x19e58(%rip), %rsi     # 0xa46ec
leaq 0x1a515(%rip), %rcx     # 0xa4db0
movl $0x159, %edx            # imm = 0x159
callq 0x42f0
leaq 0x1a658(%rip), %rdi     # 0xa4f04
leaq 0x19e39(%rip), %rsi     # 0xa46ec
leaq 0x1a4f6(%rip), %rcx     # 0xa4db0
movl $0x11f, %edx            # imm = 0x11F
callq 0x42f0