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

```asm
<print_transport_type>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x30,%rsp
  mov    %rdi,-0x28(%rbp)
  mov    -0x28(%rbp),%rax
  mov    0x378(%rax),%eax
  mov    %eax,-0x14(%rbp)
  mov    -0x28(%rbp),%rax
  mov    0x37c(%rax),%eax
  mov    %eax,-0x10(%rbp)
  movl   $0x0,-0xc(%rbp)
  cmpl   $0x0,-0x14(%rbp)
  je     L81
  cmpl   $0xffff,-0x14(%rbp)
  jne    L124
L81:
  mov    -0xc(%rbp),%eax
  jmp    L116
L124:
  lea    D77(%rip),%rax
  mov    %rax,%rsi
  lea    D42(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    -0x14(%rbp),%eax
  sar    $0xc,%eax
  mov    %eax,-0x8(%rbp)
  mov    -0x14(%rbp),%eax
  and    $0xfff,%eax
  mov    %eax,-0x4(%rbp)
  mov    -0x8(%rbp),%eax
  mov    %eax,-0xc(%rbp)
  cmpl   $0x0,-0x8(%rbp)
  je     L104
  cmpl   $0x1,-0x8(%rbp)
  je     L52
  jmp    L44
L104:
  lea    D78(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    -0x4(%rbp),%eax
  and    $0x1,%eax
  test   %eax,%eax
  je     L20
  lea    D1(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  jmp    L20
L52:
  lea    D7(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    -0x4(%rbp),%eax
  and    $0x2f,%eax
  test   %eax,%eax
  je     L169
  mov    -0x4(%rbp),%eax
  and    $0x1,%eax
  test   %eax,%eax
  je     L26
  lea    D127(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
L26:
  mov    -0x4(%rbp),%eax
  and    $0x2,%eax
  test   %eax,%eax
  je     L159
  lea    D126(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
L159:
  mov    -0x4(%rbp),%eax
  and    $0x4,%eax
  test   %eax,%eax
  je     L2
  lea    D91(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
L2:
  mov    -0x4(%rbp),%eax
  and    $0x8,%eax
  test   %eax,%eax
  je     L210
  lea    D124(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
L210:
  mov    -0x4(%rbp),%eax
  and    $0x10,%eax
  test   %eax,%eax
  je     L84
  lea    D125(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
L84:
  mov    -0x4(%rbp),%eax
  and    $0x20,%eax
  test   %eax,%eax
  je     L169
  lea    D16(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  jmp    L169
L44:
  mov    -0x14(%rbp),%eax
  mov    %eax,%esi
  lea    D70(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  jmp    L194
L20:
  nop
  jmp    L194
L169:
  nop
L194:
  cmpl   $0x0,-0x10(%rbp)
  je     L6
  cmpl   $0xffff,-0x10(%rbp)
  je     L6
  lea    D140(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  cmpl   $0x21,-0x10(%rbp)
  jne    L100
  lea    D109(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  jmp    L6
L100:
  mov    -0x10(%rbp),%eax
  mov    %eax,%esi
  lea    D70(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
L6:
  mov    $0xa,%edi
  call   <putchar@plt>
  mov    -0xc(%rbp),%eax
L116:
  leave
  ret
```

tool_calls: name: read_data
arguments: tag: D77
type: string
name: read_data
arguments: tag: D42
type: string
name: read_data
arguments: tag: D78
type: string
name: read_data
arguments: tag: D1
type: string
name: read_data
arguments: tag: D7
type: string
name: read_data
arguments: tag: D127
type: string
name: read_data
arguments: tag: D126
type: string
name: read_data
arguments: tag: D91
type: string
name: read_data
arguments: tag: D124
type: string
name: read_data
arguments: tag: D125
type: string
name: read_data
arguments: tag: D16
type: string
name: read_data
arguments: tag: D70
type: string
name: read_data
arguments: tag: D140
type: string
name: read_data
arguments: tag: D109
type: string

tool: D77: Transport:

tool: D42: 	%-20s

tool: D78: Parallel

tool: D1: , ATA8-APT

tool: D7: Serial

tool: D127: , ATA8-AST

tool: D126: , SATA 1.0a

tool: D91: , SATA II Extensions

tool: D124: , SATA Rev 2.5

tool: D125: , SATA Rev 2.6

tool: D16: , SATA Rev 3.0

tool: D70: 0x%04x

tool: D140: ; Revision: 

tool: D109: ATA8-AST T13 Project D1697 Revision 0b

assistant: ```c
int print_transport_type(__u16 val[]) {
  __u16 major = val[222], minor = val[223];
  unsigned int ttype, subtype, transport = 0;
  if (major == 0x0000 || major == 0xffff) {
    return transport;
  }
  printf("\t%-20s", "Transport:");
  ttype = major >> 12;
  subtype = major & 0xfff;
  transport = ttype;
  switch (ttype) {
  case 0:
    printf("Parallel");
    if (subtype & 1)
      printf(", ATA8-APT");
    break;
  case 1:
    printf("Serial");
    if (subtype & 0x2f) {
      if (subtype & (1 << 0))
        printf(", ATA8-AST");
      if (subtype & (1 << 1))
        printf(", SATA 1.0a");
      if (subtype & (1 << 2))
        printf(", SATA II Extensions");
      if (subtype & (1 << 3))
        printf(", SATA Rev 2.5");
      if (subtype & (1 << 4))
        printf(", SATA Rev 2.6");
      if (subtype & (1 << 5))
        printf(", SATA Rev 3.0");
    }
    break;
  default:
    printf("0x%04x", major);
    break;
  }
  if (minor != 0x0000 && minor != 0xffff) {
    printf("; Revision: ");
    switch (minor) {
    case 0x21:
      printf("ATA8-AST T13 Project D1697 Revision 0b");
      break;
    default:
      printf("0x%04x", minor);
    }
  }
  putchar('\n');
  return transport;
}
```