	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function vb2ops_venc_start_streaming
_vb2ops_venc_start_streaming:           ## @vb2ops_venc_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
	movq	(%rax), %rax
	movq	_MTK_STATE_ABORT@GOTPCREL(%rip), %r15
	cmpq	(%r15), %rax
	je	LBB0_6
## %bb.1:
	movq	_MTK_STATE_FREE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_6
## %bb.2:
	movl	4(%r12), %edi
	callq	_V4L2_TYPE_IS_OUTPUT
	movq	40(%r13), %rdi
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:
	addq	$4, %rdi
LBB0_4:
	callq	_vb2_start_streaming_called
	testl	%eax, %eax
	je	LBB0_5
## %bb.8:
	leaq	-56(%rbp), %r14
	movq	%r13, %rdi
	movq	%r14, %rsi
	callq	_mtk_venc_set_param
	movq	_VENC_SET_PARAM_ENC@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	movq	%r14, %rdx
	callq	_venc_if_set_param
	testl	%eax, %eax
	je	LBB0_16
## %bb.9:
	movl	%eax, %ebx
	leaq	L_.str(%rip), %rdi
	movl	%eax, %esi
	callq	_mtk_v4l2_err
	movq	(%r15), %rax
	movq	%rax, (%r13)
	cmpl	$0, (%r12)
	jg	LBB0_10
	jmp	LBB0_15
LBB0_6:
	movq	_EIO@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	cmpl	$0, (%r12)
	jle	LBB0_15
LBB0_10:
	movq	%rbx, -48(%rbp)                 ## 8-byte Spill
	xorl	%ebx, %ebx
	movq	_VB2_BUF_STATE_ACTIVE@GOTPCREL(%rip), %r14
	jmp	LBB0_12
	.p2align	4, 0x90
LBB0_11:                                ##   in Loop: Header=BB0_12 Depth=1
	incl	%ebx
	cmpl	(%r12), %ebx
	jge	LBB0_14
LBB0_12:                                ## =>This Inner Loop Header: Depth=1
	movq	%r12, %rdi
	movl	%ebx, %esi
	callq	_vb2_get_buffer
	movq	(%rax), %r9
	cmpq	(%r14), %r9
	jne	LBB0_11
## %bb.13:                              ##   in Loop: Header=BB0_12 Depth=1
	movq	%rax, %r15
	movl	8(%r13), %edx
	movl	4(%r12), %r8d
	xorl	%edi, %edi
	leaq	L_.str.1(%rip), %rsi
	movl	%ebx, %ecx
                                        ## kill: def $r9d killed $r9d killed $r9
	callq	_mtk_v4l2_debug
	movq	%r15, %rdi
	callq	_to_vb2_v4l2_buffer
	movq	_VB2_BUF_STATE_QUEUED@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movl	%eax, %edi
	callq	_v4l2_m2m_buf_done
	jmp	LBB0_11
LBB0_14:
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	jmp	LBB0_15
LBB0_5:
	xorl	%ebx, %ebx
	jmp	LBB0_15
LBB0_16:
	movq	_MTK_ENCODE_PARAM_NONE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 32(%r13)
	movq	24(%r13), %rax
	movq	_MTK_Q_DATA_DST@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	(%rax,%rcx,8), %rax
	movq	(%rax), %rax
	movq	_V4L2_PIX_FMT_H264@GOTPCREL(%rip), %rcx
	xorl	%ebx, %ebx
	cmpq	(%rcx), %rax
	jne	LBB0_15
## %bb.17:
	movq	16(%r13), %rax
	movq	_V4L2_MPEG_VIDEO_HEADER_MODE_SEPARATE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_15
## %bb.18:
	movq	_VENC_SET_PARAM_PREPEND_HEADER@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%ebx, %ebx
	movq	%r13, %rdi
	xorl	%edx, %edx
	callq	_venc_if_set_param
	testl	%eax, %eax
	je	LBB0_20
## %bb.19:
	movl	%eax, %r14d
	leaq	L_.str(%rip), %rdi
	movl	%eax, %esi
	callq	_mtk_v4l2_err
	movq	(%r15), %rax
	movq	%rax, (%r13)
	movl	%r14d, %ebx
	cmpl	$0, (%r12)
	jg	LBB0_10
	jmp	LBB0_15
LBB0_20:
	movq	_MTK_STATE_HEADER@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, (%r13)
