// File: /workspace/github_c_makefile_star2_O0/GangZhuo[P]dohclient/src/channel_tcp.c
// Function: hp_handshake
static int hp_handshake(channel_tcp_t *ctx, tcpreq_t *req, reqconn_t *conn)
{
	int r;
	const proxy_t *proxy = ctx->proxies + conn->proxy_index;
	conn_status cs = conn->conn.status;
	stream_t* s = &conn->proxy_stream;
	int rsize = stream_rsize(s);

	if (stream_rcap(s) < 1024) {
		int new_cap = MAX(s->cap * 2, 1024);
		if (stream_set_cap(s, new_cap)) {
			return -1;
		}
	}

	switch (cs) {
	case cs_connected:
		logv("CONNECT\n");
		if (rsize == 0) {
			sockaddr_t *upstream = &ctx->upstreams[conn->upstream];
			const char *target_host = get_sockaddrname(upstream);
			const int authorization = strlen(proxy->username) > 0;
			char *auth_code = NULL;
			int auth_code_len = 0;
			if (authorization) {
				char auth_str[PROXY_USERNAME_LEN + PROXY_PASSWORD_LEN];
				sprintf(auth_str, "%s:%s", proxy->username, proxy->password);
				auth_code = base64url_encode((const unsigned char*)auth_str,
						strlen(auth_str), &auth_code_len, TRUE, FALSE);
			}
			r = stream_writef(s,
				"CONNECT %s HTTP/1.1\r\n"
				"Host: %s\r\n"
				"User-Agent: "DOHCLIENT_NAME"/"DOHCLIENT_VERSION"\r\n"
				"Proxy-Connection: keep-alive\r\n"
				"Connection: keep-alive\r\n"
				"%s%s%s"
				"\r\n",
				target_host,
				target_host,
				authorization ? "Proxy-Authorization: Basic " : "",
				authorization ? auth_code : "",
				authorization ? "\r\n" : "");
			if (r == -1) {
				loge("stream_writef() error\n");
				free(auth_code);
				return -1;
			}
			logv("send\r\n%s\n", s->array);
			s->pos = 0;
			free(auth_code);
		}
		r = tcp_send(conn->conn.sock, s);
		if (r < 0) {
			loge("tcp_send() error\n");
			return -1;
		}
		if (stream_rsize(s) > 0) {
			conn->conn.status = cs_hp_sending_connect;
		}
		else {
			conn->conn.status = cs_hp_waiting_connect;
			s->pos = s->size = 0;
		}
		break;
	case cs_hp_waiting_connect:
		logv("receiving connection status\n");
		r = tcp_recv(conn->conn.sock, s->array + s->pos, s->cap - s->pos - 1);
		if (r <= 0) {
			loge("tcp_recv() error\n");
			return -1;
		}
		s->pos += r;
		s->size += r;
		s->array[s->pos] = '\0';
		logv("recv\r\n%s\n", s->array);
		if (s->size >= sizeof("HTTP/1.1 XXX")) {
			char *space;
			if (strncmp(s->array, "HTTP/", 5) == 0 &&
				(space = strchr(s->array, ' ')) != NULL) {
				char http_code_str[4];
				int http_code;
				strncpy(http_code_str, space + 1, sizeof(http_code_str));
				http_code_str[3] = '\0';
				http_code = atoi(http_code_str);
				if (http_code == 200) {
					if (strstr(s->array, "\r\n\r\n")) {
						conn->conn.status = cs_hp_handshaked;
						stream_free(s);
						logv("http proxy handshaked\n");
						r = 0;
						if (stream_rsize(&conn->conn.ws) > 0) {
							r = tcp_send(conn->conn.sock, &conn->conn.ws);
							if (r >= 0)
								r = 0;
						}
						return r;
					}
					else {
						conn->conn.status = cs_hp_waiting_data;
					}
				}
				else {
					loge("http_code=%d\n%s\n", http_code, s->array);
					return -1;
				}
			}
			else {
				loge("wrong response \"%s\"\n", s->array);
				return -1;
			}
		}
		else {
			loge("connect error\n");
			return -1;
		}
		break;
	case cs_hp_waiting_data:
		logv("receiving left headers\n");
		r = tcp_recv(conn->conn.sock, s->array + s->pos, s->cap - s->pos - 1);
		if (r <= 0) {
			loge("tcp_recv() error\n");
			return -1;
		}
		s->size += r;
		s->pos += r;
		s->array[s->pos] = '\0';
		if (strstr(s->array, "\r\n\r\n")) {
			conn->conn.status = cs_hp_handshaked;
			stream_free(s);
			logv("http proxy handshaked\n");
			r = 0;
			if (stream_rsize(&conn->conn.ws) > 0) {
				r = tcp_send(conn->conn.sock, &conn->conn.ws);
				if (r >= 0)
					r = 0;
			}
			return r;
		}
		else if (s->size >= HTTP_MAX_HEADER_SIZE) {
			loge("received too large (>= %s bytes)"
				" header data from http proxy.\n", s->pos);
			stream_free(s);
			return -1;
		}
		else {
			conn->conn.status = cs_hp_waiting_data;
		}
		break;
	default:
		loge("unknown status\n");
		return -1;
	}

	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x120, %rsp            # imm = 0x120
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x20(%rbp), %rcx
movslq 0x6c(%rcx), %rcx
imulq $0xf8, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x30(%rbp)
movq -0x20(%rbp), %rax
movl 0x38(%rax), %eax
movl %eax, -0x34(%rbp)
movq -0x20(%rbp), %rax
addq $0x70, %rax
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rax
movl 0x8(%rax), %eax
movq -0x40(%rbp), %rcx
subl 0xc(%rcx), %eax
movl %eax, -0x44(%rbp)
movq -0x40(%rbp), %rax
movl 0x10(%rax), %eax
movq -0x40(%rbp), %rcx
subl 0xc(%rcx), %eax
cmpl $0x400, %eax            # imm = 0x400
jge 0x172f5
movq -0x40(%rbp), %rax
movl 0x10(%rax), %eax
shll %eax
cmpl $0x400, %eax            # imm = 0x400
jge 0x172be
movl $0x400, %eax            # imm = 0x400
movl %eax, -0xe4(%rbp)
jmp 0x172cd
movq -0x40(%rbp), %rax
movl 0x10(%rax), %eax
shll %eax
movl %eax, -0xe4(%rbp)
movl -0xe4(%rbp), %eax
movl %eax, -0x48(%rbp)
movq -0x40(%rbp), %rdi
movl -0x48(%rbp), %esi
callq 0x2d900
cmpl $0x0, %eax
je 0x172f3
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x17bb8
jmp 0x172f5
movl -0x34(%rbp), %eax
movl %eax, -0xe8(%rbp)
subl $0x2, %eax
je 0x1732a
jmp 0x17305
movl -0xe8(%rbp), %eax
subl $0xb, %eax
je 0x17626
jmp 0x17316
movl -0xe8(%rbp), %eax
subl $0xc, %eax
je 0x1797b
jmp 0x17b72
jmp 0x1732c
movb $0x0, %al
callq 0x242d0
cmpl $0x8, (%rax)
jl 0x1735e
movl $0x8, %edi
leaq 0x1f4ec(%rip), %rsi     # 0x36830
leaq 0x20887(%rip), %rdx     # 0x37bd2
movl $0x240, %ecx            # imm = 0x240
leaq 0x1f64f(%rip), %r8      # 0x369a6
movb $0x0, %al
callq 0x243b0
jmp 0x17360
cmpl $0x0, -0x44(%rbp)
jne 0x17586
movq -0x10(%rbp), %rax
addq $0x70, %rax
movq -0x20(%rbp), %rcx
movslq 0x90(%rcx), %rcx
imulq $0x88, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x50(%rbp)
movq -0x50(%rbp), %rdi
callq 0x17bd0
movq %rax, -0x58(%rbp)
movq -0x30(%rbp), %rdi
addq $0x94, %rdi
callq 0x3180
cmpq $0x0, %rax
seta %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0x5c(%rbp)
movq $0x0, -0x68(%rbp)
movl $0x0, -0x6c(%rbp)
cmpl $0x0, -0x5c(%rbp)
je 0x1742f
leaq -0xd0(%rbp), %rdi
movq -0x30(%rbp), %rdx
addq $0x94, %rdx
movq -0x30(%rbp), %rcx
addq $0xc6, %rcx
leaq 0x1f5bf(%rip), %rsi     # 0x369af
movb $0x0, %al
callq 0x30c0
leaq -0xd0(%rbp), %rax
movq %rax, -0xf0(%rbp)
leaq -0xd0(%rbp), %rdi
callq 0x3180
movq -0xf0(%rbp), %rdi
movl %eax, %esi
leaq -0x6c(%rbp), %rdx
movl $0x1, %ecx
xorl %r8d, %r8d
callq 0xb860
movq %rax, -0x68(%rbp)
movq -0x40(%rbp), %rax
movq %rax, -0x110(%rbp)
movq -0x58(%rbp), %rax
movq %rax, -0x108(%rbp)
movq -0x58(%rbp), %rax
movq %rax, -0x100(%rbp)
movl -0x5c(%rbp), %edx
leaq 0x2008c(%rip), %rax     # 0x374e6
leaq 0x1f5cf(%rip), %rcx     # 0x36a30
cmpl $0x0, %edx
cmovneq %rcx, %rax
movq %rax, -0xf8(%rbp)
cmpl $0x0, -0x5c(%rbp)
je 0x17482
movq -0x68(%rbp), %rax
movq %rax, -0x118(%rbp)
jmp 0x17492
leaq 0x2005d(%rip), %rax     # 0x374e6
movq %rax, -0x118(%rbp)
jmp 0x17492
movq -0xf8(%rbp), %r8
movq -0x100(%rbp), %rcx
movq -0x108(%rbp), %rdx
movq -0x110(%rbp), %rdi
movq -0x118(%rbp), %r9
movl -0x5c(%rbp), %r10d
leaq 0x20026(%rip), %rax     # 0x374e6
leaq 0x2001d(%rip), %rsi     # 0x374e4
cmpl $0x0, %r10d
cmovneq %rsi, %rax
leaq 0x1f4df(%rip), %rsi     # 0x369b5
movq %rax, (%rsp)
movb $0x0, %al
callq 0x2e040
movl %eax, -0x24(%rbp)
cmpl $-0x1, -0x24(%rbp)
jne 0x17535
jmp 0x174ec
movb $0x0, %al
callq 0x242d0
cmpl $0x3, (%rax)
jl 0x1751e
movl $0x3, %edi
leaq 0x1f32c(%rip), %rsi     # 0x36830
leaq 0x206c7(%rip), %rdx     # 0x37bd2
movl $0x25b, %ecx            # imm = 0x25B
leaq 0x1f535(%rip), %r8      # 0x36a4c
movb $0x0, %al
callq 0x243b0
jmp 0x17520
movq -0x68(%rbp), %rdi
callq 0x3460
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x17bb8
jmp 0x17537
movb $0x0, %al
callq 0x242d0
cmpl $0x8, (%rax)
jl 0x17570
movq -0x40(%rbp), %rax
movq (%rax), %r9
movl $0x8, %edi
leaq 0x1f2da(%rip), %rsi     # 0x36830
leaq 0x20675(%rip), %rdx     # 0x37bd2
movl $0x25f, %ecx            # imm = 0x25F
leaq 0x1f4fa(%rip), %r8      # 0x36a63
movb $0x0, %al
callq 0x243b0
jmp 0x17572
movq -0x40(%rbp), %rax
movl $0x0, 0xc(%rax)
movq -0x68(%rbp), %rdi
callq 0x3460
movq -0x20(%rbp), %rax
movl (%rax), %edi
movq -0x40(%rbp), %rsi
callq 0x265a0
movl %eax, -0x24(%rbp)
cmpl $0x0, -0x24(%rbp)
jge 0x175e0
jmp 0x175a0
movb $0x0, %al
callq 0x242d0
cmpl $0x3, (%rax)
jl 0x175d2
movl $0x3, %edi
leaq 0x1f278(%rip), %rsi     # 0x36830
leaq 0x20613(%rip), %rdx     # 0x37bd2
movl $0x265, %ecx            # imm = 0x265
leaq 0x1f2ff(%rip), %r8      # 0x368ca
movb $0x0, %al
callq 0x243b0
jmp 0x175d4
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x17bb8
movq -0x40(%rbp), %rax
movl 0x8(%rax), %eax
movq -0x40(%rbp), %rcx
subl 0xc(%rcx), %eax
cmpl $0x0, %eax
jle 0x17600
movq -0x20(%rbp), %rax
movl $0xa, 0x38(%rax)
jmp 0x17621
movq -0x20(%rbp), %rax
movl $0xb, 0x38(%rax)
movq -0x40(%rbp), %rax
movl $0x0, 0x8(%rax)
movq -0x40(%rbp), %rax
movl $0x0, 0xc(%rax)
jmp 0x17bb1
jmp 0x17628
movb $0x0, %al
callq 0x242d0
cmpl $0x8, (%rax)
jl 0x1765a
movl $0x8, %edi
leaq 0x1f1f0(%rip), %rsi     # 0x36830
leaq 0x2058b(%rip), %rdx     # 0x37bd2
movl $0x271, %ecx            # imm = 0x271
leaq 0x1f41a(%rip), %r8      # 0x36a6d
movb $0x0, %al
callq 0x243b0
jmp 0x1765c
movq -0x20(%rbp), %rax
movl (%rax), %edi
movq -0x40(%rbp), %rax
movq (%rax), %rsi
movq -0x40(%rbp), %rax
movslq 0xc(%rax), %rax
addq %rax, %rsi
movq -0x40(%rbp), %rax
movl 0x10(%rax), %edx
movq -0x40(%rbp), %rax
subl 0xc(%rax), %edx
subl $0x1, %edx
callq 0x26730
movl %eax, -0x24(%rbp)
cmpl $0x0, -0x24(%rbp)
jg 0x176d5
jmp 0x17695
movb $0x0, %al
callq 0x242d0
cmpl $0x3, (%rax)
jl 0x176c7
movl $0x3, %edi
leaq 0x1f183(%rip), %rsi     # 0x36830
leaq 0x2051e(%rip), %rdx     # 0x37bd2
movl $0x274, %ecx            # imm = 0x274
leaq 0x1f28f(%rip), %r8      # 0x3694f
movb $0x0, %al
callq 0x243b0
jmp 0x176c9
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x17bb8
movl -0x24(%rbp), %ecx
movq -0x40(%rbp), %rax
addl 0xc(%rax), %ecx
movl %ecx, 0xc(%rax)
movl -0x24(%rbp), %ecx
movq -0x40(%rbp), %rax
addl 0x8(%rax), %ecx
movl %ecx, 0x8(%rax)
movq -0x40(%rbp), %rax
movq (%rax), %rax
movq -0x40(%rbp), %rcx
movslq 0xc(%rcx), %rcx
movb $0x0, (%rax,%rcx)
movb $0x0, %al
callq 0x242d0
cmpl $0x8, (%rax)
jl 0x1773b
movq -0x40(%rbp), %rax
movq (%rax), %r9
movl $0x8, %edi
leaq 0x1f10f(%rip), %rsi     # 0x36830
leaq 0x204aa(%rip), %rdx     # 0x37bd2
movl $0x27a, %ecx            # imm = 0x27A
leaq 0x1f356(%rip), %r8      # 0x36a8a
movb $0x0, %al
callq 0x243b0
jmp 0x1773d
movq -0x40(%rbp), %rax
movslq 0x8(%rax), %rax
cmpq $0xd, %rax
jb 0x17934
movq -0x40(%rbp), %rax
movq (%rax), %rdi
leaq 0x1f337(%rip), %rsi     # 0x36a94
movl $0x5, %edx
callq 0x31a0
cmpl $0x0, %eax
jne 0x178e9
movq -0x40(%rbp), %rax
movq (%rax), %rdi
movl $0x20, %esi
callq 0x3160
movq %rax, -0xd8(%rbp)
cmpq $0x0, %rax
je 0x178e9
leaq -0xdc(%rbp), %rdi
movq -0xd8(%rbp), %rsi
addq $0x1, %rsi
movl $0x4, %edx
callq 0x31f0
movb $0x0, -0xd9(%rbp)
leaq -0xdc(%rbp), %rdi
callq 0x3580
movl %eax, -0xe0(%rbp)
cmpl $0xc8, -0xe0(%rbp)
jne 0x17893
movq -0x40(%rbp), %rax
movq (%rax), %rdi
leaq 0x1fcfd(%rip), %rsi     # 0x374e2
callq 0x30d0
cmpq $0x0, %rax
je 0x17886
movq -0x20(%rbp), %rax
movl $0xd, 0x38(%rax)
movq -0x40(%rbp), %rdi
callq 0x2d640
movb $0x0, %al
callq 0x242d0
cmpl $0x8, (%rax)
jl 0x1783a
movl $0x8, %edi
leaq 0x1f010(%rip), %rsi     # 0x36830
leaq 0x203ab(%rip), %rdx     # 0x37bd2
movl $0x288, %ecx            # imm = 0x288
leaq 0x1f267(%rip), %r8      # 0x36a9a
movb $0x0, %al
callq 0x243b0
jmp 0x1783c
movl $0x0, -0x24(%rbp)
movq -0x20(%rbp), %rax
movl 0x28(%rax), %eax
movq -0x20(%rbp), %rcx
subl 0x2c(%rcx), %eax
cmpl $0x0, %eax
jle 0x1787b
movq -0x20(%rbp), %rax
movl (%rax), %edi
movq -0x20(%rbp), %rsi
addq $0x20, %rsi
callq 0x265a0
movl %eax, -0x24(%rbp)
cmpl $0x0, -0x24(%rbp)
jl 0x17879
movl $0x0, -0x24(%rbp)
jmp 0x1787b
movl -0x24(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x17bb8
movq -0x20(%rbp), %rax
movl $0xc, 0x38(%rax)
jmp 0x178e7
jmp 0x17895
movb $0x0, %al
callq 0x242d0
cmpl $0x3, (%rax)
jl 0x178d9
movl -0xe0(%rbp), %r9d
movq -0x40(%rbp), %rax
movq (%rax), %rax
movl $0x3, %edi
leaq 0x1ef75(%rip), %rsi     # 0x36830
leaq 0x20310(%rip), %rdx     # 0x37bd2
movl $0x296, %ecx            # imm = 0x296
leaq 0x1f1e3(%rip), %r8      # 0x36ab1
movq %rax, (%rsp)
movb $0x0, %al
callq 0x243b0
jmp 0x178db
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x17bb8
jmp 0x17932
jmp 0x178eb
movb $0x0, %al
callq 0x242d0
cmpl $0x3, (%rax)
jl 0x17924
movq -0x40(%rbp), %rax
movq (%rax), %r9
movl $0x3, %edi
leaq 0x1ef26(%rip), %rsi     # 0x36830
leaq 0x202c1(%rip), %rdx     # 0x37bd2
movl $0x29b, %ecx            # imm = 0x29B
leaq 0x1f1a5(%rip), %r8      # 0x36ac2
movb $0x0, %al
callq 0x243b0
jmp 0x17926
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x17bb8
jmp 0x17976
jmp 0x17936
movb $0x0, %al
callq 0x242d0
cmpl $0x3, (%rax)
jl 0x17968
movl $0x3, %edi
leaq 0x1eee2(%rip), %rsi     # 0x36830
leaq 0x2027d(%rip), %rdx     # 0x37bd2
movl $0x2a0, %ecx            # imm = 0x2A0
leaq 0x1f026(%rip), %r8      # 0x36987
movb $0x0, %al
callq 0x243b0
jmp 0x1796a
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x17bb8
jmp 0x17bb1
jmp 0x1797d
movb $0x0, %al
callq 0x242d0
cmpl $0x8, (%rax)
jl 0x179af
movl $0x8, %edi
leaq 0x1ee9b(%rip), %rsi     # 0x36830
leaq 0x20236(%rip), %rdx     # 0x37bd2
movl $0x2a5, %ecx            # imm = 0x2A5
leaq 0x1f12f(%rip), %r8      # 0x36ad7
movb $0x0, %al
callq 0x243b0
jmp 0x179b1
movq -0x20(%rbp), %rax
movl (%rax), %edi
movq -0x40(%rbp), %rax
movq (%rax), %rsi
movq -0x40(%rbp), %rax
movslq 0xc(%rax), %rax
addq %rax, %rsi
movq -0x40(%rbp), %rax
movl 0x10(%rax), %edx
movq -0x40(%rbp), %rax
subl 0xc(%rax), %edx
subl $0x1, %edx
callq 0x26730
movl %eax, -0x24(%rbp)
cmpl $0x0, -0x24(%rbp)
jg 0x17a2a
jmp 0x179ea
movb $0x0, %al
callq 0x242d0
cmpl $0x3, (%rax)
jl 0x17a1c
movl $0x3, %edi
leaq 0x1ee2e(%rip), %rsi     # 0x36830
leaq 0x201c9(%rip), %rdx     # 0x37bd2
movl $0x2a8, %ecx            # imm = 0x2A8
leaq 0x1ef3a(%rip), %r8      # 0x3694f
movb $0x0, %al
callq 0x243b0
jmp 0x17a1e
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x17bb8
movl -0x24(%rbp), %ecx
movq -0x40(%rbp), %rax
addl 0x8(%rax), %ecx
movl %ecx, 0x8(%rax)
movl -0x24(%rbp), %ecx
movq -0x40(%rbp), %rax
addl 0xc(%rax), %ecx
movl %ecx, 0xc(%rax)
movq -0x40(%rbp), %rax
movq (%rax), %rax
movq -0x40(%rbp), %rcx
movslq 0xc(%rcx), %rcx
movb $0x0, (%rax,%rcx)
movq -0x40(%rbp), %rax
movq (%rax), %rdi
leaq 0x1fa7d(%rip), %rsi     # 0x374e2
callq 0x30d0
cmpq $0x0, %rax
je 0x17b06
movq -0x20(%rbp), %rax
movl $0xd, 0x38(%rax)
movq -0x40(%rbp), %rdi
callq 0x2d640
movb $0x0, %al
callq 0x242d0
cmpl $0x8, (%rax)
jl 0x17aba
movl $0x8, %edi
leaq 0x1ed90(%rip), %rsi     # 0x36830
leaq 0x2012b(%rip), %rdx     # 0x37bd2
movl $0x2b1, %ecx            # imm = 0x2B1
leaq 0x1efe7(%rip), %r8      # 0x36a9a
movb $0x0, %al
callq 0x243b0
jmp 0x17abc
movl $0x0, -0x24(%rbp)
movq -0x20(%rbp), %rax
movl 0x28(%rax), %eax
movq -0x20(%rbp), %rcx
subl 0x2c(%rcx), %eax
cmpl $0x0, %eax
jle 0x17afb
movq -0x20(%rbp), %rax
movl (%rax), %edi
movq -0x20(%rbp), %rsi
addq $0x20, %rsi
callq 0x265a0
movl %eax, -0x24(%rbp)
cmpl $0x0, -0x24(%rbp)
jl 0x17af9
movl $0x0, -0x24(%rbp)
jmp 0x17afb
movl -0x24(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x17bb8
movq -0x40(%rbp), %rax
cmpl $0x14000, 0x8(%rax)     # imm = 0x14000
jl 0x17b63
jmp 0x17b15
movb $0x0, %al
callq 0x242d0
cmpl $0x3, (%rax)
jl 0x17b4f
movq -0x40(%rbp), %rax
movl 0xc(%rax), %r9d
movl $0x3, %edi
leaq 0x1ecfb(%rip), %rsi     # 0x36830
leaq 0x20096(%rip), %rdx     # 0x37bd2
movl $0x2bc, %ecx            # imm = 0x2BC
leaq 0x1efa7(%rip), %r8      # 0x36aef
movb $0x0, %al
callq 0x243b0
jmp 0x17b51
movq -0x40(%rbp), %rdi
callq 0x2d640
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x17bb8
movq -0x20(%rbp), %rax
movl $0xc, 0x38(%rax)
jmp 0x17b70
jmp 0x17bb1
jmp 0x17b74
movb $0x0, %al
callq 0x242d0
cmpl $0x3, (%rax)
jl 0x17ba6
movl $0x3, %edi
leaq 0x1eca4(%rip), %rsi     # 0x36830
leaq 0x2003f(%rip), %rdx     # 0x37bd2
movl $0x2c5, %ecx            # imm = 0x2C5
leaq 0x1edf7(%rip), %r8      # 0x36996
movb $0x0, %al
callq 0x243b0
jmp 0x17ba8
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x17bb8
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x120, %rsp            # imm = 0x120
popq %rbp
retq
nopw %cs:(%rax,%rax)