	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function iff_read_packet
_iff_read_packet:                       ## @iff_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, %r15
	movq	%rdi, %rbx
	movq	16(%rdi), %rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movq	(%rdi), %rax
	movq	8(%rdi), %r13
	movq	(%rax), %r14
	movq	%r13, %rdi
	callq	_avio_tell
	movl	%eax, %r12d
	movq	%r13, %rdi
	callq	_avio_feof
	testq	%rax, %rax
	je	LBB0_4
LBB0_1:
	movq	_AVERROR_EOF@GOTPCREL(%rip), %rax
LBB0_2:
	movl	(%rax), %ebx
LBB0_3:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_4:
	movq	%r15, -48(%rbp)                 ## 8-byte Spill
	movq	(%r14), %rcx
	movq	(%rcx), %rax
	movq	_ID_ANIM@GOTPCREL(%rip), %r14
	movq	(%r14), %rdx
	cmpq	%rdx, %rax
	movl	%r12d, %r15d
	movq	-56(%rbp), %r12                 ## 8-byte Reload
	je	LBB0_6
## %bb.5:
	cmpl	(%r12), %r15d
	jge	LBB0_1
LBB0_6:
	movq	8(%rcx), %rsi
	movq	_AVMEDIA_TYPE_AUDIO@GOTPCREL(%rip), %rdi
	cmpq	(%rdi), %rsi
	jne	LBB0_11
## %bb.7:
	movq	_ID_DSD@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rax
	je	LBB0_21
## %bb.8:
	movq	_ID_MAUD@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rax
	je	LBB0_21
## %bb.9:
	movq	_ID_DST@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_23
## %bb.10:
	movq	%rbx, %rdi
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_read_dst_frame                 ## TAILCALL
LBB0_11:
	movq	_AVMEDIA_TYPE_VIDEO@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rsi
	jne	LBB0_22
## %bb.12:
	cmpq	%rdx, %rax
	jne	LBB0_25
## %bb.13:
	movq	%r13, %rdi
	callq	_avio_feof
	jmp	LBB0_16
LBB0_14:                                ##   in Loop: Header=BB0_16 Depth=1
	movq	%r13, %rdi
	movl	%ebx, %esi
	callq	_avio_skip
LBB0_15:                                ##   in Loop: Header=BB0_16 Depth=1
	movq	%r13, %rdi
	callq	_avio_feof
	testq	%rax, %rax
	jne	LBB0_29
LBB0_16:                                ## =>This Inner Loop Header: Depth=1
	movq	%r13, %rdi
	callq	_avio_feof
	testq	%rax, %rax
	jne	LBB0_1
## %bb.17:                              ##   in Loop: Header=BB0_16 Depth=1
	movq	%r13, %rdi
	callq	_avio_tell
	movl	%eax, -56(%rbp)                 ## 4-byte Spill
	movq	%r13, %rdi
	callq	_avio_rl32
	movq	%rax, %r12
	movq	%r13, %rdi
	callq	_avio_rb32
	movl	%eax, %ebx
	movq	%r13, %rdi
	callq	_avio_rl32
	movq	_ID_FORM@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	%rcx, %r12
	jne	LBB0_19
## %bb.18:                              ##   in Loop: Header=BB0_16 Depth=1
	movq	_ID_ILBM@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rax
	je	LBB0_28
LBB0_19:                                ##   in Loop: Header=BB0_16 Depth=1
	cmpq	%rcx, %r12
	jne	LBB0_14
## %bb.20:                              ##   in Loop: Header=BB0_16 Depth=1
	cmpq	(%r14), %rax
	je	LBB0_15
	jmp	LBB0_14
LBB0_21:
	movl	(%r12), %edi
	subl	%r15d, %edi
	movl	16(%rcx), %esi
	shll	$10, %esi
	callq	_FFMIN
	movq	%r13, %rdi
	movq	-48(%rbp), %r14                 ## 8-byte Reload
	movq	%r14, %rsi
	movl	%eax, %edx
	jmp	LBB0_27
