	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function rockchip_verify_mux
_rockchip_verify_mux:                   ## @rockchip_verify_mux
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	cmpl	$32, %esi
	jl	LBB0_2
## %bb.1:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	jmp	LBB0_7
LBB0_2:
	movl	%esi, %ecx
	leal	7(%rcx), %eax
	testl	%esi, %esi
	cmovnsl	%esi, %eax
	movq	8(%rdi), %rsi
	sarl	$3, %eax
	movq	(%rdi), %rdi
	cltq
	movl	(%rdi,%rax,4), %edi
	movq	_IOMUX_UNROUTED@GOTPCREL(%rip), %rax
	testl	%edi, (%rax)
	je	LBB0_4
## %bb.3:
	movl	(%rsi), %edi
	leaq	L_.str(%rip), %rsi
	movl	%ecx, %edx
	callq	_dev_err
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	jmp	LBB0_7
LBB0_4:
	movq	_IOMUX_GPIO_ONLY@GOTPCREL(%rip), %r8
	xorl	%eax, %eax
	testl	%edi, (%r8)
	je	LBB0_8
## %bb.5:
	movq	_RK_FUNC_GPIO@GOTPCREL(%rip), %rdi
	cmpl	%edx, (%rdi)
	je	LBB0_8
## %bb.6:
	movl	(%rsi), %edi
	leaq	L_.str.1(%rip), %rsi
	movl	%ecx, %edx
	callq	_dev_err
	movq	_ENOTSUPP@GOTPCREL(%rip), %rcx
LBB0_7:
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_8:
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_IOMUX_UNROUTED,4,2             ## @IOMUX_UNROUTED
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"pin %d is unrouted\n"

	.comm	_IOMUX_GPIO_ONLY,4,2            ## @IOMUX_GPIO_ONLY
	.comm	_RK_FUNC_GPIO,4,2               ## @RK_FUNC_GPIO
L_.str.1:                               ## @.str.1
	.asciz	"pin %d only supports a gpio mux\n"

	.comm	_ENOTSUPP,4,2                   ## @ENOTSUPP
	.no_dead_strip	_rockchip_verify_mux
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function rockchip_verify_mux
_rockchip_verify_mux:                   ; @rockchip_verify_mux
	.cfi_startproc
; %bb.0:
	stp	x29, x30, [sp, #-16]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 16
	mov	x29, sp
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	cmp	w1, #32
	b.ge	LBB0_3
; %bb.1:
	mov	x8, x1
	add	w9, w1, #7
	cmp	w1, #0
	csel	w9, w9, w1, lt
	asr	w10, w9, #3
	ldp	x11, x9, [x0]
	ldr	w10, [x11, w10, sxtw #2]
Lloh0:
	adrp	x11, _IOMUX_UNROUTED@GOTPAGE
Lloh1:
	ldr	x11, [x11, _IOMUX_UNROUTED@GOTPAGEOFF]
Lloh2:
	ldr	w11, [x11]
	tst	w11, w10
	b.eq	LBB0_5
; %bb.2:
	ldr	w0, [x9]
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x8
	bl	_dev_err
LBB0_3:
Lloh5:
	adrp	x8, _EINVAL@GOTPAGE
Lloh6:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_4:
	ldr	w8, [x8]
	neg	w0, w8
	ldp	x29, x30, [sp], #16             ; 16-byte Folded Reload
	ret
LBB0_5:
Lloh7:
	adrp	x11, _IOMUX_GPIO_ONLY@GOTPAGE
Lloh8:
	ldr	x11, [x11, _IOMUX_GPIO_ONLY@GOTPAGEOFF]
Lloh9:
	ldr	w11, [x11]
	and	w10, w11, w10
Lloh10:
	adrp	x11, _RK_FUNC_GPIO@GOTPAGE
Lloh11:
	ldr	x11, [x11, _RK_FUNC_GPIO@GOTPAGEOFF]
Lloh12:
	ldr	w11, [x11]
	cmp	w10, #0
	ccmp	w11, w2, #4, ne
	b.ne	LBB0_7
; %bb.6:
	mov	w0, #0
	ldp	x29, x30, [sp], #16             ; 16-byte Folded Reload
	ret
LBB0_7:
	ldr	w0, [x9]
Lloh13:
	adrp	x1, l_.str.1@PAGE
Lloh14:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x2, x8
	bl	_dev_err
Lloh15:
	adrp	x8, _ENOTSUPP@GOTPAGE
Lloh16:
	ldr	x8, [x8, _ENOTSUPP@GOTPAGEOFF]
	b	LBB0_4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpAdd	Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_IOMUX_UNROUTED,4,2             ; @IOMUX_UNROUTED
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"pin %d is unrouted\n"

	.comm	_IOMUX_GPIO_ONLY,4,2            ; @IOMUX_GPIO_ONLY
	.comm	_RK_FUNC_GPIO,4,2               ; @RK_FUNC_GPIO
l_.str.1:                               ; @.str.1
	.asciz	"pin %d only supports a gpio mux\n"

	.comm	_ENOTSUPP,4,2                   ; @ENOTSUPP
	.no_dead_strip	_rockchip_verify_mux
.subsections_via_symbols
