	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function to_reg
_to_reg:                                ## @to_reg
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	movl	%edi, %eax
	movq	_CRYSTALCOVE_GPIO_NUM@GOTPCREL(%rip), %rcx
	cmpl	%edi, (%rcx)
	jle	LBB0_2
## %bb.1:
	movq	_CTRL_IN@GOTPCREL(%rip), %rcx
	cmpl	$8, %eax
	movq	_GPIO1P0CTLI@GOTPCREL(%rip), %rdx
	cmovlq	_GPIO0P0CTLI@GOTPCREL(%rip), %rdx
	movq	_GPIO1P0CTLO@GOTPCREL(%rip), %rdi
	cmovlq	_GPIO0P0CTLO@GOTPCREL(%rip), %rdi
	cmpl	%esi, (%rcx)
	cmoveq	%rdx, %rdi
	leal	7(%rax), %ecx
	testl	%eax, %eax
	cmovnsl	%eax, %ecx
	andl	$-8, %ecx
	subl	%ecx, %eax
	addl	(%rdi), %eax
                                        ## kill: def $eax killed $eax killed $rax
	popq	%rbp
	retq
LBB0_2:
	cmpl	$94, %eax
	jne	LBB0_5
## %bb.3:
	movq	_GPIOPANELCTL@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
                                        ## kill: def $eax killed $eax killed $rax
	popq	%rbp
	retq
LBB0_5:
	movq	_EOPNOTSUPP@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
                                        ## kill: def $eax killed $eax killed $rax
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_CRYSTALCOVE_GPIO_NUM,4,2       ## @CRYSTALCOVE_GPIO_NUM
	.comm	_GPIOPANELCTL,4,2               ## @GPIOPANELCTL
	.comm	_EOPNOTSUPP,4,2                 ## @EOPNOTSUPP
	.comm	_CTRL_IN,4,2                    ## @CTRL_IN
	.comm	_GPIO0P0CTLI,4,2                ## @GPIO0P0CTLI
	.comm	_GPIO1P0CTLI,4,2                ## @GPIO1P0CTLI
	.comm	_GPIO0P0CTLO,4,2                ## @GPIO0P0CTLO
	.comm	_GPIO1P0CTLO,4,2                ## @GPIO1P0CTLO
	.no_dead_strip	_to_reg
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function to_reg
_to_reg:                                ; @to_reg
	.cfi_startproc
; %bb.0:
Lloh0:
	adrp	x8, _CRYSTALCOVE_GPIO_NUM@GOTPAGE
Lloh1:
	ldr	x8, [x8, _CRYSTALCOVE_GPIO_NUM@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w8, w0
	b.le	LBB0_2
; %bb.1:
Lloh3:
	adrp	x8, _CTRL_IN@GOTPAGE
Lloh4:
	ldr	x8, [x8, _CTRL_IN@GOTPAGEOFF]
Lloh5:
	adrp	x9, _GPIO0P0CTLI@GOTPAGE
Lloh6:
	ldr	x9, [x9, _GPIO0P0CTLI@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
Lloh8:
	adrp	x10, _GPIO1P0CTLI@GOTPAGE
Lloh9:
	ldr	x10, [x10, _GPIO1P0CTLI@GOTPAGEOFF]
	cmp	w0, #8
Lloh10:
	adrp	x11, _GPIO0P0CTLO@GOTPAGE
Lloh11:
	ldr	x11, [x11, _GPIO0P0CTLO@GOTPAGEOFF]
	csel	x9, x9, x10, lt
Lloh12:
	adrp	x10, _GPIO1P0CTLO@GOTPAGE
Lloh13:
	ldr	x10, [x10, _GPIO1P0CTLO@GOTPAGEOFF]
	csel	x10, x11, x10, lt
	cmp	w8, w1
	csel	x8, x9, x10, eq
	ldr	w8, [x8]
	negs	w9, w0
	and	w9, w9, #0x7
	and	w10, w0, #0x7
	csneg	w9, w10, w9, mi
	add	w0, w8, w9
	ret
LBB0_2:
	cmp	w0, #94
	b.ne	LBB0_4
; %bb.3:
Lloh14:
	adrp	x8, _GPIOPANELCTL@GOTPAGE
Lloh15:
	ldr	x8, [x8, _GPIOPANELCTL@GOTPAGEOFF]
Lloh16:
	ldr	w0, [x8]
	ret
LBB0_4:
Lloh17:
	adrp	x8, _EOPNOTSUPP@GOTPAGE
Lloh18:
	ldr	x8, [x8, _EOPNOTSUPP@GOTPAGEOFF]
Lloh19:
	ldr	w8, [x8]
	neg	w0, w8
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh7
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.comm	_CRYSTALCOVE_GPIO_NUM,4,2       ; @CRYSTALCOVE_GPIO_NUM
	.comm	_GPIOPANELCTL,4,2               ; @GPIOPANELCTL
	.comm	_EOPNOTSUPP,4,2                 ; @EOPNOTSUPP
	.comm	_CTRL_IN,4,2                    ; @CTRL_IN
	.comm	_GPIO0P0CTLI,4,2                ; @GPIO0P0CTLI
	.comm	_GPIO1P0CTLI,4,2                ; @GPIO1P0CTLI
	.comm	_GPIO0P0CTLO,4,2                ; @GPIO0P0CTLO
	.comm	_GPIO1P0CTLO,4,2                ; @GPIO1P0CTLO
	.no_dead_strip	_to_reg
.subsections_via_symbols
