	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function decode_tones_envelope
_decode_tones_envelope:                 ## @decode_tones_envelope
	.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
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, %r12
	movq	%rsi, %r14
	movq	%rdi, %r15
	movq	8(%rsi), %rax
	movslq	%edx, %rcx
	movq	(%rax,%rcx,8), %r13
	testl	%ecx, %ecx
	je	LBB0_7
## %bb.1:
	movq	(%rax), %rbx
	movq	%r15, %rdi
	callq	_get_bits1
	testq	%rax, %rax
	je	LBB0_7
## %bb.2:
	movq	(%r14), %rax
	movl	(%rax), %eax
	testl	%eax, %eax
	jle	LBB0_18
## %bb.3:
	shlq	$3, %rax
	leaq	(%rax,%rax,2), %rax
	xorl	%ecx, %ecx
	jmp	LBB0_4
	.p2align	4, 0x90
LBB0_6:                                 ##   in Loop: Header=BB0_4 Depth=1
	addq	$4, %r12
	addq	$24, %rcx
	cmpq	%rcx, %rax
	je	LBB0_18
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	cmpl	$0, (%r12)
	je	LBB0_6
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	movups	8(%rbx,%rcx), %xmm0
	movups	%xmm0, 8(%r13,%rcx)
	movl	(%rbx,%rcx), %edx
	movl	%edx, (%r13,%rcx)
	movl	4(%rbx,%rcx), %edx
	movl	%edx, 4(%r13,%rcx)
	jmp	LBB0_6
LBB0_7:
	movq	(%r14), %rax
	cmpl	$0, (%rax)
	jle	LBB0_18
## %bb.8:
	addq	$16, %r13
	xorl	%ebx, %ebx
	jmp	LBB0_9
	.p2align	4, 0x90
LBB0_15:                                ##   in Loop: Header=BB0_9 Depth=1
	movq	%r15, %rdi
	movl	$5, %esi
	callq	_get_bits
LBB0_16:                                ##   in Loop: Header=BB0_9 Depth=1
	movl	%eax, -12(%r13)
	movq	(%r14), %rax
LBB0_17:                                ##   in Loop: Header=BB0_9 Depth=1
	incq	%rbx
	movslq	(%rax), %rcx
	addq	$24, %r13
	cmpq	%rcx, %rbx
	jge	LBB0_18
LBB0_9:                                 ## =>This Inner Loop Header: Depth=1
	cmpl	$0, (%r12,%rbx,4)
	je	LBB0_17
## %bb.10:                              ##   in Loop: Header=BB0_9 Depth=1
	movq	%r15, %rdi
	callq	_get_bits1
	movq	%rax, (%r13)
	testq	%rax, %rax
	je	LBB0_11
## %bb.12:                              ##   in Loop: Header=BB0_9 Depth=1
	movq	%r15, %rdi
	movl	$5, %esi
	callq	_get_bits
	jmp	LBB0_13
	.p2align	4, 0x90
LBB0_11:                                ##   in Loop: Header=BB0_9 Depth=1
	movl	$-1, %eax
LBB0_13:                                ##   in Loop: Header=BB0_9 Depth=1
	movl	%eax, -16(%r13)
	movq	%r15, %rdi
	callq	_get_bits1
	movq	%rax, -8(%r13)
	testq	%rax, %rax
	jne	LBB0_15
## %bb.14:                              ##   in Loop: Header=BB0_9 Depth=1
	movl	$32, %eax
	jmp	LBB0_16
LBB0_18:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_decode_tones_envelope
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function decode_tones_envelope
_decode_tones_envelope:                 ; @decode_tones_envelope
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x19, x3
	mov	x20, x1
	mov	x21, x0
	ldr	x8, [x1, #8]
	ldr	x23, [x8, w2, sxtw #3]
	cbz	w2, LBB0_7
; %bb.1:
	ldr	x22, [x8]
	mov	x0, x21
	bl	_get_bits1
	cbz	x0, LBB0_7
; %bb.2:
	ldr	x8, [x20]
	ldr	w8, [x8]
	cmp	w8, #1
	b.lt	LBB0_18
; %bb.3:
	add	x9, x23, #16
	add	x10, x22, #8
	b	LBB0_5
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=1
	add	x19, x19, #4
	add	x9, x9, #24
	add	x10, x10, #24
	subs	x8, x8, #1
	b.eq	LBB0_18
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w11, [x19]
	cbz	w11, LBB0_4
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	ldp	x12, x11, [x10]
	stp	x12, x11, [x9, #-8]
	ldur	d0, [x10, #-8]
	stur	d0, [x9, #-16]
	b	LBB0_4
LBB0_7:
	ldr	x8, [x20]
	ldr	w9, [x8]
	cmp	w9, #1
	b.lt	LBB0_18
; %bb.8:
	mov	x22, #0
	add	x23, x23, #8
	b	LBB0_12
LBB0_9:                                 ;   in Loop: Header=BB0_12 Depth=1
	mov	x0, x21
	mov	w1, #5
	bl	_get_bits
LBB0_10:                                ;   in Loop: Header=BB0_12 Depth=1
	stur	w0, [x23, #-4]
	ldr	x8, [x20]
LBB0_11:                                ;   in Loop: Header=BB0_12 Depth=1
	add	x22, x22, #1
	ldrsw	x9, [x8]
	add	x23, x23, #24
	cmp	x22, x9
	b.ge	LBB0_18
LBB0_12:                                ; =>This Inner Loop Header: Depth=1
	ldr	w9, [x19, x22, lsl #2]
	cbz	w9, LBB0_11
; %bb.13:                               ;   in Loop: Header=BB0_12 Depth=1
	mov	x0, x21
	bl	_get_bits1
	str	x0, [x23, #8]
	cbz	x0, LBB0_15
; %bb.14:                               ;   in Loop: Header=BB0_12 Depth=1
	mov	x0, x21
	mov	w1, #5
	bl	_get_bits
	b	LBB0_16
LBB0_15:                                ;   in Loop: Header=BB0_12 Depth=1
	mov	w0, #-1
LBB0_16:                                ;   in Loop: Header=BB0_12 Depth=1
	stur	w0, [x23, #-8]
	mov	x0, x21
	bl	_get_bits1
	str	x0, [x23]
	cbnz	x0, LBB0_9
; %bb.17:                               ;   in Loop: Header=BB0_12 Depth=1
	mov	w0, #32
	b	LBB0_10
LBB0_18:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_decode_tones_envelope
.subsections_via_symbols
