	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cdxl_decode_frame
_cdxl_decode_frame:                     ## @cdxl_decode_frame
	.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
	movl	(%rcx), %ebx
	cmpl	$31, %ebx
	jle	LBB0_15
## %bb.1:
	movq	%rdi, %r13
	movq	%rsi, -48(%rbp)                 ## 8-byte Spill
	movq	%rdx, -72(%rbp)                 ## 8-byte Spill
	movq	16(%rdi), %r12
	movq	8(%rcx), %r15
	movl	4(%r15), %r14d
	movl	%r14d, %eax
	andl	$224, %eax
	movl	%eax, (%r12)
	leaq	56(%r15), %rdi
	callq	_AV_RB16
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	leaq	64(%r15), %rdi
	callq	_AV_RB16
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movl	76(%r15), %eax
	movl	%eax, 4(%r12)
	leaq	80(%r15), %rdi
	callq	_AV_RB16
	movl	%eax, 8(%r12)
	leaq	128(%r15), %rcx
	movq	%rcx, 16(%r12)
	movslq	%eax, %rcx
	leaq	(%r15,%rcx,4), %rdx
	addq	$128, %rdx
	movq	%rdx, 24(%r12)
	movl	%ebx, %edx
	subl	%ecx, %edx
	addl	$-32, %edx
	movl	%edx, 32(%r12)
	cmpl	$513, %ecx                      ## imm = 0x201
	jge	LBB0_15
## %bb.2:
	addl	$32, %eax
	cmpl	%eax, %ebx
	jl	LBB0_15
## %bb.3:
	cmpl	$0, 4(%r12)
	jle	LBB0_15
## %bb.4:
	movl	(%r12), %edx
	movq	_BIT_PLANAR@GOTPCREL(%rip), %rax
	movq	_CHUNKY@GOTPCREL(%rip), %r15
	cmpl	(%rax), %edx
	je	LBB0_9
## %bb.5:
	movq	_BIT_LINE@GOTPCREL(%rip), %rax
	cmpl	(%rax), %edx
	je	LBB0_9
## %bb.6:
	cmpl	(%r15), %edx
	je	LBB0_9
## %bb.7:
	leaq	L_.str(%rip), %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	callq	_avpriv_request_sample
LBB0_8:
	movq	_AVERROR_PATCHWELCOME@GOTPCREL(%rip), %rax
	jmp	LBB0_16
LBB0_9:
	movq	%r13, %rdi
	movq	-64(%rbp), %rsi                 ## 8-byte Reload
                                        ## kill: def $esi killed $esi killed $rsi
	movq	-56(%rbp), %rdx                 ## 8-byte Reload
                                        ## kill: def $edx killed $edx killed $rdx
	callq	_ff_set_dimensions
	testl	%eax, %eax
	js	LBB0_12
## %bb.10:
	movl	(%r12), %eax
	cmpl	(%r15), %eax
	jne	LBB0_13
## %bb.11:
	movl	(%r13), %eax
	jmp	LBB0_14
LBB0_13:
	movq	48(%r12), %rax
	movq	(%rax), %rdi
	movl	$16, %esi
	callq	_FFALIGN
LBB0_14:
	cltq
	movq	48(%r12), %rcx
	movq	%rax, %rdx
	subq	(%rcx), %rdx
	movq	%rdx, 56(%r12)
	movl	4(%r12), %ecx
	imull	4(%r13), %eax
	imull	%ecx, %eax
	leal	7(%rax), %edx
	testl	%eax, %eax
	cmovnsl	%eax, %edx
	sarl	$3, %edx
	cmpl	%edx, 32(%r12)
	jge	LBB0_18
LBB0_15:
	movq	_AVERROR_INVALIDDATA@GOTPCREL(%rip), %rax
LBB0_16:
	movl	(%rax), %ebx
LBB0_17:
	movl	%ebx, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_18:
	andl	$7, %r14d
	je	LBB0_25
## %bb.19:
	cmpl	$1, %r14d
	jne	LBB0_38
## %bb.20:
	cmpl	$8, %ecx
	je	LBB0_22
## %bb.21:
	cmpl	$6, %ecx
	jne	LBB0_38
LBB0_22:
	movl	(%r12), %eax
	cmpl	(%r15), %eax
	je	LBB0_38
## %bb.23:
	decb	%cl
	movl	$1, %eax
                                        ## kill: def $cl killed $cl killed $ecx
	shll	%cl, %eax
	cmpl	%eax, 8(%r12)
	jne	LBB0_15
## %bb.24:
	movq	_AV_PIX_FMT_BGR24@GOTPCREL(%rip), %rax
	jmp	LBB0_33
LBB0_25:
	movl	8(%r12), %eax
	testl	%eax, %eax
	je	LBB0_29
