	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function iop_desc_unmap_pq
_iop_desc_unmap_pq:                     ## @iop_desc_unmap_pq
	.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
	movq	%rsi, %r15
	movq	%rdi, %r13
	movq	8(%rsi), %rbx
	movq	(%rdi), %rax
	movq	(%rax), %rax
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	movl	(%rbx), %eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movl	4(%rbx), %r12d
	movl	24(%rsi), %r14d
	movq	%rbx, %rdi
	movq	%r13, %rsi
	callq	_iop_desc_get_dest_addr
	movl	%eax, -48(%rbp)                 ## 4-byte Spill
	movq	%rbx, %rdi
	movq	%r13, %rsi
	callq	_iop_desc_get_qdest_addr
	movq	_DMA_PREP_CONTINUE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	leal	-3(%r12), %esi
	testl	%ecx, 24(%r15)
	cmovel	%r12d, %esi
	movl	%eax, %r12d
	movq	_DMA_COMPL_SKIP_DEST_UNMAP@GOTPCREL(%rip), %rax
	testl	%r14d, (%rax)
	jne	LBB0_3
## %bb.1:
	cmpq	$0, 16(%r15)
	jne	LBB0_3
## %bb.2:
	movq	_DMA_BIDIRECTIONAL@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%rbx, -64(%rbp)                 ## 8-byte Spill
	movq	%r13, %rbx
	movq	-72(%rbp), %r13                 ## 8-byte Reload
	movq	%r13, %rdi
	movq	%r15, -56(%rbp)                 ## 8-byte Spill
	movl	%esi, -76(%rbp)                 ## 4-byte Spill
	movl	-48(%rbp), %esi                 ## 4-byte Reload
	movl	-44(%rbp), %r15d                ## 4-byte Reload
	movl	%r15d, %edx
	callq	_dma_unmap_page
	movq	_DMA_BIDIRECTIONAL@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%r13, %rdi
	movq	%rbx, %r13
	movq	-64(%rbp), %rbx                 ## 8-byte Reload
	movl	%r12d, %esi
	movl	%r15d, %edx
	callq	_dma_unmap_page
	movl	-76(%rbp), %esi                 ## 4-byte Reload
	movq	-56(%rbp), %r15                 ## 8-byte Reload
LBB0_3:
	movq	_DMA_COMPL_SKIP_SRC_UNMAP@GOTPCREL(%rip), %rax
	testl	%r14d, (%rax)
	jne	LBB0_9
## %bb.4:
	movl	%r12d, -64(%rbp)                ## 4-byte Spill
	movq	%r15, -56(%rbp)                 ## 8-byte Spill
	testl	%esi, %esi
	movq	-72(%rbp), %r15                 ## 8-byte Reload
	jle	LBB0_7
## %bb.5:
	xorl	%r14d, %r14d
	.p2align	4, 0x90
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movq	%rbx, %rdi
	movl	%esi, %r12d
	movq	%r13, %rsi
	movl	%r14d, %edx
	callq	_iop_desc_get_src_addr
	movq	_DMA_TO_DEVICE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movq	%r15, %rdi
	movl	%eax, %esi
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	callq	_dma_unmap_page
	movl	%r12d, %esi
	incl	%r14d
	cmpl	%r14d, %r12d
	jne	LBB0_6
LBB0_7:
	movq	-56(%rbp), %r15                 ## 8-byte Reload
	cmpq	$0, 16(%r15)
	movl	-64(%rbp), %r12d                ## 4-byte Reload
	je	LBB0_9
## %bb.8:
	movq	_DMA_TO_DEVICE@GOTPCREL(%rip), %r14
	movl	(%r14), %ecx
	movq	-72(%rbp), %r15                 ## 8-byte Reload
	movq	%r15, %rdi
	movl	-48(%rbp), %esi                 ## 4-byte Reload
	movl	-44(%rbp), %ebx                 ## 4-byte Reload
	movl	%ebx, %edx
	callq	_dma_unmap_page
	movl	(%r14), %ecx
	movq	%r15, %rdi
	movl	%r12d, %esi
	movl	%ebx, %edx
	callq	_dma_unmap_page
	movq	-56(%rbp), %r15                 ## 8-byte Reload
