user: 请将以下的汇编代码转换成C语言代码：

```asm
<kvss905c_strerror>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x20,%rsp
  mov    %rdi,-0x18(%rbp)
  mov    -0x18(%rbp),%rax
  mov    %rax,%rdi
  call   <scsi_error_code@plt>
  mov    %eax,-0x8(%rbp)
  mov    -0x18(%rbp),%rax
  add    $0x8,%rax
  mov    (%rax),%eax
  and    $0xf,%eax
  mov    %eax,-0x4(%rbp)
  cmpl   $0x8083,-0x8(%rbp)
  je     L1097
  cmpl   $0x8083,-0x8(%rbp)
  jg     L962
  cmpl   $0x800e,-0x8(%rbp)
  jg     L962
  cmpl   $0x8001,-0x8(%rbp)
  jge    L239
  cmpl   $0x4900,-0x8(%rbp)
  je     L976
  cmpl   $0x4900,-0x8(%rbp)
  jg     L962
  cmpl   $0x4700,-0x8(%rbp)
  je     L887
  cmpl   $0x4700,-0x8(%rbp)
  jg     L962
  cmpl   $0x4482,-0x8(%rbp)
  je     L1023
  cmpl   $0x4482,-0x8(%rbp)
  jg     L962
  cmpl   $0x4481,-0x8(%rbp)
  je     L642
  cmpl   $0x4481,-0x8(%rbp)
  jg     L962
  cmpl   $0x4480,-0x8(%rbp)
  je     L203
  cmpl   $0x4480,-0x8(%rbp)
  jg     L962
  cmpl   $0x4300,-0x8(%rbp)
  je     L1104
  cmpl   $0x4300,-0x8(%rbp)
  jg     L962
  cmpl   $0x3d00,-0x8(%rbp)
  je     L961
  cmpl   $0x3d00,-0x8(%rbp)
  jg     L962
  cmpl   $0x3a00,-0x8(%rbp)
  je     L620
  cmpl   $0x3a00,-0x8(%rbp)
  jg     L962
  cmpl   $0x2c87,-0x8(%rbp)
  jg     L962
  cmpl   $0x2c80,-0x8(%rbp)
  jge    L744
  cmpl   $0x2c02,-0x8(%rbp)
  je     L1000
  cmpl   $0x2c02,-0x8(%rbp)
  jg     L962
  cmpl   $0x2c01,-0x8(%rbp)
  je     L361
  cmpl   $0x2c01,-0x8(%rbp)
  jg     L962
  cmpl   $0x2900,-0x8(%rbp)
  je     L26
  cmpl   $0x2900,-0x8(%rbp)
  jg     L962
  cmpl   $0x2600,-0x8(%rbp)
  je     L423
  cmpl   $0x2600,-0x8(%rbp)
  jg     L962
  cmpl   $0x2500,-0x8(%rbp)
  je     L677
  cmpl   $0x2500,-0x8(%rbp)
  jg     L962
  cmpl   $0x2400,-0x8(%rbp)
  je     L864
  cmpl   $0x2400,-0x8(%rbp)
  jg     L962
  cmpl   $0x2000,-0x8(%rbp)
  je     L219
  cmpl   $0x2000,-0x8(%rbp)
  jg     L962
  cmpl   $0x1b00,-0x8(%rbp)
  je     L57
  cmpl   $0x1b00,-0x8(%rbp)
  jg     L962
  cmpl   $0x1a00,-0x8(%rbp)
  je     L695
  cmpl   $0x1a00,-0x8(%rbp)
  jg     L962
  cmpl   $0x882,-0x8(%rbp)
  je     L93
  cmpl   $0x882,-0x8(%rbp)
  jg     L962
  cmpl   $0x881,-0x8(%rbp)
  je     L781
  cmpl   $0x881,-0x8(%rbp)
  jg     L962
  cmpl   $0x880,-0x8(%rbp)
  je     L293
  cmpl   $0x880,-0x8(%rbp)
  jg     L962
  cmpl   $0x482,-0x8(%rbp)
  je     L312
  cmpl   $0x482,-0x8(%rbp)
  jg     L962
  cmpl   $0x480,-0x8(%rbp)
  je     L564
  cmpl   $0x481,-0x8(%rbp)
  je     L1076
  jmp    L962
L239:
  mov    -0x8(%rbp),%eax
  sub    $0x8001,%eax
  cmp    $0xd,%eax
  ja     L962
  mov    %eax,%eax
  lea    0x0(,%rax,4),%rdx
  lea    D289(%rip),%rax
  mov    (%rdx,%rax,1),%eax
  cltq
  lea    D289(%rip),%rdx
  add    %rdx,%rax
  notrack jmp *%rax
L744:
  mov    -0x8(%rbp),%eax
  sub    $0x2c80,%eax
  cmp    $0x7,%eax
  ja     L962
  mov    %eax,%eax
  lea    0x0(,%rax,4),%rdx
  lea    D463(%rip),%rax
  mov    (%rdx,%rax,1),%eax
  cltq
  lea    D463(%rip),%rdx
  add    %rdx,%rax
  notrack jmp *%rax
L864:
  lea    D377(%rip),%rax
  jmp    L1178
L620:
  lea    D518(%rip),%rax
  jmp    L1178
L564:
  lea    D215(%rip),%rax
  jmp    L1178
L1076:
  lea    D170(%rip),%rax
  jmp    L1178
L312:
  lea    D124(%rip),%rax
  jmp    L1178
  cmpl   $0x2,-0x4(%rbp)
  jne    L878
  lea    D326(%rip),%rax
  jmp    L1178
L878:
  cmpl   $0x3,-0x4(%rbp)
  jne    L496
  lea    D142(%rip),%rax
  jmp    L1178
L496:
  cmpl   $0x4,-0x4(%rbp)
  jne    L315
  lea    D263(%rip),%rax
  jmp    L1178
L315:
  mov    $0x0,%eax
  jmp    L1178
  cmpl   $0x2,-0x4(%rbp)
  jne    L25
  lea    D273(%rip),%rax
  jmp    L1178
L25:
  cmpl   $0x3,-0x4(%rbp)
  jne    L674
  lea    D94(%rip),%rax
  jmp    L1178
L674:
  cmpl   $0x4,-0x4(%rbp)
  jne    L651
  lea    D429(%rip),%rax
  jmp    L1178
L651:
  mov    $0x0,%eax
  jmp    L1178
  lea    D547(%rip),%rax
  jmp    L1178
  cmpl   $0x3,-0x4(%rbp)
  jne    L837
  lea    D536(%rip),%rax
  jmp    L1178
L837:
  cmpl   $0x4,-0x4(%rbp)
  jne    L615
  lea    D395(%rip),%rax
  jmp    L1178
L615:
  mov    $0x0,%eax
  jmp    L1178
  cmpl   $0x3,-0x4(%rbp)
  jne    L40
  lea    D410(%rip),%rax
  jmp    L1178
L40:
  cmpl   $0x4,-0x4(%rbp)
  jne    L966
  lea    D394(%rip),%rax
  jmp    L1178
L966:
  mov    $0x0,%eax
  jmp    L1178
  lea    D17(%rip),%rax
  jmp    L1178
  lea    D223(%rip),%rax
  jmp    L1178
  lea    D541(%rip),%rax
  jmp    L1178
  lea    D93(%rip),%rax
  jmp    L1178
  lea    D303(%rip),%rax
  jmp    L1178
  lea    D300(%rip),%rax
  jmp    L1178
  lea    D318(%rip),%rax
  jmp    L1178
  lea    D151(%rip),%rax
  jmp    L1178
L293:
  lea    D435(%rip),%rax
  jmp    L1178
L781:
  lea    D430(%rip),%rax
  jmp    L1178
L93:
  lea    D387(%rip),%rax
  jmp    L1178
L1097:
  lea    D467(%rip),%rax
  jmp    L1178
L203:
  lea    D380(%rip),%rax
  jmp    L1178
L642:
  lea    D220(%rip),%rax
  jmp    L1178
L1023:
  lea    D475(%rip),%rax
  jmp    L1178
L887:
  lea    D70(%rip),%rax
  jmp    L1178
L695:
  lea    D214(%rip),%rax
  jmp    L1178
L219:
  lea    D74(%rip),%rax
  jmp    L1178
L677:
  lea    D276(%rip),%rax
  jmp    L1178
L423:
  lea    D218(%rip),%rax
  jmp    L1178
L361:
  lea    D210(%rip),%rax
  jmp    L1178
L1000:
  lea    D469(%rip),%rax
  jmp    L1178
  lea    D110(%rip),%rax
  jmp    L1178
  lea    D327(%rip),%rax
  jmp    L1178
  lea    D351(%rip),%rax
  jmp    L1178
  lea    D138(%rip),%rax
  jmp    L1178
  lea    D298(%rip),%rax
  jmp    L1178
  lea    D12(%rip),%rax
  jmp    L1178
  lea    D171(%rip),%rax
  jmp    L1178
  lea    D48(%rip),%rax
  jmp    L1178
L961:
  lea    D29(%rip),%rax
  jmp    L1178
L26:
  lea    D460(%rip),%rax
  jmp    L1178
L57:
  lea    D183(%rip),%rax
  jmp    L1178
L1104:
  lea    D401(%rip),%rax
  jmp    L1178
L976:
  lea    D277(%rip),%rax
  jmp    L1178
L962:
  mov    $0x0,%eax
L1178:
  leave
  ret
```

