	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function xan_decode_frame_type0
_xan_decode_frame_type0:                ## @xan_decode_frame_type0
	.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
	movq	%rdi, %r12
	movq	8(%rdi), %rbx
	movq	(%rbx), %r15
	leaq	32(%rbx), %r14
	movq	%r14, %rdi
	callq	_bytestream2_get_le32
	movl	%eax, %r13d
	movq	%r14, %rdi
	callq	_bytestream2_get_le32
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movq	%r12, %rdi
	movl	%r13d, %esi
	callq	_xan_decode_chroma
	movl	%eax, %r13d
	testl	%eax, %eax
	jne	LBB0_32
## %bb.1:
	movq	%r14, -56(%rbp)                 ## 8-byte Spill
	movq	%r14, %rdi
	callq	_bytestream2_size
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
	cmpl	%eax, %ecx
	movl	%ecx, %eax
	jb	LBB0_3
## %bb.2:
	movq	_AV_LOG_WARNING@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdx
	movq	%r12, %rdi
	callq	_av_log
	xorl	%eax, %eax
LBB0_3:
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movq	_SEEK_SET@GOTPCREL(%rip), %r14
	movl	(%r14), %edx
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movl	$12, %esi
	callq	_bytestream2_seek
	movl	8(%rbx), %edx
	sarl	%edx
	movq	%rbx, %rdi
	movq	%r15, %rsi
	callq	_xan_unpack_luma
	testl	%eax, %eax
	je	LBB0_5
## %bb.4:
	movl	%eax, %r13d
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.1(%rip), %rdx
	movq	%r12, %rdi
	callq	_av_log
	jmp	LBB0_32
LBB0_5:
	movq	%rbx, %rdx
	movq	16(%rbx), %r9
	movl	(%r15), %eax
	leal	(%rax,%rax), %r8d
	movl	%r8d, (%r9)
	addq	$4, %r15
	movl	$1, %ecx
	cmpl	$3, (%r12)
	jl	LBB0_6
## %bb.7:
	movl	$1, %ecx
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movq	%r14, %r13
	movq	%rdx, %r14
	.p2align	4, 0x90
LBB0_8:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r15), %ebx
	addl	%eax, %ebx
	andl	$31, %ebx
	addl	%ebx, %eax
	movl	%eax, (%r9,%rcx,4)
	leal	(%rbx,%rbx), %r8d
	movl	%r8d, 4(%r9,%rcx,4)
	addq	$2, %rcx
	addq	$4, %r15
	movslq	(%r12), %rdx
	decq	%rdx
	movl	%ebx, %eax
	cmpq	%rdx, %rcx
	jl	LBB0_8
	jmp	LBB0_9
LBB0_6:
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movq	%r14, %r13
	movq	%rdx, %r14
LBB0_9:
	movl	%r8d, (%r9,%rcx,4)
	cmpl	$2, 4(%r12)
	jl	LBB0_15
## %bb.10:
	movslq	(%r12), %rcx
	leaq	(%r9,%rcx,4), %r10
	movl	$1, %r8d
	jmp	LBB0_11
	.p2align	4, 0x90
LBB0_14:                                ##   in Loop: Header=BB0_11 Depth=1
	movl	%ebx, %eax
	movl	%r11d, (%r10,%rax,4)
	movslq	(%r12), %rax
	movq	%r10, %r9
	leaq	(%r10,%rax,4), %r10
	incl	%r8d
	cmpl	4(%r12), %r8d
	jge	LBB0_15
LBB0_11:                                ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_13 Depth 2
	movl	(%r9), %edx
	shrl	%edx
	addl	(%r15), %edx
	andl	$31, %edx
	leal	(%rdx,%rdx), %r11d
	movl	%r11d, (%r10)
	addq	$4, %r15
	movl	$1, %ebx
	cmpl	$3, (%r12)
	jl	LBB0_14
## %bb.12:                              ##   in Loop: Header=BB0_11 Depth=1
	movl	$1, %ebx
	.p2align	4, 0x90
