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

```asm
<mysql_query_digest_and_first_comment>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x28,%rsp
  mov    %rdi,%rbx
  mov    %esi,%r15d
  mov    %rdx,0x18(%rsp)
  lea    0x1(%rsi),%edi
  call   <malloc@plt>
  mov    %rax,0x10(%rsp)
  test   %r15d,%r15d
  jle    L142
  mov    %rax,%rbp
  mov    %rax,(%rsp)
  movb   $0x0,0xf(%rsp)
  movl   $0x0,0x8(%rsp)
  movb   $0x0,0xe(%rsp)
  mov    $0x0,%r13d
  movb   $0x0,0xd(%rsp)
  mov    $0x0,%r14d
  mov    $0x0,%r12d
  jmp    L289
L241:
  cmpb   $0x2a,(%rbx)
  jne    L372
  mov    %rbp,(%rsp)
  mov    $0x1,%r13d
  jmp    L336
L3:
  movsbl (%rbx),%edi
  call   <is_digit_char@plt>
  test   %rax,%rax
  je     L318
  lea    0x1(%r12),%eax
  cmp    %r15d,%eax
  je     L35
  mov    %rbp,(%rsp)
  mov    $0x4,%r13d
  jmp    L336
L639:
  movsbl (%rbx),%edi
  call   <is_space_char@plt>
  test   %rax,%rax
  je     L561
  add    $0x1,%rbx
  add    $0x1,%r12d
  movzbl 0xf(%rsp),%r13d
  mov    %rbp,(%rsp)
  jmp    L217
L134:
  cmp    $0x1,%r13b
  je     L4
  cmp    $0x2,%r13b
  je     L257
  cmp    $0x3,%r13b
  jne    L210
  lea    0x1(%r12),%eax
  cmp    %r15d,%eax
  je     L636
  mov    (%rsp),%rcx
  lea    0x1(%rcx),%rdx
  cmp    %rbp,%rdx
  jae    L192
  cmp    $0x5c,%r14b
  je     L380
  cmp    0xd(%rsp),%r14b
  je     L148
L192:
  movzbl 0xd(%rsp),%esi
  cmp    %sil,(%rbx)
  jne    L336
  cmp    %sil,0x1(%rbx)
  je     L336
  mov    (%rsp),%rsi
  movb   $0x3f,(%rsi)
  add    $0x1,%rbx
  mov    %rdx,%rbp
  mov    %eax,%r12d
  mov    $0x0,%r13d
  jmp    L217
L4:
  cmpb   $0x1,0xe(%rsp)
  ja     L227
  cmpl   $0x3fe,0x8(%rsp)
  jle    L233
L549:
  mov    %r13b,0xe(%rsp)
  cmp    $0x2a,%r14b
  jne    L336
  cmpb   $0x2f,(%rbx)
  jne    L336
  mov    0x8(%rsp),%ecx
  lea    -0x2(%rcx),%eax
  cmp    $0x1,%ecx
  cmovle %ecx,%eax
  mov    %eax,0x8(%rsp)
  cltq
  mov    0x18(%rsp),%rsi
  movb   $0x0,(%rsi,%rax,1)
  movb   $0x2,0xe(%rsp)
  jmp    L519
L233:
  movsbl (%rbx),%edi
  call   <is_space_char@plt>
  mov    %rax,%rdx
  mov    $0x20,%eax
  test   %rdx,%rdx
  jne    L572
  movzbl (%rbx),%eax
L572:
  mov    0x8(%rsp),%ecx
  movslq %ecx,%rdx
  mov    0x18(%rsp),%rsi
  mov    %al,(%rsi,%rdx,1)
  add    $0x1,%ecx
  mov    %ecx,0x8(%rsp)
  jmp    L549
L257:
  movzbl (%rbx),%eax
  cmp    $0xa,%al
  je     L105
  cmp    $0xd,%al
  jne    L336
L105:
  mov    (%rsp),%rbp
L271:
  add    $0x1,%rbx
  add    $0x1,%r12d
  mov    $0x0,%r13d
  mov    $0x20,%r14d
  jmp    L217
L636:
  mov    (%rsp),%rax
  lea    0x1(%rax),%rbp
  movb   $0x3f,(%rax)
L312:
  cmp    0x10(%rsp),%rbp
  jbe    L298
  cmpb   $0x20,-0x1(%rbp)
  je     L208
L298:
  movb   $0x0,0x0(%rbp)
  mov    0x10(%rsp),%rax
  add    $0x28,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L380:
  movzbl (%rbx),%ecx
  cmp    0xd(%rsp),%cl
  je     L127
  cmp    $0x5c,%cl
  je     L127
  cmp    0xd(%rsp),%r14b
  jne    L192
  jmp    L336
L148:
  movzbl 0xd(%rsp),%esi
  cmp    %sil,(%rbx)
  jne    L336
L127:
  add    $0x1,%rbx
  mov    %eax,%r12d
  mov    $0x58,%r14d
  jmp    L217
L210:
  cmp    $0x4,%r13b
  jne    L336
  cmp    (%rsp),%rbp
  je     L670
  movsbl (%rbx),%edi
  call   <is_token_char@plt>
  test   %rax,%rax
  jne    L688
  lea    0x1(%r12),%eax
  cmp    %r15d,%eax
  jne    L336
  mov    %rbp,%rsi
  mov    (%rsp),%rdi
  call   <is_digit_string@plt>
  test   %rax,%rax
  jne    L546
  mov    $0x0,%r13d
  jmp    L336
L670:
  movb   $0x3f,0x0(%rbp)
  add    $0x1,%r12d
  lea    0x1(%rbp),%rbp
  jmp    L217
L688:
  mov    %rbp,%rsi
  mov    (%rsp),%r14
  mov    %r14,%rdi
  call   <is_digit_string@plt>
  test   %rax,%rax
  je     L288
  lea    0x1(%r14),%rbp
  movb   $0x3f,(%r14)
  lea    0x1(%r12),%eax
  cmp    %r15d,%eax
  je     L550
  mov    $0x0,%r13d
  jmp    L336
L441:
  mov    %rbp,(%rsp)
  mov    $0x2,%r13d
  jmp    L336
L508:
  mov    %al,0xd(%rsp)
  mov    %rbp,(%rsp)
  mov    $0x3,%r13d
L336:
  movsbl (%rbx),%edi
  call   <is_space_char@plt>
  mov    %rax,%rdx
  mov    $0x20,%eax
  test   %rdx,%rdx
  jne    L676
  movzbl (%rbx),%eax
L676:
  mov    %al,0x0(%rbp)
  movzbl (%rbx),%r14d
  add    $0x1,%r12d
  lea    0x1(%rbp),%rbp
  lea    0x1(%rbx),%rbx
L217:
  cmp    %r15d,%r12d
  jge    L312
L289:
  test   %r13b,%r13b
  jne    L134
  cmp    $0x2f,%r14b
  je     L241
L372:
  movzbl (%rbx),%eax
  cmp    $0x23,%al
  je     L441
  cmp    $0x27,%al
  je     L508
  cmp    $0x22,%al
  je     L508
  movsbl %r14b,%eax
  mov    %eax,(%rsp)
  mov    %eax,%edi
  call   <is_token_char@plt>
  test   %rax,%rax
  jne    L3
L318:
  cmpb   $0x0,0xf(%rsp)
  je     L639
L561:
  mov    (%rsp),%edi
  call   <is_space_char@plt>
  mov    %rbp,(%rsp)
  movb   $0x1,0xf(%rsp)
  test   %rax,%rax
  je     L336
  movsbl (%rbx),%edi
  call   <is_space_char@plt>
  mov    %rbp,(%rsp)
  movb   $0x1,0xf(%rsp)
  test   %rax,%rax
  je     L336
  movb   $0x20,0x0(%rbp)
  add    $0x1,%rbx
  add    $0x1,%r12d
  mov    $0x20,%r14d
  jmp    L217
L288:
  mov    $0x0,%r13d
  jmp    L336
L35:
  mov    %rbp,(%rsp)
  mov    $0x4,%r13d
  jmp    L217
L208:
  movb   $0x0,-0x1(%rbp)
  jmp    L298
L142:
  mov    0x10(%rsp),%rbp
  jmp    L298
L546:
  mov    (%rsp),%rax
  lea    0x1(%rax),%rbp
  movb   $0x3f,(%rax)
L550:
  movsbl (%rbx),%edi
  call   <is_token_char@plt>
  test   %rax,%rax
  je     L312
  mov    (%rsp),%rcx
  lea    0x2(%rcx),%rbp
  movzbl (%rbx),%eax
  mov    %al,0x1(%rcx)
  jmp    L312
L227:
  cmp    $0x2a,%r14b
  jne    L336
L519:
  cmpb   $0x2f,(%rbx)
  jne    L336
  mov    (%rsp),%rax
  lea    -0x1(%rax),%rbp
  jmp    L271
```

