	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_elcr_probe                     ## -- Begin function elcr_probe
	.p2align	4, 0x90
_elcr_probe:                            ## @elcr_probe
	.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
	movq	_ELCR_PORT@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rdi
	callq	_inb
	movl	%eax, %r14d
	movq	(%rbx), %rdi
	incq	%rdi
	callq	_inb
	movl	%eax, %r12d
	shll	$8, %r12d
	orl	%r14d, %r12d
	movq	_elcr_status@GOTPCREL(%rip), %r13
	movl	%r12d, (%r13)
	xorl	%edi, %edi
	callq	_ELCR_MASK
	movl	%eax, %r14d
	movl	$1, %edi
	callq	_ELCR_MASK
	movl	%eax, %r15d
	orl	%r14d, %r15d
	movl	$2, %edi
	callq	_ELCR_MASK
	movl	%eax, %r14d
	movl	$8, %edi
	callq	_ELCR_MASK
	movl	%eax, %ebx
	orl	%r14d, %ebx
	orl	%r15d, %ebx
	movl	$13, %edi
	callq	_ELCR_MASK
	orl	%ebx, %eax
	testl	%r12d, %eax
	jne	LBB0_1
## %bb.2:
	movq	_bootverbose@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_4
## %bb.3:
	leaq	L_str(%rip), %rdi
	callq	_puts
	leaq	L_.str.1(%rip), %rbx
	movq	%rbx, %rdi
	xorl	%esi, %esi
	xorl	%eax, %eax
	callq	_printf
	movq	%rbx, %rdi
	movl	$1, %esi
	xorl	%eax, %eax
	callq	_printf
	movq	%rbx, %rdi
	movl	$2, %esi
	xorl	%eax, %eax
	callq	_printf
	movq	%rbx, %rdi
	movl	$3, %esi
	xorl	%eax, %eax
	callq	_printf
	movq	%rbx, %rdi
	movl	$4, %esi
	xorl	%eax, %eax
	callq	_printf
	movq	%rbx, %rdi
	movl	$5, %esi
	xorl	%eax, %eax
	callq	_printf
	movq	%rbx, %rdi
	movl	$6, %esi
	xorl	%eax, %eax
	callq	_printf
	movq	%rbx, %rdi
	movl	$7, %esi
	xorl	%eax, %eax
	callq	_printf
	movq	%rbx, %rdi
	movl	$8, %esi
	xorl	%eax, %eax
	callq	_printf
	movq	%rbx, %rdi
	movl	$9, %esi
	xorl	%eax, %eax
	callq	_printf
	movq	%rbx, %rdi
	movl	$10, %esi
	xorl	%eax, %eax
	callq	_printf
	movq	%rbx, %rdi
	movl	$11, %esi
	xorl	%eax, %eax
	callq	_printf
	movq	%rbx, %rdi
	movl	$12, %esi
	xorl	%eax, %eax
	callq	_printf
	movq	%rbx, %rdi
	movl	$13, %esi
	xorl	%eax, %eax
	callq	_printf
	movq	%rbx, %rdi
	movl	$14, %esi
	xorl	%eax, %eax
	callq	_printf
	movq	%rbx, %rdi
	movl	$15, %esi
	xorl	%eax, %eax
	callq	_printf
	movl	$10, %edi
	callq	_putchar
	movl	(%r13), %ebx
	xorl	%edi, %edi
	callq	_ELCR_MASK
	testl	%ebx, %eax
	leaq	L_.str.4(%rip), %r14
	leaq	L_.str.3(%rip), %rbx
	movq	%rbx, %rdi
	cmoveq	%r14, %rdi
	xorl	%eax, %eax
	callq	_printf
	movl	(%r13), %r15d
	movl	$1, %edi
	callq	_ELCR_MASK
	testl	%r15d, %eax
	movq	%rbx, %rdi
	cmoveq	%r14, %rdi
	xorl	%eax, %eax
	callq	_printf
	movl	(%r13), %r15d
	movl	$2, %edi
	callq	_ELCR_MASK
	testl	%r15d, %eax
	movq	%rbx, %rdi
	cmoveq	%r14, %rdi
	xorl	%eax, %eax
	callq	_printf
	movl	(%r13), %r15d
	movl	$3, %edi
	callq	_ELCR_MASK
	testl	%r15d, %eax
	movq	%rbx, %rdi
	cmoveq	%r14, %rdi
	xorl	%eax, %eax
	callq	_printf
	movl	(%r13), %r15d
	movl	$4, %edi
	callq	_ELCR_MASK
	testl	%r15d, %eax
	movq	%rbx, %rdi
	cmoveq	%r14, %rdi
	xorl	%eax, %eax
	callq	_printf
	movl	(%r13), %r15d
	movl	$5, %edi
	callq	_ELCR_MASK
	testl	%r15d, %eax
	movq	%rbx, %rdi
	cmoveq	%r14, %rdi
	xorl	%eax, %eax
	callq	_printf
	movl	(%r13), %r15d
	movl	$6, %edi
	callq	_ELCR_MASK
	testl	%r15d, %eax
	movq	%rbx, %rdi
	cmoveq	%r14, %rdi
	xorl	%eax, %eax
	callq	_printf
	movl	(%r13), %r15d
	movl	$7, %edi
	callq	_ELCR_MASK
	testl	%r15d, %eax
	movq	%rbx, %rdi
	cmoveq	%r14, %rdi
	xorl	%eax, %eax
	callq	_printf
	movl	(%r13), %r15d
	movl	$8, %edi
	callq	_ELCR_MASK
	testl	%r15d, %eax
	movq	%rbx, %rdi
	cmoveq	%r14, %rdi
	xorl	%eax, %eax
	callq	_printf
	movl	(%r13), %r15d
	movl	$9, %edi
	callq	_ELCR_MASK
	testl	%r15d, %eax
	movq	%rbx, %rdi
	cmoveq	%r14, %rdi
	xorl	%eax, %eax
	callq	_printf
	movl	(%r13), %r15d
	movl	$10, %edi
	callq	_ELCR_MASK
	testl	%r15d, %eax
	movq	%rbx, %rdi
	cmoveq	%r14, %rdi
	xorl	%eax, %eax
	callq	_printf
	movl	(%r13), %r15d
	movl	$11, %edi
	callq	_ELCR_MASK
	testl	%r15d, %eax
	movq	%rbx, %rdi
	cmoveq	%r14, %rdi
	xorl	%eax, %eax
	callq	_printf
	movl	(%r13), %r15d
	movl	$12, %edi
	callq	_ELCR_MASK
	testl	%r15d, %eax
	movq	%rbx, %rdi
	cmoveq	%r14, %rdi
	xorl	%eax, %eax
	callq	_printf
	movl	(%r13), %r15d
	movl	$13, %edi
	callq	_ELCR_MASK
	testl	%r15d, %eax
	movq	%rbx, %rdi
	cmoveq	%r14, %rdi
	xorl	%eax, %eax
	callq	_printf
	movl	(%r13), %r15d
	movl	$14, %edi
	callq	_ELCR_MASK
	testl	%r15d, %eax
	movq	%rbx, %rdi
	cmoveq	%r14, %rdi
	xorl	%eax, %eax
	callq	_printf
	movl	(%r13), %r15d
	movl	$15, %edi
	callq	_ELCR_MASK
	testl	%r15d, %eax
	cmoveq	%r14, %rbx
	movq	%rbx, %rdi
	xorl	%eax, %eax
	callq	_printf
	movl	$10, %edi
	callq	_putchar
