	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function bezier_deviation_squared
_bezier_deviation_squared:              ## @bezier_deviation_squared
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	subq	$48, %rsp
	movq	(%rdi), %xmm0                   ## xmm0 = mem[0],zero
	movq	8(%rdi), %xmm1                  ## xmm1 = mem[0],zero
	paddd	%xmm1, %xmm1
	movq	16(%rdi), %xmm3                 ## xmm3 = mem[0],zero
	movdqa	%xmm0, %xmm2
	paddd	%xmm3, %xmm2
	paddd	%xmm1, %xmm2
	movdqa	%xmm2, %xmm1
	psrad	$31, %xmm1
	psrld	$30, %xmm1
	paddd	%xmm2, %xmm1
	psrad	$2, %xmm1
	psubd	%xmm0, %xmm1
	movdqa	%xmm1, -32(%rbp)                ## 16-byte Spill
	psubd	%xmm0, %xmm3
	movdqa	%xmm3, -16(%rbp)                ## 16-byte Spill
	movd	%xmm3, %eax
	imull	%eax, %eax
	pextrd	$1, %xmm3, %edi
	imull	%edi, %edi
	addl	%eax, %edi
	callq	_sqrt
	movdqa	%xmm0, -48(%rbp)                ## 16-byte Spill
	cvtdq2pd	-16(%rbp), %xmm2                ## 16-byte Folded Reload
	movddup	%xmm0, %xmm1                    ## xmm1 = xmm0[0,0]
	divpd	%xmm1, %xmm2
	cvttpd2dq	%xmm2, %xmm1
	movapd	%xmm1, -16(%rbp)                ## 16-byte Spill
	movdqa	-32(%rbp), %xmm0                ## 16-byte Reload
	pmulld	%xmm1, %xmm0
	pshufd	$85, %xmm0, %xmm1               ## xmm1 = xmm0[1,1,1,1]
	paddd	%xmm0, %xmm1
	movd	%xmm1, %eax
	xorps	%xmm0, %xmm0
	cvtsi2sd	%eax, %xmm0
	pxor	%xmm1, %xmm1
	callq	_max
	movl	%eax, %edi
	movapd	-48(%rbp), %xmm0                ## 16-byte Reload
	callq	_min
	cvtdq2pd	-16(%rbp), %xmm1                ## 16-byte Folded Reload
	movddup	%xmm0, %xmm0                    ## xmm0 = xmm0[0,0]
	mulpd	%xmm1, %xmm0
	cvttpd2dq	%xmm0, %xmm0
	movdqa	-32(%rbp), %xmm1                ## 16-byte Reload
	psubd	%xmm0, %xmm1
	pmulld	%xmm1, %xmm1
	pshufd	$85, %xmm1, %xmm0               ## xmm0 = xmm1[1,1,1,1]
	paddd	%xmm1, %xmm0
	movd	%xmm0, %eax
	xorps	%xmm0, %xmm0
	cvtsi2sd	%eax, %xmm0
	addq	$48, %rsp
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_bezier_deviation_squared
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function bezier_deviation_squared
_bezier_deviation_squared:              ; @bezier_deviation_squared
	.cfi_startproc
; %bb.0:
	stp	d9, d8, [sp, #-64]!             ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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 b8, -56
	.cfi_offset b9, -64
	ldp	w8, w9, [x0]
	ldp	w10, w11, [x0, #8]
	add	w10, w8, w10, lsl #1
	ldp	w12, w13, [x0, #16]
	add	w10, w10, w12
	add	w14, w10, #3
	cmp	w10, #0
	csel	w10, w14, w10, lt
	asr	w10, w10, #2
	sub	w19, w10, w8
	add	w10, w9, w11, lsl #1
	add	w10, w10, w13
	add	w11, w10, #3
	cmp	w10, #0
	csel	w10, w11, w10, lt
	asr	w10, w10, #2
	sub	w20, w10, w9
	sub	w21, w12, w8
	sub	w22, w13, w9
	mul	w8, w21, w21
	madd	w0, w22, w22, w8
	bl	_sqrt
	fmov	d8, d0
	scvtf	d0, w21
	fdiv	d0, d0, d8
	fcvtzs	w21, d0
	scvtf	d0, w22
	fdiv	d0, d0, d8
	fcvtzs	w22, d0
	mul	w8, w19, w21
	madd	w8, w20, w22, w8
	scvtf	d0, w8
	movi	d1, #0000000000000000
	bl	_max
	fmov	d0, d8
	bl	_min
	scvtf	d1, w21
	fmul	d1, d0, d1
	fcvtzs	w8, d1
	scvtf	d1, w22
	fmul	d0, d0, d1
	fcvtzs	w9, d0
	sub	w8, w19, w8
	sub	w9, w20, w9
	mul	w8, w8, w8
	madd	w8, w9, w9, w8
	scvtf	d0, w8
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	d9, d8, [sp], #64               ; 16-byte Folded Reload
	ret
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_bezier_deviation_squared
.subsections_via_symbols
