	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal4,4byte_literals
	.p2align	2                               ## -- Begin function xyz_to_ball
LCPI0_0:
	.long	0x3f800000                      ## float 1
LCPI0_1:
	.long	0x3f000000                      ## float 0.5
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	4, 0x90
_xyz_to_ball:                           ## @xyz_to_ball
	.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
	movq	%r9, -80(%rbp)                  ## 8-byte Spill
	movq	%r8, -72(%rbp)                  ## 8-byte Spill
	movl	%ecx, %r15d
	movl	%edx, %r12d
	movq	%rsi, %r13
	movq	%rdi, %rbx
	movq	16(%rbp), %r14
	movss	(%rsi), %xmm0                   ## xmm0 = mem[0],zero,zero,zero
	movss	%xmm0, -48(%rbp)                ## 4-byte Spill
	movss	4(%rsi), %xmm1                  ## xmm1 = mem[0],zero,zero,zero
	movss	%xmm1, -44(%rbp)                ## 4-byte Spill
	callq	_hypotf
	movss	LCPI0_0(%rip), %xmm1            ## xmm1 = mem[0],zero,zero,zero
	movss	8(%r13), %xmm2                  ## xmm2 = mem[0],zero,zero,zero
	addss	%xmm1, %xmm2
	sqrtss	%xmm2, %xmm2
	movq	_M_SQRT2@GOTPCREL(%rip), %rax
	divss	(%rax), %xmm2
	movss	-48(%rbp), %xmm4                ## 4-byte Reload
                                        ## xmm4 = mem[0],zero,zero,zero
	mulss	%xmm2, %xmm4
	movq	(%rbx), %rax
	mulss	(%rax), %xmm4
	xorps	%xmm3, %xmm3
	cmpltss	%xmm0, %xmm3
	andps	%xmm3, %xmm0
	andnps	%xmm1, %xmm3
	orps	%xmm0, %xmm3
	divss	%xmm3, %xmm4
	addss	%xmm1, %xmm4
	cvtsi2ss	%r12d, %xmm5
	mulss	%xmm4, %xmm5
	movss	LCPI0_1(%rip), %xmm0            ## xmm0 = mem[0],zero,zero,zero
	mulss	-44(%rbp), %xmm2                ## 4-byte Folded Reload
	mulss	4(%rax), %xmm2
	mulss	%xmm0, %xmm5
	movss	%xmm5, -48(%rbp)                ## 4-byte Spill
	xorps	%xmm4, %xmm4
	cvtsi2ss	%r15d, %xmm4
	divss	%xmm3, %xmm2
	subss	%xmm2, %xmm1
	mulss	%xmm1, %xmm4
	mulss	%xmm0, %xmm4
	movss	%xmm4, -44(%rbp)                ## 4-byte Spill
	movaps	%xmm5, %xmm0
	callq	_floorf
	movl	%eax, %ebx
	movss	-44(%rbp), %xmm0                ## 4-byte Reload
                                        ## xmm0 = mem[0],zero,zero,zero
	callq	_floorf
	xorps	%xmm0, %xmm0
	cvtsi2ss	%ebx, %xmm0
	movl	%eax, %r13d
	movss	-48(%rbp), %xmm1                ## 4-byte Reload
                                        ## xmm1 = mem[0],zero,zero,zero
	subss	%xmm0, %xmm1
	movss	%xmm1, (%r14)
	xorps	%xmm0, %xmm0
	cvtsi2ss	%eax, %xmm0
	movss	-44(%rbp), %xmm1                ## 4-byte Reload
                                        ## xmm1 = mem[0],zero,zero,zero
	subss	%xmm0, %xmm1
	movq	24(%rbp), %rax
	movss	%xmm1, (%rax)
	decl	%r12d
	movl	%r12d, -44(%rbp)                ## 4-byte Spill
	decl	%r15d
	movl	%r15d, -48(%rbp)                ## 4-byte Spill
	leal	-1(%rbx), %eax
	movl	%eax, -60(%rbp)                 ## 4-byte Spill
	leal	1(%rbx), %eax
	movl	%eax, -56(%rbp)                 ## 4-byte Spill
	movq	%rbx, -88(%rbp)                 ## 8-byte Spill
	movl	%ebx, %eax
	addl	$2, %eax
	movl	%eax, -52(%rbp)                 ## 4-byte Spill
	decl	%r13d
	xorl	%r14d, %r14d
	movl	-48(%rbp), %r15d                ## 4-byte Reload
	.p2align	4, 0x90
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	movl	-60(%rbp), %edi                 ## 4-byte Reload
	xorl	%esi, %esi
	movl	-44(%rbp), %ebx                 ## 4-byte Reload
	movl	%ebx, %edx
	callq	_av_clip
	movq	-72(%rbp), %rcx                 ## 8-byte Reload
	movl	%eax, (%rcx,%r14)
	movq	%rcx, %r12
	movl	%r13d, %edi
	xorl	%esi, %esi
	movl	%r15d, %edx
	callq	_av_clip
	movq	-80(%rbp), %rcx                 ## 8-byte Reload
	movl	%eax, (%rcx,%r14)
	movq	-88(%rbp), %rdi                 ## 8-byte Reload
                                        ## kill: def $edi killed $edi killed $rdi
	xorl	%esi, %esi
	movl	%ebx, %edx
	callq	_av_clip
	movl	%eax, 4(%r12,%r14)
	movl	%r13d, %edi
	xorl	%esi, %esi
	movl	%r15d, %edx
	callq	_av_clip
	movq	-80(%rbp), %r12                 ## 8-byte Reload
	movl	%eax, 4(%r12,%r14)
	movl	-56(%rbp), %edi                 ## 4-byte Reload
	xorl	%esi, %esi
	movl	%ebx, %edx
	callq	_av_clip
	movq	-72(%rbp), %rbx                 ## 8-byte Reload
	movl	%eax, 8(%rbx,%r14)
	movl	%r13d, %edi
	xorl	%esi, %esi
	movl	%r15d, %edx
	callq	_av_clip
	movl	%eax, 8(%r12,%r14)
	movl	-52(%rbp), %edi                 ## 4-byte Reload
	xorl	%esi, %esi
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	callq	_av_clip
	movl	%eax, 12(%rbx,%r14)
	movl	%r13d, %edi
	xorl	%esi, %esi
	movl	%r15d, %edx
	callq	_av_clip
	movl	%eax, 12(%r12,%r14)
	incl	%r13d
	addq	$16, %r14
	cmpq	$64, %r14
	jne	LBB0_1
