	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sup_read_packet
_sup_read_packet:                       ## @sup_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
	pushq	%rax
	.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, %rbx
	movl	(%rdi), %edi
	callq	_avio_tell
	movq	%rax, %r15
	movl	(%rbx), %edi
	callq	_avio_rb16
	movq	_SUP_PGS_MAGIC@GOTPCREL(%rip), %rcx
	movl	(%rbx), %edi
	cmpq	(%rcx), %rax
	jne	LBB0_7
## %bb.1:
	callq	_avio_rb32
	movq	%rax, %r13
	movl	(%rbx), %edi
	callq	_avio_rb32
	movq	%rax, %r12
	movl	(%rbx), %edi
	movq	%r14, %rsi
	movl	$3, %edx
	callq	_av_get_packet
	testl	%eax, %eax
	js	LBB0_11
## %bb.2:
	movq	$0, 48(%r14)
	movq	_AV_PKT_FLAG_KEY@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, 40(%r14)
	movq	%r15, 32(%r14)
	movq	%r13, 24(%r14)
	testq	%r12, %r12
	jne	LBB0_4
## %bb.3:
	movq	_AV_NOPTS_VALUE@GOTPCREL(%rip), %rax
	movq	(%rax), %r12
LBB0_4:
	movq	%r12, 16(%r14)
	cmpl	$3, (%r14)
	jl	LBB0_6
## %bb.5:
	movq	8(%r14), %rdi
	incq	%rdi
	callq	_AV_RB16
	movl	(%rbx), %edi
	movq	%r14, %rsi
	movq	%rax, %rdx
	callq	_av_append_packet
	testl	%eax, %eax
	js	LBB0_11
LBB0_6:
	xorl	%eax, %eax
	jmp	LBB0_11
LBB0_7:
	callq	_avio_feof
	testq	%rax, %rax
	jne	LBB0_9
## %bb.8:
	movq	_AVERROR_INVALIDDATA@GOTPCREL(%rip), %rax
	jmp	LBB0_10
LBB0_9:
	movq	_AVERROR_EOF@GOTPCREL(%rip), %rax
LBB0_10:
	movl	(%rax), %eax
LBB0_11:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SUP_PGS_MAGIC,8,3              ## @SUP_PGS_MAGIC
	.comm	_AVERROR_EOF,4,2                ## @AVERROR_EOF
	.comm	_AVERROR_INVALIDDATA,4,2        ## @AVERROR_INVALIDDATA
	.comm	_AV_PKT_FLAG_KEY,4,2            ## @AV_PKT_FLAG_KEY
	.comm	_AV_NOPTS_VALUE,8,3             ## @AV_NOPTS_VALUE
	.no_dead_strip	_sup_read_packet
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sup_read_packet
_sup_read_packet:                       ; @sup_read_packet
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x19, x1
	mov	x20, x0
	ldr	w0, [x0]
	bl	_avio_tell
	mov	x21, x0
	ldr	w0, [x20]
	bl	_avio_rb16
	mov	x8, x0
Lloh0:
	adrp	x9, _SUP_PGS_MAGIC@GOTPAGE
Lloh1:
	ldr	x9, [x9, _SUP_PGS_MAGIC@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	ldr	w0, [x20]
	cmp	x8, x9
	b.ne	LBB0_5
; %bb.1:
	bl	_avio_rb32
	mov	x22, x0
	ldr	w0, [x20]
	bl	_avio_rb32
	mov	x23, x0
	ldr	w0, [x20]
	mov	x1, x19
	mov	w2, #3
	bl	_av_get_packet
	tbnz	w0, #31, LBB0_6
; %bb.2:
	str	xzr, [x19, #48]
Lloh3:
	adrp	x8, _AV_PKT_FLAG_KEY@GOTPAGE
Lloh4:
	ldr	x8, [x8, _AV_PKT_FLAG_KEY@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	ldr	w9, [x19, #40]
	orr	w8, w9, w8
	str	w8, [x19, #40]
	str	x21, [x19, #32]
Lloh6:
	adrp	x8, _AV_NOPTS_VALUE@GOTPAGE
Lloh7:
	ldr	x8, [x8, _AV_NOPTS_VALUE@GOTPAGEOFF]
Lloh8:
	ldr	x8, [x8]
	cmp	x23, #0
	csel	x8, x8, x23, eq
	stp	x8, x22, [x19, #16]
	ldr	w8, [x19]
	cmp	w8, #3
	b.lt	LBB0_4
; %bb.3:
	ldr	x8, [x19, #8]
	add	x0, x8, #1
	bl	_AV_RB16
	mov	x2, x0
	ldr	w0, [x20]
	mov	x1, x19
	bl	_av_append_packet
	tbnz	w0, #31, LBB0_6
LBB0_4:
	mov	w0, #0
	b	LBB0_6
LBB0_5:
	bl	_avio_feof
Lloh9:
	adrp	x8, _AVERROR_EOF@GOTPAGE
Lloh10:
	ldr	x8, [x8, _AVERROR_EOF@GOTPAGEOFF]
Lloh11:
	adrp	x9, _AVERROR_INVALIDDATA@GOTPAGE
Lloh12:
	ldr	x9, [x9, _AVERROR_INVALIDDATA@GOTPAGEOFF]
	cmp	x0, #0
	csel	x8, x9, x8, eq
	ldr	w0, [x8]
LBB0_6:
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_SUP_PGS_MAGIC,8,3              ; @SUP_PGS_MAGIC
	.comm	_AVERROR_EOF,4,2                ; @AVERROR_EOF
	.comm	_AVERROR_INVALIDDATA,4,2        ; @AVERROR_INVALIDDATA
	.comm	_AV_PKT_FLAG_KEY,4,2            ; @AV_PKT_FLAG_KEY
	.comm	_AV_NOPTS_VALUE,8,3             ; @AV_NOPTS_VALUE
	.no_dead_strip	_sup_read_packet
.subsections_via_symbols
