	.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_1
## %bb.2:
	movq	%rdi, %r12
	movq	8(%rdi), %r13
	leaq	8(%r13), %rax
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	movq	%rsi, -56(%rbp)                 ## 8-byte Spill
	incq	%rsi
	xorl	%ebx, %ebx
	movq	_M_DEVBUF@GOTPCREL(%rip), %r15
	movq	%rdi, -72(%rbp)                 ## 8-byte Spill
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	%rsi, -80(%rbp)                 ## 8-byte Spill
	movl	(%r15), %r14d
	movl	(%r12), %edi
	callq	_DOMAINSET_PREF
	movq	_M_ZERO@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movq	_M_NOWAIT@GOTPCREL(%rip), %rdx
	orl	(%rdx), %ecx
	movl	$16, %edi
	movl	%r14d, %esi
	movl	%eax, %edx
	callq	_malloc_domainset
	testq	%rax, %rax
	je	LBB0_8
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	%rax, %r14
	movq	%rbx, -48(%rbp)                 ## 8-byte Spill
	movq	%r12, %rax
	movq	_PAGE_SIZE@GOTPCREL(%rip), %rbx
	movl	(%rbx), %r12d
	movl	(%r15), %r15d
	movl	(%rax), %edi
	callq	_DOMAINSET_PREF
	movq	_M_NOWAIT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	12(%r13), %r9d
	movl	(%rbx), %ebx
	movl	%r12d, %edi
	movl	%r15d, %esi
	movl	%eax, %edx
	xorl	%r8d, %r8d
	pushq	$0
	pushq	%rbx
	callq	_contigmalloc_domainset
	addq	$16, %rsp
	movq	%rax, (%r14)
	testq	%rax, %rax
	je	LBB0_5
## %bb.6:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	%rax, %rdi
	callq	_pmap_kextract
	movl	%eax, 8(%r14)
	movq	_bounce_lock@GOTPCREL(%rip), %rbx
	movq	%rbx, %rdi
	callq	_mtx_lock
	movq	_links@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	movq	%r14, %rsi
	callq	_STAILQ_INSERT_TAIL
	movq	_total_bpages@GOTPCREL(%rip), %rax
	incl	(%rax)
	incl	4(%r13)
	incl	(%r13)
	movq	%rbx, %rdi
	callq	_mtx_unlock
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	incl	%ebx
	movq	-80(%rbp), %rsi                 ## 8-byte Reload
	decq	%rsi
	cmpq	$1, %rsi
	movq	-72(%rbp), %r12                 ## 8-byte Reload
	movq	_M_DEVBUF@GOTPCREL(%rip), %r15
	jg	LBB0_3
## %bb.7:
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
                                        ## kill: def $ebx killed $ebx killed $rbx def $rbx
	jmp	LBB0_8
LBB0_1:
	xorl	%ebx, %ebx
	jmp	LBB0_8
LBB0_5:
	movq	_M_DEVBUF@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_free_domain
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
LBB0_8:
	movl	%ebx, %eax
	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, #144
	.cfi_def_cfa_offset 144
	stp	d9, d8, [sp, #32]               ; 16-byte Folded Spill
	stp	x28, x27, [sp, #48]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #64]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #80]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #96]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #112]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #128]            ; 16-byte Folded Spill
	add	x29, sp, #128
	.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	x22, x0
	mov	w19, #0
	ldr	x8, [x0, #8]
	str	x8, [sp, #24]                   ; 8-byte Folded Spill
	add	x8, x8, #8
	str	x8, [sp, #16]                   ; 8-byte Folded Spill
Lloh0:
	adrp	x26, _M_DEVBUF@GOTPAGE
Lloh1:
	ldr	x26, [x26, _M_DEVBUF@GOTPAGEOFF]
Lloh2:
	adrp	x28, _M_NOWAIT@GOTPAGE
Lloh3:
	ldr	x28, [x28, _M_NOWAIT@GOTPAGEOFF]
	str	x1, [sp, #8]                    ; 8-byte Folded Spill
	add	x23, x1, #1
	movi.2s	v8, #1
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w24, [x26]
	ldr	w0, [x22]
	bl	_DOMAINSET_PREF
	mov	x2, x0
	ldr	w8, [x28]
Lloh4:
	adrp	x9, _M_ZERO@GOTPAGE
Lloh5:
	ldr	x9, [x9, _M_ZERO@GOTPAGEOFF]
Lloh6:
	ldr	w9, [x9]
	orr	w3, w9, w8
	mov	w0, #16
	mov	x1, x24
	bl	_malloc_domainset
	cbz	x0, LBB0_8
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	mov	x24, x0
Lloh7:
	adrp	x21, _PAGE_SIZE@GOTPAGE
Lloh8:
	ldr	x21, [x21, _PAGE_SIZE@GOTPAGEOFF]
	ldr	w25, [x21]
	mov	x20, x26
	ldr	w26, [x26]
	mov	x27, x22
	ldr	w0, [x22]
	bl	_DOMAINSET_PREF
	mov	x2, x0
	mov	x22, x28
	ldr	w3, [x28]
	ldr	x28, [sp, #24]                  ; 8-byte Folded Reload
	ldr	w5, [x28, #12]
	ldr	w6, [x21]
	mov	x0, x25
	mov	x1, x26
	mov	x4, #0
	mov	w7, #0
	bl	_contigmalloc_domainset
	str	x0, [x24]
	cbz	x0, LBB0_7
; %bb.4:                                ;   in Loop: Header=BB0_2 Depth=1
	bl	_pmap_kextract
	str	w0, [x24, #8]
Lloh9:
	adrp	x21, _bounce_lock@GOTPAGE
Lloh10:
	ldr	x21, [x21, _bounce_lock@GOTPAGEOFF]
	mov	x0, x21
	bl	_mtx_lock
Lloh11:
	adrp	x8, _links@GOTPAGE
Lloh12:
	ldr	x8, [x8, _links@GOTPAGEOFF]
Lloh13:
	ldr	w2, [x8]
	ldr	x0, [sp, #16]                   ; 8-byte Folded Reload
	mov	x1, x24
	bl	_STAILQ_INSERT_TAIL
Lloh14:
	adrp	x9, _total_bpages@GOTPAGE
Lloh15:
	ldr	x9, [x9, _total_bpages@GOTPAGEOFF]
	ldr	w8, [x9]
	add	w8, w8, #1
	str	w8, [x9]
	ldr	d0, [x28]
	add.2s	v0, v0, v8
	str	d0, [x28]
	mov	x0, x21
	bl	_mtx_unlock
	add	w19, w19, #1
	sub	x23, x23, #1
	cmp	x23, #1
	mov	x26, x20
	mov	x28, x22
	mov	x22, x27
	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, [x20]
	mov	x0, x24
	bl	_free_domain
LBB0_8:
	mov	x0, x19
	ldp	x29, x30, [sp, #128]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #112]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #96]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #80]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #64]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #48]             ; 16-byte Folded Reload
	ldp	d9, d8, [sp, #32]               ; 16-byte Folded Reload
	add	sp, sp, #144
	ret
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh9, Lloh10
	.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
