	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function rkmpp_receive_frame
_rkmpp_receive_frame:                   ## @rkmpp_receive_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	%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	%rsi, %r14
	movq	%rdi, %r15
	movq	(%rdi), %rax
	movq	(%rax), %rax
	movq	(%rax), %rax
	movl	$0, -48(%rbp)
	cmpl	$0, 16(%rax)
	je	LBB0_1
LBB0_11:
	movq	%r15, %rdi
	movq	%r14, %rsi
	callq	_rkmpp_retrieve_frame
LBB0_12:
	movl	%eax, %ebx
	jmp	LBB0_13
LBB0_1:
	movq	8(%rax), %rcx
	movl	(%rax), %edi
	movq	_MPP_DEC_GET_STREAM_COUNT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-52(%rbp), %rdx
	callq	*(%rcx)
	movl	%eax, %ebx
	movq	_MPP_OK@GOTPCREL(%rip), %rax
	cmpl	(%rax), %ebx
	jne	LBB0_2
## %bb.4:
	movq	_INPUT_MAX_PACKETS@GOTPCREL(%rip), %rax
	movl	(%rax), %r13d
	subl	-52(%rbp), %r13d
	jle	LBB0_11
## %bb.5:
	leaq	-48(%rbp), %rsi
	movq	%r15, %rdi
	callq	_ff_decode_get_packet
	testl	%eax, %eax
	jns	LBB0_7
## %bb.6:
	movl	%eax, %ebx
	movq	_AVERROR_EOF@GOTPCREL(%rip), %rax
	cmpl	(%rax), %ebx
	jne	LBB0_13
LBB0_7:
	leaq	-48(%rbp), %r12
	movq	%r15, %rdi
	movq	%r12, %rsi
	callq	_rkmpp_send_packet
	movl	%eax, %ebx
	movq	%r12, %rdi
	callq	_av_packet_unref
	testl	%ebx, %ebx
	js	LBB0_8
## %bb.9:
	cmpl	$2, %r13d
	jb	LBB0_11
## %bb.10:
	movq	_EAGAIN@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_AVERROR
	jmp	LBB0_12
LBB0_2:
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdx
LBB0_3:
	movq	%r15, %rdi
	movl	%ebx, %ecx
	callq	_av_log
LBB0_13:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_8:
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.1(%rip), %rdx
	jmp	LBB0_3
	.cfi_endproc
                                        ## -- End function
	.comm	_MPP_NOK,4,2                    ## @MPP_NOK
	.comm	_MPP_DEC_GET_STREAM_COUNT,4,2   ## @MPP_DEC_GET_STREAM_COUNT
	.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 get decoder used slots (code = %d).\n"

	.comm	_INPUT_MAX_PACKETS,4,2          ## @INPUT_MAX_PACKETS
	.comm	_AVERROR_EOF,4,2                ## @AVERROR_EOF
L_.str.1:                               ## @.str.1
	.asciz	"Failed to send packet to decoder (code = %d)\n"

	.comm	_EAGAIN,4,2                     ## @EAGAIN
	.no_dead_strip	_rkmpp_receive_frame
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function rkmpp_receive_frame
_rkmpp_receive_frame:                   ; @rkmpp_receive_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, x1
	mov	x19, x0
	ldr	x8, [x0]
	ldr	x8, [x8]
	ldr	x8, [x8]
	str	wzr, [sp, #8]
	ldr	w9, [x8, #16]
	cbz	w9, LBB0_3
LBB0_1:
	mov	x0, x19
	mov	x1, x20
	bl	_rkmpp_retrieve_frame
LBB0_2:
	mov	x21, x0
	b	LBB0_12
LBB0_3:
	ldr	x9, [x8, #8]
	ldr	x9, [x9]
	ldr	w0, [x8]
Lloh0:
	adrp	x8, _MPP_DEC_GET_STREAM_COUNT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MPP_DEC_GET_STREAM_COUNT@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	add	x2, sp, #4
	blr	x9
Lloh3:
	adrp	x8, _MPP_OK@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MPP_OK@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	cmp	w0, w8
	b.ne	LBB0_10
; %bb.4:
Lloh6:
	adrp	x8, _INPUT_MAX_PACKETS@GOTPAGE
Lloh7:
	ldr	x8, [x8, _INPUT_MAX_PACKETS@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	ldr	w9, [sp, #4]
	sub	w22, w8, w9
	cmp	w22, #1
	b.lt	LBB0_1
; %bb.5:
	add	x1, sp, #8
	mov	x0, x19
	bl	_ff_decode_get_packet
	tbz	w0, #31, LBB0_7
; %bb.6:
	mov	x21, x0
Lloh9:
	adrp	x8, _AVERROR_EOF@GOTPAGE
Lloh10:
	ldr	x8, [x8, _AVERROR_EOF@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	cmp	w0, w8
	b.ne	LBB0_12
LBB0_7:
	add	x1, sp, #8
	mov	x0, x19
	bl	_rkmpp_send_packet
	mov	x21, x0
	add	x0, sp, #8
	bl	_av_packet_unref
	tbnz	w21, #31, LBB0_13
; %bb.8:
	cmp	w22, #2
	b.lo	LBB0_1
; %bb.9:
Lloh12:
	adrp	x8, _EAGAIN@GOTPAGE
Lloh13:
	ldr	x8, [x8, _EAGAIN@GOTPAGEOFF]
Lloh14:
	ldr	w0, [x8]
	bl	_AVERROR
	b	LBB0_2
LBB0_10:
	mov	x21, x0
Lloh15:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh16:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh17:
	ldr	w1, [x8]
Lloh18:
	adrp	x2, l_.str@PAGE
Lloh19:
	add	x2, x2, l_.str@PAGEOFF
LBB0_11:
	mov	x0, x19
	mov	x3, x21
	bl	_av_log
LBB0_12:
	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
	add	sp, sp, #64
	ret
LBB0_13:
Lloh20:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh21:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh22:
	ldr	w1, [x8]
Lloh23:
	adrp	x2, l_.str.1@PAGE
Lloh24:
	add	x2, x2, l_.str.1@PAGEOFF
	b	LBB0_11
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.cfi_endproc
                                        ; -- End function
	.comm	_MPP_NOK,4,2                    ; @MPP_NOK
	.comm	_MPP_DEC_GET_STREAM_COUNT,4,2   ; @MPP_DEC_GET_STREAM_COUNT
	.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 get decoder used slots (code = %d).\n"

	.comm	_INPUT_MAX_PACKETS,4,2          ; @INPUT_MAX_PACKETS
	.comm	_AVERROR_EOF,4,2                ; @AVERROR_EOF
l_.str.1:                               ; @.str.1
	.asciz	"Failed to send packet to decoder (code = %d)\n"

	.comm	_EAGAIN,4,2                     ; @EAGAIN
	.no_dead_strip	_rkmpp_receive_frame
.subsections_via_symbols
