	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function decorr_mono
_decorr_mono:                           ## @decorr_mono
	.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	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%r8d, %r15d
	movq	%rcx, %r12
	movl	%edx, %r13d
	movq	%rsi, -80(%rbp)                 ## 8-byte Spill
	movq	%rdi, -72(%rbp)                 ## 8-byte Spill
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	$0, 24(%rcx)
	leal	-1(%r13), %eax
	movl	%r8d, %r14d
	sarl	$31, %r14d
	movl	%eax, -52(%rbp)                 ## 4-byte Spill
	andl	%eax, %r14d
	movq	16(%rcx), %rdi
	callq	_store_weight
	movl	%eax, %edi
	callq	_restore_weight
	movq	%rax, 16(%r12)
	movq	_MAX_TERM@GOTPCREL(%rip), %rbx
	movl	(%rbx), %eax
	testl	%eax, %eax
	jle	LBB0_4
## %bb.1:
	movl	%r15d, -64(%rbp)                ## 4-byte Spill
	movq	(%r12), %rcx
	xorl	%r15d, %r15d
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%rcx,%r15,4), %edi
	callq	_log2s
	movl	%eax, %edi
	callq	_wp_exp2
	movq	(%r12), %rcx
	movl	%eax, (%rcx,%r15,4)
	incq	%r15
	movslq	(%rbx), %rax
	cmpq	%rax, %r15
	jl	LBB0_2
## %bb.3:
	movl	-64(%rbp), %r15d                ## 4-byte Reload
LBB0_4:
	movslq	%r14d, %r8
	movl	8(%r12), %ecx
	cmpl	%eax, %ecx
	jle	LBB0_9
## %bb.5:
	testl	%r13d, %r13d
	movl	-52(%rbp), %r14d                ## 4-byte Reload
	je	LBB0_21
## %bb.6:
	movslq	%r15d, %rax
	movq	16(%r12), %rdi
	shlq	$3, %r8
	shlq	$3, %rax
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	.p2align	4, 0x90
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	andl	$1, %ecx
	movl	%ecx, %eax
	xorl	$3, %eax
	movq	(%r12), %rdx
	movl	(%rdx), %esi
	imull	%esi, %eax
	subl	4(%rdx), %eax
	xorb	$1, %cl
                                        ## kill: def $cl killed $cl killed $ecx
	sarl	%cl, %eax
	movslq	%eax, %r13
	movl	%esi, 4(%rdx)
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax,%r8), %rbx
	movl	%ebx, (%rdx)
	movq	%r13, %rsi
	movq	%r8, %r15
	callq	_APPLY_WEIGHT
	subq	%rax, %rbx
	movq	16(%r12), %rdi
	movl	32(%r12), %esi
	movq	%r13, %rdx
	movq	%rbx, %rcx
	callq	_UPDATE_WEIGHT
	movq	16(%r12), %rdi
	addq	%rdi, 24(%r12)
	movq	-80(%rbp), %rax                 ## 8-byte Reload
	movq	%rbx, (%rax,%r15)
	subl	$1, %r14d
	jb	LBB0_21
## %bb.8:                               ##   in Loop: Header=BB0_7 Depth=1
	movq	%r15, %r8
	movl	8(%r12), %ecx
	addq	-64(%rbp), %r8                  ## 8-byte Folded Reload
	jmp	LBB0_7
LBB0_9:
	testl	%ecx, %ecx
	jle	LBB0_21
## %bb.10:
	testl	%r13d, %r13d
	je	LBB0_21
## %bb.11:
	movslq	%r15d, %rdx
	movq	16(%r12), %rdi
	shlq	$3, %r8
	shlq	$3, %rdx
	movq	%rdx, -88(%rbp)                 ## 8-byte Spill
	xorl	%r15d, %r15d
	.p2align	4, 0x90
