	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function read_packet
_read_packet:                           ## @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, %r14
	movq	%rdi, %r15
	movq	(%rdi), %r12
	movq	8(%rdi), %rbx
	movq	%r12, %rdi
	callq	_avio_feof
	testq	%rax, %rax
	je	LBB0_1
## %bb.13:
	movq	_EIO@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_1:
	movl	(%rbx), %eax
	testl	%eax, %eax
	js	LBB0_12
## %bb.2:
	movq	%r15, -56(%rbp)                 ## 8-byte Spill
	movq	%r14, -64(%rbp)                 ## 8-byte Spill
	movl	4(%rbx), %ecx
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	16(%rbx), %r14
	movl	%eax, %eax
	movq	%rax, %r13
	shlq	$4, %r13
	leaq	(%r14,%r13), %r15
	testl	%ecx, %ecx
	jns	LBB0_5
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	_MAX_PAGES@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	leal	(%rcx,%rcx,2), %ecx
	shll	$16, %eax
	addl	8(%rbx), %eax
	leal	(%rax,%rcx,2), %esi
	movq	_SEEK_SET@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r12, %rdi
	callq	_avio_seek
	movl	(%r15), %eax
	leal	(%rax,%rax), %esi
	addl	$8, %esi
	movq	%r12, %rdi
	callq	_avio_skip
	movl	$0, 4(%rbx)
	xorl	%ecx, %ecx
LBB0_5:                                 ##   in Loop: Header=BB0_3 Depth=1
	movslq	(%r15), %rsi
	cmpl	%esi, %ecx
	jl	LBB0_8
## %bb.6:                               ##   in Loop: Header=BB0_3 Depth=1
	addq	8(%r14,%r13), %rsi
	movq	%rbx, %rdi
	callq	_find_record
	movl	%eax, (%rbx)
	testl	%eax, %eax
	js	LBB0_12
## %bb.7:                               ##   in Loop: Header=BB0_3 Depth=1
	movl	$-1, 4(%rbx)
	movl	$-1, %ecx
	jmp	LBB0_3
LBB0_8:
	movq	%r12, %rdi
	callq	_avio_tell
	movl	%eax, -48(%rbp)                 ## 4-byte Spill
	movq	_MAX_PAGES@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	leal	(%rax,%rax,2), %eax
	addl	%eax, %eax
	movl	(%rbx), %ecx
	movl	4(%rbx), %edx
	addl	8(%rbx), %eax
	shll	$16, %ecx
	addl	%ecx, %eax
	leal	(%rax,%rdx,2), %esi
	addl	$8, %esi
	movq	_SEEK_SET@GOTPCREL(%rip), %r15
	movl	(%r15), %edx
	movq	%r12, %rdi
	callq	_avio_seek
	movq	%r12, %rdi
	callq	_avio_rl16
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movl	(%r15), %edx
	movq	%r12, %rdi
	movl	-48(%rbp), %esi                 ## 4-byte Reload
	callq	_avio_seek
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax), %rdi
	movq	-64(%rbp), %r15                 ## 8-byte Reload
	movq	%r15, %rsi
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	callq	_av_get_packet
	movl	%eax, (%r15)
	testl	%eax, %eax
	js	LBB0_12
## %bb.9:
	movslq	4(%rbx), %rax
	movq	%rax, %rcx
	addq	8(%r14,%r13), %rcx
	jne	LBB0_11
## %bb.10:
	movq	_AV_PKT_FLAG_KEY@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	%ecx, 4(%r15)
LBB0_11:
	incl	%eax
	movl	%eax, 4(%rbx)
	xorl	%eax, %eax
LBB0_12:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EIO,4,2                        ## @EIO
	.comm	_MAX_PAGES,4,2                  ## @MAX_PAGES
	.comm	_SEEK_SET,4,2                   ## @SEEK_SET
	.comm	_AV_PKT_FLAG_KEY,4,2            ## @AV_PKT_FLAG_KEY
	.no_dead_strip	_read_packet
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function read_packet
_read_packet:                           ; @read_packet
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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	x20, x1
	mov	x21, x0
	ldp	x22, x19, [x0]
	mov	x0, x22
	bl	_avio_feof
	cbz	x0, LBB0_2
