	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function tegra_pcib_msi_attach
_tegra_pcib_msi_attach:                 ## @tegra_pcib_msi_attach
	.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	%rdi, %r15
	movq	_TEGRA_PCIB_MAX_MSI@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edi
	shll	$3, %edi
	movq	_M_DEVBUF@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_M_WAITOK@GOTPCREL(%rip), %rax
	movq	_M_ZERO@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	orl	(%rax), %edx
	callq	_malloc
	movq	%rax, 8(%r15)
	movl	(%r15), %edi
	callq	_device_get_nameunit
	cmpl	$0, (%rbx)
	jle	LBB0_4
## %bb.1:
	movq	%rax, %r14
	movl	$4, %r13d
	xorl	%ebx, %ebx
	leaq	L_.str(%rip), %r12
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	8(%r15), %rdi
	movl	%ebx, (%rdi,%rbx,8)
	addq	%r13, %rdi
	movl	(%r15), %esi
	xorl	%edx, %edx
	movq	%r12, %rcx
	movq	%r14, %r8
	movl	%ebx, %r9d
	callq	_intr_isrc_register
	testl	%eax, %eax
	jne	LBB0_6
## %bb.2:                               ##   in Loop: Header=BB0_3 Depth=1
	incq	%rbx
	movq	_TEGRA_PCIB_MAX_MSI@GOTPCREL(%rip), %rax
	movslq	(%rax), %rax
	addq	$8, %r13
	cmpq	%rax, %rbx
	jl	LBB0_3
LBB0_4:
	movl	(%r15), %ebx
	movl	%ebx, %edi
	callq	_ofw_bus_get_node
	movl	%eax, %edi
	callq	_OF_xref_from_node
	movl	%ebx, %edi
	movl	%eax, %esi
	callq	_intr_msi_register
	movq	%rax, %rcx
	xorl	%eax, %eax
	testq	%rcx, %rcx
	je	LBB0_6
## %bb.5:
	movq	_ENXIO@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_6:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_TEGRA_PCIB_MAX_MSI,4,2         ## @TEGRA_PCIB_MAX_MSI
	.comm	_M_DEVBUF,4,2                   ## @M_DEVBUF
	.comm	_M_WAITOK,4,2                   ## @M_WAITOK
	.comm	_M_ZERO,4,2                     ## @M_ZERO
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%s,%u"

	.comm	_ENXIO,4,2                      ## @ENXIO
	.no_dead_strip	_tegra_pcib_msi_attach
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function tegra_pcib_msi_attach
_tegra_pcib_msi_attach:                 ; @tegra_pcib_msi_attach
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x19, x0
Lloh0:
	adrp	x23, _TEGRA_PCIB_MAX_MSI@GOTPAGE
Lloh1:
	ldr	x23, [x23, _TEGRA_PCIB_MAX_MSI@GOTPAGEOFF]
	ldr	w8, [x23]
	lsl	w0, w8, #3
Lloh2:
	adrp	x8, _M_DEVBUF@GOTPAGE
Lloh3:
	ldr	x8, [x8, _M_DEVBUF@GOTPAGEOFF]
Lloh4:
	adrp	x9, _M_WAITOK@GOTPAGE
Lloh5:
	ldr	x9, [x9, _M_WAITOK@GOTPAGEOFF]
Lloh6:
	ldr	w1, [x8]
Lloh7:
	ldr	w8, [x9]
Lloh8:
	adrp	x9, _M_ZERO@GOTPAGE
Lloh9:
	ldr	x9, [x9, _M_ZERO@GOTPAGEOFF]
Lloh10:
	ldr	w9, [x9]
	orr	w2, w9, w8
	bl	_malloc
	str	x0, [x19, #8]
	ldr	w0, [x19]
	bl	_device_get_nameunit
	ldr	w8, [x23]
	cmp	w8, #1
	b.lt	LBB0_4
; %bb.1:
	mov	x20, x0
	mov	x24, #0
	mov	x21, #0
Lloh11:
	adrp	x22, l_.str@PAGE
Lloh12:
	add	x22, x22, l_.str@PAGEOFF
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19, #8]
	add	x0, x8, x24
	str	w21, [x0], #4
	ldr	w1, [x19]
	mov	w2, #0
	mov	x3, x22
	mov	x4, x20
	mov	x5, x21
	bl	_intr_isrc_register
	cbnz	w0, LBB0_5
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	add	x21, x21, #1
	ldrsw	x8, [x23]
	add	x24, x24, #8
	cmp	x21, x8
	b.lt	LBB0_2
LBB0_4:
	ldr	w19, [x19]
	mov	x0, x19
	bl	_ofw_bus_get_node
	bl	_OF_xref_from_node
	mov	x1, x0
	mov	x0, x19
	bl	_intr_msi_register
Lloh13:
	adrp	x8, _ENXIO@GOTPAGE
Lloh14:
	ldr	x8, [x8, _ENXIO@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
	cmp	x0, #0
	csel	w0, wzr, w8, eq
LBB0_5:
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh6
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_TEGRA_PCIB_MAX_MSI,4,2         ; @TEGRA_PCIB_MAX_MSI
	.comm	_M_DEVBUF,4,2                   ; @M_DEVBUF
	.comm	_M_WAITOK,4,2                   ; @M_WAITOK
	.comm	_M_ZERO,4,2                     ; @M_ZERO
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%s,%u"

	.comm	_ENXIO,4,2                      ; @ENXIO
	.no_dead_strip	_tegra_pcib_msi_attach
.subsections_via_symbols
