// File: /workspace/github_c_makefile_star2_O0/GangZhuo[P]dohclient/src/main.c
// Function: do_loop
static int do_loop()
{
	fd_set readset, writeset, errorset;
	sock_t max_fd, fd;
	int i, r;
	time_t now;

	dlitem_t* cur, * nxt;
	peer_t* peer;
	listen_t* listen;

	int is_local_sending;
	int is_closing;

	struct timeval timeout;

	running = 1;
	while (running) {

		FD_ZERO(&readset);
		FD_ZERO(&writeset);
		FD_ZERO(&errorset);

		max_fd = 0;

		for (i = 0; i < listen_num; i++) {
			listen = listens + i;

			if (!running) break;

			if (listen->sock) {
				max_fd = MAX(max_fd, listen->sock);
				FD_SET(listen->sock, &readset);
				FD_SET(listen->sock, &errorset);
			}

			if (listen->usock) {
				max_fd = MAX(max_fd, listen->usock);
				FD_SET(listen->usock, &readset);
				FD_SET(listen->usock, &errorset);
			}
		}

		dllist_foreach(&peers, cur, nxt, peer_t, peer, conn.entry) {

			if (!running) break;

			max_fd = MAX(max_fd, peer->conn.sock);
			is_local_sending = stream_rsize(&peer->conn.ws) > 0;
			is_closing = peer->conn.status == cs_closing ||
				peer->conn.status == cs_rsp_closing;
			if (is_local_sending)
				FD_SET(peer->conn.sock, &writeset);
			/* read when request header is not complete,
			   or remote connection established and not sending data */
			else if (!is_closing)
				FD_SET(peer->conn.sock, &readset);
			FD_SET(peer->conn.sock, &errorset);
		}

		if (!running) break;

		fd = cache->fdset(cache, &readset, &writeset, &errorset);
		if (fd < 0) {
			return -1;
		}

		max_fd = MAX(max_fd, fd);

		for (i = 0; i < channel_num; i++) {
			fd = channels[i]->fdset(channels[i], &readset, &writeset, &errorset);
			if (fd < 0) {
				return -1;
			}
			max_fd = MAX(max_fd, fd);
		}

		timeout.tv_sec = 0;
		timeout.tv_usec = 50 * 1000;

		if (select(max_fd + 1, &readset, &writeset, &errorset, &timeout) == -1) {
			if (errno == EINTR) {
				logd("select(): errno=%d, %s \n", errno, strerror(errno));
				if (!running)
					break;
				continue;
			}
			else {
				loge("select() error: errno=%d, %s \n",
					errno, strerror(errno));
				return -1;
			}
		}

		if (!running) break;

		now = time(NULL);

		for (i = 0; i < listen_num; i++) {
			listen = listens + i;

			if (!running) break;

			if (listen->sock) {
				if (FD_ISSET(listen->sock, &errorset)) {
					loge("listen.sock error\n");
					return -1;
				}

				if (FD_ISSET(listen->sock, &readset)) {
					r = peer_accept(i);
				}
			}

			if (listen->usock) {
				if (FD_ISSET(listen->usock, &errorset)) {
					loge("listen.usock error\n");
					return -1;
				}

				if (FD_ISSET(listen->usock, &readset)) {
					r = server_udp_recv(i);
				}
			}
		}

		dllist_foreach(&peers, cur, nxt, peer_t, peer, conn.entry) {

			if (!running) break;

			if (FD_ISSET(peer->conn.sock, &errorset)) {
				int err = getsockerr(peer->conn.sock);
				loge("peer.conn.sock error: errno=%d, %s \n",
					err, strerror(err));
				r = -1;
			}
			else if (FD_ISSET(peer->conn.sock, &readset)) {
				r = peer_recv(peer);
			}
			else if (FD_ISSET(peer->conn.sock, &writeset)) {
				r = peer_write(peer);
			}
			else {
				r = 0;
			}

			if (!running) break;

			if (!r &&
#if DOHCLIENT_CACHE_API
					!peer->keep_alive &&
#endif
					is_expired(&peer->conn, now)) {
				loge("peer timeout - %s\n", get_sockname(peer->conn.sock));
				r = -1;
			}

			if (r) {
				peer_close(peer);
				continue;
			}
		}

		req_check_expire(now);

		r = cache->step(cache, &readset, &writeset, &errorset);
		if (r) {
			return -1;
		}

		for (i = 0; i < channel_num; i++) {
			r = channels[i]->step(channels[i], &readset, &writeset, &errorset);
			if (r) {
				return -1;
			}
		}
	}

	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x280, %rsp            # imm = 0x280
movl $0x1, 0x12613(%rip)     # 0x42f18
cmpl $0x0, 0x1260c(%rip)     # 0x42f18
je 0x3171f
jmp 0x30914
leaq -0x88(%rbp), %rax
movq %rax, -0x1e8(%rbp)
movl $0x0, -0x1dc(%rbp)
movl -0x1dc(%rbp), %eax
cmpq $0x10, %rax
jae 0x3095e
movq -0x1e8(%rbp), %rax
movl -0x1dc(%rbp), %ecx
movq $0x0, (%rax,%rcx,8)
movl -0x1dc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1dc(%rbp)
jmp 0x3092c
jmp 0x30960
jmp 0x30962
leaq -0x108(%rbp), %rax
movq %rax, -0x1f8(%rbp)
movl $0x0, -0x1ec(%rbp)
movl -0x1ec(%rbp), %eax
cmpq $0x10, %rax
jae 0x309ac
movq -0x1f8(%rbp), %rax
movl -0x1ec(%rbp), %ecx
movq $0x0, (%rax,%rcx,8)
movl -0x1ec(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1ec(%rbp)
jmp 0x3097a
jmp 0x309ae
jmp 0x309b0
leaq -0x188(%rbp), %rax
movq %rax, -0x208(%rbp)
movl $0x0, -0x1fc(%rbp)
movl -0x1fc(%rbp), %eax
cmpq $0x10, %rax
jae 0x309fa
movq -0x208(%rbp), %rax
movl -0x1fc(%rbp), %ecx
movq $0x0, (%rax,%rcx,8)
movl -0x1fc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1fc(%rbp)
jmp 0x309c8
jmp 0x309fc
movl $0x0, -0x18c(%rbp)
movl $0x0, -0x194(%rbp)
movl -0x194(%rbp), %eax
cmpl 0x124f4(%rip), %eax     # 0x42f10
jge 0x30c3d
movslq -0x194(%rbp), %rcx
leaq 0x12060(%rip), %rax     # 0x42a90
imulq $0x90, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x1c0(%rbp)
cmpl $0x0, 0x124d0(%rip)     # 0x42f18
jne 0x30a4f
jmp 0x30c3d
movq -0x1c0(%rbp), %rax
cmpl $0x0, 0x88(%rax)
je 0x30b3b
movl -0x18c(%rbp), %eax
movq -0x1c0(%rbp), %rcx
cmpl 0x88(%rcx), %eax
jge 0x30a8d
movq -0x1c0(%rbp), %rax
movl 0x88(%rax), %eax
movl %eax, -0x210(%rbp)
jmp 0x30a99
movl -0x18c(%rbp), %eax
movl %eax, -0x210(%rbp)
movl -0x210(%rbp), %eax
movl %eax, -0x18c(%rbp)
movq -0x1c0(%rbp), %rax
movl 0x88(%rax), %eax
movl $0x40, %ecx
cltd
idivl %ecx
movl %edx, %eax
movl %eax, %ecx
movl $0x1, %eax
shlq %cl, %rax
movq %rax, %rcx
movq -0x1c0(%rbp), %rax
movl 0x88(%rax), %eax
movl $0x40, %esi
cltd
idivl %esi
cltq
orq -0x88(%rbp,%rax,8), %rcx
movq %rcx, -0x88(%rbp,%rax,8)
movq -0x1c0(%rbp), %rax
movl 0x88(%rax), %eax
movl $0x40, %ecx
cltd
idivl %ecx
movl %edx, %eax
movl %eax, %ecx
movl $0x1, %eax
shlq %cl, %rax
movq %rax, %rcx
movq -0x1c0(%rbp), %rax
movl 0x88(%rax), %eax
movl $0x40, %esi
cltd
idivl %esi
cltq
orq -0x188(%rbp,%rax,8), %rcx
movq %rcx, -0x188(%rbp,%rax,8)
movq -0x1c0(%rbp), %rax
cmpl $0x0, 0x8c(%rax)
je 0x30c27
movl -0x18c(%rbp), %eax
movq -0x1c0(%rbp), %rcx
cmpl 0x8c(%rcx), %eax
jge 0x30b79
movq -0x1c0(%rbp), %rax
movl 0x8c(%rax), %eax
movl %eax, -0x214(%rbp)
jmp 0x30b85
movl -0x18c(%rbp), %eax
movl %eax, -0x214(%rbp)
movl -0x214(%rbp), %eax
movl %eax, -0x18c(%rbp)
movq -0x1c0(%rbp), %rax
movl 0x8c(%rax), %eax
movl $0x40, %ecx
cltd
idivl %ecx
movl %edx, %eax
movl %eax, %ecx
movl $0x1, %eax
shlq %cl, %rax
movq %rax, %rcx
movq -0x1c0(%rbp), %rax
movl 0x8c(%rax), %eax
movl $0x40, %esi
cltd
idivl %esi
cltq
orq -0x88(%rbp,%rax,8), %rcx
movq %rcx, -0x88(%rbp,%rax,8)
movq -0x1c0(%rbp), %rax
movl 0x8c(%rax), %eax
movl $0x40, %ecx
cltd
idivl %ecx
movl %edx, %eax
movl %eax, %ecx
movl $0x1, %eax
shlq %cl, %rax
movq %rax, %rcx
movq -0x1c0(%rbp), %rax
movl 0x8c(%rax), %eax
movl $0x40, %esi
cltd
idivl %esi
cltq
orq -0x188(%rbp,%rax,8), %rcx
movq %rcx, -0x188(%rbp,%rax,8)
jmp 0x30c29
movl -0x194(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x194(%rbp)
jmp 0x30a10
movq 0x10f84(%rip), %rax     # 0x41bc8
movq %rax, -0x1a8(%rbp)
movq -0x1a8(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x1b0(%rbp)
xorl %eax, %eax
movq %rax, %rcx
addq $0x40, %rcx
subq %rcx, %rax
addq -0x1a8(%rbp), %rax
movq %rax, -0x1b8(%rbp)
leaq 0x10f4b(%rip), %rax     # 0x41bc8
cmpq %rax, -0x1a8(%rbp)
sete %al
xorb $-0x1, %al
testb $0x1, %al
jne 0x30c92
jmp 0x30e56
cmpl $0x0, 0x1227f(%rip)     # 0x42f18
jne 0x30ca0
jmp 0x30e56
movl -0x18c(%rbp), %eax
movq -0x1b8(%rbp), %rcx
cmpl (%rcx), %eax
jge 0x30cc2
movq -0x1b8(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x218(%rbp)
jmp 0x30cce
movl -0x18c(%rbp), %eax
movl %eax, -0x218(%rbp)
movl -0x218(%rbp), %eax
movl %eax, -0x18c(%rbp)
movq -0x1b8(%rbp), %rax
movl 0x28(%rax), %eax
movq -0x1b8(%rbp), %rcx
subl 0x2c(%rcx), %eax
cmpl $0x0, %eax
setg %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0x1c4(%rbp)
movq -0x1b8(%rbp), %rcx
movb $0x1, %al
cmpl $0x3, 0x38(%rcx)
movb %al, -0x219(%rbp)
je 0x30d28
movq -0x1b8(%rbp), %rax
cmpl $0x4, 0x38(%rax)
sete %al
movb %al, -0x219(%rbp)
movb -0x219(%rbp), %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0x1c8(%rbp)
cmpl $0x0, -0x1c4(%rbp)
je 0x30d87
movq -0x1b8(%rbp), %rax
movl (%rax), %eax
movl $0x40, %ecx
cltd
idivl %ecx
movl %edx, %eax
movl %eax, %ecx
movl $0x1, %eax
shlq %cl, %rax
movq %rax, %rcx
movq -0x1b8(%rbp), %rax
movl (%rax), %eax
movl $0x40, %esi
cltd
idivl %esi
cltq
orq -0x108(%rbp,%rax,8), %rcx
movq %rcx, -0x108(%rbp,%rax,8)
jmp 0x30dd5
cmpl $0x0, -0x1c8(%rbp)
jne 0x30dd3
movq -0x1b8(%rbp), %rax
movl (%rax), %eax
movl $0x40, %ecx
cltd
idivl %ecx
movl %edx, %eax
movl %eax, %ecx
movl $0x1, %eax
shlq %cl, %rax
movq %rax, %rcx
movq -0x1b8(%rbp), %rax
movl (%rax), %eax
movl $0x40, %esi
cltd
idivl %esi
cltq
orq -0x88(%rbp,%rax,8), %rcx
movq %rcx, -0x88(%rbp,%rax,8)
jmp 0x30dd5
movq -0x1b8(%rbp), %rax
movl (%rax), %eax
movl $0x40, %ecx
cltd
idivl %ecx
movl %edx, %eax
movl %eax, %ecx
movl $0x1, %eax
shlq %cl, %rax
movq %rax, %rcx
movq -0x1b8(%rbp), %rax
movl (%rax), %eax
movl $0x40, %esi
cltd
idivl %esi
cltq
orq -0x188(%rbp,%rax,8), %rcx
movq %rcx, -0x188(%rbp,%rax,8)
movq -0x1b0(%rbp), %rax
movq %rax, -0x1a8(%rbp)
movq -0x1a8(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x1b0(%rbp)
xorl %eax, %eax
movq %rax, %rcx
addq $0x40, %rcx
subq %rcx, %rax
addq -0x1a8(%rbp), %rax
movq %rax, -0x1b8(%rbp)
jmp 0x30c76
cmpl $0x0, 0x120bb(%rip)     # 0x42f18
jne 0x30e64
jmp 0x3171f
movq 0x11c05(%rip), %rax     # 0x42a70
movq 0x30(%rax), %rax
movq 0x11bfa(%rip), %rdi     # 0x42a70
leaq -0x88(%rbp), %rsi
leaq -0x108(%rbp), %rdx
leaq -0x188(%rbp), %rcx
callq *%rax
movl %eax, -0x190(%rbp)
cmpl $0x0, -0x190(%rbp)
jge 0x30ea8
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x31726
movl -0x18c(%rbp), %eax
cmpl -0x190(%rbp), %eax
jge 0x30ec4
movl -0x190(%rbp), %eax
movl %eax, -0x220(%rbp)
jmp 0x30ed0
movl -0x18c(%rbp), %eax
movl %eax, -0x220(%rbp)
movl -0x220(%rbp), %eax
movl %eax, -0x18c(%rbp)
movl $0x0, -0x194(%rbp)
movl -0x194(%rbp), %eax
cmpl 0x11b86(%rip), %eax     # 0x42a78
jge 0x30f9a
movq 0x11b81(%rip), %rax     # 0x42a80
movslq -0x194(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq 0x30(%rax), %rax
movq 0x11b6b(%rip), %rcx     # 0x42a80
movslq -0x194(%rbp), %rdx
movq (%rcx,%rdx,8), %rdi
leaq -0x88(%rbp), %rsi
leaq -0x108(%rbp), %rdx
leaq -0x188(%rbp), %rcx
callq *%rax
movl %eax, -0x190(%rbp)
cmpl $0x0, -0x190(%rbp)
jge 0x30f52
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x31726
movl -0x18c(%rbp), %eax
cmpl -0x190(%rbp), %eax
jge 0x30f6e
movl -0x190(%rbp), %eax
movl %eax, -0x224(%rbp)
jmp 0x30f7a
movl -0x18c(%rbp), %eax
movl %eax, -0x224(%rbp)
movl -0x224(%rbp), %eax
movl %eax, -0x18c(%rbp)
movl -0x194(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x194(%rbp)
jmp 0x30ee6
movq $0x0, -0x1d8(%rbp)
movq $0xc350, -0x1d0(%rbp) # imm = 0xC350
movl -0x18c(%rbp), %edi
addl $0x1, %edi
leaq -0x88(%rbp), %rsi
leaq -0x108(%rbp), %rdx
leaq -0x188(%rbp), %rcx
leaq -0x1d8(%rbp), %r8
callq 0x3360
cmpl $-0x1, %eax
jne 0x310c0
callq 0x3040
cmpl $0x4, (%rax)
jne 0x3105a
jmp 0x30fef
movb $0x0, %al
callq 0x242d0
cmpl $0x7, (%rax)
jl 0x31045
callq 0x3040
movl (%rax), %eax
movl %eax, -0x228(%rbp)
callq 0x3040
movl (%rax), %edi
callq 0x3150
movl -0x228(%rbp), %r9d
movl $0x7, %edi
leaq 0x7b9b(%rip), %rsi      # 0x38bc2
leaq 0x88af(%rip), %rdx      # 0x398dd
movl $0x3ac, %ecx            # imm = 0x3AC
leaq 0x88ab(%rip), %r8       # 0x398e5
movq %rax, (%rsp)
movb $0x0, %al
callq 0x243b0
jmp 0x31047
cmpl $0x0, 0x11eca(%rip)     # 0x42f18
jne 0x31055
jmp 0x3171f
jmp 0x30905
jmp 0x3105c
movb $0x0, %al
callq 0x242d0
cmpl $0x3, (%rax)
jl 0x310b2
callq 0x3040
movl (%rax), %eax
movl %eax, -0x22c(%rbp)
callq 0x3040
movl (%rax), %edi
callq 0x3150
movl -0x22c(%rbp), %r9d
movl $0x3, %edi
leaq 0x7b2e(%rip), %rsi      # 0x38bc2
leaq 0x8842(%rip), %rdx      # 0x398dd
movl $0x3b3, %ecx            # imm = 0x3B3
leaq 0x8857(%rip), %r8       # 0x398fe
movq %rax, (%rsp)
movb $0x0, %al
callq 0x243b0
jmp 0x310b4
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x31726
cmpl $0x0, 0x11e51(%rip)     # 0x42f18
jne 0x310ce
jmp 0x3171f
xorl %eax, %eax
movl %eax, %edi
callq 0x3330
movq %rax, -0x1a0(%rbp)
movl $0x0, -0x194(%rbp)
movl -0x194(%rbp), %eax
cmpl 0x11e1c(%rip), %eax     # 0x42f10
jge 0x3136f
movslq -0x194(%rbp), %rcx
leaq 0x11988(%rip), %rax     # 0x42a90
imulq $0x90, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x1c0(%rbp)
cmpl $0x0, 0x11df8(%rip)     # 0x42f18
jne 0x31127
jmp 0x3136f
movq -0x1c0(%rbp), %rax
cmpl $0x0, 0x88(%rax)
je 0x31240
movq -0x1c0(%rbp), %rax
movl 0x88(%rax), %eax
movl $0x40, %ecx
cltd
idivl %ecx
cltq
movq -0x188(%rbp,%rax,8), %rax
movq %rax, -0x238(%rbp)
movq -0x1c0(%rbp), %rax
movl 0x88(%rax), %eax
movl $0x40, %ecx
cltd
idivl %ecx
movq -0x238(%rbp), %rax
movl %edx, %ecx
movl $0x1, %edx
shlq %cl, %rdx
movq %rdx, %rcx
andq %rcx, %rax
cmpq $0x0, %rax
je 0x311d5
jmp 0x31195
movb $0x0, %al
callq 0x242d0
cmpl $0x3, (%rax)
jl 0x311c7
movl $0x3, %edi
leaq 0x7a15(%rip), %rsi      # 0x38bc2
leaq 0x8729(%rip), %rdx      # 0x398dd
movl $0x3c3, %ecx            # imm = 0x3C3
leaq 0x875d(%rip), %r8       # 0x3991d
movb $0x0, %al
callq 0x243b0
jmp 0x311c9
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x31726
movq -0x1c0(%rbp), %rax
movl 0x88(%rax), %eax
movl $0x40, %ecx
cltd
idivl %ecx
cltq
movq -0x88(%rbp,%rax,8), %rax
movq %rax, -0x240(%rbp)
movq -0x1c0(%rbp), %rax
movl 0x88(%rax), %eax
movl $0x40, %ecx
cltd
idivl %ecx
movq -0x240(%rbp), %rax
movl %edx, %ecx
movl $0x1, %edx
shlq %cl, %rdx
movq %rdx, %rcx
andq %rcx, %rax
cmpq $0x0, %rax
je 0x3123e
movl -0x194(%rbp), %edi
callq 0x31740
movl %eax, -0x198(%rbp)
jmp 0x31240
movq -0x1c0(%rbp), %rax
cmpl $0x0, 0x8c(%rax)
je 0x31359
movq -0x1c0(%rbp), %rax
movl 0x8c(%rax), %eax
movl $0x40, %ecx
cltd
idivl %ecx
cltq
movq -0x188(%rbp,%rax,8), %rax
movq %rax, -0x248(%rbp)
movq -0x1c0(%rbp), %rax
movl 0x8c(%rax), %eax
movl $0x40, %ecx
cltd
idivl %ecx
movq -0x248(%rbp), %rax
movl %edx, %ecx
movl $0x1, %edx
shlq %cl, %rdx
movq %rdx, %rcx
andq %rcx, %rax
cmpq $0x0, %rax
je 0x312ee
jmp 0x312ae
movb $0x0, %al
callq 0x242d0
cmpl $0x3, (%rax)
jl 0x312e0
movl $0x3, %edi
leaq 0x78fc(%rip), %rsi      # 0x38bc2
leaq 0x8610(%rip), %rdx      # 0x398dd
movl $0x3ce, %ecx            # imm = 0x3CE
leaq 0x8657(%rip), %r8       # 0x39930
movb $0x0, %al
callq 0x243b0
jmp 0x312e2
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x31726
movq -0x1c0(%rbp), %rax
movl 0x8c(%rax), %eax
movl $0x40, %ecx
cltd
idivl %ecx
cltq
movq -0x88(%rbp,%rax,8), %rax
movq %rax, -0x250(%rbp)
movq -0x1c0(%rbp), %rax
movl 0x8c(%rax), %eax
movl $0x40, %ecx
cltd
idivl %ecx
movq -0x250(%rbp), %rax
movl %edx, %ecx
movl $0x1, %edx
shlq %cl, %rdx
movq %rdx, %rcx
andq %rcx, %rax
cmpq $0x0, %rax
je 0x31357
movl -0x194(%rbp), %edi
callq 0x319a0
movl %eax, -0x198(%rbp)
jmp 0x31359
jmp 0x3135b
movl -0x194(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x194(%rbp)
jmp 0x310e8
movq 0x10852(%rip), %rax     # 0x41bc8
movq %rax, -0x1a8(%rbp)
movq -0x1a8(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x1b0(%rbp)
xorl %eax, %eax
movq %rax, %rcx
addq $0x40, %rcx
subq %rcx, %rax
addq -0x1a8(%rbp), %rax
movq %rax, -0x1b8(%rbp)
leaq 0x10819(%rip), %rax     # 0x41bc8
cmpq %rax, -0x1a8(%rbp)
sete %al
xorb $-0x1, %al
testb $0x1, %al
jne 0x313c4
jmp 0x31648
cmpl $0x0, 0x11b4d(%rip)     # 0x42f18
jne 0x313d2
jmp 0x31648
movq -0x1b8(%rbp), %rax
movl (%rax), %eax
movl $0x40, %ecx
cltd
idivl %ecx
cltq
movq -0x188(%rbp,%rax,8), %rax
movq %rax, -0x258(%rbp)
movq -0x1b8(%rbp), %rax
movl (%rax), %eax
movl $0x40, %ecx
cltd
idivl %ecx
movq -0x258(%rbp), %rax
movl %edx, %ecx
movl $0x1, %edx
shlq %cl, %rdx
movq %rdx, %rcx
andq %rcx, %rax
cmpq $0x0, %rax
je 0x3149b
movq -0x1b8(%rbp), %rax
movl (%rax), %edi
callq 0x24f80
movl %eax, -0x20c(%rbp)
movb $0x0, %al
callq 0x242d0
cmpl $0x3, (%rax)
jl 0x3148a
movl -0x20c(%rbp), %eax
movl %eax, -0x25c(%rbp)
movl -0x20c(%rbp), %edi
callq 0x3150
movl -0x25c(%rbp), %r9d
movl $0x3, %edi
leaq 0x7756(%rip), %rsi      # 0x38bc2
leaq 0x846a(%rip), %rdx      # 0x398dd
movl $0x3df, %ecx            # imm = 0x3DF
leaq 0x84c5(%rip), %r8       # 0x39944
movq %rax, (%rsp)
movb $0x0, %al
callq 0x243b0
jmp 0x3148c
movl $0xffffffff, -0x198(%rbp) # imm = 0xFFFFFFFF
jmp 0x31571
movq -0x1b8(%rbp), %rax
movl (%rax), %eax
movl $0x40, %ecx
cltd
idivl %ecx
cltq
movq -0x88(%rbp,%rax,8), %rax
movq %rax, -0x268(%rbp)
movq -0x1b8(%rbp), %rax
movl (%rax), %eax
movl $0x40, %ecx
cltd
idivl %ecx
movq -0x268(%rbp), %rax
movl %edx, %ecx
movl $0x1, %edx
shlq %cl, %rdx
movq %rdx, %rcx
andq %rcx, %rax
cmpq $0x0, %rax
je 0x314ff
movq -0x1b8(%rbp), %rdi
callq 0x31b60
movl %eax, -0x198(%rbp)
jmp 0x3156f
movq -0x1b8(%rbp), %rax
movl (%rax), %eax
movl $0x40, %ecx
cltd
idivl %ecx
cltq
movq -0x108(%rbp,%rax,8), %rax
movq %rax, -0x270(%rbp)
movq -0x1b8(%rbp), %rax
movl (%rax), %eax
movl $0x40, %ecx
cltd
idivl %ecx
movq -0x270(%rbp), %rax
movl %edx, %ecx
movl $0x1, %edx
shlq %cl, %rdx
movq %rdx, %rcx
andq %rcx, %rax
cmpq $0x0, %rax
je 0x31563
movq -0x1b8(%rbp), %rdi
callq 0x31d00
movl %eax, -0x198(%rbp)
jmp 0x3156d
movl $0x0, -0x198(%rbp)
jmp 0x3156f
jmp 0x31571
cmpl $0x0, 0x119a0(%rip)     # 0x42f18
jne 0x3157f
jmp 0x31648
cmpl $0x0, -0x198(%rbp)
jne 0x315f1
movq -0x1b8(%rbp), %rdi
movq -0x1a0(%rbp), %rsi
callq 0x31de0
cmpl $0x0, %eax
je 0x315f1
jmp 0x315a2
movb $0x0, %al
callq 0x242d0
cmpl $0x3, (%rax)
jl 0x315e5
movq -0x1b8(%rbp), %rax
movl (%rax), %edi
callq 0x25120
movq %rax, %r9
movl $0x3, %edi
leaq 0x75f7(%rip), %rsi      # 0x38bc2
leaq 0x830b(%rip), %rdx      # 0x398dd
movl $0x3f3, %ecx            # imm = 0x3F3
leaq 0x838b(%rip), %r8       # 0x39969
movb $0x0, %al
callq 0x243b0
jmp 0x315e7
movl $0xffffffff, -0x198(%rbp) # imm = 0xFFFFFFFF
cmpl $0x0, -0x198(%rbp)
je 0x31608
movq -0x1b8(%rbp), %rdi
callq 0x31e10
jmp 0x3160a
jmp 0x3160a
movq -0x1b0(%rbp), %rax
movq %rax, -0x1a8(%rbp)
movq -0x1a8(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x1b0(%rbp)
xorl %eax, %eax
movq %rax, %rcx
addq $0x40, %rcx
subq %rcx, %rax
addq -0x1a8(%rbp), %rax
movq %rax, -0x1b8(%rbp)
jmp 0x313a8
movq -0x1a0(%rbp), %rdi
callq 0x31ed0
movq 0x11415(%rip), %rax     # 0x42a70
movq 0x38(%rax), %rax
movq 0x1140a(%rip), %rdi     # 0x42a70
leaq -0x88(%rbp), %rsi
leaq -0x108(%rbp), %rdx
leaq -0x188(%rbp), %rcx
callq *%rax
movl %eax, -0x198(%rbp)
cmpl $0x0, -0x198(%rbp)
je 0x31698
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x31726
movl $0x0, -0x194(%rbp)
movl -0x194(%rbp), %eax
cmpl 0x113ca(%rip), %eax     # 0x42a78
jge 0x3171a
movq 0x113c9(%rip), %rax     # 0x42a80
movslq -0x194(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq 0x38(%rax), %rax
movq 0x113b3(%rip), %rcx     # 0x42a80
movslq -0x194(%rbp), %rdx
movq (%rcx,%rdx,8), %rdi
leaq -0x88(%rbp), %rsi
leaq -0x108(%rbp), %rdx
leaq -0x188(%rbp), %rcx
callq *%rax
movl %eax, -0x198(%rbp)
cmpl $0x0, -0x198(%rbp)
je 0x31707
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x31726
jmp 0x31709
movl -0x194(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x194(%rbp)
jmp 0x316a2
jmp 0x30905
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x280, %rsp            # imm = 0x280
popq %rbp
retq
nopw %cs:(%rax,%rax)