	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function viommu_domain_finalise
_viommu_domain_finalise:                ## @viommu_domain_finalise
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r15
	movq	%rdi, %rbx
	movq	%rsi, %rdi
	callq	_to_viommu_domain
	movq	%rax, %r14
	movq	%rbx, 8(%rax)
	movl	20(%rbx), %eax
	movl	%eax, 4(%r14)
	movl	16(%rbx), %eax
	movl	%eax, 4(%r15)
	movl	12(%rbx), %eax
	movl	%eax, (%r15)
	leaq	8(%rbx), %rdi
	movl	(%rbx), %edx
	movl	4(%rbx), %esi
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	callq	_ida_alloc_range
	testl	%eax, %eax
	js	LBB0_2
## %bb.1:
	movl	%eax, (%r14)
LBB0_2:
	movl	%eax, %ecx
	sarl	$31, %ecx
	andl	%eax, %ecx
	movl	%ecx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.no_dead_strip	_viommu_domain_finalise
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function viommu_domain_finalise
_viommu_domain_finalise:                ; @viommu_domain_finalise
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x20, x1
	mov	x21, x0
	mov	x0, x1
	bl	_to_viommu_domain
	mov	x19, x0
	str	x21, [x0, #8]
	ldr	w8, [x21, #20]
	str	w8, [x0, #4]
	ldur	d0, [x21, #12]
	str	d0, [x20]
	add	x0, x21, #8
	ldp	w2, w1, [x21]
Lloh0:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh2:
	ldr	w3, [x8]
	bl	_ida_alloc_range
	tbnz	w0, #31, LBB0_2
; %bb.1:
	str	w0, [x19]
LBB0_2:
	cmp	w0, #0
	csel	w0, w0, wzr, lt
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.no_dead_strip	_viommu_domain_finalise
.subsections_via_symbols
