	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function apply_envelope
_apply_envelope:                        ## @apply_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	%rdx, %r12
	movl	%esi, -44(%rbp)                 ## 4-byte Spill
	movq	%rdi, %r13
	movq	16(%rdi), %r14
	movq	_jiffies@GOTPCREL(%rip), %rax
	movq	(%rax), %r15
	movl	(%rdx), %edi
	testl	%edi, %edi
	je	LBB0_3
## %bb.1:
	movq	8(%r13), %rbx
	callq	_msecs_to_jiffies
	addq	%rax, %rbx
	movq	%r15, %rdi
	movq	%rbx, %rsi
	callq	_time_before
	testq	%rax, %rax
	je	LBB0_3
## %bb.2:
	movl	12(%r12), %edx
	movq	%r12, %rbx
	addq	$12, %rbx
	leaq	L_.str(%rip), %rdi
	movl	-44(%rbp), %r14d                ## 4-byte Reload
	movl	%r14d, %esi
	xorl	%eax, %eax
	callq	_pr_debug
	subq	8(%r13), %r15
	movq	%r15, %rdi
	callq	_jiffies_to_msecs
	movl	%eax, %r15d
	jmp	LBB0_8
LBB0_3:
	movl	4(%r12), %edi
	testl	%edi, %edi
	je	LBB0_10
## %bb.4:
	cmpq	$0, (%r14)
	je	LBB0_10
## %bb.5:
	movq	(%r13), %rbx
	callq	_msecs_to_jiffies
	subq	%rax, %rbx
	movq	%r15, %rdi
	movq	%rbx, %rsi
	callq	_time_after
	testq	%rax, %rax
	movl	-44(%rbp), %ebx                 ## 4-byte Reload
	je	LBB0_11
## %bb.6:
	movq	(%r13), %rsi
	movq	%r15, %rdi
	callq	_time_before
	testq	%rax, %rax
	je	LBB0_11
## %bb.7:
	leaq	4(%r12), %r14
	movq	(%r13), %rdi
	subq	%r15, %rdi
	callq	_jiffies_to_msecs
	movl	%eax, %r15d
	addq	$8, %r12
	movq	%r12, %rbx
	movq	%r14, %r12
	movl	-44(%rbp), %r14d                ## 4-byte Reload
LBB0_8:
	movl	(%r12), %r12d
	movq	_u16@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	(%rbx), %esi
	movl	$32767, %edx                    ## imm = 0x7FFF
	callq	_min_t
	movl	%eax, %r13d
	movl	%r14d, %ebx
	negl	%ebx
	cmovsl	%r14d, %ebx
	subl	%eax, %ebx
	leaq	L_.str.1(%rip), %rdi
	movl	%ebx, %esi
	xorl	%eax, %eax
	callq	_pr_debug
	leaq	L_.str.2(%rip), %rdi
	movl	%r15d, %esi
	xorl	%eax, %eax
	callq	_pr_debug
	leaq	L_.str.3(%rip), %rdi
	movl	%r12d, %esi
	xorl	%eax, %eax
	callq	_pr_debug
	imull	%r15d, %ebx
	movl	%ebx, %eax
	cltd
	idivl	%r12d
	movl	%eax, %ebx
	leaq	L_.str.1(%rip), %rdi
	movl	%eax, %esi
	xorl	%eax, %eax
	callq	_pr_debug
	addl	%r13d, %ebx
	movl	%ebx, %eax
	negl	%eax
	testl	%r14d, %r14d
	cmovnsl	%ebx, %eax
	movl	%eax, %ebx
	jmp	LBB0_11
LBB0_10:
	movl	-44(%rbp), %ebx                 ## 4-byte Reload
LBB0_11:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_jiffies,8,3                    ## @jiffies
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"value = 0x%x, attack_level = 0x%x\n"

	.comm	_u16,4,2                        ## @u16
L_.str.1:                               ## @.str.1
	.asciz	"difference = %d\n"

