	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function chv_gpio_get_direction
_chv_gpio_get_direction:                ## @chv_gpio_get_direction
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r14d
	callq	_gpiochip_get_data
	movq	%rax, %rbx
	movq	_chv_lock@GOTPCREL(%rip), %r15
	movq	%r15, %rdi
	callq	_raw_spin_lock_irqsave
	movq	_CHV_PADCTRL0@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	movl	%r14d, %esi
	callq	_chv_padreg
	movl	%eax, %edi
	callq	_readl
	movl	%eax, %ebx
	movq	%r15, %rdi
	callq	_raw_spin_unlock_irqrestore
	movq	_CHV_PADCTRL0_GPIOCFG_MASK@GOTPCREL(%rip), %rax
	andl	(%rax), %ebx
	movq	_CHV_PADCTRL0_GPIOCFG_SHIFT@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	sarl	%cl, %ebx
	movq	_CHV_PADCTRL0_GPIOCFG_GPO@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	cmpl	(%rcx), %ebx
	setne	%al
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_chv_lock,4,2                   ## @chv_lock
	.comm	_CHV_PADCTRL0,4,2               ## @CHV_PADCTRL0
	.comm	_CHV_PADCTRL0_GPIOCFG_MASK,4,2  ## @CHV_PADCTRL0_GPIOCFG_MASK
	.comm	_CHV_PADCTRL0_GPIOCFG_SHIFT,4,2 ## @CHV_PADCTRL0_GPIOCFG_SHIFT
	.comm	_CHV_PADCTRL0_GPIOCFG_GPO,4,2   ## @CHV_PADCTRL0_GPIOCFG_GPO
	.no_dead_strip	_chv_gpio_get_direction
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function chv_gpio_get_direction
_chv_gpio_get_direction:                ; @chv_gpio_get_direction
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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	x19, x1
	bl	_gpiochip_get_data
	mov	x20, x0
Lloh0:
	adrp	x21, _chv_lock@GOTPAGE
Lloh1:
	ldr	x21, [x21, _chv_lock@GOTPAGEOFF]
	mov	x0, x21
	bl	_raw_spin_lock_irqsave
Lloh2:
	adrp	x8, _CHV_PADCTRL0@GOTPAGE
Lloh3:
	ldr	x8, [x8, _CHV_PADCTRL0@GOTPAGEOFF]
Lloh4:
	ldr	w2, [x8]
	mov	x0, x20
	mov	x1, x19
	bl	_chv_padreg
	bl	_readl
	mov	x19, x0
	mov	x0, x21
	bl	_raw_spin_unlock_irqrestore
Lloh5:
	adrp	x8, _CHV_PADCTRL0_GPIOCFG_MASK@GOTPAGE
Lloh6:
	ldr	x8, [x8, _CHV_PADCTRL0_GPIOCFG_MASK@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	and	w8, w8, w19
Lloh8:
	adrp	x9, _CHV_PADCTRL0_GPIOCFG_SHIFT@GOTPAGE
Lloh9:
	ldr	x9, [x9, _CHV_PADCTRL0_GPIOCFG_SHIFT@GOTPAGEOFF]
Lloh10:
	ldr	w9, [x9]
	asr	w8, w8, w9
Lloh11:
	adrp	x9, _CHV_PADCTRL0_GPIOCFG_GPO@GOTPAGE
Lloh12:
	ldr	x9, [x9, _CHV_PADCTRL0_GPIOCFG_GPO@GOTPAGEOFF]
Lloh13:
	ldr	w9, [x9]
	cmp	w8, w9
	cset	w0, ne
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_chv_lock,4,2                   ; @chv_lock
	.comm	_CHV_PADCTRL0,4,2               ; @CHV_PADCTRL0
	.comm	_CHV_PADCTRL0_GPIOCFG_MASK,4,2  ; @CHV_PADCTRL0_GPIOCFG_MASK
	.comm	_CHV_PADCTRL0_GPIOCFG_SHIFT,4,2 ; @CHV_PADCTRL0_GPIOCFG_SHIFT
	.comm	_CHV_PADCTRL0_GPIOCFG_GPO,4,2   ; @CHV_PADCTRL0_GPIOCFG_GPO
	.no_dead_strip	_chv_gpio_get_direction
.subsections_via_symbols
