	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_dmar_barrier_enter             ## -- Begin function dmar_barrier_enter
	.p2align	4, 0x90
_dmar_barrier_enter:                    ## @dmar_barrier_enter
	.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	%esi, %r12d
	movq	%rdi, %rbx
	callq	_DMAR_LOCK
	movl	(%rbx), %eax
	movq	_f_done@GOTPCREL(%rip), %rcx
	xorl	%r15d, %r15d
	testl	%eax, (%rcx)
	jne	LBB0_6
## %bb.1:
	movq	_f_inproc@GOTPCREL(%rip), %r14
	movl	(%r14), %ecx
	testl	%eax, %ecx
	je	LBB0_5
## %bb.2:
	movl	%r12d, -44(%rbp)                ## 4-byte Spill
	leaq	8(%rbx), %r15
	movq	_f_wakeup@GOTPCREL(%rip), %r13
	leaq	L_.str(%rip), %r12
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	orl	(%r13), %eax
	movl	%eax, (%rbx)
	movq	%rbx, %rdi
	movq	%r15, %rsi
	xorl	%edx, %edx
	movq	%r12, %rcx
	xorl	%r8d, %r8d
	callq	_msleep
	movl	(%rbx), %eax
	testl	%eax, (%r14)
	jne	LBB0_3
## %bb.4:
	xorl	%edi, %edi
	movq	_f_done@GOTPCREL(%rip), %rcx
	andl	(%rcx), %eax
	setne	%dil
	movslq	-44(%rbp), %rsi                 ## 4-byte Folded Reload
	callq	_KASSERT
	xorl	%r15d, %r15d
	jmp	LBB0_6
LBB0_5:
	orl	%eax, %ecx
	movl	%ecx, (%rbx)
	movl	$1, %r15d
LBB0_6:
	movq	%rbx, %rdi
	callq	_DMAR_UNLOCK
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_BARRIER_F,4,2                  ## @BARRIER_F
	.comm	_f_done,4,2                     ## @f_done
	.comm	_f_inproc,4,2                   ## @f_inproc
	.comm	_f_wakeup,4,2                   ## @f_wakeup
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"dmarb"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_dmar_barrier_enter             ; -- Begin function dmar_barrier_enter
	.p2align	2
_dmar_barrier_enter:                    ; @dmar_barrier_enter
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x20, x1
	mov	x19, x0
	bl	_DMAR_LOCK
	ldr	w8, [x19]
Lloh0:
	adrp	x23, _f_done@GOTPAGE
Lloh1:
	ldr	x23, [x23, _f_done@GOTPAGEOFF]
	ldr	w9, [x23]
	tst	w9, w8
	b.eq	LBB0_2
; %bb.1:
	mov	w20, #0
	b	LBB0_7
LBB0_2:
Lloh2:
	adrp	x24, _f_inproc@GOTPAGE
Lloh3:
	ldr	x24, [x24, _f_inproc@GOTPAGEOFF]
	ldr	w9, [x24]
	tst	w9, w8
	b.eq	LBB0_6
; %bb.3:
	add	x21, x19, #8
Lloh4:
	adrp	x25, _f_wakeup@GOTPAGE
Lloh5:
	ldr	x25, [x25, _f_wakeup@GOTPAGEOFF]
Lloh6:
	adrp	x22, l_.str@PAGE
Lloh7:
	add	x22, x22, l_.str@PAGEOFF
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w9, [x25]
	orr	w8, w9, w8
	str	w8, [x19]
	mov	x0, x19
	mov	x1, x21
	mov	w2, #0
	mov	x3, x22
	mov	w4, #0
	bl	_msleep
	ldr	w8, [x19]
	ldr	w9, [x24]
	tst	w9, w8
	b.ne	LBB0_4
; %bb.5:
	ldr	w9, [x23]
	tst	w9, w8
	cset	w0, ne
	sxtw	x1, w20
	bl	_KASSERT
	mov	w20, #0
	b	LBB0_7
LBB0_6:
	orr	w8, w9, w8
	str	w8, [x19]
	mov	w20, #1
LBB0_7:
	mov	x0, x19
	bl	_DMAR_UNLOCK
	mov	x0, x20
	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
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_BARRIER_F,4,2                  ; @BARRIER_F
	.comm	_f_done,4,2                     ; @f_done
	.comm	_f_inproc,4,2                   ; @f_inproc
	.comm	_f_wakeup,4,2                   ; @f_wakeup
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"dmarb"

.subsections_via_symbols
