	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function get_visual_weight
_get_visual_weight:                     ## @get_visual_weight
	.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	$88, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, -96(%rbp)                 ## 8-byte Spill
	movq	%rdi, -104(%rbp)                ## 8-byte Spill
	movslq	%edx, %rax
	movq	%rax, -88(%rbp)                 ## 8-byte Spill
	leaq	(,%rax,4), %rax
	movq	%rax, -120(%rbp)                ## 8-byte Spill
	xorl	%eax, %eax
	jmp	LBB0_1
	.p2align	4, 0x90
LBB0_9:                                 ##   in Loop: Header=BB0_1 Depth=1
	movq	-80(%rbp), %rax                 ## 8-byte Reload
	incq	%rax
	cmpq	$8, %rax
	je	LBB0_10
LBB0_1:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_2 Depth 2
                                        ##       Child Loop BB0_4 Depth 3
                                        ##         Child Loop BB0_6 Depth 4
	leaq	(,%rax,8), %rcx
	movq	%rcx, -112(%rbp)                ## 8-byte Spill
	leal	-1(%rax), %ecx
	movl	%ecx, -60(%rbp)                 ## 4-byte Spill
	movq	%rax, -80(%rbp)                 ## 8-byte Spill
	addl	$2, %eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	xorl	%eax, %eax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_8:                                 ##   in Loop: Header=BB0_2 Depth=2
	imull	%r13d, %ebx
	imull	%r14d, %r14d
	subl	%r14d, %ebx
	movl	%ebx, %edi
	callq	_ff_sqrt
                                        ## kill: def $eax killed $eax def $rax
	shll	$2, %eax
	leal	(%rax,%rax,8), %eax
	cltd
	idivl	%r13d
	movq	-112(%rbp), %rcx                ## 8-byte Reload
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	addq	%rsi, %rcx
	movq	-104(%rbp), %rdx                ## 8-byte Reload
	movl	%eax, (%rdx,%rcx,4)
	incq	%rsi
	movq	%rsi, %rax
	movq	%rsi, -56(%rbp)                 ## 8-byte Spill
	cmpq	$8, %rsi
	je	LBB0_9
LBB0_2:                                 ##   Parent Loop BB0_1 Depth=1
                                        ## =>  This Loop Header: Depth=2
                                        ##       Child Loop BB0_4 Depth 3
                                        ##         Child Loop BB0_6 Depth 4
	xorl	%r14d, %r14d
	movl	-60(%rbp), %edi                 ## 4-byte Reload
	xorl	%esi, %esi
	callq	_FFMAX
	movl	%eax, %r15d
	movl	$8, %edi
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	callq	_FFMIN
	movl	$0, %ebx
	movl	$0, %r13d
	cmpl	%eax, %r15d
	jge	LBB0_8
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=2
	movslq	%r15d, %r15
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	leal	-1(%rax), %ecx
	movl	%ecx, -64(%rbp)                 ## 4-byte Spill
	addl	$2, %eax
	movl	%eax, -48(%rbp)                 ## 4-byte Spill
	movq	-88(%rbp), %rax                 ## 8-byte Reload
	imulq	%r15, %rax
	movq	-96(%rbp), %rcx                 ## 8-byte Reload
	leaq	(%rcx,%rax,4), %r12
	xorl	%r13d, %r13d
	xorl	%ebx, %ebx
	xorl	%r14d, %r14d
	jmp	LBB0_4
	.p2align	4, 0x90
LBB0_7:                                 ##   in Loop: Header=BB0_4 Depth=3
	movq	-128(%rbp), %r15                ## 8-byte Reload
	incq	%r15
	movl	$8, %edi
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	callq	_FFMIN
	cltq
	movq	-72(%rbp), %r12                 ## 8-byte Reload
	addq	-120(%rbp), %r12                ## 8-byte Folded Reload
	cmpq	%rax, %r15
	jge	LBB0_8
LBB0_4:                                 ##   Parent Loop BB0_1 Depth=1
                                        ##     Parent Loop BB0_2 Depth=2
                                        ## =>    This Loop Header: Depth=3
                                        ##         Child Loop BB0_6 Depth 4
	movq	%r12, -72(%rbp)                 ## 8-byte Spill
	movl	-64(%rbp), %edi                 ## 4-byte Reload
	xorl	%esi, %esi
	callq	_FFMAX
	movl	%eax, %r12d
	movl	$8, %edi
	movl	-48(%rbp), %esi                 ## 4-byte Reload
	callq	_FFMIN
	cmpl	%eax, %r12d
	movq	%r15, -128(%rbp)                ## 8-byte Spill
	jge	LBB0_7
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=3
	movslq	%r12d, %r15
	movl	-48(%rbp), %r12d                ## 4-byte Reload
	.p2align	4, 0x90
LBB0_6:                                 ##   Parent Loop BB0_1 Depth=1
                                        ##     Parent Loop BB0_2 Depth=2
                                        ##       Parent Loop BB0_4 Depth=3
                                        ## =>      This Inner Loop Header: Depth=4
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax,%r15,4), %eax
	addl	%eax, %r14d
	imull	%eax, %eax
	addl	%eax, %ebx
	incl	%r13d
	incq	%r15
	movl	$8, %edi
	movl	%r12d, %esi
	callq	_FFMIN
	cltq
	cmpq	%rax, %r15
	jl	LBB0_6
	jmp	LBB0_7
