user: Please show me the C implementation that matches the assembly code listed below:

```asm
<licenseKeyFormatting>:
  endbr64
  push   %r13
  push   %r12
  mov    %esi,%r12d
  push   %rbp
  mov    %rdi,%rbp
  push   %rbx
  sub    $0x8,%rsp
  call   <strlen@plt>
  mov    %rbp,%r8
  test   %eax,%eax
  je     L147
  lea    D18(%rip),%r8
  jle    L147
  mov    %eax,%ebx
  lea    -0x1(%rax),%eax
  cmp    $0xe,%eax
  jbe    L363
  mov    %ebx,%edx
  movdqa D29(%rip),%xmm7
  movdqa D44(%rip),%xmm9
  mov    %rbp,%rax
  shr    $0x4,%edx
  pxor   %xmm1,%xmm1
  pxor   %xmm2,%xmm2
  movdqa D73(%rip),%xmm8
  sub    $0x1,%edx
  movdqa D78(%rip),%xmm6
  pxor   %xmm4,%xmm4
  movdqa D62(%rip),%xmm5
  shl    $0x4,%rdx
  movdqa D9(%rip),%xmm3
  lea    0x10(%rbp,%rdx,1),%rdx
  nopl   0x0(%rax)
L776:
  movdqu (%rax),%xmm0
  movdqu (%rax),%xmm10
  movdqa %xmm2,%xmm11
  movdqa %xmm4,%xmm12
  movdqa %xmm4,%xmm13
  add    $0x10,%rax
  pand   %xmm9,%xmm0
  paddb  %xmm6,%xmm10
  paddb  %xmm8,%xmm0
  psubusb %xmm5,%xmm10
  psubusb %xmm7,%xmm0
  pcmpeqb %xmm2,%xmm10
  pcmpeqb %xmm2,%xmm0
  pcmpeqb %xmm2,%xmm10
  pcmpeqb %xmm2,%xmm0
  pand   %xmm10,%xmm0
  pcmpgtb %xmm0,%xmm11
  movdqa %xmm0,%xmm10
  punpcklbw %xmm11,%xmm10
  punpckhbw %xmm11,%xmm0
  pcmpgtw %xmm10,%xmm12
  pcmpgtw %xmm0,%xmm13
  movdqa %xmm10,%xmm11
  punpcklwd %xmm12,%xmm11
  punpckhwd %xmm12,%xmm10
  movdqa %xmm0,%xmm12
  pandn  %xmm3,%xmm11
  pandn  %xmm3,%xmm10
  punpcklwd %xmm13,%xmm12
  paddd  %xmm1,%xmm11
  punpckhwd %xmm13,%xmm0
  movdqa %xmm10,%xmm1
  paddd  %xmm11,%xmm1
  pandn  %xmm3,%xmm12
  pandn  %xmm3,%xmm0
  paddd  %xmm1,%xmm12
  movdqa %xmm0,%xmm1
  paddd  %xmm12,%xmm1
  cmp    %rdx,%rax
  jne    L776
  movdqa %xmm1,%xmm0
  mov    %ebx,%eax
  psrldq $0x8,%xmm0
  and    $0xfffffff0,%eax
  paddd  %xmm0,%xmm1
  movdqa %xmm1,%xmm0
  psrldq $0x4,%xmm0
  paddd  %xmm0,%xmm1
  movd   %xmm1,%r13d
  test   $0xf,%bl
  je     L253
L312:
  movslq %eax,%rdx
  movzbl 0x0(%rbp,%rdx,1),%esi
  mov    %esi,%edx
  and    $0xffffffdf,%edx
  sub    $0x41,%edx
  cmp    $0x19,%dl
  ja     L131
L125:
  add    $0x1,%eax
  add    $0x1,%r13d
  cmp    %eax,%ebx
  jle    L709
L816:
  movslq %eax,%rdx
  movzbl 0x0(%rbp,%rdx,1),%esi
  mov    %esi,%edx
  and    $0xffffffdf,%edx
  sub    $0x41,%edx
  cmp    $0x19,%dl
  jbe    L104
  sub    $0x30,%esi
  cmp    $0x9,%sil
  ja     L838
L104:
  add    $0x1,%eax
  add    $0x1,%r13d
  cmp    %eax,%ebx
  jle    L709
L696:
  movslq %eax,%rdx
  movzbl 0x0(%rbp,%rdx,1),%esi
  mov    %esi,%edx
  and    $0xffffffdf,%edx
  sub    $0x41,%edx
  cmp    $0x19,%dl
  jbe    L40
  sub    $0x30,%esi
  cmp    $0x9,%sil
  ja     L660
L40:
  add    $0x1,%eax
  add    $0x1,%r13d
  cmp    %eax,%ebx
  jle    L709
L596:
  movslq %eax,%rdx
  movzbl 0x0(%rbp,%rdx,1),%esi
  mov    %esi,%edx
  and    $0xffffffdf,%edx
  sub    $0x41,%edx
  cmp    $0x19,%dl
  ja     L335
L569:
  add    $0x1,%eax
  add    $0x1,%r13d
  cmp    %eax,%ebx
  jle    L709
L108:
  movslq %eax,%rdx
  movzbl 0x0(%rbp,%rdx,1),%esi
  mov    %esi,%edx
  and    $0xffffffdf,%edx
  sub    $0x41,%edx
  cmp    $0x19,%dl
  ja     L548
L462:
  add    $0x1,%eax
  add    $0x1,%r13d
  cmp    %eax,%ebx
  jle    L709
L769:
  movslq %eax,%rdx
  movzbl 0x0(%rbp,%rdx,1),%esi
  mov    %esi,%edx
  and    $0xffffffdf,%edx
  sub    $0x41,%edx
  cmp    $0x19,%dl
  ja     L300
L785:
  add    $0x1,%eax
  add    $0x1,%r13d
  cmp    %eax,%ebx
  jle    L709
L195:
  movslq %eax,%rdx
  movzbl 0x0(%rbp,%rdx,1),%esi
  mov    %esi,%edx
  and    $0xffffffdf,%edx
  sub    $0x41,%edx
  cmp    $0x19,%dl
  jbe    L575
  sub    $0x30,%esi
  cmp    $0x9,%sil
  jbe    L575
  add    $0x1,%eax
  cmp    %eax,%ebx
  jle    L253
L309:
  movslq %eax,%rdx
  movzbl 0x0(%rbp,%rdx,1),%esi
  mov    %esi,%edx
  and    $0xffffffdf,%edx
  sub    $0x41,%edx
  cmp    $0x19,%dl
  ja     L35
L772:
  add    $0x1,%eax
  add    $0x1,%r13d
  cmp    %eax,%ebx
  jle    L709
L654:
  movslq %eax,%rdx
  movzbl 0x0(%rbp,%rdx,1),%esi
  mov    %esi,%edx
  and    $0xffffffdf,%edx
  sub    $0x41,%edx
  cmp    $0x19,%dl
  jbe    L92
  sub    $0x30,%esi
  cmp    $0x9,%sil
  jbe    L92
  add    $0x1,%eax
  cmp    %eax,%ebx
  jle    L253
L860:
  movslq %eax,%rdx
  movzbl 0x0(%rbp,%rdx,1),%esi
  mov    %esi,%edx
  and    $0xffffffdf,%edx
  sub    $0x41,%edx
  cmp    $0x19,%dl
  jbe    L853
  sub    $0x30,%esi
  cmp    $0x9,%sil
  ja     L474
L853:
  add    $0x1,%eax
  add    $0x1,%r13d
  cmp    %eax,%ebx
  jle    L709
L20:
  movslq %eax,%rdx
  movzbl 0x0(%rbp,%rdx,1),%esi
  mov    %esi,%edx
  and    $0xffffffdf,%edx
  sub    $0x41,%edx
  cmp    $0x19,%dl
  jbe    L674
  sub    $0x30,%esi
  cmp    $0x9,%sil
  ja     L25
L674:
  add    $0x1,%eax
  add    $0x1,%r13d
  cmp    %eax,%ebx
  jle    L709
L452:
  movslq %eax,%rdx
  movzbl 0x0(%rbp,%rdx,1),%esi
  mov    %esi,%edx
  and    $0xffffffdf,%edx
  sub    $0x41,%edx
  cmp    $0x19,%dl
  jbe    L665
  sub    $0x30,%esi
  cmp    $0x9,%sil
  ja     L87
L665:
  add    $0x1,%eax
  add    $0x1,%r13d
  cmp    %eax,%ebx
  jle    L709
L761:
  movslq %eax,%rdx
  movzbl 0x0(%rbp,%rdx,1),%esi
  mov    %esi,%edx
  and    $0xffffffdf,%edx
  sub    $0x41,%edx
  cmp    $0x19,%dl
  jbe    L864
  sub    $0x30,%esi
  cmp    $0x9,%sil
  ja     L305
L864:
  add    $0x1,%eax
  add    $0x1,%r13d
  cmp    %eax,%ebx
  jle    L709
L841:
  movslq %eax,%rdx
  movzbl 0x0(%rbp,%rdx,1),%esi
  mov    %esi,%edx
  and    $0xffffffdf,%edx
  sub    $0x41,%edx
  cmp    $0x19,%dl
  jbe    L504
  sub    $0x30,%esi
  cmp    $0x9,%sil
  ja     L19
L504:
  add    $0x1,%eax
  add    $0x1,%r13d
  cmp    %ebx,%eax
  jge    L709
L541:
  cltq
  movzbl 0x0(%rbp,%rax,1),%edx
  mov    %edx,%eax
  and    $0xffffffdf,%eax
  sub    $0x41,%eax
  cmp    $0x19,%al
  jbe    L172
  sub    $0x30,%edx
  cmp    $0x9,%dl
  ja     L253
L172:
  add    $0x1,%r13d
L253:
  lea    D18(%rip),%r8
  test   %r13d,%r13d
  jne    L709
L147:
  add    $0x8,%rsp
  mov    %r8,%rax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  ret
  nopl   0x0(%rax,%rax,1)
L131:
  sub    $0x30,%esi
  cmp    $0x9,%sil
  jbe    L125
  add    $0x1,%eax
  cmp    %eax,%ebx
  jg     L816
  jmp    L253
  nopw   0x0(%rax,%rax,1)
L575:
  add    $0x1,%eax
  add    $0x1,%r13d
  cmp    %eax,%ebx
  jg     L309
  nop
L709:
  mov    %r13d,%eax
  cltd
  idiv   %r12d
  cmp    $0x1,%edx
  sbb    $0x0,%eax
  add    %eax,%r13d
  lea    0x1(%r13),%edi
  call   <malloc@plt>
  mov    %r13d,%esi
  mov    %rax,%r8
  movslq %r13d,%rax
  movb   $0x0,(%r8,%rax,1)
  sub    $0x1,%esi
  js     L147
  lea    -0x2(%rbx),%eax
  cltq
  nopl   0x0(%rax)
L375:
  xor    %ecx,%ecx
L739:
  movzbl 0x1(%rbp,%rax,1),%edx
  lea    -0x61(%rdx),%edi
  cmp    $0x19,%dil
  ja     L558
  movslq %esi,%rdi
  sub    $0x20,%edx
  sub    $0x1,%esi
  add    $0x1,%ecx
  mov    %dl,(%r8,%rdi,1)
L813:
  mov    %esi,%edx
  not    %edx
  shr    $0x1f,%edx
  cmp    %r12d,%ecx
  jne    L511
L190:
  test   %dl,%dl
  je     L511
  movslq %esi,%rdx
  sub    $0x1,%esi
  mov    %eax,%ecx
  sub    $0x1,%rax
  movb   $0x2d,(%r8,%rdx,1)
  mov    %esi,%edx
  not    %ecx
  not    %edx
  shr    $0x1f,%ecx
  shr    $0x1f,%edx
  test   %dl,%cl
  jne    L375
  add    $0x8,%rsp
  mov    %r8,%rax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  ret
  nopw   0x0(%rax,%rax,1)
L558:
  lea    -0x41(%rdx),%edi
  cmp    $0x19,%dil
  jbe    L11
  lea    -0x30(%rdx),%edi
  cmp    $0x9,%dil
  ja     L813
L11:
  movslq %esi,%rdi
  sub    $0x1,%esi
  add    $0x1,%ecx
  mov    %dl,(%r8,%rdi,1)
  mov    %esi,%edx
  not    %edx
  shr    $0x1f,%edx
  cmp    %r12d,%ecx
  je     L190
  nopl   0x0(%rax,%rax,1)
L511:
  mov    %eax,%edi
  sub    $0x1,%rax
  not    %edi
  shr    $0x1f,%edi
  test   %dil,%dl
  jne    L739
  add    $0x8,%rsp
  mov    %r8,%rax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  ret
  nopw   0x0(%rax,%rax,1)
L335:
  sub    $0x30,%esi
  cmp    $0x9,%sil
  jbe    L569
  add    $0x1,%eax
  cmp    %eax,%ebx
  jg     L108
  jmp    L253
  nopl   (%rax)
L548:
  sub    $0x30,%esi
  cmp    $0x9,%sil
  jbe    L462
  add    $0x1,%eax
  cmp    %eax,%ebx
  jg     L769
  jmp    L253
  nopl   (%rax)
L300:
  sub    $0x30,%esi
  cmp    $0x9,%sil
  jbe    L785
  add    $0x1,%eax
  cmp    %eax,%ebx
  jg     L195
  jmp    L253
  nopl   (%rax)
L838:
  add    $0x1,%eax
  cmp    %eax,%ebx
  jg     L696
  jmp    L253
  nopl   0x0(%rax,%rax,1)
L35:
  sub    $0x30,%esi
  cmp    $0x9,%sil
  jbe    L772
  add    $0x1,%eax
  cmp    %eax,%ebx
  jg     L654
  jmp    L253
  nopl   (%rax)
L660:
  add    $0x1,%eax
  cmp    %eax,%ebx
  jg     L596
  jmp    L253
L92:
  add    $0x1,%eax
  add    $0x1,%r13d
  cmp    %eax,%ebx
  jg     L860
  jmp    L709
L363:
  xor    %eax,%eax
  xor    %r13d,%r13d
  jmp    L312
L474:
  add    $0x1,%eax
  cmp    %eax,%ebx
  jg     L20
  jmp    L253
L25:
  add    $0x1,%eax
  cmp    %eax,%ebx
  jg     L452
  jmp    L253
L87:
  add    $0x1,%eax
  cmp    %eax,%ebx
  jg     L761
  jmp    L253
L305:
  add    $0x1,%eax
  cmp    %eax,%ebx
  jg     L841
  jmp    L253
L19:
  add    $0x1,%eax
  cmp    %eax,%ebx
  jg     L541
  jmp    L253
```

