// File: /workspace/github_cpp_makefile_star2_O3/chhylp123[P]hifiasm/Overlaps.cpp
// Function: adjust_utg_by_primary(ma_ug_t**, asg_t*, float, ma_hit_t_alloc*, ma_hit_t_alloc*, ma_sub_t*, long long, float, long long, R_to_U*, float, float, int, int, kvec_asg_arc_t_warp*, hap_cov_t**, bub_label_t*, unsigned int, unsigned int)
void adjust_utg_by_primary(ma_ug_t **ug, asg_t* read_g, float drop_rate,
ma_hit_t_alloc* sources, ma_hit_t_alloc* reverse_sources, ma_sub_t* coverage_cut, 
long long tipsLen, float tip_drop_ratio, long long stops_threshold, 
R_to_U* ruIndex, float chimeric_rate, float drop_ratio, int max_hang, int min_ovlp,
kvec_asg_arc_t_warp* new_rtg_edges, hap_cov_t **i_cov, bub_label_t* b_mask_t, 
uint32_t collect_p_trans, uint32_t collect_p_trans_f)
{
    asg_t* nsg = (*ug)->g;
    uint32_t v, n_vtx = nsg->n_seq, k, rId, just_contain;
    ma_utg_t* u = NULL;
    hap_cov_t *cov = init_hap_cov_t(*ug, read_g, sources, ruIndex, reverse_sources, 
                            coverage_cut, max_hang, min_ovlp, (asm_opt.purge_level_primary>0||i_cov)?1:0);
    if(cov->t_ch) cov->t_ch->ir_het = cov->is_r_het;
    adjust_utg_advance(read_g, (*ug), reverse_sources, ruIndex, b_mask_t, cov->is_r_het);

    nsg = (*ug)->g;
    n_vtx = nsg->n_seq;
    for (v = 0; v < n_vtx; ++v) 
    {
        if(nsg->seq[v].del) continue;
        nsg->seq[v].c = PRIMARY_LABLE;
        EvaluateLen((*ug)->u, v) = (*ug)->u.a[v].n;
    }

    clean_primary_untig_graph(*ug, read_g, sources, reverse_sources, coverage_cut, tipsLen, tip_drop_ratio, 
    stops_threshold, ruIndex, NULL, NULL, 0, 0, 0, chimeric_rate, 0, 0, drop_ratio, cov);
    delete_useless_nodes(ug);
    renew_utg(ug, read_g, new_rtg_edges);
    if(i_cov && collect_p_trans == 0) goto skip_purge;
    if(asm_opt.purge_level_primary > 0)
    {
        // print_debug_gfa(read_g, *ug, coverage_cut, "debug_purge", sources, ruIndex, asm_opt.max_hang_Len, asm_opt.min_overlap_Len);
        just_contain = 0;
        if(asm_opt.purge_level_primary == 1) just_contain = 1;
        purge_dups(*ug, read_g, coverage_cut, sources, reverse_sources, ruIndex, new_rtg_edges, 
        asm_opt.purge_simi_thres, asm_opt.purge_overlap_len, max_hang, min_ovlp, drop_ratio, 
        just_contain, 0, cov, !!(cov->t_ch&&collect_p_trans), collect_p_trans_f);
        delete_useless_nodes(ug);
        renew_utg(ug, read_g, new_rtg_edges);
    }

    if (!(asm_opt.flag & HA_F_BAN_POST_JOIN))
    {
        rescue_missing_overlaps_aggressive(*ug, read_g, sources, coverage_cut, ruIndex, max_hang,
        min_ovlp, 0, 1, NULL, b_mask_t);
        renew_utg(ug, read_g, new_rtg_edges);
        rescue_contained_reads_aggressive(*ug, read_g, sources, coverage_cut, ruIndex, max_hang, 
        min_ovlp, 10, 0, 1, NULL, NULL, b_mask_t);
        renew_utg(ug, read_g, new_rtg_edges);
    }


    if(asm_opt.max_contig_tip > 0) {
        discard_small_ctg(ug, read_g, new_rtg_edges, asm_opt.max_contig_tip, 0, 1); 
    }


    n_vtx = read_g->n_seq;
    for (v = 0; v < n_vtx; v++)
    {
        read_g->seq[v].c = ALTER_LABLE;
    }
    
    
    nsg = (*ug)->g;
    n_vtx = nsg->n_seq;
    for (v = 0; v < n_vtx; ++v) 
    {
        if(nsg->seq[v].del) continue;
        if(nsg->seq[v].c == ALTER_LABLE) continue;
        u = &((*ug)->u.a[v]);
        if(u->m == 0) continue;
        for (k = 0; k < u->n; k++)
        {
            rId = u->a[k]>>33;
            read_g->seq[rId].c = nsg->seq[v].c;
        }
    }

    n_vtx = read_g->n_seq;
    for (v = 0; v < n_vtx; v++)
    {
        if(read_g->seq[v].c == ALTER_LABLE)
        {
            asg_seq_drop(read_g, v);
        }
    }

    if(asm_opt.recover_atg_cov_min == -1024)
    {
        asm_opt.recover_atg_cov_max = (asm_opt.hom_global_coverage_set?
            (asm_opt.hom_global_coverage):(((double)asm_opt.hom_global_coverage)/((double)HOM_PEAK_RATE)));
        asm_opt.recover_atg_cov_min = asm_opt.recover_atg_cov_max * 0.85;
        asm_opt.recover_atg_cov_max = INT32_MAX;
    }

    if(asm_opt.recover_atg_cov_max != INT32_MAX)
    {
        fprintf(stderr, "[M::%s] primary contig coverage range: [%d, %d]\n", 
        __func__, asm_opt.recover_atg_cov_min, asm_opt.recover_atg_cov_max);
    }
    else
    {
        fprintf(stderr, "[M::%s] primary contig coverage range: [%d, infinity]\n", 
        __func__, asm_opt.recover_atg_cov_min);
    }

    skip_purge:
    recover_utg_by_coverage(ug, read_g, coverage_cut, sources, ruIndex, cov->t_ch);
    if(i_cov)
    {
        (*i_cov) = cov;
    } 
    else
    {
        destory_hap_cov_t(&cov);
    }     
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movss %xmm3, 0x30(%rsp)
movss %xmm2, 0x2c(%rsp)
movd %xmm1, 0x28(%rsp)
movq %r9, %rbx
movq %r8, %r9
movq %rcx, %r12
movq %rsi, %r15
movq 0xb8(%rsp), %r13
movl 0xa8(%rsp), %r11d
movl 0xa0(%rsp), %r10d
movq 0x98(%rsp), %rcx
movq %rdi, 0x8(%rsp)
movq (%rdi), %rdi
leaq 0x1cc693(%rip), %rax    # 0x295758
cmpl $0x0, 0x130(%rax)
setg %al
testq %r13, %r13
setne %sil
orb %al, %sil
movzbl %sil, %eax
subq $0x8, %rsp
movq %r15, %rsi
movq %rdx, 0x28(%rsp)
movq %r12, %r8
movq %r9, 0x20(%rsp)
pushq %rax
pushq %r11
pushq %r10
callq 0xd74eb
addq $0x20, %rsp
movq %rax, 0x48(%rsp)
movq 0xa0(%rax), %r9
movq %rax, 0x10(%rsp)
movq 0xa8(%rax), %rax
testq %rax, %rax
je 0xc9120
movq %r9, 0x10(%rax)
movq 0x90(%rsp), %r14
movq 0x8(%rsp), %rbp
movq (%rbp), %rsi
movq %r15, %rdi
movq %r12, %rdx
movq 0x98(%rsp), %rcx
movq 0xc0(%rsp), %r8
callq 0xca960
movq (%rbp), %rdi
movq 0x18(%rdi), %rax
movl 0x14(%rax), %ecx
andq $0x7fffffff, %rcx       # imm = 0x7FFFFFFF
je 0xc9196
movq 0x20(%rax), %rax
addq $0x4, %rax
shlq $0x3, %rcx
leaq (%rcx,%rcx,4), %rcx
xorl %edx, %edx
cmpl $0x0, -0x4(%rax)
js 0xc9189
movb $0x0, (%rax)
movq 0x10(%rdi), %rsi
movl 0x10(%rsi,%rdx), %r8d
movl %r8d, 0x4(%rsi,%rdx)
addq $0x8, %rax
addq $0x28, %rdx
cmpq %rdx, %rcx
jne 0xc9172
movl 0xc8(%rsp), %ebp
subq $0x50, %rsp
movq 0x60(%rsp), %rax
movq %rax, 0x40(%rsp)
movq 0xe8(%rsp), %rax
movq %rax, 0x8(%rsp)
movq %r14, (%rsp)
movl $0x0, 0x38(%rsp)
movq %r15, %rsi
movq %r12, %rcx
movq %rbx, %r9
movd 0x78(%rsp), %xmm0
movd 0x7c(%rsp), %xmm2
movd 0x80(%rsp), %xmm3
callq 0xd4c27
addq $0x50, %rsp
movq 0x8(%rsp), %rbx
movq %rbx, %rdi
callq 0xca9ea
movq %rbx, %rdi
movq %r15, %rsi
movq 0xb0(%rsp), %rdx
callq 0xbb7a4
testq %r13, %r13
je 0xc9252
testl %ebp, %ebp
jne 0xc9252
movq 0x10(%rsp), %rbx
movq 0xa8(%rbx), %r9
movq 0x8(%rsp), %rdi
movq %r15, %rsi
movq 0x18(%rsp), %rdx
movq 0x20(%rsp), %rcx
movq 0x98(%rsp), %r8
callq 0xf2e09
movq %rbx, (%r13)
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x1cc4ff(%rip), %rcx    # 0x295758
movl 0x130(%rcx), %eax
testl %eax, %eax
jle 0xc9318
movl 0xd0(%rsp), %r11d
xorl %r10d, %r10d
cmpl $0x1, %eax
sete %r10b
movq 0x8(%rsp), %r14
movq (%r14), %rdi
movd 0x16c(%rcx), %xmm0
movl 0x138(%rcx), %eax
movq 0x10(%rsp), %r13
cmpq $0x0, 0xa8(%r13)
setne %cl
testl %ebp, %ebp
setne %dl
andb %cl, %dl
movzbl %dl, %ebx
subq $0x8, %rsp
movq %r15, %rsi
movq 0x20(%rsp), %rdx
movq 0x28(%rsp), %rcx
movq %r12, %r8
movq 0xa0(%rsp), %r9
movd 0x38(%rsp), %xmm1
pushq %r11
pushq %rbx
pushq %r13
pushq $0x0
pushq %r10
movl 0xd8(%rsp), %r10d
pushq %r10
movl 0xd8(%rsp), %r10d
pushq %r10
pushq %rax
movq 0xf8(%rsp), %rbx
pushq %rbx
callq 0x12943
addq $0x50, %rsp
movq %r14, %rdi
callq 0xca9ea
movq %r14, %rdi
movq %r15, %rsi
movq %rbx, %rdx
callq 0xbb7a4
leaq 0x1cc440(%rip), %rcx    # 0x295758
testb $0x1, 0x1(%rcx)
jne 0xc93fc
movq 0x8(%rsp), %rbx
movq (%rbx), %rdi
subq $0x8, %rsp
movl $0x1, %r10d
xorl %r11d, %r11d
movq %r15, %rsi
movq 0x28(%rsp), %r12
movq %r12, %rdx
movq 0x20(%rsp), %r13
movq %r13, %rcx
movq 0xa0(%rsp), %r8
movl 0xa8(%rsp), %eax
movq %rax, %r9
movq 0xc8(%rsp), %r14
pushq %r14
pushq $0x0
pushq %r10
pushq %r11
movl 0xd0(%rsp), %ebp
pushq %rbp
callq 0xd7993
addq $0x30, %rsp
movq %rbx, %rdi
movq %r15, %rsi
movq 0xb0(%rsp), %rdx
callq 0xbb7a4
movq (%rbx), %rdi
subq $0x40, %rsp
movq %r14, 0x30(%rsp)
pxor %xmm0, %xmm0
movdqu %xmm0, 0x20(%rsp)
movl $0x1, %eax
movl %eax, 0x18(%rsp)
xorl %eax, %eax
movl %eax, 0x10(%rsp)
movl %ebp, (%rsp)
movl $0xa, 0x8(%rsp)
movq %r15, %rsi
movq %r12, %rdx
movq %r13, %rcx
movq 0xd8(%rsp), %r8
movl 0xe0(%rsp), %r9d
callq 0xd8787
addq $0x40, %rsp
movq %rbx, %rdi
movq %r15, %rsi
movq 0xb0(%rsp), %rdx
callq 0xbb7a4
leaq 0x1cc35c(%rip), %rcx    # 0x295758
movl 0x124(%rcx), %ecx
testl %ecx, %ecx
jle 0xc9424
movq 0x8(%rsp), %rdi
movq %r15, %rsi
movq 0xb0(%rsp), %rdx
xorl %r8d, %r8d
movl $0x1, %r9d
callq 0xd6d0f
movl 0x14(%r15), %edx
andq $0x7fffffff, %rdx       # imm = 0x7FFFFFFF
je 0xc9990
movq 0x20(%r15), %rax
leal 0xf(%rdx), %ecx
decq %rdx
movq %rdx, %xmm0
pshufd $0x44, %xmm0, %xmm0     # xmm0 = xmm0[0,1,0,1]
movdqa %xmm0, 0x30(%rsp)
andl $-0x10, %ecx
shlq $0x3, %rcx
movdqa 0x16c882(%rip), %xmm1   # 0x235ce0
movdqa 0x16c88a(%rip), %xmm2   # 0x235cf0
movdqa 0x16c892(%rip), %xmm3   # 0x235d00
movdqa 0x16c89a(%rip), %xmm4   # 0x235d10
movdqa 0x167e22(%rip), %xmm5   # 0x2312a0
movdqa 0x167e2a(%rip), %xmm6   # 0x2312b0
movdqa 0x167e32(%rip), %xmm7   # 0x2312c0
movdqa 0x167e39(%rip), %xmm8   # 0x2312d0
xorl %edx, %edx
movdqa 0x167e3e(%rip), %xmm9   # 0x2312e0
pcmpeqd %xmm10, %xmm10
movdqa 0x30(%rsp), %xmm12
pxor %xmm9, %xmm12
movdqa %xmm8, %xmm13
pxor %xmm9, %xmm13
movdqa %xmm13, %xmm15
pcmpgtd %xmm12, %xmm15
pshufd $0xa0, %xmm15, %xmm14   # xmm14 = xmm15[0,0,2,2]
pshuflw $0xe8, %xmm14, %xmm0    # xmm0 = xmm14[0,2,2,3,4,5,6,7]
pcmpeqd %xmm12, %xmm13
pshufd $0xf5, %xmm13, %xmm13   # xmm13 = xmm13[1,1,3,3]
pshuflw $0xe8, %xmm13, %xmm11   # xmm11 = xmm13[0,2,2,3,4,5,6,7]
pand %xmm0, %xmm11
pshufd $0xf5, %xmm15, %xmm15   # xmm15 = xmm15[1,1,3,3]
pshuflw $0xe8, %xmm15, %xmm0    # xmm0 = xmm15[0,2,2,3,4,5,6,7]
por %xmm11, %xmm0
pxor %xmm10, %xmm0
packssdw %xmm0, %xmm0
movd %xmm0, %esi
testb $0x1, %sil
je 0xc9512
movb $0x1, 0x4(%rax,%rdx)
pand %xmm14, %xmm13
por %xmm15, %xmm13
packssdw %xmm13, %xmm13
pxor %xmm10, %xmm13
packssdw %xmm13, %xmm13
packsswb %xmm13, %xmm13
movd %xmm13, %esi
shrl $0x8, %esi
testb $0x1, %sil
je 0xc9543
movb $0x1, 0xc(%rax,%rdx)
movdqa %xmm7, %xmm0
pxor %xmm9, %xmm0
movdqa %xmm0, %xmm11
pcmpgtd %xmm12, %xmm11
pshufd $0xa0, %xmm11, %xmm13   # xmm13 = xmm11[0,0,2,2]
pcmpeqd %xmm12, %xmm0
pshufd $0xf5, %xmm0, %xmm14    # xmm14 = xmm0[1,1,3,3]
movdqa %xmm14, %xmm0
pand %xmm13, %xmm0
pshufd $0xf5, %xmm11, %xmm15   # xmm15 = xmm11[1,1,3,3]
por %xmm15, %xmm0
packssdw %xmm0, %xmm0
pxor %xmm10, %xmm0
packssdw %xmm0, %xmm0
packsswb %xmm0, %xmm0
movd %xmm0, %esi
shrl $0x10, %esi
testb $0x1, %sil
je 0xc959f
movb $0x1, 0x14(%rax,%rdx)
pshufhw $0x84, %xmm13, %xmm0    # xmm0 = xmm13[0,1,2,3,4,5,4,6]
pshufhw $0x84, %xmm14, %xmm11   # xmm11 = xmm14[0,1,2,3,4,5,4,6]
pand %xmm0, %xmm11
pshufhw $0x84, %xmm15, %xmm0    # xmm0 = xmm15[0,1,2,3,4,5,4,6]
por %xmm11, %xmm0
pxor %xmm10, %xmm0
packssdw %xmm0, %xmm0
packsswb %xmm0, %xmm0
movd %xmm0, %esi
shrl $0x18, %esi
testb $0x1, %sil
je 0xc95da
movb $0x1, 0x1c(%rax,%rdx)
movdqa %xmm6, %xmm0
pxor %xmm9, %xmm0
movdqa %xmm0, %xmm11
pcmpgtd %xmm12, %xmm11
pshufd $0xa0, %xmm11, %xmm14   # xmm14 = xmm11[0,0,2,2]
pshuflw $0xe8, %xmm14, %xmm15   # xmm15 = xmm14[0,2,2,3,4,5,6,7]
pcmpeqd %xmm12, %xmm0
pshufd $0xf5, %xmm0, %xmm13    # xmm13 = xmm0[1,1,3,3]
pshuflw $0xe8, %xmm13, %xmm0    # xmm0 = xmm13[0,2,2,3,4,5,6,7]
pand %xmm15, %xmm0
pshufd $0xf5, %xmm11, %xmm15   # xmm15 = xmm11[1,1,3,3]
pshuflw $0xe8, %xmm15, %xmm11   # xmm11 = xmm15[0,2,2,3,4,5,6,7]
por %xmm0, %xmm11
pxor %xmm10, %xmm11
packssdw %xmm11, %xmm0
packsswb %xmm0, %xmm0
pextrw $0x2, %xmm0, %esi
testb $0x1, %sil
je 0xc963e
movb $0x1, 0x24(%rax,%rdx)
pand %xmm14, %xmm13
por %xmm15, %xmm13
packssdw %xmm13, %xmm13
pxor %xmm10, %xmm13
packssdw %xmm13, %xmm0
packsswb %xmm0, %xmm0
pextrw $0x2, %xmm0, %esi
shrl $0x8, %esi
testb $0x1, %sil
je 0xc966e
movb $0x1, 0x2c(%rax,%rdx)
movdqa %xmm5, %xmm0
pxor %xmm9, %xmm0
movdqa %xmm0, %xmm11
pcmpgtd %xmm12, %xmm11
pshufd $0xa0, %xmm11, %xmm13   # xmm13 = xmm11[0,0,2,2]
pcmpeqd %xmm12, %xmm0
pshufd $0xf5, %xmm0, %xmm14    # xmm14 = xmm0[1,1,3,3]
movdqa %xmm14, %xmm0
pand %xmm13, %xmm0
pshufd $0xf5, %xmm11, %xmm15   # xmm15 = xmm11[1,1,3,3]
por %xmm15, %xmm0
packssdw %xmm0, %xmm0
pxor %xmm10, %xmm0
packssdw %xmm0, %xmm0
packsswb %xmm0, %xmm0
pextrw $0x3, %xmm0, %esi
testb $0x1, %sil
je 0xc96c8
movb $0x1, 0x34(%rax,%rdx)
pshufhw $0x84, %xmm13, %xmm0    # xmm0 = xmm13[0,1,2,3,4,5,4,6]
pshufhw $0x84, %xmm14, %xmm11   # xmm11 = xmm14[0,1,2,3,4,5,4,6]
pand %xmm0, %xmm11
pshufhw $0x84, %xmm15, %xmm0    # xmm0 = xmm15[0,1,2,3,4,5,4,6]
por %xmm11, %xmm0
pxor %xmm10, %xmm0
packssdw %xmm0, %xmm0
packsswb %xmm0, %xmm0
pextrw $0x3, %xmm0, %esi
shrl $0x8, %esi
testb $0x1, %sil
je 0xc9704
movb $0x1, 0x3c(%rax,%rdx)
movdqa %xmm4, %xmm0
pxor %xmm9, %xmm0
movdqa %xmm0, %xmm11
pcmpgtd %xmm12, %xmm11
pshufd $0xa0, %xmm11, %xmm14   # xmm14 = xmm11[0,0,2,2]
pshuflw $0xe8, %xmm14, %xmm15   # xmm15 = xmm14[0,2,2,3,4,5,6,7]
pcmpeqd %xmm12, %xmm0
pshufd $0xf5, %xmm0, %xmm13    # xmm13 = xmm0[1,1,3,3]
pshuflw $0xe8, %xmm13, %xmm0    # xmm0 = xmm13[0,2,2,3,4,5,6,7]
pand %xmm15, %xmm0
pshufd $0xf5, %xmm11, %xmm15   # xmm15 = xmm11[1,1,3,3]
pshuflw $0xe8, %xmm15, %xmm11   # xmm11 = xmm15[0,2,2,3,4,5,6,7]
por %xmm0, %xmm11
pxor %xmm10, %xmm11
packssdw %xmm11, %xmm11
packsswb %xmm11, %xmm0
pextrw $0x4, %xmm0, %esi
testb $0x1, %sil
je 0xc9769
movb $0x1, 0x44(%rax,%rdx)
pand %xmm14, %xmm13
por %xmm15, %xmm13
packssdw %xmm13, %xmm13
pxor %xmm10, %xmm13
packssdw %xmm13, %xmm13
packsswb %xmm13, %xmm0
pextrw $0x4, %xmm0, %esi
shrl $0x8, %esi
testb $0x1, %sil
je 0xc979a
movb $0x1, 0x4c(%rax,%rdx)
movdqa %xmm3, %xmm0
pxor %xmm9, %xmm0
movdqa %xmm0, %xmm11
pcmpgtd %xmm12, %xmm11
pshufd $0xa0, %xmm11, %xmm13   # xmm13 = xmm11[0,0,2,2]
pcmpeqd %xmm12, %xmm0
pshufd $0xf5, %xmm0, %xmm14    # xmm14 = xmm0[1,1,3,3]
movdqa %xmm14, %xmm0
pand %xmm13, %xmm0
pshufd $0xf5, %xmm11, %xmm15   # xmm15 = xmm11[1,1,3,3]
por %xmm15, %xmm0
packssdw %xmm0, %xmm0
pxor %xmm10, %xmm0
packssdw %xmm0, %xmm0
packsswb %xmm0, %xmm0
pextrw $0x5, %xmm0, %esi
testb $0x1, %sil
je 0xc97f4
movb $0x1, 0x54(%rax,%rdx)
pshufhw $0x84, %xmm13, %xmm0    # xmm0 = xmm13[0,1,2,3,4,5,4,6]
pshufhw $0x84, %xmm14, %xmm11   # xmm11 = xmm14[0,1,2,3,4,5,4,6]
pand %xmm0, %xmm11
pshufhw $0x84, %xmm15, %xmm0    # xmm0 = xmm15[0,1,2,3,4,5,4,6]
por %xmm11, %xmm0
pxor %xmm10, %xmm0
packssdw %xmm0, %xmm0
packsswb %xmm0, %xmm0
pextrw $0x5, %xmm0, %esi
shrl $0x8, %esi
testb $0x1, %sil
je 0xc9830
movb $0x1, 0x5c(%rax,%rdx)
movdqa %xmm2, %xmm0
pxor %xmm9, %xmm0
movdqa %xmm0, %xmm11
pcmpgtd %xmm12, %xmm11
pshufd $0xa0, %xmm11, %xmm14   # xmm14 = xmm11[0,0,2,2]
pshuflw $0xe8, %xmm14, %xmm15   # xmm15 = xmm14[0,2,2,3,4,5,6,7]
pcmpeqd %xmm12, %xmm0
pshufd $0xf5, %xmm0, %xmm13    # xmm13 = xmm0[1,1,3,3]
pshuflw $0xe8, %xmm13, %xmm0    # xmm0 = xmm13[0,2,2,3,4,5,6,7]
pand %xmm15, %xmm0
pshufd $0xf5, %xmm11, %xmm15   # xmm15 = xmm11[1,1,3,3]
pshuflw $0xe8, %xmm15, %xmm11   # xmm11 = xmm15[0,2,2,3,4,5,6,7]
por %xmm0, %xmm11
pxor %xmm10, %xmm11
packssdw %xmm11, %xmm0
packsswb %xmm0, %xmm0
pextrw $0x6, %xmm0, %esi
testb $0x1, %sil
je 0xc9894
movb $0x1, 0x64(%rax,%rdx)
pand %xmm14, %xmm13
por %xmm15, %xmm13
packssdw %xmm13, %xmm13
pxor %xmm10, %xmm13
packssdw %xmm13, %xmm0
packsswb %xmm0, %xmm0
pextrw $0x6, %xmm0, %esi
shrl $0x8, %esi
testb $0x1, %sil
je 0xc98c4
movb $0x1, 0x6c(%rax,%rdx)
movdqa %xmm1, %xmm0
pxor %xmm9, %xmm0
movdqa %xmm0, %xmm11
pcmpgtd %xmm12, %xmm11
pshufd $0xa0, %xmm11, %xmm13   # xmm13 = xmm11[0,0,2,2]
pcmpeqd %xmm12, %xmm0
pshufd $0xf5, %xmm0, %xmm12    # xmm12 = xmm0[1,1,3,3]
movdqa %xmm12, %xmm0
pand %xmm13, %xmm0
pshufd $0xf5, %xmm11, %xmm14   # xmm14 = xmm11[1,1,3,3]
por %xmm14, %xmm0
packssdw %xmm0, %xmm0
pxor %xmm10, %xmm0
packssdw %xmm0, %xmm0
packsswb %xmm0, %xmm0
pextrw $0x7, %xmm0, %esi
testb $0x1, %sil
je 0xc991e
movb $0x1, 0x74(%rax,%rdx)
pshufhw $0x84, %xmm13, %xmm0    # xmm0 = xmm13[0,1,2,3,4,5,4,6]
pshufhw $0x84, %xmm12, %xmm11   # xmm11 = xmm12[0,1,2,3,4,5,4,6]
pand %xmm0, %xmm11
pshufhw $0x84, %xmm14, %xmm0    # xmm0 = xmm14[0,1,2,3,4,5,4,6]
por %xmm11, %xmm0
pxor %xmm10, %xmm0
packssdw %xmm0, %xmm0
packsswb %xmm0, %xmm0
pextrw $0x7, %xmm0, %esi
shrl $0x8, %esi
testb $0x1, %sil
je 0xc995a
movb $0x1, 0x7c(%rax,%rdx)
movdqa 0x16c3be(%rip), %xmm0   # 0x235d20
paddq %xmm0, %xmm8
paddq %xmm0, %xmm7
paddq %xmm0, %xmm6
paddq %xmm0, %xmm5
paddq %xmm0, %xmm4
paddq %xmm0, %xmm3
paddq %xmm0, %xmm2
paddq %xmm0, %xmm1
subq $-0x80, %rdx
cmpq %rdx, %rcx
jne 0xc94a7
movq 0x8(%rsp), %rax
movq (%rax), %rax
movq 0x18(%rax), %rdx
movl 0x14(%rdx), %ecx
andq $0x7fffffff, %rcx       # imm = 0x7FFFFFFF
je 0xc9a04
movq 0x20(%rdx), %rdx
xorl %esi, %esi
cmpl $0x0, (%rdx,%rsi,8)
js 0xc99fc
movb 0x4(%rdx,%rsi,8), %dil
cmpb $0x1, %dil
je 0xc99fc
movq 0x10(%rax), %r8
leaq (%rsi,%rsi,4), %r9
cmpl $0x0, 0xc(%r8,%r9,8)
je 0xc99fc
leaq (%r8,%r9,8), %r9
movl 0x10(%r9), %r8d
testq %r8, %r8
je 0xc99fc
movq 0x18(%r9), %r9
movq 0x20(%r15), %r10
xorl %r11d, %r11d
movq (%r9,%r11,8), %rbx
shrq $0x21, %rbx
movb %dil, 0x4(%r10,%rbx,8)
incq %r11
cmpq %r11, %r8
jne 0xc99e7
incq %rsi
cmpq %rcx, %rsi
jne 0xc99ae
movl 0x14(%r15), %eax
andq $0x7fffffff, %rax       # imm = 0x7FFFFFFF
je 0xc9b0d
xorl %ecx, %ecx
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
movq 0x20(%r15), %rsi
cmpb $0x1, 0x4(%rsi,%rcx,8)
jne 0xc9b01
leaq (%rcx,%rcx), %rsi
movb $0x1, %dil
xorl %r8d, %r8d
orq %rsi, %r8
movq 0x28(%r15), %r9
movq (%r9,%r8,8), %r10
movq %r10, %r9
andq %rdx, %r9
je 0xc9aec
shrq $0x20, %r10
leaq (%r10,%r10,2), %r10
shlq $0x3, %r10
addq 0x8(%r15), %r10
xorl %r11d, %r11d
leaq (%r11,%r11,2), %r14
movl 0xc(%r10,%r14,8), %ebx
testl %ebx, %ebx
js 0xc9ae0
leaq (%r10,%r14,8), %r12
movq 0x20(%r15), %rbp
movl 0x8(%r12), %r13d
movl %r13d, %r14d
shrl %r14d
cmpb $0x1, 0x4(%rbp,%r14,8)
je 0xc9ae0
orl $0x80000000, %ebx       # imm = 0x80000000
movl %ebx, 0xc(%r12)
xorq $0x1, %r13
movq 0x28(%r15), %rbx
movq (%rbx,%r13,8), %r14
movq %r14, %rbx
andq %rdx, %rbx
je 0xc9ae0
movq 0x8(%r15), %r12
shrq $0x20, %r14
shlq $0x3, %rbx
leaq (%rbx,%rbx,2), %rbx
leaq (%r14,%r14,2), %r14
leaq (%r12,%r14,8), %r14
addq $0xc, %r14
xorl %r12d, %r12d
movl -0x4(%r14,%r12), %ebp
xorl %r8d, %ebp
cmpl $0x1, %ebp
jne 0xc9ad7
orb $-0x80, 0x3(%r14,%r12)
addq $0x18, %r12
cmpq %r12, %rbx
jne 0xc9ac4
incq %r11
cmpq %r9, %r11
jne 0xc9a5e
movl $0x1, %r8d
testb $0x1, %dil
movl $0x0, %edi
jne 0xc9a34
incq %rcx
cmpq %rax, %rcx
jne 0xc9a1b
leaq 0x1cbc44(%rip), %rax    # 0x295758
movl 0x13c(%rax), %ecx
cmpl $0xfffffc00, %ecx       # imm = 0xFFFFFC00
jne 0xc9b40
leaq 0x54(%rsp), %rbx
movq %rbx, %rdi
callq 0x1077f
movl (%rbx), %ecx
movq 0xb8(%rsp), %r13
movq 0x10(%rsp), %rbx
jmp 0xc9b5d
movl 0x140(%rax), %r8d
cmpl $0x7fffffff, %r8d       # imm = 0x7FFFFFFF
movq 0xb8(%rsp), %r13
movq 0x10(%rsp), %rbx
jne 0xc9b7e
movq 0x1cb47c(%rip), %rax    # 0x294fe0
movq (%rax), %rdi
leaq 0x16db53(%rip), %rsi    # 0x2376c1
leaq 0x16ef65(%rip), %rdx    # 0x238ada
xorl %eax, %eax
callq 0x22b0
jmp 0xc9b9d
movq 0x1cb45b(%rip), %rax    # 0x294fe0
movq (%rax), %rdi
leaq 0x16daee(%rip), %rsi    # 0x23767d
leaq 0x16ef44(%rip), %rdx    # 0x238ada
xorl %eax, %eax
callq 0x22b0
movq 0xa8(%rbx), %r9
movq 0x8(%rsp), %rdi
movq %r15, %rsi
movq 0x18(%rsp), %rdx
movq 0x20(%rsp), %rcx
movq 0x98(%rsp), %r8
callq 0xf2e09
testq %r13, %r13
jne 0xc923f
leaq 0x48(%rsp), %rdi
callq 0xc9bdb
jmp 0xc9243