	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function tegra_gpio_intr
_tegra_gpio_intr:                       ## @tegra_gpio_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	%r13
	pushq	%r12
	pushq	%rbx
	subq	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, -56(%rbp)                 ## 8-byte Spill
	movq	_GPIO_REGS_IN_BANK@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	testl	%r15d, %r15d
	jle	LBB0_14
## %bb.1:
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	8(%rax), %rbx
	movq	_curthread@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	(%rax), %rax
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	movq	_GPIO_PINS_IN_REG@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	xorl	%r12d, %r12d
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_12:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	-64(%rbp), %r12                 ## 8-byte Reload
LBB0_13:                                ##   in Loop: Header=BB0_2 Depth=1
	incl	%r12d
	movq	_GPIO_REGS_IN_BANK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r15d
	cmpl	%r15d, %r12d
	jge	LBB0_14
LBB0_2:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_4 Depth 2
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	imull	(%rcx), %r15d
	addl	%r12d, %r15d
	imull	%eax, %r15d
	movl	16(%rbx), %r14d
	movq	_GPIO_INT_STA@GOTPCREL(%rip), %rax
	movq	(%rax), %r13
	movl	%r15d, %edi
	callq	_GPIO_REGNUM
	addq	%rax, %r13
	movl	%r14d, %edi
	movq	%r13, %rsi
	callq	_bus_read_4
	movl	%eax, -48(%rbp)                 ## 4-byte Spill
	movl	16(%rbx), %r14d
	movq	_GPIO_INT_ENB@GOTPCREL(%rip), %rax
	movq	(%rax), %r13
	movl	%r15d, %edi
	callq	_GPIO_REGNUM
	addq	%rax, %r13
	movl	%r14d, %edi
	movq	%r13, %rsi
	callq	_bus_read_4
	movl	%eax, %r14d
	movq	_GPIO_PINS_IN_REG@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, %eax
	jle	LBB0_13
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	%r12, -64(%rbp)                 ## 8-byte Spill
	andl	-48(%rbp), %r14d                ## 4-byte Folded Reload
	movq	%r15, -48(%rbp)                 ## 8-byte Spill
	movslq	%r15d, %r12
	shlq	$2, %r12
	xorl	%r15d, %r15d
	jmp	LBB0_4
	.p2align	4, 0x90
LBB0_10:                                ##   in Loop: Header=BB0_4 Depth=2
	movl	(%rbx), %edi
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	leal	(%rax,%r15), %edx
	leaq	L_.str(%rip), %rsi
	callq	_device_printf
LBB0_11:                                ##   in Loop: Header=BB0_4 Depth=2
	incq	%r15
	movq	_GPIO_PINS_IN_REG@GOTPCREL(%rip), %rax
	movslq	(%rax), %rax
	addq	$4, %r12
	cmpq	%rax, %r15
	jge	LBB0_12
LBB0_4:                                 ##   Parent Loop BB0_2 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	btl	%r15d, %r14d
	jae	LBB0_11
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=2
	movq	8(%rbx), %r13
	addq	%r12, %r13
	movq	%r13, %rdi
	callq	_tegra_gpio_isrc_is_level
	testq	%rax, %rax
	jne	LBB0_7
## %bb.6:                               ##   in Loop: Header=BB0_4 Depth=2
	movq	%rbx, %rdi
	movq	%r13, %rsi
	callq	_tegra_gpio_isrc_eoi
LBB0_7:                                 ##   in Loop: Header=BB0_4 Depth=2
	movq	%r13, %rdi
	movq	-72(%rbp), %rsi                 ## 8-byte Reload
	callq	_intr_isrc_dispatch
	testq	%rax, %rax
	je	LBB0_11
## %bb.8:                               ##   in Loop: Header=BB0_4 Depth=2
	movq	%rbx, %rdi
	movq	%r13, %rsi
	xorl	%edx, %edx
	callq	_tegra_gpio_isrc_mask
	movq	%r13, %rdi
	callq	_tegra_gpio_isrc_is_level
	testq	%rax, %rax
	je	LBB0_10
## %bb.9:                               ##   in Loop: Header=BB0_4 Depth=2
	movq	%rbx, %rdi
	movq	%r13, %rsi
	callq	_tegra_gpio_isrc_eoi
	jmp	LBB0_10
LBB0_14:
	movq	_FILTER_HANDLED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_curthread,8,3                  ## @curthread
	.comm	_GPIO_REGS_IN_BANK,4,2          ## @GPIO_REGS_IN_BANK
	.comm	_GPIO_PINS_IN_REG,4,2           ## @GPIO_PINS_IN_REG
	.comm	_GPIO_INT_STA,8,3               ## @GPIO_INT_STA
	.comm	_GPIO_INT_ENB,8,3               ## @GPIO_INT_ENB
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Stray irq %u disabled\n"

	.comm	_FILTER_HANDLED,4,2             ## @FILTER_HANDLED
	.no_dead_strip	_tegra_gpio_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_intr
