	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal4,4byte_literals
	.p2align	2                               ## -- Begin function encodeWavelet
LCPI0_0:
	.long	0x46fffe00                      ## float 32767
LCPI0_1:
	.long	0xc7000000                      ## float -32768
	.section	__TEXT,__text,regular,pure_instructions
	.globl	_encodeWavelet
	.p2align	4, 0x90
_encodeWavelet:                         ## @encodeWavelet
	.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
	pushq	%rax
	movl	$16440, %eax                    ## imm = 0x4038
	callq	____chkstk_darwin
	subq	%rax, %rsp
	popq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %rbx
	movq	%rdi, %r13
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	leaq	-16448(%rbp), %rdi
	movl	$16388, %esi                    ## imm = 0x4004
	callq	___bzero
	movq	_madeTable@GOTPCREL(%rip), %r14
	cmpq	$0, (%r14)
	jne	LBB0_4
## %bb.1:
	xorl	%r15d, %r15d
	movq	_mulawToShort@GOTPCREL(%rip), %r12
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movl	%r15d, %edi
	callq	_MuLawDecode
	xorps	%xmm0, %xmm0
	cvtsi2ss	%rax, %xmm0
	movq	(%r12), %rax
	movss	%xmm0, (%rax,%r15,4)
	incq	%r15
	cmpq	$256, %r15                      ## imm = 0x100
	jne	LBB0_2
## %bb.3:
	movq	_qtrue@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, (%r14)
LBB0_4:
	movl	(%r13), %r15d
	testl	%r15d, %r15d
	jle	LBB0_26
## %bb.5:
	addq	$8, %r13
	xorl	%r14d, %r14d
	movq	%r13, -16472(%rbp)              ## 8-byte Spill
	jmp	LBB0_6
	.p2align	4, 0x90
LBB0_25:                                ##   in Loop: Header=BB0_6 Depth=1
	movq	-16456(%rbp), %r14              ## 8-byte Reload
	movl	%r12d, (%r14)
	movl	-16460(%rbp), %r15d             ## 4-byte Reload
	subl	%r12d, %r15d
	movq	-16472(%rbp), %r13              ## 8-byte Reload
	jle	LBB0_26
LBB0_6:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_15 Depth 2
                                        ##     Child Loop BB0_19 Depth 2
                                        ##     Child Loop BB0_21 Depth 2
	movq	_SND_CHUNK_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
	addl	%r12d, %r12d
	cmpl	%r12d, %r15d
	cmovll	%r15d, %r12d
	cmpl	$5, %r12d
	movl	$4, %eax
	cmovll	%eax, %r12d
	xorl	%eax, %eax
	callq	_SND_malloc
	movq	%rax, -16456(%rbp)              ## 8-byte Spill
	cmpq	$0, (%r13)
	je	LBB0_9
## %bb.7:                               ##   in Loop: Header=BB0_6 Depth=1
	testq	%r14, %r14
	je	LBB0_10
## %bb.8:                               ##   in Loop: Header=BB0_6 Depth=1
	addq	$16, %r14
	movq	%r14, %r13
LBB0_9:                                 ##   in Loop: Header=BB0_6 Depth=1
	movq	-16456(%rbp), %rcx              ## 8-byte Reload
	movq	%rcx, (%r13)
LBB0_10:                                ##   in Loop: Header=BB0_6 Depth=1
	movl	%r12d, %r14d
	cmpl	$8, %r12d
	movl	%r15d, -16460(%rbp)             ## 4-byte Spill
	jae	LBB0_12
## %bb.11:                              ##   in Loop: Header=BB0_6 Depth=1
	xorl	%eax, %eax
	jmp	LBB0_19
	.p2align	4, 0x90
