	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function via_free_sg_info
_via_free_sg_info:                      ## @via_free_sg_info
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rsi, %r14
	movl	(%rsi), %eax
	addl	$-128, %eax
	cmpl	$3, %eax
	ja	LBB0_11
## %bb.1:
	leaq	LJTI0_0(%rip), %rcx
	movslq	(%rcx,%rax,4), %rax
	addq	%rcx, %rax
	jmpq	*%rax
LBB0_2:
	movq	%r14, %rsi
	callq	_via_unmap_blit_from_device
LBB0_3:
	movl	4(%r14), %eax
	testl	%eax, %eax
	jle	LBB0_8
## %bb.4:
	xorl	%ebx, %ebx
	jmp	LBB0_5
	.p2align	4, 0x90
LBB0_7:                                 ##   in Loop: Header=BB0_5 Depth=1
	incq	%rbx
	movslq	%eax, %rcx
	cmpq	%rcx, %rbx
	jge	LBB0_8
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movq	40(%r14), %rcx
	movq	(%rcx,%rbx,8), %rdi
	testq	%rdi, %rdi
	je	LBB0_7
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=1
	callq	_free_page
	movl	4(%r14), %eax
	jmp	LBB0_7
LBB0_8:
	movq	40(%r14), %rdi
	callq	_kfree
LBB0_9:
	movq	24(%r14), %rdi
	movl	36(%r14), %esi
	movl	32(%r14), %eax
	movq	_DMA_FROM_DEVICE@GOTPCREL(%rip), %rcx
	xorl	%edx, %edx
	cmpl	(%rcx), %eax
	sete	%dl
	callq	_put_user_pages_dirty_lock
LBB0_10:
	movq	24(%r14), %rdi
	callq	_vfree
LBB0_11:
	movq	_dr_via_sg_init@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%r14)
	movq	16(%r14), %rdi
	callq	_vfree
	xorps	%xmm0, %xmm0
	movups	%xmm0, 8(%r14)
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_9, LBB0_9-LJTI0_0
.set L0_0_set_10, LBB0_10-LJTI0_0
.set L0_0_set_2, LBB0_2-LJTI0_0
.set L0_0_set_3, LBB0_3-LJTI0_0
LJTI0_0:
	.long	L0_0_set_9
	.long	L0_0_set_10
	.long	L0_0_set_2
	.long	L0_0_set_3
	.end_data_region
                                        ## -- End function
	.comm	_DMA_FROM_DEVICE,4,2            ## @DMA_FROM_DEVICE
	.comm	_dr_via_sg_init,4,2             ## @dr_via_sg_init
	.no_dead_strip	_via_free_sg_info
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function via_free_sg_info
_via_free_sg_info:                      ; @via_free_sg_info
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x1
	ldr	w8, [x1]
	sub	w8, w8, #128
	cmp	w8, #3
	b.hi	LBB0_11
; %bb.1:
Lloh0:
	adrp	x9, lJTI0_0@PAGE
Lloh1:
	add	x9, x9, lJTI0_0@PAGEOFF
	adr	x10, LBB0_2
	ldrb	w11, [x9, x8]
	add	x10, x10, x11, lsl #2
	br	x10
LBB0_2:
	mov	x1, x19
	bl	_via_unmap_blit_from_device
LBB0_3:
	ldr	w8, [x19, #4]
	cmp	w8, #1
	b.lt	LBB0_8
; %bb.4:
	mov	x20, #0
	b	LBB0_6
LBB0_5:                                 ;   in Loop: Header=BB0_6 Depth=1
	add	x20, x20, #1
	cmp	x20, w8, sxtw
	b.ge	LBB0_8
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x9, [x19, #40]
	ldr	x0, [x9, x20, lsl #3]
	cbz	x0, LBB0_5
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	bl	_free_page
	ldr	w8, [x19, #4]
	b	LBB0_5
LBB0_8:
	ldr	x0, [x19, #40]
	bl	_kfree
LBB0_9:
	ldr	x0, [x19, #24]
	ldp	w8, w1, [x19, #32]
Lloh2:
	adrp	x9, _DMA_FROM_DEVICE@GOTPAGE
Lloh3:
	ldr	x9, [x9, _DMA_FROM_DEVICE@GOTPAGEOFF]
Lloh4:
	ldr	w9, [x9]
	cmp	w8, w9
	cset	w2, eq
	bl	_put_user_pages_dirty_lock
LBB0_10:
	ldr	x0, [x19, #24]
	bl	_vfree
LBB0_11:
Lloh5:
	adrp	x8, _dr_via_sg_init@GOTPAGE
Lloh6:
	ldr	x8, [x8, _dr_via_sg_init@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	str	w8, [x19]
	ldr	x0, [x19, #16]
	bl	_vfree
	stp	xzr, xzr, [x19, #8]
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_9-LBB0_2)>>2
	.byte	(LBB0_10-LBB0_2)>>2
	.byte	(LBB0_2-LBB0_2)>>2
	.byte	(LBB0_3-LBB0_2)>>2
                                        ; -- End function
	.comm	_DMA_FROM_DEVICE,4,2            ; @DMA_FROM_DEVICE
	.comm	_dr_via_sg_init,4,2             ; @dr_via_sg_init
	.no_dead_strip	_via_free_sg_info
.subsections_via_symbols
