// File: /workspace/github_cpp_makefile_star2_O3/Doug0855[P]TigerZone/main.cpp
// Function: roundProtocol(Client&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&, int)
void roundProtocol(Client &client, std::string &message_list, int rounds)
{
	int round_id;
	std::string message;
	std::string TERMINATE_ROUND = "END OF ROUND " + std::to_string(rounds) + " OF " + std::to_string(rounds);
	message = getMesssage(client, message_list);
	std::cout << GREEN << "Server sent: " << RESET << message << std::endl;

	while (message != TERMINATE_ROUND)
	{
		if (message.compare(0,1,"B") == 0) //executing a new round
		{
			std::cout << "	BEGINNING ROUND..." << std::endl;
			round_id = stoi(message.substr(12,message.find(" OF")-12));
			matchProtocol(client, message_list); // pass message reference
			message = getMesssage(client, message_list);
			std::cout << GREEN << "Server sent: " << RESET << message << std::endl;
		}
		else if (message.compare(0,1,"E") == 0) //waiting for the next round to begin
		{
			std::cout << "	END OF ROUND...WAITING FOR THE NEXT MATCH" << std::endl;
			message = getMesssage(client, message_list);
			std::cout << GREEN << "Server sent: " << RESET << message << std::endl;
		}
		else //hopefully this is never reached
		{
			std::cout << "	ERROR: previous message could not be processed correctly. Message skipped!" << std::endl;
			std::cout << "		ERROR message: " << message << std::endl;
			message = getMesssage(client, message_list);
			std::cout << GREEN << "Server sent: " << RESET << message << std::endl;
		}
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xd8, %rsp
movl %edx, %r12d
movq %rsi, -0x70(%rbp)
movq %rdi, -0x78(%rbp)
leaq -0x58(%rbp), %rax
movq %rax, -0x10(%rax)
movq $0x0, -0x8(%rax)
movb $0x0, (%rax)
movl %edx, %r15d
negl %r15d
cmovsl %edx, %r15d
movl $0x1, %r13d
cmpl $0xa, %r15d
jb 0x6c0e
movl $0x4, %r13d
movl $0xd1b71759, %eax       # imm = 0xD1B71759
movl %r15d, %ecx
cmpl $0x63, %ecx
jbe 0x6c05
cmpl $0x3e7, %ecx            # imm = 0x3E7
jbe 0x6c0b
cmpl $0x2710, %ecx           # imm = 0x2710
jb 0x6c0e
movl %ecx, %edx
imulq %rax, %rdx
shrq $0x2d, %rdx
addl $0x4, %r13d
cmpl $0x1869f, %ecx          # imm = 0x1869F
movl %edx, %ecx
ja 0x6bd2
addl $-0x3, %r13d
jmp 0x6c0e
addl $-0x2, %r13d
jmp 0x6c0e
decl %r13d
shrl $0x1f, %r12d
leal (%r12,%r13), %esi
leaq -0xe8(%rbp), %rax
movq %rax, -0x10(%rax)
leaq -0xf8(%rbp), %rdi
movl $0x2d, %edx
callq 0x3290
movl %r12d, %eax
leaq -0xf8(%rbp), %rbx
movq (%rbx), %rdi
movq %rax, %r14
addq %rax, %rdi
movl %r13d, %esi
movl %r15d, %edx
callq 0x9c52
leaq 0x115a3(%rip), %rcx     # 0x181fa
movl $0xd, %r8d
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x3260
leaq -0xa8(%rbp), %rsi
movq %rsi, -0x10(%rsi)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x6c96
movq %rdx, -0xb8(%rbp)
movq (%rcx), %rdx
movq %rdx, -0xa8(%rbp)
jmp 0x6c9c
movups (%rcx), %xmm0
movups %xmm0, (%rsi)
movq 0x8(%rax), %rdx
leaq -0xb8(%rbp), %rdi
movq %rdx, 0x8(%rdi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x11547(%rip), %rsi     # 0x18208
callq 0x3420
leaq -0x38(%rbp), %rsi
movq %rsi, -0x10(%rsi)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x6cea
movq %rdx, -0x48(%rbp)
movq (%rcx), %rdx
movq %rdx, -0x38(%rbp)
jmp 0x6cf0
movups (%rcx), %xmm0
movups %xmm0, (%rsi)
movq 0x8(%rax), %rdx
movq %rdx, -0x40(%rbp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movl $0x1, %r13d
cmpl $0xa, %r15d
jb 0x6d5d
movl $0x4, %r13d
movl $0xd1b71759, %eax       # imm = 0xD1B71759
movl %r15d, %ecx
cmpl $0x63, %ecx
jbe 0x6d54
cmpl $0x3e7, %ecx            # imm = 0x3E7
jbe 0x6d5a
cmpl $0x2710, %ecx           # imm = 0x2710
jb 0x6d5d
movl %ecx, %edx
imulq %rax, %rdx
shrq $0x2d, %rdx
addl $0x4, %r13d
cmpl $0x1869f, %ecx          # imm = 0x1869F
movl %edx, %ecx
ja 0x6d21
addl $-0x3, %r13d
jmp 0x6d5d
addl $-0x2, %r13d
jmp 0x6d5d
decl %r13d
addl %r13d, %r12d
leaq -0xc8(%rbp), %rbx
movq %rbx, -0x10(%rbx)
leaq -0xd8(%rbp), %rdi
movq %r12, %rsi
movl $0x2d, %edx
callq 0x3290
addq -0xd8(%rbp), %r14
movq %r14, %rdi
movl %r13d, %esi
movl %r15d, %edx
callq 0x9c52
movq -0x48(%rbp), %rcx
movq -0x40(%rbp), %r8
movq -0xd0(%rbp), %rdx
leaq (%rdx,%r8), %rax
movl $0xf, %edi
leaq -0x38(%rbp), %r15
cmpq %r15, %rcx
movq -0x78(%rbp), %r12
je 0x6dbd
movq -0x38(%rbp), %rdi
movq -0xd8(%rbp), %rsi
cmpq %rdi, %rax
jbe 0x6ddf
movl $0xf, %edi
cmpq %rbx, %rsi
je 0x6dda
movq -0xc8(%rbp), %rdi
cmpq %rdi, %rax
jbe 0x6dea
leaq -0x48(%rbp), %rdi
callq 0x30c0
jmp 0x6dfa
leaq -0xd8(%rbp), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x3260
leaq -0x88(%rbp), %rdx
movq %rdx, -0x10(%rdx)
movq (%rax), %rsi
leaq 0x10(%rax), %rcx
cmpq %rcx, %rsi
je 0x6e24
movq %rsi, -0x98(%rbp)
movq (%rcx), %rdx
movq %rdx, -0x88(%rbp)
jmp 0x6e2a
movups (%rcx), %xmm0
movups %xmm0, (%rdx)
movq %rax, %rdx
addq $0x8, %rdx
movq 0x8(%rax), %rsi
movq %rsi, -0x90(%rbp)
movq %rcx, (%rax)
movq $0x0, (%rdx)
movb $0x0, (%rcx)
movq -0xd8(%rbp), %rdi
cmpq %rbx, %rdi
je 0x6e5a
callq 0x3200
movq -0x48(%rbp), %rdi
cmpq %r15, %rdi
movq -0x70(%rbp), %r14
je 0x6e6c
callq 0x3200
movq -0xb8(%rbp), %rdi
leaq -0xa8(%rbp), %rax
cmpq %rax, %rdi
je 0x6e84
callq 0x3200
movq -0xf8(%rbp), %rdi
leaq -0xe8(%rbp), %rax
cmpq %rax, %rdi
je 0x6e9c
callq 0x3200
leaq -0x48(%rbp), %rdi
movq %r12, %rsi
movq %r14, %rdx
callq 0x40d1
leaq -0x68(%rbp), %rdi
leaq -0x48(%rbp), %rbx
movq %rbx, %rsi
callq 0x32b0
movq (%rbx), %rdi
cmpq %r15, %rdi
je 0x6ec8
callq 0x3200
movq 0x180f9(%rip), %rdi     # 0x1efc8
leaq 0x1118c(%rip), %rsi     # 0x18062
movl $0x5, %edx
callq 0x3280
movq 0x180e1(%rip), %rdi     # 0x1efc8
leaq 0x1119c(%rip), %rsi     # 0x1808a
movl $0xd, %edx
callq 0x3280
movq 0x180c9(%rip), %rdi     # 0x1efc8
leaq 0x11168(%rip), %rsi     # 0x1806e
movl $0x4, %edx
callq 0x3280
movq -0x68(%rbp), %rsi
movq -0x60(%rbp), %rdx
movq 0x180a9(%rip), %r15     # 0x1efc8
movq %r15, %rdi
callq 0x3280
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x3210
movsbl %al, %esi
movq %rbx, %rdi
callq 0x3030
movq %rax, %rdi
callq 0x3180
leaq -0x68(%rbp), %r13
movq -0x60(%rbp), %rdx
cmpq -0x90(%rbp), %rdx
jne 0x6f86
movq -0x98(%rbp), %rbx
testq %rdx, %rdx
je 0x733d
movq -0x68(%rbp), %rdi
movq %rbx, %rsi
callq 0x3230
testl %eax, %eax
je 0x733d
movl $0x1, %edx
movq %r13, %rdi
xorl %esi, %esi
leaq 0x115a6(%rip), %rcx     # 0x1853d
callq 0x32d0
testl %eax, %eax
je 0x70e2
movl $0x1, %edx
movq %r13, %rdi
xorl %esi, %esi
leaq 0x115d9(%rip), %rcx     # 0x1858e
callq 0x32d0
testl %eax, %eax
je 0x7258
movl $0x4b, %edx
movq %r15, %rdi
leaq 0x111cb(%rip), %rsi     # 0x1819c
callq 0x3280
movq (%r15), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x3210
movsbl %al, %esi
movq %r15, %rdi
callq 0x3030
movq %rax, %rdi
callq 0x3180
movl $0x11, %edx
movq %r15, %rdi
leaq 0x111dc(%rip), %rsi     # 0x181e8
callq 0x3280
movq -0x68(%rbp), %rsi
movq -0x60(%rbp), %rdx
movq %r15, %rdi
callq 0x3280
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x3210
movsbl %al, %esi
movq %rbx, %rdi
callq 0x3030
movq %rax, %rdi
callq 0x3180
leaq -0x48(%rbp), %rbx
movq %rbx, %rdi
movq %r12, %rsi
movq %r14, %rdx
callq 0x40d1
movq %r13, %rdi
movq %rbx, %rsi
callq 0x32b0
movq -0x48(%rbp), %rdi
leaq -0x38(%rbp), %rax
cmpq %rax, %rdi
je 0x707a
callq 0x3200
movl $0x5, %edx
movq %r15, %rdi
leaq 0x10fd9(%rip), %rsi     # 0x18062
callq 0x3280
movl $0xd, %edx
movq %r15, %rdi
leaq 0x10fed(%rip), %rsi     # 0x1808a
callq 0x3280
movl $0x4, %edx
movq %r15, %rdi
leaq 0x10fbd(%rip), %rsi     # 0x1806e
callq 0x3280
movq -0x68(%rbp), %rsi
movq -0x60(%rbp), %rdx
movq %r15, %rdi
callq 0x3280
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x3210
jmp 0x7325
movl $0x13, %edx
movq %r15, %rdi
leaq 0x1111c(%rip), %rsi     # 0x1820d
callq 0x3280
movq (%r15), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x3210
movsbl %al, %esi
movq %r15, %rdi
callq 0x3030
movq %rax, %rdi
callq 0x3180
movl $0x3, %ecx
movq %r13, %rdi
leaq 0x110f5(%rip), %rsi     # 0x18221
xorl %edx, %edx
callq 0x33e0
leaq -0xc(%rax), %rcx
movl $0xc, %edx
leaq -0x48(%rbp), %rdi
movq %r13, %rsi
callq 0x3240
movq -0x48(%rbp), %r14
callq 0x3040
movq %rax, %rbx
movl (%rax), %r12d
movl $0x0, (%rax)
movq %r14, %rdi
leaq -0xb8(%rbp), %rsi
movl $0xa, %edx
callq 0x32e0
cmpq %r14, -0xb8(%rbp)
je 0x7381
movslq %eax, %rcx
cmpq %rax, %rcx
jne 0x7375
movl (%rbx), %eax
cmpl $0x22, %eax
je 0x7375
testl %eax, %eax
movq -0x70(%rbp), %r14
jne 0x71a0
movl %r12d, (%rbx)
movq -0x48(%rbp), %rdi
leaq -0x38(%rbp), %rax
cmpq %rax, %rdi
je 0x71b2
callq 0x3200
movq -0x78(%rbp), %r12
movq %r12, %rdi
movq %r14, %rsi
callq 0x5775
leaq -0x48(%rbp), %rbx
movq %rbx, %rdi
movq %r12, %rsi
movq %r14, %rdx
callq 0x40d1
movq %r13, %rdi
movq %rbx, %rsi
callq 0x32b0
movq -0x48(%rbp), %rdi
leaq -0x38(%rbp), %rax
cmpq %rax, %rdi
je 0x71f0
callq 0x3200
movl $0x5, %edx
movq %r15, %rdi
leaq 0x10e63(%rip), %rsi     # 0x18062
callq 0x3280
movl $0xd, %edx
movq %r15, %rdi
leaq 0x10e77(%rip), %rsi     # 0x1808a
callq 0x3280
movl $0x4, %edx
movq %r15, %rdi
leaq 0x10e47(%rip), %rsi     # 0x1806e
callq 0x3280
movq -0x68(%rbp), %rsi
movq -0x60(%rbp), %rdx
movq %r15, %rdi
callq 0x3280
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x3210
jmp 0x7325
movl $0x2a, %edx
movq %r15, %rdi
leaq 0x10fbe(%rip), %rsi     # 0x18225
callq 0x3280
movq (%r15), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x3210
movsbl %al, %esi
movq %r15, %rdi
callq 0x3030
movq %rax, %rdi
callq 0x3180
leaq -0x48(%rbp), %rbx
movq %rbx, %rdi
movq %r12, %rsi
movq %r14, %rdx
callq 0x40d1
movq %r13, %rdi
movq %rbx, %rsi
callq 0x32b0
movq -0x48(%rbp), %rdi
leaq -0x38(%rbp), %rax
cmpq %rax, %rdi
je 0x72c2
callq 0x3200
movl $0x5, %edx
movq %r15, %rdi
leaq 0x10d91(%rip), %rsi     # 0x18062
callq 0x3280
movl $0xd, %edx
movq %r15, %rdi
leaq 0x10da5(%rip), %rsi     # 0x1808a
callq 0x3280
movl $0x4, %edx
movq %r15, %rdi
leaq 0x10d75(%rip), %rsi     # 0x1806e
callq 0x3280
movq -0x68(%rbp), %rsi
movq -0x60(%rbp), %rdx
movq %r15, %rdi
callq 0x3280
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x3210
movsbl %al, %esi
movq %rbx, %rdi
callq 0x3030
movq %rax, %rdi
callq 0x3180
jmp 0x6f55
leaq -0x88(%rbp), %rax
cmpq %rax, %rbx
je 0x7351
movq %rbx, %rdi
callq 0x3200
movq -0x68(%rbp), %rdi
leaq -0x58(%rbp), %rax
cmpq %rax, %rdi
je 0x7363
callq 0x3200
addq $0xd8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x10ff4(%rip), %rdi     # 0x18370
callq 0x3320
leaq 0x10fe8(%rip), %rdi     # 0x18370
callq 0x3150
jmp 0x741d
movq %rax, %r15
movq -0xd8(%rbp), %rdi
cmpq %rbx, %rdi
je 0x73ab
callq 0x3200
jmp 0x73ab
movq %rax, %r15
movq -0x48(%rbp), %rdi
leaq -0x38(%rbp), %rax
cmpq %rax, %rdi
je 0x73c2
callq 0x3200
jmp 0x73c2
movq %rax, %r15
movq -0xb8(%rbp), %rdi
leaq -0xa8(%rbp), %rax
cmpq %rax, %rdi
je 0x73df
callq 0x3200
jmp 0x73df
movq %rax, %r15
movq -0xf8(%rbp), %rdi
leaq -0xe8(%rbp), %rax
jmp 0x742b
movq %rax, %r15
jmp 0x7435
jmp 0x741d
jmp 0x741d
jmp 0x741d
jmp 0x741d
jmp 0x741d
movq %rax, %r15
cmpl $0x0, (%rbx)
jne 0x7409
movl %r12d, (%rbx)
movq -0x48(%rbp), %rdi
leaq -0x38(%rbp), %rax
cmpq %rax, %rdi
je 0x7420
callq 0x3200
jmp 0x7420
movq %rax, %r15
leaq -0x88(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x7435
callq 0x3200
leaq -0x58(%rbp), %rax
movq -0x68(%rbp), %rdi
cmpq %rax, %rdi
je 0x7447
callq 0x3200
movq %r15, %rdi
callq 0x33f0