LBB0_15:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MTK_STATE_ABORT,8,3            ## @MTK_STATE_ABORT
	.comm	_MTK_STATE_FREE,8,3             ## @MTK_STATE_FREE
	.comm	_EIO,4,2                        ## @EIO
	.comm	_VENC_SET_PARAM_ENC,4,2         ## @VENC_SET_PARAM_ENC
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"venc_if_set_param failed=%d"

	.comm	_MTK_ENCODE_PARAM_NONE,4,2      ## @MTK_ENCODE_PARAM_NONE
	.comm	_MTK_Q_DATA_DST,8,3             ## @MTK_Q_DATA_DST
	.comm	_V4L2_PIX_FMT_H264,8,3          ## @V4L2_PIX_FMT_H264
	.comm	_V4L2_MPEG_VIDEO_HEADER_MODE_SEPARATE,8,3 ## @V4L2_MPEG_VIDEO_HEADER_MODE_SEPARATE
	.comm	_VENC_SET_PARAM_PREPEND_HEADER,4,2 ## @VENC_SET_PARAM_PREPEND_HEADER
	.comm	_MTK_STATE_HEADER,8,3           ## @MTK_STATE_HEADER
	.comm	_VB2_BUF_STATE_ACTIVE,8,3       ## @VB2_BUF_STATE_ACTIVE
L_.str.1:                               ## @.str.1
	.asciz	"[%d] id=%d, type=%d, %d -> VB2_BUF_STATE_QUEUED"

	.comm	_VB2_BUF_STATE_QUEUED,4,2       ## @VB2_BUF_STATE_QUEUED
	.no_dead_strip	_vb2ops_venc_start_streaming
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function vb2ops_venc_start_streaming
_vb2ops_venc_start_streaming:           ; @vb2ops_venc_start_streaming
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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	x19, x0
	bl	_vb2_get_drv_priv
	mov	x20, x0
	ldr	x8, [x0]
Lloh0:
	adrp	x22, _MTK_STATE_ABORT@GOTPAGE
Lloh1:
	ldr	x22, [x22, _MTK_STATE_ABORT@GOTPAGEOFF]
	ldr	x9, [x22]
Lloh2:
	adrp	x10, _MTK_STATE_FREE@GOTPAGE
Lloh3:
	ldr	x10, [x10, _MTK_STATE_FREE@GOTPAGEOFF]
Lloh4:
	ldr	x10, [x10]
	cmp	x8, x9
	ccmp	x8, x10, #4, ne
	b.ne	LBB0_2
; %bb.1:
Lloh5:
	adrp	x8, _EIO@GOTPAGE
Lloh6:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	neg	w21, w8
	b	LBB0_8
