// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x140, %rsp            # imm = 0x140
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq %rdx, -0x20(%rbp)
movl -0x14(%rbp), %eax
movl %eax, -0x110(%rbp)
leaq 0x172d6(%rip), %rdi     # 0xf26ec
callq 0xdabd0
movl %eax, %ecx
movl -0x110(%rbp), %eax
cmpl %ecx, %eax
jne 0xdbaff
movq -0x20(%rbp), %rax
movq 0x20(%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x10(%rbp), %rax
movl 0x28(%rax), %eax
movl %eax, -0x2c(%rbp)
movq $0x0, -0x38(%rbp)
movq $0x0, -0x40(%rbp)
movq $-0x1, -0x48(%rbp)
movl $0x0, -0x50(%rbp)
cmpq $0x0, -0x28(%rbp)
je 0xdb5c8
movq -0x28(%rbp), %rax
movq 0x8(%rax), %rax
movsbl (%rax), %eax
cmpl $0x53, %eax
jne 0xdb4cc
movq -0x28(%rbp), %rax
movq 0x8(%rax), %rax
movsbl 0x1(%rax), %eax
cmpl $0x4e, %eax
jne 0xdb4cc
movq -0x28(%rbp), %rax
cmpl $0x3, 0x10(%rax)
jl 0xdb498
jmp 0xdb4b7
leaq 0x1d4b2(%rip), %rdi     # 0xf8951
leaq 0x1cca1(%rip), %rsi     # 0xf8147
movl $0x99, %edx
leaq 0x1d359(%rip), %rcx     # 0xf880b
callq 0x42e0
movq -0x28(%rbp), %rax
movq 0x8(%rax), %rax
addq $0x3, %rax
movq %rax, -0x38(%rbp)
jmp 0xdb5b8
movq -0x28(%rbp), %rax
movq 0x8(%rax), %rax
movsbl (%rax), %eax
cmpl $0x4c, %eax
jne 0xdb558
movq -0x28(%rbp), %rax
movq 0x8(%rax), %rax
movsbl 0x1(%rax), %eax
cmpl $0x4e, %eax
jne 0xdb558
movq -0x28(%rbp), %rax
cmpl $0x3, 0x10(%rax)
jl 0xdb4f9
jmp 0xdb518
leaq 0x1d451(%rip), %rdi     # 0xf8951
leaq 0x1cc40(%rip), %rsi     # 0xf8147
movl $0x9c, %edx
leaq 0x1d2f8(%rip), %rcx     # 0xf880b
callq 0x42e0
movq -0x48(%rbp), %rax
movq %rax, -0x60(%rbp)
movq -0x28(%rbp), %rax
movq 0x8(%rax), %rdi
addq $0x3, %rdi
xorl %eax, %eax
movl %eax, %esi
movl $0xa, %edx
callq 0x40a0
movq %rax, -0x48(%rbp)
cmpq $-0x1, -0x60(%rbp)
je 0xdb556
movq -0x60(%rbp), %rax
cmpq -0x48(%rbp), %rax
je 0xdb556
movl $0x1, -0x50(%rbp)
jmp 0xdb5b6
movq -0x28(%rbp), %rax
movq 0x8(%rax), %rax
movsbl (%rax), %eax
cmpl $0x41, %eax
jne 0xdb5b4
movq -0x28(%rbp), %rax
movq 0x8(%rax), %rax
movsbl 0x1(%rax), %eax
cmpl $0x4e, %eax
jne 0xdb5b4
movq -0x28(%rbp), %rax
cmpl $0x3, 0x10(%rax)
jl 0xdb585
jmp 0xdb5a4
leaq 0x1d3c5(%rip), %rdi     # 0xf8951
leaq 0x1cbb4(%rip), %rsi     # 0xf8147
movl $0xa3, %edx
leaq 0x1d26c(%rip), %rcx     # 0xf880b
callq 0x42e0
movq -0x28(%rbp), %rax
movq 0x8(%rax), %rax
addq $0x3, %rax
movq %rax, -0x40(%rbp)
jmp 0xdb5b6
jmp 0xdb5b8
movq -0x28(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x28(%rbp)
jmp 0xdb460
cmpq $0x0, -0x38(%rbp)
jne 0xdb5f5
movl $0x1, %edi
leaq 0x1d279(%rip), %rsi     # 0xf8854
leaq 0x1d28a(%rip), %rdx     # 0xf886c
movb $0x0, %al
callq 0x1b030
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0xdc473
cmpq $-0x1, -0x48(%rbp)
jne 0xdb626
movq -0x38(%rbp), %rcx
movl $0x1, %edi
leaq 0x1d248(%rip), %rsi     # 0xf8854
leaq 0x1d282(%rip), %rdx     # 0xf8895
movb $0x0, %al
callq 0x1b030
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0xdc473
cmpl $0x0, -0x50(%rbp)
je 0xdb656
movq -0x38(%rbp), %rcx
movl $0x1, %edi
leaq 0x1d218(%rip), %rsi     # 0xf8854
leaq 0x170e4(%rip), %rdx     # 0xf2727
movb $0x0, %al
callq 0x1b030
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0xdc473
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rdi
movq -0x38(%rbp), %rsi
callq 0xdae00
movl %eax, -0x54(%rbp)
movl -0x54(%rbp), %eax
movq -0x10(%rbp), %rcx
movq 0x38(%rcx), %rcx
cmpl (%rcx), %eax
jae 0xdb946
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rax
movq 0x20(%rax), %rax
movl -0x54(%rbp), %ecx
movl (%rax,%rcx,4), %eax
movl %eax, -0x2c(%rbp)
movl $0x0, -0x64(%rbp)
movq -0x10(%rbp), %rax
movq 0x30(%rax), %rax
movslq -0x2c(%rbp), %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
cmpq $0x0, 0x10(%rax)
jne 0xdb7b6
movq -0x20(%rbp), %rcx
movq -0x10(%rbp), %rax
movq 0x30(%rax), %rax
movslq -0x2c(%rbp), %rdx
imulq $0x18, %rdx, %rdx
addq %rdx, %rax
movq %rcx, 0x10(%rax)
movq -0x48(%rbp), %rax
movq -0x10(%rbp), %rcx
movq 0x30(%rcx), %rcx
movslq -0x2c(%rbp), %rdx
imulq $0x18, %rdx, %rdx
addq %rdx, %rcx
cmpq 0x8(%rcx), %rax
je 0xdb75a
leaq -0x90(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x30(%rax), %rax
movslq -0x2c(%rbp), %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq 0x8(%rax), %rcx
movl $0x20, %esi
leaq 0x150d0(%rip), %rdx     # 0xf07e9
movb $0x0, %al
callq 0x47e0
movq -0x10(%rbp), %rdi
movq -0x20(%rbp), %rsi
leaq -0x90(%rbp), %rcx
leaq 0x1a60a(%rip), %rdx     # 0xf5d40
xorl %eax, %eax
movl %eax, %r8d
movb $0x0, %al
callq 0xe0180
cmpl $0x0, %eax
jge 0xdb753
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0xdc473
movl $0x1, -0x64(%rbp)
movq -0x10(%rbp), %rdi
movl -0x2c(%rbp), %esi
movq -0x40(%rbp), %rdx
callq 0xe0220
cmpl $0x0, %eax
jge 0xdb77b
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0xdc473
cmpl $0x0, -0x64(%rbp)
je 0xdb7aa
movq -0x10(%rbp), %rax
cmpl $0x0, 0x94(%rax)
jl 0xdb79d
movq -0x10(%rbp), %rax
movl 0x94(%rax), %eax
cmpl -0x2c(%rbp), %eax
jle 0xdb7aa
movl -0x2c(%rbp), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x94(%rax)
movl $0x0, -0x4(%rbp)
jmp 0xdc473
movq -0x10(%rbp), %rax
movq 0x30(%rax), %rax
movslq -0x2c(%rbp), %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq 0x10(%rax), %rax
cmpq -0x20(%rbp), %rax
jne 0xdb8d0
movq -0x10(%rbp), %rax
movq 0x30(%rax), %rax
movslq -0x2c(%rbp), %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq 0x8(%rax), %rax
cmpq -0x48(%rbp), %rax
je 0xdb816
movq -0x48(%rbp), %rcx
movq -0x10(%rbp), %rax
movq 0x30(%rax), %rax
movslq -0x2c(%rbp), %rdx
imulq $0x18, %rdx, %rdx
addq %rdx, %rax
movq %rcx, 0x8(%rax)
movl $0x1, -0x64(%rbp)
movq -0x10(%rbp), %rax
movq 0x30(%rax), %rax
movslq -0x2c(%rbp), %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
cmpq $0x0, (%rax)
je 0xdb853
movq -0x10(%rbp), %rax
movq 0x30(%rax), %rax
movslq -0x2c(%rbp), %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq (%rax), %rdi
movq -0x38(%rbp), %rsi
callq 0x4690
cmpl $0x0, %eax
je 0xdb874
movq -0x38(%rbp), %rcx
movq -0x10(%rbp), %rax
movq 0x30(%rax), %rax
movslq -0x2c(%rbp), %rdx
imulq $0x18, %rdx, %rdx
addq %rdx, %rax
movq %rcx, (%rax)
movl $0x1, -0x64(%rbp)
movq -0x10(%rbp), %rdi
movl -0x2c(%rbp), %esi
movq -0x40(%rbp), %rdx
callq 0xe0220
cmpl $0x0, %eax
jge 0xdb895
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0xdc473
cmpl $0x0, -0x64(%rbp)
je 0xdb8c4
movq -0x10(%rbp), %rax
cmpl $0x0, 0x94(%rax)
jl 0xdb8b7
movq -0x10(%rbp), %rax
movl 0x94(%rax), %eax
cmpl -0x2c(%rbp), %eax
jle 0xdb8c4
movl -0x2c(%rbp), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x94(%rax)
movl $0x0, -0x4(%rbp)
jmp 0xdc473
movq -0x10(%rbp), %rax
movq 0x30(%rax), %rax
movslq -0x2c(%rbp), %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq (%rax), %rdi
movq -0x38(%rbp), %rsi
callq 0x4690
cmpl $0x0, %eax
jne 0xdb91e
movq -0x38(%rbp), %rcx
movl $0x1, %edi
leaq 0x1cf50(%rip), %rsi     # 0xf8854
leaq 0x1cfb8(%rip), %rdx     # 0xf88c3
movb $0x0, %al
callq 0x1b030
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0xdc473
movq -0x38(%rbp), %rcx
movl $0x3, %edi
leaq 0x1cf26(%rip), %rsi     # 0xf8854
leaq 0x1cfb1(%rip), %rdx     # 0xf88e6
movb $0x0, %al
callq 0x1b030
movq -0x10(%rbp), %rax
movl 0x28(%rax), %eax
movl %eax, -0x2c(%rbp)
movl -0x2c(%rbp), %eax
movq -0x10(%rbp), %rcx
cmpl 0x2c(%rcx), %eax
jne 0xdb9fb
movq -0x10(%rbp), %rax
cmpl $0x4, 0x2c(%rax)
jl 0xdb98e
movq -0x10(%rbp), %rax
movl 0x2c(%rax), %eax
movl %eax, -0x118(%rbp)
movq -0x10(%rbp), %rax
movl 0x2c(%rax), %eax
movl $0x4, %ecx
cltd
idivl %ecx
movl %eax, %ecx
movl -0x118(%rbp), %eax
addl %ecx, %eax
movl %eax, -0x114(%rbp)
jmp 0xdb99b
movl $0x20, %eax
movl %eax, -0x114(%rbp)
jmp 0xdb99b
movl -0x114(%rbp), %eax
cltq
movq %rax, -0x98(%rbp)
movq -0x10(%rbp), %rax
movq 0x30(%rax), %rdi
imulq $0x18, -0x98(%rbp), %rsi
callq 0x4820
movq %rax, -0xa0(%rbp)
cmpq $0x0, -0xa0(%rbp)
jne 0xdb9dc
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0xdc473
movq -0xa0(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x30(%rax)
movq -0x98(%rbp), %rax
movl %eax, %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x2c(%rax)
movq -0x38(%rbp), %rcx
movq -0x10(%rbp), %rax
movq 0x30(%rax), %rax
movslq -0x2c(%rbp), %rdx
imulq $0x18, %rdx, %rdx
addq %rdx, %rax
movq %rcx, (%rax)
movq -0x48(%rbp), %rcx
movq -0x10(%rbp), %rax
movq 0x30(%rax), %rax
movslq -0x2c(%rbp), %rdx
imulq $0x18, %rdx, %rdx
addq %rdx, %rax
movq %rcx, 0x8(%rax)
movq -0x20(%rbp), %rcx
movq -0x10(%rbp), %rax
movq 0x30(%rax), %rax
movslq -0x2c(%rbp), %rdx
imulq $0x18, %rdx, %rdx
addq %rdx, %rax
movq %rcx, 0x10(%rax)
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rdi
movq -0x10(%rbp), %rax
movq 0x30(%rax), %rax
movslq -0x2c(%rbp), %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq (%rax), %rsi
leaq -0x4c(%rbp), %rdx
callq 0xdb090
movl %eax, -0x54(%rbp)
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpl -0x4c(%rbp), %eax
jne 0xdba8b
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0xdc473
movl -0x2c(%rbp), %edx
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rax
movq 0x20(%rax), %rax
movl -0x54(%rbp), %ecx
movl %edx, (%rax,%rcx,4)
movq -0x10(%rbp), %rdi
movl -0x2c(%rbp), %esi
movq -0x40(%rbp), %rdx
callq 0xe0220
cmpl $0x0, %eax
jge 0xdbac1
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0xdc473
movq -0x10(%rbp), %rax
cmpl $0x0, 0x94(%rax)
jl 0xdbae1
movq -0x10(%rbp), %rax
movl 0x94(%rax), %eax
movq -0x10(%rbp), %rcx
cmpl 0x28(%rcx), %eax
jle 0xdbaf2
movq -0x10(%rbp), %rax
movl 0x28(%rax), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x94(%rax)
movq -0x10(%rbp), %rax
movl 0x28(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x28(%rax)
movl -0x14(%rbp), %eax
movl %eax, -0x11c(%rbp)
leaq 0x16b07(%rip), %rdi     # 0xf2616
callq 0xdabd0
movl %eax, %ecx
movl -0x11c(%rbp), %eax
cmpl %ecx, %eax
jne 0xdbea5
movq -0x20(%rbp), %rdi
leaq 0x16aea(%rip), %rsi     # 0xf2619
xorl %eax, %eax
movl %eax, %edx
callq 0xdaf50
movq %rax, -0xa8(%rbp)
movq -0x10(%rbp), %rax
movl 0x40(%rax), %eax
movl %eax, -0xac(%rbp)
cmpq $0x0, -0xa8(%rbp)
jne 0xdbb7c
movl $0x1, %edi
leaq 0x1ccf2(%rip), %rsi     # 0xf8854
leaq 0x1cdb3(%rip), %rdx     # 0xf891c
movb $0x0, %al
callq 0x1b030
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0xdc473
movq -0xa8(%rbp), %rax
cmpq $0x0, 0x8(%rax)
je 0xdbb99
movq -0xa8(%rbp), %rax
cmpl $0x3, 0x10(%rax)
jl 0xdbb99
jmp 0xdbbb8
leaq 0x1cda5(%rip), %rdi     # 0xf8945
leaq 0x1c5a0(%rip), %rsi     # 0xf8147
movl $0x119, %edx            # imm = 0x119
leaq 0x1cc58(%rip), %rcx     # 0xf880b
callq 0x42e0
movq -0x10(%rbp), %rax
movq 0x50(%rax), %rdi
movq -0xa8(%rbp), %rax
movq 0x8(%rax), %rsi
addq $0x3, %rsi
callq 0xdae00
movl %eax, -0xb4(%rbp)
movl -0xb4(%rbp), %eax
movq -0x10(%rbp), %rcx
movq 0x50(%rcx), %rcx
cmpl (%rcx), %eax
jae 0xdbcee
movq -0x10(%rbp), %rax
movq 0x50(%rax), %rax
movq 0x20(%rax), %rax
movl -0xb4(%rbp), %ecx
movl (%rax,%rcx,4), %eax
movl %eax, -0xac(%rbp)
movq -0x10(%rbp), %rax
movq 0x48(%rax), %rax
movslq -0xac(%rbp), %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
cmpq $0x0, 0x8(%rax)
je 0xdbc2a
jmp 0xdbc49
leaq 0x1cd2e(%rip), %rdi     # 0xf895f
leaq 0x1c50f(%rip), %rsi     # 0xf8147
movl $0x11f, %edx            # imm = 0x11F
leaq 0x1cbc7(%rip), %rcx     # 0xf880b
callq 0x42e0
movq -0x10(%rbp), %rax
movq 0x48(%rax), %rax
movslq -0xac(%rbp), %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq 0x8(%rax), %rax
cmpq -0x20(%rbp), %rax
je 0xdbc94
movq -0xa8(%rbp), %rax
movq 0x8(%rax), %rcx
addq $0x3, %rcx
movl $0x3, %edi
leaq 0x1cbd0(%rip), %rsi     # 0xf8854
leaq 0x1cc38(%rip), %rdx     # 0xf88c3
movb $0x0, %al
callq 0x1b030
jmp 0xdbce2
movq -0xa8(%rbp), %rax
movq 0x8(%rax), %rcx
addq $0x3, %rcx
movq -0x10(%rbp), %rax
movq 0x48(%rax), %rax
movslq -0xac(%rbp), %rdx
imulq $0x18, %rdx, %rdx
addq %rdx, %rax
movq %rcx, (%rax)
movq -0xa8(%rbp), %rax
movl 0x10(%rax), %ecx
subl $0x3, %ecx
movq -0x10(%rbp), %rax
movq 0x48(%rax), %rax
movslq -0xac(%rbp), %rdx
imulq $0x18, %rdx, %rdx
addq %rdx, %rax
movl %ecx, 0x10(%rax)
movl $0x0, -0x4(%rbp)
jmp 0xdc473
movl -0xac(%rbp), %eax
movq -0x10(%rbp), %rcx
cmpl 0x44(%rcx), %eax
jne 0xdbda6
movq -0x10(%rbp), %rax
cmpl $0x4, 0x44(%rax)
jl 0xdbd39
movq -0x10(%rbp), %rax
movl 0x44(%rax), %eax
movl %eax, -0x124(%rbp)
movq -0x10(%rbp), %rax
movl 0x44(%rax), %eax
movl $0x4, %ecx
cltd
idivl %ecx
movl %eax, %ecx
movl -0x124(%rbp), %eax
addl %ecx, %eax
movl %eax, -0x120(%rbp)
jmp 0xdbd46
movl $0x4, %eax
movl %eax, -0x120(%rbp)
jmp 0xdbd46
movl -0x120(%rbp), %eax
cltq
movq %rax, -0xc0(%rbp)
movq -0x10(%rbp), %rax
movq 0x48(%rax), %rdi
imulq $0x18, -0xc0(%rbp), %rsi
callq 0x4820
movq %rax, -0xc8(%rbp)
cmpq $0x0, -0xc8(%rbp)
jne 0xdbd87
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0xdc473
movq -0xc8(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x48(%rax)
movq -0xc0(%rbp), %rax
movl %eax, %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x44(%rax)
movq -0xa8(%rbp), %rax
movq 0x8(%rax), %rcx
addq $0x3, %rcx
movq -0x10(%rbp), %rax
movq 0x48(%rax), %rax
movslq -0xac(%rbp), %rdx
imulq $0x18, %rdx, %rdx
addq %rdx, %rax
movq %rcx, (%rax)
movq -0xa8(%rbp), %rax
movl 0x10(%rax), %ecx
subl $0x3, %ecx
movq -0x10(%rbp), %rax
movq 0x48(%rax), %rax
movslq -0xac(%rbp), %rdx
imulq $0x18, %rdx, %rdx
addq %rdx, %rax
movl %ecx, 0x10(%rax)
movq -0x20(%rbp), %rcx
movq -0x10(%rbp), %rax
movq 0x48(%rax), %rax
movslq -0xac(%rbp), %rdx
imulq $0x18, %rdx, %rdx
addq %rdx, %rax
movq %rcx, 0x8(%rax)
movl -0xac(%rbp), %ecx
movq -0x10(%rbp), %rax
movq 0x48(%rax), %rax
movslq -0xac(%rbp), %rdx
imulq $0x18, %rdx, %rdx
addq %rdx, %rax
movl %ecx, 0x14(%rax)
movq -0x10(%rbp), %rax
movq 0x50(%rax), %rdi
movq -0x10(%rbp), %rax
movq 0x48(%rax), %rax
movslq -0xac(%rbp), %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq (%rax), %rsi
leaq -0xb0(%rbp), %rdx
callq 0xdb090
movl %eax, -0xb4(%rbp)
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpl -0xb0(%rbp), %eax
jne 0xdbe7d
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0xdc473
movl -0xac(%rbp), %edx
movq -0x10(%rbp), %rax
movq 0x50(%rax), %rax
movq 0x20(%rax), %rax
movl -0xb4(%rbp), %ecx
movl %edx, (%rax,%rcx,4)
movq -0x10(%rbp), %rax
movl 0x40(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x40(%rax)
movl -0x14(%rbp), %eax
movl %eax, -0x128(%rbp)
leaq 0x1c1c1(%rip), %rdi     # 0xf8076
callq 0xdabd0
movl %eax, %ecx
movl -0x128(%rbp), %eax
cmpl %ecx, %eax
jne 0xdc46c
movq -0x10(%rbp), %rax
movl 0x58(%rax), %eax
movl %eax, -0xdc(%rbp)
movl -0xdc(%rbp), %eax
movq -0x10(%rbp), %rcx
cmpl 0x5c(%rcx), %eax
jne 0xdbf92
movq -0x10(%rbp), %rax
cmpl $0x4, 0x5c(%rax)
jl 0xdbf22
movq -0x10(%rbp), %rax
movl 0x5c(%rax), %eax
movl %eax, -0x130(%rbp)
movq -0x10(%rbp), %rax
movl 0x5c(%rax), %eax
movl $0x4, %ecx
cltd
idivl %ecx
movl %eax, %ecx
movl -0x130(%rbp), %eax
addl %ecx, %eax
movl %eax, -0x12c(%rbp)
jmp 0xdbf2f
movl $0x4, %eax
movl %eax, -0x12c(%rbp)
jmp 0xdbf2f
movl -0x12c(%rbp), %eax
cltq
movq %rax, -0xe8(%rbp)
movq -0x10(%rbp), %rax
movq 0x68(%rax), %rdi
movq -0xe8(%rbp), %rsi
shlq $0x5, %rsi
callq 0x4820
movq %rax, -0xd8(%rbp)
cmpq $0x0, -0xd8(%rbp)
jne 0xdbf73
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0xdc473
movq -0xd8(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x68(%rax)
movq -0xe8(%rbp), %rax
movl %eax, %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x5c(%rax)
movq -0x20(%rbp), %rax
movq 0x20(%rax), %rax
movq %rax, -0xd0(%rbp)
movq -0x10(%rbp), %rax
movq 0x68(%rax), %rax
movslq -0xdc(%rbp), %rcx
shlq $0x5, %rcx
addq %rcx, %rax
movq $0x0, (%rax)
movq -0x10(%rbp), %rax
movq 0x68(%rax), %rax
movslq -0xdc(%rbp), %rcx
shlq $0x5, %rcx
addq %rcx, %rax
movl $0x0, 0x10(%rax)
movq -0x20(%rbp), %rcx
movq -0x10(%rbp), %rax
movq 0x68(%rax), %rax
movslq -0xdc(%rbp), %rdx
shlq $0x5, %rdx
addq %rdx, %rax
movq %rcx, 0x8(%rax)
movl -0xdc(%rbp), %ecx
movq -0x10(%rbp), %rax
movq 0x68(%rax), %rax
movslq -0xdc(%rbp), %rdx
shlq $0x5, %rdx
addq %rdx, %rax
movl %ecx, 0x14(%rax)
movq -0x10(%rbp), %rax
movq 0x68(%rax), %rax
movslq -0xdc(%rbp), %rcx
shlq $0x5, %rcx
addq %rcx, %rax
movl $0xffffffff, 0x18(%rax) # imm = 0xFFFFFFFF
cmpq $0x0, -0xd0(%rbp)
je 0xdc315
movq -0xd0(%rbp), %rax
movq 0x8(%rax), %rax
movsbl (%rax), %eax
cmpl $0x49, %eax
jne 0xdc144
movq -0xd0(%rbp), %rax
movq 0x8(%rax), %rax
movsbl 0x1(%rax), %eax
cmpl $0x44, %eax
jne 0xdc144
movq -0x10(%rbp), %rax
movq 0x68(%rax), %rax
movslq -0xdc(%rbp), %rcx
shlq $0x5, %rcx
addq %rcx, %rax
cmpq $0x0, (%rax)
jne 0xdc10c
movq -0xd0(%rbp), %rax
cmpl $0x3, 0x10(%rax)
jl 0xdc09d
jmp 0xdc0bc
leaq 0x1c8ad(%rip), %rdi     # 0xf8951
leaq 0x1c09c(%rip), %rsi     # 0xf8147
movl $0x159, %edx            # imm = 0x159
leaq 0x1c754(%rip), %rcx     # 0xf880b
callq 0x42e0
movq -0xd0(%rbp), %rax
movq 0x8(%rax), %rcx
addq $0x3, %rcx
movq -0x10(%rbp), %rax
movq 0x68(%rax), %rax
movslq -0xdc(%rbp), %rdx
shlq $0x5, %rdx
addq %rdx, %rax
movq %rcx, (%rax)
movq -0xd0(%rbp), %rax
movl 0x10(%rax), %ecx
subl $0x3, %ecx
movq -0x10(%rbp), %rax
movq 0x68(%rax), %rax
movslq -0xdc(%rbp), %rdx
shlq $0x5, %rdx
addq %rdx, %rax
movl %ecx, 0x10(%rax)
jmp 0xdc13f
movq -0x10(%rbp), %rax
movq 0x68(%rax), %rax
movslq -0xdc(%rbp), %rcx
shlq $0x5, %rcx
addq %rcx, %rax
movq (%rax), %rcx
movl $0x3, %edi
leaq 0x1c723(%rip), %rsi     # 0xf8854
leaq 0x1c841(%rip), %rdx     # 0xf8979
movb $0x0, %al
callq 0x1b030
jmp 0xdc2ff
movq -0xd0(%rbp), %rax
movq 0x8(%rax), %rax
movsbl (%rax), %eax
cmpl $0x50, %eax
jne 0xdc2fd
movq -0xd0(%rbp), %rax
movq 0x8(%rax), %rax
movsbl 0x1(%rax), %eax
cmpl $0x50, %eax
jne 0xdc2fd
movq -0x10(%rbp), %rax
movq 0x70(%rax), %rdi
movq -0xd0(%rbp), %rax
movq 0x8(%rax), %rsi
addq $0x3, %rsi
callq 0xdae00
movl %eax, -0xec(%rbp)
movl -0xec(%rbp), %eax
movq -0x10(%rbp), %rcx
movq 0x70(%rcx), %rcx
cmpl (%rcx), %eax
je 0xdc2de
movq -0x10(%rbp), %rax
movq 0x70(%rax), %rax
movq 0x20(%rax), %rax
movl -0xec(%rbp), %ecx
movl (%rax,%rcx,4), %eax
movl %eax, -0xf0(%rbp)
movq -0x10(%rbp), %rax
movq 0x68(%rax), %rax
movslq -0xf0(%rbp), %rcx
shlq $0x5, %rcx
addq %rcx, %rax
movl 0x14(%rax), %ecx
movq -0x10(%rbp), %rax
movq 0x68(%rax), %rax
movslq -0xdc(%rbp), %rdx
shlq $0x5, %rdx
addq %rdx, %rax
movl %ecx, 0x18(%rax)
movq -0x10(%rbp), %rax
cmpl $0x0, 0x60(%rax)
jle 0xdc234
movq -0x10(%rbp), %rax
movq 0x78(%rax), %rax
movq -0x10(%rbp), %rcx
movl 0x60(%rcx), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movl (%rax,%rcx,4), %eax
cmpl -0xf0(%rbp), %eax
jne 0xdc234
movq -0x10(%rbp), %rax
movl 0x60(%rax), %ecx
addl $-0x1, %ecx
movl %ecx, 0x60(%rax)
jmp 0xdc2dc
movl $0x0, -0xf4(%rbp)
movl -0xf4(%rbp), %eax
movq -0x10(%rbp), %rcx
cmpl 0x60(%rcx), %eax
jge 0xdc2da
movq -0x10(%rbp), %rax
movq 0x78(%rax), %rax
movslq -0xf4(%rbp), %rcx
movl (%rax,%rcx,4), %eax
cmpl -0xf0(%rbp), %eax
jne 0xdc2c4
movq -0x10(%rbp), %rax
movq 0x78(%rax), %rdi
movslq -0xf4(%rbp), %rax
shlq $0x2, %rax
addq %rax, %rdi
movq -0x10(%rbp), %rax
movq 0x78(%rax), %rsi
movl -0xf4(%rbp), %eax
addl $0x1, %eax
cltq
shlq $0x2, %rax
addq %rax, %rsi
movq -0x10(%rbp), %rax
movl 0x60(%rax), %eax
subl -0xf4(%rbp), %eax
subl $0x1, %eax
movslq %eax, %rdx
shlq $0x2, %rdx
callq 0x4810
movq -0x10(%rbp), %rax
movl 0x60(%rax), %ecx
addl $-0x1, %ecx
movl %ecx, 0x60(%rax)
jmp 0xdc2c6
movl -0xf4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xf4(%rbp)
jmp 0xdc23e
jmp 0xdc2dc
jmp 0xdc2fb
movq -0x10(%rbp), %rax
movq 0x68(%rax), %rax
movslq -0xdc(%rbp), %rcx
shlq $0x5, %rcx
addq %rcx, %rax
movl $0xffffffff, 0x18(%rax) # imm = 0xFFFFFFFF
jmp 0xdc2fd
jmp 0xdc2ff
movq -0xd0(%rbp), %rax
movq (%rax), %rax
movq %rax, -0xd0(%rbp)
jmp 0xdc035
movq -0x10(%rbp), %rax
movq 0x68(%rax), %rax
movslq -0xdc(%rbp), %rcx
shlq $0x5, %rcx
addq %rcx, %rax
cmpq $0x0, (%rax)
je 0xdc39a
movq -0x10(%rbp), %rax
movq 0x70(%rax), %rdi
movq -0x10(%rbp), %rax
movq 0x68(%rax), %rax
movslq -0xdc(%rbp), %rcx
shlq $0x5, %rcx
addq %rcx, %rax
movq (%rax), %rsi
leaq -0xfc(%rbp), %rdx
callq 0xdb090
movl %eax, -0xf8(%rbp)
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpl -0xfc(%rbp), %eax
jne 0xdc37d
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0xdc473
movl -0xdc(%rbp), %edx
movq -0x10(%rbp), %rax
movq 0x70(%rax), %rax
movq 0x20(%rax), %rax
movl -0xf8(%rbp), %ecx
movl %edx, (%rax,%rcx,4)
jmp 0xdc3a6
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0xdc473
movq -0x10(%rbp), %rax
movl 0x60(%rax), %eax
movq -0x10(%rbp), %rcx
cmpl 0x64(%rcx), %eax
jl 0xdc43c
movq -0x10(%rbp), %rax
cmpl $0x0, 0x64(%rax)
je 0xdc3d5
movq -0x10(%rbp), %rax
movl 0x64(%rax), %eax
shll %eax
movl %eax, -0x134(%rbp)
jmp 0xdc3e2
movl $0x4, %eax
movl %eax, -0x134(%rbp)
jmp 0xdc3e2
movl -0x134(%rbp), %eax
movl %eax, -0x10c(%rbp)
movq -0x10(%rbp), %rax
movq 0x78(%rax), %rdi
movslq -0x10c(%rbp), %rsi
shlq $0x2, %rsi
callq 0x4820
movq %rax, -0x108(%rbp)
cmpq $0x0, -0x108(%rbp)
jne 0xdc420
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0xdc473
movl -0x10c(%rbp), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x64(%rax)
movq -0x108(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x78(%rax)
movl -0xdc(%rbp), %edx
movq -0x10(%rbp), %rax
movq 0x78(%rax), %rax
movq -0x10(%rbp), %rsi
movl 0x60(%rsi), %ecx
movl %ecx, %edi
addl $0x1, %edi
movl %edi, 0x60(%rsi)
movslq %ecx, %rcx
movl %edx, (%rax,%rcx,4)
movq -0x10(%rbp), %rax
movl 0x58(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x58(%rax)
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x140, %rsp            # imm = 0x140
popq %rbp
retq
nop