	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function tqi_decode_frame
_tqi_decode_frame:                      ## @tqi_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	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movslq	(%rcx), %rax
	cmpq	$11, %rax
	jg	LBB0_2
## %bb.1:
	movq	_AVERROR_INVALIDDATA@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
	jmp	LBB0_16
LBB0_2:
	movq	%rdi, %r13
	movq	%rdx, -80(%rbp)                 ## 8-byte Spill
	movq	%rax, -88(%rbp)                 ## 8-byte Spill
	movq	%rsi, -56(%rbp)                 ## 8-byte Spill
	movq	(%rdi), %rbx
	movq	8(%rcx), %r14
	movq	%rdi, 48(%rbx)
	movq	%r14, %rdi
	callq	_AV_RL16
	movl	%eax, %r15d
	leaq	8(%r14), %rdi
	callq	_AV_RL16
	movl	%eax, %r12d
	movl	16(%r14), %esi
	movq	%rbx, %rdi
	callq	_tqi_calculate_qtable
	movq	%r13, %rdi
	movq	%r15, -48(%rbp)                 ## 8-byte Spill
	movl	%r15d, %esi
	movq	%r12, -72(%rbp)                 ## 8-byte Spill
	movl	%r12d, %edx
	callq	_ff_set_dimensions
	testl	%eax, %eax
	js	LBB0_8
## %bb.3:
	movq	%r13, %rdi
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	xorl	%edx, %edx
	callq	_ff_get_buffer
	testl	%eax, %eax
	js	LBB0_8
## %bb.4:
	leaq	24(%rbx), %rdi
	leaq	40(%rbx), %rsi
	movq	-88(%rbp), %r12                 ## 8-byte Reload
	leaq	-32(,%r12,4), %r15
	movq	%r15, -64(%rbp)                 ## 8-byte Spill
	sarq	$2, %r15
	movl	%r15d, %edx
	callq	_av_fast_padded_malloc
	movl	24(%rbx), %edi
	testl	%edi, %edi
	je	LBB0_9
## %bb.5:
	addq	$32, %r14
	leaq	3(%r15), %rdx
	testq	%r15, %r15
	cmovnsq	%r15, %rdx
	shrq	$2, %rdx
	movq	%r14, %rsi
                                        ## kill: def $edx killed $edx killed $rdx
	callq	*32(%rbx)
	leaq	28(%rbx), %rdi
	movl	24(%rbx), %esi
	movq	-64(%rbp), %rdx                 ## 8-byte Reload
	addl	%edx, %edx
                                        ## kill: def $edx killed $edx killed $rdx
	callq	_init_get_bits
	movq	16(%rbx), %rax
	movq	-72(%rbp), %rdx                 ## 8-byte Reload
	leal	15(%rdx), %ecx
	leal	30(%rdx), %r14d
	testl	%ecx, %ecx
	cmovnsl	%ecx, %r14d
	xorps	%xmm0, %xmm0
	movups	%xmm0, (%rax)
	movq	$0, 16(%rax)
	movl	$0, (%rbx)
	testl	%edx, %edx
	jle	LBB0_15
## %bb.6:
	sarl	$4, %r14d
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	leal	15(%rcx), %eax
	leal	30(%rcx), %r15d
	testl	%eax, %eax
	cmovnsl	%eax, %r15d
	sarl	$4, %r15d
	xorl	%eax, %eax
	jmp	LBB0_12
LBB0_8:
	movl	%eax, %r12d
	jmp	LBB0_16
LBB0_9:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_AVERROR                        ## TAILCALL
LBB0_10:                                ##   in Loop: Header=BB0_12 Depth=1
	movl	(%rbx), %eax
LBB0_11:                                ##   in Loop: Header=BB0_12 Depth=1
	incl	%eax
	movl	%eax, (%rbx)
	cmpl	%r14d, %eax
	jge	LBB0_15
LBB0_12:                                ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_13 Depth 2
	movl	$0, 4(%rbx)
	cmpl	$0, -48(%rbp)                   ## 4-byte Folded Reload
	jle	LBB0_11
	.p2align	4, 0x90
LBB0_13:                                ##   Parent Loop BB0_12 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movl	8(%rbx), %esi
	movq	%rbx, %rdi
	callq	_tqi_decode_mb
	testq	%rax, %rax
	js	LBB0_15
## %bb.14:                              ##   in Loop: Header=BB0_13 Depth=2
	movl	8(%rbx), %edx
	movq	%r13, %rdi
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	callq	_tqi_idct_put
	movl	4(%rbx), %eax
	incl	%eax
	movl	%eax, 4(%rbx)
	cmpl	%r15d, %eax
	jl	LBB0_13
	jmp	LBB0_10
