// File: /workspace/github_cpp_makefile_star2_O2/muzuka[P]Cards-Against-Humanity-Online/Client.cpp
// Function: parseMessage(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
int parseMessage(string message) {
	char* notifyMessage[2]; // [0] has option, [1] has name
	char* messageDiv[2]; // [0] has type and source, [1] has content
	char* getCommand[2]; // [0] has command, [1] has source
	splitString(messageDiv, (char*)message.c_str(), "\n");
	splitString(getCommand, messageDiv[0], " ");
	
	if(strcmp((const char*)getCommand[0], "ADD") == 0) {
		self.addCard(Card(string(messageDiv[1]), self.getName()));
		//printf("Got a new card.\n");
		return 1;
	}
	else if(strcmp((const char*)getCommand[0], "POST") == 0) {
		blackCard = Card(string(messageDiv[1]), 'b', countChars(messageDiv[1], '_'));
		printf("Received a new black card:\n\"%s\"\n", messageDiv[1]);
		return 1;
	}
	else if(strcmp((const char*)getCommand[0], "ANSWER") == 0) {
		printf("New answer:\n");
		printf("%s\n", messageDiv[1]);
		answers.push_back(Card(string(messageDiv[1]), string(getCommand[1])));
		return 1;
	}
	else if(strcmp((const char*)getCommand[0], "NOTIFY") == 0) {
		splitString(notifyMessage, messageDiv[1], " ");
		return parseNotify(notifyMessage);
	}
	else {
		return -1;
	}
	
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x1a0, %rsp            # imm = 0x1A0
movq (%rdi), %rsi
leaq 0x217e(%rip), %rdx      # 0x621e
leaq -0x30(%rbp), %rbx
movq %rbx, %rdi
callq 0x5026
movq (%rbx), %rsi
leaq 0x21d4(%rip), %rdx      # 0x628a
leaq -0x40(%rbp), %rbx
movq %rbx, %rdi
callq 0x5026
movq (%rbx), %rbx
leaq 0x212a(%rip), %rsi      # 0x61f6
movq %rbx, %rdi
callq 0x2200
testl %eax, %eax
je 0x4124
leaq 0x211b(%rip), %rsi      # 0x61fa
movq %rbx, %rdi
callq 0x2200
testl %eax, %eax
je 0x419f
leaq 0x212a(%rip), %rsi      # 0x6220
movq %rbx, %rdi
callq 0x2200
testl %eax, %eax
je 0x4239
leaq 0x211a(%rip), %rsi      # 0x6227
movq %rbx, %rdi
callq 0x2200
testl %eax, %eax
je 0x42c6
pushq $-0x1
jmp 0x42b9
movq -0x28(%rbp), %rsi
leaq -0x100(%rbp), %rdi
leaq -0x148(%rbp), %rdx
callq 0x52fa
leaq 0x526e(%rip), %rsi      # 0x93b0
leaq -0xe0(%rbp), %rdi
callq 0x292e
leaq -0x1a8(%rbp), %rdi
leaq -0x100(%rbp), %rsi
leaq -0xe0(%rbp), %rdx
callq 0x2754
leaq 0x5241(%rip), %rdi      # 0x93b0
leaq -0x1a8(%rbp), %rsi
callq 0x2986
leaq -0x1a8(%rbp), %rdi
callq 0x2d46
leaq -0xe0(%rbp), %rdi
callq 0x22e8
leaq -0x100(%rbp), %rdi
jmp 0x42b2
movq -0x28(%rbp), %rbx
leaq -0xc0(%rbp), %rdi
leaq -0x12(%rbp), %rdx
movq %rbx, %rsi
callq 0x52fa
leaq -0xa0(%rbp), %rdi
leaq -0x11(%rbp), %rdx
movq %rbx, %rsi
callq 0x52fa
leaq -0xa0(%rbp), %rdi
pushq $0x5f
popq %rsi
callq 0x505b
leaq -0x148(%rbp), %rdi
leaq -0xc0(%rbp), %rsi
pushq $0x62
popq %rdx
movl %eax, %ecx
callq 0x26da
leaq 0x5171(%rip), %rdi      # 0x9368
leaq -0x148(%rbp), %r14
movq %r14, %rsi
callq 0x5336
movq %r14, %rdi
callq 0x2d46
leaq -0xa0(%rbp), %rdi
callq 0x22e8
leaq -0xc0(%rbp), %rdi
callq 0x22e8
leaq 0x1fd2(%rip), %rdi      # 0x61ff
movq %rbx, %rsi
xorl %eax, %eax
callq 0x2040
jmp 0x42b7
leaq 0x244e(%rip), %rdi      # 0x668e
callq 0x2230
movq -0x28(%rbp), %rbx
movq %rbx, %rdi
callq 0x2230
leaq -0x80(%rbp), %rdi
leaq -0x12(%rbp), %rdx
movq %rbx, %rsi
callq 0x52fa
movq -0x38(%rbp), %rsi
leaq -0x60(%rbp), %rdi
leaq -0x11(%rbp), %rdx
callq 0x52fa
leaq -0x148(%rbp), %rdi
leaq -0x80(%rbp), %rsi
leaq -0x60(%rbp), %rdx
callq 0x2754
leaq 0x51f3(%rip), %rdi      # 0x9480
leaq -0x148(%rbp), %rsi
callq 0x5800
leaq -0x148(%rbp), %rdi
callq 0x2d46
leaq -0x60(%rbp), %rdi
callq 0x22e8
leaq -0x80(%rbp), %rdi
callq 0x22e8
pushq $0x1
popq %rax
addq $0x1a0, %rsp            # imm = 0x1A0
popq %rbx
popq %r14
popq %rbp
retq
movq -0x28(%rbp), %rsi
leaq 0x1fb9(%rip), %rdx      # 0x628a
leaq -0x160(%rbp), %rbx
movq %rbx, %rdi
callq 0x5026
movq %rbx, %rdi
callq 0x5095
jmp 0x42ba
movq %rax, %rbx
leaq -0x148(%rbp), %rdi
callq 0x2d46
jmp 0x42fe
movq %rax, %rbx
leaq -0x60(%rbp), %rdi
callq 0x22e8
jmp 0x430c
movq %rax, %rbx
leaq -0x80(%rbp), %rdi
jmp 0x435f
jmp 0x4366
movq %rax, %rbx
leaq -0xa0(%rbp), %rdi
callq 0x22e8
jmp 0x4328
movq %rax, %rbx
leaq -0xc0(%rbp), %rdi
jmp 0x435f
jmp 0x4366
movq %rax, %rbx
leaq -0x1a8(%rbp), %rdi
callq 0x2d46
jmp 0x4347
movq %rax, %rbx
leaq -0xe0(%rbp), %rdi
callq 0x22e8
jmp 0x4358
movq %rax, %rbx
leaq -0x100(%rbp), %rdi
callq 0x22e8
jmp 0x4369
movq %rax, %rbx
movq %rbx, %rdi
callq 0x2280