user: What is the c source code of the assembly code below:

```asm
<scan_program>:
  endbr64
  mov    %rdi,%rcx
  mov    %esi,%edx
  lea    0x10(%rdi),%rdi
  mov    $0xffffffff,%r11d
  test   %esi,%esi
  je     L168
  lea    -0x1(%rsi),%r11d
  cmp    $0xe,%r11d
  jbe    L179
  shr    $0x4,%esi
  lea    0x10(%rcx),%rdi
  mov    %rcx,%rax
  movdqa D32(%rip),%xmm3
  sub    $0x1,%esi
  movdqa D66(%rip),%xmm7
  movdqa D56(%rip),%xmm9
  shl    $0x4,%rsi
  movdqa D69(%rip),%xmm6
  movdqa D65(%rip),%xmm8
  movdqa D10(%rip),%xmm5
  add    %rdi,%rsi
  nop
L9:
  movdqa %xmm3,%xmm2
  add    $0x10,%rax
  paddd  %xmm9,%xmm3
  movdqa %xmm2,%xmm4
  movdqa %xmm2,%xmm1
  movdqa %xmm2,%xmm0
  paddd  %xmm8,%xmm4
  punpcklwd %xmm4,%xmm1
  punpckhwd %xmm4,%xmm0
  movdqa %xmm1,%xmm4
  punpcklwd %xmm0,%xmm1
  punpckhwd %xmm0,%xmm4
  movdqa %xmm2,%xmm0
  paddd  %xmm6,%xmm2
  paddd  %xmm7,%xmm0
  punpcklwd %xmm4,%xmm1
  movdqa %xmm0,%xmm4
  punpcklwd %xmm2,%xmm0
  pand   %xmm5,%xmm1
  punpckhwd %xmm2,%xmm4
  movdqa %xmm0,%xmm2
  punpckhwd %xmm4,%xmm2
  punpcklwd %xmm4,%xmm0
  punpcklwd %xmm2,%xmm0
  pand   %xmm5,%xmm0
  packuswb %xmm0,%xmm1
  movups %xmm1,-0x10(%rax)
  cmp    %rax,%rsi
  jne    L9
  mov    %edx,%eax
  and    $0xfffffff0,%eax
  test   $0xf,%dl
  je     L168
L227:
  mov    %eax,%esi
  mov    %al,(%rcx,%rsi,1)
  lea    0x1(%rax),%esi
  cmp    %esi,%edx
  jbe    L168
  mov    %esi,%r8d
  mov    %sil,(%rcx,%r8,1)
  lea    0x2(%rax),%esi
  cmp    %esi,%edx
  jbe    L168
  mov    %esi,%r8d
  mov    %sil,(%rcx,%r8,1)
  lea    0x3(%rax),%esi
  cmp    %esi,%edx
  jbe    L168
  mov    %esi,%r8d
  mov    %sil,(%rcx,%r8,1)
  lea    0x4(%rax),%esi
  cmp    %esi,%edx
  jbe    L168
  mov    %esi,%r8d
  mov    %sil,(%rcx,%r8,1)
  lea    0x5(%rax),%esi
  cmp    %esi,%edx
  jbe    L168
  mov    %esi,%r8d
  mov    %sil,(%rcx,%r8,1)
  lea    0x6(%rax),%esi
  cmp    %esi,%edx
  jbe    L168
  mov    %esi,%r8d
  mov    %sil,(%rcx,%r8,1)
  lea    0x7(%rax),%esi
  cmp    %esi,%edx
  jbe    L168
  mov    %esi,%r8d
  mov    %sil,(%rcx,%r8,1)
  lea    0x8(%rax),%esi
  cmp    %esi,%edx
  jbe    L168
  mov    %esi,%r8d
  mov    %sil,(%rcx,%r8,1)
  lea    0x9(%rax),%esi
  cmp    %esi,%edx
  jbe    L168
  mov    %esi,%r8d
  mov    %sil,(%rcx,%r8,1)
  lea    0xa(%rax),%esi
  cmp    %esi,%edx
  jbe    L168
  mov    %esi,%r8d
  mov    %sil,(%rcx,%r8,1)
  lea    0xb(%rax),%esi
  cmp    %esi,%edx
  jbe    L168
  mov    %esi,%r8d
  mov    %sil,(%rcx,%r8,1)
  lea    0xc(%rax),%esi
  cmp    %esi,%edx
  jbe    L168
  mov    %esi,%r8d
  mov    %sil,(%rcx,%r8,1)
  lea    0xd(%rax),%esi
  cmp    %esi,%edx
  jbe    L168
  mov    %esi,%r8d
  add    $0xe,%eax
  mov    %sil,(%rcx,%r8,1)
  cmp    %eax,%edx
  jbe    L168
  mov    %eax,%esi
  mov    %al,(%rcx,%rsi,1)
  nopl   0x0(%rax)
L168:
  mov    %edx,%eax
  mov    %edx,%r10d
  mov    $0xa,%r9d
  xor    %esi,%esi
  shr    $0x4,%eax
  pxor   %xmm4,%xmm4
  pxor   %xmm2,%xmm2
  and    $0xfffffff0,%r10d
  sub    $0x1,%eax
  shl    $0x4,%rax
  add    %rax,%rdi
  cs nopw 0x0(%rax,%rax,1)
L299:
  test   %edx,%edx
  je     L97
  cmp    $0xe,%r11d
  jbe    L338
  mov    %rcx,%rax
  pxor   %xmm3,%xmm3
  nopl   0x0(%rax)
L8:
  movdqu (%rax),%xmm0
  add    $0x10,%rax
  movdqa %xmm0,%xmm1
  punpckhbw %xmm4,%xmm0
  punpcklbw %xmm4,%xmm1
  movdqa %xmm1,%xmm5
  punpckhwd %xmm2,%xmm1
  punpcklwd %xmm2,%xmm5
  paddd  %xmm5,%xmm1
  movdqa %xmm0,%xmm5
  punpckhwd %xmm2,%xmm0
  punpcklwd %xmm2,%xmm5
  paddd  %xmm5,%xmm0
  paddd  %xmm0,%xmm1
  paddd  %xmm1,%xmm3
  cmp    %rdi,%rax
  jne    L8
  movdqa %xmm3,%xmm0
  psrldq $0x8,%xmm0
  paddd  %xmm0,%xmm3
  movdqa %xmm3,%xmm0
  psrldq $0x4,%xmm0
  paddd  %xmm0,%xmm3
  movd   %xmm3,%eax
  add    %eax,%esi
  cmp    %r10d,%edx
  je     L97
  mov    %r10d,%eax
L0:
  mov    %eax,%r8d
  movzbl (%rcx,%r8,1),%r8d
  add    %r8d,%esi
  lea    0x1(%rax),%r8d
  cmp    %r8d,%edx
  jbe    L97
  movzbl (%rcx,%r8,1),%r8d
  add    %r8d,%esi
  lea    0x2(%rax),%r8d
  cmp    %r8d,%edx
  jbe    L97
  movzbl (%rcx,%r8,1),%r8d
  add    %r8d,%esi
  lea    0x3(%rax),%r8d
  cmp    %r8d,%edx
  jbe    L97
  movzbl (%rcx,%r8,1),%r8d
  add    %r8d,%esi
  lea    0x4(%rax),%r8d
  cmp    %r8d,%edx
  jbe    L97
  movzbl (%rcx,%r8,1),%r8d
  add    %r8d,%esi
  lea    0x5(%rax),%r8d
  cmp    %r8d,%edx
  jbe    L97
  movzbl (%rcx,%r8,1),%r8d
  add    %r8d,%esi
  lea    0x6(%rax),%r8d
  cmp    %r8d,%edx
  jbe    L97
  movzbl (%rcx,%r8,1),%r8d
  add    %r8d,%esi
  lea    0x7(%rax),%r8d
  cmp    %r8d,%edx
  jbe    L97
  movzbl (%rcx,%r8,1),%r8d
  add    %r8d,%esi
  lea    0x8(%rax),%r8d
  cmp    %r8d,%edx
  jbe    L97
  movzbl (%rcx,%r8,1),%r8d
  add    %r8d,%esi
  lea    0x9(%rax),%r8d
  cmp    %r8d,%edx
  jbe    L97
  movzbl (%rcx,%r8,1),%r8d
  add    %r8d,%esi
  lea    0xa(%rax),%r8d
  cmp    %r8d,%edx
  jbe    L97
  movzbl (%rcx,%r8,1),%r8d
  add    %r8d,%esi
  lea    0xb(%rax),%r8d
  cmp    %r8d,%edx
  jbe    L97
  movzbl (%rcx,%r8,1),%r8d
  add    %r8d,%esi
  lea    0xc(%rax),%r8d
  cmp    %r8d,%edx
  jbe    L97
  movzbl (%rcx,%r8,1),%r8d
  add    %r8d,%esi
  lea    0xd(%rax),%r8d
  cmp    %r8d,%edx
  jbe    L97
  movzbl (%rcx,%r8,1),%r8d
  add    $0xe,%eax
  add    %r8d,%esi
  cmp    %eax,%edx
  jbe    L97
  movzbl (%rcx,%rax,1),%eax
  add    %eax,%esi
  xchg   %ax,%ax
L97:
  sub    $0x1,%r9d
  jne    L299
  lea    D40(%rip),%rdi
  jmp    1050 <printf@plt>
L338:
  xor    %eax,%eax
  jmp    L0
L179:
  xor    %eax,%eax
  lea    0x10(%rcx),%rdi
  jmp    L227
```

