// File: /workspace/github_c_makefile_star2_O1/c-zhou[P]oatk/syncasm.c
// Function: scg_print
void scg_print(scg_t *g, FILE *fo, int no_seq)
{    
    uint64_t i, n;
    int l, c;
    char *s;
    asmg_t *asmg;
    asmg_vtx_t *vtx;
    asmg_arc_t *arc;

    asmg = g->utg_asmg;

    fprintf(fo, "H\tVN:Z:1.0\n");
    for (i = 0, n = asmg->n_vtx; i < n; ++i) {
        vtx = &asmg->vtx[i];
        if (vtx->del) continue;
        l = vtx->len;
        s = vtx->seq;
        c = vtx->cov;
        if (s && (!no_seq)) 
            fprintf(fo, "S\tu%lu\t%.*s\tLN:i:%d\tKC:i:%ld\tSC:f:%.3f\n", i, l, s, l, (int64_t) l * c, (double) c);
        else
            fprintf(fo, "S\tu%lu\t*\tLN:i:%d\tKC:i:%ld\tSC:f:%.3f\n", i, l, (int64_t) l * c, (double) c);
    }

    for (i = 0, n = asmg->n_arc; i < n; ++i) {
        arc = &asmg->arc[i];
        if (arc->del || arc->comp) continue;
        fprintf(fo, "L\tu%lu\t%c\tu%lu\t%c\t%ldM\tEC:i:%u\n", arc->v>>1, "+-"[arc->v&1], arc->w>>1, "+-"[arc->w&1], arc->ls, arc->cov);
        fprintf(fo, "L\tu%lu\t%c\tu%lu\t%c\t%ldM\tEC:i:%u\n", arc->w>>1, "-+"[arc->w&1], arc->v>>1, "-+"[arc->v&1], arc->ls, arc->cov);
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %edx, %ebp
movq %rsi, %rbx
movq 0x8(%rdi), %r13
leaq 0x16dc5(%rip), %rdi     # 0x1d921
movl $0xb, %esi
movl $0x1, %edx
movq %rbx, %rcx
callq 0x2470
movq (%r13), %r15
testq %r15, %r15
je 0x6bff
movl $0x20, %r12d
xorl %r14d, %r14d
movq 0x10(%r13), %rax
movl (%rax,%r12), %edx
btl $0x1e, %edx
jb 0x6bf3
movq -0x8(%rax,%r12), %rcx
andl $0x3fffffff, %edx       # imm = 0x3FFFFFFF
movslq %ecx, %r10
imulq %rdx, %r10
xorps %xmm0, %xmm0
cvtsi2sd %edx, %xmm0
testl %ebp, %ebp
jne 0x6bdc
movq -0x10(%rax,%r12), %r8
testq %r8, %r8
je 0x6bdc
subq $0x8, %rsp
movq %rbx, %rdi
leaq 0x16db5(%rip), %rsi     # 0x1d97c
movq %r14, %rdx
movl %ecx, %r9d
movb $0x1, %al
pushq %r10
callq 0x2290
addq $0x10, %rsp
jmp 0x6bf3
movq %rbx, %rdi
leaq 0x16dbe(%rip), %rsi     # 0x1d9a4
movq %r14, %rdx
movq %r10, %r8
movb $0x1, %al
callq 0x2290
incq %r14
addq $0x28, %r12
cmpq %r14, %r15
jne 0x6b84
movq 0x18(%r13), %r15
testq %r15, %r15
je 0x6ccf
movl $0x20, %r12d
movq 0x28(%r13), %r14
movl (%r14,%r12), %r10d
cmpl $0x3fffffff, %r10d      # imm = 0x3FFFFFFF
ja 0x6cc2
movq -0x20(%r14,%r12), %rax
movq -0x18(%r14,%r12), %rsi
movq %rax, %rdx
shrq %rdx
andl $0x1, %eax
leaq 0x16d35(%rip), %rdi     # 0x1d976
movsbl (%rax,%rdi), %ecx
movq %rsi, %r8
shrq %r8
andl $0x1, %esi
movsbl (%rsi,%rdi), %r9d
movq %rbx, %rdi
leaq 0x16cf9(%rip), %rbp     # 0x1d956
movq %rbp, %rsi
xorl %eax, %eax
pushq %r10
pushq -0x8(%r14,%r12)
callq 0x2290
addq $0x10, %rsp
movq -0x20(%r14,%r12), %rax
movq -0x18(%r14,%r12), %rcx
movq %rcx, %rdx
shrq %rdx
andl $0x1, %ecx
leaq 0x16ced(%rip), %rsi     # 0x1d979
movsbl (%rcx,%rsi), %ecx
movq %rax, %r8
shrq %r8
andl $0x1, %eax
movsbl (%rax,%rsi), %r9d
movl (%r14,%r12), %r10d
movl $0x3fffffff, %eax       # imm = 0x3FFFFFFF
andl %eax, %r10d
movq %rbx, %rdi
movq %rbp, %rsi
xorl %eax, %eax
pushq %r10
pushq -0x8(%r14,%r12)
callq 0x2290
addq $0x10, %rsp
addq $0x30, %r12
decq %r15
jne 0x6c12
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq