	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function wavpack_encode_frame
_wavpack_encode_frame:                  ## @wavpack_encode_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, %r14
	movq	%rdx, %r12
	movq	%rsi, %r15
	movq	%rdi, %r13
	movq	8(%rdi), %rbx
	movl	(%rdx), %edx
	movl	%edx, (%rbx)
	movq	16(%rbx), %rdi
	movq	32(%rbx), %rsi
	shll	$2, %edx
	callq	_av_fast_padded_malloc
	movq	16(%rbx), %rdi
	cmpl	$0, (%rdi)
	je	LBB0_22
## %bb.1:
	movl	(%r13), %eax
	cmpl	$2, %eax
	jl	LBB0_4
## %bb.2:
	addq	$4, %rdi
	movq	32(%rbx), %rsi
	addq	$4, %rsi
	movl	(%rbx), %edx
	shll	$2, %edx
	callq	_av_fast_padded_malloc
	movq	16(%rbx), %rax
	cmpl	$0, 4(%rax)
	je	LBB0_22
## %bb.3:
	movl	(%r13), %eax
LBB0_4:
	movq	%r14, -56(%rbp)                 ## 8-byte Spill
	movl	(%rbx), %ecx
	movq	%r15, %r14
	leal	200(,%rcx,8), %r15d
	imull	%eax, %r15d
	movq	%r13, %rdi
	movq	%r14, %rsi
	movl	%r15d, %edx
	xorl	%ecx, %ecx
	callq	_ff_alloc_packet2
	testl	%eax, %eax
	js	LBB0_21
## %bb.5:
	movq	%r14, -48(%rbp)                 ## 8-byte Spill
	movq	8(%r14), %r14
	movl	$0, 4(%rbx)
	cmpl	$0, (%r13)
	jle	LBB0_6
	.p2align	4, 0x90
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	movq	%rbx, %rdi
	callq	_set_samplerate
	movq	24(%rbx), %rcx
	movl	(%rcx), %eax
	cmpl	$128, %eax
	je	LBB0_11
## %bb.8:                               ##   in Loop: Header=BB0_7 Depth=1
	cmpl	$130, %eax
	je	LBB0_12
## %bb.9:                               ##   in Loop: Header=BB0_7 Depth=1
	cmpl	$129, %eax
	jne	LBB0_14
## %bb.10:                              ##   in Loop: Header=BB0_7 Depth=1
	movl	8(%rbx), %eax
	orl	$1, %eax
	jmp	LBB0_13
	.p2align	4, 0x90
LBB0_11:                                ##   in Loop: Header=BB0_7 Depth=1
	xorl	%eax, %eax
	cmpl	$25, 4(%rcx)
	setl	%al
	xorl	$3, %eax
	orl	8(%rbx), %eax
	jmp	LBB0_13
	.p2align	4, 0x90
LBB0_12:                                ##   in Loop: Header=BB0_7 Depth=1
	movq	_WV_FLOAT_DATA@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	8(%rbx), %eax
	orl	$3, %eax
LBB0_13:                                ##   in Loop: Header=BB0_7 Depth=1
	movl	%eax, 8(%rbx)
LBB0_14:                                ##   in Loop: Header=BB0_7 Depth=1
	movq	8(%r12), %rax
	movslq	4(%rbx), %rcx
	movl	(%rax,%rcx,4), %esi
	movq	16(%rbx), %rax
	movl	(%rax), %edx
	movl	(%rbx), %ecx
	movq	%rbx, %rdi
	callq	_fill_buffer
	movl	(%r13), %ecx
	movslq	4(%rbx), %rax
	subl	%eax, %ecx
	cmpl	$1, %ecx
	jne	LBB0_16
## %bb.15:                              ##   in Loop: Header=BB0_7 Depth=1
	movl	8(%rbx), %eax
	movq	_WV_MONO@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	jmp	LBB0_17
	.p2align	4, 0x90
LBB0_16:                                ##   in Loop: Header=BB0_7 Depth=1
	movq	_WV_CROSS_DECORR@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	%ecx, 8(%rbx)
	movq	8(%r12), %rcx
	movl	4(%rcx,%rax,4), %esi
	movq	16(%rbx), %rax
	movl	4(%rax), %edx
	movl	(%rbx), %ecx
	movq	%rbx, %rdi
	callq	_fill_buffer
	movl	8(%rbx), %eax
