// File: /workspace/github_c_makefile_star2_O2/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
cmpl $0xff, %esi
movl %r8d, 0x4(%rsp)
movl %esi, 0xc(%rsp)
movl %edi, 0x8(%rsp)
jne 0x2203
leaq 0x1ef8(%rip), %r14      # 0x40f9
jmp 0x2223
movl %esi, %ebx
movl %edi, %ebp
callq 0x3200
movl $0xff, %edx
andl %edx, %ebp
andl %edx, %ebx
andl %eax, %edx
movl %ebp, %edi
movl %ebx, %esi
callq 0x30e0
movq %rax, %r14
xorl %ebp, %ebp
pushq $0x9
popq %r12
pushq $0x20
popq %rbx
movq %r14, %rdi
callq 0x2050
movq %r12, %rcx
subq %rax, %rcx
cmpq %rbp, %rcx
jb 0x224b
movl %ebx, %edi
callq 0x2030
incq %rbp
jmp 0x222c
movl 0xc(%rsp), %ebp
cmpl $0xff, %ebp
jne 0x229a
leaq 0x1db8(%rip), %rdi      # 0x4016
xorl %ebp, %ebp
movq %r14, %rsi
xorl %eax, %eax
callq 0x2070
leaq 0x1db1(%rip), %rdi      # 0x4022
xorl %eax, %eax
callq 0x2070
pushq $0x2d
popq %rbx
movq %r13, %rdi
callq 0x2050
movq %r12, %rcx
subq %rax, %rcx
cmpq %rbp, %rcx
jb 0x2304
movl %ebx, %edi
callq 0x2030
incq %rbp
jmp 0x227b
movl 0x8(%rsp), %ebx
movl %ebx, %edi
movl %ebp, %esi
callq 0x3200
cmpl $0x1, %eax
leaq 0x1d59(%rip), %rcx      # 0x400a
leaq 0x1d58(%rip), %rdx      # 0x4010
cmoveq %rcx, %rdx
testl %eax, %eax
leaq 0x1d3f(%rip), %rdi      # 0x4004
cmovneq %rdx, %rdi
xorl %eax, %eax
callq 0x2070
leaq 0x1d3f(%rip), %rdi      # 0x4016
movq %r14, %rsi
movl %ebx, %r14d
xorl %eax, %eax
callq 0x2070
movl %ebx, %edi
movl %ebp, %esi
callq 0x3254
cmpb $0x3, %al
jae 0x231b
movzbl %al, %eax
leaq 0x2715(%rip), %rcx      # 0x4a10
movslq (%rcx,%rax,4), %rdi
addq %rcx, %rdi
jmp 0x2322
leaq 0x1d5b(%rip), %rdi      # 0x4066
movq %r13, %rsi
xorl %eax, %eax
callq 0x2070
movl 0x4(%rsp), %ebx
jmp 0x2344
leaq 0x1d3a(%rip), %rdi      # 0x405c
movl 0x4(%rsp), %ebx
xorl %eax, %eax
callq 0x2070
addl $0x41, %r14d
leaq 0x1d3c(%rip), %rdi      # 0x4074
movl %r14d, %esi
movl %ebp, %edx
xorl %eax, %eax
callq 0x2070
cmpl $0xff, %ebx
jne 0x2382
leaq 0x1d43(%rip), %rdi      # 0x4096
xorl %r14d, %r14d
movq %r15, %rsi
xorl %eax, %eax
callq 0x2070
pushq $0x2d
popq %rbx
movq %r15, %rdi
callq 0x2050
movq %r12, %rcx
subq %rax, %rcx
cmpq %r14, %rcx
jb 0x23bc
movl %ebx, %edi
callq 0x2030
incq %r14
jmp 0x2363
movq 0x10(%rsp), %r14
leal 0x41(%r14), %esi
leaq 0x1d08(%rip), %rdi      # 0x409a
movl %ebx, %edx
xorl %eax, %eax
callq 0x2070
movl %r14d, %edi
movl %ebx, %esi
callq 0x3254
cmpb $0x3, %al
jae 0x23dd
movzbl %al, %eax
leaq 0x2669(%rip), %rcx      # 0x4a1c
movslq (%rcx,%rax,4), %rdi
addq %rcx, %rdi
jmp 0x23e4
leaq 0x1cef(%rip), %rdi      # 0x40b2
xorl %eax, %eax
callq 0x2070
leaq 0x1d23(%rip), %rdi      # 0x40f4
xorl %eax, %eax
callq 0x2070
jmp 0x245d
leaq 0x1d06(%rip), %rdi      # 0x40ea
xorl %eax, %eax
callq 0x2070
leaq 0x1c3e(%rip), %rdi      # 0x4030
xorl %eax, %eax
callq 0x2070
movl %r14d, %edi
movl %ebx, %esi
callq 0x3200
cmpl $0x1, %eax
leaq 0x1bfd(%rip), %rcx      # 0x400a
leaq 0x1bfc(%rip), %rdx      # 0x4010
cmoveq %rcx, %rdx
testl %eax, %eax
leaq 0x1be3(%rip), %rdi      # 0x4004
cmovneq %rdx, %rdi
xorl %eax, %eax
callq 0x2070
movl %r14d, %edi
movl %ebx, %esi
callq 0x3200
movl $0xff, %edx
andl %edx, %r14d
andl %edx, %ebx
andl %eax, %edx
movl %r14d, %edi
movl %ebx, %esi
callq 0x30e0
leaq 0x1cad(%rip), %rdi      # 0x4100
movq %rax, %rsi
xorl %eax, %eax
callq 0x2070
pushq $0xa
popq %rdi
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2030