## %bb.2:
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_M_SQRT2,4,2                    ## @M_SQRT2
	.no_dead_strip	_xyz_to_ball
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function xyz_to_ball
_xyz_to_ball:                           ; @xyz_to_ball
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	d9, d8, [sp, #16]               ; 16-byte Folded Spill
	stp	x28, x27, [sp, #32]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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
	.cfi_offset b8, -104
	.cfi_offset b9, -112
	mov	x24, x7
	mov	x21, x6
	str	x5, [sp, #8]                    ; 8-byte Folded Spill
	mov	x27, x4
	mov	x22, x3
	mov	x23, x2
	mov	x20, x1
	mov	x25, x0
	ldp	s8, s9, [x1]
	fmov	s0, s8
	fmov	s1, s9
	bl	_hypotf
	ldr	s1, [x20, #8]
	fmov	s2, #1.00000000
	fadd	s1, s1, s2
	fsqrt	s1, s1
Lloh0:
	adrp	x8, _M_SQRT2@GOTPAGE
Lloh1:
	ldr	x8, [x8, _M_SQRT2@GOTPAGEOFF]
Lloh2:
	ldr	s3, [x8]
	fdiv	s1, s1, s3
	fmul	s3, s8, s1
	ldr	x8, [x25]
	ldp	s4, s5, [x8]
	fmul	s3, s4, s3
	fcmp	s0, #0.0
	fcsel	s0, s0, s2, gt
	fdiv	s3, s3, s0
	scvtf	s4, w23
	fadd	s3, s3, s2
	fmul	s3, s3, s4
	fmul	s1, s9, s1
	fmov	s4, #0.50000000
	fmul	s8, s3, s4
	fmul	s1, s1, s5
	fdiv	s0, s1, s0
	fsub	s0, s2, s0
	scvtf	s1, w22
	fmul	s0, s0, s1
	fmul	s9, s0, s4
	fmov	s0, s8
	bl	_floorf
	mov	x19, x0
	fmov	s0, s9
	bl	_floorf
	mov	x28, #0
	scvtf	s0, w19
	fsub	s0, s8, s0
	str	s0, [x21]
	scvtf	s0, w0
	sub	w21, w23, #1
	sub	w22, w22, #1
	sub	w8, w19, #1
	str	w8, [sp, #4]                    ; 4-byte Folded Spill
	fsub	s0, s9, s0
	str	s0, [x24]
	add	w24, w19, #1
	mov	x23, x19
	add	w25, w19, #2
	sub	w26, w0, #1
	add	x27, x27, #8
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w0, [sp, #4]                    ; 4-byte Folded Reload
	mov	w1, #0
	mov	x2, x21
	bl	_av_clip
	add	x19, x27, x28
	stur	w0, [x19, #-8]
	mov	x0, x26
	mov	w1, #0
	mov	x2, x22
	bl	_av_clip
	ldr	x8, [sp, #8]                    ; 8-byte Folded Reload
	add	x20, x8, x28
	str	w0, [x20]
	mov	x0, x23
	mov	w1, #0
	mov	x2, x21
	bl	_av_clip
	stur	w0, [x19, #-4]
	mov	x0, x26
	mov	w1, #0
	mov	x2, x22
	bl	_av_clip
	str	w0, [x20, #4]
	mov	x0, x24
	mov	w1, #0
	mov	x2, x21
	bl	_av_clip
	str	w0, [x19]
	mov	x0, x26
	mov	w1, #0
	mov	x2, x22
	bl	_av_clip
	str	w0, [x20, #8]
	mov	x0, x25
	mov	w1, #0
	mov	x2, x21
	bl	_av_clip
	str	w0, [x19, #4]
	mov	x0, x26
	mov	w1, #0
	mov	x2, x22
	bl	_av_clip
	str	w0, [x20, #12]
	add	w26, w26, #1
	add	x28, x28, #16
	cmp	x28, #64
	b.ne	LBB0_1
; %bb.2:
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #32]             ; 16-byte Folded Reload
	ldp	d9, d8, [sp, #16]               ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_M_SQRT2,4,2                    ; @M_SQRT2
	.no_dead_strip	_xyz_to_ball
.subsections_via_symbols
