	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function iop_desc_unmap
_iop_desc_unmap:                        ## @iop_desc_unmap
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	movq	8(%rsi), %rbx
	movq	(%rdi), %rax
	movq	(%rax), %rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movl	(%rbx), %r13d
	movl	4(%rbx), %r14d
	movq	%rsi, -64(%rbp)                 ## 8-byte Spill
	movl	16(%rsi), %r12d
	movq	%rbx, %rdi
	movq	%r15, %rsi
	callq	_iop_desc_get_dest_addr
	movl	%r12d, %ecx
	movq	%rax, %r12
	movq	_DMA_COMPL_SKIP_DEST_UNMAP@GOTPCREL(%rip), %rax
	testl	%ecx, (%rax)
	jne	LBB0_5
## %bb.1:
	cmpl	$2, %r14d
	movl	%ecx, -44(%rbp)                 ## 4-byte Spill
	jl	LBB0_2
## %bb.3:
	movq	_DMA_BIDIRECTIONAL@GOTPCREL(%rip), %rax
	jmp	LBB0_4
LBB0_2:
	movq	_DMA_FROM_DEVICE@GOTPCREL(%rip), %rax
LBB0_4:
	movl	(%rax), %ecx
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movq	%r12, %rsi
	movl	%r13d, %edx
	callq	_dma_unmap_page
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
LBB0_5:
	movq	_DMA_COMPL_SKIP_SRC_UNMAP@GOTPCREL(%rip), %rax
	testl	%ecx, (%rax)
	jne	LBB0_11
## %bb.6:
	testl	%r14d, %r14d
	je	LBB0_11
## %bb.7:
	decl	%r14d
	jmp	LBB0_8
	.p2align	4, 0x90
LBB0_10:                                ##   in Loop: Header=BB0_8 Depth=1
	addl	$-1, %r14d
	jae	LBB0_11
LBB0_8:                                 ## =>This Inner Loop Header: Depth=1
	movq	%rbx, %rdi
	movq	%r15, %rsi
	movl	%r14d, %edx
	callq	_iop_desc_get_src_addr
	cmpq	%r12, %rax
	je	LBB0_10
## %bb.9:                               ##   in Loop: Header=BB0_8 Depth=1
	movq	_DMA_TO_DEVICE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movq	%rax, %rsi
	movl	%r13d, %edx
	callq	_dma_unmap_page
	jmp	LBB0_10
LBB0_11:
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movq	$0, 8(%rax)
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_DMA_COMPL_SKIP_DEST_UNMAP,4,2  ## @DMA_COMPL_SKIP_DEST_UNMAP
	.comm	_DMA_BIDIRECTIONAL,4,2          ## @DMA_BIDIRECTIONAL
	.comm	_DMA_FROM_DEVICE,4,2            ## @DMA_FROM_DEVICE
	.comm	_DMA_COMPL_SKIP_SRC_UNMAP,4,2   ## @DMA_COMPL_SKIP_SRC_UNMAP
	.comm	_DMA_TO_DEVICE,4,2              ## @DMA_TO_DEVICE
	.no_dead_strip	_iop_desc_unmap
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function iop_desc_unmap
_iop_desc_unmap:                        ; @iop_desc_unmap
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x19, x1
	mov	x20, x0
	ldr	x21, [x1, #8]
	ldr	x8, [x0]
	ldr	x22, [x8]
	ldr	w26, [x1, #16]
	ldp	w23, w25, [x21]
	mov	x0, x21
	mov	x1, x20
	bl	_iop_desc_get_dest_addr
	mov	x24, x0
Lloh0:
	adrp	x8, _DMA_COMPL_SKIP_DEST_UNMAP@GOTPAGE
Lloh1:
	ldr	x8, [x8, _DMA_COMPL_SKIP_DEST_UNMAP@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	tst	w8, w26
	b.ne	LBB0_2
; %bb.1:
Lloh3:
	adrp	x8, _DMA_BIDIRECTIONAL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _DMA_BIDIRECTIONAL@GOTPAGEOFF]
Lloh5:
	adrp	x9, _DMA_FROM_DEVICE@GOTPAGE
Lloh6:
	ldr	x9, [x9, _DMA_FROM_DEVICE@GOTPAGEOFF]
	cmp	w25, #1
	csel	x8, x8, x9, gt
	ldr	w3, [x8]
	mov	x0, x22
	mov	x1, x24
	mov	x2, x23
	bl	_dma_unmap_page
LBB0_2:
Lloh7:
	adrp	x8, _DMA_COMPL_SKIP_SRC_UNMAP@GOTPAGE
Lloh8:
	ldr	x8, [x8, _DMA_COMPL_SKIP_SRC_UNMAP@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	and	w8, w8, w26
	cmp	w8, #0
	ccmp	w25, #0, #4, eq
	b.ne	LBB0_4
LBB0_3:
	str	xzr, [x19, #8]
	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
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
LBB0_4:
	sub	w25, w25, #1
Lloh10:
	adrp	x26, _DMA_TO_DEVICE@GOTPAGE
Lloh11:
	ldr	x26, [x26, _DMA_TO_DEVICE@GOTPAGEOFF]
	b	LBB0_6
LBB0_5:                                 ;   in Loop: Header=BB0_6 Depth=1
	sub	w25, w25, #1
	cmn	w25, #1
	b.eq	LBB0_3
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x21
	mov	x1, x20
	mov	x2, x25
	bl	_iop_desc_get_src_addr
	cmp	x0, x24
	b.eq	LBB0_5
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	mov	x1, x0
	ldr	w3, [x26]
	mov	x0, x22
	mov	x2, x23
	bl	_dma_unmap_page
	b	LBB0_5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_DMA_COMPL_SKIP_DEST_UNMAP,4,2  ; @DMA_COMPL_SKIP_DEST_UNMAP
	.comm	_DMA_BIDIRECTIONAL,4,2          ; @DMA_BIDIRECTIONAL
	.comm	_DMA_FROM_DEVICE,4,2            ; @DMA_FROM_DEVICE
	.comm	_DMA_COMPL_SKIP_SRC_UNMAP,4,2   ; @DMA_COMPL_SKIP_SRC_UNMAP
	.comm	_DMA_TO_DEVICE,4,2              ; @DMA_TO_DEVICE
	.no_dead_strip	_iop_desc_unmap
.subsections_via_symbols