LBB0_12:                                ##   in Loop: Header=BB0_6 Depth=1
	movl	%r14d, %eax
	andl	$2147483640, %eax               ## imm = 0x7FFFFFF8
	leaq	-8(%rax), %rdx
	movq	%rdx, %rcx
	shrq	$3, %rcx
	incq	%rcx
	testq	%rdx, %rdx
	je	LBB0_13
## %bb.14:                              ##   in Loop: Header=BB0_6 Depth=1
	movq	%rcx, %rsi
	andq	$-2, %rsi
	xorl	%edx, %edx
	.p2align	4, 0x90
LBB0_15:                                ##   Parent Loop BB0_6 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	pmovsxwd	(%rbx,%rdx,2), %xmm0
	pmovsxwd	8(%rbx,%rdx,2), %xmm1
	cvtdq2ps	%xmm0, %xmm0
	cvtdq2ps	%xmm1, %xmm1
	movaps	%xmm0, -16448(%rbp,%rdx,4)
	movaps	%xmm1, -16432(%rbp,%rdx,4)
	pmovsxwd	16(%rbx,%rdx,2), %xmm0
	pmovsxwd	24(%rbx,%rdx,2), %xmm1
	cvtdq2ps	%xmm0, %xmm0
	cvtdq2ps	%xmm1, %xmm1
	movaps	%xmm0, -16416(%rbp,%rdx,4)
	movaps	%xmm1, -16400(%rbp,%rdx,4)
	addq	$16, %rdx
	addq	$-2, %rsi
	jne	LBB0_15
## %bb.16:                              ##   in Loop: Header=BB0_6 Depth=1
	testb	$1, %cl
	je	LBB0_18
LBB0_17:                                ##   in Loop: Header=BB0_6 Depth=1
	pmovsxwd	(%rbx,%rdx,2), %xmm0
	pmovsxwd	8(%rbx,%rdx,2), %xmm1
	cvtdq2ps	%xmm0, %xmm0
	cvtdq2ps	%xmm1, %xmm1
	movaps	%xmm0, -16448(%rbp,%rdx,4)
	movaps	%xmm1, -16432(%rbp,%rdx,4)
LBB0_18:                                ##   in Loop: Header=BB0_6 Depth=1
	leaq	(%rbx,%rax,2), %rbx
	cmpq	%r14, %rax
	je	LBB0_20
	.p2align	4, 0x90
LBB0_19:                                ##   Parent Loop BB0_6 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movswl	(%rbx), %ecx
	xorps	%xmm0, %xmm0
	cvtsi2ss	%ecx, %xmm0
	movss	%xmm0, -16448(%rbp,%rax,4)
	addq	$2, %rbx
	incq	%rax
	cmpq	%rax, %r14
	jne	LBB0_19
LBB0_20:                                ##   in Loop: Header=BB0_6 Depth=1
	leaq	-16448(%rbp), %rdi
	movl	%r12d, %esi
	movl	$1, %edx
	callq	_wt1
	movq	-16456(%rbp), %rax              ## 8-byte Reload
	movq	8(%rax), %r13
	xorl	%r15d, %r15d
	jmp	LBB0_21
	.p2align	4, 0x90
LBB0_24:                                ##   in Loop: Header=BB0_21 Depth=2
	cvttss2si	%xmm0, %eax
	movswl	%ax, %edi
	callq	_MuLawEncode
	movl	%eax, (%r13,%r15,4)
	incq	%r15
	cmpq	%r15, %r14
	je	LBB0_25
LBB0_21:                                ##   Parent Loop BB0_6 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movss	-16448(%rbp,%r15,4), %xmm1      ## xmm1 = mem[0],zero,zero,zero
	movss	LCPI0_0(%rip), %xmm0            ## xmm0 = mem[0],zero,zero,zero
	ucomiss	%xmm0, %xmm1
	ja	LBB0_24
## %bb.22:                              ##   in Loop: Header=BB0_21 Depth=2
	movss	LCPI0_1(%rip), %xmm0            ## xmm0 = mem[0],zero,zero,zero
	ucomiss	%xmm1, %xmm0
	movaps	%xmm1, %xmm0
	jbe	LBB0_24
