	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function decode_rle16
_decode_rle16:                          ## @decode_rle16
	.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
	cmpl	$0, 4(%rdi)
	jle	LBB0_26
## %bb.1:
	movq	%rdx, %r13
	movq	%rdi, %r12
	movl	(%rdi), %r14d
	movq	8(%rsi), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	xorl	%ebx, %ebx
	movq	%rsi, -72(%rbp)                 ## 8-byte Spill
	movq	%rdi, -64(%rbp)                 ## 8-byte Spill
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_25:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	-72(%rbp), %rsi                 ## 8-byte Reload
	movq	(%rsi), %rax
	movslq	(%rax), %rax
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	leaq	(%rcx,%rax,4), %rcx
	movq	%rcx, -48(%rbp)                 ## 8-byte Spill
	movl	-52(%rbp), %ebx                 ## 4-byte Reload
	incl	%ebx
	movq	-64(%rbp), %r12                 ## 8-byte Reload
	cmpl	4(%r12), %ebx
	jge	LBB0_26
LBB0_2:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_5 Depth 2
                                        ##       Child Loop BB0_13 Depth 3
                                        ##       Child Loop BB0_8 Depth 3
	movq	%r13, %rdi
	callq	_bytestream2_get_be16
	movq	%rax, %r15
	movq	%r13, %rdi
	callq	_bytestream2_get_bytes_left
	cmpl	%r15d, %eax
	jl	LBB0_28
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	%ebx, -52(%rbp)                 ## 4-byte Spill
	testl	%r15d, %r15d
	jle	LBB0_25
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	xorl	%r12d, %r12d
	jmp	LBB0_5
	.p2align	4, 0x90
LBB0_23:                                ##   in Loop: Header=BB0_5 Depth=2
	addl	%ebx, %ebx
	movq	-80(%rbp), %r15                 ## 8-byte Reload
	subl	%ebx, %r15d
LBB0_24:                                ##   in Loop: Header=BB0_5 Depth=2
	addl	$-3, %r15d
	testl	%r15d, %r15d
	jle	LBB0_25
LBB0_5:                                 ##   Parent Loop BB0_2 Depth=1
                                        ## =>  This Loop Header: Depth=2
                                        ##       Child Loop BB0_13 Depth 3
                                        ##       Child Loop BB0_8 Depth 3
	movq	%r13, %rdi
	callq	_bytestream2_get_byte
	movl	%eax, %ebx
	testb	$-128, %bl
	jne	LBB0_10
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=2
	testl	%ebx, %ebx
	movq	%r15, -80(%rbp)                 ## 8-byte Spill
	js	LBB0_23
## %bb.7:                               ##   in Loop: Header=BB0_5 Depth=2
	leal	1(%rbx), %r15d
	jmp	LBB0_8
	.p2align	4, 0x90
LBB0_21:                                ##   in Loop: Header=BB0_8 Depth=3
	movl	$2, %esi
	callq	_bytestream2_skip
	decl	%r15d
	je	LBB0_23
LBB0_8:                                 ##   Parent Loop BB0_2 Depth=1
                                        ##     Parent Loop BB0_5 Depth=2
                                        ## =>    This Inner Loop Header: Depth=3
	movq	%r13, %rdi
	cmpl	%r14d, %r12d
	jge	LBB0_21
## %bb.9:                               ##   in Loop: Header=BB0_8 Depth=3
	callq	_bytestream2_get_be16
	movslq	%r12d, %rcx
	incl	%r12d
	movq	-48(%rbp), %rdx                 ## 8-byte Reload
	movl	%eax, (%rdx,%rcx,4)
	decl	%r15d
	jne	LBB0_8
	jmp	LBB0_23
	.p2align	4, 0x90
LBB0_10:                                ##   in Loop: Header=BB0_5 Depth=2
	movq	%r13, %rdi
	callq	_bytestream2_get_be16
	cmpl	$256, %ebx                      ## imm = 0x100
	jg	LBB0_24
## %bb.11:                              ##   in Loop: Header=BB0_5 Depth=2
	movl	$257, %ecx                      ## imm = 0x101
	subl	%ebx, %ecx
	cmpl	$2, %ecx
	movl	$1, %edx
	cmovll	%edx, %ecx
	jge	LBB0_12
LBB0_18:                                ##   in Loop: Header=BB0_5 Depth=2
	testb	$1, %cl
	je	LBB0_24
## %bb.19:                              ##   in Loop: Header=BB0_5 Depth=2
	cmpl	%r14d, %r12d
	jge	LBB0_24
## %bb.20:                              ##   in Loop: Header=BB0_5 Depth=2
	movslq	%r12d, %rcx
	incl	%r12d
	movq	-48(%rbp), %rdx                 ## 8-byte Reload
	movl	%eax, (%rdx,%rcx,4)
	jmp	LBB0_24
LBB0_12:                                ##   in Loop: Header=BB0_5 Depth=2
	movl	%ecx, %edx
	andl	$2147483646, %edx               ## imm = 0x7FFFFFFE
	jmp	LBB0_13
	.p2align	4, 0x90
LBB0_17:                                ##   in Loop: Header=BB0_13 Depth=3
	addl	$-2, %edx
	je	LBB0_18
LBB0_13:                                ##   Parent Loop BB0_2 Depth=1
                                        ##     Parent Loop BB0_5 Depth=2
                                        ## =>    This Inner Loop Header: Depth=3
	cmpl	%r14d, %r12d
	jl	LBB0_14
