	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function decode_region
_decode_region:                         ## @decode_region
	.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	$88, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
                                        ## kill: def $r9d killed $r9d def $r9
                                        ## kill: def $ecx killed $ecx def $rcx
	movq	%rdi, -72(%rbp)                 ## 8-byte Spill
	cmpl	$0, 16(%rbp)
	jle	LBB0_13
## %bb.1:
	movl	32(%rbp), %eax
	movl	24(%rbp), %ebx
	movl	%ebx, %edi
	imull	%r8d, %edi
	addl	%ecx, %edi
	movslq	%edi, %rdi
	leaq	(%rsi,%rdi,4), %rsi
	movq	%rsi, -64(%rbp)                 ## 8-byte Spill
	leal	(%rcx,%rcx,2), %ecx
	movslq	%ecx, %rcx
	movq	%rdx, -112(%rbp)                ## 8-byte Spill
	leaq	(%rdx,%rcx,4), %rcx
	imull	%eax, %r8d
	movslq	%r8d, %rdx
	leaq	(%rcx,%rdx,4), %rcx
	movq	%rcx, -48(%rbp)                 ## 8-byte Spill
	movslq	%ebx, %rcx
	cltq
	movq	%rax, -80(%rbp)                 ## 8-byte Spill
	movl	%r9d, %eax
	leal	-1(%r9), %edx
	movl	%edx, -52(%rbp)                 ## 4-byte Spill
	shlq	$2, %rcx
	movq	%rcx, -88(%rbp)                 ## 8-byte Spill
	leaq	(%rax,%rax,2), %rax
	movq	%rax, -104(%rbp)                ## 8-byte Spill
	xorl	%r14d, %r14d
	movq	%r9, -96(%rbp)                  ## 8-byte Spill
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_12:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movq	-80(%rbp), %rcx                 ## 8-byte Reload
	leaq	(%rax,%rcx,4), %rax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	incl	%r14d
	movq	-88(%rbp), %rax                 ## 8-byte Reload
	addq	%rax, -64(%rbp)                 ## 8-byte Folded Spill
	cmpl	16(%rbp), %r14d
	movq	-96(%rbp), %r9                  ## 8-byte Reload
	je	LBB0_13
LBB0_2:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_4 Depth 2
	testl	%r9d, %r9d
	jle	LBB0_12
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	xorl	%r13d, %r13d
	movq	-64(%rbp), %r12                 ## 8-byte Reload
	movl	-52(%rbp), %r15d                ## 4-byte Reload
	xorl	%ebx, %ebx
	jmp	LBB0_4
	.p2align	4, 0x90
LBB0_11:                                ##   in Loop: Header=BB0_4 Depth=2
	addq	$3, %rbx
	incl	%r13d
	decl	%r15d
	addq	$4, %r12
	cmpq	%rbx, -104(%rbp)                ## 8-byte Folded Reload
	je	LBB0_12
LBB0_4:                                 ##   Parent Loop BB0_2 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	testq	%rbx, %rbx
	jne	LBB0_7
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=2
	testl	%r14d, %r14d
	jne	LBB0_7
## %bb.6:                               ##   in Loop: Header=BB0_4 Depth=2
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	movq	40(%rbp), %rsi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	xorl	%r8d, %r8d
	callq	_decode_pixel
	testl	%eax, %eax
	jns	LBB0_9
	jmp	LBB0_14
	.p2align	4, 0x90
LBB0_7:                                 ##   in Loop: Header=BB0_4 Depth=2
	movl	%r15d, (%rsp)
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	movq	40(%rbp), %rsi
	movq	%r12, %rdx
	movl	24(%rbp), %ecx
	movl	%r13d, %r8d
	movl	%r14d, %r9d
	callq	_decode_pixel_in_context
	testl	%eax, %eax
	js	LBB0_14
LBB0_9:                                 ##   in Loop: Header=BB0_4 Depth=2
	movl	%eax, (%r12)
	cmpq	$0, -112(%rbp)                  ## 8-byte Folded Reload
	je	LBB0_11
## %bb.10:                              ##   in Loop: Header=BB0_4 Depth=2
	movl	%ebx, %ecx
	movq	-48(%rbp), %rdx                 ## 8-byte Reload
	leaq	(%rdx,%rcx,4), %rdi
	movl	%eax, %eax
	movq	48(%rbp), %rcx
	movl	(%rcx,%rax,4), %esi
	callq	_AV_WB24
	jmp	LBB0_11
