	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function loco_decode_plane
_loco_decode_plane:                     ## @loco_decode_plane
	.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	$104, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%r8d, -52(%rbp)                 ## 4-byte Spill
	movl	%edx, %r12d
	movl	16(%rbp), %edx
	movl	$-1, %eax
	testl	%edx, %edx
	jle	LBB0_17
## %bb.1:
	movl	%ecx, %ebx
	movq	%rsi, %r15
	movq	%rdi, %r14
	leaq	-128(%rbp), %rdi
	movq	%r9, %rsi
	callq	_init_get_bits8
	testl	%eax, %eax
	js	LBB0_17
## %bb.2:
	movl	%ebx, -48(%rbp)                 ## 4-byte Spill
	xorps	%xmm0, %xmm0
	movups	%xmm0, -120(%rbp)
	movq	$0, -104(%rbp)
	movl	(%r14), %eax
	movl	%eax, -124(%rbp)
	movabsq	$4294967304, %rax               ## imm = 0x100000008
	movq	%rax, -136(%rbp)
	leaq	-136(%rbp), %rdi
	callq	_loco_get_rice
	subl	$-128, %eax
	movl	%eax, (%r15)
	movl	%r12d, -44(%rbp)                ## 4-byte Spill
	cmpl	$2, %r12d
	jl	LBB0_7
## %bb.3:
	movl	-44(%rbp), %r12d                ## 4-byte Reload
	movl	$1, %ebx
	leaq	-136(%rbp), %r14
	movq	_INT_MIN@GOTPCREL(%rip), %r13
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r14, %rdi
	callq	_loco_get_rice
	cmpl	(%r13), %eax
	je	LBB0_5
## %bb.6:                               ##   in Loop: Header=BB0_4 Depth=1
	addl	-4(%r15,%rbx,4), %eax
	movl	%eax, (%r15,%rbx,4)
	incq	%rbx
	cmpq	%rbx, %r12
	jne	LBB0_4
LBB0_7:
	cmpl	$2, -48(%rbp)                   ## 4-byte Folded Reload
	movl	-44(%rbp), %r12d                ## 4-byte Reload
	jl	LBB0_16
## %bb.8:
	movslq	-52(%rbp), %rcx                 ## 4-byte Folded Reload
	movl	%ecx, %eax
	negl	%eax
	cltq
	movq	%rax, -88(%rbp)                 ## 8-byte Spill
	movl	%r12d, %eax
	leaq	(%r15,%rcx,4), %r14
	addq	$4, %r14
	movq	%rcx, -96(%rbp)                 ## 8-byte Spill
	leaq	(,%rcx,4), %rcx
	movq	%rcx, -80(%rbp)                 ## 8-byte Spill
	decq	%rax
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	movl	$1, %ebx
	jmp	LBB0_9
	.p2align	4, 0x90
LBB0_15:                                ##   in Loop: Header=BB0_9 Depth=1
	movl	-56(%rbp), %ebx                 ## 4-byte Reload
	incl	%ebx
	movq	-64(%rbp), %r14                 ## 8-byte Reload
	addq	-80(%rbp), %r14                 ## 8-byte Folded Reload
	cmpl	-48(%rbp), %ebx                 ## 4-byte Folded Reload
	movl	-44(%rbp), %r12d                ## 4-byte Reload
	je	LBB0_16
LBB0_9:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_12 Depth 2
	leaq	-136(%rbp), %rdi
	callq	_loco_get_rice
	movq	_INT_MIN@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	je	LBB0_5
## %bb.10:                              ##   in Loop: Header=BB0_9 Depth=1
	movl	%ebx, -56(%rbp)                 ## 4-byte Spill
	movq	-96(%rbp), %rcx                 ## 8-byte Reload
	leaq	(%r15,%rcx,4), %r15
	movq	-88(%rbp), %rcx                 ## 8-byte Reload
	addl	(%r15,%rcx,4), %eax
	movl	%eax, (%r15)
	cmpl	$2, %r12d
	movq	%r14, -64(%rbp)                 ## 8-byte Spill
	leaq	-136(%rbp), %rbx
	jl	LBB0_15
## %bb.11:                              ##   in Loop: Header=BB0_9 Depth=1
	movq	-72(%rbp), %r13                 ## 8-byte Reload
	movq	-64(%rbp), %r12                 ## 8-byte Reload
	.p2align	4, 0x90
LBB0_12:                                ##   Parent Loop BB0_9 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	%rbx, %rdi
	callq	_loco_get_rice
	movl	%eax, %r14d
	movq	_INT_MIN@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r14d
	je	LBB0_13
## %bb.14:                              ##   in Loop: Header=BB0_12 Depth=2
	movq	%r12, %rdi
	movl	-52(%rbp), %esi                 ## 4-byte Reload
	callq	_loco_predict
	addl	%r14d, %eax
	movl	%eax, (%r12)
	addq	$4, %r12
	decq	%r13
	jne	LBB0_12
	jmp	LBB0_15
LBB0_16:
	leaq	-128(%rbp), %rdi
	callq	_get_bits_count
	addl	$7, %eax
	sarl	$3, %eax
	jmp	LBB0_17
LBB0_5:
	movq	_AVERROR_INVALIDDATA@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	jmp	LBB0_17
LBB0_13:
	movl	$-1, %eax
