// File: /workspace/github_cpp_makefile_star2_O1/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 0x878df
jp 0x878df
popq %rbp
retq
ucomiss %xmm1, %xmm3
jbe 0x87aad
movss 0x18(%rdx), %xmm5
movss 0x1c(%rdx), %xmm4
ucomiss %xmm5, %xmm4
jb 0x87acc
ucomiss %xmm3, %xmm5
ja 0x878dd
ucomiss %xmm4, %xmm1
ja 0x878dd
ucomiss %xmm1, %xmm5
jbe 0x8792d
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 0x87930
movaps %xmm1, %xmm5
ucomiss %xmm4, %xmm3
jbe 0x87955
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 0x87958
movaps %xmm3, %xmm4
xorps %xmm1, %xmm1
cvtsi2ss %esi, %xmm1
ucomiss %xmm1, %xmm0
leal 0x1(%rsi), %eax
xorps %xmm3, %xmm3
cvtsi2ss %eax, %xmm3
jne 0x87998
jp 0x87998
ucomiss %xmm2, %xmm3
jae 0x87a23
leaq 0x48c86(%rip), %rdi     # 0xd0606
leaq 0x4859b(%rip), %rsi     # 0xcff22
leaq 0x48bcc(%rip), %rcx     # 0xd055a
movl $0xb89, %edx            # imm = 0xB89
callq 0xc140
ucomiss %xmm3, %xmm0
jne 0x879c3
jp 0x879c3
ucomiss %xmm1, %xmm2
jae 0x87a23
leaq 0x48c1e(%rip), %rdi     # 0xd05c9
leaq 0x48570(%rip), %rsi     # 0xcff22
leaq 0x48ba1(%rip), %rcx     # 0xd055a
movl $0xb8b, %edx            # imm = 0xB8B
callq 0xc140
ucomiss %xmm0, %xmm1
jae 0x879f6
ucomiss %xmm3, %xmm0
jae 0x87a1a
ucomiss %xmm1, %xmm2
jb 0x879d7
ucomiss %xmm2, %xmm3
jae 0x87a23
leaq 0x48c1d(%rip), %rdi     # 0xd05fb
leaq 0x4853d(%rip), %rsi     # 0xcff22
leaq 0x48b6e(%rip), %rcx     # 0xd055a
movl $0xb91, %edx            # imm = 0xB91
callq 0xc140
ucomiss %xmm2, %xmm1
jae 0x87a23
leaq 0x48bcf(%rip), %rdi     # 0xd05d1
leaq 0x48519(%rip), %rsi     # 0xcff22
leaq 0x48b4a(%rip), %rcx     # 0xd055a
movl $0xb8d, %edx            # imm = 0xB8D
callq 0xc140
ucomiss %xmm3, %xmm2
jb 0x87b0a
ucomiss %xmm0, %xmm1
jb 0x87a48
ucomiss %xmm2, %xmm1
jb 0x87a48
subss %xmm5, %xmm4
mulss 0x14(%rdx), %xmm4
movslq %esi, %rax
addss (%rdi,%rax,4), %xmm4
movss %xmm4, (%rdi,%rax,4)
jmp 0x878dd
ucomiss %xmm3, %xmm0
jb 0x87a56
ucomiss %xmm3, %xmm2
jae 0x878dd
ucomiss %xmm1, %xmm0
jb 0x87aeb
ucomiss %xmm0, %xmm3
jb 0x87aeb
ucomiss %xmm1, %xmm2
jb 0x87aeb
ucomiss %xmm2, %xmm3
jb 0x87aeb
subss %xmm5, %xmm4
mulss 0x14(%rdx), %xmm4
subss %xmm1, %xmm0
subss %xmm1, %xmm2
addss %xmm0, %xmm2
mulss 0x2fe35(%rip), %xmm2    # 0xb78c4
addss 0x2f54d(%rip), %xmm2    # 0xb6fe4
mulss %xmm4, %xmm2
movslq %esi, %rax
addss (%rdi,%rax,4), %xmm2
movss %xmm2, (%rdi,%rax,4)
jmp 0x878dd
leaq 0x48a9e(%rip), %rdi     # 0xd0552
leaq 0x48467(%rip), %rsi     # 0xcff22
leaq 0x48a98(%rip), %rcx     # 0xd055a
movl $0xb7b, %edx            # imm = 0xB7B
callq 0xc140
leaq 0x48ae7(%rip), %rdi     # 0xd05ba
leaq 0x48448(%rip), %rsi     # 0xcff22
leaq 0x48a79(%rip), %rcx     # 0xd055a
movl $0xb7c, %edx            # imm = 0xB7C
callq 0xc140
leaq 0x48af1(%rip), %rdi     # 0xd05e3
leaq 0x48429(%rip), %rsi     # 0xcff22
leaq 0x48a5a(%rip), %rcx     # 0xd055a
movl $0xb98, %edx            # imm = 0xB98
callq 0xc140
leaq 0x48ac8(%rip), %rdi     # 0xd05d9
leaq 0x4840a(%rip), %rsi     # 0xcff22
leaq 0x48a3b(%rip), %rcx     # 0xd055a
movl $0xb8f, %edx            # imm = 0xB8F
callq 0xc140