user: 请从给定的汇编指令推导出C源代码：

```asm
<ints>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x20,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  movl   $0x0,-0x18(%rbp)
  movl   $0x14,-0x14(%rbp)
  lea    D41(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  lea    D45(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  mov    -0x14(%rbp),%eax
  cltq
  shl    $0x2,%eax
  mov    %eax,%edi
  call   <malloc@plt>
  mov    %rax,-0x10(%rbp)
  cmpq   $0x0,-0x10(%rbp)
  setne  %al
  movzbl %al,%eax
  mov    %eax,%edi
  call   <assert@plt>
  jmp    L1
L21:
  addl   $0x1,-0x18(%rbp)
  mov    -0x18(%rbp),%eax
  cmp    -0x14(%rbp),%eax
  jle    L15
  addl   $0x14,-0x14(%rbp)
  mov    -0x14(%rbp),%eax
  cltq
  shl    $0x2,%eax
  mov    %eax,%edx
  mov    -0x10(%rbp),%rax
  mov    %edx,%esi
  mov    %rax,%rdi
  call   <realloc@plt>
  mov    %rax,-0x10(%rbp)
  cmpq   $0x0,-0x10(%rbp)
  setne  %al
  movzbl %al,%eax
  mov    %eax,%edi
  call   <assert@plt>
L15:
  mov    -0x18(%rbp),%eax
  cltq
  shl    $0x2,%rax
  lea    -0x4(%rax),%rdx
  mov    -0x10(%rbp),%rax
  add    %rax,%rdx
  mov    -0x1c(%rbp),%eax
  mov    %eax,(%rdx)
L1:
  lea    -0x1c(%rbp),%rax
  mov    %rax,%rsi
  lea    D30(%rip),%rax
  mov    %rax,%rdi
  call   <scanf@plt>
  cmp    $0x1,%eax
  je     L21
  mov    -0x18(%rbp),%eax
  cmp    -0x14(%rbp),%eax
  jge    L61
  mov    -0x18(%rbp),%eax
  cltq
  shl    $0x2,%eax
  mov    %eax,%edx
  mov    -0x10(%rbp),%rax
  mov    %edx,%esi
  mov    %rax,%rdi
  call   <realloc@plt>
  mov    %rax,-0x10(%rbp)
  cmpq   $0x0,-0x10(%rbp)
  setne  %al
  movzbl %al,%eax
  mov    %eax,%edi
  call   <assert@plt>
L61:
  mov    -0x18(%rbp),%eax
  mov    %eax,%esi
  lea    D56(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  movl   $0x0,-0x1c(%rbp)
  jmp    L13
L28:
  mov    -0x10(%rbp),%rax
  lea    0x4(%rax),%rdx
  mov    %rdx,-0x10(%rbp)
  mov    (%rax),%eax
  mov    %eax,%esi
  lea    D49(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
L13:
  mov    -0x1c(%rbp),%eax
  lea    0x1(%rax),%edx
  mov    %edx,-0x1c(%rbp)
  cmp    %eax,-0x18(%rbp)
  jg     L28
  lea    D14(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  nop
  mov    -0x8(%rbp),%rax
  sub    %fs:0x28,%rax
  je     L69
  call   <__stack_chk_fail@plt>
L69:
  leave
  ret
```

tool_calls: name: parse_data
arguments: data_label: D41
datatype: string
name: parse_data
arguments: data_label: D45
datatype: string
name: parse_data
arguments: data_label: D30
datatype: string
name: parse_data
arguments: data_label: D56
datatype: string
name: parse_data
arguments: data_label: D49
datatype: string
name: parse_data
arguments: data_label: D14
datatype: string

tool: D41: Enter some numbers, separated by spaces,

tool: D45: to store in a dinamically allocated array:

tool: D30: %d

tool: D56: So you had %d numbers:


tool: D49: %d, 

tool: D14: .

assistant: ```c
void ints(void) {
  int *array;
  int value;
  int count = 0;
  int size = 20;
  puts("Enter some numbers, separated by spaces,");
  puts("to store in a dinamically allocated array:");
  array = (int *)malloc(size * sizeof(int));
  assert(array != NULL);
  while (scanf("%d", &value) == 1) {
    count += 1;
    if (count > size) {
      size += 20;
      array = realloc(array, size * sizeof(int));
      assert(array != NULL);
    }
    array[count - 1] = value;
  }
  if (count < size) {
    array = realloc(array, count * sizeof(int));
    assert(array != NULL);
  }
  printf("So you had %d numbers:\n", count);
  value = 0;
  while (value++ < count)
    printf("%d, ", *array++);
  printf("\b\b.\n");
}
```