// File: /workspace/github_cpp_makefile_star2_O3/Ciaxur[P]yagb-emu/include/imgui/imstb_truetype.h
// Function: stbtt__handle_clipped_edge(float*, int, stbtt__active_edge*, float, float, float, float)
static void stbtt__handle_clipped_edge(float *scanline, int x, stbtt__active_edge *e, float x0, float y0, float x1, float y1)
{
   if (y0 == y1) return;
   STBTT_assert(y0 < y1);
   STBTT_assert(e->sy <= e->ey);
   if (y0 > e->ey) return;
   if (y1 < e->sy) return;
   if (y0 < e->sy) {
      x0 += (x1-x0) * (e->sy - y0) / (y1-y0);
      y0 = e->sy;
   }
   if (y1 > e->ey) {
      x1 += (x1-x0) * (e->ey - y1) / (y1-y0);
      y1 = e->ey;
   }

   if (x0 == x)
      STBTT_assert(x1 <= x+1);
   else if (x0 == x+1)
      STBTT_assert(x1 >= x);
   else if (x0 <= x)
      STBTT_assert(x1 <= x);
   else if (x0 >= x+1)
      STBTT_assert(x1 >= x+1);
   else
      STBTT_assert(x1 >= x && x1 <= x+1);

   if (x0 <= x && x1 <= x)
      scanline[x] += e->direction * (y1-y0);
   else if (x0 >= x+1 && x1 >= x+1)
      ;
   else {
      STBTT_assert(x0 >= x && x0 <= x+1 && x1 >= x && x1 <= x+1);
      scanline[x] += e->direction * (y1-y0) * (1-((x0-x)+(x1-x))/2); // coverage = 1 - average x position
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
ucomiss %xmm3, %xmm1
jne 0x85be1
jp 0x85be1
popq %rbp
retq
ucomiss %xmm1, %xmm3
jbe 0x85daf
movss 0x18(%rdx), %xmm5
movss 0x1c(%rdx), %xmm4
ucomiss %xmm5, %xmm4
jb 0x85dce
ucomiss %xmm3, %xmm5
ja 0x85bdf
ucomiss %xmm4, %xmm1
ja 0x85bdf
ucomiss %xmm1, %xmm5
jbe 0x85c2f
movaps %xmm2, %xmm6
subss %xmm0, %xmm6
movaps %xmm5, %xmm7
subss %xmm1, %xmm7
mulss %xmm6, %xmm7
movaps %xmm3, %xmm6
subss %xmm1, %xmm6
divss %xmm6, %xmm7
addss %xmm7, %xmm0
jmp 0x85c32
movaps %xmm1, %xmm5
ucomiss %xmm4, %xmm3
jbe 0x85c57
movaps %xmm2, %xmm1
subss %xmm0, %xmm1
movaps %xmm4, %xmm6
subss %xmm3, %xmm6
mulss %xmm1, %xmm6
subss %xmm5, %xmm3
divss %xmm3, %xmm6
addss %xmm6, %xmm2
jmp 0x85c5a
movaps %xmm3, %xmm4
xorps %xmm1, %xmm1
cvtsi2ss %esi, %xmm1
ucomiss %xmm1, %xmm0
leal 0x1(%rsi), %eax
xorps %xmm3, %xmm3
cvtsi2ss %eax, %xmm3
jne 0x85c9a
jp 0x85c9a
ucomiss %xmm2, %xmm3
jae 0x85d25
leaq 0x48920(%rip), %rdi     # 0xce5a2
leaq 0x48269(%rip), %rsi     # 0xcdef2
leaq 0x48866(%rip), %rcx     # 0xce4f6
movl $0xb89, %edx            # imm = 0xB89
callq 0xc140
ucomiss %xmm3, %xmm0
jne 0x85cc5
jp 0x85cc5
ucomiss %xmm1, %xmm2
jae 0x85d25
leaq 0x488b8(%rip), %rdi     # 0xce565
leaq 0x4823e(%rip), %rsi     # 0xcdef2
leaq 0x4883b(%rip), %rcx     # 0xce4f6
movl $0xb8b, %edx            # imm = 0xB8B
callq 0xc140
ucomiss %xmm0, %xmm1
jae 0x85cf8
ucomiss %xmm3, %xmm0
jae 0x85d1c
ucomiss %xmm1, %xmm2
jb 0x85cd9
ucomiss %xmm2, %xmm3
jae 0x85d25
leaq 0x488b7(%rip), %rdi     # 0xce597
leaq 0x4820b(%rip), %rsi     # 0xcdef2
leaq 0x48808(%rip), %rcx     # 0xce4f6
movl $0xb91, %edx            # imm = 0xB91
callq 0xc140
ucomiss %xmm2, %xmm1
jae 0x85d25
leaq 0x48869(%rip), %rdi     # 0xce56d
leaq 0x481e7(%rip), %rsi     # 0xcdef2
leaq 0x487e4(%rip), %rcx     # 0xce4f6
movl $0xb8d, %edx            # imm = 0xB8D
callq 0xc140
ucomiss %xmm3, %xmm2
jb 0x85e0c
ucomiss %xmm0, %xmm1
jb 0x85d4a
ucomiss %xmm2, %xmm1
jb 0x85d4a
subss %xmm5, %xmm4
mulss 0x14(%rdx), %xmm4
movslq %esi, %rax
addss (%rdi,%rax,4), %xmm4
movss %xmm4, (%rdi,%rax,4)
jmp 0x85bdf
ucomiss %xmm3, %xmm0
jb 0x85d58
ucomiss %xmm3, %xmm2
jae 0x85bdf
ucomiss %xmm1, %xmm0
jb 0x85ded
ucomiss %xmm0, %xmm3
jb 0x85ded
ucomiss %xmm1, %xmm2
jb 0x85ded
ucomiss %xmm2, %xmm3
jb 0x85ded
subss %xmm5, %xmm4
mulss 0x14(%rdx), %xmm4
subss %xmm1, %xmm0
subss %xmm1, %xmm2
addss %xmm0, %xmm2
mulss 0x2fb33(%rip), %xmm2    # 0xb58c4
addss 0x2f24b(%rip), %xmm2    # 0xb4fe4
mulss %xmm4, %xmm2
movslq %esi, %rax
addss (%rdi,%rax,4), %xmm2
movss %xmm2, (%rdi,%rax,4)
jmp 0x85bdf
leaq 0x48738(%rip), %rdi     # 0xce4ee
leaq 0x48135(%rip), %rsi     # 0xcdef2
leaq 0x48732(%rip), %rcx     # 0xce4f6
movl $0xb7b, %edx            # imm = 0xB7B
callq 0xc140
leaq 0x48781(%rip), %rdi     # 0xce556
leaq 0x48116(%rip), %rsi     # 0xcdef2
leaq 0x48713(%rip), %rcx     # 0xce4f6
movl $0xb7c, %edx            # imm = 0xB7C
callq 0xc140
leaq 0x4878b(%rip), %rdi     # 0xce57f
leaq 0x480f7(%rip), %rsi     # 0xcdef2
leaq 0x486f4(%rip), %rcx     # 0xce4f6
movl $0xb98, %edx            # imm = 0xB98
callq 0xc140
leaq 0x48762(%rip), %rdi     # 0xce575
leaq 0x480d8(%rip), %rsi     # 0xcdef2
leaq 0x486d5(%rip), %rcx     # 0xce4f6
movl $0xb8f, %edx            # imm = 0xB8F
callq 0xc140