	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function qtrle_decode_frame
_qtrle_decode_frame:                    ## @qtrle_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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, %rbx
	movq	%rdx, %r14
	movq	%rsi, -64(%rbp)                 ## 8-byte Spill
	movq	%rdi, %r13
	movq	16(%rdi), %r12
	leaq	24(%r12), %r15
	movl	(%rcx), %edx
	movl	4(%rcx), %esi
	movq	%r15, %rdi
	callq	_bytestream2_init
	cmpl	$8, (%rbx)
	jge	LBB0_8
LBB0_1:
	xorl	%eax, %eax
LBB0_2:
	movq	(%r12), %rsi
	movq	16(%rsi), %rcx
	cmpq	$0, (%rcx)
	je	LBB0_10
## %bb.3:
	testb	%al, %al
	jne	LBB0_6
## %bb.4:
	movq	%r13, %rdi
	callq	_ff_decode_frame_props
	testl	%eax, %eax
	js	LBB0_12
## %bb.5:
	movq	(%r12), %rsi
LBB0_6:
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	callq	_av_frame_ref
	testl	%eax, %eax
	js	LBB0_12
## %bb.7:
	movl	$1, (%r14)
	jmp	LBB0_11
LBB0_8:
	movq	%r15, %rdi
	callq	_bytestream2_get_be32
	andl	$1073741823, %eax               ## imm = 0x3FFFFFFF
	movl	%eax, %ecx
	subl	(%rbx), %ecx
	imull	8(%r13), %eax
	cltq
	imulq	$1374389535, %rax, %rax         ## imm = 0x51EB851F
	movq	%rax, %rdx
	shrq	$63, %rdx
	sarq	$37, %rax
	addl	%edx, %eax
	cmpl	%eax, %ecx
	jle	LBB0_13
LBB0_10:
	movq	_AVERROR_INVALIDDATA@GOTPCREL(%rip), %rbx
LBB0_11:
	movl	(%rbx), %eax
LBB0_12:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_13:
	movq	%r15, %rdi
	callq	_bytestream2_get_be16
	testb	$8, %al
	jne	LBB0_19
## %bb.14:
	movq	%r14, -48(%rbp)                 ## 8-byte Spill
	movq	16(%r12), %rax
	movl	(%rax), %r15d
	xorl	%r14d, %r14d
LBB0_15:
	movq	(%r12), %rsi
	movq	%r13, %rdi
	xorl	%edx, %edx
	callq	_ff_reget_buffer
	testl	%eax, %eax
	js	LBB0_12
## %bb.16:
	movl	4(%r13), %ecx
	leal	-1(%rcx), %eax
	cmpl	$39, %eax
	ja	LBB0_31
## %bb.17:
	movq	(%r12), %rdx
	movq	(%rdx), %rdx
	imull	(%rdx), %r14d
	leaq	LJTI0_0(%rip), %rdx
	movslq	(%rdx,%rax,4), %rax
	addq	%rdx, %rax
	jmpq	*%rax
LBB0_18:
	movq	%r12, %rdi
	movl	%r14d, %esi
	movl	%r15d, %edx
	callq	_qtrle_decode_1bpp
	jmp	LBB0_26
LBB0_19:
	cmpl	$14, (%rbx)
	jl	LBB0_1
## %bb.21:
	movq	%r14, -48(%rbp)                 ## 8-byte Spill
	movq	%r15, %rdi
	callq	_bytestream2_get_be16
	movl	%eax, %r14d
	movq	%r15, %rdi
	movl	$2, %esi
	callq	_bytestream2_skip
	movq	%r15, %rdi
	callq	_bytestream2_get_be16
	movq	%r15, %rdi
	movl	%eax, %r15d
	movl	$2, %esi
	callq	_bytestream2_skip
	movq	16(%r12), %rax
	movl	(%rax), %eax
	subl	%r14d, %eax
	cmpl	%eax, %r15d
	jle	LBB0_15
## %bb.22:
	xorl	%eax, %eax
	movq	-48(%rbp), %r14                 ## 8-byte Reload
	jmp	LBB0_2
LBB0_23:
	movq	%r12, %rdi
	movl	%r14d, %esi
	movl	%r15d, %edx
	movl	$2, %ecx
	callq	_qtrle_decode_2n4bpp
	jmp	LBB0_26
LBB0_24:
	movq	%r12, %rdi
	movl	%r14d, %esi
	movl	%r15d, %edx
	movl	$4, %ecx
	callq	_qtrle_decode_2n4bpp
	jmp	LBB0_26
LBB0_25:
	movq	%r12, %rdi
	movl	%r14d, %esi
	movl	%r15d, %edx
	callq	_qtrle_decode_8bpp
