user: 请显示与下面列出的汇编代码相匹配的C语言实现：

```asm
<dump_disk_ext>:
  endbr64
  test   %esi,%esi
  jle    L12
  push   %rbp
  push   %rbx
  mov    %rdi,%rbx
  sub    $0x8,%rsp
  mov    (%rdi),%eax
  cmp    $0x1,%eax
  je     L28
  sub    $0x2,%eax
  cmp    $0x1,%eax
  ja     L17
  cmp    $0x2,%esi
  jle    L7
  mov    0x4(%rdi),%eax
  lea    D48(%rip),%rdx
  lea    D54(%rip),%rcx
  lea    D134(%rip),%rbp
  lea    D46(%rip),%rsi
  test   $0x10,%al
  lea    D97(%rip),%rdi
  cmove  %rdx,%rcx
  test   $0x8,%al
  lea    D123(%rip),%rdx
  cmove  %rbp,%rdx
  test   $0x4,%al
  lea    D5(%rip),%rax
  cmove  %rax,%rsi
  xor    %eax,%eax
  call   <printf@plt>
  mov    0x8(%rbx),%eax
  test   $0x7f,%al
  je     L17
  test   $0x40,%al
  lea    D32(%rip),%r10
  lea    D68(%rip),%rdi
  cmove  %rbp,%r10
  test   $0x20,%al
  lea    D88(%rip),%r9
  cmove  %rbp,%rdi
  lea    D57(%rip),%r8
  test   $0x10,%al
  cmove  %rbp,%r9
  lea    D161(%rip),%rcx
  test   $0x8,%al
  push   %r10
  cmove  %rbp,%r8
  lea    D56(%rip),%rdx
  test   $0x4,%al
  push   %rdi
  cmove  %rbp,%rcx
  lea    D154(%rip),%rsi
  test   $0x2,%al
  cmove  %rbp,%rdx
  lea    D12(%rip),%rdi
  test   $0x1,%al
  cmove  %rbp,%rsi
  xor    %eax,%eax
  call   <printf@plt>
  pop    %rax
  pop    %rdx
L17:
  add    $0x8,%rsp
  pop    %rbx
  pop    %rbp
  ret
  xchg   %ax,%ax
L28:
  cmp    $0x1,%esi
  je     L7
  testb  $0x1,0x4(%rdi)
  lea    D128(%rip),%rax
  lea    D132(%rip),%rsi
  cmove  %rax,%rsi
  add    $0x8,%rsp
  lea    D94(%rip),%rdi
  xor    %eax,%eax
  pop    %rbx
  pop    %rbp
  jmp    1070 <printf@plt>
  nop
L7:
  add    $0x8,%rsp
  lea    D17(%rip),%rdi
  pop    %rbx
  pop    %rbp
  jmp    1060 <puts@plt>
  nopw   0x0(%rax,%rax,1)
L12:
  ret
```

tool_calls: name: parse_data
arguments: data_tag: D48
type_guessed: string
name: parse_data
arguments: data_tag: D54
type_guessed: string
name: parse_data
arguments: data_tag: D134
type_guessed: string
name: parse_data
arguments: data_tag: D46
type_guessed: string
name: parse_data
arguments: data_tag: D97
type_guessed: string
name: parse_data
arguments: data_tag: D123
type_guessed: string
name: parse_data
arguments: data_tag: D5
type_guessed: string
name: parse_data
arguments: data_tag: D32
type_guessed: string
name: parse_data
arguments: data_tag: D68
type_guessed: string
name: parse_data
arguments: data_tag: D88
type_guessed: string
name: parse_data
arguments: data_tag: D57
type_guessed: string
name: parse_data
arguments: data_tag: D161
type_guessed: string
name: parse_data
arguments: data_tag: D56
type_guessed: string
name: parse_data
arguments: data_tag: D154
type_guessed: string
name: parse_data
arguments: data_tag: D12
type_guessed: string
name: parse_data
arguments: data_tag: D128
type_guessed: string
name: parse_data
arguments: data_tag: D132
type_guessed: string
name: parse_data
arguments: data_tag: D94
type_guessed: string
name: parse_data
arguments: data_tag: D17
type_guessed: string

tool: D48: Single

tool: D54: Dual

tool: 

tool: D46: Silicon

tool: D97: 	Disk features: %s, %s%s


tool: D123: Unique, 

tool: D5: Rotating

tool: D32: Iois16

tool: D68: Index, 

tool: D88: Reg inhibit, 

tool: D57: Low power, 

tool: D161: Idle, 

tool: D56: Standby, 

tool: D154: Sleep, 

tool: D12: 		%s%s%s%s%s%s%s


tool: D128: Undefined

tool: D132: IDE

tool: D94: 	Disk interface: %s


tool: D17: 	Wrong length for fixed disk extension tuple

assistant: ```c
void dump_disk_ext(u_char *p, int len) {
  if (len < 1)
    return;
  switch (p[0]) {
  case 1:
    if (len < 2)
      goto err;
    printf("\tDisk interface: %s\n", (p[1] & 1) ? "IDE" : "Undefined");
    break;
  case 2:
  case 3:
    if (len < 3)
      goto err;
    printf("\tDisk features: %s, %s%s\n", (p[1] & 0x04) ? "Silicon" : "Rotating", (p[1] & 0x08) ? "Unique, " : "", (p[1] & 0x10) ? "Dual" : "Single");
    if (p[2] & 0x7f)
      printf("\t\t%s%s%s%s%s%s%s\n", (p[2] & 0x01) ? "Sleep, " : "", (p[2] & 0x02) ? "Standby, " : "", (p[2] & 0x04) ? "Idle, " : "", (p[2] & 0x08) ? "Low power, " : "", (p[2] & 0x10) ? "Reg inhibit, " : "", (p[2] & 0x20) ? "Index, " : "", (p[2] & 0x40) ? "Iois16" : "");
    break;
  err:
    printf("\tWrong length for fixed disk extension tuple\n");
    return;
  }
}
```