## %bb.15:                              ##   in Loop: Header=BB0_13 Depth=3
	cmpl	%r14d, %r12d
	jge	LBB0_17
	jmp	LBB0_16
	.p2align	4, 0x90
LBB0_14:                                ##   in Loop: Header=BB0_13 Depth=3
	movslq	%r12d, %rsi
	incl	%r12d
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movl	%eax, (%rdi,%rsi,4)
	cmpl	%r14d, %r12d
	jge	LBB0_17
LBB0_16:                                ##   in Loop: Header=BB0_13 Depth=3
	movslq	%r12d, %rsi
	incl	%r12d
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movl	%eax, (%rdi,%rsi,4)
	jmp	LBB0_17
LBB0_26:
	xorl	%eax, %eax
	jmp	LBB0_27
LBB0_28:
	movq	_AVERROR_INVALIDDATA@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_27:
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_AVERROR_INVALIDDATA,4,2        ## @AVERROR_INVALIDDATA
	.no_dead_strip	_decode_rle16
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function decode_rle16
_decode_rle16:                          ; @decode_rle16
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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	w8, [x0, #4]
	cmp	w8, #1
	b.lt	LBB0_19
; %bb.1:
	mov	x19, x2
	mov	x20, x1
	mov	x21, x0
	mov	w24, #0
	ldr	w25, [x0]
	ldr	x8, [x1, #8]
	ldr	x26, [x8]
	mov	w27, #257
	str	x0, [sp, #8]                    ; 8-byte Folded Spill
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	mov	x20, x21
	ldr	x8, [x21]
	ldrsw	x8, [x8]
	add	x26, x26, x8, lsl #2
	add	w24, w24, #1
	ldr	x21, [sp, #8]                   ; 8-byte Folded Reload
	ldr	w8, [x21, #4]
	cmp	w24, w8
	b.ge	LBB0_19
LBB0_3:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_7 Depth 2
                                        ;       Child Loop BB0_16 Depth 3
                                        ;       Child Loop BB0_11 Depth 3
	mov	x0, x19
	bl	_bytestream2_get_be16
	mov	x22, x0
	mov	x0, x19
	bl	_bytestream2_get_bytes_left
	cmp	w0, w22
	b.lt	LBB0_20
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x21, x20
	cmp	w22, #1
	b.lt	LBB0_2
; %bb.5:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	w28, #0
	b	LBB0_7
LBB0_6:                                 ;   in Loop: Header=BB0_7 Depth=2
	sub	w8, w22, w23, lsl #1
	sub	w22, w8, #3
	cmp	w22, #0
	b.le	LBB0_2
LBB0_7:                                 ;   Parent Loop BB0_3 Depth=1
                                        ; =>  This Loop Header: Depth=2
                                        ;       Child Loop BB0_16 Depth 3
                                        ;       Child Loop BB0_11 Depth 3
	mov	x0, x19
	bl	_bytestream2_get_byte
	mov	x23, x0
	tbnz	w0, #7, LBB0_13
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=2
	tbnz	w23, #31, LBB0_6
; %bb.9:                                ;   in Loop: Header=BB0_7 Depth=2
	add	w20, w23, #1
	b	LBB0_11
LBB0_10:                                ;   in Loop: Header=BB0_11 Depth=3
	mov	w1, #2
	bl	_bytestream2_skip
	subs	w20, w20, #1
	b.eq	LBB0_6
LBB0_11:                                ;   Parent Loop BB0_3 Depth=1
                                        ;     Parent Loop BB0_7 Depth=2
                                        ; =>    This Inner Loop Header: Depth=3
	mov	x0, x19
	cmp	w28, w25
	b.ge	LBB0_10
; %bb.12:                               ;   in Loop: Header=BB0_11 Depth=3
	bl	_bytestream2_get_be16
	str	w0, [x26, w28, sxtw #2]
	add	w28, w28, #1
	subs	w20, w20, #1
	b.ne	LBB0_11
	b	LBB0_6
LBB0_13:                                ;   in Loop: Header=BB0_7 Depth=2
	mov	x0, x19
	bl	_bytestream2_get_be16
	cmp	w23, #256
	b.gt	LBB0_18
; %bb.14:                               ;   in Loop: Header=BB0_7 Depth=2
	sub	w8, w27, w23
	cmp	w8, #1
	csinc	w8, w8, wzr, gt
	b	LBB0_16
LBB0_15:                                ;   in Loop: Header=BB0_16 Depth=3
	subs	w8, w8, #1
	b.eq	LBB0_18
LBB0_16:                                ;   Parent Loop BB0_3 Depth=1
                                        ;     Parent Loop BB0_7 Depth=2
                                        ; =>    This Inner Loop Header: Depth=3
	cmp	w28, w25
	b.ge	LBB0_15
; %bb.17:                               ;   in Loop: Header=BB0_16 Depth=3
	str	w0, [x26, w28, sxtw #2]
	add	w28, w28, #1
	b	LBB0_15
LBB0_18:                                ;   in Loop: Header=BB0_7 Depth=2
	sub	w22, w22, #3
	cmp	w22, #0
	b.gt	LBB0_7
	b	LBB0_2
LBB0_19:
	mov	w0, #0
	b	LBB0_21
LBB0_20:
Lloh0:
	adrp	x8, _AVERROR_INVALIDDATA@GOTPAGE
Lloh1:
	ldr	x8, [x8, _AVERROR_INVALIDDATA@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
LBB0_21:
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_AVERROR_INVALIDDATA,4,2        ; @AVERROR_INVALIDDATA
	.no_dead_strip	_decode_rle16
.subsections_via_symbols