assistant: ```c
char *mysql_query_digest_and_first_comment(char *s, int len, char *first_comment) {
  int i = 0;
  char *r = (char *)malloc(len + sizeof(char));
  char *p_r = r;
  char *p_r_t = r;
  char prev_char = 0;
  char qutr_char = 0;
  char flag = 0;
  char fc = 0;
  int fc_len = 0;
  char fns = 0;
  while (i < len) {
    if (flag == 0) {
      p_r_t = p_r;
      if (prev_char == '/' && *s == '*') {
        flag = 1;
      } else if (*s == '#') {
        flag = 2;
      } else if (*s == '\'' || *s == '"') {
        flag = 3;
        qutr_char = *s;
      } else if (is_token_char(prev_char) && is_digit_char(*s)) {
        flag = 4;
        if (len == i + 1)
          continue;
      } else {
        flag = 0;
        if (fns == 0 && is_space_char(*s)) {
          s++;
          i++;
          continue;
        }
        if (fns == 0)
          fns = 1;
        if (is_space_char(prev_char) && is_space_char(*s)) {
          prev_char = ' ';
          *p_r = ' ';
          s++;
          i++;
          continue;
        }
      }
    } else {
      if (flag == 1) {
        if (fc == 0) {
          fc = 1;
        }
        if (fc == 1) {
          if (fc_len < 1024 - 1) {
            first_comment[fc_len] = !is_space_char(*s) ? *s : ' ';
            fc_len++;
          }
          if (prev_char == '*' && *s == '/') {
            if (fc_len >= 2)
              fc_len -= 2;
            first_comment[fc_len] = 0;
            fc = 2;
          }
        }
      }
      if ((flag == 1 && prev_char == '*' && *s == '/') || (flag == 2 && (*s == '\n' || *s == '\r'))) {
        p_r = flag == 1 ? p_r_t - sizeof(char) : p_r_t;
        prev_char = ' ';
        flag = 0;
        s++;
        i++;
        continue;
      } else if (flag == 3) {
        if (len == i + 1) {
          p_r = p_r_t;
          *p_r++ = '?';
          flag = 0;
          break;
        }
        if (p_r > p_r_t + sizeof(char)) {
          if ((prev_char == '\\' && *s == '\\') || (prev_char == '\\' && *s == qutr_char) || (prev_char == qutr_char && *s == qutr_char)) {
            prev_char = 'X';
            s++;
            i++;
            continue;
          }
        }
        if (*s == qutr_char && (len == i + 1 || *(s + sizeof(char)) != qutr_char)) {
          p_r = p_r_t;
          *p_r++ = '?';
          flag = 0;
          if (i < len)
            s++;
          i++;
          continue;
        }
      } else if (flag == 4) {
        if (p_r_t == p_r) {
          *p_r++ = '?';
          i++;
          continue;
        }
        if (is_token_char(*s) || len == i + 1) {
          if (is_digit_string(p_r_t, p_r)) {
            p_r = p_r_t;
            *p_r++ = '?';
            if (len == i + 1) {
              if (is_token_char(*s))
                *p_r++ = *s;
              i++;
              continue;
            }
          }
          flag = 0;
        }
      }
    }
    *p_r++ = !is_space_char(*s) ? *s : ' ';
    prev_char = *s++;
    i++;
  }
  if (p_r > r) {
    char *e = p_r;
    e--;
    if (*e == ' ') {
      *e = 0;
    }
  }
  *p_r = 0;
  return r;
}
```