user: 请将以下的汇编代码转换成C语言代码:

```asm
<USBHostEndpointDataToggle>:
  endbr64
  push   %r13
  mov    %ecx,%r13d
  push   %r12
  mov    %edx,%r12d
  push   %rbp
  mov    %edi,%ebp
  push   %rbx
  mov    %esi,%ebx
  sub    $0x8,%rsp
  cmp    $0x40050000,%edi
  sete   %dil
  movzbl %dil,%edi
  call   <ASSERT@plt>
  mov    %ebx,%eax
  and    $0xffffffef,%eax
  je     L137
  cmp    $0x70,%ebx
  jg     L55
  cmp    $0x3f,%ebx
  jle    L50
  movabs $0x1000100010001,%rdi
  lea    -0x40(%rbx),%ecx
  shr    %cl,%rdi
  and    $0x1,%edi
L136:
  call   <ASSERT@plt>
  test   %r12d,%r12d
  je     L47
  nopl   0x0(%rax)
L42:
  mov    $0x1,%ecx
  test   %r13d,%r13d
  je     L17
L52:
  lea    0x103(%rbp,%rbx,1),%edx
  movslq %edx,%rdx
  mov    (%rdx),%eax
  and    $0xfffffffc,%eax
  or     %ecx,%eax
  or     $0x2,%eax
  mov    %eax,(%rdx)
  add    $0x8,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  ret
  nopw   0x0(%rax,%rax,1)
L50:
  xor    %edi,%edi
  cmp    $0x20,%eax
  sete   %dil
  call   <ASSERT@plt>
  test   %r12d,%r12d
  jne    L42
L47:
  test   %r13d,%r13d
  jne    L3
L29:
  lea    0x107(%rbp,%rbx,1),%edx
  movslq %edx,%rdx
  mov    (%rdx),%eax
  and    $0xfffffff9,%eax
  or     %r13d,%eax
  or     $0x4,%eax
  mov    %eax,(%rdx)
  add    $0x8,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  ret
  xchg   %ax,%ax
L137:
  mov    $0x1,%edi
  call   <ASSERT@plt>
  test   %r12d,%r12d
  jne    L62
  test   %ebx,%ebx
  jne    L47
L13:
  add    $0x103,%ebp
  movslq %ebp,%rbp
  mov    0x0(%rbp),%eax
  and    $0xfffffff9,%eax
  or     %ebx,%eax
  or     $0x4,%eax
  mov    %eax,0x0(%rbp)
  add    $0x8,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  ret
  nopl   (%rax)
L62:
  test   %ebx,%ebx
  jne    L42
  mov    $0x2,%ebx
  jmp    L13
  nopw   0x0(%rax,%rax,1)
L17:
  mov    $0x2,%r13d
  jmp    L29
  nopl   0x0(%rax,%rax,1)
L3:
  xor    %ecx,%ecx
  jmp    L52
  nopw   0x0(%rax,%rax,1)
L55:
  xor    %edi,%edi
  jmp    L136
```

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