	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function envelope_peak
_envelope_peak:                         ## @envelope_peak
	.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	%rsi, %r13
	movq	%rdi, %r14
	movq	(%rsi), %rax
	movq	(%rdi), %rcx
	movq	_COLOR@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	je	LBB0_2
## %bb.1:
	cmpl	$0, 28(%r14)
	je	LBB0_2
## %bb.3:
	movq	8(%r13), %rcx
	jmp	LBB0_4
LBB0_2:
	movq	8(%r14), %rcx
	shlq	$3, %rcx
	addq	8(%r13), %rcx
LBB0_4:
	movslq	(%rax), %r15
	movq	(%rcx), %r12
	movl	16(%r13), %eax
	testl	%eax, %eax
	jle	LBB0_13
## %bb.5:
	movl	20(%r13), %edi
	leaq	(,%r15,4), %r8
	xorl	%ecx, %ecx
	movq	%r12, %rsi
	jmp	LBB0_6
	.p2align	4, 0x90
LBB0_11:                                ##   in Loop: Header=BB0_6 Depth=1
	movl	16(%r13), %eax
LBB0_12:                                ##   in Loop: Header=BB0_6 Depth=1
	incq	%rcx
	movslq	%eax, %rdx
	addq	%r8, %rsi
	cmpq	%rdx, %rcx
	jge	LBB0_13
LBB0_6:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_8 Depth 2
	testl	%edi, %edi
	jle	LBB0_12
## %bb.7:                               ##   in Loop: Header=BB0_6 Depth=1
	xorl	%eax, %eax
	jmp	LBB0_8
	.p2align	4, 0x90
LBB0_10:                                ##   in Loop: Header=BB0_8 Depth=2
	incq	%rax
	movslq	%edi, %rdx
	cmpq	%rdx, %rax
	jge	LBB0_11
LBB0_8:                                 ##   Parent Loop BB0_6 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	cmpl	$0, (%rsi,%rax,4)
	je	LBB0_10
## %bb.9:                               ##   in Loop: Header=BB0_8 Depth=2
	movq	16(%r14), %rdi
	movq	(%rdi,%rcx,8), %rdi
	movl	$1, (%rdi,%rax,4)
	movl	20(%r13), %edi
	jmp	LBB0_10
LBB0_13:
	cmpl	$3, 24(%r14)
	jne	LBB0_15
## %bb.14:
	movq	%r14, %rdi
	movq	%r13, %rsi
	callq	_envelope_instant
	movl	16(%r13), %eax
LBB0_15:
	testl	%eax, %eax
	jle	LBB0_36
## %bb.16:
	movl	20(%r13), %edx
	xorl	%r9d, %r9d
	movl	%edx, %edi
	movl	%edx, %ecx
	jmp	LBB0_17
	.p2align	4, 0x90
LBB0_18:                                ##   in Loop: Header=BB0_17 Depth=1
	incq	%r9
LBB0_35:                                ##   in Loop: Header=BB0_17 Depth=1
	movslq	%eax, %rsi
	cmpq	%rsi, %r9
	jge	LBB0_36
LBB0_17:                                ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_24 Depth 2
	testl	%ecx, %ecx
	jle	LBB0_18
## %bb.19:                              ##   in Loop: Header=BB0_17 Depth=1
	movq	%r9, %rax
	imulq	%r15, %rax
	movq	16(%r14), %r8
	movq	(%r8,%r9,8), %rsi
	cmpl	$0, (%rsi)
	je	LBB0_21
## %bb.20:                              ##   in Loop: Header=BB0_17 Depth=1
	movl	$255, (%r12,%rax,4)
	movl	20(%r13), %edx
	movl	%edx, %edi
LBB0_21:                                ##   in Loop: Header=BB0_17 Depth=1
	cmpl	$2, %edi
	jl	LBB0_22
## %bb.23:                              ##   in Loop: Header=BB0_17 Depth=1
	leaq	(%r12,%rax,4), %r10
	movl	$1, %eax
	jmp	LBB0_24
	.p2align	4, 0x90
LBB0_32:                                ##   in Loop: Header=BB0_24 Depth=2
	movl	$255, (%r10,%rax,4)
	movl	20(%r13), %edx
