	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function atpic_config_intr
_atpic_config_intr:                     ## @atpic_config_intr
	.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
	movl	%edx, %ebx
	movl	%esi, %r15d
	movq	%rdi, %r14
	movq	_INTR_TRIGGER_CONFORM@GOTPCREL(%rip), %rax
	movq	_INTR_TRIGGER_EDGE@GOTPCREL(%rip), %r13
	cmpl	%esi, (%rax)
	jne	LBB0_2
## %bb.1:
	movl	(%r13), %r15d
LBB0_2:
	movq	_INTR_POLARITY_CONFORM@GOTPCREL(%rip), %rax
	movq	_INTR_POLARITY_HIGH@GOTPCREL(%rip), %r12
	cmpl	%ebx, (%rax)
	jne	LBB0_4
## %bb.3:
	movl	(%r12), %ebx
LBB0_4:
	movq	%r14, %rdi
	callq	_atpic_vector
	movl	(%r13), %ecx
	cmpl	%ecx, %r15d
	jne	LBB0_7
## %bb.5:
	movq	_INTR_POLARITY_LOW@GOTPCREL(%rip), %rdx
	cmpl	(%rdx), %ebx
	jne	LBB0_7
## %bb.6:
	movl	(%r12), %esi
	jmp	LBB0_9
LBB0_7:
	movq	_INTR_TRIGGER_LEVEL@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	cmpl	%edx, %r15d
	jne	LBB0_13
## %bb.8:
	movl	%ebx, %esi
	cmpl	(%r12), %ebx
	jne	LBB0_13
LBB0_9:
	cmpl	%ecx, %r15d
	leaq	L_.str.1(%rip), %rcx
	leaq	L_.str.2(%rip), %rdx
	cmoveq	%rcx, %rdx
	cmpl	%esi, %ebx
	leaq	L_.str.3(%rip), %rsi
	leaq	L_.str.4(%rip), %rcx
	cmoveq	%rsi, %rcx
	leaq	L_.str(%rip), %rdi
	movl	%eax, %esi
	xorl	%eax, %eax
	callq	_printf
LBB0_10:
	movq	_EINVAL@GOTPCREL(%rip), %rax
LBB0_11:
	movl	(%rax), %ebx
LBB0_12:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_13:
	xorl	%ebx, %ebx
	cmpl	%r15d, (%r14)
	je	LBB0_12
## %bb.14:
	cmpl	$13, %eax
	ja	LBB0_19
## %bb.15:
	movl	$8199, %esi                     ## imm = 0x2007
	btl	%eax, %esi
	jae	LBB0_19
## %bb.16:
	cmpl	%edx, %r15d
	jne	LBB0_19
## %bb.17:
	movq	_bootverbose@GOTPCREL(%rip), %rcx
	cmpq	$0, (%rcx)
	je	LBB0_10
## %bb.18:
	leaq	L_.str.5(%rip), %rdi
	movl	%eax, %esi
	xorl	%eax, %eax
	callq	_printf
	jmp	LBB0_10
LBB0_19:
	movq	_elcr_found@GOTPCREL(%rip), %rdx
	cmpl	$0, (%rdx)
	movq	_bootverbose@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rdx
	je	LBB0_23
## %bb.20:
	testq	%rdx, %rdx
	je	LBB0_22
## %bb.21:
	cmpl	%ecx, %r15d
	leaq	L_.str.7(%rip), %rcx
	leaq	L_.str.8(%rip), %rdx
	cmoveq	%rcx, %rdx
	leaq	L_.str.9(%rip), %rdi
	movl	%eax, %esi
	xorl	%eax, %eax
	callq	_printf
LBB0_22:
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_spinlock_enter
	movq	%r14, %rdi
	callq	_atpic_vector
	movl	%eax, %edi
	movl	%r15d, %esi
	callq	_elcr_write_trigger
	movl	%r15d, (%r14)
	xorl	%eax, %eax
	callq	_spinlock_exit
	jmp	LBB0_12
LBB0_23:
	testq	%rdx, %rdx
	je	LBB0_25
## %bb.24:
	cmpl	%ecx, %r15d
	leaq	L_.str.7(%rip), %rcx
	leaq	L_.str.8(%rip), %rdx
	cmoveq	%rcx, %rdx
	leaq	L_.str.6(%rip), %rdi
	movl	%eax, %esi
	xorl	%eax, %eax
	callq	_printf
