// File: /workspace/github_cpp_makefile_star2_O3/Doug0855[P]TigerZone/main.cpp
// Function: main
int main(int argc, char *argv[]) {
	std::string SERVER_IP, PORT, TOURNAMENT_PASS, TEAM_ID, TEAM_PASSWORD;
	if( argc == 6 ) { //getting command line args
		SERVER_IP = argv[1];
		PORT = argv[2];
		TOURNAMENT_PASS = argv[3];
		TEAM_ID = argv[4];
		TEAM_PASSWORD = argv[5];
	}
	else if( argc > 6 ) {
		printf("Too many arguments supplied.\n");
		exit (EXIT_FAILURE);
	}
	else {
		printf("Five arguments expected.\n");
		exit (EXIT_FAILURE);
	}
	Client serverConnection(SERVER_IP, PORT);
	serverConnection.connectToServer();


	std::string message_list = "";

	//starting auth protocol...

	std::string PLAYER_ID = authenticationProtocol(serverConnection, TOURNAMENT_PASS, TEAM_ID, TEAM_PASSWORD);
	challengeProtocol(serverConnection);

	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x598, %rsp            # imm = 0x598
leaq -0xa0(%rbp), %rcx
movq %rcx, -0x10(%rcx)
xorl %eax, %eax
movq %rax, -0x8(%rcx)
movb %al, (%rcx)
leaq -0x80(%rbp), %rcx
movq %rcx, -0x10(%rcx)
movq %rax, -0x8(%rcx)
movb %al, (%rcx)
leaq -0x60(%rbp), %rcx
movq %rcx, -0x10(%rcx)
movq %rax, -0x8(%rcx)
movb %al, (%rcx)
leaq -0x40(%rbp), %rcx
movq %rcx, -0x10(%rcx)
movq %rax, -0x8(%rcx)
movb %al, (%rcx)
leaq -0xc0(%rbp), %r13
movq %r13, -0x10(%r13)
movq %rax, -0x8(%r13)
movb %al, (%r13)
cmpl $0x6, %edi
jne 0x88b6
movq %rsi, %rbx
movq 0x8(%rsi), %r14
movq %r14, %rdi
callq 0x3110
leaq -0xb0(%rbp), %rdi
xorl %esi, %esi
xorl %edx, %edx
movq %r14, %rcx
movq %rax, %r8
callq 0x3370
movq 0x10(%rbx), %r14
leaq -0x90(%rbp), %r15
movq 0x8(%r15), %r12
movq %r14, %rdi
callq 0x3110
movq %r15, %rdi
xorl %esi, %esi
movq %r12, %rdx
movq %r14, %rcx
movq %rax, %r8
callq 0x3370
movq 0x18(%rbx), %r14
leaq -0x70(%rbp), %r15
movq 0x8(%r15), %r12
movq %r14, %rdi
callq 0x3110
movq %r15, %rdi
xorl %esi, %esi
movq %r12, %rdx
movq %r14, %rcx
movq %rax, %r8
callq 0x3370
movq 0x20(%rbx), %r14
leaq -0x50(%rbp), %r15
movq 0x8(%r15), %r12
movq %r14, %rdi
callq 0x3110
movq %r15, %rdi
xorl %esi, %esi
movq %r12, %rdx
movq %r14, %rcx
movq %rax, %r8
callq 0x3370
movq 0x28(%rbx), %rbx
leaq -0xd0(%rbp), %r14
movq 0x8(%r14), %r15
movq %rbx, %rdi
callq 0x3110
movq %r14, %rdi
xorl %esi, %esi
movq %r15, %rdx
movq %rbx, %rcx
movq %rax, %r8
callq 0x3370
leaq -0x160(%rbp), %r14
movq %r14, -0x10(%r14)
movq -0xb0(%rbp), %rsi
movq -0xa8(%rbp), %rdx
addq %rsi, %rdx
leaq -0x170(%rbp), %rdi
callq 0x9cc4
leaq -0x140(%rbp), %rbx
movq %rbx, -0x10(%rbx)
movq -0x90(%rbp), %rsi
movq -0x88(%rbp), %rdx
addq %rsi, %rdx
leaq -0x150(%rbp), %rdi
callq 0x9cc4
leaq -0x5c0(%rbp), %rdi
leaq -0x170(%rbp), %rsi
leaq -0x150(%rbp), %rdx
callq 0xf190
movq -0x150(%rbp), %rdi
cmpq %rbx, %rdi
je 0x86fc
callq 0x3200
movq -0x170(%rbp), %rdi
cmpq %r14, %rdi
je 0x870d
callq 0x3200
leaq -0x5c0(%rbp), %rdi
callq 0xf2c0
leaq -0x180(%rbp), %r14
movq %r14, -0x10(%r14)
leaq 0x1006a(%rip), %rdx     # 0x18795
leaq -0x190(%rbp), %rdi
movq %rdx, %rsi
callq 0x9d62
leaq -0x120(%rbp), %r15
movq %r15, -0x10(%r15)
movq -0x70(%rbp), %rsi
movq -0x68(%rbp), %rdx
addq %rsi, %rdx
leaq -0x130(%rbp), %rdi
callq 0x9cc4
leaq -0x100(%rbp), %r12
movq %r12, -0x10(%r12)
movq -0x50(%rbp), %rsi
movq -0x48(%rbp), %rdx
addq %rsi, %rdx
leaq -0x110(%rbp), %rdi
callq 0x9cc4
leaq -0xe0(%rbp), %rbx
movq %rbx, -0x10(%rbx)
movq -0xd0(%rbp), %rsi
movq -0xc8(%rbp), %rdx
addq %rsi, %rdx
leaq -0xf0(%rbp), %rdi
callq 0x9cc4
leaq -0x1b0(%rbp), %rdi
leaq -0x5c0(%rbp), %rsi
leaq -0x130(%rbp), %rdx
leaq -0x110(%rbp), %rcx
leaq -0xf0(%rbp), %r8
callq 0x7bb6
movq -0xf0(%rbp), %rdi
cmpq %rbx, %rdi
je 0x87e0
callq 0x3200
movq -0x110(%rbp), %rdi
cmpq %r12, %rdi
je 0x87f1
callq 0x3200
movq -0x130(%rbp), %rdi
cmpq %r15, %rdi
je 0x8802
callq 0x3200
leaq -0x5c0(%rbp), %rdi
callq 0x744f
leaq -0x1a0(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x8823
callq 0x3200
movq -0x190(%rbp), %rdi
cmpq %r14, %rdi
je 0x8834
callq 0x3200
leaq -0x5c0(%rbp), %rdi
callq 0xf2ba
movq -0xd0(%rbp), %rdi
cmpq %r13, %rdi
je 0x8851
callq 0x3200
movq -0x50(%rbp), %rdi
leaq -0x40(%rbp), %rax
cmpq %rax, %rdi
je 0x8863
callq 0x3200
movq -0x70(%rbp), %rdi
leaq -0x60(%rbp), %rax
cmpq %rax, %rdi
je 0x8875
callq 0x3200
movq -0x90(%rbp), %rdi
leaq -0x80(%rbp), %rax
cmpq %rax, %rdi
je 0x888a
callq 0x3200
movq -0xb0(%rbp), %rdi
leaq -0xa0(%rbp), %rax
cmpq %rax, %rdi
je 0x88a2
callq 0x3200
xorl %eax, %eax
addq $0x598, %rsp            # imm = 0x598
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jle 0x88c1
leaq 0xfaf9(%rip), %rdi      # 0x183b8
jmp 0x88c8
leaq 0xfad7(%rip), %rdi      # 0x1839f
callq 0x3360
movl $0x1, %edi
callq 0x32a0
movq %rax, -0x30(%rbp)
leaq -0x1a0(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
jne 0x892b
jmp 0x8936
movq %rax, -0x30(%rbp)
movq -0xf0(%rbp), %rdi
cmpq %rbx, %rdi
je 0x8908
callq 0x3200
jmp 0x8908
movq %rax, -0x30(%rbp)
movq -0x110(%rbp), %rdi
cmpq %r12, %rdi
je 0x891f
callq 0x3200
jmp 0x891f
movq %rax, -0x30(%rbp)
movq -0x130(%rbp), %rdi
cmpq %r15, %rdi
je 0x8936
callq 0x3200
jmp 0x8936
movq %rax, -0x30(%rbp)
movq -0x190(%rbp), %rdi
cmpq %r14, %rdi
je 0x894f
callq 0x3200
jmp 0x894f
jmp 0x894b
movq %rax, -0x30(%rbp)
leaq -0x5c0(%rbp), %rdi
callq 0xf2ba
jmp 0x8991
movq %rax, -0x30(%rbp)
movq -0x150(%rbp), %rdi
cmpq %rbx, %rdi
je 0x8978
callq 0x3200
jmp 0x8978
movq %rax, -0x30(%rbp)
movq -0x170(%rbp), %rdi
cmpq %r14, %rdi
je 0x8991
callq 0x3200
jmp 0x8991
jmp 0x898d
movq %rax, -0x30(%rbp)
movq -0xd0(%rbp), %rdi
cmpq %r13, %rdi
je 0x89a2
callq 0x3200
movq -0x50(%rbp), %rdi
leaq -0x40(%rbp), %rax
cmpq %rax, %rdi
je 0x89b4
callq 0x3200
movq -0x70(%rbp), %rdi
leaq -0x60(%rbp), %rax
cmpq %rax, %rdi
je 0x89c6
callq 0x3200
movq -0x90(%rbp), %rdi
leaq -0x80(%rbp), %rax
cmpq %rax, %rdi
je 0x89db
callq 0x3200
movq -0xb0(%rbp), %rdi
leaq -0xa0(%rbp), %rax
cmpq %rax, %rdi
je 0x89f3
callq 0x3200
movq -0x30(%rbp), %rdi
callq 0x33f0