	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mulaw_encode
_mulaw_encode:                          ## @mulaw_encode
	.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
                                        ## kill: def $ecx killed $ecx def $rcx
	movq	%rcx, -48(%rbp)                 ## 8-byte Spill
	movq	%rsi, -80(%rbp)                 ## 8-byte Spill
	movq	%rdi, -64(%rbp)                 ## 8-byte Spill
	movl	4(%rdi), %eax
	movq	%rax, -96(%rbp)                 ## 8-byte Spill
	testl	%eax, %eax
	jle	LBB0_10
## %bb.1:
	movq	%rdx, %rbx
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movq	8(%rax), %rdi
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	incl	%eax
	movl	%eax, -52(%rbp)                 ## 4-byte Spill
	xorl	%ecx, %ecx
	movq	%rdx, -72(%rbp)                 ## 8-byte Spill
	movq	%rdi, -88(%rbp)                 ## 8-byte Spill
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_5:                                 ##   in Loop: Header=BB0_2 Depth=1
	movl	$0, (%rbx,%r14)
LBB0_9:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	-104(%rbp), %rcx                ## 8-byte Reload
	incq	%rcx
	cmpq	-96(%rbp), %rcx                 ## 8-byte Folded Reload
	movq	-72(%rbp), %rbx                 ## 8-byte Reload
	je	LBB0_10
LBB0_2:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_8 Depth 2
	movq	%rcx, %r14
	shlq	$5, %r14
	movq	-80(%rbp), %rax                 ## 8-byte Reload
	cmpl	$0, (%rax,%r14)
	movq	%rcx, -104(%rbp)                ## 8-byte Spill
	je	LBB0_3
## %bb.6:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	$1, (%rbx,%r14)
	cmpl	$0, -48(%rbp)                   ## 4-byte Folded Reload
	jle	LBB0_9
## %bb.7:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	-72(%rbp), %r9                  ## 8-byte Reload
	movl	16(%r9,%r14), %ecx
	movl	20(%r9,%r14), %edx
	leal	7(%rdx), %eax
	testl	%edx, %edx
	cmovnsl	%edx, %eax
	sarl	$3, %eax
	movq	-80(%rbp), %r8                  ## 8-byte Reload
	movl	20(%r8,%r14), %edx
	leal	7(%rdx), %esi
	testl	%edx, %edx
	cmovnsl	%edx, %esi
	movl	16(%r8,%r14), %edx
	sarl	$3, %esi
	leal	7(%rcx), %ebx
	testl	%ecx, %ecx
	cmovnsl	%ecx, %ebx
	sarl	$3, %ebx
	movslq	%ebx, %r13
	addq	8(%r9,%r14), %r13
	leal	7(%rdx), %ecx
	testl	%edx, %edx
	cmovnsl	%edx, %ecx
	sarl	$3, %ecx
	movslq	%ecx, %r12
	addq	8(%r8,%r14), %r12
	movslq	%esi, %r14
	movslq	%eax, %rbx
	movl	-52(%rbp), %r15d                ## 4-byte Reload
	.p2align	4, 0x90
LBB0_8:                                 ##   Parent Loop BB0_2 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	%r12, %rsi
	callq	_cvt_native_to_s16
	movswl	%ax, %edi
	callq	_linear2ulaw
	movq	-88(%rbp), %rdi                 ## 8-byte Reload
	movb	%al, (%r13)
	addq	%r14, %r12
	addq	%rbx, %r13
	decl	%r15d
	cmpl	$1, %r15d
	ja	LBB0_8
	jmp	LBB0_9
	.p2align	4, 0x90
LBB0_3:                                 ##   in Loop: Header=BB0_2 Depth=1
	cmpq	$0, 24(%rbx,%r14)
	je	LBB0_5
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	leaq	(%rbx,%r14), %rdi
	addq	$8, %rdi
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %ecx
	xorl	%esi, %esi
	movq	-48(%rbp), %rdx                 ## 8-byte Reload
                                        ## kill: def $edx killed $edx killed $rdx
	callq	_snd_pcm_area_silence
	movq	-88(%rbp), %rdi                 ## 8-byte Reload
	jmp	LBB0_5
LBB0_10:
	addq	$72, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_mulaw_encode
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mulaw_encode
_mulaw_encode:                          ; @mulaw_encode
	.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
	str	w3, [sp, #12]                   ; 4-byte Folded Spill
	str	x0, [sp]                        ; 8-byte Folded Spill
	ldr	w25, [x0, #4]
	cmp	w25, #1
	b.lt	LBB0_10
; %bb.1:
	mov	x20, x2
	mov	x21, x1
	mov	x26, #0
	ldr	x8, [sp]                        ; 8-byte Folded Reload
	ldr	x23, [x8, #8]
	ldr	w8, [sp, #12]                   ; 4-byte Folded Reload
	add	w8, w8, #1
	str	w8, [sp, #8]                    ; 4-byte Folded Spill
	b	LBB0_4
LBB0_2:                                 ;   in Loop: Header=BB0_4 Depth=1
	str	wzr, [x20, x24]
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	add	x26, x26, #1
	cmp	x26, x25
	b.eq	LBB0_10
LBB0_4:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_7 Depth 2
	lsl	x24, x26, #5
	ldr	w8, [x21, x24]
	cbz	w8, LBB0_8
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	w8, #1
	str	w8, [x20, x24]
	ldr	w8, [sp, #12]                   ; 4-byte Folded Reload
	cmp	w8, #1
	b.lt	LBB0_3
; %bb.6:                                ;   in Loop: Header=BB0_4 Depth=1
	add	x8, x20, x24
	ldp	w10, w9, [x8, #16]
	add	w11, w9, #7
	cmp	w9, #0
	csel	w9, w11, w9, lt
	add	x11, x21, x24
	ldp	w13, w12, [x11, #16]
	add	w14, w12, #7
	cmp	w12, #0
	csel	w12, w14, w12, lt
	add	w14, w10, #7
	cmp	w10, #0
	csel	w10, w14, w10, lt
	ldr	x8, [x8, #8]
	asr	w10, w10, #3
	add	x22, x8, w10, sxtw
	add	w8, w13, #7
	cmp	w13, #0
	csel	w8, w8, w13, lt
	asr	w8, w8, #3
	ldr	x10, [x11, #8]
	add	x24, x10, w8, sxtw
	sbfx	x28, x12, #3, #29
	sbfx	x27, x9, #3, #29
	ldr	w19, [sp, #8]                   ; 4-byte Folded Reload
LBB0_7:                                 ;   Parent Loop BB0_4 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	mov	x0, x23
	mov	x1, x24
	bl	_cvt_native_to_s16
	bl	_linear2ulaw
	strb	w0, [x22]
	add	x24, x24, x28
	add	x22, x22, x27
	sub	w19, w19, #1
	cmp	w19, #1
	b.hi	LBB0_7
	b	LBB0_3
LBB0_8:                                 ;   in Loop: Header=BB0_4 Depth=1
	add	x8, x20, x26, lsl #5
	ldr	x9, [x8, #24]
	cbz	x9, LBB0_2
; %bb.9:                                ;   in Loop: Header=BB0_4 Depth=1
	add	x0, x8, #8
	ldr	x8, [sp]                        ; 8-byte Folded Reload
	ldr	w3, [x8]
	mov	w1, #0
	ldr	w2, [sp, #12]                   ; 4-byte Folded Reload
	bl	_snd_pcm_area_silence
	b	LBB0_2
LBB0_10:
	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
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_mulaw_encode
.subsections_via_symbols
