	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function rsxx_free_dma
_rsxx_free_dma:                         ## @rsxx_free_dma
	.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
	movq	%rsi, %rbx
	movq	(%rsi), %rax
	movq	_HW_CMD_BLK_DISCARD@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_6
## %bb.1:
	movq	%rdi, %r14
	movq	(%rdi), %rax
	movl	(%rax), %edi
	movl	8(%rbx), %esi
	callq	_pci_dma_mapping_error
	testl	%eax, %eax
	jne	LBB0_6
## %bb.2:
	movq	(%r14), %rax
	movl	(%rax), %r14d
	movl	8(%rbx), %r15d
	movq	%rbx, %rdi
	callq	_get_dma_size
	movq	(%rbx), %rcx
	movq	_HW_CMD_BLK_WRITE@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	jne	LBB0_3
## %bb.4:
	movq	_PCI_DMA_TODEVICE@GOTPCREL(%rip), %rcx
	jmp	LBB0_5
LBB0_3:
	movq	_PCI_DMA_FROMDEVICE@GOTPCREL(%rip), %rcx
LBB0_5:
	movl	(%rcx), %ecx
	movl	%r14d, %edi
	movl	%r15d, %esi
	movl	%eax, %edx
	callq	_pci_unmap_page
LBB0_6:
	movq	_rsxx_dma_pool@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%rbx, %rsi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_kmem_cache_free                ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_HW_CMD_BLK_DISCARD,8,3         ## @HW_CMD_BLK_DISCARD
	.comm	_HW_CMD_BLK_WRITE,8,3           ## @HW_CMD_BLK_WRITE
	.comm	_PCI_DMA_TODEVICE,4,2           ## @PCI_DMA_TODEVICE
	.comm	_PCI_DMA_FROMDEVICE,4,2         ## @PCI_DMA_FROMDEVICE
	.comm	_rsxx_dma_pool,4,2              ## @rsxx_dma_pool
	.no_dead_strip	_rsxx_free_dma
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function rsxx_free_dma
_rsxx_free_dma:                         ; @rsxx_free_dma
	.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	x19, x1
	ldr	x8, [x1]
Lloh0:
	adrp	x9, _HW_CMD_BLK_DISCARD@GOTPAGE
Lloh1:
	ldr	x9, [x9, _HW_CMD_BLK_DISCARD@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.eq	LBB0_3
; %bb.1:
	mov	x20, x0
	ldr	x8, [x0]
	ldr	w0, [x8]
	ldr	w1, [x19, #8]
	bl	_pci_dma_mapping_error
	cbnz	w0, LBB0_3
; %bb.2:
	ldr	x8, [x20]
	ldr	w20, [x8]
	ldr	w21, [x19, #8]
	mov	x0, x19
	bl	_get_dma_size
	mov	x2, x0
	ldr	x8, [x19]
Lloh3:
	adrp	x9, _HW_CMD_BLK_WRITE@GOTPAGE
Lloh4:
	ldr	x9, [x9, _HW_CMD_BLK_WRITE@GOTPAGEOFF]
Lloh5:
	adrp	x10, _PCI_DMA_TODEVICE@GOTPAGE
Lloh6:
	ldr	x10, [x10, _PCI_DMA_TODEVICE@GOTPAGEOFF]
Lloh7:
	ldr	x9, [x9]
Lloh8:
	adrp	x11, _PCI_DMA_FROMDEVICE@GOTPAGE
Lloh9:
	ldr	x11, [x11, _PCI_DMA_FROMDEVICE@GOTPAGEOFF]
	cmp	x8, x9
	csel	x8, x10, x11, eq
	ldr	w3, [x8]
	mov	x0, x20
	mov	x1, x21
	bl	_pci_unmap_page
LBB0_3:
Lloh10:
	adrp	x8, _rsxx_dma_pool@GOTPAGE
Lloh11:
	ldr	x8, [x8, _rsxx_dma_pool@GOTPAGEOFF]
Lloh12:
	ldr	w0, [x8]
	mov	x1, x19
	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
	b	_kmem_cache_free
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh7
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_HW_CMD_BLK_DISCARD,8,3         ; @HW_CMD_BLK_DISCARD
	.comm	_HW_CMD_BLK_WRITE,8,3           ; @HW_CMD_BLK_WRITE
	.comm	_PCI_DMA_TODEVICE,4,2           ; @PCI_DMA_TODEVICE
	.comm	_PCI_DMA_FROMDEVICE,4,2         ; @PCI_DMA_FROMDEVICE
	.comm	_rsxx_dma_pool,4,2              ; @rsxx_dma_pool
	.no_dead_strip	_rsxx_free_dma
.subsections_via_symbols
