	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function tegra_gpio_pic_setup_intr
_tegra_gpio_pic_setup_intr:             ## @tegra_gpio_pic_setup_intr
	.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	%rcx, %rbx
	movq	%rsi, %r14
	movl	%edi, %r12d
	callq	_device_get_softc
	testq	%rbx, %rbx
	je	LBB0_8
## %bb.1:
	movq	%rax, %r15
	movq	(%rbx), %rax
	movq	_INTR_MAP_DATA_FDT@GOTPCREL(%rip), %rcx
	movq	%rax, %rdx
	shrq	$32, %rdx
	cmpq	(%rcx), %rax
	jne	LBB0_3
## %bb.2:
	leaq	-36(%rbp), %rcx
	leaq	-48(%rbp), %r8
	movq	%r15, %rdi
	movl	%edx, %esi
	movl	%eax, %edx
	callq	_tegra_gpio_pic_map_fdt
	testl	%eax, %eax
	jne	LBB0_7
	jmp	LBB0_5
LBB0_3:
	movq	_INTR_MAP_DATA_GPIO@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_8
## %bb.4:
	movl	8(%rbx), %esi
	leaq	-36(%rbp), %r8
	leaq	-48(%rbp), %r9
	movq	%r15, %rdi
                                        ## kill: def $edx killed $edx killed $rdx
	movl	%eax, %ecx
	callq	_tegra_gpio_pic_map_gpio
	testl	%eax, %eax
	jne	LBB0_7
LBB0_5:
	movq	(%r14), %rdx
	movq	-48(%rbp), %rcx
	testq	%rdx, %rdx
	je	LBB0_11
## %bb.6:
	xorl	%eax, %eax
	cmpq	%rcx, %rdx
	je	LBB0_10
LBB0_7:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	jmp	LBB0_9
LBB0_8:
	movq	_ENOTSUP@GOTPCREL(%rip), %rax
LBB0_9:
	movl	(%rax), %eax
LBB0_10:
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_11:
	movq	%rcx, (%r14)
	movq	_GPIO_INT_LVL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_GPIO_INT_LVL_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	movq	%r15, %rdi
	movq	%r14, %rdx
	callq	_intr_write_modify
	movl	%r12d, %edi
	movq	%r14, %rsi
	callq	_tegra_gpio_pic_enable_intr
	xorl	%eax, %eax
	jmp	LBB0_10
	.cfi_endproc
                                        ## -- End function
	.comm	_ENOTSUP,4,2                    ## @ENOTSUP
	.comm	_INTR_MAP_DATA_FDT,8,3          ## @INTR_MAP_DATA_FDT
	.comm	_INTR_MAP_DATA_GPIO,8,3         ## @INTR_MAP_DATA_GPIO
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_GPIO_INT_LVL,4,2               ## @GPIO_INT_LVL
	.comm	_GPIO_INT_LVL_MASK,4,2          ## @GPIO_INT_LVL_MASK
	.no_dead_strip	_tegra_gpio_pic_setup_intr
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function tegra_gpio_pic_setup_intr
_tegra_gpio_pic_setup_intr:             ; @tegra_gpio_pic_setup_intr
	.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	x22, x3
	mov	x19, x1
	mov	x20, x0
	bl	_device_get_softc
	cbz	x22, LBB0_8
; %bb.1:
	mov	x21, x0
	ldr	x8, [x22]
Lloh0:
	adrp	x9, _INTR_MAP_DATA_FDT@GOTPAGE
Lloh1:
	ldr	x9, [x9, _INTR_MAP_DATA_FDT@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	lsr	x2, x8, #32
	cmp	x8, x9
	b.ne	LBB0_4
; %bb.2:
	add	x3, sp, #12
	mov	x4, sp
	mov	x0, x21
	mov	x1, x2
	mov	x2, x8
	bl	_tegra_gpio_pic_map_fdt
	cbz	w0, LBB0_6
LBB0_3:
Lloh3:
	adrp	x8, _EINVAL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_9
LBB0_4:
Lloh5:
	adrp	x9, _INTR_MAP_DATA_GPIO@GOTPAGE
Lloh6:
	ldr	x9, [x9, _INTR_MAP_DATA_GPIO@GOTPAGEOFF]
Lloh7:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_8
; %bb.5:
	ldr	w1, [x22, #8]
	add	x4, sp, #12
	mov	x5, sp
	mov	x0, x21
                                        ; kill: def $w2 killed $w2 killed $x2
	mov	x3, x8
	bl	_tegra_gpio_pic_map_gpio
	cbnz	w0, LBB0_3
LBB0_6:
	ldr	x8, [x19]
	ldr	x3, [sp]
	cbz	x8, LBB0_11
; %bb.7:
Lloh8:
	adrp	x9, _EINVAL@GOTPAGE
Lloh9:
	ldr	x9, [x9, _EINVAL@GOTPAGEOFF]
Lloh10:
	ldr	w9, [x9]
	cmp	x8, x3
	csel	w0, wzr, w9, eq
	b	LBB0_10
LBB0_8:
Lloh11:
	adrp	x8, _ENOTSUP@GOTPAGE
Lloh12:
	ldr	x8, [x8, _ENOTSUP@GOTPAGEOFF]
LBB0_9:
	ldr	w0, [x8]
LBB0_10:
	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
LBB0_11:
	str	x3, [x19]
Lloh13:
	adrp	x8, _GPIO_INT_LVL@GOTPAGE
Lloh14:
	ldr	x8, [x8, _GPIO_INT_LVL@GOTPAGEOFF]
Lloh15:
	ldr	w1, [x8]
Lloh16:
	adrp	x8, _GPIO_INT_LVL_MASK@GOTPAGE
Lloh17:
	ldr	x8, [x8, _GPIO_INT_LVL_MASK@GOTPAGEOFF]
Lloh18:
	ldr	w4, [x8]
	mov	x0, x21
	mov	x2, x19
	bl	_intr_write_modify
	mov	x0, x20
	mov	x1, x19
	bl	_tegra_gpio_pic_enable_intr
	mov	w0, #0
	b	LBB0_10
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_ENOTSUP,4,2                    ; @ENOTSUP
	.comm	_INTR_MAP_DATA_FDT,8,3          ; @INTR_MAP_DATA_FDT
	.comm	_INTR_MAP_DATA_GPIO,8,3         ; @INTR_MAP_DATA_GPIO
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_GPIO_INT_LVL,4,2               ; @GPIO_INT_LVL
	.comm	_GPIO_INT_LVL_MASK,4,2          ; @GPIO_INT_LVL_MASK
	.no_dead_strip	_tegra_gpio_pic_setup_intr
.subsections_via_symbols
