	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_avio_read                      ## -- Begin function avio_read
	.p2align	4, 0x90
_avio_read:                             ## @avio_read
	.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	%edx, %r14d
	movq	%rdi, %r13
	movl	%edx, %r15d
	testl	%edx, %edx
	jle	LBB0_16
## %bb.1:
	movq	%rsi, %r12
	movl	4(%r13), %eax
	movl	%r14d, %r15d
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_12:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	%r13, %rdi
	callq	_fill_buffer
	movl	4(%r13), %eax
	cmpl	%eax, (%r13)
	je	LBB0_15
LBB0_14:                                ##   in Loop: Header=BB0_2 Depth=1
	testl	%r15d, %r15d
	jle	LBB0_15
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r13), %edi
	subl	%eax, %edi
	movl	%r15d, %esi
	callq	_FFMIN
	testl	%eax, %eax
	je	LBB0_4
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	cmpq	$0, 48(%r13)
	je	LBB0_13
LBB0_4:                                 ##   in Loop: Header=BB0_2 Depth=1
	cmpq	$0, 40(%r13)
	jne	LBB0_6
## %bb.5:                               ##   in Loop: Header=BB0_2 Depth=1
	cmpl	8(%r13), %r15d
	jle	LBB0_12
LBB0_6:                                 ##   in Loop: Header=BB0_2 Depth=1
	cmpl	$0, 32(%r13)
	jne	LBB0_12
## %bb.7:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	%r13, %rdi
	movq	%r12, %rsi
	movl	%r15d, %edx
	callq	_read_packet_wrapper
	movq	_AVERROR_EOF@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	je	LBB0_8
## %bb.9:                               ##   in Loop: Header=BB0_2 Depth=1
	testl	%eax, %eax
	js	LBB0_10
## %bb.11:                              ##   in Loop: Header=BB0_2 Depth=1
	addl	%eax, 20(%r13)
	addl	%eax, 24(%r13)
	subl	%eax, %r15d
	movl	%eax, %eax
	addq	%rax, %r12
	movl	28(%r13), %eax
	movl	%eax, 4(%r13)
	movl	%eax, (%r13)
	jmp	LBB0_14
	.p2align	4, 0x90
LBB0_13:                                ##   in Loop: Header=BB0_2 Depth=1
	movl	%eax, %ebx
	movl	4(%r13), %esi
	movq	%r12, %rdi
	movl	%eax, %edx
	callq	_memcpy
	movslq	%ebx, %rax
	addq	%rax, %r12
	movl	4(%r13), %eax
	addl	%ebx, %eax
	movl	%eax, 4(%r13)
	subl	%ebx, %r15d
	jmp	LBB0_14
LBB0_8:
	movl	$1, 12(%r13)
LBB0_15:
	cmpl	%r14d, %r15d
	jne	LBB0_19
LBB0_16:
	movl	16(%r13), %eax
	testl	%eax, %eax
	jne	LBB0_20
## %bb.17:
	movq	%r13, %rdi
	callq	_avio_feof
	testq	%rax, %rax
	je	LBB0_19
## %bb.18:
	movq	_AVERROR_EOF@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	jmp	LBB0_20
LBB0_10:
	movl	$1, 12(%r13)
	movl	%eax, 16(%r13)
	cmpl	%r14d, %r15d
	je	LBB0_16
LBB0_19:
	subl	%r15d, %r14d
	movl	%r14d, %eax
LBB0_20:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_AVERROR_EOF,4,2                ## @AVERROR_EOF
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_avio_read                      ; -- Begin function avio_read
	.p2align	2
_avio_read:                             ; @avio_read
	.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, x2
	mov	x21, x0
	mov	x20, x2
	cmp	w2, #1
	b.lt	LBB0_15
; %bb.1:
	mov	x22, x1
	ldr	w8, [x21, #4]
Lloh0:
	adrp	x24, _AVERROR_EOF@GOTPAGE
Lloh1:
	ldr	x24, [x24, _AVERROR_EOF@GOTPAGEOFF]
	mov	x20, x19
	b	LBB0_4
LBB0_2:                                 ;   in Loop: Header=BB0_4 Depth=1
	mov	x0, x21
	bl	_fill_buffer
	ldp	w9, w8, [x21]
	cmp	w9, w8
	b.eq	LBB0_14
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	cmp	w20, #0
	b.le	LBB0_14
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w9, [x21]
	sub	w0, w9, w8
	mov	x1, x20
	bl	_FFMIN
	cbz	w0, LBB0_6
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	x8, [x21, #48]
	cbz	x8, LBB0_12
LBB0_6:                                 ;   in Loop: Header=BB0_4 Depth=1
	ldr	x8, [x21, #40]
	cbnz	x8, LBB0_8
; %bb.7:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	w8, [x21, #8]
	cmp	w20, w8
	b.le	LBB0_2
LBB0_8:                                 ;   in Loop: Header=BB0_4 Depth=1
	ldr	w8, [x21, #32]
	cbnz	w8, LBB0_2
; %bb.9:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	x0, x21
	mov	x1, x22
	mov	x2, x20
	bl	_read_packet_wrapper
	ldr	w8, [x24]
	cmp	w0, w8
	b.eq	LBB0_13
; %bb.10:                               ;   in Loop: Header=BB0_4 Depth=1
	tbnz	w0, #31, LBB0_18
; %bb.11:                               ;   in Loop: Header=BB0_4 Depth=1
	ldur	d0, [x21, #20]
	dup.2s	v1, w0
	add.2s	v0, v0, v1
	stur	d0, [x21, #20]
	sub	w20, w20, w0
	add	x22, x22, w0, uxtw
	ldr	w8, [x21, #28]
	stp	w8, w8, [x21]
	b	LBB0_3
LBB0_12:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	x23, x0
	ldr	w1, [x21, #4]
	mov	x0, x22
	mov	x2, x23
	bl	_memcpy
	add	x22, x22, w23, sxtw
	ldr	w8, [x21, #4]
	add	w8, w8, w23
	str	w8, [x21, #4]
	sub	w20, w20, w23
	b	LBB0_3
LBB0_13:
	mov	w8, #1
	str	w8, [x21, #12]
LBB0_14:
	cmp	w20, w19
	b.ne	LBB0_19
LBB0_15:
	ldr	w0, [x21, #16]
	cbnz	w0, LBB0_20
; %bb.16:
	mov	x0, x21
	bl	_avio_feof
	cbz	x0, LBB0_19
; %bb.17:
Lloh2:
	adrp	x8, _AVERROR_EOF@GOTPAGE
Lloh3:
	ldr	x8, [x8, _AVERROR_EOF@GOTPAGEOFF]
Lloh4:
	ldr	w0, [x8]
	b	LBB0_20
LBB0_18:
	mov	w8, #1
	stp	w8, w0, [x21, #12]
	cmp	w20, w19
	b.eq	LBB0_15
LBB0_19:
	sub	w0, w19, w20
LBB0_20:
	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 AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_AVERROR_EOF,4,2                ; @AVERROR_EOF
.subsections_via_symbols
