	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mkv_strip_wavpack
_mkv_strip_wavpack:                     ## @mkv_strip_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	$72, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r14
	movq	%rsi, %r12
	movq	%rdi, %r15
	movl	(%rdx), %ebx
	movl	%ebx, %edi
	callq	_av_malloc
	movq	%rax, -112(%rbp)
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	testq	%rax, %rax
	je	LBB0_17
## %bb.1:
	movq	%r12, -88(%rbp)                 ## 8-byte Spill
	movq	%r14, -96(%rbp)                 ## 8-byte Spill
	movq	_WV_HEADER_SIZE@GOTPCREL(%rip), %rax
	movl	$0, %r13d
	cmpl	(%rax), %ebx
	movq	-48(%rbp), %r14                 ## 8-byte Reload
	jge	LBB0_2
LBB0_15:
	movq	-88(%rbp), %rax                 ## 8-byte Reload
	movq	%r14, (%rax)
	movq	-96(%rbp), %rax                 ## 8-byte Reload
	movl	%r13d, (%rax)
	xorl	%ebx, %ebx
	jmp	LBB0_16
LBB0_17:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	addq	$72, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_AVERROR                        ## TAILCALL
LBB0_2:
	xorl	%r13d, %r13d
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_13:                                ##   in Loop: Header=BB0_3 Depth=1
	movslq	%r12d, %rax
	movq	-48(%rbp), %r14                 ## 8-byte Reload
	leaq	(%r14,%rax,4), %rdi
	movl	-80(%rbp), %esi
	callq	_AV_WL32
	addl	$12, %r13d
	movl	%r13d, %r12d
LBB0_14:                                ##   in Loop: Header=BB0_3 Depth=1
	movq	-104(%rbp), %rax                ## 8-byte Reload
	leaq	(%rax,%r15,4), %r15
	movslq	%r12d, %r13
	leaq	(%r14,%r13,4), %rdi
	movl	-80(%rbp), %edx
	movq	%r15, %rsi
	callq	_memcpy
	movslq	-80(%rbp), %rax
	leaq	(%r15,%rax,4), %r15
	subl	%eax, %ebx
	addl	%eax, %r13d
	movq	_WV_HEADER_SIZE@GOTPCREL(%rip), %rax
	cmpl	(%rax), %ebx
	jl	LBB0_15
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	leaq	-80(%rbp), %rdi
	movq	%r15, %rsi
	callq	_ff_wv_parse_header
	testl	%eax, %eax
	js	LBB0_4
## %bb.5:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	%r15, -104(%rbp)                ## 8-byte Spill
	movq	_WV_HEADER_SIZE@GOTPCREL(%rip), %rax
	movslq	(%rax), %r15
	subl	%r15d, %ebx
	cmpl	-80(%rbp), %ebx
	jl	LBB0_6
## %bb.8:                               ##   in Loop: Header=BB0_3 Depth=1
	cmpq	$0, -56(%rbp)
	je	LBB0_10
## %bb.9:                               ##   in Loop: Header=BB0_3 Depth=1
	movslq	%r13d, %r13
	leaq	(%r14,%r13,4), %rdi
	movl	-76(%rbp), %esi
	callq	_AV_WL32
	addl	$4, %r13d
LBB0_10:                                ##   in Loop: Header=BB0_3 Depth=1
	movslq	%r13d, %r12
	leaq	(%r14,%r12,4), %rdi
	movl	-72(%rbp), %esi
	callq	_AV_WL32
	leaq	(%r14,%r12,4), %rdi
	addq	$16, %rdi
	movl	-68(%rbp), %esi
	callq	_AV_WL32
	addl	$8, %r12d
	cmpq	$0, -56(%rbp)
	je	LBB0_13
## %bb.11:                              ##   in Loop: Header=BB0_3 Depth=1
	cmpq	$0, -64(%rbp)
	je	LBB0_13
## %bb.12:                              ##   in Loop: Header=BB0_3 Depth=1
	movq	-48(%rbp), %r14                 ## 8-byte Reload
	jmp	LBB0_14
LBB0_4:
	movl	%eax, %ebx
	jmp	LBB0_7
LBB0_6:
	movq	_AVERROR_INVALIDDATA@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
LBB0_7:
	leaq	-112(%rbp), %rdi
	callq	_av_freep