LBB0_13:                                ##   Parent Loop BB0_11 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movl	4(%r9,%rbx,4), %eax
	shrl	%eax
	addl	(%r15), %eax
	andl	$31, %eax
	addl	%eax, %edx
	movl	%edx, (%r10,%rbx,4)
	leal	(%rax,%rax), %r11d
	movl	%r11d, 4(%r10,%rbx,4)
	addq	$2, %rbx
	addq	$4, %r15
	movslq	(%r12), %rcx
	decq	%rcx
	movl	%eax, %edx
	cmpq	%rcx, %rbx
	jl	LBB0_13
	jmp	LBB0_14
LBB0_15:
	testl	%esi, %esi
	je	LBB0_24
## %bb.16:
	addl	$8, %esi
	movl	(%r13), %edx
	callq	_bytestream2_seek
	movq	(%r14), %rsi
	movl	8(%r14), %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%eax, %edx
	sarl	%edx
	movq	%r14, %rdi
	callq	_xan_unpack
	testl	%eax, %eax
	js	LBB0_24
## %bb.17:
	movl	8(%r14), %ecx
	movl	%ecx, %esi
	shrl	$31, %esi
	addl	%ecx, %esi
	sarl	%esi
	decl	%esi
	movl	%eax, %edi
	callq	_FFMIN
	testl	%eax, %eax
	jle	LBB0_24
## %bb.18:
	movq	(%r14), %rdx
	movq	16(%r14), %rcx
	movl	%eax, %esi
	cmpl	$1, %eax
	jne	LBB0_20
## %bb.19:
	xorl	%eax, %eax
	jmp	LBB0_22
LBB0_20:
	movl	%esi, %edi
	andl	$-2, %edi
	xorl	%eax, %eax
	.p2align	4, 0x90
LBB0_21:                                ## =>This Inner Loop Header: Depth=1
	movl	(%rdx,%rax,4), %ebx
	addl	%ebx, %ebx
	addl	4(%rcx,%rax,8), %ebx
	andl	$63, %ebx
	movl	%ebx, 4(%rcx,%rax,8)
	movl	4(%rdx,%rax,4), %ebx
	addl	%ebx, %ebx
	addl	12(%rcx,%rax,8), %ebx
	andl	$63, %ebx
	movl	%ebx, 12(%rcx,%rax,8)
	addq	$2, %rax
	cmpq	%rax, %rdi
	jne	LBB0_21
LBB0_22:
	testb	$1, %sil
	je	LBB0_24
## %bb.23:
	movl	(%rdx,%rax,4), %edx
	addl	%edx, %edx
	addl	4(%rcx,%rax,8), %edx
	andl	$63, %edx
	movl	%edx, 4(%rcx,%rax,8)
LBB0_24:
	movl	4(%r12), %edi
	testl	%edi, %edi
	jle	LBB0_31
## %bb.25:
	movq	16(%r14), %rax
	movq	24(%r14), %rcx
	movq	(%rcx), %rdx
	movq	8(%rcx), %r8
	movq	(%rdx), %rdx
	movl	(%r12), %ebx
	xorl	%esi, %esi
	jmp	LBB0_26
	.p2align	4, 0x90
LBB0_30:                                ##   in Loop: Header=BB0_26 Depth=1
	movslq	%ebx, %rcx
	leaq	(%rax,%rcx,4), %rax
	movslq	(%r8), %rcx
	leaq	(%rdx,%rcx,4), %rdx
	incl	%esi
	cmpl	%edi, %esi
	jge	LBB0_31
LBB0_26:                                ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_28 Depth 2
	testl	%ebx, %ebx
	jle	LBB0_30
## %bb.27:                              ##   in Loop: Header=BB0_26 Depth=1
	xorl	%edi, %edi
	.p2align	4, 0x90
LBB0_28:                                ##   Parent Loop BB0_26 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movl	(%rax,%rdi,4), %ebx
	leal	(,%rbx,4), %ecx
	sarl	$3, %ebx
	orl	%ecx, %ebx
	movl	%ebx, (%rdx,%rdi,4)
	incq	%rdi
	movslq	(%r12), %rbx
	cmpq	%rbx, %rdi
	jl	LBB0_28
## %bb.29:                              ##   in Loop: Header=BB0_26 Depth=1
	movl	4(%r12), %edi
	jmp	LBB0_30
LBB0_31:
	xorl	%r13d, %r13d
