	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function film_read_packet
_film_read_packet:                      ## @film_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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	8(%rdi), %r8
	movq	(%r8), %rcx
	movq	8(%r8), %r9
	cmpq	%r9, %rcx
	jae	LBB0_1
## %bb.2:
	movq	(%rdi), %r15
	movq	16(%r8), %r13
	leal	1(%rcx), %eax
	leaq	(%rcx,%rcx,4), %r10
	leaq	(,%r10,8), %r12
	addq	%r13, %r12
	xorl	%ecx, %ecx
	movq	%rcx, -48(%rbp)                 ## 8-byte Spill
	movq	%r8, -72(%rbp)                  ## 8-byte Spill
	movq	%rsi, -56(%rbp)                 ## 8-byte Spill
	movq	%r9, -64(%rbp)                  ## 8-byte Spill
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movslq	%eax, %r14
	cmpq	%r14, %r9
	jbe	LBB0_7
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	leaq	(%r14,%r14,4), %rcx
	movq	(%r13,%rcx,8), %rdx
	movq	(%r12), %rbx
	xorl	%eax, %eax
	cmpq	%rbx, %rdx
	setne	%al
	addl	%r14d, %eax
	cmpq	%rbx, %rdx
	jne	LBB0_3
## %bb.5:                               ##   in Loop: Header=BB0_3 Depth=1
	testq	%r13, %r13
	je	LBB0_3
## %bb.6:
	leaq	(,%rcx,8), %rax
	addq	%r13, %rax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
LBB0_7:
	movl	32(%r13,%r10,8), %esi
	movq	_SEEK_SET@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r15, %rdi
	movq	%r10, %rbx
	callq	_avio_seek
	movl	8(%r13,%rbx,8), %edx
	movq	%r15, %rdi
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	callq	_av_get_packet
	cmpl	8(%r13,%rbx,8), %eax
	je	LBB0_9
## %bb.8:
	movq	_EIO@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_AVERROR
LBB0_9:
	movq	(%r12), %rcx
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movq	%rcx, (%rdi)
	movq	16(%r13,%rbx,8), %rcx
	movq	%rcx, 32(%rdi)
	movq	%rcx, 24(%rdi)
	xorl	%edx, %edx
	cmpq	$0, 24(%r13,%rbx,8)
	movq	-72(%rbp), %rsi                 ## 8-byte Reload
	je	LBB0_11
## %bb.10:
	movq	_AV_PKT_FLAG_KEY@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
LBB0_11:
	orl	%edx, 16(%rdi)
	cmpq	%r14, -64(%rbp)                 ## 8-byte Folded Reload
	jbe	LBB0_13
## %bb.12:
	movq	-48(%rbp), %rdx                 ## 8-byte Reload
	movq	16(%rdx), %rdx
	subq	%rcx, %rdx
	movq	%rdx, 8(%rdi)
LBB0_13:
	incq	(%rsi)
	jmp	LBB0_14
LBB0_1:
	movq	_AVERROR_EOF@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_14:
	addq	$40, %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	_SEEK_SET,4,2                   ## @SEEK_SET
	.comm	_EIO,4,2                        ## @EIO
	.comm	_AV_PKT_FLAG_KEY,4,2            ## @AV_PKT_FLAG_KEY
	.no_dead_strip	_film_read_packet
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function film_read_packet
_film_read_packet:                      ; @film_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
	ldr	x21, [x0, #8]
	ldp	x23, x22, [x21]
	cmp	x23, x22
	b.hs	LBB0_4
; %bb.1:
	mov	x19, x1
	ldr	x20, [x0]
	ldr	x25, [x21, #16]
	add	w9, w23, #1
	mov	w8, #40
	madd	x27, x23, x8, x25
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	sxtw	x24, w9
	cmp	x22, x24
	b.ls	LBB0_5
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	madd	x26, x24, x8, x25
	ldr	x9, [x26]
	ldr	x10, [x27]
	cmp	x9, x10
	cinc	w9, w24, ne
	ccmp	x25, #0, #4, eq
	b.eq	LBB0_2
	b	LBB0_6
LBB0_4:
Lloh0:
	adrp	x8, _AVERROR_EOF@GOTPAGE
Lloh1:
	ldr	x8, [x8, _AVERROR_EOF@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	b	LBB0_11
LBB0_5:
	mov	x26, #0
LBB0_6:
	mov	w8, #40
	mul	x8, x23, x8
	add	x28, x25, x8
	ldr	w1, [x28, #32]
Lloh3:
	adrp	x8, _SEEK_SET@GOTPAGE
Lloh4:
	ldr	x8, [x8, _SEEK_SET@GOTPAGEOFF]
Lloh5:
	ldr	w2, [x8]
	mov	x0, x20
	bl	_avio_seek
	ldr	w2, [x28, #8]
	mov	x0, x20
	mov	x1, x19
	bl	_av_get_packet
	ldr	w8, [x28, #8]
	cmp	w0, w8
	b.eq	LBB0_8
; %bb.7:
Lloh6:
	adrp	x8, _EIO@GOTPAGE
Lloh7:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh8:
	ldr	w0, [x8]
	bl	_AVERROR
LBB0_8:
	ldr	x8, [x27]
	str	x8, [x19]
	mov	w8, #40
	mul	x8, x23, x8
	add	x9, x25, x8
	ldp	x8, x9, [x9, #16]
	stp	x8, x8, [x19, #24]
Lloh9:
	adrp	x10, _AV_PKT_FLAG_KEY@GOTPAGE
Lloh10:
	ldr	x10, [x10, _AV_PKT_FLAG_KEY@GOTPAGEOFF]
Lloh11:
	ldr	w10, [x10]
	cmp	x9, #0
	csel	w9, wzr, w10, eq
	ldr	w10, [x19, #16]
	orr	w9, w10, w9
	str	w9, [x19, #16]
	cmp	x22, x24
	b.ls	LBB0_10
; %bb.9:
	ldr	x9, [x26, #16]
	sub	x8, x9, x8
	str	x8, [x19, #8]
LBB0_10:
	ldr	x8, [x21]
	add	x8, x8, #1
	str	x8, [x21]
LBB0_11:
	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 AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_AVERROR_EOF,4,2                ; @AVERROR_EOF
	.comm	_SEEK_SET,4,2                   ; @SEEK_SET
	.comm	_EIO,4,2                        ; @EIO
	.comm	_AV_PKT_FLAG_KEY,4,2            ; @AV_PKT_FLAG_KEY
	.no_dead_strip	_film_read_packet
.subsections_via_symbols
