user: What is the c source code of the assembly code below:

```asm
<Serial_Openport>:
  endbr64
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x30,%rsp
  mov    %edx,%r12d
  mov    %ecx,%ebp
  mov    %fs:0x28,%rax
  mov    %rax,0x28(%rsp)
  xor    %eax,%eax
  cmp    $0x12c0,%esi
  je     L437
  jle    L226
  cmp    $0x38400,%esi
  je     L368
  jle    L276
  cmp    $0x8ca00,%esi
  je     L38
  jle    L567
  cmp    $0xe1000,%esi
  je     L220
  cmp    $0xf4240,%esi
  jne    L223
  mov    D255(%rip),%rax
  mov    (%rax),%r14d
  jmp    L577
L226:
  cmp    $0xc8,%esi
  je     L466
  jle    L430
  cmp    $0x4b0,%esi
  je     L52
  jle    L515
  cmp    $0x708,%esi
  je     L195
  cmp    $0x960,%esi
  jne    L223
  mov    D186(%rip),%rax
  mov    (%rax),%r14d
  jmp    L577
L430:
  cmp    $0x6e,%esi
  je     L158
  jle    L205
  cmp    $0x86,%esi
  je     L570
  cmp    $0x96,%esi
  jne    L223
  mov    D172(%rip),%rax
  mov    (%rax),%r14d
  jmp    L577
L205:
  cmp    $0x32,%esi
  je     L439
  cmp    $0x4b,%esi
  jne    L223
  mov    D128(%rip),%rax
  mov    (%rax),%r14d
  jmp    L577
L515:
  cmp    $0x12c,%esi
  je     L37
  cmp    $0x258,%esi
  jne    L223
  mov    D302(%rip),%rax
  mov    (%rax),%r14d
  jmp    L577
L276:
  cmp    $0x9600,%esi
  je     L209
  jle    L483
  cmp    $0xe100,%esi
  je     L75
  cmp    $0x1c200,%esi
  jne    L223
  mov    D12(%rip),%rax
  mov    (%rax),%r14d
  jmp    L577
L483:
  cmp    $0x2580,%esi
  je     L479
  cmp    $0x4b00,%esi
  jne    L223
  mov    D100(%rip),%rax
  mov    (%rax),%r14d
  jmp    L577
L567:
  cmp    $0x70800,%esi
  je     L211
  cmp    $0x7a120,%esi
  jne    L223
  mov    D196(%rip),%rax
  mov    (%rax),%r14d
  jmp    L577
L439:
  mov    D235(%rip),%rax
  mov    (%rax),%r14d
L577:
  mov    D147(%rip),%rax
  mov    (%rax),%esi
  mov    D66(%rip),%rax
  or     (%rax),%esi
  call   <open@plt>
  mov    %eax,%ebx
  test   %eax,%eax
  js     L446
  mov    $0x0,%edx
  mov    D246(%rip),%rax
  mov    (%rax),%esi
  mov    %ebx,%edi
  call   <fcntl@plt>
  mov    %rsp,%r13
  mov    $0x28,%edx
  mov    $0x0,%esi
  mov    %r13,%rdi
  call   <memset@plt>
  mov    D65(%rip),%rax
  mov    (%rax),%eax
  mov    D102(%rip),%rdx
  or     (%rdx),%eax
  mov    D111(%rip),%rdx
  or     (%rdx),%eax
  or     %r14d,%eax
  mov    %eax,(%rsp)
  mov    D203(%rip),%rax
  mov    (%rax),%eax
  mov    %eax,0x20(%rsp)
  movq   $0x0,0x18(%rsp)
  movq   $0x0,0x10(%rsp)
  mov    D301(%rip),%rax
  mov    (%rax),%rdx
  mov    0x8(%rsp),%rax
  mov    %r12d,(%rax,%rdx,4)
  mov    D5(%rip),%rax
  mov    (%rax),%rdx
  mov    0x8(%rsp),%rax
  mov    %ebp,(%rax,%rdx,4)
  mov    %r13,%rdx
  mov    D212(%rip),%rax
  mov    (%rax),%esi
  mov    %ebx,%edi
  call   <tcsetattr@plt>
  mov    %eax,%ebp
  cmp    $0xffffffff,%eax
  je     L216
L293:
  mov    0x28(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L106
  mov    %ebx,%eax
  add    $0x30,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  ret
L158:
  mov    D291(%rip),%rax
  mov    (%rax),%r14d
  jmp    L577
L570:
  mov    D229(%rip),%rax
  mov    (%rax),%r14d
  jmp    L577
L466:
  mov    D6(%rip),%rax
  mov    (%rax),%r14d
  jmp    L577
L37:
  mov    D107(%rip),%rax
  mov    (%rax),%r14d
  jmp    L577
L52:
  mov    D243(%rip),%rax
  mov    (%rax),%r14d
  jmp    L577
L195:
  mov    D197(%rip),%rax
  mov    (%rax),%r14d
  jmp    L577
L437:
  mov    D299(%rip),%rax
  mov    (%rax),%r14d
  jmp    L577
L479:
  mov    D60(%rip),%rax
  mov    (%rax),%r14d
  jmp    L577
L209:
  mov    D17(%rip),%rax
  mov    (%rax),%r14d
  jmp    L577
L75:
  mov    D317(%rip),%rax
  mov    (%rax),%r14d
  jmp    L577
L368:
  mov    D225(%rip),%rax
  mov    (%rax),%r14d
  jmp    L577
L211:
  mov    D142(%rip),%rax
  mov    (%rax),%r14d
  jmp    L577
L38:
  mov    D222(%rip),%rax
  mov    (%rax),%r14d
  jmp    L577
L220:
  mov    D200(%rip),%rax
  mov    (%rax),%r14d
  jmp    L577
L223:
  mov    D12(%rip),%rax
  mov    (%rax),%r14d
  jmp    L577
L216:
  mov    %ebx,%edi
  call   <close@plt>
  mov    %ebp,%ebx
  jmp    L293
L446:
  mov    $0xffffffff,%ebx
  jmp    L293
L106:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
int Serial_Openport(const char *port, int baudrate, int rec_chars, int block_time) {
  struct termios options;
  int baudr;
  int port_id;
  switch (baudrate) {
  case 50:
    baudr = B50;
    break;
  case 75:
    baudr = B75;
    break;
  case 110:
    baudr = B110;
    break;
  case 134:
    baudr = B134;
    break;
  case 150:
    baudr = B150;
    break;
  case 200:
    baudr = B200;
    break;
  case 300:
    baudr = B300;
    break;
  case 600:
    baudr = B600;
    break;
  case 1200:
    baudr = B1200;
    break;
  case 1800:
    baudr = B1800;
    break;
  case 2400:
    baudr = B2400;
    break;
  case 4800:
    baudr = B4800;
    break;
  case 9600:
    baudr = B9600;
    break;
  case 19200:
    baudr = B19200;
    break;
  case 38400:
    baudr = B38400;
    break;
  case 57600:
    baudr = B57600;
    break;
  case 115200:
    baudr = B115200;
    break;
  case 230400:
    baudr = B230400;
    break;
  case 460800:
    baudr = B460800;
    break;
  case 500000:
    baudr = B500000;
    break;
  case 576000:
    baudr = B576000;
    break;
  case 921600:
    baudr = B921600;
    break;
  case 1000000:
    baudr = B1000000;
    break;
  default:
    baudr = B115200;
    break;
  }
  port_id = open(port, O_RDWR | O_NOCTTY);
  if (port_id < 0)
    return (-1);
  fcntl(port_id, F_SETFL, 0);
  memset(&options, 0, sizeof(options));
  options.c_cflag = baudr | CS8 | CLOCAL | CREAD;
  options.c_iflag = IGNPAR;
  options.c_oflag = 0;
  options.c_lflag = 0;
  options.c_cc[VMIN] = rec_chars;
  options.c_cc[VTIME] = block_time;
  if (tcsetattr(port_id, TCSANOW, &options) == -1) {
    close(port_id);
    return (-1);
  }
  return port_id;
}
```