user: 请将这段汇编代码片段转换成等效的C代码：

```asm
<EthProto2Str>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x20,%rsp
  mov    %edi,-0x14(%rbp)
  mov    %rsi,-0x20(%rbp)
  mov    -0x14(%rbp),%eax
  sar    $0x10,%eax
  and    $0xff,%eax
  mov    %eax,-0x8(%rbp)
  mov    -0x14(%rbp),%eax
  movzwl %ax,%eax
  mov    %eax,-0x4(%rbp)
  cmpl   $0x90,-0x8(%rbp)
  ja     L59
  mov    -0x8(%rbp),%eax
  lea    0x0(,%rax,4),%rdx
  lea    D3(%rip),%rax
  mov    (%rdx,%rax,1),%eax
  cltq
  lea    D3(%rip),%rdx
  add    %rdx,%rax
  notrack jmp *%rax
  lea    D14(%rip),%rax
  jmp    L29
  lea    D119(%rip),%rax
  jmp    L29
  lea    D272(%rip),%rax
  jmp    L29
  lea    D329(%rip),%rax
  jmp    L29
  lea    D82(%rip),%rax
  jmp    L29
  lea    D218(%rip),%rax
  jmp    L29
  lea    D136(%rip),%rax
  jmp    L29
  lea    D291(%rip),%rax
  jmp    L29
  lea    D357(%rip),%rax
  jmp    L29
  lea    D275(%rip),%rax
  jmp    L29
  lea    D156(%rip),%rax
  jmp    L29
  lea    D78(%rip),%rax
  jmp    L29
  lea    D219(%rip),%rax
  jmp    L29
  lea    D48(%rip),%rax
  jmp    L29
  lea    D147(%rip),%rax
  jmp    L29
  lea    D365(%rip),%rax
  jmp    L29
  lea    D61(%rip),%rax
  jmp    L29
  lea    D199(%rip),%rax
  jmp    L29
  lea    D146(%rip),%rax
  jmp    L29
  lea    D299(%rip),%rax
  jmp    L29
  lea    D215(%rip),%rax
  jmp    L29
  lea    D118(%rip),%rax
  jmp    L29
  lea    D218(%rip),%rax
  jmp    L29
  lea    D210(%rip),%rax
  jmp    L29
  lea    D39(%rip),%rax
  jmp    L29
  lea    D125(%rip),%rax
  jmp    L29
  lea    D69(%rip),%rax
  jmp    L29
L59:
  nop
  mov    -0x4(%rbp),%eax
  add    $0xffffff80,%eax
  cmp    $0x5,%eax
  ja     L300
  mov    %eax,%eax
  lea    0x0(,%rax,4),%rdx
  lea    D139(%rip),%rax
  mov    (%rdx,%rax,1),%eax
  cltq
  lea    D139(%rip),%rdx
  add    %rdx,%rax
  notrack jmp *%rax
  lea    D322(%rip),%rax
  jmp    L29
  lea    D353(%rip),%rax
  jmp    L29
  lea    D105(%rip),%rax
  jmp    L29
  lea    D233(%rip),%rax
  jmp    L29
  lea    D313(%rip),%rax
  jmp    L29
  lea    D360(%rip),%rax
  jmp    L29
L300:
  mov    -0x14(%rbp),%edx
  mov    -0x20(%rbp),%rax
  lea    D151(%rip),%rcx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <sprintf@plt>
  nop
  mov    -0x20(%rbp),%rax
L29:
  leave
  ret
```