tool_calls: name: extract_symbolic_data
arguments: tag: D18
type_infered: string
name: extract_symbolic_data
arguments: tag: D29
type_infered: byte[16]
name: extract_symbolic_data
arguments: tag: D44
type_infered: byte[16]
name: extract_symbolic_data
arguments: tag: D73
type_infered: byte[16]
name: extract_symbolic_data
arguments: tag: D78
type_infered: byte[16]
name: extract_symbolic_data
arguments: tag: D62
type_infered: byte[16]
name: extract_symbolic_data
arguments: tag: D9
type_infered: byte[16]

tool: 

tool: {"D29": [0x19,0x19,0x19,0x19,0x19,0x19,0x19,0x19,0x19,0x19,0x19,0x19,0x19,0x19,0x19,0x19]}

tool: {"D44": [0xdf,0xdf,0xdf,0xdf,0xdf,0xdf,0xdf,0xdf,0xdf,0xdf,0xdf,0xdf,0xdf,0xdf,0xdf,0xdf]}

tool: {"D73": [0xbf,0xbf,0xbf,0xbf,0xbf,0xbf,0xbf,0xbf,0xbf,0xbf,0xbf,0xbf,0xbf,0xbf,0xbf,0xbf]}

tool: {"D78": [0xd0,0xd0,0xd0,0xd0,0xd0,0xd0,0xd0,0xd0,0xd0,0xd0,0xd0,0xd0,0xd0,0xd0,0xd0,0xd0]}

