	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function rl2_read_packet
_rl2_read_packet:                       ## @rl2_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
	movl	(%rdi), %r9d
	testl	%r9d, %r9d
	jle	LBB0_15
## %bb.1:
	movq	%rsi, %r14
	movq	8(%rdi), %r15
	movq	24(%rdi), %r8
	movq	_INT64_MAX@GOTPCREL(%rip), %rax
	movq	(%rax), %r11
	movq	(%r8), %rax
	cmpl	$1, %r9d
	jne	LBB0_3
## %bb.2:
	movl	$-1, %r12d
	xorl	%esi, %esi
	xorl	%r13d, %r13d
LBB0_11:
	testb	$1, %r9b
	je	LBB0_14
## %bb.12:
	movq	(%rax,%rsi,8), %rax
	movq	(%r15,%rsi,8), %rcx
	cmpq	(%rcx), %rax
	jae	LBB0_14
## %bb.13:
	movq	8(%rcx), %rcx
	shlq	$4, %rax
	leaq	(%rcx,%rax), %rdx
	cmpq	%r11, (%rcx,%rax)
	cmovlq	%rdx, %r13
	cmovll	%esi, %r12d
LBB0_14:
	cmpl	$-1, %r12d
	je	LBB0_15
## %bb.16:
	movq	16(%rdi), %r15
	movq	(%r8), %rax
	movslq	%r12d, %rcx
	incq	(%rax,%rcx,8)
	movq	(%r13), %rsi
	movq	_SEEK_SET@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r15, %rdi
	callq	_avio_seek
	movl	8(%r13), %edx
	movq	%r15, %rdi
	movq	%r14, %rsi
	callq	_av_get_packet
	cmpl	8(%r13), %eax
	jne	LBB0_19
## %bb.17:
	movl	%r12d, (%r14)
	movl	12(%r13), %ecx
	movl	%ecx, 4(%r14)
	jmp	LBB0_18
LBB0_15:
	movq	_AVERROR_EOF@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_18:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_3:
	movl	%r9d, %r10d
	andl	$-2, %r10d
	movl	$-1, %r12d
	xorl	%esi, %esi
	xorl	%r13d, %r13d
	jmp	LBB0_4
	.p2align	4, 0x90
LBB0_10:                                ##   in Loop: Header=BB0_4 Depth=1
	addq	$2, %rsi
	cmpq	%rsi, %r10
	je	LBB0_11
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%rax,%rsi,8), %rbx
	movq	(%r15,%rsi,8), %rcx
	cmpq	(%rcx), %rbx
	jae	LBB0_7
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	movq	8(%rcx), %rcx
	shlq	$4, %rbx
	movq	(%rcx,%rbx), %rdx
	cmpq	%r11, %rdx
	jge	LBB0_7
## %bb.6:                               ##   in Loop: Header=BB0_4 Depth=1
	addq	%rbx, %rcx
	movq	%rcx, %r13
	movl	%esi, %r12d
	movq	%rdx, %r11
LBB0_7:                                 ##   in Loop: Header=BB0_4 Depth=1
	movq	8(%rax,%rsi,8), %rbx
	movq	8(%r15,%rsi,8), %rcx
	cmpq	(%rcx), %rbx
	jae	LBB0_10
## %bb.8:                               ##   in Loop: Header=BB0_4 Depth=1
	movq	8(%rcx), %rcx
	shlq	$4, %rbx
	movq	(%rcx,%rbx), %rdx
	cmpq	%r11, %rdx
	jge	LBB0_10
## %bb.9:                               ##   in Loop: Header=BB0_4 Depth=1
	addq	%rbx, %rcx
	leal	1(%rsi), %r12d
	movq	%rcx, %r13
	movq	%rdx, %r11
	jmp	LBB0_10
LBB0_19:
	movq	%r14, %rdi
	callq	_av_packet_unref
	movq	_EIO@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_AVERROR                        ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_INT64_MAX,8,3                  ## @INT64_MAX
	.comm	_AVERROR_EOF,4,2                ## @AVERROR_EOF
	.comm	_SEEK_SET,4,2                   ## @SEEK_SET
	.comm	_EIO,4,2                        ## @EIO
	.no_dead_strip	_rl2_read_packet
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function rl2_read_packet
_rl2_read_packet:                       ; @rl2_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
	ldr	w8, [x0]
	cmp	w8, #1
	b.lt	LBB0_9
; %bb.1:
	mov	x19, x1
	mov	x10, #0
	mov	x21, #0
Lloh0:
	adrp	x11, _INT64_MAX@GOTPAGE
Lloh1:
	ldr	x11, [x11, _INT64_MAX@GOTPAGEOFF]
	ldp	x20, x9, [x0, #16]
Lloh2:
	ldr	x13, [x11]
	ldr	x11, [x9]
	ldr	x12, [x0, #8]
	mov	w22, #-1
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	add	x10, x10, #1
	cmp	x8, x10
	b.eq	LBB0_6
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	lsl	x15, x10, #3
	ldr	x14, [x11, x15]
	ldr	x15, [x12, x15]
	ldr	x16, [x15]
	cmp	x14, x16
	b.hs	LBB0_2
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	x15, [x15, #8]
	add	x15, x15, x14, lsl #4
	ldr	x14, [x15]
	cmp	x14, x13
	b.ge	LBB0_2
; %bb.5:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x21, x15
	mov	x22, x10
	mov	x13, x14
	b	LBB0_2
LBB0_6:
	cmn	w22, #1
	b.eq	LBB0_9
; %bb.7:
	ldr	x8, [x9]
	sbfiz	x9, x22, #3, #32
	ldr	x10, [x8, x9]
	add	x10, x10, #1
	str	x10, [x8, x9]
	ldr	x1, [x21]
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, [x21, #8]
	mov	x0, x20
	mov	x1, x19
	bl	_av_get_packet
	ldr	w8, [x21, #8]
	cmp	w0, w8
	b.ne	LBB0_11
; %bb.8:
	ldr	w8, [x21, #12]
	stp	w22, w8, [x19]
	b	LBB0_10
LBB0_9:
Lloh6:
	adrp	x8, _AVERROR_EOF@GOTPAGE
Lloh7:
	ldr	x8, [x8, _AVERROR_EOF@GOTPAGEOFF]
Lloh8:
	ldr	w0, [x8]
LBB0_10:
	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
LBB0_11:
	mov	x0, x19
	bl	_av_packet_unref
Lloh9:
	adrp	x8, _EIO@GOTPAGE
Lloh10:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh11:
	ldr	w0, [x8]
	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
	b	_AVERROR
	.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	_INT64_MAX,8,3                  ; @INT64_MAX
	.comm	_AVERROR_EOF,4,2                ; @AVERROR_EOF
	.comm	_SEEK_SET,4,2                   ; @SEEK_SET
	.comm	_EIO,4,2                        ; @EIO
	.no_dead_strip	_rl2_read_packet
.subsections_via_symbols
