	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_as3722_gpio_pin_get            ## -- Begin function as3722_gpio_pin_get
	.p2align	4, 0x90
_as3722_gpio_pin_get:                   ## @as3722_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, %r15
	callq	_device_get_softc
	cmpq	%r15, (%rax)
	jbe	LBB0_1
## %bb.2:
	movq	%rax, %rbx
	movq	%rax, %rdi
	callq	_GPIO_LOCK
	movq	8(%rbx), %rax
	movq	(%rax,%r15,8), %rax
	movl	(%rax), %r13d
	movq	_AS3722_GPIO_MODE_SHIFT@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	movl	%r13d, %eax
	sarl	%cl, %eax
	movq	_AS3722_GPIO_MODE_MASK@GOTPCREL(%rip), %rcx
	andl	(%rcx), %eax
	movq	_AS3722_MODE_PUSH_PULL@GOTPCREL(%rip), %rcx
	movq	_AS3722_MODE_PUSH_PULL_LV@GOTPCREL(%rip), %rdi
	movq	_AS3722_GPIO_SIGNAL_OUT@GOTPCREL(%rip), %rdx
	movq	%rdx, %rsi
	cmpl	(%rdi), %eax
	je	LBB0_4
## %bb.3:
	movq	_AS3722_GPIO_SIGNAL_IN@GOTPCREL(%rip), %rsi
LBB0_4:
	cmpl	(%rcx), %eax
	cmoveq	%rdx, %rsi
	movl	(%rsi), %esi
	leaq	-44(%rbp), %rdx
	movq	%rbx, %rdi
	callq	_RD1
	movl	%eax, %r12d
	movq	%rbx, %rdi
	callq	_GPIO_UNLOCK
	testl	%r12d, %r12d
	jne	LBB0_7
## %bb.5:
	movl	-44(%rbp), %ecx
	xorl	%eax, %eax
	btq	%r15, %rcx
	setb	%al
	movq	%rax, (%r14)
	movq	_AS3722_GPIO_INVERT@GOTPCREL(%rip), %rcx
	xorl	%r12d, %r12d
	testl	%r13d, (%rcx)
	je	LBB0_7
## %bb.6:
	xorq	$1, %rax
	movq	%rax, (%r14)
	jmp	LBB0_7
LBB0_1:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
LBB0_7:
	movl	%r12d, %eax
	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
	.comm	_AS3722_GPIO_MODE_SHIFT,4,2     ## @AS3722_GPIO_MODE_SHIFT
	.comm	_AS3722_GPIO_MODE_MASK,4,2      ## @AS3722_GPIO_MODE_MASK
	.comm	_AS3722_MODE_PUSH_PULL,4,2      ## @AS3722_MODE_PUSH_PULL
	.comm	_AS3722_MODE_PUSH_PULL_LV,4,2   ## @AS3722_MODE_PUSH_PULL_LV
	.comm	_AS3722_GPIO_SIGNAL_OUT,4,2     ## @AS3722_GPIO_SIGNAL_OUT
	.comm	_AS3722_GPIO_SIGNAL_IN,4,2      ## @AS3722_GPIO_SIGNAL_IN
	.comm	_AS3722_GPIO_INVERT,4,2         ## @AS3722_GPIO_INVERT
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_as3722_gpio_pin_get            ; -- Begin function as3722_gpio_pin_get
	.p2align	2
_as3722_gpio_pin_get:                   ; @as3722_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	x19, x2
	mov	x20, x1
	bl	_device_get_softc
	ldr	x8, [x0]
	cmp	x8, x20
	b.ls	LBB0_4
; %bb.1:
	mov	x21, x0
	bl	_GPIO_LOCK
	ldr	x8, [x21, #8]
	ldr	x8, [x8, x20, lsl #3]
	ldr	w23, [x8]
Lloh0:
	adrp	x8, _AS3722_GPIO_MODE_SHIFT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _AS3722_GPIO_MODE_SHIFT@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	asr	w8, w23, w8
Lloh3:
	adrp	x9, _AS3722_GPIO_MODE_MASK@GOTPAGE
Lloh4:
	ldr	x9, [x9, _AS3722_GPIO_MODE_MASK@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	and	w8, w8, w9
Lloh6:
	adrp	x9, _AS3722_MODE_PUSH_PULL@GOTPAGE
Lloh7:
	ldr	x9, [x9, _AS3722_MODE_PUSH_PULL@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
Lloh9:
	adrp	x10, _AS3722_MODE_PUSH_PULL_LV@GOTPAGE
Lloh10:
	ldr	x10, [x10, _AS3722_MODE_PUSH_PULL_LV@GOTPAGEOFF]
Lloh11:
	ldr	w10, [x10]
	cmp	w8, w10
	ccmp	w8, w9, #4, ne
Lloh12:
	adrp	x8, _AS3722_GPIO_SIGNAL_OUT@GOTPAGE
Lloh13:
	ldr	x8, [x8, _AS3722_GPIO_SIGNAL_OUT@GOTPAGEOFF]
Lloh14:
	adrp	x9, _AS3722_GPIO_SIGNAL_IN@GOTPAGE
Lloh15:
	ldr	x9, [x9, _AS3722_GPIO_SIGNAL_IN@GOTPAGEOFF]
	csel	x8, x8, x9, eq
	ldr	w1, [x8]
	add	x2, sp, #12
	mov	x0, x21
	bl	_RD1
	mov	x22, x0
	mov	x0, x21
	bl	_GPIO_UNLOCK
	cbnz	w22, LBB0_5
; %bb.2:
	ldr	w8, [sp, #12]
	lsr	x8, x8, x20
	and	x8, x8, #0x1
	str	x8, [x19]
Lloh16:
	adrp	x9, _AS3722_GPIO_INVERT@GOTPAGE
Lloh17:
	ldr	x9, [x9, _AS3722_GPIO_INVERT@GOTPAGEOFF]
Lloh18:
	ldr	w9, [x9]
	tst	w9, w23
	b.eq	LBB0_6
; %bb.3:
	mov	w22, #0
	eor	x8, x8, #0x1
	str	x8, [x19]
	b	LBB0_5
LBB0_4:
Lloh19:
	adrp	x8, _EINVAL@GOTPAGE
Lloh20:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh21:
	ldr	w22, [x8]
LBB0_5:
	mov	x0, x22
	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_6:
	mov	w22, #0
	b	LBB0_5
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_AS3722_GPIO_MODE_SHIFT,4,2     ; @AS3722_GPIO_MODE_SHIFT
	.comm	_AS3722_GPIO_MODE_MASK,4,2      ; @AS3722_GPIO_MODE_MASK
	.comm	_AS3722_MODE_PUSH_PULL,4,2      ; @AS3722_MODE_PUSH_PULL
	.comm	_AS3722_MODE_PUSH_PULL_LV,4,2   ; @AS3722_MODE_PUSH_PULL_LV
	.comm	_AS3722_GPIO_SIGNAL_OUT,4,2     ; @AS3722_GPIO_SIGNAL_OUT
	.comm	_AS3722_GPIO_SIGNAL_IN,4,2      ; @AS3722_GPIO_SIGNAL_IN
	.comm	_AS3722_GPIO_INVERT,4,2         ; @AS3722_GPIO_INVERT
.subsections_via_symbols