tool: {"D62": [0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09]}

tool: {"D9": [0x01,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x01,0x00,0x00,0x00]}

assistant: ```c
char *licenseKeyFormatting(char *S, int K) {
  int charNum = 0;
  int size = strlen(S);
  if (size == 0)
    return S;
  for (int i = 0; i < size; i++) {
    if (('a' <= S[i] && S[i] <= 'z') || ('A' <= S[i] && S[i] <= 'Z') || ('0' <= S[i] && S[i] <= '9'))
      charNum++;
  }
  if (charNum == 0)
    return "";
  int dashNum = charNum / K;
  if (charNum % K == 0)
    dashNum--;
  int resLen = dashNum + charNum;
  char *res = (char *)malloc((resLen + 1) * sizeof(char));
  res[resLen] = 0;
  int resIdx = resLen - 1;
  int cnt = 0;
  for (int i = size - 1; i >= 0 && resIdx >= 0; i--) {
    if ('a' <= S[i] && S[i] <= 'z') {
      res[resIdx] = S[i] - 'a' + 'A';
      resIdx--;
      cnt++;
    } else if (('A' <= S[i] && S[i] <= 'Z') || ('0' <= S[i] && S[i] <= '9')) {
      res[resIdx] = S[i];
      resIdx--;
      cnt++;
    }
    if (cnt == K && resIdx >= 0) {
      res[resIdx] = '-';
      resIdx--;
      cnt = 0;
    }
  }
  return res;
}
```