tool_calls: name: unpack_data
arguments: data_tag: D377
datatype: string
name: unpack_data
arguments: data_tag: D518
datatype: string
name: unpack_data
arguments: data_tag: D215
datatype: string
name: unpack_data
arguments: data_tag: D170
datatype: string
name: unpack_data
arguments: data_tag: D124
datatype: string
name: unpack_data
arguments: data_tag: D326
datatype: string
name: unpack_data
arguments: data_tag: D142
datatype: string
name: unpack_data
arguments: data_tag: D263
datatype: string
name: unpack_data
arguments: data_tag: D273
datatype: string
name: unpack_data
arguments: data_tag: D94
datatype: string
name: unpack_data
arguments: data_tag: D429
datatype: string
name: unpack_data
arguments: data_tag: D547
datatype: string
name: unpack_data
arguments: data_tag: D536
datatype: string
name: unpack_data
arguments: data_tag: D395
datatype: string
name: unpack_data
arguments: data_tag: D410
datatype: string
name: unpack_data
arguments: data_tag: D394
datatype: string
name: unpack_data
arguments: data_tag: D17
datatype: string
name: unpack_data
arguments: data_tag: D223
datatype: string
name: unpack_data
arguments: data_tag: D541
datatype: string
name: unpack_data
arguments: data_tag: D93
datatype: string
name: unpack_data
arguments: data_tag: D303
datatype: string
name: unpack_data
arguments: data_tag: D300
datatype: string
name: unpack_data
arguments: data_tag: D318
datatype: string
name: unpack_data
arguments: data_tag: D151
datatype: string
name: unpack_data
arguments: data_tag: D435
datatype: string
name: unpack_data
arguments: data_tag: D430
datatype: string
name: unpack_data
arguments: data_tag: D387
datatype: string
name: unpack_data
arguments: data_tag: D467
datatype: string
name: unpack_data
arguments: data_tag: D380
datatype: string
name: unpack_data
arguments: data_tag: D220
datatype: string
name: unpack_data
arguments: data_tag: D475
datatype: string
name: unpack_data
arguments: data_tag: D70
datatype: string
name: unpack_data
arguments: data_tag: D214
datatype: string
name: unpack_data
arguments: data_tag: D74
datatype: string
name: unpack_data
arguments: data_tag: D276
datatype: string
name: unpack_data
arguments: data_tag: D218
datatype: string
name: unpack_data
arguments: data_tag: D210
datatype: string
name: unpack_data
arguments: data_tag: D469
datatype: string
name: unpack_data
arguments: data_tag: D110
datatype: string
name: unpack_data
arguments: data_tag: D327
datatype: string
name: unpack_data
arguments: data_tag: D351
datatype: string
name: unpack_data
arguments: data_tag: D138
datatype: string
name: unpack_data
arguments: data_tag: D298
datatype: string
name: unpack_data
arguments: data_tag: D12
datatype: string
name: unpack_data
arguments: data_tag: D171
datatype: string
name: unpack_data
arguments: data_tag: D48
datatype: string
name: unpack_data
arguments: data_tag: D29
datatype: string
name: unpack_data
arguments: data_tag: D460
datatype: string
name: unpack_data
arguments: data_tag: D183
datatype: string
name: unpack_data
arguments: data_tag: D401
datatype: string
name: unpack_data
arguments: data_tag: D277
datatype: string

