// File: /workspace/github_cpp_makefile_star2_O2/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 0x6ece7
jp 0x6ece7
popq %rbp
retq
ucomiss %xmm1, %xmm3
jbe 0x6eeaf
movss 0x18(%rdx), %xmm5
movss 0x1c(%rdx), %xmm4
ucomiss %xmm5, %xmm4
jb 0x6eece
ucomiss %xmm3, %xmm5
ja 0x6ece5
ucomiss %xmm4, %xmm1
ja 0x6ece5
ucomiss %xmm1, %xmm5
jbe 0x6ed35
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 0x6ed38
movaps %xmm1, %xmm5
ucomiss %xmm4, %xmm3
jbe 0x6ed5d
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 0x6ed60
movaps %xmm3, %xmm4
cvtsi2ss %esi, %xmm1
ucomiss %xmm1, %xmm0
leal 0x1(%rsi), %eax
cvtsi2ss %eax, %xmm3
jne 0x6ed9a
jp 0x6ed9a
ucomiss %xmm2, %xmm3
jae 0x6ee25
leaq 0x46b50(%rip), %rdi     # 0xb58d2
leaq 0x46499(%rip), %rsi     # 0xb5222
leaq 0x46a96(%rip), %rcx     # 0xb5826
movl $0xb89, %edx            # imm = 0xB89
callq 0xc140
ucomiss %xmm3, %xmm0
jne 0x6edc5
jp 0x6edc5
ucomiss %xmm1, %xmm2
jae 0x6ee25
leaq 0x46ae8(%rip), %rdi     # 0xb5895
leaq 0x4646e(%rip), %rsi     # 0xb5222
leaq 0x46a6b(%rip), %rcx     # 0xb5826
movl $0xb8b, %edx            # imm = 0xB8B
callq 0xc140
ucomiss %xmm0, %xmm1
jae 0x6edf8
ucomiss %xmm3, %xmm0
jae 0x6ee1c
ucomiss %xmm1, %xmm2
jb 0x6edd9
ucomiss %xmm2, %xmm3
jae 0x6ee25
leaq 0x46ae7(%rip), %rdi     # 0xb58c7
leaq 0x4643b(%rip), %rsi     # 0xb5222
leaq 0x46a38(%rip), %rcx     # 0xb5826
movl $0xb91, %edx            # imm = 0xB91
callq 0xc140
ucomiss %xmm2, %xmm1
jae 0x6ee25
leaq 0x46a99(%rip), %rdi     # 0xb589d
leaq 0x46417(%rip), %rsi     # 0xb5222
leaq 0x46a14(%rip), %rcx     # 0xb5826
movl $0xb8d, %edx            # imm = 0xB8D
callq 0xc140
ucomiss %xmm3, %xmm2
jb 0x6ef0c
ucomiss %xmm0, %xmm1
jb 0x6ee4a
ucomiss %xmm2, %xmm1
jb 0x6ee4a
subss %xmm5, %xmm4
mulss 0x14(%rdx), %xmm4
movslq %esi, %rax
addss (%rdi,%rax,4), %xmm4
movss %xmm4, (%rdi,%rax,4)
jmp 0x6ece5
ucomiss %xmm3, %xmm0
jb 0x6ee58
ucomiss %xmm3, %xmm2
jae 0x6ece5
ucomiss %xmm1, %xmm0
jb 0x6eeed
ucomiss %xmm0, %xmm3
jb 0x6eeed
ucomiss %xmm1, %xmm2
jb 0x6eeed
ucomiss %xmm2, %xmm3
jb 0x6eeed
subss %xmm5, %xmm4
mulss 0x14(%rdx), %xmm4
subss %xmm1, %xmm0
subss %xmm1, %xmm2
addss %xmm0, %xmm2
mulss 0x2da63(%rip), %xmm2    # 0x9c8f4
addss 0x2d15f(%rip), %xmm2    # 0x9bff8
mulss %xmm4, %xmm2
movslq %esi, %rax
addss (%rdi,%rax,4), %xmm2
movss %xmm2, (%rdi,%rax,4)
jmp 0x6ece5
leaq 0x46968(%rip), %rdi     # 0xb581e
leaq 0x46365(%rip), %rsi     # 0xb5222
leaq 0x46962(%rip), %rcx     # 0xb5826
movl $0xb7b, %edx            # imm = 0xB7B
callq 0xc140
leaq 0x469b1(%rip), %rdi     # 0xb5886
leaq 0x46346(%rip), %rsi     # 0xb5222
leaq 0x46943(%rip), %rcx     # 0xb5826
movl $0xb7c, %edx            # imm = 0xB7C
callq 0xc140
leaq 0x469bb(%rip), %rdi     # 0xb58af
leaq 0x46327(%rip), %rsi     # 0xb5222
leaq 0x46924(%rip), %rcx     # 0xb5826
movl $0xb98, %edx            # imm = 0xB98
callq 0xc140
leaq 0x46992(%rip), %rdi     # 0xb58a5
leaq 0x46308(%rip), %rsi     # 0xb5222
leaq 0x46905(%rip), %rcx     # 0xb5826
movl $0xb8f, %edx            # imm = 0xB8F
callq 0xc140