	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3                               ## -- Begin function perform_dc_correction
LCPI0_0:
	.quad	0x3ff0000000000000              ## double 1
LCPI0_1:
	.quad	0x3fb999999999999a              ## double 0.10000000000000001
LCPI0_2:
	.quad	0x0000000000000000              ## double 0
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	4, 0x90
_perform_dc_correction:                 ## @perform_dc_correction
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %rbx
	movq	%rdi, %r12
	movsd	LCPI0_0(%rip), %xmm0            ## xmm0 = mem[0],zero
	divsd	(%rsi), %xmm0
	movsd	%xmm0, -72(%rbp)                ## 8-byte Spill
	movq	24(%rdi), %rax
	movl	(%rax), %edi
	callq	_cqueue_empty
	movl	%eax, -60(%rbp)                 ## 4-byte Spill
	cmpl	$0, (%r12)
	jle	LBB0_13
## %bb.1:
	movq	%rbx, %rcx
	movsd	(%rbx), %xmm3                   ## xmm3 = mem[0],zero
	xorl	%r13d, %r13d
	movq	%rbx, -56(%rbp)                 ## 8-byte Spill
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_12:                                ##   in Loop: Header=BB0_2 Depth=1
	incq	%r13
	movslq	(%r12), %rax
	cmpq	%rax, %r13
	jge	LBB0_13
LBB0_2:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_4 Depth 2
                                        ##     Child Loop BB0_11 Depth 2
	movq	8(%rcx), %rax
	movq	(%rax,%r13,8), %r15
	ucomisd	LCPI0_2(%rip), %xmm3
	xorpd	%xmm0, %xmm0
	movsd	-72(%rbp), %xmm2                ## 8-byte Reload
                                        ## xmm2 = mem[0],zero
	jbe	LBB0_5
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	xorpd	%xmm0, %xmm0
	xorl	%eax, %eax
	.p2align	4, 0x90
LBB0_4:                                 ##   Parent Loop BB0_2 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movsd	(%r15,%rax,8), %xmm1            ## xmm1 = mem[0],zero
	mulsd	%xmm2, %xmm1
	addsd	%xmm1, %xmm0
	incq	%rax
	xorps	%xmm1, %xmm1
	cvtsi2sd	%eax, %xmm1
	ucomisd	%xmm1, %xmm3
	ja	LBB0_4
LBB0_5:                                 ##   in Loop: Header=BB0_2 Depth=1
	cmpl	$0, -60(%rbp)                   ## 4-byte Folded Reload
	je	LBB0_7
## %bb.6:                               ##   in Loop: Header=BB0_2 Depth=1
	movapd	%xmm0, %xmm1
	jmp	LBB0_8
	.p2align	4, 0x90
LBB0_7:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	8(%r12), %rax
	movsd	(%rax,%r13,8), %xmm1            ## xmm1 = mem[0],zero
	movsd	%xmm1, -48(%rbp)                ## 8-byte Spill
	movsd	LCPI0_1(%rip), %xmm2            ## xmm2 = mem[0],zero
	callq	_update_value
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	movapd	%xmm0, %xmm1
	movsd	-48(%rbp), %xmm0                ## 8-byte Reload
                                        ## xmm0 = mem[0],zero
LBB0_8:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	8(%r12), %rax
	movsd	%xmm1, (%rax,%r13,8)
	movsd	(%rcx), %xmm3                   ## xmm3 = mem[0],zero
	ucomisd	LCPI0_2(%rip), %xmm3
	jbe	LBB0_12
## %bb.9:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	16(%r12), %esi
	xorl	%edi, %edi
	movsd	%xmm0, -48(%rbp)                ## 8-byte Spill
	callq	_fade
	movsd	-48(%rbp), %xmm0                ## 8-byte Reload
                                        ## xmm0 = mem[0],zero
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	xorps	%xmm2, %xmm2
	cvtsi2sd	%rax, %xmm2
	movsd	(%r15), %xmm1                   ## xmm1 = mem[0],zero
	subsd	%xmm2, %xmm1
	movsd	%xmm1, (%r15)
	movsd	(%rcx), %xmm3                   ## xmm3 = mem[0],zero
	ucomisd	LCPI0_0(%rip), %xmm3
	jbe	LBB0_12
## %bb.10:                              ##   in Loop: Header=BB0_2 Depth=1
	movl	$1, %ebx
	movl	$2, %r14d
	.p2align	4, 0x90