LBB0_4:
	leaq	L_.str.5(%rip), %rdi
	xorl	%ebx, %ebx
	xorl	%esi, %esi
	callq	_resource_disabled
	testq	%rax, %rax
	je	LBB0_5
LBB0_1:
	movq	_ENXIO@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
LBB0_6:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	movq	_elcr_found@GOTPCREL(%rip), %rax
	movl	$1, (%rax)
	jmp	LBB0_6
	.cfi_endproc
                                        ## -- End function
	.comm	_ELCR_PORT,8,3                  ## @ELCR_PORT
	.comm	_elcr_status,4,2                ## @elcr_status
	.comm	_ENXIO,4,2                      ## @ENXIO
	.comm	_bootverbose,8,3                ## @bootverbose
	.section	__TEXT,__cstring,cstring_literals
L_.str.1:                               ## @.str.1
	.asciz	" %2d"

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

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

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

	.comm	_elcr_found,4,2                 ## @elcr_found
L_str:                                  ## @str
	.asciz	"ELCR Found.  ISA IRQs programmed as:"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_elcr_probe                     ; -- Begin function elcr_probe
	.p2align	2
_elcr_probe:                            ; @elcr_probe
	.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
Lloh0:
	adrp	x20, _ELCR_PORT@GOTPAGE
