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

```asm
<smtp_chunk_split>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  add    $0xffffffffffffff80,%rsp
  mov    %rdi,-0x68(%rbp)
  mov    %rsi,-0x70(%rbp)
  mov    %rdx,-0x78(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  cmpq   $0x0,-0x70(%rbp)
  jne    L45
  mov    D17(%rip),%rax
  mov    (%rax),%edx
  mov    D3(%rip),%rax
  mov    %edx,(%rax)
  mov    $0x0,%eax
  jmp    L156
L45:
  mov    -0x68(%rbp),%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  mov    %rax,-0x28(%rbp)
  mov    -0x78(%rbp),%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  mov    %rax,-0x20(%rbp)
  cmpq   $0x0,-0x28(%rbp)
  jne    L53
  mov    -0x78(%rbp),%rax
  mov    %rax,%rdi
  call   <smtp_strdup@plt>
  jmp    L156
L53:
  lea    -0x50(%rbp),%rdx
  mov    -0x20(%rbp),%rax
  mov    $0x1,%esi
  mov    %rax,%rdi
  call   <smtp_si_add_size_t@plt>
  test   %rax,%rax
  jne    L32
  lea    -0x58(%rbp),%rdx
  mov    -0x28(%rbp),%rax
  mov    $0x1,%esi
  mov    %rax,%rdi
  call   <smtp_si_add_size_t@plt>
  test   %rax,%rax
  jne    L32
  mov    -0x28(%rbp),%rax
  mov    $0x0,%edx
  divq   -0x70(%rbp)
  lea    0x1(%rax),%rcx
  mov    -0x50(%rbp),%rax
  lea    -0x48(%rbp),%rdx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <smtp_si_mul_size_t@plt>
  test   %rax,%rax
  jne    L32
  mov    -0x58(%rbp),%rcx
  mov    -0x48(%rbp),%rax
  lea    -0x48(%rbp),%rdx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <smtp_si_add_size_t@plt>
  test   %rax,%rax
  jne    L32
  mov    -0x48(%rbp),%rax
  mov    %rax,%rsi
  mov    $0x1,%edi
  call   <calloc@plt>
  mov    %rax,-0x18(%rbp)
  cmpq   $0x0,-0x18(%rbp)
  jne    L145
L32:
  mov    $0x0,%eax
  jmp    L156
L145:
  movq   $0x0,-0x30(%rbp)
  movq   $0x0,-0x38(%rbp)
  movq   $0x0,-0x40(%rbp)
  jmp    L12
L114:
  mov    -0x68(%rbp),%rdx
  mov    -0x30(%rbp),%rax
  add    %rax,%rdx
  mov    -0x70(%rbp),%rax
  mov    %rax,%rsi
  mov    %rdx,%rdi
  call   <smtp_strnlen_utf8@plt>
  mov    %rax,-0x10(%rbp)
  cmpq   $0xffffffffffffffff,-0x10(%rbp)
  jne    L122
  mov    -0x18(%rbp),%rax
  mov    %rax,%rdi
  call   <free@plt>
  mov    $0x0,%eax
  jmp    L156
L122:
  mov    -0x68(%rbp),%rdx
  mov    -0x30(%rbp),%rax
  lea    (%rdx,%rax,1),%rsi
  mov    -0x18(%rbp),%rdx
  mov    -0x38(%rbp),%rax
  lea    (%rdx,%rax,1),%rcx
  mov    -0x10(%rbp),%rax
  mov    %rax,%rdx
  mov    %rcx,%rdi
  call   <memcpy@plt>
  mov    -0x10(%rbp),%rax
  add    %rax,-0x38(%rbp)
  mov    -0x68(%rbp),%rdx
  mov    -0x30(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  test   %al,%al
  jne    L44
  addq   $0x1,-0x38(%rbp)
L44:
  mov    -0x10(%rbp),%rax
  add    %rax,-0x30(%rbp)
  cmpq   $0x0,-0x20(%rbp)
  je     L153
  mov    -0x18(%rbp),%rdx
  mov    -0x38(%rbp),%rax
  lea    (%rdx,%rax,1),%rcx
  mov    -0x20(%rbp),%rdx
  mov    -0x78(%rbp),%rax
  mov    %rax,%rsi
  mov    %rcx,%rdi
  call   <memcpy@plt>
L153:
  mov    -0x20(%rbp),%rax
  add    %rax,-0x38(%rbp)
  addq   $0x1,-0x40(%rbp)
L12:
  mov    -0x28(%rbp),%rax
  mov    $0x0,%edx
  divq   -0x70(%rbp)
  add    $0x1,%rax
  cmp    %rax,-0x40(%rbp)
  jb     L114
  mov    -0x18(%rbp),%rax
L156:
  mov    -0x8(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L62
  call   <__stack_chk_fail@plt>
L62:
  leave
  ret
```

assistant: ```c
char *smtp_chunk_split(const char *const s, size_t chunklen, const char *const end) {
  char *snew;
  size_t bodylen;
  size_t bodylen_inc;
  size_t endlen;
  size_t endlen_inc;
  size_t snewlen;
  size_t chunk_i;
  size_t snew_i;
  size_t body_i;
  size_t body_copy_len;
  if (chunklen < 1) {
    errno = EINVAL;
    return NULL;
  }
  bodylen = strlen(s);
  endlen = strlen(end);
  if (bodylen < 1) {
    return smtp_strdup(end);
  }
  if (smtp_si_add_size_t(endlen, 1, &endlen_inc) || smtp_si_add_size_t(bodylen, 1, &bodylen_inc) || smtp_si_mul_size_t(endlen_inc, bodylen / chunklen + 1, &snewlen) || smtp_si_add_size_t(snewlen, bodylen_inc, &snewlen) || (snew = calloc(1, snewlen)) == NULL) {
    return NULL;
  }
  body_i = 0;
  snew_i = 0;
  for (chunk_i = 0; chunk_i < bodylen / chunklen + 1; chunk_i++) {
    body_copy_len = smtp_strnlen_utf8(&s[body_i], chunklen);
    if (body_copy_len == ((size_t)(-1))) {
      free(snew);
      return NULL;
    }
    memcpy(&snew[snew_i], &s[body_i], body_copy_len);
    snew_i += body_copy_len;
    if (s[body_i] == '\0') {
      snew_i += 1;
    }
    body_i += body_copy_len;
    if (endlen > 0) {
      memcpy(&snew[snew_i], end, endlen);
    }
    snew_i += endlen;
  }
  return snew;
}
```