user: Please show me the C implementation that matches the assembly code listed below:

```asm
<test_intlist2str>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbx
  sub    $0xc8,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,-0x38(%rbp)
  xor    %eax,%eax
  lea    D26(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  lea    -0xc4(%rbp),%rax
  mov    %rax,%rsi
  lea    D76(%rip),%rax
  mov    %rax,%rdi
  call   <scanf@plt>
  mov    %rsp,%rax
  mov    %rax,%rbx
  mov    -0xc4(%rbp),%eax
  movslq %eax,%rdx
  sub    $0x1,%rdx
  mov    %rdx,-0xb0(%rbp)
  movslq %eax,%rdx
  mov    %rdx,-0xe0(%rbp)
  movq   $0x0,-0xd8(%rbp)
  movslq %eax,%rdx
  mov    %rdx,-0xf0(%rbp)
  movq   $0x0,-0xe8(%rbp)
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    $0x10,%eax
  sub    $0x1,%rax
  add    %rdx,%rax
  mov    $0x10,%esi
  mov    $0x0,%edx
  div    %rsi
  imul   $0x10,%rax,%rax
  mov    %rax,%rcx
  and    $0xfffffffffffff000,%rcx
  mov    %rsp,%rdx
  sub    %rcx,%rdx
L40:
  cmp    %rdx,%rsp
  je     L116
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  jmp    L40
L116:
  mov    %rax,%rdx
  and    $0xfff,%edx
  sub    %rdx,%rsp
  mov    %rax,%rdx
  and    $0xfff,%edx
  test   %rdx,%rdx
  je     L56
  and    $0xfff,%eax
  sub    $0x8,%rax
  add    %rsp,%rax
  orq    $0x0,(%rax)
L56:
  mov    %rsp,%rax
  add    $0x3,%rax
  shr    $0x2,%rax
  shl    $0x2,%rax
  mov    %rax,-0xa8(%rbp)
  movl   $0x0,-0xc0(%rbp)
  jmp    L100
L4:
  mov    -0xc0(%rbp),%eax
  mov    %eax,%esi
  lea    D87(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    -0xc0(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0xa8(%rbp),%rax
  add    %rdx,%rax
  mov    %rax,%rsi
  lea    D76(%rip),%rax
  mov    %rax,%rdi
  call   <scanf@plt>
  addl   $0x1,-0xc0(%rbp)
L100:
  mov    -0xc4(%rbp),%eax
  cmp    %eax,-0xc0(%rbp)
  jl     L4
  mov    -0xc4(%rbp),%eax
  mov    %eax,%esi
  lea    D42(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  movl   $0x0,-0xc0(%rbp)
  jmp    L49
L85:
  mov    -0xa8(%rbp),%rax
  mov    -0xc0(%rbp),%edx
  movslq %edx,%rdx
  mov    (%rax,%rdx,4),%eax
  mov    %eax,%esi
  lea    D62(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  addl   $0x1,-0xc0(%rbp)
L49:
  mov    -0xc4(%rbp),%eax
  cmp    %eax,-0xc0(%rbp)
  jl     L85
  mov    $0xa,%edi
  call   <putchar@plt>
  mov    -0xc4(%rbp),%eax
  lea    -0x90(%rbp),%rdx
  mov    -0xa8(%rbp),%rcx
  mov    %rcx,%rsi
  mov    %eax,%edi
  call   <intlist2str@plt>
  mov    %eax,-0xb8(%rbp)
  mov    %rbx,%rsp
  lea    -0x90(%rbp),%rax
  mov    %rax,%rsi
  lea    D22(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    %rsp,%rax
  mov    %rax,%rbx
  lea    -0x90(%rbp),%rax
  mov    %rax,%rdi
  call   <itemcount@plt>
  mov    %eax,-0xb4(%rbp)
  mov    -0xb4(%rbp),%eax
  movslq %eax,%rdx
  sub    $0x1,%rdx
  mov    %rdx,-0xa0(%rbp)
  movslq %eax,%rdx
  mov    %rdx,%r14
  mov    $0x0,%r15d
  movslq %eax,%rdx
  mov    %rdx,%r12
  mov    $0x0,%r13d
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    $0x10,%eax
  sub    $0x1,%rax
  add    %rdx,%rax
  mov    $0x10,%esi
  mov    $0x0,%edx
  div    %rsi
  imul   $0x10,%rax,%rax
  mov    %rax,%rcx
  and    $0xfffffffffffff000,%rcx
  mov    %rsp,%rdx
  sub    %rcx,%rdx
L31:
  cmp    %rdx,%rsp
  je     L75
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  jmp    L31
L75:
  mov    %rax,%rdx
  and    $0xfff,%edx
  sub    %rdx,%rsp
  mov    %rax,%rdx
  and    $0xfff,%edx
  test   %rdx,%rdx
  je     L94
  and    $0xfff,%eax
  sub    $0x8,%rax
  add    %rsp,%rax
  orq    $0x0,(%rax)
L94:
  mov    %rsp,%rax
  add    $0x3,%rax
  shr    $0x2,%rax
  shl    $0x2,%rax
  mov    %rax,-0x98(%rbp)
  mov    -0xb4(%rbp),%eax
  mov    %eax,%esi
  lea    D71(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    -0xc4(%rbp),%eax
  mov    -0x98(%rbp),%rdx
  lea    -0x90(%rbp),%rcx
  mov    %rcx,%rsi
  mov    %eax,%edi
  call   <str2intlist@plt>
  mov    -0xb4(%rbp),%eax
  mov    %eax,%esi
  lea    D4(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  movl   $0x0,-0xbc(%rbp)
  jmp    L102
L120:
  mov    -0x98(%rbp),%rax
  mov    -0xbc(%rbp),%edx
  movslq %edx,%rdx
  mov    (%rax,%rdx,4),%eax
  mov    %eax,%esi
  lea    D62(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  addl   $0x1,-0xbc(%rbp)
L102:
  mov    -0xbc(%rbp),%eax
  cmp    -0xb4(%rbp),%eax
  jl     L120
  mov    $0xa,%edi
  call   <putchar@plt>
  mov    %rbx,%rsp
  nop
  mov    -0x38(%rbp),%rax
  sub    %fs:0x28,%rax
  je     L71
  call   <__stack_chk_fail@plt>
L71:
  lea    -0x28(%rbp),%rsp
  pop    %rbx
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  pop    %rbp
  ret
```