tool: D377: Invalid field in CDB

tool: D518: Out of paper

tool: D215: Document lead door open

tool: D170: Document discharge door open

tool: D124: Post imprinter door open

tool: D326: Scanner stopped

tool: D142: Jammed at document lead

tool: D263: Lamp failure with regular temperature

tool: D273: Document feeder stopped

tool: D94: Jammed at document discharge 1

tool: D429: Document size detect error

tool: D547: Jammed at document discharge 2

tool: D536: Document internal rest

tool: D395: Document hopper error

tool: D410: Jammed at document feed 1

tool: D394: Document sensor adjust error

tool: D17: Jammed at document feed 2

tool: D223: Jammed at document feed 3

tool: D541: Jammed at document feed 4

tool: D93: Skew error

tool: D303: Minimum media error

tool: D300: Media length error

tool: D318: Double feed error

tool: D151: Barcode error

tool: D435: Internal parameter error

tool: D430: Internal DMA error

tool: D387: Internal command error

tool: D467: Internal communication error

tool: D380: Internal RAM error

tool: D220: Internal EEPROM error

tool: D475: FPGA error

tool: D70: SCSI parity error

tool: D214: Parameter list length error

tool: D74: Invalid command op code

tool: D276: Logical unit not supported

tool: D218: Invalid field in parameter list

