	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function aw_nmi_attach
_aw_nmi_attach:                         ## @aw_nmi_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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edi, %r14d
	callq	_device_get_softc
	movq	%rax, %rbx
	movl	%r14d, 40(%rax)
	movq	_compat_data@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%r14d, %edi
	callq	_ofw_bus_search_compatible
	movq	(%rax), %rax
	movq	%rax, 48(%rbx)
	movq	_aw_nmi_res_spec@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	movq	(%rbx), %rdx
	movl	%r14d, %edi
	callq	_bus_alloc_resources
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	leaq	L_.str(%rip), %rsi
	movl	%r14d, %edi
	callq	_device_printf
	jmp	LBB0_9
LBB0_2:
	movq	(%rbx), %rax
	movl	4(%rax), %esi
	movq	_INTR_TYPE_MISC@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_aw_nmi_intr@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	leaq	8(%rbx), %rax
	movq	%rax, (%rsp)
	movl	%r14d, %edi
	xorl	%r8d, %r8d
	movq	%rbx, %r9
	callq	_bus_setup_intr
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:
	leaq	L_.str.1(%rip), %rsi
	movl	%r14d, %edi
	callq	_device_printf
	movl	(%r15), %esi
	jmp	LBB0_8
LBB0_4:
	movq	48(%rbx), %rax
	movl	4(%rax), %esi
	movq	_NMI_IRQ_ENABLE@GOTPCREL(%rip), %rax
	xorl	%edx, %edx
	cmpl	$0, (%rax)
	sete	%dl
	movq	%rbx, %rdi
	callq	_SC_NMI_WRITE
	movq	48(%rbx), %rax
	movl	(%rax), %esi
	movq	_NMI_IRQ_ACK@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	callq	_SC_NMI_WRITE
	movl	%r14d, %edi
	callq	_ofw_bus_get_node
	movl	%eax, %edi
	callq	_OF_xref_from_node
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movq	$0, 16(%rbx)
	movq	_INTR_POLARITY_CONFORM@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 32(%rbx)
	movq	_INTR_TRIGGER_CONFORM@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 28(%rbx)
	movq	%rbx, %r13
	addq	$24, %r13
	movl	40(%rbx), %r15d
	movl	%r15d, %edi
	callq	_device_get_nameunit
	movq	16(%rbx), %r9
	leaq	L_.str.2(%rip), %rcx
	xorl	%r12d, %r12d
	movq	%r13, %rdi
	movl	%r15d, %esi
	xorl	%edx, %edx
	movl	%eax, %r8d
	callq	_intr_isrc_register
	testq	%rax, %rax
	je	LBB0_5
LBB0_7:
	movq	(%rbx), %rax
	movl	4(%rax), %esi
	movl	8(%rbx), %edx
	movl	%r14d, %edi
	callq	_bus_teardown_intr
	movq	_aw_nmi_res_spec@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
LBB0_8:
	movq	(%rbx), %rdx
	movl	%r14d, %edi
	callq	_bus_release_resources
LBB0_9:
	movq	_ENXIO@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
LBB0_10:
	movl	%r12d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	movl	%r14d, %edi
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
	callq	_intr_pic_register
	testq	%rax, %rax
	jne	LBB0_10
## %bb.6:
	leaq	L_.str.3(%rip), %rsi
	movl	%r14d, %edi
	callq	_device_printf
	jmp	LBB0_7
	.cfi_endproc
                                        ## -- End function
	.comm	_compat_data,4,2                ## @compat_data
	.comm	_aw_nmi_res_spec,4,2            ## @aw_nmi_res_spec
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"can't allocate device resources\n"

	.comm	_ENXIO,4,2                      ## @ENXIO
	.comm	_INTR_TYPE_MISC,4,2             ## @INTR_TYPE_MISC
	.comm	_aw_nmi_intr,4,2                ## @aw_nmi_intr
L_.str.1:                               ## @.str.1
	.asciz	"unable to register interrupt handler\n"

	.comm	_NMI_IRQ_ENABLE,4,2             ## @NMI_IRQ_ENABLE
	.comm	_NMI_IRQ_ACK,4,2                ## @NMI_IRQ_ACK
	.comm	_INTR_POLARITY_CONFORM,4,2      ## @INTR_POLARITY_CONFORM
	.comm	_INTR_TRIGGER_CONFORM,4,2       ## @INTR_TRIGGER_CONFORM
L_.str.2:                               ## @.str.2
	.asciz	"%s,%u"

