	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function axp8xx_gpio_pin_setflags
_axp8xx_gpio_pin_setflags:              ## @axp8xx_gpio_pin_setflags
	.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	%rdx, %r12
	movq	%rsi, %r13
	movl	%edi, %r14d
	movq	_axp8xx_pins@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rdi
	callq	_nitems
	cmpq	%r13, %rax
	jbe	LBB0_1
## %bb.2:
	movl	%r14d, %edi
	callq	_device_get_softc
	movq	%rax, %r15
	movq	%rax, %rdi
	callq	_AXP_LOCK
	movq	(%rbx), %rax
	movl	(%rax,%r13,4), %esi
	leaq	-44(%rbp), %rdx
	movl	%r14d, %edi
	movl	$1, %ecx
	callq	_axp8xx_read
	movq	%rbx, %rsi
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_7
## %bb.3:
	movq	_AXP_GPIO_FUNC@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	notl	%edx
	andl	-44(%rbp), %edx
	movl	%edx, -44(%rbp)
	movq	_GPIO_PIN_INPUT@GOTPCREL(%rip), %rcx
	movq	_GPIO_PIN_OUTPUT@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	(%rcx), %rcx
	orq	%rax, %rcx
	testq	%r12, %rcx
	je	LBB0_6
## %bb.4:
	andq	%r12, %rax
	jne	LBB0_6
## %bb.5:
	movq	_AXP_GPIO_FUNC_INPUT@GOTPCREL(%rip), %rax
	orl	(%rax), %edx
	movl	%edx, -44(%rbp)
LBB0_6:
	movq	(%rsi), %rax
	movl	(%rax,%r13,4), %esi
	movl	%r14d, %edi
	callq	_axp8xx_write
	movl	%eax, %ebx
LBB0_7:
	movq	%r15, %rdi
	callq	_AXP_UNLOCK
	jmp	LBB0_8
LBB0_1:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
LBB0_8:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_axp8xx_pins,8,3                ## @axp8xx_pins
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_AXP_GPIO_FUNC,4,2              ## @AXP_GPIO_FUNC
	.comm	_GPIO_PIN_INPUT,8,3             ## @GPIO_PIN_INPUT
	.comm	_GPIO_PIN_OUTPUT,8,3            ## @GPIO_PIN_OUTPUT
	.comm	_AXP_GPIO_FUNC_INPUT,4,2        ## @AXP_GPIO_FUNC_INPUT
	.no_dead_strip	_axp8xx_gpio_pin_setflags
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function axp8xx_gpio_pin_setflags
_axp8xx_gpio_pin_setflags:              ; @axp8xx_gpio_pin_setflags
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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	x22, x2
	mov	x20, x1
	mov	x19, x0
Lloh0:
	adrp	x24, _axp8xx_pins@GOTPAGE
Lloh1:
	ldr	x24, [x24, _axp8xx_pins@GOTPAGEOFF]
	ldr	x0, [x24]
	bl	_nitems
	cmp	x0, x20
	b.ls	LBB0_6
; %bb.1:
	mov	x0, x19
	bl	_device_get_softc
	mov	x21, x0
	bl	_AXP_LOCK
	ldr	x8, [x24]
	ldr	w1, [x8, x20, lsl #2]
	add	x2, sp, #12
	mov	x0, x19
	mov	w3, #1
	bl	_axp8xx_read
	mov	x23, x0
	cbnz	w0, LBB0_5
; %bb.2:
Lloh2:
	adrp	x8, _AXP_GPIO_FUNC@GOTPAGE
Lloh3:
	ldr	x8, [x8, _AXP_GPIO_FUNC@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	ldr	w9, [sp, #12]
	bic	w2, w9, w8
	str	w2, [sp, #12]
Lloh5:
	adrp	x8, _GPIO_PIN_INPUT@GOTPAGE
Lloh6:
	ldr	x8, [x8, _GPIO_PIN_INPUT@GOTPAGEOFF]
Lloh7:
	ldr	x8, [x8]
Lloh8:
	adrp	x9, _GPIO_PIN_OUTPUT@GOTPAGE
Lloh9:
	ldr	x9, [x9, _GPIO_PIN_OUTPUT@GOTPAGEOFF]
Lloh10:
	ldr	x9, [x9]
	orr	x8, x9, x8
	and	x8, x8, x22
	and	x9, x9, x22
	cmp	x8, #0
	ccmp	x9, #0, #0, ne
	b.ne	LBB0_4
; %bb.3:
Lloh11:
	adrp	x8, _AXP_GPIO_FUNC_INPUT@GOTPAGE
Lloh12:
	ldr	x8, [x8, _AXP_GPIO_FUNC_INPUT@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	orr	w2, w8, w2
	str	w2, [sp, #12]
LBB0_4:
	ldr	x8, [x24]
	ldr	w1, [x8, x20, lsl #2]
	mov	x0, x19
	bl	_axp8xx_write
	mov	x23, x0
LBB0_5:
	mov	x0, x21
	bl	_AXP_UNLOCK
	b	LBB0_7
LBB0_6:
Lloh14:
	adrp	x8, _EINVAL@GOTPAGE
Lloh15:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh16:
	ldr	w23, [x8]
LBB0_7:
	mov	x0, x23
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_axp8xx_pins,8,3                ; @axp8xx_pins
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_AXP_GPIO_FUNC,4,2              ; @AXP_GPIO_FUNC
	.comm	_GPIO_PIN_INPUT,8,3             ; @GPIO_PIN_INPUT
	.comm	_GPIO_PIN_OUTPUT,8,3            ; @GPIO_PIN_OUTPUT
	.comm	_AXP_GPIO_FUNC_INPUT,4,2        ; @AXP_GPIO_FUNC_INPUT
	.no_dead_strip	_axp8xx_gpio_pin_setflags
.subsections_via_symbols
