	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function _rk805_pinctrl_set_mux
__rk805_pinctrl_set_mux:                ## @_rk805_pinctrl_set_mux
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r15
	pushq	%r14
	pushq	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r12d
	movl	%esi, %r14d
	callq	_pinctrl_dev_get_drvdata
	movq	%rax, %r15
	movq	8(%rax), %rax
	movl	%r14d, %edx
	movl	(%rax,%rdx,8), %ecx
	xorl	%ebx, %ebx
	testl	%ecx, %ecx
	je	LBB0_5
## %bb.1:
	movq	_RK805_PINMUX_GPIO@GOTPCREL(%rip), %rsi
	cmpl	%r12d, (%rsi)
	jne	LBB0_4
## %bb.2:
	movq	16(%r15), %rsi
	movl	(%rsi), %edi
	movl	4(%rax,%rdx,8), %esi
	movl	%ecx, %edx
	callq	_regmap_update_bits
	testl	%eax, %eax
	je	LBB0_5
## %bb.3:
	movl	%eax, %r12d
	movl	(%r15), %edi
	leaq	L_.str(%rip), %rsi
	movl	%r14d, %edx
	callq	_dev_err
	movl	%r12d, %ebx
	jmp	LBB0_5
LBB0_4:
	movl	(%r15), %edi
	leaq	L_.str.1(%rip), %rsi
	movl	%r12d, %edx
	callq	_dev_err
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_5:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_RK805_PINMUX_GPIO,4,2          ## @RK805_PINMUX_GPIO
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"set gpio%d GPIO failed\n"

L_.str.1:                               ## @.str.1
	.asciz	"Couldn't find function mux %d\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	__rk805_pinctrl_set_mux
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function _rk805_pinctrl_set_mux
__rk805_pinctrl_set_mux:                ; @_rk805_pinctrl_set_mux
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	mov	x21, x2
	mov	x19, x1
	bl	_pinctrl_dev_get_drvdata
	ldr	x8, [x0, #8]
	mov	w9, w19
	lsl	x10, x9, #3
	ldr	w2, [x8, x10]
	cbz	w2, LBB0_4
; %bb.1:
	mov	x20, x0
Lloh0:
	adrp	x10, _RK805_PINMUX_GPIO@GOTPAGE
Lloh1:
	ldr	x10, [x10, _RK805_PINMUX_GPIO@GOTPAGEOFF]
Lloh2:
	ldr	w10, [x10]
	cmp	w10, w21
	b.ne	LBB0_5
; %bb.2:
	ldr	x10, [x20, #16]
	ldr	w0, [x10]
	add	x8, x8, x9, lsl #3
	ldr	w1, [x8, #4]
	mov	x3, x2
	bl	_regmap_update_bits
	mov	x21, x0
	cbz	w0, LBB0_6
; %bb.3:
	ldr	w0, [x20]
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x19
	bl	_dev_err
	b	LBB0_6
LBB0_4:
	mov	w21, #0
	b	LBB0_6
LBB0_5:
	ldr	w0, [x20]
Lloh5:
	adrp	x1, l_.str.1@PAGE
Lloh6:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x2, x21
	bl	_dev_err
Lloh7:
	adrp	x8, _EINVAL@GOTPAGE
Lloh8:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	neg	w21, w8
LBB0_6:
	mov	x0, x21
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_RK805_PINMUX_GPIO,4,2          ; @RK805_PINMUX_GPIO
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"set gpio%d GPIO failed\n"

l_.str.1:                               ; @.str.1
	.asciz	"Couldn't find function mux %d\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	__rk805_pinctrl_set_mux
.subsections_via_symbols
