	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function madt_handle_local_nmi
_madt_handle_local_nmi:                 ## @madt_handle_local_nmi
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r15d
	movq	%rsi, %r14
	cmpl	$-1, %edi
	je	LBB0_1
## %bb.2:
	movl	%edi, %ebx
	leaq	-28(%rbp), %rsi
	callq	_madt_find_cpu
	testq	%rax, %rax
	je	LBB0_3
## %bb.6:
	movq	_bootverbose@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_13
## %bb.7:
	leaq	L_.str(%rip), %rdi
	movl	%ebx, %esi
	callq	_printf
	jmp	LBB0_13
LBB0_1:
	movq	_APIC_ID_ALL@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	%edi, -28(%rbp)
	testq	%r14, %r14
	jne	LBB0_5
LBB0_8:
	movq	_APIC_LVT_LINT0@GOTPCREL(%rip), %rax
	jmp	LBB0_9
LBB0_3:
	movl	-28(%rbp), %edi
	testq	%r14, %r14
	je	LBB0_8
LBB0_5:
	movq	_APIC_LVT_LINT1@GOTPCREL(%rip), %rax
LBB0_9:
	movl	(%rax), %r14d
	movq	_APIC_LVT_DM_NMI@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	%r14d, %esi
	callq	_lapic_set_lvt_mode
	movq	_ACPI_MADT_TRIGGER_CONFORMS@GOTPCREL(%rip), %rax
	testl	%r15d, (%rax)
	jne	LBB0_11
## %bb.10:
	movl	-28(%rbp), %ebx
	movl	%r15d, %edi
	xorl	%esi, %esi
	callq	_interrupt_trigger
	movl	%ebx, %edi
	movl	%r14d, %esi
	movl	%eax, %edx
	callq	_lapic_set_lvt_triggermode
LBB0_11:
	movq	_ACPI_MADT_POLARITY_CONFORMS@GOTPCREL(%rip), %rax
	testl	%r15d, (%rax)
	jne	LBB0_13
## %bb.12:
	movl	-28(%rbp), %ebx
	movl	%r15d, %edi
	xorl	%esi, %esi
	callq	_interrupt_polarity
	movl	%ebx, %edi
	movl	%r14d, %esi
	movl	%eax, %edx
	callq	_lapic_set_lvt_polarity
LBB0_13:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_APIC_ID_ALL,4,2                ## @APIC_ID_ALL
	.comm	_bootverbose,8,3                ## @bootverbose
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"MADT: Ignoring local NMI routed to ACPI CPU %u\n"

	.comm	_APIC_LVT_LINT0,4,2             ## @APIC_LVT_LINT0
	.comm	_APIC_LVT_LINT1,4,2             ## @APIC_LVT_LINT1
	.comm	_APIC_LVT_DM_NMI,4,2            ## @APIC_LVT_DM_NMI
	.comm	_ACPI_MADT_TRIGGER_CONFORMS,4,2 ## @ACPI_MADT_TRIGGER_CONFORMS
	.comm	_ACPI_MADT_POLARITY_CONFORMS,4,2 ## @ACPI_MADT_POLARITY_CONFORMS
	.no_dead_strip	_madt_handle_local_nmi
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function madt_handle_local_nmi
_madt_handle_local_nmi:                 ; @madt_handle_local_nmi
	.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	x19, x2
	mov	x20, x1
	cmn	w0, #1
	b.eq	LBB0_4
; %bb.1:
	mov	x21, x0
	add	x1, sp, #12
	bl	_madt_find_cpu
	cbz	x0, LBB0_5
; %bb.2:
Lloh0:
	adrp	x8, _bootverbose@GOTPAGE
Lloh1:
	ldr	x8, [x8, _bootverbose@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cbz	x8, LBB0_10
; %bb.3:
Lloh3:
	adrp	x0, l_.str@PAGE
Lloh4:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x21
	bl	_printf
	b	LBB0_10
LBB0_4:
Lloh5:
	adrp	x8, _APIC_ID_ALL@GOTPAGE
Lloh6:
	ldr	x8, [x8, _APIC_ID_ALL@GOTPAGEOFF]
Lloh7:
	ldr	w0, [x8]
	str	w0, [sp, #12]
	b	LBB0_6
LBB0_5:
	ldr	w0, [sp, #12]
LBB0_6:
Lloh8:
	adrp	x8, _APIC_LVT_LINT0@GOTPAGE
Lloh9:
	ldr	x8, [x8, _APIC_LVT_LINT0@GOTPAGEOFF]
Lloh10:
	adrp	x9, _APIC_LVT_LINT1@GOTPAGE
Lloh11:
	ldr	x9, [x9, _APIC_LVT_LINT1@GOTPAGEOFF]
	cmp	x20, #0
	csel	x8, x8, x9, eq
	ldr	w20, [x8]
Lloh12:
	adrp	x8, _APIC_LVT_DM_NMI@GOTPAGE
Lloh13:
	ldr	x8, [x8, _APIC_LVT_DM_NMI@GOTPAGEOFF]
Lloh14:
	ldr	w2, [x8]
	mov	x1, x20
	bl	_lapic_set_lvt_mode
Lloh15:
	adrp	x8, _ACPI_MADT_TRIGGER_CONFORMS@GOTPAGE
Lloh16:
	ldr	x8, [x8, _ACPI_MADT_TRIGGER_CONFORMS@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
	tst	w8, w19
	b.ne	LBB0_8
; %bb.7:
	ldr	w21, [sp, #12]
	mov	x0, x19
	mov	w1, #0
	bl	_interrupt_trigger
	mov	x2, x0
	mov	x0, x21
	mov	x1, x20
	bl	_lapic_set_lvt_triggermode
LBB0_8:
Lloh18:
	adrp	x8, _ACPI_MADT_POLARITY_CONFORMS@GOTPAGE
Lloh19:
	ldr	x8, [x8, _ACPI_MADT_POLARITY_CONFORMS@GOTPAGEOFF]
Lloh20:
	ldr	w8, [x8]
	tst	w8, w19
	b.ne	LBB0_10
; %bb.9:
	ldr	w21, [sp, #12]
	mov	x0, x19
	mov	w1, #0
	bl	_interrupt_polarity
	mov	x2, x0
	mov	x0, x21
	mov	x1, x20
	bl	_lapic_set_lvt_polarity
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
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
	.comm	_APIC_ID_ALL,4,2                ; @APIC_ID_ALL
	.comm	_bootverbose,8,3                ; @bootverbose
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"MADT: Ignoring local NMI routed to ACPI CPU %u\n"

	.comm	_APIC_LVT_LINT0,4,2             ; @APIC_LVT_LINT0
	.comm	_APIC_LVT_LINT1,4,2             ; @APIC_LVT_LINT1
	.comm	_APIC_LVT_DM_NMI,4,2            ; @APIC_LVT_DM_NMI
	.comm	_ACPI_MADT_TRIGGER_CONFORMS,4,2 ; @ACPI_MADT_TRIGGER_CONFORMS
	.comm	_ACPI_MADT_POLARITY_CONFORMS,4,2 ; @ACPI_MADT_POLARITY_CONFORMS
	.no_dead_strip	_madt_handle_local_nmi
.subsections_via_symbols