LBB0_13:
	xorl	%eax, %eax
LBB0_14:
	addq	$88, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_decode_region
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function decode_region
_decode_region:                         ; @decode_region
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #160
	.cfi_def_cfa_offset 160
	stp	x28, x27, [sp, #64]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #80]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #96]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #112]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #128]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #144]            ; 16-byte Folded Spill
	add	x29, sp, #144
	.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
                                        ; kill: def $w7 killed $w7 def $x7
	str	w6, [sp, #36]                   ; 4-byte Folded Spill
	cmp	w6, #1
	b.lt	LBB0_12
; %bb.1:
	mov	x22, x2
	mov	x23, x0
	mov	w24, #0
	ldr	x8, [x29, #32]
	str	x8, [sp, #56]                   ; 8-byte Folded Spill
	ldr	x25, [x29, #24]
	madd	w8, w7, w4, w3
	add	x8, x1, w8, sxtw #2
	str	x8, [sp, #40]                   ; 8-byte Folded Spill
	ldr	w8, [x29, #16]
	add	w9, w3, w3, lsl #1
	add	x9, x2, w9, sxtw #2
	mul	w10, w8, w4
	add	x21, x9, w10, sxtw #2
	sxtw	x10, w8
	mov	w8, w5
	sub	w9, w5, #1
	str	w9, [sp, #12]                   ; 4-byte Folded Spill
	str	x7, [sp, #48]                   ; 8-byte Folded Spill
	sbfiz	x9, x7, #2, #32
	stp	x9, x10, [sp, #16]              ; 16-byte Folded Spill
	add	x19, x8, w5, uxtw #1
	str	w5, [sp, #32]                   ; 4-byte Folded Spill
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	ldp	x9, x8, [sp, #16]               ; 16-byte Folded Reload
	add	x21, x21, x8, lsl #2
	add	w24, w24, #1
	ldr	x8, [sp, #40]                   ; 8-byte Folded Reload
	add	x8, x8, x9
	str	x8, [sp, #40]                   ; 8-byte Folded Spill
	ldp	w5, w8, [sp, #32]               ; 8-byte Folded Reload
	cmp	w24, w8
	b.eq	LBB0_12
LBB0_3:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_6 Depth 2
	cmp	w5, #1
	b.lt	LBB0_2
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	w26, #0
	mov	x20, #0
	ldr	x27, [sp, #40]                  ; 8-byte Folded Reload
	ldr	w28, [sp, #12]                  ; 4-byte Folded Reload
	b	LBB0_6
LBB0_5:                                 ;   in Loop: Header=BB0_6 Depth=2
	add	x20, x20, #3
	add	w26, w26, #1
	sub	w28, w28, #1
	add	x27, x27, #4
	cmp	x19, x20
	b.eq	LBB0_2
LBB0_6:                                 ;   Parent Loop BB0_3 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	cbnz	x20, LBB0_9
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=2
	cbnz	w24, LBB0_9
; %bb.8:                                ;   in Loop: Header=BB0_6 Depth=2
	mov	x0, x23
	mov	x1, x25
	mov	x2, #0
	mov	w3, #0
	mov	w4, #0
	bl	_decode_pixel
	tbz	w0, #31, LBB0_10
	b	LBB0_13
LBB0_9:                                 ;   in Loop: Header=BB0_6 Depth=2
	mov	x0, x23
	mov	x1, x25
	mov	x2, x27
	ldr	x3, [sp, #48]                   ; 8-byte Folded Reload
                                        ; kill: def $w3 killed $w3 killed $x3
	mov	x4, x26
	mov	x5, x24
	mov	x6, x28
	bl	_decode_pixel_in_context
	tbnz	w0, #31, LBB0_13
LBB0_10:                                ;   in Loop: Header=BB0_6 Depth=2
	str	w0, [x27]
	cbz	x22, LBB0_5
; %bb.11:                               ;   in Loop: Header=BB0_6 Depth=2
	ldr	x8, [sp, #56]                   ; 8-byte Folded Reload
	ldr	w1, [x8, w0, uxtw #2]
	add	x0, x21, w20, uxtw #2
	bl	_AV_WB24
	b	LBB0_5
LBB0_12:
	mov	w0, #0
LBB0_13:
	ldp	x29, x30, [sp, #144]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #128]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #112]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #96]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #80]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #64]             ; 16-byte Folded Reload
	add	sp, sp, #160
	ret
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_decode_region
.subsections_via_symbols
