	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_vioapic_init                   ## -- Begin function vioapic_init
	.p2align	4, 0x90
_vioapic_init:                          ## @vioapic_init
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %r14
	movq	_M_VIOAPIC@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_M_WAITOK@GOTPCREL(%rip), %rax
	movq	_M_ZERO@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	orl	(%rax), %edx
	movl	$24, %edi
	callq	_malloc
	movq	%rax, %rbx
	movq	%r14, 16(%rax)
	leaq	8(%rax), %rdi
	movq	_MTX_SPIN@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	leaq	L_.str(%rip), %rsi
	xorl	%edx, %edx
	callq	_mtx_init
	movq	_REDIR_ENTRIES@GOTPCREL(%rip), %rax
	cmpl	$0, (%rax)
	jle	LBB0_3
## %bb.1:
	movq	(%rbx), %rcx
	xorl	%edx, %edx
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movl	$65536, (%rcx,%rdx,4)           ## imm = 0x10000
	incq	%rdx
	movslq	(%rax), %rsi
	cmpq	%rsi, %rdx
	jl	LBB0_2
LBB0_3:
	movq	%rbx, %rax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_M_VIOAPIC,4,2                  ## @M_VIOAPIC
	.comm	_M_WAITOK,4,2                   ## @M_WAITOK
	.comm	_M_ZERO,4,2                     ## @M_ZERO
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"vioapic lock"

	.comm	_MTX_SPIN,4,2                   ## @MTX_SPIN
	.comm	_REDIR_ENTRIES,4,2              ## @REDIR_ENTRIES
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_vioapic_init                   ; -- Begin function vioapic_init
	.p2align	2
_vioapic_init:                          ; @vioapic_init
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x20, x0
Lloh0:
	adrp	x8, _M_VIOAPIC@GOTPAGE
Lloh1:
	ldr	x8, [x8, _M_VIOAPIC@GOTPAGEOFF]
Lloh2:
	adrp	x9, _M_WAITOK@GOTPAGE
Lloh3:
	ldr	x9, [x9, _M_WAITOK@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
Lloh5:
	ldr	w8, [x9]
Lloh6:
	adrp	x9, _M_ZERO@GOTPAGE
Lloh7:
	ldr	x9, [x9, _M_ZERO@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	orr	w2, w9, w8
	mov	w0, #24
	bl	_malloc
	mov	x19, x0
	str	x20, [x0, #16]
	add	x0, x0, #8
Lloh9:
	adrp	x8, _MTX_SPIN@GOTPAGE
Lloh10:
	ldr	x8, [x8, _MTX_SPIN@GOTPAGEOFF]
Lloh11:
	ldr	w3, [x8]
Lloh12:
	adrp	x1, l_.str@PAGE
Lloh13:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, #0
	bl	_mtx_init
Lloh14:
	adrp	x8, _REDIR_ENTRIES@GOTPAGE
Lloh15:
	ldr	x8, [x8, _REDIR_ENTRIES@GOTPAGEOFF]
	ldr	w9, [x8]
	cmp	w9, #1
	b.lt	LBB0_3
; %bb.1:
	mov	x9, #0
	ldr	x10, [x19]
	mov	w11, #65536
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	str	w11, [x10, x9, lsl #2]
	add	x9, x9, #1
	ldrsw	x12, [x8]
	cmp	x9, x12
	b.lt	LBB0_2
LBB0_3:
	mov	x0, x19
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_M_VIOAPIC,4,2                  ; @M_VIOAPIC
	.comm	_M_WAITOK,4,2                   ; @M_WAITOK
	.comm	_M_ZERO,4,2                     ; @M_ZERO
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"vioapic lock"

	.comm	_MTX_SPIN,4,2                   ; @MTX_SPIN
	.comm	_REDIR_ENTRIES,4,2              ; @REDIR_ENTRIES
.subsections_via_symbols
