	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function tdsc_decode_frame
_tdsc_decode_frame:                     ## @tdsc_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
	movq	%rcx, %r14
	movq	%rdx, %r13
	movq	%rsi, %r12
	movq	%rdi, %rbx
	movq	16(%rdi), %r15
	movl	(%rdi), %esi
	cmpl	%esi, (%r15)
	jne	LBB0_2
## %bb.1:
	movq	8(%rbx), %rax
	cmpq	%rax, 8(%r15)
	jne	LBB0_3
	jmp	LBB0_4
LBB0_2:
	movq	8(%rbx), %rax
LBB0_3:
	imull	%eax, %esi
	shll	$2, %esi
	movl	%esi, 16(%r15)
	leaq	28(%r15), %rdi
	callq	_av_reallocp
	testl	%eax, %eax
	js	LBB0_10
LBB0_4:
	movl	16(%r15), %eax
	movl	%eax, -52(%rbp)
	movl	28(%r15), %edi
	movl	(%r14), %ecx
	movl	4(%r14), %edx
	leaq	-52(%rbp), %rsi
	callq	_uncompress
	testl	%eax, %eax
	je	LBB0_6
## %bb.5:
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	leaq	L_.str(%rip), %rdx
	movq	%rbx, %rdi
	movl	%eax, %ecx
	xorl	%eax, %eax
	callq	_av_log
	movq	_AVERROR_UNKNOWN@GOTPCREL(%rip), %rax
	jmp	LBB0_9
LBB0_6:
	movq	%r13, -80(%rbp)                 ## 8-byte Spill
	leaq	24(%r15), %r13
	movl	28(%r15), %esi
	movl	-52(%rbp), %edx
	movq	%r13, %rdi
	callq	_bytestream2_init
	movq	%r13, %rdi
	callq	_bytestream2_get_bytes_left
	cmpl	$7, %eax
	jg	LBB0_11
## %bb.7:
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.1(%rip), %rdx
LBB0_8:
	movq	%rbx, %rdi
	xorl	%eax, %eax
	callq	_av_log
	movq	_AVERROR_INVALIDDATA@GOTPCREL(%rip), %rax
LBB0_9:
	movl	(%rax), %eax
LBB0_10:
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_11:
	movq	%r12, -64(%rbp)                 ## 8-byte Spill
	movq	%r13, %rdi
	callq	_bytestream2_get_le32
	movl	%eax, %r12d
	movl	$84, %edi
	movl	$68, %esi
	movl	$83, %edx
	movl	$70, %ecx
	callq	_MKTAG
	movl	%r12d, -48(%rbp)                ## 4-byte Spill
	cmpl	%eax, %r12d
	jne	LBB0_14
## %bb.12:
	movq	%r13, %rdi
	callq	_bytestream2_get_bytes_left
	movq	_TDSF_HEADER_SIZE@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	movq	-64(%rbp), %r12                 ## 8-byte Reload
	jge	LBB0_15
## %bb.13:
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.2(%rip), %rdx
	jmp	LBB0_8
LBB0_14:
	movl	$0, -44(%rbp)                   ## 4-byte Folded Spill
	movq	-64(%rbp), %r12                 ## 8-byte Reload
	jmp	LBB0_19
LBB0_15:
	movq	%r13, %rdi
	callq	_bytestream2_get_le32
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movq	%r13, %rdi
	movl	$4, %esi
	callq	_bytestream2_skip
	movq	%r13, %rdi
	callq	_bytestream2_get_le32
	movl	%eax, -68(%rbp)                 ## 4-byte Spill
	movq	%rbx, %rdi
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	callq	_tdsc_parse_tdsf
	testl	%eax, %eax
	js	LBB0_10
## %bb.16:
	movq	%r13, %rdi
	callq	_bytestream2_get_bytes_left
	cmpl	$8, %eax
	jl	LBB0_18
## %bb.17:
	movq	%r13, %rdi
	callq	_bytestream2_get_le32
	movl	%eax, -48(%rbp)                 ## 4-byte Spill
LBB0_18:
	xorl	%eax, %eax
	cmpl	$48, -68(%rbp)                  ## 4-byte Folded Reload
	sete	%al
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
LBB0_19:
	movl	$68, %edi
	movl	$84, %esi
	movl	$83, %edx
	movl	$77, %ecx
	callq	_MKTAG
	cmpl	%eax, -48(%rbp)                 ## 4-byte Folded Reload
	jne	LBB0_23
## %bb.20:
	movq	%r13, %rdi
	callq	_bytestream2_get_le32
	movl	%eax, -64(%rbp)                 ## 4-byte Spill
	movq	%r13, %rdi
	callq	_bytestream2_get_bytes_left
	cmpl	-64(%rbp), %eax                 ## 4-byte Folded Reload
	jge	LBB0_22
## %bb.21:
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.3(%rip), %rdx
	jmp	LBB0_8
