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

```asm
<encode_data>:
  endbr64
  push   %r15
  push   %r14
  mov    %ecx,%r14d
  push   %r13
  mov    %esi,%r13d
  push   %r12
  mov    %rdi,%r12
  push   %rbp
  mov    %rdx,%rbp
  push   %rbx
  lea    0x0(,%rcx,8),%ebx
  mov    %ebx,%edi
  sub    $0x28,%rsp
  mov    %r8d,0x1c(%rsp)
  call   <malloc@plt>
  cmp    %r13d,%ebx
  jne    L131
  xor    %esi,%esi
  mov    %r13d,%edx
  mov    %rax,%rdi
  mov    %rax,%r15
  call   <memset@plt>
  test   %r14d,%r14d
  jle    L182
  movslq %r14d,%rax
  lea    (%r15,%rax,8),%rdx
  cmp    %rdx,%rbp
  setae  %dl
  add    %rbp,%rax
  cmp    %rax,%r15
  setae  %al
  or     %al,%dl
  je     L222
  lea    -0x1(%r14),%eax
  cmp    $0xe,%eax
  jbe    L222
  mov    %r14d,%ecx
  mov    %r15,%rax
  mov    %rbp,%rdx
  movdqa D116(%rip),%xmm0
  movdqa D35(%rip),%xmm12
  shr    $0x4,%ecx
  movdqa D69(%rip),%xmm15
  shl    $0x7,%rcx
  add    %r15,%rcx
  nopl   0x0(%rax,%rax,1)
L238:
  movdqu (%rax),%xmm8
  movdqu 0x10(%rax),%xmm1
  movdqa %xmm0,%xmm10
  movdqa %xmm0,%xmm13
  movdqu 0x10(%rax),%xmm2
  movdqu 0x20(%rax),%xmm7
  movdqa %xmm0,%xmm11
  sub    $0xffffffffffffff80,%rax
  pand   %xmm0,%xmm1
  pand   %xmm0,%xmm8
  movdqu -0x60(%rax),%xmm3
  movdqu -0x40(%rax),%xmm9
  packuswb %xmm1,%xmm8
  movdqu -0x80(%rax),%xmm1
  psrlw  $0x8,%xmm2
  pand   %xmm0,%xmm7
  psrlw  $0x8,%xmm3
  pand   %xmm0,%xmm9
  movdqu -0x40(%rax),%xmm4
  movdqu -0x20(%rax),%xmm5
  psrlw  $0x8,%xmm1
  movdqu -0x10(%rax),%xmm6
  add    $0x10,%rdx
  packuswb %xmm2,%xmm1
  movdqu -0x50(%rax),%xmm2
  psrlw  $0x8,%xmm4
  pand   %xmm0,%xmm5
  psrlw  $0x8,%xmm6
  pand   %xmm0,%xmm2
  packuswb %xmm2,%xmm7
  movdqu -0x50(%rax),%xmm2
  pand   %xmm7,%xmm10
  psrlw  $0x8,%xmm7
  psrlw  $0x8,%xmm2
  packuswb %xmm2,%xmm3
  movdqu -0x30(%rax),%xmm2
  pand   %xmm0,%xmm2
  packuswb %xmm2,%xmm9
  movdqu -0x30(%rax),%xmm2
  pand   %xmm9,%xmm13
  psrlw  $0x8,%xmm9
  psrlw  $0x8,%xmm2
  packuswb %xmm2,%xmm4
  movdqu -0x10(%rax),%xmm2
  pand   %xmm4,%xmm11
  psrlw  $0x8,%xmm4
  pand   %xmm0,%xmm2
  packuswb %xmm2,%xmm5
  movdqu -0x20(%rax),%xmm2
  psrlw  $0x8,%xmm2
  packuswb %xmm6,%xmm2
  movdqa %xmm0,%xmm6
  pand   %xmm8,%xmm6
  psrlw  $0x8,%xmm8
  movdqa %xmm8,%xmm14
  packuswb %xmm10,%xmm6
  movdqu -0x10(%rdx),%xmm10
  packuswb %xmm7,%xmm14
  movdqa %xmm0,%xmm7
  pand   %xmm5,%xmm7
  psrlw  $0x8,%xmm5
  movdqa %xmm14,%xmm8
  movaps %xmm14,(%rsp)
  packuswb %xmm5,%xmm9
  packuswb %xmm7,%xmm13
  movdqa %xmm0,%xmm5
  movdqa %xmm0,%xmm7
  pand   %xmm1,%xmm5
  pand   %xmm0,%xmm8
  pand   %xmm3,%xmm7
  psrlw  $0x8,%xmm1
  psrlw  $0x8,%xmm3
  packuswb %xmm7,%xmm5
  movdqa %xmm0,%xmm7
  packuswb %xmm3,%xmm1
  movdqa %xmm0,%xmm3
  pand   %xmm2,%xmm3
  psrlw  $0x8,%xmm2
  packuswb %xmm3,%xmm11
  packuswb %xmm2,%xmm4
  movdqa %xmm0,%xmm3
  movdqa %xmm0,%xmm2
  pand   %xmm13,%xmm3
  pand   %xmm11,%xmm7
  psrlw  $0x8,%xmm11
  psrlw  $0x8,%xmm13
  pand   %xmm6,%xmm2
  packuswb %xmm3,%xmm2
  psrlw  $0x8,%xmm6
  movdqa %xmm10,%xmm3
  psrlw  $0x7,%xmm3
  pand   %xmm12,%xmm2
  packuswb %xmm13,%xmm6
  pand   %xmm15,%xmm3
  movdqa %xmm10,%xmm13
  pand   %xmm12,%xmm6
  por    %xmm3,%xmm2
  psrlw  $0x3,%xmm13
  movdqa %xmm0,%xmm3
  pand   D76(%rip),%xmm13
  pand   %xmm5,%xmm3
  packuswb %xmm7,%xmm3
  psrlw  $0x8,%xmm5
  movdqa %xmm10,%xmm7
  psrlw  $0x6,%xmm7
  pand   %xmm12,%xmm3
  packuswb %xmm11,%xmm5
  movdqa %xmm10,%xmm11
  pand   %xmm12,%xmm5
  pand   %xmm15,%xmm13
  pand   D23(%rip),%xmm7
  psrlw  $0x2,%xmm11
  por    %xmm13,%xmm6
  pand   D113(%rip),%xmm11
  movdqa %xmm9,%xmm13
  pand   %xmm15,%xmm7
  psrlw  $0x8,%xmm13
  por    %xmm7,%xmm3
  movdqa %xmm0,%xmm7
  pand   %xmm15,%xmm11
  pand   %xmm9,%xmm7
  por    %xmm11,%xmm5
  movdqa (%rsp),%xmm11
  packuswb %xmm7,%xmm8
  movdqa %xmm10,%xmm7
  psrlw  $0x5,%xmm7
  psrlw  $0x8,%xmm11
  pand   %xmm12,%xmm8
  pand   D123(%rip),%xmm7
  movdqa %xmm11,%xmm9
  movdqa %xmm10,%xmm11
  psrlw  $0x1,%xmm11
  packuswb %xmm13,%xmm9
  pand   D60(%rip),%xmm11
  pand   %xmm15,%xmm7
  pand   %xmm12,%xmm9
  por    %xmm7,%xmm8
  movdqa %xmm0,%xmm7
  pand   %xmm15,%xmm11
  pand   %xmm1,%xmm7
  psrlw  $0x8,%xmm1
  por    %xmm11,%xmm9
  movdqa %xmm7,%xmm14
  movdqa %xmm0,%xmm7
  pand   %xmm4,%xmm7
  psrlw  $0x8,%xmm4
  packuswb %xmm7,%xmm14
  movdqa %xmm10,%xmm7
  packuswb %xmm4,%xmm1
  psrlw  $0x4,%xmm7
  movdqa %xmm10,%xmm4
  pand   %xmm12,%xmm1
  pand   D3(%rip),%xmm7
  pand   %xmm15,%xmm4
  pand   %xmm12,%xmm14
  por    %xmm4,%xmm1
  movdqa %xmm2,%xmm4
  punpckhbw %xmm6,%xmm2
  pand   %xmm15,%xmm7
  movdqa %xmm1,%xmm10
  punpcklbw %xmm6,%xmm4
  por    %xmm14,%xmm7
  movdqa %xmm3,%xmm6
  movdqa %xmm8,%xmm1
  punpcklbw %xmm9,%xmm1
  punpckhbw %xmm9,%xmm8
  punpcklbw %xmm5,%xmm6
  punpckhbw %xmm5,%xmm3
  movdqa %xmm7,%xmm9
  movdqa %xmm4,%xmm5
  punpckhbw %xmm10,%xmm7
  punpcklbw %xmm10,%xmm9
  punpcklbw %xmm1,%xmm5
  punpckhbw %xmm1,%xmm4
  movdqa %xmm6,%xmm10
  movdqa %xmm2,%xmm1
  punpcklbw %xmm8,%xmm1
  punpckhbw %xmm8,%xmm2
  punpcklbw %xmm9,%xmm10
  movdqa %xmm3,%xmm8
  punpckhbw %xmm9,%xmm6
  punpckhbw %xmm7,%xmm3
  punpcklbw %xmm7,%xmm8
  movdqa %xmm5,%xmm7
  punpckhbw %xmm10,%xmm5
  movups %xmm5,-0x70(%rax)
  movdqa %xmm4,%xmm5
  punpckhbw %xmm6,%xmm4
  punpcklbw %xmm10,%xmm7
  movups %xmm4,-0x50(%rax)
  movdqa %xmm1,%xmm4
  punpckhbw %xmm8,%xmm1
  punpcklbw %xmm6,%xmm5
  movups %xmm1,-0x30(%rax)
  movdqa %xmm2,%xmm1
  punpcklbw %xmm8,%xmm4
  punpckhbw %xmm3,%xmm2
  punpcklbw %xmm3,%xmm1
  movups %xmm7,-0x80(%rax)
  movups %xmm5,-0x60(%rax)
  movups %xmm4,-0x40(%rax)
  movups %xmm1,-0x20(%rax)
  movups %xmm2,-0x10(%rax)
  cmp    %rax,%rcx
  jne    L238
  mov    %r14d,%esi
  and    $0xfffffff0,%esi
  lea    0x0(,%rsi,8),%eax
  cmp    %esi,%r14d
  je     L182
  mov    %esi,%edx
  cltq
  add    %rbp,%rdx
  add    %r15,%rax
  sub    %edx,%esi
  nopl   (%rax)
L170:
  movzbl (%rdx),%edi
  movzbl (%rax),%ecx
  add    $0x1,%rdx
  add    $0x8,%rax
  sar    $0x7,%edi
  and    $0xfffffffe,%ecx
  or     %edi,%ecx
  movzbl -0x7(%rax),%edi
  mov    %cl,-0x8(%rax)
  movzbl -0x1(%rdx),%ecx
  and    $0xfffffffe,%edi
  sar    $0x6,%ecx
  and    $0x1,%ecx
  or     %edi,%ecx
  movzbl -0x6(%rax),%edi
  mov    %cl,-0x7(%rax)
  movzbl -0x1(%rdx),%ecx
  and    $0xfffffffe,%edi
  sar    $0x5,%ecx
  and    $0x1,%ecx
  or     %edi,%ecx
  movzbl -0x5(%rax),%edi
  mov    %cl,-0x6(%rax)
  movzbl -0x1(%rdx),%ecx
  and    $0xfffffffe,%edi
  sar    $0x4,%ecx
  and    $0x1,%ecx
  or     %edi,%ecx
  movzbl -0x4(%rax),%edi
  mov    %cl,-0x5(%rax)
  movzbl -0x1(%rdx),%ecx
  and    $0xfffffffe,%edi
  sar    $0x3,%ecx
  and    $0x1,%ecx
  or     %edi,%ecx
  movzbl -0x3(%rax),%edi
  mov    %cl,-0x4(%rax)
  movzbl -0x1(%rdx),%ecx
  and    $0xfffffffe,%edi
  sar    $0x2,%ecx
  and    $0x1,%ecx
  or     %edi,%ecx
  movzbl -0x2(%rax),%edi
  mov    %cl,-0x3(%rax)
  movzbl -0x1(%rdx),%ecx
  and    $0xfffffffe,%edi
  sar    %ecx
  and    $0x1,%ecx
  or     %edi,%ecx
  mov    %cl,-0x2(%rax)
  movzbl -0x1(%rax),%ecx
  movzbl -0x1(%rdx),%edi
  and    $0xfffffffe,%ecx
  and    $0x1,%edi
  or     %edi,%ecx
  mov    %cl,-0x1(%rax)
  lea    (%rsi,%rdx,1),%ecx
  cmp    %ecx,%r14d
  jg     L170
L182:
  cmpl   $0x1,0x1c(%rsp)
  je     L117
L225:
  test   %r13d,%r13d
  jle    L273
  lea    0x1(%r15),%rsi
  mov    %r12,%rdx
  lea    -0x1(%r13),%eax
  mov    %r13d,%ecx
  sub    %rsi,%rdx
  cmp    $0xe,%rdx
  jbe    L278
  cmp    $0x6,%eax
  jbe    L278
  cmp    $0xe,%eax
  jbe    L188
  movdqa D35(%rip),%xmm12
  mov    %r13d,%edx
  xor    %eax,%eax
  movdqa D69(%rip),%xmm15
  shr    $0x4,%edx
  shl    $0x4,%rdx
  nopw   0x0(%rax,%rax,1)
L81:
  movdqu (%r15,%rax,1),%xmm0
  movdqu (%r12,%rax,1),%xmm1
  pand   %xmm15,%xmm0
  pand   %xmm12,%xmm1
  por    %xmm1,%xmm0
  movups %xmm0,(%r12,%rax,1)
  add    $0x10,%rax
  cmp    %rdx,%rax
  jne    L81
  mov    %r13d,%edx
  and    $0xfffffff0,%edx
  mov    %edx,%eax
  cmp    %edx,%r13d
  je     L273
  mov    %r13d,%ecx
  sub    %edx,%ecx
  lea    -0x1(%rcx),%esi
  cmp    $0x6,%esi
  jbe    L271
L248:
  movq   (%r15,%rdx,1),%xmm0
  lea    (%r12,%rdx,1),%rsi
  mov    %ecx,%edx
  movq   D69(%rip),%xmm1
  movq   D35(%rip),%xmm2
  and    $0xfffffff8,%edx
  pand   %xmm1,%xmm0
  movq   (%rsi),%xmm1
  add    %edx,%eax
  pand   %xmm2,%xmm1
  por    %xmm1,%xmm0
  movq   %xmm0,(%rsi)
  cmp    %ecx,%edx
  je     L273
L271:
  movslq %eax,%rdx
  lea    (%r12,%rdx,1),%rsi
  movzbl (%r15,%rdx,1),%edx
  movzbl (%rsi),%ecx
  and    $0x1,%edx
  and    $0xfffffffe,%ecx
  or     %ecx,%edx
  mov    %dl,(%rsi)
  lea    0x1(%rax),%edx
  cmp    %edx,%r13d
  jle    L273
  movslq %edx,%rdx
  lea    (%r12,%rdx,1),%rsi
  movzbl (%r15,%rdx,1),%edx
  movzbl (%rsi),%ecx
  and    $0x1,%edx
  and    $0xfffffffe,%ecx
  or     %ecx,%edx
  mov    %dl,(%rsi)
  lea    0x2(%rax),%edx
  cmp    %edx,%r13d
  jle    L273
  movslq %edx,%rdx
  lea    (%r12,%rdx,1),%rsi
  movzbl (%r15,%rdx,1),%edx
  movzbl (%rsi),%ecx
  and    $0x1,%edx
  and    $0xfffffffe,%ecx
  or     %ecx,%edx
  mov    %dl,(%rsi)
  lea    0x3(%rax),%edx
  cmp    %edx,%r13d
  jle    L273
  movslq %edx,%rdx
  lea    (%r12,%rdx,1),%rsi
  movzbl (%r15,%rdx,1),%edx
  movzbl (%rsi),%ecx
  and    $0x1,%edx
  and    $0xfffffffe,%ecx
  or     %ecx,%edx
  mov    %dl,(%rsi)
  lea    0x4(%rax),%edx
  cmp    %edx,%r13d
  jle    L273
  movslq %edx,%rdx
  lea    (%r12,%rdx,1),%rsi
  movzbl (%r15,%rdx,1),%edx
  movzbl (%rsi),%ecx
  and    $0x1,%edx
  and    $0xfffffffe,%ecx
  or     %ecx,%edx
  mov    %dl,(%rsi)
  lea    0x5(%rax),%edx
  cmp    %edx,%r13d
  jle    L273
  movslq %edx,%rdx
  add    $0x6,%eax
  lea    (%r12,%rdx,1),%rsi
  movzbl (%r15,%rdx,1),%edx
  movzbl (%rsi),%ecx
  and    $0x1,%edx
  and    $0xfffffffe,%ecx
  or     %ecx,%edx
  mov    %dl,(%rsi)
  cmp    %eax,%r13d
  jle    L273
  cltq
  add    %rax,%r12
  movzbl (%r15,%rax,1),%eax
  movzbl (%r12),%edx
  and    $0x1,%eax
  and    $0xfffffffe,%edx
  or     %edx,%eax
  mov    %al,(%r12)
L273:
  mov    %r15,%rdi
  call   <free@plt>
  xor    %eax,%eax
L111:
  add    $0x28,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L117:
  mov    %r13d,%esi
  mov    %r15,%rdi
  call   <prng_array_shuffle@plt>
  jmp    L225
L222:
  mov    %r14d,%r14d
  mov    %r15,%rax
  lea    (%r15,%r14,8),%rcx
  nop
L68:
  movzbl 0x0(%rbp),%esi
  movzbl (%rax),%edx
  add    $0x8,%rax
  add    $0x1,%rbp
  sar    $0x7,%esi
  and    $0xfffffffe,%edx
  or     %esi,%edx
  movzbl -0x7(%rax),%esi
  mov    %dl,-0x8(%rax)
  movzbl -0x1(%rbp),%edx
  and    $0xfffffffe,%esi
  sar    $0x6,%edx
  and    $0x1,%edx
  or     %esi,%edx
  movzbl -0x6(%rax),%esi
  mov    %dl,-0x7(%rax)
  movzbl -0x1(%rbp),%edx
  and    $0xfffffffe,%esi
  sar    $0x5,%edx
  and    $0x1,%edx
  or     %esi,%edx
  movzbl -0x5(%rax),%esi
  mov    %dl,-0x6(%rax)
  movzbl -0x1(%rbp),%edx
  and    $0xfffffffe,%esi
  sar    $0x4,%edx
  and    $0x1,%edx
  or     %esi,%edx
  movzbl -0x4(%rax),%esi
  mov    %dl,-0x5(%rax)
  movzbl -0x1(%rbp),%edx
  and    $0xfffffffe,%esi
  sar    $0x3,%edx
  and    $0x1,%edx
  or     %esi,%edx
  movzbl -0x3(%rax),%esi
  mov    %dl,-0x4(%rax)
  movzbl -0x1(%rbp),%edx
  and    $0xfffffffe,%esi
  sar    $0x2,%edx
  and    $0x1,%edx
  or     %esi,%edx
  movzbl -0x2(%rax),%esi
  mov    %dl,-0x3(%rax)
  movzbl -0x1(%rbp),%edx
  and    $0xfffffffe,%esi
  sar    %edx
  and    $0x1,%edx
  or     %esi,%edx
  mov    %dl,-0x2(%rax)
  movzbl -0x1(%rax),%edx
  movzbl -0x1(%rbp),%esi
  and    $0xfffffffe,%edx
  and    $0x1,%esi
  or     %esi,%edx
  mov    %dl,-0x1(%rax)
  cmp    %rcx,%rax
  jne    L68
  jmp    L182
L278:
  mov    %r13d,%r13d
  xor    %eax,%eax
  nopl   0x0(%rax,%rax,1)
L91:
  movzbl (%r15,%rax,1),%edx
  movzbl (%r12,%rax,1),%ecx
  and    $0x1,%edx
  and    $0xfffffffe,%ecx
  or     %ecx,%edx
  mov    %dl,(%r12,%rax,1)
  add    $0x1,%rax
  cmp    %rax,%r13
  jne    L91
  jmp    L273
L188:
  xor    %eax,%eax
  xor    %edx,%edx
  jmp    L248
L131:
  mov    $0xffffffff,%eax
  jmp    L111
```