tool: D210: Too many windows

tool: D469: Invalid window combination

tool: D110: Out of memory

tool: D327: No back scanning unit

tool: D351: No imprinter unit

tool: D138: Pointer position error

tool: D298: Out of scanning page limit

tool: D12: Out of scanning length limit

tool: D171: Out of scanning resolution limit

tool: D48: Out of scanning line cycle limit

tool: D29: Invalid bits in identity message

tool: D460: Unit attention

tool: D183: Sync data transfer error

tool: D401: Message error

tool: D277: Invalid message error

assistant: ```c
const char *kvss905c_strerror(uint8_t *requestsense) {
  const uint16_t error = scsi_error_code(requestsense);
  const uint8_t sense = requestsense[2] & 0x0f;
  switch (error) {
  case 0x2400:
    return "Invalid field in CDB";
  case 0x3a00:
    return "Out of paper";
  case 0x0480:
    return "Document lead door open";
  case 0x0481:
    return "Document discharge door open";
  case 0x0482:
    return "Post imprinter door open";
  case 0x8001:
    if (sense == 2)
      return "Scanner stopped";
    else if (sense == 3)
      return "Jammed at document lead";
    else if (sense == 4)
      return "Lamp failure with regular temperature";
    else
      return NULL;
  case 0x8002:
    if (sense == 2)
      return "Document feeder stopped";
    else if (sense == 3)
      return "Jammed at document discharge 1";
    else if (sense == 4)
      return "Document size detect error";
    else
      return NULL;
  case 0x8003:
    return "Jammed at document discharge 2";
  case 0x8004:
    if (sense == 3)
      return "Document internal rest";
    else if (sense == 4)
      return "Document hopper error";
    else
      return NULL;
  case 0x8005:
    if (sense == 3)
      return "Jammed at document feed 1";
    if (sense == 4)
      return "Document sensor adjust error";
    else
      return NULL;
  case 0x8006:
    return "Jammed at document feed 2";
  case 0x8007:
    return "Jammed at document feed 3";
  case 0x8008:
    return "Jammed at document feed 4";
  case 0x800a:
    return "Skew error";
  case 0x800b:
    return "Minimum media error";
  case 0x800c:
    return "Media length error";
  case 0x800d:
    return "Double feed error";
  case 0x800e:
    return "Barcode error";
  case 0x0880:
    return "Internal parameter error";
  case 0x0881:
    return "Internal DMA error";
  case 0x0882:
    return "Internal command error";
  case 0x8083:
    return "Internal communication error";
  case 0x4480:
    return "Internal RAM error";
  case 0x4481:
    return "Internal EEPROM error";
  case 0x4482:
    return "FPGA error";
  case 0x4700:
    return "SCSI parity error";
  case 0x1a00:
    return "Parameter list length error";
  case 0x2000:
    return "Invalid command op code";
  case 0x2500:
    return "Logical unit not supported";
  case 0x2600:
    return "Invalid field in parameter list";
  case 0x2c01:
    return "Too many windows";
  case 0x2c02:
    return "Invalid window combination";
  case 0x2c80:
    return "Out of memory";
  case 0x2c81:
    return "No back scanning unit";
  case 0x2c82:
    return "No imprinter unit";
  case 0x2c83:
    return "Pointer position error";
  case 0x2c84:
    return "Out of scanning page limit";
  case 0x2c85:
    return "Out of scanning length limit";
  case 0x2c86:
    return "Out of scanning resolution limit";
  case 0x2c87:
    return "Out of scanning line cycle limit";
  case 0x3d00:
    return "Invalid bits in identity message";
  case 0x2900:
    return "Unit attention";
  case 0x1b00:
    return "Sync data transfer error";
  case 0x4300:
    return "Message error";
  case 0x4900:
    return "Invalid message error";
  default:
    return NULL;
  }
}
```