	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function wsvqa_read_header
_wsvqa_read_header:                     ## @wsvqa_read_header
	.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	%rdi, %r15
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	8(%rdi), %r12
	movq	16(%rdi), %r14
	movq	_VQA_PREAMBLE_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	shlq	$3, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %r13
	movq	%r15, %rdi
	xorl	%esi, %esi
	callq	_avformat_new_stream
	testq	%rax, %rax
	je	LBB0_1
## %bb.3:
	movq	%rax, %rbx
	movq	$0, 32(%rax)
	movl	24(%rax), %eax
	movl	%eax, 40(%r14)
	movq	_AVMEDIA_TYPE_VIDEO@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	16(%rbx), %rcx
	movl	%eax, 36(%rcx)
	movq	_AV_CODEC_ID_WS_VQA@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 32(%rcx)
	movq	$0, 24(%rcx)
	movq	_SEEK_SET@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r12, %rdi
	movl	$20, %esi
	callq	_avio_seek
	movq	16(%rbx), %rsi
	movq	_VQA_HEADER_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%r15, %rdi
	movq	%r12, %rdx
	callq	_ff_get_extradata
	testq	%rax, %rax
	js	LBB0_1
## %bb.4:
	movq	%r14, -56(%rbp)                 ## 8-byte Spill
	movq	%r13, -64(%rbp)                 ## 8-byte Spill
	movq	16(%rbx), %rax
	movq	(%rax), %r13
	leaq	48(%r13), %rdi
	callq	_AV_RL16
	movq	16(%rbx), %rcx
	movq	%rax, 16(%rcx)
	leaq	64(%r13), %rdi
	callq	_AV_RL16
	movq	16(%rbx), %rcx
	movq	%rax, 8(%rcx)
	movl	96(%r13), %r14d
	leaq	32(%r13), %rdi
	callq	_AV_RL16
	movq	%rax, (%rbx)
	movq	%rax, 8(%rbx)
	leal	-31(%r14), %eax
	cmpl	$-31, %eax
	ja	LBB0_6
## %bb.5:
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdx
	movq	%r15, %rdi
	movl	%r14d, %ecx
	callq	_av_log
	movq	_AVERROR_INVALIDDATA@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	jmp	LBB0_13
