user: 请将这段汇编代码片段转换成等效的C代码：

```asm
<main>:
  endbr64
  push   %r15
  mov    $0x1,%esi
  mov    $0x400,%edi
  push   %r14
  lea    D21(%rip),%r14
  push   %r13
  push   %r12
  lea    D10(%rip),%r12
  push   %rbp
  push   %rbx
  xor    %ebx,%ebx
  sub    $0x18,%rsp
  call   <calloc@plt>
  lea    D105(%rip),%rdi
  mov    %rax,%rbp
  call   <puts@plt>
  xor    %eax,%eax
  call   <getms@plt>
  mov    %rax,%r13
  nopw   0x0(%rax,%rax,1)
L49:
  mov    %rbx,%rdx
  mov    %r12,%r8
  mov    $0x4d2,%ecx
  mov    %r14,%rsi
  mov    %rbp,%rdi
  xor    %eax,%eax
  add    $0x1,%rbx
  call   <sprintf@plt>
  cmp    $0x989680,%rbx
  jne    L49
  xor    %eax,%eax
  lea    D71(%rip),%r12
  call   <getms@plt>
  sub    %r13,%rax
  lea    D9(%rip),%r13
  mov    %rax,%rsi
  mov    %r13,%rdi
  call   <printf@plt>
  lea    D79(%rip),%rdi
  call   <puts@plt>
  xor    %eax,%eax
  call   <getms@plt>
  mov    %rax,%r15
  xchg   %ax,%ax
L54:
  mov    %r12,%rsi
  mov    %rbp,%rdi
  call   <strcpy@plt>
  sub    $0x1,%rbx
  jne    L54
  xor    %eax,%eax
  call   <getms@plt>
  mov    %r13,%rdi
  sub    %r15,%rax
  lea    D10(%rip),%r15
  mov    %rax,%rsi
  call   <printf@plt>
  lea    D64(%rip),%rdi
  call   <puts@plt>
  xor    %eax,%eax
  call   <getms@plt>
  mov    %rax,0x8(%rsp)
  nopl   (%rax)
L37:
  mov    %rbx,%rdx
  mov    %r15,%r8
  mov    $0x4d2,%ecx
  mov    %r14,%rsi
  mov    %rbp,%rdi
  xor    %eax,%eax
  add    $0x1,%rbx
  call   <sprintf@plt>
  cmp    $0x989680,%rbx
  jne    L37
  xor    %eax,%eax
  call   <getms@plt>
  sub    0x8(%rsp),%rax
  mov    %r13,%rdi
  mov    %rax,%rsi
  call   <printf@plt>
  lea    D30(%rip),%rdi
  call   <puts@plt>
  xor    %eax,%eax
  call   <getms@plt>
  movabs $0x3837363534333231,%rsi
  movabs $0x6665646362613039,%rdi
  movabs $0x6e6d6c6b6a696867,%rdx
  mov    %rax,%r14
  mov    $0x989680,%eax
  nopl   (%rax)
L46:
  mov    $0x706f,%r8d
  mov    %rsi,0x0(%rbp)
  mov    %rdi,0x8(%rbp)
  mov    %rdx,0x10(%rbp)
  mov    %r8w,0x18(%rbp)
  movb   $0x0,0x1a(%rbp)
  sub    $0x1,%rax
  jne    L46
  xor    %eax,%eax
  call   <getms@plt>
  mov    %r13,%rdi
  sub    %r14,%rax
  mov    %rax,%rsi
  call   <printf@plt>
  lea    D35(%rip),%rdi
  call   <puts@plt>
  xor    %eax,%eax
  call   <getms@plt>
  movabs $0x3837363534333231,%rsi
  movabs $0x6665646362613039,%rdi
  movabs $0x6e6d6c6b6a696867,%rdx
  mov    %rax,%r14
  mov    $0x989680,%eax
  nop
L51:
  mov    $0x706f,%ecx
  mov    %rsi,0x0(%rbp)
  mov    %rdi,0x8(%rbp)
  mov    %rdx,0x10(%rbp)
  mov    %cx,0x18(%rbp)
  movb   $0x0,0x1a(%rbp)
  sub    $0x1,%rax
  jne    L51
  xor    %eax,%eax
  call   <getms@plt>
  mov    %r13,%rdi
  sub    %r14,%rax
  lea    D5(%rip),%r14
  mov    %rax,%rsi
  call   <printf@plt>
  lea    D8(%rip),%rdi
  call   <puts@plt>
  xor    %eax,%eax
  call   <getms@plt>
  mov    %rax,%r15
  nopl   0x0(%rax)
L9:
  xor    %eax,%eax
  mov    %r12,%rdx
  mov    %r14,%rsi
  mov    %rbp,%rdi
  call   <sprintf@plt>
  sub    $0x1,%rbx
  jne    L9
  xor    %eax,%eax
  call   <getms@plt>
  mov    %r13,%rdi
  sub    %r15,%rax
  mov    %rax,%rsi
  call   <printf@plt>
  add    $0x18,%rsp
  xor    %eax,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
```

tool_calls: name: disassemble_data
arguments: label: D21
datatype: string
name: disassemble_data
arguments: label: D10
datatype: string
name: disassemble_data
arguments: label: D105
datatype: string
name: disassemble_data
arguments: label: D71
datatype: string
name: disassemble_data
arguments: label: D9
datatype: string
name: disassemble_data
arguments: label: D79
datatype: string
name: disassemble_data
arguments: label: D64
datatype: string
name: disassemble_data
arguments: label: D30
datatype: string
name: disassemble_data
arguments: label: D35
datatype: string
name: disassemble_data
arguments: label: D5
datatype: string
name: disassemble_data
arguments: label: D8
datatype: string

tool: D21: %zu %i %s

tool: D10: nada

tool: D105: . warmup

tool: D71: 1234567890abcdefghijklmnop

tool: D9: took %llims



tool: D79: . strcpy

tool: D64: . sprintf

tool: D30: . sprintf without formatting

tool: D35: . sprintf with "%s"

tool: D5: -%s-

tool: D8: . sprintf with "-%s-"

assistant: ```c
int main() {
  char *s = calloc(1024, sizeof(char));
  puts(". warmup");
  long long ms = getms();
  for (size_t i = 0; i < 10000000; i++) {
    sprintf(s, "%zu %i %s", i, 1234, "nada");
  }
  printf("took %llims\n\n", getms() - ms);
  puts(". strcpy");
  ms = getms();
  for (size_t i = 0; i < 10000000; i++) {
    strcpy(s, "1234567890abcdefghijklmnop");
  }
  printf("took %llims\n\n", getms() - ms);
  puts(". sprintf");
  ms = getms();
  for (size_t i = 0; i < 10000000; i++) {
    sprintf(s, "%zu %i %s", i, 1234, "nada");
  }
  printf("took %llims\n\n", getms() - ms);
  puts(". sprintf without formatting");
  ms = getms();
  for (size_t i = 0; i < 10000000; i++) {
    sprintf(s, "1234567890abcdefghijklmnop");
  }
  printf("took %llims\n\n", getms() - ms);
  puts(". sprintf with \"%s\"");
  ms = getms();
  for (size_t i = 0; i < 10000000; i++) {
    sprintf(s, "%s", "1234567890abcdefghijklmnop");
  }
  printf("took %llims\n\n", getms() - ms);
  puts(". sprintf with \"-%s-\"");
  ms = getms();
  for (size_t i = 0; i < 10000000; i++) {
    sprintf(s, "-%s-", "1234567890abcdefghijklmnop");
  }
  printf("took %llims\n\n", getms() - ms);
  return 0;
}
```