// File: /workspace/github_c_makefile_star2_O0/samtools[P]htslib/vcf.c
// Function: bcf_hdr_register_hrec
static int bcf_hdr_register_hrec(bcf_hdr_t *hdr, bcf_hrec_t *hrec)
{
    // contig
    int i, ret, replacing = 0;
    khint_t k;
    char *str = NULL;

    bcf_hrec_set_type(hrec);

    if ( hrec->type==BCF_HL_CTG )
    {
        hts_pos_t len = 0;

        // Get the contig ID ($str) and length ($j)
        i = bcf_hrec_find_key(hrec,"length");
        if ( i<0 ) len = 0;
        else {
            char *end = hrec->vals[i];
            len = strtoll(hrec->vals[i], &end, 10);
            if (end == hrec->vals[i] || len < 0) return 0;
        }

        i = bcf_hrec_find_key(hrec,"ID");
        if ( i<0 ) return 0;
        str = strdup(hrec->vals[i]);
        if (!str) return -1;

        // Register in the dictionary
        vdict_t *d = (vdict_t*)hdr->dict[BCF_DT_CTG];
        khint_t k = kh_get(vdict, d, str);
        if ( k != kh_end(d) ) { // already present
            free(str); str=NULL;
            if (kh_val(d, k).hrec[0] != NULL) // and not removed
                return 0;
            replacing = 1;
        } else {
            k = kh_put(vdict, d, str, &ret);
            if (ret < 0) { free(str); return -1; }
        }

        int idx = bcf_hrec_find_key(hrec,"IDX");
        if ( idx!=-1 )
        {
            char *tmp = hrec->vals[idx];
            idx = strtol(hrec->vals[idx], &tmp, 10);
            if ( *tmp || idx < 0 || idx >= INT_MAX - 1)
            {
                if (!replacing) {
                    kh_del(vdict, d, k);
                    free(str);
                }
                hts_log_warning("Error parsing the IDX tag, skipping");
                return 0;
            }
        }

        kh_val(d, k) = bcf_idinfo_def;
        kh_val(d, k).id = idx;
        kh_val(d, k).info[0] = len;
        kh_val(d, k).hrec[0] = hrec;
        if (bcf_hdr_set_idx(hdr, BCF_DT_CTG, kh_key(d,k), &kh_val(d,k)) < 0) {
            if (!replacing) {
                kh_del(vdict, d, k);
                free(str);
            }
            return -1;
        }
        if ( idx==-1 ) {
            if (hrec_add_idx(hrec, kh_val(d,k).id) < 0) {
               return -1;
            }
        }

        return 1;
    }

    if ( hrec->type==BCF_HL_STR ) return 1;
    if ( hrec->type!=BCF_HL_INFO && hrec->type!=BCF_HL_FLT && hrec->type!=BCF_HL_FMT ) return 0;

    // INFO/FILTER/FORMAT
    char *id = NULL;
    uint32_t type = UINT32_MAX, var = UINT32_MAX;
    int num = -1, idx = -1;
    for (i=0; i<hrec->nkeys; i++)
    {
        if ( !strcmp(hrec->keys[i], "ID") ) id = hrec->vals[i];
        else if ( !strcmp(hrec->keys[i], "IDX") )
        {
            char *tmp = hrec->vals[i];
            idx = strtol(hrec->vals[i], &tmp, 10);
            if ( *tmp || idx < 0 || idx >= INT_MAX - 1)
            {
                hts_log_warning("Error parsing the IDX tag, skipping");
                return 0;
            }
        }
        else if ( !strcmp(hrec->keys[i], "Type") )
        {
            if ( !strcmp(hrec->vals[i], "Integer") ) type = BCF_HT_INT;
            else if ( !strcmp(hrec->vals[i], "Float") ) type = BCF_HT_REAL;
            else if ( !strcmp(hrec->vals[i], "String") ) type = BCF_HT_STR;
            else if ( !strcmp(hrec->vals[i], "Character") ) type = BCF_HT_STR;
            else if ( !strcmp(hrec->vals[i], "Flag") ) type = BCF_HT_FLAG;
            else
            {
                hts_log_warning("The type \"%s\" is not supported, assuming \"String\"", hrec->vals[i]);
                type = BCF_HT_STR;
            }
        }
        else if ( !strcmp(hrec->keys[i], "Number") )
        {
            if ( !strcmp(hrec->vals[i],"A") ) var = BCF_VL_A;
            else if ( !strcmp(hrec->vals[i],"R") ) var = BCF_VL_R;
            else if ( !strcmp(hrec->vals[i],"G") ) var = BCF_VL_G;
            else if ( !strcmp(hrec->vals[i],".") ) var = BCF_VL_VAR;
            else
            {
                sscanf(hrec->vals[i],"%d",&num);
                var = BCF_VL_FIXED;
            }
            if (var != BCF_VL_FIXED) num = 0xfffff;
        }
    }
    if (hrec->type == BCF_HL_INFO || hrec->type == BCF_HL_FMT) {
        if (type == -1) {
            hts_log_warning("%s %s field has no Type defined. Assuming String",
                *hrec->key == 'I' ? "An" : "A", hrec->key);
            type = BCF_HT_STR;
        }
        if (var == -1) {
            hts_log_warning("%s %s field has no Number defined. Assuming '.'",
                *hrec->key == 'I' ? "An" : "A", hrec->key);
            var = BCF_VL_VAR;
        }
        if ( type==BCF_HT_FLAG && (var!=BCF_VL_FIXED || num!=0) )
        {
            hts_log_warning("The definition of Flag \"%s/%s\" is invalid, forcing Number=0", hrec->key,id);
            var = BCF_VL_FIXED;
            num = 0;
        }
    }
    uint32_t info = ((((uint32_t)num) & 0xfffff)<<12 |
                     (var & 0xf) << 8 |
                     (type & 0xf) << 4 |
                     (((uint32_t) hrec->type) & 0xf));

    if ( !id ) return 0;
    str = strdup(id);
    if (!str) return -1;

    vdict_t *d = (vdict_t*)hdr->dict[BCF_DT_ID];
    k = kh_get(vdict, d, str);
    if ( k != kh_end(d) )
    {
        // already present
        free(str);
        if ( kh_val(d, k).hrec[info&0xf] ) return 0;
        kh_val(d, k).info[info&0xf] = info;
        kh_val(d, k).hrec[info&0xf] = hrec;
        if ( idx==-1 ) {
            if (hrec_add_idx(hrec, kh_val(d, k).id) < 0) {
                return -1;
            }
        }
        return 1;
    }
    k = kh_put(vdict, d, str, &ret);
    if (ret < 0) {
        free(str);
        return -1;
    }
    kh_val(d, k) = bcf_idinfo_def;
    kh_val(d, k).info[info&0xf] = info;
    kh_val(d, k).hrec[info&0xf] = hrec;
    kh_val(d, k).id = idx;
    if (bcf_hdr_set_idx(hdr, BCF_DT_ID, kh_key(d,k), &kh_val(d,k)) < 0) {
        kh_del(vdict, d, k);
        free(str);
        return -1;
    }
    if ( idx==-1 ) {
        if (hrec_add_idx(hrec, kh_val(d,k).id) < 0) {
            return -1;
        }
    }

    return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x90, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl $0x0, -0x24(%rbp)
movq $0x0, -0x30(%rbp)
movq -0x18(%rbp), %rdi
callq 0x51c30
movq -0x18(%rbp), %rax
cmpl $0x3, (%rax)
jne 0x3d788
movq $0x0, -0x38(%rbp)
movq -0x18(%rbp), %rdi
leaq 0xc93ef(%rip), %rsi     # 0x10685a
callq 0x3bb40
movl %eax, -0x1c(%rbp)
cmpl $0x0, -0x1c(%rbp)
jge 0x3d483
movq $0x0, -0x38(%rbp)
jmp 0x3d4e4
movq -0x18(%rbp), %rax
movq 0x28(%rax), %rax
movslq -0x1c(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x40(%rbp)
movq -0x18(%rbp), %rax
movq 0x28(%rax), %rax
movslq -0x1c(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
leaq -0x40(%rbp), %rsi
movl $0xa, %edx
callq 0x4090
movq %rax, -0x38(%rbp)
movq -0x40(%rbp), %rax
movq -0x18(%rbp), %rcx
movq 0x28(%rcx), %rcx
movslq -0x1c(%rbp), %rdx
cmpq (%rcx,%rdx,8), %rax
je 0x3d4d6
cmpq $0x0, -0x38(%rbp)
jge 0x3d4e2
movl $0x0, -0x4(%rbp)
jmp 0x3deed
jmp 0x3d4e4
movq -0x18(%rbp), %rdi
leaq 0xc8aa9(%rip), %rsi     # 0x105f98
callq 0x3bb40
movl %eax, -0x1c(%rbp)
cmpl $0x0, -0x1c(%rbp)
jge 0x3d509
movl $0x0, -0x4(%rbp)
jmp 0x3deed
movq -0x18(%rbp), %rax
movq 0x28(%rax), %rax
movslq -0x1c(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
callq 0x4920
movq %rax, -0x30(%rbp)
cmpq $0x0, -0x30(%rbp)
jne 0x3d535
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x3deed
movq -0x10(%rbp), %rax
movq 0x30(%rax), %rax
movq %rax, -0x48(%rbp)
movq -0x48(%rbp), %rdi
movq -0x30(%rbp), %rsi
callq 0x3e520
movl %eax, -0x4c(%rbp)
movl -0x4c(%rbp), %eax
movq -0x48(%rbp), %rcx
cmpl (%rcx), %eax
je 0x3d59b
movq -0x30(%rbp), %rdi
callq 0x45a0
movq $0x0, -0x30(%rbp)
movq -0x48(%rbp), %rax
movq 0x20(%rax), %rax
movl -0x4c(%rbp), %ecx
imulq $0x38, %rcx, %rcx
addq %rcx, %rax
cmpq $0x0, 0x18(%rax)
je 0x3d592
movl $0x0, -0x4(%rbp)
jmp 0x3deed
movl $0x1, -0x24(%rbp)
jmp 0x3d5cc
movq -0x48(%rbp), %rdi
movq -0x30(%rbp), %rsi
leaq -0x20(%rbp), %rdx
callq 0x4d210
movl %eax, -0x4c(%rbp)
cmpl $0x0, -0x20(%rbp)
jge 0x3d5ca
movq -0x30(%rbp), %rdi
callq 0x45a0
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x3deed
jmp 0x3d5cc
movq -0x18(%rbp), %rdi
leaq 0xc651f(%rip), %rsi     # 0x103af6
callq 0x3bb40
movl %eax, -0x50(%rbp)
cmpl $-0x1, -0x50(%rbp)
je 0x3d67c
movq -0x18(%rbp), %rax
movq 0x28(%rax), %rax
movslq -0x50(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x58(%rbp)
movq -0x18(%rbp), %rax
movq 0x28(%rax), %rax
movslq -0x50(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
leaq -0x58(%rbp), %rsi
movl $0xa, %edx
callq 0x46c0
movl %eax, -0x50(%rbp)
movq -0x58(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x0, %eax
jne 0x3d639
cmpl $0x0, -0x50(%rbp)
jl 0x3d639
cmpl $0x7ffffffe, -0x50(%rbp) # imm = 0x7FFFFFFE
jl 0x3d67a
cmpl $0x0, -0x24(%rbp)
jne 0x3d654
movq -0x48(%rbp), %rdi
movl -0x4c(%rbp), %esi
callq 0x4d570
movq -0x30(%rbp), %rdi
callq 0x45a0
movl $0x3, %edi
leaq 0xcafd7(%rip), %rsi     # 0x108637
leaq 0xcafe6(%rip), %rdx     # 0x10864d
movb $0x0, %al
callq 0x9d90
movl $0x0, -0x4(%rbp)
jmp 0x3deed
jmp 0x3d67c
movq -0x48(%rbp), %rax
movq 0x20(%rax), %rdi
movl -0x4c(%rbp), %eax
imulq $0x38, %rax, %rax
addq %rax, %rdi
leaq 0xe7fdb(%rip), %rsi     # 0x125670
movl $0x38, %edx
callq 0x43b0
movl -0x50(%rbp), %ecx
movq -0x48(%rbp), %rax
movq 0x20(%rax), %rax
movl -0x4c(%rbp), %edx
imulq $0x38, %rdx, %rdx
addq %rdx, %rax
movl %ecx, 0x30(%rax)
movq -0x38(%rbp), %rcx
movq -0x48(%rbp), %rax
movq 0x20(%rax), %rax
movl -0x4c(%rbp), %edx
imulq $0x38, %rdx, %rdx
addq %rdx, %rax
movq %rcx, (%rax)
movq -0x18(%rbp), %rcx
movq -0x48(%rbp), %rax
movq 0x20(%rax), %rax
movl -0x4c(%rbp), %edx
imulq $0x38, %rdx, %rdx
addq %rdx, %rax
movq %rcx, 0x18(%rax)
movq -0x10(%rbp), %rdi
movq -0x48(%rbp), %rax
movq 0x18(%rax), %rax
movl -0x4c(%rbp), %ecx
movq (%rax,%rcx,8), %rdx
movq -0x48(%rbp), %rax
movq 0x20(%rax), %rcx
movl -0x4c(%rbp), %eax
imulq $0x38, %rax, %rax
addq %rax, %rcx
movl $0x1, %esi
callq 0x51d10
cmpl $0x0, %eax
jge 0x3d745
cmpl $0x0, -0x24(%rbp)
jne 0x3d739
movq -0x48(%rbp), %rdi
movl -0x4c(%rbp), %esi
callq 0x4d570
movq -0x30(%rbp), %rdi
callq 0x45a0
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x3deed
cmpl $-0x1, -0x50(%rbp)
jne 0x3d77c
movq -0x18(%rbp), %rdi
movq -0x48(%rbp), %rax
movq 0x20(%rax), %rax
movl -0x4c(%rbp), %ecx
imulq $0x38, %rcx, %rcx
addq %rcx, %rax
movl 0x30(%rax), %esi
callq 0x3b970
cmpl $0x0, %eax
jge 0x3d77a
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x3deed
jmp 0x3d77c
movl $0x1, -0x4(%rbp)
jmp 0x3deed
movq -0x18(%rbp), %rax
cmpl $0x4, (%rax)
jne 0x3d79d
movl $0x1, -0x4(%rbp)
jmp 0x3deed
movq -0x18(%rbp), %rax
cmpl $0x1, (%rax)
je 0x3d7c4
movq -0x18(%rbp), %rax
cmpl $0x0, (%rax)
je 0x3d7c4
movq -0x18(%rbp), %rax
cmpl $0x2, (%rax)
je 0x3d7c4
movl $0x0, -0x4(%rbp)
jmp 0x3deed
movq $0x0, -0x60(%rbp)
movl $0xffffffff, -0x64(%rbp) # imm = 0xFFFFFFFF
movl $0xffffffff, -0x68(%rbp) # imm = 0xFFFFFFFF
movl $0xffffffff, -0x6c(%rbp) # imm = 0xFFFFFFFF
movl $0xffffffff, -0x70(%rbp) # imm = 0xFFFFFFFF
movl $0x0, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
movq -0x18(%rbp), %rcx
cmpl 0x18(%rcx), %eax
jge 0x3db3a
movq -0x18(%rbp), %rax
movq 0x20(%rax), %rax
movslq -0x1c(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
leaq 0xc8782(%rip), %rsi     # 0x105f98
callq 0x46b0
cmpl $0x0, %eax
jne 0x3d839
movq -0x18(%rbp), %rax
movq 0x28(%rax), %rax
movslq -0x1c(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x60(%rbp)
jmp 0x3db2a
movq -0x18(%rbp), %rax
movq 0x20(%rax), %rax
movslq -0x1c(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
leaq 0xc62a6(%rip), %rsi     # 0x103af6
callq 0x46b0
cmpl $0x0, %eax
jne 0x3d8d5
movq -0x18(%rbp), %rax
movq 0x28(%rax), %rax
movslq -0x1c(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x78(%rbp)
movq -0x18(%rbp), %rax
movq 0x28(%rax), %rax
movslq -0x1c(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
leaq -0x78(%rbp), %rsi
movl $0xa, %edx
callq 0x46c0
movl %eax, -0x70(%rbp)
movq -0x78(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x0, %eax
jne 0x3d8aa
cmpl $0x0, -0x70(%rbp)
jl 0x3d8aa
cmpl $0x7ffffffe, -0x70(%rbp) # imm = 0x7FFFFFFE
jl 0x3d8d0
movl $0x3, %edi
leaq 0xcad81(%rip), %rsi     # 0x108637
leaq 0xcad90(%rip), %rdx     # 0x10864d
movb $0x0, %al
callq 0x9d90
movl $0x0, -0x4(%rbp)
jmp 0x3deed
jmp 0x3db28
movq -0x18(%rbp), %rax
movq 0x20(%rax), %rax
movslq -0x1c(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
leaq 0xcad85(%rip), %rsi     # 0x108671
callq 0x46b0
cmpl $0x0, %eax
jne 0x3da13
movq -0x18(%rbp), %rax
movq 0x28(%rax), %rax
movslq -0x1c(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
leaq 0xcad65(%rip), %rsi     # 0x108676
callq 0x46b0
cmpl $0x0, %eax
jne 0x3d927
movl $0x1, -0x64(%rbp)
jmp 0x3da0e
movq -0x18(%rbp), %rax
movq 0x28(%rax), %rax
movslq -0x1c(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
leaq 0xcad40(%rip), %rsi     # 0x10867e
callq 0x46b0
cmpl $0x0, %eax
jne 0x3d954
movl $0x2, -0x64(%rbp)
jmp 0x3da0c
movq -0x18(%rbp), %rax
movq 0x28(%rax), %rax
movslq -0x1c(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
leaq 0xcad8b(%rip), %rsi     # 0x1086f6
callq 0x46b0
cmpl $0x0, %eax
jne 0x3d981
movl $0x3, -0x64(%rbp)
jmp 0x3da0a
movq -0x18(%rbp), %rax
movq 0x28(%rax), %rax
movslq -0x1c(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
leaq 0xcacec(%rip), %rsi     # 0x108684
callq 0x46b0
cmpl $0x0, %eax
jne 0x3d9ab
movl $0x3, -0x64(%rbp)
jmp 0x3da08
movq -0x18(%rbp), %rax
movq 0x28(%rax), %rax
movslq -0x1c(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
leaq 0xcaccc(%rip), %rsi     # 0x10868e
callq 0x46b0
cmpl $0x0, %eax
jne 0x3d9d5
movl $0x0, -0x64(%rbp)
jmp 0x3da06
movq -0x18(%rbp), %rax
movq 0x28(%rax), %rax
movslq -0x1c(%rbp), %rcx
movq (%rax,%rcx,8), %rcx
movl $0x3, %edi
leaq 0xcac46(%rip), %rsi     # 0x108637
leaq 0xcac9b(%rip), %rdx     # 0x108693
movb $0x0, %al
callq 0x9d90
movl $0x3, -0x64(%rbp)
jmp 0x3da08
jmp 0x3da0a
jmp 0x3da0c
jmp 0x3da0e
jmp 0x3db26
movq -0x18(%rbp), %rax
movq 0x20(%rax), %rax
movslq -0x1c(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
leaq 0xcac9b(%rip), %rsi     # 0x1086c5
callq 0x46b0
cmpl $0x0, %eax
jne 0x3db24
movq -0x18(%rbp), %rax
movq 0x28(%rax), %rax
movslq -0x1c(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
leaq 0xc58d5(%rip), %rsi     # 0x103324
callq 0x46b0
cmpl $0x0, %eax
jne 0x3da65
movl $0x2, -0x68(%rbp)
jmp 0x3db15
movq -0x18(%rbp), %rax
movq 0x28(%rax), %rax
movslq -0x1c(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
leaq 0xc7bd1(%rip), %rsi     # 0x10564d
callq 0x46b0
cmpl $0x0, %eax
jne 0x3da92
movl $0x4, -0x68(%rbp)
jmp 0x3db13
movq -0x18(%rbp), %rax
movq 0x28(%rax), %rax
movslq -0x1c(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
leaq 0xcab1b(%rip), %rsi     # 0x1085c4
callq 0x46b0
cmpl $0x0, %eax
jne 0x3dabc
movl $0x3, -0x68(%rbp)
jmp 0x3db11
movq -0x18(%rbp), %rax
movq 0x28(%rax), %rax
movslq -0x1c(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
leaq 0xca46c(%rip), %rsi     # 0x107f3f
callq 0x46b0
cmpl $0x0, %eax
jne 0x3dae6
movl $0x1, -0x68(%rbp)
jmp 0x3db0f
movq -0x18(%rbp), %rax
movq 0x28(%rax), %rax
movslq -0x1c(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
leaq 0xd1676(%rip), %rsi     # 0x10f173
leaq -0x6c(%rbp), %rdx
movb $0x0, %al
callq 0x4490
movl $0x0, -0x68(%rbp)
jmp 0x3db11
jmp 0x3db13
jmp 0x3db15
cmpl $0x0, -0x68(%rbp)
je 0x3db22
movl $0xfffff, -0x6c(%rbp)   # imm = 0xFFFFF
jmp 0x3db24
jmp 0x3db26
jmp 0x3db28
jmp 0x3db2a
jmp 0x3db2c
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x3d7ef
movq -0x18(%rbp), %rax
cmpl $0x1, (%rax)
je 0x3db50
movq -0x18(%rbp), %rax
cmpl $0x2, (%rax)
jne 0x3dc36
cmpl $-0x1, -0x64(%rbp)
jne 0x3db9f
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
movsbl (%rax), %edx
leaq 0xc57bc(%rip), %rcx     # 0x103324
leaq 0xcab8e(%rip), %rax     # 0x1086fd
cmpl $0x49, %edx
cmoveq %rax, %rcx
movq -0x18(%rbp), %rax
movq 0x8(%rax), %r8
movl $0x3, %edi
leaq 0xcaaad(%rip), %rsi     # 0x108637
leaq 0xcab3b(%rip), %rdx     # 0x1086cc
movb $0x0, %al
callq 0x9d90
movl $0x3, -0x64(%rbp)
cmpl $-0x1, -0x68(%rbp)
jne 0x3dbee
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
movsbl (%rax), %edx
leaq 0xc576d(%rip), %rcx     # 0x103324
leaq 0xcab3f(%rip), %rax     # 0x1086fd
cmpl $0x49, %edx
cmoveq %rax, %rcx
movq -0x18(%rbp), %rax
movq 0x8(%rax), %r8
movl $0x3, %edi
leaq 0xcaa5e(%rip), %rsi     # 0x108637
leaq 0xcab20(%rip), %rdx     # 0x108700
movb $0x0, %al
callq 0x9d90
movl $0x1, -0x68(%rbp)
cmpl $0x0, -0x64(%rbp)
jne 0x3dc34
cmpl $0x0, -0x68(%rbp)
jne 0x3dc00
cmpl $0x0, -0x6c(%rbp)
je 0x3dc34
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rcx
movq -0x60(%rbp), %r8
movl $0x3, %edi
leaq 0xcaa1f(%rip), %rsi     # 0x108637
leaq 0xcab11(%rip), %rdx     # 0x108730
movb $0x0, %al
callq 0x9d90
movl $0x0, -0x68(%rbp)
movl $0x0, -0x6c(%rbp)
jmp 0x3dc36
movl -0x6c(%rbp), %eax
andl $0xfffff, %eax          # imm = 0xFFFFF
shll $0xc, %eax
movl -0x68(%rbp), %ecx
andl $0xf, %ecx
shll $0x8, %ecx
orl %ecx, %eax
movl -0x64(%rbp), %ecx
andl $0xf, %ecx
shll $0x4, %ecx
orl %ecx, %eax
movq -0x18(%rbp), %rcx
movl (%rcx), %ecx
andl $0xf, %ecx
orl %ecx, %eax
movl %eax, -0x7c(%rbp)
cmpq $0x0, -0x60(%rbp)
jne 0x3dc78
movl $0x0, -0x4(%rbp)
jmp 0x3deed
movq -0x60(%rbp), %rdi
callq 0x4920
movq %rax, -0x30(%rbp)
cmpq $0x0, -0x30(%rbp)
jne 0x3dc98
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x3deed
movq -0x10(%rbp), %rax
movq 0x28(%rax), %rax
movq %rax, -0x88(%rbp)
movq -0x88(%rbp), %rdi
movq -0x30(%rbp), %rsi
callq 0x3e520
movl %eax, -0x28(%rbp)
movl -0x28(%rbp), %eax
movq -0x88(%rbp), %rcx
cmpl (%rcx), %eax
je 0x3dd98
movq -0x30(%rbp), %rdi
callq 0x45a0
movq -0x88(%rbp), %rax
movq 0x20(%rax), %rax
movl -0x28(%rbp), %ecx
imulq $0x38, %rcx, %rcx
addq %rcx, %rax
movl -0x7c(%rbp), %ecx
andl $0xf, %ecx
movl %ecx, %ecx
cmpq $0x0, 0x18(%rax,%rcx,8)
je 0x3dd06
movl $0x0, -0x4(%rbp)
jmp 0x3deed
movl -0x7c(%rbp), %eax
movl %eax, %edx
movq -0x88(%rbp), %rax
movq 0x20(%rax), %rax
movl -0x28(%rbp), %ecx
imulq $0x38, %rcx, %rcx
addq %rcx, %rax
movl -0x7c(%rbp), %ecx
andl $0xf, %ecx
movl %ecx, %ecx
movq %rdx, (%rax,%rcx,8)
movq -0x18(%rbp), %rdx
movq -0x88(%rbp), %rax
movq 0x20(%rax), %rax
movl -0x28(%rbp), %ecx
imulq $0x38, %rcx, %rcx
addq %rcx, %rax
movl -0x7c(%rbp), %ecx
andl $0xf, %ecx
movl %ecx, %ecx
movq %rdx, 0x18(%rax,%rcx,8)
cmpl $-0x1, -0x70(%rbp)
jne 0x3dd8c
movq -0x18(%rbp), %rdi
movq -0x88(%rbp), %rax
movq 0x20(%rax), %rax
movl -0x28(%rbp), %ecx
imulq $0x38, %rcx, %rcx
addq %rcx, %rax
movl 0x30(%rax), %esi
callq 0x3b970
cmpl $0x0, %eax
jge 0x3dd8a
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x3deed
jmp 0x3dd8c
movl $0x1, -0x4(%rbp)
jmp 0x3deed
movq -0x88(%rbp), %rdi
movq -0x30(%rbp), %rsi
leaq -0x20(%rbp), %rdx
callq 0x4d210
movl %eax, -0x28(%rbp)
cmpl $0x0, -0x20(%rbp)
jge 0x3ddca
movq -0x30(%rbp), %rdi
callq 0x45a0
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x3deed
movq -0x88(%rbp), %rax
movq 0x20(%rax), %rdi
movl -0x28(%rbp), %eax
imulq $0x38, %rax, %rax
addq %rax, %rdi
leaq 0xe788a(%rip), %rsi     # 0x125670
movl $0x38, %edx
callq 0x43b0
movl -0x7c(%rbp), %eax
movl %eax, %edx
movq -0x88(%rbp), %rax
movq 0x20(%rax), %rax
movl -0x28(%rbp), %ecx
imulq $0x38, %rcx, %rcx
addq %rcx, %rax
movl -0x7c(%rbp), %ecx
andl $0xf, %ecx
movl %ecx, %ecx
movq %rdx, (%rax,%rcx,8)
movq -0x18(%rbp), %rdx
movq -0x88(%rbp), %rax
movq 0x20(%rax), %rax
movl -0x28(%rbp), %ecx
imulq $0x38, %rcx, %rcx
addq %rcx, %rax
movl -0x7c(%rbp), %ecx
andl $0xf, %ecx
movl %ecx, %ecx
movq %rdx, 0x18(%rax,%rcx,8)
movl -0x70(%rbp), %ecx
movq -0x88(%rbp), %rax
movq 0x20(%rax), %rax
movl -0x28(%rbp), %edx
imulq $0x38, %rdx, %rdx
addq %rdx, %rax
movl %ecx, 0x30(%rax)
movq -0x10(%rbp), %rdi
movq -0x88(%rbp), %rax
movq 0x18(%rax), %rax
movl -0x28(%rbp), %ecx
movq (%rax,%rcx,8), %rdx
movq -0x88(%rbp), %rax
movq 0x20(%rax), %rcx
movl -0x28(%rbp), %eax
imulq $0x38, %rax, %rax
addq %rax, %rcx
xorl %esi, %esi
callq 0x51d10
cmpl $0x0, %eax
jge 0x3deaf
movq -0x88(%rbp), %rdi
movl -0x28(%rbp), %esi
callq 0x4d570
movq -0x30(%rbp), %rdi
callq 0x45a0
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x3deed
cmpl $-0x1, -0x70(%rbp)
jne 0x3dee6
movq -0x18(%rbp), %rdi
movq -0x88(%rbp), %rax
movq 0x20(%rax), %rax
movl -0x28(%rbp), %ecx
imulq $0x38, %rcx, %rcx
addq %rcx, %rax
movl 0x30(%rax), %esi
callq 0x3b970
cmpl $0x0, %eax
jge 0x3dee4
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x3deed
jmp 0x3dee6
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x90, %rsp
popq %rbp
retq
nopl (%rax)