	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_il_cmd_queue_unmap             ## -- Begin function il_cmd_queue_unmap
	.p2align	4, 0x90
_il_cmd_queue_unmap:                    ## @il_cmd_queue_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), %rax
	movq	%rdi, -64(%rbp)                 ## 8-byte Spill
	movq	16(%rdi), %rcx
	leaq	(%rax,%rax,4), %rdx
	cmpq	$0, 8(%rcx,%rdx,8)
	je	LBB0_8
## %bb.1:
	leaq	(%rcx,%rdx,8), %r13
	movq	16(%rcx,%rdx,8), %rax
	movq	%rcx, -56(%rbp)                 ## 8-byte Spill
	movq	%rdx, -48(%rbp)                 ## 8-byte Spill
	cmpq	24(%rcx,%rdx,8), %rax
	jne	LBB0_2
LBB0_6:
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	movslq	32(%rax,%rcx,8), %rbx
	movq	(%r13), %rax
	movq	_CMD_MAPPED@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%ecx, (%rax,%rbx,4)
	je	LBB0_8
## %bb.7:
	leaq	(%rax,%rbx,4), %rdi
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movl	8(%rax), %r14d
	movq	_mapping@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_dma_unmap_addr
	movl	%eax, %r15d
	leaq	(,%rbx,4), %rdi
	addq	(%r13), %rdi
	movq	_len@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_dma_unmap_len
	movq	_PCI_DMA_BIDIRECTIONAL@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%r14d, %edi
	movl	%r15d, %esi
	movl	%eax, %edx
	callq	_pci_unmap_single
	movq	(%r13), %rax
	movl	$0, (%rax,%rbx,4)
LBB0_8:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_2:
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	movq	-48(%rbp), %rdx                 ## 8-byte Reload
	leaq	(%rcx,%rdx,8), %rbx
	addq	$8, %rbx
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_5:                                 ##   in Loop: Header=BB0_3 Depth=1
	movq	8(%rbx), %rdi
	movq	(%rbx), %rsi
	callq	_il_queue_inc_wrap
	movq	%rax, 8(%rbx)
	cmpq	16(%rbx), %rax
	je	LBB0_6
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	%rbx, %rdi
	movq	%rax, %rsi
	xorl	%edx, %edx
	callq	_il_get_cmd_idx
	movq	(%r13), %rcx
	movslq	%eax, %r14
	movq	_CMD_MAPPED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%rcx,%r14,4)
	je	LBB0_5
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	leaq	(%rcx,%r14,4), %rdi
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movl	8(%rax), %r15d
	movq	_mapping@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_dma_unmap_addr
	movl	%eax, %r12d
	leaq	(,%r14,4), %rdi
	addq	(%r13), %rdi
	movq	_len@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_dma_unmap_len
	movq	_PCI_DMA_BIDIRECTIONAL@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%r15d, %edi
	movl	%r12d, %esi
	movl	%eax, %edx
	callq	_pci_unmap_single
	movq	(%r13), %rax
	movl	$0, (%rax,%r14,4)
	jmp	LBB0_5
	.cfi_endproc
                                        ## -- End function
	.comm	_CMD_MAPPED,4,2                 ## @CMD_MAPPED
	.comm	_mapping,4,2                    ## @mapping
	.comm	_len,4,2                        ## @len
	.comm	_PCI_DMA_BIDIRECTIONAL,4,2      ## @PCI_DMA_BIDIRECTIONAL
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_il_cmd_queue_unmap             ; -- Begin function il_cmd_queue_unmap
	.p2align	2
