	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function gen6_ppgtt_cleanup
_gen6_ppgtt_cleanup:                    ## @gen6_ppgtt_cleanup
	.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
	subq	$32, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movq	16(%rdi), %rdi
	testq	%rdi, %rdi
	je	LBB0_1
## %bb.2:
	cmpl	$0, (%r14)
	jle	LBB0_5
## %bb.3:
	xorl	%ebx, %ebx
	movq	_PCI_DMA_BIDIRECTIONAL@GOTPCREL(%rip), %r15
	xorl	%r12d, %r12d
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movq	24(%r14), %rax
	movl	(%rax), %eax
	movl	(%r15), %edx
	movups	(%rdi,%rbx), %xmm0
	movups	16(%rdi,%rbx), %xmm1
	movups	%xmm1, 16(%rsp)
	movups	%xmm0, (%rsp)
	movl	%eax, %edi
	movl	$4096, %esi                     ## imm = 0x1000
	callq	_pci_unmap_page
	incq	%r12
	movslq	(%r14), %rax
	movq	16(%r14), %rdi
	addq	$32, %rbx
	cmpq	%rax, %r12
	jl	LBB0_4
	jmp	LBB0_5
LBB0_1:
	xorl	%edi, %edi
LBB0_5:
	callq	_kfree
	cmpl	$0, (%r14)
	jle	LBB0_8
## %bb.6:
	xorl	%ebx, %ebx
	xorl	%r15d, %r15d
	.p2align	4, 0x90
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	movq	8(%r14), %rax
	movups	(%rax,%rbx), %xmm0
	movups	16(%rax,%rbx), %xmm1
	movups	%xmm1, 16(%rsp)
	movups	%xmm0, (%rsp)
	callq	___free_page
	incq	%r15
	movslq	(%r14), %rax
	addq	$32, %rbx
	cmpq	%rax, %r15
	jl	LBB0_7
LBB0_8:
	movq	8(%r14), %rdi
	callq	_kfree
	movq	%r14, %rdi
	addq	$32, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_kfree                          ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_PCI_DMA_BIDIRECTIONAL,4,2      ## @PCI_DMA_BIDIRECTIONAL
	.no_dead_strip	_gen6_ppgtt_cleanup
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function gen6_ppgtt_cleanup
_gen6_ppgtt_cleanup:                    ; @gen6_ppgtt_cleanup
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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	x19, x0
	ldr	x0, [x0, #16]
	cbz	x0, LBB0_4
; %bb.1:
	ldr	w8, [x19]
	cmp	w8, #1
	b.lt	LBB0_4
; %bb.2:
	mov	x20, #0
	mov	x21, #0
Lloh0:
	adrp	x22, _PCI_DMA_BIDIRECTIONAL@GOTPAGE
Lloh1:
	ldr	x22, [x22, _PCI_DMA_BIDIRECTIONAL@GOTPAGEOFF]
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19, #24]
	ldr	w8, [x8]
	ldr	w3, [x22]
	add	x9, x0, x20
	ldp	q0, q1, [x9]
	stp	q0, q1, [sp]
	mov	x1, sp
	mov	x0, x8
	mov	w2, #4096
	bl	_pci_unmap_page
	add	x21, x21, #1
	ldrsw	x8, [x19]
	ldr	x0, [x19, #16]
	add	x20, x20, #32
	cmp	x21, x8
	b.lt	LBB0_3
LBB0_4:
	bl	_kfree
	ldr	w8, [x19]
	cmp	w8, #1
	b.lt	LBB0_7
; %bb.5:
	mov	x20, #0
	mov	x21, #0
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19, #8]
	add	x8, x8, x20
	ldp	q0, q1, [x8]
	stp	q0, q1, [sp]
	mov	x0, sp
	bl	___free_page
	add	x21, x21, #1
	ldrsw	x8, [x19]
	add	x20, x20, #32
	cmp	x21, x8
	b.lt	LBB0_6
LBB0_7:
	ldr	x0, [x19, #8]
	bl	_kfree
	mov	x0, x19
	bl	_kfree
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_PCI_DMA_BIDIRECTIONAL,4,2      ; @PCI_DMA_BIDIRECTIONAL
	.no_dead_strip	_gen6_ppgtt_cleanup
.subsections_via_symbols
