	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function axp8xx_gpio_pin_get
_axp8xx_gpio_pin_get:                   ## @axp8xx_gpio_pin_get
	.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, %r14
	movq	%rsi, %r13
	movl	%edi, %r12d
	movq	_axp8xx_pins@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rdi
	callq	_nitems
	cmpq	%r13, %rax
	jbe	LBB0_1
## %bb.2:
	movl	%r12d, %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	%r12d, %edi
	movl	$1, %ecx
	callq	_axp8xx_read
	movl	%eax, %ebx
	testl	%eax, %eax
	je	LBB0_3
LBB0_11:
	movq	%r15, %rdi
	callq	_AXP_UNLOCK
	jmp	LBB0_12
LBB0_1:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
LBB0_12:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_3:
	movq	_AXP_GPIO_FUNC@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	andl	-44(%rbp), %eax
	movq	_AXP_GPIO_FUNC_SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	sarl	%cl, %eax
	cmpl	$128, %eax
	je	LBB0_8
## %bb.4:
	cmpl	$130, %eax
	je	LBB0_7
## %bb.5:
	cmpl	$129, %eax
	jne	LBB0_10
## %bb.6:
	movl	$0, (%r14)
	xorl	%ebx, %ebx
	jmp	LBB0_11
LBB0_8:
	movq	_AXP_GPIO_SIGBIT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-44(%rbp), %rdx
	movl	%r12d, %edi
	movl	$1, %ecx
	callq	_axp8xx_read
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_11
## %bb.9:
	movl	-44(%rbp), %eax
	xorl	%ecx, %ecx
	btl	%r13d, %eax
	setb	%cl
	movl	%ecx, (%r14)
	xorl	%ebx, %ebx
	jmp	LBB0_11
LBB0_7:
	movl	$1, (%r14)
	xorl	%ebx, %ebx
	jmp	LBB0_11
LBB0_10:
	movq	_EIO@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	jmp	LBB0_11
	.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	_AXP_GPIO_SIGBIT,4,2            ## @AXP_GPIO_SIGBIT
	.comm	_EIO,4,2                        ## @EIO
	.no_dead_strip	_axp8xx_gpio_pin_get
.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_get
_axp8xx_gpio_pin_get:                   ; @axp8xx_gpio_pin_get
	.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	x20, x2
	mov	x21, x1
	mov	x22, x0
Lloh0:
	adrp	x23, _axp8xx_pins@GOTPAGE
Lloh1:
	ldr	x23, [x23, _axp8xx_pins@GOTPAGEOFF]
	ldr	x0, [x23]
	bl	_nitems
	cmp	x0, x21
	b.ls	LBB0_3
; %bb.1:
	mov	x0, x22
	bl	_device_get_softc
	mov	x19, x0
	bl	_AXP_LOCK
	ldr	x8, [x23]
	ldr	w1, [x8, x21, lsl #2]
	add	x2, sp, #12
	mov	x0, x22
	mov	w3, #1
	bl	_axp8xx_read
	mov	x23, x0
	cbz	w0, LBB0_5
LBB0_2:
	mov	x0, x19
	bl	_AXP_UNLOCK
	b	LBB0_4
LBB0_3:
Lloh2:
	adrp	x8, _EINVAL@GOTPAGE
Lloh3:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh4:
	ldr	w23, [x8]
LBB0_4:
	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
LBB0_5:
	ldr	w8, [sp, #12]
Lloh5:
	adrp	x9, _AXP_GPIO_FUNC@GOTPAGE
Lloh6:
	ldr	x9, [x9, _AXP_GPIO_FUNC@GOTPAGEOFF]
Lloh7:
	ldr	w9, [x9]
	and	w8, w9, w8
Lloh8:
	adrp	x9, _AXP_GPIO_FUNC_SHIFT@GOTPAGE
Lloh9:
	ldr	x9, [x9, _AXP_GPIO_FUNC_SHIFT@GOTPAGEOFF]
Lloh10:
	ldr	w9, [x9]
	asr	w8, w8, w9
	cmp	w8, #128
	b.eq	LBB0_9
; %bb.6:
	cmp	w8, #130
	b.eq	LBB0_11
; %bb.7:
	cmp	w8, #129
	b.ne	LBB0_12
; %bb.8:
	mov	w23, #0
	str	wzr, [x20]
	b	LBB0_2
LBB0_9:
Lloh11:
	adrp	x8, _AXP_GPIO_SIGBIT@GOTPAGE
Lloh12:
	ldr	x8, [x8, _AXP_GPIO_SIGBIT@GOTPAGEOFF]
Lloh13:
	ldr	w1, [x8]
	add	x2, sp, #12
	mov	x0, x22
	mov	w3, #1
	bl	_axp8xx_read
	mov	x23, x0
	cbnz	w0, LBB0_2
; %bb.10:
	ldr	w8, [sp, #12]
	lsr	w8, w8, w21
	and	w8, w8, #0x1
	str	w8, [x20]
	b	LBB0_2
LBB0_11:
	mov	w23, #0
	mov	w8, #1
	str	w8, [x20]
	b	LBB0_2
LBB0_12:
Lloh14:
	adrp	x8, _EIO@GOTPAGE
Lloh15:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh16:
	ldr	w23, [x8]
	b	LBB0_2
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.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	_AXP_GPIO_FUNC_SHIFT,4,2        ; @AXP_GPIO_FUNC_SHIFT
	.comm	_AXP_GPIO_SIGBIT,4,2            ; @AXP_GPIO_SIGBIT
	.comm	_EIO,4,2                        ; @EIO
	.no_dead_strip	_axp8xx_gpio_pin_get
.subsections_via_symbols
