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

```asm
<USBHostEndpointConfig>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x8,%rsp
  mov    %edi,%ebx
  mov    %esi,%ebp
  mov    %edx,%r14d
  mov    %ecx,%r13d
  mov    %r8d,%r15d
  mov    %r9d,%r12d
  cmp    $0x40050000,%edi
  sete   %dil
  movzbl %dil,%edi
  call   <ASSERT@plt>
  mov    %ebp,%eax
  and    $0xffffffef,%eax
  je     L147
  cmp    $0x70,%ebp
  jg     L134
  cmp    $0x3f,%ebp
  jle    L220
  lea    -0x40(%rbp),%eax
  movabs $0x1000100010001,%rdx
  bt     %rax,%rdx
  jb     L132
L134:
  mov    $0x0,%edi
  call   <ASSERT@plt>
  cmp    $0x1f,%r13d
  setle  %dil
  movzbl %dil,%edi
  call   <ASSERT@plt>
  jmp    L146
L220:
  cmp    $0x20,%eax
  jne    L134
L132:
  mov    $0x1,%edi
  call   <ASSERT@plt>
  cmp    $0x1f,%r13d
  setle  %dil
  movzbl %dil,%edi
  call   <ASSERT@plt>
L146:
  test   $0x4000,%r12d
  je     L6
  or     $0x40,%r15d
  mov    %r15d,%r8d
L190:
  mov    %r12d,%eax
  and    $0x300,%eax
  cmp    $0x100,%eax
  je     L178
  cmp    $0x200,%eax
  je     L189
  mov    %r8d,%edx
  or     $0x10,%edx
  test   %eax,%eax
  cmove  %edx,%r8d
L37:
  test   $0x2000,%r12d
  je     L69
  lea    -0x10(%rbx,%rbp,1),%eax
  lea    0x11a(%rax),%edx
  movslq %edx,%rdx
  mov    %r8d,(%rdx)
  lea    0x11b(%rax),%edx
  movslq %edx,%rdx
  mov    %r13d,(%rdx)
  lea    0x110(%rax),%edx
  movslq %edx,%rdx
  mov    %r14d,(%rdx)
  mov    %r12d,%edx
  and    $0x1,%edx
  shl    $0x7,%edx
  test   $0x10,%r12b
  je     L130
  or     $0x14,%edx
L47:
  add    $0x113,%eax
  cltq
  mov    %edx,(%rax)
  jmp    L54
L147:
  mov    $0x1,%edi
  call   <ASSERT@plt>
  cmp    $0x1f,%r13d
  setle  %dil
  movzbl %dil,%edi
  call   <ASSERT@plt>
  test   %ebp,%ebp
  jne    L146
  lea    0x10b(%rbx),%eax
  cltq
  mov    %r13d,(%rax)
  test   $0x4000,%r12d
  je     L61
  add    $0x10a,%ebx
  movslq %ebx,%rbx
  movl   $0x40,(%rbx)
L54:
  add    $0x8,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L61:
  test   $0x1000,%r12d
  je     L170
  add    $0x10a,%ebx
  movslq %ebx,%rbx
  movl   $0x80,(%rbx)
  jmp    L54
L170:
  add    $0x10a,%ebx
  movslq %ebx,%rbx
  movl   $0xc0,(%rbx)
  jmp    L54
L6:
  mov    %r15d,%eax
  or     $0x80,%al
  or     $0xc0,%r15b
  mov    %r15d,%r8d
  test   $0x1000,%r12d
  cmovne %eax,%r8d
  jmp    L190
L178:
  or     $0x20,%r8d
  jmp    L37
L189:
  or     $0x30,%r8d
  jmp    L37
L130:
  mov    %edx,%ecx
  or     $0x10,%ecx
  test   $0x8,%r12b
  cmovne %ecx,%edx
  jmp    L47
L69:
  lea    -0x10(%rbx,%rbp,1),%edx
  lea    0x11c(%rdx),%eax
  cltq
  mov    %r8d,(%rax)
  lea    0x11d(%rdx),%eax
  cltq
  mov    %r13d,(%rax)
  lea    0x114(%rdx),%eax
  cltq
  mov    %r14d,(%rax)
  mov    %r12d,%eax
  shl    $0x5,%eax
  and    $0x80,%eax
  mov    %eax,%ecx
  or     $0x40,%ecx
  test   $0x2,%r12b
  cmovne %ecx,%eax
  test   $0x10,%r12b
  je     L68
  or     $0x28,%eax
L124:
  add    $0x117,%edx
  movslq %edx,%rdx
  mov    %eax,(%rdx)
  jmp    L54
L68:
  mov    %eax,%ecx
  or     $0x20,%ecx
  test   $0x8,%r12b
  cmovne %ecx,%eax
  jmp    L124
```