LBB0_12:                                ## =>This Inner Loop Header: Depth=1
	movq	%r8, -64(%rbp)                  ## 8-byte Spill
	addl	%r15d, %ecx
	decl	%eax
	andl	%ecx, %eax
	movq	(%r12), %rcx
	movslq	%r15d, %rdx
	movslq	(%rcx,%rdx,4), %r13
	movq	-72(%rbp), %rsi                 ## 8-byte Reload
	movq	(%rsi,%r8), %r14
	cltq
	movl	%r14d, (%rcx,%rax,4)
	incl	%edx
	movl	(%rbx), %r15d
	decl	%r15d
	andl	%edx, %r15d
	movq	%r13, %rsi
	callq	_APPLY_WEIGHT
	subq	%rax, %r14
	movq	16(%r12), %rdi
	movl	32(%r12), %esi
	movq	%r13, %rdx
	movq	%r14, %rcx
	callq	_UPDATE_WEIGHT
	movq	-64(%rbp), %r8                  ## 8-byte Reload
	movq	16(%r12), %rdi
	addq	%rdi, 24(%r12)
	movq	-80(%rbp), %rax                 ## 8-byte Reload
	movq	%r14, (%rax,%r8)
	movl	-52(%rbp), %eax                 ## 4-byte Reload
	subl	$1, %eax
	jb	LBB0_14
## %bb.13:                              ##   in Loop: Header=BB0_12 Depth=1
	movl	%eax, -52(%rbp)                 ## 4-byte Spill
	movl	8(%r12), %ecx
	movl	(%rbx), %eax
	addq	-88(%rbp), %r8                  ## 8-byte Folded Reload
	jmp	LBB0_12
LBB0_14:
	testl	%r15d, %r15d
	je	LBB0_21
## %bb.15:
	movl	8(%r12), %ecx
	testl	%ecx, %ecx
	jle	LBB0_21
## %bb.16:
	movq	%rbx, %rdx
	movl	(%rbx), %eax
	cmpl	%eax, %ecx
	jg	LBB0_21
## %bb.17:
	movq	%rsp, %r13
	shlq	$3, %rax
	movq	%rdx, %rbx
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %r14
	movq	(%r12), %rsi
	movq	%r14, %rdi
	movl	$8, %edx
	callq	_memcpy
	cmpl	$0, (%rbx)
	jle	LBB0_20
## %bb.18:
	movq	%rbx, %rdi
	movq	(%r12), %rax
	xorl	%ecx, %ecx
	.p2align	4, 0x90
LBB0_19:                                ## =>This Inner Loop Header: Depth=1
	movslq	%r15d, %rdx
	movl	(%r14,%rdx,8), %esi
	movl	%esi, (%rax,%rcx,4)
	incl	%edx
	movslq	(%rdi), %rsi
	leal	-1(%rsi), %r15d
	andl	%edx, %r15d
	incq	%rcx
	cmpq	%rsi, %rcx
	jl	LBB0_19
LBB0_20:
	movq	%r13, %rsp
