// File: /workspace/github_c_makefile_star2_O0/lh3[P]minigraph/gfa-ed.c
// Function: gwf_ed_extend_batch
static void gwf_ed_extend_batch(void *km, const gfa_t *g, const gfa_edseq_t *es, int32_t ql, const char *q, int32_t n, gwf_diag_t *a, gwf_diag_v *B,
								kdq_t(gwf_diag_t) *A, gwf_intv_v *tmp_intv, gfa_edrst_t *r)
{
	int32_t j, m;
	int32_t v = a->vd>>32;
	int32_t vl = es[v].len;
	const char *ts = es[v].seq;
	gwf_diag_t *b;

	// wfa_extend
	for (j = 0; j < n; ++j) {
		int32_t k;
		k = gwf_extend1((int32_t)a[j].vd - GWF_DIAG_SHIFT, a[j].k, vl, ts, ql, q);
		a[j].len = k - a[j].k;
		a[j].xo += a[j].len << 2;
		a[j].k = k;
	}

	// wfa_next
	kv_resize(gwf_diag_t, km, *B, B->n + n + 2);
	b = &B->a[B->n];
	b[0].vd = a[0].vd - 1;
	b[0].xo = a[0].xo + 2; // 2 == 1<<1
	b[0].k = a[0].k + 1;
	b[0].t = a[0].t;
	b[1].vd = a[0].vd;
	b[1].xo =  n == 1 || a[0].k > a[1].k? a[0].xo + 4 : a[1].xo + 2;
	b[1].t  =  n == 1 || a[0].k > a[1].k? a[0].t : a[1].t;
	b[1].k  = (n == 1 || a[0].k > a[1].k? a[0].k : a[1].k) + 1;
	for (j = 1; j < n - 1; ++j) {
		uint32_t x = a[j-1].xo + 2;
		int32_t k = a[j-1].k, t = a[j-1].t;
		x = k > a[j].k + 1? x : a[j].xo + 4;
		t = k > a[j].k + 1? t : a[j].t;
		k = k > a[j].k + 1? k : a[j].k + 1;
		x = k > a[j+1].k + 1? x : a[j+1].xo + 2;
		t = k > a[j+1].k + 1? t : a[j+1].t;
		k = k > a[j+1].k + 1? k : a[j+1].k + 1;
		b[j+1].vd = a[j].vd, b[j+1].k = k, b[j+1].xo = x, b[j+1].t = t;
	}
	if (n >= 2) {
		b[n].vd = a[n-1].vd;
		b[n].xo = a[n-2].k > a[n-1].k + 1? a[n-2].xo + 2 : a[n-1].xo + 4;
		b[n].t  = a[n-2].k > a[n-1].k + 1? a[n-2].t : a[n-1].t;
		b[n].k  = a[n-2].k > a[n-1].k + 1? a[n-2].k : a[n-1].k + 1;
	}
	b[n+1].vd = a[n-1].vd + 1;
	b[n+1].xo = a[n-1].xo + 2;
	b[n+1].t  = a[n-1].t;
	b[n+1].k  = a[n-1].k;

	// drop out-of-bound cells
	//if (a[n-1].k == vl - 1) b[n+1].k = vl; // insertion to the end of a vertex is handled elsewhere. FIXME: this line leads to wrong result for MHC-57 and MHC-HG002.2
	for (j = 0; j < n; ++j) {
		gwf_diag_t *p = &a[j];
		if (p->k == vl - 1 || (int32_t)p->vd - GWF_DIAG_SHIFT + p->k == ql - 1)
			p->xo |= 1, *kdq_pushp(gwf_diag_t, A) = *p;
	}
	for (j = 0, m = 0; j < n + 2; ++j) {
		gwf_diag_t *p = &b[j];
		int32_t d = (int32_t)p->vd - GWF_DIAG_SHIFT;
		if (d + p->k < ql && p->k < vl) {
			b[m++] = *p;
		} else if (p->k == vl) {
			gwf_intv_t *q;
			kv_pushp(gwf_intv_t, km, *tmp_intv, &q);
			q->vd0 = gwf_gen_vd(v, d), q->vd1 = q->vd0 + 1;
		}
	}
	B->n += m;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xc0, %rsp
movq 0x30(%rbp), %rax
movq 0x28(%rbp), %rax
movq 0x20(%rbp), %rax
movq 0x18(%rbp), %rax
movq 0x10(%rbp), %rax
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movl %ecx, -0x1c(%rbp)
movq %r8, -0x28(%rbp)
movl %r9d, -0x2c(%rbp)
movq 0x10(%rbp), %rax
movq (%rax), %rax
shrq $0x20, %rax
movl %eax, -0x38(%rbp)
movq -0x18(%rbp), %rax
movslq -0x38(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movl 0x8(%rax), %eax
movl %eax, -0x3c(%rbp)
movq -0x18(%rbp), %rax
movslq -0x38(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq (%rax), %rax
movq %rax, -0x48(%rbp)
movl $0x0, -0x30(%rbp)
movl -0x30(%rbp), %eax
cmpl -0x2c(%rbp), %eax
jge 0x126a9
movq 0x10(%rbp), %rax
movslq -0x30(%rbp), %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq (%rax), %rax
movl %eax, %edi
subl $0x40000000, %edi       # imm = 0x40000000
movq 0x10(%rbp), %rax
movslq -0x30(%rbp), %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movl 0x8(%rax), %esi
movl -0x3c(%rbp), %edx
movq -0x48(%rbp), %rcx
movl -0x1c(%rbp), %r8d
movq -0x28(%rbp), %r9
callq 0x13140
movl %eax, -0x54(%rbp)
movl -0x54(%rbp), %ecx
movq 0x10(%rbp), %rax
movslq -0x30(%rbp), %rdx
imulq $0x18, %rdx, %rdx
addq %rdx, %rax
subl 0x8(%rax), %ecx
movq 0x10(%rbp), %rax
movslq -0x30(%rbp), %rdx
imulq $0x18, %rdx, %rdx
addq %rdx, %rax
movl %ecx, 0xc(%rax)
movq 0x10(%rbp), %rax
movslq -0x30(%rbp), %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movl 0xc(%rax), %ecx
shll $0x2, %ecx
movq 0x10(%rbp), %rax
movslq -0x30(%rbp), %rdx
imulq $0x18, %rdx, %rdx
addq %rdx, %rax
addl 0x10(%rax), %ecx
movl %ecx, 0x10(%rax)
movl -0x54(%rbp), %ecx
movq 0x10(%rbp), %rax
movslq -0x30(%rbp), %rdx
imulq $0x18, %rdx, %rdx
addq %rdx, %rax
movl %ecx, 0x8(%rax)
movl -0x30(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x30(%rbp)
jmp 0x125e6
jmp 0x126ab
movq 0x18(%rbp), %rax
movq 0x8(%rax), %rax
movq 0x18(%rbp), %rcx
movq (%rcx), %rcx
movslq -0x2c(%rbp), %rdx
addq %rdx, %rcx
addq $0x2, %rcx
cmpq %rcx, %rax
jae 0x127a4
movq 0x18(%rbp), %rax
movq (%rax), %rcx
movslq -0x2c(%rbp), %rax
addq %rax, %rcx
addq $0x2, %rcx
movq 0x18(%rbp), %rax
movq %rcx, 0x8(%rax)
movq 0x18(%rbp), %rax
movq 0x8(%rax), %rcx
addq $-0x1, %rcx
movq %rcx, 0x8(%rax)
movq 0x18(%rbp), %rax
movq 0x8(%rax), %rcx
shrq %rcx
movq 0x18(%rbp), %rax
orq 0x8(%rax), %rcx
movq %rcx, 0x8(%rax)
movq 0x18(%rbp), %rax
movq 0x8(%rax), %rcx
shrq $0x2, %rcx
movq 0x18(%rbp), %rax
orq 0x8(%rax), %rcx
movq %rcx, 0x8(%rax)
movq 0x18(%rbp), %rax
movq 0x8(%rax), %rcx
shrq $0x4, %rcx
movq 0x18(%rbp), %rax
orq 0x8(%rax), %rcx
movq %rcx, 0x8(%rax)
movq 0x18(%rbp), %rax
movq 0x8(%rax), %rcx
shrq $0x8, %rcx
movq 0x18(%rbp), %rax
orq 0x8(%rax), %rcx
movq %rcx, 0x8(%rax)
movq 0x18(%rbp), %rax
movq 0x8(%rax), %rcx
shrq $0x10, %rcx
movq 0x18(%rbp), %rax
orq 0x8(%rax), %rcx
movq %rcx, 0x8(%rax)
movq 0x18(%rbp), %rax
movq 0x8(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0x8(%rax)
movq -0x8(%rbp), %rdi
movq 0x18(%rbp), %rax
movq 0x10(%rax), %rsi
movq 0x18(%rbp), %rax
imulq $0x18, 0x8(%rax), %rdx
callq 0x2ae0
movq %rax, %rcx
movq 0x18(%rbp), %rax
movq %rcx, 0x10(%rax)
jmp 0x127a6
movq 0x18(%rbp), %rax
movq 0x10(%rax), %rax
movq 0x18(%rbp), %rcx
imulq $0x18, (%rcx), %rcx
addq %rcx, %rax
movq %rax, -0x50(%rbp)
movq 0x10(%rbp), %rax
movq (%rax), %rcx
subq $0x1, %rcx
movq -0x50(%rbp), %rax
movq %rcx, (%rax)
movq 0x10(%rbp), %rax
movl 0x10(%rax), %ecx
addl $0x2, %ecx
movq -0x50(%rbp), %rax
movl %ecx, 0x10(%rax)
movq 0x10(%rbp), %rax
movl 0x8(%rax), %ecx
addl $0x1, %ecx
movq -0x50(%rbp), %rax
movl %ecx, 0x8(%rax)
movq 0x10(%rbp), %rax
movl 0x14(%rax), %ecx
movq -0x50(%rbp), %rax
movl %ecx, 0x14(%rax)
movq 0x10(%rbp), %rax
movq (%rax), %rcx
movq -0x50(%rbp), %rax
movq %rcx, 0x18(%rax)
cmpl $0x1, -0x2c(%rbp)
je 0x12824
movq 0x10(%rbp), %rax
movl 0x8(%rax), %eax
movq 0x10(%rbp), %rcx
cmpl 0x20(%rcx), %eax
jle 0x12836
movq 0x10(%rbp), %rax
movl 0x10(%rax), %eax
addl $0x4, %eax
movl %eax, -0x84(%rbp)
jmp 0x12846
movq 0x10(%rbp), %rax
movl 0x28(%rax), %eax
addl $0x2, %eax
movl %eax, -0x84(%rbp)
movl -0x84(%rbp), %ecx
movq -0x50(%rbp), %rax
movl %ecx, 0x28(%rax)
cmpl $0x1, -0x2c(%rbp)
je 0x12869
movq 0x10(%rbp), %rax
movl 0x8(%rax), %eax
movq 0x10(%rbp), %rcx
cmpl 0x20(%rcx), %eax
jle 0x12878
movq 0x10(%rbp), %rax
movl 0x14(%rax), %eax
movl %eax, -0x88(%rbp)
jmp 0x12885
movq 0x10(%rbp), %rax
movl 0x2c(%rax), %eax
movl %eax, -0x88(%rbp)
movl -0x88(%rbp), %ecx
movq -0x50(%rbp), %rax
movl %ecx, 0x2c(%rax)
cmpl $0x1, -0x2c(%rbp)
je 0x128a8
movq 0x10(%rbp), %rax
movl 0x8(%rax), %eax
movq 0x10(%rbp), %rcx
cmpl 0x20(%rcx), %eax
jle 0x128b7
movq 0x10(%rbp), %rax
movl 0x8(%rax), %eax
movl %eax, -0x8c(%rbp)
jmp 0x128c4
movq 0x10(%rbp), %rax
movl 0x20(%rax), %eax
movl %eax, -0x8c(%rbp)
movl -0x8c(%rbp), %ecx
addl $0x1, %ecx
movq -0x50(%rbp), %rax
movl %ecx, 0x20(%rax)
movl $0x1, -0x30(%rbp)
movl -0x30(%rbp), %eax
movl -0x2c(%rbp), %ecx
subl $0x1, %ecx
cmpl %ecx, %eax
jge 0x12b9c
movq 0x10(%rbp), %rax
movl -0x30(%rbp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movl 0x10(%rax), %eax
addl $0x2, %eax
movl %eax, -0x58(%rbp)
movq 0x10(%rbp), %rax
movl -0x30(%rbp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movl 0x8(%rax), %eax
movl %eax, -0x5c(%rbp)
movq 0x10(%rbp), %rax
movl -0x30(%rbp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movl 0x14(%rax), %eax
movl %eax, -0x60(%rbp)
movl -0x5c(%rbp), %eax
movq 0x10(%rbp), %rcx
movslq -0x30(%rbp), %rdx
imulq $0x18, %rdx, %rdx
addq %rdx, %rcx
movl 0x8(%rcx), %ecx
addl $0x1, %ecx
cmpl %ecx, %eax
jle 0x12964
movl -0x58(%rbp), %eax
movl %eax, -0x90(%rbp)
jmp 0x1297f
movq 0x10(%rbp), %rax
movslq -0x30(%rbp), %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movl 0x10(%rax), %eax
addl $0x4, %eax
movl %eax, -0x90(%rbp)
movl -0x90(%rbp), %eax
movl %eax, -0x58(%rbp)
movl -0x5c(%rbp), %eax
movq 0x10(%rbp), %rcx
movslq -0x30(%rbp), %rdx
imulq $0x18, %rdx, %rdx
addq %rdx, %rcx
movl 0x8(%rcx), %ecx
addl $0x1, %ecx
cmpl %ecx, %eax
jle 0x129af
movl -0x60(%rbp), %eax
movl %eax, -0x94(%rbp)
jmp 0x129c7
movq 0x10(%rbp), %rax
movslq -0x30(%rbp), %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movl 0x14(%rax), %eax
movl %eax, -0x94(%rbp)
movl -0x94(%rbp), %eax
movl %eax, -0x60(%rbp)
movl -0x5c(%rbp), %eax
movq 0x10(%rbp), %rcx
movslq -0x30(%rbp), %rdx
imulq $0x18, %rdx, %rdx
addq %rdx, %rcx
movl 0x8(%rcx), %ecx
addl $0x1, %ecx
cmpl %ecx, %eax
jle 0x129f7
movl -0x5c(%rbp), %eax
movl %eax, -0x98(%rbp)
jmp 0x12a12
movq 0x10(%rbp), %rax
movslq -0x30(%rbp), %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movl 0x8(%rax), %eax
addl $0x1, %eax
movl %eax, -0x98(%rbp)
movl -0x98(%rbp), %eax
movl %eax, -0x5c(%rbp)
movl -0x5c(%rbp), %eax
movq 0x10(%rbp), %rcx
movl -0x30(%rbp), %edx
addl $0x1, %edx
movslq %edx, %rdx
imulq $0x18, %rdx, %rdx
addq %rdx, %rcx
movl 0x8(%rcx), %ecx
addl $0x1, %ecx
cmpl %ecx, %eax
jle 0x12a47
movl -0x58(%rbp), %eax
movl %eax, -0x9c(%rbp)
jmp 0x12a67
movq 0x10(%rbp), %rax
movl -0x30(%rbp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movl 0x10(%rax), %eax
addl $0x2, %eax
movl %eax, -0x9c(%rbp)
movl -0x9c(%rbp), %eax
movl %eax, -0x58(%rbp)
movl -0x5c(%rbp), %eax
movq 0x10(%rbp), %rcx
movl -0x30(%rbp), %edx
addl $0x1, %edx
movslq %edx, %rdx
imulq $0x18, %rdx, %rdx
addq %rdx, %rcx
movl 0x8(%rcx), %ecx
addl $0x1, %ecx
cmpl %ecx, %eax
jle 0x12a9c
movl -0x60(%rbp), %eax
movl %eax, -0xa0(%rbp)
jmp 0x12ab9
movq 0x10(%rbp), %rax
movl -0x30(%rbp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movl 0x14(%rax), %eax
movl %eax, -0xa0(%rbp)
movl -0xa0(%rbp), %eax
movl %eax, -0x60(%rbp)
movl -0x5c(%rbp), %eax
movq 0x10(%rbp), %rcx
movl -0x30(%rbp), %edx
addl $0x1, %edx
movslq %edx, %rdx
imulq $0x18, %rdx, %rdx
addq %rdx, %rcx
movl 0x8(%rcx), %ecx
addl $0x1, %ecx
cmpl %ecx, %eax
jle 0x12aee
movl -0x5c(%rbp), %eax
movl %eax, -0xa4(%rbp)
jmp 0x12b0e
movq 0x10(%rbp), %rax
movl -0x30(%rbp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movl 0x8(%rax), %eax
addl $0x1, %eax
movl %eax, -0xa4(%rbp)
movl -0xa4(%rbp), %eax
movl %eax, -0x5c(%rbp)
movq 0x10(%rbp), %rax
movslq -0x30(%rbp), %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq (%rax), %rcx
movq -0x50(%rbp), %rax
movl -0x30(%rbp), %edx
addl $0x1, %edx
movslq %edx, %rdx
imulq $0x18, %rdx, %rdx
addq %rdx, %rax
movq %rcx, (%rax)
movl -0x5c(%rbp), %ecx
movq -0x50(%rbp), %rax
movl -0x30(%rbp), %edx
addl $0x1, %edx
movslq %edx, %rdx
imulq $0x18, %rdx, %rdx
addq %rdx, %rax
movl %ecx, 0x8(%rax)
movl -0x58(%rbp), %ecx
movq -0x50(%rbp), %rax
movl -0x30(%rbp), %edx
addl $0x1, %edx
movslq %edx, %rdx
imulq $0x18, %rdx, %rdx
addq %rdx, %rax
movl %ecx, 0x10(%rax)
movl -0x60(%rbp), %ecx
movq -0x50(%rbp), %rax
movl -0x30(%rbp), %edx
addl $0x1, %edx
movslq %edx, %rdx
imulq $0x18, %rdx, %rdx
addq %rdx, %rax
movl %ecx, 0x14(%rax)
movl -0x30(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x30(%rbp)
jmp 0x128db
cmpl $0x2, -0x2c(%rbp)
jl 0x12d73
movq 0x10(%rbp), %rax
movl -0x2c(%rbp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq (%rax), %rcx
movq -0x50(%rbp), %rax
movslq -0x2c(%rbp), %rdx
imulq $0x18, %rdx, %rdx
addq %rdx, %rax
movq %rcx, (%rax)
movq 0x10(%rbp), %rax
movl -0x2c(%rbp), %ecx
subl $0x2, %ecx
movslq %ecx, %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movl 0x8(%rax), %eax
movq 0x10(%rbp), %rcx
movl -0x2c(%rbp), %edx
subl $0x1, %edx
movslq %edx, %rdx
imulq $0x18, %rdx, %rdx
addq %rdx, %rcx
movl 0x8(%rcx), %ecx
addl $0x1, %ecx
cmpl %ecx, %eax
jle 0x12c26
movq 0x10(%rbp), %rax
movl -0x2c(%rbp), %ecx
subl $0x2, %ecx
movslq %ecx, %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movl 0x10(%rax), %eax
addl $0x2, %eax
movl %eax, -0xa8(%rbp)
jmp 0x12c46
movq 0x10(%rbp), %rax
movl -0x2c(%rbp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movl 0x10(%rax), %eax
addl $0x4, %eax
movl %eax, -0xa8(%rbp)
movl -0xa8(%rbp), %ecx
movq -0x50(%rbp), %rax
movslq -0x2c(%rbp), %rdx
imulq $0x18, %rdx, %rdx
addq %rdx, %rax
movl %ecx, 0x10(%rax)
movq 0x10(%rbp), %rax
movl -0x2c(%rbp), %ecx
subl $0x2, %ecx
movslq %ecx, %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movl 0x8(%rax), %eax
movq 0x10(%rbp), %rcx
movl -0x2c(%rbp), %edx
subl $0x1, %edx
movslq %edx, %rdx
imulq $0x18, %rdx, %rdx
addq %rdx, %rcx
movl 0x8(%rcx), %ecx
addl $0x1, %ecx
cmpl %ecx, %eax
jle 0x12cb2
movq 0x10(%rbp), %rax
movl -0x2c(%rbp), %ecx
subl $0x2, %ecx
movslq %ecx, %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movl 0x14(%rax), %eax
movl %eax, -0xac(%rbp)
jmp 0x12ccf
movq 0x10(%rbp), %rax
movl -0x2c(%rbp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movl 0x14(%rax), %eax
movl %eax, -0xac(%rbp)
movl -0xac(%rbp), %ecx
movq -0x50(%rbp), %rax
movslq -0x2c(%rbp), %rdx
imulq $0x18, %rdx, %rdx
addq %rdx, %rax
movl %ecx, 0x14(%rax)
movq 0x10(%rbp), %rax
movl -0x2c(%rbp), %ecx
subl $0x2, %ecx
movslq %ecx, %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movl 0x8(%rax), %eax
movq 0x10(%rbp), %rcx
movl -0x2c(%rbp), %edx
subl $0x1, %edx
movslq %edx, %rdx
imulq $0x18, %rdx, %rdx
addq %rdx, %rcx
movl 0x8(%rcx), %ecx
addl $0x1, %ecx
cmpl %ecx, %eax
jle 0x12d3b
movq 0x10(%rbp), %rax
movl -0x2c(%rbp), %ecx
subl $0x2, %ecx
movslq %ecx, %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movl 0x8(%rax), %eax
movl %eax, -0xb0(%rbp)
jmp 0x12d5b
movq 0x10(%rbp), %rax
movl -0x2c(%rbp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movl 0x8(%rax), %eax
addl $0x1, %eax
movl %eax, -0xb0(%rbp)
movl -0xb0(%rbp), %ecx
movq -0x50(%rbp), %rax
movslq -0x2c(%rbp), %rdx
imulq $0x18, %rdx, %rdx
addq %rdx, %rax
movl %ecx, 0x8(%rax)
movq 0x10(%rbp), %rax
movl -0x2c(%rbp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq (%rax), %rcx
addq $0x1, %rcx
movq -0x50(%rbp), %rax
movl -0x2c(%rbp), %edx
addl $0x1, %edx
movslq %edx, %rdx
imulq $0x18, %rdx, %rdx
addq %rdx, %rax
movq %rcx, (%rax)
movq 0x10(%rbp), %rax
movl -0x2c(%rbp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movl 0x10(%rax), %ecx
addl $0x2, %ecx
movq -0x50(%rbp), %rax
movl -0x2c(%rbp), %edx
addl $0x1, %edx
movslq %edx, %rdx
imulq $0x18, %rdx, %rdx
addq %rdx, %rax
movl %ecx, 0x10(%rax)
movq 0x10(%rbp), %rax
movl -0x2c(%rbp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movl 0x14(%rax), %ecx
movq -0x50(%rbp), %rax
movl -0x2c(%rbp), %edx
addl $0x1, %edx
movslq %edx, %rdx
imulq $0x18, %rdx, %rdx
addq %rdx, %rax
movl %ecx, 0x14(%rax)
movq 0x10(%rbp), %rax
movl -0x2c(%rbp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movl 0x8(%rax), %ecx
movq -0x50(%rbp), %rax
movl -0x2c(%rbp), %edx
addl $0x1, %edx
movslq %edx, %rdx
imulq $0x18, %rdx, %rdx
addq %rdx, %rax
movl %ecx, 0x8(%rax)
movl $0x0, -0x30(%rbp)
movl -0x30(%rbp), %eax
cmpl -0x2c(%rbp), %eax
jge 0x12ec6
movq 0x10(%rbp), %rax
movslq -0x30(%rbp), %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x68(%rbp)
movq -0x68(%rbp), %rax
movl 0x8(%rax), %eax
movl -0x3c(%rbp), %ecx
subl $0x1, %ecx
cmpl %ecx, %eax
je 0x12e86
movq -0x68(%rbp), %rax
movq (%rax), %rax
subl $0x40000000, %eax       # imm = 0x40000000
movq -0x68(%rbp), %rcx
addl 0x8(%rcx), %eax
movl -0x1c(%rbp), %ecx
subl $0x1, %ecx
cmpl %ecx, %eax
jne 0x12eb6
movq -0x68(%rbp), %rax
movl 0x10(%rax), %ecx
orl $0x1, %ecx
movl %ecx, 0x10(%rax)
movq 0x20(%rbp), %rdi
callq 0x13470
movq -0x68(%rbp), %rcx
movq (%rcx), %rdx
movq %rdx, (%rax)
movq 0x8(%rcx), %rdx
movq %rdx, 0x8(%rax)
movq 0x10(%rcx), %rcx
movq %rcx, 0x10(%rax)
jmp 0x12eb8
movl -0x30(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x30(%rbp)
jmp 0x12e39
movl $0x0, -0x30(%rbp)
movl $0x0, -0x34(%rbp)
movl -0x30(%rbp), %eax
movl -0x2c(%rbp), %ecx
addl $0x2, %ecx
cmpl %ecx, %eax
jge 0x1303f
movq -0x50(%rbp), %rax
movslq -0x30(%rbp), %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x70(%rbp)
movq -0x70(%rbp), %rax
movq (%rax), %rax
subl $0x40000000, %eax       # imm = 0x40000000
movl %eax, -0x74(%rbp)
movl -0x74(%rbp), %eax
movq -0x70(%rbp), %rcx
addl 0x8(%rcx), %eax
cmpl -0x1c(%rbp), %eax
jge 0x12f5a
movq -0x70(%rbp), %rax
movl 0x8(%rax), %eax
cmpl -0x3c(%rbp), %eax
jge 0x12f5a
movq -0x50(%rbp), %rax
movl -0x34(%rbp), %ecx
movl %ecx, %edx
addl $0x1, %edx
movl %edx, -0x34(%rbp)
movslq %ecx, %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq -0x70(%rbp), %rcx
movq (%rcx), %rdx
movq %rdx, (%rax)
movq 0x8(%rcx), %rdx
movq %rdx, 0x8(%rax)
movq 0x10(%rcx), %rcx
movq %rcx, 0x10(%rax)
jmp 0x1302f
movq -0x70(%rbp), %rax
movl 0x8(%rax), %eax
cmpl -0x3c(%rbp), %eax
jne 0x1302d
jmp 0x12f6c
movq 0x28(%rbp), %rax
movq (%rax), %rax
movq 0x28(%rbp), %rcx
cmpq 0x8(%rcx), %rax
jne 0x12fe1
movq 0x28(%rbp), %rax
cmpq $0x0, 0x8(%rax)
je 0x12f9c
movq 0x28(%rbp), %rax
movq 0x8(%rax), %rax
shlq %rax
movq %rax, -0xb8(%rbp)
jmp 0x12faa
movl $0x2, %eax
movq %rax, -0xb8(%rbp)
jmp 0x12faa
movq -0xb8(%rbp), %rcx
movq 0x28(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x8(%rbp), %rdi
movq 0x28(%rbp), %rax
movq 0x10(%rax), %rsi
movq 0x28(%rbp), %rax
movq 0x8(%rax), %rdx
shlq $0x4, %rdx
callq 0x2ae0
movq %rax, %rcx
movq 0x28(%rbp), %rax
movq %rcx, 0x10(%rax)
movq 0x28(%rbp), %rax
movq 0x10(%rax), %rax
movq 0x28(%rbp), %rdx
movq (%rdx), %rcx
movq %rcx, %rsi
addq $0x1, %rsi
movq %rsi, (%rdx)
shlq $0x4, %rcx
addq %rcx, %rax
movq %rax, -0x80(%rbp)
movl -0x38(%rbp), %edi
movl -0x74(%rbp), %esi
callq 0x10740
movq %rax, %rcx
movq -0x80(%rbp), %rax
movq %rcx, (%rax)
movq -0x80(%rbp), %rax
movq (%rax), %rcx
addq $0x1, %rcx
movq -0x80(%rbp), %rax
movq %rcx, 0x8(%rax)
jmp 0x1302f
jmp 0x13031
movl -0x30(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x30(%rbp)
jmp 0x12ed4
movslq -0x34(%rbp), %rcx
movq 0x18(%rbp), %rax
addq (%rax), %rcx
movq %rcx, (%rax)
addq $0xc0, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)