	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function madt_parse_nmi
_madt_parse_nmi:                        ## @madt_parse_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
	subq	$24, %rsp
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movl	(%rdi), %edi
	leaq	-40(%rbp), %rsi
	leaq	-28(%rbp), %rdx
	callq	_madt_find_interrupt
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movl	(%rbx), %esi
	leaq	L_.str(%rip), %rdi
	callq	_printf
	jmp	LBB0_6
LBB0_2:
	movq	-40(%rbp), %rdi
	movl	-28(%rbp), %esi
	callq	_ioapic_set_nmi
	movl	4(%rbx), %edi
	movq	_ACPI_MADT_TRIGGER_CONFORMS@GOTPCREL(%rip), %rax
	testl	%edi, (%rax)
	jne	LBB0_4
## %bb.3:
	movq	-40(%rbp), %r14
	movl	-28(%rbp), %r15d
	xorl	%esi, %esi
	callq	_interrupt_trigger
	movq	%r14, %rdi
	movl	%r15d, %esi
	movl	%eax, %edx
	callq	_ioapic_set_triggermode
	movl	4(%rbx), %edi
LBB0_4:
	movq	_ACPI_MADT_POLARITY_CONFORMS@GOTPCREL(%rip), %rax
	testl	%edi, (%rax)
	jne	LBB0_6
## %bb.5:
	movq	-40(%rbp), %rbx
	movl	-28(%rbp), %r14d
	xorl	%esi, %esi
	callq	_interrupt_polarity
	movq	%rbx, %rdi
	movl	%r14d, %esi
	movl	%eax, %edx
	callq	_ioapic_set_polarity
LBB0_6:
	addq	$24, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"MADT: Could not find APIC for vector %u\n"

	.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_parse_nmi
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function madt_parse_nmi
_madt_parse_nmi:                        ; @madt_parse_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, x0
	ldr	w0, [x0]
	add	x1, sp, #8
	add	x2, sp, #4
	bl	_madt_find_interrupt
	cbz	x0, LBB0_2
; %bb.1:
	ldr	w1, [x19]
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_printf
	b	LBB0_6
LBB0_2:
	ldr	x0, [sp, #8]
	ldr	w1, [sp, #4]
	bl	_ioapic_set_nmi
	ldr	w0, [x19, #4]
Lloh2:
	adrp	x8, _ACPI_MADT_TRIGGER_CONFORMS@GOTPAGE
Lloh3:
	ldr	x8, [x8, _ACPI_MADT_TRIGGER_CONFORMS@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	tst	w8, w0
	b.ne	LBB0_4
; %bb.3:
	ldr	x20, [sp, #8]
	ldr	w21, [sp, #4]
	mov	w1, #0
	bl	_interrupt_trigger
	mov	x2, x0
	mov	x0, x20
	mov	x1, x21
	bl	_ioapic_set_triggermode
	ldr	w0, [x19, #4]
LBB0_4:
Lloh5:
	adrp	x8, _ACPI_MADT_POLARITY_CONFORMS@GOTPAGE
Lloh6:
	ldr	x8, [x8, _ACPI_MADT_POLARITY_CONFORMS@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	tst	w8, w0
	b.ne	LBB0_6
; %bb.5:
	ldr	x19, [sp, #8]
	ldr	w20, [sp, #4]
	mov	w1, #0
	bl	_interrupt_polarity
	mov	x2, x0
	mov	x0, x19
	mov	x1, x20
	bl	_ioapic_set_polarity
LBB0_6:
	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 AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"MADT: Could not find APIC for vector %u\n"

	.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_parse_nmi
.subsections_via_symbols
