	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function reserve_bounce_pages
_reserve_bounce_pages:                  ## @reserve_bounce_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, %r14d
	movq	%rsi, %rbx
	movq	%rdi, %r15
	movq	_MA_OWNED@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_bounce_lock@GOTPCREL(%rip), %rdi
	callq	_mtx_assert
	movq	(%r15), %r15
	movl	(%r15), %edi
	movq	(%rbx), %rsi
	subq	8(%rbx), %rsi
	callq	_MIN
	testl	%r14d, %r14d
	je	LBB0_2
## %bb.1:
	movq	(%rbx), %rdx
	movslq	%eax, %rsi
	addq	8(%rbx), %rsi
	jmp	LBB0_3
LBB0_2:
	movq	(%rbx), %rdx
	movslq	%eax, %rsi
	addq	8(%rbx), %rsi
	movq	%rdx, %rcx
	subq	%rsi, %rcx
	jg	LBB0_4
LBB0_3:
	subl	%eax, (%r15)
	addl	%eax, 4(%r15)
	movq	%rsi, 8(%rbx)
	subq	%rsi, %rdx
	movq	%rdx, %rcx
LBB0_4:
	movl	%ecx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_bounce_lock,4,2                ## @bounce_lock
	.comm	_MA_OWNED,4,2                   ## @MA_OWNED
	.no_dead_strip	_reserve_bounce_pages
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function reserve_bounce_pages
_reserve_bounce_pages:                  ; @reserve_bounce_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	x20, x2
	mov	x19, x1
	mov	x21, x0
Lloh0:
	adrp	x8, _MA_OWNED@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MA_OWNED@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
Lloh3:
	adrp	x0, _bounce_lock@GOTPAGE
Lloh4:
	ldr	x0, [x0, _bounce_lock@GOTPAGEOFF]
	bl	_mtx_assert
	ldr	x21, [x21]
	ldr	w0, [x21]
	ldp	x8, x9, [x19]
	sub	x1, x8, x9
	bl	_MIN
	cbz	w20, LBB0_2
; %bb.1:
	ldp	x9, x8, [x19]
	add	x10, x8, w0, sxtw
	b	LBB0_3
LBB0_2:
	ldp	x9, x8, [x19]
	add	x10, x8, w0, sxtw
	subs	x8, x9, x10
	b.gt	LBB0_4
LBB0_3:
	ldp	w8, w11, [x21]
	sub	w8, w8, w0
	add	w11, w11, w0
	stp	w8, w11, [x21]
	str	x10, [x19, #8]
	sub	x8, x9, x10
LBB0_4:
	mov	x0, x8
	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 AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_bounce_lock,4,2                ; @bounce_lock
	.comm	_MA_OWNED,4,2                   ; @MA_OWNED
	.no_dead_strip	_reserve_bounce_pages
.subsections_via_symbols
