// File: /workspace/github_cpp_makefile_star2_O1/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 0x6d44
movl $0x4, %r13d
movl $0xd1b71759, %eax       # imm = 0xD1B71759
movl %r15d, %ecx
cmpl $0x63, %ecx
jbe 0x6d3b
cmpl $0x3e7, %ecx            # imm = 0x3E7
jbe 0x6d41
cmpl $0x2710, %ecx           # imm = 0x2710
jb 0x6d44
movl %ecx, %edx
imulq %rax, %rdx
shrq $0x2d, %rdx
addl $0x4, %r13d
cmpl $0x1869f, %ecx          # imm = 0x1869F
movl %edx, %ecx
ja 0x6d08
addl $-0x3, %r13d
jmp 0x6d44
addl $-0x2, %r13d
jmp 0x6d44
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 0x9d36
leaq 0x1146d(%rip), %rcx     # 0x181fa
movl $0xd, %r8d
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x3260
leaq -0xc8(%rbp), %rsi
movq %rsi, -0x10(%rsi)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x6dcc
movq %rdx, -0xd8(%rbp)
movq (%rcx), %rdx
movq %rdx, -0xc8(%rbp)
jmp 0x6dd2
movups (%rcx), %xmm0
movups %xmm0, (%rsi)
movq 0x8(%rax), %rdx
leaq -0xd8(%rbp), %rdi
movq %rdx, 0x8(%rdi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x11411(%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 0x6e20
movq %rdx, -0x48(%rbp)
movq (%rcx), %rdx
movq %rdx, -0x38(%rbp)
jmp 0x6e26
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 0x6e93
movl $0x4, %r13d
movl $0xd1b71759, %eax       # imm = 0xD1B71759
movl %r15d, %ecx
cmpl $0x63, %ecx
jbe 0x6e8a
cmpl $0x3e7, %ecx            # imm = 0x3E7
jbe 0x6e90
cmpl $0x2710, %ecx           # imm = 0x2710
jb 0x6e93
movl %ecx, %edx
imulq %rax, %rdx
shrq $0x2d, %rdx
addl $0x4, %r13d
cmpl $0x1869f, %ecx          # imm = 0x1869F
movl %edx, %ecx
ja 0x6e57
addl $-0x3, %r13d
jmp 0x6e93
addl $-0x2, %r13d
jmp 0x6e93
decl %r13d
addl %r13d, %r12d
leaq -0xa8(%rbp), %rbx
movq %rbx, -0x10(%rbx)
leaq -0xb8(%rbp), %rdi
movq %r12, %rsi
movl $0x2d, %edx
callq 0x3290
addq -0xb8(%rbp), %r14
movq %r14, %rdi
movl %r13d, %esi
movl %r15d, %edx
callq 0x9d36
movq -0x48(%rbp), %rcx
movq -0x40(%rbp), %r8
movq -0xb0(%rbp), %rdx
leaq (%rdx,%r8), %rax
movl $0xf, %esi
leaq -0x38(%rbp), %r15
cmpq %r15, %rcx
movq -0x78(%rbp), %r12
je 0x6ef3
movq -0x38(%rbp), %rsi
cmpq %rsi, %rax
jbe 0x6f12
movl $0xf, %esi
cmpq %rbx, -0xb8(%rbp)
je 0x6f0d
movq -0xa8(%rbp), %rsi
cmpq %rsi, %rax
jbe 0x6f24
movq -0xb8(%rbp), %rsi
leaq -0x48(%rbp), %rdi
callq 0x30c0
jmp 0x6f34
leaq -0xb8(%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 0x6f5e
movq %rsi, -0x98(%rbp)
movq (%rcx), %rdx
movq %rdx, -0x88(%rbp)
jmp 0x6f64
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 -0xb8(%rbp), %rdi
cmpq %rbx, %rdi
je 0x6f94
callq 0x3200
movq -0x48(%rbp), %rdi
cmpq %r15, %rdi
movq -0x70(%rbp), %r14
je 0x6fa6
callq 0x3200
movq -0xd8(%rbp), %rdi
leaq -0xc8(%rbp), %rax
cmpq %rax, %rdi
je 0x6fbe
callq 0x3200
movq -0xf8(%rbp), %rdi
leaq -0xe8(%rbp), %rax
cmpq %rax, %rdi
je 0x6fd6
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 0x7002
callq 0x3200
movq 0x17fbf(%rip), %rdi     # 0x1efc8
leaq 0x11052(%rip), %rsi     # 0x18062
movl $0x5, %edx
callq 0x3280
movq 0x17fa7(%rip), %rdi     # 0x1efc8
leaq 0x11062(%rip), %rsi     # 0x1808a
movl $0xd, %edx
callq 0x3280
movq 0x17f8f(%rip), %rdi     # 0x1efc8
leaq 0x1102e(%rip), %rsi     # 0x1806e
movl $0x4, %edx
callq 0x3280
movq -0x68(%rbp), %rsi
movq -0x60(%rbp), %rdx
movq 0x17f6f(%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 0x70bd
testq %rdx, %rdx
je 0x7474
movq -0x98(%rbp), %rsi
movq -0x68(%rbp), %rdi
callq 0x3230
testl %eax, %eax
je 0x7474
movl $0x1, %edx
movq %r13, %rdi
xorl %esi, %esi
leaq 0x1146f(%rip), %rcx     # 0x1853d
callq 0x32d0
testl %eax, %eax
je 0x7219
movl $0x1, %edx
movq %r13, %rdi
xorl %esi, %esi
leaq 0x114a2(%rip), %rcx     # 0x1858e
callq 0x32d0
testl %eax, %eax
je 0x738f
movl $0x4b, %edx
movq %r15, %rdi
leaq 0x11094(%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 0x110a5(%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 0x71b1
callq 0x3200
movl $0x5, %edx
movq %r15, %rdi
leaq 0x10ea2(%rip), %rsi     # 0x18062
callq 0x3280
movl $0xd, %edx
movq %r15, %rdi
leaq 0x10eb6(%rip), %rsi     # 0x1808a
callq 0x3280
movl $0x4, %edx
movq %r15, %rdi
leaq 0x10e86(%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 0x745c
movl $0x13, %edx
movq %r15, %rdi
leaq 0x10fe5(%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 0x10fbe(%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 -0xd8(%rbp), %rsi
movl $0xa, %edx
callq 0x32e0
cmpq %r14, -0xd8(%rbp)
je 0x74b9
movslq %eax, %rcx
cmpq %rax, %rcx
jne 0x74ad
movl (%rbx), %eax
cmpl $0x22, %eax
je 0x74ad
testl %eax, %eax
movq -0x70(%rbp), %r14
jne 0x72d7
movl %r12d, (%rbx)
movq -0x48(%rbp), %rdi
leaq -0x38(%rbp), %rax
cmpq %rax, %rdi
je 0x72e9
callq 0x3200
movq -0x78(%rbp), %r12
movq %r12, %rdi
movq %r14, %rsi
callq 0x573e
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 0x7327
callq 0x3200
movl $0x5, %edx
movq %r15, %rdi
leaq 0x10d2c(%rip), %rsi     # 0x18062
callq 0x3280
movl $0xd, %edx
movq %r15, %rdi
leaq 0x10d40(%rip), %rsi     # 0x1808a
callq 0x3280
movl $0x4, %edx
movq %r15, %rdi
leaq 0x10d10(%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 0x745c
movl $0x2a, %edx
movq %r15, %rdi
leaq 0x10e87(%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 0x73f9
callq 0x3200
movl $0x5, %edx
movq %r15, %rdi
leaq 0x10c5a(%rip), %rsi     # 0x18062
callq 0x3280
movl $0xd, %edx
movq %r15, %rdi
leaq 0x10c6e(%rip), %rsi     # 0x1808a
callq 0x3280
movl $0x4, %edx
movq %r15, %rdi
leaq 0x10c3e(%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 0x708f
leaq -0x88(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x7489
callq 0x3200
movq -0x68(%rbp), %rdi
leaq -0x58(%rbp), %rax
cmpq %rax, %rdi
je 0x749b
callq 0x3200
addq $0xd8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x10ebc(%rip), %rdi     # 0x18370
callq 0x3320
leaq 0x10eb0(%rip), %rdi     # 0x18370
callq 0x3150
jmp 0x7555
movq %rax, %r15
movq -0xb8(%rbp), %rdi
cmpq %rbx, %rdi
je 0x74e3
callq 0x3200
jmp 0x74e3
movq %rax, %r15
movq -0x48(%rbp), %rdi
leaq -0x38(%rbp), %rax
cmpq %rax, %rdi
je 0x74fa
callq 0x3200
jmp 0x74fa
movq %rax, %r15
movq -0xd8(%rbp), %rdi
leaq -0xc8(%rbp), %rax
cmpq %rax, %rdi
je 0x7517
callq 0x3200
jmp 0x7517
movq %rax, %r15
movq -0xf8(%rbp), %rdi
leaq -0xe8(%rbp), %rax
jmp 0x7563
movq %rax, %r15
jmp 0x756d
jmp 0x7555
jmp 0x7555
jmp 0x7555
jmp 0x7555
jmp 0x7555
movq %rax, %r15
cmpl $0x0, (%rbx)
jne 0x7541
movl %r12d, (%rbx)
movq -0x48(%rbp), %rdi
leaq -0x38(%rbp), %rax
cmpq %rax, %rdi
je 0x7558
callq 0x3200
jmp 0x7558
movq %rax, %r15
leaq -0x88(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x756d
callq 0x3200
leaq -0x58(%rbp), %rax
movq -0x68(%rbp), %rdi
cmpq %rax, %rdi
je 0x757f
callq 0x3200
movq %r15, %rdi
callq 0x33f0