## %bb.26:
	cmpl	$8, %ecx
	jg	LBB0_29
## %bb.27:
	movl	(%r12), %eax
	cmpl	(%r15), %eax
	je	LBB0_38
## %bb.28:
	movq	_AV_PIX_FMT_PAL8@GOTPCREL(%rip), %rax
	jmp	LBB0_33
LBB0_29:
	cmpl	$24, %ecx
	jne	LBB0_38
## %bb.30:
	movl	(%r12), %edx
	cmpl	(%r15), %edx
	jne	LBB0_38
## %bb.31:
	testl	%eax, %eax
	jne	LBB0_38
## %bb.32:
	movq	_AV_PIX_FMT_RGB24@GOTPCREL(%rip), %rax
LBB0_33:
	movq	(%rax), %rax
	movq	%rax, 8(%r13)
	movq	%r13, %rdi
	movq	-48(%rbp), %r15                 ## 8-byte Reload
	movq	%r15, %rsi
	xorl	%edx, %edx
	callq	_ff_get_buffer
	testl	%eax, %eax
	js	LBB0_12
## %bb.34:
	movq	_AV_PICTURE_TYPE_I@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%r15)
	testl	%r14d, %r14d
	je	LBB0_40
## %bb.35:
	leaq	36(%r12), %rdi
	leaq	40(%r12), %rsi
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	imull	-56(%rbp), %eax                 ## 4-byte Folded Reload
	movslq	%eax, %rdx
	movq	_AV_INPUT_BUFFER_PADDING_SIZE@GOTPCREL(%rip), %rax
	addq	(%rax), %rdx
	callq	_av_fast_padded_malloc
	cmpl	$0, 36(%r12)
	je	LBB0_42
## %bb.36:
	cmpl	$8, 4(%r12)
	jne	LBB0_43
## %bb.37:
	movq	%r12, %rdi
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
	callq	_cdxl_decode_ham8
	jmp	LBB0_45
LBB0_12:
	movl	%eax, %ebx
	jmp	LBB0_17
LBB0_38:
	movl	(%r12), %r8d
	leaq	L_.str.1(%rip), %rsi
	movq	%r13, %rdi
	movl	%r14d, %edx
	xorl	%eax, %eax
	callq	_avpriv_request_sample
	jmp	LBB0_8
LBB0_40:
	movq	8(%r13), %rax
	movq	_AV_PIX_FMT_PAL8@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_44
## %bb.41:
	movq	%r12, %rdi
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
	callq	_cdxl_decode_rgb
	jmp	LBB0_45
LBB0_42:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_AVERROR                        ## TAILCALL
LBB0_43:
	movq	%r12, %rdi
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
	callq	_cdxl_decode_ham6
	jmp	LBB0_45
LBB0_44:
	movq	%r12, %rdi
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
	callq	_cdxl_decode_raw
LBB0_45:
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	movl	$1, (%rax)
	jmp	LBB0_17
	.cfi_endproc
                                        ## -- End function
	.comm	_AVERROR_INVALIDDATA,4,2        ## @AVERROR_INVALIDDATA
	.comm	_BIT_PLANAR,4,2                 ## @BIT_PLANAR
	.comm	_BIT_LINE,4,2                   ## @BIT_LINE
	.comm	_CHUNKY,4,2                     ## @CHUNKY
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Pixel format 0x%0x"

	.comm	_AVERROR_PATCHWELCOME,4,2       ## @AVERROR_PATCHWELCOME
	.comm	_AV_PIX_FMT_PAL8,8,3            ## @AV_PIX_FMT_PAL8
	.comm	_AV_PIX_FMT_BGR24,8,3           ## @AV_PIX_FMT_BGR24
	.comm	_AV_PIX_FMT_RGB24,8,3           ## @AV_PIX_FMT_RGB24
L_.str.1:                               ## @.str.1
	.asciz	"Encoding %d, bpp %d and format 0x%x"

	.comm	_AV_PICTURE_TYPE_I,4,2          ## @AV_PICTURE_TYPE_I
	.comm	_AV_INPUT_BUFFER_PADDING_SIZE,8,3 ## @AV_INPUT_BUFFER_PADDING_SIZE
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.no_dead_strip	_cdxl_decode_frame
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function cdxl_decode_frame
_cdxl_decode_frame:                     ; @cdxl_decode_frame
	.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	w19, [x3]
	cmp	w19, #31
	b.le	LBB0_12
