// File: /workspace/github_c_makefile_star2_O0/samtools[P]htslib/vcf.c
// Function: bcf_record_check
static int bcf_record_check(const bcf_hdr_t *hdr, bcf1_t *rec) {
    uint8_t *ptr, *end;
    size_t bytes;
    uint32_t err = 0;
    int type = 0;
    int num  = 0;
    uint32_t i, reports;
    const uint32_t is_integer = ((1 << BCF_BT_INT8)  |
                                 (1 << BCF_BT_INT16) |
#ifdef VCF_ALLOW_INT64
                                 (1 << BCF_BT_INT64) |
#endif
                                 (1 << BCF_BT_INT32));
    const uint32_t is_valid_type = (is_integer          |
                                    (1 << BCF_BT_NULL)  |
                                    (1 << BCF_BT_FLOAT) |
                                    (1 << BCF_BT_CHAR));
    int32_t max_id = hdr ? hdr->n[BCF_DT_ID] : 0;

    // Check for valid contig ID
    if (rec->rid < 0
        || (hdr && (rec->rid >= hdr->n[BCF_DT_CTG]
                    || hdr->id[BCF_DT_CTG][rec->rid].key == NULL))) {
        hts_log_warning("Bad BCF record at %"PRIhts_pos": Invalid %s id %d", rec->pos+1, "CONTIG", rec->rid);
        err |= BCF_ERR_CTG_INVALID;
    }

    // Check ID
    ptr = (uint8_t *) rec->shared.s;
    end = ptr + rec->shared.l;
    if (bcf_dec_size_safe(ptr, end, &ptr, &num, &type) != 0) goto bad_shared;
    if (type != BCF_BT_CHAR) {
        hts_log_warning("Bad BCF record at %s:%"PRIhts_pos": Invalid %s type %d (%s)", bcf_seqname_safe(hdr,rec), rec->pos+1, "ID", type, get_type_name(type));
        err |= BCF_ERR_TAG_INVALID;
    }
    bytes = (size_t) num << bcf_type_shift[type];
    if (end - ptr < bytes) goto bad_shared;
    ptr += bytes;

    // Check REF and ALT
    if (rec->n_allele < 1) {
        hts_log_warning("Bad BCF record at %s:%"PRIhts_pos": No REF allele",
                        bcf_seqname_safe(hdr,rec), rec->pos+1);
        err |= BCF_ERR_TAG_UNDEF;
    }

    reports = 0;
    for (i = 0; i < rec->n_allele; i++) {
        if (bcf_dec_size_safe(ptr, end, &ptr, &num, &type) != 0) goto bad_shared;
        if (type != BCF_BT_CHAR) {
            if (!reports++ || hts_verbose >= HTS_LOG_DEBUG)
                hts_log_warning("Bad BCF record at %s:%"PRIhts_pos": Invalid %s type %d (%s)", bcf_seqname_safe(hdr,rec), rec->pos+1, "REF/ALT", type, get_type_name(type));
            err |= BCF_ERR_CHAR;
        }
        bytes = (size_t) num << bcf_type_shift[type];
        if (end - ptr < bytes) goto bad_shared;
        ptr += bytes;
    }

    // Check FILTER
    reports = 0;
    if (bcf_dec_size_safe(ptr, end, &ptr, &num, &type) != 0) goto bad_shared;
    if (num > 0) {
        bytes = (size_t) num << bcf_type_shift[type];
        if (((1 << type) & is_integer) == 0) {
            hts_log_warning("Bad BCF record at %s:%"PRIhts_pos": Invalid %s type %d (%s)", bcf_seqname_safe(hdr,rec), rec->pos+1, "FILTER", type, get_type_name(type));
            err |= BCF_ERR_TAG_INVALID;
            if (end - ptr < bytes) goto bad_shared;
            ptr += bytes;
        } else {
            if (end - ptr < bytes) goto bad_shared;
            for (i = 0; i < num; i++) {
                int32_t key = bcf_dec_int1(ptr, type, &ptr);
                if (key < 0
                    || (hdr && (key >= max_id
                                || hdr->id[BCF_DT_ID][key].key == NULL))) {
                    if (!reports++ || hts_verbose >= HTS_LOG_DEBUG)
                        hts_log_warning("Bad BCF record at %s:%"PRIhts_pos": Invalid %s id %d", bcf_seqname_safe(hdr,rec), rec->pos+1, "FILTER", key);
                    err |= BCF_ERR_TAG_UNDEF;
                }
            }
        }
    }

    // Check INFO
    reports = 0;
    bcf_idpair_t *id_tmp = hdr ? hdr->id[BCF_DT_ID] : NULL;
    for (i = 0; i < rec->n_info; i++) {
        int32_t key = -1;
        if (bcf_dec_typed_int1_safe(ptr, end, &ptr, &key) != 0) goto bad_shared;
        if (key < 0 || (hdr && (key >= max_id
                                || id_tmp[key].key == NULL))) {
            if (!reports++ || hts_verbose >= HTS_LOG_DEBUG)
                hts_log_warning("Bad BCF record at %s:%"PRIhts_pos": Invalid %s id %d", bcf_seqname_safe(hdr,rec), rec->pos+1, "INFO", key);
            err |= BCF_ERR_TAG_UNDEF;
        }
        if (bcf_dec_size_safe(ptr, end, &ptr, &num, &type) != 0) goto bad_shared;
        if (((1 << type) & is_valid_type) == 0
            || (type == BCF_BT_NULL && num > 0)) {
            if (!reports++ || hts_verbose >= HTS_LOG_DEBUG)
                hts_log_warning("Bad BCF record at %s:%"PRIhts_pos": Invalid %s type %d (%s)", bcf_seqname_safe(hdr,rec), rec->pos+1, "INFO", type, get_type_name(type));
            err |= BCF_ERR_TAG_INVALID;
        }
        bytes = (size_t) num << bcf_type_shift[type];
        if (end - ptr < bytes) goto bad_shared;
        ptr += bytes;
    }

    // Check FORMAT and individual information
    ptr = (uint8_t *) rec->indiv.s;
    end = ptr + rec->indiv.l;
    reports = 0;
    for (i = 0; i < rec->n_fmt; i++) {
        int32_t key = -1;
        if (bcf_dec_typed_int1_safe(ptr, end, &ptr, &key) != 0) goto bad_indiv;
        if (key < 0
            || (hdr && (key >= max_id
                        || id_tmp[key].key == NULL))) {
            bcf_record_check_err(hdr, rec, "id", &reports, key);
            err |= BCF_ERR_TAG_UNDEF;
        }
        if (bcf_dec_size_safe(ptr, end, &ptr, &num, &type) != 0) goto bad_indiv;
        if (((1 << type) & is_valid_type) == 0
            || (type == BCF_BT_NULL && num > 0)) {
            bcf_record_check_err(hdr, rec, "type", &reports, type);
            err |= BCF_ERR_TAG_INVALID;
        }
        bytes = ((size_t) num << bcf_type_shift[type]) * rec->n_sample;
        if (end - ptr < bytes) goto bad_indiv;
        ptr += bytes;
    }

    if (!err && rec->rlen < 0) {
        // Treat bad rlen as a warning instead of an error, and try to
        // fix up by using the length of the stored REF allele.
        static int warned = 0;
        if (!warned) {
            hts_log_warning("BCF record at %s:%"PRIhts_pos" has invalid RLEN (%"PRIhts_pos"). "
                            "Only one invalid RLEN will be reported.",
                            bcf_seqname_safe(hdr,rec), rec->pos+1, rec->rlen);
            warned = 1;
        }
        //find rlen considering reflen, END, SVLEN, fmt LEN
        hts_pos_t len = get_rlen(hdr, rec);
        rec->rlen = len >= 0 ? len : 0;
    }

    rec->errcode |= err;

    return err ? -2 : 0; // Return -2 so bcf_read() reports an error

 bad_shared:
    hts_log_error("Bad BCF record at %s:%"PRIhts_pos" - shared section malformed or too short", bcf_seqname_safe(hdr,rec), rec->pos+1);
    return -2;

 bad_indiv:
    hts_log_error("Bad BCF record at %s:%"PRIhts_pos" - individuals section malformed or too short", bcf_seqname_safe(hdr,rec), rec->pos+1);
    return -2;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xf0, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl $0x0, -0x34(%rbp)
movl $0x0, -0x38(%rbp)
movl $0x0, -0x3c(%rbp)
movl $0xe, -0x48(%rbp)
movl $0xaf, -0x4c(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x41a18
movq -0x10(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x74(%rbp)
jmp 0x41a1f
xorl %eax, %eax
movl %eax, -0x74(%rbp)
jmp 0x41a1f
movl -0x74(%rbp), %eax
movl %eax, -0x50(%rbp)
movq -0x18(%rbp), %rax
cmpl $0x0, 0x10(%rax)
jl 0x41a63
cmpq $0x0, -0x10(%rbp)
je 0x41aa0
movq -0x18(%rbp), %rax
movl 0x10(%rax), %eax
movq -0x10(%rbp), %rcx
cmpl 0x4(%rcx), %eax
jge 0x41a63
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movq -0x18(%rbp), %rcx
movslq 0x10(%rcx), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
cmpq $0x0, (%rax)
jne 0x41aa0
movq -0x18(%rbp), %rax
movq (%rax), %rcx
addq $0x1, %rcx
movq -0x18(%rbp), %rax
movl 0x10(%rax), %r9d
movl $0x3, %edi
leaq 0xc6d3f(%rip), %rsi     # 0x1087c1
leaq 0xc6d49(%rip), %rdx     # 0x1087d2
leaq 0xc6d6a(%rip), %r8      # 0x1087fa
movb $0x0, %al
callq 0x9d90
movl -0x34(%rbp), %eax
orl $0x20, %eax
movl %eax, -0x34(%rbp)
movq -0x18(%rbp), %rax
movq 0x30(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movq -0x18(%rbp), %rcx
addq 0x20(%rcx), %rax
movq %rax, -0x28(%rbp)
movq -0x20(%rbp), %rdi
movq -0x28(%rbp), %rsi
leaq -0x20(%rbp), %rdx
leaq -0x3c(%rbp), %rcx
leaq -0x38(%rbp), %r8
callq 0x51ee0
cmpl $0x0, %eax
je 0x41adf
jmp 0x423b6
cmpl $0x7, -0x38(%rbp)
je 0x41b58
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x43520
movq %rax, -0x88(%rbp)
movq -0x18(%rbp), %rax
movq (%rax), %rax
addq $0x1, %rax
movq %rax, -0x80(%rbp)
movl -0x38(%rbp), %eax
movl %eax, -0x78(%rbp)
movl -0x38(%rbp), %edi
callq 0x51fb0
movq -0x88(%rbp), %rcx
movq -0x80(%rbp), %r8
movl -0x78(%rbp), %r10d
movl $0x3, %edi
leaq 0xc6c90(%rip), %rsi     # 0x1087c1
leaq 0xc6cc9(%rip), %rdx     # 0x108801
leaq 0xc4459(%rip), %r9      # 0x105f98
movl %r10d, (%rsp)
movq %rax, 0x8(%rsp)
movb $0x0, %al
callq 0x9d90
movl -0x34(%rbp), %eax
orl $0x40, %eax
movl %eax, -0x34(%rbp)
movslq -0x3c(%rbp), %rax
movslq -0x38(%rbp), %rdx
leaq 0xe3ae9(%rip), %rcx     # 0x125650
movzbl (%rcx,%rdx), %ecx
movl %ecx, %ecx
shlq %cl, %rax
movq %rax, -0x30(%rbp)
movq -0x28(%rbp), %rax
movq -0x20(%rbp), %rcx
subq %rcx, %rax
cmpq -0x30(%rbp), %rax
jae 0x41b8a
jmp 0x423b6
movq -0x30(%rbp), %rax
addq -0x20(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rax
movq 0x18(%rax), %rax
shrq $0x10, %rax
andq $0xffff, %rax           # imm = 0xFFFF
cmpl $0x1, %eax
jge 0x41beb
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x43520
movq %rax, %rcx
movq -0x18(%rbp), %rax
movq (%rax), %r8
addq $0x1, %r8
movl $0x3, %edi
leaq 0xc6bed(%rip), %rsi     # 0x1087c1
leaq 0xc6c58(%rip), %rdx     # 0x108833
movb $0x0, %al
callq 0x9d90
movl -0x34(%rbp), %eax
orl $0x2, %eax
movl %eax, -0x34(%rbp)
movl $0x0, -0x44(%rbp)
movl $0x0, -0x40(%rbp)
movl -0x40(%rbp), %eax
movq -0x18(%rbp), %rcx
movq 0x18(%rcx), %rcx
shrq $0x10, %rcx
andq $0xffff, %rcx           # imm = 0xFFFF
cmpl %ecx, %eax
jae 0x41d2b
movq -0x20(%rbp), %rdi
movq -0x28(%rbp), %rsi
leaq -0x20(%rbp), %rdx
leaq -0x3c(%rbp), %rcx
leaq -0x38(%rbp), %r8
callq 0x51ee0
cmpl $0x0, %eax
je 0x41c3a
jmp 0x423b6
cmpl $0x7, -0x38(%rbp)
je 0x41cdf
movl -0x44(%rbp), %eax
movl %eax, %ecx
addl $0x1, %ecx
movl %ecx, -0x44(%rbp)
cmpl $0x0, %eax
je 0x41c60
leaq 0xe38b5(%rip), %rax     # 0x125510
cmpl $0x5, (%rax)
jl 0x41cd6
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x43520
movq %rax, -0xa0(%rbp)
movq -0x18(%rbp), %rax
movq (%rax), %rax
addq $0x1, %rax
movq %rax, -0x98(%rbp)
movl -0x38(%rbp), %eax
movl %eax, -0x8c(%rbp)
movl -0x38(%rbp), %edi
callq 0x51fb0
movq -0xa0(%rbp), %rcx
movq -0x98(%rbp), %r8
movl -0x8c(%rbp), %r10d
movl $0x3, %edi
leaq 0xc6b09(%rip), %rsi     # 0x1087c1
leaq 0xc6b42(%rip), %rdx     # 0x108801
leaq 0xc6b95(%rip), %r9      # 0x10885b
movl %r10d, (%rsp)
movq %rax, 0x8(%rsp)
movb $0x0, %al
callq 0x9d90
movl -0x34(%rbp), %eax
orl $0x10, %eax
movl %eax, -0x34(%rbp)
movslq -0x3c(%rbp), %rax
movslq -0x38(%rbp), %rdx
leaq 0xe3962(%rip), %rcx     # 0x125650
movzbl (%rcx,%rdx), %ecx
movl %ecx, %ecx
shlq %cl, %rax
movq %rax, -0x30(%rbp)
movq -0x28(%rbp), %rax
movq -0x20(%rbp), %rcx
subq %rcx, %rax
cmpq -0x30(%rbp), %rax
jae 0x41d11
jmp 0x423b6
movq -0x30(%rbp), %rax
addq -0x20(%rbp), %rax
movq %rax, -0x20(%rbp)
movl -0x40(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x40(%rbp)
jmp 0x41bf9
movl $0x0, -0x44(%rbp)
movq -0x20(%rbp), %rdi
movq -0x28(%rbp), %rsi
leaq -0x20(%rbp), %rdx
leaq -0x3c(%rbp), %rcx
leaq -0x38(%rbp), %r8
callq 0x51ee0
cmpl $0x0, %eax
je 0x41d55
jmp 0x423b6
cmpl $0x0, -0x3c(%rbp)
jle 0x41f20
movslq -0x3c(%rbp), %rax
movslq -0x38(%rbp), %rdx
leaq 0xe38e2(%rip), %rcx     # 0x125650
movzbl (%rcx,%rdx), %ecx
movl %ecx, %ecx
shlq %cl, %rax
movq %rax, -0x30(%rbp)
movl -0x38(%rbp), %ecx
movl $0x1, %eax
shll %cl, %eax
andl $0xe, %eax
cmpl $0x0, %eax
jne 0x41e37
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x43520
movq %rax, -0xb8(%rbp)
movq -0x18(%rbp), %rax
movq (%rax), %rax
addq $0x1, %rax
movq %rax, -0xb0(%rbp)
movl -0x38(%rbp), %eax
movl %eax, -0xa4(%rbp)
movl -0x38(%rbp), %edi
callq 0x51fb0
movq -0xb8(%rbp), %rcx
movq -0xb0(%rbp), %r8
movl -0xa4(%rbp), %r10d
movl $0x3, %edi
leaq 0xc69d8(%rip), %rsi     # 0x1087c1
leaq 0xc6a11(%rip), %rdx     # 0x108801
leaq 0xc20a0(%rip), %r9      # 0x103e97
movl %r10d, (%rsp)
movq %rax, 0x8(%rsp)
movb $0x0, %al
callq 0x9d90
movl -0x34(%rbp), %eax
orl $0x40, %eax
movl %eax, -0x34(%rbp)
movq -0x28(%rbp), %rax
movq -0x20(%rbp), %rcx
subq %rcx, %rax
cmpq -0x30(%rbp), %rax
jae 0x41e26
jmp 0x423b6
movq -0x30(%rbp), %rax
addq -0x20(%rbp), %rax
movq %rax, -0x20(%rbp)
jmp 0x41f1e
movq -0x28(%rbp), %rax
movq -0x20(%rbp), %rcx
subq %rcx, %rax
cmpq -0x30(%rbp), %rax
jae 0x41e4d
jmp 0x423b6
movl $0x0, -0x40(%rbp)
movl -0x40(%rbp), %eax
cmpl -0x3c(%rbp), %eax
jae 0x41f1c
movq -0x20(%rbp), %rdi
movl -0x38(%rbp), %esi
leaq -0x20(%rbp), %rdx
callq 0x48840
movl %eax, -0x54(%rbp)
cmpl $0x0, -0x54(%rbp)
jl 0x41ea5
cmpq $0x0, -0x10(%rbp)
je 0x41f0c
movl -0x54(%rbp), %eax
cmpl -0x50(%rbp), %eax
jge 0x41ea5
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movslq -0x54(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
cmpq $0x0, (%rax)
jne 0x41f0c
movl -0x44(%rbp), %eax
movl %eax, %ecx
addl $0x1, %ecx
movl %ecx, -0x44(%rbp)
cmpl $0x0, %eax
je 0x41ec1
leaq 0xe3654(%rip), %rax     # 0x125510
cmpl $0x5, (%rax)
jl 0x41f03
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x43520
movq %rax, %rcx
movq -0x18(%rbp), %rax
movq (%rax), %r8
addq $0x1, %r8
movl -0x54(%rbp), %eax
movl $0x3, %edi
leaq 0xc68d6(%rip), %rsi     # 0x1087c1
leaq 0xc6971(%rip), %rdx     # 0x108863
leaq 0xc1f9e(%rip), %r9      # 0x103e97
movl %eax, (%rsp)
movb $0x0, %al
callq 0x9d90
movl -0x34(%rbp), %eax
orl $0x2, %eax
movl %eax, -0x34(%rbp)
jmp 0x41f0e
movl -0x40(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x40(%rbp)
jmp 0x41e54
jmp 0x41f1e
jmp 0x41f20
movl $0x0, -0x44(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x41f3f
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0xc0(%rbp)
jmp 0x41f4a
xorl %eax, %eax
movq %rax, -0xc0(%rbp)
jmp 0x41f4a
movq -0xc0(%rbp), %rax
movq %rax, -0x60(%rbp)
movl $0x0, -0x40(%rbp)
movl -0x40(%rbp), %eax
movq -0x18(%rbp), %rcx
movq 0x18(%rcx), %rcx
andq $0xffff, %rcx           # imm = 0xFFFF
cmpl %ecx, %eax
jae 0x42163
movl $0xffffffff, -0x64(%rbp) # imm = 0xFFFFFFFF
movq -0x20(%rbp), %rdi
movq -0x28(%rbp), %rsi
leaq -0x20(%rbp), %rdx
leaq -0x64(%rbp), %rcx
callq 0x52010
cmpl $0x0, %eax
je 0x41f9c
jmp 0x423b6
cmpl $0x0, -0x64(%rbp)
jl 0x41fca
cmpq $0x0, -0x10(%rbp)
je 0x42031
movl -0x64(%rbp), %eax
cmpl -0x50(%rbp), %eax
jge 0x41fca
movq -0x60(%rbp), %rax
movslq -0x64(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
cmpq $0x0, (%rax)
jne 0x42031
movl -0x44(%rbp), %eax
movl %eax, %ecx
addl $0x1, %ecx
movl %ecx, -0x44(%rbp)
cmpl $0x0, %eax
je 0x41fe6
leaq 0xe352f(%rip), %rax     # 0x125510
cmpl $0x5, (%rax)
jl 0x42028
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x43520
movq %rax, %rcx
movq -0x18(%rbp), %rax
movq (%rax), %r8
addq $0x1, %r8
movl -0x64(%rbp), %eax
movl $0x3, %edi
leaq 0xc67b1(%rip), %rsi     # 0x1087c1
leaq 0xc684c(%rip), %rdx     # 0x108863
leaq 0xc54e4(%rip), %r9      # 0x107502
movl %eax, (%rsp)
movb $0x0, %al
callq 0x9d90
movl -0x34(%rbp), %eax
orl $0x2, %eax
movl %eax, -0x34(%rbp)
movq -0x20(%rbp), %rdi
movq -0x28(%rbp), %rsi
leaq -0x20(%rbp), %rdx
leaq -0x3c(%rbp), %rcx
leaq -0x38(%rbp), %r8
callq 0x51ee0
cmpl $0x0, %eax
je 0x42054
jmp 0x423b6
movl -0x38(%rbp), %ecx
movl $0x1, %eax
shll %cl, %eax
andl $0xaf, %eax
cmpl $0x0, %eax
je 0x4207c
cmpl $0x0, -0x38(%rbp)
jne 0x42117
cmpl $0x0, -0x3c(%rbp)
jle 0x42117
movl -0x44(%rbp), %eax
movl %eax, %ecx
addl $0x1, %ecx
movl %ecx, -0x44(%rbp)
cmpl $0x0, %eax
je 0x42098
leaq 0xe347d(%rip), %rax     # 0x125510
cmpl $0x5, (%rax)
jl 0x4210e
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x43520
movq %rax, -0xd8(%rbp)
movq -0x18(%rbp), %rax
movq (%rax), %rax
addq $0x1, %rax
movq %rax, -0xd0(%rbp)
movl -0x38(%rbp), %eax
movl %eax, -0xc4(%rbp)
movl -0x38(%rbp), %edi
callq 0x51fb0
movq -0xd8(%rbp), %rcx
movq -0xd0(%rbp), %r8
movl -0xc4(%rbp), %r10d
movl $0x3, %edi
leaq 0xc66d1(%rip), %rsi     # 0x1087c1
leaq 0xc670a(%rip), %rdx     # 0x108801
leaq 0xc5404(%rip), %r9      # 0x107502
movl %r10d, (%rsp)
movq %rax, 0x8(%rsp)
movb $0x0, %al
callq 0x9d90
movl -0x34(%rbp), %eax
orl $0x40, %eax
movl %eax, -0x34(%rbp)
movslq -0x3c(%rbp), %rax
movslq -0x38(%rbp), %rdx
leaq 0xe352a(%rip), %rcx     # 0x125650
movzbl (%rcx,%rdx), %ecx
movl %ecx, %ecx
shlq %cl, %rax
movq %rax, -0x30(%rbp)
movq -0x28(%rbp), %rax
movq -0x20(%rbp), %rcx
subq %rcx, %rax
cmpq -0x30(%rbp), %rax
jae 0x42149
jmp 0x423b6
movq -0x30(%rbp), %rax
addq -0x20(%rbp), %rax
movq %rax, -0x20(%rbp)
movl -0x40(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x40(%rbp)
jmp 0x41f5c
movq -0x18(%rbp), %rax
movq 0x48(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movq -0x18(%rbp), %rcx
addq 0x38(%rcx), %rax
movq %rax, -0x28(%rbp)
movl $0x0, -0x44(%rbp)
movl $0x0, -0x40(%rbp)
movl -0x40(%rbp), %eax
movq -0x18(%rbp), %rcx
movq 0x18(%rcx), %rcx
shrq $0x20, %rcx
andq $0xff, %rcx
cmpl %ecx, %eax
jae 0x422e6
movl $0xffffffff, -0x68(%rbp) # imm = 0xFFFFFFFF
movq -0x20(%rbp), %rdi
movq -0x28(%rbp), %rsi
leaq -0x20(%rbp), %rdx
leaq -0x68(%rbp), %rcx
callq 0x52010
cmpl $0x0, %eax
je 0x421d1
jmp 0x423f4
cmpl $0x0, -0x68(%rbp)
jl 0x421fb
cmpq $0x0, -0x10(%rbp)
je 0x42220
movl -0x68(%rbp), %eax
cmpl -0x50(%rbp), %eax
jge 0x421fb
movq -0x60(%rbp), %rax
movslq -0x68(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
cmpq $0x0, (%rax)
jne 0x42220
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movl -0x68(%rbp), %r8d
leaq 0xc41ab(%rip), %rdx     # 0x1063b9
leaq -0x44(%rbp), %rcx
callq 0x52130
movl -0x34(%rbp), %eax
orl $0x2, %eax
movl %eax, -0x34(%rbp)
movq -0x20(%rbp), %rdi
movq -0x28(%rbp), %rsi
leaq -0x20(%rbp), %rdx
leaq -0x3c(%rbp), %rcx
leaq -0x38(%rbp), %r8
callq 0x51ee0
cmpl $0x0, %eax
je 0x42243
jmp 0x423f4
movl -0x38(%rbp), %ecx
movl $0x1, %eax
shll %cl, %eax
andl $0xaf, %eax
cmpl $0x0, %eax
je 0x42263
cmpl $0x0, -0x38(%rbp)
jne 0x42288
cmpl $0x0, -0x3c(%rbp)
jle 0x42288
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movl -0x38(%rbp), %r8d
leaq 0xcc8a0(%rip), %rdx     # 0x10eb16
leaq -0x44(%rbp), %rcx
callq 0x52130
movl -0x34(%rbp), %eax
orl $0x40, %eax
movl %eax, -0x34(%rbp)
movslq -0x3c(%rbp), %rax
movslq -0x38(%rbp), %rdx
leaq 0xe33b9(%rip), %rcx     # 0x125650
movzbl (%rcx,%rdx), %ecx
movl %ecx, %ecx
shlq %cl, %rax
movq -0x18(%rbp), %rcx
movq 0x18(%rcx), %rcx
shrq $0x28, %rcx
movl %ecx, %ecx
imulq %rcx, %rax
movq %rax, -0x30(%rbp)
movq -0x28(%rbp), %rax
movq -0x20(%rbp), %rcx
subq %rcx, %rax
cmpq -0x30(%rbp), %rax
jae 0x422cc
jmp 0x423f4
movq -0x30(%rbp), %rax
addq -0x20(%rbp), %rax
movq %rax, -0x20(%rbp)
movl -0x40(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x40(%rbp)
jmp 0x4218d
cmpl $0x0, -0x34(%rbp)
jne 0x4238e
movq -0x18(%rbp), %rax
cmpq $0x0, 0x8(%rax)
jge 0x4238e
cmpl $0x0, 0xe84a6(%rip)     # 0x12a7ac
jne 0x4234f
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x43520
movq %rax, %rcx
movq -0x18(%rbp), %rax
movq (%rax), %r8
addq $0x1, %r8
movq -0x18(%rbp), %rax
movq 0x8(%rax), %r9
movl $0x3, %edi
leaq 0xc648a(%rip), %rsi     # 0x1087c1
leaq 0xc6550(%rip), %rdx     # 0x10888e
movb $0x0, %al
callq 0x9d90
movl $0x1, 0xe845d(%rip)     # 0x12a7ac
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x46e40
movq %rax, -0x70(%rbp)
cmpq $0x0, -0x70(%rbp)
jl 0x42374
movq -0x70(%rbp), %rax
movq %rax, -0xe0(%rbp)
jmp 0x4237f
xorl %eax, %eax
movq %rax, -0xe0(%rbp)
jmp 0x4237f
movq -0xe0(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x8(%rax)
movl -0x34(%rbp), %ecx
movq -0x18(%rbp), %rax
orl 0xcc(%rax), %ecx
movl %ecx, 0xcc(%rax)
movl -0x34(%rbp), %edx
xorl %eax, %eax
movl $0xfffffffe, %ecx       # imm = 0xFFFFFFFE
cmpl $0x0, %edx
cmovnel %ecx, %eax
movl %eax, -0x4(%rbp)
jmp 0x42430
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x43520
movq %rax, %rcx
movq -0x18(%rbp), %rax
movq (%rax), %r8
addq $0x1, %r8
movl $0x1, %edi
leaq 0xc63e4(%rip), %rsi     # 0x1087c1
leaq 0xc64ff(%rip), %rdx     # 0x1088e3
movb $0x0, %al
callq 0x9d90
movl $0xfffffffe, -0x4(%rbp) # imm = 0xFFFFFFFE
jmp 0x42430
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x43520
movq %rax, %rcx
movq -0x18(%rbp), %rax
movq (%rax), %r8
addq $0x1, %r8
movl $0x1, %edi
leaq 0xc63a6(%rip), %rsi     # 0x1087c1
leaq 0xc6502(%rip), %rdx     # 0x108924
movb $0x0, %al
callq 0x9d90
movl $0xfffffffe, -0x4(%rbp) # imm = 0xFFFFFFFE
movl -0x4(%rbp), %eax
addq $0xf0, %rsp
popq %rbp
retq
nopl (%rax)