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

```asm
<check_for_comma>:
  endbr64
  test   %rdi,%rdi
  je     L57
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  mov    %rdi,%rbp
  push   %rbx
  mov    (%rdi),%rbx
  mov    %rbx,%rdi
  call   <strlen@plt>
  mov    %eax,%ecx
  test   %eax,%eax
  jle    L292
  lea    -0x1(%rax),%r12d
  cmp    $0xe,%r12d
  jbe    L407
  mov    %ecx,%edx
  pxor   %xmm1,%xmm1
  pxor   %xmm5,%xmm5
  mov    %rbx,%rax
  shr    $0x4,%edx
  movdqa D25(%rip),%xmm7
  movdqa D21(%rip),%xmm6
  pxor   %xmm4,%xmm4
  sub    $0x1,%edx
  shl    $0x4,%rdx
  lea    0x10(%rbx,%rdx,1),%rdx
  nopl   0x0(%rax,%rax,1)
L641:
  movdqu (%rax),%xmm0
  movdqa %xmm5,%xmm3
  add    $0x10,%rax
  pcmpeqb %xmm7,%xmm0
  pand   %xmm6,%xmm0
  pcmpgtb %xmm0,%xmm3
  movdqa %xmm0,%xmm2
  punpcklbw %xmm3,%xmm2
  punpckhbw %xmm3,%xmm0
  movdqa %xmm4,%xmm3
  pcmpgtw %xmm2,%xmm3
  movdqa %xmm2,%xmm8
  punpcklwd %xmm3,%xmm8
  punpckhwd %xmm3,%xmm2
  movdqa %xmm0,%xmm3
  paddd  %xmm8,%xmm1
  paddd  %xmm2,%xmm1
  movdqa %xmm4,%xmm2
  pcmpgtw %xmm0,%xmm2
  punpcklwd %xmm2,%xmm3
  punpckhwd %xmm2,%xmm0
  paddd  %xmm3,%xmm1
  paddd  %xmm0,%xmm1
  cmp    %rdx,%rax
  jne    L641
  movdqa %xmm1,%xmm0
  mov    %ecx,%edx
  psrldq $0x8,%xmm0
  and    $0xfffffff0,%edx
  paddd  %xmm0,%xmm1
  movdqa %xmm1,%xmm0
  psrldq $0x4,%xmm0
  paddd  %xmm0,%xmm1
  movd   %xmm1,%eax
  test   $0xf,%cl
  je     L62
L371:
  movslq %edx,%rsi
  cmpb   $0x2c,(%rbx,%rsi,1)
  je     L220
  add    $0x1,%edx
  cmp    %ecx,%edx
  jge    L62
  movslq %edx,%rsi
  cmpb   $0x2c,(%rbx,%rsi,1)
  je     L628
L353:
  add    $0x1,%edx
  cmp    %ecx,%edx
  jge    L62
  movslq %edx,%rsi
  cmpb   $0x2c,(%rbx,%rsi,1)
  je     L478
L612:
  add    $0x1,%edx
  cmp    %edx,%ecx
  jle    L62
  movslq %edx,%rsi
  cmpb   $0x2c,(%rbx,%rsi,1)
  je     L672
L255:
  add    $0x1,%edx
  cmp    %edx,%ecx
  jle    L62
  movslq %edx,%rsi
  cmpb   $0x2c,(%rbx,%rsi,1)
  je     L606
L246:
  add    $0x1,%edx
  cmp    %edx,%ecx
  jle    L62
  movslq %edx,%rsi
  cmpb   $0x2c,(%rbx,%rsi,1)
  je     L47
L646:
  add    $0x1,%edx
  cmp    %edx,%ecx
  jle    L62
L652:
  movslq %edx,%rsi
  cmpb   $0x2c,(%rbx,%rsi,1)
  je     L409
  add    $0x1,%edx
  cmp    %edx,%ecx
  jle    L62
L423:
  movslq %edx,%rsi
  cmpb   $0x2c,(%rbx,%rsi,1)
  je     L502
  add    $0x1,%edx
  cmp    %edx,%ecx
  jle    L62
L25:
  movslq %edx,%rsi
  cmpb   $0x2c,(%rbx,%rsi,1)
  je     L35
  add    $0x1,%edx
  cmp    %edx,%ecx
  jle    L62
L640:
  movslq %edx,%rsi
  cmpb   $0x2c,(%rbx,%rsi,1)
  je     L604
  add    $0x1,%edx
  cmp    %edx,%ecx
  jle    L62
L48:
  movslq %edx,%rsi
  cmpb   $0x2c,(%rbx,%rsi,1)
  je     L200
  add    $0x1,%edx
  cmp    %edx,%ecx
  jle    L62
L30:
  movslq %edx,%rsi
  cmpb   $0x2c,(%rbx,%rsi,1)
  je     L562
  add    $0x1,%edx
  cmp    %edx,%ecx
  jle    L62
L403:
  movslq %edx,%rsi
  cmpb   $0x2c,(%rbx,%rsi,1)
  je     L456
  add    $0x1,%edx
  cmp    %edx,%ecx
  jle    L62
L308:
  movslq %edx,%rsi
  cmpb   $0x2c,(%rbx,%rsi,1)
  je     L283
  add    $0x1,%edx
  cmp    %edx,%ecx
  jle    L62
L184:
  movslq %edx,%rdx
  cmpb   $0x2c,(%rbx,%rdx,1)
  sete   %dl
  movzbl %dl,%edx
  add    %edx,%eax
L62:
  test   %eax,%eax
  je     L292
L12:
  cmp    $0x40,%eax
  jg     L83
  lea    (%rcx,%rax,1),%r14d
  lea    0x1(%r14),%edi
  call   <malloc@plt>
  mov    %rax,%r13
  test   %rax,%rax
  je     L292
  lea    0x1(%rbx,%r12,1),%rsi
  xor    %eax,%eax
L129:
  movzbl (%rbx),%edx
  movslq %eax,%rcx
  mov    %dl,0x0(%r13,%rcx,1)
  cmp    $0x2c,%dl
  je     L650
  add    $0x1,%rbx
  add    $0x1,%eax
  cmp    %rbx,%rsi
  jne    L129
L287:
  movslq %r14d,%rax
  movb   $0x0,0x0(%r13,%rax,1)
  mov    0x0(%rbp),%rdi
  call   <free@plt>
  mov    %r13,0x0(%rbp)
L292:
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  ret
  nopl   0x0(%rax,%rax,1)
L650:
  lea    0x1(%rax),%edx
  add    $0x1,%rbx
  add    $0x2,%eax
  movslq %edx,%rdx
  movb   $0x2c,0x0(%r13,%rdx,1)
  cmp    %rsi,%rbx
  jne    L129
  jmp    L287
  nopw   0x0(%rax,%rax,1)
L57:
  ret
  nopl   0x0(%rax)
L220:
  add    $0x1,%edx
  add    $0x1,%eax
  cmp    %edx,%ecx
  jle    L12
  movslq %edx,%rsi
  cmpb   $0x2c,(%rbx,%rsi,1)
  jne    L353
L628:
  add    $0x1,%edx
  add    $0x1,%eax
  cmp    %edx,%ecx
  jle    L12
  movslq %edx,%rsi
  cmpb   $0x2c,(%rbx,%rsi,1)
  jne    L612
L478:
  add    $0x1,%edx
  add    $0x1,%eax
  cmp    %edx,%ecx
  jle    L12
  movslq %edx,%rsi
  cmpb   $0x2c,(%rbx,%rsi,1)
  jne    L255
L672:
  add    $0x1,%edx
  add    $0x1,%eax
  cmp    %edx,%ecx
  jle    L12
  movslq %edx,%rsi
  cmpb   $0x2c,(%rbx,%rsi,1)
  jne    L246
L606:
  add    $0x1,%edx
  add    $0x1,%eax
  cmp    %edx,%ecx
  jle    L12
  movslq %edx,%rsi
  cmpb   $0x2c,(%rbx,%rsi,1)
  jne    L646
L47:
  add    $0x1,%edx
  add    $0x1,%eax
  cmp    %edx,%ecx
  jg     L652
  jmp    L12
  nopw   0x0(%rax,%rax,1)
L409:
  add    $0x1,%edx
  add    $0x1,%eax
  cmp    %edx,%ecx
  jg     L423
  jmp    L12
  nopl   0x0(%rax,%rax,1)
L83:
  pop    %rbx
  lea    D24(%rip),%rdi
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  jmp    10a0 <printf@plt>
  nopl   0x0(%rax)
L502:
  add    $0x1,%edx
  add    $0x1,%eax
  cmp    %edx,%ecx
  jg     L25
  jmp    L12
  nopl   0x0(%rax,%rax,1)
L35:
  add    $0x1,%edx
  add    $0x1,%eax
  cmp    %edx,%ecx
  jg     L640
  jmp    L12
  nopl   0x0(%rax,%rax,1)
L604:
  add    $0x1,%edx
  add    $0x1,%eax
  cmp    %edx,%ecx
  jg     L48
  jmp    L12
L200:
  add    $0x1,%edx
  add    $0x1,%eax
  cmp    %edx,%ecx
  jg     L30
  jmp    L12
L407:
  xor    %eax,%eax
  xor    %edx,%edx
  jmp    L371
L562:
  add    $0x1,%edx
  add    $0x1,%eax
  cmp    %edx,%ecx
  jg     L403
  jmp    L12
L456:
  add    $0x1,%edx
  add    $0x1,%eax
  cmp    %edx,%ecx
  jg     L308
  jmp    L12
L283:
  add    $0x1,%edx
  add    $0x1,%eax
  cmp    %edx,%ecx
  jg     L184
  jmp    L12
```

