	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_dma_mark_declared_memory_occupied ## -- Begin function dma_mark_declared_memory_occupied
	.p2align	4, 0x90
_dma_mark_declared_memory_occupied:     ## @dma_mark_declared_memory_occupied
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	(%rdi), %r15
	testq	%r15, %r15
	je	LBB0_1
## %bb.2:
	movq	%rsi, %rbx
	movq	_PAGE_MASK@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	notq	%rdi
	andq	%rsi, %rdi
	addq	%rdx, %rdi
	subq	(%r15), %rbx
	movq	_PAGE_SHIFT@GOTPCREL(%rip), %r12
	movb	(%r12), %cl
	shrq	%cl, %rbx
	movl	16(%r15), %r14d
	callq	_get_order
	movl	%r14d, %edi
	movl	%ebx, %esi
	movl	%eax, %edx
	callq	_bitmap_allocate_region
	testl	%eax, %eax
	je	LBB0_5
## %bb.3:
	movl	%eax, %edi
	jmp	LBB0_4
LBB0_1:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%edi, %edi
	subl	(%rax), %edi
LBB0_4:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_ERR_PTR                        ## TAILCALL
LBB0_5:
	movb	(%r12), %cl
	shll	%cl, %ebx
	movslq	%ebx, %rax
	addq	8(%r15), %rax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PAGE_MASK,8,3                  ## @PAGE_MASK
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_PAGE_SHIFT,8,3                 ## @PAGE_SHIFT
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_dma_mark_declared_memory_occupied ; -- Begin function dma_mark_declared_memory_occupied
	.p2align	2
_dma_mark_declared_memory_occupied:     ; @dma_mark_declared_memory_occupied
	.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
	ldr	x21, [x0]
	cbz	x21, LBB0_3
; %bb.1:
Lloh0:
	adrp	x8, _PAGE_MASK@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PAGE_MASK@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	bic	x8, x1, x8
	add	x0, x8, x2
	ldr	x8, [x21]
	sub	x8, x1, x8
Lloh3:
	adrp	x22, _PAGE_SHIFT@GOTPAGE
Lloh4:
	ldr	x22, [x22, _PAGE_SHIFT@GOTPAGEOFF]
	ldr	x9, [x22]
	lsr	x19, x8, x9
	ldr	w20, [x21, #16]
	bl	_get_order
	mov	x2, x0
	mov	x0, x20
	mov	x1, x19
	bl	_bitmap_allocate_region
	cbnz	w0, LBB0_4
; %bb.2:
	ldr	x8, [x21, #8]
	ldr	w9, [x22]
	lsl	w9, w19, w9
	add	x0, x8, w9, sxtw
	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
LBB0_3:
Lloh5:
	adrp	x8, _EINVAL@GOTPAGE
Lloh6:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_4:
	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
	b	_ERR_PTR
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_PAGE_MASK,8,3                  ; @PAGE_MASK
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_PAGE_SHIFT,8,3                 ; @PAGE_SHIFT
.subsections_via_symbols
