// File: /workspace/github_c_makefile_star2_O0/ggerganov[P]font-rasterizer/./stb_truetype.h
// Function: stbtt__solve_cubic
static int stbtt__solve_cubic(float a, float b, float c, float* r)
{
	float s = -a / 3;
	float p = b - a*a / 3;
	float q = a * (2*a*a - 9*b) / 27 + c;
   float p3 = p*p*p;
	float d = q*q + 4*p3 / 27;
	if (d >= 0) {
		float z = (float) STBTT_sqrt(d);
		float u = (-q + z) / 2;
		float v = (-q - z) / 2;
		u = stbtt__cuberoot(u);
		v = stbtt__cuberoot(v);
		r[0] = s + u + v;
		return 1;
	} else {
	   float u = (float) STBTT_sqrt(-p/3);
	   float v = (float) STBTT_acos(-STBTT_sqrt(-27/p3) * q / 2) / 3; // p3 must be negative, since d is negative
	   float m = (float) STBTT_cos(v);
      float n = (float) STBTT_cos(v-3.141592/2)*1.732050808f;
	   r[0] = s + u * 2 * m;
	   r[1] = s - u * (m + n);
	   r[2] = s - u * (m - n);

      //STBTT_assert( STBTT_fabs(((r[0]+a)*r[0]+b)*r[0]+c) < 0.05f);  // these asserts may not be safe at all scales, though they're in bezier t parameter units so maybe?
      //STBTT_assert( STBTT_fabs(((r[1]+a)*r[1]+b)*r[1]+c) < 0.05f);
      //STBTT_assert( STBTT_fabs(((r[2]+a)*r[2]+b)*r[2]+c) < 0.05f);
   	return 3;
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movss %xmm0, -0x8(%rbp)
movss %xmm1, -0xc(%rbp)
movss %xmm2, -0x10(%rbp)
movq %rdi, -0x18(%rbp)
movss -0x8(%rbp), %xmm0
movd %xmm0, %eax
xorl $0x80000000, %eax       # imm = 0x80000000
movd %eax, %xmm0
movss 0xab43(%rip), %xmm1     # 0x16638
divss %xmm1, %xmm0
movss %xmm0, -0x1c(%rbp)
movss -0xc(%rbp), %xmm0
movss -0x8(%rbp), %xmm1
mulss -0x8(%rbp), %xmm1
movss 0xab23(%rip), %xmm2     # 0x16638
divss %xmm2, %xmm1
subss %xmm1, %xmm0
movss %xmm0, -0x20(%rbp)
movss -0x8(%rbp), %xmm0
movss 0xaafd(%rip), %xmm1     # 0x1662c
mulss -0x8(%rbp), %xmm1
movss -0x8(%rbp), %xmm3
movss 0xab0b(%rip), %xmm2     # 0x1664c
mulss -0xc(%rbp), %xmm2
movd %xmm2, %eax
xorl $0x80000000, %eax       # imm = 0x80000000
movd %eax, %xmm2
mulss %xmm3, %xmm1
addss %xmm2, %xmm1
mulss %xmm1, %xmm0
movss 0xaae1(%rip), %xmm1     # 0x16648
divss %xmm1, %xmm0
addss -0x10(%rbp), %xmm0
movss %xmm0, -0x24(%rbp)
movss -0x20(%rbp), %xmm0
mulss -0x20(%rbp), %xmm0
mulss -0x20(%rbp), %xmm0
movss %xmm0, -0x28(%rbp)
movss -0x24(%rbp), %xmm0
movss -0x24(%rbp), %xmm2
movss 0xaaa1(%rip), %xmm1     # 0x1663c
mulss -0x28(%rbp), %xmm1
movss 0xaaa0(%rip), %xmm3     # 0x16648
divss %xmm3, %xmm1
mulss %xmm2, %xmm0
addss %xmm1, %xmm0
movss %xmm0, -0x2c(%rbp)
movss -0x2c(%rbp), %xmm0
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm0
jb 0xbc72
movss -0x2c(%rbp), %xmm0
cvtss2sd %xmm0, %xmm0
callq 0x11d0
cvtsd2ss %xmm0, %xmm0
movss %xmm0, -0x30(%rbp)
movss -0x24(%rbp), %xmm0
movd %xmm0, %eax
xorl $0x80000000, %eax       # imm = 0x80000000
movd %eax, %xmm0
addss -0x30(%rbp), %xmm0
movss 0xaa2c(%rip), %xmm1     # 0x1662c
divss %xmm1, %xmm0
movss %xmm0, -0x34(%rbp)
movss -0x24(%rbp), %xmm0
movd %xmm0, %eax
xorl $0x80000000, %eax       # imm = 0x80000000
movd %eax, %xmm0
subss -0x30(%rbp), %xmm0
movss 0xaa04(%rip), %xmm1     # 0x1662c
divss %xmm1, %xmm0
movss %xmm0, -0x38(%rbp)
movss -0x34(%rbp), %xmm0
callq 0x13a10
movss %xmm0, -0x34(%rbp)
movss -0x38(%rbp), %xmm0
callq 0x13a10
movss %xmm0, -0x38(%rbp)
movss -0x1c(%rbp), %xmm0
addss -0x34(%rbp), %xmm0
addss -0x38(%rbp), %xmm0
movq -0x18(%rbp), %rax
movss %xmm0, (%rax)
movl $0x1, -0x4(%rbp)
jmp 0xbdda
movss -0x20(%rbp), %xmm0
movd %xmm0, %eax
xorl $0x80000000, %eax       # imm = 0x80000000
movd %eax, %xmm0
movss 0xa9ac(%rip), %xmm1     # 0x16638
divss %xmm1, %xmm0
cvtss2sd %xmm0, %xmm0
callq 0x11d0
cvtsd2ss %xmm0, %xmm0
movss %xmm0, -0x3c(%rbp)
movss 0xa9aa(%rip), %xmm0     # 0x16654
divss -0x28(%rbp), %xmm0
cvtss2sd %xmm0, %xmm0
callq 0x11d0
movq %xmm0, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm0
movss -0x24(%rbp), %xmm1
cvtss2sd %xmm1, %xmm1
mulsd %xmm1, %xmm0
movsd 0xa9bc(%rip), %xmm1     # 0x166a0
divsd %xmm1, %xmm0
callq 0x10e0
cvtsd2ss %xmm0, %xmm0
movss 0xa93f(%rip), %xmm1     # 0x16638
divss %xmm1, %xmm0
movss %xmm0, -0x40(%rbp)
movss -0x40(%rbp), %xmm0
cvtss2sd %xmm0, %xmm0
callq 0x10d0
cvtsd2ss %xmm0, %xmm0
movss %xmm0, -0x44(%rbp)
movss -0x40(%rbp), %xmm0
cvtss2sd %xmm0, %xmm0
movsd 0xa96e(%rip), %xmm1     # 0x16698
subsd %xmm1, %xmm0
callq 0x10d0
cvtsd2ss %xmm0, %xmm0
movss 0xa911(%rip), %xmm1     # 0x16650
mulss %xmm1, %xmm0
movss %xmm0, -0x48(%rbp)
movss -0x1c(%rbp), %xmm1
movss 0xa8d7(%rip), %xmm0     # 0x1662c
mulss -0x3c(%rbp), %xmm0
movss -0x44(%rbp), %xmm2
mulss %xmm2, %xmm0
addss %xmm1, %xmm0
movq -0x18(%rbp), %rax
movss %xmm0, (%rax)
movss -0x1c(%rbp), %xmm1
movss -0x3c(%rbp), %xmm0
movss -0x44(%rbp), %xmm2
addss -0x48(%rbp), %xmm2
movd %xmm0, %eax
xorl $0x80000000, %eax       # imm = 0x80000000
movd %eax, %xmm0
mulss %xmm2, %xmm0
addss %xmm1, %xmm0
movq -0x18(%rbp), %rax
movss %xmm0, 0x4(%rax)
movss -0x1c(%rbp), %xmm1
movss -0x3c(%rbp), %xmm0
movss -0x44(%rbp), %xmm2
subss -0x48(%rbp), %xmm2
movd %xmm0, %eax
xorl $0x80000000, %eax       # imm = 0x80000000
movd %eax, %xmm0
mulss %xmm2, %xmm0
addss %xmm1, %xmm0
movq -0x18(%rbp), %rax
movss %xmm0, 0x8(%rax)
movl $0x3, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x50, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)