LBB0_9:
	movq	$0, 8(%r15)
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_DMA_PREP_CONTINUE,4,2          ## @DMA_PREP_CONTINUE
	.comm	_DMA_COMPL_SKIP_DEST_UNMAP,4,2  ## @DMA_COMPL_SKIP_DEST_UNMAP
	.comm	_DMA_BIDIRECTIONAL,4,2          ## @DMA_BIDIRECTIONAL
	.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_pq
.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_pq
_iop_desc_unmap_pq:                     ; @iop_desc_unmap_pq
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	mov	x19, x1
	mov	x22, x0
	ldr	x23, [x1, #8]
	ldr	x8, [x0]
	ldr	x20, [x8]
	ldr	w26, [x1, #24]
	ldp	w21, w27, [x23]
	mov	x0, x23
	mov	x1, x22
	bl	_iop_desc_get_dest_addr
	mov	x25, x0
	mov	x0, x23
	mov	x1, x22
	bl	_iop_desc_get_qdest_addr
	mov	x24, x0
	ldr	w8, [x19, #24]
Lloh0:
	adrp	x9, _DMA_PREP_CONTINUE@GOTPAGE
Lloh1:
	ldr	x9, [x9, _DMA_PREP_CONTINUE@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	sub	w10, w27, #3
	tst	w9, w8
	csel	w27, w27, w10, eq
Lloh3:
	adrp	x8, _DMA_COMPL_SKIP_DEST_UNMAP@GOTPAGE
Lloh4:
	ldr	x8, [x8, _DMA_COMPL_SKIP_DEST_UNMAP@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	tst	w8, w26
	b.ne	LBB0_3
; %bb.1:
	ldr	x8, [x19, #16]
	cbnz	x8, LBB0_3
; %bb.2:
Lloh6:
	adrp	x28, _DMA_BIDIRECTIONAL@GOTPAGE
Lloh7:
	ldr	x28, [x28, _DMA_BIDIRECTIONAL@GOTPAGEOFF]
	ldr	w3, [x28]
	mov	x0, x20
	mov	x1, x25
	mov	x2, x21
	bl	_dma_unmap_page
	ldr	w3, [x28]
	mov	x0, x20
	mov	x1, x24
	mov	x2, x21
	bl	_dma_unmap_page
LBB0_3:
Lloh8:
	adrp	x8, _DMA_COMPL_SKIP_SRC_UNMAP@GOTPAGE
Lloh9:
	ldr	x8, [x8, _DMA_COMPL_SKIP_SRC_UNMAP@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	tst	w8, w26
	b.ne	LBB0_9
; %bb.4:
Lloh11:
	adrp	x28, _DMA_TO_DEVICE@GOTPAGE
Lloh12:
	ldr	x28, [x28, _DMA_TO_DEVICE@GOTPAGEOFF]
	cmp	w27, #1
	b.lt	LBB0_7
; %bb.5:
	mov	w26, #0
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x23
	mov	x1, x22
	mov	x2, x26
	bl	_iop_desc_get_src_addr
	mov	x1, x0
	ldr	w3, [x28]
	mov	x0, x20
	mov	x2, x21
	bl	_dma_unmap_page
	add	w26, w26, #1
	cmp	w27, w26
	b.ne	LBB0_6
LBB0_7:
	ldr	x8, [x19, #16]
	cbz	x8, LBB0_9
; %bb.8:
	ldr	w3, [x28]
	mov	x0, x20
	mov	x1, x25
	mov	x2, x21
	bl	_dma_unmap_page
	ldr	w3, [x28]
	mov	x0, x20
	mov	x1, x24
	mov	x2, x21
	bl	_dma_unmap_page
LBB0_9:
	str	xzr, [x19, #8]
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_DMA_PREP_CONTINUE,4,2          ; @DMA_PREP_CONTINUE
	.comm	_DMA_COMPL_SKIP_DEST_UNMAP,4,2  ; @DMA_COMPL_SKIP_DEST_UNMAP
	.comm	_DMA_BIDIRECTIONAL,4,2          ; @DMA_BIDIRECTIONAL
	.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_pq
.subsections_via_symbols