LBB0_22:
	movq	%rbx, %rdi
	callq	_tdsc_parse_dtsm
	testl	%eax, %eax
	js	LBB0_10
LBB0_23:
	movq	%rbx, %rdi
	movq	%r12, %rsi
	xorl	%edx, %edx
	callq	_ff_get_buffer
	testl	%eax, %eax
	js	LBB0_10
## %bb.24:
	movl	20(%r15), %esi
	movq	%r12, %rdi
	callq	_av_frame_copy
	testl	%eax, %eax
	js	LBB0_10
## %bb.25:
	movq	8(%r12), %rax
	movq	16(%r12), %rcx
	movl	(%rcx), %esi
	movl	(%rax), %edx
	movq	%rbx, %rdi
	callq	_tdsc_paint_cursor
	cmpl	$0, -44(%rbp)                   ## 4-byte Folded Reload
	je	LBB0_27
## %bb.26:
	movq	_AV_PICTURE_TYPE_I@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 4(%r12)
	movl	$1, (%r12)
	jmp	LBB0_28
LBB0_27:
	movq	_AV_PICTURE_TYPE_P@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 4(%r12)
LBB0_28:
	movq	-80(%rbp), %rax                 ## 8-byte Reload
	movl	$1, (%rax)
	movl	(%r14), %eax
	jmp	LBB0_10
	.cfi_endproc
                                        ## -- End function
	.comm	_AV_LOG_ERROR,4,2               ## @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Deflate error %d.\n"

	.comm	_AVERROR_UNKNOWN,4,2            ## @AVERROR_UNKNOWN
L_.str.1:                               ## @.str.1
	.asciz	"Frame is too small.\n"

	.comm	_AVERROR_INVALIDDATA,4,2        ## @AVERROR_INVALIDDATA
	.comm	_TDSF_HEADER_SIZE,4,2           ## @TDSF_HEADER_SIZE
L_.str.2:                               ## @.str.2
	.asciz	"TDSF tag is too small.\n"

