	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function xan_decode_frame_type1
_xan_decode_frame_type1:                ## @xan_decode_frame_type1
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	movq	8(%rdi), %r14
	movq	(%r14), %rbx
	leaq	32(%r14), %r13
	movq	%r13, %rdi
	callq	_bytestream2_get_le32
	movq	%r15, %rdi
	movl	%eax, %esi
	callq	_xan_decode_chroma
	movl	%eax, %r12d
	testl	%eax, %eax
	jne	LBB0_18
## %bb.1:
	movq	_SEEK_SET@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r13, %rdi
	movl	$16, %esi
	callq	_bytestream2_seek
	movl	8(%r14), %edx
	sarl	%edx
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	_xan_unpack_luma
	testl	%eax, %eax
	je	LBB0_3
## %bb.2:
	movl	%eax, %r12d
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdx
	movq	%r15, %rdi
	callq	_av_log
	jmp	LBB0_18
LBB0_3:
	cmpl	$0, (%r15)
	jle	LBB0_17
## %bb.4:
	movq	16(%r14), %r9
	xorl	%r8d, %r8d
	movq	%r9, %rdx
	jmp	LBB0_5
	.p2align	4, 0x90
LBB0_6:                                 ##   in Loop: Header=BB0_5 Depth=1
	movl	%ecx, %edi
LBB0_9:                                 ##   in Loop: Header=BB0_5 Depth=1
	movl	%esi, %eax
	movl	%edi, (%rdx,%rax,4)
	movslq	4(%r15), %rsi
	leaq	(%rdx,%rsi,4), %rdx
	incl	%r8d
	movl	(%r15), %edi
	cmpl	%edi, %r8d
	jge	LBB0_10
LBB0_5:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_8 Depth 2
	movl	(%rbx), %ecx
	addl	%ecx, %ecx
	addl	(%rdx), %ecx
	andl	$63, %ecx
	movl	%ecx, (%rdx)
	addq	$4, %rbx
	movl	$1, %esi
	cmpl	$3, 4(%r15)
	jl	LBB0_6
## %bb.7:                               ##   in Loop: Header=BB0_5 Depth=1
	movl	$1, %esi
	.p2align	4, 0x90
LBB0_8:                                 ##   Parent Loop BB0_5 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movl	(%rbx), %edi
	addl	%edi, %edi
	addl	4(%rdx,%rsi,4), %edi
	andl	$63, %edi
	addl	%edi, %ecx
	shrl	%ecx
	movl	%ecx, (%rdx,%rsi,4)
	movl	%edi, 4(%rdx,%rsi,4)
	addq	$2, %rsi
	addq	$4, %rbx
	movslq	4(%r15), %rax
	decq	%rax
	movl	%edi, %ecx
	cmpq	%rax, %rsi
	jl	LBB0_8
	jmp	LBB0_9
LBB0_10:
	testl	%edi, %edi
	jle	LBB0_17
## %bb.11:
	movq	24(%r14), %rax
	movq	(%rax), %rdx
	movq	8(%rax), %rcx
	movq	(%rdx), %rdx
	xorl	%ebx, %ebx
	jmp	LBB0_12
	.p2align	4, 0x90
LBB0_16:                                ##   in Loop: Header=BB0_12 Depth=1
	movslq	%esi, %rax
	leaq	(%r9,%rax,4), %r9
	movslq	(%rcx), %rax
	leaq	(%rdx,%rax,4), %rdx
	incl	%ebx
	cmpl	%edi, %ebx
	jge	LBB0_17
LBB0_12:                                ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_14 Depth 2
	testl	%esi, %esi
	jle	LBB0_16
## %bb.13:                              ##   in Loop: Header=BB0_12 Depth=1
	xorl	%edi, %edi
	.p2align	4, 0x90
LBB0_14:                                ##   Parent Loop BB0_12 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movl	(%r9,%rdi,4), %eax
	leal	(,%rax,4), %esi
	sarl	$3, %eax
	orl	%esi, %eax
	movl	%eax, (%rdx,%rdi,4)
	incq	%rdi
	movslq	4(%r15), %rsi
	cmpq	%rsi, %rdi
	jl	LBB0_14
## %bb.15:                              ##   in Loop: Header=BB0_12 Depth=1
	movl	(%r15), %edi
	jmp	LBB0_16
LBB0_17:
	xorl	%r12d, %r12d
LBB0_18:
	movl	%r12d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SEEK_SET,4,2                   ## @SEEK_SET
	.comm	_AV_LOG_ERROR,4,2               ## @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Luma decoding failed\n"

	.no_dead_strip	_xan_decode_frame_type1