LBB0_1:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_15
## %bb.2:
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_AVERROR                        ## TAILCALL
LBB0_6:
	movq	%rbx, %rdi
	movl	$64, %esi
	movl	$1, %edx
	movl	%r14d, %ecx
	callq	_avpriv_set_pts_info
	movq	%r13, %rdi
	callq	_AV_RL16
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	movq	%rax, 32(%rbx)
	leaq	192(%r13), %rdi
	callq	_AV_RL16
	movq	%rax, 24(%rbx)
	movq	208(%r13), %rax
	movq	%rax, 16(%rbx)
	movq	216(%r13), %rax
	movq	%rax, 8(%rbx)
	movl	$-1, (%rbx)
	movq	_AVFMTCTX_NOHEADER@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, (%r15)
	movq	-64(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rax
	addq	$32, %rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	jmp	LBB0_7
	.p2align	4, 0x90
LBB0_11:                                ##   in Loop: Header=BB0_7 Depth=1
	movq	%r12, %rdi
	movl	%r14d, %esi
	callq	_avio_skip
	cmpl	$131, %r13d
	movq	-64(%rbp), %rbx                 ## 8-byte Reload
	je	LBB0_12
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	movq	_VQA_PREAMBLE_SIZE@GOTPCREL(%rip), %r14
	movl	(%r14), %edx
	movq	%r12, %rdi
	movq	%rbx, %rsi
	callq	_avio_read
	cmpl	(%r14), %eax
	jne	LBB0_8
## %bb.9:                               ##   in Loop: Header=BB0_7 Depth=1
	movq	%rbx, %rdi
	callq	_AV_RB32
	movl	%eax, %r13d
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_AV_RB32
	movl	%eax, %r14d
	movl	%r13d, %eax
	andl	$-8, %eax
	cmpl	$128, %eax
	je	LBB0_11
## %bb.10:                              ##   in Loop: Header=BB0_7 Depth=1
	movq	%r12, %rbx
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
	movl	%r13d, %edi
	callq	_av_fourcc2str
	movq	%r15, %rdi
	movl	%r12d, %esi
	movq	%rbx, %r12
	leaq	L_.str.1(%rip), %rdx
	movl	%eax, %ecx
	callq	_av_log
	jmp	LBB0_11
LBB0_8:
	movq	_EIO@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_AVERROR
	jmp	LBB0_13
LBB0_12:
	xorl	%eax, %eax
LBB0_13:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-48(%rbp), %rcx
	jne	LBB0_15
## %bb.14:
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_15:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_VQA_PREAMBLE_SIZE,4,2          ## @VQA_PREAMBLE_SIZE
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_AVMEDIA_TYPE_VIDEO,4,2         ## @AVMEDIA_TYPE_VIDEO
	.comm	_AV_CODEC_ID_WS_VQA,4,2         ## @AV_CODEC_ID_WS_VQA
	.comm	_SEEK_SET,4,2                   ## @SEEK_SET
	.comm	_VQA_HEADER_SIZE,4,2            ## @VQA_HEADER_SIZE
	.comm	_AV_LOG_ERROR,4,2               ## @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"invalid fps: %d\n"

	.comm	_AVERROR_INVALIDDATA,4,2        ## @AVERROR_INVALIDDATA
	.comm	_AVFMTCTX_NOHEADER,4,2          ## @AVFMTCTX_NOHEADER
	.comm	_EIO,4,2                        ## @EIO
L_.str.1:                               ## @.str.1
	.asciz	" note: unknown chunk seen (%s)\n"

	.no_dead_strip	_wsvqa_read_header
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function wsvqa_read_header
_wsvqa_read_header:                     ; @wsvqa_read_header
	.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
	sub	sp, sp, #16
	mov	x19, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-88]
	ldp	x20, x25, [x0, #8]
Lloh3:
	adrp	x27, _VQA_PREAMBLE_SIZE@GOTPAGE
Lloh4:
	ldr	x27, [x27, _VQA_PREAMBLE_SIZE@GOTPAGEOFF]
	ldr	w8, [x27]
	lsl	x8, x8, #3
	mov	x9, x8
Lloh5:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh6:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	add	x8, x8, #15
	and	x8, x8, #0xffffffff0
	sub	x21, x9, x8
	mov	sp, x21
	mov	x1, #0
	bl	_avformat_new_stream
	cbz	x0, LBB0_4
; %bb.1:
	mov	x22, x0
	str	xzr, [x0, #32]
	ldr	w8, [x0, #24]
Lloh7:
	adrp	x9, _AVMEDIA_TYPE_VIDEO@GOTPAGE
Lloh8:
	ldr	x9, [x9, _AVMEDIA_TYPE_VIDEO@GOTPAGEOFF]
	str	w8, [x25, #40]
Lloh9:
	ldr	w8, [x9]
	ldr	x9, [x0, #16]
Lloh10:
	adrp	x10, _AV_CODEC_ID_WS_VQA@GOTPAGE
Lloh11:
	ldr	x10, [x10, _AV_CODEC_ID_WS_VQA@GOTPAGEOFF]
Lloh12:
	ldr	w10, [x10]
	stp	w10, w8, [x9, #32]
	str	xzr, [x9, #24]
Lloh13:
	adrp	x8, _SEEK_SET@GOTPAGE
Lloh14:
	ldr	x8, [x8, _SEEK_SET@GOTPAGEOFF]
Lloh15:
	ldr	w2, [x8]
	mov	x0, x20
	mov	w1, #20
	bl	_avio_seek
	ldr	x1, [x22, #16]
Lloh16:
	adrp	x8, _VQA_HEADER_SIZE@GOTPAGE
Lloh17:
	ldr	x8, [x8, _VQA_HEADER_SIZE@GOTPAGEOFF]
Lloh18:
	ldr	w3, [x8]
	mov	x0, x19
	mov	x2, x20
	bl	_ff_get_extradata
	tbnz	x0, #63, LBB0_4
; %bb.2:
	ldr	x8, [x22, #16]
	ldr	x23, [x8]
	add	x0, x23, #48
	bl	_AV_RL16
	ldr	x8, [x22, #16]
	str	x0, [x8, #16]
	add	x0, x23, #64
	bl	_AV_RL16
	ldr	x8, [x22, #16]
	str	x0, [x8, #8]
	ldr	w24, [x23, #96]
	add	x0, x23, #32
	bl	_AV_RL16
	stp	x0, x0, [x22]
	sub	w8, w24, #31
	cmn	w8, #31
	b.hi	LBB0_6
; %bb.3:
Lloh19:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh20:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh21:
	ldr	w1, [x8]
Lloh22:
	adrp	x2, l_.str@PAGE
Lloh23:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, x19
	mov	x3, x24
	bl	_av_log
Lloh24:
	adrp	x8, _AVERROR_INVALIDDATA@GOTPAGE
Lloh25:
	ldr	x8, [x8, _AVERROR_INVALIDDATA@GOTPAGEOFF]
Lloh26:
	ldr	w0, [x8]
	b	LBB0_13
LBB0_4:
Lloh27:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh28:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh29:
	ldr	w0, [x8]
	ldur	x8, [x29, #-88]
Lloh30:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh31:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh32:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_15
; %bb.5:
	sub	sp, x29, #80
	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_6:
	mov	x0, x22
	mov	w1, #64
	mov	w2, #1
	mov	x3, x24
	bl	_avpriv_set_pts_info
	mov	x0, x23
	bl	_AV_RL16
	str	x0, [x25, #32]
	add	x0, x23, #192
	bl	_AV_RL16
	str	x0, [x25, #24]
	ldr	x8, [x23, #208]
	str	x8, [x25, #16]
	ldr	x8, [x23, #216]
	str	x8, [x25, #8]
	mov	w8, #-1
	str	w8, [x25]
Lloh33:
	adrp	x8, _AVFMTCTX_NOHEADER@GOTPAGE
Lloh34:
	ldr	x8, [x8, _AVFMTCTX_NOHEADER@GOTPAGEOFF]
Lloh35:
	ldr	w8, [x8]
	ldr	w9, [x19]
	orr	w8, w9, w8
	str	w8, [x19]
	add	x22, x21, #32
Lloh36:
	adrp	x28, _AV_LOG_ERROR@GOTPAGE
Lloh37:
	ldr	x28, [x28, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh38:
	adrp	x23, l_.str.1@PAGE
Lloh39:
	add	x23, x23, l_.str.1@PAGEOFF
	b	LBB0_8
LBB0_7:                                 ;   in Loop: Header=BB0_8 Depth=1
	mov	x0, x20
	mov	x1, x25
	bl	_avio_skip
	cmp	w24, #131
	b.eq	LBB0_12
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w2, [x27]
	mov	x0, x20
	mov	x1, x21
	bl	_avio_read
	ldr	w8, [x27]
	cmp	w0, w8
	b.ne	LBB0_11
; %bb.9:                                ;   in Loop: Header=BB0_8 Depth=1
	mov	x0, x21
	bl	_AV_RB32
	mov	x24, x0
	mov	x0, x22
	bl	_AV_RB32
	mov	x25, x0
	and	w8, w24, #0xfffffff8
	cmp	w8, #128
	b.eq	LBB0_7
; %bb.10:                               ;   in Loop: Header=BB0_8 Depth=1
	ldr	w26, [x28]
	mov	x0, x24
	bl	_av_fourcc2str
	mov	x3, x0
	mov	x0, x19
	mov	x1, x26
	mov	x2, x23
	bl	_av_log
	b	LBB0_7
LBB0_11:
Lloh40:
	adrp	x8, _EIO@GOTPAGE
Lloh41:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh42:
	ldr	w0, [x8]
	bl	_AVERROR
	b	LBB0_13
LBB0_12:
	mov	w0, #0
LBB0_13:
	ldur	x8, [x29, #-88]
Lloh43:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh44:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh45:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_15
; %bb.14:
	sub	sp, x29, #80
	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
LBB0_15:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpAdd	Lloh38, Lloh39
	.loh AdrpLdrGot	Lloh36, Lloh37
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.loh AdrpLdrGotLdr	Lloh40, Lloh41, Lloh42
	.loh AdrpLdrGotLdr	Lloh43, Lloh44, Lloh45
	.cfi_endproc
                                        ; -- End function
	.comm	_VQA_PREAMBLE_SIZE,4,2          ; @VQA_PREAMBLE_SIZE
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_AVMEDIA_TYPE_VIDEO,4,2         ; @AVMEDIA_TYPE_VIDEO
	.comm	_AV_CODEC_ID_WS_VQA,4,2         ; @AV_CODEC_ID_WS_VQA
	.comm	_SEEK_SET,4,2                   ; @SEEK_SET
	.comm	_VQA_HEADER_SIZE,4,2            ; @VQA_HEADER_SIZE
	.comm	_AV_LOG_ERROR,4,2               ; @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"invalid fps: %d\n"

	.comm	_AVERROR_INVALIDDATA,4,2        ; @AVERROR_INVALIDDATA
	.comm	_AVFMTCTX_NOHEADER,4,2          ; @AVFMTCTX_NOHEADER
	.comm	_EIO,4,2                        ; @EIO
l_.str.1:                               ; @.str.1
	.asciz	" note: unknown chunk seen (%s)\n"

	.no_dead_strip	_wsvqa_read_header
.subsections_via_symbols