L_.str.3:                               ## @.str.3
	.asciz	"DTSM tag is too small.\n"

	.comm	_AV_PICTURE_TYPE_I,4,2          ## @AV_PICTURE_TYPE_I
	.comm	_AV_PICTURE_TYPE_P,4,2          ## @AV_PICTURE_TYPE_P
	.no_dead_strip	_tdsc_decode_frame
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function tdsc_decode_frame
_tdsc_decode_frame:                     ; @tdsc_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
	mov	x19, x3
	mov	x21, x2
	mov	x22, x1
	mov	x20, x0
	ldr	x27, [x0, #16]
	ldr	w9, [x27]
	ldr	w8, [x0]
	cmp	w9, w8
	b.ne	LBB0_2
; %bb.1:
	ldr	x10, [x27, #8]
	ldr	x9, [x20, #8]
	cmp	x10, x9
	b.ne	LBB0_3
	b	LBB0_4
LBB0_2:
	ldr	x9, [x20, #8]
LBB0_3:
	mul	w8, w8, w9
	lsl	w1, w8, #2
	str	w1, [x27, #16]
	add	x0, x27, #28
	bl	_av_reallocp
	tbnz	w0, #31, LBB0_10
LBB0_4:
	ldr	w8, [x27, #16]
	str	w8, [sp, #12]
	ldr	w0, [x27, #28]
	ldp	w3, w2, [x19]
	add	x1, sp, #12
	bl	_uncompress
                                        ; kill: def $w0 killed $w0 def $x0
	cbz	w0, LBB0_6
; %bb.5:
Lloh0:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh1:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	str	x0, [sp]
Lloh3:
	adrp	x2, l_.str@PAGE
Lloh4:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, x20
	bl	_av_log
Lloh5:
	adrp	x8, _AVERROR_UNKNOWN@GOTPAGE
Lloh6:
	ldr	x8, [x8, _AVERROR_UNKNOWN@GOTPAGEOFF]
	b	LBB0_9
LBB0_6:
	add	x23, x27, #24
	ldr	w1, [x27, #28]
	ldr	w2, [sp, #12]
	mov	x0, x23
	bl	_bytestream2_init
	mov	x0, x23
	bl	_bytestream2_get_bytes_left
	cmp	w0, #7
	b.gt	LBB0_11
; %bb.7:
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
LBB0_8:
	mov	x0, x20
	bl	_av_log
Lloh12:
	adrp	x8, _AVERROR_INVALIDDATA@GOTPAGE
Lloh13:
	ldr	x8, [x8, _AVERROR_INVALIDDATA@GOTPAGEOFF]
LBB0_9:
	ldr	w0, [x8]
LBB0_10:
	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_11:
	mov	x0, x23
	bl	_bytestream2_get_le32
	mov	x24, x0
	mov	w0, #84
	mov	w1, #68
	mov	w2, #83
	mov	w3, #70
	bl	_MKTAG
	cmp	w24, w0
	b.ne	LBB0_14
; %bb.12:
	mov	x0, x23
	bl	_bytestream2_get_bytes_left
Lloh14:
	adrp	x8, _TDSF_HEADER_SIZE@GOTPAGE
Lloh15:
	ldr	x8, [x8, _TDSF_HEADER_SIZE@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
	cmp	w0, w8
	b.ge	LBB0_15
; %bb.13:
Lloh17:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh18:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh19:
	ldr	w1, [x8]
Lloh20:
	adrp	x2, l_.str.2@PAGE
Lloh21:
	add	x2, x2, l_.str.2@PAGEOFF
	b	LBB0_8
LBB0_14:
	mov	w25, #0
	b	LBB0_19
LBB0_15:
	mov	x0, x23
	bl	_bytestream2_get_le32
	mov	x26, x0
	mov	x0, x23
	mov	w1, #4
	bl	_bytestream2_skip
	mov	x0, x23
	bl	_bytestream2_get_le32
	mov	x25, x0
	mov	x0, x20
	mov	x1, x26
	bl	_tdsc_parse_tdsf
	tbnz	w0, #31, LBB0_10
; %bb.16:
	mov	x0, x23
	bl	_bytestream2_get_bytes_left
	cmp	w0, #8
	b.lt	LBB0_18
; %bb.17:
	mov	x0, x23
	bl	_bytestream2_get_le32
	mov	x24, x0
LBB0_18:
	cmp	w25, #48
	cset	w25, eq
LBB0_19:
	mov	w0, #68
	mov	w1, #84
	mov	w2, #83
	mov	w3, #77
	bl	_MKTAG
	cmp	w24, w0
	b.ne	LBB0_23
; %bb.20:
	mov	x0, x23
	bl	_bytestream2_get_le32
	mov	x24, x0
	mov	x0, x23
	bl	_bytestream2_get_bytes_left
	cmp	w0, w24
	b.ge	LBB0_22
; %bb.21:
Lloh22:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh23:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh24:
	ldr	w1, [x8]
Lloh25:
	adrp	x2, l_.str.3@PAGE
Lloh26:
	add	x2, x2, l_.str.3@PAGEOFF
	b	LBB0_8
LBB0_22:
	mov	x0, x20
	bl	_tdsc_parse_dtsm
	tbnz	w0, #31, LBB0_10
LBB0_23:
	mov	x0, x20
	mov	x1, x22
	mov	w2, #0
	bl	_ff_get_buffer
	tbnz	w0, #31, LBB0_10
; %bb.24:
	ldr	w1, [x27, #20]
	mov	x0, x22
	bl	_av_frame_copy
	tbnz	w0, #31, LBB0_10
; %bb.25:
	ldp	x9, x8, [x22, #8]
	ldr	w1, [x8]
	ldr	w2, [x9]
	mov	x0, x20
	bl	_tdsc_paint_cursor
	cbz	w25, LBB0_27
; %bb.26:
Lloh27:
	adrp	x8, _AV_PICTURE_TYPE_I@GOTPAGE
Lloh28:
	ldr	x8, [x8, _AV_PICTURE_TYPE_I@GOTPAGEOFF]
Lloh29:
	ldr	w8, [x8]
	mov	w9, #1
	stp	w9, w8, [x22]
	b	LBB0_28
LBB0_27:
Lloh30:
	adrp	x8, _AV_PICTURE_TYPE_P@GOTPAGE
Lloh31:
	ldr	x8, [x8, _AV_PICTURE_TYPE_P@GOTPAGEOFF]
Lloh32:
	ldr	w8, [x8]
	str	w8, [x22, #4]
LBB0_28:
	mov	w8, #1
	str	w8, [x21]
	ldr	w0, [x19]
	b	LBB0_10
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpAdd	Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.cfi_endproc
                                        ; -- End function
	.comm	_AV_LOG_ERROR,4,2               ; @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Deflate error %d.\n"

	.comm	_AVERROR_UNKNOWN,4,2            ; @AVERROR_UNKNOWN
l_.str.1:                               ; @.str.1
	.asciz	"Frame is too small.\n"

	.comm	_AVERROR_INVALIDDATA,4,2        ; @AVERROR_INVALIDDATA
	.comm	_TDSF_HEADER_SIZE,4,2           ; @TDSF_HEADER_SIZE
l_.str.2:                               ; @.str.2
	.asciz	"TDSF tag is too small.\n"

l_.str.3:                               ; @.str.3
	.asciz	"DTSM tag is too small.\n"

	.comm	_AV_PICTURE_TYPE_I,4,2          ; @AV_PICTURE_TYPE_I
	.comm	_AV_PICTURE_TYPE_P,4,2          ; @AV_PICTURE_TYPE_P
	.no_dead_strip	_tdsc_decode_frame
.subsections_via_symbols
