	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cine_read_packet
_cine_read_packet:                      ## @cine_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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	16(%rdi), %r15
	movq	8(%rdi), %rax
	movq	(%rax), %rax
	movq	(%r15), %rcx
	cmpq	(%rax), %rcx
	jae	LBB0_1
## %bb.2:
	movq	%rsi, %r14
	movq	(%rdi), %rbx
	movq	8(%rax), %rax
	movl	(%rax,%rcx,4), %esi
	movq	_SEEK_SET@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	callq	_avio_seek
	movq	%rbx, %rdi
	callq	_avio_rl32
	cmpl	$7, %eax
	jg	LBB0_4
## %bb.3:
	movq	_AVERROR_INVALIDDATA@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	jmp	LBB0_6
LBB0_1:
	movq	_AVERROR_EOF@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	jmp	LBB0_6
LBB0_4:
	addl	$-8, %eax
	movq	%rbx, %rdi
	movl	%eax, %esi
	callq	_avio_skip
	movq	%rbx, %rdi
	callq	_avio_rl32
	movq	%rbx, %rdi
	movq	%r14, %rsi
	movl	%eax, %edx
	callq	_av_get_packet
	testl	%eax, %eax
	js	LBB0_6
## %bb.5:
	movq	(%r15), %rax
	leaq	1(%rax), %rcx
	movq	%rcx, (%r15)
	movl	%eax, 16(%r14)
	movq	$0, 8(%r14)
	movq	_AV_PKT_FLAG_KEY@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, (%r14)
	xorl	%eax, %eax
LBB0_6:
	addq	$8, %rsp
	popq	%rbx
	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	_AVERROR_INVALIDDATA,4,2        ## @AVERROR_INVALIDDATA
	.comm	_AV_PKT_FLAG_KEY,4,2            ## @AV_PKT_FLAG_KEY
	.no_dead_strip	_cine_read_packet
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function cine_read_packet
_cine_read_packet:                      ; @cine_read_packet
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	ldp	x8, x21, [x0, #8]
	ldr	x8, [x8]
	ldr	x9, [x21]
	ldr	x10, [x8]
	cmp	x9, x10
	b.hs	LBB0_3
; %bb.1:
	mov	x19, x1
	ldr	x20, [x0]
	ldr	x8, [x8, #8]
	ldr	w1, [x8, x9, lsl #2]
Lloh0:
	adrp	x8, _SEEK_SET@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SEEK_SET@GOTPAGEOFF]
Lloh2:
	ldr	w2, [x8]
	mov	x0, x20
	bl	_avio_seek
	mov	x0, x20
	bl	_avio_rl32
	cmp	w0, #7
	b.gt	LBB0_4
; %bb.2:
Lloh3:
	adrp	x8, _AVERROR_INVALIDDATA@GOTPAGE
Lloh4:
	ldr	x8, [x8, _AVERROR_INVALIDDATA@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
	b	LBB0_6
LBB0_3:
Lloh6:
	adrp	x8, _AVERROR_EOF@GOTPAGE
Lloh7:
	ldr	x8, [x8, _AVERROR_EOF@GOTPAGEOFF]
Lloh8:
	ldr	w0, [x8]
	b	LBB0_6
LBB0_4:
	sub	w1, w0, #8
	mov	x0, x20
	bl	_avio_skip
	mov	x0, x20
	bl	_avio_rl32
	mov	x2, x0
	mov	x0, x20
	mov	x1, x19
	bl	_av_get_packet
	tbnz	w0, #31, LBB0_6
; %bb.5:
	mov	w0, #0
	ldr	x8, [x21]
	add	x9, x8, #1
	str	x9, [x21]
	str	w8, [x19, #16]
	str	xzr, [x19, #8]
Lloh9:
	adrp	x8, _AV_PKT_FLAG_KEY@GOTPAGE
Lloh10:
	ldr	x8, [x8, _AV_PKT_FLAG_KEY@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	ldr	w9, [x19]
	orr	w8, w9, w8
	str	w8, [x19]
LBB0_6:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 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	_AVERROR_INVALIDDATA,4,2        ; @AVERROR_INVALIDDATA
	.comm	_AV_PKT_FLAG_KEY,4,2            ; @AV_PKT_FLAG_KEY
	.no_dead_strip	_cine_read_packet
.subsections_via_symbols