LBB0_26:
	movq	_AV_PKT_DATA_PALETTE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-52(%rbp), %rdx
	movq	%rbx, %rdi
	callq	_av_packet_get_side_data
	testq	%rax, %rax
	movq	-48(%rbp), %r14                 ## 8-byte Reload
	je	LBB0_30
## %bb.27:
	movl	-52(%rbp), %ecx
	movq	_AVPALETTE_SIZE@GOTPCREL(%rip), %rdx
	cmpl	(%rdx), %ecx
	jne	LBB0_29
## %bb.28:
	movq	(%r12), %rdx
	movl	$1, 8(%rdx)
	movq	8(%r12), %rdi
	movq	%rax, %rsi
	movl	%ecx, %edx
	callq	_memcpy
	jmp	LBB0_30
LBB0_29:
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.1(%rip), %rdx
	movq	%r13, %rdi
	callq	_av_log
LBB0_30:
	movq	(%r12), %rax
	movq	8(%r12), %rsi
	movq	16(%rax), %rax
	movq	8(%rax), %rdi
	movq	_AVPALETTE_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	callq	_memcpy
	movb	$1, %al
	jmp	LBB0_2
LBB0_31:
	movq	16(%r12), %rdi
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdx
                                        ## kill: def $ecx killed $ecx killed $rcx
	callq	_av_log
	jmp	LBB0_35
LBB0_32:
	movq	%r12, %rdi
	movl	%r14d, %esi
	movl	%r15d, %edx
	callq	_qtrle_decode_16bpp
	jmp	LBB0_35
LBB0_33:
	movq	%r12, %rdi
	movl	%r14d, %esi
	movl	%r15d, %edx
	callq	_qtrle_decode_24bpp
	jmp	LBB0_35
LBB0_34:
	movq	%r12, %rdi
	movl	%r14d, %esi
	movl	%r15d, %edx
	callq	_qtrle_decode_32bpp
LBB0_35:
	movb	$1, %al
	movq	-48(%rbp), %r14                 ## 8-byte Reload
	jmp	LBB0_2
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_18, LBB0_18-LJTI0_0
.set L0_0_set_23, LBB0_23-LJTI0_0
.set L0_0_set_31, LBB0_31-LJTI0_0
.set L0_0_set_24, LBB0_24-LJTI0_0
.set L0_0_set_25, LBB0_25-LJTI0_0
.set L0_0_set_32, LBB0_32-LJTI0_0
.set L0_0_set_33, LBB0_33-LJTI0_0
.set L0_0_set_34, LBB0_34-LJTI0_0
LJTI0_0:
	.long	L0_0_set_18
	.long	L0_0_set_23
	.long	L0_0_set_31
	.long	L0_0_set_24
	.long	L0_0_set_31
	.long	L0_0_set_31
	.long	L0_0_set_31
	.long	L0_0_set_25
	.long	L0_0_set_31
	.long	L0_0_set_31
	.long	L0_0_set_31
	.long	L0_0_set_31
	.long	L0_0_set_31
	.long	L0_0_set_31
	.long	L0_0_set_31
	.long	L0_0_set_32
	.long	L0_0_set_31
	.long	L0_0_set_31
	.long	L0_0_set_31
	.long	L0_0_set_31
	.long	L0_0_set_31
	.long	L0_0_set_31
	.long	L0_0_set_31
	.long	L0_0_set_33
	.long	L0_0_set_31
	.long	L0_0_set_31
	.long	L0_0_set_31
	.long	L0_0_set_31
	.long	L0_0_set_31
	.long	L0_0_set_31
	.long	L0_0_set_31
	.long	L0_0_set_34
	.long	L0_0_set_18
	.long	L0_0_set_23
	.long	L0_0_set_31
	.long	L0_0_set_24
	.long	L0_0_set_31
	.long	L0_0_set_31
	.long	L0_0_set_31
	.long	L0_0_set_25
	.end_data_region
                                        ## -- End function
	.comm	_AVERROR_INVALIDDATA,4,2        ## @AVERROR_INVALIDDATA
	.comm	_AV_LOG_ERROR,4,2               ## @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Unsupported colorspace: %d bits/sample?\n"

	.comm	_AV_PKT_DATA_PALETTE,4,2        ## @AV_PKT_DATA_PALETTE
	.comm	_AVPALETTE_SIZE,4,2             ## @AVPALETTE_SIZE