_il_cmd_queue_unmap:                    ; @il_cmd_queue_unmap
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	ldr	x9, [x0, #16]
	ldr	x10, [x0]
	mov	w8, #40
	madd	x23, x10, x8, x9
	mov	x20, x23
	ldr	x8, [x20, #8]!
	cbz	x8, LBB0_4
; %bb.1:
	mov	x19, x0
	mov	w8, #40
	stp	x10, x9, [sp]                   ; 16-byte Folded Spill
	madd	x24, x10, x8, x9
	ldr	x8, [x24, #24]!
	mov	x27, x24
	ldr	x1, [x27, #-8]!
Lloh0:
	adrp	x26, _CMD_MAPPED@GOTPAGE
Lloh1:
	ldr	x26, [x26, _CMD_MAPPED@GOTPAGEOFF]
Lloh2:
	adrp	x28, _mapping@GOTPAGE
Lloh3:
	ldr	x28, [x28, _mapping@GOTPAGEOFF]
	cmp	x1, x8
	b.ne	LBB0_6
LBB0_2:
	mov	w8, #40
	ldp	x10, x9, [sp]                   ; 16-byte Folded Reload
	madd	x8, x10, x8, x9
	ldrsw	x21, [x8, #32]
	ldr	x8, [x23]
	add	x0, x8, x21, lsl #2
	ldr	w8, [x0]
	ldr	w9, [x26]
	tst	w9, w8
	b.eq	LBB0_4
; %bb.3:
	ldr	w19, [x19, #8]
	ldr	w1, [x28]
	bl	_dma_unmap_addr
	mov	x20, x0
	ldr	x8, [x23]
	lsl	x21, x21, #2
	add	x0, x8, x21
Lloh4:
	adrp	x8, _len@GOTPAGE
Lloh5:
	ldr	x8, [x8, _len@GOTPAGEOFF]
Lloh6:
	ldr	w1, [x8]
	bl	_dma_unmap_len
	mov	x2, x0
Lloh7:
	adrp	x8, _PCI_DMA_BIDIRECTIONAL@GOTPAGE
Lloh8:
	ldr	x8, [x8, _PCI_DMA_BIDIRECTIONAL@GOTPAGEOFF]
Lloh9:
	ldr	w3, [x8]
	mov	x0, x19
	mov	x1, x20
	bl	_pci_unmap_single
	ldr	x8, [x23]
	str	wzr, [x8, x21]
LBB0_4:
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
LBB0_5:                                 ;   in Loop: Header=BB0_6 Depth=1
	ldr	x0, [x27]
	ldr	x1, [x20]
	bl	_il_queue_inc_wrap
	mov	x1, x0
	str	x0, [x27]
	ldr	x8, [x24]
	cmp	x0, x8
	b.eq	LBB0_2
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x20
	mov	w2, #0
	bl	_il_get_cmd_idx
	mov	x8, x0
	ldr	x9, [x23]
	add	x0, x9, w0, sxtw #2
	ldr	w9, [x0]
	ldr	w10, [x26]
	tst	w10, w9
	b.eq	LBB0_5
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	sxtw	x25, w8
	ldr	w21, [x19, #8]
	ldr	w1, [x28]
	bl	_dma_unmap_addr
	mov	x22, x0
	ldr	x8, [x23]
	lsl	x25, x25, #2
	add	x0, x8, x25
Lloh10:
	adrp	x8, _len@GOTPAGE
Lloh11:
	ldr	x8, [x8, _len@GOTPAGEOFF]
Lloh12:
	ldr	w1, [x8]
	bl	_dma_unmap_len
	mov	x2, x0
Lloh13:
	adrp	x8, _PCI_DMA_BIDIRECTIONAL@GOTPAGE
Lloh14:
	ldr	x8, [x8, _PCI_DMA_BIDIRECTIONAL@GOTPAGEOFF]
Lloh15:
	ldr	w3, [x8]
	mov	x0, x21
	mov	x1, x22
	bl	_pci_unmap_single
	ldr	x8, [x23]
	str	wzr, [x8, x25]
	b	LBB0_5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_CMD_MAPPED,4,2                 ; @CMD_MAPPED
	.comm	_mapping,4,2                    ; @mapping
	.comm	_len,4,2                        ; @len
	.comm	_PCI_DMA_BIDIRECTIONAL,4,2      ; @PCI_DMA_BIDIRECTIONAL
.subsections_via_symbols
