user: What is the c source code of the assembly code below:

```asm
<match_colors_block>:
  endbr64
  push   %r15
  mov    %rsi,%r8
  mov    %rdi,%rax
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0xc8,%rsp
  movzbl (%rsi),%r14d
  movzbl (%rax),%r9d
  movzbl 0x1(%r8),%edi
  movzbl 0x3(%rsi),%r13d
  mov    %edx,0x3c(%rsp)
  movzbl 0x4(%r8),%ebp
  movzbl 0x1(%rax),%r10d
  mov    %r14d,%esi
  mov    %edi,%ecx
  sub    %r13d,%esi
  movzbl 0x2(%r8),%ebx
  movzbl 0x5(%r8),%r12d
  mov    %fs:0x28,%rdx
  mov    %rdx,0xb8(%rsp)
  xor    %edx,%edx
  sub    %ebp,%ecx
  imul   %esi,%r9d
  imul   %ecx,%r10d
  mov    %ebx,%edx
  mov    %ebx,0x8(%rsp)
  sub    %r12d,%edx
  add    %r10d,%r9d
  movzbl 0x2(%rax),%r10d
  imul   %edx,%r10d
  lea    (%r9,%r10,1),%r15d
  movzbl 0x4(%rax),%r9d
  movzbl 0x5(%rax),%r10d
  mov    %r15d,0xc(%rsp)
  imul   %ecx,%r10d
  mov    %r15d,0x70(%rsp)
  imul   %esi,%r9d
  add    %r10d,%r9d
  movzbl 0x6(%rax),%r10d
  imul   %edx,%r10d
  lea    (%r9,%r10,1),%r11d
  movzbl 0x8(%rax),%r9d
  movzbl 0x9(%rax),%r10d
  mov    %r11d,0x10(%rsp)
  imul   %ecx,%r10d
  mov    %r11d,0x74(%rsp)
  imul   %esi,%r9d
  add    %r10d,%r9d
  movzbl 0xa(%rax),%r10d
  imul   %edx,%r10d
  lea    (%r9,%r10,1),%r15d
  mov    %r15d,0x14(%rsp)
  mov    %r15d,0x78(%rsp)
  movzbl 0xc(%rax),%r9d
  movzbl 0xd(%rax),%r10d
  imul   %esi,%r9d
  imul   %ecx,%r10d
  add    %r10d,%r9d
  movzbl 0xe(%rax),%r10d
  imul   %edx,%r10d
  lea    (%r9,%r10,1),%r11d
  movzbl 0x10(%rax),%r9d
  movzbl 0x11(%rax),%r10d
  mov    %r11d,0x18(%rsp)
  imul   %ecx,%r10d
  mov    %r11d,0x7c(%rsp)
  imul   %esi,%r9d
  add    %r10d,%r9d
  movzbl 0x12(%rax),%r10d
  imul   %edx,%r10d
  lea    (%r9,%r10,1),%r15d
  movzbl 0x14(%rax),%r9d
  movzbl 0x15(%rax),%r10d
  mov    %r15d,0x1c(%rsp)
  imul   %ecx,%r10d
  mov    %r15d,0x80(%rsp)
  imul   %esi,%r9d
  add    %r10d,%r9d
  movzbl 0x16(%rax),%r10d
  imul   %edx,%r10d
  lea    (%r9,%r10,1),%r11d
  movzbl 0x18(%rax),%r9d
  movzbl 0x19(%rax),%r10d
  mov    %r11d,0x20(%rsp)
  imul   %ecx,%r10d
  mov    %r11d,0x84(%rsp)
  imul   %esi,%r9d
  add    %r10d,%r9d
  movzbl 0x1a(%rax),%r10d
  imul   %edx,%r10d
  lea    (%r9,%r10,1),%r15d
  movzbl 0x1c(%rax),%r9d
  movzbl 0x1d(%rax),%r10d
  mov    %r15d,0x24(%rsp)
  imul   %ecx,%r10d
  mov    %r15d,0x88(%rsp)
  imul   %esi,%r9d
  add    %r10d,%r9d
  movzbl 0x1e(%rax),%r10d
  imul   %edx,%r10d
  lea    (%r9,%r10,1),%r11d
  movzbl 0x20(%rax),%r9d
  movzbl 0x21(%rax),%r10d
  mov    %r11d,0x28(%rsp)
  imul   %ecx,%r10d
  mov    %r11d,0x8c(%rsp)
  imul   %esi,%r9d
  add    %r10d,%r9d
  movzbl 0x22(%rax),%r10d
  imul   %edx,%r10d
  lea    (%r9,%r10,1),%r15d
  movzbl 0x24(%rax),%r9d
  movzbl 0x25(%rax),%r10d
  mov    %r15d,0x2c(%rsp)
  imul   %ecx,%r10d
  mov    %r15d,0x90(%rsp)
  imul   %esi,%r9d
  add    %r10d,%r9d
  movzbl 0x26(%rax),%r10d
  movzbl 0x39(%rax),%ebx
  imul   %edx,%r10d
  lea    (%r9,%r10,1),%r11d
  movzbl 0x28(%rax),%r9d
  movzbl 0x29(%rax),%r10d
  mov    %r11d,0x30(%rsp)
  imul   %ecx,%r10d
  mov    %r11d,0x94(%rsp)
  imul   %esi,%r9d
  add    %r10d,%r9d
  movzbl 0x2a(%rax),%r10d
  imul   %edx,%r10d
  lea    (%r9,%r10,1),%r15d
  movzbl 0x2c(%rax),%r9d
  movzbl 0x2d(%rax),%r10d
  mov    %r15d,0x34(%rsp)
  imul   %ecx,%r10d
  mov    %r15d,0x98(%rsp)
  movzbl 0x3c(%rax),%r15d
  imul   %esi,%r9d
  add    %r10d,%r9d
  movzbl 0x2e(%rax),%r10d
  imul   %edx,%r10d
  lea    (%r9,%r10,1),%r11d
  movzbl 0x30(%rax),%r9d
  movzbl 0x31(%rax),%r10d
  mov    %r11d,0x38(%rsp)
  imul   %ecx,%r10d
  mov    %r11d,0x9c(%rsp)
  movzbl 0x35(%rax),%r11d
  imul   %esi,%r9d
  imul   %ecx,%r11d
  add    %r10d,%r9d
  movzbl 0x32(%rax),%r10d
  imul   %edx,%r10d
  add    %r10d,%r9d
  movzbl 0x34(%rax),%r10d
  mov    %r9d,0xa0(%rsp)
  imul   %esi,%r10d
  add    %r11d,%r10d
  movzbl 0x36(%rax),%r11d
  imul   %edx,%r11d
  add    %r11d,%r10d
  movzbl 0x38(%rax),%r11d
  mov    %r10d,0xa4(%rsp)
  imul   %esi,%r11d
  imul   %ecx,%ebx
  imul   %esi,%r15d
  imul   %esi,%r13d
  add    %ebx,%r11d
  movzbl 0x3a(%rax),%ebx
  imul   %esi,%r14d
  imul   %ecx,%edi
  imul   %edx,%ebx
  imul   %ecx,%ebp
  imul   %edx,%r12d
  add    %r14d,%edi
  add    %ebx,%r11d
  movzbl 0x3d(%rax),%ebx
  movzbl 0x3e(%rax),%eax
  add    %r13d,%ebp
  mov    %r11d,0xa8(%rsp)
  imul   %ecx,%ebx
  imul   %edx,%eax
  add    %r15d,%ebx
  lea    0x0(%rbp,%r12,1),%r15d
  add    %ebx,%eax
  mov    0x8(%rsp),%ebx
  mov    %r15d,0x8(%rsp)
  mov    %eax,0xac(%rsp)
  imul   %edx,%ebx
  add    %ebx,%edi
  mov    %edi,0x40(%rsp)
  mov    %r15d,0x44(%rsp)
  movzbl 0x6(%r8),%r13d
  movzbl 0x7(%r8),%ebx
  movzbl 0xa(%r8),%r12d
  imul   %esi,%r13d
  imul   %ecx,%ebx
  imul   %ecx,%r12d
  movzbl 0xb(%r8),%ecx
  add    %ebx,%r13d
  movzbl 0x8(%r8),%ebx
  imul   %edx,%ecx
  imul   %edx,%ebx
  mov    0x3c(%rsp),%edx
  add    %ebx,%r13d
  movzbl 0x9(%r8),%ebx
  add    %r13d,%edi
  mov    %r13d,0x48(%rsp)
  imul   %ebx,%esi
  sar    %edi
  add    %esi,%r12d
  add    %ecx,%r12d
  lea    (%r12,%r15,1),%ebp
  lea    (%r12,%r13,1),%ebx
  sar    %ebp
  sar    %ebx
  test   %edx,%edx
  jne    L206
  cmp    %ebx,%eax
  jl     L352
  cmp    %edi,%eax
  setl   %al
  movzbl %al,%eax
  add    %eax,%eax
  shl    $0x2,%eax
  cmp    %r11d,%ebx
  jg     L340
L337:
  xor    %edx,%edx
  cmp    %r11d,%edi
  setg   %dl
  add    %edx,%edx
  or     %edx,%eax
  shl    $0x2,%eax
  cmp    %r10d,%ebx
  jg     L344
L280:
  xor    %edx,%edx
  cmp    %r10d,%edi
  setg   %dl
  add    %edx,%edx
  or     %edx,%eax
  shl    $0x2,%eax
  cmp    %r9d,%ebx
  jg     L73
L491:
  xor    %edx,%edx
  cmp    %r9d,%edi
  mov    0x38(%rsp),%ecx
  setg   %dl
  add    %edx,%edx
  or     %edx,%eax
  shl    $0x2,%eax
  cmp    %ecx,%ebx
  jg     L170
L101:
  xor    %edx,%edx
  cmp    %ecx,%edi
  mov    0x34(%rsp),%ecx
  setg   %dl
  add    %edx,%edx
  or     %edx,%eax
  shl    $0x2,%eax
  cmp    %ecx,%ebx
  jg     L159
L415:
  xor    %edx,%edx
  cmp    %ecx,%edi
  mov    0x30(%rsp),%ecx
  setg   %dl
  add    %edx,%edx
  or     %edx,%eax
  shl    $0x2,%eax
  cmp    %ecx,%ebx
  jg     L259
L396:
  xor    %edx,%edx
  cmp    %ecx,%edi
  mov    0x2c(%rsp),%esi
  setg   %dl
  add    %edx,%edx
  or     %edx,%eax
  shl    $0x2,%eax
  cmp    %esi,%ebx
  jg     L67
L296:
  xor    %edx,%edx
  cmp    %esi,%edi
  mov    0x28(%rsp),%ecx
  setg   %dl
  add    %edx,%edx
  or     %edx,%eax
  shl    $0x2,%eax
  cmp    %ecx,%ebx
  jg     L93
L433:
  xor    %edx,%edx
  cmp    %ecx,%edi
  mov    0x24(%rsp),%esi
  setg   %dl
  add    %edx,%edx
  or     %edx,%eax
  shl    $0x2,%eax
  cmp    %esi,%ebx
  jg     L410
L172:
  xor    %edx,%edx
  cmp    %esi,%edi
  mov    0x20(%rsp),%ecx
  setg   %dl
  add    %edx,%edx
  or     %edx,%eax
  shl    $0x2,%eax
  cmp    %ecx,%ebx
  jg     L77
L9:
  xor    %edx,%edx
  cmp    %ecx,%edi
  mov    0x1c(%rsp),%esi
  setg   %dl
  add    %edx,%edx
  or     %edx,%eax
  shl    $0x2,%eax
  cmp    %esi,%ebx
  jg     L47
L375:
  xor    %edx,%edx
  cmp    %esi,%edi
  mov    0x18(%rsp),%ecx
  setg   %dl
  add    %edx,%edx
  or     %edx,%eax
  shl    $0x2,%eax
  cmp    %ecx,%ebx
  jg     L220
L145:
  xor    %edx,%edx
  cmp    %ecx,%edi
  mov    0x14(%rsp),%esi
  setg   %dl
  add    %edx,%edx
  or     %edx,%eax
  shl    $0x2,%eax
  cmp    %esi,%ebx
  jg     L61
L358:
  xor    %edx,%edx
  cmp    %esi,%edi
  mov    0x10(%rsp),%ecx
  setg   %dl
  add    %edx,%edx
  or     %edx,%eax
  shl    $0x2,%eax
  cmp    %ecx,%ebx
  jg     L86
L471:
  xor    %edx,%edx
  cmp    %ecx,%edi
  mov    0xc(%rsp),%esi
  setg   %dl
  add    %edx,%edx
  or     %edx,%eax
  shl    $0x2,%eax
  cmp    %esi,%ebx
  jle    L264
L419:
  xor    %edx,%edx
  cmp    %esi,%ebp
  setle  %dl
  lea    0x1(%rdx,%rdx,1),%edx
  or     %edx,%eax
L330:
  mov    0xb8(%rsp),%rdx
  sub    %fs:0x28,%rdx
  jne    L250
  add    $0xc8,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   0x0(%rax)
L352:
  cmp    %ebp,%eax
  setge  %al
  movzbl %al,%eax
  lea    0x1(%rax,%rax,1),%eax
  shl    $0x2,%eax
  cmp    %r11d,%ebx
  jle    L337
L340:
  xor    %edx,%edx
  cmp    %r11d,%ebp
  setle  %dl
  lea    0x1(%rdx,%rdx,1),%edx
  or     %edx,%eax
  shl    $0x2,%eax
  cmp    %r10d,%ebx
  jle    L280
L344:
  xor    %edx,%edx
  cmp    %r10d,%ebp
  setle  %dl
  lea    0x1(%rdx,%rdx,1),%edx
  or     %edx,%eax
  shl    $0x2,%eax
  cmp    %r9d,%ebx
  jle    L491
L73:
  xor    %edx,%edx
  cmp    %r9d,%ebp
  mov    0x38(%rsp),%ecx
  setle  %dl
  lea    0x1(%rdx,%rdx,1),%edx
  or     %edx,%eax
  shl    $0x2,%eax
  cmp    %ecx,%ebx
  jle    L101
L170:
  xor    %edx,%edx
  cmp    0x38(%rsp),%ebp
  mov    0x34(%rsp),%ecx
  setle  %dl
  lea    0x1(%rdx,%rdx,1),%edx
  or     %edx,%eax
  shl    $0x2,%eax
  cmp    %ecx,%ebx
  jle    L415
L159:
  xor    %edx,%edx
  cmp    0x34(%rsp),%ebp
  mov    0x30(%rsp),%ecx
  setle  %dl
  lea    0x1(%rdx,%rdx,1),%edx
  or     %edx,%eax
  shl    $0x2,%eax
  cmp    %ecx,%ebx
  jle    L396
L259:
  xor    %edx,%edx
  cmp    0x30(%rsp),%ebp
  mov    0x2c(%rsp),%esi
  setle  %dl
  lea    0x1(%rdx,%rdx,1),%edx
  or     %edx,%eax
  shl    $0x2,%eax
  cmp    %esi,%ebx
  jle    L296
L67:
  xor    %edx,%edx
  cmp    0x2c(%rsp),%ebp
  mov    0x28(%rsp),%ecx
  setle  %dl
  lea    0x1(%rdx,%rdx,1),%edx
  or     %edx,%eax
  shl    $0x2,%eax
  cmp    %ecx,%ebx
  jle    L433
L93:
  xor    %edx,%edx
  cmp    0x28(%rsp),%ebp
  mov    0x24(%rsp),%esi
  setle  %dl
  lea    0x1(%rdx,%rdx,1),%edx
  or     %edx,%eax
  shl    $0x2,%eax
  cmp    %esi,%ebx
  jle    L172
L410:
  xor    %edx,%edx
  cmp    0x24(%rsp),%ebp
  mov    0x20(%rsp),%ecx
  setle  %dl
  lea    0x1(%rdx,%rdx,1),%edx
  or     %edx,%eax
  shl    $0x2,%eax
  cmp    %ecx,%ebx
  jle    L9
L77:
  xor    %edx,%edx
  cmp    0x20(%rsp),%ebp
  mov    0x1c(%rsp),%esi
  setle  %dl
  lea    0x1(%rdx,%rdx,1),%edx
  or     %edx,%eax
  shl    $0x2,%eax
  cmp    %esi,%ebx
  jle    L375
L47:
  xor    %edx,%edx
  cmp    0x1c(%rsp),%ebp
  mov    0x18(%rsp),%ecx
  setle  %dl
  lea    0x1(%rdx,%rdx,1),%edx
  or     %edx,%eax
  shl    $0x2,%eax
  cmp    %ecx,%ebx
  jle    L145
L220:
  xor    %edx,%edx
  cmp    0x18(%rsp),%ebp
  mov    0x14(%rsp),%esi
  setle  %dl
  lea    0x1(%rdx,%rdx,1),%edx
  or     %edx,%eax
  shl    $0x2,%eax
  cmp    %esi,%ebx
  jle    L358
L61:
  xor    %edx,%edx
  cmp    0x14(%rsp),%ebp
  mov    0x10(%rsp),%ecx
  setle  %dl
  lea    0x1(%rdx,%rdx,1),%edx
  or     %edx,%eax
  shl    $0x2,%eax
  cmp    %ecx,%ebx
  jle    L471
L86:
  xor    %edx,%edx
  cmp    0x10(%rsp),%ebp
  mov    0xc(%rsp),%esi
  setle  %dl
  lea    0x1(%rdx,%rdx,1),%edx
  or     %edx,%eax
  shl    $0x2,%eax
  cmp    %esi,%ebx
  jg     L419
L264:
  xor    %edx,%edx
  cmp    0xc(%rsp),%edi
  setg   %dl
  add    %edx,%edx
  or     %edx,%eax
  jmp    L330
  nopl   (%rax)
L206:
  shl    $0x4,%edi
  lea    0x50(%rsp),%r14
  xor    %esi,%esi
  mov    $0x20,%edx
  shl    $0x4,%ebp
  mov    %edi,%r15d
  mov    %r14,%rdi
  shl    $0x4,%ebx
  call   <memset@plt>
  mov    0x64(%rsp),%edi
  mov    0x60(%rsp),%r13d
  xor    %ecx,%ecx
  mov    %r12d,0xc(%rsp)
  lea    0x70(%rsp),%r11
  mov    %r14,%r10
  xor    %eax,%eax
  lea    0x60(%rsp),%rsi
  mov    %r15d,%r12d
L186:
  mov    (%r11),%r8d
  lea    (%rdi,%rdi,2),%edx
  lea    0x0(%r13,%r13,4),%edi
  add    %edi,%edx
  mov    %r8d,%edi
  shl    $0x4,%edi
  add    %edi,%edx
  cmp    %edx,%ebx
  jle    L207
  cmp    %edx,%ebp
  jle    L378
  mov    0x8(%rsp),%edi
  mov    $0x1,%edx
L181:
  sub    %edi,%r8d
  mov    0x4(%r11),%edi
  mov    %r8d,(%r10)
  mov    %r8d,%r13d
  mov    0x8(%rsi),%r8d
  lea    (%r8,%r8,2),%r9d
  lea    0x0(,%r13,8),%r8d
  sub    %r13d,%r8d
  add    %r9d,%r8d
  mov    0x4(%rsi),%r9d
  lea    (%r9,%r9,4),%r9d
  add    %r9d,%r8d
  mov    %edi,%r9d
  add    (%rsi),%r8d
  shl    $0x4,%r9d
  add    %r9d,%r8d
  cmp    %r8d,%ebx
  jle    L233
  cmp    %r8d,%ebp
  jle    L481
  mov    0x8(%rsp),%r9d
  mov    $0x4,%r8d
L363:
  sub    %r9d,%edi
  or     %r8d,%edx
  mov    0x8(%r11),%r9d
  mov    %edi,0x4(%r10)
  mov    0xc(%rsi),%r8d
  lea    (%r8,%r8,2),%r14d
  lea    0x0(,%rdi,8),%r8d
  sub    %edi,%r8d
  add    %r14d,%r8d
  mov    0x8(%rsi),%r14d
  lea    (%r14,%r14,4),%r14d
  add    %r14d,%r8d
  mov    %r9d,%r14d
  add    0x4(%rsi),%r8d
  shl    $0x4,%r14d
  add    %r14d,%r8d
  cmp    %r8d,%ebx
  jle    L88
  cmp    %r8d,%ebp
  jle    L282
  mov    0x8(%rsp),%r14d
  mov    $0x10,%r8d
L116:
  sub    %r14d,%r9d
  or     %r8d,%edx
  mov    0xc(%r11),%r14d
  mov    %r9d,0x8(%r10)
  mov    0xc(%rsi),%r8d
  lea    0x0(,%r9,8),%r15d
  sub    %r9d,%r15d
  mov    %r14d,%r9d
  lea    (%r8,%r8,4),%r8d
  shl    $0x4,%r9d
  add    %r15d,%r8d
  add    0x8(%rsi),%r8d
  add    %r9d,%r8d
  cmp    %r8d,%ebx
  jle    L455
  cmp    %r8d,%ebp
  jle    L251
  mov    0x8(%rsp),%r9d
  mov    $0x40,%r8d
L329:
  or     %r8d,%edx
  sub    %r9d,%r14d
  add    $0x10,%r11
  shl    %cl,%edx
  add    $0x8,%ecx
  mov    %r14d,0xc(%r10)
  or     %edx,%eax
  mov    %rsi,%rdx
  mov    %r10,%rsi
  cmp    $0x20,%ecx
  je     L330
  mov    %rdx,%r10
  jmp    L186
  nopl   0x0(%rax)
L207:
  cmp    %edx,%r12d
  setg   %dl
  movzbl %dl,%edx
  add    %edx,%edx
  movslq %edx,%rdi
  mov    0x40(%rsp,%rdi,4),%edi
  jmp    L181
  nopw   0x0(%rax,%rax,1)
L455:
  cmp    %r8d,%r12d
  setg   %r8b
  movzbl %r8b,%r8d
  lea    (%r8,%r8,1),%r9d
  shl    $0x7,%r8d
  movslq %r9d,%r9
  mov    0x40(%rsp,%r9,4),%r9d
  jmp    L329
  nopl   (%rax)
L88:
  cmp    %r8d,%r12d
  setg   %r8b
  movzbl %r8b,%r8d
  lea    (%r8,%r8,1),%r14d
  shl    $0x5,%r8d
  movslq %r14d,%r14
  mov    0x40(%rsp,%r14,4),%r14d
  jmp    L116
L233:
  cmp    %r8d,%r12d
  setg   %r8b
  movzbl %r8b,%r8d
  lea    (%r8,%r8,1),%r9d
  shl    $0x3,%r8d
  movslq %r9d,%r9
  mov    0x40(%rsp,%r9,4),%r9d
  jmp    L363
L481:
  mov    0xc(%rsp),%r9d
  mov    $0xc,%r8d
  jmp    L363
L378:
  mov    0xc(%rsp),%edi
  mov    $0x3,%edx
  jmp    L181
  xchg   %ax,%ax
L251:
  mov    0xc(%rsp),%r9d
  mov    $0xc0,%r8d
  jmp    L329
L282:
  mov    0xc(%rsp),%r14d
  mov    $0x30,%r8d
  jmp    L116
L250:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
unsigned int match_colors_block(const unsigned char *block, unsigned char color[4][3], int dither) {
  unsigned int mask = 0;
  int dirb = color[0][0] - color[1][0];
  int dirg = color[0][1] - color[1][1];
  int dirr = color[0][2] - color[1][2];
  int dots[16], stops[4];
  int c0pt, halfpt, c3pt, dot;
  int i;
  for (i = 0; i < 16; ++i)
    dots[i] = block[4 * i] * dirb + block[4 * i + 1] * dirg + block[4 * i + 2] * dirr;
  for (i = 0; i < 4; ++i)
    stops[i] = color[i][0] * dirb + color[i][1] * dirg + color[i][2] * dirr;
  c0pt = (stops[1] + stops[3]) >> 1;
  halfpt = (stops[3] + stops[2]) >> 1;
  c3pt = (stops[2] + stops[0]) >> 1;
  if (!dither) {
    for (i = 15; i >= 0; --i) {
      mask <<= 2;
      dot = dots[i];
      if (dot < halfpt)
        mask |= (dot < c0pt) ? 1 : 3;
      else
        mask |= (dot < c3pt) ? 2 : 0;
    }
  } else {
    int err[8], *ep1 = err, *ep2 = err + 4, *tmp;
    int *dp = dots, y, lmask, step;
    c0pt <<= 4;
    halfpt <<= 4;
    c3pt <<= 4;
    memset(err, 0, sizeof(err));
    for (y = 0; y < 4; ++y) {
      dot = (dp[0] << 4) + (3 * ep2[1] + 5 * ep2[0]);
      if (dot < halfpt)
        step = (dot < c0pt) ? 1 : 3;
      else
        step = (dot < c3pt) ? 2 : 0;
      ep1[0] = dp[0] - stops[step];
      lmask = step;
      dot = (dp[1] << 4) + (7 * ep1[0] + 3 * ep2[2] + 5 * ep2[1] + ep2[0]);
      if (dot < halfpt)
        step = (dot < c0pt) ? 1 : 3;
      else
        step = (dot < c3pt) ? 2 : 0;
      ep1[1] = dp[1] - stops[step];
      lmask |= step << 2;
      dot = (dp[2] << 4) + (7 * ep1[1] + 3 * ep2[3] + 5 * ep2[2] + ep2[1]);
      if (dot < halfpt)
        step = (dot < c0pt) ? 1 : 3;
      else
        step = (dot < c3pt) ? 2 : 0;
      ep1[2] = dp[2] - stops[step];
      lmask |= step << 4;
      dot = (dp[3] << 4) + (7 * ep1[2] + 5 * ep2[3] + ep2[2]);
      if (dot < halfpt)
        step = (dot < c0pt) ? 1 : 3;
      else
        step = (dot < c3pt) ? 2 : 0;
      ep1[3] = dp[3] - stops[step];
      lmask |= step << 6;
      tmp = ep1;
      ep1 = ep2;
      ep2 = tmp;
      dp += 4;
      mask |= lmask << (y * 8);
    }
  }
  return (mask);
}
```