	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ifv_read_packet
_ifv_read_packet:                       ## @ifv_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, %r15
	movq	16(%rdi), %r12
	movq	(%r12), %rbx
	movq	8(%r12), %rax
	cmpq	%rax, %rbx
	jae	LBB0_3
## %bb.1:
	movq	8(%r15), %rcx
	movq	16(%r12), %rdx
	movq	(%rcx,%rdx,8), %rcx
	cmpq	(%rcx), %rbx
	jae	LBB0_3
## %bb.2:
	shlq	$4, %rbx
	addq	8(%rcx), %rbx
	cmpq	$0, 48(%r12)
	jne	LBB0_4
LBB0_13:
	movq	%rbx, %r13
	testq	%rbx, %rbx
	jne	LBB0_14
## %bb.19:
	movq	%rax, (%r12)
	movl	(%r15), %edi
	movl	$28, %esi
	callq	_avio_skip
	movl	(%r15), %edi
	callq	_avio_rl32
	addq	%rax, 8(%r12)
	movl	(%r15), %edi
	movl	$16, %esi
	callq	_avio_skip
	movl	(%r15), %edi
	callq	_avio_feof
	testq	%rax, %rax
	jne	LBB0_20
## %bb.22:
	movq	_AVMEDIA_TYPE_VIDEO@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	(%r12), %rdx
	jmp	LBB0_23
LBB0_3:
	xorl	%ebx, %ebx
	cmpq	$0, 48(%r12)
	je	LBB0_13
LBB0_4:
	movq	24(%r12), %r13
	movq	32(%r12), %rcx
	cmpq	%rcx, %r13
	jae	LBB0_8
## %bb.5:
	movq	8(%r15), %rdx
	movq	40(%r12), %rsi
	movq	(%rdx,%rsi,8), %rdx
	cmpq	(%rdx), %r13
	jae	LBB0_8
## %bb.6:
	movq	8(%rdx), %rdx
	shlq	$4, %r13
	addq	%rdx, %r13
	testq	%rbx, %rbx
	je	LBB0_21
## %bb.7:
	movq	(%r13), %rax
	cmpq	(%rbx), %rax
	cmovgeq	%rbx, %r13
	jmp	LBB0_14
LBB0_8:
	movq	%rbx, %r13
	testq	%rbx, %rbx
	je	LBB0_9
LBB0_14:
	movl	(%r15), %edi
	movl	8(%r13), %esi
	movq	_SEEK_SET@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	callq	_avio_seek
	movl	(%r15), %edi
	movl	12(%r13), %edx
	movq	%r14, %rsi
	callq	_av_get_packet
	testl	%eax, %eax
	js	LBB0_24
## %bb.15:
	cmpq	%rbx, %r13
	je	LBB0_17
## %bb.16:
	incq	24(%r12)
	addq	$40, %r12
	jmp	LBB0_18
LBB0_17:
	incq	(%r12)
	addq	$16, %r12
LBB0_18:
	movq	(%r12), %rax
	movq	%rax, (%r14)
	movq	(%r13), %rax
	movq	%rax, 8(%r14)
	movl	8(%r13), %eax
	movl	%eax, 16(%r14)
	xorl	%eax, %eax
	jmp	LBB0_24
LBB0_21:
	testq	%rdx, %rdx
	jne	LBB0_14
LBB0_9:
	movq	%rax, (%r12)
	movq	%rcx, 24(%r12)
	movl	(%r15), %edi
	movl	$28, %esi
	callq	_avio_skip
	movl	(%r15), %edi
	callq	_avio_rl32
	addq	%rax, 8(%r12)
	movl	(%r15), %edi
	callq	_avio_rl32
	addq	%rax, 32(%r12)
	movl	(%r15), %edi
	movl	$12, %esi
	callq	_avio_skip
	movl	(%r15), %edi
	callq	_avio_feof
	testq	%rax, %rax
	je	LBB0_10
LBB0_20:
	movq	_AVERROR_EOF@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	jmp	LBB0_24
LBB0_10:
	movq	_AVMEDIA_TYPE_VIDEO@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	(%r12), %rdx
	movq	%r15, %rdi
	callq	_read_index
	testl	%eax, %eax
	js	LBB0_24
## %bb.11:
	movq	_AVMEDIA_TYPE_AUDIO@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	24(%r12), %rdx
LBB0_23:
	movq	%r15, %rdi
	callq	_read_index
	movl	%eax, %ecx
	sarl	$31, %ecx
	andl	%ecx, %eax
