	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function hq_hqa_decode_frame
_hq_hqa_decode_frame:                   ## @hq_hqa_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, %r13
	movq	%rdx, %r12
	movq	%rsi, %r15
	movq	%rdi, %r14
	movq	(%rdi), %rbx
	movl	(%rcx), %edx
	movl	4(%rcx), %esi
	movq	%rbx, %rdi
	callq	_bytestream2_init
	movq	%rbx, %rdi
	callq	_bytestream2_get_bytes_left
	cmpl	$7, %eax
	jg	LBB0_2
## %bb.1:
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	(%r13), %ecx
	leaq	L_.str(%rip), %rdx
	movq	%r14, %rdi
	jmp	LBB0_5
LBB0_2:
	movq	%r15, -48(%rbp)                 ## 8-byte Spill
	movq	%rbx, %rdi
	callq	_bytestream2_peek_le32
	movl	%eax, %r15d
	movl	$73, %edi
	movl	$78, %esi
	movl	$70, %edx
	movl	$79, %ecx
	callq	_MKTAG
	cmpl	%eax, %r15d
	jne	LBB0_8
## %bb.3:
	movq	%rbx, %rdi
	movl	$4, %esi
	callq	_bytestream2_skip
	movq	%rbx, %rdi
	callq	_bytestream2_get_le32
	movq	%rax, %r15
	movq	%rbx, %rdi
	callq	_bytestream2_get_bytes_left
	cmpl	%r15d, %eax
	jge	LBB0_7
## %bb.4:
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.1(%rip), %rdx
	movq	%r14, %rdi
	movl	%r15d, %ecx
	jmp	LBB0_5
LBB0_7:
	movl	(%rbx), %esi
	movq	%r14, %rdi
	movl	%r15d, %edx
	callq	_ff_canopus_parse_info_tag
	movq	%rbx, %rdi
	movl	%r15d, %esi
	callq	_bytestream2_skip
LBB0_8:
	movq	%rbx, %rdi
	callq	_bytestream2_get_bytes_left
	movl	%eax, %r15d
	cmpl	$3, %eax
	ja	LBB0_10
## %bb.9:
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdx
	movq	%r14, %rdi
	movl	%r15d, %ecx
LBB0_5:
	xorl	%eax, %eax
	callq	_av_log
LBB0_6:
	movq	_AVERROR_INVALIDDATA@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
LBB0_17:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_10:
	movq	%r12, -56(%rbp)                 ## 8-byte Spill
	movq	%rbx, %rdi
	callq	_bytestream2_get_le32
	movq	%rax, %r12
	movl	$85, %edi
	movl	$86, %esi
	movl	$67, %edx
	movl	$32, %ecx
	callq	_MKTAG
	xorl	%r12d, %eax
	testl	$16777215, %eax                 ## imm = 0xFFFFFF
	je	LBB0_11
## %bb.12:
	movl	$72, %edi
	movl	$81, %esi
	movl	$65, %edx
	movl	$49, %ecx
	callq	_MKTAG
	cmpl	%r12d, %eax
	jne	LBB0_18
## %bb.13:
	movq	%rbx, %rdi
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
	movl	%r15d, %edx
	callq	_hqa_decode_frame
	jmp	LBB0_14
LBB0_11:
	shrl	$24, %r12d
	movq	%rbx, %rdi
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
	movl	%r12d, %edx
	movl	%r15d, %ecx
	callq	_hq_decode_frame
LBB0_14:
	movl	%eax, %ebx
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	testl	%eax, %eax
	js	LBB0_15
## %bb.16:
	movq	-48(%rbp), %rdx                 ## 8-byte Reload
	movl	$1, (%rdx)
	movq	_AV_PICTURE_TYPE_I@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 4(%rdx)
	movl	$1, (%rcx)
	movl	(%r13), %ebx
	jmp	LBB0_17
LBB0_18:
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.2(%rip), %rdx
	movq	%r14, %rdi
	xorl	%eax, %eax
	callq	_av_log
	jmp	LBB0_6
LBB0_15:
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.3(%rip), %rdx
	movq	%r14, %rdi
	xorl	%eax, %eax
	callq	_av_log
	jmp	LBB0_17
	.cfi_endproc
                                        ## -- End function
	.comm	_AV_LOG_ERROR,4,2               ## @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Frame is too small (%d).\n"

	.comm	_AVERROR_INVALIDDATA,4,2        ## @AVERROR_INVALIDDATA
L_.str.1:                               ## @.str.1
	.asciz	"Invalid INFO size (%d).\n"

L_.str.2:                               ## @.str.2
	.asciz	"Not a HQ/HQA frame.\n"

L_.str.3:                               ## @.str.3
	.asciz	"Error decoding frame.\n"

	.comm	_AV_PICTURE_TYPE_I,4,2          ## @AV_PICTURE_TYPE_I
	.no_dead_strip	_hq_hqa_decode_frame
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function hq_hqa_decode_frame
_hq_hqa_decode_frame:                   ; @hq_hqa_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	x20, x3
	mov	x21, x2
	mov	x22, x1
	mov	x19, x0
	ldr	x23, [x0]
	ldp	w2, w1, [x3]
	mov	x0, x23
	bl	_bytestream2_init
	mov	x0, x23
	bl	_bytestream2_get_bytes_left
	cmp	w0, #7
	b.gt	LBB0_2