L_.str.1:                               ## @.str.1
	.asciz	"Palette size %d is wrong\n"

	.no_dead_strip	_qtrle_decode_frame
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function qtrle_decode_frame
_qtrle_decode_frame:                    ; @qtrle_decode_frame
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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, x3
	mov	x20, x2
	mov	x21, x1
	mov	x23, x0
	ldr	x22, [x0, #16]
	add	x25, x22, #24
	ldp	w2, w1, [x3]
	mov	x0, x25
	bl	_bytestream2_init
	ldr	w8, [x19]
	cmp	w8, #8
	b.ge	LBB0_8
LBB0_1:
	mov	w8, #0
LBB0_2:
	ldr	x1, [x22]
	ldr	x9, [x1, #16]
	ldr	x9, [x9]
	cbz	x9, LBB0_9
; %bb.3:
	tbnz	w8, #0, LBB0_6
; %bb.4:
	mov	x0, x23
	bl	_ff_decode_frame_props
	tbnz	w0, #31, LBB0_11
; %bb.5:
	ldr	x1, [x22]
LBB0_6:
	mov	x0, x21
	bl	_av_frame_ref
	tbnz	w0, #31, LBB0_11
; %bb.7:
	mov	w8, #1
	str	w8, [x20]
	b	LBB0_10
LBB0_8:
	mov	x0, x25
	bl	_bytestream2_get_be32
	and	w8, w0, #0x3fffffff
	ldr	w9, [x19]
	sub	w9, w8, w9
	ldr	w10, [x23, #8]
	mul	w8, w8, w10
	mov	w10, #34079
	movk	w10, #20971, lsl #16
	smull	x8, w8, w10
	lsr	x10, x8, #63
	asr	x8, x8, #37
	add	w8, w8, w10
	cmp	w9, w8
	b.le	LBB0_12
LBB0_9:
Lloh0:
	adrp	x19, _AVERROR_INVALIDDATA@GOTPAGE
Lloh1:
	ldr	x19, [x19, _AVERROR_INVALIDDATA@GOTPAGEOFF]
LBB0_10:
	ldr	w0, [x19]
LBB0_11:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
LBB0_12:
	mov	x0, x25
	bl	_bytestream2_get_be16
	tbnz	w0, #3, LBB0_18
; %bb.13:
	mov	w26, #0
	ldr	x8, [x22, #16]
	ldr	w24, [x8]
LBB0_14:
	ldr	x1, [x22]
	mov	x0, x23
	mov	w2, #0
	bl	_ff_reget_buffer
	tbnz	w0, #31, LBB0_11
; %bb.15:
	ldr	w3, [x23, #4]
	sub	w8, w3, #1
	cmp	w8, #39
	b.hi	LBB0_29
; %bb.16:
	ldr	x9, [x22]
	ldr	x9, [x9]
	ldr	w9, [x9]
	mul	w1, w9, w26
Lloh2:
	adrp	x9, lJTI0_0@PAGE
Lloh3:
	add	x9, x9, lJTI0_0@PAGEOFF
	adr	x10, LBB0_17
	ldrb	w11, [x9, x8]
	add	x10, x10, x11, lsl #2
	br	x10
LBB0_17:
	mov	x0, x22
	mov	x2, x24
	bl	_qtrle_decode_1bpp
	b	LBB0_23
LBB0_18:
	ldr	w8, [x19]
	cmp	w8, #14
	b.lt	LBB0_1
; %bb.19:
	mov	x0, x25
	bl	_bytestream2_get_be16
	mov	x26, x0
	mov	x0, x25
	mov	w1, #2
	bl	_bytestream2_skip
	mov	x0, x25
	bl	_bytestream2_get_be16
	mov	x24, x0
	mov	x0, x25
	mov	w1, #2
	bl	_bytestream2_skip
	ldr	x8, [x22, #16]
	ldr	w8, [x8]
	sub	w8, w8, w26
	cmp	w24, w8
	b.gt	LBB0_1
	b	LBB0_14
LBB0_20:
	mov	x0, x22
	mov	x2, x24
	mov	w3, #2
	bl	_qtrle_decode_2n4bpp
	b	LBB0_23
LBB0_21:
	mov	x0, x22
	mov	x2, x24
	mov	w3, #4
	bl	_qtrle_decode_2n4bpp
	b	LBB0_23
LBB0_22:
	mov	x0, x22
	mov	x2, x24
	bl	_qtrle_decode_8bpp
LBB0_23:
Lloh4:
	adrp	x8, _AV_PKT_DATA_PALETTE@GOTPAGE
Lloh5:
	ldr	x8, [x8, _AV_PKT_DATA_PALETTE@GOTPAGEOFF]
Lloh6:
	ldr	w1, [x8]
	add	x2, sp, #12
	mov	x0, x19
	bl	_av_packet_get_side_data
Lloh7:
	adrp	x24, _AVPALETTE_SIZE@GOTPAGE
Lloh8:
	ldr	x24, [x24, _AVPALETTE_SIZE@GOTPAGEOFF]
	cbz	x0, LBB0_27
; %bb.24:
	ldr	w3, [sp, #12]
	ldr	w8, [x24]
	cmp	w3, w8
	b.ne	LBB0_26
; %bb.25:
	mov	x1, x0
	mov	w8, #1
	ldp	x9, x0, [x22]
	str	w8, [x9, #8]
	mov	x2, x3
	bl	_memcpy
	b	LBB0_27
LBB0_26:
Lloh9:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh10:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
Lloh12:
	adrp	x2, l_.str.1@PAGE
Lloh13:
	add	x2, x2, l_.str.1@PAGEOFF
	mov	x0, x23
	bl	_av_log
LBB0_27:
	ldp	x8, x1, [x22]
	ldr	x8, [x8, #16]
	ldr	x0, [x8, #8]
	ldr	w2, [x24]
	bl	_memcpy
LBB0_28:
	mov	w8, #1
	b	LBB0_2
LBB0_29:
	ldr	x0, [x22, #16]
Lloh14:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh15:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh16:
	ldr	w1, [x8]
Lloh17:
	adrp	x2, l_.str@PAGE
Lloh18:
	add	x2, x2, l_.str@PAGEOFF
	bl	_av_log
	b	LBB0_28
LBB0_30:
	mov	x0, x22
	mov	x2, x24
	bl	_qtrle_decode_16bpp
	b	LBB0_28
LBB0_31:
	mov	x0, x22
	mov	x2, x24
	bl	_qtrle_decode_24bpp
	b	LBB0_28
LBB0_32:
	mov	x0, x22
	mov	x2, x24
	bl	_qtrle_decode_32bpp
	b	LBB0_28
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_17-LBB0_17)>>2
	.byte	(LBB0_20-LBB0_17)>>2
	.byte	(LBB0_29-LBB0_17)>>2
	.byte	(LBB0_21-LBB0_17)>>2
	.byte	(LBB0_29-LBB0_17)>>2
	.byte	(LBB0_29-LBB0_17)>>2
	.byte	(LBB0_29-LBB0_17)>>2
	.byte	(LBB0_22-LBB0_17)>>2
	.byte	(LBB0_29-LBB0_17)>>2
	.byte	(LBB0_29-LBB0_17)>>2
	.byte	(LBB0_29-LBB0_17)>>2
	.byte	(LBB0_29-LBB0_17)>>2
	.byte	(LBB0_29-LBB0_17)>>2
	.byte	(LBB0_29-LBB0_17)>>2
	.byte	(LBB0_29-LBB0_17)>>2
	.byte	(LBB0_30-LBB0_17)>>2
	.byte	(LBB0_29-LBB0_17)>>2
	.byte	(LBB0_29-LBB0_17)>>2
	.byte	(LBB0_29-LBB0_17)>>2
	.byte	(LBB0_29-LBB0_17)>>2
	.byte	(LBB0_29-LBB0_17)>>2
	.byte	(LBB0_29-LBB0_17)>>2
	.byte	(LBB0_29-LBB0_17)>>2
	.byte	(LBB0_31-LBB0_17)>>2
	.byte	(LBB0_29-LBB0_17)>>2
	.byte	(LBB0_29-LBB0_17)>>2
	.byte	(LBB0_29-LBB0_17)>>2
	.byte	(LBB0_29-LBB0_17)>>2
	.byte	(LBB0_29-LBB0_17)>>2
	.byte	(LBB0_29-LBB0_17)>>2
	.byte	(LBB0_29-LBB0_17)>>2
	.byte	(LBB0_32-LBB0_17)>>2
	.byte	(LBB0_17-LBB0_17)>>2
	.byte	(LBB0_20-LBB0_17)>>2
	.byte	(LBB0_29-LBB0_17)>>2
	.byte	(LBB0_21-LBB0_17)>>2
	.byte	(LBB0_29-LBB0_17)>>2
	.byte	(LBB0_29-LBB0_17)>>2
	.byte	(LBB0_29-LBB0_17)>>2
	.byte	(LBB0_22-LBB0_17)>>2
                                        ; -- End function
	.comm	_AVERROR_INVALIDDATA,4,2        ; @AVERROR_INVALIDDATA
	.comm	_AV_LOG_ERROR,4,2               ; @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Unsupported colorspace: %d bits/sample?\n"

	.comm	_AV_PKT_DATA_PALETTE,4,2        ; @AV_PKT_DATA_PALETTE
	.comm	_AVPALETTE_SIZE,4,2             ; @AVPALETTE_SIZE
l_.str.1:                               ; @.str.1
	.asciz	"Palette size %d is wrong\n"

	.no_dead_strip	_qtrle_decode_frame
.subsections_via_symbols
