	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function __buf_prepare
___buf_prepare:                         ## @__buf_prepare
	.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
	movq	24(%rdi), %rbx
	cmpq	$0, 16(%rbx)
	je	LBB0_2
## %bb.1:
	leaq	L_.str(%rip), %rsi
	xorl	%r14d, %r14d
	movl	$1, %edi
	xorl	%eax, %eax
	callq	_dprintk
	movq	_EIO@GOTPCREL(%rip), %rax
	subl	(%rax), %r14d
	jmp	LBB0_18
LBB0_2:
	movq	%rdi, %r13
	xorl	%r14d, %r14d
	cmpl	$0, 4(%rdi)
	je	LBB0_3
LBB0_18:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_3:
	movl	(%r13), %r12d
	movl	8(%r13), %edi
	callq	_WARN_ON
	cmpq	$0, 8(%rbx)
	je	LBB0_6
## %bb.4:
	movq	_buf_out_validate@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	movq	%r13, %rdx
	callq	_call_vb_qop
	testl	%eax, %eax
	je	LBB0_6
## %bb.5:
	movl	%eax, %r15d
	leaq	L_.str.1(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	callq	_dprintk
	movl	%r15d, %r14d
	jmp	LBB0_18
LBB0_6:
	movq	_VB2_BUF_STATE_PREPARING@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%r13)
	movl	(%rbx), %eax
	cmpl	$128, %eax
	je	LBB0_10
## %bb.7:
	cmpl	$130, %eax
	je	LBB0_11
## %bb.8:
	cmpl	$129, %eax
	jne	LBB0_12
## %bb.9:
	movq	%r13, %rdi
	callq	___prepare_mmap
	movl	%eax, %r15d
	jmp	LBB0_13
LBB0_10:
	movq	%r13, %rdi
	callq	___prepare_userptr
	movl	%eax, %r15d
	jmp	LBB0_13
LBB0_11:
	movq	%r13, %rdi
	callq	___prepare_dmabuf
	movl	%eax, %r15d
	jmp	LBB0_13
LBB0_12:
	leaq	L_.str.2(%rip), %rsi
	movl	$1, %edi
	callq	_WARN
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%r15d, %r15d
	subl	(%rax), %r15d
LBB0_13:
	testl	%r15d, %r15d
	je	LBB0_14
## %bb.19:
	leaq	L_.str.3(%rip), %rsi
	movl	$1, %edi
	movl	%r15d, %edx
	xorl	%eax, %eax
	callq	_dprintk
	movl	%r12d, (%r13)
	movl	%r15d, %r14d
	jmp	LBB0_18
LBB0_14:
	cmpl	$0, 12(%r13)
	je	LBB0_17
## %bb.15:
	xorl	%ebx, %ebx
	movq	_prepare@GOTPCREL(%rip), %r15
	.p2align	4, 0x90
LBB0_16:                                ## =>This Inner Loop Header: Depth=1
	movl	(%r15), %esi
	movq	16(%r13), %rax
	movl	(%rax,%rbx,4), %edx
	movq	%r13, %rdi
	callq	_call_void_memop
	incq	%rbx
	movl	12(%r13), %eax
	cmpq	%rax, %rbx
	jb	LBB0_16
LBB0_17:
	movabsq	$4294967297, %rax               ## imm = 0x100000001
	movq	%rax, 4(%r13)
	movl	%r12d, (%r13)
	jmp	LBB0_18
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"fatal error occurred on queue\n"

	.comm	_EIO,4,2                        ## @EIO
	.comm	_buf_out_validate,4,2           ## @buf_out_validate
L_.str.1:                               ## @.str.1
	.asciz	"buffer validation failed\n"

	.comm	_VB2_BUF_STATE_PREPARING,4,2    ## @VB2_BUF_STATE_PREPARING
L_.str.2:                               ## @.str.2
	.asciz	"Invalid queue type\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