LBB0_2:
	ldr	w0, [x19, #4]
	bl	_V4L2_TYPE_IS_OUTPUT
	mov	x8, x0
	ldr	x0, [x20, #40]
	cbz	x8, LBB0_4
; %bb.3:
	add	x0, x0, #4
LBB0_4:
	bl	_vb2_start_streaming_called
	cbz	w0, LBB0_15
; %bb.5:
	add	x1, sp, #8
	mov	x0, x20
	bl	_mtk_venc_set_param
Lloh8:
	adrp	x8, _VENC_SET_PARAM_ENC@GOTPAGE
Lloh9:
	ldr	x8, [x8, _VENC_SET_PARAM_ENC@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
	add	x2, sp, #8
	mov	x0, x20
	bl	_venc_if_set_param
	cbz	w0, LBB0_13
; %bb.6:
	mov	x21, x0
LBB0_7:
Lloh11:
	adrp	x0, l_.str@PAGE
Lloh12:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x21
	bl	_mtk_v4l2_err
	ldr	x8, [x22]
	str	x8, [x20]
LBB0_8:
	ldr	w8, [x19]
	cmp	w8, #1
	b.lt	LBB0_16
; %bb.9:
	mov	w22, #0
Lloh13:
	adrp	x25, _VB2_BUF_STATE_ACTIVE@GOTPAGE
Lloh14:
	ldr	x25, [x25, _VB2_BUF_STATE_ACTIVE@GOTPAGEOFF]
Lloh15:
	adrp	x26, _VB2_BUF_STATE_QUEUED@GOTPAGE
Lloh16:
	ldr	x26, [x26, _VB2_BUF_STATE_QUEUED@GOTPAGEOFF]
Lloh17:
	adrp	x23, l_.str.1@PAGE
Lloh18:
	add	x23, x23, l_.str.1@PAGEOFF
	b	LBB0_11
LBB0_10:                                ;   in Loop: Header=BB0_11 Depth=1
	add	w22, w22, #1
	ldr	w8, [x19]
	cmp	w22, w8
	b.ge	LBB0_16
LBB0_11:                                ; =>This Inner Loop Header: Depth=1
	mov	x0, x19
	mov	x1, x22
	bl	_vb2_get_buffer
	ldr	x5, [x0]
	ldr	x8, [x25]
	cmp	x5, x8
	b.ne	LBB0_10
; %bb.12:                               ;   in Loop: Header=BB0_11 Depth=1
	mov	x24, x0
	ldr	w2, [x20, #8]
	ldr	w4, [x19, #4]
	mov	w0, #0
	mov	x1, x23
	mov	x3, x22
                                        ; kill: def $w5 killed $w5 killed $x5
	bl	_mtk_v4l2_debug
	mov	x0, x24
	bl	_to_vb2_v4l2_buffer
	ldr	w1, [x26]
	bl	_v4l2_m2m_buf_done
	b	LBB0_10
LBB0_13:
Lloh19:
	adrp	x8, _MTK_ENCODE_PARAM_NONE@GOTPAGE
Lloh20:
	ldr	x8, [x8, _MTK_ENCODE_PARAM_NONE@GOTPAGEOFF]
Lloh21:
	ldr	w8, [x8]
	ldr	x9, [x20, #24]
Lloh22:
	adrp	x10, _MTK_Q_DATA_DST@GOTPAGE
Lloh23:
	ldr	x10, [x10, _MTK_Q_DATA_DST@GOTPAGEOFF]
Lloh24:
	ldr	x10, [x10]
	ldr	x9, [x9, x10, lsl #3]
	str	w8, [x20, #32]
	ldr	x8, [x9]
Lloh25:
	adrp	x9, _V4L2_PIX_FMT_H264@GOTPAGE
Lloh26:
	ldr	x9, [x9, _V4L2_PIX_FMT_H264@GOTPAGEOFF]
Lloh27:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_15
; %bb.14:
	ldr	x8, [x20, #16]
Lloh28:
	adrp	x9, _V4L2_MPEG_VIDEO_HEADER_MODE_SEPARATE@GOTPAGE
Lloh29:
	ldr	x9, [x9, _V4L2_MPEG_VIDEO_HEADER_MODE_SEPARATE@GOTPAGEOFF]
Lloh30:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_17
LBB0_15:
	mov	w21, #0
LBB0_16:
	mov	x0, x21
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
LBB0_17:
Lloh31:
	adrp	x8, _VENC_SET_PARAM_PREPEND_HEADER@GOTPAGE
Lloh32:
	ldr	x8, [x8, _VENC_SET_PARAM_PREPEND_HEADER@GOTPAGEOFF]
Lloh33:
	ldr	w1, [x8]
	mov	x0, x20
	mov	x2, #0
	bl	_venc_if_set_param
	mov	x21, x0
	cbnz	w0, LBB0_7
; %bb.18:
Lloh34:
	adrp	x8, _MTK_STATE_HEADER@GOTPAGE
Lloh35:
	ldr	x8, [x8, _MTK_STATE_HEADER@GOTPAGEOFF]
Lloh36:
	ldr	x8, [x8]
	str	x8, [x20]
	b	LBB0_16
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.cfi_endproc
                                        ; -- End function
	.comm	_MTK_STATE_ABORT,8,3            ; @MTK_STATE_ABORT
	.comm	_MTK_STATE_FREE,8,3             ; @MTK_STATE_FREE
	.comm	_EIO,4,2                        ; @EIO
	.comm	_VENC_SET_PARAM_ENC,4,2         ; @VENC_SET_PARAM_ENC
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"venc_if_set_param failed=%d"

	.comm	_MTK_ENCODE_PARAM_NONE,4,2      ; @MTK_ENCODE_PARAM_NONE
	.comm	_MTK_Q_DATA_DST,8,3             ; @MTK_Q_DATA_DST
	.comm	_V4L2_PIX_FMT_H264,8,3          ; @V4L2_PIX_FMT_H264
	.comm	_V4L2_MPEG_VIDEO_HEADER_MODE_SEPARATE,8,3 ; @V4L2_MPEG_VIDEO_HEADER_MODE_SEPARATE
	.comm	_VENC_SET_PARAM_PREPEND_HEADER,4,2 ; @VENC_SET_PARAM_PREPEND_HEADER
	.comm	_MTK_STATE_HEADER,8,3           ; @MTK_STATE_HEADER
	.comm	_VB2_BUF_STATE_ACTIVE,8,3       ; @VB2_BUF_STATE_ACTIVE
l_.str.1:                               ; @.str.1
	.asciz	"[%d] id=%d, type=%d, %d -> VB2_BUF_STATE_QUEUED"

	.comm	_VB2_BUF_STATE_QUEUED,4,2       ; @VB2_BUF_STATE_QUEUED
	.no_dead_strip	_vb2ops_venc_start_streaming
.subsections_via_symbols