tool_calls: name: unpack_data
arguments: label: D26
data_type: string
name: unpack_data
arguments: label: D76
data_type: string
name: unpack_data
arguments: label: D87
data_type: string
name: unpack_data
arguments: label: D42
data_type: string
name: unpack_data
arguments: label: D62
data_type: string
name: unpack_data
arguments: label: D22
data_type: string
name: unpack_data
arguments: label: D71
data_type: string
name: unpack_data
arguments: label: D4
data_type: string

tool: D26: give the number of integers : 

tool: D76: %d

tool: D87: -> give element %d : 

tool: D42: The %d numbers : 

tool: D62:  %d

tool: D22: The string : %s


tool: D71: number of items : %d


tool: D4: the %d numbers :

assistant: ```c
void test_intlist2str(void) {
  int i, n, nbc;
  char s[80];
  printf("give the number of integers : ");
  scanf("%d", &n);
  {
    int data[n];
    for (i = 0; i < n; i++) {
      printf("-> give element %d : ", i);
      scanf("%d", &data[i]);
    }
    printf("The %d numbers : ", n);
    for (i = 0; i < n; i++)
      printf(" %d", data[i]);
    printf("\n");
    nbc = intlist2str(n, data, s);
  }
  printf("The string : %s\n", s);
  {
    int ict = itemcount(s);
    int nbr[ict];
    int i;
    printf("number of items : %d\n", ict);
    str2intlist(n, s, nbr);
    printf("the %d numbers :", ict);
    for (i = 0; i < ict; i++)
      printf(" %d", nbr[i]);
    printf("\n");
  }
}
```