	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function vicodec_start_streaming
_vicodec_start_streaming:               ## @vicodec_start_streaming
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r12
	callq	_vb2_get_drv_priv
	movq	%rax, %r13
	movl	(%r12), %esi
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movq	%rax, %rdi
	callq	_get_q_data
	movq	%rax, %rbx
	movq	24(%rax), %r14
	movl	4(%rax), %r15d
	imull	(%rax), %r15d
	movl	4(%r14), %eax
	imull	(%r14), %eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movq	$0, 16(%rbx)
	movl	(%r12), %edi
	callq	_V4L2_TYPE_IS_OUTPUT
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movq	$0, 24(%r13)
LBB0_2:
	movq	$0, 104(%r13)
	movl	(%r12), %edi
	callq	_V4L2_TYPE_IS_OUTPUT
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:
	cmpq	$0, 16(%r13)
	je	LBB0_12
LBB0_4:
	movl	(%r12), %edi
	callq	_V4L2_TYPE_IS_OUTPUT
	testq	%rax, %rax
	je	LBB0_11
LBB0_5:
	movq	8(%r14), %rax
	movq	_V4L2_PIX_FMT_FWHT@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_9
## %bb.6:
	movq	_V4L2_PIX_FMT_FWHT_STATELESS@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_9
## %bb.7:
	movq	%rbx, %rdi
	callq	_total_frame_size
	movl	%eax, (%r13)
	movl	12(%rbx), %ecx
	movl	%ecx, 100(%r13)
	movl	8(%rbx), %ecx
	movl	%ecx, 96(%r13)
	movl	(%rbx), %ecx
	movl	%ecx, 32(%r13)
	movl	4(%rbx), %edx
	movl	%edx, 36(%r13)
	movl	16(%r14), %edx
	imull	%ecx, %edx
	movl	%edx, 40(%r13)
	cmpq	$0, 8(%r13)
	je	LBB0_14
## %bb.8:
	movl	%edx, 44(%r13)
LBB0_12:
	xorl	%ecx, %ecx
	jmp	LBB0_13
LBB0_9:
	movq	_VB2_BUF_STATE_QUEUED@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	callq	_vicodec_return_bufs
	movq	_EINVAL@GOTPCREL(%rip), %rax
LBB0_10:
	xorl	%ecx, %ecx
	subl	(%rax), %ecx
	jmp	LBB0_13
LBB0_11:
	xorl	%ecx, %ecx
	cmpq	$0, 16(%r13)
	je	LBB0_5
LBB0_13:
	movl	%ecx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_14:
	imull	20(%r14), %ecx
	movl	%ecx, 44(%r13)
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	movl	%eax, %edi
	callq	_kvmalloc
	movq	%rax, 80(%r13)
	movq	%rax, 72(%r13)
	movl	(%r13), %edi
	movl	(%rbx), %esi
	callq	_kvmalloc
	movq	%rax, %rbx
	movq	72(%r13), %rdi
	testq	%rdi, %rdi
	je	LBB0_20
## %bb.15:
	testq	%rbx, %rbx
	je	LBB0_20
## %bb.16:
	movq	88(%r13), %rsi
	testq	%rsi, %rsi
	je	LBB0_21
## %bb.17:
	movl	(%r13), %eax
	movl	4(%r13), %edx
	cmpl	%eax, %edx
	movq	-56(%rbp), %r12                 ## 8-byte Reload
	jbe	LBB0_19
## %bb.18:
	movl	%eax, 4(%r13)
	movl	%eax, %edx
LBB0_19:
	movq	%rbx, %rdi
	callq	_memcpy
	movq	88(%r13), %rdi
	jmp	LBB0_22
LBB0_20:
	callq	_kvfree
	movq	%rbx, %rdi
	callq	_kvfree
	movq	_VB2_BUF_STATE_QUEUED@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	callq	_vicodec_return_bufs
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	jmp	LBB0_10
LBB0_21:
	xorl	%edi, %edi
	movq	-56(%rbp), %r12                 ## 8-byte Reload
LBB0_22:
	addq	$48, %r12
	callq	_kvfree
	movq	%rbx, 88(%r13)
	movl	24(%r14), %esi
	cmpl	$2, %esi
	jg	LBB0_24
## %bb.23:
	xorps	%xmm0, %xmm0
	movups	%xmm0, (%r12)
	movq	$0, 16(%r12)
	jmp	LBB0_12
LBB0_24:
	movl	%r15d, %edi
	shlq	$2, %rdi
	addq	72(%r13), %rdi
	movq	%rdi, 64(%r13)
	xorl	%ecx, %ecx
	movl	%r15d, %eax
	xorl	%edx, %edx
	divl	-44(%rbp)                       ## 4-byte Folded Reload
                                        ## kill: def $eax killed $eax def $rax
	leaq	(%rdi,%rax,4), %rdx
	movq	%rdx, 56(%r13)
	cmpl	$4, %esi
	jne	LBB0_26
## %bb.25:
	leaq	(%rdx,%rax,4), %rax
	movq	%rax, (%r12)
	jmp	LBB0_13