LBB0_21:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_23
## %bb.22:
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_23:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_MAX_TERM,4,2                   ## @MAX_TERM
	.no_dead_strip	_decorr_mono
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function decorr_mono
_decorr_mono:                           ; @decorr_mono
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	sub	sp, sp, #16
	mov	x22, x4
	mov	x19, x3
	mov	x23, x2
	mov	x20, x1
	mov	x21, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-88]
	str	xzr, [x3, #24]
	sub	w24, w2, #1
	and	w26, w24, w4, asr #31
	ldr	x0, [x3, #16]
	bl	_store_weight
	bl	_restore_weight
	str	x0, [x19, #16]
Lloh3:
	adrp	x25, _MAX_TERM@GOTPAGE
Lloh4:
	ldr	x25, [x25, _MAX_TERM@GOTPAGEOFF]
	ldr	w9, [x25]
	cmp	w9, #1
	b.lt	LBB0_3
; %bb.1:
	mov	x27, #0
	ldr	x8, [x19]
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	lsl	x28, x27, #2
	ldr	w0, [x8, x28]
	bl	_log2s
	bl	_wp_exp2
	ldr	x8, [x19]
	str	w0, [x8, x28]
	add	x27, x27, #1
	ldrsw	x9, [x25]
	cmp	x27, x9
	b.lt	LBB0_2
LBB0_3:
	sxtw	x10, w26
	ldr	w8, [x19, #8]
	cmp	w8, w9
	b.le	LBB0_8
; %bb.4:
	cbz	w23, LBB0_19
; %bb.5:
	ldr	x0, [x19, #16]
	lsl	x25, x10, #3
	sbfiz	x26, x22, #3, #32
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	and	w8, w8, #0x1
	eor	w9, w8, #0x3
	ldr	x10, [x19]
	ldp	w11, w12, [x10]
	neg	w12, w12
	madd	w9, w9, w11, w12
	eor	w8, w8, #0x1
	asr	w8, w9, w8
	ldr	x23, [x21, x25]
	sxtw	x22, w8
	stp	w23, w11, [x10]
	mov	x1, x22
	bl	_APPLY_WEIGHT
	sub	x23, x23, x0
	ldr	x0, [x19, #16]
	ldr	w1, [x19, #32]
	mov	x2, x22
	mov	x3, x23
	bl	_UPDATE_WEIGHT
	ldp	x0, x8, [x19, #16]
	add	x8, x8, x0
	str	x8, [x19, #24]
	str	x23, [x20, x25]
	cbz	w24, LBB0_19
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	ldr	w8, [x19, #8]
	add	x25, x25, x26
	sub	w24, w24, #1
	b	LBB0_6
LBB0_8:
	cmp	w8, #1
	ccmp	w23, #0, #4, ge
	b.eq	LBB0_19
; %bb.9:
	mov	w26, #0
	ldr	x0, [x19, #16]
	lsl	x27, x10, #3
                                        ; kill: def $w22 killed $w22 killed $x22 def $x22
	sbfiz	x28, x22, #3, #32
LBB0_10:                                ; =>This Inner Loop Header: Depth=1
	sub	w9, w9, #1
	add	w8, w8, w26
	and	w8, w9, w8
	ldr	x9, [x19]
	ldrsw	x22, [x9, w26, sxtw #2]
	ldr	x23, [x21, x27]
	str	w23, [x9, w8, sxtw #2]
	add	w8, w26, #1
	ldr	w9, [x25]
	sub	w9, w9, #1
	and	w26, w9, w8
	mov	x1, x22
	bl	_APPLY_WEIGHT
	sub	x23, x23, x0
	ldr	x0, [x19, #16]
	ldr	w1, [x19, #32]
	mov	x2, x22
	mov	x3, x23
	bl	_UPDATE_WEIGHT
	ldp	x0, x8, [x19, #16]
	add	x8, x8, x0
	str	x8, [x19, #24]
	str	x23, [x20, x27]
	cbz	w24, LBB0_12
; %bb.11:                               ;   in Loop: Header=BB0_10 Depth=1
	ldr	w8, [x19, #8]
	ldr	w9, [x25]
	add	x27, x27, x28
	sub	w24, w24, #1
	b	LBB0_10
LBB0_12:
	cbz	w26, LBB0_19
; %bb.13:
	ldr	w9, [x19, #8]
	cmp	w9, #1
	b.lt	LBB0_19
; %bb.14:
	ldr	w8, [x25]
	cmp	w9, w8
	b.gt	LBB0_19
; %bb.15:
	mov	x21, sp
	lsl	x8, x8, #3
	mov	x9, x8
Lloh5:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh6:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	add	x8, x8, #15
	and	x8, x8, #0xffffffff0
	sub	x20, x9, x8
	mov	sp, x20
	ldr	x1, [x19]
	mov	x0, x20
	mov	w2, #8
	bl	_memcpy
	ldr	w8, [x25]
	cmp	w8, #1
	b.lt	LBB0_18
; %bb.16:
	mov	x8, #0
	ldr	x9, [x19]
LBB0_17:                                ; =>This Inner Loop Header: Depth=1
	ldr	x10, [x20, w26, sxtw #3]
	str	w10, [x9, x8, lsl #2]
	add	w10, w26, #1
	ldrsw	x11, [x25]
	sub	w12, w11, #1
	and	w26, w12, w10
	add	x8, x8, #1
	cmp	x8, x11
	b.lt	LBB0_17
LBB0_18:
	mov	sp, x21
LBB0_19:
	ldur	x8, [x29, #-88]
Lloh7:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh8:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh9:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_21
; %bb.20:
	sub	sp, x29, #80
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
LBB0_21:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_MAX_TERM,4,2                   ; @MAX_TERM
	.no_dead_strip	_decorr_mono
.subsections_via_symbols
