	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_madt_parse_interrupt_values    ## -- Begin function madt_parse_interrupt_values
	.p2align	4, 0x90
_madt_parse_interrupt_values:           ## @madt_parse_interrupt_values
	.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	$72, %rsp
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r14
	movq	%rsi, %r15
	movq	%rdi, %rbx
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -32(%rbp)
	movq	_bootverbose@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_2
## %bb.1:
	movl	(%rbx), %esi
	movl	4(%rbx), %edx
	leaq	L_.str(%rip), %rdi
	xorl	%eax, %eax
	callq	_printf
LBB0_2:
	xorl	%edi, %edi
	cmpq	$0, 8(%rbx)
	sete	%dil
	leaq	L_.str.1(%rip), %rsi
	callq	_KASSERT
	movl	(%rbx), %esi
	movl	16(%rbx), %edi
	callq	_interrupt_trigger
	movl	%eax, (%r15)
	movl	(%rbx), %esi
	movl	16(%rbx), %edi
	callq	_interrupt_polarity
	movl	%eax, (%r14)
	movslq	(%rbx), %rax
	movq	_AcpiGbl_FADT@GOTPCREL(%rip), %rcx
	cmpq	%rax, (%rcx)
	jne	LBB0_19
## %bb.3:
	movq	_madt_found_sci_override@GOTPCREL(%rip), %rax
	movl	$1, (%rax)
	leaq	L_.str.2(%rip), %rdi
	leaq	-96(%rbp), %rsi
	movl	$64, %edx
	callq	_getenv_string
	testq	%rax, %rax
	je	LBB0_11
## %bb.4:
	movsbl	-96(%rbp), %edi
	callq	_tolower
	cmpb	$101, %al
	jne	LBB0_7
## %bb.5:
	movq	_INTR_TRIGGER_EDGE@GOTPCREL(%rip), %rax
	jmp	LBB0_6
LBB0_7:
	movsbl	-96(%rbp), %edi
	callq	_tolower
	cmpb	$108, %al
	jne	LBB0_9
## %bb.8:
	movq	_INTR_TRIGGER_LEVEL@GOTPCREL(%rip), %rax
LBB0_6:
	movl	(%rax), %eax
	movl	%eax, (%r15)
	jmp	LBB0_10
LBB0_9:
	leaq	L_.str.3(%rip), %rdi
	leaq	-96(%rbp), %rsi
	callq	_panic
	movl	(%r15), %eax
LBB0_10:
	movq	_INTR_TRIGGER_EDGE@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	leaq	L_.str.5(%rip), %rax
	leaq	L_.str.6(%rip), %rsi
	cmoveq	%rax, %rsi
	leaq	L_.str.4(%rip), %rdi
	xorl	%eax, %eax
	callq	_printf
LBB0_11:
	leaq	L_.str.7(%rip), %rdi
	leaq	-96(%rbp), %rsi
	movl	$64, %edx
	callq	_getenv_string
	testq	%rax, %rax
	je	LBB0_19
## %bb.12:
	movsbl	-96(%rbp), %edi
	callq	_tolower
	cmpb	$104, %al
	jne	LBB0_15
## %bb.13:
	movq	_INTR_POLARITY_HIGH@GOTPCREL(%rip), %rax
	jmp	LBB0_14
LBB0_15:
	movsbl	-96(%rbp), %edi
	callq	_tolower
	cmpb	$108, %al
	jne	LBB0_17
## %bb.16:
	movq	_INTR_POLARITY_LOW@GOTPCREL(%rip), %rax
LBB0_14:
	movl	(%rax), %eax
	movl	%eax, (%r14)
	jmp	LBB0_18
LBB0_17:
	leaq	L_.str.8(%rip), %rdi
	leaq	-96(%rbp), %rsi
	callq	_panic
	movl	(%r14), %eax
LBB0_18:
	movq	_INTR_POLARITY_HIGH@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	leaq	L_.str.10(%rip), %rax
	leaq	L_.str.11(%rip), %rsi
	cmoveq	%rax, %rsi
	leaq	L_.str.9(%rip), %rdi
	xorl	%eax, %eax
	callq	_printf
LBB0_19:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-32(%rbp), %rax
	jne	LBB0_21
## %bb.20:
	addq	$72, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_21:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_bootverbose,8,3                ## @bootverbose
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"MADT: Interrupt override: source %u, irq %u\n"

L_.str.1:                               ## @.str.1
	.asciz	"bus for interrupt overrides must be zero"

	.comm	_AcpiGbl_FADT,8,3               ## @AcpiGbl_FADT
	.comm	_madt_found_sci_override,4,2    ## @madt_found_sci_override
L_.str.2:                               ## @.str.2
	.asciz	"hw.acpi.sci.trigger"

	.comm	_INTR_TRIGGER_EDGE,4,2          ## @INTR_TRIGGER_EDGE
	.comm	_INTR_TRIGGER_LEVEL,4,2         ## @INTR_TRIGGER_LEVEL