assistant: ```c
void USBHostEndpointConfig(uint32_t ui32Base, uint32_t ui32Endpoint, uint32_t ui32MaxPayload, uint32_t ui32NAKPollInterval, uint32_t ui32TargetEndpoint, uint32_t ui32Flags) {
  uint32_t ui32Register;
  ASSERT(ui32Base == 0x40050000);
  ASSERT((ui32Endpoint == 0x00000000) || (ui32Endpoint == 0x00000010) || (ui32Endpoint == 0x00000020) || (ui32Endpoint == 0x00000030) || (ui32Endpoint == 0x00000040) || (ui32Endpoint == 0x00000050) || (ui32Endpoint == 0x00000060) || (ui32Endpoint == 0x00000070));
  ASSERT(ui32NAKPollInterval <= 31);
  if (ui32Endpoint == 0x00000000) {
    (*((volatile uint8_t *)(ui32Base + 0x0000010B))) = ui32NAKPollInterval;
    if (ui32Flags & 0x00004000) {
      (*((volatile uint8_t *)(ui32Base + 0x0000010A))) = 0x00000040;
    } else if (ui32Flags & 0x00001000) {
      (*((volatile uint8_t *)(ui32Base + 0x0000010A))) = 0x00000080;
    } else {
      (*((volatile uint8_t *)(ui32Base + 0x0000010A))) = 0x000000C0;
    }
  } else {
    ui32Register = ui32TargetEndpoint;
    if (ui32Flags & 0x00004000) {
      ui32Register |= 0x00000040;
    } else if (ui32Flags & 0x00001000) {
      ui32Register |= 0x00000080;
    } else {
      ui32Register |= 0x000000C0;
    }
    switch (ui32Flags & 0x00000300) {
    case 0x00000100: {
      ui32Register |= 0x00000020;
      break;
    }
    case 0x00000000: {
      ui32Register |= 0x00000010;
      break;
    }
    case 0x00000200: {
      ui32Register |= 0x00000030;
      break;
    }
    case 0x00000300: {
      ui32Register |= 0x00000000;
      break;
    }
    }
    if (ui32Flags & 0x00002000) {
      (*((volatile uint8_t *)(ui32Base + (ui32Endpoint - 0x10) + 0x0000011A))) = ui32Register;
      (*((volatile uint8_t *)(ui32Base + (ui32Endpoint - 0x10) + 0x0000011B))) = ui32NAKPollInterval;
      (*((volatile uint16_t *)(ui32Base + (ui32Endpoint - 0x10) + 0x00000110))) = ui32MaxPayload;
      ui32Register = 0;
      if (ui32Flags & 0x00000001) {
        ui32Register |= 0x00000080;
      }
      if (ui32Flags & 0x00000010) {
        ui32Register |= 0x00000010 | 0x00000004;
      } else if (ui32Flags & 0x00000008) {
        ui32Register |= 0x00000010;
      }
      (*((volatile uint8_t *)(ui32Base + (ui32Endpoint - 0x10) + 0x00000113))) = (uint8_t)ui32Register;
    } else {
      (*((volatile uint8_t *)(ui32Base + (ui32Endpoint - 0x10) + 0x0000011C))) = ui32Register;
      (*((volatile uint8_t *)(ui32Base + (ui32Endpoint - 0x10) + 0x0000011D))) = ui32NAKPollInterval;
      (*((volatile uint16_t *)(ui32Base + (ui32Endpoint - 0x10) + 0x00000114))) = ui32MaxPayload;
      ui32Register = 0;
      if (ui32Flags & 0x00000004) {
        ui32Register |= 0x00000080;
      }
      if (ui32Flags & 0x00000002) {
        ui32Register |= 0x00000040;
      }
      if (ui32Flags & 0x00000010) {
        ui32Register |= 0x00000020 | 0x00000008;
      } else if (ui32Flags & 0x00000008) {
        ui32Register |= 0x00000020;
      }
      (*((volatile uint8_t *)(ui32Base + (ui32Endpoint - 0x10) + 0x00000117))) = (uint8_t)ui32Register;
    }
  }
}
```