LBB0_17:                                ##   in Loop: Header=BB0_7 Depth=1
	movq	_MAG_LSB@GOTPCREL(%rip), %rcx
	movzbl	(%rcx), %ecx
	movl	%eax, %edx
	andl	$3, %edx
	leal	7(,%rdx,8), %edx
	shll	%cl, %edx
	addl	%eax, %edx
	movl	%edx, 8(%rbx)
	movq	16(%rbx), %rax
	movl	(%rax), %esi
	movl	4(%rax), %edx
	movq	%rbx, %rdi
	movq	%r14, %rcx
	movl	%r15d, %r8d
	callq	_wavpack_encode_block
	testl	%eax, %eax
	js	LBB0_21
## %bb.18:                              ##   in Loop: Header=BB0_7 Depth=1
	movl	%eax, %ecx
	leaq	(%r14,%rcx,4), %r14
	subl	%eax, %r15d
	movl	4(%rbx), %eax
	cmpl	(%r13), %eax
	jl	LBB0_7
## %bb.19:
	movq	-48(%rbp), %r15                 ## 8-byte Reload
	movq	8(%r15), %rax
	jmp	LBB0_20
LBB0_22:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_AVERROR                        ## TAILCALL
LBB0_6:
	movq	%r14, %rax
	movq	-48(%rbp), %r15                 ## 8-byte Reload
LBB0_20:
	subq	%rax, %r14
	movl	(%r12), %esi
	addl	%esi, 12(%rbx)
	movl	4(%r12), %eax
	movl	%eax, 16(%r15)
	shrq	$2, %r14
	movl	%r14d, (%r15)
	movq	%r13, %rdi
	callq	_ff_samples_to_time_base
	movl	%eax, 4(%r15)
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movl	$1, (%rax)
	xorl	%eax, %eax