; %bb.1:
Lloh0:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh1:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	ldr	w8, [x20]
	str	x8, [sp]
	b	LBB0_8
LBB0_2:
	mov	x0, x23
	bl	_bytestream2_peek_le32
	mov	x24, x0
	mov	w0, #73
	mov	w1, #78
	mov	w2, #70
	mov	w3, #79
	bl	_MKTAG
	cmp	w24, w0
	b.ne	LBB0_6
; %bb.3:
	mov	x0, x23
	mov	w1, #4
	bl	_bytestream2_skip
	mov	x0, x23
	bl	_bytestream2_get_le32
	mov	x24, x0
	mov	x0, x23
	bl	_bytestream2_get_bytes_left
	cmp	w0, w24
	b.ge	LBB0_5
; %bb.4:
Lloh3:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh4:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
                                        ; kill: def $w24 killed $w24 killed $x24 def $x24
	str	x24, [sp]
Lloh6:
	adrp	x2, l_.str.1@PAGE
Lloh7:
	add	x2, x2, l_.str.1@PAGEOFF
	b	LBB0_9
LBB0_5:
	ldr	w1, [x23]
	mov	x0, x19
	mov	x2, x24
	bl	_ff_canopus_parse_info_tag
	mov	x0, x23
	mov	x1, x24
	bl	_bytestream2_skip
LBB0_6:
	mov	x0, x23
	bl	_bytestream2_get_bytes_left
	mov	x24, x0
	cmp	w0, #3
	b.hi	LBB0_11
; %bb.7:
Lloh8:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh9:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
	str	x24, [sp]
LBB0_8:
Lloh11:
	adrp	x2, l_.str@PAGE
Lloh12:
	add	x2, x2, l_.str@PAGEOFF
LBB0_9:
	mov	x0, x19
	bl	_av_log
Lloh13:
	adrp	x8, _AVERROR_INVALIDDATA@GOTPAGE
Lloh14:
	ldr	x8, [x8, _AVERROR_INVALIDDATA@GOTPAGEOFF]
Lloh15:
	ldr	w23, [x8]
LBB0_10:
	mov	x0, x23
	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_11:
	mov	x0, x23
	bl	_bytestream2_get_le32
	mov	x25, x0
	mov	w0, #85
	mov	w1, #86
	mov	w2, #67
	mov	w3, #32
	bl	_MKTAG
	eor	w8, w0, w25
	tst	w8, #0xffffff
	b.eq	LBB0_15
; %bb.12:
	mov	w0, #72
	mov	w1, #81
	mov	w2, #65
	mov	w3, #49
	bl	_MKTAG
	cmp	w0, w25
	b.ne	LBB0_17
; %bb.13:
	mov	x0, x23
	mov	x1, x22
	mov	x2, x24
	bl	_hqa_decode_frame
	mov	x23, x0
	tbnz	w0, #31, LBB0_16
LBB0_14:
	mov	w8, #1
	str	w8, [x22]
Lloh16:
	adrp	x9, _AV_PICTURE_TYPE_I@GOTPAGE
Lloh17:
	ldr	x9, [x9, _AV_PICTURE_TYPE_I@GOTPAGEOFF]
Lloh18:
	ldr	w9, [x9]
	str	w9, [x22, #4]
	str	w8, [x21]
	ldr	w23, [x20]
	b	LBB0_10
LBB0_15:
	lsr	w2, w25, #24
	mov	x0, x23
	mov	x1, x22
	mov	x3, x24
	bl	_hq_decode_frame
	mov	x23, x0
	tbz	w0, #31, LBB0_14
LBB0_16:
Lloh19:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh20:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh21:
	ldr	w1, [x8]
Lloh22:
	adrp	x2, l_.str.3@PAGE
Lloh23:
	add	x2, x2, l_.str.3@PAGEOFF
	mov	x0, x19
	bl	_av_log
	b	LBB0_10
LBB0_17:
Lloh24:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh25:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh26:
	ldr	w1, [x8]
Lloh27:
	adrp	x2, l_.str.2@PAGE
Lloh28:
	add	x2, x2, l_.str.2@PAGEOFF
	b	LBB0_9
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpAdd	Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.cfi_endproc
                                        ; -- End function
	.comm	_AV_LOG_ERROR,4,2               ; @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Frame is too small (%d).\n"

	.comm	_AVERROR_INVALIDDATA,4,2        ; @AVERROR_INVALIDDATA
l_.str.1:                               ; @.str.1
	.asciz	"Invalid INFO size (%d).\n"

l_.str.2:                               ; @.str.2
	.asciz	"Not a HQ/HQA frame.\n"

l_.str.3:                               ; @.str.3
	.asciz	"Error decoding frame.\n"

	.comm	_AV_PICTURE_TYPE_I,4,2          ; @AV_PICTURE_TYPE_I
	.no_dead_strip	_hq_hqa_decode_frame
.subsections_via_symbols
