	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function via_unmap_blit_from_device
_via_unmap_blit_from_device:            ## @via_unmap_blit_from_device
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	(%rsi), %r13d
	testl	%r13d, %r13d
	je	LBB0_5
## %bb.1:
	movq	%rsi, %r15
	movq	%rdi, %r14
	movq	16(%rsi), %rcx
	movl	%r13d, %eax
	cltd
	idivl	4(%rsi)
                                        ## kill: def $eax killed $eax def $rax
	movl	%edx, %r12d
	leaq	24(%rsi), %rdx
	movq	%r12, %rbx
	shlq	$4, %rbx
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	addq	(%rcx,%rax,8), %rbx
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_4:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	(%rdx), %rsi
	movq	_DMA_TO_DEVICE@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%r14, %rdi
	movl	$16, %edx
	callq	_dma_unmap_single
	movl	8(%rbx), %edx
	movl	12(%rbx), %esi
	movl	8(%r15), %ecx
	movq	%r14, %rdi
	callq	_dma_unmap_page
	movq	%rbx, %rdx
	addq	$-16, %rbx
	testl	%r13d, %r13d
	je	LBB0_5
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	decl	%r13d
	subl	$1, %r12d
	jae	LBB0_4
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	decl	%eax
	movl	4(%r15), %r12d
	decl	%r12d
	movq	16(%r15), %rcx
	movq	%r12, %rbx
	shlq	$4, %rbx
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	addq	(%rcx,%rax,8), %rbx
	jmp	LBB0_4
LBB0_5:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_DMA_TO_DEVICE,4,2              ## @DMA_TO_DEVICE
	.no_dead_strip	_via_unmap_blit_from_device
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function via_unmap_blit_from_device
_via_unmap_blit_from_device:            ; @via_unmap_blit_from_device
	.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
	ldr	w21, [x1]
	cbz	w21, LBB0_6
; %bb.1:
	mov	x19, x1
	mov	x20, x0
	add	x8, x1, #24
	ldr	x9, [x1, #16]
	ldr	w10, [x1, #4]
	sdiv	w22, w21, w10
	ldr	x9, [x9, w22, uxtw #3]
	msub	w24, w22, w10, w21
	add	x25, x9, w24, uxtw #4
Lloh0:
	adrp	x23, _DMA_TO_DEVICE@GOTPAGE
Lloh1:
	ldr	x23, [x23, _DMA_TO_DEVICE@GOTPAGEOFF]
	b	LBB0_4
LBB0_2:                                 ;   in Loop: Header=BB0_4 Depth=1
	sub	w22, w22, #1
	ldr	w9, [x19, #4]
	sub	w24, w9, #1
	ldr	x9, [x19, #16]
	ldr	x9, [x9, w22, uxtw #3]
	add	x25, x9, w24, uxtw #4
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	ldr	x1, [x8]
	ldr	w3, [x23]
	mov	x0, x20
	mov	w2, #16
	bl	_dma_unmap_single
	ldp	w2, w1, [x25, #8]
	ldr	w3, [x19, #8]
	mov	x0, x20
	bl	_dma_unmap_page
	mov	x8, x25
	sub	x25, x25, #16
	cbz	w21, LBB0_6
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	sub	w21, w21, #1
	cbz	w24, LBB0_2
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	sub	w24, w24, #1
	b	LBB0_3
LBB0_6:
	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
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_DMA_TO_DEVICE,4,2              ; @DMA_TO_DEVICE
	.no_dead_strip	_via_unmap_blit_from_device
.subsections_via_symbols