Lloh1:
	ldr	x20, [x20, _ELCR_PORT@GOTPAGEOFF]
	ldr	x0, [x20]
	bl	_inb
	mov	x19, x0
	ldr	x8, [x20]
	add	x0, x8, #1
	bl	_inb
	orr	w21, w19, w0, lsl #8
Lloh2:
	adrp	x20, _elcr_status@GOTPAGE
Lloh3:
	ldr	x20, [x20, _elcr_status@GOTPAGEOFF]
	str	w21, [x20]
	mov	w0, #0
	bl	_ELCR_MASK
	mov	x19, x0
	mov	w0, #1
	bl	_ELCR_MASK
	orr	w19, w0, w19
	mov	w0, #2
	bl	_ELCR_MASK
	orr	w19, w19, w0
	mov	w0, #8
	bl	_ELCR_MASK
	orr	w19, w19, w0
	mov	w0, #13
	bl	_ELCR_MASK
	orr	w8, w19, w0
	tst	w8, w21
	b.ne	LBB0_4
; %bb.1:
Lloh4:
	adrp	x8, _bootverbose@GOTPAGE
Lloh5:
	ldr	x8, [x8, _bootverbose@GOTPAGEOFF]
Lloh6:
	ldr	x8, [x8]
	cbz	x8, LBB0_3
; %bb.2:
Lloh7:
	adrp	x0, l_str@PAGE
Lloh8:
	add	x0, x0, l_str@PAGEOFF
	bl	_puts
	str	xzr, [sp]
Lloh9:
	adrp	x19, l_.str.1@PAGE
Lloh10:
	add	x19, x19, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_printf
	mov	w8, #1
	str	x8, [sp]
	mov	x0, x19
	bl	_printf
	mov	w8, #2
	str	x8, [sp]
	mov	x0, x19
	bl	_printf
	mov	w8, #3
	str	x8, [sp]
	mov	x0, x19
	bl	_printf
	mov	w8, #4
	str	x8, [sp]
	mov	x0, x19
	bl	_printf
	mov	w8, #5
	str	x8, [sp]
	mov	x0, x19
	bl	_printf
	mov	w8, #6
	str	x8, [sp]
	mov	x0, x19
	bl	_printf
	mov	w8, #7
	str	x8, [sp]
	mov	x0, x19
	bl	_printf
	mov	w8, #8
	str	x8, [sp]
	mov	x0, x19
	bl	_printf
	mov	w8, #9
	str	x8, [sp]
	mov	x0, x19
	bl	_printf
	mov	w8, #10
	str	x8, [sp]
	mov	x0, x19
	bl	_printf
	mov	w8, #11
	str	x8, [sp]
	mov	x0, x19
	bl	_printf
	mov	w8, #12
	str	x8, [sp]
	mov	x0, x19
	bl	_printf
	mov	w8, #13
	str	x8, [sp]
	mov	x0, x19
	bl	_printf
	mov	w8, #14
	str	x8, [sp]
	mov	x0, x19
	bl	_printf
	mov	w8, #15
	str	x8, [sp]
	mov	x0, x19
	bl	_printf
	mov	w0, #10
	bl	_putchar
	ldr	w22, [x20]
	mov	w0, #0
	bl	_ELCR_MASK
Lloh11:
	adrp	x19, l_.str.3@PAGE
Lloh12:
	add	x19, x19, l_.str.3@PAGEOFF
Lloh13:
	adrp	x21, l_.str.4@PAGE
