	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal4,4byte_literals
	.p2align	2                               ## -- Begin function xmb_calculate_visible_range
LCPI0_0:
	.long	0x00000000                      ## float 0
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	4, 0x90
_xmb_calculate_visible_range:           ## @xmb_calculate_visible_range
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%ecx, %r12d
	movl	%esi, -44(%rbp)                 ## 4-byte Spill
	movq	%rdi, %r15
	movss	(%rdi), %xmm0                   ## xmm0 = mem[0],zero,zero,zero
	movss	%xmm0, -48(%rbp)                ## 4-byte Spill
	movl	$0, (%r8)
	leal	-1(%rdx), %eax
	xorl	%ecx, %ecx
	movq	%rdx, -56(%rbp)                 ## 8-byte Spill
	testq	%rdx, %rdx
	cmovnel	%eax, %ecx
	movq	%r9, %rbx
	movl	%ecx, (%r9)
	testl	%r12d, %r12d
	je	LBB0_4
## %bb.1:
	movq	%r8, %r13
	leal	-1(%r12), %r14d
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r15, %rdi
	movl	%r14d, %esi
	movl	%r12d, %edx
	callq	_xmb_item_y
	addss	-48(%rbp), %xmm0                ## 4-byte Folded Reload
	addss	4(%r15), %xmm0
	xorps	%xmm1, %xmm1
	ucomiss	%xmm0, %xmm1
	ja	LBB0_4
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	%r14d, (%r13)
	addl	$-1, %r14d
	jb	LBB0_2
LBB0_4:
	leal	1(%r12), %eax
	cmpq	-56(%rbp), %rax                 ## 8-byte Folded Reload
	jae	LBB0_8
## %bb.5:
	movq	%rbx, %r13
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	xorps	%xmm0, %xmm0
	cvtsi2ss	%rax, %xmm0
	movss	%xmm0, -44(%rbp)                ## 4-byte Spill
	leal	2(%r12), %ebx
	.p2align	4, 0x90
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	leal	-1(%rbx), %r14d
	movq	%r15, %rdi
	movl	%r14d, %esi
	movl	%r12d, %edx
	callq	_xmb_item_y
	addss	-48(%rbp), %xmm0                ## 4-byte Folded Reload
	ucomiss	-44(%rbp), %xmm0                ## 4-byte Folded Reload
	ja	LBB0_8
## %bb.7:                               ##   in Loop: Header=BB0_6 Depth=1
	movl	%r14d, (%r13)
	movl	%ebx, %eax
	incl	%ebx
	cmpq	-56(%rbp), %rax                 ## 8-byte Folded Reload
	jb	LBB0_6
LBB0_8:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_xmb_calculate_visible_range
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function xmb_calculate_visible_range
_xmb_calculate_visible_range:           ; @xmb_calculate_visible_range
	.cfi_startproc
; %bb.0:
	stp	d9, d8, [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 b8, -88
	.cfi_offset b9, -96
	mov	x19, x5
	mov	x20, x3
	mov	x21, x2
	mov	x23, x1
	mov	x22, x0
	ldr	s8, [x0]
	str	wzr, [x4]
	sub	w8, w21, #1
	cmp	x2, #0
	csel	w8, wzr, w8, eq
	str	w8, [x5]
	cbz	w3, LBB0_4
; %bb.1:
	mov	x24, x4
	sub	w25, w20, #1
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x22
	mov	x1, x25
	mov	x2, x20
	bl	_xmb_item_y
	fadd	s0, s8, s0
	ldr	s1, [x22, #4]
	fadd	s0, s0, s1
	fcmp	s0, #0.0
	b.mi	LBB0_4
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	str	w25, [x24]
	sub	w25, w25, #1
	cmn	w25, #1
	b.ne	LBB0_2
LBB0_4:
	add	w8, w20, #1
	cmp	x8, x21
	b.hs	LBB0_8
; %bb.5:
	ucvtf	s9, w23
	add	w24, w20, #2
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	sub	w23, w24, #1
	mov	x0, x22
	mov	x1, x23
	mov	x2, x20
	bl	_xmb_item_y
	fadd	s0, s8, s0
	fcmp	s0, s9
	b.gt	LBB0_8
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	str	w23, [x19]
	mov	w8, w24
	add	w24, w24, #1
	cmp	x8, x21
	b.lo	LBB0_6
LBB0_8:
	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	d9, d8, [sp], #96               ; 16-byte Folded Reload
	ret
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_xmb_calculate_visible_range
.subsections_via_symbols
