	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function nv10_gpio_sense
_nv10_gpio_sense:                       ## @nv10_gpio_sense
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movl	%esi, %ebx
	cmpl	$1, %esi
	jg	LBB0_2
## %bb.1:
	shll	$4, %ebx
	movl	$6293528, %esi                  ## imm = 0x600818
	callq	_nv_rd32
	movl	%ebx, %ecx
	sarl	%cl, %eax
	shrl	$8, %eax
	andl	$1, %eax
	jmp	LBB0_8
LBB0_2:
	cmpl	$9, %ebx
	ja	LBB0_5
## %bb.3:
	shll	$2, %ebx
	movl	$6293532, %esi                  ## imm = 0x60081C
	callq	_nv_rd32
	addb	$-8, %bl
	jmp	LBB0_4
LBB0_5:
	cmpl	$13, %ebx
	ja	LBB0_7
## %bb.6:
	shll	$2, %ebx
	movl	$6293584, %esi                  ## imm = 0x600850
	callq	_nv_rd32
	addb	$-40, %bl
LBB0_4:
	movl	%ebx, %ecx
	sarl	%cl, %eax
	shrl	$2, %eax
	andl	$1, %eax
	jmp	LBB0_8
LBB0_7:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_8:
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_nv10_gpio_sense
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function nv10_gpio_sense
_nv10_gpio_sense:                       ; @nv10_gpio_sense
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	cmp	w1, #1
	b.gt	LBB0_2
; %bb.1:
	lsl	w19, w1, #4
	mov	w1, #2072
	movk	w1, #96, lsl #16
	bl	_nv_rd32
	asr	w8, w0, w19
	ubfx	w0, w8, #8, #1
	b	LBB0_8
LBB0_2:
	cmp	w1, #9
	b.hi	LBB0_4
; %bb.3:
	lsl	w8, w1, #2
	sub	w19, w8, #8
	mov	w8, #2072
	movk	w8, #96, lsl #16
	orr	w1, w8, #0x4
	b	LBB0_6
LBB0_4:
	cmp	w1, #13
	b.hi	LBB0_7
; %bb.5:
	lsl	w8, w1, #2
	sub	w19, w8, #40
	mov	w8, #2072
	movk	w8, #96, lsl #16
	add	w1, w8, #56
LBB0_6:
	bl	_nv_rd32
	asr	w8, w0, w19
	ubfx	w0, w8, #2, #1
	b	LBB0_8
LBB0_7:
Lloh0:
	adrp	x8, _EINVAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_8:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_nv10_gpio_sense
.subsections_via_symbols
