	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function matroska_parse_wavpack
_matroska_parse_wavpack:                ## @matroska_parse_wavpack
	.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	$88, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	(%rcx), %ebx
	cmpl	$12, %ebx
	jl	LBB0_2
## %bb.1:
	movq	(%rdi), %rax
	movq	(%rax), %rax
	cmpl	$1, (%rax)
	jg	LBB0_3
LBB0_2:
	movq	_AVERROR_INVALIDDATA@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
LBB0_15:
	movl	%ebx, %eax
	addq	$88, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_3:
	movq	%rsi, %r15
	movq	%rdx, -104(%rbp)                ## 8-byte Spill
	movq	%rcx, -112(%rbp)                ## 8-byte Spill
	movl	4(%rax), %edi
	callq	_AV_RL16
	movl	%eax, -64(%rbp)                 ## 4-byte Spill
	movq	%r15, %rdi
	callq	_AV_RL32
	movl	%eax, -60(%rbp)                 ## 4-byte Spill
	addl	$-4, %ebx
	addq	$16, %r15
	xorl	%eax, %eax
	movq	%rax, -96(%rbp)                 ## 8-byte Spill
	xorl	%r14d, %r14d
	xorl	%r12d, %r12d
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r15, %rdi
	callq	_AV_RL32
	movl	%eax, %r13d
	leaq	16(%r15), %rdi
	callq	_AV_RL32
	leaq	32(%r15), %rdi
	movl	%r13d, %ecx
	notl	%ecx
	testl	$6144, %ecx                     ## imm = 0x1800
	movl	%r13d, -76(%rbp)                ## 4-byte Spill
	movl	%eax, -72(%rbp)                 ## 4-byte Spill
	jne	LBB0_6
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	movq	%rdi, -88(%rbp)                 ## 8-byte Spill
	addl	$-8, %ebx
	movl	%ebx, -44(%rbp)                 ## 4-byte Spill
	movl	%ebx, %eax
	jmp	LBB0_11
	.p2align	4, 0x90
LBB0_6:                                 ##   in Loop: Header=BB0_4 Depth=1
	cmpl	$11, %ebx
	jbe	LBB0_7
## %bb.9:                               ##   in Loop: Header=BB0_4 Depth=1
	callq	_AV_RL32
                                        ## kill: def $eax killed $eax def $rax
	addl	$-12, %ebx
	cmpl	%eax, %ebx
	jl	LBB0_7
## %bb.10:                              ##   in Loop: Header=BB0_4 Depth=1
	movl	%ebx, -44(%rbp)                 ## 4-byte Spill
	addq	$48, %r15
	movq	%r15, -88(%rbp)                 ## 8-byte Spill
LBB0_11:                                ##   in Loop: Header=BB0_4 Depth=1
	movq	%rax, -128(%rbp)                ## 8-byte Spill
	movq	-96(%rbp), %rbx                 ## 8-byte Reload
	addl	%eax, %ebx
	addl	$32, %ebx
	movslq	%ebx, %r15
	movq	_AV_INPUT_BUFFER_PADDING_SIZE@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	%r15, %rsi
	movq	%r12, %rdi
	callq	_av_realloc
	testq	%rax, %rax
	je	LBB0_12
