user: 请将这段汇编代码片段转换成等效的C代码:

```asm
<rate_to_constant>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  mov    %edi,-0x4(%rbp)
  cmpl   $0x16e360,-0x4(%rbp)
  je     L220
  cmpl   $0x16e360,-0x4(%rbp)
  jg     L269
  cmpl   $0x119400,-0x4(%rbp)
  je     L214
  cmpl   $0x119400,-0x4(%rbp)
  jg     L269
  cmpl   $0xf4240,-0x4(%rbp)
  je     L470
  cmpl   $0xf4240,-0x4(%rbp)
  jg     L269
  cmpl   $0xe1000,-0x4(%rbp)
  je     L12
  cmpl   $0xe1000,-0x4(%rbp)
  jg     L269
  cmpl   $0x8ca00,-0x4(%rbp)
  je     L231
  cmpl   $0x8ca00,-0x4(%rbp)
  jg     L269
  cmpl   $0x7a120,-0x4(%rbp)
  je     L34
  cmpl   $0x7a120,-0x4(%rbp)
  jg     L269
  cmpl   $0x70800,-0x4(%rbp)
  je     L333
  cmpl   $0x70800,-0x4(%rbp)
  jg     L269
  cmpl   $0x38400,-0x4(%rbp)
  je     L217
  cmpl   $0x38400,-0x4(%rbp)
  jg     L269
  cmpl   $0x1c200,-0x4(%rbp)
  je     L210
  cmpl   $0x1c200,-0x4(%rbp)
  jg     L269
  cmpl   $0xe100,-0x4(%rbp)
  je     L57
  cmpl   $0xe100,-0x4(%rbp)
  jg     L269
  cmpl   $0x9600,-0x4(%rbp)
  je     L299
  cmpl   $0x9600,-0x4(%rbp)
  jg     L269
  cmpl   $0x4b00,-0x4(%rbp)
  je     L222
  cmpl   $0x4b00,-0x4(%rbp)
  jg     L269
  cmpl   $0x2580,-0x4(%rbp)
  je     L349
  cmpl   $0x2580,-0x4(%rbp)
  jg     L269
  cmpl   $0x12c0,-0x4(%rbp)
  je     L180
  cmpl   $0x12c0,-0x4(%rbp)
  jg     L269
  cmpl   $0x960,-0x4(%rbp)
  je     L278
  cmpl   $0x960,-0x4(%rbp)
  jg     L269
  cmpl   $0x708,-0x4(%rbp)
  je     L23
  cmpl   $0x708,-0x4(%rbp)
  jg     L269
  cmpl   $0x4b0,-0x4(%rbp)
  je     L649
  cmpl   $0x4b0,-0x4(%rbp)
  jg     L269
  cmpl   $0x258,-0x4(%rbp)
  je     L592
  cmpl   $0x258,-0x4(%rbp)
  jg     L269
  cmpl   $0x12c,-0x4(%rbp)
  je     L178
  cmpl   $0x12c,-0x4(%rbp)
  jg     L269
  cmpl   $0xc8,-0x4(%rbp)
  je     L159
  cmpl   $0xc8,-0x4(%rbp)
  jg     L269
  cmpl   $0x96,-0x4(%rbp)
  je     L70
  cmpl   $0x96,-0x4(%rbp)
  jg     L269
  cmpl   $0x86,-0x4(%rbp)
  je     L607
  cmpl   $0x86,-0x4(%rbp)
  jg     L269
  cmpl   $0x6e,-0x4(%rbp)
  je     L193
  cmpl   $0x6e,-0x4(%rbp)
  jg     L269
  cmpl   $0x32,-0x4(%rbp)
  je     L496
  cmpl   $0x4b,-0x4(%rbp)
  je     L163
  jmp    L269
L496:
  mov    D87(%rip),%rax
  mov    (%rax),%eax
  jmp    L566
L163:
  mov    D18(%rip),%rax
  mov    (%rax),%eax
  jmp    L566
L193:
  mov    D28(%rip),%rax
  mov    (%rax),%eax
  jmp    L566
L607:
  mov    D22(%rip),%rax
  mov    (%rax),%eax
  jmp    L566
L70:
  mov    D27(%rip),%rax
  mov    (%rax),%eax
  jmp    L566
L159:
  mov    D169(%rip),%rax
  mov    (%rax),%eax
  jmp    L566
L178:
  mov    D92(%rip),%rax
  mov    (%rax),%eax
  jmp    L566
L592:
  mov    D78(%rip),%rax
  mov    (%rax),%eax
  jmp    L566
L649:
  mov    D81(%rip),%rax
  mov    (%rax),%eax
  jmp    L566
L23:
  mov    D100(%rip),%rax
  mov    (%rax),%eax
  jmp    L566
L278:
  mov    D118(%rip),%rax
  mov    (%rax),%eax
  jmp    L566
L180:
  mov    D6(%rip),%rax
  mov    (%rax),%eax
  jmp    L566
L349:
  mov    D217(%rip),%rax
  mov    (%rax),%eax
  jmp    L566
L222:
  mov    D136(%rip),%rax
  mov    (%rax),%eax
  jmp    L566
L299:
  mov    D218(%rip),%rax
  mov    (%rax),%eax
  jmp    L566
L57:
  mov    D129(%rip),%rax
  mov    (%rax),%eax
  jmp    L566
L210:
  mov    D167(%rip),%rax
  mov    (%rax),%eax
  jmp    L566
L217:
  mov    D105(%rip),%rax
  mov    (%rax),%eax
  jmp    L566
L333:
  mov    D93(%rip),%rax
  mov    (%rax),%eax
  jmp    L566
L34:
  mov    D21(%rip),%rax
  mov    (%rax),%eax
  jmp    L566
L231:
  mov    D33(%rip),%rax
  mov    (%rax),%eax
  jmp    L566
L12:
  mov    D30(%rip),%rax
  mov    (%rax),%eax
  jmp    L566
L470:
  mov    D208(%rip),%rax
  mov    (%rax),%eax
  jmp    L566
L214:
  mov    D36(%rip),%rax
  mov    (%rax),%eax
  jmp    L566
L220:
  mov    D79(%rip),%rax
  mov    (%rax),%eax
  jmp    L566
L269:
  mov    $0x0,%eax
L566:
  pop    %rbp
  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;
  }
}
```