user: 请显示与下面列出的汇编代码相匹配的C语言实现:

```asm
<licenseKeyFormatting>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  mov    %esi,%ebp
  push   %rbx
  mov    %rdi,%rbx
  sub    $0x28,%rsp
  call   <strlen@plt>
  lea    0x1(%rax),%edi
  mov    %eax,%r12d
  call   <malloc@plt>
  mov    %rax,%r14
  test   %r12d,%r12d
  jle    L134
  lea    -0x1(%r12),%eax
  mov    %rbx,%rdi
  xor    %r13d,%r13d
  lea    0x1(%rbx,%rax,1),%rcx
  nopl   0x0(%rax,%rax,1)
L37:
  movzbl (%rdi),%eax
  cmp    $0x2d,%al
  je     L5
  movslq %r13d,%rdx
  add    $0x1,%r13d
  mov    %al,(%r14,%rdx,1)
L5:
  add    $0x1,%rdi
  cmp    %rcx,%rdi
  jne    L37
  movslq %r13d,%rax
  movb   $0x0,(%r14,%rax,1)
  mov    %r13d,%eax
  cltd
  idiv   %ebp
  lea    0x1(%r13,%rax,1),%edi
  mov    %edx,0x14(%rsp)
  call   <malloc@plt>
  mov    0x14(%rsp),%edx
  mov    %rax,%r12
  mov    %edx,%r15d
  test   %edx,%edx
  je     L152
  mov    0x14(%rsp),%esi
  lea    0x1(%r14),%rax
  mov    %r12,%r15
  mov    %rax,0x18(%rsp)
  sub    %r14,%r15
  lea    -0x1(%rsi),%ebx
  add    %rax,%rbx
  mov    %rbx,0x8(%rsp)
  mov    %r14,%rbx
  nopw   0x0(%rax,%rax,1)
L142:
  movsbl (%rbx),%edi
  call   <toupper@plt>
  mov    %al,(%r15,%rbx,1)
  add    $0x1,%rbx
  cmp    0x8(%rsp),%rbx
  jne    L142
  movslq 0x14(%rsp),%rax
  cmpb   $0x0,(%r14,%rax,1)
  jne    L11
  mov    0x14(%rsp),%ebx
  mov    %rax,%rdx
L173:
  lea    (%r12,%rdx,1),%rcx
  cmp    %r13d,0x14(%rsp)
  jge    L175
  mov    0x18(%rsp),%rdx
  lea    (%rax,%r14,1),%r15
  lea    -0x1(%r13),%r8d
  sub    0x14(%rsp),%r8d
  add    %rax,%rdx
  mov    $0x1,%eax
  lea    (%r8,%rdx,1),%rsi
  sub    %r15d,%eax
  mov    %rsi,0x8(%rsp)
  mov    %eax,0x14(%rsp)
  jmp    L64
  nopl   0x0(%rax)
L194:
  cmpb   $0x0,0x1(%r15)
  je     L185
  movslq %r14d,%r14
  add    $0x2,%ebx
  add    $0x1,%r15
  movb   $0x2d,(%r12,%r14,1)
  cmp    %r15,0x8(%rsp)
  je     L70
L64:
  movsbl (%r15),%edi
  movslq %ebx,%r13
  lea    0x1(%rbx),%r14d
  add    %r12,%r13
  call   <toupper@plt>
  mov    %al,0x0(%r13)
  mov    0x14(%rsp),%eax
  add    %r15d,%eax
  cltd
  idiv   %ebp
  test   %edx,%edx
  je     L194
L185:
  mov    %r14d,%ebx
  add    $0x1,%r15
  cmp    %r15,0x8(%rsp)
  jne    L64
L70:
  movslq %ebx,%rcx
  add    %r12,%rcx
L175:
  movb   $0x0,(%rcx)
  add    $0x28,%rsp
  mov    %r12,%rax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   0x0(%rax,%rax,1)
L11:
  lea    0x1(%rax),%ebx
  movb   $0x2d,(%r12,%rax,1)
  movslq %ebx,%rdx
  jmp    L173
  nopl   0x0(%rax,%rax,1)
L152:
  test   %r13d,%r13d
  je     L32
  lea    -0x1(%r13),%eax
  lea    0x1(%r14,%rax,1),%rax
  mov    %rax,0x8(%rsp)
  mov    $0x1,%eax
  sub    %r14d,%eax
  mov    %eax,0x14(%rsp)
  jmp    L16
  nopl   (%rax)
L84:
  cmpb   $0x0,0x1(%r14)
  je     L98
  movslq %r13d,%r13
  add    $0x2,%r15d
  add    $0x1,%r14
  movb   $0x2d,(%r12,%r13,1)
  cmp    0x8(%rsp),%r14
  je     L49
L16:
  movsbl (%r14),%edi
  movslq %r15d,%rbx
  lea    0x1(%r15),%r13d
  add    %r12,%rbx
  call   <toupper@plt>
  mov    %al,(%rbx)
  mov    0x14(%rsp),%eax
  add    %r14d,%eax
  cltd
  idiv   %ebp
  test   %edx,%edx
  je     L84
L98:
  mov    %r13d,%r15d
  add    $0x1,%r14
  cmp    0x8(%rsp),%r14
  jne    L16
L49:
  movslq %r15d,%rcx
  add    %r12,%rcx
  jmp    L175
  nopw   0x0(%rax,%rax,1)
L134:
  movb   $0x0,(%rax)
  mov    $0x1,%edi
  call   <malloc@plt>
  mov    %rax,%r12
L32:
  mov    %r12,%rcx
  jmp    L175
```

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;
}
```