	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function rle_unpack
_rle_unpack:                            ## @rle_unpack
	.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
	movl	%r8d, %r14d
	movl	%edx, %r15d
	movq	%rsi, %r13
	movq	%rdi, %rsi
	leaq	-48(%rbp), %rdi
	movl	%ecx, %edx
	callq	_bytestream2_init
	xorl	%eax, %eax
	movq	%r13, %rbx
	testb	$1, %r15b
	je	LBB0_4
## %bb.1:
	leaq	-48(%rbp), %rdi
	callq	_bytestream2_get_bytes_left
	testl	%eax, %eax
	jle	LBB0_2
## %bb.3:
	leaq	-48(%rbp), %rdi
	callq	_bytestream2_get_byteu
	leaq	1(%r13), %rbx
	movb	%al, (%r13)
	movl	$1, %eax
LBB0_4:
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movslq	%r14d, %rax
	addq	%rax, %r13
	movq	%r13, -64(%rbp)                 ## 8-byte Spill
	leaq	-48(%rbp), %r12
	movl	%r15d, -52(%rbp)                ## 4-byte Spill
	jmp	LBB0_5
	.p2align	4, 0x90
LBB0_15:                                ##   in Loop: Header=BB0_5 Depth=1
	movl	-52(%rbp), %r15d                ## 4-byte Reload
LBB0_16:                                ##   in Loop: Header=BB0_5 Depth=1
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	addl	%r13d, %eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	cmpl	%r15d, %eax
	jge	LBB0_17
LBB0_5:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_14 Depth 2
	movq	%r12, %rdi
	callq	_bytestream2_get_bytes_left
	testl	%eax, %eax
	jle	LBB0_17
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=1
	movq	%r12, %rdi
	callq	_bytestream2_get_byteu
	movq	%rax, %r14
	testb	$-128, %r14b
	jne	LBB0_7
## %bb.10:                              ##   in Loop: Header=BB0_5 Depth=1
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	subq	%rbx, %rax
	leal	(%r14,%r14), %r13d
	movslq	%r13d, %rcx
	cmpq	%rcx, %rax
	jl	LBB0_17
## %bb.11:                              ##   in Loop: Header=BB0_5 Depth=1
	movq	%r12, %rdi
	callq	_bytestream2_get_bytes_left
	cmpl	$2, %eax
	jl	LBB0_17
## %bb.12:                              ##   in Loop: Header=BB0_5 Depth=1
	movq	%r12, %rdi
	callq	_bytestream2_get_ne16
	testl	%r14d, %r14d
	jle	LBB0_15
## %bb.13:                              ##   in Loop: Header=BB0_5 Depth=1
	movl	%eax, %r15d
	.p2align	4, 0x90
LBB0_14:                                ##   Parent Loop BB0_5 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	%rbx, %rdi
	movl	%r15d, %esi
	callq	_AV_WN16
	addq	$2, %rbx
	decl	%r14d
	jne	LBB0_14
	jmp	LBB0_15
	.p2align	4, 0x90
LBB0_7:                                 ##   in Loop: Header=BB0_5 Depth=1
	addl	%r14d, %r14d
	movzbl	%r14b, %r13d
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	subq	%rbx, %rax
	cmpq	%r13, %rax
	jl	LBB0_17
## %bb.8:                               ##   in Loop: Header=BB0_5 Depth=1
	movq	%r12, %rdi
	callq	_bytestream2_get_bytes_left
	cmpl	%r13d, %eax
	jl	LBB0_17
## %bb.9:                               ##   in Loop: Header=BB0_5 Depth=1
	movq	%r12, %rdi
	movq	%rbx, %rsi
	movl	%r13d, %edx
	callq	_bytestream2_get_bufferu
	addq	%r13, %rbx
	jmp	LBB0_16
LBB0_17:
	leaq	-48(%rbp), %rdi
	callq	_bytestream2_tell
	jmp	LBB0_18
LBB0_2:
	xorl	%eax, %eax
LBB0_18:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_rle_unpack
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function rle_unpack
_rle_unpack:                            ; @rle_unpack
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.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
	mov	x21, x4
	mov	x19, x2
	mov	x22, x1
	mov	x1, x0
	add	x0, sp, #12
	mov	x2, x3
	bl	_bytestream2_init
	tbnz	w19, #0, LBB0_2
; %bb.1:
	mov	w24, #0
	mov	x20, x22
	b	LBB0_4
LBB0_2:
	add	x0, sp, #12
	bl	_bytestream2_get_bytes_left
	cmp	w0, #1
	b.lt	LBB0_17
; %bb.3:
	add	x0, sp, #12
	bl	_bytestream2_get_byteu
	mov	x20, x22
	strb	w0, [x20], #1
	mov	w24, #1
LBB0_4:
	add	x25, x22, w21, sxtw
	b	LBB0_7
LBB0_5:                                 ;   in Loop: Header=BB0_7 Depth=1
	add	x0, sp, #12
	mov	x1, x20
	mov	x2, x21
	bl	_bytestream2_get_bufferu
	add	x20, x20, x21
LBB0_6:                                 ;   in Loop: Header=BB0_7 Depth=1
	add	w24, w21, w24
	cmp	w24, w19
	b.ge	LBB0_16
LBB0_7:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_13 Depth 2
	add	x0, sp, #12
	bl	_bytestream2_get_bytes_left
	cmp	w0, #1
	b.lt	LBB0_16
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=1
	add	x0, sp, #12
	bl	_bytestream2_get_byteu
	mov	x22, x0
	tbnz	w22, #7, LBB0_14
; %bb.9:                                ;   in Loop: Header=BB0_7 Depth=1
	sub	x8, x25, x20
	lsl	w21, w22, #1
	cmp	x8, w21, sxtw
	b.lt	LBB0_16
; %bb.10:                               ;   in Loop: Header=BB0_7 Depth=1
	add	x0, sp, #12
	bl	_bytestream2_get_bytes_left
	cmp	w0, #2
	b.lt	LBB0_16
; %bb.11:                               ;   in Loop: Header=BB0_7 Depth=1
	add	x0, sp, #12
	bl	_bytestream2_get_ne16
	cmp	w22, #1
	b.lt	LBB0_6
; %bb.12:                               ;   in Loop: Header=BB0_7 Depth=1
	mov	x23, x0
LBB0_13:                                ;   Parent Loop BB0_7 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	mov	x0, x20
	mov	x1, x23
	bl	_AV_WN16
	add	x20, x20, #2
	subs	w22, w22, #1
	b.ne	LBB0_13
	b	LBB0_6
LBB0_14:                                ;   in Loop: Header=BB0_7 Depth=1
	ubfiz	w21, w22, #1, #7
	sub	x8, x25, x20
	cmp	x8, x21
	b.lt	LBB0_16
; %bb.15:                               ;   in Loop: Header=BB0_7 Depth=1
	add	x0, sp, #12
	bl	_bytestream2_get_bytes_left
	cmp	w0, w21
	b.ge	LBB0_5
LBB0_16:
	add	x0, sp, #12
	bl	_bytestream2_tell
	b	LBB0_18
LBB0_17:
	mov	w0, #0
LBB0_18:
	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
	add	sp, sp, #96
	ret
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_rle_unpack
.subsections_via_symbols
