	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mediacodec_receive_frame
_mediacodec_receive_frame:              ## @mediacodec_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, %rbx
	movq	%rdi, %r15
	movq	(%rdi), %r12
	cmpq	$0, 32(%r12)
	je	LBB0_3
## %bb.1:
	movq	(%r12), %rsi
	movq	%r15, %rdi
	callq	_ff_mediacodec_dec_is_flushing
	testq	%rax, %rax
	je	LBB0_3
## %bb.2:
	movq	(%r12), %rsi
	movq	%r15, %rdi
	callq	_ff_mediacodec_dec_flush
	testl	%eax, %eax
	je	LBB0_24
LBB0_3:
	movq	(%r12), %rsi
	movq	%r15, %rdi
	movq	%rbx, -48(%rbp)                 ## 8-byte Spill
	movq	%rbx, %rdx
	xorl	%ecx, %ecx
	callq	_ff_mediacodec_dec_receive
	movl	%eax, %ebx
	movq	_EAGAIN@GOTPCREL(%rip), %r14
	movl	(%r14), %edi
	callq	_AVERROR
	cmpl	%eax, %ebx
	jne	LBB0_23
## %bb.4:
	leaq	8(%r12), %r13
	jmp	LBB0_5
	.p2align	4, 0x90
LBB0_22:                                ##   in Loop: Header=BB0_5 Depth=1
	testl	%ebx, %ebx
	js	LBB0_23
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r12), %rsi
	cmpq	$0, (%rsi)
	js	LBB0_6
## %bb.8:                               ##   in Loop: Header=BB0_5 Depth=1
	cmpq	$0, (%r13)
	jg	LBB0_9
	jmp	LBB0_16
	.p2align	4, 0x90
LBB0_6:                                 ##   in Loop: Header=BB0_5 Depth=1
	movl	8(%rsi), %edi
	xorl	%esi, %esi
	callq	_ff_AMediaCodec_dequeueInputBuffer
	movq	(%r12), %rsi
	testq	%rax, %rax
	js	LBB0_25
## %bb.7:                               ##   in Loop: Header=BB0_5 Depth=1
	movq	%rax, (%rsi)
	cmpq	$0, (%r13)
	jle	LBB0_16
LBB0_9:                                 ##   in Loop: Header=BB0_5 Depth=1
	movq	%r15, %rdi
	movq	%r13, %rdx
	xorl	%ecx, %ecx
	callq	_ff_mediacodec_dec_send
	movl	%eax, %ebx
	testl	%eax, %eax
	js	LBB0_13
## %bb.10:                              ##   in Loop: Header=BB0_5 Depth=1
	movq	8(%r12), %r8
	addl	%ebx, 16(%r12)
	movl	%ebx, %eax
	movq	%r8, %rcx
	subq	%rax, %rcx
	movq	%rcx, 8(%r12)
	jle	LBB0_11
## %bb.12:                              ##   in Loop: Header=BB0_5 Depth=1
	movq	_AV_LOG_WARNING@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	leaq	L_.str(%rip), %rdx
	movl	%ebx, %ecx
	callq	_av_log
	cmpq	$0, 24(%r12)
	jne	LBB0_15
	jmp	LBB0_5
	.p2align	4, 0x90
LBB0_13:                                ##   in Loop: Header=BB0_5 Depth=1
	movl	(%r14), %edi
	callq	_AVERROR
	cmpl	%eax, %ebx
	jne	LBB0_23
## %bb.14:                              ##   in Loop: Header=BB0_5 Depth=1
	cmpq	$0, 24(%r12)
	je	LBB0_5
LBB0_15:                                ##   in Loop: Header=BB0_5 Depth=1
	cmpq	$0, (%r13)
	jg	LBB0_5
LBB0_16:                                ##   in Loop: Header=BB0_5 Depth=1
	movq	%r15, %rdi
	movq	%r13, %rsi
	callq	_ff_decode_get_packet
	movl	%eax, %ebx
	movq	_AVERROR_EOF@GOTPCREL(%rip), %rax
	cmpl	(%rax), %ebx
	je	LBB0_17
