// File: chhylp123[P]hifiasm/inter.cpp
// Function: tes_path_connec(asg_t*, unsigned long, unsigned long, unsigned long*, unsigned long, unsigned long, unsigned long*)
uint64_t tes_path_connec(asg_t *g, uint64_t sn, uint64_t en, uint64_t *pa, uint64_t pn, uint64_t is_single_path, uint64_t *min_ou)
{
	// fprintf(stderr, "-0-[M::%s::]\n", __func__); 
	if(min_ou) (*min_ou) = 0;
	if((sn != (uint64_t)-1) && ((g->seq[sn>>1].del)||(get_arcs(g, sn, NULL, 0)<2))) return 0;
	if((en != (uint64_t)-1) && ((g->seq[en>>1].del)||((get_arcs(g, en^1, NULL, 0)<2)))) return 0;
	uint64_t nv, k, v, w, i, ou = (uint64_t)-1; asg_arc_t *av;
	if((sn != (uint64_t)-1) && (en != (uint64_t)-1) && (!pn)) {
		v = sn; w = en;
		nv = asg_arc_n(g, v); av = asg_arc_a(g, v);
		for (k = 0; k < nv; k++) {
			if(av[k].del) continue;
			if(av[k].v == w) {
				if(((uint64_t)av[k].ou) < ou) ou = av[k].ou;
				break;
			}
		}
		if(k >= nv) return 0;
		
		v = en^1; w = sn^1;
		nv = asg_arc_n(g, v); av = asg_arc_a(g, v);
		for (k = 0; k < nv; k++) {
			if(av[k].del) continue;
			if(av[k].v == w) {
				if(((uint64_t)av[k].ou) < ou) ou = av[k].ou;
				break;
			}
		}
		if(k >= nv) return 0;

		// if(get_arcs(g, sn, NULL, 0) < 2) return 0;
		// if(get_arcs(g, en^1, NULL, 0) < 2) return 0;
		if(min_ou) (*min_ou) = ou;
		return 1;
	}

	// fprintf(stderr, "-1-[M::%s::]\n", __func__); 
	if(sn != (uint64_t)-1) {
		v = sn; i = 0;
	} else {
		v = pa[0]; i = 1; assert(!(pa[0]>>32));
	}
	// fprintf(stderr, "-2-[M::%s::]\n", __func__); 
	for (; i < pn; i++) {
		w = pa[i]; assert(!(pa[i]>>32));
		if(g->seq[v>>1].del || g->seq[w>>1].del) return 0;

		nv = asg_arc_n(g, v); av = asg_arc_a(g, v);
		for (k = 0; k < nv; k++) {
			if(av[k].del) continue;
			if(av[k].v == w) {
				if(((uint64_t)av[k].ou) < ou) ou = av[k].ou;
				break;
			}
		}
		if(k >= nv) return 0;

		nv = asg_arc_n(g, w^1); av = asg_arc_a(g, w^1);
		for (k = 0; k < nv; k++) {
			if(av[k].del) continue;
			if(av[k].v == (v^1)) {
				if(((uint64_t)av[k].ou) < ou) ou = av[k].ou;
				break;
			}
		}
		if(k >= nv) return 0;

		if(is_single_path) {
			if(v != sn && v != en && get_arcs(g, v, NULL, 0) != 1) return 0;
			if(w != sn && w != en && get_arcs(g, w^1, NULL, 0) != 1) return 0;
		}

		v = w;
	}
	// fprintf(stderr, "-3-[M::%s::]\n", __func__); 
	if(en != (uint64_t)-1) {
		w = en;
		if(g->seq[v>>1].del || g->seq[w>>1].del) return 0;
		// fprintf(stderr, "-3a-[M::%s::]\n", __func__); 
		nv = asg_arc_n(g, v); av = asg_arc_a(g, v);
		for (k = 0; k < nv; k++) {
			if(av[k].del) continue;
			if(av[k].v == w) {
				if(((uint64_t)av[k].ou) < ou) ou = av[k].ou;
				break;
			}
		}
		if(k >= nv) return 0;
		// fprintf(stderr, "-3b-[M::%s::]\n", __func__); 
		nv = asg_arc_n(g, w^1); av = asg_arc_a(g, w^1);
		for (k = 0; k < nv; k++) {
			if(av[k].del) continue;
			if(av[k].v == (v^1)) {
				if(((uint64_t)av[k].ou) < ou) ou = av[k].ou;
				break;
			}
		}
		if(k >= nv) return 0;

		if(is_single_path) {
			if(v != sn && v != en && get_arcs(g, v, NULL, 0) != 1) return 0;
			if(w != sn && w != en && get_arcs(g, w^1, NULL, 0) != 1) return 0;
		}
	}



	// fprintf(stderr, "-4-[M::%s::]\n", __func__); 
	if(!path_del_topo(g, pa[0]^1)) return 0;
	// if(sn != ((uint64_t)-1)) {
	// 	v = sn; w = pa[0];
	// 	nv = asg_arc_n(g, v); av = asg_arc_a(g, v);
	// 	for (k = 0; k < nv; k++) {
	// 		if(av[k].del) continue;
	// 		if(av[k].v == w) break;
	// 	}
	// 	if(k >= nv) return 0;

	// 	v = pa[0]^1; w = sn^1;
	// 	nv = asg_arc_n(g, v); av = asg_arc_a(g, v);
	// 	for (k = 0; k < nv; k++) {
	// 		if(av[k].del) continue;
	// 		if(av[k].v == w) break;
	// 	}
	// 	if(k >= nv) return 0;
	// }



	if(!path_del_topo(g, pa[pn-1])) return 0;
	// if(en != ((uint64_t)-1)) {
	// 	v = pa[pn-1]; w = en;
	// 	nv = asg_arc_n(g, v); av = asg_arc_a(g, v);
	// 	for (k = 0; k < nv; k++) {
	// 		if(av[k].del) continue;
	// 		if(av[k].v == w) break;
	// 	}
	// 	if(k >= nv) return 0;

	// 	v = en^1; w = pa[pn-1]^1;
	// 	nv = asg_arc_n(g, v); av = asg_arc_a(g, v);
	// 	for (k = 0; k < nv; k++) {
	// 		if(av[k].del) continue;
	// 		if(av[k].v == w) break;
	// 	}
	// 	if(k >= nv) return 0;
	// }

	if(min_ou) (*min_ou) = ou;
	return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movq 0x10(%rbp), %rax
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq %r8, -0x30(%rbp)
movq %r9, -0x38(%rbp)
cmpq $0x0, 0x10(%rbp)
je 0x2ee486
movq 0x10(%rbp), %rax
movq $0x0, (%rax)
cmpq $-0x1, -0x18(%rbp)
je 0x2ee4ce
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rax
movq -0x18(%rbp), %rcx
shrq %rcx
movl (%rax,%rcx,8), %eax
shrl $0x1f, %eax
cmpl $0x0, %eax
jne 0x2ee4c1
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rax
movl %eax, %esi
xorl %eax, %eax
movl %eax, %edx
xorl %ecx, %ecx
callq 0x311ba0
cmpl $0x2, %eax
jae 0x2ee4ce
movq $0x0, -0x8(%rbp)
jmp 0x2eedd9
cmpq $-0x1, -0x20(%rbp)
je 0x2ee51a
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rax
movq -0x20(%rbp), %rcx
shrq %rcx
movl (%rax,%rcx,8), %eax
shrl $0x1f, %eax
cmpl $0x0, %eax
jne 0x2ee50d
movq -0x10(%rbp), %rdi
movq -0x20(%rbp), %rax
xorq $0x1, %rax
movl %eax, %esi
xorl %eax, %eax
movl %eax, %edx
xorl %ecx, %ecx
callq 0x311ba0
cmpl $0x2, %eax
jae 0x2ee51a
movq $0x0, -0x8(%rbp)
jmp 0x2eedd9
movq $-0x1, -0x68(%rbp)
cmpq $-0x1, -0x18(%rbp)
je 0x2ee74c
cmpq $-0x1, -0x20(%rbp)
je 0x2ee74c
cmpq $0x0, -0x30(%rbp)
jne 0x2ee74c
movq -0x18(%rbp), %rax
movq %rax, -0x50(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x58(%rbp)
movq -0x10(%rbp), %rax
movq 0x28(%rax), %rax
movq -0x50(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movl %eax, %eax
movq %rax, -0x40(%rbp)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x10(%rbp), %rcx
movq 0x28(%rcx), %rcx
movq -0x50(%rbp), %rdx
movq (%rcx,%rdx,8), %rcx
shrq $0x20, %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x70(%rbp)
movq $0x0, -0x48(%rbp)
movq -0x48(%rbp), %rax
cmpq -0x40(%rbp), %rax
jae 0x2ee61d
movq -0x70(%rbp), %rax
imulq $0x18, -0x48(%rbp), %rcx
addq %rcx, %rax
movl 0xc(%rax), %eax
shrl $0x1f, %eax
cmpl $0x0, %eax
je 0x2ee5bb
jmp 0x2ee60c
movq -0x70(%rbp), %rax
imulq $0x18, -0x48(%rbp), %rcx
addq %rcx, %rax
movl 0x8(%rax), %eax
cmpq -0x58(%rbp), %rax
jne 0x2ee60a
movq -0x70(%rbp), %rax
imulq $0x18, -0x48(%rbp), %rcx
addq %rcx, %rax
movw 0x10(%rax), %ax
andw $0x3fff, %ax            # imm = 0x3FFF
movzwl %ax, %eax
cmpq -0x68(%rbp), %rax
jae 0x2ee608
movq -0x70(%rbp), %rax
imulq $0x18, -0x48(%rbp), %rcx
addq %rcx, %rax
movw 0x10(%rax), %ax
andw $0x3fff, %ax            # imm = 0x3FFF
movzwl %ax, %eax
movq %rax, -0x68(%rbp)
jmp 0x2ee61d
jmp 0x2ee60c
movq -0x48(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x48(%rbp)
jmp 0x2ee598
movq -0x48(%rbp), %rax
cmpq -0x40(%rbp), %rax
jb 0x2ee634
movq $0x0, -0x8(%rbp)
jmp 0x2eedd9
movq -0x20(%rbp), %rax
xorq $0x1, %rax
movq %rax, -0x50(%rbp)
movq -0x18(%rbp), %rax
xorq $0x1, %rax
movq %rax, -0x58(%rbp)
movq -0x10(%rbp), %rax
movq 0x28(%rax), %rax
movq -0x50(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movl %eax, %eax
movq %rax, -0x40(%rbp)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x10(%rbp), %rcx
movq 0x28(%rcx), %rcx
movq -0x50(%rbp), %rdx
movq (%rcx,%rdx,8), %rcx
shrq $0x20, %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x70(%rbp)
movq $0x0, -0x48(%rbp)
movq -0x48(%rbp), %rax
cmpq -0x40(%rbp), %rax
jae 0x2ee716
movq -0x70(%rbp), %rax
imulq $0x18, -0x48(%rbp), %rcx
addq %rcx, %rax
movl 0xc(%rax), %eax
shrl $0x1f, %eax
cmpl $0x0, %eax
je 0x2ee6b4
jmp 0x2ee705
movq -0x70(%rbp), %rax
imulq $0x18, -0x48(%rbp), %rcx
addq %rcx, %rax
movl 0x8(%rax), %eax
cmpq -0x58(%rbp), %rax
jne 0x2ee703
movq -0x70(%rbp), %rax
imulq $0x18, -0x48(%rbp), %rcx
addq %rcx, %rax
movw 0x10(%rax), %ax
andw $0x3fff, %ax            # imm = 0x3FFF
movzwl %ax, %eax
cmpq -0x68(%rbp), %rax
jae 0x2ee701
movq -0x70(%rbp), %rax
imulq $0x18, -0x48(%rbp), %rcx
addq %rcx, %rax
movw 0x10(%rax), %ax
andw $0x3fff, %ax            # imm = 0x3FFF
movzwl %ax, %eax
movq %rax, -0x68(%rbp)
jmp 0x2ee716
jmp 0x2ee705
movq -0x48(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x48(%rbp)
jmp 0x2ee691
movq -0x48(%rbp), %rax
cmpq -0x40(%rbp), %rax
jb 0x2ee72d
movq $0x0, -0x8(%rbp)
jmp 0x2eedd9
cmpq $0x0, 0x10(%rbp)
je 0x2ee73f
movq -0x68(%rbp), %rcx
movq 0x10(%rbp), %rax
movq %rcx, (%rax)
movq $0x1, -0x8(%rbp)
jmp 0x2eedd9
cmpq $-0x1, -0x18(%rbp)
je 0x2ee765
movq -0x18(%rbp), %rax
movq %rax, -0x50(%rbp)
movq $0x0, -0x60(%rbp)
jmp 0x2ee7b5
movq -0x28(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x50(%rbp)
movq $0x1, -0x60(%rbp)
movq -0x28(%rbp), %rax
movq (%rax), %rax
shrq $0x20, %rax
cmpq $0x0, %rax
setne %al
xorb $-0x1, %al
testb $0x1, %al
jne 0x2ee792
jmp 0x2ee794
jmp 0x2ee7b3
leaq 0xa60ad(%rip), %rdi     # 0x394848
leaq 0xa208d(%rip), %rsi     # 0x39082f
movl $0x4aad, %edx           # imm = 0x4AAD
leaq 0xa60a7(%rip), %rcx     # 0x394855
callq 0x2130
jmp 0x2ee7b5
jmp 0x2ee7b7
movq -0x60(%rbp), %rax
cmpq -0x30(%rbp), %rax
jae 0x2eeac7
movq -0x28(%rbp), %rax
movq -0x60(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x58(%rbp)
movq -0x28(%rbp), %rax
movq -0x60(%rbp), %rcx
movq (%rax,%rcx,8), %rax
shrq $0x20, %rax
cmpq $0x0, %rax
setne %al
xorb $-0x1, %al
testb $0x1, %al
jne 0x2ee7f4
jmp 0x2ee7f6
jmp 0x2ee815
leaq 0xa60ba(%rip), %rdi     # 0x3948b7
leaq 0xa202b(%rip), %rsi     # 0x39082f
movl $0x4ab1, %edx           # imm = 0x4AB1
leaq 0xa6045(%rip), %rcx     # 0x394855
callq 0x2130
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rax
movq -0x50(%rbp), %rcx
shrq %rcx
movl (%rax,%rcx,8), %eax
shrl $0x1f, %eax
cmpl $0x0, %eax
jne 0x2ee849
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rax
movq -0x58(%rbp), %rcx
shrq %rcx
movl (%rax,%rcx,8), %eax
shrl $0x1f, %eax
cmpl $0x0, %eax
je 0x2ee856
movq $0x0, -0x8(%rbp)
jmp 0x2eedd9
movq -0x10(%rbp), %rax
movq 0x28(%rax), %rax
movq -0x50(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movl %eax, %eax
movq %rax, -0x40(%rbp)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x10(%rbp), %rcx
movq 0x28(%rcx), %rcx
movq -0x50(%rbp), %rdx
movq (%rcx,%rdx,8), %rcx
shrq $0x20, %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x70(%rbp)
movq $0x0, -0x48(%rbp)
movq -0x48(%rbp), %rax
cmpq -0x40(%rbp), %rax
jae 0x2ee920
movq -0x70(%rbp), %rax
imulq $0x18, -0x48(%rbp), %rcx
addq %rcx, %rax
movl 0xc(%rax), %eax
shrl $0x1f, %eax
cmpl $0x0, %eax
je 0x2ee8be
jmp 0x2ee90f
movq -0x70(%rbp), %rax
imulq $0x18, -0x48(%rbp), %rcx
addq %rcx, %rax
movl 0x8(%rax), %eax
cmpq -0x58(%rbp), %rax
jne 0x2ee90d
movq -0x70(%rbp), %rax
imulq $0x18, -0x48(%rbp), %rcx
addq %rcx, %rax
movw 0x10(%rax), %ax
andw $0x3fff, %ax            # imm = 0x3FFF
movzwl %ax, %eax
cmpq -0x68(%rbp), %rax
jae 0x2ee90b
movq -0x70(%rbp), %rax
imulq $0x18, -0x48(%rbp), %rcx
addq %rcx, %rax
movw 0x10(%rax), %ax
andw $0x3fff, %ax            # imm = 0x3FFF
movzwl %ax, %eax
movq %rax, -0x68(%rbp)
jmp 0x2ee920
jmp 0x2ee90f
movq -0x48(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x48(%rbp)
jmp 0x2ee89b
movq -0x48(%rbp), %rax
cmpq -0x40(%rbp), %rax
jb 0x2ee937
movq $0x0, -0x8(%rbp)
jmp 0x2eedd9
movq -0x10(%rbp), %rax
movq 0x28(%rax), %rax
movq -0x58(%rbp), %rcx
xorq $0x1, %rcx
movq (%rax,%rcx,8), %rax
movl %eax, %eax
movq %rax, -0x40(%rbp)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x10(%rbp), %rcx
movq 0x28(%rcx), %rcx
movq -0x58(%rbp), %rdx
xorq $0x1, %rdx
movq (%rcx,%rdx,8), %rcx
shrq $0x20, %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x70(%rbp)
movq $0x0, -0x48(%rbp)
movq -0x48(%rbp), %rax
cmpq -0x40(%rbp), %rax
jae 0x2eea14
movq -0x70(%rbp), %rax
imulq $0x18, -0x48(%rbp), %rcx
addq %rcx, %rax
movl 0xc(%rax), %eax
shrl $0x1f, %eax
cmpl $0x0, %eax
je 0x2ee9ab
jmp 0x2eea03
movq -0x70(%rbp), %rax
imulq $0x18, -0x48(%rbp), %rcx
addq %rcx, %rax
movl 0x8(%rax), %eax
movq -0x50(%rbp), %rcx
xorq $0x1, %rcx
cmpq %rcx, %rax
jne 0x2eea01
movq -0x70(%rbp), %rax
imulq $0x18, -0x48(%rbp), %rcx
addq %rcx, %rax
movw 0x10(%rax), %ax
andw $0x3fff, %ax            # imm = 0x3FFF
movzwl %ax, %eax
cmpq -0x68(%rbp), %rax
jae 0x2ee9ff
movq -0x70(%rbp), %rax
imulq $0x18, -0x48(%rbp), %rcx
addq %rcx, %rax
movw 0x10(%rax), %ax
andw $0x3fff, %ax            # imm = 0x3FFF
movzwl %ax, %eax
movq %rax, -0x68(%rbp)
jmp 0x2eea14
jmp 0x2eea03
movq -0x48(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x48(%rbp)
jmp 0x2ee984
movq -0x48(%rbp), %rax
cmpq -0x40(%rbp), %rax
jb 0x2eea2b
movq $0x0, -0x8(%rbp)
jmp 0x2eedd9
cmpq $0x0, -0x38(%rbp)
je 0x2eeaae
movq -0x50(%rbp), %rax
cmpq -0x18(%rbp), %rax
je 0x2eea6d
movq -0x50(%rbp), %rax
cmpq -0x20(%rbp), %rax
je 0x2eea6d
movq -0x10(%rbp), %rdi
movq -0x50(%rbp), %rax
movl %eax, %esi
xorl %eax, %eax
movl %eax, %edx
xorl %ecx, %ecx
callq 0x311ba0
cmpl $0x1, %eax
je 0x2eea6d
movq $0x0, -0x8(%rbp)
jmp 0x2eedd9
movq -0x58(%rbp), %rax
cmpq -0x18(%rbp), %rax
je 0x2eeaac
movq -0x58(%rbp), %rax
cmpq -0x20(%rbp), %rax
je 0x2eeaac
movq -0x10(%rbp), %rdi
movq -0x58(%rbp), %rax
xorq $0x1, %rax
movl %eax, %esi
xorl %eax, %eax
movl %eax, %edx
xorl %ecx, %ecx
callq 0x311ba0
cmpl $0x1, %eax
je 0x2eeaac
movq $0x0, -0x8(%rbp)
jmp 0x2eedd9
jmp 0x2eeaae
movq -0x58(%rbp), %rax
movq %rax, -0x50(%rbp)
movq -0x60(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x60(%rbp)
jmp 0x2ee7b7
cmpq $-0x1, -0x20(%rbp)
je 0x2eed72
movq -0x20(%rbp), %rax
movq %rax, -0x58(%rbp)
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rax
movq -0x50(%rbp), %rcx
shrq %rcx
movl (%rax,%rcx,8), %eax
shrl $0x1f, %eax
cmpl $0x0, %eax
jne 0x2eeb0e
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rax
movq -0x58(%rbp), %rcx
shrq %rcx
movl (%rax,%rcx,8), %eax
shrl $0x1f, %eax
cmpl $0x0, %eax
je 0x2eeb1b
movq $0x0, -0x8(%rbp)
jmp 0x2eedd9
movq -0x10(%rbp), %rax
movq 0x28(%rax), %rax
movq -0x50(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movl %eax, %eax
movq %rax, -0x40(%rbp)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x10(%rbp), %rcx
movq 0x28(%rcx), %rcx
movq -0x50(%rbp), %rdx
movq (%rcx,%rdx,8), %rcx
shrq $0x20, %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x70(%rbp)
movq $0x0, -0x48(%rbp)
movq -0x48(%rbp), %rax
cmpq -0x40(%rbp), %rax
jae 0x2eebe5
movq -0x70(%rbp), %rax
imulq $0x18, -0x48(%rbp), %rcx
addq %rcx, %rax
movl 0xc(%rax), %eax
shrl $0x1f, %eax
cmpl $0x0, %eax
je 0x2eeb83
jmp 0x2eebd4
movq -0x70(%rbp), %rax
imulq $0x18, -0x48(%rbp), %rcx
addq %rcx, %rax
movl 0x8(%rax), %eax
cmpq -0x58(%rbp), %rax
jne 0x2eebd2
movq -0x70(%rbp), %rax
imulq $0x18, -0x48(%rbp), %rcx
addq %rcx, %rax
movw 0x10(%rax), %ax
andw $0x3fff, %ax            # imm = 0x3FFF
movzwl %ax, %eax
cmpq -0x68(%rbp), %rax
jae 0x2eebd0
movq -0x70(%rbp), %rax
imulq $0x18, -0x48(%rbp), %rcx
addq %rcx, %rax
movw 0x10(%rax), %ax
andw $0x3fff, %ax            # imm = 0x3FFF
movzwl %ax, %eax
movq %rax, -0x68(%rbp)
jmp 0x2eebe5
jmp 0x2eebd4
movq -0x48(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x48(%rbp)
jmp 0x2eeb60
movq -0x48(%rbp), %rax
cmpq -0x40(%rbp), %rax
jb 0x2eebfc
movq $0x0, -0x8(%rbp)
jmp 0x2eedd9
movq -0x10(%rbp), %rax
movq 0x28(%rax), %rax
movq -0x58(%rbp), %rcx
xorq $0x1, %rcx
movq (%rax,%rcx,8), %rax
movl %eax, %eax
movq %rax, -0x40(%rbp)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x10(%rbp), %rcx
movq 0x28(%rcx), %rcx
movq -0x58(%rbp), %rdx
xorq $0x1, %rdx
movq (%rcx,%rdx,8), %rcx
shrq $0x20, %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x70(%rbp)
movq $0x0, -0x48(%rbp)
movq -0x48(%rbp), %rax
cmpq -0x40(%rbp), %rax
jae 0x2eecd9
movq -0x70(%rbp), %rax
imulq $0x18, -0x48(%rbp), %rcx
addq %rcx, %rax
movl 0xc(%rax), %eax
shrl $0x1f, %eax
cmpl $0x0, %eax
je 0x2eec70
jmp 0x2eecc8
movq -0x70(%rbp), %rax
imulq $0x18, -0x48(%rbp), %rcx
addq %rcx, %rax
movl 0x8(%rax), %eax
movq -0x50(%rbp), %rcx
xorq $0x1, %rcx
cmpq %rcx, %rax
jne 0x2eecc6
movq -0x70(%rbp), %rax
imulq $0x18, -0x48(%rbp), %rcx
addq %rcx, %rax
movw 0x10(%rax), %ax
andw $0x3fff, %ax            # imm = 0x3FFF
movzwl %ax, %eax
cmpq -0x68(%rbp), %rax
jae 0x2eecc4
movq -0x70(%rbp), %rax
imulq $0x18, -0x48(%rbp), %rcx
addq %rcx, %rax
movw 0x10(%rax), %ax
andw $0x3fff, %ax            # imm = 0x3FFF
movzwl %ax, %eax
movq %rax, -0x68(%rbp)
jmp 0x2eecd9
jmp 0x2eecc8
movq -0x48(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x48(%rbp)
jmp 0x2eec49
movq -0x48(%rbp), %rax
cmpq -0x40(%rbp), %rax
jb 0x2eecf0
movq $0x0, -0x8(%rbp)
jmp 0x2eedd9
cmpq $0x0, -0x38(%rbp)
je 0x2eed70
movq -0x50(%rbp), %rax
cmpq -0x18(%rbp), %rax
je 0x2eed32
movq -0x50(%rbp), %rax
cmpq -0x20(%rbp), %rax
je 0x2eed32
movq -0x10(%rbp), %rdi
movq -0x50(%rbp), %rax
movl %eax, %esi
xorl %eax, %eax
movl %eax, %edx
xorl %ecx, %ecx
callq 0x311ba0
cmpl $0x1, %eax
je 0x2eed32
movq $0x0, -0x8(%rbp)
jmp 0x2eedd9
movq -0x58(%rbp), %rax
cmpq -0x18(%rbp), %rax
je 0x2eed6e
movq -0x58(%rbp), %rax
cmpq -0x20(%rbp), %rax
je 0x2eed6e
movq -0x10(%rbp), %rdi
movq -0x58(%rbp), %rax
xorq $0x1, %rax
movl %eax, %esi
xorl %eax, %eax
movl %eax, %edx
xorl %ecx, %ecx
callq 0x311ba0
cmpl $0x1, %eax
je 0x2eed6e
movq $0x0, -0x8(%rbp)
jmp 0x2eedd9
jmp 0x2eed70
jmp 0x2eed72
movq -0x10(%rbp), %rdi
movq -0x28(%rbp), %rax
movq (%rax), %rsi
xorq $0x1, %rsi
callq 0x2ee2e0
cmpq $0x0, %rax
jne 0x2eed96
movq $0x0, -0x8(%rbp)
jmp 0x2eedd9
movq -0x10(%rbp), %rdi
movq -0x28(%rbp), %rax
movq -0x30(%rbp), %rcx
subq $0x1, %rcx
movq (%rax,%rcx,8), %rsi
callq 0x2ee2e0
cmpq $0x0, %rax
jne 0x2eedbf
movq $0x0, -0x8(%rbp)
jmp 0x2eedd9
cmpq $0x0, 0x10(%rbp)
je 0x2eedd1
movq -0x68(%rbp), %rcx
movq 0x10(%rbp), %rax
movq %rcx, (%rax)
movq $0x1, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x70, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)