	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function as3722_pinctrl_gpio_set_direction
_as3722_pinctrl_gpio_set_direction:     ## @as3722_pinctrl_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	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%ecx, %r15d
	movl	%edx, %r14d
	callq	_pinctrl_dev_get_drvdata
	movq	%rax, %rbx
	movq	8(%rax), %rax
	movq	16(%rbx), %r12
	movl	%r14d, %ecx
	movl	(%rax,%rcx,4), %edi
	movl	%r15d, %esi
	callq	_as3722_pinctrl_gpio_get_mode
	movl	%eax, %r13d
	testl	%eax, %eax
	js	LBB0_1
## %bb.2:
	movl	%r14d, %edi
	callq	_AS3722_GPIOn_CONTROL_REG
	movq	_AS3722_GPIO_MODE_MASK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movq	%r12, %rdi
	movl	%eax, %esi
	movl	%r13d, %ecx
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_as3722_update_bits             ## TAILCALL
LBB0_1:
	movl	(%rbx), %edi
	testl	%r15d, %r15d
	leaq	L_.str.2(%rip), %rax
	leaq	L_.str.1(%rip), %rdx
	cmoveq	%rax, %rdx
	leaq	L_.str(%rip), %rsi
	movl	%r14d, %ecx
	callq	_dev_err
	movl	%r13d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%s direction for GPIO %d not supported\n"

L_.str.1:                               ## @.str.1
	.asciz	"Input"

L_.str.2:                               ## @.str.2
	.asciz	"Output"

	.comm	_AS3722_GPIO_MODE_MASK,4,2      ## @AS3722_GPIO_MODE_MASK
	.no_dead_strip	_as3722_pinctrl_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 as3722_pinctrl_gpio_set_direction
_as3722_pinctrl_gpio_set_direction:     ; @as3722_pinctrl_gpio_set_direction
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x21, x3
	mov	x19, x2
	bl	_pinctrl_dev_get_drvdata
	mov	x23, x0
	ldp	x8, x22, [x0, #8]
	ldr	w0, [x8, w19, uxtw #2]
	mov	x1, x21
	bl	_as3722_pinctrl_gpio_get_mode
	mov	x20, x0
	tbnz	w0, #31, LBB0_2
; %bb.1:
	mov	x0, x19
	bl	_AS3722_GPIOn_CONTROL_REG
	mov	x1, x0
Lloh0:
	adrp	x8, _AS3722_GPIO_MODE_MASK@GOTPAGE
Lloh1:
	ldr	x8, [x8, _AS3722_GPIO_MODE_MASK@GOTPAGEOFF]
Lloh2:
	ldr	w2, [x8]
	mov	x0, x22
	mov	x3, x20
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	b	_as3722_update_bits
LBB0_2:
	ldr	w0, [x23]
Lloh3:
	adrp	x8, l_.str.1@PAGE
Lloh4:
	add	x8, x8, l_.str.1@PAGEOFF
Lloh5:
	adrp	x9, l_.str.2@PAGE
Lloh6:
	add	x9, x9, l_.str.2@PAGEOFF
	cmp	w21, #0
	csel	x2, x9, x8, eq
Lloh7:
	adrp	x1, l_.str@PAGE
Lloh8:
	add	x1, x1, l_.str@PAGEOFF
	mov	x3, x19
	bl	_dev_err
	mov	x0, x20
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%s direction for GPIO %d not supported\n"

l_.str.1:                               ; @.str.1
	.asciz	"Input"

l_.str.2:                               ; @.str.2
	.asciz	"Output"

	.comm	_AS3722_GPIO_MODE_MASK,4,2      ; @AS3722_GPIO_MODE_MASK
	.no_dead_strip	_as3722_pinctrl_gpio_set_direction
.subsections_via_symbols