tool_calls: name: unpack_data
arguments: label: D116
datatype: byte[16]
name: unpack_data
arguments: label: D35
datatype: byte[16]
name: unpack_data
arguments: label: D69
datatype: byte[16]
name: unpack_data
arguments: label: D76
datatype: byte[16]
name: unpack_data
arguments: label: D23
datatype: byte[16]
name: unpack_data
arguments: label: D113
datatype: byte[16]
name: unpack_data
arguments: label: D123
datatype: byte[16]
name: unpack_data
arguments: label: D60
datatype: byte[16]
name: unpack_data
arguments: label: D3
datatype: byte[16]

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

tool: {"D35": [0xfe,0xfe,0xfe,0xfe,0xfe,0xfe,0xfe,0xfe,0xfe,0xfe,0xfe,0xfe,0xfe,0xfe,0xfe,0xfe]}

tool: {"D69": [0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01]}

tool: {"D76": [0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,0x1f]}

tool: {"D23": [0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03]}

tool: {"D113": [0x3f,0x3f,0x3f,0x3f,0x3f,0x3f,0x3f,0x3f,0x3f,0x3f,0x3f,0x3f,0x3f,0x3f,0x3f,0x3f]}

tool: {"D123": [0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07]}

tool: {"D60": [0x7f,0x7f,0x7f,0x7f,0x7f,0x7f,0x7f,0x7f,0x7f,0x7f,0x7f,0x7f,0x7f,0x7f,0x7f,0x7f]}

tool: {"D3": [0x0f,0x0f,0x0f,0x0f,0x0f,0x0f,0x0f,0x0f,0x0f,0x0f,0x0f,0x0f,0x0f,0x0f,0x0f,0x0f]}

assistant: ```c
int encode_data(unsigned char *dst, int dst_len, unsigned char *src, int src_len, int rand) {
  int i, b, x, srcb_len = src_len << 3;
  unsigned char *srcb = malloc(srcb_len * sizeof *srcb);
  if (dst_len != (src_len << 3))
    return (-1);
  x = 0;
  memset(srcb, 0, srcb_len);
  for (i = 0; i < src_len; i++) {
    for (b = 0; b < 8; b++) {
      srcb[x] = ((srcb[x] & ~1) | (((src[i] >> (7 - b)) & 1) & 1));
      x++;
    }
  }
  if (rand == 1)
    prng_array_shuffle(srcb, (unsigned int)srcb_len);
  for (i = 0; i < dst_len; i++) {
    dst[i] = ((dst[i] & ~1) | (((srcb[i] >> (7 - 7)) & 1) & 1));
  }
  free(srcb);
  return (0);
}
```