user: 这段汇编代码用C语言表示是什么样的?

```asm
<disk_scsi_inquiry_command>:
  endbr64
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x1f0,%rsp
  mov    %edi,%ebp
  mov    %rsi,%r12
  mov    %rdx,%rbx
  mov    %fs:0x28,%rax
  mov    %rax,0x1e8(%rsp)
  xor    %eax,%eax
  movq   $0x0,0x140(%rsp)
  movq   $0x0,0x148(%rsp)
  movq   $0x0,0x150(%rsp)
  movl   $0x12,0x140(%rsp)
  mov    %rdx,%rax
  shr    $0x8,%rax
  mov    %eax,0x14c(%rsp)
  movzbl %dl,%eax
  mov    %eax,0x150(%rsp)
  lea    0x160(%rsp),%rdi
  mov    $0x0,%eax
  mov    $0x10,%ecx
  rep stos %rax,%es:(%rdi)
  mov    %rsp,%rdi
  mov    $0x14,%ecx
  rep stos %rax,%es:(%rdi)
  movb   $0x51,(%rsp)
  movl   $0x18,0x4(%rsp)
  lea    0x140(%rsp),%rax
  mov    %rax,0x8(%rsp)
  movl   $0x80,0x10(%rsp)
  lea    0x160(%rsp),%rax
  mov    %rax,0x18(%rsp)
  mov    %rdx,0x20(%rsp)
  mov    %rsi,0x28(%rsp)
  movl   $0x7530,0x30(%rsp)
  mov    D109(%rip),%rax
  mov    (%rax),%eax
  mov    %eax,0x94(%rsp)
  mov    D20(%rip),%rax
  mov    (%rax),%eax
  mov    %eax,0x98(%rsp)
  mov    %rsp,%rdx
  mov    D89(%rip),%rax
  mov    (%rax),%esi
  mov    %ebp,%edi
  call   <ioctl@plt>
  test   %eax,%eax
  je     L33
  mov    D98(%rip),%rcx
  mov    D75(%rip),%rdx
  mov    (%rdx),%rsi
  cmp    %rsi,(%rcx)
  jne    L46
  lea    0xa0(%rsp),%rdi
  mov    $0x14,%ecx
  mov    $0x0,%eax
  rep stos %rax,%es:(%rdi)
  movl   $0x7530,0xd0(%rsp)
  movb   $0x53,0xd4(%rsp)
  lea    0x140(%rsp),%rax
  mov    %rax,0xd8(%rsp)
  movl   $0x18,0xe0(%rsp)
  mov    %r12,0xe8(%rsp)
  mov    %rbx,0xf0(%rsp)
  lea    0x160(%rsp),%rax
  mov    %rax,0xf8(%rsp)
  movl   $0x80,0x100(%rsp)
  mov    D0(%rip),%rax
  mov    (%rax),%eax
  mov    %eax,0x130(%rsp)
  lea    0xa0(%rsp),%rdx
  mov    D89(%rip),%rax
  mov    (%rax),%esi
  mov    %ebp,%edi
  call   <ioctl@plt>
  test   %eax,%eax
  jne    L46
  mov    0x108(%rsp),%rax
  or     0x110(%rsp),%rax
  or     0x118(%rsp),%rax
  jne    L69
L33:
  mov    0x80(%rsp),%rax
  or     0x88(%rsp),%rax
  or     0x78(%rsp),%rax
  jne    L34
  mov    $0x0,%eax
L46:
  mov    0x1e8(%rsp),%rdx
  sub    %fs:0x28,%rdx
  jne    L78
  add    $0x1f0,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  ret
L69:
  mov    D15(%rip),%rax
  mov    (%rax),%rdx
  mov    D98(%rip),%rax
  mov    %rdx,(%rax)
  mov    $0xffffffff,%eax
  jmp    L46
L34:
  mov    D15(%rip),%rax
  mov    (%rax),%rdx
  mov    D98(%rip),%rax
  mov    %rdx,(%rax)
  mov    $0xffffffff,%eax
  jmp    L46
L78:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
int disk_scsi_inquiry_command(const int fd, void *const buf, const size_t buf_len) {
  uint8_t cdb[6] = {
      [0] = 0x12,
      [3] = (buf_len >> 8),
      [4] = (buf_len & 0xff),
  };
  uint8_t sense[32] = {0};
  struct sg_io_v4 io_v4 = {
      .guard = 'Q',
      .protocol = BSG_PROTOCOL_SCSI,
      .subprotocol = BSG_SUB_PROTOCOL_SCSI_CMD,
      .request_len = sizeof(cdb),
      .request = (uintptr_t)cdb,
      .max_response_len = sizeof(sense),
      .response = (uintptr_t)sense,
      .din_xfer_len = buf_len,
      .din_xferp = (uintptr_t)buf,
      .timeout = (30 * 1000),
  };
  int ret;
  ret = ioctl(fd, SG_IO, &io_v4);
  if (ret != 0) {
    if (errno == EINVAL) {
      struct sg_io_hdr io_hdr = {
          .interface_id = 'S',
          .cmdp = (unsigned char *)cdb,
          .cmd_len = sizeof(cdb),
          .dxferp = buf,
          .dxfer_len = buf_len,
          .sbp = sense,
          .mx_sb_len = sizeof(sense),
          .dxfer_direction = SG_DXFER_FROM_DEV,
          .timeout = (30 * 1000),
      };
      ret = ioctl(fd, SG_IO, &io_hdr);
      if (ret != 0) {
        return ret;
      }
      if (!(io_hdr.status == 0 && io_hdr.host_status == 0 && io_hdr.driver_status == 0)) {
        errno = EIO;
        return -1;
      }
    } else {
      return ret;
    }
  }
  if (!(io_v4.device_status == 0 && io_v4.transport_status == 0 && io_v4.driver_status == 0)) {
    errno = EIO;
    return -1;
  }
  return 0;
}
```