L_.str.3:                               ## @.str.3
	.asciz	"Invalid trigger %s: must be 'edge' or 'level'"

L_.str.4:                               ## @.str.4
	.asciz	"MADT: Forcing SCI to %s trigger\n"

L_.str.5:                               ## @.str.5
	.asciz	"edge"

L_.str.6:                               ## @.str.6
	.asciz	"level"

L_.str.7:                               ## @.str.7
	.asciz	"hw.acpi.sci.polarity"

	.comm	_INTR_POLARITY_HIGH,4,2         ## @INTR_POLARITY_HIGH
	.comm	_INTR_POLARITY_LOW,4,2          ## @INTR_POLARITY_LOW
L_.str.8:                               ## @.str.8
	.asciz	"Invalid polarity %s: must be 'high' or 'low'"

L_.str.9:                               ## @.str.9
	.asciz	"MADT: Forcing SCI to active %s polarity\n"

L_.str.10:                              ## @.str.10
	.asciz	"high"

L_.str.11:                              ## @.str.11
	.asciz	"low"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_madt_parse_interrupt_values    ; -- Begin function madt_parse_interrupt_values
	.p2align	2
_madt_parse_interrupt_values:           ; @madt_parse_interrupt_values
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #144
	.cfi_def_cfa_offset 144
	stp	x22, x21, [sp, #96]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #112]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #128]            ; 16-byte Folded Spill
	add	x29, sp, #128
	.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
	mov	x21, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-40]
Lloh3:
	adrp	x8, _bootverbose@GOTPAGE
