// File: chhylp123[P]hifiasm/rcut.cpp
// Function: load_asg_t(asg_t*, _IO_FILE*)
void load_asg_t(asg_t *g, FILE *fp)
{
	uint32_t tmp, Len;
    fread(&tmp, sizeof(tmp), 1, fp);
	g->n_arc = g->m_arc = tmp;

    fread(&tmp, sizeof(tmp), 1, fp);
	g->is_srt = tmp;

    fread(&tmp, sizeof(tmp), 1, fp);
	g->n_seq = g->m_seq = tmp;
    
    fread(&tmp, sizeof(tmp), 1, fp);
	g->is_symm = tmp;

    fread(&tmp, sizeof(tmp), 1, fp);
	g->r_seq = tmp;

    // Len = g->n_seq*2;
    // fwrite(g->seq_vis, sizeof((*(g->seq_vis))), Len, fp);

    Len = g->n_seq*2;
	CALLOC(g->idx, Len); fread(g->idx, sizeof((*(g->idx))), Len, fp);
	CALLOC(g->arc, g->n_arc); fread(g->arc, sizeof((*(g->arc))), g->n_arc, fp);
	CALLOC(g->seq, g->n_seq); fread(g->seq, sizeof((*(g->seq))), g->n_seq, fp);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rcx
leaq -0x14(%rbp), %rdi
movl $0x4, %esi
movl $0x1, %edx
callq 0x22e0
movl -0x14(%rbp), %edx
movq -0x8(%rbp), %rax
movl %edx, (%rax)
movq -0x8(%rbp), %rax
movl 0x4(%rax), %ecx
andl $0x7fffffff, %edx       # imm = 0x7FFFFFFF
andl $0x80000000, %ecx       # imm = 0x80000000
orl %edx, %ecx
movl %ecx, 0x4(%rax)
movq -0x10(%rbp), %rcx
leaq -0x14(%rbp), %rdi
movl $0x4, %esi
movl $0x1, %edx
callq 0x22e0
movl -0x14(%rbp), %edx
movq -0x8(%rbp), %rax
movl 0x4(%rax), %ecx
andl $0x1, %edx
shll $0x1f, %edx
andl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
orl %edx, %ecx
movl %ecx, 0x4(%rax)
movq -0x10(%rbp), %rcx
leaq -0x14(%rbp), %rdi
movl $0x4, %esi
movl $0x1, %edx
callq 0x22e0
movl -0x14(%rbp), %edx
movq -0x8(%rbp), %rax
movl %edx, 0x10(%rax)
movq -0x8(%rbp), %rax
movl 0x14(%rax), %ecx
andl $0x7fffffff, %edx       # imm = 0x7FFFFFFF
andl $0x80000000, %ecx       # imm = 0x80000000
orl %edx, %ecx
movl %ecx, 0x14(%rax)
movq -0x10(%rbp), %rcx
leaq -0x14(%rbp), %rdi
movl $0x4, %esi
movl $0x1, %edx
callq 0x22e0
movl -0x14(%rbp), %edx
movq -0x8(%rbp), %rax
movl 0x14(%rax), %ecx
andl $0x1, %edx
shll $0x1f, %edx
andl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
orl %edx, %ecx
movl %ecx, 0x14(%rax)
movq -0x10(%rbp), %rcx
leaq -0x14(%rbp), %rdi
movl $0x4, %esi
movl $0x1, %edx
callq 0x22e0
movl -0x14(%rbp), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x18(%rax)
movq -0x8(%rbp), %rax
movl 0x14(%rax), %eax
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
shll %eax
movl %eax, -0x18(%rbp)
movl -0x18(%rbp), %eax
movl %eax, %edi
movl $0x8, %esi
callq 0x2140
movq %rax, %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x28(%rax)
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rdi
movl -0x18(%rbp), %eax
movl %eax, %edx
movq -0x10(%rbp), %rcx
movl $0x8, %esi
callq 0x22e0
movq -0x8(%rbp), %rax
movl 0x4(%rax), %eax
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
movl %eax, %eax
movl %eax, %edi
movl $0x18, %esi
callq 0x2140
movq %rax, %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rdi
movq -0x8(%rbp), %rax
movl 0x4(%rax), %eax
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
movl %eax, %eax
movl %eax, %edx
movq -0x10(%rbp), %rcx
movl $0x18, %esi
callq 0x22e0
movq -0x8(%rbp), %rax
movl 0x14(%rax), %eax
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
movl %eax, %eax
movl %eax, %edi
movl $0x8, %esi
callq 0x2140
movq %rax, %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x20(%rax)
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rdi
movq -0x8(%rbp), %rax
movl 0x14(%rax), %eax
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
movl %eax, %eax
movl %eax, %edx
movq -0x10(%rbp), %rcx
movl $0x8, %esi
callq 0x22e0
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)