LBB0_10:
	addq	$88, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_get_visual_weight
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function get_visual_weight
_get_visual_weight:                     ; @get_visual_weight
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #160
	.cfi_def_cfa_offset 160
	stp	x28, x27, [sp, #64]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #80]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #96]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #112]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #128]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #144]            ; 16-byte Folded Spill
	add	x29, sp, #144
	.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
                                        ; kill: def $w2 killed $w2 def $x2
	stp	x1, x0, [sp, #24]               ; 16-byte Folded Spill
	mov	x8, #0
	sxtw	x9, w2
	str	x9, [sp, #16]                   ; 8-byte Folded Spill
	sbfiz	x28, x2, #2, #32
	b	LBB0_2
LBB0_1:                                 ;   in Loop: Header=BB0_2 Depth=1
	ldr	x8, [sp, #8]                    ; 8-byte Folded Reload
	add	x8, x8, #1
	cmp	x8, #8
	b.eq	LBB0_10
LBB0_2:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_4 Depth 2
                                        ;       Child Loop BB0_7 Depth 3
                                        ;         Child Loop BB0_9 Depth 4
	lsl	x9, x8, #3
	stp	x9, xzr, [sp, #48]              ; 16-byte Folded Spill
	sub	w9, w8, #1
	str	w9, [sp, #44]                   ; 4-byte Folded Spill
	str	x8, [sp, #8]                    ; 8-byte Folded Spill
	add	w22, w8, #2
	b	LBB0_4
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=2
	mul	w8, w27, w19
	msub	w0, w20, w20, w8
	bl	_ff_sqrt
	add	w8, w0, w0, lsl #3
	lsl	w8, w8, #2
	sdiv	w8, w8, w27
	ldp	x9, x11, [sp, #48]              ; 16-byte Folded Reload
	add	x9, x11, x9
	ldr	x10, [sp, #32]                  ; 8-byte Folded Reload
	str	w8, [x10, x9, lsl #2]
	add	x11, x11, #1
	str	x11, [sp, #56]                  ; 8-byte Folded Spill
	cmp	x11, #8
	b.eq	LBB0_1
LBB0_4:                                 ;   Parent Loop BB0_2 Depth=1
                                        ; =>  This Loop Header: Depth=2
                                        ;       Child Loop BB0_7 Depth 3
                                        ;         Child Loop BB0_9 Depth 4
	ldr	w0, [sp, #44]                   ; 4-byte Folded Reload
	mov	w1, #0
	bl	_FFMAX
	mov	x23, x0
	mov	w0, #8
	mov	x1, x22
	bl	_FFMIN
	mov	w20, #0
	mov	w19, #0
	mov	w27, #0
	cmp	w23, w0
	b.ge	LBB0_3
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=2
	mov	w27, #0
	mov	w19, #0
	mov	w20, #0
	sxtw	x21, w23
	ldr	x8, [sp, #56]                   ; 8-byte Folded Reload
	sub	w23, w8, #1
	add	w24, w8, #2
	ldp	x8, x9, [sp, #16]               ; 16-byte Folded Reload
	mul	x8, x8, x21
	add	x26, x9, x8, lsl #2
	b	LBB0_7
LBB0_6:                                 ;   in Loop: Header=BB0_7 Depth=3
	add	x21, x21, #1
	mov	w0, #8
	mov	x1, x22
	bl	_FFMIN
	add	x26, x26, x28
	cmp	x21, w0, sxtw
	b.ge	LBB0_3
LBB0_7:                                 ;   Parent Loop BB0_2 Depth=1
                                        ;     Parent Loop BB0_4 Depth=2
                                        ; =>    This Loop Header: Depth=3
                                        ;         Child Loop BB0_9 Depth 4
	mov	x0, x23
	mov	w1, #0
	bl	_FFMAX
	mov	x25, x0
	mov	w0, #8
	mov	x1, x24
	bl	_FFMIN
	cmp	w25, w0
	b.ge	LBB0_6
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=3
	sxtw	x25, w25
LBB0_9:                                 ;   Parent Loop BB0_2 Depth=1
                                        ;     Parent Loop BB0_4 Depth=2
                                        ;       Parent Loop BB0_7 Depth=3
                                        ; =>      This Inner Loop Header: Depth=4
	ldr	w8, [x26, x25, lsl #2]
	add	w20, w8, w20
	madd	w19, w8, w8, w19
	add	w27, w27, #1
	add	x25, x25, #1
	mov	w0, #8
	mov	x1, x24
	bl	_FFMIN
	cmp	x25, w0, sxtw
	b.lt	LBB0_9
	b	LBB0_6
LBB0_10:
	ldp	x29, x30, [sp, #144]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #128]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #112]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #96]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #80]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #64]             ; 16-byte Folded Reload
	add	sp, sp, #160
	ret
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_get_visual_weight
.subsections_via_symbols
