// File: 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
subq $0x280, %rsp            # imm = 0x280
movq %rdi, -0x10(%rbp)
leaq -0x30(%rbp), %rax
movq %rax, -0x218(%rbp)
callq 0x20f0
movq -0x218(%rbp), %rdi
movq %rax, %rsi
leaq 0x3f1d(%rip), %rdx      # 0xa20d
callq 0x7ec0
leaq -0x40(%rbp), %rdi
movq -0x30(%rbp), %rsi
leaq 0x4507(%rip), %rdx      # 0xa80b
callq 0x7ec0
movq -0x40(%rbp), %rdi
leaq 0x4404(%rip), %rsi      # 0xa718
callq 0x22e0
cmpl $0x0, %eax
jne 0x6461
movq -0x28(%rbp), %rax
movq %rax, -0x228(%rbp)
leaq -0xa9(%rbp), %rdi
movq %rdi, -0x220(%rbp)
callq 0x2370
movq -0x228(%rbp), %rsi
movq -0x220(%rbp), %rdx
leaq -0xa8(%rbp), %rdi
callq 0x8350
jmp 0x635c
leaq 0x80cd(%rip), %rsi      # 0xe430
leaq -0xe0(%rbp), %rdi
callq 0x2c30
jmp 0x6371
leaq -0x88(%rbp), %rdi
leaq -0xa8(%rbp), %rsi
leaq -0xe0(%rbp), %rdx
callq 0x2970
jmp 0x638d
leaq 0x809c(%rip), %rdi      # 0xe430
leaq -0x88(%rbp), %rsi
callq 0x2d30
jmp 0x63a2
leaq -0x88(%rbp), %rdi
callq 0x3460
leaq -0xe0(%rbp), %rdi
callq 0x23e8
leaq -0xa8(%rbp), %rdi
callq 0x23e8
leaq -0xa9(%rbp), %rdi
callq 0x2240
movl $0x1, -0x4(%rbp)
jmp 0x67fd
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xb8(%rbp)
movl %eax, -0xbc(%rbp)
jmp 0x6450
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xb8(%rbp)
movl %eax, -0xbc(%rbp)
jmp 0x6444
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xb8(%rbp)
movl %eax, -0xbc(%rbp)
jmp 0x6438
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xb8(%rbp)
movl %eax, -0xbc(%rbp)
leaq -0x88(%rbp), %rdi
callq 0x3460
leaq -0xe0(%rbp), %rdi
callq 0x23e8
leaq -0xa8(%rbp), %rdi
callq 0x23e8
leaq -0xa9(%rbp), %rdi
callq 0x2240
jmp 0x6809
movq -0x40(%rbp), %rdi
leaq 0x42b0(%rip), %rsi      # 0xa71c
callq 0x22e0
cmpl $0x0, %eax
jne 0x6603
movq -0x28(%rbp), %rax
movq %rax, -0x238(%rbp)
leaq -0x149(%rbp), %rdi
movq %rdi, -0x230(%rbp)
callq 0x2370
movq -0x238(%rbp), %rsi
movq -0x230(%rbp), %rdx
leaq -0x148(%rbp), %rdi
callq 0x8350
jmp 0x64b4
movq -0x28(%rbp), %rax
movq %rax, -0x248(%rbp)
leaq -0x171(%rbp), %rdi
movq %rdi, -0x240(%rbp)
callq 0x2370
movq -0x248(%rbp), %rsi
movq -0x240(%rbp), %rdx
leaq -0x170(%rbp), %rdi
callq 0x8350
jmp 0x64ee
leaq -0x170(%rbp), %rdi
movl $0x5f, %esi
callq 0x7f30
movl %eax, -0x24c(%rbp)
jmp 0x6507
movl -0x24c(%rbp), %ecx
leaq -0x128(%rbp), %rdi
leaq -0x148(%rbp), %rsi
movl $0x62, %edx
callq 0x28d0
jmp 0x6527
leaq 0x7eba(%rip), %rdi      # 0xe3e8
leaq -0x128(%rbp), %rsi
callq 0x8440
leaq -0x128(%rbp), %rdi
callq 0x3460
leaq -0x170(%rbp), %rdi
callq 0x23e8
leaq -0x171(%rbp), %rdi
callq 0x2240
leaq -0x148(%rbp), %rdi
callq 0x23e8
leaq -0x149(%rbp), %rdi
callq 0x2240
movq -0x28(%rbp), %rsi
leaq 0x41a0(%rip), %rdi      # 0xa721
movb $0x0, %al
callq 0x2060
movl $0x1, -0x4(%rbp)
jmp 0x67fd
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xb8(%rbp)
movl %eax, -0xbc(%rbp)
jmp 0x65f2
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xb8(%rbp)
movl %eax, -0xbc(%rbp)
jmp 0x65da
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xb8(%rbp)
movl %eax, -0xbc(%rbp)
leaq -0x170(%rbp), %rdi
callq 0x23e8
leaq -0x171(%rbp), %rdi
callq 0x2240
leaq -0x148(%rbp), %rdi
callq 0x23e8
leaq -0x149(%rbp), %rdi
callq 0x2240
jmp 0x6809
movq -0x40(%rbp), %rdi
leaq 0x4134(%rip), %rsi      # 0xa742
callq 0x22e0
cmpl $0x0, %eax
jne 0x67bf
leaq 0x4126(%rip), %rdi      # 0xa749
xorl %eax, %eax
movb %al, -0x261(%rbp)
callq 0x2060
movb -0x261(%rbp), %al
movq -0x28(%rbp), %rsi
leaq 0x3cb1(%rip), %rdi      # 0xa2f2
callq 0x2060
movq -0x28(%rbp), %rax
movq %rax, -0x260(%rbp)
leaq -0x1e1(%rbp), %rdi
movq %rdi, -0x258(%rbp)
callq 0x2370
movq -0x260(%rbp), %rsi
movq -0x258(%rbp), %rdx
leaq -0x1e0(%rbp), %rdi
callq 0x8350
jmp 0x6680
movq -0x38(%rbp), %rax
movq %rax, -0x278(%rbp)
leaq -0x209(%rbp), %rdi
movq %rdi, -0x270(%rbp)
callq 0x2370
movq -0x278(%rbp), %rsi
movq -0x270(%rbp), %rdx
leaq -0x208(%rbp), %rdi
callq 0x8350
jmp 0x66ba
leaq -0x1c0(%rbp), %rdi
leaq -0x1e0(%rbp), %rsi
leaq -0x208(%rbp), %rdx
callq 0x2970
jmp 0x66d6
leaq 0x7e23(%rip), %rdi      # 0xe500
leaq -0x1c0(%rbp), %rsi
callq 0x8490
jmp 0x66eb
leaq -0x1c0(%rbp), %rdi
callq 0x3460
leaq -0x208(%rbp), %rdi
callq 0x23e8
leaq -0x209(%rbp), %rdi
callq 0x2240
leaq -0x1e0(%rbp), %rdi
callq 0x23e8
leaq -0x1e1(%rbp), %rdi
callq 0x2240
movl $0x1, -0x4(%rbp)
jmp 0x67fd
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xb8(%rbp)
movl %eax, -0xbc(%rbp)
jmp 0x67b1
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xb8(%rbp)
movl %eax, -0xbc(%rbp)
jmp 0x6799
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xb8(%rbp)
movl %eax, -0xbc(%rbp)
jmp 0x678d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xb8(%rbp)
movl %eax, -0xbc(%rbp)
leaq -0x1c0(%rbp), %rdi
callq 0x3460
leaq -0x208(%rbp), %rdi
callq 0x23e8
leaq -0x209(%rbp), %rdi
callq 0x2240
leaq -0x1e0(%rbp), %rdi
callq 0x23e8
leaq -0x1e1(%rbp), %rdi
callq 0x2240
jmp 0x6809
movq -0x40(%rbp), %rdi
leaq 0x3f8c(%rip), %rsi      # 0xa756
callq 0x22e0
cmpl $0x0, %eax
jne 0x67f6
leaq -0x20(%rbp), %rdi
movq -0x28(%rbp), %rsi
leaq 0x4028(%rip), %rdx      # 0xa80b
callq 0x7ec0
leaq -0x20(%rbp), %rdi
callq 0x7fd0
movl %eax, -0x4(%rbp)
jmp 0x67fd
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
movl -0x4(%rbp), %eax
addq $0x280, %rsp            # imm = 0x280
popq %rbp
retq
movq -0xb8(%rbp), %rdi
callq 0x2360
nopw %cs:(%rax,%rax)