user: 请从给定的汇编指令推导出C源代码:

```asm
<FS460_decode_bitmap_from_alpha_masks>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  mov    %rdi,-0x48(%rbp)
  mov    %rsi,-0x50(%rbp)
  mov    %rdx,-0x58(%rbp)
  mov    %ecx,-0x5c(%rbp)
  mov    %r8,-0x68(%rbp)
  mov    %r9d,-0x60(%rbp)
  cmpl   $0x10000,-0x5c(%rbp)
  jg     L72
  cmpl   $0x1,-0x5c(%rbp)
  jle    L72
  cmpl   $0x10000,-0x60(%rbp)
  jg     L72
  cmpl   $0x1,-0x60(%rbp)
  jle    L72
  cmpq   $0x0,-0x58(%rbp)
  je     L72
  cmpq   $0x0,-0x68(%rbp)
  je     L72
  cmpq   $0x0,-0x48(%rbp)
  je     L72
  cmpq   $0x0,-0x50(%rbp)
  jne    L166
L72:
  mov    $0x1000,%eax
  jmp    L138
L166:
  mov    -0x50(%rbp),%rax
  mov    (%rax),%rax
  mov    %rax,-0x20(%rbp)
  mov    -0x48(%rbp),%rax
  mov    %rax,-0x18(%rbp)
  mov    -0x58(%rbp),%rax
  mov    %rax,-0x10(%rbp)
  mov    -0x68(%rbp),%rax
  mov    %rax,-0x8(%rbp)
  movl   $0x1,-0x24(%rbp)
  movl   $0x2d0,-0x2c(%rbp)
  jmp    L63
L152:
  cmpl   $0x0,-0x24(%rbp)
  je     L37
  mov    -0x10(%rbp),%rax
  movzwl (%rax),%eax
  shr    $0x8,%ax
  movzwl %ax,%eax
  mov    %eax,-0x30(%rbp)
  mov    -0x10(%rbp),%rax
  movzwl (%rax),%eax
  mov    %al,-0x31(%rbp)
  addq   $0x2,-0x10(%rbp)
  subl   $0x2,-0x5c(%rbp)
  jmp    L104
L37:
  mov    -0x8(%rbp),%rax
  movzwl (%rax),%eax
  shr    $0x8,%ax
  movzwl %ax,%eax
  mov    %eax,-0x30(%rbp)
  mov    -0x8(%rbp),%rax
  movzwl (%rax),%eax
  mov    %al,-0x31(%rbp)
  addq   $0x2,-0x8(%rbp)
  subl   $0x2,-0x60(%rbp)
L104:
  cmpl   $0x0,-0x30(%rbp)
  jne    L153
  mov    -0x2c(%rbp),%eax
  mov    %eax,-0x30(%rbp)
L153:
  mov    -0x30(%rbp),%eax
  cltq
  cmp    %rax,-0x20(%rbp)
  jge    L163
  mov    -0x20(%rbp),%rax
  mov    %eax,-0x30(%rbp)
L163:
  mov    -0x30(%rbp),%eax
  cmp    -0x2c(%rbp),%eax
  jle    L207
  mov    -0x2c(%rbp),%eax
  mov    %eax,-0x30(%rbp)
L207:
  mov    -0x30(%rbp),%eax
  mov    %eax,-0x28(%rbp)
  jmp    L116
L125:
  mov    -0x18(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x18(%rbp)
  movzbl -0x31(%rbp),%edx
  mov    %dl,(%rax)
  subl   $0x1,-0x28(%rbp)
L116:
  cmpl   $0x0,-0x28(%rbp)
  jg     L125
  mov    -0x30(%rbp),%eax
  cltq
  sub    %rax,-0x20(%rbp)
  mov    -0x30(%rbp),%eax
  sub    %eax,-0x2c(%rbp)
  cmpl   $0x0,-0x2c(%rbp)
  jne    L63
  movl   $0x2d0,-0x2c(%rbp)
  cmpl   $0x0,-0x24(%rbp)
  sete   %al
  movzbl %al,%eax
  mov    %eax,-0x24(%rbp)
L63:
  cmpl   $0x0,-0x5c(%rbp)
  jle    L195
  cmpl   $0x0,-0x60(%rbp)
  jle    L195
  cmpq   $0x0,-0x20(%rbp)
  jne    L152
L195:
  mov    -0x50(%rbp),%rax
  mov    (%rax),%rax
  sub    -0x20(%rbp),%rax
  mov    %rax,%rdx
  mov    -0x50(%rbp),%rax
  mov    %rdx,(%rax)
  mov    $0x0,%eax
L138:
  pop    %rbp
  ret
```

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;
}
```