.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_type1
_xan_decode_frame_type1:                ; @xan_decode_frame_type1
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x19, x0
	ldr	x20, [x0, #8]
	mov	x23, x20
	ldr	x21, [x23], #32
	mov	x0, x23
	bl	_bytestream2_get_le32
	mov	x1, x0
	mov	x0, x19
	bl	_xan_decode_chroma
	mov	x22, x0
	cbnz	w0, LBB0_19
; %bb.1:
Lloh0:
	adrp	x8, _SEEK_SET@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SEEK_SET@GOTPAGEOFF]
Lloh2:
	ldr	w2, [x8]
	mov	x0, x23
	mov	w1, #16
	bl	_bytestream2_seek
	ldr	w8, [x20, #8]
	asr	w2, w8, #1
	mov	x0, x20
	mov	x1, x21
	bl	_xan_unpack_luma
	cbz	w0, LBB0_3
; %bb.2:
	mov	x22, x0
Lloh3:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh4:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
Lloh6:
	adrp	x2, l_.str@PAGE
Lloh7:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, x19
	bl	_av_log
	b	LBB0_19
LBB0_3:
	ldr	w8, [x19]
	cmp	w8, #1
	b.lt	LBB0_18
; %bb.4:
	mov	w9, #0
	ldr	x8, [x20, #16]
	mov	x10, x8
	b	LBB0_7
LBB0_5:                                 ;   in Loop: Header=BB0_7 Depth=1
	mov	w12, #1
LBB0_6:                                 ;   in Loop: Header=BB0_7 Depth=1
	str	w11, [x10, w12, uxtw #2]
	ldp	w12, w13, [x19]
                                        ; kill: def $w13 killed $w13 def $x13
	sxtw	x13, w13
	add	x10, x10, x13, lsl #2
	add	w9, w9, #1
	cmp	w9, w12
	b.ge	LBB0_11
LBB0_7:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_9 Depth 2
	ldr	w11, [x21], #4
	ldr	w12, [x10]
	add	w11, w12, w11, lsl #1
	and	w11, w11, #0x3f
	str	w11, [x10]
	ldr	w12, [x19, #4]
	cmp	w12, #3
	b.lt	LBB0_5
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=1
	mov	x12, #0
LBB0_9:                                 ;   Parent Loop BB0_7 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	mov	x13, x11
	add	x14, x10, x12, lsl #2
	ldr	w11, [x14, #8]
	ldr	w15, [x21], #4
	add	w11, w11, w15, lsl #1
	and	w11, w11, #0x3f
	add	w13, w11, w13
	lsr	w13, w13, #1
	stp	w13, w11, [x14, #4]
	ldrsw	x13, [x19, #4]
	sub	x14, x13, #1
	add	x13, x12, #2
	add	x15, x12, #3
	mov	x12, x13
	cmp	x15, x14
	b.lt	LBB0_9
; %bb.10:                               ;   in Loop: Header=BB0_7 Depth=1
	add	x12, x13, #1
	b	LBB0_6
LBB0_11:
	cmp	w12, #1
	b.lt	LBB0_18
; %bb.12:
	mov	w9, #0
	ldr	x10, [x20, #24]
	ldp	x11, x10, [x10]
	ldr	x11, [x11]
                                        ; kill: def $w13 killed $w13 killed $x13 def $x13
	b	LBB0_14
LBB0_13:                                ;   in Loop: Header=BB0_14 Depth=1
	add	x8, x8, w13, sxtw #2
	ldrsw	x14, [x10]
	add	x11, x11, x14, lsl #2
	add	w9, w9, #1
	cmp	w9, w12
	b.ge	LBB0_18
LBB0_14:                                ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_16 Depth 2
	cmp	w13, #1
	b.lt	LBB0_13
; %bb.15:                               ;   in Loop: Header=BB0_14 Depth=1
	mov	x12, #0
LBB0_16:                                ;   Parent Loop BB0_14 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	lsl	x13, x12, #2
	ldr	w14, [x8, x13]
	lsl	w15, w14, #2
	orr	w14, w15, w14, asr #3
	str	w14, [x11, x13]
	add	x12, x12, #1
	ldrsw	x13, [x19, #4]
	cmp	x12, x13
	b.lt	LBB0_16
; %bb.17:                               ;   in Loop: Header=BB0_14 Depth=1
	ldr	w12, [x19]
	b	LBB0_13
LBB0_18:
	mov	w22, #0
LBB0_19:
	mov	x0, x22
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_SEEK_SET,4,2                   ; @SEEK_SET
	.comm	_AV_LOG_ERROR,4,2               ; @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Luma decoding failed\n"

	.no_dead_strip	_xan_decode_frame_type1
.subsections_via_symbols
