	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function aw_gpio_set_function
_aw_gpio_set_function:                  ## @aw_gpio_set_function
	.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
	movq	(%rdi), %rax
	movq	(%rax), %rax
	leaq	(%rsi,%rsi,2), %rbx
	movq	16(%rax,%rbx,8), %rax
	cmpq	$0, (%rax,%rdx,8)
	je	LBB0_1
## %bb.2:
	movq	%rdx, %r12
	movq	%rdi, %r14
	callq	_AW_GPIO_LOCK_ASSERT
	movq	(%r14), %rax
	movq	(%rax), %rax
	movq	(%rax,%rbx,8), %r15
	movq	8(%rax,%rbx,8), %rbx
	leal	(,%rbx,4), %r13d
	shrq	$3, %rbx
	movq	%r15, %rdi
	movq	%rbx, %rsi
	callq	_AW_GPIO_GP_CFG
	movq	%r14, %rdi
	movl	%eax, %esi
	callq	_AW_GPIO_READ
	movl	%r13d, %edx
	movl	$7, %esi
	movl	%r13d, %ecx
	shll	%cl, %esi
	andb	$28, %dl
	notl	%esi
	movslq	%esi, %rsi
	andq	%rax, %rsi
	movl	%edx, %ecx
	shlq	%cl, %r12
	orq	%rsi, %r12
	movq	%r15, %rdi
	movq	%rbx, %rsi
	callq	_AW_GPIO_GP_CFG
	movq	%r14, %rdi
	movl	%eax, %esi
	movq	%r12, %rdx
	callq	_AW_GPIO_WRITE
	xorl	%eax, %eax
	jmp	LBB0_3
LBB0_1:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_3:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_aw_gpio_set_function
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function aw_gpio_set_function
_aw_gpio_set_function:                  ; @aw_gpio_set_function
	.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
	ldr	x8, [x0]
	ldr	x8, [x8]
	mov	w9, #24
	madd	x8, x1, x9, x8
	ldr	x8, [x8, #16]
	ldr	x8, [x8, x2, lsl #3]
	cbz	x8, LBB0_2
; %bb.1:
	mov	x20, x2
	mov	x21, x1
	mov	x19, x0
	bl	_AW_GPIO_LOCK_ASSERT
	ldr	x8, [x19]
	ldr	x8, [x8]
	mov	w9, #24
	madd	x8, x21, x9, x8
	ldp	x21, x8, [x8]
	lsl	w9, w8, #2
	and	x23, x9, #0x1c
	lsr	x22, x8, #3
	mov	x0, x21
	mov	x1, x22
	bl	_AW_GPIO_GP_CFG
	mov	x1, x0
	mov	x0, x19
	bl	_AW_GPIO_READ
	mov	w8, #7
	lsl	w8, w8, w23
	mvn	w8, w8
	sxtw	x8, w8
	and	x8, x0, x8
	lsl	x9, x20, x23
	orr	x20, x8, x9
	mov	x0, x21
	mov	x1, x22
	bl	_AW_GPIO_GP_CFG
	mov	x1, x0
	mov	x0, x19
	mov	x2, x20
	bl	_AW_GPIO_WRITE
	mov	w0, #0
	b	LBB0_3
LBB0_2:
Lloh0:
	adrp	x8, _EINVAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
LBB0_3:
	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
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_aw_gpio_set_function
.subsections_via_symbols