L_.str.3:                               ## @.str.3
	.asciz	"buffer preparation failed: %d\n"

	.comm	_prepare,4,2                    ## @prepare
	.no_dead_strip	___buf_prepare
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function __buf_prepare
___buf_prepare:                         ; @__buf_prepare
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	ldr	x22, [x0, #24]
	ldr	x8, [x22, #16]
	cbz	x8, LBB0_2
; %bb.1:
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	w0, #1
	bl	_dprintk
Lloh2:
	adrp	x8, _EIO@GOTPAGE
Lloh3:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	neg	w20, w8
	b	LBB0_21
LBB0_2:
	mov	x19, x0
	ldr	w8, [x0, #4]
	cbz	w8, LBB0_4
; %bb.3:
	mov	w20, #0
	b	LBB0_21
LBB0_4:
	ldr	w21, [x19]
	ldr	w0, [x19, #8]
	bl	_WARN_ON
	ldr	x8, [x22, #8]
	cbz	x8, LBB0_7
; %bb.5:
Lloh5:
	adrp	x8, _buf_out_validate@GOTPAGE
Lloh6:
	ldr	x8, [x8, _buf_out_validate@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
	mov	x0, x19
	mov	x2, x19
	bl	_call_vb_qop
	cbz	w0, LBB0_7
; %bb.6:
	mov	x20, x0
Lloh8:
	adrp	x1, l_.str.1@PAGE
Lloh9:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	w0, #1
	bl	_dprintk
	b	LBB0_21
LBB0_7:
Lloh10:
	adrp	x8, _VB2_BUF_STATE_PREPARING@GOTPAGE
Lloh11:
	ldr	x8, [x8, _VB2_BUF_STATE_PREPARING@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
	str	w8, [x19]
	ldr	w8, [x22]
	cmp	w8, #128
	b.eq	LBB0_11
; %bb.8:
	cmp	w8, #130
	b.eq	LBB0_12
; %bb.9:
	cmp	w8, #129
	b.ne	LBB0_13
; %bb.10:
	mov	x0, x19
	bl	___prepare_mmap
	mov	x20, x0
	b	LBB0_14
LBB0_11:
	mov	x0, x19
	bl	___prepare_userptr
	mov	x20, x0
	b	LBB0_14
LBB0_12:
	mov	x0, x19
	bl	___prepare_dmabuf
	mov	x20, x0
	b	LBB0_14
LBB0_13:
Lloh13:
	adrp	x1, l_.str.2@PAGE
Lloh14:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	w0, #1
	bl	_WARN
Lloh15:
	adrp	x8, _EINVAL@GOTPAGE
Lloh16:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
	neg	w20, w8
LBB0_14:
	cbz	w20, LBB0_16
; %bb.15:
	str	x20, [sp]
Lloh18:
	adrp	x1, l_.str.3@PAGE
Lloh19:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	w0, #1
	bl	_dprintk
	b	LBB0_20
LBB0_16:
	ldr	w8, [x19, #12]
	cbz	w8, LBB0_19
; %bb.17:
	mov	x20, #0
Lloh20:
	adrp	x22, _prepare@GOTPAGE
Lloh21:
	ldr	x22, [x22, _prepare@GOTPAGEOFF]
LBB0_18:                                ; =>This Inner Loop Header: Depth=1
	ldr	w1, [x22]
	ldr	x8, [x19, #16]
	ldr	w2, [x8, x20, lsl #2]
	mov	x0, x19
	bl	_call_void_memop
	add	x20, x20, #1
	ldr	w8, [x19, #12]
	cmp	x20, x8
	b.lo	LBB0_18
LBB0_19:
	mov	w20, #0
	movi.2s	v0, #1
	stur	d0, [x19, #4]
LBB0_20:
	str	w21, [x19]
LBB0_21:
	mov	x0, x20
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh20, Lloh21
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"fatal error occurred on queue\n"

	.comm	_EIO,4,2                        ; @EIO
	.comm	_buf_out_validate,4,2           ; @buf_out_validate
l_.str.1:                               ; @.str.1
	.asciz	"buffer validation failed\n"

	.comm	_VB2_BUF_STATE_PREPARING,4,2    ; @VB2_BUF_STATE_PREPARING
l_.str.2:                               ; @.str.2
	.asciz	"Invalid queue type\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
l_.str.3:                               ; @.str.3
	.asciz	"buffer preparation failed: %d\n"

	.comm	_prepare,4,2                    ; @prepare
	.no_dead_strip	___buf_prepare
.subsections_via_symbols
