// File: chhylp123[P]hifiasm/Overlaps.cpp
// Function: ma_ug_gen(asg_t*)
ma_ug_t *ma_ug_gen(asg_t *g)
{
    asg_cleanup(g);
	int32_t *mark;
	uint32_t i, v, n_vtx = g->n_seq * 2;
	///is a queue
	kdq_t(uint64_t) *q;
	ma_ug_t *ug;

	ug = (ma_ug_t*)calloc(1, sizeof(ma_ug_t));
	ug->g = asg_init();
    ///each node has two directions
	mark = (int32_t*)calloc(n_vtx, 4);

	q = kdq_init(uint64_t);
	for (v = 0; v < n_vtx; ++v) {
		uint32_t w, x, l, start, end, len;
		ma_utg_t *p;
        ///what's the usage of mark array
        ///mark array is used to mark if this node has already been included in a contig
        /****************************may have bugs********************************/
		///if (g->seq[v>>1].del || arc_cnt(g, v) == 0 || mark[v]) continue;
        if (g->seq[v>>1].del || mark[v]) continue;
        if (arc_cnt(g, v) == 0 && arc_cnt(g, (v^1)) != 0) continue;
        /****************************may have bugs********************************/
		mark[v] = 1;
		q->count = 0, start = v, end = v^1, len = 0;
		// forward
		w = v;
		while (1) {
			/**
			 * w----->x
			 * w<-----x
			 * that means the only suffix of w is x, and the only prefix of x is w
			 **/
			if (arc_cnt(g, w) != 1) break;
			x = arc_first(g, w).v; // w->x
			if (arc_cnt(g, x^1) != 1) break;

			/**
			 * another direction of w would be marked as used (since w has been used)
			**/
			mark[x] = mark[w^1] = 1;
			///l is the edge length, instead of overlap length
            ///note: edge length is different with overlap length
			l = asg_arc_len(arc_first(g, w));
			kdq_push(uint64_t, q, (uint64_t)w<<32 | l);
			end = x^1, len += l;
			w = x;
			if (x == v) break;
		}
		if (start != (end^1) || kdq_size(q) == 0) { // linear unitig
			///length of seq, instead of edge
			l = g->seq[end>>1].len;
			kdq_push(uint64_t, q, (uint64_t)(end^1)<<32 | l);
			len += l;
		} else { // circular unitig
			start = end = UINT32_MAX;
			goto add_unitig; // then it is not necessary to do the backward
		}
		// backward
		x = v;
		while (1) { // similar to forward but not the same
			if (arc_cnt(g, x^1) != 1) break;
			w = arc_first(g, x^1).v ^ 1; // w->x
			if (arc_cnt(g, w) != 1) break;
			mark[x] = mark[w^1] = 1;
			l = asg_arc_len(arc_first(g, w));
			///w is the seq id + direction, l is the length of edge
			///push element to the front of a queue
			kdq_unshift(uint64_t, q, (uint64_t)w<<32 | l);

            // fprintf(stderr, "uId: %u, >%.*s (%u)\n", 
            // ug->u.n, (int)Get_NAME_LENGTH((R_INF), w>>1), Get_NAME((R_INF), w>>1), w>>1);

			start = w, len += l;
			x = w;
		}
add_unitig:
		if (start != UINT32_MAX) mark[start] = mark[end] = 1;
		kv_pushp(ma_utg_t, ug->u, &p);
		p->s = 0, p->start = start, p->end = end, p->len = len, p->n = kdq_size(q), p->circ = (start == UINT32_MAX);
		p->m = p->n;
		kv_roundup32(p->m);
		p->a = (uint64_t*)malloc(8 * p->m);
		//all elements are saved here
		for (i = 0; i < kdq_size(q); ++i)
			p->a[i] = kdq_at(q, i);
	}
	kdq_destroy(uint64_t, q);

	// add arcs between unitigs; reusing mark for a different purpose
	//ug saves all unitigs
	for (v = 0; v < n_vtx; ++v) mark[v] = -1;

    //mark all start nodes and end nodes of all unitigs
	for (i = 0; i < ug->u.n; ++i) {
		if (ug->u.a[i].circ) continue;
		mark[ug->u.a[i].start] = i<<1 | 0;
		mark[ug->u.a[i].end] = i<<1 | 1;
	}

	//scan all edges
	for (i = 0; i < g->n_arc; ++i) {
		asg_arc_t *p = &g->arc[i];
		if (p->del) continue;
		///to connect two unitigs, we need to connect the end of unitig x to the start of unitig y
		///so we need to ^1 to get the reverse direction of (x's end)?
        ///>=0 means this node is a start/end node of an unitig
        ///means this node is a intersaction node
		if (mark[p->ul>>32^1] >= 0 && mark[p->v] >= 0) {
			asg_arc_t *q;
			uint32_t u = mark[p->ul>>32^1]^1;
			int l = ug->u.a[u>>1].len - p->ol;
			if (l < 0) l = 1;
			q = asg_arc_pushp(ug->g);
			q->ol = p->ol, q->del = 0;
			q->ul = (uint64_t)u<<32 | l;
			q->v = mark[p->v]; q->ou = 0;
            q->el = p->el;
		}
	}
	for (i = 0; i < ug->u.n; ++i)
		asg_seq_set(ug->g, i, ug->u.a[i].len, 0);
	asg_cleanup(ug->g);
	free(mark);
	return ug;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
callq 0xcdd10
movq -0x8(%rbp), %rax
movl 0x14(%rax), %eax
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
shll %eax
movl %eax, -0x1c(%rbp)
movl $0x1, %edi
movl $0x38, %esi
callq 0x2140
movq %rax, -0x30(%rbp)
callq 0xcd150
movq %rax, %rcx
movq -0x30(%rbp), %rax
movq %rcx, 0x18(%rax)
movl -0x1c(%rbp), %eax
movl %eax, %edi
movl $0x4, %esi
callq 0x2140
movq %rax, -0x10(%rbp)
callq 0xe6120
movq %rax, -0x28(%rbp)
movl $0x0, -0x18(%rbp)
movl -0x18(%rbp), %eax
cmpl -0x1c(%rbp), %eax
jae 0xe5e82
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rax
movl -0x18(%rbp), %ecx
shrl %ecx
movl %ecx, %ecx
movl (%rax,%rcx,8), %eax
shrl $0x1f, %eax
cmpl $0x0, %eax
jne 0xe59af
movq -0x10(%rbp), %rax
movl -0x18(%rbp), %ecx
cmpl $0x0, (%rax,%rcx,4)
je 0xe59b4
jmp 0xe5e74
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rax
movl -0x18(%rbp), %ecx
movq (%rax,%rcx,8), %rax
cmpl $0x0, %eax
jne 0xe59e6
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rax
movl -0x18(%rbp), %ecx
xorl $0x1, %ecx
movl %ecx, %ecx
movq (%rax,%rcx,8), %rax
cmpl $0x0, %eax
je 0xe59e6
jmp 0xe5e74
movq -0x10(%rbp), %rax
movl -0x18(%rbp), %ecx
movl $0x1, (%rax,%rcx,4)
movq -0x28(%rbp), %rax
movq $0x0, 0x8(%rax)
movl -0x18(%rbp), %eax
movl %eax, -0x40(%rbp)
movl -0x18(%rbp), %eax
xorl $0x1, %eax
movl %eax, -0x44(%rbp)
movl $0x0, -0x48(%rbp)
movl -0x18(%rbp), %eax
movl %eax, -0x34(%rbp)
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rax
movl -0x34(%rbp), %ecx
movq (%rax,%rcx,8), %rax
cmpl $0x1, %eax
je 0xe5a35
jmp 0xe5b03
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x8(%rbp), %rcx
movq 0x28(%rcx), %rcx
movl -0x34(%rbp), %edx
movq (%rcx,%rdx,8), %rcx
shrq $0x20, %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movl 0x8(%rax), %eax
movl %eax, -0x38(%rbp)
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rax
movl -0x38(%rbp), %ecx
xorl $0x1, %ecx
movl %ecx, %ecx
movq (%rax,%rcx,8), %rax
cmpl $0x1, %eax
je 0xe5a7b
jmp 0xe5b03
movq -0x10(%rbp), %rax
movl -0x34(%rbp), %ecx
xorl $0x1, %ecx
movl %ecx, %ecx
movl $0x1, (%rax,%rcx,4)
movq -0x10(%rbp), %rax
movl -0x38(%rbp), %ecx
movl $0x1, (%rax,%rcx,4)
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x8(%rbp), %rcx
movq 0x28(%rcx), %rcx
movl -0x34(%rbp), %edx
movq (%rcx,%rdx,8), %rcx
shrq $0x20, %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq (%rax), %rax
movl %eax, -0x3c(%rbp)
movq -0x28(%rbp), %rdi
movl -0x34(%rbp), %eax
movl %eax, %esi
shlq $0x20, %rsi
movl -0x3c(%rbp), %eax
orq %rax, %rsi
callq 0xe61c0
movl -0x38(%rbp), %eax
xorl $0x1, %eax
movl %eax, -0x44(%rbp)
movl -0x3c(%rbp), %eax
addl -0x48(%rbp), %eax
movl %eax, -0x48(%rbp)
movl -0x38(%rbp), %eax
movl %eax, -0x34(%rbp)
movl -0x38(%rbp), %eax
cmpl -0x18(%rbp), %eax
jne 0xe5afe
jmp 0xe5b03
jmp 0xe5a1c
movl -0x40(%rbp), %eax
movl -0x44(%rbp), %ecx
xorl $0x1, %ecx
cmpl %ecx, %eax
jne 0xe5b1b
movq -0x28(%rbp), %rax
cmpq $0x0, 0x8(%rax)
jne 0xe5b5d
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rax
movl -0x44(%rbp), %ecx
shrl %ecx
movl %ecx, %ecx
movl (%rax,%rcx,8), %eax
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
movl %eax, -0x3c(%rbp)
movq -0x28(%rbp), %rdi
movl -0x44(%rbp), %eax
xorl $0x1, %eax
movl %eax, %eax
movl %eax, %esi
shlq $0x20, %rsi
movl -0x3c(%rbp), %eax
orq %rax, %rsi
callq 0xe61c0
movl -0x3c(%rbp), %eax
addl -0x48(%rbp), %eax
movl %eax, -0x48(%rbp)
jmp 0xe5b70
movl $0xffffffff, -0x44(%rbp) # imm = 0xFFFFFFFF
movl $0xffffffff, -0x40(%rbp) # imm = 0xFFFFFFFF
jmp 0xe5c57
movl -0x18(%rbp), %eax
movl %eax, -0x38(%rbp)
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rax
movl -0x38(%rbp), %ecx
xorl $0x1, %ecx
movl %ecx, %ecx
movq (%rax,%rcx,8), %rax
cmpl $0x1, %eax
je 0xe5b94
jmp 0xe5c55
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x8(%rbp), %rcx
movq 0x28(%rcx), %rcx
movl -0x38(%rbp), %edx
xorl $0x1, %edx
movl %edx, %edx
movq (%rcx,%rdx,8), %rcx
shrq $0x20, %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movl 0x8(%rax), %eax
xorl $0x1, %eax
movl %eax, -0x34(%rbp)
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rax
movl -0x34(%rbp), %ecx
movq (%rax,%rcx,8), %rax
cmpl $0x1, %eax
je 0xe5bda
jmp 0xe5c55
movq -0x10(%rbp), %rax
movl -0x34(%rbp), %ecx
xorl $0x1, %ecx
movl %ecx, %ecx
movl $0x1, (%rax,%rcx,4)
movq -0x10(%rbp), %rax
movl -0x38(%rbp), %ecx
movl $0x1, (%rax,%rcx,4)
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x8(%rbp), %rcx
movq 0x28(%rcx), %rcx
movl -0x34(%rbp), %edx
movq (%rcx,%rdx,8), %rcx
shrq $0x20, %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq (%rax), %rax
movl %eax, -0x3c(%rbp)
movq -0x28(%rbp), %rdi
movl -0x34(%rbp), %eax
movl %eax, %esi
shlq $0x20, %rsi
movl -0x3c(%rbp), %eax
orq %rax, %rsi
callq 0xe6260
movl -0x34(%rbp), %eax
movl %eax, -0x40(%rbp)
movl -0x3c(%rbp), %eax
addl -0x48(%rbp), %eax
movl %eax, -0x48(%rbp)
movl -0x34(%rbp), %eax
movl %eax, -0x38(%rbp)
jmp 0xe5b76
jmp 0xe5c57
cmpl $-0x1, -0x40(%rbp)
je 0xe5c79
movq -0x10(%rbp), %rax
movl -0x44(%rbp), %ecx
movl $0x1, (%rax,%rcx,4)
movq -0x10(%rbp), %rax
movl -0x40(%rbp), %ecx
movl $0x1, (%rax,%rcx,4)
jmp 0xe5c7b
movq -0x30(%rbp), %rax
movq (%rax), %rax
movq -0x30(%rbp), %rcx
cmpq 0x8(%rcx), %rax
jne 0xe5ce0
movq -0x30(%rbp), %rax
cmpq $0x0, 0x8(%rax)
je 0xe5ca8
movq -0x30(%rbp), %rax
movq 0x8(%rax), %rax
shlq %rax
movq %rax, -0x70(%rbp)
jmp 0xe5cb3
movl $0x2, %eax
movq %rax, -0x70(%rbp)
jmp 0xe5cb3
movq -0x70(%rbp), %rcx
movq -0x30(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x30(%rbp), %rax
movq 0x10(%rax), %rdi
movq -0x30(%rbp), %rax
imulq $0x28, 0x8(%rax), %rsi
callq 0x2360
movq %rax, %rcx
movq -0x30(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x30(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x30(%rbp), %rdx
movq (%rdx), %rcx
movq %rcx, %rsi
addq $0x1, %rsi
movq %rsi, (%rdx)
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x50(%rbp)
movq -0x50(%rbp), %rax
movq $0x0, 0x20(%rax)
movl -0x40(%rbp), %ecx
movq -0x50(%rbp), %rax
movl %ecx, 0x4(%rax)
movl -0x44(%rbp), %ecx
movq -0x50(%rbp), %rax
movl %ecx, 0x8(%rax)
movl -0x48(%rbp), %edx
movq -0x50(%rbp), %rax
movl (%rax), %ecx
andl $0x7fffffff, %edx       # imm = 0x7FFFFFFF
andl $0x80000000, %ecx       # imm = 0x80000000
orl %edx, %ecx
movl %ecx, (%rax)
movq -0x28(%rbp), %rax
movq 0x8(%rax), %rax
movl %eax, %ecx
movq -0x50(%rbp), %rax
movl %ecx, 0x10(%rax)
cmpl $-0x1, -0x40(%rbp)
sete %al
andb $0x1, %al
movzbl %al, %edx
movq -0x50(%rbp), %rax
movl (%rax), %ecx
andl $0x1, %edx
shll $0x1f, %edx
andl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
orl %edx, %ecx
movl %ecx, (%rax)
movq -0x50(%rbp), %rax
movl 0x10(%rax), %ecx
movq -0x50(%rbp), %rax
movl %ecx, 0xc(%rax)
movq -0x50(%rbp), %rax
movl 0xc(%rax), %ecx
addl $-0x1, %ecx
movl %ecx, 0xc(%rax)
movq -0x50(%rbp), %rax
movl 0xc(%rax), %ecx
shrl %ecx
movq -0x50(%rbp), %rax
orl 0xc(%rax), %ecx
movl %ecx, 0xc(%rax)
movq -0x50(%rbp), %rax
movl 0xc(%rax), %ecx
shrl $0x2, %ecx
movq -0x50(%rbp), %rax
orl 0xc(%rax), %ecx
movl %ecx, 0xc(%rax)
movq -0x50(%rbp), %rax
movl 0xc(%rax), %ecx
shrl $0x4, %ecx
movq -0x50(%rbp), %rax
orl 0xc(%rax), %ecx
movl %ecx, 0xc(%rax)
movq -0x50(%rbp), %rax
movl 0xc(%rax), %ecx
shrl $0x8, %ecx
movq -0x50(%rbp), %rax
orl 0xc(%rax), %ecx
movl %ecx, 0xc(%rax)
movq -0x50(%rbp), %rax
movl 0xc(%rax), %ecx
shrl $0x10, %ecx
movq -0x50(%rbp), %rax
orl 0xc(%rax), %ecx
movl %ecx, 0xc(%rax)
movq -0x50(%rbp), %rax
movl 0xc(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0xc(%rax)
movq -0x50(%rbp), %rax
movl 0xc(%rax), %eax
shll $0x3, %eax
movl %eax, %eax
movl %eax, %edi
callq 0x2270
movq %rax, %rcx
movq -0x50(%rbp), %rax
movq %rcx, 0x18(%rax)
movl $0x0, -0x14(%rbp)
movl -0x14(%rbp), %eax
movq -0x28(%rbp), %rcx
cmpq 0x8(%rcx), %rax
jae 0xe5e72
movq -0x28(%rbp), %rax
movq 0x18(%rax), %rax
movq -0x28(%rbp), %rdx
movabsq $0x3ffffffffffffff, %rcx # imm = 0x3FFFFFFFFFFFFFF
andq (%rdx), %rcx
movl -0x14(%rbp), %edx
addq %rdx, %rcx
movq -0x28(%rbp), %rdx
andq 0x10(%rdx), %rcx
movq (%rax,%rcx,8), %rdx
movq -0x50(%rbp), %rax
movq 0x18(%rax), %rax
movl -0x14(%rbp), %ecx
movq %rdx, (%rax,%rcx,8)
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0xe5e20
jmp 0xe5e74
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
jmp 0xe597c
movq -0x28(%rbp), %rdi
callq 0xe6290
movl $0x0, -0x18(%rbp)
movl -0x18(%rbp), %eax
cmpl -0x1c(%rbp), %eax
jae 0xe5eb3
movq -0x10(%rbp), %rax
movl -0x18(%rbp), %ecx
movl $0xffffffff, (%rax,%rcx,4) # imm = 0xFFFFFFFF
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
jmp 0xe5e92
movl $0x0, -0x14(%rbp)
movl -0x14(%rbp), %eax
movq -0x30(%rbp), %rcx
cmpq (%rcx), %rax
jae 0xe5f37
movq -0x30(%rbp), %rax
movq 0x10(%rax), %rax
movl -0x14(%rbp), %ecx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movl (%rax), %eax
shrl $0x1f, %eax
cmpl $0x0, %eax
je 0xe5ee4
jmp 0xe5f2c
movl -0x14(%rbp), %edx
shll %edx
orl $0x0, %edx
movq -0x10(%rbp), %rax
movq -0x30(%rbp), %rcx
movq 0x10(%rcx), %rcx
movl -0x14(%rbp), %esi
imulq $0x28, %rsi, %rsi
addq %rsi, %rcx
movl 0x4(%rcx), %ecx
movl %edx, (%rax,%rcx,4)
movl -0x14(%rbp), %edx
shll %edx
orl $0x1, %edx
movq -0x10(%rbp), %rax
movq -0x30(%rbp), %rcx
movq 0x10(%rcx), %rcx
movl -0x14(%rbp), %esi
imulq $0x28, %rsi, %rsi
addq %rsi, %rcx
movl 0x8(%rcx), %ecx
movl %edx, (%rax,%rcx,4)
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0xe5eba
movl $0x0, -0x14(%rbp)
movl -0x14(%rbp), %eax
movq -0x8(%rbp), %rcx
movl 0x4(%rcx), %ecx
andl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
cmpl %ecx, %eax
jae 0xe60b2
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movl -0x14(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x58(%rbp)
movq -0x58(%rbp), %rax
movl 0xc(%rax), %eax
shrl $0x1f, %eax
cmpl $0x0, %eax
je 0xe5f80
jmp 0xe60a4
movq -0x10(%rbp), %rax
movq -0x58(%rbp), %rcx
movq (%rcx), %rcx
shrq $0x20, %rcx
xorq $0x1, %rcx
cmpl $0x0, (%rax,%rcx,4)
jl 0xe60a2
movq -0x10(%rbp), %rax
movq -0x58(%rbp), %rcx
movl 0x8(%rcx), %ecx
cmpl $0x0, (%rax,%rcx,4)
jl 0xe60a2
movq -0x10(%rbp), %rax
movq -0x58(%rbp), %rcx
movq (%rcx), %rcx
shrq $0x20, %rcx
xorq $0x1, %rcx
movl (%rax,%rcx,4), %eax
xorl $0x1, %eax
movl %eax, -0x64(%rbp)
movq -0x30(%rbp), %rax
movq 0x10(%rax), %rax
movl -0x64(%rbp), %ecx
shrl %ecx
movl %ecx, %ecx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movl (%rax), %eax
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
movq -0x58(%rbp), %rcx
movl 0xc(%rcx), %ecx
andl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
subl %ecx, %eax
movl %eax, -0x68(%rbp)
cmpl $0x0, -0x68(%rbp)
jge 0xe600a
movl $0x1, -0x68(%rbp)
movq -0x30(%rbp), %rax
movq 0x18(%rax), %rdi
callq 0xd4050
movq %rax, -0x60(%rbp)
movq -0x58(%rbp), %rax
movl 0xc(%rax), %edx
andl $0x7fffffff, %edx       # imm = 0x7FFFFFFF
movq -0x60(%rbp), %rax
movl 0xc(%rax), %ecx
andl $0x7fffffff, %edx       # imm = 0x7FFFFFFF
andl $0x80000000, %ecx       # imm = 0x80000000
orl %edx, %ecx
movl %ecx, 0xc(%rax)
movq -0x60(%rbp), %rax
movl 0xc(%rax), %ecx
andl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
orl $0x0, %ecx
movl %ecx, 0xc(%rax)
movl -0x64(%rbp), %eax
movl %eax, %ecx
shlq $0x20, %rcx
movslq -0x68(%rbp), %rax
orq %rax, %rcx
movq -0x60(%rbp), %rax
movq %rcx, (%rax)
movq -0x10(%rbp), %rax
movq -0x58(%rbp), %rcx
movl 0x8(%rcx), %ecx
movl (%rax,%rcx,4), %ecx
movq -0x60(%rbp), %rax
movl %ecx, 0x8(%rax)
movq -0x60(%rbp), %rax
movw 0x10(%rax), %cx
andw $0xc000, %cx            # imm = 0xC000
orw $0x0, %cx
movw %cx, 0x10(%rax)
movq -0x58(%rbp), %rax
movb 0x12(%rax), %cl
movq -0x60(%rbp), %rax
movb %cl, 0x12(%rax)
jmp 0xe60a4
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0xe5f3e
movl $0x0, -0x14(%rbp)
movl -0x14(%rbp), %eax
movq -0x30(%rbp), %rcx
cmpq (%rcx), %rax
jae 0xe60fc
movq -0x30(%rbp), %rax
movq 0x18(%rax), %rdi
movl -0x14(%rbp), %esi
movq -0x30(%rbp), %rax
movq 0x10(%rax), %rax
movl -0x14(%rbp), %ecx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movl (%rax), %edx
andl $0x7fffffff, %edx       # imm = 0x7FFFFFFF
xorl %ecx, %ecx
callq 0xcd8f0
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0xe60b9
movq -0x30(%rbp), %rax
movq 0x18(%rax), %rdi
callq 0xcdd10
movq -0x10(%rbp), %rdi
callq 0x2210
movq -0x30(%rbp), %rax
addq $0x70, %rsp
popq %rbp
retq
nopl (%rax)