LBB0_22:
	xorl	%edi, %edi
	callq	_av_assert0
                                        ## implicit-def: $ebx
	movq	-48(%rbp), %r14                 ## 8-byte Reload
	jmp	LBB0_32
LBB0_23:
	movl	4(%r12), %edx
	movq	_INT_MAX@GOTPCREL(%rip), %rax
	cmpl	(%rax), %edx
	jle	LBB0_26
## %bb.24:
	movq	_AVERROR_INVALIDDATA@GOTPCREL(%rip), %rax
	jmp	LBB0_2
LBB0_25:
	movl	4(%r12), %edx
	movq	%r13, %rdi
	movq	-48(%rbp), %r14                 ## 8-byte Reload
	movq	%r14, %rsi
	callq	_av_get_packet
	movl	%eax, %ebx
	movl	%r15d, (%r14)
	cmpl	8(%r12), %r15d
	je	LBB0_30
	jmp	LBB0_31
LBB0_26:
	movq	%r13, %rdi
	movq	-48(%rbp), %r14                 ## 8-byte Reload
	movq	%r14, %rsi
LBB0_27:
	callq	_av_get_packet
	movl	%eax, %ebx
	jmp	LBB0_31
LBB0_28:
	movq	%r13, %rdi
	movl	$-4, %esi
	callq	_avio_skip
LBB0_29:
	movq	%r13, %rdi
	movq	-48(%rbp), %r14                 ## 8-byte Reload
	movq	%r14, %rsi
	movl	%ebx, %edx
	callq	_av_get_packet
	movl	%eax, %ebx
	movl	-56(%rbp), %eax                 ## 4-byte Reload
	movl	%eax, (%r14)
	movl	20(%r14), %esi
	movl	24(%r14), %edi
	callq	_get_anim_duration
	movl	%eax, 28(%r14)
	cmpl	$12, %r15d
	jne	LBB0_31
LBB0_30:
	movq	_AV_PKT_FLAG_KEY@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, 16(%r14)
LBB0_31:
	testl	%ebx, %ebx
	js	LBB0_3