Lloh4:
	ldr	x8, [x8, _bootverbose@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
	cbz	x8, LBB0_2
; %bb.1:
	ldp	w8, w9, [x21]
	stp	x8, x9, [sp]
Lloh6:
	adrp	x0, l_.str@PAGE
Lloh7:
	add	x0, x0, l_.str@PAGEOFF
	bl	_printf
LBB0_2:
	ldr	x8, [x21, #8]
	cmp	x8, #0
	cset	w0, eq
Lloh8:
	adrp	x1, l_.str.1@PAGE
Lloh9:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_KASSERT
	ldr	w0, [x21, #16]
	ldr	w1, [x21]
	bl	_interrupt_trigger
	str	w0, [x20]
	ldr	w0, [x21, #16]
	ldr	w1, [x21]
	bl	_interrupt_polarity
	str	w0, [x19]
	ldrsw	x8, [x21]
Lloh10:
	adrp	x9, _AcpiGbl_FADT@GOTPAGE
Lloh11:
	ldr	x9, [x9, _AcpiGbl_FADT@GOTPAGEOFF]
Lloh12:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_17
; %bb.3:
Lloh13:
	adrp	x8, _madt_found_sci_override@GOTPAGE
Lloh14:
	ldr	x8, [x8, _madt_found_sci_override@GOTPAGEOFF]
	mov	w9, #1
Lloh15:
	str	w9, [x8]
Lloh16:
	adrp	x0, l_.str.2@PAGE
Lloh17:
	add	x0, x0, l_.str.2@PAGEOFF
	add	x1, sp, #24
	mov	w2, #64
	bl	_getenv_string
	cbz	x0, LBB0_10
; %bb.4:
	ldrsb	w0, [sp, #24]
	bl	_tolower
Lloh18:
	adrp	x21, _INTR_TRIGGER_EDGE@GOTPAGE
Lloh19:
	ldr	x21, [x21, _INTR_TRIGGER_EDGE@GOTPAGEOFF]
	cmp	w0, #101
	b.ne	LBB0_6
; %bb.5:
	ldr	w8, [x21]
	str	w8, [x20]
	b	LBB0_9
LBB0_6:
	ldrsb	w0, [sp, #24]
	bl	_tolower
	cmp	w0, #108
	b.ne	LBB0_8
; %bb.7:
Lloh20:
	adrp	x8, _INTR_TRIGGER_LEVEL@GOTPAGE
Lloh21:
	ldr	x8, [x8, _INTR_TRIGGER_LEVEL@GOTPAGEOFF]
Lloh22:
	ldr	w8, [x8]
	str	w8, [x20]
	b	LBB0_9
LBB0_8:
Lloh23:
	adrp	x0, l_.str.3@PAGE
Lloh24:
	add	x0, x0, l_.str.3@PAGEOFF
	add	x1, sp, #24
	bl	_panic
	ldr	w8, [x20]
LBB0_9:
	ldr	w9, [x21]
Lloh25:
	adrp	x10, l_.str.6@PAGE
Lloh26:
	add	x10, x10, l_.str.6@PAGEOFF
Lloh27:
	adrp	x11, l_.str.5@PAGE
Lloh28:
	add	x11, x11, l_.str.5@PAGEOFF
	cmp	w8, w9
	csel	x8, x11, x10, eq
	str	x8, [sp]
Lloh29:
	adrp	x0, l_.str.4@PAGE
Lloh30:
	add	x0, x0, l_.str.4@PAGEOFF
	bl	_printf
LBB0_10:
Lloh31:
	adrp	x0, l_.str.7@PAGE
Lloh32:
	add	x0, x0, l_.str.7@PAGEOFF
	add	x1, sp, #24
	mov	w2, #64
	bl	_getenv_string
	cbz	x0, LBB0_17
; %bb.11:
	ldrsb	w0, [sp, #24]
	bl	_tolower
Lloh33:
	adrp	x20, _INTR_POLARITY_HIGH@GOTPAGE
Lloh34:
	ldr	x20, [x20, _INTR_POLARITY_HIGH@GOTPAGEOFF]
	cmp	w0, #104
	b.ne	LBB0_13
; %bb.12:
	ldr	w8, [x20]
	str	w8, [x19]
	b	LBB0_16
LBB0_13:
	ldrsb	w0, [sp, #24]
	bl	_tolower
	cmp	w0, #108
	b.ne	LBB0_15
; %bb.14:
Lloh35:
	adrp	x8, _INTR_POLARITY_LOW@GOTPAGE
Lloh36:
	ldr	x8, [x8, _INTR_POLARITY_LOW@GOTPAGEOFF]
Lloh37:
	ldr	w8, [x8]
	str	w8, [x19]
	b	LBB0_16
LBB0_15:
Lloh38:
	adrp	x0, l_.str.8@PAGE
Lloh39:
	add	x0, x0, l_.str.8@PAGEOFF
	add	x1, sp, #24
	bl	_panic
	ldr	w8, [x19]
LBB0_16:
	ldr	w9, [x20]
Lloh40:
	adrp	x10, l_.str.11@PAGE
Lloh41:
	add	x10, x10, l_.str.11@PAGEOFF
Lloh42:
	adrp	x11, l_.str.10@PAGE
Lloh43:
	add	x11, x11, l_.str.10@PAGEOFF
	cmp	w8, w9
	csel	x8, x11, x10, eq
	str	x8, [sp]
Lloh44:
	adrp	x0, l_.str.9@PAGE
Lloh45:
	add	x0, x0, l_.str.9@PAGEOFF
	bl	_printf
LBB0_17:
	ldur	x8, [x29, #-40]
Lloh46:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh47:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh48:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_19
; %bb.18:
	ldp	x29, x30, [sp, #128]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #112]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #96]             ; 16-byte Folded Reload
	add	sp, sp, #144
	ret
LBB0_19:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGotStr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpAdd	Lloh29, Lloh30
	.loh AdrpAdd	Lloh27, Lloh28
	.loh AdrpAdd	Lloh25, Lloh26
	.loh AdrpAdd	Lloh31, Lloh32
	.loh AdrpLdrGot	Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.loh AdrpAdd	Lloh38, Lloh39
	.loh AdrpAdd	Lloh44, Lloh45
	.loh AdrpAdd	Lloh42, Lloh43
	.loh AdrpAdd	Lloh40, Lloh41
	.loh AdrpLdrGotLdr	Lloh46, Lloh47, Lloh48
	.cfi_endproc
                                        ; -- End function
	.comm	_bootverbose,8,3                ; @bootverbose
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"MADT: Interrupt override: source %u, irq %u\n"

l_.str.1:                               ; @.str.1
	.asciz	"bus for interrupt overrides must be zero"

	.comm	_AcpiGbl_FADT,8,3               ; @AcpiGbl_FADT
	.comm	_madt_found_sci_override,4,2    ; @madt_found_sci_override
l_.str.2:                               ; @.str.2
	.asciz	"hw.acpi.sci.trigger"

	.comm	_INTR_TRIGGER_EDGE,4,2          ; @INTR_TRIGGER_EDGE
	.comm	_INTR_TRIGGER_LEVEL,4,2         ; @INTR_TRIGGER_LEVEL
l_.str.3:                               ; @.str.3
	.asciz	"Invalid trigger %s: must be 'edge' or 'level'"

l_.str.4:                               ; @.str.4
	.asciz	"MADT: Forcing SCI to %s trigger\n"

l_.str.5:                               ; @.str.5
	.asciz	"edge"

l_.str.6:                               ; @.str.6
	.asciz	"level"

l_.str.7:                               ; @.str.7
	.asciz	"hw.acpi.sci.polarity"

	.comm	_INTR_POLARITY_HIGH,4,2         ; @INTR_POLARITY_HIGH
	.comm	_INTR_POLARITY_LOW,4,2          ; @INTR_POLARITY_LOW
l_.str.8:                               ; @.str.8
	.asciz	"Invalid polarity %s: must be 'high' or 'low'"

l_.str.9:                               ; @.str.9
	.asciz	"MADT: Forcing SCI to active %s polarity\n"

l_.str.10:                              ; @.str.10
	.asciz	"high"

l_.str.11:                              ; @.str.11
	.asciz	"low"

.subsections_via_symbols