tool_calls: name: disassemble_data
arguments: data_label: D25
type_infered: byte[16]
name: disassemble_data
arguments: data_label: D21
type_infered: byte[16]
name: disassemble_data
arguments: data_label: D24
type_infered: string

tool: {"D25": [0x2c,0x2c,0x2c,0x2c,0x2c,0x2c,0x2c,0x2c,0x2c,0x2c,0x2c,0x2c,0x2c,0x2c,0x2c,0x2c]}

tool: {"D21": [0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01]}

tool: D24: 
Invalid password. Password contains too many commas.


assistant: ```c
void check_for_comma(char **ppasswrd) {
  char *new_pass_buf;
  char *pass;
  int i, j;
  int number_of_commas = 0;
  int len;
  if (ppasswrd == NULL)
    return;
  else
    (pass = *ppasswrd);
  len = strlen(pass);
  for (i = 0; i < len; i++) {
    if (pass[i] == ',')
      number_of_commas++;
  }
  if (number_of_commas == 0)
    return;
  if (number_of_commas > 64) {
    printf("\nInvalid password. Password contains too many commas.\n");
    return;
  }
  new_pass_buf = malloc(len + number_of_commas + 1);
  if (new_pass_buf == NULL)
    return;
  for (i = 0, j = 0; i < len; i++, j++) {
    new_pass_buf[j] = pass[i];
    if (pass[i] == ',') {
      j++;
      new_pass_buf[j] = pass[i];
    }
  }
  new_pass_buf[len + number_of_commas] = 0;
  free(*ppasswrd);
  *ppasswrd = new_pass_buf;
  return;
}
```