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

```asm
<FS460_decode_bitmap_from_alpha_masks>:
  endbr64
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  mov    %rdx,%rbp
  lea    -0x2(%rcx),%edx
  mov    $0x1000,%eax
  cmp    $0xfffe,%edx
  ja     L74
  mov    %rdi,%r10
  mov    %rsi,%rbx
  mov    %ecx,%r11d
  lea    -0x2(%r9),%edx
  cmp    $0xfffe,%edx
  ja     L74
  test   %rbp,%rbp
  je     L57
  test   %r8,%r8
  je     L57
  test   %rdi,%rdi
  je     L66
  test   %rsi,%rsi
  je     L66
  mov    (%rsi),%rdi
  test   %rdi,%rdi
  je     L147
  mov    $0x1,%r12d
  mov    $0x2d0,%esi
  jmp    L145
L52:
  movzwl (%r8),%ecx
  mov    %ecx,%eax
  shr    $0x8,%ax
  movzwl %ax,%eax
  add    $0x2,%r8
  sub    $0x2,%r9d
  jmp    L178
L87:
  test   %r11d,%r11d
  setg   %dl
  test   %r9d,%r9d
  setg   %al
  test   %al,%dl
  je     L147
  test   %rdi,%rdi
  je     L147
L145:
  test   %r12d,%r12d
  je     L52
  movzwl 0x0(%rbp),%ecx
  mov    %ecx,%eax
  shr    $0x8,%ax
  movzwl %ax,%eax
  add    $0x2,%rbp
  sub    $0x2,%r11d
L178:
  test   %eax,%eax
  cmove  %esi,%eax
  movslq %eax,%rdx
  cmp    %rdi,%rdx
  cmovg  %edi,%eax
  cmp    %esi,%eax
  cmovg  %esi,%eax
  mov    %eax,%edx
  test   %eax,%eax
  jle    L75
  mov    %eax,%r13d
  add    %r10,%r13
  mov    %r10,%rax
L105:
  add    $0x1,%rax
  mov    %cl,-0x1(%rax)
  cmp    %rax,%r13
  jne    L105
  mov    %edx,%eax
  add    %rax,%r10
L75:
  movslq %edx,%rax
  sub    %rax,%rdi
  sub    %edx,%esi
  jne    L87
  xor    $0x1,%r12d
  mov    $0x2d0,%esi
  jmp    L87
L147:
  sub    %rdi,(%rbx)
  mov    $0x0,%eax
L74:
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  ret
L57:
  mov    $0x1000,%eax
  jmp    L74
L66:
  mov    $0x1000,%eax
  jmp    L74
```

assistant: ```c
int FS460_decode_bitmap_from_alpha_masks(unsigned char *p_alpha_values, long *p_alpha_value_size, const unsigned short *p_alpha_mask_odd, int mask_size_odd, const unsigned short *p_alpha_mask_even, int mask_size_even) {
  long alpha_value_size;
  unsigned char *p_a;
  const unsigned short *p_mo, *p_me;
  unsigned char alpha;
  int count, remainder, i;
  int is_odd;
  if ((mask_size_odd > 0x10000) || (mask_size_odd < 2) || (mask_size_even > 0x10000) || (mask_size_even < 2) || !p_alpha_mask_odd || !p_alpha_mask_even || !p_alpha_values || !p_alpha_value_size) {
    return 0x1000;
  }
  alpha_value_size = *p_alpha_value_size;
  p_a = p_alpha_values;
  p_mo = p_alpha_mask_odd;
  p_me = p_alpha_mask_even;
  is_odd = 1;
  remainder = 720;
  while ((mask_size_odd > 0) && (mask_size_even > 0) && alpha_value_size) {
    if (is_odd) {
      count = (*p_mo) >> 8;
      alpha = (unsigned char)(0xFF & *p_mo);
      p_mo++;
      mask_size_odd -= 2;
    } else {
      count = (*p_me) >> 8;
      alpha = (unsigned char)(0xFF & *p_me);
      p_me++;
      mask_size_even -= 2;
    }
    if (!count)
      count = remainder;
    if (count > alpha_value_size)
      count = alpha_value_size;
    if (count > remainder)
      count = remainder;
    for (i = count; i > 0; i--)
      *(p_a++) = alpha;
    alpha_value_size -= count;
    remainder -= count;
    if (!remainder) {
      remainder = 720;
      is_odd = !is_odd;
    }
  }
  *p_alpha_value_size -= alpha_value_size;
  return 0;
}
```