L_.str.3:                               ## @.str.3
	.asciz	"could not register pic\n"

	.no_dead_strip	_aw_nmi_attach
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function aw_nmi_attach
_aw_nmi_attach:                         ; @aw_nmi_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
	bl	_device_get_softc
	mov	x20, x0
	str	w19, [x0, #40]
Lloh0:
	adrp	x8, _compat_data@GOTPAGE
Lloh1:
	ldr	x8, [x8, _compat_data@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_ofw_bus_search_compatible
	ldr	x8, [x0]
	str	x8, [x20, #48]
Lloh3:
	adrp	x24, _aw_nmi_res_spec@GOTPAGE
Lloh4:
	ldr	x24, [x24, _aw_nmi_res_spec@GOTPAGEOFF]
	ldr	w1, [x24]
	ldr	x2, [x20]
	mov	x0, x19
	bl	_bus_alloc_resources
	cbz	x0, LBB0_2
; %bb.1:
Lloh5:
	adrp	x1, l_.str@PAGE
Lloh6:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_device_printf
	b	LBB0_7
LBB0_2:
	mov	x6, x20
	ldr	x8, [x6], #8
	ldr	w1, [x8, #4]
Lloh7:
	adrp	x8, _INTR_TYPE_MISC@GOTPAGE
Lloh8:
	ldr	x8, [x8, _INTR_TYPE_MISC@GOTPAGEOFF]
Lloh9:
	ldr	w2, [x8]
Lloh10:
	adrp	x8, _aw_nmi_intr@GOTPAGE
Lloh11:
	ldr	x8, [x8, _aw_nmi_intr@GOTPAGEOFF]
Lloh12:
	ldr	w3, [x8]
	mov	x0, x19
	mov	x4, #0
	mov	x5, x20
	bl	_bus_setup_intr
	cbz	x0, LBB0_4
; %bb.3:
Lloh13:
	adrp	x1, l_.str.1@PAGE
Lloh14:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_device_printf
	b	LBB0_6
LBB0_4:
	ldr	x8, [x20, #48]
	ldr	w1, [x8, #4]
Lloh15:
	adrp	x8, _NMI_IRQ_ENABLE@GOTPAGE
Lloh16:
	ldr	x8, [x8, _NMI_IRQ_ENABLE@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
	cmp	w8, #0
	cset	w2, eq
	mov	x0, x20
	bl	_SC_NMI_WRITE
	ldr	x8, [x20, #48]
	ldr	w1, [x8]
Lloh18:
	adrp	x8, _NMI_IRQ_ACK@GOTPAGE
Lloh19:
	ldr	x8, [x8, _NMI_IRQ_ACK@GOTPAGEOFF]
Lloh20:
	ldr	w2, [x8]
	mov	x0, x20
	bl	_SC_NMI_WRITE
	mov	x0, x19
	bl	_ofw_bus_get_node
	bl	_OF_xref_from_node
	mov	x21, x0
	str	xzr, [x20, #16]
Lloh21:
	adrp	x8, _INTR_POLARITY_CONFORM@GOTPAGE
Lloh22:
	ldr	x8, [x8, _INTR_POLARITY_CONFORM@GOTPAGEOFF]
Lloh23:
	adrp	x9, _INTR_TRIGGER_CONFORM@GOTPAGE
Lloh24:
	ldr	x9, [x9, _INTR_TRIGGER_CONFORM@GOTPAGEOFF]
Lloh25:
	ldr	w8, [x8]
Lloh26:
	ldr	w9, [x9]
	stp	w9, w8, [x20, #28]
	add	x22, x20, #24
	ldr	w23, [x20, #40]
	mov	x0, x23
	bl	_device_get_nameunit
	mov	x4, x0
	ldr	x5, [x20, #16]
Lloh27:
	adrp	x3, l_.str.2@PAGE
Lloh28:
	add	x3, x3, l_.str.2@PAGEOFF
	mov	x0, x22
	mov	x1, x23
	mov	w2, #0
	bl	_intr_isrc_register
	cbz	x0, LBB0_9
LBB0_5:
	ldr	x8, [x20]
	ldr	w1, [x8, #4]
	ldr	w2, [x20, #8]
	mov	x0, x19
	bl	_bus_teardown_intr
LBB0_6:
	ldr	w1, [x24]
	ldr	x2, [x20]
	mov	x0, x19
	bl	_bus_release_resources
LBB0_7:
Lloh29:
	adrp	x8, _ENXIO@GOTPAGE
Lloh30:
	ldr	x8, [x8, _ENXIO@GOTPAGEOFF]
Lloh31:
	ldr	w0, [x8]
LBB0_8:
	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
LBB0_9:
	mov	x0, x19
	mov	x1, x21
	bl	_intr_pic_register
	cbz	x0, LBB0_11
; %bb.10:
	mov	w0, #0
	b	LBB0_8
LBB0_11:
Lloh32:
	adrp	x1, l_.str.3@PAGE
Lloh33:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x19
	bl	_device_printf
	b	LBB0_5
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpAdd	Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh26
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh25
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpAdd	Lloh32, Lloh33
	.cfi_endproc
                                        ; -- End function
	.comm	_compat_data,4,2                ; @compat_data
	.comm	_aw_nmi_res_spec,4,2            ; @aw_nmi_res_spec
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"can't allocate device resources\n"

	.comm	_ENXIO,4,2                      ; @ENXIO
	.comm	_INTR_TYPE_MISC,4,2             ; @INTR_TYPE_MISC
	.comm	_aw_nmi_intr,4,2                ; @aw_nmi_intr
l_.str.1:                               ; @.str.1
	.asciz	"unable to register interrupt handler\n"

	.comm	_NMI_IRQ_ENABLE,4,2             ; @NMI_IRQ_ENABLE
	.comm	_NMI_IRQ_ACK,4,2                ; @NMI_IRQ_ACK
	.comm	_INTR_POLARITY_CONFORM,4,2      ; @INTR_POLARITY_CONFORM
	.comm	_INTR_TRIGGER_CONFORM,4,2       ; @INTR_TRIGGER_CONFORM
l_.str.2:                               ; @.str.2
	.asciz	"%s,%u"

l_.str.3:                               ; @.str.3
	.asciz	"could not register pic\n"

	.no_dead_strip	_aw_nmi_attach
.subsections_via_symbols
