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

```asm
<WriteDigital>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  mov    %edi,-0x4(%rbp)
  mov    %esi,-0x8(%rbp)
  cmpl   $0x6,-0x4(%rbp)
  ja     L1
  mov    -0x4(%rbp),%eax
  lea    0x0(,%rax,4),%rdx
  lea    D2(%rip),%rax
  mov    (%rdx,%rax,1),%eax
  cltq
  lea    D2(%rip),%rdx
  add    %rdx,%rax
  notrack jmp *%rax
  cmpl   $0x1,-0x8(%rbp)
  jne    L47
  mov    $0x50003ffc,%eax
  mov    (%rax),%eax
  mov    $0x50003ffc,%edx
  or     $0x4,%eax
  mov    %eax,(%rdx)
  jmp    L1
L47:
  mov    $0x50003ffc,%eax
  mov    (%rax),%eax
  mov    $0x50003ffc,%edx
  and    $0xfffffffb,%eax
  mov    %eax,(%rdx)
  jmp    L1
  cmpl   $0x1,-0x8(%rbp)
  jne    L52
  mov    $0x50003ffc,%eax
  mov    (%rax),%eax
  mov    $0x50003ffc,%edx
  or     $0x8,%eax
  mov    %eax,(%rdx)
  jmp    L1
L52:
  mov    $0x50003ffc,%eax
  mov    (%rax),%eax
  mov    $0x50003ffc,%edx
  and    $0xfffffff7,%eax
  mov    %eax,(%rdx)
  jmp    L1
  cmpl   $0x1,-0x8(%rbp)
  jne    L206
  mov    $0x50003ffc,%eax
  mov    (%rax),%eax
  mov    $0x50003ffc,%edx
  or     $0x10,%eax
  mov    %eax,(%rdx)
  jmp    L1
L206:
  mov    $0x50003ffc,%eax
  mov    (%rax),%eax
  mov    $0x50003ffc,%edx
  and    $0xffffffef,%eax
  mov    %eax,(%rdx)
  jmp    L1
  cmpl   $0x1,-0x8(%rbp)
  jne    L144
  mov    $0x50003ffc,%eax
  mov    (%rax),%eax
  mov    $0x50003ffc,%edx
  or     $0x20,%eax
  mov    %eax,(%rdx)
  jmp    L1
L144:
  mov    $0x50003ffc,%eax
  mov    (%rax),%eax
  mov    $0x50003ffc,%edx
  and    $0xffffffdf,%eax
  mov    %eax,(%rdx)
  jmp    L1
  cmpl   $0x1,-0x8(%rbp)
  jne    L100
  mov    $0x50003ffc,%eax
  mov    (%rax),%eax
  mov    $0x50003ffc,%edx
  or     $0x40,%eax
  mov    %eax,(%rdx)
  jmp    L1
L100:
  mov    $0x50003ffc,%eax
  mov    (%rax),%eax
  mov    $0x50003ffc,%edx
  and    $0xffffffbf,%eax
  mov    %eax,(%rdx)
  jmp    L1
  cmpl   $0x1,-0x8(%rbp)
  jne    L148
  mov    $0x50003ffc,%eax
  mov    (%rax),%eax
  mov    $0x50003ffc,%edx
  or     $0x80,%al
  mov    %eax,(%rdx)
  jmp    L1
L148:
  mov    $0x50003ffc,%eax
  mov    (%rax),%eax
  mov    $0x50003ffc,%edx
  and    $0x7f,%al
  mov    %eax,(%rdx)
  jmp    L1
  cmpl   $0x1,-0x8(%rbp)
  jne    L181
  mov    $0x50003ffc,%eax
  mov    (%rax),%eax
  mov    $0x50003ffc,%edx
  or     $0x1,%ah
  mov    %eax,(%rdx)
  jmp    L136
L181:
  mov    $0x50003ffc,%eax
  mov    (%rax),%eax
  mov    $0x50003ffc,%edx
  and    $0xfe,%ah
  mov    %eax,(%rdx)
L136:
  nop
L1:
  nop
  pop    %rbp
  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;
  }
  }
}
```