// File: /workspace/github_c_makefile_star2_O0/lh3[P]minigraph/gfa-ed.c
// Function: gfa_ed_init
void *gfa_ed_init(void *km, const gfa_edopt_t *opt, const gfa_t *g, const gfa_edseq_t *es, int32_t ql, const char *q, uint32_t v0, int32_t off0)
{
	gfa_edbuf_t *z;
	KCALLOC(km, z, 1);
	z->buf.km = km;
	z->opt = opt;
	z->g = g, z->es = es;
	z->ql = ql, z->q = q;
	z->buf.ha = gwf_set64_init2(km);
	z->buf.ht = gwf_map64_init2(km);
	kv_resize(gwf_trace_t, km, z->buf.t, 16);
	KCALLOC(km, z->a, 1);
	z->a[0].vd = gwf_gen_vd(v0, -off0), z->a[0].k = off0 - 1, z->a[0].xo = 0;
	if (z->opt->traceback) z->a[0].t = gwf_trace_push(km, &z->buf.t, -1, -1, z->buf.ht);
	z->n_a = 1;
	return z;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movl 0x18(%rbp), %eax
movl 0x10(%rbp), %eax
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movl %r8d, -0x24(%rbp)
movq %r9, -0x30(%rbp)
movq -0x8(%rbp), %rdi
movl $0x1, %esi
movl $0xd0, %edx
callq 0x2540
movq %rax, -0x38(%rbp)
movq -0x8(%rbp), %rcx
movq -0x38(%rbp), %rax
movq %rcx, 0x28(%rax)
movq -0x10(%rbp), %rcx
movq -0x38(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x18(%rbp), %rcx
movq -0x38(%rbp), %rax
movq %rcx, (%rax)
movq -0x20(%rbp), %rcx
movq -0x38(%rbp), %rax
movq %rcx, 0x8(%rax)
movl -0x24(%rbp), %ecx
movq -0x38(%rbp), %rax
movl %ecx, 0x18(%rax)
movq -0x30(%rbp), %rcx
movq -0x38(%rbp), %rax
movq %rcx, 0x20(%rax)
movq -0x8(%rbp), %rdi
callq 0x106e0
movq %rax, %rcx
movq -0x38(%rbp), %rax
movq %rcx, 0x30(%rax)
movq -0x8(%rbp), %rdi
callq 0x10720
movq %rax, %rcx
movq -0x38(%rbp), %rax
movq %rcx, 0x38(%rax)
movq -0x38(%rbp), %rax
cmpq $0x10, 0xa8(%rax)
jae 0x1061c
movq -0x38(%rbp), %rax
movq $0x10, 0xa8(%rax)
movq -0x38(%rbp), %rax
movq 0xa8(%rax), %rcx
addq $-0x1, %rcx
movq %rcx, 0xa8(%rax)
movq -0x38(%rbp), %rax
movq 0xa8(%rax), %rcx
shrq %rcx
movq -0x38(%rbp), %rax
orq 0xa8(%rax), %rcx
movq %rcx, 0xa8(%rax)
movq -0x38(%rbp), %rax
movq 0xa8(%rax), %rcx
shrq $0x2, %rcx
movq -0x38(%rbp), %rax
orq 0xa8(%rax), %rcx
movq %rcx, 0xa8(%rax)
movq -0x38(%rbp), %rax
movq 0xa8(%rax), %rcx
shrq $0x4, %rcx
movq -0x38(%rbp), %rax
orq 0xa8(%rax), %rcx
movq %rcx, 0xa8(%rax)
movq -0x38(%rbp), %rax
movq 0xa8(%rax), %rcx
shrq $0x8, %rcx
movq -0x38(%rbp), %rax
orq 0xa8(%rax), %rcx
movq %rcx, 0xa8(%rax)
movq -0x38(%rbp), %rax
movq 0xa8(%rax), %rcx
shrq $0x10, %rcx
movq -0x38(%rbp), %rax
orq 0xa8(%rax), %rcx
movq %rcx, 0xa8(%rax)
movq -0x38(%rbp), %rax
movq 0xa8(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0xa8(%rax)
movq -0x8(%rbp), %rdi
movq -0x38(%rbp), %rax
movq 0xb0(%rax), %rsi
movq -0x38(%rbp), %rax
movq 0xa8(%rax), %rdx
shlq $0x3, %rdx
callq 0x2ae0
movq %rax, %rcx
movq -0x38(%rbp), %rax
movq %rcx, 0xb0(%rax)
jmp 0x1061e
movq -0x8(%rbp), %rdi
movl $0x1, %esi
movl $0x18, %edx
callq 0x2540
movq %rax, %rcx
movq -0x38(%rbp), %rax
movq %rcx, 0xc0(%rax)
movl 0x10(%rbp), %edi
xorl %esi, %esi
subl 0x18(%rbp), %esi
callq 0x10740
movq %rax, %rcx
movq -0x38(%rbp), %rax
movq 0xc0(%rax), %rax
movq %rcx, (%rax)
movl 0x18(%rbp), %ecx
subl $0x1, %ecx
movq -0x38(%rbp), %rax
movq 0xc0(%rax), %rax
movl %ecx, 0x8(%rax)
movq -0x38(%rbp), %rax
movq 0xc0(%rax), %rax
movl $0x0, 0x10(%rax)
movq -0x38(%rbp), %rax
movq 0x10(%rax), %rax
cmpl $0x0, (%rax)
je 0x106c4
movq -0x8(%rbp), %rdi
movq -0x38(%rbp), %rsi
addq $0x28, %rsi
addq $0x78, %rsi
movq -0x38(%rbp), %rax
movq 0x38(%rax), %r8
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
movl %ecx, %edx
callq 0x10770
movl %eax, %ecx
movq -0x38(%rbp), %rax
movq 0xc0(%rax), %rax
movl %ecx, 0x14(%rax)
movq -0x38(%rbp), %rax
movl $0x1, 0xbc(%rax)
movq -0x38(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax)