// File: /workspace/github_c_makefile_star2_O2/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x658, %rsp            # imm = 0x658
movb $0x1, 0x12364(%rip)     # 0x2fa38
leaq 0x11005(%rip), %r12     # 0x2e6e0
leaq 0x150(%rsp), %r13
pushq $0x40
popq %r14
pushq $0x1
popq %r15
leaq 0x11ebe(%rip), %r8      # 0x2f5b0
xorl %ecx, %ecx
cmpq $0x10, %rcx
jne 0x1d710
xorl %eax, %eax
cmpq $0x10, %rax
je 0x1d71e
andq $0x0, 0x1d0(%rsp,%rax,8)
incq %rax
jmp 0x1d6fc
andq $0x0, 0x150(%rsp,%rcx,8)
incq %rcx
jmp 0x1d6f4
xorl %eax, %eax
cmpq $0x10, %rax
je 0x1d731
andq $0x0, 0x50(%rsp,%rax,8)
incq %rax
jmp 0x1d720
movl 0x122f9(%rip), %eax     # 0x2fa30
xorl %esi, %esi
testl %eax, %eax
cmovlel %esi, %eax
imulq $0x90, %rax, %rdi
xorl %ebp, %ebp
cmpq %rsi, %rdi
je 0x1d7b9
movl 0x88(%rsi,%r8), %ecx
testl %ecx, %ecx
je 0x1d77e
cmpl %ecx, %ebp
cmovlel %ecx, %ebp
movl %ecx, %eax
cltd
idivl %r14d
movslq %eax, %rdx
shll $0x6, %eax
subl %eax, %ecx
movq %r15, %rax
shlq %cl, %rax
orq %rax, 0x150(%rsp,%rdx,8)
orq %rax, 0x50(%rsp,%rdx,8)
movl 0x8c(%rsi,%r8), %ecx
testl %ecx, %ecx
je 0x1d7b0
cmpl %ecx, %ebp
cmovlel %ecx, %ebp
movl %ecx, %eax
cltd
idivl %r14d
movslq %eax, %rdx
shll $0x6, %eax
subl %eax, %ecx
movq %r15, %rax
shlq %cl, %rax
orq %rax, 0x150(%rsp,%rdx,8)
orq %rax, 0x50(%rsp,%rdx,8)
addq $0x90, %rsi
jmp 0x1d747
movq 0x10f20(%rip), %rax     # 0x2e6e0
cmpq %r12, %rax
je 0x1d830
movq (%rax), %rsi
movl -0x40(%rax), %ecx
movl -0x18(%rax), %edx
cmpl %ecx, %ebp
cmovlel %ecx, %ebp
cmpl -0x14(%rax), %edx
jle 0x1d7f9
movl %ecx, %eax
cltd
idivl %r14d
movslq %eax, %rdx
shll $0x6, %eax
subl %eax, %ecx
movq %r15, %rax
shlq %cl, %rax
leaq (%rsp,%rdx,8), %rcx
addq $0x1d0, %rcx            # imm = 0x1D0
jmp 0x1d823
movl -0x8(%rax), %edi
addl $-0x3, %edi
movl %ecx, %eax
cltd
idivl %r14d
movslq %eax, %rdx
shll $0x6, %eax
subl %eax, %ecx
movq %r15, %rax
shlq %cl, %rax
cmpl $0x2, %edi
jb 0x1d826
leaq (%rsp,%rdx,8), %rcx
addq $0x150, %rcx            # imm = 0x150
orq %rax, (%rcx)
orq %rax, 0x50(%rsp,%rdx,8)
movq %rsi, %rax
jmp 0x1d7c0
movq 0x11d59(%rip), %rdi     # 0x2f590
movq %r13, %rsi
leaq 0x1d0(%rsp), %rdx
leaq 0x50(%rsp), %rcx
callq *0x30(%rdi)
testl %eax, %eax
js 0x1e272
movl %eax, %ebx
cmpl %eax, %ebp
cmovgl %ebp, %ebx
xorl %r14d, %r14d
leaq 0x1d0(%rsp), %rbp
movslq 0x11d2d(%rip), %rax     # 0x2f598
cmpq %rax, %r14
jge 0x1d89b
movq 0x11d29(%rip), %rax     # 0x2f5a0
movq (%rax,%r14,8), %rdi
movq %r13, %rsi
movq %rbp, %rdx
leaq 0x50(%rsp), %rcx
callq *0x30(%rdi)
testl %eax, %eax
js 0x1e272
cmpl %eax, %ebx
cmovlel %eax, %ebx
incq %r14
jmp 0x1d864
andq $0x0, 0x40(%rsp)
movq $0xc350, 0x48(%rsp)     # imm = 0xC350
incl %ebx
movl %ebx, %edi
movq %r13, %rsi
movq %rbp, %rdx
leaq 0x50(%rsp), %rcx
leaq 0x40(%rsp), %r8
callq 0x3350
cmpl $-0x1, %eax
je 0x1e184
cmpb $0x1, 0x12165(%rip)     # 0x2fa38
pushq $0x40
popq %r14
jne 0x1e287
xorl %edi, %edi
callq 0x3320
movq %rax, 0x30(%rsp)
leaq 0x11d4c(%rip), %r13     # 0x2f63c
xorl %ebx, %ebx
movslq 0x12137(%rip), %rcx     # 0x2fa30
movb 0x12139(%rip), %al      # 0x2fa38
cmpq %rcx, %rbx
jge 0x1dc81
testb $0x1, %al
je 0x1dc81
movl -0x4(%r13), %ebp
testl %ebp, %ebp
je 0x1da9c
movl %ebp, %eax
cltd
idivl %r14d
movl %edx, %ecx
cltq
movq 0x50(%rsp,%rax,8), %rsi
movq %r15, %rdx
shlq %cl, %rdx
btq %rcx, %rsi
jb 0x1e217
testq %rdx, 0x150(%rsp,%rax,8)
je 0x1da9c
movq %rbx, 0x20(%rsp)
movl $0x88, %edx
leaq 0x250(%rsp), %rbx
movq %rbx, %rdi
xorl %esi, %esi
callq 0x31f0
movl $0x80, 0x2d0(%rsp)
movl %ebp, %edi
movq %rbx, %rsi
leaq 0x2d0(%rsp), %rdx
callq 0x3110
movl %eax, %ebp
xorl %eax, %eax
callq 0x165f5
movl (%rax), %eax
cmpl $-0x1, %ebp
je 0x1da0d
cmpl $0x8, %eax
jl 0x1d9cb
leaq 0x250(%rsp), %rdi
callq 0x16d82
pushq $0x8
popq %rdi
leaq 0x5a14(%rip), %rsi      # 0x233c2
leaq 0x67c7(%rip), %rdx      # 0x2417c
movl $0x2b1, %ecx            # imm = 0x2B1
leaq 0x67e6(%rip), %r8       # 0x241a7
movq %rax, %r9
xorl %eax, %eax
callq 0x1662e
movl %ebp, %edi
callq 0x16ba5
testl %eax, %eax
movq 0x20(%rsp), %rbx
je 0x1da56
xorl %eax, %eax
callq 0x165f5
cmpl $0x3, (%rax)
jl 0x1da95
pushq $0x3
popq %rdi
leaq 0x59cd(%rip), %rsi      # 0x233c2
leaq 0x6780(%rip), %rdx      # 0x2417c
movl $0x2b4, %ecx            # imm = 0x2B4
leaq 0x4dcd(%rip), %r8       # 0x227d5
jmp 0x1da8e
cmpl $0x3, %eax
movq 0x20(%rsp), %rbx
jl 0x1da9c
callq 0x3040
movl (%rax), %ebp
movl %ebp, %edi
callq 0x3140
movq %rax, (%rsp)
pushq $0x3
popq %rdi
leaq 0x598b(%rip), %rsi      # 0x233c2
leaq 0x673e(%rip), %rdx      # 0x2417c
movl $0x2ae, %ecx            # imm = 0x2AE
leaq 0x673e(%rip), %r8       # 0x24188
movl %ebp, %r9d
xorl %eax, %eax
callq 0x1662e
jmp 0x1da9c
movl %ebp, %edi
callq 0x16cb8
testl %eax, %eax
je 0x1dc42
xorl %eax, %eax
callq 0x165f5
cmpl $0x3, (%rax)
jl 0x1da95
pushq $0x3
popq %rdi
leaq 0x5947(%rip), %rsi      # 0x233c2
leaq 0x66fa(%rip), %rdx      # 0x2417c
movl $0x2ba, %ecx            # imm = 0x2BA
leaq 0x672e(%rip), %r8       # 0x241bc
xorl %eax, %eax
callq 0x1662e
movl %ebp, %edi
callq 0x3680
movl (%r13), %edi
testl %edi, %edi
leaq 0x1d0(%rsp), %rbp
je 0x1db53
movl %edi, %eax
cltd
idivl %r14d
movl %edx, %ecx
cltq
movq 0x50(%rsp,%rax,8), %rsi
movq %r15, %rdx
shlq %cl, %rdx
btq %rcx, %rsi
jb 0x1e242
testq %rdx, 0x150(%rsp,%rax,8)
je 0x1db53
xorps %xmm0, %xmm0
movaps %xmm0, 0x140(%rsp)
movaps %xmm0, 0x130(%rsp)
movaps %xmm0, 0x120(%rsp)
movaps %xmm0, 0x110(%rsp)
movaps %xmm0, 0x100(%rsp)
movaps %xmm0, 0xf0(%rsp)
movaps %xmm0, 0xe0(%rsp)
movaps %xmm0, 0xd0(%rsp)
movl $0x80, 0x2c(%rsp)
leaq 0x250(%rsp), %rsi
movl $0x401, %edx            # imm = 0x401
leaq 0xd0(%rsp), %rcx
leaq 0x2c(%rsp), %r8
callq 0x17e7a
movl %eax, %r14d
leal 0x1(%r14), %eax
cmpl $0x2, %eax
jae 0x1db62
pushq $0x40
popq %r14
incq %rbx
addq $0x90, %r13
jmp 0x1d8f2
xorl %eax, %eax
callq 0x165f5
cmpl $0x8, (%rax)
jl 0x1dba6
leaq 0xd0(%rsp), %rdi
callq 0x16d82
movq %rax, (%rsp)
pushq $0x8
popq %rdi
leaq 0x5839(%rip), %rsi      # 0x233c2
leaq 0x6645(%rip), %rdx      # 0x241d5
movl $0x28d, %ecx            # imm = 0x28D
leaq 0x6649(%rip), %r8       # 0x241e5
movl %r14d, %r9d
xorl %eax, %eax
callq 0x1662e
xorl %eax, %eax
callq 0x165f5
cmpl $0x8, (%rax)
jl 0x1dbce
xorl %eax, %eax
callq 0x165f5
cmpl $0x7, (%rax)
jl 0x1dbce
leaq 0x250(%rsp), %rdi
movl %r14d, %esi
callq 0x1bfda
cmpl $0x401, %r14d           # imm = 0x401
jl 0x1dc10
xorl %eax, %eax
callq 0x165f5
cmpl $0x3, (%rax)
jl 0x1db4f
pushq $0x3
popq %rdi
leaq 0x57d1(%rip), %rsi      # 0x233c2
leaq 0x65dd(%rip), %rdx      # 0x241d5
movl $0x294, %ecx            # imm = 0x294
leaq 0x6608(%rip), %r8       # 0x2420c
xorl %eax, %eax
callq 0x1662e
jmp 0x1db4f
movslq %r14d, %rax
movb $0x0, 0x250(%rsp,%rax)
movl 0x2c(%rsp), %r8d
leaq 0x250(%rsp), %rdi
movl %r14d, %esi
movl %ebx, %edx
leaq 0xd0(%rsp), %rcx
xorl %r9d, %r9d
callq 0x1e332
jmp 0x1db4f
movl %ebp, %edi
movl %ebx, %esi
callq 0x1807b
testq %rax, %rax
je 0x1da95
movq %rax, %rcx
addq $0x40, %rcx
movq %r12, 0x40(%rax)
movq 0x10a82(%rip), %rdx     # 0x2e6e8
movq %rdx, 0x48(%rax)
movq %rcx, (%rdx)
movq %rcx, 0x10a74(%rip)     # 0x2e6e8
movq %rax, %rdi
callq 0x1e308
jmp 0x1da9c
movq 0x10a58(%rip), %rbx     # 0x2e6e0
leaq 0x150(%rsp), %r13
cmpq %r12, %rbx
je 0x1e063
testb $0x1, %al
je 0x1e063
leaq -0x40(%rbx), %rcx
movq (%rbx), %rax
movq %rax, 0x38(%rsp)
movq %rcx, 0x20(%rsp)
movl (%rcx), %r13d
movl %r13d, %eax
cltd
idivl %r14d
movl %edx, %ecx
cltq
movq 0x50(%rsp,%rax,8), %rsi
movq %r15, %rdx
shlq %cl, %rdx
btq %rcx, %rsi
jae 0x1dd28
movl %r13d, %edi
callq 0x16d2f
movl %eax, %ebp
xorl %r12d, %r12d
xorl %eax, %eax
callq 0x165f5
cmpl $0x3, (%rax)
jl 0x1dfcf
movl %ebp, %edi
callq 0x3140
movq %rax, (%rsp)
xorl %r12d, %r12d
pushq $0x3
popq %rdi
leaq 0x56bc(%rip), %rsi      # 0x233c2
leaq 0x63d0(%rip), %rdx      # 0x240dd
movl $0x3df, %ecx            # imm = 0x3DF
leaq 0x642b(%rip), %r8       # 0x24144
movl %ebp, %r9d
xorl %eax, %eax
callq 0x1662e
jmp 0x1dfcf
testq %rdx, 0x150(%rsp,%rax,8)
je 0x1de8c
leaq -0x38(%rbx), %rbp
movl -0x30(%rbx), %esi
movl -0x28(%rbx), %edx
subl %esi, %edx
cmpl $0x402, %edx            # imm = 0x402
jg 0x1dd6a
addl $0x403, %esi            # imm = 0x403
movq %rbp, %rdi
callq 0x1b9d4
testl %eax, %eax
jne 0x1df0f
movl -0x30(%rbx), %esi
movl %esi, %edx
notl %edx
addl -0x28(%rbx), %edx
movslq %esi, %r14
addq (%rbp), %r14
movl %r13d, %edi
movq %r14, %rsi
callq 0x17d02
cmpl $-0x1, %eax
je 0x1df17
movl %eax, %r13d
testl %eax, %eax
je 0x1dfc8
movslq -0x30(%rbx), %rax
movslq %r13d, %rcx
addq %rcx, %rax
movl %eax, -0x30(%rbx)
movq -0x38(%rbx), %rdx
movb $0x0, (%rdx,%rax)
addq %rcx, 0x18(%rbx)
xorl %eax, %eax
callq 0x165f5
cmpl $0x8, (%rax)
jl 0x1ddec
movq 0x20(%rsp), %rax
movl (%rax), %edi
callq 0x16e1e
movq %rax, (%rsp)
pushq $0x8
popq %rdi
leaq 0x55f3(%rip), %rsi      # 0x233c2
leaq 0x655c(%rip), %rdx      # 0x24332
movl $0x31e, %ecx            # imm = 0x31E
leaq 0x655a(%rip), %r8       # 0x2433c
movl %r13d, %r9d
xorl %eax, %eax
callq 0x1662e
xorl %eax, %eax
callq 0x165f5
cmpl $0x8, (%rax)
jl 0x1de0f
xorl %eax, %eax
callq 0x165f5
cmpl $0x7, (%rax)
jl 0x1de0f
movq %r14, %rdi
movl %r13d, %esi
callq 0x1bfda
movl -0x2c(%rbx), %r14d
movl -0x30(%rbx), %r12d
subl %r14d, %r12d
cmpl $0x6, %r12d
jl 0x1df71
movq %rbp, %rdi
movl %r14d, %esi
pushq $0x2
popq %rdx
callq 0x1bd16
movl %eax, %r13d
cmpl $0x401, %eax            # imm = 0x401
jge 0x1df2e
movl %r13d, %r14d
addl $0x2, %r14d
cmpl %r14d, %r12d
jl 0x1df6d
movq -0x38(%rbx), %rax
movslq -0x2c(%rbx), %rcx
leaq (%rax,%rcx), %rdi
addq $0x2, %rdi
movl 0x28(%rbx), %edx
xorl %r12d, %r12d
movl %r13d, %esi
movq 0x20(%rsp), %rcx
xorl %r8d, %r8d
pushq $0x1
popq %r9
callq 0x1e332
testl %eax, %eax
jne 0x1dfcb
addl -0x2c(%rbx), %r14d
movl %r14d, -0x2c(%rbx)
jmp 0x1de13
movb $0x1, %r12b
testq %rdx, 0x1d0(%rsp,%rax,8)
je 0x1dfcf
leaq -0x20(%rbx), %rsi
movl %r13d, %edi
callq 0x17be2
cmpl $-0x1, %eax
je 0x1df0f
testl %eax, %eax
je 0x1dfcf
cltq
addq %rax, 0x20(%rbx)
xorl %eax, %eax
callq 0x165f5
cmpl $0x8, (%rax)
jl 0x1def7
movl %r13d, %edi
callq 0x16e1e
pushq $0x8
popq %rdi
leaq 0x54e8(%rip), %rsi      # 0x233c2
leaq 0x6493(%rip), %rdx      # 0x24374
movl $0x33d, %ecx            # imm = 0x33D
leaq 0x6492(%rip), %r8       # 0x2437f
movq %rax, %r9
xorl %eax, %eax
callq 0x1662e
cmpl $0x4, -0x8(%rbx)
jne 0x1df1f
movq 0x20(%rsp), %rdi
pushq $0x3
popq %rsi
callq 0x1e310
jmp 0x1dfcf
xorl %r12d, %r12d
jmp 0x1dfcf
xorl %r12d, %r12d
jmp 0x1dfcb
movq 0x20(%rsp), %rdi
callq 0x1e308
jmp 0x1dfcf
xorl %r12d, %r12d
xorl %eax, %eax
callq 0x165f5
cmpl $0x3, (%rax)
pushq $0x40
popq %r14
jl 0x1dfcf
xorl %r12d, %r12d
pushq $0x3
popq %rdi
leaq 0x5470(%rip), %rsi      # 0x233c2
leaq 0x640a(%rip), %rdx      # 0x24363
movl $0x2e1, %ecx            # imm = 0x2E1
leaq 0x363e(%rip), %r8       # 0x215a3
movl %r13d, %r9d
jmp 0x1dd1c
movl -0x2c(%rbx), %r14d
testl %r14d, %r14d
jle 0x1dfbe
movq %rbp, %rdi
callq 0x1b99d
testl %eax, %eax
je 0x1dfbe
xorl %r12d, %r12d
xorl %eax, %eax
callq 0x165f5
cmpl $0x3, (%rax)
pushq $0x40
popq %r14
jl 0x1dfcf
xorl %r12d, %r12d
pushq $0x3
popq %rdi
leaq 0x5420(%rip), %rsi      # 0x233c2
leaq 0x63ba(%rip), %rdx      # 0x24363
movl $0x2f4, %ecx            # imm = 0x2F4
leaq 0x3615(%rip), %r8       # 0x215ca
xorl %eax, %eax
callq 0x1662e
jmp 0x1dfcf
movq 0x20(%rsp), %rdi
callq 0x1e308
movb $0x1, %r12b
pushq $0x40
popq %r14
cmpb $0x1, 0x11a62(%rip)     # 0x2fa38
leaq 0x150(%rsp), %r13
leaq 0x1d0(%rsp), %rbp
jne 0x1e063
testb %r12b, %r12b
leaq 0x106ee(%rip), %r12     # 0x2e6e0
je 0x1e049
movb $0x1, %al
movq 0x30(%rsp), %rcx
cmpq %rcx, 0x10(%rbx)
movq 0x38(%rsp), %rbx
jg 0x1dc90
xorl %eax, %eax
callq 0x165f5
cmpl $0x3, (%rax)
jl 0x1e049
movq 0x20(%rsp), %rax
movl (%rax), %edi
callq 0x16e1e
pushq $0x3
popq %rdi
leaq 0x5396(%rip), %rsi      # 0x233c2
leaq 0x60aa(%rip), %rdx      # 0x240dd
movl $0x3f3, %ecx            # imm = 0x3F3
leaq 0x612a(%rip), %r8       # 0x24169
movq %rax, %r9
xorl %eax, %eax
callq 0x1662e
movq 0x20(%rsp), %rdi
callq 0x1e2c6
movb 0x119df(%rip), %al      # 0x2fa38
movq 0x38(%rsp), %rbx
jmp 0x1dc90
movq 0x10686(%rip), %rbx     # 0x2e6f0
leaq 0x1067f(%rip), %rax     # 0x2e6f0
cmpq %rax, %rbx
je 0x1e129
movq -0x30(%rbx), %rax
testq %rax, %rax
jle 0x1e129
cmpq 0x30(%rsp), %rax
jg 0x1e129
movq (%rbx), %r12
xorl %eax, %eax
callq 0x165f5
cmpl $0x3, (%rax)
jl 0x1e115
movl -0x58(%rbx), %ebp
movq -0x50(%rbx), %rax
movq 0x10(%rax), %rax
movzwl 0x8(%rax), %edi
callq 0x18a25
movq %rax, %r14
movq -0x50(%rbx), %rax
movq 0x10(%rax), %rax
movzwl 0xa(%rax), %edi
callq 0x18b5a
movq -0x50(%rbx), %rcx
movq 0x10(%rcx), %rcx
movq (%rcx), %rcx
movq %rcx, 0x10(%rsp)
movq %rax, 0x8(%rsp)
movq %r14, (%rsp)
pushq $0x40
popq %r14
pushq $0x3
popq %rdi
leaq 0x52d2(%rip), %rsi      # 0x233c2
leaq 0x6295(%rip), %rdx      # 0x2438c
movl $0x1a4, %ecx            # imm = 0x1A4
leaq 0x629a(%rip), %r8       # 0x2439d
movl %ebp, %r9d
leaq 0x1d0(%rsp), %rbp
xorl %eax, %eax
callq 0x1662e
addq $-0x58, %rbx
movq %rbx, %rdi
callq 0x1ebde
movq %r12, %rbx
jmp 0x1e06a
movq 0x11460(%rip), %rdi     # 0x2f590
movq %r13, %rsi
movq %rbp, %rdx
leaq 0x50(%rsp), %rcx
callq *0x38(%rdi)
testl %eax, %eax
jne 0x1e272
xorl %ebx, %ebx
leaq 0x10591(%rip), %r12     # 0x2e6e0
movslq 0x11442(%rip), %rax     # 0x2f598
cmpq %rax, %rbx
jge 0x1e1fa
movq 0x1143a(%rip), %rax     # 0x2f5a0
movq (%rax,%rbx,8), %rdi
movq %r13, %rsi
movq %rbp, %rdx
leaq 0x50(%rsp), %rcx
callq *0x38(%rdi)
incq %rbx
testl %eax, %eax
je 0x1e14f
jmp 0x1e272
callq 0x3040
movq %rax, %rbx
movl (%rax), %ebp
xorl %eax, %eax
callq 0x165f5
movl (%rax), %eax
cmpl $0x4, %ebp
pushq $0x40
popq %r14
jne 0x1e28b
cmpl $0x7, %eax
jl 0x1e1dd
movl (%rbx), %ebx
movl %ebx, %edi
callq 0x3140
movq %rax, (%rsp)
pushq $0x7
popq %rdi
leaq 0x5202(%rip), %rsi      # 0x233c2
leaq 0x5f16(%rip), %rdx      # 0x240dd
movl $0x3ac, %ecx            # imm = 0x3AC
leaq 0x5f12(%rip), %r8       # 0x240e5
movl %ebx, %r9d
xorl %eax, %eax
callq 0x1662e
xorl %ecx, %ecx
cmpb $0x0, 0x11852(%rip)     # 0x2fa38
movl $0x0, %eax
leaq 0x113be(%rip), %r8      # 0x2f5b0
jne 0x1d6f4
jmp 0x1e275
xorl %ecx, %ecx
cmpb $0x1, 0x11835(%rip)     # 0x2fa38
movl $0x0, %eax
leaq 0x113a1(%rip), %r8      # 0x2f5b0
je 0x1d6f4
jmp 0x1e275
xorl %eax, %eax
callq 0x165f5
cmpl $0x3, (%rax)
jl 0x1e272
leaq 0x5198(%rip), %rsi      # 0x233c2
leaq 0x5eac(%rip), %rdx      # 0x240dd
leaq 0x5ee5(%rip), %r8       # 0x2411d
pushq $0x3
popq %rdi
movl $0x3c3, %ecx            # imm = 0x3C3
jmp 0x1e26b
xorl %eax, %eax
callq 0x165f5
cmpl $0x3, (%rax)
jl 0x1e272
leaq 0x516d(%rip), %rsi      # 0x233c2
leaq 0x5e81(%rip), %rdx      # 0x240dd
leaq 0x5ecd(%rip), %r8       # 0x24130
pushq $0x3
popq %rdi
movl $0x3ce, %ecx            # imm = 0x3CE
xorl %eax, %eax
callq 0x1662e
pushq $-0x1
popq %rax
addq $0x658, %rsp            # imm = 0x658
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
xorl %eax, %eax
jmp 0x1e275
cmpl $0x3, %eax
jl 0x1e272
movl (%rbx), %ebx
movl %ebx, %edi
callq 0x3140
movq %rax, (%rsp)
leaq 0x511e(%rip), %rsi      # 0x233c2
leaq 0x5e32(%rip), %rdx      # 0x240dd
leaq 0x5e4c(%rip), %r8       # 0x240fe
pushq $0x3
popq %rdi
movl $0x3b3, %ecx            # imm = 0x3B3
movl %ebx, %r9d
xorl %eax, %eax
callq 0x1662e
jmp 0x1e272