LBB0_33:                                ##   in Loop: Header=BB0_24 Depth=2
	incq	%rax
	movslq	%edx, %rbx
	movl	%edx, %edi
	movl	%edx, %ecx
	cmpq	%rbx, %rax
	jge	LBB0_34
LBB0_24:                                ##   Parent Loop BB0_17 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	cmpl	$0, (%rsi,%rax,4)
	je	LBB0_33
## %bb.25:                              ##   in Loop: Header=BB0_24 Depth=2
	cmpl	$0, -4(%rsi,%rax,4)
	je	LBB0_32
## %bb.26:                              ##   in Loop: Header=BB0_24 Depth=2
	decl	%edi
	cmpq	%rdi, %rax
	je	LBB0_32
## %bb.27:                              ##   in Loop: Header=BB0_24 Depth=2
	cmpl	$0, 4(%rsi,%rax,4)
	je	LBB0_32
## %bb.28:                              ##   in Loop: Header=BB0_24 Depth=2
	testq	%r9, %r9
	je	LBB0_32
## %bb.29:                              ##   in Loop: Header=BB0_24 Depth=2
	movq	-8(%r8,%r9,8), %rcx
	cmpl	$0, (%rcx,%rax,4)
	je	LBB0_32
## %bb.30:                              ##   in Loop: Header=BB0_24 Depth=2
	movl	16(%r13), %ecx
	decl	%ecx
	cmpq	%rcx, %r9
	je	LBB0_32
## %bb.31:                              ##   in Loop: Header=BB0_24 Depth=2
	movq	8(%r8,%r9,8), %rcx
	cmpl	$0, (%rcx,%rax,4)
	jne	LBB0_33
	jmp	LBB0_32
	.p2align	4, 0x90
LBB0_22:                                ##   in Loop: Header=BB0_17 Depth=1
	movl	%edi, %ecx
LBB0_34:                                ##   in Loop: Header=BB0_17 Depth=1
	incq	%r9
	movl	16(%r13), %eax
	movl	%ecx, %edi
	jmp	LBB0_35
LBB0_36:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_COLOR,8,3                      ## @COLOR
	.no_dead_strip	_envelope_peak
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function envelope_peak
_envelope_peak:                         ; @envelope_peak
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x19, x1
	mov	x20, x0
	ldr	x8, [x1]
	ldr	x9, [x0]
Lloh0:
	adrp	x10, _COLOR@GOTPAGE
Lloh1:
	ldr	x10, [x10, _COLOR@GOTPAGEOFF]
Lloh2:
	ldr	x10, [x10]
	cmp	x9, x10
	b.eq	LBB0_3