LBB0_21:
	addq	$24, %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_FLOAT_DATA,4,2              ## @WV_FLOAT_DATA
	.comm	_WV_MONO,4,2                    ## @WV_MONO
	.comm	_WV_CROSS_DECORR,4,2            ## @WV_CROSS_DECORR
	.comm	_MAG_LSB,4,2                    ## @MAG_LSB
	.no_dead_strip	_wavpack_encode_frame
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function wavpack_encode_frame
_wavpack_encode_frame:                  ; @wavpack_encode_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
	mov	x19, x3
	mov	x22, x2
	mov	x20, x1
	mov	x21, x0
	ldr	x23, [x0, #8]
	ldr	w8, [x2]
	str	w8, [x23]
	ldr	x0, [x23, #16]
	ldr	x1, [x23, #32]
	lsl	w2, w8, #2
	bl	_av_fast_padded_malloc
	ldr	x9, [x23, #16]
	ldr	w8, [x9]
	cbz	w8, LBB0_20
; %bb.1:
	ldr	w8, [x21]
	cmp	w8, #2
	b.lt	LBB0_4
; %bb.2:
	add	x0, x9, #4
	ldr	x8, [x23, #32]
	add	x1, x8, #4
	ldr	w8, [x23]
	lsl	w2, w8, #2
	bl	_av_fast_padded_malloc
	ldr	x8, [x23, #16]
	ldr	w8, [x8, #4]
	cbz	w8, LBB0_20
; %bb.3:
	ldr	w8, [x21]
LBB0_4:
	ldr	w9, [x23]
	lsl	w9, w9, #3
	add	w9, w9, #200
	mul	w25, w9, w8
	mov	x0, x21
	mov	x1, x20
	mov	x2, x25
	mov	w3, #0
	bl	_ff_alloc_packet2
	tbnz	w0, #31, LBB0_23
; %bb.5:
	ldr	x24, [x20, #8]
	str	wzr, [x23, #4]
	ldr	w8, [x21]
	cmp	w8, #1
	b.lt	LBB0_21
; %bb.6:
Lloh0:
	adrp	x27, _WV_MONO@GOTPAGE
Lloh1:
	ldr	x27, [x27, _WV_MONO@GOTPAGEOFF]
Lloh2:
	adrp	x28, _MAG_LSB@GOTPAGE
Lloh3:
	ldr	x28, [x28, _MAG_LSB@GOTPAGEOFF]
Lloh4:
	adrp	x26, _WV_CROSS_DECORR@GOTPAGE
Lloh5:
	ldr	x26, [x26, _WV_CROSS_DECORR@GOTPAGEOFF]
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x23
	bl	_set_samplerate
	ldr	x9, [x23, #24]
	ldr	w8, [x9]
	cmp	w8, #128
	b.eq	LBB0_11
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=1
	cmp	w8, #130
	b.eq	LBB0_12
; %bb.9:                                ;   in Loop: Header=BB0_7 Depth=1
	cmp	w8, #129
	b.ne	LBB0_14
; %bb.10:                               ;   in Loop: Header=BB0_7 Depth=1
	ldr	w8, [x23, #8]
	orr	w8, w8, #0x1
	b	LBB0_13
LBB0_11:                                ;   in Loop: Header=BB0_7 Depth=1
	ldr	w8, [x9, #4]
	cmp	w8, #25
	mov	w8, #2
	cinc	w8, w8, ge
	ldr	w9, [x23, #8]
	orr	w8, w8, w9
	b	LBB0_13
LBB0_12:                                ;   in Loop: Header=BB0_7 Depth=1
Lloh6:
	adrp	x8, _WV_FLOAT_DATA@GOTPAGE
Lloh7:
	ldr	x8, [x8, _WV_FLOAT_DATA@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	ldr	w9, [x23, #8]
	orr	w8, w8, w9
	orr	w8, w8, #0x3
LBB0_13:                                ;   in Loop: Header=BB0_7 Depth=1
	str	w8, [x23, #8]
LBB0_14:                                ;   in Loop: Header=BB0_7 Depth=1
	ldr	x8, [x22, #8]
	ldp	w3, w9, [x23]
                                        ; kill: def $w9 killed $w9 def $x9
	sxtw	x9, w9
	ldr	w1, [x8, x9, lsl #2]
	ldr	x8, [x23, #16]
	ldr	w2, [x8]
	mov	x0, x23
	bl	_fill_buffer
	ldr	w9, [x21]
	ldr	w8, [x23, #4]
	sub	w9, w9, w8
	cmp	w9, #1
	b.ne	LBB0_16
; %bb.15:                               ;   in Loop: Header=BB0_7 Depth=1
	ldr	w8, [x27]
	ldr	w9, [x23, #8]
	orr	w8, w9, w8
	b	LBB0_17
LBB0_16:                                ;   in Loop: Header=BB0_7 Depth=1
	ldr	w9, [x26]
	ldr	w10, [x23, #8]
	orr	w9, w10, w9
	str	w9, [x23, #8]
	ldr	x9, [x22, #8]
	add	w8, w8, #1
	ldr	w1, [x9, w8, sxtw #2]
	ldr	x8, [x23, #16]
	ldr	w2, [x8, #4]
	ldr	w3, [x23]
	mov	x0, x23
	bl	_fill_buffer
	ldr	w8, [x23, #8]
LBB0_17:                                ;   in Loop: Header=BB0_7 Depth=1
	ldr	w9, [x28]
	mov	w10, #7
	bfi	w10, w8, #3, #2
	lsl	w9, w10, w9
	add	w8, w9, w8
	str	w8, [x23, #8]
	ldr	x8, [x23, #16]
	ldp	w1, w2, [x8]
	mov	x0, x23
	mov	x3, x24
	mov	x4, x25
	bl	_wavpack_encode_block
	tbnz	w0, #31, LBB0_23
; %bb.18:                               ;   in Loop: Header=BB0_7 Depth=1
	add	x24, x24, w0, uxtw #2
	sub	w25, w25, w0
	ldr	w8, [x23, #4]
	ldr	w9, [x21]
	cmp	w8, w9
	b.lt	LBB0_7
; %bb.19:
	ldr	x8, [x20, #8]
	b	LBB0_22
LBB0_20:
Lloh9:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh10:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh11:
	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_21:
	mov	x8, x24
LBB0_22:
	ldr	w9, [x23, #12]
	ldp	w1, w10, [x22]
	add	w9, w9, w1
	str	w9, [x23, #12]
	str	w10, [x20, #16]
	sub	x8, x24, x8
	lsr	x8, x8, #2
	str	w8, [x20]
	mov	x0, x21
	bl	_ff_samples_to_time_base
	mov	x8, x0
	mov	w0, #0
	str	w8, [x20, #4]
	mov	w8, #1
	str	w8, [x19]
LBB0_23:
	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 AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_WV_FLOAT_DATA,4,2              ; @WV_FLOAT_DATA
	.comm	_WV_MONO,4,2                    ; @WV_MONO
	.comm	_WV_CROSS_DECORR,4,2            ; @WV_CROSS_DECORR
	.comm	_MAG_LSB,4,2                    ; @MAG_LSB
	.no_dead_strip	_wavpack_encode_frame
.subsections_via_symbols
