	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mpc8_read_packet
_mpc8_read_packet:                      ## @mpc8_read_packet
	.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, -56(%rbp)                 ## 8-byte Spill
	movq	%rdi, %rbx
	movq	8(%rdi), %r14
	movl	(%rdi), %edi
	callq	_avio_feof
	testl	%eax, %eax
	je	LBB0_1
LBB0_12:
	movq	_AVERROR_EOF@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_13:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_1:
	leaq	-44(%rbp), %r15
	leaq	-64(%rbp), %r12
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%rbx), %edi
	callq	_avio_tell
	movq	%rax, %r13
	movq	(%r14), %rax
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	cmpq	%rax, %r13
	jge	LBB0_12
LBB0_4:                                 ##   in Loop: Header=BB0_2 Depth=1
	movl	(%rbx), %edi
	movq	%r15, %rsi
	movq	%r12, %rdx
	callq	_mpc8_get_chunk_header
	movq	-64(%rbp), %rcx
	testq	%rcx, %rcx
	js	LBB0_5
## %bb.6:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	-44(%rbp), %esi
	movq	_TAG_AUDIOPACKET@GOTPCREL(%rip), %rax
	cmpl	(%rax), %esi
	je	LBB0_7
## %bb.10:                              ##   in Loop: Header=BB0_2 Depth=1
	movq	_TAG_STREAMEND@GOTPCREL(%rip), %rax
	cmpl	(%rax), %esi
	je	LBB0_12
## %bb.11:                              ##   in Loop: Header=BB0_2 Depth=1
	movq	%rbx, %rdi
	movq	%r13, %rdx
	callq	_mpc8_handle_chunk
	movl	(%rbx), %edi
	callq	_avio_feof
	testl	%eax, %eax
	je	LBB0_2
	jmp	LBB0_12
LBB0_5:
	movl	$-1, %eax
	jmp	LBB0_13
LBB0_7:
	movl	(%rbx), %edi
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rsi
	movq	%rcx, %rdx
	callq	_av_get_packet
	testq	%rax, %rax
	js	LBB0_8
## %bb.9:
	movq	$0, 8(%rbx)
	movl	$1, (%rbx)
	xorl	%eax, %eax
	jmp	LBB0_13
LBB0_8:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_AVERROR
	jmp	LBB0_13
	.cfi_endproc
                                        ## -- End function
	.comm	_AVERROR_EOF,4,2                ## @AVERROR_EOF
	.comm	_TAG_AUDIOPACKET,4,2            ## @TAG_AUDIOPACKET
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_TAG_STREAMEND,4,2              ## @TAG_STREAMEND
	.no_dead_strip	_mpc8_read_packet
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mpc8_read_packet
_mpc8_read_packet:                      ; @mpc8_read_packet
	.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	x19, x1
	mov	x20, x0
	ldr	x22, [x0, #8]
	ldr	w0, [x0]
	bl	_avio_feof
	cbz	w0, LBB0_3
LBB0_1:
Lloh0:
	adrp	x8, _AVERROR_EOF@GOTPAGE
Lloh1:
	ldr	x8, [x8, _AVERROR_EOF@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
LBB0_2:
	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
LBB0_3:
Lloh3:
	adrp	x23, _TAG_AUDIOPACKET@GOTPAGE
Lloh4:
	ldr	x23, [x23, _TAG_AUDIOPACKET@GOTPAGEOFF]
Lloh5:
	adrp	x24, _TAG_STREAMEND@GOTPAGE
Lloh6:
	ldr	x24, [x24, _TAG_STREAMEND@GOTPAGEOFF]
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x20]
	bl	_avio_tell
	ldr	x8, [x22]
	cmp	x8, #0
	ccmp	x0, x8, #8, ne
	b.ge	LBB0_1
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	x21, x0
	ldr	w0, [x20]
	add	x1, sp, #12
	mov	x2, sp
	bl	_mpc8_get_chunk_header
	ldr	x3, [sp]
	tbnz	x3, #63, LBB0_9
; %bb.6:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	w1, [sp, #12]
	ldr	w8, [x23]
	cmp	w1, w8
	b.eq	LBB0_10
; %bb.7:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	w8, [x24]
	cmp	w1, w8
	b.eq	LBB0_1
; %bb.8:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	x0, x20
	mov	x2, x21
	bl	_mpc8_handle_chunk
	ldr	w0, [x20]
	bl	_avio_feof
	cbz	w0, LBB0_4
	b	LBB0_1
LBB0_9:
	mov	w0, #-1
	b	LBB0_2
LBB0_10:
	ldr	w0, [x20]
	mov	x1, x19
	mov	x2, x3
	bl	_av_get_packet
	tbnz	x0, #63, LBB0_12
; %bb.11:
	mov	w0, #0
	str	xzr, [x19, #8]
	mov	w8, #1
	str	w8, [x19]
	b	LBB0_2
LBB0_12:
Lloh7:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh8:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh9:
	ldr	w0, [x8]
	bl	_AVERROR
	b	LBB0_2
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_AVERROR_EOF,4,2                ; @AVERROR_EOF
	.comm	_TAG_AUDIOPACKET,4,2            ; @TAG_AUDIOPACKET
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_TAG_STREAMEND,4,2              ; @TAG_STREAMEND
	.no_dead_strip	_mpc8_read_packet
.subsections_via_symbols
