	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function dma_ops_area_alloc
_dma_ops_area_alloc:                    ## @dma_ops_area_alloc
	.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, %r12
	movq	%r8, %r15
	movq	%rcx, -88(%rbp)                 ## 8-byte Spill
                                        ## kill: def $edx killed $edx def $rdx
	movq	%rdx, -56(%rbp)                 ## 8-byte Spill
	movq	%rsi, %rbx
	movq	8(%rsi), %r14
	movq	_APERTURE_RANGE_SHIFT@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	shrq	%cl, %r14
	movq	(%rsi), %rax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	shrq	%cl, %r12
	movq	_APERTURE_RANGE_SIZE@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	movq	_PAGE_SHIFT@GOTPCREL(%rip), %r13
	movq	(%r13), %rax
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	callq	_dma_get_seg_boundary
	leaq	1(%rax), %rdi
	movq	_PAGE_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_ALIGN
	movq	%r14, %r9
	movq	%rax, %rdx
	movb	(%r13), %cl
	shrq	%cl, %rdx
	movq	$-1, %rax
	cmpl	%r9d, %r12d
	jge	LBB0_11
## %bb.1:
	movq	%r13, %rdi
	movq	-64(%rbp), %rcx                 ## 8-byte Reload
	movq	%rdx, -80(%rbp)                 ## 8-byte Spill
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movq	%rax, %rdx
	movq	-72(%rbp), %rsi                 ## 8-byte Reload
	orq	%rsi, %rdx
	shrq	$32, %rdx
	je	LBB0_3
## %bb.2:
	xorl	%edx, %edx
	divq	%rsi
	movq	%rdx, %r14
	jmp	LBB0_4
LBB0_3:
                                        ## kill: def $eax killed $eax killed $rax
	xorl	%edx, %edx
	divl	%esi
	movl	%edx, %r14d
LBB0_4:
                                        ## kill: def $cl killed $cl killed $rcx
	shrq	%cl, %r14
	movslq	%r12d, %r12
	movslq	%r9d, %rax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movq	16(%rbx), %rax
	movq	(%rax,%r12,8), %rax
	movq	(%rax), %rsi
	cmpq	%r15, %rsi
	jae	LBB0_9
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=1
	movq	%rdi, %r13
	movzbl	(%rdi), %ecx
	shrq	%cl, %rsi
	movq	_APERTURE_RANGE_PAGES@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%r15, %rdx
	shrq	%cl, %rdx
	callq	_iommu_device_max_index
	movq	16(%rbx), %rcx
	movq	(%rcx,%r12,8), %rcx
	movl	8(%rcx), %edi
	movq	-88(%rbp), %rcx                 ## 8-byte Reload
	movq	%rcx, (%rsp)
	movq	%rax, %rsi
	movq	%r14, %rdx
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
                                        ## kill: def $ecx killed $ecx killed $rcx
	xorl	%r8d, %r8d
	movq	-80(%rbp), %r9                  ## 8-byte Reload
	callq	_iommu_area_alloc
	cmpq	$-1, %rax
	jne	LBB0_10
## %bb.7:                               ##   in Loop: Header=BB0_5 Depth=1
	incq	%r12
	movl	$0, %r14d
	cmpq	%r12, -48(%rbp)                 ## 8-byte Folded Reload
	movq	%r13, %rdi
	jne	LBB0_5
LBB0_9:
	movq	$-1, %rax
	jmp	LBB0_11
LBB0_10:
	movq	16(%rbx), %rdx
	movb	(%r13), %cl
	shlq	%cl, %rax
	movq	(%rdx,%r12,8), %rdx
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	shll	%cl, %esi
	addq	(%rdx), %rax
	addq	%rax, %rsi
	movq	%rsi, (%rbx)
