	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function flic_read_packet
_flic_read_packet:                      ## @flic_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, %r13
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	(%rdi), %r15
	movq	8(%rdi), %rbx
	movq	_FLIC_PREAMBLE_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %r12
	movq	%r15, %rdi
	callq	_avio_feof
	xorl	%r14d, %r14d
	testq	%rax, %rax
	jne	LBB0_14
## %bb.1:
	movq	%rbx, -64(%rbp)                 ## 8-byte Spill
	movq	%r13, -56(%rbp)                 ## 8-byte Spill
	movq	%r12, %r13
	addq	$4, %r13
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	_FLIC_PREAMBLE_SIZE@GOTPCREL(%rip), %r14
	movl	(%r14), %edx
	movq	%r15, %rdi
	movq	%r12, %rsi
	callq	_avio_read
	cmpl	(%r14), %eax
	jne	LBB0_11
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	%eax, %ebx
	movq	%r12, %rdi
	callq	_AV_RL32
	movl	%eax, %r14d
	movq	%r13, %rdi
	callq	_AV_RL16
	movq	_FLIC_CHUNK_MAGIC_1@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	sete	%cl
	movq	_FLIC_CHUNK_MAGIC_2@GOTPCREL(%rip), %rdx
	cmpl	(%rdx), %eax
	sete	%dl
	orb	%cl, %dl
	cmpb	$1, %dl
	jne	LBB0_7
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	_FLIC_PREAMBLE_SIZE@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %r14d
	ja	LBB0_5
LBB0_7:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	_FLIC_TFTD_CHUNK_AUDIO@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	je	LBB0_8
## %bb.12:                              ##   in Loop: Header=BB0_2 Depth=1
	addl	$-6, %r14d
	movq	%r15, %rdi
	movl	%r14d, %esi
	callq	_avio_skip
	movq	%r15, %rdi
	callq	_avio_feof
	testq	%rax, %rax
	je	LBB0_2
## %bb.13:
	movl	%ebx, %r14d
	jmp	LBB0_14
LBB0_5:
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movl	%r14d, %esi
	callq	_av_new_packet
	testq	%rax, %rax
	jne	LBB0_11
## %bb.6:
	movq	-64(%rbp), %rdx                 ## 8-byte Reload
	movl	8(%rdx), %eax
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	movl	%eax, 16(%rbx)
	movslq	4(%rdx), %rax
	leal	1(%rax), %ecx
	movl	%ecx, 4(%rdx)
	movq	%rax, 24(%rbx)
	movq	%r15, %rdi
	callq	_avio_tell
	movq	%rax, 8(%rbx)
	movq	(%rbx), %rdi
	movq	_FLIC_PREAMBLE_SIZE@GOTPCREL(%rip), %r13
	movl	(%r13), %edx
	movq	%r12, %rsi
	callq	_memcpy
	movslq	(%r13), %rsi
	movl	%r14d, %edx
	subl	%esi, %edx
	addq	(%rbx), %rsi
	movq	%r15, %rdi
	callq	_avio_read
	movl	(%r13), %ecx
	subl	%ecx, %r14d
	cmpl	%r14d, %eax
	movl	%eax, %r14d
	jne	LBB0_10
	jmp	LBB0_14
LBB0_8:
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movl	%r14d, %esi
	callq	_av_new_packet
	testq	%rax, %rax
	jne	LBB0_11
## %bb.9:
	movq	%r15, %rdi
	movl	$10, %esi
	callq	_avio_skip
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %eax
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	movl	%eax, 16(%rbx)
	movq	%r15, %rdi
	callq	_avio_tell
	movq	%rax, 8(%rbx)
	movq	(%rbx), %rsi
	movq	%r15, %rdi
	movl	%r14d, %edx
	callq	_avio_read
	cmpl	%r14d, %eax
	je	LBB0_14
LBB0_10:
	movq	%rbx, %rdi
	callq	_av_packet_unref
LBB0_11:
	movq	_EIO@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_AVERROR
	movl	%eax, %r14d
LBB0_14:
	movq	%r15, %rdi
	callq	_avio_feof
	testq	%rax, %rax
	je	LBB0_16
## %bb.15:
	movq	_AVERROR_EOF@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
LBB0_16:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_18
## %bb.17:
	movl	%r14d, %eax
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_18:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_FLIC_PREAMBLE_SIZE,4,2         ## @FLIC_PREAMBLE_SIZE
	.comm	_EIO,4,2                        ## @EIO
	.comm	_FLIC_CHUNK_MAGIC_1,4,2         ## @FLIC_CHUNK_MAGIC_1
	.comm	_FLIC_CHUNK_MAGIC_2,4,2         ## @FLIC_CHUNK_MAGIC_2
	.comm	_FLIC_TFTD_CHUNK_AUDIO,4,2      ## @FLIC_TFTD_CHUNK_AUDIO
	.comm	_AVERROR_EOF,4,2                ## @AVERROR_EOF
	.no_dead_strip	_flic_read_packet
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function flic_read_packet
_flic_read_packet:                      ; @flic_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
	sub	sp, sp, #16
	mov	x20, x1
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-88]
	ldp	x19, x26, [x0]
Lloh3:
	adrp	x25, _FLIC_PREAMBLE_SIZE@GOTPAGE
Lloh4:
	ldr	x25, [x25, _FLIC_PREAMBLE_SIZE@GOTPAGEOFF]
	ldr	w8, [x25]
	mov	x9, x8
