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

```asm
<USBHostEndpointDataToggle>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x20,%rsp
  mov    %edi,-0x14(%rbp)
  mov    %esi,-0x18(%rbp)
  mov    %edx,-0x1c(%rbp)
  mov    %ecx,-0x20(%rbp)
  cmpl   $0x40050000,-0x14(%rbp)
  sete   %al
  movzbl %al,%eax
  mov    %eax,%edi
  call   <ASSERT@plt>
  cmpl   $0x0,-0x18(%rbp)
  je     L105
  cmpl   $0x10,-0x18(%rbp)
  je     L105
  cmpl   $0x20,-0x18(%rbp)
  je     L105
  cmpl   $0x30,-0x18(%rbp)
  je     L105
  cmpl   $0x40,-0x18(%rbp)
  je     L105
  cmpl   $0x50,-0x18(%rbp)
  je     L105
  cmpl   $0x60,-0x18(%rbp)
  je     L105
  cmpl   $0x70,-0x18(%rbp)
  jne    L133
L105:
  mov    $0x1,%eax
  jmp    L116
L133:
  mov    $0x0,%eax
L116:
  mov    %eax,%edi
  call   <ASSERT@plt>
  movl   $0x0,-0x4(%rbp)
  cmpl   $0x0,-0x1c(%rbp)
  je     L40
  cmpl   $0x0,-0x18(%rbp)
  jne    L73
  movl   $0x2,-0x4(%rbp)
  jmp    L40
L73:
  cmpl   $0x0,-0x20(%rbp)
  jne    L126
  movl   $0x2,-0x4(%rbp)
  jmp    L40
L126:
  movl   $0x1,-0x4(%rbp)
L40:
  cmpl   $0x0,-0x18(%rbp)
  jne    L55
  mov    -0x14(%rbp),%eax
  add    $0x103,%eax
  cltq
  mov    (%rax),%eax
  and    $0xfffffff9,%eax
  mov    %eax,%esi
  mov    -0x4(%rbp),%eax
  or     $0x4,%eax
  mov    %eax,%ecx
  mov    -0x14(%rbp),%eax
  add    $0x103,%eax
  cltq
  mov    %rax,%rdx
  mov    %esi,%eax
  or     %ecx,%eax
  mov    %eax,(%rdx)
  jmp    L160
L55:
  cmpl   $0x0,-0x20(%rbp)
  jne    L15
  mov    -0x14(%rbp),%eax
  lea    0x117(%rax),%edx
  mov    -0x18(%rbp),%eax
  sub    $0x10,%eax
  add    %edx,%eax
  cltq
  mov    (%rax),%eax
  and    $0xfffffff9,%eax
  mov    %eax,%esi
  mov    -0x4(%rbp),%eax
  or     $0x4,%eax
  mov    %eax,%ecx
  mov    -0x14(%rbp),%eax
  lea    0x117(%rax),%edx
  mov    -0x18(%rbp),%eax
  sub    $0x10,%eax
  add    %edx,%eax
  cltq
  mov    %rax,%rdx
  mov    %esi,%eax
  or     %ecx,%eax
  mov    %eax,(%rdx)
  jmp    L160
L15:
  mov    -0x14(%rbp),%eax
  lea    0x113(%rax),%edx
  mov    -0x18(%rbp),%eax
  sub    $0x10,%eax
  add    %edx,%eax
  cltq
  mov    (%rax),%eax
  and    $0xfffffffc,%eax
  mov    %eax,%esi
  mov    -0x4(%rbp),%eax
  or     $0x2,%eax
  mov    %eax,%ecx
  mov    -0x14(%rbp),%eax
  lea    0x113(%rax),%edx
  mov    -0x18(%rbp),%eax
  sub    $0x10,%eax
  add    %edx,%eax
  cltq
  mov    %rax,%rdx
  mov    %esi,%eax
  or     %ecx,%eax
  mov    %eax,(%rdx)
L160:
  nop
  leave
  ret
```

assistant: ```c
void USBHostEndpointDataToggle(uint32_t ui32Base, uint32_t ui32Endpoint, bool bDataToggle, uint32_t ui32Flags) {
  uint32_t ui32DataToggle;
  ASSERT(ui32Base == 0x40050000);
  ASSERT((ui32Endpoint == 0x00000000) || (ui32Endpoint == 0x00000010) || (ui32Endpoint == 0x00000020) || (ui32Endpoint == 0x00000030) || (ui32Endpoint == 0x00000040) || (ui32Endpoint == 0x00000050) || (ui32Endpoint == 0x00000060) || (ui32Endpoint == 0x00000070));
  ui32DataToggle = 0;
  if (bDataToggle) {
    if (ui32Endpoint == 0x00000000) {
      ui32DataToggle = 0x00000002;
    } else if (ui32Flags == 0x00000000) {
      ui32DataToggle = 0x00000002;
    } else {
      ui32DataToggle = 0x00000001;
    }
  }
  if (ui32Endpoint == 0x00000000) {
    (*((volatile uint8_t *)(ui32Base + 0x00000103))) = (((*((volatile uint8_t *)(ui32Base + 0x00000103))) & ~(0x00000004 | 0x00000002)) | (ui32DataToggle | 0x00000004));
  } else if (ui32Flags == 0x00000000) {
    (*((volatile uint8_t *)(ui32Base + 0x00000117 + (ui32Endpoint - 0x10)))) = (((*((volatile uint8_t *)(ui32Base + 0x00000117 + (ui32Endpoint - 0x10)))) & ~(0x00000004 | 0x00000002)) | (ui32DataToggle | 0x00000004));
  } else {
    (*((volatile uint8_t *)(ui32Base + 0x00000113 + (ui32Endpoint - 0x10)))) = (((*((volatile uint8_t *)(ui32Base + 0x00000113 + (ui32Endpoint - 0x10)))) & ~(0x00000002 | 0x00000001)) | (ui32DataToggle | 0x00000002));
  }
}
```