// File: /workspace/github_c_makefile_star2_O0/samtools[P]htslib/vcf.c
// Function: bcf_translate
int bcf_translate(const bcf_hdr_t *dst_hdr, bcf_hdr_t *src_hdr, bcf1_t *line)
{
    int i;
    if ( line->errcode )
    {
        char errordescription[1024] = "";
        hts_log_error("Unchecked error (%d %s) at %s:%"PRIhts_pos", exiting", line->errcode, bcf_strerror(line->errcode, errordescription, sizeof(errordescription)),  bcf_seqname_safe(src_hdr,line), line->pos+1);
        exit(1);
    }
    if ( src_hdr->ntransl==-1 ) return 0;    // no need to translate, all tags have the same id
    if ( !src_hdr->ntransl )  // called for the first time, see what needs translating
    {
        int dict;
        for (dict=0; dict<2; dict++)    // BCF_DT_ID and BCF_DT_CTG
        {
            src_hdr->transl[dict] = (int*) malloc(src_hdr->n[dict]*sizeof(int));
            for (i=0; i<src_hdr->n[dict]; i++)
            {
                if ( !src_hdr->id[dict][i].key ) // gap left after removed BCF header lines
                {
                    src_hdr->transl[dict][i] = -1;
                    continue;
                }
                src_hdr->transl[dict][i] = bcf_hdr_id2int(dst_hdr,dict,src_hdr->id[dict][i].key);
                if ( src_hdr->transl[dict][i]!=-1 && i!=src_hdr->transl[dict][i] ) src_hdr->ntransl++;
            }
        }
        if ( !src_hdr->ntransl )
        {
            free(src_hdr->transl[0]); src_hdr->transl[0] = NULL;
            free(src_hdr->transl[1]); src_hdr->transl[1] = NULL;
            src_hdr->ntransl = -1;
        }
        if ( src_hdr->ntransl==-1 ) return 0;
    }
    bcf_unpack(line,BCF_UN_ALL);

    // CHROM
    if ( src_hdr->transl[BCF_DT_CTG][line->rid] >=0 ) line->rid = src_hdr->transl[BCF_DT_CTG][line->rid];

    // FILTER
    for (i=0; i<line->d.n_flt; i++)
    {
        int src_id = line->d.flt[i];
        if ( src_hdr->transl[BCF_DT_ID][src_id] >=0 )
            line->d.flt[i] = src_hdr->transl[BCF_DT_ID][src_id];
        line->d.shared_dirty |= BCF1_DIRTY_FLT;
    }

    // INFO
    for (i=0; i<line->n_info; i++)
    {
        int src_id = line->d.info[i].key;
        int dst_id = src_hdr->transl[BCF_DT_ID][src_id];
        if ( dst_id<0 ) continue;
        line->d.info[i].key = dst_id;
        if ( !line->d.info[i].vptr ) continue;  // skip deleted
        int src_size = src_id>>7 ? ( src_id>>15 ? BCF_BT_INT32 : BCF_BT_INT16) : BCF_BT_INT8;
        int dst_size = dst_id>>7 ? ( dst_id>>15 ? BCF_BT_INT32 : BCF_BT_INT16) : BCF_BT_INT8;
        if ( src_size==dst_size )   // can overwrite
        {
            uint8_t *vptr = line->d.info[i].vptr - line->d.info[i].vptr_off;
            if ( dst_size==BCF_BT_INT8 ) { vptr[1] = (uint8_t)dst_id; }
            else if ( dst_size==BCF_BT_INT16 ) { *(uint16_t*)vptr = (uint16_t)dst_id; }
            else { *(uint32_t*)vptr = (uint32_t)dst_id; }
        }
        else    // must realloc
        {
            bcf_info_t *info = &line->d.info[i];
            kstring_t str = {0,0,0};
            bcf_enc_int1(&str, dst_id);
            bcf_enc_size(&str, info->len,info->type);
            uint32_t vptr_off = str.l;
            kputsn((char*)info->vptr, info->vptr_len, &str);
            if( info->vptr_free ) free(info->vptr - info->vptr_off);
            info->vptr_off = vptr_off;
            info->vptr = (uint8_t*)str.s + info->vptr_off;
            info->vptr_free = 1;
            line->d.shared_dirty |= BCF1_DIRTY_INF;
        }
    }

    // FORMAT
    for (i=0; i<line->n_fmt; i++)
    {
        int src_id = line->d.fmt[i].id;
        int dst_id = src_hdr->transl[BCF_DT_ID][src_id];
        if ( dst_id<0 ) continue;
        line->d.fmt[i].id = dst_id;
        if( !line->d.fmt[i].p ) continue;  // skip deleted
        int src_size = src_id>>7 ? ( src_id>>15 ? BCF_BT_INT32 : BCF_BT_INT16) : BCF_BT_INT8;
        int dst_size = dst_id>>7 ? ( dst_id>>15 ? BCF_BT_INT32 : BCF_BT_INT16) : BCF_BT_INT8;
        if ( src_size==dst_size )   // can overwrite
        {
            uint8_t *p = line->d.fmt[i].p - line->d.fmt[i].p_off;    // pointer to the vector size (4bits) and BT type (4bits)
            if ( dst_size==BCF_BT_INT8 ) { p[1] = dst_id; }
            else if ( dst_size==BCF_BT_INT16 ) { i16_to_le(dst_id, p + 1); }
            else { i32_to_le(dst_id, p + 1); }
        }
        else    // must realloc
        {
            bcf_fmt_t *fmt = &line->d.fmt[i];
            kstring_t str = {0,0,0};
            bcf_enc_int1(&str, dst_id);
            bcf_enc_size(&str, fmt->n, fmt->type);
            uint32_t p_off = str.l;
            kputsn((char*)fmt->p, fmt->p_len, &str);
            if( fmt->p_free ) free(fmt->p - fmt->p_off);
            fmt->p_off = p_off;
            fmt->p = (uint8_t*)str.s + fmt->p_off;
            fmt->p_free = 1;
            line->d.indiv_dirty = 1;
        }
    }
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x4e0, %rsp            # imm = 0x4E0
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x20(%rbp), %rax
cmpl $0x0, 0xcc(%rax)
je 0x4bb5d
leaq -0x430(%rbp), %rdi
xorl %esi, %esi
movl $0x400, %edx            # imm = 0x400
callq 0x4240
movq -0x20(%rbp), %rax
movl 0xcc(%rax), %eax
movl %eax, -0x4c4(%rbp)
movq -0x20(%rbp), %rax
movl 0xcc(%rax), %edi
leaq -0x430(%rbp), %rsi
movl $0x400, %edx            # imm = 0x400
callq 0x43770
movq %rax, -0x4c0(%rbp)
movq -0x18(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0x43520
movl -0x4c4(%rbp), %ecx
movq -0x4c0(%rbp), %r8
movq %rax, %r9
movq -0x20(%rbp), %rax
movq (%rax), %rax
addq $0x1, %rax
movl $0x1, %edi
leaq 0xbc5bc(%rip), %rsi     # 0x1080fd
leaq 0xbc5c3(%rip), %rdx     # 0x10810b
movq %rax, (%rsp)
movb $0x0, %al
callq 0x9d90
movl $0x1, %edi
callq 0x45d0
movq -0x18(%rbp), %rax
cmpl $-0x1, 0x58(%rax)
jne 0x4bb73
movl $0x0, -0x4(%rbp)
jmp 0x4c465
movq -0x18(%rbp), %rax
cmpl $0x0, 0x58(%rax)
jne 0x4bd30
movl $0x0, -0x434(%rbp)
cmpl $0x2, -0x434(%rbp)
jge 0x4bcd1
movq -0x18(%rbp), %rax
movslq -0x434(%rbp), %rcx
movslq (%rax,%rcx,4), %rdi
shlq $0x2, %rdi
callq 0x4670
movq %rax, %rdx
movq -0x18(%rbp), %rax
movslq -0x434(%rbp), %rcx
movq %rdx, 0x60(%rax,%rcx,8)
movl $0x0, -0x24(%rbp)
movl -0x24(%rbp), %eax
movq -0x18(%rbp), %rcx
movslq -0x434(%rbp), %rdx
cmpl (%rcx,%rdx,4), %eax
jge 0x4bcbb
movq -0x18(%rbp), %rax
movslq -0x434(%rbp), %rcx
movq 0x10(%rax,%rcx,8), %rax
movslq -0x24(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
cmpq $0x0, (%rax)
jne 0x4bc22
movq -0x18(%rbp), %rax
movslq -0x434(%rbp), %rcx
movq 0x60(%rax,%rcx,8), %rax
movslq -0x24(%rbp), %rcx
movl $0xffffffff, (%rax,%rcx,4) # imm = 0xFFFFFFFF
jmp 0x4bcad
movq -0x10(%rbp), %rdi
movl -0x434(%rbp), %esi
movq -0x18(%rbp), %rax
movslq -0x434(%rbp), %rcx
movq 0x10(%rax,%rcx,8), %rax
movslq -0x24(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq (%rax), %rdx
callq 0x3e820
movl %eax, %edx
movq -0x18(%rbp), %rax
movslq -0x434(%rbp), %rcx
movq 0x60(%rax,%rcx,8), %rax
movslq -0x24(%rbp), %rcx
movl %edx, (%rax,%rcx,4)
movq -0x18(%rbp), %rax
movslq -0x434(%rbp), %rcx
movq 0x60(%rax,%rcx,8), %rax
movslq -0x24(%rbp), %rcx
cmpl $-0x1, (%rax,%rcx,4)
je 0x4bcab
movl -0x24(%rbp), %eax
movq -0x18(%rbp), %rcx
movslq -0x434(%rbp), %rdx
movq 0x60(%rcx,%rdx,8), %rcx
movslq -0x24(%rbp), %rdx
cmpl (%rcx,%rdx,4), %eax
je 0x4bcab
movq -0x18(%rbp), %rax
movl 0x58(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x58(%rax)
jmp 0x4bcad
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0x4bbca
jmp 0x4bcbd
movl -0x434(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x434(%rbp)
jmp 0x4bb8b
movq -0x18(%rbp), %rax
cmpl $0x0, 0x58(%rax)
jne 0x4bd18
movq -0x18(%rbp), %rax
movq 0x60(%rax), %rdi
callq 0x45a0
movq -0x18(%rbp), %rax
movq $0x0, 0x60(%rax)
movq -0x18(%rbp), %rax
movq 0x68(%rax), %rdi
callq 0x45a0
movq -0x18(%rbp), %rax
movq $0x0, 0x68(%rax)
movq -0x18(%rbp), %rax
movl $0xffffffff, 0x58(%rax) # imm = 0xFFFFFFFF
movq -0x18(%rbp), %rax
cmpl $-0x1, 0x58(%rax)
jne 0x4bd2e
movl $0x0, -0x4(%rbp)
jmp 0x4c465
jmp 0x4bd30
movq -0x20(%rbp), %rdi
movl $0xf, %esi
callq 0x48110
movq -0x18(%rbp), %rax
movq 0x68(%rax), %rax
movq -0x20(%rbp), %rcx
movslq 0x10(%rcx), %rcx
cmpl $0x0, (%rax,%rcx,4)
jl 0x4bd6e
movq -0x18(%rbp), %rax
movq 0x68(%rax), %rax
movq -0x20(%rbp), %rcx
movslq 0x10(%rcx), %rcx
movl (%rax,%rcx,4), %ecx
movq -0x20(%rbp), %rax
movl %ecx, 0x10(%rax)
movl $0x0, -0x24(%rbp)
movl -0x24(%rbp), %eax
movq -0x20(%rbp), %rcx
cmpl 0x68(%rcx), %eax
jge 0x4bdea
movq -0x20(%rbp), %rax
movq 0x70(%rax), %rax
movslq -0x24(%rbp), %rcx
movl (%rax,%rcx,4), %eax
movl %eax, -0x438(%rbp)
movq -0x18(%rbp), %rax
movq 0x60(%rax), %rax
movslq -0x438(%rbp), %rcx
cmpl $0x0, (%rax,%rcx,4)
jl 0x4bdcc
movq -0x18(%rbp), %rax
movq 0x60(%rax), %rax
movslq -0x438(%rbp), %rcx
movl (%rax,%rcx,4), %edx
movq -0x20(%rbp), %rax
movq 0x70(%rax), %rax
movslq -0x24(%rbp), %rcx
movl %edx, (%rax,%rcx,4)
movq -0x20(%rbp), %rax
movl 0xb0(%rax), %ecx
orl $0x4, %ecx
movl %ecx, 0xb0(%rax)
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0x4bd75
movl $0x0, -0x24(%rbp)
movl -0x24(%rbp), %eax
movq -0x20(%rbp), %rcx
movq 0x18(%rcx), %rcx
andq $0xffff, %rcx           # imm = 0xFFFF
cmpl %ecx, %eax
jge 0x4c11e
movq -0x20(%rbp), %rax
movq 0x90(%rax), %rax
movslq -0x24(%rbp), %rcx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movl (%rax), %eax
movl %eax, -0x43c(%rbp)
movq -0x18(%rbp), %rax
movq 0x60(%rax), %rax
movslq -0x43c(%rbp), %rcx
movl (%rax,%rcx,4), %eax
movl %eax, -0x440(%rbp)
cmpl $0x0, -0x440(%rbp)
jge 0x4be4f
jmp 0x4c110
movl -0x440(%rbp), %ecx
movq -0x20(%rbp), %rax
movq 0x90(%rax), %rax
movslq -0x24(%rbp), %rdx
imulq $0x28, %rdx, %rdx
addq %rdx, %rax
movl %ecx, (%rax)
movq -0x20(%rbp), %rax
movq 0x90(%rax), %rax
movslq -0x24(%rbp), %rcx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
cmpq $0x0, 0x10(%rax)
jne 0x4be8f
jmp 0x4c110
movl -0x43c(%rbp), %eax
sarl $0x7, %eax
cmpl $0x0, %eax
je 0x4bebe
movl -0x43c(%rbp), %edx
sarl $0xf, %edx
movl $0x2, %eax
movl $0x3, %ecx
cmpl $0x0, %edx
cmovnel %ecx, %eax
movl %eax, -0x4c8(%rbp)
jmp 0x4becb
movl $0x1, %eax
movl %eax, -0x4c8(%rbp)
jmp 0x4becb
movl -0x4c8(%rbp), %eax
movl %eax, -0x444(%rbp)
movl -0x440(%rbp), %eax
sarl $0x7, %eax
cmpl $0x0, %eax
je 0x4bf06
movl -0x440(%rbp), %edx
sarl $0xf, %edx
movl $0x2, %eax
movl $0x3, %ecx
cmpl $0x0, %edx
cmovnel %ecx, %eax
movl %eax, -0x4cc(%rbp)
jmp 0x4bf13
movl $0x1, %eax
movl %eax, -0x4cc(%rbp)
jmp 0x4bf13
movl -0x4cc(%rbp), %eax
movl %eax, -0x448(%rbp)
movl -0x444(%rbp), %eax
cmpl -0x448(%rbp), %eax
jne 0x4bfcd
movq -0x20(%rbp), %rax
movq 0x90(%rax), %rax
movslq -0x24(%rbp), %rcx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movq 0x10(%rax), %rax
movq -0x20(%rbp), %rcx
movq 0x90(%rcx), %rcx
movslq -0x24(%rbp), %rdx
imulq $0x28, %rdx, %rdx
addq %rdx, %rcx
movl 0x1c(%rcx), %ecx
andl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
movslq %ecx, %rdx
xorl %ecx, %ecx
subq %rdx, %rcx
addq %rcx, %rax
movq %rax, -0x450(%rbp)
cmpl $0x1, -0x448(%rbp)
jne 0x4bf99
movl -0x440(%rbp), %eax
movb %al, %cl
movq -0x450(%rbp), %rax
movb %cl, 0x1(%rax)
jmp 0x4bfc8
cmpl $0x2, -0x448(%rbp)
jne 0x4bfb7
movl -0x440(%rbp), %eax
movw %ax, %cx
movq -0x450(%rbp), %rax
movw %cx, (%rax)
jmp 0x4bfc6
movl -0x440(%rbp), %ecx
movq -0x450(%rbp), %rax
movl %ecx, (%rax)
jmp 0x4bfc8
jmp 0x4c10e
movq -0x20(%rbp), %rax
movq 0x90(%rax), %rax
movslq -0x24(%rbp), %rcx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x458(%rbp)
leaq -0x470(%rbp), %rdi
xorl %esi, %esi
movl $0x18, %edx
callq 0x4240
movl -0x440(%rbp), %esi
leaq -0x470(%rbp), %rdi
callq 0x44a50
movq -0x458(%rbp), %rax
movl 0x20(%rax), %esi
movq -0x458(%rbp), %rax
movl 0x4(%rax), %edx
leaq -0x470(%rbp), %rdi
callq 0x448b0
movq -0x470(%rbp), %rax
movl %eax, -0x474(%rbp)
movq -0x458(%rbp), %rax
movq 0x10(%rax), %rdi
movq -0x458(%rbp), %rax
movl 0x18(%rax), %eax
movl %eax, %esi
leaq -0x470(%rbp), %rdx
callq 0x43970
movq -0x458(%rbp), %rax
movl 0x1c(%rax), %eax
shrl $0x1f, %eax
cmpl $0x0, %eax
je 0x4c09b
movq -0x458(%rbp), %rax
movq 0x10(%rax), %rdi
movq -0x458(%rbp), %rax
movl 0x1c(%rax), %eax
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
movslq %eax, %rcx
xorl %eax, %eax
subq %rcx, %rax
addq %rax, %rdi
callq 0x45a0
movl -0x474(%rbp), %edx
movq -0x458(%rbp), %rax
movl 0x1c(%rax), %ecx
andl $0x7fffffff, %edx       # imm = 0x7FFFFFFF
andl $0x80000000, %ecx       # imm = 0x80000000
orl %edx, %ecx
movl %ecx, 0x1c(%rax)
movq -0x460(%rbp), %rcx
movq -0x458(%rbp), %rax
movl 0x1c(%rax), %eax
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
cltq
addq %rax, %rcx
movq -0x458(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x458(%rbp), %rax
movl 0x1c(%rax), %ecx
andl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
orl $0x80000000, %ecx       # imm = 0x80000000
movl %ecx, 0x1c(%rax)
movq -0x20(%rbp), %rax
movl 0xb0(%rax), %ecx
orl $0x8, %ecx
movl %ecx, 0xb0(%rax)
jmp 0x4c110
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0x4bdf1
movl $0x0, -0x24(%rbp)
movl -0x24(%rbp), %eax
movq -0x20(%rbp), %rcx
movq 0x18(%rcx), %rcx
shrq $0x20, %rcx
andq $0xff, %rcx
cmpl %ecx, %eax
jge 0x4c45e
movq -0x20(%rbp), %rax
movq 0x98(%rax), %rax
movslq -0x24(%rbp), %rcx
shlq $0x5, %rcx
addq %rcx, %rax
movl (%rax), %eax
movl %eax, -0x478(%rbp)
movq -0x18(%rbp), %rax
movq 0x60(%rax), %rax
movslq -0x478(%rbp), %rcx
movl (%rax,%rcx,4), %eax
movl %eax, -0x47c(%rbp)
cmpl $0x0, -0x47c(%rbp)
jge 0x4c187
jmp 0x4c450
movl -0x47c(%rbp), %ecx
movq -0x20(%rbp), %rax
movq 0x98(%rax), %rax
movslq -0x24(%rbp), %rdx
shlq $0x5, %rdx
addq %rdx, %rax
movl %ecx, (%rax)
movq -0x20(%rbp), %rax
movq 0x98(%rax), %rax
movslq -0x24(%rbp), %rcx
shlq $0x5, %rcx
addq %rcx, %rax
cmpq $0x0, 0x10(%rax)
jne 0x4c1c7
jmp 0x4c450
movl -0x478(%rbp), %eax
sarl $0x7, %eax
cmpl $0x0, %eax
je 0x4c1f6
movl -0x478(%rbp), %edx
sarl $0xf, %edx
movl $0x2, %eax
movl $0x3, %ecx
cmpl $0x0, %edx
cmovnel %ecx, %eax
movl %eax, -0x4d0(%rbp)
jmp 0x4c203
movl $0x1, %eax
movl %eax, -0x4d0(%rbp)
jmp 0x4c203
movl -0x4d0(%rbp), %eax
movl %eax, -0x480(%rbp)
movl -0x47c(%rbp), %eax
sarl $0x7, %eax
cmpl $0x0, %eax
je 0x4c23e
movl -0x47c(%rbp), %edx
sarl $0xf, %edx
movl $0x2, %eax
movl $0x3, %ecx
cmpl $0x0, %edx
cmovnel %ecx, %eax
movl %eax, -0x4d4(%rbp)
jmp 0x4c24b
movl $0x1, %eax
movl %eax, -0x4d4(%rbp)
jmp 0x4c24b
movl -0x4d4(%rbp), %eax
movl %eax, -0x484(%rbp)
movl -0x480(%rbp), %eax
cmpl -0x484(%rbp), %eax
jne 0x4c312
movq -0x20(%rbp), %rax
movq 0x98(%rax), %rax
movslq -0x24(%rbp), %rcx
shlq $0x5, %rcx
addq %rcx, %rax
movq 0x10(%rax), %rax
movq -0x20(%rbp), %rcx
movq 0x98(%rcx), %rcx
movslq -0x24(%rbp), %rdx
shlq $0x5, %rdx
addq %rdx, %rcx
movl 0x1c(%rcx), %ecx
andl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
movslq %ecx, %rdx
xorl %ecx, %ecx
subq %rdx, %rcx
addq %rcx, %rax
movq %rax, -0x490(%rbp)
cmpl $0x1, -0x484(%rbp)
jne 0x4c2d1
movl -0x47c(%rbp), %eax
movb %al, %cl
movq -0x490(%rbp), %rax
movb %cl, 0x1(%rax)
jmp 0x4c30d
cmpl $0x2, -0x484(%rbp)
jne 0x4c2f5
movl -0x47c(%rbp), %eax
movq -0x490(%rbp), %rsi
addq $0x1, %rsi
movswl %ax, %edi
callq 0x44c40
jmp 0x4c30b
movl -0x47c(%rbp), %edi
movq -0x490(%rbp), %rsi
addq $0x1, %rsi
callq 0x43890
jmp 0x4c30d
jmp 0x4c44e
movq -0x20(%rbp), %rax
movq 0x98(%rax), %rax
movslq -0x24(%rbp), %rcx
shlq $0x5, %rcx
addq %rcx, %rax
movq %rax, -0x498(%rbp)
leaq -0x4b0(%rbp), %rdi
xorl %esi, %esi
movl $0x18, %edx
callq 0x4240
movl -0x47c(%rbp), %esi
leaq -0x4b0(%rbp), %rdi
callq 0x44a50
movq -0x498(%rbp), %rax
movl 0x4(%rax), %esi
movq -0x498(%rbp), %rax
movl 0xc(%rax), %edx
leaq -0x4b0(%rbp), %rdi
callq 0x448b0
movq -0x4b0(%rbp), %rax
movl %eax, -0x4b4(%rbp)
movq -0x498(%rbp), %rax
movq 0x10(%rax), %rdi
movq -0x498(%rbp), %rax
movl 0x18(%rax), %eax
movl %eax, %esi
leaq -0x4b0(%rbp), %rdx
callq 0x43970
movq -0x498(%rbp), %rax
movl 0x1c(%rax), %eax
shrl $0x1f, %eax
cmpl $0x0, %eax
je 0x4c3e0
movq -0x498(%rbp), %rax
movq 0x10(%rax), %rdi
movq -0x498(%rbp), %rax
movl 0x1c(%rax), %eax
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
movslq %eax, %rcx
xorl %eax, %eax
subq %rcx, %rax
addq %rax, %rdi
callq 0x45a0
movl -0x4b4(%rbp), %edx
movq -0x498(%rbp), %rax
movl 0x1c(%rax), %ecx
andl $0x7fffffff, %edx       # imm = 0x7FFFFFFF
andl $0x80000000, %ecx       # imm = 0x80000000
orl %edx, %ecx
movl %ecx, 0x1c(%rax)
movq -0x4a0(%rbp), %rcx
movq -0x498(%rbp), %rax
movl 0x1c(%rax), %eax
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
cltq
addq %rax, %rcx
movq -0x498(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x498(%rbp), %rax
movl 0x1c(%rax), %ecx
andl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
orl $0x80000000, %ecx       # imm = 0x80000000
movl %ecx, 0x1c(%rax)
movq -0x20(%rbp), %rax
movl $0x1, 0xb4(%rax)
jmp 0x4c450
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0x4c125
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x4e0, %rsp            # imm = 0x4E0
popq %rbp
retq
nopw %cs:(%rax,%rax)