LBB0_25:
	movq	_ENXIO@GOTPCREL(%rip), %rax
	jmp	LBB0_11
	.cfi_endproc
                                        ## -- End function
	.comm	_INTR_TRIGGER_CONFORM,4,2       ## @INTR_TRIGGER_CONFORM
	.comm	_INTR_TRIGGER_EDGE,4,2          ## @INTR_TRIGGER_EDGE
	.comm	_INTR_POLARITY_CONFORM,4,2      ## @INTR_POLARITY_CONFORM
	.comm	_INTR_POLARITY_HIGH,4,2         ## @INTR_POLARITY_HIGH
	.comm	_INTR_POLARITY_LOW,4,2          ## @INTR_POLARITY_LOW
	.comm	_INTR_TRIGGER_LEVEL,4,2         ## @INTR_TRIGGER_LEVEL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"atpic: Mismatched config for IRQ%u: trigger %s, polarity %s\n"

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

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

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

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

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_bootverbose,8,3                ## @bootverbose
L_.str.5:                               ## @.str.5
	.asciz	"atpic: Ignoring invalid level/low configuration for IRQ%u\n"

	.comm	_elcr_found,4,2                 ## @elcr_found
L_.str.6:                               ## @.str.6
	.asciz	"atpic: No ELCR to configure IRQ%u as %s\n"

L_.str.7:                               ## @.str.7
	.asciz	"edge/high"

L_.str.8:                               ## @.str.8
	.asciz	"level/low"

	.comm	_ENXIO,4,2                      ## @ENXIO
L_.str.9:                               ## @.str.9
	.asciz	"atpic: Programming IRQ%u as %s\n"

	.no_dead_strip	_atpic_config_intr
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function atpic_config_intr
_atpic_config_intr:                     ; @atpic_config_intr
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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	x20, x0
Lloh0:
	adrp	x8, _INTR_TRIGGER_CONFORM@GOTPAGE
Lloh1:
	ldr	x8, [x8, _INTR_TRIGGER_CONFORM@GOTPAGEOFF]
Lloh2:
	adrp	x23, _INTR_TRIGGER_EDGE@GOTPAGE