LBB0_17:
	addq	$104, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_INT_MIN,4,2                    ## @INT_MIN
	.comm	_AVERROR_INVALIDDATA,4,2        ## @AVERROR_INVALIDDATA
	.no_dead_strip	_loco_decode_plane
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3                               ; -- Begin function loco_decode_plane
lCPI0_0:
	.long	8                               ; 0x8
	.long	1                               ; 0x1
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	2
_loco_decode_plane:                     ; @loco_decode_plane
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #176
	.cfi_def_cfa_offset 176
	stp	x28, x27, [sp, #80]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #96]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #112]            ; 16-byte Folded Spill
	stp	x22, x21, [sp, #128]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #144]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #160]            ; 16-byte Folded Spill
	add	x29, sp, #160
	.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
	cmp	w6, #1
	b.lt	LBB0_14
; %bb.1:
	mov	x19, x4
	mov	x20, x3
	mov	x21, x2
	mov	x22, x1
	mov	x24, x0
	add	x8, sp, #40
	add	x26, x8, #8
	mov	x0, x26
	mov	x1, x5
	mov	x2, x6
	bl	_init_get_bits8
	tbnz	w0, #31, LBB0_17
; %bb.2:
	stp	xzr, xzr, [sp, #56]
	str	xzr, [sp, #72]
	ldr	w8, [x24]
	str	w8, [sp, #52]
Lloh0:
	adrp	x8, lCPI0_0@PAGE
Lloh1:
	ldr	d0, [x8, lCPI0_0@PAGEOFF]
	str	d0, [sp, #40]
	add	x0, sp, #40
	bl	_loco_get_rice
	add	w8, w0, #128
	str	w8, [x22]
	cmp	w21, #2
	b.lt	LBB0_6
; %bb.3:
	mov	w8, w21
	add	x23, x22, #4
	sub	x24, x8, #1
Lloh2:
	adrp	x25, _INT_MIN@GOTPAGE
Lloh3:
	ldr	x25, [x25, _INT_MIN@GOTPAGEOFF]
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	add	x0, sp, #40
	bl	_loco_get_rice
	ldr	w8, [x25]
	cmp	w0, w8
	b.eq	LBB0_16
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	ldur	w8, [x23, #-4]
	add	w8, w8, w0
	str	w8, [x23], #4
	subs	x24, x24, #1
	b.ne	LBB0_4
LBB0_6:
	str	x26, [sp, #8]                   ; 8-byte Folded Spill
	cmp	w20, #2
	b.lt	LBB0_15
; %bb.7:
	sxtw	x9, w19
	neg	x8, x9
	stp	x8, x9, [sp, #24]               ; 16-byte Folded Spill
	mov	w8, w21
	lsl	x9, x9, #2
	str	x9, [sp, #16]                   ; 8-byte Folded Spill
	add	x9, x9, x22
	add	x27, x9, #4
	sub	x8, x8, #1
	str	x8, [sp]                        ; 8-byte Folded Spill
	mov	w28, #1
Lloh4:
	adrp	x23, _INT_MIN@GOTPAGE
Lloh5:
	ldr	x23, [x23, _INT_MIN@GOTPAGEOFF]
	b	LBB0_9
LBB0_8:                                 ;   in Loop: Header=BB0_9 Depth=1
	add	w28, w28, #1
	ldr	x8, [sp, #16]                   ; 8-byte Folded Reload
	add	x27, x27, x8
	cmp	w28, w20
	b.eq	LBB0_15
LBB0_9:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_12 Depth 2
	add	x0, sp, #40
	bl	_loco_get_rice
	ldr	w8, [x23]
	cmp	w0, w8
	b.eq	LBB0_16
; %bb.10:                               ;   in Loop: Header=BB0_9 Depth=1
	ldr	x8, [sp, #32]                   ; 8-byte Folded Reload
	add	x22, x22, x8, lsl #2
	ldr	x8, [sp, #24]                   ; 8-byte Folded Reload
	ldr	w8, [x22, x8, lsl #2]
	add	w8, w8, w0
	str	w8, [x22]
	cmp	w21, #2
	b.lt	LBB0_8
; %bb.11:                               ;   in Loop: Header=BB0_9 Depth=1
	ldr	x26, [sp]                       ; 8-byte Folded Reload
	mov	x24, x27
LBB0_12:                                ;   Parent Loop BB0_9 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	add	x0, sp, #40
	bl	_loco_get_rice
	ldr	w8, [x23]
	cmp	w0, w8
	b.eq	LBB0_14
; %bb.13:                               ;   in Loop: Header=BB0_12 Depth=2
	mov	x25, x0
	mov	x0, x24
	mov	x1, x19
	bl	_loco_predict
	add	w8, w0, w25
	str	w8, [x24], #4
	subs	x26, x26, #1
	b.ne	LBB0_12
	b	LBB0_8
LBB0_14:
	mov	w0, #-1
	b	LBB0_17
LBB0_15:
	ldr	x0, [sp, #8]                    ; 8-byte Folded Reload
	bl	_get_bits_count
	add	w8, w0, #7
	asr	w0, w8, #3
	b	LBB0_17
LBB0_16:
Lloh6:
	adrp	x8, _AVERROR_INVALIDDATA@GOTPAGE
Lloh7:
	ldr	x8, [x8, _AVERROR_INVALIDDATA@GOTPAGEOFF]
Lloh8:
	ldr	w0, [x8]
LBB0_17:
	ldp	x29, x30, [sp, #160]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #144]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #128]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #112]            ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #96]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #80]             ; 16-byte Folded Reload
	add	sp, sp, #176
	ret
	.loh AdrpLdr	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_INT_MIN,4,2                    ; @INT_MIN
	.comm	_AVERROR_INVALIDDATA,4,2        ; @AVERROR_INVALIDDATA
	.no_dead_strip	_loco_decode_plane
.subsections_via_symbols
