user: Translate the below assembly code into C programming language:

```asm
<blend_overlay16>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  mov    %edi,%edx
  mov    %esi,%eax
  mov    %dx,-0x24(%rbp)
  mov    %ax,-0x28(%rbp)
  movzwl -0x24(%rbp),%eax
  shr    $0xb,%ax
  movzwl %ax,%eax
  mov    %eax,-0x18(%rbp)
  movzwl -0x28(%rbp),%eax
  shr    $0xb,%ax
  movzwl %ax,%eax
  mov    %eax,-0x14(%rbp)
  movzwl -0x24(%rbp),%eax
  sar    $0x5,%eax
  and    $0x3f,%eax
  mov    %eax,-0x10(%rbp)
  movzwl -0x28(%rbp),%eax
  sar    $0x5,%eax
  and    $0x3f,%eax
  mov    %eax,-0xc(%rbp)
  movzwl -0x24(%rbp),%eax
  and    $0x1f,%eax
  mov    %eax,-0x8(%rbp)
  movzwl -0x28(%rbp),%eax
  and    $0x1f,%eax
  mov    %eax,-0x4(%rbp)
  cmpl   $0xf,-0x14(%rbp)
  ja     L57
  mov    -0x14(%rbp),%eax
  add    %eax,%eax
  imul   -0x18(%rbp),%eax
  mov    %eax,%edx
  imul   $0x8421085,%rdx,%rdx
  shr    $0x20,%rdx
  sub    %edx,%eax
  shr    %eax
  add    %edx,%eax
  shr    $0x4,%eax
  shl    $0xb,%eax
  mov    %eax,%edx
  jmp    L25
L57:
  mov    -0x14(%rbp),%eax
  sub    $0x10,%eax
  add    %eax,%eax
  xor    $0x1f,%eax
  mov    %eax,%edx
  mov    -0x18(%rbp),%eax
  xor    $0x1f,%eax
  imul   %edx,%eax
  mov    %eax,%edx
  imul   $0x8421085,%rdx,%rdx
  shr    $0x20,%rdx
  sub    %edx,%eax
  shr    %eax
  add    %edx,%eax
  shr    $0x4,%eax
  shl    $0xb,%eax
  xor    $0xf800,%ax
  mov    %eax,%edx
L25:
  cmpl   $0x1f,-0xc(%rbp)
  ja     L19
  mov    -0xc(%rbp),%eax
  add    %eax,%eax
  imul   -0x10(%rbp),%eax
  mov    %eax,%ecx
  imul   $0x4104105,%rcx,%rcx
  shr    $0x20,%rcx
  sub    %ecx,%eax
  shr    %eax
  add    %ecx,%eax
  shr    $0x5,%eax
  shl    $0x5,%eax
  jmp    L11
L19:
  mov    -0xc(%rbp),%eax
  sub    $0x20,%eax
  add    %eax,%eax
  xor    $0x3f,%eax
  mov    %eax,%ecx
  mov    -0x10(%rbp),%eax
  xor    $0x3f,%eax
  imul   %ecx,%eax
  mov    %eax,%ecx
  imul   $0x4104105,%rcx,%rcx
  shr    $0x20,%rcx
  sub    %ecx,%eax
  shr    %eax
  add    %ecx,%eax
  shr    $0x5,%eax
  shl    $0x5,%eax
  xor    $0x7e0,%ax
L11:
  mov    %edx,%ecx
  or     %eax,%ecx
  cmpl   $0xf,-0x4(%rbp)
  ja     L56
  mov    -0x4(%rbp),%eax
  add    %eax,%eax
  imul   -0x8(%rbp),%eax
  mov    %eax,%edx
  imul   $0x8421085,%rdx,%rdx
  shr    $0x20,%rdx
  sub    %edx,%eax
  shr    %eax
  add    %edx,%eax
  shr    $0x4,%eax
  jmp    L43
L56:
  mov    -0x4(%rbp),%eax
  sub    $0x10,%eax
  add    %eax,%eax
  xor    $0x1f,%eax
  mov    %eax,%edx
  mov    -0x8(%rbp),%eax
  xor    $0x1f,%eax
  imul   %edx,%eax
  mov    %eax,%edx
  imul   $0x8421085,%rdx,%rdx
  shr    $0x20,%rdx
  sub    %edx,%eax
  shr    %eax
  add    %edx,%eax
  shr    $0x4,%eax
  xor    $0x1f,%eax
L43:
  or     %ecx,%eax
  pop    %rbp
  ret
```

assistant: ```c
unsigned short blend_overlay16(unsigned short color1, unsigned short color2) {
  unsigned r1 = (color1 >> 11), r2 = (color2 >> 11);
  unsigned g1 = ((color1 & 0x7E0) >> 5), g2 = ((color2 & 0x7E0) >> 5);
  unsigned b1 = (color1 & 0x1F), b2 = (color2 & 0x1F);
  return (((((r2) < (0x10) ? ((((r2) << 1)) * ((r1)) / ((0x1F))) : (((((((r2) - (0x10)) << 1)) ^ ((0x1F))) * (((r1)) ^ ((0x1F))) / ((0x1F))) ^ ((0x1F))))) << 11) | ((((g2) < (0x20) ? ((((g2) << 1)) * ((g1)) / ((0x3F))) : (((((((g2) - (0x20)) << 1)) ^ ((0x3F))) * (((g1)) ^ ((0x3F))) / ((0x3F))) ^ ((0x3F))))) << 5) | ((b2) < (0x10) ? ((((b2) << 1)) * ((b1)) / ((0x1F))) : (((((((b2) - (0x10)) << 1)) ^ ((0x1F))) * (((b1)) ^ ((0x1F))) / ((0x1F))) ^ ((0x1F)))));
}
```