; %bb.1:
	ldr	w9, [x20, #28]
	cbz	w9, LBB0_3
; %bb.2:
	ldr	x9, [x19, #8]
	b	LBB0_4
LBB0_3:
	ldr	x9, [x19, #8]
	ldr	x10, [x20, #8]
	add	x9, x9, x10, lsl #3
LBB0_4:
	ldrsw	x21, [x8]
	ldr	x22, [x9]
	ldr	w11, [x19, #16]
	cmp	w11, #1
	b.lt	LBB0_13
; %bb.5:
	mov	x8, #0
	ldr	w10, [x19, #20]
	lsl	x9, x21, #2
	mov	w12, #1
	mov	x13, x22
	b	LBB0_8
LBB0_6:                                 ;   in Loop: Header=BB0_8 Depth=1
	ldr	w11, [x19, #16]
LBB0_7:                                 ;   in Loop: Header=BB0_8 Depth=1
	add	x8, x8, #1
	add	x13, x13, x9
	cmp	x8, w11, sxtw
	b.ge	LBB0_13
LBB0_8:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_11 Depth 2
	cmp	w10, #1
	b.lt	LBB0_7
; %bb.9:                                ;   in Loop: Header=BB0_8 Depth=1
	mov	x11, #0
	b	LBB0_11
LBB0_10:                                ;   in Loop: Header=BB0_11 Depth=2
	add	x11, x11, #1
	cmp	x11, w10, sxtw
	b.ge	LBB0_6
LBB0_11:                                ;   Parent Loop BB0_8 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	w14, [x13, x11, lsl #2]
	cbz	w14, LBB0_10
; %bb.12:                               ;   in Loop: Header=BB0_11 Depth=2
	ldr	x10, [x20, #16]
	ldr	x10, [x10, x8, lsl #3]
	str	w12, [x10, x11, lsl #2]
	ldr	w10, [x19, #20]
	b	LBB0_10
LBB0_13:
	ldr	w8, [x20, #24]
	cmp	w8, #3
	b.ne	LBB0_15
; %bb.14:
	mov	x0, x20
	mov	x1, x19
	bl	_envelope_instant
	ldr	w11, [x19, #16]
LBB0_15:
	cmp	w11, #1
	b.lt	LBB0_33
; %bb.16:
	mov	x10, #0
	ldr	w9, [x19, #20]
	mov	w8, #255
	b	LBB0_19
LBB0_17:                                ;   in Loop: Header=BB0_19 Depth=1
	ldr	w11, [x19, #16]
LBB0_18:                                ;   in Loop: Header=BB0_19 Depth=1
	cmp	x12, w11, sxtw
	mov	x10, x12
	b.ge	LBB0_33
LBB0_19:                                ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_26 Depth 2
	cmp	w9, #0
	b.le	LBB0_32
; %bb.20:                               ;   in Loop: Header=BB0_19 Depth=1
	mul	x16, x10, x21
	ldr	x11, [x20, #16]
	ldr	x14, [x11, x10, lsl #3]
	ldr	w12, [x14]
	cbz	w12, LBB0_22
; %bb.21:                               ;   in Loop: Header=BB0_19 Depth=1
	str	w8, [x22, x16, lsl #2]
	ldr	w9, [x19, #20]
LBB0_22:                                ;   in Loop: Header=BB0_19 Depth=1
	add	x12, x10, #1
	cmp	w9, #2
	b.lt	LBB0_17
; %bb.23:                               ;   in Loop: Header=BB0_19 Depth=1
	sub	x13, x10, #1
	add	x14, x14, #4
	mov	w15, #1
	add	x16, x22, x16, lsl #2
	b	LBB0_26
LBB0_24:                                ;   in Loop: Header=BB0_26 Depth=2
	str	w8, [x16, x15, lsl #2]
	ldr	w9, [x19, #20]
LBB0_25:                                ;   in Loop: Header=BB0_26 Depth=2
	add	x15, x15, #1
	add	x14, x14, #4
	cmp	x15, w9, sxtw
	b.ge	LBB0_17
LBB0_26:                                ;   Parent Loop BB0_19 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	w17, [x14]
	cbz	w17, LBB0_25
; %bb.27:                               ;   in Loop: Header=BB0_26 Depth=2
	ldur	w17, [x14, #-4]
	sub	w0, w9, #1
	cmp	w17, #0
	ccmp	x15, x0, #4, ne
	b.eq	LBB0_24
; %bb.28:                               ;   in Loop: Header=BB0_26 Depth=2
	ldr	w17, [x14, #4]
	cmp	w17, #0
	ccmp	x10, #0, #4, ne
	b.eq	LBB0_24
; %bb.29:                               ;   in Loop: Header=BB0_26 Depth=2
	ldr	x17, [x11, x13, lsl #3]
	ldr	w17, [x17, x15, lsl #2]
	cbz	w17, LBB0_24
; %bb.30:                               ;   in Loop: Header=BB0_26 Depth=2
	ldr	w17, [x19, #16]
	sub	w17, w17, #1
	cmp	x10, x17
	b.eq	LBB0_24
; %bb.31:                               ;   in Loop: Header=BB0_26 Depth=2
	ldr	x17, [x11, x12, lsl #3]
	ldr	w17, [x17, x15, lsl #2]
	cbnz	w17, LBB0_25
	b	LBB0_24
LBB0_32:                                ;   in Loop: Header=BB0_19 Depth=1
	add	x12, x10, #1
	b	LBB0_18
LBB0_33:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_COLOR,8,3                      ; @COLOR
	.no_dead_strip	_envelope_peak
.subsections_via_symbols
