// File: muzuka[P]Cards-Against-Humanity-Online/Client.cpp
// Function: parseNotify(char**)
int parseNotify(char* notifyMessage[]) {
	if(strcmp((const char*)notifyMessage[0], "CP:") == 0) {
		setJudge(strcmp(self.getName().c_str(), (const char*)notifyMessage[1]) == 0, string(notifyMessage[1]));
	}
	else if(strcmp((const char*)notifyMessage[0], "winner:") == 0) {
		if(strcmp(self.getName().c_str(), (const char*)notifyMessage[1]) == 0) {
			printf("You have won this round!\n");
			self.addPoint();
		}
	}
	else if(strcmp((const char*)notifyMessage[0], "players:") == 0) {
		printf("Receiving %d answers from %s.\n", atoi(notifyMessage[1]), notifyMessage[1]);
		if (atoi(notifyMessage[1]) == 0) {
			printf("No more players.\nQuitting now.\n");
			exit(EXIT_FAILURE);
		}
		return atoi(notifyMessage[1]);
	}
	else if(strcmp((const char*)notifyMessage[0], "quit:") == 0) {
		exit(EXIT_FAILURE);
	}
	else {
		return -1;
	}
	return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xb0, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rdi
leaq 0x2770(%rip), %rsi      # 0xa75d
callq 0x22e0
cmpl $0x0, %eax
jne 0x80e2
leaq 0x642e(%rip), %rsi      # 0xe430
leaq -0x30(%rbp), %rdi
movq %rdi, -0xa8(%rbp)
callq 0x2c30
movq -0xa8(%rbp), %rdi
callq 0x20f0
movq %rax, %rdi
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rsi
callq 0x22e0
testl %eax, %eax
sete %al
movb %al, -0x99(%rbp)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x98(%rbp)
leaq -0x51(%rbp), %rdi
movq %rdi, -0x90(%rbp)
callq 0x2370
movq -0x98(%rbp), %rsi
movq -0x90(%rbp), %rdx
leaq -0x50(%rbp), %rdi
callq 0x8350
jmp 0x8071
movb -0x99(%rbp), %al
movzbl %al, %edi
andl $0x1, %edi
leaq -0x50(%rbp), %rsi
callq 0x8230
jmp 0x8088
leaq -0x50(%rbp), %rdi
callq 0x23e8
leaq -0x51(%rbp), %rdi
callq 0x2240
leaq -0x30(%rbp), %rdi
callq 0x23e8
jmp 0x820b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
jmp 0x80cb
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
leaq -0x50(%rbp), %rdi
callq 0x23e8
leaq -0x51(%rbp), %rdi
callq 0x2240
leaq -0x30(%rbp), %rdi
callq 0x23e8
jmp 0x821e
movq -0x10(%rbp), %rax
movq (%rax), %rdi
leaq 0x2671(%rip), %rsi      # 0xa761
callq 0x22e0
cmpl $0x0, %eax
jne 0x8165
leaq -0x88(%rbp), %rdi
leaq 0x6328(%rip), %rsi      # 0xe430
callq 0x2c30
leaq -0x88(%rbp), %rdi
callq 0x20f0
movq %rax, %rdi
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rsi
callq 0x22e0
movl %eax, -0xac(%rbp)
leaq -0x88(%rbp), %rdi
callq 0x23e8
movl -0xac(%rbp), %eax
cmpl $0x0, %eax
jne 0x8160
leaq 0x261c(%rip), %rdi      # 0xa769
movb $0x0, %al
callq 0x2060
leaq 0x62d5(%rip), %rdi      # 0xe430
callq 0x2ce0
jmp 0x8209
movq -0x10(%rbp), %rax
movq (%rax), %rdi
leaq 0x2610(%rip), %rsi      # 0xa783
callq 0x22e0
cmpl $0x0, %eax
jne 0x81de
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0x2320
movl %eax, %esi
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdx
leaq 0x25f1(%rip), %rdi      # 0xa78c
movb $0x0, %al
callq 0x2060
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0x2320
cmpl $0x0, %eax
jne 0x81cc
leaq 0x25f0(%rip), %rdi      # 0xa7ab
movb $0x0, %al
callq 0x2060
movl $0x1, %edi
callq 0x2270
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0x2320
movl %eax, -0x4(%rbp)
jmp 0x8212
movq -0x10(%rbp), %rax
movq (%rax), %rdi
leaq 0x25df(%rip), %rsi      # 0xa7cb
callq 0x22e0
cmpl $0x0, %eax
jne 0x8200
movl $0x1, %edi
callq 0x2270
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x8212
jmp 0x820b
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0xb0, %rsp
popq %rbp
retq
movq -0x60(%rbp), %rdi
callq 0x2360
nopw (%rax,%rax)