tool_calls: name: disassemble_data
arguments: data_label: D14
type: string
name: disassemble_data
arguments: data_label: D119
type: string
name: disassemble_data
arguments: data_label: D272
type: string
name: disassemble_data
arguments: data_label: D329
type: string
name: disassemble_data
arguments: data_label: D82
type: string
name: disassemble_data
arguments: data_label: D218
type: string
name: disassemble_data
arguments: data_label: D136
type: string
name: disassemble_data
arguments: data_label: D291
type: string
name: disassemble_data
arguments: data_label: D357
type: string
name: disassemble_data
arguments: data_label: D275
type: string
name: disassemble_data
arguments: data_label: D156
type: string
name: disassemble_data
arguments: data_label: D78
type: string
name: disassemble_data
arguments: data_label: D219
type: string
name: disassemble_data
arguments: data_label: D48
type: string
name: disassemble_data
arguments: data_label: D147
type: string
name: disassemble_data
arguments: data_label: D365
type: string
name: disassemble_data
arguments: data_label: D61
type: string
name: disassemble_data
arguments: data_label: D199
type: string
name: disassemble_data
arguments: data_label: D146
type: string
name: disassemble_data
arguments: data_label: D299
type: string
name: disassemble_data
arguments: data_label: D215
type: string
name: disassemble_data
arguments: data_label: D118
type: string
name: disassemble_data
arguments: data_label: D210
type: string
name: disassemble_data
arguments: data_label: D39
type: string
name: disassemble_data
arguments: data_label: D125
type: string
name: disassemble_data
arguments: data_label: D69
type: string
name: disassemble_data
arguments: data_label: D322
type: string
name: disassemble_data
arguments: data_label: D353
type: string
name: disassemble_data
arguments: data_label: D105
type: string
name: disassemble_data
arguments: data_label: D233
type: string
name: disassemble_data
arguments: data_label: D313
type: string
name: disassemble_data
arguments: data_label: D360
type: string
name: disassemble_data
arguments: data_label: D151
type: string

tool: D14: FTPDATA

tool: D119: FTPCMD

tool: D272: SSH

tool: D329: TELNET

tool: D82: SMTP

tool: D218: DNS

tool: D136: BOOTPS

tool: D291: BOOTPC

tool: D357: HTTP

tool: D275: POP3

tool: D156: RPC

tool: D78: SFTP

tool: D219: NTP

tool: D48: NETBIOSNS

tool: D147: NETBIOSDGM

tool: D365: NETBIOSSSN

tool: D61: SNMP

tool: D199: BGP

tool: D146: IRC

tool: D299: IMAP3

tool: D215: HTTPS

tool: D118: VNC

tool: D210: QUIC

tool: D39: TFTP

tool: D125: UDP

tool: D69: TCP

tool: D322: IP

tool: D353: IPv6

tool: D105: ARP

tool: D233: RARP

tool: D313: PPPOE_Discover

tool: D360: PPPOE_SESSION

tool: D151: 0x%4x

assistant: ```c
const char *EthProto2Str(uint32_t proto, char *cache) {
  uint16_t ipflag = (proto >> 16) & 0xff;
  uint16_t ethproto = proto & 0xffff;
  switch (ipflag) {
  case (0x40 + 1):
    return "FTPDATA";
    ;
  case (0x40 + 2):
    return "FTPCMD";
    ;
  case (0x40 + 3):
    return "SSH";
    ;
  case (0x40 + 4):
    return "TELNET";
    ;
  case (0x40 + 5):
    return "SMTP";
    ;
  case (0x40 + 10):
    return "DNS";
    ;
  case (0x40 + 11):
    return "BOOTPS";
    ;
  case (0x40 + 12):
    return "BOOTPC";
    ;
  case (0x40 + 20):
    return "HTTP";
    ;
  case (0x40 + 21):
    return "POP3";
    ;
  case (0x40 + 22):
    return "RPC";
    ;
  case (0x40 + 23):
    return "SFTP";
    ;
  case (0x40 + 24):
    return "NTP";
    ;
  case (0x40 + 25):
    return "NETBIOSNS";
    ;
  case (0x40 + 26):
    return "NETBIOSDGM";
    ;
  case (0x40 + 27):
    return "NETBIOSSSN";
    ;
  case (0x40 + 30):
    return "SNMP";
    ;
  case (0x40 + 35):
    return "BGP";
    ;
  case (0x40 + 36):
    return "IRC";
    ;
  case (0x40 + 37):
    return "IMAP3";
    ;
  case (0x40 + 38):
    return "HTTPS";
    ;
  case (0x40 + 80):
    return "VNC";
    ;
  case (0x0 + 11):
    return "DNS";
  case (0x0 + 12):
    return "QUIC";
  case (0x0 + 10):
    return "TFTP";
  case (0x0 + 1):
    return "UDP";
  case (0x40):
    return "TCP";
  default:
    break;
  }
  switch (ethproto) {
  case ETH_P_IP:
    return "IP";
  case ETH_P_IPV6:
    return "IPv6";
  case ETH_P_ARP:
    return "ARP";
  case ETH_P_RARP:
    return "RARP";
  case ETH_P_PPP_DISC:
    return "PPPOE_Discover";
  case ETH_P_PPP_SES:
    return "PPPOE_SESSION";
  default:
    sprintf(cache, "0x%4x", proto);
    break;
  }
  return cache;
}
```