user: What is the c source code of the assembly code below?

```asm
<licenseKeyFormatting>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x28,%rsp
  mov    %rdi,%r12
  mov    %esi,%r13d
  call   <strlen@plt>
  mov    %eax,%ebx
  lea    0x1(%rax),%edi
  call   <malloc@plt>
  mov    %rax,%rbp
  test   %ebx,%ebx
  jle    L11
  mov    %r12,%rax
  lea    -0x1(%rbx),%edx
  lea    0x1(%r12,%rdx,1),%rsi
  mov    $0x0,%r14d
  jmp    L178
L113:
  add    $0x1,%rax
  cmp    %rsi,%rax
  je     L116
L178:
  movzbl (%rax),%edx
  cmp    $0x2d,%dl
  je     L113
  movslq %r14d,%rcx
  mov    %dl,0x0(%rbp,%rcx,1)
  lea    0x1(%r14),%r14d
  jmp    L113
L116:
  movslq %r14d,%rax
  movb   $0x0,0x0(%rbp,%rax,1)
  mov    %r14d,%eax
  cltd
  idiv   %r13d
  mov    %edx,0x14(%rsp)
  lea    0x1(%r14,%rax,1),%edi
  call   <malloc@plt>
  mov    %rax,0x18(%rsp)
  mov    %rax,0x8(%rsp)
  cmpl   $0x0,0x14(%rsp)
  je     L6
  mov    0x14(%rsp),%eax
  test   %eax,%eax
  jle    L135
  lea    -0x1(%rax),%eax
  lea    0x1(%rbp,%rax,1),%r15
  mov    %rbp,%rbx
  mov    0x18(%rsp),%r12
  sub    %rbp,%r12
L187:
  movsbl (%rbx),%edi
  call   <toupper@plt>
  mov    %al,(%r12,%rbx,1)
  add    $0x1,%rbx
  cmp    %r15,%rbx
  jne    L187
  mov    0x14(%rsp),%r12d
L65:
  movslq %r12d,%rax
  mov    %r12d,%ebx
  cmpb   $0x0,0x0(%rbp,%rax,1)
  je     L143
  lea    0x1(%r12),%ebx
  mov    0x18(%rsp),%rsi
  movb   $0x2d,(%rsi,%rax,1)
L143:
  cmp    %r12d,%r14d
  jle    L74
  add    %rax,%rbp
  add    $0x1,%r12d
  mov    0x14(%rsp),%eax
  sub    %eax,%r12d
  add    $0x1,%r14d
  sub    %eax,%r14d
  mov    %r14d,0x14(%rsp)
  jmp    L212
L6:
  test   %r14d,%r14d
  jle    L19
  mov    %rbp,%r12
  lea    -0x1(%r14),%eax
  lea    0x1(%rbp,%rax,1),%r15
  mov    0x14(%rsp),%ebx
  mov    $0x1,%eax
  sub    %ebp,%eax
  mov    %eax,0x14(%rsp)
  jmp    L238
L19:
  mov    0x14(%rsp),%ebx
  jmp    L74
L135:
  mov    $0x0,%r12d
  jmp    L65
L151:
  mov    %r15d,%ebx
L150:
  add    $0x1,%rbp
  add    $0x1,%r12d
  cmp    %r12d,0x14(%rsp)
  je     L74
L212:
  lea    0x1(%rbx),%r15d
  movslq %ebx,%r14
  add    0x8(%rsp),%r14
  movsbl 0x0(%rbp),%edi
  call   <toupper@plt>
  mov    %al,(%r14)
  mov    %r12d,%eax
  cltd
  idiv   %r13d
  test   %edx,%edx
  jne    L151
  cmpb   $0x0,0x1(%rbp)
  je     L190
  add    $0x2,%ebx
  movslq %r15d,%r15
  mov    0x8(%rsp),%rax
  movb   $0x2d,(%rax,%r15,1)
  jmp    L150
L190:
  mov    %r15d,%ebx
  jmp    L150
L75:
  mov    %r14d,%ebx
L73:
  add    $0x1,%r12
  cmp    %r15,%r12
  je     L74
L238:
  lea    0x1(%rbx),%r14d
  movslq %ebx,%rbp
  add    0x8(%rsp),%rbp
  movsbl (%r12),%edi
  call   <toupper@plt>
  mov    %al,0x0(%rbp)
  mov    0x14(%rsp),%ecx
  lea    (%rcx,%r12,1),%eax
  cltd
  idiv   %r13d
  test   %edx,%edx
  jne    L75
  cmpb   $0x0,0x1(%r12)
  je     L194
  add    $0x2,%ebx
  movslq %r14d,%r14
  mov    0x8(%rsp),%rax
  movb   $0x2d,(%rax,%r14,1)
  jmp    L73
L194:
  mov    %r14d,%ebx
  jmp    L73
L11:
  movb   $0x0,(%rax)
  mov    $0x1,%edi
  call   <malloc@plt>
  mov    %rax,0x8(%rsp)
  mov    $0x0,%ebx
L74:
  movslq %ebx,%rbx
  mov    0x8(%rsp),%rax
  movb   $0x0,(%rax,%rbx,1)
  add    $0x28,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
```

assistant: ```c
char *licenseKeyFormatting(char *S, int K) {
  int len = strlen(S);
  int i, j;
  char *C, *ret;
  C = (char *)malloc(sizeof(char) * (len + 1));
  for (i = 0, j = 0; i < len; i++) {
    if (S[i] != '-') {
      C[j++] = S[i];
    }
  }
  C[j] = '\0';
  len = j;
  ret = (char *)malloc(sizeof(char) * (j + j / K + 1));
  j = 0;
  if (len % K) {
    for (i = 0; i < len % K; i++) {
      ret[j++] = toupper(C[i]);
    }
    if (C[i]) {
      ret[j++] = '-';
    }
    for (; i < len; i++) {
      ret[j++] = toupper(C[i]);
      if ((i + 1 - len % K) % K == 0 && C[i + 1]) {
        ret[j++] = '-';
      }
    }
  } else {
    for (i = 0; i < len; i++) {
      ret[j++] = toupper(C[i]);
      if ((i + 1) % K == 0 && C[i + 1]) {
        ret[j++] = '-';
      }
    }
  }
  ret[j] = '\0';
  return ret;
}
```