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

```asm
<WriteDigital>:
  endbr64
  cmp    $0x6,%edi
  ja     L77
  lea    D2(%rip),%rdx
  mov    %edi,%edi
  movslq (%rdx,%rdi,4),%rax
  add    %rdx,%rax
  cmp    $0x1,%esi
  notrack jmp *%rax
  nop
  mov    0x50003ffc,%eax
  je     L5
  and    $0xfe,%ah
  mov    %eax,0x50003ffc
L77:
  ret
  nopl   0x0(%rax,%rax,1)
  mov    0x50003ffc,%eax
  je     L65
  and    $0x7f,%al
  mov    %eax,0x50003ffc
  ret
  nopw   0x0(%rax,%rax,1)
  mov    0x50003ffc,%eax
  je     L24
  and    $0xfffffffb,%eax
  mov    %eax,0x50003ffc
  ret
  nopl   0x0(%rax,%rax,1)
  mov    0x50003ffc,%eax
  je     L63
  and    $0xfffffff7,%eax
  mov    %eax,0x50003ffc
  ret
  nopl   0x0(%rax,%rax,1)
  mov    0x50003ffc,%eax
  je     L74
  and    $0xffffffef,%eax
  mov    %eax,0x50003ffc
  ret
  nopl   0x0(%rax)
  mov    0x50003ffc,%eax
  je     L59
  and    $0xffffffdf,%eax
  mov    %eax,0x50003ffc
  ret
  nopl   0x0(%rax)
  mov    0x50003ffc,%eax
  je     L6
  and    $0xffffffbf,%eax
  mov    %eax,0x50003ffc
  ret
  nopl   0x0(%rax)
L65:
  or     $0x80,%al
  mov    %eax,0x50003ffc
  ret
  nopw   0x0(%rax,%rax,1)
L6:
  or     $0x40,%eax
  mov    %eax,0x50003ffc
  ret
  nopl   0x0(%rax,%rax,1)
L59:
  or     $0x20,%eax
  mov    %eax,0x50003ffc
  ret
  nopl   0x0(%rax,%rax,1)
L74:
  or     $0x10,%eax
  mov    %eax,0x50003ffc
  ret
  nopl   0x0(%rax,%rax,1)
L63:
  or     $0x8,%eax
  mov    %eax,0x50003ffc
  ret
  nopl   0x0(%rax,%rax,1)
L24:
  or     $0x4,%eax
  mov    %eax,0x50003ffc
  ret
  nopl   0x0(%rax,%rax,1)
L5:
  or     $0x1,%ah
  mov    %eax,0x50003ffc
  ret
```

assistant: ```c
void WriteDigital(int bitnumber, int value) {
  switch (bitnumber) {
  case 0: {
    if (value == 1)
      (*((volatile unsigned int *)(0x50000000 + 0x3ffc))) = (*((volatile unsigned int *)(0x50000000 + 0x3ffc))) | (1 << 2);
    else
      (*((volatile unsigned int *)(0x50000000 + 0x3ffc))) = (*((volatile unsigned int *)(0x50000000 + 0x3ffc))) & ~(1 << 2);
    break;
  }
  case 1: {
    if (value == 1)
      (*((volatile unsigned int *)(0x50000000 + 0x3ffc))) = (*((volatile unsigned int *)(0x50000000 + 0x3ffc))) | (1 << 3);
    else
      (*((volatile unsigned int *)(0x50000000 + 0x3ffc))) = (*((volatile unsigned int *)(0x50000000 + 0x3ffc))) & ~(1 << 3);
    break;
  }
  case 2: {
    if (value == 1)
      (*((volatile unsigned int *)(0x50000000 + 0x3ffc))) = (*((volatile unsigned int *)(0x50000000 + 0x3ffc))) | (1 << 4);
    else
      (*((volatile unsigned int *)(0x50000000 + 0x3ffc))) = (*((volatile unsigned int *)(0x50000000 + 0x3ffc))) & ~(1 << 4);
    break;
  }
  case 3: {
    if (value == 1)
      (*((volatile unsigned int *)(0x50000000 + 0x3ffc))) = (*((volatile unsigned int *)(0x50000000 + 0x3ffc))) | (1 << 5);
    else
      (*((volatile unsigned int *)(0x50000000 + 0x3ffc))) = (*((volatile unsigned int *)(0x50000000 + 0x3ffc))) & ~(1 << 5);
    break;
  }
  case 4: {
    if (value == 1)
      (*((volatile unsigned int *)(0x50000000 + 0x3ffc))) = (*((volatile unsigned int *)(0x50000000 + 0x3ffc))) | (1 << 6);
    else
      (*((volatile unsigned int *)(0x50000000 + 0x3ffc))) = (*((volatile unsigned int *)(0x50000000 + 0x3ffc))) & ~(1 << 6);
    break;
  }
  case 5: {
    if (value == 1)
      (*((volatile unsigned int *)(0x50000000 + 0x3ffc))) = (*((volatile unsigned int *)(0x50000000 + 0x3ffc))) | (1 << 7);
    else
      (*((volatile unsigned int *)(0x50000000 + 0x3ffc))) = (*((volatile unsigned int *)(0x50000000 + 0x3ffc))) & ~(1 << 7);
    break;
  }
  case 6: {
    if (value == 1)
      (*((volatile unsigned int *)(0x50000000 + 0x3ffc))) = (*((volatile unsigned int *)(0x50000000 + 0x3ffc))) | (1 << 8);
    else
      (*((volatile unsigned int *)(0x50000000 + 0x3ffc))) = (*((volatile unsigned int *)(0x50000000 + 0x3ffc))) & ~(1 << 8);
    break;
  }
  }
}
```