user: Translate the below assembly code into C programming language:

```asm
<writehelp>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x448,%rsp
  mov    %edi,%r12d
  mov    %rsi,%r14
  mov    %edx,0xc(%rsp)
  mov    %rcx,%r13
  mov    %fs:0x28,%rax
  mov    %rax,0x438(%rsp)
  xor    %eax,%eax
  movq   $0x0,0x30(%rsp)
  movq   $0x0,0x38(%rsp)
  lea    0x40(%rsp),%rdi
  mov    $0x7e,%ecx
  rep stos %rax,%es:(%rdi)
  mov    %r13,%rdi
  call   <strlen@plt>
  mov    %rax,%rbp
  mov    %eax,0x2c(%rsp)
  cltq
  mov    %rax,%r15
  mov    %rax,0x20(%rsp)
  lea    0x30(%rsp),%rbx
  mov    %rax,%rdx
  mov    %r13,%rsi
  mov    %rbx,%rdi
  call   <memcpy@plt>
  mov    %r15,%rax
  lea    (%rbx,%r15,1),%r15
  mov    %r15,0x10(%rsp)
  mov    $0x400,%edx
  sub    %rax,%rdx
  mov    $0x0,%esi
  mov    %r15,%rdi
  call   <memset@plt>
  sub    0xc(%rsp),%r12d
  lea    0x4(%r12),%eax
  mov    %eax,0x28(%rsp)
  cltq
  mov    %rax,0x18(%rsp)
  add    %rax,%rbx
  movzbl (%rbx),%r12d
  cmp    %rbx,%r15
  jbe    L18
  movb   $0x0,(%rbx)
  lea    0x30(%rsp),%rdi
  mov    $0xa,%esi
  call   <strchr@plt>
  mov    %rax,%r13
  test   %rax,%rax
  je     L104
L246:
  movb   $0x0,0x0(%r13)
  cmp    0x28(%rsp),%ebp
  jle    L177
  mov    %r12b,(%rbx)
L177:
  lea    0x30(%rsp),%rcx
  mov    %r14,%rdx
  mov    0xc(%rsp),%esi
  lea    D28(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  movb   $0x20,0x0(%r13)
  jmp    L253
L104:
  lea    0x30(%rsp),%rdi
  mov    $0x20,%esi
  call   <strrchr@plt>
  mov    %rax,%r13
  test   %rax,%rax
  jne    L246
  mov    %rbx,%r13
  jmp    L20
L18:
  mov    0x10(%rsp),%r13
L20:
  lea    0x30(%rsp),%rcx
  mov    %r14,%rdx
  mov    0xc(%rsp),%esi
  lea    D28(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    %r12b,0x0(%r13)
  cmp    $0x20,%r12b
  jne    L230
L253:
  movslq %ebp,%rdx
  lea    0x30(%rsp),%rcx
  mov    %r13,%rax
  sub    %rcx,%rax
  cmp    %rdx,%rax
  jge    L16
L236:
  add    $0x1,%r13
  cmpb   $0x20,0x0(%r13)
  jne    L230
  mov    %r13,%rax
  sub    %rcx,%rax
  cmp    %rdx,%rax
  jl     L236
  jmp    L16
L230:
  movslq %ebp,%rbp
  lea    0x30(%rsp),%rdx
  mov    %r13,%rax
  sub    %rdx,%rax
  cmp    %rbp,%rax
  jge    L16
  mov    %rdx,%r12
  jmp    L9
L73:
  movb   $0x0,(%r14)
  mov    $0xa,%esi
  mov    %r13,%rdi
  call   <strchr@plt>
  mov    %rax,%rbx
  test   %rax,%rax
  je     L111
L112:
  movb   $0x0,(%rbx)
  mov    0x28(%rsp),%esi
  cmp    %esi,0x2c(%rsp)
  jle    L146
  mov    %r15b,(%r14)
L146:
  mov    %r13,%rcx
  lea    D42(%rip),%rdx
  mov    0xc(%rsp),%esi
  lea    D28(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  movb   $0x20,(%rbx)
  jmp    L235
L111:
  mov    $0x20,%esi
  mov    %r13,%rdi
  call   <strrchr@plt>
  mov    %rax,%rbx
  test   %rax,%rax
  jne    L112
  mov    %r14,%rbx
  jmp    L65
L160:
  mov    %rbx,%r13
  jmp    L82
L150:
  mov    %rbx,%r13
L82:
  mov    %r13,%rax
  sub    %r12,%rax
  cmp    %rbp,%rax
  jge    L16
L9:
  mov    0x18(%rsp),%rax
  lea    0x0(%r13,%rax,1),%r14
  movzbl (%r14),%r15d
  cmp    %r14,0x10(%rsp)
  ja     L73
  mov    0x20(%rsp),%rax
  lea    0x0(%r13,%rax,1),%rbx
L65:
  mov    %r13,%rcx
  lea    D42(%rip),%rdx
  mov    0xc(%rsp),%esi
  lea    D28(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    %r15b,(%rbx)
  cmp    $0x20,%r15b
  jne    L160
L235:
  mov    %rbx,%rax
  sub    %r12,%rax
  cmp    %rax,%rbp
  jle    L16
L151:
  add    $0x1,%rbx
  cmpb   $0x20,(%rbx)
  jne    L150
  mov    %rbx,%rax
  sub    %r12,%rax
  cmp    %rbp,%rax
  jl     L151
L16:
  mov    0x438(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L99
  add    $0x448,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L99:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: extract_symbolic_data
arguments: data_tag: D28
type_infered: string
name: extract_symbolic_data
arguments: data_tag: D42
type_infered: string

tool: D28: %-*s    %s


tool: 

assistant: ```c
void writehelp(int maxwidth, const char *lhs, int width, const char *help) {
  char helpbuf[1024] = {0};
  int n, r = (int)strlen(help);
  char t, *s, *h = helpbuf;
  memcpy(h, help, r);
  memset(h + r, 0, (sizeof(helpbuf) / sizeof(*(helpbuf))) - r);
  n = maxwidth - width + 4;
  t = h[n];
  s = h + r;
  if ((h + n) < (helpbuf + r)) {
    h[n] = '\0';
    if ((s = strchr(h, '\n')) || (s = strrchr(h, ' '))) {
      *s = '\0';
      if (n < r)
        h[n] = t;
      t = ' ';
    } else {
      s = h + n;
    }
  }
  printf("%-*s    %s\n", width, lhs, h);
  h = s;
  *s = t;
  while (*h == ' ' && (h - helpbuf) < r)
    ++h;
  while ((h - helpbuf) < r) {
    t = h[n];
    s = h + r;
    if ((h + n) < (helpbuf + r)) {
      h[n] = '\0';
      if ((s = strchr(h, '\n')) || (s = strrchr(h, ' '))) {
        *s = '\0';
        if (n < r)
          h[n] = t;
        t = ' ';
      } else {
        s = h + n;
      }
    }
    printf("%-*s    %s\n", width, "", h);
    h = s;
    *s = t;
    while (*h == ' ' && (h - helpbuf) < r)
      ++h;
  }
}
```