LBB0_11:                                ##   Parent Loop BB0_2 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	8(%r12), %rax
	movsd	(%rax,%r13,8), %xmm1            ## xmm1 = mem[0],zero
	movl	16(%r12), %esi
	movl	%ebx, %edi
	callq	_fade
	movsd	-48(%rbp), %xmm0                ## 8-byte Reload
                                        ## xmm0 = mem[0],zero
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	xorps	%xmm2, %xmm2
	cvtsi2sd	%rax, %xmm2
	movsd	(%r15,%rbx,8), %xmm1            ## xmm1 = mem[0],zero
	subsd	%xmm2, %xmm1
	movsd	%xmm1, (%r15,%rbx,8)
	incq	%rbx
	xorps	%xmm1, %xmm1
	cvtsi2sd	%r14d, %xmm1
	movsd	(%rcx), %xmm3                   ## xmm3 = mem[0],zero
	incl	%r14d
	ucomisd	%xmm1, %xmm3
	ja	LBB0_11
	jmp	LBB0_12
LBB0_13:
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_perform_dc_correction
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function perform_dc_correction
_perform_dc_correction:                 ; @perform_dc_correction
	.cfi_startproc
; %bb.0:
	stp	d11, d10, [sp, #-112]!          ; 16-byte Folded Spill
	.cfi_def_cfa_offset 112
	stp	d9, d8, [sp, #16]               ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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 b8, -88
	.cfi_offset b9, -96
	.cfi_offset b10, -104
	.cfi_offset b11, -112
	mov	x19, x1
	mov	x20, x0
	ldr	d8, [x1]
	ldr	x8, [x0, #24]
	ldr	w0, [x8]
	bl	_cqueue_empty
	ldr	w8, [x20]
	cmp	w8, #1
	b.lt	LBB0_13
; %bb.1:
	mov	x21, x0
	mov	x23, #0
	fmov	d10, #1.00000000
	ldr	d0, [x19]
	mov	x24, #-7378697629483820647
	movk	x24, #39322
	movk	x24, #16313, lsl #48
	fdiv	d11, d10, d8
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	add	x23, x23, #1
	ldrsw	x8, [x20]
	cmp	x23, x8
	b.ge	LBB0_13
LBB0_3:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_5 Depth 2
                                        ;     Child Loop BB0_12 Depth 2
	ldr	x8, [x19, #8]
	ldr	x22, [x8, x23, lsl #3]
	movi	d8, #0000000000000000
	fcmp	d0, #0.0
	b.le	LBB0_6
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x8, #0
	movi	d8, #0000000000000000
LBB0_5:                                 ;   Parent Loop BB0_3 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	d1, [x22, x8, lsl #3]
	fmadd	d8, d1, d11, d8
	add	x8, x8, #1
	scvtf	d1, w8
	fcmp	d0, d1
	b.gt	LBB0_5
LBB0_6:                                 ;   in Loop: Header=BB0_3 Depth=1
	cbz	w21, LBB0_8
; %bb.7:                                ;   in Loop: Header=BB0_3 Depth=1
	fmov	d1, d8
	b	LBB0_9
LBB0_8:                                 ;   in Loop: Header=BB0_3 Depth=1
	ldr	x8, [x20, #8]
	ldr	d9, [x8, x23, lsl #3]
	fmov	d2, x24
	fmov	d0, d8
	fmov	d1, d9
	bl	_update_value
	fmov	d1, d0
	fmov	d8, d9
LBB0_9:                                 ;   in Loop: Header=BB0_3 Depth=1
	ldr	x8, [x20, #8]
	str	d1, [x8, x23, lsl #3]
	ldr	d0, [x19]
	fcmp	d0, #0.0
	b.le	LBB0_2
; %bb.10:                               ;   in Loop: Header=BB0_3 Depth=1
	ldr	w1, [x20, #16]
	fmov	d0, d8
	mov	w0, #0
	bl	_fade
	scvtf	d0, x0
	ldr	d1, [x22]
	fsub	d0, d1, d0
	str	d0, [x22]
	ldr	d0, [x19]
	fcmp	d0, d10
	b.le	LBB0_2
; %bb.11:                               ;   in Loop: Header=BB0_3 Depth=1
	mov	x26, #0
	add	x25, x22, #8
LBB0_12:                                ;   Parent Loop BB0_3 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	x8, [x20, #8]
	ldr	d1, [x8, x23, lsl #3]
	ldr	w1, [x20, #16]
	add	x22, x26, #1
	fmov	d0, d8
	mov	x0, x22
	bl	_fade
	scvtf	d0, x0
	lsl	x8, x26, #3
	ldr	d1, [x25, x8]
	fsub	d0, d1, d0
	str	d0, [x25, x8]
	add	w8, w26, #2
	scvtf	d1, w8
	ldr	d0, [x19]
	fcmp	d0, d1
	mov	x26, x22
	b.gt	LBB0_12
	b	LBB0_2
LBB0_13:
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	d9, d8, [sp, #16]               ; 16-byte Folded Reload
	ldp	d11, d10, [sp], #112            ; 16-byte Folded Reload
	ret
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_perform_dc_correction
.subsections_via_symbols