LBB0_26:
	movq	$0, (%r12)
	jmp	LBB0_13
	.cfi_endproc
                                        ## -- End function
	.comm	_V4L2_PIX_FMT_FWHT,8,3          ## @V4L2_PIX_FMT_FWHT
	.comm	_V4L2_PIX_FMT_FWHT_STATELESS,8,3 ## @V4L2_PIX_FMT_FWHT_STATELESS
	.comm	_VB2_BUF_STATE_QUEUED,4,2       ## @VB2_BUF_STATE_QUEUED
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.no_dead_strip	_vicodec_start_streaming
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function vicodec_start_streaming
_vicodec_start_streaming:               ; @vicodec_start_streaming
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x20, x0
	bl	_vb2_get_drv_priv
	mov	x19, x0
	ldr	w1, [x20]
	bl	_get_q_data
	mov	x21, x0
	ldr	x26, [x0, #24]
	ldp	w22, w23, [x0]
	ldp	w24, w25, [x26]
	str	xzr, [x0, #16]
	ldr	w0, [x20]
	bl	_V4L2_TYPE_IS_OUTPUT
	cbz	x0, LBB0_2
; %bb.1:
	str	xzr, [x19, #24]
LBB0_2:
	str	xzr, [x19, #104]
	ldr	w0, [x20]
	bl	_V4L2_TYPE_IS_OUTPUT
	cbz	x0, LBB0_4
; %bb.3:
	ldr	x8, [x19, #16]
	cbz	x8, LBB0_11
LBB0_4:
	ldr	w0, [x20]
	bl	_V4L2_TYPE_IS_OUTPUT
	cbz	x0, LBB0_10
LBB0_5:
	ldr	x8, [x26, #8]
Lloh0:
	adrp	x9, _V4L2_PIX_FMT_FWHT@GOTPAGE
Lloh1:
	ldr	x9, [x9, _V4L2_PIX_FMT_FWHT@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
Lloh3:
	adrp	x10, _V4L2_PIX_FMT_FWHT_STATELESS@GOTPAGE
Lloh4:
	ldr	x10, [x10, _V4L2_PIX_FMT_FWHT_STATELESS@GOTPAGEOFF]
Lloh5:
	ldr	x10, [x10]
	cmp	x8, x9
	ccmp	x8, x10, #4, ne
	b.ne	LBB0_8
; %bb.6:
Lloh6:
	adrp	x8, _VB2_BUF_STATE_QUEUED@GOTPAGE
Lloh7:
	ldr	x8, [x8, _VB2_BUF_STATE_QUEUED@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_vicodec_return_bufs
Lloh9:
	adrp	x8, _EINVAL@GOTPAGE
Lloh10:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_7:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_12
LBB0_8:
	mov	x0, x21
	bl	_total_frame_size
	str	w0, [x19]
	ldr	d0, [x21, #8]
	str	d0, [x19, #96]
	ldr	d0, [x21]
	str	d0, [x19, #32]
	ldr	w9, [x26, #16]
	fmov	w8, s0
	mul	w9, w9, w8
	str	w9, [x19, #40]
	ldr	x10, [x19, #8]
	cbz	x10, LBB0_13
; %bb.9:
	mov	w0, #0
	str	w9, [x19, #44]
	b	LBB0_12
LBB0_10:
	ldr	x8, [x19, #16]
	cbz	x8, LBB0_5
LBB0_11:
	mov	w0, #0
LBB0_12:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
LBB0_13:
	ldr	w9, [x26, #20]
	mul	w8, w9, w8
	str	w8, [x19, #44]
Lloh11:
	adrp	x21, _GFP_KERNEL@GOTPAGE
Lloh12:
	ldr	x21, [x21, _GFP_KERNEL@GOTPAGEOFF]
	ldr	w1, [x21]
	bl	_kvmalloc
	stp	x0, x0, [x19, #72]
	ldr	w0, [x19]
	ldr	w1, [x21]
	bl	_kvmalloc
	mov	x21, x0
	ldr	x0, [x19, #72]
	cbz	x0, LBB0_19
; %bb.14:
	cbz	x21, LBB0_19
; %bb.15:
	ldr	x1, [x19, #88]
	cbz	x1, LBB0_20
; %bb.16:
	ldp	w8, w2, [x19]
	cmp	w2, w8
	b.ls	LBB0_18
; %bb.17:
	str	w8, [x19, #4]
	mov	x2, x8
LBB0_18:
	mov	x0, x21
	bl	_memcpy
	ldr	x0, [x19, #88]
	b	LBB0_21
LBB0_19:
	bl	_kvfree
	mov	x0, x21
	bl	_kvfree
Lloh13:
	adrp	x8, _VB2_BUF_STATE_QUEUED@GOTPAGE
Lloh14:
	ldr	x8, [x8, _VB2_BUF_STATE_QUEUED@GOTPAGEOFF]
Lloh15:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_vicodec_return_bufs
Lloh16:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh17:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
	b	LBB0_7
LBB0_20:
	mov	x0, #0
LBB0_21:
	add	x20, x19, #48
	bl	_kvfree
	str	x21, [x19, #88]
	ldr	w8, [x26, #24]
	cmp	w8, #2
	b.gt	LBB0_23
; %bb.22:
	mov	w0, #0
	stp	xzr, xzr, [x20]
	str	xzr, [x20, #16]
	b	LBB0_12
LBB0_23:
	mul	w9, w23, w22
	mul	w10, w25, w24
	ldr	x11, [x19, #72]
	add	x11, x11, w9, uxtw #2
	udiv	w9, w9, w10
	add	x10, x11, w9, uxtw #2
	stp	x10, x11, [x19, #56]
	cmp	w8, #4
	b.ne	LBB0_25
; %bb.24:
	mov	w0, #0
	add	x8, x10, x9, lsl #2
	str	x8, [x20]
	b	LBB0_12
LBB0_25:
	mov	w0, #0
	str	xzr, [x20]
	b	LBB0_12
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_V4L2_PIX_FMT_FWHT,8,3          ; @V4L2_PIX_FMT_FWHT
	.comm	_V4L2_PIX_FMT_FWHT_STATELESS,8,3 ; @V4L2_PIX_FMT_FWHT_STATELESS
	.comm	_VB2_BUF_STATE_QUEUED,4,2       ; @VB2_BUF_STATE_QUEUED
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.no_dead_strip	_vicodec_start_streaming
.subsections_via_symbols
