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

```asm
<udp_sum_calc>:
  endbr64
  mov    %rdi,%r9
  mov    %ecx,%edi
  movzwl %cx,%r10d
  mov    %rsi,%r8
  and    $0x1,%edi
  mov    %rdx,%rsi
  add    %r10d,%edi
  test   $0x1,%cl
  je     L203
  movzwl %cx,%ecx
  movb   $0x0,(%rdx,%rcx,1)
L90:
  lea    -0x1(%rdi),%ecx
  mov    $0x1,%eax
  shr    %ecx
  add    $0x1,%ecx
  test   %edi,%edi
  cmovle %eax,%ecx
  cmp    $0x1e,%edi
  jle    L121
  mov    %ecx,%edx
  movdqa D7(%rip),%xmm5
  pxor   %xmm2,%xmm2
  mov    %rsi,%rax
  shr    $0x4,%edx
  pxor   %xmm4,%xmm4
  pxor   %xmm3,%xmm3
  sub    $0x1,%edx
  shl    $0x5,%rdx
  lea    0x20(%rsi,%rdx,1),%rdx
  nopl   0x0(%rax)
L177:
  movdqu (%rax),%xmm0
  movdqu 0x10(%rax),%xmm1
  add    $0x20,%rax
  movdqu -0x20(%rax),%xmm6
  pand   %xmm5,%xmm1
  pand   %xmm5,%xmm0
  packuswb %xmm1,%xmm0
  movdqu -0x10(%rax),%xmm1
  psrlw  $0x8,%xmm6
  psrlw  $0x8,%xmm1
  packuswb %xmm1,%xmm6
  movdqa %xmm0,%xmm1
  punpckhbw %xmm4,%xmm0
  movdqa %xmm6,%xmm7
  punpcklbw %xmm4,%xmm1
  punpckhbw %xmm4,%xmm6
  psllw  $0x8,%xmm1
  psllw  $0x8,%xmm0
  punpcklbw %xmm4,%xmm7
  paddw  %xmm7,%xmm1
  paddw  %xmm6,%xmm0
  movdqa %xmm1,%xmm6
  punpcklwd %xmm3,%xmm1
  punpckhwd %xmm3,%xmm6
  paddd  %xmm6,%xmm1
  movdqa %xmm0,%xmm6
  punpcklwd %xmm3,%xmm0
  punpckhwd %xmm3,%xmm6
  paddd  %xmm6,%xmm0
  paddd  %xmm0,%xmm1
  paddd  %xmm1,%xmm2
  cmp    %rax,%rdx
  jne    L177
  movdqa %xmm2,%xmm0
  mov    %ecx,%r11d
  psrldq $0x8,%xmm0
  and    $0xfffffff0,%r11d
  paddd  %xmm0,%xmm2
  lea    (%r11,%r11,1),%eax
  movdqa %xmm2,%xmm0
  psrldq $0x4,%xmm0
  paddd  %xmm0,%xmm2
  movd   %xmm2,%edx
  cmp    %ecx,%r11d
  je     L82
L88:
  movslq %eax,%rcx
  movzbl (%rsi,%rcx,1),%r11d
  movzbl 0x1(%rsi,%rcx,1),%ecx
  shl    $0x8,%r11d
  add    %r11d,%ecx
  movzwl %cx,%ecx
  add    %ecx,%edx
  lea    0x2(%rax),%ecx
  cmp    %edi,%ecx
  jge    L82
  movslq %ecx,%rcx
  movzbl (%rsi,%rcx,1),%r11d
  movzbl 0x1(%rsi,%rcx,1),%ecx
  shl    $0x8,%r11d
  add    %r11d,%ecx
  movzwl %cx,%ecx
  add    %ecx,%edx
  lea    0x4(%rax),%ecx
  cmp    %edi,%ecx
  jge    L82
  movslq %ecx,%rcx
  movzbl 0x1(%rsi,%rcx,1),%r11d
  movzbl (%rsi,%rcx,1),%ecx
  shl    $0x8,%ecx
  add    %r11d,%ecx
  movzwl %cx,%ecx
  add    %ecx,%edx
  lea    0x6(%rax),%ecx
  cmp    %edi,%ecx
  jge    L82
  movslq %ecx,%rcx
  movzbl 0x1(%rsi,%rcx,1),%r11d
  movzbl (%rsi,%rcx,1),%ecx
  shl    $0x8,%ecx
  add    %r11d,%ecx
  movzwl %cx,%ecx
  add    %ecx,%edx
  lea    0x8(%rax),%ecx
  cmp    %edi,%ecx
  jge    L82
  movslq %ecx,%rcx
  movzbl 0x1(%rsi,%rcx,1),%r11d
  movzbl (%rsi,%rcx,1),%ecx
  shl    $0x8,%ecx
  add    %r11d,%ecx
  movzwl %cx,%ecx
  add    %ecx,%edx
  lea    0xa(%rax),%ecx
  cmp    %edi,%ecx
  jge    L82
  movslq %ecx,%rcx
  movzbl 0x1(%rsi,%rcx,1),%r11d
  movzbl (%rsi,%rcx,1),%ecx
  shl    $0x8,%ecx
  add    %r11d,%ecx
  movzwl %cx,%ecx
  add    %ecx,%edx
  lea    0xc(%rax),%ecx
  cmp    %edi,%ecx
  jge    L82
  movslq %ecx,%rcx
  movzbl 0x1(%rsi,%rcx,1),%r11d
  movzbl (%rsi,%rcx,1),%ecx
  shl    $0x8,%ecx
  add    %r11d,%ecx
  movzwl %cx,%ecx
  add    %ecx,%edx
  lea    0xe(%rax),%ecx
  cmp    %edi,%ecx
  jge    L82
  movslq %ecx,%rcx
  movzbl 0x1(%rsi,%rcx,1),%r11d
  movzbl (%rsi,%rcx,1),%ecx
  shl    $0x8,%ecx
  add    %r11d,%ecx
  movzwl %cx,%ecx
  add    %ecx,%edx
  lea    0x10(%rax),%ecx
  cmp    %edi,%ecx
  jge    L82
  movslq %ecx,%rcx
  movzbl (%rsi,%rcx,1),%r11d
  movzbl 0x1(%rsi,%rcx,1),%ecx
  shl    $0x8,%r11d
  add    %r11d,%ecx
  movzwl %cx,%ecx
  add    %ecx,%edx
  lea    0x12(%rax),%ecx
  cmp    %edi,%ecx
  jge    L82
  movslq %ecx,%rcx
  movzbl (%rsi,%rcx,1),%r11d
  movzbl 0x1(%rsi,%rcx,1),%ecx
  shl    $0x8,%r11d
  add    %r11d,%ecx
  movzwl %cx,%ecx
  add    %ecx,%edx
  lea    0x14(%rax),%ecx
  cmp    %ecx,%edi
  jle    L82
  movslq %ecx,%rcx
  movzbl (%rsi,%rcx,1),%r11d
  movzbl 0x1(%rsi,%rcx,1),%ecx
  shl    $0x8,%r11d
  add    %r11d,%ecx
  movzwl %cx,%ecx
  add    %ecx,%edx
  lea    0x16(%rax),%ecx
  cmp    %ecx,%edi
  jle    L82
  movslq %ecx,%rcx
  movzbl (%rsi,%rcx,1),%r11d
  movzbl 0x1(%rsi,%rcx,1),%ecx
  shl    $0x8,%r11d
  add    %r11d,%ecx
  movzwl %cx,%ecx
  add    %ecx,%edx
  lea    0x18(%rax),%ecx
  cmp    %ecx,%edi
  jle    L82
  movslq %ecx,%rcx
  movzbl (%rsi,%rcx,1),%r11d
  movzbl 0x1(%rsi,%rcx,1),%ecx
  shl    $0x8,%r11d
  add    %r11d,%ecx
  movzwl %cx,%ecx
  add    %ecx,%edx
  lea    0x1a(%rax),%ecx
  cmp    %ecx,%edi
  jle    L82
  movslq %ecx,%rcx
  add    $0x1c,%eax
  movzbl (%rsi,%rcx,1),%r11d
  movzbl 0x1(%rsi,%rcx,1),%ecx
  shl    $0x8,%r11d
  add    %r11d,%ecx
  movzwl %cx,%ecx
  add    %ecx,%edx
  cmp    %eax,%edi
  jle    L82
  cltq
  movzbl 0x1(%rsi,%rax,1),%ecx
  movzbl (%rsi,%rax,1),%eax
  shl    $0x8,%eax
  add    %ecx,%eax
  movzwl %ax,%eax
  add    %eax,%edx
  nopl   (%rax)
L82:
  movzbl (%r9),%ecx
  movzbl 0x1(%r9),%eax
  movzbl 0x2(%r9),%esi
  shl    $0x8,%ecx
  add    %ecx,%eax
  movzbl 0x3(%r9),%ecx
  shl    $0x8,%esi
  movzwl %ax,%eax
  add    %esi,%ecx
  movzbl (%r8),%esi
  movzwl %cx,%ecx
  add    %ecx,%eax
  movzbl 0x1(%r8),%ecx
  shl    $0x8,%esi
  add    %esi,%ecx
  movzbl 0x2(%r8),%esi
  movzwl %cx,%ecx
  add    %ecx,%eax
  movzbl 0x3(%r8),%ecx
  shl    $0x8,%esi
  add    %esi,%ecx
  movzwl %cx,%ecx
  add    %ecx,%eax
  lea    0x11(%r10,%rax,1),%eax
  add    %edx,%eax
  mov    %eax,%edx
  shr    $0x10,%edx
  je     L23
  nopw   0x0(%rax,%rax,1)
L60:
  movzwl %ax,%eax
  add    %edx,%eax
  mov    %eax,%edx
  shr    $0x10,%edx
  jne    L60
L23:
  not    %eax
  mov    $0xffffffff,%edx
  test   %ax,%ax
  cmove  %edx,%eax
  ret
  nopw   0x0(%rax,%rax,1)
L203:
  xor    %edx,%edx
  test   %edi,%edi
  jne    L90
  jmp    L82
L121:
  xor    %eax,%eax
  xor    %edx,%edx
  jmp    L88
```

