	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function alloc_bounce_pages
_alloc_bounce_pages:                    ## @alloc_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	%r13
	pushq	%r12
	pushq	%rbx
	subq	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	testq	%rsi, %rsi
	jle	LBB0_6
## %bb.1:
	movq	(%rdi), %rax
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	addq	$8, %rax
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	movq	%rsi, -56(%rbp)                 ## 8-byte Spill
	movq	%rsi, %r15
	incq	%r15
	xorl	%eax, %eax
	movq	_M_DEVBUF@GOTPCREL(%rip), %r12
	movq	_M_NOWAIT@GOTPCREL(%rip), %r13
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movl	(%r12), %esi
	movq	_M_ZERO@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	orl	(%r13), %edx
	movl	$16, %edi
	callq	_malloc
	testq	%rax, %rax
	je	LBB0_9
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	%rax, %rbx
	movq	_PAGE_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%r12, %r14
	movl	(%r12), %esi
	movl	(%r13), %edx
	movq	-72(%rbp), %r12                 ## 8-byte Reload
	movl	12(%r12), %r8d
	movl	$0, (%rsp)
	xorl	%ecx, %ecx
	movl	%edi, %r9d
	callq	_contigmalloc
	movq	%rax, (%rbx)
	testq	%rax, %rax
	je	LBB0_8
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	%rax, %rdi
	callq	_pmap_kextract
	movl	%eax, 8(%rbx)
	movq	_bounce_lock@GOTPCREL(%rip), %rdi
	callq	_mtx_lock
	movq	_links@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	movq	%rbx, %rsi
	callq	_STAILQ_INSERT_TAIL
	movq	_total_bpages@GOTPCREL(%rip), %rax
	incl	(%rax)
	incl	4(%r12)
	incl	(%r12)
	movq	_bounce_lock@GOTPCREL(%rip), %rdi
	callq	_mtx_unlock
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	incl	%eax
	decq	%r15
	cmpq	$1, %r15
	movq	%r14, %r12
	jg	LBB0_2
## %bb.5:
	movq	-56(%rbp), %r13                 ## 8-byte Reload
	movl	%r13d, %eax
	jmp	LBB0_10
LBB0_6:
	xorl	%eax, %eax
	jmp	LBB0_10
LBB0_8:
	movl	(%r14), %esi
	movq	%rbx, %rdi
	callq	_free
LBB0_9:
	movq	-48(%rbp), %rax                 ## 8-byte Reload
LBB0_10:
                                        ## kill: def $eax killed $eax killed $rax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_M_DEVBUF,4,2                   ## @M_DEVBUF
	.comm	_M_NOWAIT,4,2                   ## @M_NOWAIT
	.comm	_M_ZERO,4,2                     ## @M_ZERO
	.comm	_PAGE_SIZE,4,2                  ## @PAGE_SIZE
	.comm	_bounce_lock,4,2                ## @bounce_lock
	.comm	_links,4,2                      ## @links
	.comm	_total_bpages,4,2               ## @total_bpages
	.no_dead_strip	_alloc_bounce_pages
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function alloc_bounce_pages
_alloc_bounce_pages:                    ; @alloc_bounce_pages
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	d9, d8, [sp, #16]               ; 16-byte Folded Spill
	stp	x28, x27, [sp, #32]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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
	.cfi_offset b8, -104
	.cfi_offset b9, -112
	cmp	x1, #1
	b.lt	LBB0_6
; %bb.1:
	mov	w19, #0
	ldr	x24, [x0]
	add	x21, x24, #8
Lloh0:
	adrp	x25, _M_DEVBUF@GOTPAGE
Lloh1:
	ldr	x25, [x25, _M_DEVBUF@GOTPAGEOFF]
Lloh2:
	adrp	x26, _M_NOWAIT@GOTPAGE
Lloh3:
	ldr	x26, [x26, _M_NOWAIT@GOTPAGEOFF]
Lloh4:
	adrp	x27, _M_ZERO@GOTPAGE
Lloh5:
	ldr	x27, [x27, _M_ZERO@GOTPAGEOFF]
Lloh6:
	adrp	x22, _bounce_lock@GOTPAGE
Lloh7:
	ldr	x22, [x22, _bounce_lock@GOTPAGEOFF]
	str	x1, [sp, #8]                    ; 8-byte Folded Spill
	add	x20, x1, #1
Lloh8:
	adrp	x28, _total_bpages@GOTPAGE
Lloh9:
	ldr	x28, [x28, _total_bpages@GOTPAGEOFF]
	movi.2s	v8, #1
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w1, [x25]
	ldr	w8, [x26]
	ldr	w9, [x27]
	orr	w2, w9, w8
	mov	w0, #16
	bl	_malloc
	cbz	x0, LBB0_8
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	mov	x23, x0
Lloh10:
	adrp	x8, _PAGE_SIZE@GOTPAGE
Lloh11:
	ldr	x8, [x8, _PAGE_SIZE@GOTPAGEOFF]
Lloh12:
	ldr	w0, [x8]
	ldr	w1, [x25]
	ldr	w2, [x26]
	ldr	w4, [x24, #12]
	mov	x3, #0
	mov	x5, x0
	mov	w6, #0
	bl	_contigmalloc
	str	x0, [x23]
	cbz	x0, LBB0_7
; %bb.4:                                ;   in Loop: Header=BB0_2 Depth=1
	bl	_pmap_kextract
	str	w0, [x23, #8]
	mov	x0, x22
	bl	_mtx_lock
Lloh13:
	adrp	x8, _links@GOTPAGE
Lloh14:
	ldr	x8, [x8, _links@GOTPAGEOFF]
Lloh15:
	ldr	w2, [x8]
	mov	x0, x21
	mov	x1, x23
	bl	_STAILQ_INSERT_TAIL
	ldr	w8, [x28]
	add	w8, w8, #1
	str	w8, [x28]
	ldr	d0, [x24]
	add.2s	v0, v0, v8
	str	d0, [x24]
	mov	x0, x22
	bl	_mtx_unlock
	add	w19, w19, #1
	sub	x20, x20, #1
	cmp	x20, #1
	b.gt	LBB0_2
; %bb.5:
	ldr	x8, [sp, #8]                    ; 8-byte Folded Reload
	mov	x19, x8
	b	LBB0_8
LBB0_6:
	mov	w19, #0
	b	LBB0_8
LBB0_7:
	ldr	w1, [x25]
	mov	x0, x23
	bl	_free
LBB0_8:
	mov	x0, x19
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #32]             ; 16-byte Folded Reload
	ldp	d9, d8, [sp, #16]               ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_M_DEVBUF,4,2                   ; @M_DEVBUF
	.comm	_M_NOWAIT,4,2                   ; @M_NOWAIT
	.comm	_M_ZERO,4,2                     ; @M_ZERO
	.comm	_PAGE_SIZE,4,2                  ; @PAGE_SIZE
	.comm	_bounce_lock,4,2                ; @bounce_lock
	.comm	_links,4,2                      ; @links
	.comm	_total_bpages,4,2               ; @total_bpages
	.no_dead_strip	_alloc_bounce_pages
.subsections_via_symbols