Lloh3:
	ldr	x23, [x23, _INTR_TRIGGER_EDGE@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	ldr	w9, [x23]
	cmp	w8, w1
	csel	w19, w9, w1, eq
Lloh5:
	adrp	x8, _INTR_POLARITY_CONFORM@GOTPAGE
Lloh6:
	ldr	x8, [x8, _INTR_POLARITY_CONFORM@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
Lloh8:
	adrp	x22, _INTR_POLARITY_HIGH@GOTPAGE
Lloh9:
	ldr	x22, [x22, _INTR_POLARITY_HIGH@GOTPAGEOFF]
	ldr	w9, [x22]
	cmp	w8, w2
	csel	w21, w9, w2, eq
	bl	_atpic_vector
	mov	x1, x0
	ldr	w8, [x23]
Lloh10:
	adrp	x9, _INTR_POLARITY_LOW@GOTPAGE
Lloh11:
	ldr	x9, [x9, _INTR_POLARITY_LOW@GOTPAGEOFF]
Lloh12:
	ldr	w9, [x9]
	cmp	w19, w8
	ccmp	w21, w9, #0, eq
	b.eq	LBB0_8
; %bb.1:
Lloh13:
	adrp	x9, _INTR_TRIGGER_LEVEL@GOTPAGE
Lloh14:
	ldr	x9, [x9, _INTR_TRIGGER_LEVEL@GOTPAGEOFF]
Lloh15:
	ldr	w9, [x9]
	ldr	w10, [x22]
	cmp	w19, w9
	ccmp	w21, w10, #0, eq
	mov	x10, x21
	b.eq	LBB0_9
; %bb.2:
	ldr	w10, [x20]
	cmp	w10, w19
	b.eq	LBB0_18
; %bb.3:
	cmp	w1, #13
	b.hi	LBB0_14
; %bb.4:
	mov	w10, #1
	lsl	w10, w10, w1
	mov	w11, #8199
	tst	w10, w11
	b.eq	LBB0_14
; %bb.5:
	cmp	w19, w9
	b.ne	LBB0_14
; %bb.6:
Lloh16:
	adrp	x8, _bootverbose@GOTPAGE
Lloh17:
	ldr	x8, [x8, _bootverbose@GOTPAGEOFF]
Lloh18:
	ldr	x8, [x8]
	cbz	x8, LBB0_11
; %bb.7:
Lloh19:
	adrp	x0, l_.str.5@PAGE
Lloh20:
	add	x0, x0, l_.str.5@PAGEOFF
	b	LBB0_10
LBB0_8:
	ldr	w10, [x22]
LBB0_9:
Lloh21:
	adrp	x9, l_.str.2@PAGE
Lloh22:
	add	x9, x9, l_.str.2@PAGEOFF
Lloh23:
	adrp	x11, l_.str.1@PAGE
Lloh24:
	add	x11, x11, l_.str.1@PAGEOFF
	cmp	w19, w8
	csel	x8, x11, x9, eq
Lloh25:
	adrp	x9, l_.str.4@PAGE
Lloh26:
	add	x9, x9, l_.str.4@PAGEOFF
Lloh27:
	adrp	x11, l_.str.3@PAGE
Lloh28:
	add	x11, x11, l_.str.3@PAGEOFF
	cmp	w21, w10
	csel	x9, x11, x9, eq
	stp	x8, x9, [sp]
Lloh29:
	adrp	x0, l_.str@PAGE
Lloh30:
	add	x0, x0, l_.str@PAGEOFF
LBB0_10:
	bl	_printf
LBB0_11:
Lloh31:
	adrp	x8, _EINVAL@GOTPAGE
Lloh32:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_12:
	ldr	w0, [x8]
LBB0_13:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
LBB0_14:
Lloh33:
	adrp	x9, _elcr_found@GOTPAGE
Lloh34:
	ldr	x9, [x9, _elcr_found@GOTPAGEOFF]
Lloh35:
	ldr	w10, [x9]
Lloh36:
	adrp	x9, _bootverbose@GOTPAGE
Lloh37:
	ldr	x9, [x9, _bootverbose@GOTPAGEOFF]
Lloh38:
	ldr	x9, [x9]
	cbz	w10, LBB0_19
; %bb.15:
	cbz	x9, LBB0_17
; %bb.16:
Lloh39:
	adrp	x9, l_.str.8@PAGE
Lloh40:
	add	x9, x9, l_.str.8@PAGEOFF
Lloh41:
	adrp	x10, l_.str.7@PAGE
Lloh42:
	add	x10, x10, l_.str.7@PAGEOFF
	cmp	w19, w8
	csel	x8, x10, x9, eq
	str	x8, [sp]
Lloh43:
	adrp	x0, l_.str.9@PAGE
Lloh44:
	add	x0, x0, l_.str.9@PAGEOFF
	bl	_printf
LBB0_17:
	bl	_spinlock_enter
	mov	x0, x20
	bl	_atpic_vector
	mov	x1, x19
	bl	_elcr_write_trigger
	str	w19, [x20]
	bl	_spinlock_exit
LBB0_18:
	mov	w0, #0
	b	LBB0_13
LBB0_19:
	cbz	x9, LBB0_21
; %bb.20:
Lloh45:
	adrp	x9, l_.str.8@PAGE
Lloh46:
	add	x9, x9, l_.str.8@PAGEOFF
Lloh47:
	adrp	x10, l_.str.7@PAGE
Lloh48:
	add	x10, x10, l_.str.7@PAGEOFF
	cmp	w19, w8
	csel	x8, x10, x9, eq
	str	x8, [sp]
Lloh49:
	adrp	x0, l_.str.6@PAGE
Lloh50:
	add	x0, x0, l_.str.6@PAGEOFF
	bl	_printf
LBB0_21:
Lloh51:
	adrp	x8, _ENXIO@GOTPAGE
Lloh52:
	ldr	x8, [x8, _ENXIO@GOTPAGEOFF]
	b	LBB0_12
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh4
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpAdd	Lloh29, Lloh30
	.loh AdrpAdd	Lloh27, Lloh28
	.loh AdrpAdd	Lloh25, Lloh26
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpLdrGot	Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh36, Lloh37, Lloh38
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.loh AdrpAdd	Lloh43, Lloh44
	.loh AdrpAdd	Lloh41, Lloh42
	.loh AdrpAdd	Lloh39, Lloh40
	.loh AdrpAdd	Lloh49, Lloh50
	.loh AdrpAdd	Lloh47, Lloh48
	.loh AdrpAdd	Lloh45, Lloh46
	.loh AdrpLdrGot	Lloh51, Lloh52
	.cfi_endproc
                                        ; -- End function
	.comm	_INTR_TRIGGER_CONFORM,4,2       ; @INTR_TRIGGER_CONFORM
	.comm	_INTR_TRIGGER_EDGE,4,2          ; @INTR_TRIGGER_EDGE
	.comm	_INTR_POLARITY_CONFORM,4,2      ; @INTR_POLARITY_CONFORM
	.comm	_INTR_POLARITY_HIGH,4,2         ; @INTR_POLARITY_HIGH
	.comm	_INTR_POLARITY_LOW,4,2          ; @INTR_POLARITY_LOW
	.comm	_INTR_TRIGGER_LEVEL,4,2         ; @INTR_TRIGGER_LEVEL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"atpic: Mismatched config for IRQ%u: trigger %s, polarity %s\n"

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

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

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

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

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_bootverbose,8,3                ; @bootverbose
l_.str.5:                               ; @.str.5
	.asciz	"atpic: Ignoring invalid level/low configuration for IRQ%u\n"

	.comm	_elcr_found,4,2                 ; @elcr_found
l_.str.6:                               ; @.str.6
	.asciz	"atpic: No ELCR to configure IRQ%u as %s\n"

l_.str.7:                               ; @.str.7
	.asciz	"edge/high"

l_.str.8:                               ; @.str.8
	.asciz	"level/low"

	.comm	_ENXIO,4,2                      ; @ENXIO
l_.str.9:                               ; @.str.9
	.asciz	"atpic: Programming IRQ%u as %s\n"

	.no_dead_strip	_atpic_config_intr
.subsections_via_symbols