## %bb.23:                              ##   in Loop: Header=BB0_21 Depth=2
	movss	LCPI0_1(%rip), %xmm0            ## xmm0 = mem[0],zero,zero,zero
	jmp	LBB0_24
LBB0_13:                                ##   in Loop: Header=BB0_6 Depth=1
	xorl	%edx, %edx
	testb	$1, %cl
	jne	LBB0_17
	jmp	LBB0_18
LBB0_26:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_28
## %bb.27:
	addq	$16440, %rsp                    ## imm = 0x4038
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_28:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_madeTable,8,3                  ## @madeTable
	.comm	_mulawToShort,8,3               ## @mulawToShort
	.comm	_qtrue,8,3                      ## @qtrue
	.comm	_SND_CHUNK_SIZE,4,2             ## @SND_CHUNK_SIZE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_encodeWavelet                  ; -- Begin function encodeWavelet
	.p2align	2
_encodeWavelet:                         ; @encodeWavelet
	.cfi_startproc
; %bb.0:
	stp	d9, d8, [sp, #-112]!            ; 16-byte Folded Spill
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	.cfi_offset b8, -104
	.cfi_offset b9, -112
	mov	w9, #16416
Lloh0:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh1:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	sub	sp, sp, #4, lsl #12             ; =16384
	sub	sp, sp, #32
	mov	x21, x1
	mov	x19, x0
Lloh2:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh3:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh4:
	ldr	x8, [x8]
	stur	x8, [x29, #-112]
	add	x0, sp, #12
	mov	w1, #16388
	bl	_bzero
Lloh5:
	adrp	x22, _madeTable@GOTPAGE
Lloh6:
	ldr	x22, [x22, _madeTable@GOTPAGEOFF]
	ldr	x8, [x22]
	cbnz	x8, LBB0_4
; %bb.1:
	mov	x20, #0
Lloh7:
	adrp	x23, _mulawToShort@GOTPAGE
Lloh8:
	ldr	x23, [x23, _mulawToShort@GOTPAGEOFF]
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x20
	bl	_MuLawDecode
	scvtf	s0, x0
	ldr	x8, [x23]
	str	s0, [x8, x20, lsl #2]
	add	x20, x20, #1
	cmp	x20, #256
	b.ne	LBB0_2
; %bb.3:
Lloh9:
	adrp	x8, _qtrue@GOTPAGE
Lloh10:
	ldr	x8, [x8, _qtrue@GOTPAGEOFF]
Lloh11:
	ldr	x8, [x8]
	str	x8, [x22]
LBB0_4:
	ldr	w22, [x19]
	cmp	w22, #1
	b.lt	LBB0_23
; %bb.5:
	mov	x20, #0
	add	x23, x19, #8
	add	x8, sp, #12
	add	x25, x8, #32
	mov	w27, #4
	movi.2s	v8, #199, lsl #24
	b	LBB0_7
LBB0_6:                                 ;   in Loop: Header=BB0_7 Depth=1
	str	w26, [x19]
	sub	w22, w22, w26
	mov	x21, x28
	mov	x20, x19
	cmp	w22, #0
	b.le	LBB0_23
LBB0_7:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_14 Depth 2
                                        ;     Child Loop BB0_17 Depth 2
                                        ;     Child Loop BB0_20 Depth 2
Lloh12:
	adrp	x8, _SND_CHUNK_SIZE@GOTPAGE
Lloh13:
	ldr	x8, [x8, _SND_CHUNK_SIZE@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	lsl	w8, w8, #1
	cmp	w22, w8
	csel	w8, w22, w8, lt
	cmp	w8, #4
	csel	w26, w8, w27, gt
	bl	_SND_malloc
	mov	x19, x0
	ldr	x9, [x23]
	mov	x8, x23
	cbz	x9, LBB0_10
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=1
	cbz	x20, LBB0_11
; %bb.9:                                ;   in Loop: Header=BB0_7 Depth=1
	add	x8, x20, #16
LBB0_10:                                ;   in Loop: Header=BB0_7 Depth=1
	str	x19, [x8]
LBB0_11:                                ;   in Loop: Header=BB0_7 Depth=1
	cmp	w26, #16
	b.hs	LBB0_13
; %bb.12:                               ;   in Loop: Header=BB0_7 Depth=1
	mov	x8, #0
	mov	x28, x21
	b	LBB0_16
LBB0_13:                                ;   in Loop: Header=BB0_7 Depth=1
	and	x8, x26, #0x7ffffff0
	add	x28, x21, x8, lsl #1
	add	x9, x21, #16
	mov	x10, x25
	mov	x11, x8
LBB0_14:                                ;   Parent Loop BB0_7 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldp	d0, d1, [x9, #-16]
	ldp	d2, d3, [x9], #32
	sshll.4s	v0, v0, #0
	scvtf.4s	v0, v0
	sshll.4s	v1, v1, #0
	scvtf.4s	v1, v1
	sshll.4s	v2, v2, #0
	scvtf.4s	v2, v2
	sshll.4s	v3, v3, #0
	scvtf.4s	v3, v3
	stp	q0, q1, [x10, #-32]
	stp	q2, q3, [x10], #64
	subs	x11, x11, #16
	b.ne	LBB0_14
; %bb.15:                               ;   in Loop: Header=BB0_7 Depth=1
	cmp	x8, x26
	b.eq	LBB0_18
LBB0_16:                                ;   in Loop: Header=BB0_7 Depth=1
	add	x9, sp, #12
	add	x9, x9, x8, lsl #2
	sub	x8, x26, x8
LBB0_17:                                ;   Parent Loop BB0_7 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldrsh	w10, [x28], #2
	scvtf	s0, w10
	str	s0, [x9], #4
	subs	x8, x8, #1
	b.ne	LBB0_17
LBB0_18:                                ;   in Loop: Header=BB0_7 Depth=1
	add	x21, sp, #12
	add	x0, sp, #12
	mov	x1, x26
	mov	w2, #1
	bl	_wt1
	ldr	x24, [x19, #8]
	mov	x20, x26
	b	LBB0_20
LBB0_19:                                ;   in Loop: Header=BB0_20 Depth=2
	fcvtzs	w0, s0
	bl	_MuLawEncode
	str	w0, [x24], #4
	add	x21, x21, #4
	subs	x20, x20, #1
	b.eq	LBB0_6
LBB0_20:                                ;   Parent Loop BB0_7 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	s1, [x21]
	mov	w8, #65024
	movk	w8, #18175, lsl #16
	fmov	s0, w8
	fcmp	s1, s0
	b.gt	LBB0_19
; %bb.21:                               ;   in Loop: Header=BB0_20 Depth=2
	fcmp	s1, s8
	fmov	s0, s1
	b.pl	LBB0_19
; %bb.22:                               ;   in Loop: Header=BB0_20 Depth=2
	movi.2s	v0, #199, lsl #24
	b	LBB0_19
LBB0_23:
	ldur	x8, [x29, #-112]
Lloh15:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh16:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh17:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_25
; %bb.24:
	add	sp, sp, #4, lsl #12             ; =16384
	add	sp, sp, #32
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	ldp	d9, d8, [sp], #112              ; 16-byte Folded Reload
	ret
LBB0_25:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_madeTable,8,3                  ; @madeTable
	.comm	_mulawToShort,8,3               ; @mulawToShort
	.comm	_qtrue,8,3                      ; @qtrue
	.comm	_SND_CHUNK_SIZE,4,2             ; @SND_CHUNK_SIZE
.subsections_via_symbols
