	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function vp8_enc_encode_frame
_vp8_enc_encode_frame:                  ## @vp8_enc_encode_frame
	.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
	movq	%rcx, %r14
	movq	%rdx, %r12
	movq	%rsi, %rbx
	movq	%rdi, %r15
	movl	4(%rdi), %edx
	leaq	L_.str(%rip), %rsi
	xorl	%eax, %eax
	callq	_mtk_vcodec_debug
	movq	%r15, %rdi
	xorl	%esi, %esi
	movq	%rbx, %rdx
	movq	%r12, %rcx
	movq	%r14, %r8
	callq	_vpu_enc_encode
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_6
## %bb.1:
	movq	%r15, %rdi
	callq	_vp8_enc_wait_venc_done
	movq	_MTK_VENC_IRQ_STATUS_FRM@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_2
## %bb.3:
	movq	%r15, %rdi
	movq	%r12, %rsi
	movq	%r14, %rdx
	callq	_vp8_enc_compose_one_frame
	testq	%rax, %rax
	je	LBB0_5
## %bb.4:
	leaq	L_.str.2(%rip), %rsi
	xorl	%ebx, %ebx
	movq	%r15, %rdi
	xorl	%eax, %eax
	callq	_mtk_vcodec_err
	movq	_EINVAL@GOTPCREL(%rip), %rax
	subl	(%rax), %ebx
	jmp	LBB0_6
LBB0_2:
	leaq	L_.str.1(%rip), %rsi
	xorl	%ebx, %ebx
	movq	%r15, %rdi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_mtk_vcodec_err
	movq	_EIO@GOTPCREL(%rip), %rax
	subl	(%rax), %ebx
	jmp	LBB0_6
LBB0_5:
	incl	4(%r15)
	movl	(%r14), %edx
	movl	(%r15), %ecx
	leaq	L_.str.3(%rip), %rsi
	xorl	%ebx, %ebx
	movq	%r15, %rdi
	xorl	%eax, %eax
	callq	_mtk_vcodec_debug
LBB0_6:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"->frm_cnt=%d"

	.comm	_MTK_VENC_IRQ_STATUS_FRM,4,2    ## @MTK_VENC_IRQ_STATUS_FRM
L_.str.1:                               ## @.str.1
	.asciz	"irq_status=%d failed"

	.comm	_EIO,4,2                        ## @EIO
L_.str.2:                               ## @.str.2
	.asciz	"vp8_enc_compose_one_frame failed"

	.comm	_EINVAL,4,2                     ## @EINVAL
L_.str.3:                               ## @.str.3
	.asciz	"<-size=%d key_frm=%d"

	.no_dead_strip	_vp8_enc_encode_frame
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function vp8_enc_encode_frame
_vp8_enc_encode_frame:                  ; @vp8_enc_encode_frame
	.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
	mov	x20, x3
	mov	x21, x2
	mov	x22, x1
	mov	x19, x0
	ldr	w2, [x0, #4]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	bl	_mtk_vcodec_debug
	mov	x0, x19
	mov	w1, #0
	mov	x2, x22
	mov	x3, x21
	mov	x4, x20
	bl	_vpu_enc_encode
	cbnz	w0, LBB0_7
; %bb.1:
	mov	x0, x19
	bl	_vp8_enc_wait_venc_done
                                        ; kill: def $w0 killed $w0 def $x0
Lloh2:
	adrp	x8, _MTK_VENC_IRQ_STATUS_FRM@GOTPAGE
Lloh3:
	ldr	x8, [x8, _MTK_VENC_IRQ_STATUS_FRM@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	cmp	w0, w8
	b.ne	LBB0_4
; %bb.2:
	mov	x0, x19
	mov	x1, x21
	mov	x2, x20
	bl	_vp8_enc_compose_one_frame
	cbz	x0, LBB0_6
; %bb.3:
Lloh5:
	adrp	x1, l_.str.2@PAGE
Lloh6:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x19
	bl	_mtk_vcodec_err
Lloh7:
	adrp	x8, _EINVAL@GOTPAGE
Lloh8:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_5
LBB0_4:
	str	x0, [sp]
Lloh9:
	adrp	x1, l_.str.1@PAGE
Lloh10:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_mtk_vcodec_err
Lloh11:
	adrp	x8, _EIO@GOTPAGE
Lloh12:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
LBB0_5:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_7
LBB0_6:
	ldp	w9, w8, [x19]
	add	w8, w8, #1
	str	w8, [x19, #4]
	ldr	w2, [x20]
	str	x9, [sp]
Lloh13:
	adrp	x1, l_.str.3@PAGE
Lloh14:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x19
	bl	_mtk_vcodec_debug
	mov	w0, #0
LBB0_7:
	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 AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpAdd	Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"->frm_cnt=%d"

	.comm	_MTK_VENC_IRQ_STATUS_FRM,4,2    ; @MTK_VENC_IRQ_STATUS_FRM
l_.str.1:                               ; @.str.1
	.asciz	"irq_status=%d failed"

	.comm	_EIO,4,2                        ; @EIO
l_.str.2:                               ; @.str.2
	.asciz	"vp8_enc_compose_one_frame failed"

	.comm	_EINVAL,4,2                     ; @EINVAL
l_.str.3:                               ; @.str.3
	.asciz	"<-size=%d key_frm=%d"

	.no_dead_strip	_vp8_enc_encode_frame
.subsections_via_symbols