LBB0_32:
	movl	%r13d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_AV_LOG_WARNING,4,2             ## @AV_LOG_WARNING
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Ignoring invalid correction block position\n"

	.comm	_SEEK_SET,4,2                   ## @SEEK_SET
	.comm	_AV_LOG_ERROR,4,2               ## @AV_LOG_ERROR
L_.str.1:                               ## @.str.1
	.asciz	"Luma decoding failed\n"

	.no_dead_strip	_xan_decode_frame_type0
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function xan_decode_frame_type0
_xan_decode_frame_type0:                ; @xan_decode_frame_type0
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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	x19, x0
	ldr	x20, [x0, #8]
	mov	x21, x20
	ldr	x22, [x21], #32
	mov	x0, x21
	bl	_bytestream2_get_le32
	mov	x24, x0
	mov	x0, x21
	bl	_bytestream2_get_le32
	mov	x23, x0
	mov	x0, x19
	mov	x1, x24
	bl	_xan_decode_chroma
	mov	x24, x0
	cbnz	w0, LBB0_31
; %bb.1:
	mov	x0, x21
	bl	_bytestream2_size
	cmp	w23, w0
	b.lo	LBB0_3
; %bb.2:
Lloh0:
	adrp	x8, _AV_LOG_WARNING@GOTPAGE
Lloh1:
	ldr	x8, [x8, _AV_LOG_WARNING@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
Lloh3:
	adrp	x2, l_.str@PAGE
Lloh4:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, x19
	bl	_av_log
	mov	w23, #0
LBB0_3:
Lloh5:
	adrp	x25, _SEEK_SET@GOTPAGE
Lloh6:
	ldr	x25, [x25, _SEEK_SET@GOTPAGEOFF]
	ldr	w2, [x25]
	mov	x0, x21
	mov	w1, #12
	bl	_bytestream2_seek
	ldr	w8, [x20, #8]
	asr	w2, w8, #1
	mov	x0, x20
	mov	x1, x22
	bl	_xan_unpack_luma
	cbz	w0, LBB0_5
; %bb.4:
	mov	x24, x0
Lloh7:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh8:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh9:
	ldr	w1, [x8]
Lloh10:
	adrp	x2, l_.str.1@PAGE
Lloh11:
	add	x2, x2, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_av_log
	b	LBB0_31
LBB0_5:
	ldr	x8, [x20, #16]
	ldr	w11, [x22], #4
	lsl	w9, w11, #1
	str	w9, [x8]
	ldr	w10, [x19]
	cmp	w10, #2
	b.le	LBB0_9
; %bb.6:
	mov	x10, #0
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w9, [x22], #4
	add	w9, w9, w11
	and	w13, w9, #0x1f
	add	w11, w13, w11
	add	x12, x8, x10, lsl #2
	lsl	w9, w13, #1
	stp	w11, w9, [x12, #4]
	ldrsw	x11, [x19]
	sub	x14, x11, #1
	add	x12, x10, #2
	add	x15, x10, #3
	mov	x10, x12
	mov	x11, x13
	cmp	x15, x14
	b.lt	LBB0_7
; %bb.8:
	add	x10, x12, #1
	b	LBB0_10
LBB0_9:
	mov	w10, #1
LBB0_10:
	str	w9, [x8, x10, lsl #2]
	ldr	w9, [x19, #4]
	cmp	w9, #2
	b.lt	LBB0_18
; %bb.11:
	ldrsw	x9, [x19]
	add	x9, x8, x9, lsl #2
	mov	w10, #1
	b	LBB0_14
LBB0_12:                                ;   in Loop: Header=BB0_14 Depth=1
	mov	w8, #1
LBB0_13:                                ;   in Loop: Header=BB0_14 Depth=1
	str	w11, [x9, w8, uxtw #2]
	ldp	w11, w12, [x19]
                                        ; kill: def $w11 killed $w11 def $x11
	sxtw	x11, w11
	mov	x8, x9
	add	x9, x9, x11, lsl #2
	add	w10, w10, #1
	cmp	w10, w12
	b.ge	LBB0_18
LBB0_14:                                ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_16 Depth 2
	ldr	w11, [x8]
	ldr	w12, [x22], #4
	add	w11, w12, w11, lsr #1
	and	w13, w11, #0x1f
	lsl	w11, w13, #1
	str	w11, [x9]
	ldr	w12, [x19]
	cmp	w12, #3
	b.lt	LBB0_12
; %bb.15:                               ;   in Loop: Header=BB0_14 Depth=1
	mov	x12, #0
	add	x8, x8, #8
LBB0_16:                                ;   Parent Loop BB0_14 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	lsl	x11, x12, #2
	ldr	w14, [x8, x11]
	ldr	w15, [x22], #4
	add	w14, w15, w14, lsr #1
	and	w15, w14, #0x1f
	add	w13, w15, w13
	add	x14, x9, x11
	lsl	w11, w15, #1
	stp	w13, w11, [x14, #4]
	ldrsw	x13, [x19]
	sub	x16, x13, #1
	add	x14, x12, #2
	add	x17, x12, #3
	mov	x12, x14
	mov	x13, x15
	cmp	x17, x16
	b.lt	LBB0_16
; %bb.17:                               ;   in Loop: Header=BB0_14 Depth=1
	add	x8, x14, #1
	b	LBB0_13
LBB0_18:
	cbz	w23, LBB0_23
; %bb.19:
	add	w1, w23, #8
	ldr	w2, [x25]
	mov	x0, x21
	bl	_bytestream2_seek
	ldr	x1, [x20]
	ldr	w8, [x20, #8]
	cmp	w8, #0
	cinc	w8, w8, lt
	asr	w2, w8, #1
	mov	x0, x20
	bl	_xan_unpack
	tbnz	w0, #31, LBB0_23
; %bb.20:
	ldr	w8, [x20, #8]
	cmp	w8, #0
	cinc	w8, w8, lt
	asr	w8, w8, #1
	sub	w1, w8, #1
	bl	_FFMIN
	cmp	w0, #1
	b.lt	LBB0_23
; %bb.21:
	ldr	x10, [x20, #16]
	ldr	x8, [x20]
	mov	w9, w0
	add	x10, x10, #4
LBB0_22:                                ; =>This Inner Loop Header: Depth=1
	ldr	w11, [x8], #4
	ldr	w12, [x10]
	add	w11, w12, w11, lsl #1
	and	w11, w11, #0x3f
	str	w11, [x10], #8
	subs	x9, x9, #1
	b.ne	LBB0_22
LBB0_23:
	ldr	w12, [x19, #4]
	cmp	w12, #1
	b.lt	LBB0_30
; %bb.24:
	mov	w8, #0
	ldp	x9, x10, [x20, #16]
	ldp	x11, x10, [x10]
	ldr	x11, [x11]
	ldr	w13, [x19]
	b	LBB0_26
LBB0_25:                                ;   in Loop: Header=BB0_26 Depth=1
	add	x9, x9, w13, sxtw #2
	ldrsw	x14, [x10]
	add	x11, x11, x14, lsl #2
	add	w8, w8, #1
	cmp	w8, w12
	b.ge	LBB0_30
LBB0_26:                                ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_28 Depth 2
	cmp	w13, #1
	b.lt	LBB0_25
; %bb.27:                               ;   in Loop: Header=BB0_26 Depth=1
	mov	x12, #0
LBB0_28:                                ;   Parent Loop BB0_26 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	lsl	x13, x12, #2
	ldr	w14, [x9, x13]
	lsl	w15, w14, #2
	orr	w14, w15, w14, asr #3
	str	w14, [x11, x13]
	add	x12, x12, #1
	ldrsw	x13, [x19]
	cmp	x12, x13
	b.lt	LBB0_28
; %bb.29:                               ;   in Loop: Header=BB0_26 Depth=1
	ldr	w12, [x19, #4]
	b	LBB0_25
LBB0_30:
	mov	w24, #0
LBB0_31:
	mov	x0, x24
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_AV_LOG_WARNING,4,2             ; @AV_LOG_WARNING
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Ignoring invalid correction block position\n"

	.comm	_SEEK_SET,4,2                   ; @SEEK_SET
	.comm	_AV_LOG_ERROR,4,2               ; @AV_LOG_ERROR
l_.str.1:                               ; @.str.1
	.asciz	"Luma decoding failed\n"

	.no_dead_strip	_xan_decode_frame_type0
.subsections_via_symbols