; %bb.1:
	mov	x20, x2
	mov	x21, x1
	mov	x23, x0
	ldr	x22, [x0, #16]
	ldr	x27, [x3, #8]
	ldr	w26, [x27, #4]
	and	w8, w26, #0xe0
	str	w8, [x22]
	add	x0, x27, #56
	bl	_AV_RB16
	mov	x24, x0
	add	x0, x27, #64
	bl	_AV_RB16
	mov	x25, x0
	ldr	w8, [x27, #76]
	str	w8, [x22, #4]
	add	x0, x27, #80
	bl	_AV_RB16
	str	w0, [x22, #8]
	add	x8, x27, #128
	lsl	x9, x0, #32
	add	x9, x8, x9, asr #30
	stp	x8, x9, [x22, #16]
	sub	w8, w19, w0
	sub	w8, w8, #32
	str	w8, [x22, #32]
	cmp	w0, #513
	b.ge	LBB0_12
; %bb.2:
	add	w8, w0, #32
	cmp	w19, w8
	b.lt	LBB0_12
; %bb.3:
	ldr	w8, [x22, #4]
	cmp	w8, #0
	b.le	LBB0_12
; %bb.4:
	ldr	w2, [x22]
Lloh0:
	adrp	x8, _BIT_PLANAR@GOTPAGE
Lloh1:
	ldr	x8, [x8, _BIT_PLANAR@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
Lloh3:
	adrp	x9, _BIT_LINE@GOTPAGE
Lloh4:
	ldr	x9, [x9, _BIT_LINE@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
Lloh6:
	adrp	x27, _CHUNKY@GOTPAGE
Lloh7:
	ldr	x27, [x27, _CHUNKY@GOTPAGEOFF]
	ldr	w10, [x27]
	cmp	w2, w8
	ccmp	w2, w9, #4, ne
	ccmp	w2, w10, #4, ne
	b.ne	LBB0_8
; %bb.5:
	mov	x0, x23
	mov	x1, x24
	mov	x2, x25
	bl	_ff_set_dimensions
	tbnz	w0, #31, LBB0_35
; %bb.6:
	ldr	w8, [x22]
	ldr	w9, [x27]
	cmp	w8, w9
	b.ne	LBB0_10
; %bb.7:
	ldr	w0, [x23]
	b	LBB0_11
LBB0_8:
Lloh8:
	adrp	x1, l_.str@PAGE
Lloh9:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x23
LBB0_9:
	bl	_avpriv_request_sample
Lloh10:
	adrp	x8, _AVERROR_PATCHWELCOME@GOTPAGE
Lloh11:
	ldr	x8, [x8, _AVERROR_PATCHWELCOME@GOTPAGEOFF]
	b	LBB0_13
LBB0_10:
	ldr	x8, [x22, #48]
	ldr	x0, [x8]
	mov	w1, #16
	bl	_FFALIGN
                                        ; kill: def $w0 killed $w0 def $x0
LBB0_11:
	sxtw	x8, w0
	ldr	x9, [x22, #48]
	ldr	x9, [x9]
	sub	x8, x8, x9
	str	x8, [x22, #56]
	ldr	w9, [x22, #32]
	ldr	w8, [x23, #4]
	mul	w10, w8, w0
	ldr	w8, [x22, #4]
	mul	w10, w10, w8
	add	w11, w10, #7
	cmp	w10, #0
	csel	w10, w11, w10, lt
	cmp	w9, w10, asr #3
	b.ge	LBB0_15
LBB0_12:
Lloh12:
	adrp	x8, _AVERROR_INVALIDDATA@GOTPAGE
Lloh13:
	ldr	x8, [x8, _AVERROR_INVALIDDATA@GOTPAGEOFF]
LBB0_13:
	ldr	w19, [x8]
LBB0_14:
	mov	x0, x19
	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
LBB0_15:
	and	w26, w26, #0x7
	cbz	w26, LBB0_22
; %bb.16:
	cmp	w26, #1
	b.ne	LBB0_36
; %bb.17:
	cmp	w8, #8
	b.eq	LBB0_19
; %bb.18:
	cmp	w8, #6
	b.ne	LBB0_36
LBB0_19:
	ldr	w9, [x22]
	ldr	w10, [x27]
	cmp	w9, w10
	b.eq	LBB0_36
; %bb.20:
	ldr	w9, [x22, #8]
	sub	w8, w8, #1
	mov	w10, #1
	lsl	w8, w10, w8
	cmp	w9, w8
	b.ne	LBB0_12
; %bb.21:
Lloh14:
	adrp	x8, _AV_PIX_FMT_BGR24@GOTPAGE
Lloh15:
	ldr	x8, [x8, _AV_PIX_FMT_BGR24@GOTPAGEOFF]
	b	LBB0_30
LBB0_22:
	ldr	w9, [x22, #8]
	cbz	w9, LBB0_26
; %bb.23:
	cmp	w8, #8
	b.gt	LBB0_26
; %bb.24:
	ldr	w9, [x22]
	ldr	w10, [x27]
	cmp	w9, w10
	b.eq	LBB0_36
; %bb.25:
Lloh16:
	adrp	x8, _AV_PIX_FMT_PAL8@GOTPAGE
Lloh17:
	ldr	x8, [x8, _AV_PIX_FMT_PAL8@GOTPAGEOFF]
	b	LBB0_30
LBB0_26:
	cmp	w8, #24
	b.ne	LBB0_36
; %bb.27:
	ldr	w10, [x22]
	ldr	w11, [x27]
	cmp	w10, w11
	b.ne	LBB0_36
; %bb.28:
	cbnz	w9, LBB0_36
; %bb.29:
Lloh18:
	adrp	x8, _AV_PIX_FMT_RGB24@GOTPAGE
Lloh19:
	ldr	x8, [x8, _AV_PIX_FMT_RGB24@GOTPAGEOFF]
LBB0_30:
	ldr	x8, [x8]
	str	x8, [x23, #8]
	mov	x0, x23
	mov	x1, x21
	mov	w2, #0
	bl	_ff_get_buffer
	tbnz	w0, #31, LBB0_35
; %bb.31:
Lloh20:
	adrp	x8, _AV_PICTURE_TYPE_I@GOTPAGE
Lloh21:
	ldr	x8, [x8, _AV_PICTURE_TYPE_I@GOTPAGEOFF]
Lloh22:
	ldr	w8, [x8]
	str	w8, [x21]
	cbz	w26, LBB0_37
; %bb.32:
	add	x0, x22, #36
	add	x1, x22, #40
	mul	w8, w24, w25
Lloh23:
	adrp	x9, _AV_INPUT_BUFFER_PADDING_SIZE@GOTPAGE
Lloh24:
	ldr	x9, [x9, _AV_INPUT_BUFFER_PADDING_SIZE@GOTPAGEOFF]
Lloh25:
	ldr	x9, [x9]
	add	x2, x9, w8, sxtw
	bl	_av_fast_padded_malloc
	ldr	w8, [x22, #36]
	cbz	w8, LBB0_39
; %bb.33:
	ldr	w8, [x22, #4]
	mov	x0, x22
	mov	x1, x21
	cmp	w8, #8
	b.ne	LBB0_40
; %bb.34:
	bl	_cdxl_decode_ham8
	b	LBB0_42
LBB0_35:
	mov	x19, x0
	b	LBB0_14
LBB0_36:
	ldr	w9, [x22]
	stp	x8, x9, [sp]
Lloh26:
	adrp	x1, l_.str.1@PAGE
Lloh27:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x23
	mov	x2, x26
	b	LBB0_9
LBB0_37:
	ldr	x8, [x23, #8]
Lloh28:
	adrp	x9, _AV_PIX_FMT_PAL8@GOTPAGE
Lloh29:
	ldr	x9, [x9, _AV_PIX_FMT_PAL8@GOTPAGEOFF]
Lloh30:
	ldr	x9, [x9]
	mov	x0, x22
	mov	x1, x21
	cmp	x8, x9
	b.ne	LBB0_41
; %bb.38:
	bl	_cdxl_decode_rgb
	b	LBB0_42
LBB0_39:
Lloh31:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh32:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh33:
	ldr	w0, [x8]
	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
	b	_AVERROR
LBB0_40:
	bl	_cdxl_decode_ham6
	b	LBB0_42
LBB0_41:
	bl	_cdxl_decode_raw
LBB0_42:
	mov	w8, #1
	str	w8, [x20]
	b	LBB0_14
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpAdd	Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.cfi_endproc
                                        ; -- End function
	.comm	_AVERROR_INVALIDDATA,4,2        ; @AVERROR_INVALIDDATA
	.comm	_BIT_PLANAR,4,2                 ; @BIT_PLANAR
	.comm	_BIT_LINE,4,2                   ; @BIT_LINE
	.comm	_CHUNKY,4,2                     ; @CHUNKY
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Pixel format 0x%0x"

	.comm	_AVERROR_PATCHWELCOME,4,2       ; @AVERROR_PATCHWELCOME
	.comm	_AV_PIX_FMT_PAL8,8,3            ; @AV_PIX_FMT_PAL8
	.comm	_AV_PIX_FMT_BGR24,8,3           ; @AV_PIX_FMT_BGR24
	.comm	_AV_PIX_FMT_RGB24,8,3           ; @AV_PIX_FMT_RGB24
l_.str.1:                               ; @.str.1
	.asciz	"Encoding %d, bpp %d and format 0x%x"

	.comm	_AV_PICTURE_TYPE_I,4,2          ; @AV_PICTURE_TYPE_I
	.comm	_AV_INPUT_BUFFER_PADDING_SIZE,8,3 ; @AV_INPUT_BUFFER_PADDING_SIZE
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.no_dead_strip	_cdxl_decode_frame
.subsections_via_symbols
