	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_dmar_init_fault_log            ## -- Begin function dmar_init_fault_log
	.p2align	4, 0x90
_dmar_init_fault_log:                   ## @dmar_init_fault_log
	.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, %rbx
	addq	$20, %rdi
	movq	_MTX_SPIN@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	leaq	L_.str(%rip), %rsi
	xorl	%edx, %edx
	callq	_mtx_init
	movl	$256, (%rbx)                    ## imm = 0x100
	leaq	L_.str.1(%rip), %rdi
	movq	%rbx, %rsi
	callq	_TUNABLE_INT_FETCH
	movl	(%rbx), %edi
	testb	$1, %dil
	je	LBB0_2
## %bb.1:
	leaq	L_.str.2(%rip), %rdi
	callq	_panic
	movl	(%rbx), %edi
LBB0_2:
	shll	$2, %edi
	movq	_M_DEVBUF@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_M_WAITOK@GOTPCREL(%rip), %r14
	movq	_M_ZERO@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	orl	(%r14), %edx
	callq	_malloc
	movl	%eax, 16(%rbx)
	leaq	12(%rbx), %rdi
	movq	_dmar_fault_task@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	xorl	%esi, %esi
	movq	%rbx, %rcx
	callq	_TASK_INIT
	movl	(%r14), %esi
	movq	_taskqueue_thread_enqueue@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	8(%rbx), %r14
	leaq	L_.str.3(%rip), %rdi
	movq	%r14, %rcx
	callq	_taskqueue_create_fast
	movl	%eax, 8(%rbx)
	movq	_PI_AV@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	4(%rbx), %r8d
	leaq	L_.str.4(%rip), %rcx
	movq	%r14, %rdi
	movl	$1, %esi
	callq	_taskqueue_start_threads
	movq	%rbx, %rdi
	callq	_DMAR_LOCK
	movq	%rbx, %rdi
	callq	_dmar_disable_fault_intr
	movq	%rbx, %rdi
	callq	_dmar_clear_faults
	movq	%rbx, %rdi
	callq	_dmar_enable_fault_intr
	movq	%rbx, %rdi
	callq	_DMAR_UNLOCK
	xorl	%eax, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"dmarflt"

	.comm	_MTX_SPIN,4,2                   ## @MTX_SPIN
L_.str.1:                               ## @.str.1
	.asciz	"hw.dmar.fault_log_size"

L_.str.2:                               ## @.str.2
	.asciz	"hw.dmar_fault_log_size must be even"

	.comm	_M_DEVBUF,4,2                   ## @M_DEVBUF
	.comm	_M_WAITOK,4,2                   ## @M_WAITOK
	.comm	_M_ZERO,4,2                     ## @M_ZERO
	.comm	_dmar_fault_task,4,2            ## @dmar_fault_task
L_.str.3:                               ## @.str.3
	.asciz	"dmarff"

	.comm	_taskqueue_thread_enqueue,4,2   ## @taskqueue_thread_enqueue
	.comm	_PI_AV,4,2                      ## @PI_AV
L_.str.4:                               ## @.str.4
	.asciz	"dmar%d fault taskq"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_dmar_init_fault_log            ; -- Begin function dmar_init_fault_log
	.p2align	2
_dmar_init_fault_log:                   ; @dmar_init_fault_log
	.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	x19, x0
	add	x0, x0, #20
Lloh0:
	adrp	x8, _MTX_SPIN@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MTX_SPIN@GOTPAGEOFF]
Lloh2:
	ldr	w3, [x8]
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, #0
	bl	_mtx_init
	mov	w8, #256
	str	w8, [x19]
Lloh5:
	adrp	x0, l_.str.1@PAGE
Lloh6:
	add	x0, x0, l_.str.1@PAGEOFF
	mov	x1, x19
	bl	_TUNABLE_INT_FETCH
	ldr	w8, [x19]
	tbz	w8, #0, LBB0_2
; %bb.1:
Lloh7:
	adrp	x0, l_.str.2@PAGE
Lloh8:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_panic
	ldr	w8, [x19]
LBB0_2:
	lsl	w0, w8, #2
Lloh9:
	adrp	x8, _M_DEVBUF@GOTPAGE
Lloh10:
	ldr	x8, [x8, _M_DEVBUF@GOTPAGEOFF]
Lloh11:
	adrp	x20, _M_WAITOK@GOTPAGE
Lloh12:
	ldr	x20, [x20, _M_WAITOK@GOTPAGEOFF]
Lloh13:
	ldr	w1, [x8]
	ldr	w8, [x20]
Lloh14:
	adrp	x9, _M_ZERO@GOTPAGE
Lloh15:
	ldr	x9, [x9, _M_ZERO@GOTPAGEOFF]
Lloh16:
	ldr	w9, [x9]
	orr	w2, w9, w8
	bl	_malloc
	str	w0, [x19, #16]
	add	x0, x19, #12
Lloh17:
	adrp	x8, _dmar_fault_task@GOTPAGE
Lloh18:
	ldr	x8, [x8, _dmar_fault_task@GOTPAGEOFF]
Lloh19:
	ldr	w2, [x8]
	mov	w1, #0
	mov	x3, x19
	bl	_TASK_INIT
	ldr	w1, [x20]
Lloh20:
	adrp	x8, _taskqueue_thread_enqueue@GOTPAGE
Lloh21:
	ldr	x8, [x8, _taskqueue_thread_enqueue@GOTPAGEOFF]
Lloh22:
	ldr	w2, [x8]
	add	x20, x19, #8
Lloh23:
	adrp	x0, l_.str.3@PAGE
Lloh24:
	add	x0, x0, l_.str.3@PAGEOFF
	mov	x3, x20
	bl	_taskqueue_create_fast
	str	w0, [x19, #8]
Lloh25:
	adrp	x8, _PI_AV@GOTPAGE
Lloh26:
	ldr	x8, [x8, _PI_AV@GOTPAGEOFF]
Lloh27:
	ldr	w2, [x8]
	ldr	w4, [x19, #4]
Lloh28:
	adrp	x3, l_.str.4@PAGE
Lloh29:
	add	x3, x3, l_.str.4@PAGEOFF
	mov	x0, x20
	mov	w1, #1
	bl	_taskqueue_start_threads
	mov	x0, x19
	bl	_DMAR_LOCK
	mov	x0, x19
	bl	_dmar_disable_fault_intr
	mov	x0, x19
	bl	_dmar_clear_faults
	mov	x0, x19
	bl	_dmar_enable_fault_intr
	mov	x0, x19
	bl	_DMAR_UNLOCK
	mov	w0, #0
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpAdd	Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh13
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"dmarflt"

	.comm	_MTX_SPIN,4,2                   ; @MTX_SPIN
l_.str.1:                               ; @.str.1
	.asciz	"hw.dmar.fault_log_size"

l_.str.2:                               ; @.str.2
	.asciz	"hw.dmar_fault_log_size must be even"

	.comm	_M_DEVBUF,4,2                   ; @M_DEVBUF
	.comm	_M_WAITOK,4,2                   ; @M_WAITOK
	.comm	_M_ZERO,4,2                     ; @M_ZERO
	.comm	_dmar_fault_task,4,2            ; @dmar_fault_task
l_.str.3:                               ; @.str.3
	.asciz	"dmarff"

	.comm	_taskqueue_thread_enqueue,4,2   ; @taskqueue_thread_enqueue
	.comm	_PI_AV,4,2                      ; @PI_AV
l_.str.4:                               ; @.str.4
	.asciz	"dmar%d fault taskq"

.subsections_via_symbols
