	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function axp2xx_gpio_pin_toggle
_axp2xx_gpio_pin_toggle:                ## @axp2xx_gpio_pin_toggle
	.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	%r12
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r15
	movl	%edi, %r14d
	callq	_device_get_softc
	cmpq	%r15, (%rax)
	jbe	LBB0_1
## %bb.2:
	movq	%rax, %r12
	movq	%rax, %rdi
	callq	_AXP_LOCK
	movq	8(%r12), %rax
	movl	(%rax,%r15,4), %esi
	leaq	-36(%rbp), %rdx
	movl	%r14d, %edi
	movl	$1, %ecx
	callq	_axp2xx_read
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_13
## %bb.3:
	movl	-36(%rbp), %edx
	movq	_AXP2XX_GPIO_FUNC_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, %ecx
	andl	%edx, %ecx
	cmpl	$129, %ecx
	je	LBB0_10
## %bb.4:
	cmpl	$128, %ecx
	jne	LBB0_5
## %bb.7:
	cmpq	$2, %r15
	jne	LBB0_9
## %bb.8:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	jmp	LBB0_6
LBB0_1:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	jmp	LBB0_14
LBB0_10:
	notl	%eax
	andl	%eax, %edx
	orl	$128, %edx
	jmp	LBB0_11
LBB0_5:
	movq	_EIO@GOTPCREL(%rip), %rax
LBB0_6:
	movl	(%rax), %ebx
	testl	%ebx, %ebx
	jne	LBB0_13
	jmp	LBB0_12
LBB0_9:
	notl	%eax
	andl	%eax, %edx
	orl	$129, %edx
LBB0_11:
	movl	%edx, -36(%rbp)
LBB0_12:
	movq	8(%r12), %rax
	movl	(%rax,%r15,4), %esi
	movl	%r14d, %edi
	callq	_axp2xx_write
	movl	%eax, %ebx
LBB0_13:
	movq	%r12, %rdi
	callq	_AXP_UNLOCK
LBB0_14:
	movl	%ebx, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_AXP2XX_GPIO_FUNC_MASK,4,2      ## @AXP2XX_GPIO_FUNC_MASK
	.comm	_EIO,4,2                        ## @EIO
	.no_dead_strip	_axp2xx_gpio_pin_toggle
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function axp2xx_gpio_pin_toggle
_axp2xx_gpio_pin_toggle:                ; @axp2xx_gpio_pin_toggle
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	mov	x21, x1
	mov	x20, x0
	bl	_device_get_softc
	ldr	x8, [x0]
	cmp	x8, x21
	b.ls	LBB0_6
; %bb.1:
	mov	x19, x0
	bl	_AXP_LOCK
	ldr	x8, [x19, #8]
	ldr	w1, [x8, x21, lsl #2]
	add	x2, sp, #12
	mov	x0, x20
	mov	w3, #1
	bl	_axp2xx_read
	mov	x22, x0
	cbnz	w0, LBB0_13
; %bb.2:
	ldr	w2, [sp, #12]
Lloh0:
	adrp	x8, _AXP2XX_GPIO_FUNC_MASK@GOTPAGE
Lloh1:
	ldr	x8, [x8, _AXP2XX_GPIO_FUNC_MASK@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	and	w9, w8, w2
	cmp	w9, #129
	b.eq	LBB0_7
; %bb.3:
	cmp	w9, #128
	b.ne	LBB0_8
; %bb.4:
	cmp	x21, #2
	b.ne	LBB0_10
; %bb.5:
Lloh3:
	adrp	x8, _EINVAL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_9
LBB0_6:
Lloh5:
	adrp	x8, _EINVAL@GOTPAGE
Lloh6:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh7:
	ldr	w22, [x8]
	b	LBB0_14
LBB0_7:
	bic	w8, w2, w8
	orr	w2, w8, #0x80
	b	LBB0_11
LBB0_8:
Lloh8:
	adrp	x8, _EIO@GOTPAGE
Lloh9:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
LBB0_9:
	ldr	w22, [x8]
	cbnz	w22, LBB0_13
	b	LBB0_12
LBB0_10:
	bic	w8, w2, w8
	mov	w9, #129
	orr	w2, w8, w9
LBB0_11:
	str	w2, [sp, #12]
LBB0_12:
	ldr	x8, [x19, #8]
	ldr	w1, [x8, x21, lsl #2]
	mov	x0, x20
	bl	_axp2xx_write
	mov	x22, x0
LBB0_13:
	mov	x0, x19
	bl	_AXP_UNLOCK
LBB0_14:
	mov	x0, x22
	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
	add	sp, sp, #64
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_AXP2XX_GPIO_FUNC_MASK,4,2      ; @AXP2XX_GPIO_FUNC_MASK
	.comm	_EIO,4,2                        ; @EIO
	.no_dead_strip	_axp2xx_gpio_pin_toggle
.subsections_via_symbols
