	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_op4                            ## -- Begin function op4
	.p2align	4, 0x90
_op4:                                   ## @op4
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	cmpl	$958, 28(%rdi)                  ## imm = 0x3BE
	jle	LBB0_1
LBB0_14:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_1:
	movq	%rdi, %rbx
	movq	32(%rdi), %rax
	movq	_ATTACK@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_6
## %bb.2:
	movl	24(%rbx), %r15d
	movl	16(%rbx), %esi
	movq	%rbx, %rdi
	callq	_get_rate
	movl	%eax, %r14d
	movl	40(%rbx), %esi
	movl	%eax, %edi
	movq	%rbx, %rdx
	callq	_need_envelope_step
	testl	%eax, %eax
	je	LBB0_14
## %bb.3:
	andl	$3, %r15d
	leal	-48(%r14), %eax
	xorl	%ecx, %ecx
	cmpl	$49, %r14d
	movq	_attack_rate_table@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rdx
	cmovgel	%eax, %ecx
	movq	(%rdx,%rcx,8), %rax
	movb	(%rax,%r15,4), %cl
	movl	28(%rbx), %eax
	movl	%eax, %edx
	sarl	%cl, %edx
	notl	%edx
	addl	%eax, %edx
	movl	%edx, 28(%rbx)
	jne	LBB0_14
## %bb.4:
	movq	_DECAY1@GOTPCREL(%rip), %rax
	jmp	LBB0_5
LBB0_6:
	movq	_DECAY1@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_9
## %bb.7:
	movl	12(%rbx), %esi
	movq	%rbx, %rdi
	callq	_do_decay
	movl	28(%rbx), %eax
	sarl	$5, %eax
	cmpl	(%rbx), %eax
	jl	LBB0_14
## %bb.8:
	movq	_DECAY2@GOTPCREL(%rip), %rax
LBB0_5:
	movq	(%rax), %rsi
	movq	%rbx, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_change_envelope_state          ## TAILCALL
LBB0_9:
	movq	_DECAY2@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_12
## %bb.10:
	movl	8(%rbx), %esi
	jmp	LBB0_11
LBB0_12:
	movq	_RELEASE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_14
## %bb.13:
	movl	4(%rbx), %esi
LBB0_11:
	movq	%rbx, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_do_decay                       ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_ATTACK,8,3                     ## @ATTACK
	.comm	_attack_rate_table,8,3          ## @attack_rate_table
	.comm	_DECAY1,8,3                     ## @DECAY1
	.comm	_DECAY2,8,3                     ## @DECAY2
	.comm	_RELEASE,8,3                    ## @RELEASE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_op4                            ; -- Begin function op4
	.p2align	2
_op4:                                   ; @op4
	.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
	ldr	w8, [x0, #28]
	cmp	w8, #958
	b.le	LBB0_2
LBB0_1:
	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
LBB0_2:
	mov	x19, x0
	ldr	x8, [x0, #32]
Lloh0:
	adrp	x9, _ATTACK@GOTPAGE
Lloh1:
	ldr	x9, [x9, _ATTACK@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_6
; %bb.3:
	ldr	w21, [x19, #24]
	ldr	w1, [x19, #16]
	mov	x0, x19
	bl	_get_rate
	mov	x20, x0
	ldr	w1, [x19, #40]
	mov	x2, x19
	bl	_need_envelope_step
	cbz	w0, LBB0_1
; %bb.4:
	and	x8, x21, #0x3
Lloh3:
	adrp	x9, _attack_rate_table@GOTPAGE
Lloh4:
	ldr	x9, [x9, _attack_rate_table@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	sub	w10, w20, #48
	cmp	w20, #49
	csel	w10, wzr, w10, lt
	ldr	x9, [x9, w10, uxtw #3]
	ldr	w8, [x9, x8, lsl #2]
	ldr	w9, [x19, #28]
	asr	w8, w9, w8
	mvn	w8, w8
	adds	w8, w9, w8
	str	w8, [x19, #28]
	b.ne	LBB0_1
; %bb.5:
Lloh6:
	adrp	x8, _DECAY1@GOTPAGE
Lloh7:
	ldr	x8, [x8, _DECAY1@GOTPAGEOFF]
	b	LBB0_9
LBB0_6:
Lloh8:
	adrp	x9, _DECAY1@GOTPAGE
Lloh9:
	ldr	x9, [x9, _DECAY1@GOTPAGEOFF]
Lloh10:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_10
; %bb.7:
	ldr	w1, [x19, #12]
	mov	x0, x19
	bl	_do_decay
	ldr	w8, [x19, #28]
	ldr	w9, [x19]
	cmp	w9, w8, asr #5
	b.gt	LBB0_1
; %bb.8:
Lloh11:
	adrp	x8, _DECAY2@GOTPAGE
Lloh12:
	ldr	x8, [x8, _DECAY2@GOTPAGEOFF]
LBB0_9:
	ldr	x1, [x8]
	mov	x0, x19
	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
	b	_change_envelope_state
LBB0_10:
Lloh13:
	adrp	x9, _DECAY2@GOTPAGE
Lloh14:
	ldr	x9, [x9, _DECAY2@GOTPAGEOFF]
Lloh15:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_12
; %bb.11:
	ldr	w1, [x19, #8]
	b	LBB0_14
LBB0_12:
Lloh16:
	adrp	x9, _RELEASE@GOTPAGE
Lloh17:
	ldr	x9, [x9, _RELEASE@GOTPAGEOFF]
Lloh18:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_1
; %bb.13:
	ldr	w1, [x19, #4]
LBB0_14:
	mov	x0, x19
	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
	b	_do_decay
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.comm	_ATTACK,8,3                     ; @ATTACK
	.comm	_attack_rate_table,8,3          ; @attack_rate_table
	.comm	_DECAY1,8,3                     ; @DECAY1
	.comm	_DECAY2,8,3                     ; @DECAY2
	.comm	_RELEASE,8,3                    ; @RELEASE
.subsections_via_symbols
