	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function axp8xx_gpio_pin_set
_axp8xx_gpio_pin_set:                   ## @axp8xx_gpio_pin_set
	.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	%edx, %r12d
	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
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_7
## %bb.3:
	movl	-44(%rbp), %edx
	movq	_AXP_GPIO_FUNC@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, %esi
	andl	%edx, %esi
	movq	_AXP_GPIO_FUNC_SHIFT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	sarl	%cl, %esi
	andl	$-2, %esi
	cmpl	$128, %esi
	jne	LBB0_5
## %bb.4:
                                        ## kill: def $cl killed $cl killed $ecx
	shll	%cl, %r12d
	notl	%eax
	andl	%eax, %edx
	orl	%r12d, %edx
	movl	%edx, -44(%rbp)
	jmp	LBB0_6
LBB0_1:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	jmp	LBB0_8
LBB0_5:
	movq	_EIO@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	testl	%ebx, %ebx
	jne	LBB0_7
LBB0_6:
	movq	_axp8xx_pins@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	(%rax,%r13,4), %esi
	movl	%r14d, %edi
	callq	_axp8xx_write
	movl	%eax, %ebx
LBB0_7:
	movq	%r15, %rdi
	callq	_AXP_UNLOCK
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	_AXP_GPIO_FUNC_SHIFT,4,2        ## @AXP_GPIO_FUNC_SHIFT
	.comm	_EIO,4,2                        ## @EIO
	.no_dead_strip	_axp8xx_gpio_pin_set
.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_set
_axp8xx_gpio_pin_set:                   ; @axp8xx_gpio_pin_set
	.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_4
; %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_7
; %bb.2:
	ldr	w2, [sp, #12]
Lloh2:
	adrp	x8, _AXP_GPIO_FUNC@GOTPAGE
Lloh3:
	ldr	x8, [x8, _AXP_GPIO_FUNC@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	and	w10, w8, w2
Lloh5:
	adrp	x9, _AXP_GPIO_FUNC_SHIFT@GOTPAGE
Lloh6:
	ldr	x9, [x9, _AXP_GPIO_FUNC_SHIFT@GOTPAGEOFF]
Lloh7:
	ldr	w9, [x9]
	asr	w10, w10, w9
	and	w10, w10, #0xfffffffe
	cmp	w10, #128
	b.ne	LBB0_5
; %bb.3:
	bic	w8, w2, w8
	lsl	w9, w22, w9
	orr	w2, w9, w8
	str	w2, [sp, #12]
	b	LBB0_6
LBB0_4:
Lloh8:
	adrp	x8, _EINVAL@GOTPAGE
Lloh9:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh10:
	ldr	w23, [x8]
	b	LBB0_8
LBB0_5:
Lloh11:
	adrp	x8, _EIO@GOTPAGE
Lloh12:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh13:
	ldr	w23, [x8]
	cbnz	w23, LBB0_7
LBB0_6:
	ldr	x8, [x24]
	ldr	w1, [x8, x20, lsl #2]
	mov	x0, x19
	bl	_axp8xx_write
	mov	x23, x0
LBB0_7:
	mov	x0, x21
	bl	_AXP_UNLOCK
LBB0_8:
	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	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.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	_AXP_GPIO_FUNC_SHIFT,4,2        ; @AXP_GPIO_FUNC_SHIFT
	.comm	_EIO,4,2                        ; @EIO
	.no_dead_strip	_axp8xx_gpio_pin_set
.subsections_via_symbols
