// File: /workspace/github_c_makefile_star2_O0/c-zhou[P]oatk/path.c
// Function: print_seq
void print_seq(asg_t *asg, path_t *path, FILE *fo, int id, int force_linear, int line_wd, int gap_size)
{
    uint32_t i, n, v, lo, cov, n_gap;
    uint64_t l;
    asmg_t *g;
    asmg_arc_t *a;
    
    n = path->nv;
    if (n == 0) return;

    for (i = 0; i < n; ++i) {
        v = path->v[i];
        if (!asg->seg[v>>1].seq) {
            fprintf(stderr, "[E::%s] cannot make FASTA output: sequence not included in the GFA file\n", __func__);
            return;
        }
    }

    g = asg->asmg;
    lo = 0;
    cov = 0;
    if (path->circ && force_linear) {
        a = asmg_arc1(g, path->v[n-1], path->v[0]);
        assert(!!a);
        lo = a->ls;
        cov = g->vtx[path->v[0]>>1].cov;
    }
    
    if (path->sid)
        fprintf(fo, ">%s\tlength=%u wlength=%.1f nv=%u circular=%s path=%s%c", path->sid, path->len + lo, path->wlen + (double) cov * lo,
                path->nv, (force_linear || !path->circ)? "false" : "true", asg->seg[path->v[0]>>1].name, "+-"[path->v[0]&1]);
    else
        fprintf(fo, ">ctg%06d%c\tlength=%u wlength=%.1f nv=%u circular=%s path=%s%c", id, (force_linear || !path->circ)? 'l' : 'c', 
                path->len + lo, path->wlen + (double) cov * lo, path->nv, (force_linear || !path->circ)? "false" : "true", 
                asg->seg[path->v[0]>>1].name, "+-"[path->v[0]&1]);

    for (i = 1; i < n; ++i)
        fprintf(fo, ",%s%c", asg->seg[path->v[i]>>1].name, "+-"[path->v[i]&1]);
    fprintf(fo, "\n");

    l = 0;
    v = path->v[0];
    lo = (force_linear || !path->circ)? 0 : asmg_arc1(g, path->v[n-1], v)->ls;
    put_chars(asg->seg[v>>1].seq, asg->seg[v>>1].len, v&1, lo, fo, &l, line_wd);

    n_gap = 0;
    for (i = 1; i < n; ++i) {
        v = path->v[i];
        a = asmg_arc1(g, path->v[i-1], v);
        if (!!a) {
            put_chars(asg->seg[v>>1].seq, asg->seg[v>>1].len, v&1, a->ls, fo, &l, line_wd);
        } else {
            make_gap(fo, &l, line_wd, gap_size);
            put_chars(asg->seg[v>>1].seq, asg->seg[v>>1].len, v&1, 0, fo, &l, line_wd);
            ++n_gap;
        }
    }

    if (!path->circ || !force_linear)
        assert(l - (uint64_t) n_gap * gap_size == path->len);
    if (l % line_wd != 0)
        fputc('\n', fo);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xd0, %rsp
movl 0x10(%rbp), %eax
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movl %ecx, -0x1c(%rbp)
movl %r8d, -0x20(%rbp)
movl %r9d, -0x24(%rbp)
movq -0x10(%rbp), %rax
movl 0x8(%rax), %eax
andl $0x3fffffff, %eax       # imm = 0x3FFFFFFF
movl %eax, -0x2c(%rbp)
cmpl $0x0, -0x2c(%rbp)
jne 0xa0af
jmp 0xa72d
movl $0x0, -0x28(%rbp)
movl -0x28(%rbp), %eax
cmpl -0x2c(%rbp), %eax
jae 0xa11d
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movl -0x28(%rbp), %ecx
movl (%rax,%rcx,4), %eax
movl %eax, -0x30(%rbp)
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movl -0x30(%rbp), %ecx
shrl %ecx
movl %ecx, %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
cmpq $0x0, 0x8(%rax)
jne 0xa110
movq 0x1ff05(%rip), %rax     # 0x29ff8
movq (%rax), %rdi
leaq 0x196b5(%rip), %rsi     # 0x237b2
leaq 0x196f7(%rip), %rdx     # 0x237fb
movb $0x0, %al
callq 0x2290
jmp 0xa72d
jmp 0xa112
movl -0x28(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x28(%rbp)
jmp 0xa0b6
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rax
movq %rax, -0x50(%rbp)
movl $0x0, -0x34(%rbp)
movl $0x0, -0x38(%rbp)
movq -0x10(%rbp), %rax
movl 0x8(%rax), %eax
shrl $0x1e, %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0xa1e0
cmpl $0x0, -0x20(%rbp)
je 0xa1e0
movq -0x50(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movl -0x2c(%rbp), %ecx
subl $0x1, %ecx
movl %ecx, %ecx
movl (%rax,%rcx,4), %eax
movl %eax, %esi
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movl (%rax), %eax
movl %eax, %edx
callq 0x8370
movq %rax, -0x58(%rbp)
cmpq $0x0, -0x58(%rbp)
je 0xa18e
jmp 0xa1ad
leaq 0x19538(%rip), %rdi     # 0x236cd
leaq 0x19409(%rip), %rsi     # 0x235a5
movl $0x73c, %edx            # imm = 0x73C
leaq 0x1965d(%rip), %rcx     # 0x23805
callq 0x21a0
movq -0x58(%rbp), %rax
movq 0x18(%rax), %rax
movl %eax, -0x34(%rbp)
movq -0x50(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x10(%rbp), %rcx
movq 0x10(%rcx), %rcx
movl (%rcx), %ecx
shrl %ecx
movl %ecx, %ecx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movl 0x20(%rax), %eax
andl $0x3fffffff, %eax       # imm = 0x3FFFFFFF
movl %eax, -0x38(%rbp)
movq -0x10(%rbp), %rax
cmpq $0x0, (%rax)
je 0xa2e4
movq -0x18(%rbp), %rax
movq %rax, -0x80(%rbp)
movq -0x10(%rbp), %rcx
movq (%rcx), %rax
movq %rax, -0x78(%rbp)
movl 0x18(%rcx), %edx
movl -0x34(%rbp), %eax
movl %eax, %esi
addl %esi, %edx
movl %edx, -0x6c(%rbp)
movsd 0x20(%rcx), %xmm1
movl -0x38(%rbp), %ecx
cvtsi2sd %rcx, %xmm0
cvtsi2sd %rax, %xmm2
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, -0x68(%rbp)
movq -0x10(%rbp), %rax
movl 0x8(%rax), %eax
andl $0x3fffffff, %eax       # imm = 0x3FFFFFFF
movl %eax, -0x60(%rbp)
movb $0x1, %al
cmpl $0x0, -0x20(%rbp)
movb %al, -0x59(%rbp)
jne 0xa25f
movq -0x10(%rbp), %rax
movl 0x8(%rax), %eax
shrl $0x1e, %eax
andl $0x1, %eax
cmpl $0x0, %eax
setne %al
xorb $-0x1, %al
movb %al, -0x59(%rbp)
movl -0x60(%rbp), %r8d
movsd -0x68(%rbp), %xmm0
movl -0x6c(%rbp), %ecx
movq -0x78(%rbp), %rdx
movq -0x80(%rbp), %rdi
movb -0x59(%rbp), %sil
leaq 0x19602(%rip), %r9      # 0x23880
leaq 0x195f5(%rip), %rax     # 0x2387a
testb $0x1, %sil
cmovneq %rax, %r9
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x10(%rbp), %rsi
movq 0x10(%rsi), %rsi
movl (%rsi), %esi
shrl %esi
movl %esi, %esi
imulq $0x18, %rsi, %rsi
addq %rsi, %rax
movq (%rax), %r10
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movl (%rax), %eax
andl $0x1, %eax
movl %eax, %eax
movl %eax, %esi
leaq 0x194b7(%rip), %rax     # 0x2377c
movsbl (%rax,%rsi), %eax
leaq 0x19573(%rip), %rsi     # 0x23843
movq %r10, (%rsp)
movl %eax, 0x8(%rsp)
movb $0x1, %al
callq 0x2290
jmp 0xa447
movq -0x18(%rbp), %rax
movq %rax, -0x90(%rbp)
movl -0x1c(%rbp), %eax
movl %eax, -0x88(%rbp)
movb $0x1, %al
cmpl $0x0, -0x20(%rbp)
movb %al, -0x81(%rbp)
jne 0xa321
movq -0x10(%rbp), %rax
movl 0x8(%rax), %eax
shrl $0x1e, %eax
andl $0x1, %eax
cmpl $0x0, %eax
setne %al
xorb $-0x1, %al
movb %al, -0x81(%rbp)
movb -0x81(%rbp), %al
movzbl %al, %ecx
andl $0x1, %ecx
movl %ecx, %eax
leal 0x63(%rax,%rax,8), %eax
movl %eax, -0xa8(%rbp)
movq -0x10(%rbp), %rcx
movl 0x18(%rcx), %edx
movl -0x34(%rbp), %eax
movl %eax, %esi
addl %esi, %edx
movl %edx, -0xa4(%rbp)
movsd 0x20(%rcx), %xmm1
movl -0x38(%rbp), %ecx
cvtsi2sd %rcx, %xmm0
cvtsi2sd %rax, %xmm2
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, -0xa0(%rbp)
movq -0x10(%rbp), %rax
movl 0x8(%rax), %eax
andl $0x3fffffff, %eax       # imm = 0x3FFFFFFF
movl %eax, -0x98(%rbp)
movb $0x1, %al
cmpl $0x0, -0x20(%rbp)
movb %al, -0x91(%rbp)
jne 0xa3aa
movq -0x10(%rbp), %rax
movl 0x8(%rax), %eax
shrl $0x1e, %eax
andl $0x1, %eax
cmpl $0x0, %eax
setne %al
xorb $-0x1, %al
movb %al, -0x91(%rbp)
movl -0x98(%rbp), %r9d
movsd -0xa0(%rbp), %xmm0
movl -0xa4(%rbp), %r8d
movl -0xa8(%rbp), %ecx
movl -0x88(%rbp), %edx
movq -0x90(%rbp), %rdi
movb -0x91(%rbp), %sil
leaq 0x1949f(%rip), %r11     # 0x23880
leaq 0x19492(%rip), %rax     # 0x2387a
testb $0x1, %sil
cmovneq %rax, %r11
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x10(%rbp), %rsi
movq 0x10(%rsi), %rsi
movl (%rsi), %esi
shrl %esi
movl %esi, %esi
imulq $0x18, %rsi, %rsi
addq %rsi, %rax
movq (%rax), %r10
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movl (%rax), %eax
andl $0x1, %eax
movl %eax, %eax
movl %eax, %esi
leaq 0x19354(%rip), %rax     # 0x2377c
movsbl (%rax,%rsi), %eax
leaq 0x19452(%rip), %rsi     # 0x23885
movq %r11, (%rsp)
movq %r10, 0x8(%rsp)
movl %eax, 0x10(%rsp)
movb $0x1, %al
callq 0x2290
movl $0x1, -0x28(%rbp)
movl -0x28(%rbp), %eax
cmpl -0x2c(%rbp), %eax
jae 0xa4b7
movq -0x18(%rbp), %rdi
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x10(%rbp), %rcx
movq 0x10(%rcx), %rcx
movl -0x28(%rbp), %edx
movl (%rcx,%rdx,4), %ecx
shrl %ecx
movl %ecx, %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq (%rax), %rdx
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movl -0x28(%rbp), %ecx
movl (%rax,%rcx,4), %eax
andl $0x1, %eax
movl %eax, %eax
movl %eax, %ecx
leaq 0x192e2(%rip), %rax     # 0x2377c
movsbl (%rax,%rcx), %ecx
leaq 0x19307(%rip), %rsi     # 0x237ac
movb $0x0, %al
callq 0x2290
movl -0x28(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x28(%rbp)
jmp 0xa44e
movq -0x18(%rbp), %rdi
leaq 0x18dde(%rip), %rsi     # 0x232a0
movb $0x0, %al
callq 0x2290
movq $0x0, -0x48(%rbp)
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movl (%rax), %eax
movl %eax, -0x30(%rbp)
cmpl $0x0, -0x20(%rbp)
jne 0xa4f6
movq -0x10(%rbp), %rax
movl 0x8(%rax), %eax
shrl $0x1e, %eax
andl $0x1, %eax
cmpl $0x0, %eax
jne 0xa501
xorl %eax, %eax
movq %rax, -0xb0(%rbp)
jmp 0xa52f
movq -0x50(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movl -0x2c(%rbp), %ecx
subl $0x1, %ecx
movl %ecx, %ecx
movl (%rax,%rcx,4), %eax
movl %eax, %esi
movl -0x30(%rbp), %eax
movl %eax, %edx
callq 0x8370
movq 0x18(%rax), %rax
movq %rax, -0xb0(%rbp)
movq -0xb0(%rbp), %rax
movl %eax, -0x34(%rbp)
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movl -0x30(%rbp), %ecx
shrl %ecx
movl %ecx, %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq 0x8(%rax), %rdi
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movl -0x30(%rbp), %ecx
shrl %ecx
movl %ecx, %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movl 0x10(%rax), %esi
movl -0x30(%rbp), %edx
andl $0x1, %edx
movl -0x34(%rbp), %ecx
movq -0x18(%rbp), %r8
movl -0x24(%rbp), %eax
leaq -0x48(%rbp), %r9
movl %eax, (%rsp)
callq 0xa740
movl $0x0, -0x3c(%rbp)
movl $0x1, -0x28(%rbp)
movl -0x28(%rbp), %eax
cmpl -0x2c(%rbp), %eax
jae 0xa6b3
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movl -0x28(%rbp), %ecx
movl (%rax,%rcx,4), %eax
movl %eax, -0x30(%rbp)
movq -0x50(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movl -0x28(%rbp), %ecx
subl $0x1, %ecx
movl %ecx, %ecx
movl (%rax,%rcx,4), %eax
movl %eax, %esi
movl -0x30(%rbp), %eax
movl %eax, %edx
callq 0x8370
movq %rax, -0x58(%rbp)
cmpq $0x0, -0x58(%rbp)
je 0xa639
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movl -0x30(%rbp), %ecx
shrl %ecx
movl %ecx, %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq 0x8(%rax), %rdi
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movl -0x30(%rbp), %ecx
shrl %ecx
movl %ecx, %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movl 0x10(%rax), %esi
movl -0x30(%rbp), %edx
andl $0x1, %edx
movq -0x58(%rbp), %rax
movq 0x18(%rax), %rax
movl %eax, %ecx
movq -0x18(%rbp), %r8
movl -0x24(%rbp), %eax
leaq -0x48(%rbp), %r9
movl %eax, (%rsp)
callq 0xa740
jmp 0xa6a3
movq -0x18(%rbp), %rdi
movl -0x24(%rbp), %edx
movl 0x10(%rbp), %ecx
leaq -0x48(%rbp), %rsi
callq 0xa840
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movl -0x30(%rbp), %ecx
shrl %ecx
movl %ecx, %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq 0x8(%rax), %rdi
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movl -0x30(%rbp), %ecx
shrl %ecx
movl %ecx, %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movl 0x10(%rax), %esi
movl -0x30(%rbp), %edx
andl $0x1, %edx
movq -0x18(%rbp), %r8
movl -0x24(%rbp), %eax
xorl %ecx, %ecx
leaq -0x48(%rbp), %r9
movl %eax, (%rsp)
callq 0xa740
movl -0x3c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x3c(%rbp)
jmp 0xa6a5
movl -0x28(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x28(%rbp)
jmp 0xa596
movq -0x10(%rbp), %rax
movl 0x8(%rax), %eax
shrl $0x1e, %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0xa6cb
cmpl $0x0, -0x20(%rbp)
jne 0xa70c
movq -0x48(%rbp), %rax
movl -0x3c(%rbp), %ecx
movslq 0x10(%rbp), %rdx
imulq %rdx, %rcx
subq %rcx, %rax
movq -0x10(%rbp), %rcx
movl 0x18(%rcx), %ecx
cmpq %rcx, %rax
jne 0xa6eb
jmp 0xa70a
leaq 0x191d1(%rip), %rdi     # 0x238c3
leaq 0x18eac(%rip), %rsi     # 0x235a5
movl $0x760, %edx            # imm = 0x760
leaq 0x19100(%rip), %rcx     # 0x23805
callq 0x21a0
jmp 0xa70c
movq -0x48(%rbp), %rax
movslq -0x24(%rbp), %rcx
xorl %edx, %edx
divq %rcx
cmpq $0x0, %rdx
je 0xa72d
movq -0x18(%rbp), %rsi
movl $0xa, %edi
callq 0x2210
addq $0xd0, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)