LBB0_15:
	movq	-80(%rbp), %rax                 ## 8-byte Reload
	movl	$1, (%rax)
LBB0_16:
	movl	%r12d, %eax
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_AVERROR_INVALIDDATA,4,2        ## @AVERROR_INVALIDDATA
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.no_dead_strip	_tqi_decode_frame
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function tqi_decode_frame
_tqi_decode_frame:                      ; @tqi_decode_frame
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	ldr	w19, [x3]
	cmp	w19, #11
	b.gt	LBB0_2
; %bb.1:
Lloh0:
	adrp	x8, _AVERROR_INVALIDDATA@GOTPAGE
Lloh1:
	ldr	x8, [x8, _AVERROR_INVALIDDATA@GOTPAGEOFF]
Lloh2:
	ldr	w19, [x8]
	b	LBB0_15
LBB0_2:
	mov	x20, x2
	mov	x21, x1
	mov	x22, x0
	ldr	x23, [x0]
	ldr	x26, [x3, #8]
	str	x0, [x23, #48]
	mov	x0, x26
	bl	_AV_RL16
	mov	x24, x0
	add	x0, x26, #8
	bl	_AV_RL16
	mov	x25, x0
	ldr	w1, [x26, #16]
	mov	x0, x23
	bl	_tqi_calculate_qtable
	mov	x0, x22
	mov	x1, x24
	mov	x2, x25
	bl	_ff_set_dimensions
	tbnz	w0, #31, LBB0_7
; %bb.3:
	mov	x0, x22
	mov	x1, x21
	mov	w2, #0
	bl	_ff_get_buffer
	tbnz	w0, #31, LBB0_7
; %bb.4:
	sxtw	x8, w19
	add	x0, x23, #24
	add	x1, x23, #40
	lsl	x8, x8, #2
	sub	x28, x8, #32
	asr	x27, x28, #2
	mov	x2, x27
	bl	_av_fast_padded_malloc
	ldr	w0, [x23, #24]
	cbz	w0, LBB0_8
; %bb.5:
	add	x1, x26, #32
	ldr	x8, [x23, #32]
	add	x9, x27, #3
	cmp	x27, #0
	csel	x9, x9, x27, lt
	lsr	x2, x9, #2
                                        ; kill: def $w2 killed $w2 killed $x2
	blr	x8
	add	x0, x23, #28
	ldr	w1, [x23, #24]
	lsl	w2, w28, #1
	bl	_init_get_bits
	ldr	x8, [x23, #16]
	add	w9, w25, #15
	add	w10, w25, #30
	stp	xzr, xzr, [x8, #8]
	cmp	w9, #0
	csel	w9, w10, w9, lt
	str	xzr, [x8]
	str	wzr, [x23]
	cmp	w25, #1
	b.lt	LBB0_14
; %bb.6:
	mov	w8, #0
	asr	w25, w9, #4
	add	w9, w24, #15
	add	w10, w24, #30
	cmp	w9, #0
	csel	w9, w10, w9, lt
	asr	w26, w9, #4
	b	LBB0_11
LBB0_7:
	mov	x19, x0
	b	LBB0_15
LBB0_8:
Lloh3:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
	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
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	b	_AVERROR
LBB0_9:                                 ;   in Loop: Header=BB0_11 Depth=1
	ldr	w8, [x23]
LBB0_10:                                ;   in Loop: Header=BB0_11 Depth=1
	add	w8, w8, #1
	str	w8, [x23]
	cmp	w8, w25
	b.ge	LBB0_14
LBB0_11:                                ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_12 Depth 2
	str	wzr, [x23, #4]
	cmp	w24, #1
	b.lt	LBB0_10
LBB0_12:                                ;   Parent Loop BB0_11 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	w1, [x23, #8]
	mov	x0, x23
	bl	_tqi_decode_mb
	tbnz	x0, #63, LBB0_14
; %bb.13:                               ;   in Loop: Header=BB0_12 Depth=2
	ldr	w2, [x23, #8]
	mov	x0, x22
	mov	x1, x21
	bl	_tqi_idct_put
	ldr	w8, [x23, #4]
	add	w8, w8, #1
	str	w8, [x23, #4]
	cmp	w8, w26
	b.lt	LBB0_12
	b	LBB0_9
LBB0_14:
	mov	w8, #1
	str	w8, [x20]
LBB0_15:
	mov	x0, x19
	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
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_AVERROR_INVALIDDATA,4,2        ; @AVERROR_INVALIDDATA
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.no_dead_strip	_tqi_decode_frame
.subsections_via_symbols
