	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function rkmpp_write_data
_rkmpp_write_data:                      ## @rkmpp_write_data
	.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	%ecx, %r12d
	movl	%edx, %r14d
	movq	%rsi, %rbx
	movq	%rdi, %r15
	movq	(%rdi), %rax
	movq	(%rax), %rax
	movq	(%rax), %r13
	leaq	-44(%rbp), %rdi
	callq	_mpp_packet_init
	movq	_MPP_OK@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_1
## %bb.2:
	movl	-44(%rbp), %edi
	movl	%r12d, %esi
	callq	_mpp_packet_set_pts
	testq	%rbx, %rbx
	jne	LBB0_4
## %bb.3:
	movl	-44(%rbp), %edi
	callq	_mpp_packet_set_eos
LBB0_4:
	movq	8(%r13), %rax
	movl	(%r13), %edi
	movl	-44(%rbp), %esi
	callq	*(%rax)
	movl	%eax, %ebx
	movq	_MPP_OK@GOTPCREL(%rip), %rax
	cmpl	(%rax), %ebx
	jne	LBB0_5
## %bb.8:
	movq	_AV_LOG_DEBUG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.2(%rip), %rdx
	movq	%r15, %rdi
	movl	%r14d, %ecx
	callq	_av_log
	jmp	LBB0_9
LBB0_1:
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	leaq	L_.str(%rip), %rdx
	movq	%r15, %rdi
	movl	%eax, %ecx
	callq	_av_log
	movq	_AVERROR_UNKNOWN@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	jmp	LBB0_10
LBB0_5:
	movq	_MPP_ERR_BUFFER_FULL@GOTPCREL(%rip), %rax
	cmpl	(%rax), %ebx
	jne	LBB0_7
## %bb.6:
	movq	_AV_LOG_DEBUG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.1(%rip), %rdx
	movq	%r15, %rdi
	movl	%r14d, %ecx
	callq	_av_log
	movq	_EAGAIN@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_AVERROR
	movl	%eax, %ebx
	jmp	LBB0_9
LBB0_7:
	movq	_AVERROR_UNKNOWN@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
LBB0_9:
	leaq	-44(%rbp), %rdi
	callq	_mpp_packet_deinit
LBB0_10:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MPP_OK,4,2                     ## @MPP_OK
	.comm	_AV_LOG_ERROR,4,2               ## @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Failed to init MPP packet (code = %d)\n"

	.comm	_AVERROR_UNKNOWN,4,2            ## @AVERROR_UNKNOWN
	.comm	_MPP_ERR_BUFFER_FULL,4,2        ## @MPP_ERR_BUFFER_FULL
	.comm	_AV_LOG_DEBUG,4,2               ## @AV_LOG_DEBUG
L_.str.1:                               ## @.str.1
	.asciz	"Buffer full writing %d bytes to decoder\n"

	.comm	_EAGAIN,4,2                     ## @EAGAIN
L_.str.2:                               ## @.str.2
	.asciz	"Wrote %d bytes to decoder\n"

	.no_dead_strip	_rkmpp_write_data
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function rkmpp_write_data
_rkmpp_write_data:                      ; @rkmpp_write_data
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.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
	mov	x22, x3
	mov	x19, x2
	mov	x21, x1
	mov	x20, x0
	ldr	x8, [x0]
	ldr	x8, [x8]
	ldr	x23, [x8]
	add	x0, sp, #12
	bl	_mpp_packet_init
Lloh0:
	adrp	x24, _MPP_OK@GOTPAGE
Lloh1:
	ldr	x24, [x24, _MPP_OK@GOTPAGEOFF]
	ldr	w8, [x24]
	cmp	w0, w8
	b.ne	LBB0_5
; %bb.1:
	ldr	w0, [sp, #12]
	mov	x1, x22
	bl	_mpp_packet_set_pts
	cbnz	x21, LBB0_3
; %bb.2:
	ldr	w0, [sp, #12]
	bl	_mpp_packet_set_eos
LBB0_3:
	ldr	x8, [x23, #8]
	ldr	x8, [x8]
	ldr	w0, [x23]
	ldr	w1, [sp, #12]
	blr	x8
	mov	x21, x0
	ldr	w8, [x24]
	cmp	w0, w8
	b.ne	LBB0_6
; %bb.4:
Lloh2:
	adrp	x8, _AV_LOG_DEBUG@GOTPAGE
Lloh3:
	ldr	x8, [x8, _AV_LOG_DEBUG@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
Lloh5:
	adrp	x2, l_.str.2@PAGE
Lloh6:
	add	x2, x2, l_.str.2@PAGEOFF
	mov	x0, x20
	mov	x3, x19
	bl	_av_log
	b	LBB0_9
LBB0_5:
	mov	x3, x0
Lloh7:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh8:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh9:
	ldr	w1, [x8]
Lloh10:
	adrp	x2, l_.str@PAGE
Lloh11:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, x20
	bl	_av_log
Lloh12:
	adrp	x8, _AVERROR_UNKNOWN@GOTPAGE
Lloh13:
	ldr	x8, [x8, _AVERROR_UNKNOWN@GOTPAGEOFF]
Lloh14:
	ldr	w21, [x8]
	b	LBB0_10
LBB0_6:
Lloh15:
	adrp	x8, _MPP_ERR_BUFFER_FULL@GOTPAGE
Lloh16:
	ldr	x8, [x8, _MPP_ERR_BUFFER_FULL@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
	cmp	w21, w8
	b.ne	LBB0_8
; %bb.7:
Lloh18:
	adrp	x8, _AV_LOG_DEBUG@GOTPAGE
Lloh19:
	ldr	x8, [x8, _AV_LOG_DEBUG@GOTPAGEOFF]
Lloh20:
	ldr	w1, [x8]
Lloh21:
	adrp	x2, l_.str.1@PAGE
Lloh22:
	add	x2, x2, l_.str.1@PAGEOFF
	mov	x0, x20
	mov	x3, x19
	bl	_av_log
Lloh23:
	adrp	x8, _EAGAIN@GOTPAGE
Lloh24:
	ldr	x8, [x8, _EAGAIN@GOTPAGEOFF]
Lloh25:
	ldr	w0, [x8]
	bl	_AVERROR
	mov	x21, x0
	b	LBB0_9
LBB0_8:
Lloh26:
	adrp	x8, _AVERROR_UNKNOWN@GOTPAGE
Lloh27:
	ldr	x8, [x8, _AVERROR_UNKNOWN@GOTPAGEOFF]
Lloh28:
	ldr	w21, [x8]
LBB0_9:
	add	x0, sp, #12
	bl	_mpp_packet_deinit
LBB0_10:
	mov	x0, x21
	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
	add	sp, sp, #80
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.cfi_endproc
                                        ; -- End function
	.comm	_MPP_OK,4,2                     ; @MPP_OK
	.comm	_AV_LOG_ERROR,4,2               ; @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Failed to init MPP packet (code = %d)\n"

	.comm	_AVERROR_UNKNOWN,4,2            ; @AVERROR_UNKNOWN
	.comm	_MPP_ERR_BUFFER_FULL,4,2        ; @MPP_ERR_BUFFER_FULL
	.comm	_AV_LOG_DEBUG,4,2               ; @AV_LOG_DEBUG
l_.str.1:                               ; @.str.1
	.asciz	"Buffer full writing %d bytes to decoder\n"

	.comm	_EAGAIN,4,2                     ; @EAGAIN
l_.str.2:                               ; @.str.2
	.asciz	"Wrote %d bytes to decoder\n"

	.no_dead_strip	_rkmpp_write_data
.subsections_via_symbols
