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

```asm
<format_currency>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  mov    %rdi,-0x28(%rbp)
  mov    %esi,-0x2c(%rbp)
  mov    -0x28(%rbp),%rax
  mov    (%rax),%rax
  mov    %rax,-0x10(%rbp)
  cmpl   $0x0,-0x2c(%rbp)
  jns    L5
  mov    -0x10(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x10(%rbp)
  movb   $0x2d,(%rax)
  negl   -0x2c(%rbp)
L5:
  mov    -0x10(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x10(%rbp)
  movb   $0xa3,(%rax)
  mov    -0x28(%rbp),%rax
  mov    -0x10(%rbp),%rdx
  mov    %rdx,(%rax)
  mov    -0x2c(%rbp),%eax
  movslq %eax,%rdx
  imul   $0x66666667,%rdx,%rdx
  shr    $0x20,%rdx
  sar    $0x2,%edx
  sar    $0x1f,%eax
  mov    %eax,%ecx
  mov    %edx,%eax
  sub    %ecx,%eax
  mov    %eax,-0x2c(%rbp)
  cmpl   $0x0,-0x2c(%rbp)
  jne    L7
  mov    -0x10(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x10(%rbp)
  movb   $0x30,(%rax)
  jmp    L45
L7:
  movl   $0x0,-0x18(%rbp)
  jmp    L38
L39:
  cmpl   $0x3,-0x18(%rbp)
  jne    L1
  movl   $0x0,-0x18(%rbp)
  mov    -0x10(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x10(%rbp)
  movb   $0x2c,(%rax)
L1:
  mov    -0x2c(%rbp),%edx
  movslq %edx,%rax
  imul   $0x66666667,%rax,%rax
  shr    $0x20,%rax
  sar    $0x2,%eax
  mov    %edx,%esi
  sar    $0x1f,%esi
  sub    %esi,%eax
  mov    %eax,%ecx
  mov    %ecx,%eax
  shl    $0x2,%eax
  add    %ecx,%eax
  add    %eax,%eax
  sub    %eax,%edx
  mov    %edx,-0x14(%rbp)
  mov    -0x2c(%rbp),%eax
  movslq %eax,%rdx
  imul   $0x66666667,%rdx,%rdx
  shr    $0x20,%rdx
  sar    $0x2,%edx
  sar    $0x1f,%eax
  mov    %eax,%ecx
  mov    %edx,%eax
  sub    %ecx,%eax
  mov    %eax,-0x2c(%rbp)
  mov    -0x14(%rbp),%eax
  lea    0x30(%rax),%ecx
  mov    -0x10(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x10(%rbp)
  mov    %ecx,%edx
  mov    %dl,(%rax)
  addl   $0x1,-0x18(%rbp)
L38:
  cmpl   $0x0,-0x2c(%rbp)
  jg     L39
L45:
  mov    -0x10(%rbp),%rax
  mov    %rax,-0x8(%rbp)
  subq   $0x1,-0x10(%rbp)
  jmp    L72
L73:
  mov    -0x28(%rbp),%rax
  mov    (%rax),%rax
  movzbl (%rax),%eax
  mov    %al,-0x19(%rbp)
  mov    -0x28(%rbp),%rax
  mov    (%rax),%rax
  mov    -0x10(%rbp),%rdx
  movzbl (%rdx),%edx
  mov    %dl,(%rax)
  mov    -0x10(%rbp),%rax
  movzbl -0x19(%rbp),%edx
  mov    %dl,(%rax)
  mov    -0x28(%rbp),%rax
  mov    (%rax),%rax
  lea    0x1(%rax),%rdx
  mov    -0x28(%rbp),%rax
  mov    %rdx,(%rax)
  subq   $0x1,-0x10(%rbp)
L72:
  mov    -0x28(%rbp),%rax
  mov    (%rax),%rax
  cmp    %rax,-0x10(%rbp)
  ja     L73
  mov    -0x28(%rbp),%rax
  mov    -0x8(%rbp),%rdx
  mov    %rdx,(%rax)
  nop
  pop    %rbp
  ret
```

assistant: ```c
void format_currency(char **dest, int value) {
  int digit, groupIndex;
  char *dst = *dest;
  char *finish;
  char tmp;
  if (value < 0) {
    *dst++ = '-';
    value = -value;
  }
  *dst++ = '£';
  *dest = dst;
  value /= 10;
  if (value == 0) {
    *dst++ = '0';
  } else {
    groupIndex = 0;
    while (value > 0) {
      if (groupIndex == 3) {
        groupIndex = 0;
        *dst++ = ',';
      }
      digit = value % 10;
      value /= 10;
      *dst++ = '0' + digit;
      groupIndex++;
    }
  }
  finish = dst;
  dst--;
  while (*dest < dst) {
    tmp = **dest;
    **dest = *dst;
    *dst = tmp;
    (*dest)++;
    dst--;
  }
  *dest = finish;
}
```