	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function vb2_dc_map_dmabuf
_vb2_dc_map_dmabuf:                     ## @vb2_dc_map_dmabuf
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	xorl	%edi, %edi
	cmpl	$0, 32(%r14)
	sete	%dil
	callq	_WARN_ON
	testq	%rax, %rax
	je	LBB0_3
## %bb.1:
	leaq	L_.str(%rip), %rdi
LBB0_2:
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_pr_err
	movq	_EINVAL@GOTPCREL(%rip), %rax
	subl	(%rax), %ebx
	jmp	LBB0_10
LBB0_3:
	movl	(%r14), %edi
	callq	_WARN_ON
	testq	%rax, %rax
	je	LBB0_5
## %bb.4:
	leaq	L_.str.1(%rip), %rdi
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_pr_err
LBB0_10:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	movl	28(%r14), %esi
	movl	32(%r14), %edi
	callq	_dma_buf_map_attachment
	movq	%rax, %r15
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_7
## %bb.6:
	leaq	L_.str.2(%rip), %rdi
	jmp	LBB0_2
LBB0_7:
	movq	%r15, %rdi
	callq	_vb2_dc_get_contiguous_size
	movq	8(%r14), %rdx
	cmpq	%rdx, %rax
	jae	LBB0_9
## %bb.8:
	leaq	L_.str.3(%rip), %rdi
	xorl	%ebx, %ebx
	movq	%rax, %rsi
	xorl	%eax, %eax
	callq	_pr_err
	movl	28(%r14), %edx
	movl	32(%r14), %edi
	movq	%r15, %rsi
	callq	_dma_buf_unmap_attachment
	movq	_EFAULT@GOTPCREL(%rip), %rax
	subl	(%rax), %ebx
	jmp	LBB0_10
LBB0_9:
	movl	(%r15), %edi
	callq	_sg_dma_address
	movl	%eax, 24(%r14)
	movl	%r15d, (%r14)
	movq	$0, 16(%r14)
	xorl	%ebx, %ebx
	jmp	LBB0_10
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"trying to pin a non attached buffer\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
L_.str.1:                               ## @.str.1
	.asciz	"dmabuf buffer is already pinned\n"

L_.str.2:                               ## @.str.2
	.asciz	"Error getting dmabuf scatterlist\n"

L_.str.3:                               ## @.str.3
	.asciz	"contiguous chunk is too small %lu/%lu b\n"

	.comm	_EFAULT,4,2                     ## @EFAULT
	.no_dead_strip	_vb2_dc_map_dmabuf
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function vb2_dc_map_dmabuf
_vb2_dc_map_dmabuf:                     ; @vb2_dc_map_dmabuf
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.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
	mov	x19, x0
	ldr	w8, [x0, #32]
	cmp	w8, #0
	cset	w0, eq
	bl	_WARN_ON
	cbz	x0, LBB0_4
; %bb.1:
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
LBB0_2:
	bl	_pr_err
Lloh2:
	adrp	x8, _EINVAL@GOTPAGE
Lloh3:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_3:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_6
LBB0_4:
	ldr	w0, [x19]
	bl	_WARN_ON
	cbz	x0, LBB0_7
; %bb.5:
Lloh4:
	adrp	x0, l_.str.1@PAGE
Lloh5:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_pr_err
	mov	w0, #0
LBB0_6:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
LBB0_7:
	ldp	w1, w0, [x19, #28]
	bl	_dma_buf_map_attachment
	mov	x20, x0
	bl	_IS_ERR
	cbz	x0, LBB0_9
; %bb.8:
Lloh6:
	adrp	x0, l_.str.2@PAGE
Lloh7:
	add	x0, x0, l_.str.2@PAGEOFF
	b	LBB0_2
LBB0_9:
	mov	x0, x20
	bl	_vb2_dc_get_contiguous_size
	ldr	x8, [x19, #8]
	cmp	x0, x8
	b.hs	LBB0_11
; %bb.10:
	stp	x0, x8, [sp]
Lloh8:
	adrp	x0, l_.str.3@PAGE
Lloh9:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_pr_err
	ldp	w2, w0, [x19, #28]
	mov	x1, x20
	bl	_dma_buf_unmap_attachment
Lloh10:
	adrp	x8, _EFAULT@GOTPAGE
Lloh11:
	ldr	x8, [x8, _EFAULT@GOTPAGEOFF]
	b	LBB0_3
LBB0_11:
	ldr	w0, [x20]
	bl	_sg_dma_address
	mov	x8, x0
	mov	w0, #0
	str	w8, [x19, #24]
	str	w20, [x19]
	str	xzr, [x19, #16]
	b	LBB0_6
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpAdd	Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"trying to pin a non attached buffer\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
l_.str.1:                               ; @.str.1
	.asciz	"dmabuf buffer is already pinned\n"

l_.str.2:                               ; @.str.2
	.asciz	"Error getting dmabuf scatterlist\n"

l_.str.3:                               ; @.str.3
	.asciz	"contiguous chunk is too small %lu/%lu b\n"

	.comm	_EFAULT,4,2                     ; @EFAULT
	.no_dead_strip	_vb2_dc_map_dmabuf
.subsections_via_symbols
