// File: /workspace/github_cpp_makefile_star2_O1/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 0x89ee
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 0x9da8
leaq -0x140(%rbp), %rbx
movq %rbx, -0x10(%rbx)
movq -0x90(%rbp), %rsi
movq -0x88(%rbp), %rdx
addq %rsi, %rdx
leaq -0x150(%rbp), %rdi
callq 0x9da8
leaq -0x5c0(%rbp), %rdi
leaq -0x170(%rbp), %rsi
leaq -0x150(%rbp), %rdx
callq 0xf294
movq -0x150(%rbp), %rdi
cmpq %rbx, %rdi
je 0x8834
callq 0x3200
movq -0x170(%rbp), %rdi
cmpq %r14, %rdi
je 0x8845
callq 0x3200
leaq -0x5c0(%rbp), %rdi
callq 0xf3c4
leaq -0x180(%rbp), %r14
movq %r14, -0x10(%r14)
leaq 0xff32(%rip), %rdx      # 0x18795
leaq -0x190(%rbp), %rdi
movq %rdx, %rsi
callq 0x9e42
leaq -0x120(%rbp), %r15
movq %r15, -0x10(%r15)
movq -0x70(%rbp), %rsi
movq -0x68(%rbp), %rdx
addq %rsi, %rdx
leaq -0x130(%rbp), %rdi
callq 0x9da8
leaq -0x100(%rbp), %r12
movq %r12, -0x10(%r12)
movq -0x50(%rbp), %rsi
movq -0x48(%rbp), %rdx
addq %rsi, %rdx
leaq -0x110(%rbp), %rdi
callq 0x9da8
leaq -0xe0(%rbp), %rbx
movq %rbx, -0x10(%rbx)
movq -0xd0(%rbp), %rsi
movq -0xc8(%rbp), %rdx
addq %rsi, %rdx
leaq -0xf0(%rbp), %rdi
callq 0x9da8
leaq -0x1b0(%rbp), %rdi
leaq -0x5c0(%rbp), %rsi
leaq -0x130(%rbp), %rdx
leaq -0x110(%rbp), %rcx
leaq -0xf0(%rbp), %r8
callq 0x7cee
movq -0xf0(%rbp), %rdi
cmpq %rbx, %rdi
je 0x8918
callq 0x3200
movq -0x110(%rbp), %rdi
cmpq %r12, %rdi
je 0x8929
callq 0x3200
movq -0x130(%rbp), %rdi
cmpq %r15, %rdi
je 0x893a
callq 0x3200
leaq -0x5c0(%rbp), %rdi
callq 0x7587
leaq -0x1a0(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x895b
callq 0x3200
movq -0x190(%rbp), %rdi
cmpq %r14, %rdi
je 0x896c
callq 0x3200
leaq -0x5c0(%rbp), %rdi
callq 0xf3be
movq -0xd0(%rbp), %rdi
cmpq %r13, %rdi
je 0x8989
callq 0x3200
movq -0x50(%rbp), %rdi
leaq -0x40(%rbp), %rax
cmpq %rax, %rdi
je 0x899b
callq 0x3200
movq -0x70(%rbp), %rdi
leaq -0x60(%rbp), %rax
cmpq %rax, %rdi
je 0x89ad
callq 0x3200
movq -0x90(%rbp), %rdi
leaq -0x80(%rbp), %rax
cmpq %rax, %rdi
je 0x89c2
callq 0x3200
movq -0xb0(%rbp), %rdi
leaq -0xa0(%rbp), %rax
cmpq %rax, %rdi
je 0x89da
callq 0x3200
xorl %eax, %eax
addq $0x598, %rsp            # imm = 0x598
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jle 0x89f9
leaq 0xf9c1(%rip), %rdi      # 0x183b8
jmp 0x8a00
leaq 0xf99f(%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 0x8a63
jmp 0x8a6e
movq %rax, -0x30(%rbp)
movq -0xf0(%rbp), %rdi
cmpq %rbx, %rdi
je 0x8a40
callq 0x3200
jmp 0x8a40
movq %rax, -0x30(%rbp)
movq -0x110(%rbp), %rdi
cmpq %r12, %rdi
je 0x8a57
callq 0x3200
jmp 0x8a57
movq %rax, -0x30(%rbp)
movq -0x130(%rbp), %rdi
cmpq %r15, %rdi
je 0x8a6e
callq 0x3200
jmp 0x8a6e
movq %rax, -0x30(%rbp)
movq -0x190(%rbp), %rdi
cmpq %r14, %rdi
je 0x8a87
callq 0x3200
jmp 0x8a87
jmp 0x8a83
movq %rax, -0x30(%rbp)
leaq -0x5c0(%rbp), %rdi
callq 0xf3be
jmp 0x8ac9
movq %rax, -0x30(%rbp)
movq -0x150(%rbp), %rdi
cmpq %rbx, %rdi
je 0x8ab0
callq 0x3200
jmp 0x8ab0
movq %rax, -0x30(%rbp)
movq -0x170(%rbp), %rdi
cmpq %r14, %rdi
je 0x8ac9
callq 0x3200
jmp 0x8ac9
jmp 0x8ac5
movq %rax, -0x30(%rbp)
movq -0xd0(%rbp), %rdi
cmpq %r13, %rdi
je 0x8ada
callq 0x3200
movq -0x50(%rbp), %rdi
leaq -0x40(%rbp), %rax
cmpq %rax, %rdi
je 0x8aec
callq 0x3200
movq -0x70(%rbp), %rdi
leaq -0x60(%rbp), %rax
cmpq %rax, %rdi
je 0x8afe
callq 0x3200
movq -0x90(%rbp), %rdi
leaq -0x80(%rbp), %rax
cmpq %rax, %rdi
je 0x8b13
callq 0x3200
movq -0xb0(%rbp), %rdi
leaq -0xa0(%rbp), %rax
cmpq %rax, %rdi
je 0x8b2b
callq 0x3200
movq -0x30(%rbp), %rdi
callq 0x33f0