// File: /workspace/github_cpp_makefile_star2_O1/m1c0l[P]http-client-server/web-client.cpp
// Function: processRequest(sockaddr*, HttpRequest*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
int processRequest(sockaddr *serverAddr, HttpRequest* req, string filename) {

	// create a socket using TCP IP
	int sockfd = socket(AF_INET, SOCK_STREAM, 0);
	if (sockfd == -1) {
		perror("socket");
		return -1;
	}

	// connect to the server
	future<int> connectFut = async(launch::async, connect, sockfd,
					serverAddr, sizeof(*serverAddr));
	if (waitFor(connectFut) == -1) {
		close(sockfd);
		return -1;
	}
	if (connectFut.get() == -1) {
		perror("connect");
		return -1;
	}

	// send request
	string msg = req->encode();
	future<ssize_t> sendFut = async(launch::async, send, sockfd,
					msg.c_str(), msg.size(), 0);
	if (waitFor(sendFut) == -1) {
		close(sockfd);
		return -1;
	}
	if (sendFut.get() == -1) {
		perror("send");
		close(sockfd);
		return -1;
	}

	char buf[BUFFER_SIZE + 1] = {0};
	string resBuf;
	HttpResponse* res = new HttpResponse();

	const string eoh = "\r\n\r\n"; // end of header
	int bytesRead = 0;

	// get response's header
	while (true) {
		memset(buf, '\0', sizeof(buf));

		future<ssize_t> recvFut = async(launch::async, recv, sockfd,
						buf, BUFFER_SIZE, 0);
		if (waitFor(recvFut) == -1) {
			close(sockfd);
			return -1;
		}
		bytesRead = recvFut.get();
		if (bytesRead == -1) {
			perror("recv");
			return -1;
		}
		resBuf.append(buf, bytesRead);

		// when the entire header has been read, decode it
		size_t pos = resBuf.find(eoh);
		if (pos != string::npos) {
			size_t end = pos + eoh.size();

			// decode the header
			res->decode(resBuf.substr(0, end));

			// discard the header but keep the rest of the buffer
			resBuf = resBuf.substr(end, resBuf.size());
			break;
		}

		// if end of header is not detected but no incoming data
		if (bytesRead == 0) {
			cerr << "Incomplete HTTP response" << '\n';
			close(sockfd);
			return 7;
		}
	}

	// output the status and description
	cout << req->getHeader("Host") << " " << req->getUrl() << ": " + res->getStatus() + " " + res->getDescription() << '\n';

	// 200 OK
	if (res->getStatus() == "200") {
		// get file name
		string filenameCopy = filename.c_str();
		string base = basename((char*)filenameCopy.c_str());
		if (filename[filename.size() - 1] == '/') {
			base = "index.html";
		}

		// save retrieved file
		ofstream of;
		of.open(base);

		// leftover data from reading header
		of.write(resBuf.c_str(), resBuf.size());

		while (true) {
			memset(buf, '\0', sizeof(buf));

			future<ssize_t> recvFut = async(launch::async, recv,
					sockfd, buf, BUFFER_SIZE, 0);
			if (waitFor(recvFut) == -1) {
				close(sockfd);
				return -1;
			}

			bytesRead = recvFut.get();
			if (bytesRead == -1) {
				perror("recv");
				close(sockfd);
				of.close();
				return 8;
			}
			if (bytesRead == 0) {
				of.close();
				close(sockfd);
				return 0;
			}

			of.write(buf, bytesRead);
		}
	}

	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x498, %rsp            # imm = 0x498
movq %rdx, %r14
movq %rsi, %r13
movq %rdi, 0x138(%rsp)
movl $0x2, %edi
movl $0x1, %esi
xorl %edx, %edx
callq 0x5090
movl %eax, 0x14(%rsp)
cmpl $-0x1, %eax
je 0x8153
leaq 0x1c0(%rsp), %r9
movq $0x10, (%r9)
movq 0xa417(%rip), %rdx      # 0x11fa0
leaq 0x128(%rsp), %rbx
leaq 0x14(%rsp), %rcx
leaq 0x138(%rsp), %r8
movq %rbx, %rdi
movl $0x1, %esi
callq 0x909e
movq %rbx, %rdi
callq 0x921c
cmpl $-0x1, %eax
je 0x7f44
leaq 0x128(%rsp), %rdi
callq 0x9276
cmpl $-0x1, %eax
je 0x8594
leaq 0x180(%rsp), %rdi
movq %r13, %rsi
callq 0x5e6c
movq 0x180(%rsp), %rax
movq 0x188(%rsp), %rcx
leaq 0x1c0(%rsp), %r12
movq %rax, (%r12)
leaq 0x3c0(%rsp), %r9
movq %rcx, (%r9)
leaq 0x88(%rsp), %rax
movl $0x0, (%rax)
movq %rax, (%rsp)
movq 0xa356(%rip), %rdx      # 0x11f78
leaq 0x108(%rsp), %rdi
leaq 0x14(%rsp), %rcx
movl $0x1, %esi
movq %r12, %r8
callq 0x92c2
leaq 0x108(%rsp), %rdi
callq 0x9452
cmpl $-0x1, %eax
je 0x85b3
leaq 0x108(%rsp), %rdi
callq 0x94ac
cmpq $-0x1, %rax
je 0x85a7
leaq 0x3c0(%rsp), %rdi
movl $0xc9, %edx
xorl %esi, %esi
callq 0x5190
leaq 0x98(%rsp), %rax
movq %rax, -0x10(%rax)
movq $0x0, -0x8(%rax)
movb $0x0, (%rax)
movl $0xa0, %edi
callq 0x5300
movq %rax, %r15
movq %r13, 0x120(%rsp)
movq %r14, 0x118(%rsp)
xorl %ebx, %ebx
movl $0xa0, %edx
movq %rax, %rdi
xorl %esi, %esi
callq 0x5190
leaq 0x18(%r15), %rax
movq %rax, 0x8(%r15)
movq %rbx, 0x10(%r15)
movb %bl, 0x18(%r15)
leaq 0x58(%r15), %rax
movq %rax, 0x28(%r15)
movq $0x1, 0x30(%r15)
xorps %xmm0, %xmm0
movups %xmm0, 0x38(%r15)
movl $0x3f800000, 0x48(%r15) # imm = 0x3F800000
movups %xmm0, 0x50(%r15)
leaq 0x99d2(%rip), %rax      # 0x116d0
addq $0x10, %rax
movq %rax, (%r15)
leaq 0x70(%r15), %rax
movq %rax, 0x60(%r15)
movq %rbx, 0x68(%r15)
movb %bl, 0x70(%r15)
movq %r15, %rax
addq $0x90, %rax
movq %rax, 0x80(%r15)
movq %rbx, 0x88(%r15)
movq %r15, 0x80(%rsp)
movb %bl, 0x90(%r15)
leaq 0xb8(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0x4381(%rip), %rsi      # 0xc0cf
leaq 0x437e(%rip), %rdx      # 0xc0d3
leaq 0xa8(%rsp), %rdi
callq 0x671a
leaq 0x3c0(%rsp), %r13
leaq 0x40(%rsp), %r15
leaq 0x88(%rsp), %rbx
movl $0xc9, %edx
movq %r13, %rdi
xorl %esi, %esi
callq 0x5190
movl $0x0, 0x1c0(%rsp)
movq %r12, (%rsp)
movq %r15, %rdi
movl $0x1, %esi
movq 0xa1bc(%rip), %rdx      # 0x11f60
leaq 0x14(%rsp), %rcx
movq %r13, %r8
leaq 0x439d(%rip), %r9       # 0xc150
callq 0x94fd
movq %r15, %rdi
callq 0x9452
cmpl $-0x1, %eax
je 0x7eb5
movq %r15, %rdi
callq 0x94ac
movq %rax, %r14
cmpl $-0x1, %r14d
je 0x7f33
movslq %r14d, %rdx
movq %rbx, %rdi
movq %r13, %rsi
callq 0x5060
movq 0xa8(%rsp), %rsi
movq 0xb0(%rsp), %rcx
movq %rbx, %rdi
xorl %edx, %edx
callq 0x5530
cmpq $-0x1, %rax
je 0x7ecd
movq %rax, %rbp
addq 0xb0(%rsp), %rbp
leaq 0x160(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rsi
xorl %edx, %edx
movq %rbp, %rcx
callq 0x5350
movq 0x80(%rsp), %rdi
movq %r14, %rsi
callq 0x5be4
movq 0x160(%rsp), %rdi
leaq 0x170(%rsp), %rax
cmpq %rax, %rdi
je 0x7e68
movq 0x170(%rsp), %rsi
incq %rsi
callq 0x5320
movq 0x90(%rsp), %rcx
movq %r12, %rdi
movq %rbx, %rsi
movq %rbp, %rdx
callq 0x5350
movq %rbx, %rdi
movq %r12, %rsi
callq 0x53c0
movq 0x1c0(%rsp), %rdi
leaq 0x1d0(%rsp), %rax
cmpq %rax, %rdi
je 0x7eae
movq 0x1d0(%rsp), %rsi
incq %rsi
callq 0x5320
movl $0x3, %ebp
jmp 0x7ed4
movl 0x14(%rsp), %edi
callq 0x5590
movl $0xffffffff, 0x18(%rsp) # imm = 0xFFFFFFFF
movl $0x1, %ebp
jmp 0x7ed4
xorl %ebp, %ebp
testl %r14d, %r14d
je 0x7eed
movq 0x48(%rsp), %rdi
testq %rdi, %rdi
je 0x7ee3
callq 0x973a
testl %ebp, %ebp
je 0x7d77
jmp 0x7f57
movl $0x18, %edx
movq 0xa0f7(%rip), %r14      # 0x11ff0
movq %r14, %rdi
leaq 0x41d6(%rip), %rsi      # 0xc0d9
callq 0x5390
movb $0xa, 0x1c0(%rsp)
movl $0x1, %edx
movq %r14, %rdi
movq %r12, %rsi
callq 0x5390
movl 0x14(%rsp), %edi
callq 0x5590
movl $0x7, 0x18(%rsp)
jmp 0x7ec6
leaq 0x419a(%rip), %rdi      # 0xc0d4
callq 0x5250
jmp 0x7ebe
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
movl 0x14(%rsp), %edi
callq 0x5590
jmp 0x85f4
cmpl $0x3, %ebp
jne 0x8062
leaq 0x150(%rsp), %r14
movq %r14, -0x10(%r14)
leaq 0x417f(%rip), %rsi      # 0xc0f2
leaq 0x417c(%rip), %rdx      # 0xc0f6
leaq 0x140(%rsp), %rdi
callq 0x671a
leaq 0x1c0(%rsp), %rdi
leaq 0x140(%rsp), %rdx
movq 0x120(%rsp), %r15
movq %r15, %rsi
callq 0x5954
movq 0x80(%rsp), %r13
movq 0x1c0(%rsp), %rsi
movq 0x1c8(%rsp), %rdx
movq 0x9ff2(%rip), %rdi      # 0x11fb8
callq 0x5390
movq %rax, %rbx
leaq 0x4137(%rip), %rsi      # 0xc10c
movl $0x1, %edx
movq %rax, %rdi
callq 0x5390
leaq 0x40(%rsp), %rdi
movq %r15, %rsi
callq 0x67ea
movq 0x40(%rsp), %rsi
movq 0x48(%rsp), %rdx
movq %rbx, %rdi
callq 0x5390
movq %rax, %rbx
leaq 0x1a0(%rsp), %rdi
movq %r13, %rsi
callq 0x72ea
leaq 0x40f0(%rip), %rcx      # 0xc10b
leaq 0x1a0(%rsp), %rdi
movl $0x2, %r8d
xorl %esi, %esi
xorl %edx, %edx
callq 0x5380
leaq 0xf8(%rsp), %r15
movq %r15, -0x10(%r15)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x806b
movq %rdx, 0xe8(%rsp)
movq (%rcx), %rdx
movq %rdx, 0xf8(%rsp)
jmp 0x8072
movl 0x18(%rsp), %ebp
jmp 0x8548
movups (%rcx), %xmm0
movups %xmm0, (%r15)
movq 0x8(%rax), %rdx
leaq 0xe8(%rsp), %rdi
movq %rdx, 0x8(%rdi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x4074(%rip), %rsi      # 0xc10c
callq 0x5570
leaq 0x70(%rsp), %r12
movq %r12, -0x10(%r12)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x80c5
movq %rdx, 0x60(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x70(%rsp)
jmp 0x80cd
movups (%rcx), %xmm0
movups %xmm0, (%r12)
movq 0x8(%rax), %rdx
movq %rdx, 0x68(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0xc8(%rsp), %rdi
movq %r13, %rsi
callq 0x730e
movq 0x60(%rsp), %rcx
movq 0x68(%rsp), %r8
movq 0xd0(%rsp), %rdx
leaq (%rdx,%r8), %rax
movl $0xf, %esi
cmpq %r12, %rcx
je 0x811a
movq 0x70(%rsp), %rsi
cmpq %rsi, %rax
jbe 0x813f
leaq 0xd8(%rsp), %rdi
movl $0xf, %esi
cmpq %rdi, -0x10(%rdi)
je 0x813a
movq 0xd8(%rsp), %rsi
cmpq %rsi, %rax
jbe 0x8169
movq 0xc8(%rsp), %rsi
leaq 0x60(%rsp), %rdi
callq 0x50c0
jmp 0x817a
leaq 0x3f61(%rip), %rdi      # 0xc0bb
callq 0x5250
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
jmp 0x8606
leaq 0xc8(%rsp), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x5380
leaq 0x30(%rsp), %rdx
movq %rdx, -0x10(%rdx)
movq (%rax), %rsi
leaq 0x10(%rax), %rcx
cmpq %rcx, %rsi
je 0x819e
movq %rsi, 0x20(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x30(%rsp)
jmp 0x81a4
movups (%rcx), %xmm0
movups %xmm0, (%rdx)
movq %rax, %rdx
addq $0x8, %rdx
movq 0x8(%rax), %rsi
movq %rsi, 0x28(%rsp)
movq %rcx, (%rax)
movq $0x0, (%rdx)
movb $0x0, (%rcx)
movq 0x20(%rsp), %rsi
movq 0x28(%rsp), %rdx
movq %rbx, %rdi
callq 0x5390
leaq 0x1f(%rsp), %rsi
movb $0xa, (%rsi)
movl $0x1, %edx
movq %rax, %rdi
callq 0x5390
leaq 0x30(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x8203
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x5320
leaq 0xd8(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x8224
movq 0xd8(%rsp), %rsi
incq %rsi
callq 0x5320
movq 0x60(%rsp), %rdi
cmpq %r12, %rdi
je 0x823b
movq 0x70(%rsp), %rsi
incq %rsi
callq 0x5320
movq 0xe8(%rsp), %rdi
cmpq %r15, %rdi
je 0x8258
movq 0xf8(%rsp), %rsi
incq %rsi
callq 0x5320
leaq 0x1b0(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x8279
movq 0x1b0(%rsp), %rsi
incq %rsi
callq 0x5320
leaq 0x50(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x8294
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x5320
movq 0x1c0(%rsp), %rdi
leaq 0x1d0(%rsp), %rax
cmpq %rax, %rdi
je 0x82b9
movq 0x1d0(%rsp), %rsi
incq %rsi
callq 0x5320
movq 0x140(%rsp), %rdi
cmpq %r14, %rdi
je 0x82d6
movq 0x150(%rsp), %rsi
incq %rsi
callq 0x5320
leaq 0x1c0(%rsp), %rdi
movq %r13, %rsi
callq 0x72ea
leaq 0x3e0a(%rip), %rsi      # 0xc0f7
leaq 0x1c0(%rsp), %r14
movq %r14, %rdi
callq 0x50b0
movl %eax, %ebx
movq (%r14), %rdi
leaq 0x1d0(%rsp), %rax
cmpq %rax, %rdi
je 0x831f
movq 0x1d0(%rsp), %rsi
incq %rsi
callq 0x5320
xorl %ebp, %ebp
testl %ebx, %ebx
jne 0x8548
movq 0x118(%rsp), %rbx
movq (%rbx), %rsi
leaq 0x40(%rsp), %rdi
leaq 0x1c0(%rsp), %rdx
callq 0x9012
movq 0x40(%rsp), %rdi
callq 0x5520
leaq 0x20(%rsp), %rdi
leaq 0x1c0(%rsp), %rdx
movq %rax, %rsi
callq 0x9012
movl 0x18(%rsp), %ebp
movq (%rbx), %rax
movq 0x8(%rbx), %rcx
cmpb $0x2f, -0x1(%rax,%rcx)
jne 0x8394
leaq 0x20(%rsp), %rdi
movq 0x8(%rdi), %rdx
leaq 0x3d74(%rip), %rcx      # 0xc0fb
movl $0xa, %r8d
xorl %esi, %esi
callq 0x54c0
leaq 0x1c0(%rsp), %rdi
callq 0x5510
leaq 0x1c0(%rsp), %rdi
leaq 0x20(%rsp), %rsi
movl $0x10, %edx
callq 0x5140
movq 0x88(%rsp), %rsi
movq 0x90(%rsp), %rdx
leaq 0x1c0(%rsp), %rdi
callq 0x5400
leaq 0x3c0(%rsp), %rbx
leaq 0x3d6c(%rip), %r12      # 0xc150
leaq 0x60(%rsp), %r13
leaq 0x14(%rsp), %r15
movl $0xc9, %edx
movq %rbx, %rdi
xorl %esi, %esi
callq 0x5190
movl $0x0, 0xe8(%rsp)
leaq 0xe8(%rsp), %rax
movq %rax, (%rsp)
movq %r13, %rdi
movl $0x1, %esi
movq 0x9b3d(%rip), %rdx      # 0x11f60
movq %r15, %rcx
movq %rbx, %r8
movq %r12, %r9
callq 0x94fd
movq %r13, %rdi
callq 0x9452
cmpl $-0x1, %eax
je 0x8467
movq %r13, %rdi
callq 0x94ac
testl %eax, %eax
je 0x847a
cmpl $-0x1, %eax
je 0x84af
movslq %eax, %rdx
movb $0x1, %r14b
leaq 0x1c0(%rsp), %rdi
movq %rbx, %rsi
callq 0x5400
jmp 0x8495
movl 0x14(%rsp), %edi
callq 0x5590
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
xorl %r14d, %r14d
jmp 0x8495
leaq 0x1c0(%rsp), %rdi
callq 0x5460
xorl %r14d, %r14d
movl 0x14(%rsp), %edi
callq 0x5590
xorl %ebp, %ebp
movq 0x68(%rsp), %rdi
testq %rdi, %rdi
je 0x84a4
callq 0x973a
testb %r14b, %r14b
jne 0x83ee
jmp 0x84d8
leaq 0x3c1e(%rip), %rdi      # 0xc0d4
callq 0x5250
movl 0x14(%rsp), %edi
callq 0x5590
leaq 0x1c0(%rsp), %rdi
callq 0x5460
movl $0x8, %ebp
jmp 0x8475
movq 0x9ab1(%rip), %rax      # 0x11f90
movq (%rax), %rcx
movq 0x18(%rax), %rax
leaq 0x1c8(%rsp), %rdi
movq %rcx, -0x8(%rdi)
movq -0x18(%rcx), %rcx
movq %rax, 0x1c0(%rsp,%rcx)
callq 0x5260
leaq 0x2b8(%rsp), %rdi
callq 0x50d0
movq 0x20(%rsp), %rdi
leaq 0x30(%rsp), %rax
cmpq %rax, %rdi
je 0x852c
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x5320
movq 0x40(%rsp), %rdi
leaq 0x50(%rsp), %rax
cmpq %rax, %rdi
je 0x8548
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x5320
movq 0xa8(%rsp), %rdi
leaq 0xb8(%rsp), %rax
cmpq %rax, %rdi
je 0x856d
movq 0xb8(%rsp), %rsi
incq %rsi
callq 0x5320
movq 0x88(%rsp), %rdi
leaq 0x98(%rsp), %rax
cmpq %rax, %rdi
je 0x85c1
movq 0x98(%rsp), %rsi
incq %rsi
callq 0x5320
jmp 0x85c1
leaq 0x3b27(%rip), %rdi      # 0xc0c2
callq 0x5250
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
jmp 0x85f4
leaq 0x3b1c(%rip), %rdi      # 0xc0ca
callq 0x5250
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
movl 0x14(%rsp), %edi
callq 0x5590
movq 0x110(%rsp), %rdi
testq %rdi, %rdi
je 0x85d3
callq 0x973a
leaq 0x190(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x85f4
movq 0x190(%rsp), %rsi
incq %rsi
callq 0x5320
movq 0x130(%rsp), %rdi
testq %rdi, %rdi
je 0x8606
callq 0x973a
movl %ebp, %eax
addq $0x498, %rsp            # imm = 0x498
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x861c
movq %rax, %rbx
jmp 0x87e8
movq %rax, %rbx
jmp 0x8804
jmp 0x87c4
jmp 0x878e
jmp 0x87c4
movq %rax, %rbx
jmp 0x868c
movq %rax, %rbx
jmp 0x86ad
movq %rax, %rbx
jmp 0x86c4
movq %rax, %rbx
jmp 0x86e1
jmp 0x8654
movq %rax, %rbx
jmp 0x8702
jmp 0x871f
movq %rax, %rbx
jmp 0x8747
jmp 0x87c4
movq %rax, %rbx
leaq 0x30(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x868c
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x5320
leaq 0xd8(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x86ad
movq 0xd8(%rsp), %rsi
incq %rsi
callq 0x5320
movq 0x60(%rsp), %rdi
cmpq %r12, %rdi
je 0x86c4
movq 0x70(%rsp), %rsi
incq %rsi
callq 0x5320
movq 0xe8(%rsp), %rdi
cmpq %r15, %rdi
je 0x86e1
movq 0xf8(%rsp), %rsi
incq %rsi
callq 0x5320
leaq 0x1b0(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x8702
movq 0x1b0(%rsp), %rsi
incq %rsi
callq 0x5320
leaq 0x50(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x8722
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x5320
jmp 0x8722
movq %rax, %rbx
movq 0x1c0(%rsp), %rdi
leaq 0x1d0(%rsp), %rax
cmpq %rax, %rdi
je 0x8747
movq 0x1d0(%rsp), %rsi
incq %rsi
callq 0x5320
movq 0x140(%rsp), %rdi
cmpq %r14, %rdi
je 0x8834
movq 0x150(%rsp), %rsi
jmp 0x8818
jmp 0x8767
movq %rax, %rbx
jmp 0x8859
movq %rax, %rbx
jmp 0x8890
jmp 0x8786
movq %rax, %rbx
jmp 0x887e
jmp 0x8822
movq %rax, %rbx
jmp 0x88b1
movq %rax, %rbx
jmp 0x87db
jmp 0x8822
movq %rax, %rbx
movq 0x160(%rsp), %rdi
leaq 0x170(%rsp), %rax
cmpq %rax, %rdi
je 0x8825
movq 0x170(%rsp), %rsi
incq %rsi
callq 0x5320
jmp 0x8825
jmp 0x8822
movq %rax, %rbx
jmp 0x8834
movq %rax, %rbx
movq 0x68(%rsp), %rdi
testq %rdi, %rdi
je 0x87db
callq 0x973a
leaq 0x1c0(%rsp), %rdi
callq 0x5490
movq 0x20(%rsp), %rdi
leaq 0x30(%rsp), %rax
cmpq %rax, %rdi
je 0x8804
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x5320
movq 0x40(%rsp), %rdi
leaq 0x50(%rsp), %rax
cmpq %rax, %rdi
je 0x8834
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x5320
jmp 0x8834
movq %rax, %rbx
movq 0x48(%rsp), %rdi
testq %rdi, %rdi
je 0x8834
callq 0x973a
movq 0xa8(%rsp), %rdi
leaq 0xb8(%rsp), %rax
cmpq %rax, %rdi
je 0x8859
movq 0xb8(%rsp), %rsi
incq %rsi
callq 0x5320
movq 0x88(%rsp), %rdi
leaq 0x98(%rsp), %rax
cmpq %rax, %rdi
je 0x887e
movq 0x98(%rsp), %rsi
incq %rsi
callq 0x5320
movq 0x110(%rsp), %rdi
testq %rdi, %rdi
je 0x8890
callq 0x973a
leaq 0x190(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x88b1
movq 0x190(%rsp), %rsi
incq %rsi
callq 0x5320
movq 0x130(%rsp), %rdi
testq %rdi, %rdi
je 0x88c3
callq 0x973a
movq %rbx, %rdi
callq 0x5540