	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function dmar_gas_find_space
_dmar_gas_find_space:                   ## @dmar_gas_find_space
	.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
	subq	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r9, %rbx
	movl	%r8d, -48(%rbp)                 ## 4-byte Spill
	movl	%ecx, -44(%rbp)                 ## 4-byte Spill
	movl	%edx, %r12d
	movq	%rsi, %r14
	movq	%rdi, %r15
	callq	_DMAR_DOMAIN_ASSERT_LOCKED
	xorl	%edi, %edi
	cmpq	$0, (%rbx)
	sete	%dil
	movq	%rbx, %rsi
	callq	_KASSERT
	movq	_DMAR_PAGE_MASK@GOTPCREL(%rip), %rax
	xorl	%edi, %edi
	movslq	%r12d, %r13
	andl	(%rax), %r12d
	sete	%dil
	movq	%r13, %rsi
	callq	_KASSERT
	movq	%r15, -56(%rbp)
	movl	%r13d, -88(%rbp)
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	movl	%eax, -84(%rbp)
	movq	%r14, -64(%rbp)
	movl	-48(%rbp), %eax                 ## 4-byte Reload
	movl	%eax, -72(%rbp)
	movq	%rbx, -80(%rbp)
	cmpq	$0, (%r14)
	jle	LBB0_4
## %bb.1:
	leaq	8(%r15), %rdi
	callq	_RB_ROOT
	leaq	-88(%rbp), %rdi
	movl	%eax, %esi
	callq	_dmar_gas_lowermatch
	testl	%eax, %eax
	je	LBB0_2
## %bb.3:
	movq	_ENOMEM@GOTPCREL(%rip), %rcx
	xorl	%edi, %edi
	cmpl	(%rcx), %eax
	sete	%dil
	movslq	%eax, %rsi
	callq	_KASSERT
LBB0_4:
	movq	8(%r14), %rax
	cmpq	(%r15), %rax
	jge	LBB0_5
## %bb.6:
	leaq	-88(%rbp), %rdi
	callq	_dmar_gas_uppermatch
	movl	%eax, %ebx
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%edi, %edi
	cmpl	(%rax), %ebx
	sete	%dil
	movslq	%ebx, %rsi
	callq	_KASSERT
	jmp	LBB0_7
LBB0_5:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	jmp	LBB0_7
LBB0_2:
	xorl	%ebx, %ebx
LBB0_7:
	movl	%ebx, %eax
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_DMAR_PAGE_MASK,4,2             ## @DMAR_PAGE_MASK
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.no_dead_strip	_dmar_gas_find_space
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function dmar_gas_find_space
_dmar_gas_find_space:                   ; @dmar_gas_find_space
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	mov	x21, x5
	mov	x22, x4
	mov	x23, x3
	mov	x24, x2
	mov	x20, x1
	mov	x19, x0
	bl	_DMAR_DOMAIN_ASSERT_LOCKED
	ldr	x8, [x21]
	cmp	x8, #0
	cset	w0, eq
	mov	x1, x21
	bl	_KASSERT
Lloh0:
	adrp	x8, _DMAR_PAGE_MASK@GOTPAGE
Lloh1:
	ldr	x8, [x8, _DMAR_PAGE_MASK@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	tst	w8, w24
	cset	w0, eq
	sxtw	x1, w24
	bl	_KASSERT
	stp	w24, w23, [sp, #8]
	stp	x20, x19, [sp, #32]
	str	w22, [sp, #24]
	str	x21, [sp, #16]
	ldr	x8, [x20]
	cmp	x8, #1
	b.lt	LBB0_3
; %bb.1:
	add	x0, x19, #8
	bl	_RB_ROOT
	mov	x1, x0
	add	x0, sp, #8
	bl	_dmar_gas_lowermatch
                                        ; kill: def $w0 killed $w0 def $x0
	cbz	w0, LBB0_6
; %bb.2:
Lloh3:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	cmp	w0, w8
	cset	w8, eq
	sxtw	x1, w0
	mov	x0, x8
	bl	_KASSERT
LBB0_3:
	ldr	x8, [x20, #8]
	ldr	x9, [x19]
	cmp	x8, x9
	b.ge	LBB0_5
; %bb.4:
	add	x0, sp, #8
	bl	_dmar_gas_uppermatch
	mov	x19, x0
Lloh6:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh7:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	cmp	w0, w8
	cset	w0, eq
	sxtw	x1, w19
	bl	_KASSERT
	b	LBB0_7
LBB0_5:
Lloh9:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh10:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh11:
	ldr	w19, [x8]
	b	LBB0_7
LBB0_6:
	mov	w19, #0
LBB0_7:
	mov	x0, x19
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_DMAR_PAGE_MASK,4,2             ; @DMAR_PAGE_MASK
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.no_dead_strip	_dmar_gas_find_space
.subsections_via_symbols
