// File: /workspace/github_cpp_makefile_star2_O3/chhylp123[P]hifiasm/Overlaps.cpp
// Function: get_u_trans_hit(u_trans_hit_idx*, u_trans_hit_t*)
uint32_t get_u_trans_hit(u_trans_hit_idx *t, u_trans_hit_t *hit)
{
    uint32_t uid, ori, l, v, nv, is_update, r_beg, r_end, ovlp;
    uint32_t *a = t->a, a_n = t->an, k, c_uId, idx, offPre;
    ma_utg_t *u = NULL;
    asg_arc_t *av  = NULL;
    hit->qSpre = hit->qEpre = hit->qScur = hit->qEcur = hit->qn = (uint32_t)-1;
    hit->tSpre = hit->tEpre = hit->tScur = hit->tEcur = hit->tn = (uint32_t)-1;

    while (t->u_i < a_n) ///(u_i = 0; u_i < a_n; u_i++)
    {
        uid = a[t->u_i] >> 1;
        ori = a[t->u_i] & 1;
        u = &(t->ug->u.a[uid]);
        if(u->n == 0) continue;
        
        while(t->r_i < u->n) ///for (r_i = 0; r_i < u->n; r_i++)
        {
            l = 0;
            v = (ori == 1?((uint64_t)((u->a[u->n-t->r_i-1])^(uint64_t)(0x100000000)))>>32:((uint64_t)(u->a[t->r_i]))>>32);

            if(t->p_v != (uint32_t)-1)
            {
                av = asg_arc_a(t->read_sg, t->p_v);
                nv = asg_arc_n(t->read_sg, t->p_v);
                
                for (k = 0; k < nv; k++)
                {
                    if(av[k].del) continue;
                    if(av[k].v == v) 
                    {
                        l = asg_arc_len(av[k]);
                        break;
                    }
                }
                if(k == nv) fprintf(stderr, "ERROR-nv\n");
            }

            ///[t->cBeg, t->cEnd)
            r_beg = t->len; r_end = t->len + 
                        (t->p_v != (uint32_t)-1? t->read_sg->seq[t->p_v>>1].len : 0);
            ovlp = ((MIN(t->cEnd, r_end) > MAX(t->cBeg, r_beg))? (MIN(t->cEnd, r_end) - MAX(t->cBeg, r_beg)) : 0);
            c_uId = get_origin_uid(v, t->t_ch, &offPre, &idx);


            if(ovlp == 0)
            {
                if(r_beg >= t->cEnd)
                {
                    if(t->p_uId != (uint32_t)-1)
                    {
                        hit->qn = t->p_uId;
                        hit->qScur = t->s_pos_cur; hit->qEcur = t->len + t->read_sg->seq[t->p_v>>1].len;


                        ovlp = ((MIN(t->cEnd, hit->qEcur) > MAX(t->cBeg, hit->qScur))? 
                                                (MIN(t->cEnd, hit->qEcur) - MAX(t->cBeg, hit->qScur)) : 0);
                        if(ovlp == 0) return 0;

                        
                        ///[t->s_pre_v, t->p_v]
                        uint32_t a_pos, b_pos;
                        get_origin_uid(t->s_pre_v, t->t_ch, &a_pos, NULL);
                        get_origin_uid(t->p_v, t->t_ch, &b_pos, NULL);
                        hit->qSpre = MIN(a_pos, b_pos);
                        hit->qEpre = MAX((a_pos + t->read_sg->seq[t->s_pre_v>>1].len), (b_pos+t->read_sg->seq[t->p_v>>1].len));
                        
                        ///[t->cBeg, t->cEnd)
                        if(hit->qScur < t->cBeg)
                        {
                            if((hit->qn&1) == 0)
                            {
                                ///hit->qSpre += (t->cBeg - hit->qScur);
                                hit->qSpre += get_offset_adjust(t->cBeg - hit->qScur, 
                                                    hit->qEcur-hit->qScur, hit->qEpre-hit->qSpre);
                            }
                            else
                            {
                                ///hit->qEpre -= (t->cBeg - hit->qScur);
                                hit->qEpre -= get_offset_adjust(t->cBeg - hit->qScur, 
                                                    hit->qEcur-hit->qScur, hit->qEpre-hit->qSpre);
                            }
                            hit->qScur = t->cBeg;
                        }

                        if(hit->qEcur > t->cEnd)
                        {
                            if((hit->qn&1) == 0)
                            {
                                ///hit->qEpre -= (hit->qEcur - t->cEnd);
                                hit->qEpre -= get_offset_adjust(hit->qEcur - t->cEnd,
                                                    hit->qEcur-hit->qScur, hit->qEpre-hit->qSpre);
                            }
                            else
                            {
                                // hit->qSpre += (hit->qEcur - t->cEnd);
                                hit->qSpre += get_offset_adjust(hit->qEcur - t->cEnd,
                                                    hit->qEcur-hit->qScur, hit->qEpre-hit->qSpre);
                            }
                            hit->qEcur = t->cEnd;
                        }
                        t->p_uId = (uint32_t)-1;
                        return 1;
                    }
                    return 0;
                }
                else
                {
                    t->p_uId = c_uId; t->s_pos_cur = t->len + l; t->s_pre_v = v;
                    t->p_v = v; t->len += l; t->p_idx = idx;
                    t->r_i++;
                    continue;
                }
            }
            

            is_update = 0;
            if(t->p_uId != c_uId)
            {
                is_update = 1;
                
            }
            else///p_uId == c_uId
            {
                if((t->p_uId&1) == 0) ///forward
                {
                    if(idx != (t->p_idx+1))
                    {
                        is_update = 1;
                    }
                }
                else //backward
                {
                    if((idx + 1) != t->p_idx)
                    {
                        is_update = 1;
                    }
                }
            } 
            
            if(is_update)
            {
                if(t->p_uId != (uint32_t)-1)
                {                    
                    hit->qn = t->p_uId;
                    hit->qScur = t->s_pos_cur; hit->qEcur = t->len + t->read_sg->seq[t->p_v>>1].len;
                    ///[t->s_pre_v, t->p_v]
                    uint32_t a_pos, b_pos;
                    get_origin_uid(t->s_pre_v, t->t_ch, &a_pos, NULL);
                    get_origin_uid(t->p_v, t->t_ch, &b_pos, NULL);
                    hit->qSpre = MIN(a_pos, b_pos);
                    hit->qEpre = MAX((a_pos + t->read_sg->seq[t->s_pre_v>>1].len), (b_pos+t->read_sg->seq[t->p_v>>1].len));
                    
                    ///[t->cBeg, t->cEnd)
                    if(hit->qScur < t->cBeg)
                    {
                        if((hit->qn&1) == 0)
                        {
                            ///hit->qSpre += (t->cBeg - hit->qScur);
                            hit->qSpre += get_offset_adjust(t->cBeg - hit->qScur, 
                                                hit->qEcur-hit->qScur, hit->qEpre-hit->qSpre);
                        }
                        else
                        {
                            ///hit->qEpre -= (t->cBeg - hit->qScur);
                            hit->qEpre -= get_offset_adjust(t->cBeg - hit->qScur, 
                                                hit->qEcur-hit->qScur, hit->qEpre-hit->qSpre);
                        }
                        hit->qScur = t->cBeg;
                    }

                    if(hit->qEcur > t->cEnd)
                    {
                        if((hit->qn&1) == 0)
                        {
                            ///hit->qEpre -= (hit->qEcur - t->cEnd);
                            hit->qEpre -= get_offset_adjust(hit->qEcur - t->cEnd,
                                                hit->qEcur-hit->qScur, hit->qEpre-hit->qSpre);
                        }
                        else
                        {
                            // hit->qSpre += (hit->qEcur - t->cEnd);
                            hit->qSpre += get_offset_adjust(hit->qEcur - t->cEnd,
                                                hit->qEcur-hit->qScur, hit->qEpre-hit->qSpre);
                        }
                        hit->qEcur = t->cEnd;
                    }


                    t->p_uId = c_uId; t->s_pos_cur = t->len + l; t->s_pre_v = v;
                    t->p_v = v; t->len += l; t->p_idx = idx;
                    t->r_i++;
                    return 1;
                }
                t->p_uId = c_uId; t->s_pos_cur = t->len + l; t->s_pre_v = v;
            }

            t->p_v = v; t->len += l; t->p_idx = idx;
            t->r_i++;
        }
        t->r_i = 0;
        t->u_i++;
    }
    
    if(t->p_uId != (uint32_t)-1)
    {
        hit->qn = t->p_uId;
        hit->qScur = t->s_pos_cur; hit->qEcur = t->len + t->read_sg->seq[t->p_v>>1].len;


        ovlp = ((MIN(t->cEnd, hit->qEcur) > MAX(t->cBeg, hit->qScur))? 
                                (MIN(t->cEnd, hit->qEcur) - MAX(t->cBeg, hit->qScur)) : 0);
        if(ovlp == 0) return 0;

        
        ///[t->s_pre_v, t->p_v]
        uint32_t a_pos, b_pos;
        get_origin_uid(t->s_pre_v, t->t_ch, &a_pos, NULL);
        get_origin_uid(t->p_v, t->t_ch, &b_pos, NULL);
        hit->qSpre = MIN(a_pos, b_pos);
        hit->qEpre = MAX((a_pos + t->read_sg->seq[t->s_pre_v>>1].len), (b_pos+t->read_sg->seq[t->p_v>>1].len));
        
        ///[t->cBeg, t->cEnd)
        if(hit->qScur < t->cBeg)
        {
            if((hit->qn&1) == 0)
            {
                ///hit->qSpre += (t->cBeg - hit->qScur);
                hit->qSpre += get_offset_adjust(t->cBeg - hit->qScur, 
                                    hit->qEcur-hit->qScur, hit->qEpre-hit->qSpre);
            }
            else
            {
                ///hit->qEpre -= (t->cBeg - hit->qScur);
                hit->qEpre -= get_offset_adjust(t->cBeg - hit->qScur, 
                                    hit->qEcur-hit->qScur, hit->qEpre-hit->qSpre);
            }
            hit->qScur = t->cBeg;
        }

        if(hit->qEcur > t->cEnd)
        {
            if((hit->qn&1) == 0)
            {
                ///hit->qEpre -= (hit->qEcur - t->cEnd);
                hit->qEpre -= get_offset_adjust(hit->qEcur - t->cEnd,
                                    hit->qEcur-hit->qScur, hit->qEpre-hit->qSpre);
            }
            else
            {
                // hit->qSpre += (hit->qEcur - t->cEnd);
                hit->qSpre += get_offset_adjust(hit->qEcur - t->cEnd,
                                    hit->qEcur-hit->qScur, hit->qEpre-hit->qSpre);
            }
            hit->qEcur = t->cEnd;
        }

        t->p_uId = (uint32_t)-1;
        return 1;
    }
    return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
movq 0x30(%rdi), %r9
movl 0x38(%rdi), %r10d
pcmpeqd %xmm0, %xmm0
movdqu %xmm0, 0x10(%rsi)
movdqu %xmm0, (%rsi)
movq $-0x1, 0x20(%rsi)
movl (%rdi), %eax
cmpl %r10d, %eax
jae 0xbd6b8
movq %rsi, 0x8(%rsp)
movq %r9, 0x10(%rsp)
movl %r10d, (%rsp)
movl %eax, %ecx
movl (%r9,%rcx,4), %ecx
movl %ecx, 0x4(%rsp)
shrl %ecx
movq 0x40(%rbx), %rdx
movq 0x10(%rdx), %r8
leaq (%rcx,%rcx,4), %rdi
movl 0x10(%r8,%rdi,8), %ecx
testl %ecx, %ecx
je 0xbd6af
movl 0x4(%rbx), %edx
cmpl %ecx, %edx
jae 0xbd6a4
leaq (%r8,%rdi,8), %r15
movq 0x18(%r15), %rax
testb $0x1, 0x4(%rsp)
jne 0xbd4f0
movl %edx, %ecx
movl 0x4(%rax,%rcx,8), %r14d
jmp 0xbd4fd
notl %edx
addl %edx, %ecx
movl 0x4(%rax,%rcx,8), %r14d
xorq $0x1, %r14
movl 0x18(%rbx), %edi
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpq %rax, %rdi
je 0xbd553
movq 0x48(%rbx), %rcx
movq 0x28(%rcx), %rax
movq (%rax,%rdi,8), %rax
xorl %r13d, %r13d
testl %eax, %eax
je 0xbd563
movq 0x8(%rcx), %rcx
movq %rax, %rsi
shrq $0x20, %rsi
movl %eax, %edx
leaq (%rsi,%rsi,2), %rsi
leaq (%rcx,%rsi,8), %rsi
addq $0xc, %rsi
xorl %ecx, %ecx
cmpl $0x0, (%rsi)
js 0xbd543
cmpl %r14d, -0x4(%rsi)
je 0xbd567
incq %rcx
addq $0x18, %rsi
cmpq %rcx, %rdx
jne 0xbd538
movl %eax, %ecx
jmp 0xbd56b
movl 0x8(%rbx), %esi
movl $0x7fffffff, %edi       # imm = 0x7FFFFFFF
xorl %r13d, %r13d
xorl %r9d, %r9d
jmp 0xbd59b
xorl %ecx, %ecx
jmp 0xbd56b
movl -0xc(%rsi), %r13d
cmpl %eax, %ecx
je 0xbd66c
movl 0x8(%rbx), %esi
cmpl $-0x1, %edi
je 0xbd593
movq 0x48(%rbx), %rax
movq 0x20(%rax), %rax
shrl %edi
movl (%rax,%rdi,8), %r9d
movl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
andl %eax, %r9d
jmp 0xbd59b
xorl %r9d, %r9d
movl $0x7fffffff, %edi       # imm = 0x7FFFFFFF
addl %esi, %r9d
movl 0x24(%rbx), %edx
movl 0x28(%rbx), %ecx
cmpl %r9d, %ecx
cmovbl %ecx, %r9d
cmpl %esi, %edx
movl %esi, %r10d
cmoval %edx, %r10d
movq 0x50(%rbx), %r8
movq 0x8(%r8), %r11
movl %r14d, %r12d
shrl %r12d
movq (%r11,%r12,8), %rax
cmpq $-0x1, %rax
je 0xbd5dd
movq (%r8), %rbp
movl %r14d, %r8d
andl $0x1, %r8d
xorl (%rbp,%r12,4), %r8d
jmp 0xbd5e3
movl $0xffffffff, %r8d       # imm = 0xFFFFFFFF
cmpl %r10d, %r9d
jbe 0xbd608
movl 0x20(%rbx), %r9d
cmpl %r8d, %r9d
jne 0xbd62f
testb $0x1, %r8b
jne 0xbd625
movl 0x1c(%rbx), %r9d
incl %r9d
cmpl %eax, %r9d
je 0xbd648
jmp 0xbd888
cmpl %ecx, %esi
jae 0xbd7a1
movl %r8d, 0x20(%rbx)
addl %esi, %r13d
movl %r13d, 0xc(%rbx)
movl %r14d, 0x10(%rbx)
movl %r14d, 0x18(%rbx)
jmp 0xbd64f
leal 0x1(%rax), %r10d
cmpl 0x1c(%rbx), %r10d
je 0xbd648
cmpl $-0x1, %r9d
jne 0xbd88b
movl %r8d, 0x20(%rbx)
leal (%rsi,%r13), %ecx
movl %ecx, 0xc(%rbx)
movl %r14d, 0x10(%rbx)
movl %r14d, 0x18(%rbx)
addl %esi, %r13d
movl %r13d, 0x8(%rbx)
movl %eax, 0x1c(%rbx)
movl 0x4(%rbx), %edx
incl %edx
movl %edx, 0x4(%rbx)
movl 0x10(%r15), %ecx
cmpl %ecx, %edx
jb 0xbd4dc
jmp 0xbd694
movq 0x1d796d(%rip), %rax    # 0x294fe0
movq (%rax), %rcx
movl $0x9, %esi
movl $0x1, %edx
leaq 0x179384(%rip), %rdi    # 0x236a0b
callq 0x2410
movl 0x18(%rbx), %edi
jmp 0xbd573
movl (%rbx), %eax
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %r9
movl (%rsp), %r10d
movl $0x0, 0x4(%rbx)
incl %eax
movl %eax, (%rbx)
cmpl %r10d, %eax
jb 0xbd4a8
movl 0x20(%rbx), %ecx
xorl %eax, %eax
cmpl $-0x1, %ecx
je 0xbdab6
movl %ecx, 0x10(%rsi)
movl 0xc(%rbx), %r9d
movl %r9d, 0x8(%rsi)
movq 0x48(%rbx), %rdx
movq 0x20(%rdx), %r10
movl 0x18(%rbx), %r11d
shrl %r11d
movl $0x7fffffff, %edx       # imm = 0x7FFFFFFF
movl (%r10,%r11,8), %edi
andl %edx, %edi
addl 0x8(%rbx), %edi
movl %edi, 0xc(%rsi)
movl 0x24(%rbx), %r8d
movl 0x28(%rbx), %r12d
cmpl %edi, %r12d
movl %edi, %ebp
cmovbl %r12d, %ebp
cmpl %r9d, %r8d
movl %r9d, %r14d
cmoval %r8d, %r14d
cmpl %r14d, %ebp
jbe 0xbdab6
movl 0x10(%rbx), %r14d
movq 0x50(%rbx), %rax
movq 0x8(%rax), %rax
shrl %r14d
movl 0x4(%rax,%r14,8), %ebp
movl 0x4(%rax,%r11,8), %r15d
cmpl %r15d, %ebp
movl %r15d, %eax
cmovbl %ebp, %eax
movl %eax, (%rsi)
movl (%r10,%r14,8), %r14d
andl %edx, %r14d
addl %ebp, %r14d
andl (%r10,%r11,8), %edx
addl %r15d, %edx
cmpl %edx, %r14d
cmoval %r14d, %edx
movl %edx, 0x4(%rsi)
movl %r8d, %r10d
subl %r9d, %r10d
jbe 0xbd880
movl %edi, %r11d
subl %r9d, %r11d
movl %edx, %r9d
xorps %xmm0, %xmm0
cvtsi2sd %r10, %xmm0
cvtsi2sd %r11, %xmm1
subl %eax, %r9d
divsd %xmm1, %xmm0
xorps %xmm1, %xmm1
cvtsi2sd %r9, %xmm1
mulsd %xmm0, %xmm1
cvttsd2si %xmm1, %r9
testb $0x1, %cl
jne 0xbd9f5
addl %r9d, %eax
movl %eax, (%rsi)
jmp 0xbd9fb
movl 0x20(%rbx), %r8d
xorl %eax, %eax
cmpl $-0x1, %r8d
je 0xbdab6
movq 0x8(%rsp), %r12
movl %r8d, 0x10(%r12)
movl 0xc(%rbx), %ebp
movl %ebp, 0x8(%r12)
movq 0x48(%rbx), %r9
movq 0x20(%r9), %r14
movl $0x7fffffff, %r9d       # imm = 0x7FFFFFFF
movl (%r14,%rdi,8), %r10d
andl %r9d, %r10d
addl %esi, %r10d
movl %r10d, 0xc(%r12)
cmpl %r10d, %ecx
movl %r10d, %esi
cmovbl %ecx, %esi
cmpl %ebp, %edx
movl %ebp, %r15d
cmoval %edx, %r15d
cmpl %r15d, %esi
jbe 0xbdab6
movl 0x10(%rbx), %esi
shrl %esi
movl 0x4(%r11,%rsi,8), %r15d
movl 0x4(%r11,%rdi,8), %r11d
cmpl %r11d, %r15d
movl %r11d, %eax
cmovbl %r15d, %eax
movl %eax, (%r12)
movl (%r14,%rsi,8), %esi
andl %r9d, %esi
addl %r15d, %esi
andl (%r14,%rdi,8), %r9d
addl %r11d, %r9d
cmpl %r9d, %esi
cmoval %esi, %r9d
movl %r9d, 0x4(%r12)
movl %edx, %esi
subl %ebp, %esi
movq %r12, %r14
jbe 0xbda4f
movl %r10d, %edi
subl %ebp, %edi
movl %r9d, %r11d
cvtsi2sd %rsi, %xmm0
cvtsi2sd %rdi, %xmm1
subl %eax, %r11d
divsd %xmm1, %xmm0
xorps %xmm1, %xmm1
cvtsi2sd %r11, %xmm1
mulsd %xmm0, %xmm1
cvttsd2si %xmm1, %rsi
testb $0x1, %r8b
jne 0xbda53
addl %esi, %eax
movl %eax, (%r14)
jmp 0xbda5a
movl %r9d, %r8d
jmp 0xbd9ff
movl %r8d, %r9d
movq 0x8(%rsp), %r15
movl %r9d, 0x10(%r15)
movl 0xc(%rbx), %r10d
movl %r10d, 0x1c(%rsp)
movl %r10d, 0x8(%r15)
movq 0x48(%rbx), %r10
movq 0x20(%r10), %r10
movq %r10, 0x20(%rsp)
movl $0x7fffffff, %r12d      # imm = 0x7FFFFFFF
movl (%r10,%rdi,8), %r10d
andl %r12d, %r10d
addl %esi, %r10d
movq %r10, 0x10(%rsp)
movl %r10d, 0xc(%r15)
movl 0x10(%rbx), %ebp
shrl %ebp
movl 0x4(%r11,%rbp,8), %r10d
movl 0x4(%r11,%rdi,8), %r11d
movl %r11d, 0x4(%rsp)
cmpl %r11d, %r10d
movl 0x4(%rsp), %r11d
cmovbl %r10d, %r11d
movl %r11d, (%rsp)
movl %r11d, (%r15)
movq 0x20(%rsp), %r11
movl (%r11,%rbp,8), %ebp
andl %r12d, %ebp
addl %r10d, %ebp
movl 0x1c(%rsp), %r10d
andl (%r11,%rdi,8), %r12d
addl 0x4(%rsp), %r12d
cmpl %r12d, %ebp
cmoval %ebp, %r12d
movl %r12d, 0x4(%r15)
movl %edx, %edi
subl %r10d, %edi
jbe 0xbd967
movq 0x10(%rsp), %rbp
movl %ebp, %r11d
subl %r10d, %r11d
movl %r12d, %r15d
cvtsi2sd %rdi, %xmm0
cvtsi2sd %r11, %xmm1
movl (%rsp), %r10d
subl %r10d, %r15d
divsd %xmm1, %xmm0
xorps %xmm1, %xmm1
cvtsi2sd %r15, %xmm1
mulsd %xmm0, %xmm1
cvttsd2si %xmm1, %rdi
testb $0x1, %r9b
movq %rbp, %r11
jne 0xbd975
addl %edi, %r10d
movq 0x8(%rsp), %r15
movl %r10d, (%r15)
jmp 0xbd981
movl %r10d, %edx
movl (%rsp), %r10d
movq 0x10(%rsp), %r11
jmp 0xbd985
subl %edi, %r12d
movq 0x8(%rsp), %r15
movl %r12d, 0x4(%r15)
movl %edx, 0x8(%r15)
movl %r11d, %edi
subl %ecx, %edi
jbe 0xbd9d3
subl %edx, %r11d
movl %r12d, %edx
xorps %xmm0, %xmm0
cvtsi2sd %rdi, %xmm0
xorps %xmm1, %xmm1
cvtsi2sd %r11, %xmm1
subl %r10d, %edx
divsd %xmm1, %xmm0
xorps %xmm1, %xmm1
cvtsi2sd %rdx, %xmm1
mulsd %xmm0, %xmm1
cvttsd2si %xmm1, %rdx
testb $0x1, %r9b
jne 0xbd9c9
subl %edx, %r12d
movl %r12d, 0x4(%r15)
jmp 0xbd9cf
addl %edx, %r10d
movl %r10d, (%r15)
movl %ecx, 0xc(%r15)
movl %r8d, 0x20(%rbx)
addl %esi, %r13d
movl %r13d, 0xc(%rbx)
movl %r14d, 0x10(%rbx)
movl %r14d, 0x18(%rbx)
movl %r13d, 0x8(%rbx)
movl %eax, 0x1c(%rbx)
incl 0x4(%rbx)
jmp 0xbdab1
subl %r9d, %edx
movl %edx, 0x4(%rsi)
movl %r8d, 0x8(%rsi)
movl %edi, %r9d
subl %r12d, %r9d
jbe 0xbdaaa
subl %r8d, %edi
movl %edx, %r8d
xorps %xmm0, %xmm0
cvtsi2sd %r9, %xmm0
xorps %xmm1, %xmm1
cvtsi2sd %rdi, %xmm1
subl %eax, %r8d
divsd %xmm1, %xmm0
xorps %xmm1, %xmm1
cvtsi2sd %r8, %xmm1
mulsd %xmm0, %xmm1
cvttsd2si %xmm1, %rdi
testb $0x1, %cl
jne 0xbda45
subl %edi, %edx
movl %edx, 0x4(%rsi)
jmp 0xbda49
addl %edi, %eax
movl %eax, (%rsi)
movl %r12d, 0xc(%rsi)
jmp 0xbdaaa
movl %ebp, %edx
jmp 0xbda5e
subl %esi, %r9d
movl %r9d, 0x4(%r14)
movl %edx, 0x8(%r14)
movl %r10d, %esi
subl %ecx, %esi
jbe 0xbdaaa
subl %edx, %r10d
movl %r9d, %edx
xorps %xmm0, %xmm0
cvtsi2sd %rsi, %xmm0
xorps %xmm1, %xmm1
cvtsi2sd %r10, %xmm1
subl %eax, %edx
divsd %xmm1, %xmm0
xorps %xmm1, %xmm1
cvtsi2sd %rdx, %xmm1
mulsd %xmm0, %xmm1
cvttsd2si %xmm1, %rdx
testb $0x1, %r8b
jne 0xbdaa1
subl %edx, %r9d
movl %r9d, 0x4(%r14)
jmp 0xbdaa6
addl %edx, %eax
movl %eax, (%r14)
movl %ecx, 0xc(%r14)
movl $0xffffffff, 0x20(%rbx) # imm = 0xFFFFFFFF
movl $0x1, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq