	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function rk805_pmx_gpio_set_direction
_rk805_pmx_gpio_set_direction:          ## @rk805_pmx_gpio_set_direction
	.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	%ecx, %r12d
	movl	%edx, %r15d
	movq	%rdi, %rbx
	callq	_pinctrl_dev_get_drvdata
	movq	%rax, %r14
	movq	_RK805_PINMUX_GPIO@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	movl	%r15d, %esi
	callq	__rk805_pinctrl_set_mux
	testl	%eax, %eax
	je	LBB0_2
## %bb.1:
	movl	%eax, %ebx
	leaq	L_.str(%rip), %rsi
LBB0_6:
	movl	(%r14), %edi
	movl	%r15d, %edx
	callq	_dev_err
LBB0_7:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_2:
	movq	8(%r14), %rax
	movl	%r15d, %ecx
	movl	(%rax,%rcx,8), %edx
	testl	%edx, %edx
	je	LBB0_3
## %bb.4:
	movq	16(%r14), %rsi
	movl	(%rsi), %edi
	movl	4(%rax,%rcx,8), %esi
	xorl	%ebx, %ebx
	testl	%r12d, %r12d
	movl	$0, %ecx
	cmovel	%edx, %ecx
	callq	_regmap_update_bits
	testl	%eax, %eax
	je	LBB0_7
## %bb.5:
	leaq	L_.str.1(%rip), %rsi
	movl	%eax, %ebx
	jmp	LBB0_6
LBB0_3:
	xorl	%ebx, %ebx
	jmp	LBB0_7
	.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 mux failed\n"

L_.str.1:                               ## @.str.1
	.asciz	"set gpio%d direction failed\n"

	.no_dead_strip	_rk805_pmx_gpio_set_direction
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function rk805_pmx_gpio_set_direction
_rk805_pmx_gpio_set_direction:          ; @rk805_pmx_gpio_set_direction
	.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	x22, x3
	mov	x19, x2
	mov	x21, x0
	bl	_pinctrl_dev_get_drvdata
	mov	x20, x0
Lloh0:
	adrp	x8, _RK805_PINMUX_GPIO@GOTPAGE
Lloh1:
	ldr	x8, [x8, _RK805_PINMUX_GPIO@GOTPAGEOFF]
Lloh2:
	ldr	w2, [x8]
	mov	x0, x21
	mov	x1, x19
	bl	__rk805_pinctrl_set_mux
	cbz	w0, LBB0_4
; %bb.1:
	mov	x21, x0
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
LBB0_2:
	ldr	w0, [x20]
	mov	x2, x19
	bl	_dev_err
LBB0_3:
	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
LBB0_4:
	ldr	x8, [x20, #8]
	mov	w9, w19
	lsl	x10, x9, #3
	ldr	w2, [x8, x10]
	cbz	w2, LBB0_7
; %bb.5:
	ldr	x10, [x20, #16]
	ldr	w0, [x10]
	add	x8, x8, x9, lsl #3
	ldr	w1, [x8, #4]
	cmp	w22, #0
	csel	w3, w2, wzr, eq
	bl	_regmap_update_bits
	mov	x21, x0
	cbz	w0, LBB0_3
; %bb.6:
Lloh5:
	adrp	x1, l_.str.1@PAGE
Lloh6:
	add	x1, x1, l_.str.1@PAGEOFF
	b	LBB0_2
LBB0_7:
	mov	w21, #0
	b	LBB0_3
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.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 mux failed\n"

l_.str.1:                               ; @.str.1
	.asciz	"set gpio%d direction failed\n"

	.no_dead_strip	_rk805_pmx_gpio_set_direction
.subsections_via_symbols
