// File: /workspace/github_c_makefile_star2_O0/WereCatf[P]Gonzales/fast-gpio.c
// Function: muxToString
char *muxToString(uint8_t port, uint8_t pin, uint8_t mux)
{
	char *returnStr=strUnknownMux;
	if(port < 1 || port > 6 || pin > 31) return strUnknownMux;
	if(mux==0) return strInputMux;
	if(mux==1) return strOutputMux;
	if(mux==5) return strUnknownMux; //Manual gives no definition for such mux
	mux-=2;
	if(mux==4) mux=3; //Skip the "missing" mux above
	uint8_t i, _pins, _port, _row;
	_port=1;
	i=0;
	while(_port != port){
		_pins=pinsWithMux[i];
		i+=_pins*2+1;
		_port++;
	}
	_pins=pinsWithMux[i];
	//printf("Debug: %d, %d\n", i, _pins);
	i++;
	while(_pins){
		if(pinsWithMux[i]==pin){
			_row=pinsWithMux[i+1];
			returnStr=muxNames[_row][mux];
			if(returnStr==NULL) returnStr=strUnknownMux;
			break;
		}
		i+=2;
		_pins--;
	}
	return returnStr;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movb %dl, %al
movb %sil, %cl
movb %dil, %dl
movb %dl, -0x9(%rbp)
movb %cl, -0xa(%rbp)
movb %al, -0xb(%rbp)
movq 0x39a4(%rip), %rax      # 0x7070
movq %rax, -0x18(%rbp)
movzbl -0x9(%rbp), %eax
cmpl $0x1, %eax
jl 0x36eb
movzbl -0x9(%rbp), %eax
cmpl $0x6, %eax
jg 0x36eb
movzbl -0xa(%rbp), %eax
cmpl $0x1f, %eax
jle 0x36fb
movq 0x397e(%rip), %rax      # 0x7070
movq %rax, -0x8(%rbp)
jmp 0x3841
movzbl -0xb(%rbp), %eax
cmpl $0x0, %eax
jne 0x3714
movq 0x396d(%rip), %rax      # 0x7078
movq %rax, -0x8(%rbp)
jmp 0x3841
movzbl -0xb(%rbp), %eax
cmpl $0x1, %eax
jne 0x372d
movq 0x395c(%rip), %rax      # 0x7080
movq %rax, -0x8(%rbp)
jmp 0x3841
movzbl -0xb(%rbp), %eax
cmpl $0x5, %eax
jne 0x3746
movq 0x3933(%rip), %rax      # 0x7070
movq %rax, -0x8(%rbp)
jmp 0x3841
movzbl -0xb(%rbp), %eax
subl $0x2, %eax
movb %al, -0xb(%rbp)
movzbl -0xb(%rbp), %eax
cmpl $0x4, %eax
jne 0x375d
movb $0x3, -0xb(%rbp)
movb $0x1, -0x1b(%rbp)
movb $0x0, -0x19(%rbp)
movzbl -0x1b(%rbp), %eax
movzbl -0x9(%rbp), %ecx
cmpl %ecx, %eax
je 0x37a0
movzbl -0x19(%rbp), %eax
movl %eax, %ecx
leaq 0x4292(%rip), %rax      # 0x7a10
movb (%rax,%rcx), %al
movb %al, -0x1a(%rbp)
movzbl -0x1a(%rbp), %ecx
shll %ecx
addl $0x1, %ecx
movzbl -0x19(%rbp), %eax
addl %ecx, %eax
movb %al, -0x19(%rbp)
movb -0x1b(%rbp), %al
addb $0x1, %al
movb %al, -0x1b(%rbp)
jmp 0x3765
movzbl -0x19(%rbp), %eax
movl %eax, %ecx
leaq 0x4263(%rip), %rax      # 0x7a10
movb (%rax,%rcx), %al
movb %al, -0x1a(%rbp)
movb -0x19(%rbp), %al
addb $0x1, %al
movb %al, -0x19(%rbp)
cmpb $0x0, -0x1a(%rbp)
je 0x3839
movzbl -0x19(%rbp), %eax
movl %eax, %ecx
leaq 0x4242(%rip), %rax      # 0x7a10
movzbl (%rax,%rcx), %eax
movzbl -0xa(%rbp), %ecx
cmpl %ecx, %eax
jne 0x3825
movzbl -0x19(%rbp), %eax
addl $0x1, %eax
movslq %eax, %rcx
leaq 0x4225(%rip), %rax      # 0x7a10
movb (%rax,%rcx), %al
movb %al, -0x1c(%rbp)
movzbl -0x1c(%rbp), %eax
movl %eax, %ecx
leaq 0x3892(%rip), %rax      # 0x7090
shlq $0x5, %rcx
addq %rcx, %rax
movzbl -0xb(%rbp), %ecx
movq (%rax,%rcx,8), %rax
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
jne 0x3823
movq 0x3851(%rip), %rax      # 0x7070
movq %rax, -0x18(%rbp)
jmp 0x3839
movzbl -0x19(%rbp), %eax
addl $0x2, %eax
movb %al, -0x19(%rbp)
movb -0x1a(%rbp), %al
addb $-0x1, %al
movb %al, -0x1a(%rbp)
jmp 0x37bb
movq -0x18(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
popq %rbp
retq
nopw (%rax,%rax)