user: 下面的汇编指令对应的C源代码是什么：

```asm
<genieOpen>:
  endbr64
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x30,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x28(%rsp)
  xor    %eax,%eax
  cmp    $0x4b0,%esi
  je     L185
  jg     L277
  cmp    $0x96,%esi
  je     L205
  jle    L244
  cmp    $0x12c,%esi
  je     L321
  cmp    $0x258,%esi
  jne    L60
  mov    D189(%rip),%rax
  mov    (%rax),%r12d
  jmp    L387
L244:
  cmp    $0x6e,%esi
  je     L109
  jle    L207
  mov    $0xfffffffe,%ebx
  cmp    $0x86,%esi
  jne    L429
  mov    D336(%rip),%rax
  mov    (%rax),%r12d
  jmp    L387
L207:
  cmp    $0x32,%esi
  je     L67
  cmp    $0x4b,%esi
  jne    L311
  mov    D101(%rip),%rax
  mov    (%rax),%r12d
  jmp    L387
L311:
  mov    $0xfffffffe,%ebx
  jmp    L429
L60:
  cmp    $0xc8,%esi
  jne    L151
  mov    D203(%rip),%rax
  mov    (%rax),%r12d
  jmp    L387
L151:
  mov    $0xfffffffe,%ebx
  jmp    L429
L277:
  cmp    $0x9600,%esi
  je     L154
  jle    L50
  cmp    $0x1c200,%esi
  je     L242
  cmp    $0x38400,%esi
  jne    L144
  mov    D350(%rip),%rax
  mov    (%rax),%r12d
  jmp    L387
L50:
  cmp    $0x2580,%esi
  je     L73
  jle    L369
  mov    $0xfffffffe,%ebx
  cmp    $0x4b00,%esi
  jne    L429
  mov    D122(%rip),%rax
  mov    (%rax),%r12d
  jmp    L387
L369:
  cmp    $0x708,%esi
  je     L153
  cmp    $0x960,%esi
  jne    L229
  mov    D137(%rip),%rax
  mov    (%rax),%r12d
  jmp    L387
L229:
  mov    $0xfffffffe,%ebx
  jmp    L429
L144:
  cmp    $0xe100,%esi
  jne    L361
  mov    D118(%rip),%rax
  mov    (%rax),%r12d
  jmp    L387
L361:
  mov    $0xfffffffe,%ebx
  jmp    L429
L67:
  mov    D417(%rip),%rax
  mov    (%rax),%r12d
L387:
  mov    D278(%rip),%rax
  mov    (%rax),%esi
  mov    D151(%rip),%rax
  or     (%rax),%esi
  mov    D209(%rip),%rax
  or     (%rax),%esi
  mov    D398(%rip),%rax
  or     (%rax),%esi
  call   <open@plt>
  mov    %eax,%ebx
  cmp    $0xffffffff,%eax
  je     L429
  mov    D278(%rip),%rax
  mov    (%rax),%edx
  mov    D180(%rip),%rax
  mov    (%rax),%esi
  mov    %ebx,%edi
  call   <fcntl@plt>
  lea    0x10(%rsp),%rbp
  mov    %rbp,%rsi
  mov    %ebx,%edi
  call   <tcgetattr@plt>
  mov    %rbp,%rdi
  call   <cfmakeraw@plt>
  mov    %r12d,%esi
  mov    %rbp,%rdi
  call   <cfsetispeed@plt>
  mov    %r12d,%esi
  mov    %rbp,%rdi
  call   <cfsetospeed@plt>
  mov    D267(%rip),%rax
  mov    (%rax),%eax
  mov    D273(%rip),%rdx
  or     (%rdx),%eax
  mov    D88(%rip),%rdx
  or     (%rdx),%eax
  not    %eax
  mov    D355(%rip),%rcx
  mov    0x10(%rsp),%edx
  or     (%rcx),%edx
  mov    D2(%rip),%rcx
  or     (%rcx),%edx
  and    %edx,%eax
  mov    D309(%rip),%rdx
  or     (%rdx),%eax
  mov    %eax,0x10(%rsp)
  mov    D67(%rip),%rax
  mov    (%rax),%eax
  mov    D32(%rip),%rdx
  or     (%rdx),%eax
  mov    D229(%rip),%rdx
  or     (%rdx),%eax
  mov    D354(%rip),%rdx
  or     (%rdx),%eax
  not    %eax
  and    %eax,0x14(%rsp)
  mov    D169(%rip),%rax
  mov    (%rax),%eax
  not    %eax
  and    %eax,0x20(%rsp)
  mov    D232(%rip),%rax
  mov    (%rax),%rdx
  mov    0x18(%rsp),%rax
  movl   $0x0,(%rax,%rdx,4)
  mov    D185(%rip),%rax
  mov    (%rax),%rdx
  mov    0x18(%rsp),%rax
  movl   $0x64,(%rax,%rdx,4)
  mov    D288(%rip),%rax
  mov    (%rax),%esi
  mov    D172(%rip),%rax
  or     (%rax),%esi
  mov    %rbp,%rdx
  mov    %ebx,%edi
  call   <tcsetattr@plt>
  lea    0xc(%rsp),%rbp
  mov    %rbp,%rdx
  mov    D177(%rip),%rax
  mov    (%rax),%esi
  mov    %ebx,%edi
  call   <ioctl@plt>
  mov    D301(%rip),%rdx
  mov    0xc(%rsp),%eax
  or     (%rdx),%eax
  mov    D97(%rip),%rdx
  or     (%rdx),%eax
  mov    %eax,0xc(%rsp)
  mov    %rbp,%rdx
  mov    D387(%rip),%rax
  mov    (%rax),%esi
  mov    %ebx,%edi
  call   <ioctl@plt>
  mov    $0x2710,%edi
  call   <usleep@plt>
L429:
  mov    0x28(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L128
  mov    %ebx,%eax
  add    $0x30,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  ret
L109:
  mov    D410(%rip),%rax
  mov    (%rax),%r12d
  jmp    L387
L205:
  mov    D146(%rip),%rax
  mov    (%rax),%r12d
  jmp    L387
L321:
  mov    D246(%rip),%rax
  mov    (%rax),%r12d
  jmp    L387
L185:
  mov    D248(%rip),%rax
  mov    (%rax),%r12d
  jmp    L387
L153:
  mov    D341(%rip),%rax
  mov    (%rax),%r12d
  jmp    L387
L73:
  mov    D163(%rip),%rax
  mov    (%rax),%r12d
  jmp    L387
L154:
  mov    D217(%rip),%rax
  mov    (%rax),%r12d
  jmp    L387
L242:
  mov    D134(%rip),%rax
  mov    (%rax),%r12d
  jmp    L387
L128:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
int genieOpen(char *device, int baud) {
  struct termios options;
  speed_t myBaud;
  int status, fd;
  switch (baud) {
  case 50:
    myBaud = B50;
    break;
  case 75:
    myBaud = B75;
    break;
  case 110:
    myBaud = B110;
    break;
  case 134:
    myBaud = B134;
    break;
  case 150:
    myBaud = B150;
    break;
  case 200:
    myBaud = B200;
    break;
  case 300:
    myBaud = B300;
    break;
  case 600:
    myBaud = B600;
    break;
  case 1200:
    myBaud = B1200;
    break;
  case 1800:
    myBaud = B1800;
    break;
  case 2400:
    myBaud = B2400;
    break;
  case 9600:
    myBaud = B9600;
    break;
  case 19200:
    myBaud = B19200;
    break;
  case 38400:
    myBaud = B38400;
    break;
  case 57600:
    myBaud = B57600;
    break;
  case 115200:
    myBaud = B115200;
    break;
  case 230400:
    myBaud = B230400;
    break;
  default:
    return -2;
  }
  if ((fd = open(device, O_RDWR | O_NOCTTY | O_NDELAY | O_NONBLOCK)) == -1)
    return -1;
  fcntl(fd, F_SETFL, O_RDWR);
  tcgetattr(fd, &options);
  cfmakeraw(&options);
  cfsetispeed(&options, myBaud);
  cfsetospeed(&options, myBaud);
  options.c_cflag |= (CLOCAL | CREAD);
  options.c_cflag &= ~PARENB;
  options.c_cflag &= ~CSTOPB;
  options.c_cflag &= ~CSIZE;
  options.c_cflag |= CS8;
  options.c_lflag &= ~(ICANON | ECHO | ECHOE | ISIG);
  options.c_oflag &= ~OPOST;
  options.c_cc[VMIN] = 0;
  options.c_cc[VTIME] = 100;
  tcsetattr(fd, TCSANOW | TCSAFLUSH, &options);
  ioctl(fd, TIOCMGET, &status);
  status |= TIOCM_DTR;
  status |= TIOCM_RTS;
  ioctl(fd, TIOCMSET, &status);
  usleep(10000);
  return fd;
}
```