user: Demonstrate the C code that generates the assembly output below:

```asm
<ts_nit_add_frequency_list_descriptor>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  mov    %edx,%r13d
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x18,%rsp
  mov    %ecx,0x8(%rsp)
  test   %r9d,%r9d
  je     L55
  mov    %r9d,%ebx
  cmp    $0x3f,%r9d
  jg     L55
  mov    %r8,%r14
  lea    0x0(,%r9,4),%r8d
  mov    %rdi,%rbp
  mov    %esi,%r12d
  lea    0x3(%r8),%r15d
  mov    $0x1,%edi
  mov    %r8d,0xc(%rsp)
  mov    %r15d,%esi
  call   <calloc@plt>
  mov    0xc(%rsp),%r8d
  mov    0x8(%rsp),%edx
  movl   $0x62,(%rax)
  mov    %rax,%rcx
  add    $0x1,%r8d
  or     $0xfc,%dl
  mov    %r8d,0x4(%rax)
  mov    %edx,0x8(%rax)
  test   %ebx,%ebx
  jle    L27
  movslq %ebx,%rsi
  lea    0xc(%rax),%rax
  mov    %ebx,%edx
  mov    %rsi,%rdi
  lea    (%r14,%rsi,4),%rsi
  shl    $0x4,%rdi
  lea    0xc(%rcx,%rdi,1),%rdi
  cmp    %rdi,%r14
  setae  %dil
  cmp    %rsi,%rax
  setae  %sil
  or     %sil,%dil
  je     L117
  cmp    $0x1,%ebx
  je     L117
  lea    -0x1(%rbx),%esi
  cmp    $0x2,%esi
  jbe    L80
  mov    %ebx,%esi
  movdqa D9(%rip),%xmm5
  mov    %r14,%rdx
  shr    $0x2,%esi
  sub    $0x1,%esi
  shl    $0x4,%rsi
  lea    0x10(%r14,%rsi,1),%rsi
  nop
L4:
  movdqu (%rdx),%xmm2
  add    $0x10,%rdx
  add    $0x40,%rax
  movdqa %xmm2,%xmm0
  movdqa %xmm2,%xmm1
  movdqa %xmm2,%xmm4
  psrad  $0x18,%xmm0
  psrld  $0x10,%xmm1
  pand   %xmm5,%xmm2
  psrld  $0x8,%xmm4
  pand   %xmm5,%xmm1
  movdqa %xmm0,%xmm3
  pand   %xmm5,%xmm4
  punpckldq %xmm4,%xmm3
  punpckhdq %xmm4,%xmm0
  movdqa %xmm1,%xmm4
  punpckldq %xmm2,%xmm4
  punpckhdq %xmm2,%xmm1
  movdqa %xmm3,%xmm2
  punpckldq %xmm4,%xmm2
  punpckhdq %xmm4,%xmm3
  movups %xmm2,-0x40(%rax)
  movdqa %xmm0,%xmm2
  punpckhdq %xmm1,%xmm0
  punpckldq %xmm1,%xmm2
  movups %xmm3,-0x30(%rax)
  movups %xmm2,-0x20(%rax)
  movups %xmm0,-0x10(%rax)
  cmp    %rdx,%rsi
  jne    L4
  mov    %ebx,%edi
  and    $0xfffffffc,%edi
  mov    %edi,%eax
  lea    0x3(,%rdi,4),%esi
  cmp    %edi,%ebx
  je     L27
  sub    %edi,%ebx
  mov    %ebx,%edx
  cmp    $0x1,%ebx
  je     L70
L17:
  movq   D9(%rip),%xmm3
  mov    %edi,%r8d
  movq   (%r14,%r8,4),%xmm2
  mov    %r8,%rdi
  shl    $0x4,%rdi
  movdqa %xmm2,%xmm0
  movdqa %xmm2,%xmm1
  movdqa %xmm2,%xmm4
  psrad  $0x18,%xmm0
  psrld  $0x10,%xmm1
  pand   %xmm3,%xmm2
  psrld  $0x8,%xmm4
  pand   %xmm3,%xmm1
  lea    0xc(%rcx,%rdi,1),%rdi
  pand   %xmm3,%xmm4
  movdqa %xmm0,%xmm3
  punpckldq %xmm4,%xmm3
  punpckldq %xmm4,%xmm0
  movdqa %xmm1,%xmm4
  punpckldq %xmm2,%xmm4
  punpckldq %xmm2,%xmm1
  movdqa %xmm3,%xmm2
  pshufd $0xe,%xmm0,%xmm0
  pshufd $0xe,%xmm1,%xmm1
  punpckldq %xmm4,%xmm2
  movq   %xmm2,(%rdi)
  punpckldq %xmm4,%xmm3
  movdqa %xmm0,%xmm2
  punpckldq %xmm1,%xmm0
  pshufd $0xe,%xmm3,%xmm3
  punpckldq %xmm1,%xmm2
  pshufd $0xe,%xmm0,%xmm0
  movq   %xmm3,0x8(%rdi)
  movq   %xmm2,0x10(%rdi)
  movq   %xmm0,0x18(%rdi)
  mov    %edx,%edi
  and    $0xfffffffe,%edi
  add    %edi,%eax
  lea    (%rsi,%rdi,4),%esi
  cmp    %edi,%edx
  je     L27
L70:
  cltq
  movslq %esi,%rsi
  mov    (%r14,%rax,4),%eax
  mov    %eax,%ebx
  mov    %eax,%edx
  sar    $0x18,%ebx
  shr    $0x10,%edx
  movd   %ebx,%xmm0
  movzbl %dl,%edx
  movzbl %ah,%ebx
  movzbl %al,%eax
  movd   %ebx,%xmm1
  movd   %eax,%xmm6
  movd   %edx,%xmm7
  punpckldq %xmm6,%xmm1
  punpckldq %xmm7,%xmm0
  punpcklqdq %xmm1,%xmm0
  movups %xmm0,(%rcx,%rsi,4)
L27:
  add    $0x18,%rsp
  mov    %r15d,%r8d
  mov    %r13d,%edx
  mov    %r12d,%esi
  pop    %rbx
  mov    %rbp,%rdi
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  jmp    1070 <ts_nit_add_stream@plt>
  nop
L55:
  add    $0x18,%rsp
  xor    %eax,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   0x0(%rax)
L117:
  lea    -0x1(%rbx),%eax
  mov    $0x3,%edx
  lea    0x7(,%rax,4),%rdi
  nopl   0x0(%rax,%rax,1)
L32:
  mov    -0x3(%r14,%rdx,1),%eax
  mov    %eax,%ebx
  mov    %eax,%esi
  sar    $0x18,%ebx
  shr    $0x10,%esi
  movd   %ebx,%xmm0
  movzbl %sil,%esi
  movzbl %ah,%ebx
  movzbl %al,%eax
  movd   %ebx,%xmm1
  movd   %eax,%xmm6
  movd   %esi,%xmm7
  punpckldq %xmm6,%xmm1
  punpckldq %xmm7,%xmm0
  punpcklqdq %xmm1,%xmm0
  movups %xmm0,(%rcx,%rdx,4)
  add    $0x4,%rdx
  cmp    %rdi,%rdx
  jne    L32
  jmp    L27
L80:
  xor    %edi,%edi
  mov    $0x3,%esi
  xor    %eax,%eax
  jmp    L17
```

tool_calls: name: read_data
arguments: data_label: D9
type_infered: byte[16]

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

assistant: ```c
int ts_nit_add_frequency_list_descriptor(struct ts_nit *nit, uint16_t ts_id, uint16_t org_net_id, uint8_t freq_type, uint32_t *freqs, uint8_t num_freqs) {
  uint8_t i;
  if (!num_freqs || num_freqs > 63)
    return 0;
  int desc_size = 2 + 1 + num_freqs * 4;
  uint8_t *desc = calloc(1, desc_size);
  int dpos = 0;
  desc[dpos + 0] = 0x62;
  desc[dpos + 1] = desc_size - 2;
  desc[dpos + 2] = 0xfc | freq_type;
  dpos += 3;
  for (i = 0; i < num_freqs; i++) {
    uint32_t freq = freqs[i];
    desc[dpos + 0] = ((freq & ~0x00ffffff) >> 24);
    desc[dpos + 1] = ((freq & ~0xff00ffff) >> 16);
    desc[dpos + 2] = ((freq & ~0xffff00ff) >> 8);
    desc[dpos + 3] = (freq & ~0xffffff00);
    dpos += 4;
  }
  return ts_nit_add_stream(nit, ts_id, org_net_id, desc, desc_size);
}
```