	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function _bus_dmamap_reserve_pages
__bus_dmamap_reserve_pages:             ## @_bus_dmamap_reserve_pages
	.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
	movl	%edx, %ebx
	movl	%esi, %r14d
	movl	%edi, %r15d
	movq	_bounce_lock@GOTPCREL(%rip), %rdi
	callq	_mtx_lock
	movq	_BUS_DMA_NOWAIT@GOTPCREL(%rip), %rax
	testl	%ebx, (%rax)
	je	LBB0_3
## %bb.1:
	movl	%r15d, %edi
	movl	%r14d, %esi
	xorl	%edx, %edx
	callq	_reserve_bounce_pages
	testq	%rax, %rax
	je	LBB0_5
## %bb.2:
	movq	_bounce_lock@GOTPCREL(%rip), %rdi
	callq	_mtx_unlock
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	jmp	LBB0_6
LBB0_3:
	movl	%r15d, %edi
	movl	%r14d, %esi
	movl	$1, %edx
	callq	_reserve_bounce_pages
	testq	%rax, %rax
	je	LBB0_5
## %bb.4:
	movq	_links@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_bounce_map_waitinglist@GOTPCREL(%rip), %rdi
	movl	%r14d, %esi
	callq	_STAILQ_INSERT_TAIL
	movq	_bounce_lock@GOTPCREL(%rip), %rdi
	callq	_mtx_unlock
	movq	_EINPROGRESS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	jmp	LBB0_6
LBB0_5:
	movq	_bounce_lock@GOTPCREL(%rip), %rdi
	callq	_mtx_unlock
	xorl	%eax, %eax
LBB0_6:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_bounce_lock,4,2                ## @bounce_lock
	.comm	_BUS_DMA_NOWAIT,4,2             ## @BUS_DMA_NOWAIT
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_bounce_map_waitinglist,4,2     ## @bounce_map_waitinglist
	.comm	_links,4,2                      ## @links
	.comm	_EINPROGRESS,4,2                ## @EINPROGRESS
	.no_dead_strip	__bus_dmamap_reserve_pages
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function _bus_dmamap_reserve_pages
__bus_dmamap_reserve_pages:             ; @_bus_dmamap_reserve_pages
	.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	x21, x2
	mov	x19, x1
	mov	x20, x0
Lloh0:
	adrp	x0, _bounce_lock@GOTPAGE
Lloh1:
	ldr	x0, [x0, _bounce_lock@GOTPAGEOFF]
	bl	_mtx_lock
Lloh2:
	adrp	x8, _BUS_DMA_NOWAIT@GOTPAGE
Lloh3:
	ldr	x8, [x8, _BUS_DMA_NOWAIT@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	mov	x0, x20
	tst	w8, w21
	b.eq	LBB0_3
; %bb.1:
	mov	x1, x19
	mov	w2, #0
	bl	_reserve_bounce_pages
	cbz	x0, LBB0_5
; %bb.2:
Lloh5:
	adrp	x0, _bounce_lock@GOTPAGE
Lloh6:
	ldr	x0, [x0, _bounce_lock@GOTPAGEOFF]
	bl	_mtx_unlock
Lloh7:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh8:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh9:
	ldr	w0, [x8]
	b	LBB0_6
LBB0_3:
	mov	x1, x19
	mov	w2, #1
	bl	_reserve_bounce_pages
	cbz	x0, LBB0_5
; %bb.4:
Lloh10:
	adrp	x8, _links@GOTPAGE
Lloh11:
	ldr	x8, [x8, _links@GOTPAGEOFF]
Lloh12:
	ldr	w2, [x8]
Lloh13:
	adrp	x0, _bounce_map_waitinglist@GOTPAGE
Lloh14:
	ldr	x0, [x0, _bounce_map_waitinglist@GOTPAGEOFF]
	mov	x1, x19
	bl	_STAILQ_INSERT_TAIL
Lloh15:
	adrp	x0, _bounce_lock@GOTPAGE
Lloh16:
	ldr	x0, [x0, _bounce_lock@GOTPAGEOFF]
	bl	_mtx_unlock
Lloh17:
	adrp	x8, _EINPROGRESS@GOTPAGE
Lloh18:
	ldr	x8, [x8, _EINPROGRESS@GOTPAGEOFF]
Lloh19:
	ldr	w0, [x8]
	b	LBB0_6
LBB0_5:
Lloh20:
	adrp	x0, _bounce_lock@GOTPAGE
Lloh21:
	ldr	x0, [x0, _bounce_lock@GOTPAGEOFF]
	bl	_mtx_unlock
	mov	w0, #0
LBB0_6:
	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	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh20, Lloh21
	.cfi_endproc
                                        ; -- End function
	.comm	_bounce_lock,4,2                ; @bounce_lock
	.comm	_BUS_DMA_NOWAIT,4,2             ; @BUS_DMA_NOWAIT
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_bounce_map_waitinglist,4,2     ; @bounce_map_waitinglist
	.comm	_links,4,2                      ; @links
	.comm	_EINPROGRESS,4,2                ; @EINPROGRESS
	.no_dead_strip	__bus_dmamap_reserve_pages
.subsections_via_symbols