tool_calls: name: read_data
arguments: tag: D32
type_infered: byte[16]
name: read_data
arguments: tag: D66
type_infered: byte[16]
name: read_data
arguments: tag: D56
type_infered: byte[16]
name: read_data
arguments: tag: D69
type_infered: byte[16]
name: read_data
arguments: tag: D65
type_infered: byte[16]
name: read_data
arguments: tag: D10
type_infered: byte[16]
name: read_data
arguments: tag: D40
type_infered: string

tool: {"D32": [0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x03,0x00,0x00,0x00]}

tool: {"D66": [0x08,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0x08,0x00,0x00,0x00]}

tool: {"D56": [0x10,0x00,0x00,0x00,0x10,0x00,0x00,0x00,0x10,0x00,0x00,0x00,0x10,0x00,0x00,0x00]}

tool: {"D69": [0x0c,0x00,0x00,0x00,0x0c,0x00,0x00,0x00,0x0c,0x00,0x00,0x00,0x0c,0x00,0x00,0x00]}

tool: {"D65": [0x04,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x04,0x00,0x00,0x00]}

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

tool: D40: scan result is %d


assistant: ```c
void scan_program(char *cdata, int length) {
  unsigned i, j;
  unsigned char *data = (unsigned char *)cdata;
  unsigned total = 0;
  for (i = 0; i < length; i++) {
    data[i] = i % 256;
  }
  for (j = 0; j < 10; j++) {
    for (i = 0; i < length; i++) {
      total += data[i];
    }
  }
  printf("scan result is %d\n", total);
}
```