// File: /workspace/github_c_makefile_star2_O3/WereCatf[P]Gonzales/gonzales.c
// Function: printPair
void printPair(int port, int pin, char *strSystem, int port2, int pin2, char *strSystem2)
{
	char *strPrintout;
	int i=0, spacing=9;
	//Print mux
	if(pin==255) strPrintout="SYSTEM";
	else strPrintout=muxToString(port, pin, readMux(port, pin));
	for(i=0; i<=(spacing-strlen(strPrintout));i++) printf(" ");
	if(pin!=255) switch(readMux(port, pin)){
		case 0:
			printf(COLOUR_GREEN);
			break;
		case 1:
			printf(COLOUR_BLUE);
			break;
		default:
			printf(COLOUR_MAGENTA);
			break;
	}
	printf("%s" COLOUR_CLEAR " │ ", strPrintout);
	//Print pull
	if(pin==255) printf(" N/A │ ");
	else switch(readPull(port, pin)){
		case 0:
			printf(" NO  │ ");
			break;
		case 1:
			printf(COLOUR_GREEN " UP  " COLOUR_CLEAR "│ ");
			break;
		case 2:
			printf(COLOUR_GREEN "DOWN " COLOUR_CLEAR "│ ");
			break;
		default:
			printf("UKWN │ ");
			break;
	}
	if(pin==255){
		for(i=0; i<=(spacing-strlen(strSystem));i++) printf("-");
		printf(" %s │**│ ", strSystem);
	}
	else printf(COLOUR_CYAN "P%c%02d" COLOUR_CLEAR " ------ │**│ ", port+'A', pin);
	//Right side
	if(pin2==255){
		printf("%s ", strSystem2);
		for(i=0; i<=(spacing-strlen(strSystem2));i++) printf("-");
	}
	else printf("------ " COLOUR_CYAN "P%c%02d" COLOUR_CLEAR, port2+'A', pin2);
	if(pin2==255) printf(" | N/A ");
	else switch(readPull(port2, pin2)){
		case 0:
			printf(" │  NO ");
			break;
		case 1:
			printf(" │ " COLOUR_GREEN " UP " COLOUR_CLEAR);
			break;
		case 2:
			printf(" │ " COLOUR_GREEN "DOWN" COLOUR_CLEAR);
			break;
		default:
			printf(" │ UKWN");
			break;
	}
	if(pin2==255) printf(" │ SYSTEM");
	else {
		printf(" │ ");
		switch(readMux(port2, pin2)){
			case 0:
				printf(COLOUR_GREEN);
				break;
			case 1:
				printf(COLOUR_BLUE);
				break;
			default:
				printf(COLOUR_MAGENTA);
				break;
		}
		printf("%s" COLOUR_CLEAR, muxToString(port2, pin2, readMux(port2, pin2)));
	}

	printf("\n");
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %r9, %r15
movq %rcx, 0x10(%rsp)
movq %rdx, %r13
movl %esi, %ebp
movl %edi, %r12d
cmpl $0xff, %esi
movl %r8d, 0xc(%rsp)
jne 0x2200
leaq 0x1efb(%rip), %r14      # 0x40f9
jmp 0x2222
movl %r12d, %edi
movl %ebp, %esi
callq 0x32f8
movl $0xff, %edx
movl %r12d, %edi
andl %edx, %edi
movl %ebp, %esi
andl %edx, %esi
andl %eax, %edx
callq 0x31bc
movq %rax, %r14
movq $-0x1, %rbx
movl $0x20, %edi
callq 0x2030
movq %r14, %rdi
callq 0x2050
movl $0x9, %ecx
subq %rax, %rcx
incq %rbx
cmpq %rbx, %rcx
ja 0x2229
cmpl $0xff, %ebp
jne 0x22b5
leaq 0x1dbc(%rip), %rdi      # 0x4016
movq %r14, %rsi
xorl %eax, %eax
callq 0x2070
leaq 0x1db7(%rip), %rdi      # 0x4022
xorl %eax, %eax
callq 0x2070
movq $-0x1, %rbx
movl $0x2d, %edi
callq 0x2030
movq %r13, %rdi
callq 0x2050
movl $0x9, %ecx
subq %rax, %rcx
incq %rbx
cmpq %rbx, %rcx
ja 0x2279
leaq 0x1dc4(%rip), %rdi      # 0x4066
movq %r13, %rsi
xorl %eax, %eax
callq 0x2070
movl 0xc(%rsp), %ebx
jmp 0x2343
movl %r12d, %edi
movl %ebp, %esi
callq 0x32f8
cmpl $0x1, %eax
leaq 0x1d41(%rip), %rcx      # 0x400a
leaq 0x1d40(%rip), %rdx      # 0x4010
cmoveq %rcx, %rdx
testl %eax, %eax
leaq 0x1d27(%rip), %rdi      # 0x4004
cmovneq %rdx, %rdi
xorl %eax, %eax
callq 0x2070
leaq 0x1d27(%rip), %rdi      # 0x4016
movq %r14, %rsi
xorl %eax, %eax
callq 0x2070
movl %r12d, %edi
movl %ebp, %esi
callq 0x3356
cmpb $0x3, %al
jae 0x231a
movzbl %al, %eax
leaq 0x26ff(%rip), %rcx      # 0x4a10
movslq (%rcx,%rax,4), %rdi
addq %rcx, %rdi
jmp 0x2321
leaq 0x1d3b(%rip), %rdi      # 0x405c
movl 0xc(%rsp), %ebx
xorl %eax, %eax
callq 0x2070
addl $0x41, %r12d
leaq 0x1d3d(%rip), %rdi      # 0x4074
movl %r12d, %esi
movl %ebp, %edx
xorl %eax, %eax
callq 0x2070
cmpl $0xff, %ebx
jne 0x23a6
leaq 0x1d44(%rip), %rdi      # 0x4096
movq %r15, %rsi
xorl %eax, %eax
callq 0x2070
movq $-0x1, %rbx
movl $0x2d, %edi
callq 0x2030
movq %r15, %rdi
callq 0x2050
movl $0x9, %ecx
subq %rax, %rcx
incq %rbx
cmpq %rbx, %rcx
ja 0x2363
leaq 0x1d26(%rip), %rdi      # 0x40b2
xorl %eax, %eax
callq 0x2070
leaq 0x1d5a(%rip), %rdi      # 0x40f4
xorl %eax, %eax
callq 0x2070
jmp 0x2460
movq 0x10(%rsp), %r14
leal 0x41(%r14), %esi
leaq 0x1ce4(%rip), %rdi      # 0x409a
movl %ebx, %edx
xorl %eax, %eax
callq 0x2070
movl %r14d, %edi
movl %ebx, %esi
callq 0x3356
cmpb $0x3, %al
jae 0x23e0
movzbl %al, %eax
leaq 0x2645(%rip), %rcx      # 0x4a1c
movslq (%rcx,%rax,4), %rdi
addq %rcx, %rdi
jmp 0x23e7
leaq 0x1d03(%rip), %rdi      # 0x40ea
xorl %eax, %eax
callq 0x2070
leaq 0x1c3b(%rip), %rdi      # 0x4030
xorl %eax, %eax
callq 0x2070
movl %r14d, %edi
movl %ebx, %esi
callq 0x32f8
cmpl $0x1, %eax
leaq 0x1bfa(%rip), %rcx      # 0x400a
leaq 0x1bf9(%rip), %rdx      # 0x4010
cmoveq %rcx, %rdx
testl %eax, %eax
leaq 0x1be0(%rip), %rdi      # 0x4004
cmovneq %rdx, %rdi
xorl %eax, %eax
callq 0x2070
movl %r14d, %edi
movl %ebx, %esi
callq 0x32f8
movl $0xff, %edx
andl %edx, %r14d
andl %edx, %ebx
andl %eax, %edx
movl %r14d, %edi
movl %ebx, %esi
callq 0x31bc
leaq 0x1caa(%rip), %rdi      # 0x4100
movq %rax, %rsi
xorl %eax, %eax
callq 0x2070
movl $0xa, %edi
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2030