// File: chhylp123[P]hifiasm/gfa_ut.cpp
// Function: append_unmatch_integer_seq(poa_g_t*, ma_ug_t*, uc_block_t*, ul_str_t*, long, long, long, long)
void append_unmatch_integer_seq(poa_g_t *g, ma_ug_t *ug, uc_block_t *raw, ul_str_t *str, int64_t s, int64_t e, int64_t is_rev, int64_t str_id)
{
    int64_t k; poa_nid_t *nn; poa_arc_t *ae; uint32_t v; uc_block_t *z; emap_t *em;
    for (k = s; k < e; k++) {
        if(is_rev) {
            v = (((uint32_t)str->a[str->cn-k-1])^1);
            z = &(raw[str->a[str->cn-k-1]>>32]);
        }
        else {
            v = ((uint32_t)str->a[k]); z = &(raw[str->a[k]>>32]);
        }
        kv_pushp(poa_nid_t, g->seq, &nn);
        nn->nid = v; nn->occ = ug_occ_w(z->ts, z->te, &(ug->u.a[z->hid])); 
        
        // ug->u.a[v>>1].n;
        if(k > s) {
            kv_pushp(poa_arc_t, g->arc, &ae);
            ae->ul = g->seq.n-1; ae->ul <<= 33; ae->ul += ((uint64_t)(0x100000000)); ae->ul += 1;
            ae->v = g->seq.n-2; ae->v <<= 1; ae->v += 1;

            kv_pushp(poa_arc_t, g->arc, &ae);
            ae->ul = g->seq.n-2; ae->ul <<= 33; ae->ul += 1;
            ae->v = g->seq.n-1; ae->v <<= 1;

            kv_pushp(emap_t, g->e_idx, &em);
            em->pge = g->seq.n-2; em->pge <<= 32; em->pge += g->seq.n-1;
            em->ule = (is_rev?(str->cn-k):(k-1)); em->ule <<= 32; em->ule += (is_rev?(str->cn-k-1):(k));
            em->ulid = str_id;
            // assert((g->seq.a[em->pge>>32].nid^(is_rev?1:0)) == ((uint32_t)str->a[em->ule>>32]));
            // assert((g->seq.a[(uint32_t)em->pge].nid^(is_rev?1:0)) == ((uint32_t)str->a[(uint32_t)em->ule]));
        }
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x90, %rsp
movq 0x18(%rbp), %rax
movq 0x10(%rbp), %rax
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq %r9, -0x30(%rbp)
movq -0x28(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
cmpq -0x30(%rbp), %rax
jge 0x32f53c
cmpq $0x0, 0x10(%rbp)
je 0x32f0b9
movq -0x20(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x20(%rbp), %rcx
movl 0x18(%rcx), %ecx
andl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
movl %ecx, %ecx
subq -0x38(%rbp), %rcx
subq $0x1, %rcx
movq (%rax,%rcx,8), %rax
xorl $0x1, %eax
movl %eax, -0x4c(%rbp)
movq -0x18(%rbp), %rax
movq -0x20(%rbp), %rcx
movq 0x10(%rcx), %rcx
movq -0x20(%rbp), %rdx
movl 0x18(%rdx), %edx
andl $0x7fffffff, %edx       # imm = 0x7FFFFFFF
movl %edx, %edx
subq -0x38(%rbp), %rdx
subq $0x1, %rdx
movq (%rcx,%rdx,8), %rcx
shrq $0x20, %rcx
imulq $0x24, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x58(%rbp)
jmp 0x32f0ef
movq -0x20(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x38(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movl %eax, -0x4c(%rbp)
movq -0x18(%rbp), %rax
movq -0x20(%rbp), %rcx
movq 0x10(%rcx), %rcx
movq -0x38(%rbp), %rdx
movq (%rcx,%rdx,8), %rcx
shrq $0x20, %rcx
imulq $0x24, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x58(%rbp)
jmp 0x32f0f1
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq -0x8(%rbp), %rcx
cmpq 0x8(%rcx), %rax
jne 0x32f159
movq -0x8(%rbp), %rax
cmpq $0x0, 0x8(%rax)
je 0x32f11e
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
shlq %rax
movq %rax, -0x68(%rbp)
jmp 0x32f129
movl $0x2, %eax
movq %rax, -0x68(%rbp)
jmp 0x32f129
movq -0x68(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rdi
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rsi
shlq $0x3, %rsi
callq 0x2360
movq %rax, %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x8(%rbp), %rdx
movq (%rdx), %rcx
movq %rcx, %rsi
addq $0x1, %rsi
movq %rsi, (%rdx)
shlq $0x3, %rcx
addq %rcx, %rax
movq %rax, -0x40(%rbp)
movl -0x4c(%rbp), %ecx
movq -0x40(%rbp), %rax
movl %ecx, 0x4(%rax)
movq -0x58(%rbp), %rax
movl 0xc(%rax), %eax
movl %eax, %edi
movq -0x58(%rbp), %rax
movl 0x10(%rax), %eax
movl %eax, %esi
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rdx
movq -0x58(%rbp), %rax
movl (%rax), %eax
imulq $0x28, %rax, %rax
addq %rax, %rdx
callq 0x327090
movl %eax, %ecx
movq -0x40(%rbp), %rax
movl %ecx, (%rax)
movq -0x38(%rbp), %rax
cmpq -0x28(%rbp), %rax
jle 0x32f529
jmp 0x32f1cb
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
movq -0x8(%rbp), %rcx
cmpq 0x20(%rcx), %rax
jne 0x32f234
movq -0x8(%rbp), %rax
cmpq $0x0, 0x20(%rax)
je 0x32f1f9
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rax
shlq %rax
movq %rax, -0x70(%rbp)
jmp 0x32f204
movl $0x2, %eax
movq %rax, -0x70(%rbp)
jmp 0x32f204
movq -0x70(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x20(%rax)
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rdi
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rsi
shlq $0x4, %rsi
callq 0x2360
movq %rax, %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x28(%rax)
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rax
movq -0x8(%rbp), %rdx
movq 0x18(%rdx), %rcx
movq %rcx, %rsi
addq $0x1, %rsi
movq %rsi, 0x18(%rdx)
shlq $0x4, %rcx
addq %rcx, %rax
movq %rax, -0x48(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rcx
subq $0x1, %rcx
movq -0x48(%rbp), %rax
movq %rcx, (%rax)
movq -0x48(%rbp), %rax
movq (%rax), %rcx
shlq $0x21, %rcx
movq %rcx, (%rax)
movq -0x48(%rbp), %rax
movabsq $0x100000000, %rcx      # imm = 0x100000000
addq (%rax), %rcx
movq %rcx, (%rax)
movq -0x48(%rbp), %rax
movq (%rax), %rcx
addq $0x1, %rcx
movq %rcx, (%rax)
movq -0x8(%rbp), %rax
movq (%rax), %rax
subq $0x2, %rax
movl %eax, %ecx
movq -0x48(%rbp), %rax
movl %ecx, 0x8(%rax)
movq -0x48(%rbp), %rax
movl 0x8(%rax), %ecx
shll %ecx
movl %ecx, 0x8(%rax)
movq -0x48(%rbp), %rax
movl 0x8(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x8(%rax)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
movq -0x8(%rbp), %rcx
cmpq 0x20(%rcx), %rax
jne 0x32f332
movq -0x8(%rbp), %rax
cmpq $0x0, 0x20(%rax)
je 0x32f2f7
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rax
shlq %rax
movq %rax, -0x78(%rbp)
jmp 0x32f302
movl $0x2, %eax
movq %rax, -0x78(%rbp)
jmp 0x32f302
movq -0x78(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x20(%rax)
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rdi
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rsi
shlq $0x4, %rsi
callq 0x2360
movq %rax, %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x28(%rax)
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rax
movq -0x8(%rbp), %rdx
movq 0x18(%rdx), %rcx
movq %rcx, %rsi
addq $0x1, %rsi
movq %rsi, 0x18(%rdx)
shlq $0x4, %rcx
addq %rcx, %rax
movq %rax, -0x48(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rcx
subq $0x2, %rcx
movq -0x48(%rbp), %rax
movq %rcx, (%rax)
movq -0x48(%rbp), %rax
movq (%rax), %rcx
shlq $0x21, %rcx
movq %rcx, (%rax)
movq -0x48(%rbp), %rax
movq (%rax), %rcx
addq $0x1, %rcx
movq %rcx, (%rax)
movq -0x8(%rbp), %rax
movq (%rax), %rax
subq $0x1, %rax
movl %eax, %ecx
movq -0x48(%rbp), %rax
movl %ecx, 0x8(%rax)
movq -0x48(%rbp), %rax
movl 0x8(%rax), %ecx
shll %ecx
movl %ecx, 0x8(%rax)
movq -0x8(%rbp), %rax
movq 0xc8(%rax), %rax
movq -0x8(%rbp), %rcx
cmpq 0xd0(%rcx), %rax
jne 0x32f424
movq -0x8(%rbp), %rax
cmpq $0x0, 0xd0(%rax)
je 0x32f3e0
movq -0x8(%rbp), %rax
movq 0xd0(%rax), %rax
shlq %rax
movq %rax, -0x80(%rbp)
jmp 0x32f3eb
movl $0x2, %eax
movq %rax, -0x80(%rbp)
jmp 0x32f3eb
movq -0x80(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0xd0(%rax)
movq -0x8(%rbp), %rax
movq 0xd8(%rax), %rdi
movq -0x8(%rbp), %rax
imulq $0x18, 0xd0(%rax), %rsi
callq 0x2360
movq %rax, %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0xd8(%rax)
movq -0x8(%rbp), %rax
movq 0xd8(%rax), %rax
movq -0x8(%rbp), %rdx
movq 0xc8(%rdx), %rcx
movq %rcx, %rsi
addq $0x1, %rsi
movq %rsi, 0xc8(%rdx)
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x60(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rcx
subq $0x2, %rcx
movq -0x60(%rbp), %rax
movq %rcx, (%rax)
movq -0x60(%rbp), %rax
movq (%rax), %rcx
shlq $0x20, %rcx
movq %rcx, (%rax)
movq -0x8(%rbp), %rax
movq (%rax), %rcx
subq $0x1, %rcx
movq -0x60(%rbp), %rax
addq (%rax), %rcx
movq %rcx, (%rax)
cmpq $0x0, 0x10(%rbp)
je 0x32f4aa
movq -0x20(%rbp), %rax
movl 0x18(%rax), %eax
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
movl %eax, %eax
subq -0x38(%rbp), %rax
movq %rax, -0x88(%rbp)
jmp 0x32f4b9
movq -0x38(%rbp), %rax
subq $0x1, %rax
movq %rax, -0x88(%rbp)
movq -0x88(%rbp), %rcx
movq -0x60(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x60(%rbp), %rax
movq 0x8(%rax), %rcx
shlq $0x20, %rcx
movq %rcx, 0x8(%rax)
cmpq $0x0, 0x10(%rbp)
je 0x32f4fe
movq -0x20(%rbp), %rax
movl 0x18(%rax), %eax
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
movl %eax, %eax
subq -0x38(%rbp), %rax
subq $0x1, %rax
movq %rax, -0x90(%rbp)
jmp 0x32f509
movq -0x38(%rbp), %rax
movq %rax, -0x90(%rbp)
movq -0x90(%rbp), %rcx
movq -0x60(%rbp), %rax
addq 0x8(%rax), %rcx
movq %rcx, 0x8(%rax)
movq 0x18(%rbp), %rax
movl %eax, %ecx
movq -0x60(%rbp), %rax
movl %ecx, 0x10(%rax)
jmp 0x32f52b
movq -0x38(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x38(%rbp)
jmp 0x32f043
addq $0x90, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)