L_.str.2:                               ## @.str.2
	.asciz	"time_from_level = 0x%x\n"

L_.str.3:                               ## @.str.3
	.asciz	"time_of_envelope = 0x%x\n"

	.no_dead_strip	_apply_envelope
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function apply_envelope
_apply_envelope:                        ; @apply_envelope
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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	x20, x2
	mov	x19, x1
	mov	x21, x0
	ldr	x24, [x0, #16]
Lloh0:
	adrp	x8, _jiffies@GOTPAGE
Lloh1:
	ldr	x8, [x8, _jiffies@GOTPAGEOFF]
Lloh2:
	ldr	x22, [x8]
	ldr	w0, [x2]
	cbz	w0, LBB0_3
; %bb.1:
	ldr	x23, [x21, #8]
	bl	_msecs_to_jiffies
	add	x1, x0, x23
	mov	x0, x22
	bl	_time_before
	cbz	x0, LBB0_3
; %bb.2:
	mov	x24, x20
	ldr	w8, [x24, #12]!
	str	x8, [sp]
Lloh3:
	adrp	x0, l_.str@PAGE
Lloh4:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x19
	bl	_pr_debug
	ldr	x8, [x21, #8]
	sub	x0, x22, x8
	bl	_jiffies_to_msecs
	mov	x21, x0
	b	LBB0_8
LBB0_3:
	mov	x23, x20
	ldr	w0, [x23, #4]!
	cbz	w0, LBB0_9
; %bb.4:
	ldr	x8, [x24]
	cbz	x8, LBB0_9
; %bb.5:
	ldr	x24, [x21]
	bl	_msecs_to_jiffies
	sub	x1, x24, x0
	mov	x0, x22
	bl	_time_after
	cbz	x0, LBB0_9
; %bb.6:
	ldr	x1, [x21]
	mov	x0, x22
	bl	_time_before
	cbz	x0, LBB0_9
; %bb.7:
	ldr	x8, [x21]
	sub	x0, x8, x22
	bl	_jiffies_to_msecs
	mov	x21, x0
	add	x24, x20, #8
	mov	x20, x23
LBB0_8:
	ldr	w20, [x20]
Lloh5:
	adrp	x8, _u16@GOTPAGE
Lloh6:
	ldr	x8, [x8, _u16@GOTPAGEOFF]
Lloh7:
	ldr	w0, [x8]
	ldr	w1, [x24]
	mov	w2, #32767
	bl	_min_t
	cmp	w19, #0
	cneg	w8, w19, mi
	sub	w1, w8, w0
	cmp	w19, #0
Lloh8:
	adrp	x22, l_.str.1@PAGE
Lloh9:
	add	x22, x22, l_.str.1@PAGEOFF
	mul	w8, w1, w21
	sdiv	w23, w8, w20
	add	w8, w23, w0
	cneg	w19, w8, lt
	mov	x0, x22
	bl	_pr_debug
Lloh10:
	adrp	x0, l_.str.2@PAGE
Lloh11:
	add	x0, x0, l_.str.2@PAGEOFF
	mov	x1, x21
	bl	_pr_debug
Lloh12:
	adrp	x0, l_.str.3@PAGE
Lloh13:
	add	x0, x0, l_.str.3@PAGEOFF
	mov	x1, x20
	bl	_pr_debug
	mov	x0, x22
	mov	x1, x23
	bl	_pr_debug
LBB0_9:
	mov	x0, x19
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_jiffies,8,3                    ; @jiffies
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"value = 0x%x, attack_level = 0x%x\n"

	.comm	_u16,4,2                        ; @u16
l_.str.1:                               ; @.str.1
	.asciz	"difference = %d\n"

l_.str.2:                               ; @.str.2
	.asciz	"time_from_level = 0x%x\n"

l_.str.3:                               ; @.str.3
	.asciz	"time_of_envelope = 0x%x\n"

	.no_dead_strip	_apply_envelope
.subsections_via_symbols