LBB0_11:
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_APERTURE_RANGE_SIZE,8,3        ## @APERTURE_RANGE_SIZE
	.comm	_APERTURE_RANGE_SHIFT,8,3       ## @APERTURE_RANGE_SHIFT
	.comm	_PAGE_SHIFT,8,3                 ## @PAGE_SHIFT
	.comm	_PAGE_SIZE,4,2                  ## @PAGE_SIZE
	.comm	_APERTURE_RANGE_PAGES,4,2       ## @APERTURE_RANGE_PAGES
	.no_dead_strip	_dma_ops_area_alloc
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function dma_ops_area_alloc
_dma_ops_area_alloc:                    ; @dma_ops_area_alloc
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x21, x4
	mov	x22, x3
	mov	x20, x2
	mov	x19, x1
Lloh0:
	adrp	x8, _APERTURE_RANGE_SIZE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _APERTURE_RANGE_SIZE@GOTPAGEOFF]
Lloh2:
	ldr	x24, [x8]
	ldp	x26, x8, [x1]
Lloh3:
	adrp	x9, _APERTURE_RANGE_SHIFT@GOTPAGE
Lloh4:
	ldr	x9, [x9, _APERTURE_RANGE_SHIFT@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	lsr	x27, x8, x9
	lsr	x28, x5, x9
Lloh6:
	adrp	x25, _PAGE_SHIFT@GOTPAGE
Lloh7:
	ldr	x25, [x25, _PAGE_SHIFT@GOTPAGEOFF]
	ldr	x23, [x25]
	bl	_dma_get_seg_boundary
	add	x0, x0, #1
Lloh8:
	adrp	x8, _PAGE_SIZE@GOTPAGE
Lloh9:
	ldr	x8, [x8, _PAGE_SIZE@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
	bl	_ALIGN
	cmp	w28, w27
	b.ge	LBB0_5
; %bb.1:
	ldr	x8, [x25]
	mov	x9, x23
	lsr	x23, x0, x8
	udiv	x8, x26, x24
	msub	x8, x8, x24, x26
	lsr	x24, x8, x9
	sxtw	x26, w28
	sxtw	x27, w27
Lloh11:
	adrp	x28, _APERTURE_RANGE_PAGES@GOTPAGE
Lloh12:
	ldr	x28, [x28, _APERTURE_RANGE_PAGES@GOTPAGEOFF]
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19, #16]
	ldr	x8, [x8, x26, lsl #3]
	ldr	x8, [x8]
	cmp	x8, x21
	b.hs	LBB0_5
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	x9, [x25]
	lsr	x1, x8, x9
	ldr	w0, [x28]
	lsr	x2, x21, x9
	bl	_iommu_device_max_index
	mov	x1, x0
	ldr	x8, [x19, #16]
	ldr	x8, [x8, x26, lsl #3]
	ldr	w0, [x8, #8]
	mov	x2, x24
	mov	x3, x20
	mov	w4, #0
	mov	x5, x23
	mov	x6, x22
	bl	_iommu_area_alloc
	cmn	x0, #1
	b.ne	LBB0_7
; %bb.4:                                ;   in Loop: Header=BB0_2 Depth=1
	mov	x24, #0
	add	x26, x26, #1
	cmp	x27, x26
	b.ne	LBB0_2
LBB0_5:
	mov	x0, #-1
LBB0_6:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
LBB0_7:
	ldr	x8, [x19, #16]
	ldr	x8, [x8, x26, lsl #3]
	ldr	x8, [x8]
	ldr	x9, [x25]
	lsl	x10, x0, x9
	lsl	w9, w20, w9
	add	x0, x10, x8
	add	x8, x0, x9
	str	x8, [x19]
	b	LBB0_6
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_APERTURE_RANGE_SIZE,8,3        ; @APERTURE_RANGE_SIZE
	.comm	_APERTURE_RANGE_SHIFT,8,3       ; @APERTURE_RANGE_SHIFT
	.comm	_PAGE_SHIFT,8,3                 ; @PAGE_SHIFT
	.comm	_PAGE_SIZE,4,2                  ; @PAGE_SIZE
	.comm	_APERTURE_RANGE_PAGES,4,2       ; @APERTURE_RANGE_PAGES
	.no_dead_strip	_dma_ops_area_alloc
.subsections_via_symbols
