user: Translate the below assembly code into C programming language:

```asm
<USBDevEndpointConfigSet>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  mov    %edi,-0x14(%rbp)
  mov    %esi,-0x18(%rbp)
  mov    %edx,-0x1c(%rbp)
  mov    %ecx,-0x20(%rbp)
  mov    -0x20(%rbp),%eax
  and    $0x2000,%eax
  test   %eax,%eax
  je     L16
  mov    -0x18(%rbp),%eax
  lea    -0x10(%rax),%edx
  mov    -0x14(%rbp),%eax
  add    %edx,%eax
  add    $0x110,%eax
  cltq
  mov    %rax,%rdx
  mov    -0x1c(%rbp),%eax
  mov    %ax,(%rdx)
  movl   $0x0,-0x4(%rbp)
  mov    -0x20(%rbp),%eax
  and    $0x1,%eax
  test   %eax,%eax
  je     L111
  orl    $0x80,-0x4(%rbp)
L111:
  mov    -0x20(%rbp),%eax
  and    $0x10,%eax
  test   %eax,%eax
  je     L99
  orl    $0x14,-0x4(%rbp)
  jmp    L74
L99:
  mov    -0x20(%rbp),%eax
  and    $0x8,%eax
  test   %eax,%eax
  je     L74
  orl    $0x10,-0x4(%rbp)
L74:
  mov    -0x20(%rbp),%eax
  and    $0x300,%eax
  test   %eax,%eax
  jne    L89
  orl    $0x40,-0x4(%rbp)
L89:
  mov    -0x18(%rbp),%eax
  lea    -0x10(%rax),%edx
  mov    -0x14(%rbp),%eax
  add    %edx,%eax
  add    $0x113,%eax
  cltq
  mov    -0x4(%rbp),%edx
  mov    %dl,(%rax)
  mov    -0x18(%rbp),%eax
  lea    -0x10(%rax),%edx
  mov    -0x14(%rbp),%eax
  add    %edx,%eax
  add    $0x112,%eax
  cltq
  movb   $0x40,(%rax)
  jmp    L55
L16:
  mov    -0x18(%rbp),%eax
  lea    -0x10(%rax),%edx
  mov    -0x14(%rbp),%eax
  add    %edx,%eax
  add    $0x114,%eax
  cltq
  mov    %rax,%rdx
  mov    -0x1c(%rbp),%eax
  mov    %ax,(%rdx)
  movl   $0x0,-0x4(%rbp)
  mov    -0x20(%rbp),%eax
  and    $0x4,%eax
  test   %eax,%eax
  je     L92
  movl   $0x80,-0x4(%rbp)
L92:
  mov    -0x20(%rbp),%eax
  and    $0x10,%eax
  test   %eax,%eax
  je     L75
  orl    $0x28,-0x4(%rbp)
  jmp    L31
L75:
  mov    -0x20(%rbp),%eax
  and    $0x8,%eax
  test   %eax,%eax
  je     L31
  orl    $0x20,-0x4(%rbp)
L31:
  mov    -0x20(%rbp),%eax
  and    $0x20,%eax
  test   %eax,%eax
  je     L104
  orl    $0x10,-0x4(%rbp)
L104:
  mov    -0x20(%rbp),%eax
  and    $0x300,%eax
  test   %eax,%eax
  jne    L121
  orl    $0x40,-0x4(%rbp)
L121:
  mov    -0x18(%rbp),%eax
  lea    -0x10(%rax),%edx
  mov    -0x14(%rbp),%eax
  add    %edx,%eax
  add    $0x117,%eax
  cltq
  mov    -0x4(%rbp),%edx
  mov    %dl,(%rax)
  mov    -0x18(%rbp),%eax
  lea    -0x10(%rax),%edx
  mov    -0x14(%rbp),%eax
  add    %edx,%eax
  add    $0x116,%eax
  cltq
  movb   $0x80,(%rax)
L55:
  nop
  pop    %rbp
  ret
```

assistant: ```c
void USBDevEndpointConfigSet(uint32_t ui32Base, uint32_t ui32Endpoint, uint32_t ui32MaxPacketSize, uint32_t ui32Flags) {
  uint32_t ui32Register;
  ;

  ;
  if (ui32Flags & 0x00002000) {
    (*((volatile unsigned short *)(ui32Base + (ui32Endpoint - 0x10) + 0x00000110))) = ui32MaxPacketSize;
    ui32Register = 0;
    if (ui32Flags & 0x00000001) {
      ui32Register |= 0x00000080;
    }
    if (ui32Flags & 0x00000010) {
      ui32Register |= 0x00000010 | 0x00000004;
    } else if (ui32Flags & 0x00000008) {
      ui32Register |= 0x00000010;
    }
    if ((ui32Flags & 0x00000300) == 0x00000000) {
      ui32Register |= 0x00000040;
    }
    (*((volatile unsigned char *)(ui32Base + (ui32Endpoint - 0x10) + 0x00000113))) = (uint8_t)ui32Register;
    (*((volatile unsigned char *)(ui32Base + (ui32Endpoint - 0x10) + 0x00000112))) = 0x00000040;
  } else {
    (*((volatile unsigned short *)(ui32Base + (ui32Endpoint - 0x10) + 0x00000114))) = ui32MaxPacketSize;
    ui32Register = 0;
    if (ui32Flags & 0x00000004) {
      ui32Register = 0x00000080;
    }
    if (ui32Flags & 0x00000010) {
      ui32Register |= 0x00000020 | 0x00000008;
    } else if (ui32Flags & 0x00000008) {
      ui32Register |= 0x00000020;
    }
    if (ui32Flags & 0x00000020) {
      ui32Register |= 0x00000010;
    }
    if ((ui32Flags & 0x00000300) == 0x00000000) {
      ui32Register |= 0x00000040;
    }
    (*((volatile unsigned char *)(ui32Base + (ui32Endpoint - 0x10) + 0x00000117))) = (uint8_t)ui32Register;
    (*((volatile unsigned char *)(ui32Base + (ui32Endpoint - 0x10) + 0x00000116))) = 0x00000080;
  }
}
```