// File: /workspace/github_c_makefile_star2_O3/xiaowenhuyuehu[P]remote_access/src/core/remote_terminal.c
// Function: sda_run_loop
int sda_run_loop (void)
{
    char *buf = NULL, *buf_hdr = NULL, *session_id = NULL, *tmp_buf = NULL;
    int ret = 0, tmp = 0, tmp_fd = 0, payload = 0, tmp_index = 0, timeout = 0;
    struct timeval tv;
    ConnectInfo_t connInfo;
    fd_set rfds;
    int socketfd_local[DEFAULT_SESSION_COUNT] = {0};
    RemoteTerminalMsgHeader hdr;
    
    buf = malloc(DEFAULT_MSG_BUFFER_LEN);
    if(!buf){
        log_error("failed to alloc memory  "); 
        goto _exit;
    }

    ret = sda_connect_to_cloud();
    if (0 != ret) {
        goto _exit;
    }

    memset(&connInfo, 0x0, sizeof(ConnectInfo_t));
    ret = rd_net_get_conn_info(&g_network, NULL, &connInfo);
    if (0 != ret) {
        log_error("get cloud connect info failed ");
        goto _exit;
    }
    _init_local_fd_array(socketfd_local, DEFAULT_SESSION_COUNT);
    log_info("connect to cloud success, socketfd: %d ", connInfo.sockfd);
    while (g_is_running) {
        tv.tv_sec = 0;
        tv.tv_usec = 500*1000L;
        _add_select_array(connInfo.sockfd, socketfd_local, DEFAULT_SESSION_COUNT, &rfds);

        ret = select(_get_max_socketfd(connInfo.sockfd, socketfd_local, DEFAULT_SESSION_COUNT), &rfds, NULL, NULL, &tv);

        memset(buf, 0, DEFAULT_MSG_BUFFER_LEN);
        if (ret == 0) {
            nopoll_conn_send_ping (g_network.handle);
            if(++timeout >= 30*60){
                log_info("there is no package received in 30 min, close current connection...");
                break;
            } 
        }else if(ret < 0){
            log_error("failed to select: %s , close current connection", strerror(errno));
            _send_error_resp(ERR_CONNECTION_CLOSE, "device network error.", NULL, NULL, buf);
            break;
        }

		//local service
		if(ret > 0)
		{
			int index = _get_active_socketfd_index(socketfd_local, DEFAULT_SESSION_COUNT, &rfds);
			if(index != -1){
				char *token = get_session_id_by_socketfd(socketfd_local + index);
				if(token == NULL){
					log_error("can not find session id for socketfd: %d, close it.", socketfd_local[index]);
					_del_socketfd_by_index(index, socketfd_local, DEFAULT_SESSION_COUNT);
					close(socketfd_local[index]);
					continue;
				}

				ret = recv(socketfd_local[index], buf, DEFAULT_MSG_BUFFER_LEN - DEFAULT_MSG_HDR_LEN, 0);
				timeout = 0; 
				log_debug("recv msg comes from sshd, socketfd: %d, index: %d, len:%d ", socketfd_local[index], index, ret);
				//dump_hex(buf, ret);
				if (ret > 0) {
					buf_hdr = sda_gen_msg_header(MSG_SERVICE_PROVIDER_RAW_PROTOCOL, ret, NULL, token);
					memmove(buf + strlen(buf_hdr), buf, ret);
					memmove(buf, buf_hdr, strlen(buf_hdr));
					tmp = rd_net_write(&g_network, NULL, buf, ret + strlen(buf_hdr), 0);
					log_debug("resend to cloud, len:%d", tmp);
				} else {
					log_error("local service exit:  %s ", strerror(errno));
					free_session(get_session_id_by_socketfd(socketfd_local + index));
					_del_socketfd_by_index(index, socketfd_local, DEFAULT_SESSION_COUNT);
					close(socketfd_local[index]);
					_send_error_resp(ERR_SERVICE_EXIT, "local service exit", NULL, token, buf);
				}
			}
		}
		
		//cloud service
        {
            ret = _read_msg_hdr(buf, DEFAULT_MSG_BUFFER_LEN);
			if(ret < 0)
				continue;
            
            timeout = 0;
            if(0 == get_msg_header(buf, &hdr)){
                log_error("read wrong format data, pending data len: %d", rd_net_read(&g_network, NULL, buf, DEFAULT_MSG_BUFFER_LEN, 0));
                _send_error_resp(ERR_PARAM_INVALID, "cloud msg format is invalid", NULL, NULL, buf);
                continue;
            }
            if(hdr.msg_type == MSG_SERVICE_CONSUMER_NEW_SESSION){
                rd_net_read(&g_network, NULL, buf + strlen(buf), hdr.payload_len + 4, 0);//FIXME, deal with service port
                if(0 == is_session_avalibe()){
                    log_error("session is too much...  ");
                    _send_error_resp(ERR_SESSION_LIMIT, "no available session to be allocated", hdr.msg_id, NULL, buf);
                    continue;
                }

                tmp_fd = sda_connect_to_local_service();
                if(tmp_fd == -1){
                    log_error("failed to connect to local service\n");
                    _send_error_resp(ERR_SERVICE_UNAVALIBE, "local service is not available", hdr.msg_id, NULL, buf);
                    continue;
                }
                tmp_index = _add_localfd(tmp_fd, socketfd_local, DEFAULT_SESSION_COUNT);
                if(tmp_index == DEFAULT_SESSION_COUNT){
                    _send_error_resp(ERR_SESSION_CREATE_FAILED, "socketfd insert error", hdr.msg_id, NULL, buf);
                    close(tmp_fd);
                    log_error("failed to add socketfd");
                    continue;
                }

                session_id = alloc_new_session(socketfd_local + tmp_index);
                if(session_id == NULL){
                    close(tmp_fd);
                    log_error("failed to alloc new session");
                    _send_error_resp(ERR_SESSION_CREATE_FAILED, "memory error", hdr.msg_id, NULL, buf);
                    continue;
                }
                char data[128] = {0};
                snprintf(data, sizeof(data) - 1, "{\"session_id\": \"%s\"}", session_id);
                tmp_buf  = sda_gen_payload_msg(0, data, "new session response");

                buf_hdr = sda_gen_msg_header(MSG_RESP_OK , strlen(tmp_buf), hdr.msg_id, session_id);
                memset(buf, 0, DEFAULT_MSG_BUFFER_LEN);
                snprintf(buf, DEFAULT_MSG_BUFFER_LEN, "%s%s", buf_hdr, tmp_buf); 
                rd_net_write(&g_network, NULL, buf, strlen(buf), 0);
                log_debug("send new session respose to cloud, socketfd: %d, index: %d, %s ", socketfd_local[tmp_index], tmp_index, buf);
                free(session_id);
            } else if(hdr.msg_type == MSG_SERVICE_CONSUMER_RELEASE_SESSION){//TODO
                rd_net_read(&g_network, NULL, buf + strlen(buf), hdr.payload_len, 0);//FIXME, deal with service port
                int _socketfd = get_socketfd_by_session_id(hdr.token);
                if(_socketfd < 0){
                    _send_error_resp(ERR_SESSION_NONEXISTENT, "cannot find local connection by session id", hdr.msg_id, hdr.token, buf);
                    log_error("session is not exist");
                    continue; 
                }
                _del_socketfd_by_id(_socketfd, socketfd_local, DEFAULT_SESSION_COUNT);
                close(_socketfd);

                free_session(hdr.token);

                char data[128] = {0};
                snprintf(data, sizeof(data) - 1, "{\"session_id\": \"%s\"}", hdr.token);
                tmp_buf  = sda_gen_payload_msg(0, data, "release session response");

                buf_hdr = sda_gen_msg_header(MSG_RESP_OK , strlen(tmp_buf), hdr.msg_id, hdr.token);
                memset(buf, 0, DEFAULT_MSG_BUFFER_LEN);
                snprintf(buf, DEFAULT_MSG_BUFFER_LEN, "%s%s", buf_hdr, tmp_buf); 
                rd_net_write(&g_network, NULL, buf, strlen(buf), 0);
                log_debug("send release session respose to cloud, socketfd: %d,  %s ", _socketfd, buf); 
            } else if(hdr.msg_type == MSG_SERVICE_CONSUMER_RAW_PROTOCOL){
                int _socketfd = get_socketfd_by_session_id(hdr.token);
                if(_socketfd < 0){
                    _send_error_resp(ERR_SESSION_NONEXISTENT, "cannot find local connection by session id", hdr.msg_id, hdr.token, buf);
                    log_error("session is not exist"); 
                    continue; 
                }

                int n = 0, nwritten = 0, nread = 0, m = 0;
                log_debug("send payload %d start, session id: %s\n", hdr.payload_len, hdr.token);
                memset(buf, 0, DEFAULT_MSG_BUFFER_LEN);
                while(nread < hdr.payload_len){
                    memset(buf, 0, DEFAULT_MSG_BUFFER_LEN);
                    n = nopoll_conn_read(g_network.handle, buf, hdr.payload_len - nread > DEFAULT_MSG_BUFFER_LEN ? DEFAULT_MSG_BUFFER_LEN : hdr.payload_len - nread, nopoll_true, 1000);
                    if(n == -1)
                        continue;
                    nread += n;
                    //dump_hex(buf, n);
                    nwritten = 0;
                    while(nwritten < n){
                        m = send(_socketfd, buf + nwritten, n - nwritten, 0);
                        nwritten += m;
                        if(m == -1){
                            log_info("resend to local service FAILED, len: %d, payload: %d ", n, payload);
                            free_session(hdr.token);
                            _del_socketfd_by_id(_socketfd, socketfd_local, DEFAULT_SESSION_COUNT);
                            close(_socketfd);
                            _send_error_resp(ERR_SERVICE_EXIT, "local service exit", hdr.msg_id, hdr.token, buf);
                            break;
                        }
                    }
                }
                log_debug("send payload %d done\n", hdr.payload_len);
            } else if(hdr.msg_type == MSG_RESP_OK){
                ret = rd_net_read(&g_network, NULL, buf + strlen(buf), hdr.payload_len, 0);//FIXME, deal with service port
                log_debug("login response: %d %s\n", ret, buf);
                if((0 == strcmp(hdr.msg_id, DEFAULT_MSG_ID_HDSK)) && 
                        (0 == is_login_ok(buf + hdr.hdr_len, hdr.payload_len))){
                    log_error("login to cloud failed ");
                    goto _exit;
                }
            }
        } 
    }

_exit:
    deinit_session_system();
    rd_net_destroy(&g_network);
    _close_all_conn(socketfd_local, DEFAULT_SESSION_COUNT);

    if(buf != NULL)
        free(buf);

    return ret;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xa28, %rsp            # imm = 0xA28
pxor %xmm0, %xmm0
movdqa %xmm0, 0x120(%rsp)
movdqa %xmm0, 0x110(%rsp)
movdqa %xmm0, 0x100(%rsp)
movdqa %xmm0, 0xf0(%rsp)
movdqa %xmm0, 0xe0(%rsp)
movdqa %xmm0, 0xd0(%rsp)
movdqa %xmm0, 0xc0(%rsp)
movdqa %xmm0, 0xb0(%rsp)
movl $0x2000, %edi           # imm = 0x2000
callq 0x2150
movq %rax, %rbx
testq %rax, %rax
je 0x5870
leaq 0x220(%rsp), %rdi
movl $0x800, %edx            # imm = 0x800
xorl %esi, %esi
callq 0x2090
movq 0x7ba1(%rip), %rax      # 0xd3a0
xorl %edx, %edx
cmpb $0x1, 0x3d(%rax)
sete %dl
movq (%rax), %rcx
movq 0x8(%rax), %r8
movzbl 0x3c(%rax), %esi
movq 0x10(%rax), %rax
movq %rax, 0x8(%rsp)
movl %esi, (%rsp)
movq $0x0, 0x10(%rsp)
leaq 0x7b29(%rip), %r14      # 0xd358
movq %r14, %rdi
xorl %esi, %esi
xorl %r9d, %r9d
callq 0x2adf
movq %r14, %rdi
callq 0x28e4
testl %eax, %eax
je 0x58f7
movl %eax, %r13d
leaq 0x3dca(%rip), %rsi      # 0x9620
leaq 0x3dc9(%rip), %rdx      # 0x9626
leaq 0x42f2(%rip), %r8       # 0x9b56
movl $0x3, %edi
movl $0x33, %ecx
jmp 0x5892
leaq 0x3da9(%rip), %rsi      # 0x9620
leaq 0x3da8(%rip), %rdx      # 0x9626
leaq 0x3dbc(%rip), %r8       # 0x9641
xorl %r13d, %r13d
movl $0x3, %edi
movl $0x17e, %ecx            # imm = 0x17E
xorl %eax, %eax
callq 0x42c5
xorl %r14d, %r14d
xorl %eax, %eax
callq 0x7e09
leaq 0x7aae(%rip), %rdi      # 0xd358
callq 0x28a8
movl 0xb0(%rsp,%r14,4), %edi
testl %edi, %edi
jle 0x58cc
callq 0x20c0
movl $0xffffffff, 0xb0(%rsp,%r14,4) # imm = 0xFFFFFFFF
incq %r14
cmpq $0x20, %r14
jne 0x58af
testq %rbx, %rbx
je 0x58e2
movq %rbx, %rdi
callq 0x2250
movl %r13d, %eax
addq $0xa28, %rsp            # imm = 0xA28
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x7aa2(%rip), %rax      # 0xd3a0
movq 0x18(%rax), %rdi
movq 0x20(%rax), %rsi
movq 0x28(%rax), %rdx
callq 0x716a
movq %rax, %r14
movq %rax, %rdi
callq 0x2270
leaq 0x416f(%rip), %rdx      # 0x9a90
movl $0x1, %edi
movl %eax, %esi
xorl %ecx, %ecx
callq 0x7058
movq %rax, %r15
leaq 0x3d40(%rip), %r12      # 0x9679
leaq 0x3ce6(%rip), %r13      # 0x9626
leaq 0x421e(%rip), %r8       # 0x9b65
movl $0x1, %edi
movq %r12, %rsi
movq %r13, %rdx
movl $0x3a, %ecx
movq %rax, %r9
xorl %eax, %eax
callq 0x42c5
leaq 0x4211(%rip), %r8       # 0x9b79
movl $0x1, %edi
movq %r12, %rsi
movq %r13, %rdx
movl $0x3b, %ecx
movq %r14, %r9
xorl %eax, %eax
callq 0x42c5
leaq 0x3fa5(%rip), %rdx      # 0x992e
leaq 0x220(%rsp), %r12
movl $0x800, %esi            # imm = 0x800
movq %r12, %rdi
movq %r15, %rcx
movq %r14, %r8
xorl %eax, %eax
callq 0x20b0
movq %r12, %rdi
callq 0x2270
leaq 0x79a3(%rip), %rdi      # 0xd358
xorl %esi, %esi
movq %r12, %rdx
movl %eax, %ecx
xorl %r8d, %r8d
callq 0x285a
testl %eax, %eax
jle 0x5a57
leaq 0x3ca6(%rip), %rsi      # 0x9679
leaq 0x3c4c(%rip), %rdx      # 0x9626
leaq 0x41c8(%rip), %r8       # 0x9ba9
xorl %r13d, %r13d
movl $0x1, %edi
movl $0x44, %ecx
movl %eax, %r9d
xorl %eax, %eax
callq 0x42c5
pxor %xmm0, %xmm0
leaq 0x1f0(%rsp), %rdx
movdqa %xmm0, (%rdx)
movdqa %xmm0, 0x10(%rdx)
movq $0x0, 0x20(%rdx)
leaq 0x793c(%rip), %rdi      # 0xd358
xorl %esi, %esi
callq 0x2a5a
testl %eax, %eax
je 0x5a88
movl %eax, %ebp
leaq 0x3bf0(%rip), %rsi      # 0x9620
leaq 0x3bef(%rip), %rdx      # 0x9626
leaq 0x3c1c(%rip), %r8       # 0x965a
movl $0x3, %edi
movl $0x18a, %ecx            # imm = 0x18A
xorl %eax, %eax
callq 0x42c5
movl %ebp, %r13d
jmp 0x5899
leaq 0x3bc2(%rip), %rsi      # 0x9620
leaq 0x3bc1(%rip), %rdx      # 0x9626
leaq 0x4121(%rip), %r8       # 0x9b8d
movl $0x3, %edi
movl $0x40, %ecx
xorl %eax, %eax
callq 0x42c5
movl $0xffffffff, %r13d      # imm = 0xFFFFFFFF
jmp 0x5899
pcmpeqd %xmm0, %xmm0
movdqa %xmm0, 0x120(%rsp)
movdqa %xmm0, 0x110(%rsp)
movdqa %xmm0, 0x100(%rsp)
movdqa %xmm0, 0xf0(%rsp)
movdqa %xmm0, 0xe0(%rsp)
movdqa %xmm0, 0xd0(%rsp)
movdqa %xmm0, 0xc0(%rsp)
movdqa %xmm0, 0xb0(%rsp)
movl 0x1f0(%rsp), %r9d
leaq 0x3b96(%rip), %rsi      # 0x9679
leaq 0x3b3c(%rip), %rdx      # 0x9626
leaq 0x3b8e(%rip), %r8       # 0x967f
movl $0x1, %edi
movl $0x18e, %ecx            # imm = 0x18E
xorl %eax, %eax
callq 0x42c5
cmpb $0x0, 0x788f(%rip)      # 0xd398
jne 0x5899
leaq 0x30(%rsp), %r12
leaq 0x160(%rsp), %r14
movq $0x0, 0x18(%rsp)
movq $0x0, 0x140(%rsp)
movq $0x7a120, 0x148(%rsp) # imm = 0x7A120
movl 0x1f0(%rsp), %eax
pxor %xmm0, %xmm0
movdqa %xmm0, 0x170(%rsp)
movdqa %xmm0, 0x180(%rsp)
movdqa %xmm0, 0x190(%rsp)
movdqa %xmm0, 0x1a0(%rsp)
movdqa %xmm0, 0x1b0(%rsp)
movdqa %xmm0, 0x1c0(%rsp)
movdqa %xmm0, 0x1d0(%rsp)
movdqa %xmm0, 0x1e0(%rsp)
testl %eax, %eax
js 0x5bab
movl $0x1, %edx
movl %eax, %ecx
shlq %cl, %rdx
movl %eax, %ecx
shrl $0x6, %ecx
orq %rdx, 0x170(%rsp,%rcx,8)
xorl %edx, %edx
movl 0xb0(%rsp,%rdx,4), %ecx
testl %ecx, %ecx
js 0x5bcb
movl $0x1, %esi
shlq %cl, %rsi
shrl $0x6, %ecx
orq %rsi, 0x170(%rsp,%rcx,8)
incq %rdx
cmpq $0x20, %rdx
jne 0x5bad
pxor %xmm0, %xmm0
xorl %ecx, %ecx
movdqa 0xb0(%rsp,%rcx,4), %xmm1
movdqa %xmm1, %xmm2
pcmpgtd %xmm0, %xmm2
pand %xmm2, %xmm1
pandn %xmm0, %xmm2
movdqa %xmm2, %xmm0
por %xmm1, %xmm0
addq $0x4, %rcx
cmpq $0x20, %rcx
jne 0x5bda
pshufd $0xee, %xmm0, %xmm1     # xmm1 = xmm0[2,3,2,3]
movdqa %xmm0, %xmm2
pcmpgtd %xmm1, %xmm2
pand %xmm2, %xmm0
pandn %xmm1, %xmm2
por %xmm0, %xmm2
pshufd $0x55, %xmm2, %xmm0     # xmm0 = xmm2[1,1,1,1]
movdqa %xmm2, %xmm1
pcmpgtd %xmm0, %xmm1
pand %xmm1, %xmm2
pandn %xmm0, %xmm1
por %xmm2, %xmm1
movd %xmm1, %edi
cmpl %eax, %edi
cmovlel %eax, %edi
incl %edi
leaq 0x170(%rsp), %rsi
xorl %edx, %edx
xorl %ecx, %ecx
leaq 0x140(%rsp), %r8
callq 0x20f0
movl %eax, %r13d
movl $0x2000, %edx           # imm = 0x2000
movq %rbx, %rdi
xorl %esi, %esi
callq 0x2090
testl %r13d, %r13d
je 0x5cb8
js 0x6bde
leaq 0xb0(%rsp), %r15
xorl %ebp, %ebp
movl (%r15), %eax
cmpl $-0x1, %eax
je 0x5ca6
leal 0x3f(%rax), %ecx
testl %eax, %eax
cmovnsl %eax, %ecx
sarl $0x6, %ecx
movslq %ecx, %rcx
movq 0x170(%rsp,%rcx,8), %rcx
btq %rax, %rcx
jb 0x5ce0
incq %rbp
addq $0x4, %r15
cmpq $0x20, %rbp
jne 0x5c82
jmp 0x5eb5
movq 0x76d1(%rip), %rdi      # 0xd390
callq 0x21b0
movq 0x18(%rsp), %rax
cmpl $0x707, %eax            # imm = 0x707
jge 0x6c30
incl %eax
movq %rax, 0x18(%rsp)
jmp 0x5eb5
movq %r15, %rdi
callq 0x815e
testq %rax, %rax
je 0x5dde
movq %rax, %r12
movl (%r15), %edi
movl $0x1c00, %edx           # imm = 0x1C00
movq %rbx, %rsi
xorl %ecx, %ecx
callq 0x2170
movq %rax, %r13
movl (%r15), %r9d
movl %r13d, 0x8(%rsp)
movl %ebp, (%rsp)
xorl %edi, %edi
leaq 0x32e7(%rip), %rsi      # 0x9004
leaq 0x3902(%rip), %rdx      # 0x9626
movl $0x1b2, %ecx            # imm = 0x1B2
leaq 0x3a35(%rip), %r8       # 0x9765
xorl %eax, %eax
callq 0x42c5
testl %r13d, %r13d
jle 0x5e1b
movq $0x0, 0x18(%rsp)
movl $0x15, %edi
movl %r13d, %esi
xorl %edx, %edx
movq %r12, %rcx
callq 0x7058
movq %rax, %r15
movq %rax, %rdi
callq 0x2270
leaq (%rax,%rbx), %rdi
movl %r13d, %edx
andl $0x7fffffff, %edx       # imm = 0x7FFFFFFF
movq %rbx, %rsi
callq 0x23b0
movq %r15, %rdi
callq 0x2270
movq %rbx, %rdi
movq %r15, %rsi
movq %rax, %rdx
callq 0x23b0
movq %r15, %rdi
callq 0x2270
addl %eax, %r13d
leaq 0x75b5(%rip), %rdi      # 0xd358
xorl %esi, %esi
movq %rbx, %rdx
movl %r13d, %ecx
xorl %r8d, %r8d
callq 0x285a
xorl %edi, %edi
leaq 0x3248(%rip), %rsi      # 0x9004
leaq 0x3863(%rip), %rdx      # 0x9626
movl $0x1b9, %ecx            # imm = 0x1B9
leaq 0x39d1(%rip), %r8       # 0x97a0
movl %eax, %r9d
xorl %eax, %eax
callq 0x42c5
jmp 0x5eb0
movl (%r15), %r9d
movl $0x3, %edi
leaq 0x3833(%rip), %rsi      # 0x9620
leaq 0x3832(%rip), %rdx      # 0x9626
movl $0x1aa, %ecx            # imm = 0x1AA
leaq 0x3931(%rip), %r8       # 0x9731
xorl %eax, %eax
callq 0x42c5
cmpq $0x20, %rbp
jae 0x5e74
movl $0xffffffff, (%r15)     # imm = 0xFFFFFFFF
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
jmp 0x5e77
callq 0x2400
movl (%rax), %edi
callq 0x2330
movl $0x3, %edi
leaq 0x37ed(%rip), %rsi      # 0x9620
leaq 0x37ec(%rip), %rdx      # 0x9626
movl $0x1bb, %ecx            # imm = 0x1BB
leaq 0x3972(%rip), %r8       # 0x97b8
movq %rax, %r9
xorl %eax, %eax
callq 0x42c5
movq %r15, %rdi
callq 0x815e
movq %rax, %rdi
callq 0x80d5
cmpq $0x20, %rbp
jae 0x5e86
movl $0xffffffff, (%r15)     # imm = 0xFFFFFFFF
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
jmp 0x5e89
movl (%r15), %edi
leaq 0x30(%rsp), %r12
callq 0x20c0
jmp 0x6325
movl (%r15), %edi
callq 0x20c0
movq $0x0, 0x18(%rsp)
movl $0x18ce5, %edi          # imm = 0x18CE5
leaq 0x392e(%rip), %rsi      # 0x97d1
xorl %edx, %edx
movq %r12, %rcx
movq %rbx, %r8
callq 0x6ca2
leaq 0x30(%rsp), %r12
movl $0x2000, %edx           # imm = 0x2000
movq %rbx, %rdi
xorl %esi, %esi
callq 0x2090
movq %r12, %rdi
xorl %esi, %esi
callq 0x2110
xorl %r13d, %r13d
leaq (%rbx,%r13), %r15
movq 0x74b4(%rip), %rdi      # 0xd390
movl $0x1f4, %r8d            # imm = 0x1F4
movq %r15, %rsi
movl $0x1, %edx
xorl %ecx, %ecx
callq 0x2230
cmpb $0x7b, (%rbx)
jne 0x5f67
cmpl $-0x1, %eax
jne 0x5f55
movq %r14, %rdi
xorl %esi, %esi
callq 0x2110
movq %r14, %rdi
movq %r12, %rsi
leaq 0x150(%rsp), %rdx
callq 0x56cc
imulq $0x3e8, 0x150(%rsp), %rcx # imm = 0x3E8
movabsq $0x20c49ba5e353f7cf, %rax # imm = 0x20C49BA5E353F7CF
imulq 0x158(%rsp)
movq %rdx, %r9
movq %rdx, %rax
shrq $0x3f, %rax
sarq $0x7, %r9
addq %rax, %r9
addq %rcx, %r9
cmpq $0x3e9, %r9             # imm = 0x3E9
jl 0x5ed5
jmp 0x5f72
cmpb $0x7d, (%r15)
je 0x6508
incq %r13
jmp 0x5ed1
movl $0xffffffff, %r13d      # imm = 0xFFFFFFFF
jmp 0x6325
movl %r13d, (%rsp)
movl $0x3, %edi
leaq 0x369e(%rip), %rsi      # 0x9620
leaq 0x369d(%rip), %rdx      # 0x9626
movl $0x152, %ecx            # imm = 0x152
leaq 0x3c30(%rip), %r8       # 0x9bc5
xorl %eax, %eax
callq 0x42c5
testl %r13d, %r13d
js 0x6325
movl $0xa0, %edx
leaq 0x220(%rsp), %rdi
xorl %esi, %esi
callq 0x2090
movq %rbx, %rdi
movl $0x7b, %esi
callq 0x23c0
testq %rax, %rax
je 0x6296
movq %rax, %r12
movq %rbx, %rdi
movl $0x7d, %esi
callq 0x23c0
testq %rax, %rax
je 0x6296
movq %rax, %r15
subq %rbx, %r12
subl %ebx, %r15d
movslq %r12d, %rax
leaq (%rbx,%rax), %r12
subl %eax, %r15d
leal 0x1(%r15), %ebp
movq %r12, %rdi
movl %ebp, %esi
leaq 0x3bd9(%rip), %rdx      # 0x9be4
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x382b
testq %rax, %rax
je 0x6296
movq %rax, %rdi
callq 0x2380
movl %eax, 0x220(%rsp)
movq %r12, %rdi
movl %ebp, %esi
leaq 0x3bb4(%rip), %rdx      # 0x9bed
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x382b
testq %rax, %rax
je 0x6057
movq %rax, %rdi
callq 0x2380
movl %eax, 0x224(%rsp)
movq %r12, %rdi
movl %ebp, %esi
leaq 0x3b97(%rip), %rdx      # 0x9bfa
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x382b
testq %rax, %rax
je 0x6296
movq %rax, %rdi
callq 0x2380
movl %eax, 0x228(%rsp)
movl $0x0, 0x30(%rsp)
movl %ebp, %esi
movq %r12, 0x18(%rsp)
movq %r12, %rdi
leaq 0x3b68(%rip), %rdx      # 0x9c06
leaq 0x30(%rsp), %r12
movq %r12, %rcx
xorl %r8d, %r8d
callq 0x382b
testq %rax, %rax
je 0x60d5
movl 0x30(%rsp), %ecx
cmpl $0x3f, %ecx
movl $0x3f, %edx
cmovgel %edx, %ecx
movslq %ecx, %rdx
leaq 0x22c(%rsp), %rdi
movq %rax, %rsi
callq 0x24c0
movq 0x18(%rsp), %rdi
movl %ebp, %esi
leaq 0x3b2a(%rip), %rdx      # 0x9c0d
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x382b
testq %rax, %rax
je 0x6102
movq %rax, %rdi
callq 0x2300
movq %rax, 0x270(%rsp)
movl $0x0, 0x30(%rsp)
movq 0x18(%rsp), %rdi
movl %ebp, %esi
leaq 0x3aff(%rip), %rdx      # 0x9c17
movq %r12, %rcx
xorl %r8d, %r8d
callq 0x382b
testq %rax, %rax
leaq 0x278(%rsp), %rbp
je 0x614d
movl 0x30(%rsp), %ecx
cmpl $0x3f, %ecx
movl $0x3f, %edx
cmovgel %edx, %ecx
movslq %ecx, %rdx
movq %rbp, %rdi
movq %rax, %rsi
callq 0x24c0
addl $0x5, %r15d
movl %r15d, 0x2b8(%rsp)
movq $0x0, 0x18(%rsp)
movl $0x1, %edi
leaq 0x350b(%rip), %rsi      # 0x9679
leaq 0x34b1(%rip), %rdx      # 0x9626
movl $0x9f, %ecx
leaq 0x3a9c(%rip), %r8       # 0x9c1d
movq %rbx, %r9
xorl %eax, %eax
callq 0x42c5
movl 0x220(%rsp), %eax
cmpl $0x4, %eax
jg 0x6337
testl %eax, %eax
je 0x652f
cmpl $0x4, %eax
jne 0x6325
movq %rbx, %rdi
callq 0x2270
leaq (%rax,%rbx), %rdx
movl 0x228(%rsp), %ecx
addl $0x4, %ecx
leaq 0x718f(%rip), %rdi      # 0xd358
xorl %esi, %esi
xorl %r8d, %r8d
callq 0x280c
xorl %eax, %eax
callq 0x7e35
testl %eax, %eax
je 0x6827
movq $0x0, 0x38(%rsp)
movw $0x2, 0x30(%rsp)
movq 0x71a7(%rip), %rax      # 0xd3a0
movzwl 0x38(%rax), %ecx
rolw $0x8, %cx
movw %cx, 0x32(%rsp)
movq 0x30(%rax), %rdi
callq 0x25f0
movl %eax, 0x34(%rsp)
movl $0x2, %edi
movl $0x1, %esi
xorl %edx, %edx
callq 0x23d0
cmpl $-0x1, %eax
je 0x68fc
movl %eax, %ebp
movl %eax, %edi
movq %r12, %rsi
movl $0x10, %edx
callq 0x23a0
cmpl $-0x1, %eax
je 0x6939
movl $0x1, %edi
leaq 0x3426(%rip), %rsi      # 0x9679
leaq 0x33cc(%rip), %rdx      # 0x9626
movl $0x61, %ecx
leaq 0x3a18(%rip), %r8       # 0x9c7e
movl %ebp, %r9d
xorl %eax, %eax
callq 0x42c5
leaq 0xb0(%rsp), %r15
xorl %eax, %eax
cmpl $-0x1, (%r15)
je 0x69c9
incq %rax
addq $0x4, %r15
cmpq $0x20, %rax
jne 0x627a
jmp 0x6a07
movq $0x0, 0x18(%rsp)
movl $0x3, %edi
leaq 0x3375(%rip), %r15      # 0x9620
movq %r15, %rsi
leaq 0x3371(%rip), %r12      # 0x9626
movq %r12, %rdx
movl $0xa2, %ecx
leaq 0x3969(%rip), %r8       # 0x9c2d
movq %rbx, %r9
xorl %eax, %eax
callq 0x42c5
leaq 0x7083(%rip), %rdi      # 0xd358
xorl %esi, %esi
movq %rbx, %rdx
movl $0x2000, %ecx           # imm = 0x2000
xorl %r8d, %r8d
callq 0x280c
movl $0x3, %edi
movq %r15, %rsi
movq %r12, %rdx
movl $0x1cc, %ecx            # imm = 0x1CC
leaq 0x34e6(%rip), %r8       # 0x97e4
movl %eax, %r9d
xorl %eax, %eax
callq 0x42c5
movl $0x18ce1, %edi          # imm = 0x18CE1
leaq 0x34fd(%rip), %rsi      # 0x9811
xorl %edx, %edx
xorl %ecx, %ecx
movq %rbx, %r8
callq 0x6ca2
leaq 0x30(%rsp), %r12
cmpb $0x0, 0x706c(%rip)      # 0xd398
je 0x5b25
jmp 0x5899
cmpl $0x5, %eax
je 0x6629
cmpl $0x16, %eax
jne 0x6325
movq %rbp, %rdi
callq 0x8213
testl %eax, %eax
js 0x6867
movl %eax, %r15d
movl 0x228(%rsp), %r9d
movq %rbp, (%rsp)
xorl %r12d, %r12d
xorl %edi, %edi
leaq 0x2c94(%rip), %rsi      # 0x9004
leaq 0x32af(%rip), %rdx      # 0x9626
movl $0x216, %ecx            # imm = 0x216
leaq 0x3683(%rip), %r8       # 0x9a06
xorl %eax, %eax
callq 0x42c5
movl $0x2000, %edx           # imm = 0x2000
movq %rbx, %rdi
xorl %esi, %esi
callq 0x2090
movl %r15d, 0x18(%rsp)
movd %r15d, %xmm0
pshufd $0x0, %xmm0, %xmm0      # xmm0 = xmm0[0,0,0,0]
movdqa %xmm0, 0x20(%rsp)
movl 0x228(%rsp), %r9d
movl %r9d, %r15d
subl %r12d, %r15d
jbe 0x67f6
movl $0x2000, %edx           # imm = 0x2000
movq %rbx, %rdi
xorl %esi, %esi
callq 0x2090
movq 0x6fb8(%rip), %rdi      # 0xd390
movl $0x2000, %eax           # imm = 0x2000
cmpl %eax, %r15d
cmovael %eax, %r15d
movl $0x3e8, %r8d            # imm = 0x3E8
movq %rbx, %rsi
movl %r15d, %edx
movl $0x1, %ecx
callq 0x2230
cmpl $-0x1, %eax
je 0x63ae
movl %eax, %r15d
addl %eax, %r12d
xorl %ebp, %ebp
movl %r15d, %eax
subl %ebp, %eax
jle 0x63ae
movslq %ebp, %rsi
addq %rbx, %rsi
movslq %eax, %rdx
movl 0x18(%rsp), %edi
xorl %ecx, %ecx
callq 0x2440
addl %eax, %ebp
cmpl $-0x1, %eax
jne 0x6407
movl $0x0, (%rsp)
movl $0x1, %edi
leaq 0x323d(%rip), %rsi      # 0x9679
leaq 0x31e3(%rip), %rdx      # 0x9626
movl $0x224, %ecx            # imm = 0x224
leaq 0x35de(%rip), %r8       # 0x9a2d
movl %r15d, %r9d
xorl %eax, %eax
callq 0x42c5
leaq 0x278(%rsp), %rbp
movq %rbp, %rdi
callq 0x80d5
xorl %eax, %eax
movl 0x18(%rsp), %edi
movdqa 0x20(%rsp), %xmm1
movdqa 0xb0(%rsp,%rax,4), %xmm0
pcmpeqd %xmm1, %xmm0
movd %xmm0, %ecx
testb $0x1, %cl
je 0x6496
movl $0xffffffff, 0xb0(%rsp,%rax,4) # imm = 0xFFFFFFFF
pextrw $0x2, %xmm0, %ecx
testb $0x1, %cl
je 0x64ab
movl $0xffffffff, 0xb4(%rsp,%rax,4) # imm = 0xFFFFFFFF
pextrw $0x4, %xmm0, %ecx
testb $0x1, %cl
je 0x64c0
movl $0xffffffff, 0xb8(%rsp,%rax,4) # imm = 0xFFFFFFFF
pextrw $0x6, %xmm0, %ecx
testb $0x1, %cl
je 0x64d5
movl $0xffffffff, 0xbc(%rsp,%rax,4) # imm = 0xFFFFFFFF
addq $0x4, %rax
cmpq $0x20, %rax
jne 0x6475
callq 0x20c0
movl $0x18ce5, %edi          # imm = 0x18CE5
leaq 0x32e1(%rip), %rsi      # 0x97d1
leaq 0x22c(%rsp), %rdx
movq %rbp, %rcx
movq %rbx, %r8
callq 0x6ca2
jmp 0x63ae
movq 0x6e81(%rip), %rdi      # 0xd390
incq %r15
movl $0x3e8, %r8d            # imm = 0x3E8
movq %r15, %rsi
movl $0x4, %edx
movl $0x1, %ecx
callq 0x2230
jmp 0x5f9c
movq %rbx, %rdi
callq 0x2270
leaq (%rax,%rbx), %rdx
movl 0x228(%rsp), %ecx
movq $0x0, 0x18(%rsp)
leaq 0x6e06(%rip), %rdi      # 0xd358
xorl %esi, %esi
xorl %r8d, %r8d
callq 0x280c
movl %eax, %r13d
movq %rbx, (%rsp)
xorl %edi, %edi
leaq 0x2a98(%rip), %rsi      # 0x9004
leaq 0x30b3(%rip), %rdx      # 0x9626
movl $0x230, %ecx            # imm = 0x230
leaq 0x34fa(%rip), %r8       # 0x9a79
movl %eax, %r9d
xorl %eax, %eax
callq 0x42c5
movdqu 0x22c(%rsp), %xmm0
pcmpeqb 0x3076(%rip), %xmm0     # 0x9610
movdqu 0x231(%rsp), %xmm1
pcmpeqb 0x3055(%rip), %xmm1     # 0x9600
pand %xmm0, %xmm1
pmovmskb %xmm1, %eax
cmpl $0xffff, %eax           # imm = 0xFFFF
jne 0x6325
movl 0x228(%rsp), %esi
movl 0x2b8(%rsp), %r15d
addq %rbx, %r15
xorl %eax, %eax
movl %eax, 0x30(%rsp)
movl %eax, 0x160(%rsp)
movq %r15, %rdi
leaq 0x36e0(%rip), %rdx      # 0x9cc7
movq %r12, %rcx
movq %r14, %r8
callq 0x382b
testq %rax, %rax
je 0x6c57
cmpl $0x0, 0x30(%rsp)
jle 0x6c57
cmpl $0x3, 0x160(%rsp)
jne 0x6c57
movq %rax, %rdi
callq 0x2380
testl %eax, %eax
je 0x6325
jmp 0x6c57
movq %rbx, %rdi
callq 0x2270
leaq (%rax,%rbx), %rdx
movl 0x228(%rsp), %ecx
leaq 0x6d15(%rip), %rdi      # 0xd358
xorl %esi, %esi
xorl %r8d, %r8d
callq 0x280c
movq %rbp, %rdi
callq 0x8213
testl %eax, %eax
js 0x68a9
movd %eax, %xmm0
pshufd $0x0, %xmm0, %xmm0      # xmm0 = xmm0[0,0,0,0]
xorl %edx, %edx
movdqa 0xb0(%rsp,%rdx,4), %xmm1
pcmpeqd %xmm0, %xmm1
movd %xmm1, %ecx
testb $0x1, %cl
je 0x6689
movl $0xffffffff, 0xb0(%rsp,%rdx,4) # imm = 0xFFFFFFFF
pextrw $0x2, %xmm1, %ecx
testb $0x1, %cl
je 0x669e
movl $0xffffffff, 0xb4(%rsp,%rdx,4) # imm = 0xFFFFFFFF
pextrw $0x4, %xmm1, %ecx
testb $0x1, %cl
je 0x66b3
movl $0xffffffff, 0xb8(%rsp,%rdx,4) # imm = 0xFFFFFFFF
pextrw $0x6, %xmm1, %ecx
testb $0x1, %cl
je 0x66c8
movl $0xffffffff, 0xbc(%rsp,%rdx,4) # imm = 0xFFFFFFFF
addq $0x4, %rdx
cmpq $0x20, %rdx
jne 0x6668
movl %eax, %edi
movl %eax, 0x20(%rsp)
callq 0x20c0
movq %rbp, %rdi
callq 0x80d5
pxor %xmm0, %xmm0
movdqa %xmm0, 0xa0(%rsp)
movdqa %xmm0, 0x90(%rsp)
movdqa %xmm0, 0x80(%rsp)
movdqa %xmm0, 0x70(%rsp)
movdqa %xmm0, 0x60(%rsp)
movdqa %xmm0, 0x50(%rsp)
movdqa %xmm0, 0x40(%rsp)
movdqa %xmm0, 0x30(%rsp)
movq $0x0, 0x18(%rsp)
movl $0x7f, %esi
movq %r12, %rdi
leaq 0x31ca(%rip), %rdx      # 0x9904
movq %rbp, %rcx
xorl %eax, %eax
callq 0x20b0
xorl %edi, %edi
movq %r12, %rsi
leaq 0x3263(%rip), %rdx      # 0x99b3
callq 0x7104
movq %rax, %r12
movq %rax, %rdi
callq 0x2270
xorl %edi, %edi
movl %eax, %esi
leaq 0x22c(%rsp), %rdx
movq %rbp, %rcx
callq 0x7058
movq %rax, %r15
movl $0x2000, %edx           # imm = 0x2000
movq %rbx, %rdi
xorl %esi, %esi
callq 0x2090
movl $0x2000, %esi           # imm = 0x2000
movq %rbx, %rdi
leaq 0x3199(%rip), %rdx      # 0x992e
movq %r15, %rcx
movq %r12, %r8
leaq 0x30(%rsp), %r12
xorl %eax, %eax
callq 0x20b0
movq %rbx, %rdi
callq 0x2270
leaq 0x6ba2(%rip), %rdi      # 0xd358
xorl %esi, %esi
movq %rbx, %rdx
movl %eax, %ecx
xorl %r8d, %r8d
callq 0x285a
movq %rbx, (%rsp)
xorl %edi, %edi
leaq 0x2832(%rip), %rsi      # 0x9004
leaq 0x2e4d(%rip), %rdx      # 0x9626
movl $0x20c, %ecx            # imm = 0x20C
leaq 0x31e7(%rip), %r8       # 0x99cc
movl 0x20(%rsp), %r9d
xorl %eax, %eax
callq 0x42c5
jmp 0x6325
movq $0x0, 0x18(%rsp)
xorl %edi, %edi
leaq 0x27fc(%rip), %rsi      # 0x9004
leaq 0x2e17(%rip), %rdx      # 0x9626
movl $0x22d, %ecx            # imm = 0x22D
leaq 0x3248(%rip), %r8       # 0x9a63
xorl %eax, %eax
callq 0x42c5
jmp 0x6320
movq $0x0, 0x18(%rsp)
movl $0x3, %edi
leaq 0x2de4(%rip), %rsi      # 0x9620
leaq 0x2de3(%rip), %rdx      # 0x9626
movl $0x1d3, %ecx            # imm = 0x1D3
leaq 0x2fde(%rip), %r8       # 0x982d
xorl %eax, %eax
callq 0x42c5
movl $0x18ce2, %edi          # imm = 0x18CE2
leaq 0x2fe4(%rip), %rsi      # 0x9846
jmp 0x69b2
movl $0x18ce3, %edi          # imm = 0x18CE3
leaq 0x3100(%rip), %rsi      # 0x9973
leaq 0x22c(%rsp), %rdx
movq %rbp, %rcx
movq %rbx, %r8
callq 0x6ca2
movq $0x0, 0x18(%rsp)
movl $0x3, %edi
leaq 0x2d85(%rip), %rsi      # 0x9620
leaq 0x2d84(%rip), %rdx      # 0x9626
movl $0x211, %ecx            # imm = 0x211
jmp 0x68e9
movl $0x18ce3, %edi          # imm = 0x18CE3
leaq 0x30be(%rip), %rsi      # 0x9973
leaq 0x22c(%rsp), %rdx
movq %rbp, %rcx
movq %rbx, %r8
callq 0x6ca2
movq $0x0, 0x18(%rsp)
movl $0x3, %edi
leaq 0x2d43(%rip), %rsi      # 0x9620
leaq 0x2d42(%rip), %rdx      # 0x9626
movl $0x1fc, %ecx            # imm = 0x1FC
leaq 0x30ae(%rip), %r8       # 0x999e
xorl %eax, %eax
callq 0x42c5
jmp 0x6325
callq 0x2400
movl (%rax), %edi
callq 0x2330
movl $0x3, %edi
leaq 0x2d0c(%rip), %rbp      # 0x9620
movq %rbp, %rsi
leaq 0x2d08(%rip), %r15      # 0x9626
movq %r15, %rdx
movl $0x57, %ecx
leaq 0x3320(%rip), %r8       # 0x9c4d
movq %rax, %r9
xorl %eax, %eax
callq 0x42c5
jmp 0x697f
callq 0x2400
movl (%rax), %edi
callq 0x2330
movl $0x3, %edi
leaq 0x2ccf(%rip), %rsi      # 0x9620
leaq 0x2cce(%rip), %r15      # 0x9626
movq %r15, %rdx
movl $0x5d, %ecx
leaq 0x3300(%rip), %r8       # 0x9c67
movq %rax, %r9
xorl %eax, %eax
callq 0x42c5
movl %ebp, %edi
leaq 0x2ca6(%rip), %rbp      # 0x9620
callq 0x20c0
movq $0x0, 0x18(%rsp)
movl $0x3, %edi
movq %rbp, %rsi
movq %r15, %rdx
movl $0x1da, %ecx            # imm = 0x1DA
leaq 0x2ecc(%rip), %r8       # 0x986b
xorl %eax, %eax
callq 0x42c5
movl $0x18ce4, %edi          # imm = 0x18CE4
leaq 0x2edd(%rip), %rsi      # 0x988f
leaq 0x22c(%rsp), %rdx
xorl %ecx, %ecx
movq %rbx, %r8
callq 0x6ca2
jmp 0x6325
movl %ebp, (%r15)
movl %ebp, (%rsp)
movl $0x1, %edi
leaq 0x2c9e(%rip), %rsi      # 0x9679
leaq 0x2c44(%rip), %rdx      # 0x9626
movl $0xc9, %ecx
leaq 0x32c1(%rip), %r8       # 0x9caf
movq %rax, 0x20(%rsp)
movq 0x20(%rsp), %r9
xorl %eax, %eax
callq 0x42c5
cmpq $0x20, 0x20(%rsp)
jne 0x6a59
movq $0x0, 0x18(%rsp)
movl $0x18ce4, %edi          # imm = 0x18CE4
leaq 0x2e92(%rip), %rsi      # 0x98ae
leaq 0x22c(%rsp), %rdx
xorl %ecx, %ecx
movq %rbx, %r8
callq 0x6ca2
movl %ebp, %edi
callq 0x20c0
movl $0x3, %edi
leaq 0x2bdf(%rip), %rsi      # 0x9620
leaq 0x2bde(%rip), %rdx      # 0x9626
movl $0x1e2, %ecx            # imm = 0x1E2
leaq 0x2e70(%rip), %r8       # 0x98c4
jmp 0x68f0
movq %r15, %rdi
callq 0x7ea5
testq %rax, %rax
je 0x6b97
pxor %xmm0, %xmm0
movdqa %xmm0, 0xa0(%rsp)
movdqa %xmm0, 0x90(%rsp)
movdqa %xmm0, 0x80(%rsp)
movdqa %xmm0, 0x70(%rsp)
movdqa %xmm0, 0x60(%rsp)
movdqa %xmm0, 0x50(%rsp)
movdqa %xmm0, 0x40(%rsp)
movdqa %xmm0, 0x30(%rsp)
movq $0x0, 0x18(%rsp)
movl $0x7f, %esi
movq %r12, %rdi
leaq 0x2e45(%rip), %rdx      # 0x9904
movq %rax, %rbp
movq %rax, %rcx
xorl %eax, %eax
callq 0x20b0
xorl %edi, %edi
movq %r12, %rsi
leaq 0x2e41(%rip), %rdx      # 0x9919
callq 0x7104
movq %rax, %r12
movq %rax, %rdi
callq 0x2270
xorl %edi, %edi
movl %eax, %esi
leaq 0x22c(%rsp), %rdx
movq %rbp, %rcx
callq 0x7058
movq %rax, 0x138(%rsp)
movl $0x2000, %edx           # imm = 0x2000
movq %rbx, %rdi
xorl %esi, %esi
callq 0x2090
movl $0x2000, %esi           # imm = 0x2000
movq %rbx, %rdi
leaq 0x2e0c(%rip), %rdx      # 0x992e
movq 0x138(%rsp), %rcx
movq %r12, %r8
leaq 0x30(%rsp), %r12
xorl %eax, %eax
callq 0x20b0
movq %rbx, %rdi
callq 0x2270
leaq 0x6810(%rip), %rdi      # 0xd358
xorl %esi, %esi
movq %rbx, %rdx
movl %eax, %ecx
xorl %r8d, %r8d
callq 0x285a
movl (%r15), %r9d
movq %rbx, 0x8(%rsp)
movq 0x20(%rsp), %rax
movl %eax, (%rsp)
xorl %edi, %edi
leaq 0x2494(%rip), %rsi      # 0x9004
leaq 0x2aaf(%rip), %rdx      # 0x9626
movl $0x1f5, %ecx            # imm = 0x1F5
leaq 0x2db0(%rip), %r8       # 0x9933
xorl %eax, %eax
callq 0x42c5
movq %rbp, %rdi
callq 0x2250
jmp 0x6325
movl %ebp, %edi
callq 0x20c0
movq $0x0, 0x18(%rsp)
movl $0x3, %edi
leaq 0x2a6d(%rip), %rsi      # 0x9620
leaq 0x2a6c(%rip), %rdx      # 0x9626
movl $0x1e9, %ecx            # imm = 0x1E9
leaq 0x2d15(%rip), %r8       # 0x98db
xorl %eax, %eax
callq 0x42c5
movl $0x18ce4, %edi          # imm = 0x18CE4
leaq 0x2d1e(%rip), %rsi      # 0x98f7
jmp 0x69b2
callq 0x2400
movl (%rax), %edi
callq 0x2330
leaq 0x2a2f(%rip), %rsi      # 0x9620
leaq 0x2a2e(%rip), %rdx      # 0x9626
leaq 0x2aec(%rip), %r8       # 0x96eb
movl $0x3, %edi
movl $0x19e, %ecx            # imm = 0x19E
movq %rax, %r9
xorl %eax, %eax
callq 0x42c5
leaq 0x2b01(%rip), %rsi      # 0x971b
movl $0x18ce6, %edi          # imm = 0x18CE6
xorl %edx, %edx
xorl %ecx, %ecx
movq %rbx, %r8
callq 0x6ca2
jmp 0x5899
leaq 0x2a42(%rip), %rsi      # 0x9679
leaq 0x29e8(%rip), %rdx      # 0x9626
leaq 0x2a62(%rip), %r8       # 0x96a7
xorl %r13d, %r13d
movl $0x1, %edi
movl $0x19a, %ecx            # imm = 0x19A
jmp 0x5892
leaq 0x29c2(%rip), %r14      # 0x9620
leaq 0x29c1(%rip), %r12      # 0x9626
leaq 0x3060(%rip), %r8       # 0x9ccc
movl $0x3, %edi
movq %r14, %rsi
movq %r12, %rdx
movl $0xad, %ecx
movq %r15, %r9
xorl %eax, %eax
callq 0x42c5
leaq 0x2e18(%rip), %r8       # 0x9aa5
movl $0x3, %edi
movq %r14, %rsi
movq %r12, %rdx
movl $0x233, %ecx            # imm = 0x233
jmp 0x5892