user: Please show me the C implementation that matches the assembly code listed below:

```asm
<rate_to_constant>:
  endbr64
  cmp    $0x2580,%edi
  je     L207
  jg     L309
  cmp    $0x12c,%edi
  je     L275
  jle    L83
  cmp    $0x708,%edi
  je     L306
  jle    L196
  cmp    $0x960,%edi
  je     L231
  cmp    $0x12c0,%edi
  jne    L174
  mov    D217(%rip),%rax
  mov    (%rax),%eax
  ret
  nopl   0x0(%rax)
L309:
  cmp    $0x7a120,%edi
  je     L156
  jle    L240
  cmp    $0xf4240,%edi
  je     L25
  jle    L228
  cmp    $0x119400,%edi
  je     L233
  cmp    $0x16e360,%edi
  jne    L174
  mov    D83(%rip),%rax
  mov    (%rax),%eax
  ret
  xchg   %ax,%ax
L196:
  cmp    $0x258,%edi
  je     L258
  cmp    $0x4b0,%edi
  jne    L174
  mov    D226(%rip),%rax
  mov    (%rax),%eax
  ret
  nopw   0x0(%rax,%rax,1)
L83:
  cmp    $0x86,%edi
  je     L187
  jle    L20
  cmp    $0x96,%edi
  je     L249
  cmp    $0xc8,%edi
  jne    L174
  mov    D115(%rip),%rax
  mov    (%rax),%eax
  ret
  nopl   0x0(%rax)
L228:
  cmp    $0x8ca00,%edi
  je     L22
  cmp    $0xe1000,%edi
  jne    L174
  mov    D179(%rip),%rax
  mov    (%rax),%eax
  ret
  nopw   0x0(%rax,%rax,1)
L240:
  cmp    $0x1c200,%edi
  je     L115
  jle    L145
  cmp    $0x38400,%edi
  je     L263
  cmp    $0x70800,%edi
  jne    L174
  mov    D76(%rip),%rax
  mov    (%rax),%eax
  ret
  nopl   0x0(%rax,%rax,1)
L20:
  cmp    $0x4b,%edi
  je     L224
  cmp    $0x6e,%edi
  jne    L79
  mov    D95(%rip),%rax
  mov    (%rax),%eax
  ret
  nopl   0x0(%rax,%rax,1)
L145:
  cmp    $0x9600,%edi
  je     L134
  cmp    $0xe100,%edi
  jne    L293
  mov    D51(%rip),%rax
  mov    (%rax),%eax
  ret
  nopw   0x0(%rax,%rax,1)
L79:
  cmp    $0x32,%edi
  jne    L174
  mov    D193(%rip),%rax
  mov    (%rax),%eax
  ret
  nopl   0x0(%rax,%rax,1)
L293:
  cmp    $0x4b00,%edi
  jne    L174
  mov    D239(%rip),%rax
  mov    (%rax),%eax
  ret
  xchg   %ax,%ax
L207:
  mov    D232(%rip),%rax
  mov    (%rax),%eax
  ret
  nopw   0x0(%rax,%rax,1)
L134:
  mov    D227(%rip),%rax
  mov    (%rax),%eax
  ret
  nopw   0x0(%rax,%rax,1)
L224:
  mov    D225(%rip),%rax
  mov    (%rax),%eax
  ret
  nopw   0x0(%rax,%rax,1)
L263:
  mov    D201(%rip),%rax
  mov    (%rax),%eax
  ret
  nopw   0x0(%rax,%rax,1)
L115:
  mov    D71(%rip),%rax
  mov    (%rax),%eax
  ret
  nopw   0x0(%rax,%rax,1)
L22:
  mov    D127(%rip),%rax
  mov    (%rax),%eax
  ret
  nopw   0x0(%rax,%rax,1)
L249:
  mov    D97(%rip),%rax
  mov    (%rax),%eax
  ret
  nopw   0x0(%rax,%rax,1)
L187:
  mov    D166(%rip),%rax
  mov    (%rax),%eax
  ret
  nopw   0x0(%rax,%rax,1)
L258:
  mov    D100(%rip),%rax
  mov    (%rax),%eax
  ret
  nopw   0x0(%rax,%rax,1)
L233:
  mov    D106(%rip),%rax
  mov    (%rax),%eax
  ret
  nopw   0x0(%rax,%rax,1)
L25:
  mov    D122(%rip),%rax
  mov    (%rax),%eax
  ret
  nopw   0x0(%rax,%rax,1)
L156:
  mov    D17(%rip),%rax
  mov    (%rax),%eax
  ret
  nopw   0x0(%rax,%rax,1)
L231:
  mov    D35(%rip),%rax
  mov    (%rax),%eax
  ret
  nopw   0x0(%rax,%rax,1)
L306:
  mov    D131(%rip),%rax
  mov    (%rax),%eax
  ret
  nopw   0x0(%rax,%rax,1)
L275:
  mov    D89(%rip),%rax
  mov    (%rax),%eax
  ret
L174:
  xor    %eax,%eax
  ret
```

assistant: ```c
int rate_to_constant(int baudrate) {
  switch (baudrate) {
  case 50:
    return B50;
  case 75:
    return B75;
  case 110:
    return B110;
  case 134:
    return B134;
  case 150:
    return B150;
  case 200:
    return B200;
  case 300:
    return B300;
  case 600:
    return B600;
  case 1200:
    return B1200;
  case 1800:
    return B1800;
  case 2400:
    return B2400;
  case 4800:
    return B4800;
  case 9600:
    return B9600;
  case 19200:
    return B19200;
  case 38400:
    return B38400;
  case 57600:
    return B57600;
  case 115200:
    return B115200;
  case 230400:
    return B230400;
  case 460800:
    return B460800;
  case 500000:
    return B500000;
  case 576000:
    return B576000;
  case 921600:
    return B921600;
  case 1000000:
    return B1000000;
  case 1152000:
    return B1152000;
  case 1500000:
    return B1500000;
  default:
    return 0;
  }
}
```