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

```asm
<tsc40_init>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x40,%rsp
  mov    %edi,-0x24(%rbp)
  mov    %rsi,-0x30(%rbp)
  mov    %rdx,-0x38(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  movb   $0x55,-0xa(%rbp)
  lea    -0xa(%rbp),%rcx
  mov    -0x24(%rbp),%eax
  mov    $0x1,%edx
  mov    %rcx,%rsi
  mov    %eax,%edi
  call   <write@plt>
  cmp    $0x1,%eax
  je     L1
  mov    $0xffffffff,%eax
  jmp    L13
L1:
  mov    $0x3a98,%edi
  call   <usleep@plt>
  movb   $0x15,-0xa(%rbp)
  lea    -0xa(%rbp),%rcx
  mov    -0x24(%rbp),%eax
  mov    $0x1,%edx
  mov    %rcx,%rsi
  mov    %eax,%edi
  call   <write@plt>
  cmp    $0x1,%eax
  je     L155
  mov    $0xffffffff,%eax
  jmp    L13
L155:
  lea    -0x11(%rbp),%rcx
  mov    -0x24(%rbp),%eax
  mov    $0x64,%edx
  mov    %rcx,%rsi
  mov    %eax,%edi
  call   <readchar@plt>
  test   %rax,%rax
  je     L32
  mov    $0xffffffff,%eax
  jmp    L13
L32:
  movzbl -0x11(%rbp),%eax
  not    %eax
  shr    $0x7,%al
  movzbl %al,%eax
  mov    %eax,-0x10(%rbp)
  lea    -0x11(%rbp),%rcx
  mov    -0x24(%rbp),%eax
  mov    $0x64,%edx
  mov    %rcx,%rsi
  mov    %eax,%edi
  call   <readchar@plt>
  test   %rax,%rax
  je     L151
  mov    $0xffffffff,%eax
  jmp    L13
L151:
  movb   $0x5,-0xa(%rbp)
  movb   $0x45,-0x9(%rbp)
  lea    -0xa(%rbp),%rcx
  mov    -0x24(%rbp),%eax
  mov    $0x2,%edx
  mov    %rcx,%rsi
  mov    %eax,%edi
  call   <write@plt>
  cmp    $0x2,%eax
  je     L15
  mov    $0xffffffff,%eax
  jmp    L13
L15:
  lea    -0x11(%rbp),%rcx
  mov    -0x24(%rbp),%eax
  mov    $0x64,%edx
  mov    %rcx,%rsi
  mov    %eax,%edi
  call   <readchar@plt>
  test   %rax,%rax
  je     L0
  mov    $0xffffffff,%eax
  jmp    L13
L0:
  movzbl -0x11(%rbp),%eax
  cmp    $0x15,%al
  jne    L101
  cmpl   $0x1,-0x10(%rbp)
  jne    L101
  lea    -0x11(%rbp),%rcx
  mov    -0x24(%rbp),%eax
  mov    $0x64,%edx
  mov    %rcx,%rsi
  mov    %eax,%edi
  call   <readchar@plt>
  test   %rax,%rax
  je     L166
  mov    $0xffffffff,%eax
  jmp    L13
L166:
  movzbl -0x11(%rbp),%eax
  movzbl %al,%eax
  cmp    $0x8,%eax
  seta   %dl
  test   %dl,%dl
  jne    L186
  mov    $0x114,%edx
  mov    %eax,%ecx
  shr    %cl,%rdx
  mov    %rdx,%rax
  and    $0x1,%eax
  test   %rax,%rax
  setne  %al
  test   %al,%al
  je     L186
  mov    $0xffffffff,%eax
  jmp    L13
L186:
  nop
L101:
  movb   $0x1,-0xa(%rbp)
  lea    -0xa(%rbp),%rcx
  mov    -0x24(%rbp),%eax
  mov    $0x1,%edx
  mov    %rcx,%rsi
  mov    %eax,%edi
  call   <write@plt>
  cmp    $0x1,%eax
  je     L127
  mov    $0xffffffff,%eax
  jmp    L13
L127:
  mov    $0x0,%eax
L13:
  mov    -0x8(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L44
  call   <__stack_chk_fail@plt>
L44:
  leave
  ret
```

assistant: ```c
int tsc40_init(int fd, unsigned long *id, unsigned long *extra) {
  unsigned char cmd[2], data;
  unsigned int eeprom;
  cmd[0] = 0x55;
  if (write(fd, cmd, 1) != 1)
    return -1;
  usleep(15 * 1000);
  cmd[0] = 0x15;
  if (write(fd, cmd, 1) != 1)
    return -1;
  if (readchar(fd, &data, 100))
    return -1;
  eeprom = !((data & 0x80) >> 7);
  if (readchar(fd, &data, 100))
    return -1;
  cmd[0] = 0x05;
  cmd[1] = 0x45;
  if (write(fd, cmd, 2) != 2)
    return -1;
  if (readchar(fd, &data, 100))
    return -1;
  if ((data == 0x15) && (eeprom == 1)) {
    if (readchar(fd, &data, 100))
      return -1;
    switch (data) {
    case 0x02:
    case 0x04:
    case 0x08:
      return -1;
      break;
    default:
      break;
    }
  }
  cmd[0] = 0x01;
  if (write(fd, cmd, 1) != 1)
    return -1;
  return 0;
}
```