LBB0_32:
	movq	$0, 8(%r14)
	jmp	LBB0_3
	.cfi_endproc
                                        ## -- End function
	.comm	_AVERROR_EOF,4,2                ## @AVERROR_EOF
	.comm	_ID_ANIM,8,3                    ## @ID_ANIM
	.comm	_AVMEDIA_TYPE_AUDIO,8,3         ## @AVMEDIA_TYPE_AUDIO
	.comm	_ID_DSD,8,3                     ## @ID_DSD
	.comm	_ID_MAUD,8,3                    ## @ID_MAUD
	.comm	_ID_DST,8,3                     ## @ID_DST
	.comm	_INT_MAX,4,2                    ## @INT_MAX
	.comm	_AVERROR_INVALIDDATA,4,2        ## @AVERROR_INVALIDDATA
	.comm	_AVMEDIA_TYPE_VIDEO,8,3         ## @AVMEDIA_TYPE_VIDEO
	.comm	_ID_FORM,8,3                    ## @ID_FORM
	.comm	_ID_ILBM,8,3                    ## @ID_ILBM
	.comm	_AV_PKT_FLAG_KEY,4,2            ## @AV_PKT_FLAG_KEY
	.no_dead_strip	_iff_read_packet
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function iff_read_packet
_iff_read_packet:                       ; @iff_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	x19, x1
	mov	x22, x0
	ldp	x20, x23, [x0, #8]
	ldr	x8, [x0]
	ldr	x24, [x8]
	mov	x0, x20
	bl	_avio_tell
	mov	x21, x0
	mov	x0, x20
	bl	_avio_feof
	cbz	x0, LBB0_4
LBB0_1:
Lloh0:
	adrp	x8, _AVERROR_EOF@GOTPAGE
Lloh1:
	ldr	x8, [x8, _AVERROR_EOF@GOTPAGEOFF]
LBB0_2:
	ldr	w20, [x8]
LBB0_3:
	mov	x0, x20
	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
LBB0_4:
	ldr	x9, [x24]
	ldr	x8, [x9]
Lloh2:
	adrp	x25, _ID_ANIM@GOTPAGE
Lloh3:
	ldr	x25, [x25, _ID_ANIM@GOTPAGEOFF]
	ldr	x10, [x25]
	cmp	x8, x10
	b.eq	LBB0_6
; %bb.5:
	ldr	w11, [x23]
	cmp	w21, w11
	b.ge	LBB0_1
LBB0_6:
	ldr	x11, [x9, #8]
Lloh4:
	adrp	x12, _AVMEDIA_TYPE_AUDIO@GOTPAGE
Lloh5:
	ldr	x12, [x12, _AVMEDIA_TYPE_AUDIO@GOTPAGEOFF]
Lloh6:
	ldr	x12, [x12]
	cmp	x11, x12
	b.ne	LBB0_9
; %bb.7:
Lloh7:
	adrp	x10, _ID_DSD@GOTPAGE
Lloh8:
	ldr	x10, [x10, _ID_DSD@GOTPAGEOFF]
Lloh9:
	ldr	x10, [x10]
Lloh10:
	adrp	x11, _ID_MAUD@GOTPAGE
Lloh11:
	ldr	x11, [x11, _ID_MAUD@GOTPAGEOFF]
Lloh12:
	ldr	x11, [x11]
	cmp	x8, x10
	ccmp	x8, x11, #4, ne
	b.ne	LBB0_17
; %bb.8:
	ldr	w8, [x23]
	sub	w0, w8, w21
	ldr	w8, [x9, #16]
	lsl	w1, w8, #10
	bl	_FFMIN
	mov	x2, x0
	b	LBB0_23
LBB0_9:
Lloh13:
	adrp	x9, _AVMEDIA_TYPE_VIDEO@GOTPAGE
Lloh14:
	ldr	x9, [x9, _AVMEDIA_TYPE_VIDEO@GOTPAGEOFF]
Lloh15:
	ldr	x9, [x9]
	cmp	x11, x9
	b.ne	LBB0_19
; %bb.10:
	cmp	x8, x10
	b.ne	LBB0_20
; %bb.11:
	mov	x0, x20
	bl	_avio_feof
Lloh16:
	adrp	x26, _ID_FORM@GOTPAGE
Lloh17:
	ldr	x26, [x26, _ID_FORM@GOTPAGEOFF]
Lloh18:
	adrp	x27, _ID_ILBM@GOTPAGE
Lloh19:
	ldr	x27, [x27, _ID_ILBM@GOTPAGEOFF]
	b	LBB0_13
LBB0_12:                                ;   in Loop: Header=BB0_13 Depth=1
	mov	x0, x20
	bl	_avio_feof
	cbnz	x0, LBB0_25
LBB0_13:                                ; =>This Inner Loop Header: Depth=1
	mov	x0, x20
	bl	_avio_feof
	cbnz	x0, LBB0_1
; %bb.14:                               ;   in Loop: Header=BB0_13 Depth=1
	mov	x0, x20
	bl	_avio_tell
	mov	x22, x0
	mov	x0, x20
	bl	_avio_rl32
	mov	x24, x0
	mov	x0, x20
	bl	_avio_rb32
	mov	x23, x0
	mov	x0, x20
	bl	_avio_rl32
	ldr	x8, [x26]
	ldr	x9, [x27]
	cmp	x24, x8
	ccmp	x0, x9, #0, eq
	b.eq	LBB0_24
; %bb.15:                               ;   in Loop: Header=BB0_13 Depth=1
	ldr	x9, [x25]
	cmp	x24, x8
	ccmp	x0, x9, #0, eq
	b.eq	LBB0_12
; %bb.16:                               ;   in Loop: Header=BB0_13 Depth=1
	mov	x0, x20
	mov	x1, x23
	bl	_avio_skip
	b	LBB0_12
LBB0_17:
Lloh20:
	adrp	x9, _ID_DST@GOTPAGE
Lloh21:
	ldr	x9, [x9, _ID_DST@GOTPAGEOFF]
Lloh22:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_21
; %bb.18:
	mov	x0, x22
	mov	x1, x19
	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	_read_dst_frame
LBB0_19:
	mov	w0, #0
	bl	_av_assert0
                                        ; implicit-def: $w20
	b	LBB0_28
LBB0_20:
	ldr	w2, [x23, #4]
	mov	x0, x20
	mov	x1, x19
	bl	_av_get_packet
	mov	x20, x0
	str	w21, [x19]
	ldr	w8, [x23, #8]
	cmp	w21, w8
	b.eq	LBB0_26
	b	LBB0_27
LBB0_21:
	ldr	w2, [x23, #4]
Lloh23:
	adrp	x8, _INT_MAX@GOTPAGE
Lloh24:
	ldr	x8, [x8, _INT_MAX@GOTPAGEOFF]
Lloh25:
	ldr	w8, [x8]
	cmp	w2, w8
	b.le	LBB0_23
; %bb.22:
Lloh26:
	adrp	x8, _AVERROR_INVALIDDATA@GOTPAGE
Lloh27:
	ldr	x8, [x8, _AVERROR_INVALIDDATA@GOTPAGEOFF]
	b	LBB0_2
LBB0_23:
	mov	x0, x20
	mov	x1, x19
	bl	_av_get_packet
	mov	x20, x0
	b	LBB0_27
LBB0_24:
	mov	x0, x20
	mov	w1, #-4
	bl	_avio_skip
LBB0_25:
	mov	x0, x20
	mov	x1, x19
	mov	x2, x23
	bl	_av_get_packet
	mov	x20, x0
	str	w22, [x19]
	ldp	w1, w0, [x19, #20]
	bl	_get_anim_duration
	str	w0, [x19, #28]
	cmp	w21, #12
	b.ne	LBB0_27
LBB0_26:
Lloh28:
	adrp	x8, _AV_PKT_FLAG_KEY@GOTPAGE
Lloh29:
	ldr	x8, [x8, _AV_PKT_FLAG_KEY@GOTPAGEOFF]
Lloh30:
	ldr	w8, [x8]
	ldr	w9, [x19, #16]
	orr	w8, w9, w8
	str	w8, [x19, #16]
LBB0_27:
	tbnz	w20, #31, LBB0_3
LBB0_28:
	str	xzr, [x19, #8]
	b	LBB0_3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGot	Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.cfi_endproc
                                        ; -- End function
	.comm	_AVERROR_EOF,4,2                ; @AVERROR_EOF
	.comm	_ID_ANIM,8,3                    ; @ID_ANIM
	.comm	_AVMEDIA_TYPE_AUDIO,8,3         ; @AVMEDIA_TYPE_AUDIO
	.comm	_ID_DSD,8,3                     ; @ID_DSD
	.comm	_ID_MAUD,8,3                    ; @ID_MAUD
	.comm	_ID_DST,8,3                     ; @ID_DST
	.comm	_INT_MAX,4,2                    ; @INT_MAX
	.comm	_AVERROR_INVALIDDATA,4,2        ; @AVERROR_INVALIDDATA
	.comm	_AVMEDIA_TYPE_VIDEO,8,3         ; @AVMEDIA_TYPE_VIDEO
	.comm	_ID_FORM,8,3                    ; @ID_FORM
	.comm	_ID_ILBM,8,3                    ; @ID_ILBM
	.comm	_AV_PKT_FLAG_KEY,4,2            ; @AV_PKT_FLAG_KEY
	.no_dead_strip	_iff_read_packet
.subsections_via_symbols