## %bb.20:                              ##   in Loop: Header=BB0_5 Depth=1
	movl	(%r14), %edi
	callq	_AVERROR
	cmpl	%eax, %ebx
	jne	LBB0_22
## %bb.21:                              ##   in Loop: Header=BB0_5 Depth=1
	movq	(%r12), %rsi
	cmpq	$0, (%rsi)
	jns	LBB0_22
	jmp	LBB0_25
LBB0_11:                                ##   in Loop: Header=BB0_5 Depth=1
	movq	%r13, %rdi
	callq	_av_packet_unref
	cmpq	$0, 24(%r12)
	jne	LBB0_15
	jmp	LBB0_5
LBB0_24:
	movq	_EAGAIN@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_AVERROR                        ## TAILCALL
LBB0_25:
	movq	%r15, %rdi
	movq	-48(%rbp), %rdx                 ## 8-byte Reload
	movl	$1, %ecx
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_ff_mediacodec_dec_receive      ## TAILCALL
LBB0_17:
	xorps	%xmm0, %xmm0
	movaps	%xmm0, -64(%rbp)
	movq	(%r12), %rsi
	leaq	-64(%rbp), %rdx
	movq	%r15, %rdi
	movl	$1, %ecx
	callq	_ff_mediacodec_dec_send
	testl	%eax, %eax
	js	LBB0_19
## %bb.18:
	movq	(%r12), %rsi
	movq	%r15, %rdi
	movq	-48(%rbp), %rdx                 ## 8-byte Reload
	movl	$1, %ecx
	callq	_ff_mediacodec_dec_receive
LBB0_19:
	movl	%eax, %ebx