_tegra_gpio_intr:                       ; @tegra_gpio_intr
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	str	x0, [sp, #8]                    ; 8-byte Folded Spill
Lloh0:
	adrp	x8, _GPIO_REGS_IN_BANK@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GPIO_REGS_IN_BANK@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w8, #1
	b.lt	LBB0_14
; %bb.1:
	mov	w27, #0
Lloh3:
	adrp	x9, _curthread@GOTPAGE
Lloh4:
	ldr	x9, [x9, _curthread@GOTPAGEOFF]
	ldr	x10, [sp, #8]                   ; 8-byte Folded Reload
	ldr	x20, [x10, #8]
Lloh5:
	ldr	x9, [x9]
	ldr	x21, [x9]
Lloh6:
	adrp	x28, _GPIO_PINS_IN_REG@GOTPAGE
Lloh7:
	ldr	x28, [x28, _GPIO_PINS_IN_REG@GOTPAGEOFF]
	ldr	w22, [x28]
	b	LBB0_4
LBB0_2:                                 ;   in Loop: Header=BB0_4 Depth=1
	mov	x22, x8
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	add	w27, w27, #1
Lloh8:
	adrp	x8, _GPIO_REGS_IN_BANK@GOTPAGE
Lloh9:
	ldr	x8, [x8, _GPIO_REGS_IN_BANK@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	cmp	w27, w8
	b.ge	LBB0_14
LBB0_4:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_8 Depth 2
	ldr	x9, [sp, #8]                    ; 8-byte Folded Reload
	ldr	w9, [x9]
	mul	w19, w9, w8
	add	w8, w19, w27
	mul	w24, w8, w22
	ldr	w23, [x20, #16]
Lloh11:
	adrp	x8, _GPIO_INT_STA@GOTPAGE
Lloh12:
	ldr	x8, [x8, _GPIO_INT_STA@GOTPAGEOFF]
Lloh13:
	ldr	x25, [x8]
	mov	x0, x24
	bl	_GPIO_REGNUM
	add	x1, x0, x25
	mov	x0, x23
	bl	_bus_read_4
	mov	x23, x0
	ldr	w25, [x20, #16]
Lloh14:
	adrp	x8, _GPIO_INT_ENB@GOTPAGE
Lloh15:
	ldr	x8, [x8, _GPIO_INT_ENB@GOTPAGEOFF]
Lloh16:
	ldr	x26, [x8]
	mov	x0, x24
	bl	_GPIO_REGNUM
	add	x1, x0, x26
	mov	x0, x25
	bl	_bus_read_4
	ldr	w8, [x28]
	cmp	w8, #1
	b.lt	LBB0_2
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	x24, #0
	and	w25, w0, w23
	add	w8, w27, w19
	mul	w26, w22, w8
	mov	x8, x26
	sbfiz	x19, x8, #2, #32
	b	LBB0_8
LBB0_6:                                 ;   in Loop: Header=BB0_8 Depth=2
	ldr	w0, [x20]
	add	w2, w26, w24
Lloh17:
	adrp	x1, l_.str@PAGE
Lloh18:
	add	x1, x1, l_.str@PAGEOFF
	bl	_device_printf
LBB0_7:                                 ;   in Loop: Header=BB0_8 Depth=2
	add	x24, x24, #1
	ldrsw	x22, [x28]
	add	x19, x19, #4
	cmp	x24, x22
	b.ge	LBB0_3
LBB0_8:                                 ;   Parent Loop BB0_4 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	lsr	w8, w25, w24
	tbz	w8, #0, LBB0_7
; %bb.9:                                ;   in Loop: Header=BB0_8 Depth=2
	ldr	x8, [x20, #8]
	add	x23, x8, x19
	mov	x0, x23
	bl	_tegra_gpio_isrc_is_level
	cbnz	x0, LBB0_11
; %bb.10:                               ;   in Loop: Header=BB0_8 Depth=2
	mov	x0, x20
	mov	x1, x23
	bl	_tegra_gpio_isrc_eoi
LBB0_11:                                ;   in Loop: Header=BB0_8 Depth=2
	mov	x0, x23
	mov	x1, x21
	bl	_intr_isrc_dispatch
	cbz	x0, LBB0_7
; %bb.12:                               ;   in Loop: Header=BB0_8 Depth=2
	mov	x0, x20
	mov	x1, x23
	mov	w2, #0
	bl	_tegra_gpio_isrc_mask
	mov	x0, x23
	bl	_tegra_gpio_isrc_is_level
	cbz	x0, LBB0_6
; %bb.13:                               ;   in Loop: Header=BB0_8 Depth=2
	mov	x0, x20
	mov	x1, x23
	bl	_tegra_gpio_isrc_eoi
	b	LBB0_6
LBB0_14:
Lloh19:
	adrp	x8, _FILTER_HANDLED@GOTPAGE
Lloh20:
	ldr	x8, [x8, _FILTER_HANDLED@GOTPAGEOFF]
Lloh21:
	ldr	w0, [x8]
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.cfi_endproc
                                        ; -- End function
	.comm	_curthread,8,3                  ; @curthread
	.comm	_GPIO_REGS_IN_BANK,4,2          ; @GPIO_REGS_IN_BANK
	.comm	_GPIO_PINS_IN_REG,4,2           ; @GPIO_PINS_IN_REG
	.comm	_GPIO_INT_STA,8,3               ; @GPIO_INT_STA
	.comm	_GPIO_INT_ENB,8,3               ; @GPIO_INT_ENB
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Stray irq %u disabled\n"

	.comm	_FILTER_HANDLED,4,2             ; @FILTER_HANDLED
	.no_dead_strip	_tegra_gpio_intr
.subsections_via_symbols
