	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function vb2_dc_put_userptr
_vb2_dc_put_userptr:                    ## @vb2_dc_put_userptr
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r12
	movq	32(%rdi), %r14
	movl	16(%rdi), %edi
	testq	%r14, %r14
	je	LBB0_7
## %bb.1:
	movl	20(%r14), %edx
	movl	24(%r14), %esi
	movl	4(%r12), %ecx
	movq	_DMA_ATTR_SKIP_CPU_SYNC@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	callq	_dma_unmap_sg_attrs
	movl	(%r12), %edi
	callq	_frame_vector_pages
	movq	%rax, %r15
	movq	%rax, %rdi
	callq	_IS_ERR
	movl	%eax, %edi
	callq	_BUG_ON
	movl	4(%r12), %eax
	movq	_DMA_FROM_DEVICE@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	je	LBB0_3
## %bb.2:
	movq	_DMA_BIDIRECTIONAL@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_6
LBB0_3:
	movl	(%r12), %edi
	callq	_frame_vector_count
	testl	%eax, %eax
	jle	LBB0_6
## %bb.4:
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r15,%rbx,8), %rdi
	callq	_set_page_dirty_lock
	incq	%rbx
	movl	(%r12), %edi
	callq	_frame_vector_count
	cltq
	cmpq	%rax, %rbx
	jl	LBB0_5
LBB0_6:
	movq	%r14, %rdi
	callq	_sg_free_table
	movq	%r14, %rdi
	callq	_kfree
	jmp	LBB0_8
LBB0_7:
	movl	12(%r12), %esi
	movl	4(%r12), %ecx
	movl	8(%r12), %edx
	xorl	%r8d, %r8d
	callq	_dma_unmap_resource
LBB0_8:
	movl	(%r12), %edi
	callq	_vb2_destroy_framevec
	movq	%r12, %rdi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_kfree                          ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_DMA_ATTR_SKIP_CPU_SYNC,4,2     ## @DMA_ATTR_SKIP_CPU_SYNC
	.comm	_DMA_FROM_DEVICE,4,2            ## @DMA_FROM_DEVICE
	.comm	_DMA_BIDIRECTIONAL,4,2          ## @DMA_BIDIRECTIONAL
	.no_dead_strip	_vb2_dc_put_userptr
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function vb2_dc_put_userptr
_vb2_dc_put_userptr:                    ; @vb2_dc_put_userptr
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x19, x0
	ldr	x20, [x0, #32]
	ldr	w0, [x0, #16]
	cbz	x20, LBB0_6
; %bb.1:
	ldp	w2, w1, [x20, #20]
	ldr	w3, [x19, #4]
Lloh0:
	adrp	x8, _DMA_ATTR_SKIP_CPU_SYNC@GOTPAGE
Lloh1:
	ldr	x8, [x8, _DMA_ATTR_SKIP_CPU_SYNC@GOTPAGEOFF]
Lloh2:
	ldr	w4, [x8]
	bl	_dma_unmap_sg_attrs
	ldr	w0, [x19]
	bl	_frame_vector_pages
	mov	x21, x0
	bl	_IS_ERR
	bl	_BUG_ON
	ldr	w8, [x19, #4]
Lloh3:
	adrp	x9, _DMA_FROM_DEVICE@GOTPAGE
Lloh4:
	ldr	x9, [x9, _DMA_FROM_DEVICE@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
Lloh6:
	adrp	x10, _DMA_BIDIRECTIONAL@GOTPAGE
Lloh7:
	ldr	x10, [x10, _DMA_BIDIRECTIONAL@GOTPAGEOFF]
Lloh8:
	ldr	w10, [x10]
	cmp	w8, w9
	ccmp	w8, w10, #4, ne
	b.ne	LBB0_5
; %bb.2:
	ldr	w0, [x19]
	bl	_frame_vector_count
	cmp	w0, #1
	b.lt	LBB0_5
; %bb.3:
	mov	x22, #0
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x0, [x21, x22, lsl #3]
	bl	_set_page_dirty_lock
	add	x22, x22, #1
	ldr	w0, [x19]
	bl	_frame_vector_count
	cmp	x22, w0, sxtw
	b.lt	LBB0_4
LBB0_5:
	mov	x0, x20
	bl	_sg_free_table
	mov	x0, x20
	bl	_kfree
	b	LBB0_7
LBB0_6:
	ldp	w2, w1, [x19, #8]
	ldr	w3, [x19, #4]
	mov	w4, #0
	bl	_dma_unmap_resource
LBB0_7:
	ldr	w0, [x19]
	bl	_vb2_destroy_framevec
	mov	x0, x19
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_kfree
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_DMA_ATTR_SKIP_CPU_SYNC,4,2     ; @DMA_ATTR_SKIP_CPU_SYNC
	.comm	_DMA_FROM_DEVICE,4,2            ; @DMA_FROM_DEVICE
	.comm	_DMA_BIDIRECTIONAL,4,2          ; @DMA_BIDIRECTIONAL
	.no_dead_strip	_vb2_dc_put_userptr
.subsections_via_symbols