LBB0_24:
	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
	.comm	_AVMEDIA_TYPE_VIDEO,4,2         ## @AVMEDIA_TYPE_VIDEO
	.comm	_AVMEDIA_TYPE_AUDIO,4,2         ## @AVMEDIA_TYPE_AUDIO
	.comm	_SEEK_SET,4,2                   ## @SEEK_SET
	.no_dead_strip	_ifv_read_packet
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ifv_read_packet
_ifv_read_packet:                       ; @ifv_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	x20, x1
	mov	x19, x0
	ldr	x21, [x0, #16]
	ldp	x9, x8, [x21]
	cmp	x9, x8
	b.hs	LBB0_6
; %bb.1:
	ldr	x10, [x19, #8]
	ldr	x11, [x21, #16]
	ldr	x10, [x10, x11, lsl #3]
	ldr	x11, [x10]
	cmp	x9, x11
	b.hs	LBB0_6
; %bb.2:
	ldr	x10, [x10, #8]
	add	x22, x10, x9, lsl #4
	ldr	x9, [x21, #48]
	cbnz	x9, LBB0_7
LBB0_3:
	mov	x23, x22
	cbnz	x22, LBB0_12
; %bb.4:
	str	x8, [x21]
	ldr	w0, [x19]
	mov	w1, #28
	bl	_avio_skip
	ldr	w0, [x19]
	bl	_avio_rl32
	ldr	x8, [x21, #8]
	add	x8, x8, x0
	str	x8, [x21, #8]
	ldr	w0, [x19]
	mov	w1, #16
	bl	_avio_skip
	ldr	w0, [x19]
	bl	_avio_feof
	cbnz	x0, LBB0_19
; %bb.5:
Lloh0:
	adrp	x8, _AVMEDIA_TYPE_VIDEO@GOTPAGE
Lloh1:
	ldr	x8, [x8, _AVMEDIA_TYPE_VIDEO@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	ldr	x2, [x21]
	b	LBB0_22
LBB0_6:
	mov	x22, #0
	ldr	x9, [x21, #48]
	cbz	x9, LBB0_3
LBB0_7:
	ldp	x10, x9, [x21, #24]
	cmp	x10, x9
	b.hs	LBB0_11
; %bb.8:
	ldr	x11, [x19, #8]
	ldr	x12, [x21, #40]
	ldr	x11, [x11, x12, lsl #3]
	ldr	x12, [x11]
	cmp	x10, x12
	b.hs	LBB0_11
; %bb.9:
	ldr	x11, [x11, #8]
	add	x23, x11, x10, lsl #4
	cbz	x22, LBB0_17
; %bb.10:
	ldr	x8, [x23]
	ldr	x9, [x22]
	cmp	x8, x9
	csel	x23, x23, x22, lt
	b	LBB0_12
LBB0_11:
	mov	x23, x22
	cbz	x22, LBB0_18
LBB0_12:
	ldr	w0, [x19]
	ldr	w1, [x23, #8]
Lloh3:
	adrp	x8, _SEEK_SET@GOTPAGE
Lloh4:
	ldr	x8, [x8, _SEEK_SET@GOTPAGEOFF]
Lloh5:
	ldr	w2, [x8]
	bl	_avio_seek
	ldr	w0, [x19]
	ldr	w2, [x23, #12]
	mov	x1, x20
	bl	_av_get_packet
	tbnz	w0, #31, LBB0_23
; %bb.13:
	cmp	x23, x22
	b.eq	LBB0_15
; %bb.14:
	ldr	x8, [x21, #24]
	add	x8, x8, #1
	str	x8, [x21, #24]
	add	x21, x21, #40
	b	LBB0_16
LBB0_15:
	ldr	x8, [x21]
	add	x8, x8, #1
	str	x8, [x21], #16
LBB0_16:
	mov	w0, #0
	ldr	x8, [x21]
	str	x8, [x20]
	ldr	x8, [x23]
	str	x8, [x20, #8]
	ldr	w8, [x23, #8]
	str	w8, [x20, #16]
	b	LBB0_23
LBB0_17:
	cbnz	x11, LBB0_12
LBB0_18:
	str	x8, [x21]
	str	x9, [x21, #24]
	ldr	w0, [x19]
	mov	w1, #28
	bl	_avio_skip
	ldr	w0, [x19]
	bl	_avio_rl32
	ldr	x8, [x21, #8]
	add	x8, x8, x0
	str	x8, [x21, #8]
	ldr	w0, [x19]
	bl	_avio_rl32
	ldr	x8, [x21, #32]
	add	x8, x8, x0
	str	x8, [x21, #32]
	ldr	w0, [x19]
	mov	w1, #12
	bl	_avio_skip
	ldr	w0, [x19]
	bl	_avio_feof
	cbz	x0, LBB0_20
LBB0_19:
Lloh6:
	adrp	x8, _AVERROR_EOF@GOTPAGE
Lloh7:
	ldr	x8, [x8, _AVERROR_EOF@GOTPAGEOFF]
Lloh8:
	ldr	w0, [x8]
	b	LBB0_23
LBB0_20:
Lloh9:
	adrp	x8, _AVMEDIA_TYPE_VIDEO@GOTPAGE
Lloh10:
	ldr	x8, [x8, _AVMEDIA_TYPE_VIDEO@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	ldr	x2, [x21]
	mov	x0, x19
	bl	_read_index
	tbnz	w0, #31, LBB0_23
; %bb.21:
Lloh12:
	adrp	x8, _AVMEDIA_TYPE_AUDIO@GOTPAGE
Lloh13:
	ldr	x8, [x8, _AVMEDIA_TYPE_AUDIO@GOTPAGEOFF]
Lloh14:
	ldr	w1, [x8]
	ldr	x2, [x21, #24]
LBB0_22:
	mov	x0, x19
	bl	_read_index
	cmp	w0, #0
	csel	w0, w0, wzr, lt
LBB0_23:
	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	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_AVERROR_EOF,4,2                ; @AVERROR_EOF
	.comm	_AVMEDIA_TYPE_VIDEO,4,2         ; @AVMEDIA_TYPE_VIDEO
	.comm	_AVMEDIA_TYPE_AUDIO,4,2         ; @AVMEDIA_TYPE_AUDIO
	.comm	_SEEK_SET,4,2                   ; @SEEK_SET
	.no_dead_strip	_ifv_read_packet
.subsections_via_symbols