; %bb.1:
Lloh0:
	adrp	x8, _EIO@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	b	_AVERROR
LBB0_2:
	ldr	w0, [x19]
	tbnz	w0, #31, LBB0_13
; %bb.3:
	ldr	w8, [x19, #4]
Lloh3:
	adrp	x24, _MAX_PAGES@GOTPAGE
Lloh4:
	ldr	x24, [x24, _MAX_PAGES@GOTPAGEOFF]
	mov	w23, #6
Lloh5:
	adrp	x25, _SEEK_SET@GOTPAGE
Lloh6:
	ldr	x25, [x25, _SEEK_SET@GOTPAGEOFF]
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x26, [x19, #16]
	mov	w27, w0
	add	x28, x26, w0, uxtw #4
	tbz	w8, #31, LBB0_6
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	w8, [x19, #8]
	ldr	w9, [x24]
	add	w8, w8, w27, lsl #16
	madd	w1, w9, w23, w8
	ldr	w2, [x25]
	mov	x0, x22
	bl	_avio_seek
	ldr	w8, [x28]
	lsl	w8, w8, #1
	add	w1, w8, #8
	mov	x0, x22
	bl	_avio_skip
	mov	w8, #0
	str	wzr, [x19, #4]
LBB0_6:                                 ;   in Loop: Header=BB0_4 Depth=1
	ldrsw	x9, [x28]
	cmp	w8, w9
	b.lt	LBB0_9
; %bb.7:                                ;   in Loop: Header=BB0_4 Depth=1
	add	x8, x26, x27, lsl #4
	ldr	x8, [x8, #8]
	add	x1, x8, x9
	mov	x0, x19
	bl	_find_record
	str	w0, [x19]
	tbnz	w0, #31, LBB0_13
; %bb.8:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	w8, #-1
	str	w8, [x19, #4]
	b	LBB0_4
LBB0_9:
	mov	x0, x22
	bl	_avio_tell
	mov	x23, x0
	ldp	w12, w8, [x19, #4]
	ldr	w9, [x24]
	mov	w10, #6
	ldr	w11, [x19]
	madd	w8, w9, w10, w8
	add	w8, w8, w11, lsl #16
	add	w8, w8, w12, lsl #1
	add	w1, w8, #8
	ldr	w2, [x25]
	mov	x0, x22
	bl	_avio_seek
	mov	x0, x22
	bl	_avio_rl16
	mov	x24, x0
	ldr	w2, [x25]
	mov	x0, x22
	mov	x1, x23
	bl	_avio_seek
	ldr	x0, [x21]
	mov	x1, x20
	mov	x2, x24
	bl	_av_get_packet
	str	w0, [x20]
	tbnz	w0, #31, LBB0_13
; %bb.10:
	add	x8, x26, x27, lsl #4
	ldr	x9, [x8, #8]
	ldrsw	x8, [x19, #4]
	cmn	x9, x8
	b.ne	LBB0_12
; %bb.11:
Lloh7:
	adrp	x9, _AV_PKT_FLAG_KEY@GOTPAGE
Lloh8:
	ldr	x9, [x9, _AV_PKT_FLAG_KEY@GOTPAGEOFF]
Lloh9:
	ldr	w9, [x9]
	ldr	w10, [x20, #4]
	orr	w9, w10, w9
	str	w9, [x20, #4]
LBB0_12:
	mov	w0, #0
	add	w8, w8, #1
	str	w8, [x19, #4]
LBB0_13:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_EIO,4,2                        ; @EIO
	.comm	_MAX_PAGES,4,2                  ; @MAX_PAGES
	.comm	_SEEK_SET,4,2                   ; @SEEK_SET
	.comm	_AV_PKT_FLAG_KEY,4,2            ; @AV_PKT_FLAG_KEY
	.no_dead_strip	_read_packet
.subsections_via_symbols
