	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_encodeMuLaw                    ## -- Begin function encodeMuLaw
	.p2align	4, 0x90
_encodeMuLaw:                           ## @encodeMuLaw
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, -64(%rbp)                 ## 8-byte Spill
	movq	%rdi, %r12
	movq	_madeTable@GOTPCREL(%rip), %r14
	cmpq	$0, (%r14)
	jne	LBB0_4
## %bb.1:
	xorl	%ebx, %ebx
	movq	_mulawToShort@GOTPCREL(%rip), %r15
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	%rbx, %rdi
	callq	_MuLawDecode
	xorps	%xmm0, %xmm0
	cvtsi2ss	%rax, %xmm0
	cvttss2si	%xmm0, %eax
	movq	(%r15), %rcx
	movl	%eax, (%rcx,%rbx,4)
	incq	%rbx
	cmpq	$256, %rbx                      ## imm = 0x100
	jne	LBB0_2
## %bb.3:
	movq	_qtrue@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, (%r14)
LBB0_4:
	movl	(%r12), %r15d
	testl	%r15d, %r15d
	jle	LBB0_19
## %bb.5:
	addq	$8, %r12
	xorl	%r14d, %r14d
	xorl	%r13d, %r13d
	movq	%r12, -72(%rbp)                 ## 8-byte Spill
	jmp	LBB0_6
	.p2align	4, 0x90
LBB0_17:                                ##   in Loop: Header=BB0_6 Depth=1
	addq	%r12, -64(%rbp)                 ## 8-byte Folded Spill
	movq	-72(%rbp), %r12                 ## 8-byte Reload
	movl	-56(%rbp), %r15d                ## 4-byte Reload
	movl	-52(%rbp), %ebx                 ## 4-byte Reload
LBB0_18:                                ##   in Loop: Header=BB0_6 Depth=1
	movq	-48(%rbp), %r14                 ## 8-byte Reload
	movl	%ebx, (%r14)
	subl	%ebx, %r15d
	jle	LBB0_19
LBB0_6:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_12 Depth 2
	movq	_SND_CHUNK_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	addl	%ebx, %ebx
	cmpl	%ebx, %r15d
	cmovll	%r15d, %ebx
	xorl	%eax, %eax
	callq	_SND_malloc
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	cmpq	$0, (%r12)
	movq	%r12, %rax
	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, %rax
LBB0_9:                                 ##   in Loop: Header=BB0_6 Depth=1
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	movq	%rcx, (%rax)
LBB0_10:                                ##   in Loop: Header=BB0_6 Depth=1
	testl	%ebx, %ebx
	jle	LBB0_18
## %bb.11:                              ##   in Loop: Header=BB0_6 Depth=1
	movl	%r15d, -56(%rbp)                ## 4-byte Spill
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movq	8(%rax), %r14
	movl	%ebx, -52(%rbp)                 ## 4-byte Spill
	movl	%ebx, %r15d
	addq	%r15, %r15
	xorl	%r12d, %r12d
	jmp	LBB0_12
	.p2align	4, 0x90
LBB0_16:                                ##   in Loop: Header=BB0_12 Depth=2
	movl	%ebx, %edi
	callq	_MuLawEncode
	movq	%rax, (%r14,%r12,4)
	movq	_mulawToShort@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movl	%ebx, %r13d
	subl	(%rcx,%rax,4), %r13d
	addq	$2, %r12
	cmpq	%r12, %r15
	je	LBB0_17
LBB0_12:                                ##   Parent Loop BB0_6 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movswl	(%rax,%r12), %ebx
	addl	%r13d, %ebx
	cmpl	$-32767, %ebx                   ## imm = 0x8001
	jge	LBB0_14
## %bb.13:                              ##   in Loop: Header=BB0_12 Depth=2
	movl	$-32768, %ebx                   ## imm = 0x8000