Lloh14:
	add	x21, x21, l_.str.4@PAGEOFF
	tst	w0, w22
	csel	x0, x21, x19, eq
	bl	_printf
	ldr	w22, [x20]
	mov	w0, #1
	bl	_ELCR_MASK
	tst	w0, w22
	csel	x0, x21, x19, eq
	bl	_printf
	ldr	w22, [x20]
	mov	w0, #2
	bl	_ELCR_MASK
	tst	w0, w22
	csel	x0, x21, x19, eq
	bl	_printf
	ldr	w22, [x20]
	mov	w0, #3
	bl	_ELCR_MASK
	tst	w0, w22
	csel	x0, x21, x19, eq
	bl	_printf
	ldr	w22, [x20]
	mov	w0, #4
	bl	_ELCR_MASK
	tst	w0, w22
	csel	x0, x21, x19, eq
	bl	_printf
	ldr	w22, [x20]
	mov	w0, #5
	bl	_ELCR_MASK
	tst	w0, w22
	csel	x0, x21, x19, eq
	bl	_printf
	ldr	w22, [x20]
	mov	w0, #6
	bl	_ELCR_MASK
	tst	w0, w22
	csel	x0, x21, x19, eq
	bl	_printf
	ldr	w22, [x20]
	mov	w0, #7
	bl	_ELCR_MASK
	tst	w0, w22
	csel	x0, x21, x19, eq
	bl	_printf
	ldr	w22, [x20]
	mov	w0, #8
	bl	_ELCR_MASK
	tst	w0, w22
	csel	x0, x21, x19, eq
	bl	_printf
	ldr	w22, [x20]
	mov	w0, #9
	bl	_ELCR_MASK
	tst	w0, w22
	csel	x0, x21, x19, eq
	bl	_printf
	ldr	w22, [x20]
	mov	w0, #10
	bl	_ELCR_MASK
	tst	w0, w22
	csel	x0, x21, x19, eq
	bl	_printf
	ldr	w22, [x20]
	mov	w0, #11
	bl	_ELCR_MASK
	tst	w0, w22
	csel	x0, x21, x19, eq
	bl	_printf
	ldr	w22, [x20]
	mov	w0, #12
	bl	_ELCR_MASK
	tst	w0, w22
	csel	x0, x21, x19, eq
	bl	_printf
	ldr	w22, [x20]
	mov	w0, #13
	bl	_ELCR_MASK
	tst	w0, w22
	csel	x0, x21, x19, eq
	bl	_printf
	ldr	w22, [x20]
	mov	w0, #14
	bl	_ELCR_MASK
	tst	w0, w22
	csel	x0, x21, x19, eq
	bl	_printf
	ldr	w20, [x20]
	mov	w0, #15
	bl	_ELCR_MASK
	tst	w0, w20
	csel	x0, x21, x19, eq
	bl	_printf
	mov	w0, #10
	bl	_putchar
LBB0_3:
Lloh15:
	adrp	x0, l_.str.5@PAGE
Lloh16:
	add	x0, x0, l_.str.5@PAGEOFF
	mov	w1, #0
	bl	_resource_disabled
	cbz	x0, LBB0_6
LBB0_4:
Lloh17:
	adrp	x8, _ENXIO@GOTPAGE
Lloh18:
	ldr	x8, [x8, _ENXIO@GOTPAGEOFF]
Lloh19:
	ldr	w0, [x8]
LBB0_5:
	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
LBB0_6:
Lloh20:
	adrp	x8, _elcr_found@GOTPAGE
Lloh21:
	ldr	x8, [x8, _elcr_found@GOTPAGEOFF]
	mov	w9, #1
Lloh22:
	str	w9, [x8]
	b	LBB0_5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotStr	Lloh20, Lloh21, Lloh22
	.cfi_endproc
                                        ; -- End function
	.comm	_ELCR_PORT,8,3                  ; @ELCR_PORT
	.comm	_elcr_status,4,2                ; @elcr_status
	.comm	_ENXIO,4,2                      ; @ENXIO
	.comm	_bootverbose,8,3                ; @bootverbose
	.section	__TEXT,__cstring,cstring_literals
l_.str.1:                               ; @.str.1
	.asciz	" %2d"

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

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

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

	.comm	_elcr_found,4,2                 ; @elcr_found
l_str:                                  ; @str
	.asciz	"ELCR Found.  ISA IRQs programmed as:"

.subsections_via_symbols
