	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function dmar_gas_uppermatch
_dmar_gas_uppermatch:                   ## @dmar_gas_uppermatch
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movq	8(%rdi), %rax
	movq	(%rax), %rax
	movq	%rax, -56(%rbp)
	movq	_dmar_gas_entries_tree@GOTPCREL(%rip), %r15
	movl	(%r15), %edi
	movq	(%r14), %rsi
	addq	$4, %rsi
	leaq	-56(%rbp), %rdx
	callq	_RB_NFIND
	testq	%rax, %rax
	je	LBB0_5
## %bb.1:
	movq	%rax, %rbx
	movl	(%r15), %edi
	movq	(%r14), %rsi
	addq	$4, %rsi
	movq	%rax, %rdx
	callq	_RB_PREV
	movq	%rax, %r12
	xorl	%edi, %edi
	testq	%rax, %rax
	setne	%dil
	movslq	-56(%rbp), %rsi
	callq	_KASSERT
	movq	_DMAR_PAGE_SIZE@GOTPCREL(%rip), %r13
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	%rbx, %r15
	movq	(%r13), %rdi
	addq	(%r12), %rdi
	movq	8(%r14), %rax
	movq	16(%r14), %rcx
	movq	(%rax), %rdx
	cmpq	%rdx, %rdi
	cmovleq	%rdx, %rdi
	movq	%rdi, (%rcx)
	movl	8(%rax), %esi
	callq	_roundup2
	movq	16(%r14), %rcx
	movq	%rax, (%rcx)
	movq	(%r14), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	movq	%r12, %rsi
	callq	_dmar_gas_match_one
	testq	%rax, %rax
	jne	LBB0_3
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	_dmar_gas_entries_tree@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	(%r14), %rsi
	addq	$4, %rsi
	movq	%r15, %rdx
	callq	_RB_NEXT
	movq	%rax, %rbx
	xorl	%edi, %edi
	testq	%rax, %rax
	setne	%dil
	movslq	-56(%rbp), %rsi
	callq	_KASSERT
	movl	8(%rbx), %eax
	movq	(%r14), %rcx
	movq	%r15, %r12
	cmpl	(%rcx), %eax
	jl	LBB0_2
LBB0_5:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	jmp	LBB0_6
LBB0_3:
	movq	%r14, %rdi
	movq	%r12, %rsi
	callq	_dmar_gas_match_insert
	xorl	%eax, %eax
LBB0_6:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_dmar_gas_entries_tree,4,2      ## @dmar_gas_entries_tree
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_DMAR_PAGE_SIZE,8,3             ## @DMAR_PAGE_SIZE
	.no_dead_strip	_dmar_gas_uppermatch
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function dmar_gas_uppermatch
_dmar_gas_uppermatch:                   ; @dmar_gas_uppermatch
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.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
	mov	x19, x0
	ldp	x9, x8, [x0]
	ldr	x8, [x8]
	str	x8, [sp]
Lloh0:
	adrp	x23, _dmar_gas_entries_tree@GOTPAGE
Lloh1:
	ldr	x23, [x23, _dmar_gas_entries_tree@GOTPAGEOFF]
	ldr	w0, [x23]
	add	x1, x9, #4
	mov	x2, sp
	bl	_RB_NFIND
	cbz	x0, LBB0_4
; %bb.1:
	mov	x22, x0
	ldr	w0, [x23]
	ldr	x8, [x19]
	add	x1, x8, #4
	mov	x2, x22
	bl	_RB_PREV
	mov	x21, x0
	cmp	x0, #0
	cset	w0, ne
	ldrsw	x1, [sp]
	bl	_KASSERT
Lloh2:
	adrp	x24, _DMAR_PAGE_SIZE@GOTPAGE
Lloh3:
	ldr	x24, [x24, _DMAR_PAGE_SIZE@GOTPAGEOFF]
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	mov	x20, x22
	ldr	x8, [x21]
	ldr	x9, [x24]
	ldp	x11, x10, [x19, #8]
	ldr	x12, [x11]
	add	x8, x9, x8
	cmp	x8, x12
	csel	x0, x8, x12, gt
	str	x0, [x10]
	ldr	w1, [x11, #8]
	bl	_roundup2
	ldr	x8, [x19, #16]
	str	x0, [x8]
	ldr	x8, [x19]
	ldr	w2, [x8]
	mov	x0, x19
	mov	x1, x21
	bl	_dmar_gas_match_one
	cbnz	x0, LBB0_5
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	w0, [x23]
	ldr	x8, [x19]
	add	x1, x8, #4
	mov	x2, x20
	bl	_RB_NEXT
	mov	x22, x0
	cmp	x0, #0
	cset	w0, ne
	ldrsw	x1, [sp]
	bl	_KASSERT
	ldr	w8, [x22, #8]
	ldr	x9, [x19]
	ldr	w9, [x9]
	mov	x21, x20
	cmp	w8, w9
	b.lt	LBB0_2
LBB0_4:
Lloh4:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh5:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh6:
	ldr	w0, [x8]
	b	LBB0_6
LBB0_5:
	mov	x0, x19
	mov	x1, x21
	bl	_dmar_gas_match_insert
	mov	w0, #0
LBB0_6:
	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
	add	sp, sp, #80
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_dmar_gas_entries_tree,4,2      ; @dmar_gas_entries_tree
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_DMAR_PAGE_SIZE,8,3             ; @DMAR_PAGE_SIZE
	.no_dead_strip	_dmar_gas_uppermatch
.subsections_via_symbols
