	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mptable_setup_io
_mptable_setup_io:                      ## @mptable_setup_io
	.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
	xorl	%eax, %eax
	callq	_mptable_count_items
	movq	_mptable_maxbusid@GOTPCREL(%rip), %rbx
	movl	(%rbx), %eax
	leal	4(,%rax,4), %edi
	movq	_M_MPTABLE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_M_WAITOK@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	callq	_malloc
	movq	_busses@GOTPCREL(%rip), %rcx
	movq	%rax, (%rcx)
	cmpl	$0, (%rbx)
	js	LBB0_3
## %bb.1:
	movq	$-1, %rcx
	movq	_NOBUS@GOTPCREL(%rip), %rdx
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%rdx), %esi
	movl	%esi, 4(%rax,%rcx,4)
	movslq	(%rbx), %rsi
	incq	%rcx
	cmpq	%rsi, %rcx
	jl	LBB0_2
LBB0_3:
	xorl	%eax, %eax
	callq	_mptable_parse_apics_and_busses
	xorl	%eax, %eax
	callq	_mptable_parse_ints
	movq	_IOAPIC_MAX_ID@GOTPCREL(%rip), %r14
	movl	(%r14), %eax
	testl	%eax, %eax
	js	LBB0_8
## %bb.4:
	movq	$-1, %rbx
	movq	_ioapics@GOTPCREL(%rip), %r15
	jmp	LBB0_5
	.p2align	4, 0x90
LBB0_7:                                 ##   in Loop: Header=BB0_5 Depth=1
	movslq	%eax, %rcx
	incq	%rbx
	cmpq	%rcx, %rbx
	jge	LBB0_8
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r15), %rcx
	movq	8(%rcx,%rbx,8), %rdi
	testq	%rdi, %rdi
	je	LBB0_7
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=1
	callq	_ioapic_register
	movl	(%r14), %eax
	jmp	LBB0_7
LBB0_8:
	xorl	%eax, %eax
	callq	_mptable_pci_setup
	movq	_mpfps@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	_MPFB2_IMCR_PRESENT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%ecx, (%rax)
	je	LBB0_10
## %bb.9:
	movl	$34, %edi
	movl	$112, %esi
	callq	_outb
	movl	$35, %edi
	callq	_inb
	orl	$1, %eax
	movl	$35, %edi
	movl	%eax, %esi
	callq	_outb
LBB0_10:
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_mptable_maxbusid,4,2           ## @mptable_maxbusid
	.comm	_M_MPTABLE,4,2                  ## @M_MPTABLE
	.comm	_M_WAITOK,4,2                   ## @M_WAITOK
	.comm	_busses,8,3                     ## @busses
	.comm	_NOBUS,4,2                      ## @NOBUS
	.comm	_IOAPIC_MAX_ID,4,2              ## @IOAPIC_MAX_ID
	.comm	_ioapics,8,3                    ## @ioapics
	.comm	_mpfps,8,3                      ## @mpfps
	.comm	_MPFB2_IMCR_PRESENT,4,2         ## @MPFB2_IMCR_PRESENT
	.no_dead_strip	_mptable_setup_io
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mptable_setup_io
_mptable_setup_io:                      ; @mptable_setup_io
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	bl	_mptable_count_items
Lloh0:
	adrp	x19, _mptable_maxbusid@GOTPAGE
Lloh1:
	ldr	x19, [x19, _mptable_maxbusid@GOTPAGEOFF]
	ldr	w8, [x19]
	lsl	w8, w8, #2
	add	w0, w8, #4
Lloh2:
	adrp	x8, _M_MPTABLE@GOTPAGE
Lloh3:
	ldr	x8, [x8, _M_MPTABLE@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
Lloh5:
	adrp	x8, _M_WAITOK@GOTPAGE
Lloh6:
	ldr	x8, [x8, _M_WAITOK@GOTPAGEOFF]
Lloh7:
	ldr	w2, [x8]
	bl	_malloc
Lloh8:
	adrp	x8, _busses@GOTPAGE
Lloh9:
	ldr	x8, [x8, _busses@GOTPAGEOFF]
Lloh10:
	str	x0, [x8]
	ldr	w8, [x19]
	tbnz	w8, #31, LBB0_3
; %bb.1:
	mov	x8, #0
Lloh11:
	adrp	x9, _NOBUS@GOTPAGE
Lloh12:
	ldr	x9, [x9, _NOBUS@GOTPAGEOFF]
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w10, [x9]
	str	w10, [x0, x8, lsl #2]
	add	x10, x8, #1
	ldrsw	x11, [x19]
	cmp	x8, x11
	mov	x8, x10
	b.lt	LBB0_2
LBB0_3:
	bl	_mptable_parse_apics_and_busses
	bl	_mptable_parse_ints
Lloh13:
	adrp	x19, _IOAPIC_MAX_ID@GOTPAGE
Lloh14:
	ldr	x19, [x19, _IOAPIC_MAX_ID@GOTPAGEOFF]
	ldr	w8, [x19]
	tbnz	w8, #31, LBB0_8
; %bb.4:
	mov	x20, #0
Lloh15:
	adrp	x21, _ioapics@GOTPAGE
Lloh16:
	ldr	x21, [x21, _ioapics@GOTPAGEOFF]
	b	LBB0_6
LBB0_5:                                 ;   in Loop: Header=BB0_6 Depth=1
	cmp	x20, w8, sxtw
	add	x20, x20, #1
	b.ge	LBB0_8
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x9, [x21]
	ldr	x0, [x9, x20, lsl #3]
	cbz	x0, LBB0_5
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	bl	_ioapic_register
	ldr	w8, [x19]
	b	LBB0_5
LBB0_8:
	bl	_mptable_pci_setup
Lloh17:
	adrp	x8, _mpfps@GOTPAGE
Lloh18:
	ldr	x8, [x8, _mpfps@GOTPAGEOFF]
Lloh19:
	ldr	x8, [x8]
	ldr	w8, [x8]
Lloh20:
	adrp	x9, _MPFB2_IMCR_PRESENT@GOTPAGE
Lloh21:
	ldr	x9, [x9, _MPFB2_IMCR_PRESENT@GOTPAGEOFF]
Lloh22:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_10
; %bb.9:
	mov	w0, #34
	mov	w1, #112
	bl	_outb
	mov	w0, #35
	bl	_inb
	orr	w1, w0, #0x1
	mov	w0, #35
	bl	_outb
LBB0_10:
	mov	w0, #0
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotStr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.comm	_mptable_maxbusid,4,2           ; @mptable_maxbusid
	.comm	_M_MPTABLE,4,2                  ; @M_MPTABLE
	.comm	_M_WAITOK,4,2                   ; @M_WAITOK
	.comm	_busses,8,3                     ; @busses
	.comm	_NOBUS,4,2                      ; @NOBUS
	.comm	_IOAPIC_MAX_ID,4,2              ; @IOAPIC_MAX_ID
	.comm	_ioapics,8,3                    ; @ioapics
	.comm	_mpfps,8,3                      ; @mpfps
	.comm	_MPFB2_IMCR_PRESENT,4,2         ; @MPFB2_IMCR_PRESENT
	.no_dead_strip	_mptable_setup_io
.subsections_via_symbols
