	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function omap24xxcam_vbq_prepare
_omap24xxcam_vbq_prepare:               ## @omap24xxcam_vbq_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
	movl	%edx, %r15d
	movq	%rsi, %rbx
	movq	%rdi, %r14
	movq	(%rdi), %r13
	cmpq	$0, 48(%rsi)
	je	LBB0_6
## %bb.1:
	movq	(%r13), %rax
	cmpq	(%rbx), %rax
	jle	LBB0_2
## %bb.9:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
	testl	%r12d, %r12d
	je	LBB0_3
## %bb.10:
	negl	%r12d
	jmp	LBB0_15
LBB0_6:
	movq	16(%rbx), %rcx
	movq	_VIDEOBUF_NEEDS_INIT@GOTPCREL(%rip), %rdx
	movq	(%r13), %rax
	cmpq	(%rdx), %rcx
	je	LBB0_2
## %bb.7:
	cmpq	8(%rbx), %rax
	jle	LBB0_3
## %bb.8:
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	_omap24xxcam_vbq_release
	movq	(%r13), %rax
LBB0_2:
	movq	%rax, 8(%rbx)
LBB0_3:
	movl	12(%r13), %eax
	movl	%eax, 44(%rbx)
	movl	8(%r13), %eax
	movl	%eax, 40(%rbx)
	movl	%r15d, 24(%rbx)
	movq	16(%rbx), %rax
	movq	_VIDEOBUF_NEEDS_INIT@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_13
## %bb.4:
	movq	32(%rbx), %rax
	movq	_V4L2_MEMORY_MMAP@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_11
## %bb.5:
	movq	%rbx, %rdi
	callq	_videobuf_to_dma
	movq	%r14, %rdi
	movl	%eax, %esi
	callq	_omap24xxcam_dma_iolock
	jmp	LBB0_12
LBB0_11:
	movq	%r14, %rdi
	movq	%rbx, %rsi
	xorl	%edx, %edx
	callq	_videobuf_iolock
LBB0_12:
	movl	%eax, %r12d
	testl	%eax, %eax
	je	LBB0_13
## %bb.14:
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	_omap24xxcam_vbq_release
	jmp	LBB0_15
LBB0_13:
	movq	_VIDEOBUF_PREPARED@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, 16(%rbx)
	xorl	%r12d, %r12d
LBB0_15:
	movl	%r12d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_VIDEOBUF_NEEDS_INIT,8,3        ## @VIDEOBUF_NEEDS_INIT
	.comm	_V4L2_MEMORY_MMAP,8,3           ## @V4L2_MEMORY_MMAP
	.comm	_VIDEOBUF_PREPARED,8,3          ## @VIDEOBUF_PREPARED
	.no_dead_strip	_omap24xxcam_vbq_prepare
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function omap24xxcam_vbq_prepare
_omap24xxcam_vbq_prepare:               ; @omap24xxcam_vbq_prepare
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x21, x2
	mov	x19, x1
	mov	x20, x0
	ldr	x23, [x0]
	ldr	x8, [x1, #48]
Lloh0:
	adrp	x22, _VIDEOBUF_NEEDS_INIT@GOTPAGE
Lloh1:
	ldr	x22, [x22, _VIDEOBUF_NEEDS_INIT@GOTPAGEOFF]
	cbz	x8, LBB0_4
; %bb.1:
	ldr	x8, [x23]
	ldr	x9, [x19]
	cmp	x8, x9
	b.le	LBB0_7
; %bb.2:
Lloh2:
	adrp	x8, _EINVAL@GOTPAGE
Lloh3:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	cbz	w8, LBB0_8
; %bb.3:
	neg	w21, w8
	b	LBB0_14
LBB0_4:
	ldr	x9, [x19, #16]
	ldr	x10, [x22]
	ldr	x8, [x23]
	cmp	x9, x10
	b.eq	LBB0_7
; %bb.5:
	ldr	x9, [x19, #8]
	cmp	x8, x9
	b.le	LBB0_8
; %bb.6:
	mov	x0, x20
	mov	x1, x19
	bl	_omap24xxcam_vbq_release
	ldr	x8, [x23]
LBB0_7:
	str	x8, [x19, #8]
LBB0_8:
	ldr	d0, [x23, #8]
	str	d0, [x19, #40]
	str	w21, [x19, #24]
	ldr	x8, [x19, #16]
	ldr	x9, [x22]
	cmp	x8, x9
	b.ne	LBB0_13
; %bb.9:
	ldr	x8, [x19, #32]
Lloh5:
	adrp	x9, _V4L2_MEMORY_MMAP@GOTPAGE
Lloh6:
	ldr	x9, [x9, _V4L2_MEMORY_MMAP@GOTPAGEOFF]
Lloh7:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_12
; %bb.10:
	mov	x0, x19
	bl	_videobuf_to_dma
	mov	x1, x0
	mov	x0, x20
	bl	_omap24xxcam_dma_iolock
	mov	x21, x0
	cbz	w0, LBB0_13
LBB0_11:
	mov	x0, x20
	mov	x1, x19
	bl	_omap24xxcam_vbq_release
	b	LBB0_14
LBB0_12:
	mov	x0, x20
	mov	x1, x19
	mov	x2, #0
	bl	_videobuf_iolock
	mov	x21, x0
	cbnz	w0, LBB0_11
LBB0_13:
	mov	w21, #0
Lloh8:
	adrp	x8, _VIDEOBUF_PREPARED@GOTPAGE
Lloh9:
	ldr	x8, [x8, _VIDEOBUF_PREPARED@GOTPAGEOFF]
Lloh10:
	ldr	x8, [x8]
	str	x8, [x19, #16]
LBB0_14:
	mov	x0, x21
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_VIDEOBUF_NEEDS_INIT,8,3        ; @VIDEOBUF_NEEDS_INIT
	.comm	_V4L2_MEMORY_MMAP,8,3           ; @V4L2_MEMORY_MMAP
	.comm	_VIDEOBUF_PREPARED,8,3          ; @VIDEOBUF_PREPARED
	.no_dead_strip	_omap24xxcam_vbq_prepare
.subsections_via_symbols