LBB0_23:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EAGAIN,4,2                     ## @EAGAIN
	.comm	_AV_LOG_WARNING,4,2             ## @AV_LOG_WARNING
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"could not send entire packet in single input buffer (%d < %d)\n"

	.comm	_AVERROR_EOF,4,2                ## @AVERROR_EOF
	.no_dead_strip	_mediacodec_receive_frame
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mediacodec_receive_frame
_mediacodec_receive_frame:              ; @mediacodec_receive_frame
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x19, x1
	mov	x20, x0
	ldr	x24, [x0]
	ldr	x8, [x24, #32]
	cbz	x8, LBB0_3
; %bb.1:
	ldr	x1, [x24]
	mov	x0, x20
	bl	_ff_mediacodec_dec_is_flushing
	cbz	x0, LBB0_3
; %bb.2:
	ldr	x1, [x24]
	mov	x0, x20
	bl	_ff_mediacodec_dec_flush
	cbz	w0, LBB0_20
LBB0_3:
	ldr	x1, [x24]
	mov	x0, x20
	mov	x2, x19
	mov	w3, #0
	bl	_ff_mediacodec_dec_receive
	mov	x23, x0
Lloh0:
	adrp	x25, _EAGAIN@GOTPAGE
Lloh1:
	ldr	x25, [x25, _EAGAIN@GOTPAGEOFF]
	ldr	w0, [x25]
	bl	_AVERROR
	cmp	w23, w0
	b.ne	LBB0_25
; %bb.4:
	add	x21, x24, #8
Lloh2:
	adrp	x26, _AV_LOG_WARNING@GOTPAGE
Lloh3:
	ldr	x26, [x26, _AV_LOG_WARNING@GOTPAGEOFF]
Lloh4:
	adrp	x27, _AVERROR_EOF@GOTPAGE
Lloh5:
	ldr	x27, [x27, _AVERROR_EOF@GOTPAGEOFF]
Lloh6:
	adrp	x22, l_.str@PAGE
Lloh7:
	add	x22, x22, l_.str@PAGEOFF
	b	LBB0_6
LBB0_5:                                 ;   in Loop: Header=BB0_6 Depth=1
	tbnz	w23, #31, LBB0_25
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x1, [x24]
	ldr	x8, [x1]
	tbz	x8, #63, LBB0_9
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	ldr	w0, [x1, #8]
	mov	w1, #0
	bl	_ff_AMediaCodec_dequeueInputBuffer
	ldr	x1, [x24]
	tbnz	x0, #63, LBB0_21
; %bb.8:                                ;   in Loop: Header=BB0_6 Depth=1
	str	x0, [x1]
LBB0_9:                                 ;   in Loop: Header=BB0_6 Depth=1
	ldr	x8, [x21]
	cmp	x8, #1
	b.lt	LBB0_16
; %bb.10:                               ;   in Loop: Header=BB0_6 Depth=1
	mov	x0, x20
	mov	x2, x21
	mov	w3, #0
	bl	_ff_mediacodec_dec_send
	mov	x23, x0
	tbnz	w0, #31, LBB0_13
; %bb.11:                               ;   in Loop: Header=BB0_6 Depth=1
	ldr	x4, [x24, #8]
	sub	x8, x4, w23, uxtw
	str	x8, [x24, #8]
	ldr	w9, [x24, #16]
	add	w9, w9, w23
	str	w9, [x24, #16]
	cmp	x8, #0
	b.le	LBB0_19
; %bb.12:                               ;   in Loop: Header=BB0_6 Depth=1
	ldr	w1, [x26]
	mov	x0, x20
	mov	x2, x22
	mov	x3, x23
	bl	_av_log
	ldr	x8, [x24, #24]
	cbnz	x8, LBB0_15
	b	LBB0_6
LBB0_13:                                ;   in Loop: Header=BB0_6 Depth=1
	ldr	w0, [x25]
	bl	_AVERROR
	cmp	w23, w0
	b.ne	LBB0_25
; %bb.14:                               ;   in Loop: Header=BB0_6 Depth=1
	ldr	x8, [x24, #24]
	cbz	x8, LBB0_6
LBB0_15:                                ;   in Loop: Header=BB0_6 Depth=1
	ldr	x8, [x21]
	cmp	x8, #0
	b.gt	LBB0_6
LBB0_16:                                ;   in Loop: Header=BB0_6 Depth=1
	mov	x0, x20
	mov	x1, x21
	bl	_ff_decode_get_packet
	ldr	w8, [x27]
	cmp	w0, w8
	b.eq	LBB0_22
; %bb.17:                               ;   in Loop: Header=BB0_6 Depth=1
	mov	x23, x0
	ldr	w0, [x25]
	bl	_AVERROR
	cmp	w23, w0
	b.ne	LBB0_5
; %bb.18:                               ;   in Loop: Header=BB0_6 Depth=1
	ldr	x1, [x24]
	ldr	x8, [x1]
	tbz	x8, #63, LBB0_5
	b	LBB0_21
LBB0_19:                                ;   in Loop: Header=BB0_6 Depth=1
	mov	x0, x21
	bl	_av_packet_unref
	ldr	x8, [x24, #24]
	cbnz	x8, LBB0_15
	b	LBB0_6
LBB0_20:
Lloh8:
	adrp	x8, _EAGAIN@GOTPAGE
Lloh9:
	ldr	x8, [x8, _EAGAIN@GOTPAGEOFF]
Lloh10:
	ldr	w0, [x8]
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	b	_AVERROR
LBB0_21:
	mov	x0, x20
	mov	x2, x19
	mov	w3, #1
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	b	_ff_mediacodec_dec_receive
LBB0_22:
	stp	xzr, xzr, [sp]
	ldr	x1, [x24]
	mov	x2, sp
	mov	x0, x20
	mov	w3, #1
	bl	_ff_mediacodec_dec_send
	tbnz	w0, #31, LBB0_24
; %bb.23:
	ldr	x1, [x24]
	mov	x0, x20
	mov	x2, x19
	mov	w3, #1
	bl	_ff_mediacodec_dec_receive
LBB0_24:
	mov	x23, x0
LBB0_25:
	mov	x0, x23
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_EAGAIN,4,2                     ; @EAGAIN
	.comm	_AV_LOG_WARNING,4,2             ; @AV_LOG_WARNING
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"could not send entire packet in single input buffer (%d < %d)\n"

	.comm	_AVERROR_EOF,4,2                ; @AVERROR_EOF
	.no_dead_strip	_mediacodec_receive_frame
.subsections_via_symbols