Lloh5:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh6:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	add	x8, x8, #15
	and	x8, x8, #0x1fffffff0
	sub	x22, x9, x8
	mov	sp, x22
	mov	x0, x19
	bl	_avio_feof
	cbz	x0, LBB0_2
; %bb.1:
	mov	w21, #0
	b	LBB0_14
LBB0_2:
	stur	x20, [x29, #-96]                ; 8-byte Folded Spill
	add	x23, x22, #4
Lloh7:
	adrp	x27, _FLIC_CHUNK_MAGIC_1@GOTPAGE
Lloh8:
	ldr	x27, [x27, _FLIC_CHUNK_MAGIC_1@GOTPAGEOFF]
Lloh9:
	adrp	x28, _FLIC_CHUNK_MAGIC_2@GOTPAGE
Lloh10:
	ldr	x28, [x28, _FLIC_CHUNK_MAGIC_2@GOTPAGEOFF]
Lloh11:
	adrp	x20, _FLIC_TFTD_CHUNK_AUDIO@GOTPAGE
Lloh12:
	ldr	x20, [x20, _FLIC_TFTD_CHUNK_AUDIO@GOTPAGEOFF]
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w2, [x25]
	mov	x0, x19
	mov	x1, x22
	bl	_avio_read
	ldr	w8, [x25]
	cmp	w0, w8
	b.ne	LBB0_13
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x24, x0
	mov	x0, x22
	bl	_AV_RL32
	mov	x21, x0
	mov	x0, x23
	bl	_AV_RL16
	ldr	w8, [x27]
	ldr	w9, [x28]
	cmp	w0, w9
	ccmp	w0, w8, #4, ne
	ldr	w8, [x25]
	ccmp	w21, w8, #0, eq
	b.hi	LBB0_8
; %bb.5:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	w8, [x20]
	cmp	w0, w8
	b.eq	LBB0_10
; %bb.6:                                ;   in Loop: Header=BB0_3 Depth=1
	sub	w1, w21, #6
	mov	x0, x19
	bl	_avio_skip
	mov	x0, x19
	bl	_avio_feof
	cbz	x0, LBB0_3
; %bb.7:
	mov	x21, x24
	b	LBB0_14
LBB0_8:
	ldur	x0, [x29, #-96]                 ; 8-byte Folded Reload
	mov	x1, x21
	bl	_av_new_packet
	cbnz	x0, LBB0_13
; %bb.9:
	ldp	w9, w8, [x26, #4]
                                        ; kill: def $w9 killed $w9 def $x9
	sxtw	x9, w9
	ldur	x20, [x29, #-96]                ; 8-byte Folded Reload
	str	w8, [x20, #16]
	add	w8, w9, #1
	str	w8, [x26, #4]
	str	x9, [x20, #24]
	mov	x0, x19
	bl	_avio_tell
	str	x0, [x20, #8]
	ldr	x0, [x20]
	ldr	w2, [x25]
	mov	x1, x22
	bl	_memcpy
	ldr	x8, [x20]
	ldrsw	x9, [x25]
	add	x1, x8, x9
	sub	w2, w21, w9
	mov	x0, x19
	bl	_avio_read
	ldr	w8, [x25]
	sub	w8, w21, w8
	cmp	w0, w8
	mov	x21, x0
	b.ne	LBB0_12
	b	LBB0_14
LBB0_10:
	ldur	x0, [x29, #-96]                 ; 8-byte Folded Reload
	mov	x1, x21
	bl	_av_new_packet
	cbnz	x0, LBB0_13
; %bb.11:
	mov	x0, x19
	mov	w1, #10
	bl	_avio_skip
	ldr	w8, [x26]
	ldur	x20, [x29, #-96]                ; 8-byte Folded Reload
	str	w8, [x20, #16]
	mov	x0, x19
	bl	_avio_tell
	str	x0, [x20, #8]
	ldr	x1, [x20]
	mov	x0, x19
	mov	x2, x21
	bl	_avio_read
	cmp	w0, w21
	b.eq	LBB0_14
LBB0_12:
	mov	x0, x20
	bl	_av_packet_unref
LBB0_13:
Lloh13:
	adrp	x8, _EIO@GOTPAGE
Lloh14:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh15:
	ldr	w0, [x8]
	bl	_AVERROR
	mov	x21, x0
LBB0_14:
	mov	x0, x19
	bl	_avio_feof
Lloh16:
	adrp	x8, _AVERROR_EOF@GOTPAGE
Lloh17:
	ldr	x8, [x8, _AVERROR_EOF@GOTPAGEOFF]
Lloh18:
	ldr	w8, [x8]
	cmp	x0, #0
	csel	w0, w21, w8, eq
	ldur	x8, [x29, #-88]
Lloh19:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh20:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh21:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_16
; %bb.15:
	sub	sp, x29, #80
	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_16:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.comm	_FLIC_PREAMBLE_SIZE,4,2         ; @FLIC_PREAMBLE_SIZE
	.comm	_EIO,4,2                        ; @EIO
	.comm	_FLIC_CHUNK_MAGIC_1,4,2         ; @FLIC_CHUNK_MAGIC_1
	.comm	_FLIC_CHUNK_MAGIC_2,4,2         ; @FLIC_CHUNK_MAGIC_2
	.comm	_FLIC_TFTD_CHUNK_AUDIO,4,2      ; @FLIC_TFTD_CHUNK_AUDIO
	.comm	_AVERROR_EOF,4,2                ; @AVERROR_EOF
	.no_dead_strip	_flic_read_packet
.subsections_via_symbols