tool_calls: name: parse_data
arguments: data_tag: D7
type_infered: byte[16]

tool: {"D7": [0xff,0x00,0xff,0x00,0xff,0x00,0xff,0x00,0xff,0x00,0xff,0x00,0xff,0x00,0xff,0x00]}

assistant: ```c
unsigned short udp_sum_calc(unsigned char *src_addr, unsigned char *dst_addr, unsigned char *data, unsigned short len) {
  unsigned short prot_udp = 17;
  unsigned short padd = 0;
  unsigned short word16;
  unsigned int sum = 0;
  int i;
  padd = (len % 2);
  if (padd) {
    data[len] = 0;
  }
  for (i = 0; i < len + padd; i += 2) {
    word16 = ((data[i] << 8) & 0xFF00) + (data[i + 1] & 0xFF);
    sum += word16;
  }
  for (i = 0; i < 4; i += 2) {
    word16 = ((src_addr[i] << 8) & 0xFF00) + (src_addr[i + 1] & 0xFF);
    sum += word16;
  }
  for (i = 0; i < 4; i += 2) {
    word16 = ((dst_addr[i] << 8) & 0xFF00) + (dst_addr[i + 1] & 0xFF);
    sum += word16;
  }
  sum += prot_udp + len;
  while (sum >> 16)
    sum = (sum & 0xFFFF) + (sum >> 16);
  sum = ~sum;
  if ((unsigned short)sum == 0)
    sum = 0xFFFF;
  return (unsigned short)sum;
}
```