	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function vpfe_videobuf_prepare
_vpfe_videobuf_prepare:                 ## @vpfe_videobuf_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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r15d
	movq	%rsi, %r12
	movq	%rdi, %r14
	movq	(%rdi), %rax
	movq	(%rax), %rbx
	movq	_debug@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	12(%rbx), %rdx
	leaq	L_.str(%rip), %rcx
	movl	$1, %edi
	callq	_v4l2_dbg
	movq	_VIDEOBUF_NEEDS_INIT@GOTPCREL(%rip), %rax
	movq	(%rax), %rcx
	xorl	%eax, %eax
	cmpq	(%r12), %rcx
	jne	LBB0_5
## %bb.1:
	movl	8(%rbx), %eax
	movl	%eax, 20(%r12)
	movl	4(%rbx), %eax
	movl	%eax, 16(%r12)
	movl	(%rbx), %eax
	movl	%eax, 12(%r12)
	movl	%r15d, 8(%r12)
	movq	%r14, %rdi
	movq	%r12, %rsi
	xorl	%edx, %edx
	callq	_videobuf_iolock
	testl	%eax, %eax
	js	LBB0_5
## %bb.2:
	movq	%r12, %rdi
	callq	_videobuf_to_dma_contig
	movq	%rax, %rdi
	movl	$32, %esi
	callq	_ALIGN
	testl	%eax, %eax
	je	LBB0_3
## %bb.4:
	movq	_VIDEOBUF_PREPARED@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, (%r12)
	xorl	%eax, %eax
	jmp	LBB0_5
LBB0_3:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_5:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_debug,4,2                      ## @debug
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"vpfe_buffer_prepare\n"

	.comm	_VIDEOBUF_NEEDS_INIT,8,3        ## @VIDEOBUF_NEEDS_INIT
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_VIDEOBUF_PREPARED,8,3          ## @VIDEOBUF_PREPARED
	.no_dead_strip	_vpfe_videobuf_prepare
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function vpfe_videobuf_prepare
_vpfe_videobuf_prepare:                 ; @vpfe_videobuf_prepare
	.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	x21, x2
	mov	x19, x1
	mov	x20, x0
	ldr	x8, [x0]
	ldr	x22, [x8]
Lloh0:
	adrp	x8, _debug@GOTPAGE
Lloh1:
	ldr	x8, [x8, _debug@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	add	x2, x22, #12
Lloh3:
	adrp	x3, l_.str@PAGE
Lloh4:
	add	x3, x3, l_.str@PAGEOFF
	mov	w0, #1
	bl	_v4l2_dbg
Lloh5:
	adrp	x8, _VIDEOBUF_NEEDS_INIT@GOTPAGE
Lloh6:
	ldr	x8, [x8, _VIDEOBUF_NEEDS_INIT@GOTPAGEOFF]
Lloh7:
	ldr	x8, [x8]
	ldr	x9, [x19]
	cmp	x8, x9
	b.ne	LBB0_4
; %bb.1:
	ldr	w8, [x22, #8]
	str	w8, [x19, #20]
	ldr	d0, [x22]
	stur	d0, [x19, #12]
	str	w21, [x19, #8]
	mov	x0, x20
	mov	x1, x19
	mov	x2, #0
	bl	_videobuf_iolock
	tbnz	w0, #31, LBB0_6
; %bb.2:
	mov	x0, x19
	bl	_videobuf_to_dma_contig
	mov	w1, #32
	bl	_ALIGN
	cbz	w0, LBB0_5
; %bb.3:
	mov	w0, #0
Lloh8:
	adrp	x8, _VIDEOBUF_PREPARED@GOTPAGE
Lloh9:
	ldr	x8, [x8, _VIDEOBUF_PREPARED@GOTPAGEOFF]
Lloh10:
	ldr	x8, [x8]
	str	x8, [x19]
	b	LBB0_6
LBB0_4:
	mov	w0, #0
	b	LBB0_6
LBB0_5:
Lloh11:
	adrp	x8, _EINVAL@GOTPAGE
Lloh12:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_6:
	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
	ret
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_debug,4,2                      ; @debug
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"vpfe_buffer_prepare\n"

	.comm	_VIDEOBUF_NEEDS_INIT,8,3        ; @VIDEOBUF_NEEDS_INIT
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_VIDEOBUF_PREPARED,8,3          ; @VIDEOBUF_PREPARED
	.no_dead_strip	_vpfe_videobuf_prepare
.subsections_via_symbols