## %bb.13:                              ##   in Loop: Header=BB0_4 Depth=1
	movq	%rax, %r13
	movq	%r15, -120(%rbp)                ## 8-byte Spill
	movq	%rbx, -96(%rbp)                 ## 8-byte Spill
	movq	-128(%rbp), %r12                ## 8-byte Reload
	leal	32(%r12), %eax
	movl	%eax, -68(%rbp)                 ## 4-byte Spill
	movslq	%r14d, %r14
	leaq	(%r13,%r14,4), %r15
	movl	$119, %edi
	movl	$118, %esi
	movl	$112, %edx
	movl	$107, %ecx
	callq	_MKTAG
	movq	%r15, %rdi
	movl	%eax, %esi
	callq	_AV_WL32
	leaq	16(,%r14,4), %rdi
	addq	%r13, %rdi
	leal	24(%r12), %esi
	callq	_AV_WL32
	leaq	32(,%r14,4), %rdi
	addq	%r13, %rdi
	movl	-64(%rbp), %esi                 ## 4-byte Reload
	callq	_AV_WL16
	leaq	40(,%r14,4), %rdi
	addq	%r13, %rdi
	xorl	%esi, %esi
	callq	_AV_WL16
	leaq	48(,%r14,4), %rdi
	addq	%r13, %rdi
	xorl	%esi, %esi
	callq	_AV_WL32
	leaq	64(,%r14,4), %rdi
	addq	%r13, %rdi
	xorl	%esi, %esi
	callq	_AV_WL32
	leaq	80(,%r14,4), %rdi
	addq	%r13, %rdi
	movl	-60(%rbp), %esi                 ## 4-byte Reload
	callq	_AV_WL32
	leaq	96(,%r14,4), %rdi
	addq	%r13, %rdi
	movl	-76(%rbp), %esi                 ## 4-byte Reload
	callq	_AV_WL32
	leaq	112(,%r14,4), %rdi
	addq	%r13, %rdi
	movl	-72(%rbp), %esi                 ## 4-byte Reload
	callq	_AV_WL32
	leaq	128(,%r14,4), %rdi
	addq	%r13, %rdi
	movq	-88(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rsi
	movl	%r12d, %edx
	callq	_memcpy
	movslq	%r12d, %rax
	leaq	(%rbx,%rax,4), %r15
	movl	-44(%rbp), %ebx                 ## 4-byte Reload
	subl	%r12d, %ebx
	addl	-68(%rbp), %r14d                ## 4-byte Folded Reload
	movq	%r13, %r12
	cmpl	$7, %ebx
	jg	LBB0_4
## %bb.14:
	movq	-120(%rbp), %r14                ## 8-byte Reload
	leaq	(,%r14,4), %rdi
	addq	%r13, %rdi
	movq	_AV_INPUT_BUFFER_PADDING_SIZE@GOTPCREL(%rip), %rax
	movq	(%rax), %rdx
	xorl	%ebx, %ebx
	xorl	%esi, %esi
	callq	_memset
	movq	-104(%rbp), %rax                ## 8-byte Reload
	movq	%r13, (%rax)
	movq	-112(%rbp), %rax                ## 8-byte Reload
	movl	%r14d, (%rax)
	jmp	LBB0_15
LBB0_7:
	movq	%r12, -56(%rbp)
	movq	_AVERROR_INVALIDDATA@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	jmp	LBB0_8
LBB0_12:
	movq	%r12, -56(%rbp)
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_AVERROR
	movl	%eax, %ebx
LBB0_8:
	leaq	-56(%rbp), %rdi
	callq	_av_freep
	jmp	LBB0_15
	.cfi_endproc
                                        ## -- End function
	.comm	_AVERROR_INVALIDDATA,4,2        ## @AVERROR_INVALIDDATA
	.comm	_AV_INPUT_BUFFER_PADDING_SIZE,8,3 ## @AV_INPUT_BUFFER_PADDING_SIZE
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.no_dead_strip	_matroska_parse_wavpack
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function matroska_parse_wavpack
_matroska_parse_wavpack:                ; @matroska_parse_wavpack
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #144
	.cfi_def_cfa_offset 144
	stp	x28, x27, [sp, #48]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #64]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #80]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #96]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #112]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #128]            ; 16-byte Folded Spill
	add	x29, sp, #128
	.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	w22, [x3]
	cmp	w22, #12
	b.lt	LBB0_2
; %bb.1:
	ldr	x8, [x0]
	ldr	x8, [x8]
	ldr	w9, [x8]
	cmp	w9, #1
	b.gt	LBB0_4
LBB0_2:
Lloh0:
	adrp	x8, _AVERROR_INVALIDDATA@GOTPAGE
Lloh1:
	ldr	x8, [x8, _AVERROR_INVALIDDATA@GOTPAGEOFF]
Lloh2:
	ldr	w20, [x8]
LBB0_3:
	mov	x0, x20
	ldp	x29, x30, [sp, #128]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #112]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #96]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #80]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #64]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #144
	ret
LBB0_4:
	mov	x20, x1
	stp	x2, x3, [sp, #8]                ; 16-byte Folded Spill
	ldr	w0, [x8, #4]
	bl	_AV_RL16
	str	w0, [sp, #28]                   ; 4-byte Folded Spill
	mov	x0, x20
	bl	_AV_RL32
	str	w0, [sp, #24]                   ; 4-byte Folded Spill
	mov	w19, #0
	mov	w21, #0
	mov	x28, #0
	sub	w22, w22, #4
	add	x20, x20, #16
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x20
	bl	_AV_RL32
	mov	x24, x0
	mvn	w23, w0
	add	x0, x20, #16
	bl	_AV_RL32
	mov	x27, x0
	add	x25, x20, #32
	tst	w23, #0x1800
	stp	w0, w24, [sp, #32]              ; 8-byte Folded Spill
	b.ne	LBB0_7
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	sub	w26, w22, #8
	mov	x22, x26
	b	LBB0_10
LBB0_7:                                 ;   in Loop: Header=BB0_5 Depth=1
	cmp	w22, #11
	b.ls	LBB0_13
; %bb.8:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	x0, x25
	bl	_AV_RL32
	sub	w22, w22, #12
	cmp	w22, w0
	b.lt	LBB0_13
; %bb.9:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	x26, x0
	add	x25, x20, #48
LBB0_10:                                ;   in Loop: Header=BB0_5 Depth=1
	add	w23, w26, #32
	add	w19, w23, w19
	sxtw	x24, w19
Lloh3:
	adrp	x8, _AV_INPUT_BUFFER_PADDING_SIZE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _AV_INPUT_BUFFER_PADDING_SIZE@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
	add	x1, x8, x24
	mov	x0, x28
	bl	_av_realloc
	cbz	x0, LBB0_14
; %bb.11:                               ;   in Loop: Header=BB0_5 Depth=1
	mov	x27, x0
	add	x20, x0, w21, sxtw #2
	mov	w0, #119
	mov	w1, #118
	mov	w2, #112
	mov	w3, #107
	bl	_MKTAG
	mov	x1, x0
	mov	x0, x20
	bl	_AV_WL32
	add	x0, x20, #16
	add	w1, w26, #24
	bl	_AV_WL32
	add	x0, x20, #32
	ldr	w1, [sp, #28]                   ; 4-byte Folded Reload
	bl	_AV_WL16
	add	x0, x20, #40
	mov	w1, #0
	bl	_AV_WL16
	add	x0, x20, #48
	mov	w1, #0
	bl	_AV_WL32
	add	x0, x20, #64
	mov	w1, #0
	bl	_AV_WL32
	add	x0, x20, #80
	ldr	w1, [sp, #24]                   ; 4-byte Folded Reload
	bl	_AV_WL32
	add	x0, x20, #96
	ldr	w1, [sp, #36]                   ; 4-byte Folded Reload
	bl	_AV_WL32
	add	x0, x20, #112
	ldr	w1, [sp, #32]                   ; 4-byte Folded Reload
	bl	_AV_WL32
	add	x0, x20, #128
	mov	x1, x25
	mov	x2, x26
	bl	_memcpy
	add	x20, x25, w26, sxtw #2
	sub	w22, w22, w26
	add	w21, w23, w21
	mov	x28, x27
	cmp	w22, #7
	b.gt	LBB0_5
; %bb.12:
	add	x0, x27, x24, lsl #2
Lloh6:
	adrp	x8, _AV_INPUT_BUFFER_PADDING_SIZE@GOTPAGE
Lloh7:
	ldr	x8, [x8, _AV_INPUT_BUFFER_PADDING_SIZE@GOTPAGEOFF]
Lloh8:
	ldr	x2, [x8]
	mov	w1, #0
	bl	_memset
	mov	w20, #0
	ldr	x8, [sp, #8]                    ; 8-byte Folded Reload
	str	x27, [x8]
	ldr	x8, [sp, #16]                   ; 8-byte Folded Reload
	str	w19, [x8]
	b	LBB0_3
LBB0_13:
	str	x28, [sp, #40]
Lloh9:
	adrp	x8, _AVERROR_INVALIDDATA@GOTPAGE
Lloh10:
	ldr	x8, [x8, _AVERROR_INVALIDDATA@GOTPAGEOFF]
Lloh11:
	ldr	w20, [x8]
	b	LBB0_15
LBB0_14:
	str	x28, [sp, #40]
Lloh12:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh13:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh14:
	ldr	w0, [x8]
	bl	_AVERROR
	mov	x20, x0
LBB0_15:
	add	x0, sp, #40
	bl	_av_freep
	b	LBB0_3
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_AVERROR_INVALIDDATA,4,2        ; @AVERROR_INVALIDDATA
	.comm	_AV_INPUT_BUFFER_PADDING_SIZE,8,3 ; @AV_INPUT_BUFFER_PADDING_SIZE
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.no_dead_strip	_matroska_parse_wavpack
.subsections_via_symbols