LBB0_14:                                ##   in Loop: Header=BB0_12 Depth=2
	cmpl	$32767, %ebx                    ## imm = 0x7FFF
	jl	LBB0_16
## %bb.15:                              ##   in Loop: Header=BB0_12 Depth=2
	movl	$32767, %ebx                    ## imm = 0x7FFF
	jmp	LBB0_16
LBB0_19:
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.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	_encodeMuLaw                    ; -- Begin function encodeMuLaw
	.p2align	2
_encodeMuLaw:                           ; @encodeMuLaw
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.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
	mov	x19, x1
	mov	x20, x0
Lloh0:
	adrp	x23, _madeTable@GOTPAGE
Lloh1:
	ldr	x23, [x23, _madeTable@GOTPAGEOFF]
	ldr	x8, [x23]
Lloh2:
	adrp	x22, _mulawToShort@GOTPAGE
Lloh3:
	ldr	x22, [x22, _mulawToShort@GOTPAGEOFF]
	cbnz	x8, LBB0_4
; %bb.1:
	mov	x21, #0
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x21
	bl	_MuLawDecode
	scvtf	s0, x0
	fcvtzs	w8, s0
	ldr	x9, [x22]
	str	w8, [x9, x21, lsl #2]
	add	x21, x21, #1
	cmp	x21, #256
	b.ne	LBB0_2
; %bb.3:
Lloh4:
	adrp	x8, _qtrue@GOTPAGE
Lloh5:
	ldr	x8, [x8, _qtrue@GOTPAGEOFF]
Lloh6:
	ldr	x8, [x8]
	str	x8, [x23]
LBB0_4:
	ldr	w23, [x20]
	cmp	w23, #1
	b.lt	LBB0_14
; %bb.5:
	mov	x25, #0
	mov	w21, #0
	add	x8, x20, #8
	str	x8, [sp, #8]                    ; 8-byte Folded Spill
	mov	w26, #-32768
	mov	w27, #32767
	b	LBB0_7
LBB0_6:                                 ;   in Loop: Header=BB0_7 Depth=1
	str	w24, [x20]
	sub	w23, w23, w24
	mov	x25, x20
	cmp	w23, #0
	b.le	LBB0_14
LBB0_7:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_13 Depth 2
Lloh7:
	adrp	x8, _SND_CHUNK_SIZE@GOTPAGE
Lloh8:
	ldr	x8, [x8, _SND_CHUNK_SIZE@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	lsl	w8, w8, #1
	cmp	w23, w8
	csel	w24, w23, w8, lt
	bl	_SND_malloc
	mov	x20, x0
	ldr	x8, [sp, #8]                    ; 8-byte Folded Reload
	ldr	x9, [x8]
	cbz	x9, LBB0_10
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=1
	cbz	x25, LBB0_11
; %bb.9:                                ;   in Loop: Header=BB0_7 Depth=1
	add	x8, x25, #16
LBB0_10:                                ;   in Loop: Header=BB0_7 Depth=1
	str	x20, [x8]
LBB0_11:                                ;   in Loop: Header=BB0_7 Depth=1
	cmp	w24, #1
	b.lt	LBB0_6
; %bb.12:                               ;   in Loop: Header=BB0_7 Depth=1
	ldr	x25, [x20, #8]
	mov	x28, x24
LBB0_13:                                ;   Parent Loop BB0_7 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldrsh	w8, [x19], #2
	add	w8, w21, w8
	cmn	w8, #8, lsl #12                 ; =32768
	csel	w8, w8, w26, gt
	cmp	w8, w27
	csel	w21, w8, w27, lt
	mov	x0, x21
	bl	_MuLawEncode
	str	x0, [x25], #8
	ldr	x8, [x22]
	ldr	w8, [x8, x0, lsl #2]
	sub	w21, w21, w8
	subs	x28, x28, #1
	b.ne	LBB0_13
	b	LBB0_6
LBB0_14:
	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
	add	sp, sp, #112
	ret
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.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