LBB0_16:
	movl	%ebx, %eax
	addq	$72, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_WV_HEADER_SIZE,4,2             ## @WV_HEADER_SIZE
	.comm	_AVERROR_INVALIDDATA,4,2        ## @AVERROR_INVALIDDATA
	.no_dead_strip	_mkv_strip_wavpack
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mkv_strip_wavpack
_mkv_strip_wavpack:                     ; @mkv_strip_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
	mov	x19, x2
	mov	x20, x1
	mov	x22, x0
	ldr	w23, [x2]
	mov	x0, x23
	bl	_av_malloc
	str	x0, [sp, #40]
	cbz	x0, LBB0_4
; %bb.1:
	mov	x21, x0
Lloh0:
	adrp	x25, _WV_HEADER_SIZE@GOTPAGE
Lloh1:
	ldr	x25, [x25, _WV_HEADER_SIZE@GOTPAGEOFF]
	ldr	w8, [x25]
	cmp	w23, w8
	b.ge	LBB0_5
; %bb.2:
	mov	w26, #0
LBB0_3:
	mov	w24, #0
	str	x21, [x20]
	str	w26, [x19]
	b	LBB0_17
LBB0_4:
Lloh2:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh3:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh4:
	ldr	w0, [x8]
	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
	b	_AVERROR
LBB0_5:
	mov	w26, #0
	b	LBB0_8
LBB0_6:                                 ;   in Loop: Header=BB0_8 Depth=1
	add	x0, x21, x23, lsl #2
	ldr	w1, [sp, #8]
	bl	_AV_WL32
	add	w23, w26, #12
LBB0_7:                                 ;   in Loop: Header=BB0_8 Depth=1
	add	x22, x22, x27, lsl #2
	ldr	w2, [sp, #8]
	add	x0, x21, w23, sxtw #2
	mov	x1, x22
	bl	_memcpy
	ldrsw	x8, [sp, #8]
	add	x22, x22, x8, lsl #2
	add	w26, w8, w23
	ldr	w9, [x25]
	sub	w23, w24, w8
	cmp	w23, w9
	b.lt	LBB0_3
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	add	x0, sp, #8
	mov	x1, x22
	bl	_ff_wv_parse_header
	tbnz	w0, #31, LBB0_14
; %bb.9:                                ;   in Loop: Header=BB0_8 Depth=1
	ldrsw	x27, [x25]
	ldr	w8, [sp, #8]
	sub	w24, w23, w27
	cmp	w24, w8
	b.lt	LBB0_15
; %bb.10:                               ;   in Loop: Header=BB0_8 Depth=1
	ldr	x8, [sp, #32]
	cbz	x8, LBB0_12
; %bb.11:                               ;   in Loop: Header=BB0_8 Depth=1
	add	x0, x21, w26, sxtw #2
	ldr	w1, [sp, #12]
	bl	_AV_WL32
	add	w26, w26, #4
LBB0_12:                                ;   in Loop: Header=BB0_8 Depth=1
	sxtw	x28, w26
	ldr	w1, [sp, #16]
	add	x23, x21, w26, sxtw #2
	mov	x0, x23
	bl	_AV_WL32
	add	x0, x23, #16
	ldr	w1, [sp, #20]
	bl	_AV_WL32
	add	x23, x28, #8
	ldr	x8, [sp, #32]
	cbz	x8, LBB0_6
; %bb.13:                               ;   in Loop: Header=BB0_8 Depth=1
	ldr	x8, [sp, #24]
	cbnz	x8, LBB0_7
	b	LBB0_6
LBB0_14:
	mov	x24, x0
	b	LBB0_16
LBB0_15:
Lloh5:
	adrp	x8, _AVERROR_INVALIDDATA@GOTPAGE
Lloh6:
	ldr	x8, [x8, _AVERROR_INVALIDDATA@GOTPAGEOFF]
Lloh7:
	ldr	w24, [x8]
LBB0_16:
	add	x0, sp, #40
	bl	_av_freep
LBB0_17:
	mov	x0, x24
	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
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_WV_HEADER_SIZE,4,2             ; @WV_HEADER_SIZE
	.comm	_AVERROR_INVALIDDATA,4,2        ; @AVERROR_INVALIDDATA
	.no_dead_strip	_mkv_strip_wavpack
.subsections_via_symbols
