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

```asm
<fpattern_submatch>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x28,%rsp
  mov    %rdi,%rbp
  mov    %rsi,0x8(%rsp)
  mov    %edx,0x10(%rsp)
  mov    %ecx,%r13d
  movzbl (%rdi),%ebx
  test   %bl,%bl
  jne    L64
L231:
  cmpl   $0x0,0x10(%rsp)
  sete   %r12b
  movzbl %r12b,%r12d
  jmp    L651
L100:
  cmp    $0x21,%bl
  jne    L461
  mov    $0x0,%r12d
  cmpb   $0x0,0x1(%rbp)
  je     L651
  mov    %r13d,%ecx
  mov    0x10(%rsp),%edx
  mov    0x8(%rsp),%rsi
  mov    %r15,%rdi
  call   <fpattern_submatch>
  test   %eax,%eax
  sete   %r12b
  movzbl %r12b,%r12d
  jmp    L651
L676:
  cmp    $0x5c,%bl
  je     L503
  cmp    $0x7b,%bl
  jne    L461
  movl   $0x1,0x18(%rsp)
  cmpb   $0x21,0x1(%rbp)
  je     L551
L340:
  mov    0x18(%rsp),%eax
  mov    %eax,0x1c(%rsp)
  jmp    L38
L131:
  mov    0x10(%rsp),%ecx
  lea    0x1(%rcx),%ebp
  mov    $0x0,%ebx
  movslq %ecx,%rax
  mov    0x8(%rsp),%r14
  add    %rax,%r14
  mov    $0x0,%r12d
  test   %ecx,%ecx
  jns    L277
  jmp    L651
L489:
  addq   $0x1,0x8(%rsp)
  sub    $0x1,%eax
  mov    %eax,0x10(%rsp)
  mov    %r15,%rbp
L538:
  movzbl 0x0(%rbp),%ebx
  test   %bl,%bl
  je     L231
L64:
  mov    0x8(%rsp),%rax
  movsbl (%rax),%r14d
  lea    0x1(%rbp),%r15
  cmp    $0x5b,%bl
  je     L247
  jg     L676
  cmp    $0x2a,%bl
  je     L131
  cmp    $0x3f,%bl
  jne    L100
  mov    0x10(%rsp),%eax
  test   %eax,%eax
  jne    L489
  mov    0x10(%rsp),%r12d
  jmp    L651
L748:
  add    $0x1,%rbx
  cmp    %rbx,%rbp
  je     L651
L277:
  mov    %r14,%rsi
  sub    %rbx,%rsi
  mov    %r13d,%ecx
  mov    %ebx,%edx
  mov    %r15,%rdi
  call   <fpattern_submatch>
  mov    %eax,%r12d
  test   %eax,%eax
  je     L748
  mov    $0x1,%r12d
  jmp    L651
L503:
  movsbl 0x1(%rbp),%ebx
  mov    %r13d,%esi
  mov    %r14d,%edi
  call   <lowercase@plt>
  mov    %eax,%r12d
  mov    %r13d,%esi
  mov    %ebx,%edi
  call   <lowercase@plt>
  cmp    %eax,%r12d
  jne    L8
  test   %ebx,%ebx
  je     L8
  addq   $0x1,0x8(%rsp)
  subl   $0x1,0x10(%rsp)
  add    $0x2,%rbp
  jmp    L538
L247:
  movzbl 0x1(%rbp),%eax
  cmp    $0x21,%al
  je     L559
  cmp    $0x5d,%al
  je     L96
  test   %al,%al
  je     L96
  mov    $0x0,%r12d
  movl   $0x1,0x14(%rsp)
  jmp    L285
L559:
  lea    0x2(%rbp),%r15
  movzbl 0x2(%rbp),%eax
  test   %al,%al
  je     L313
  cmp    $0x5d,%al
  je     L313
  mov    $0x1,%r12d
  movl   $0x0,0x14(%rsp)
  jmp    L285
L668:
  movzbl 0x2(%r15),%eax
  lea    0x2(%r15),%rdx
  cmp    $0x5c,%al
  je     L621
L279:
  test   %al,%al
  je     L459
  lea    0x1(%rdx),%r15
  movsbl %al,%eax
  mov    %eax,0x4(%rsp)
  jmp    L644
L621:
  lea    0x3(%r15),%rdx
  movzbl 0x3(%r15),%eax
  jmp    L279
L534:
  movzbl (%r15),%eax
  cmp    $0x5d,%al
  je     L58
  test   %al,%al
  je     L58
L285:
  cmp    $0x5c,%al
  sete   %al
  movzbl %al,%eax
  add    %rax,%r15
  movzbl (%r15),%ebx
  test   %bl,%bl
  je     L709
  movsbl %bl,%ebx
  cmpb   $0x2d,0x1(%r15)
  je     L668
  add    $0x1,%r15
  mov    %ebx,0x4(%rsp)
L644:
  cmpb   $0x0,(%r15)
  je     L409
  mov    %r13d,%esi
  mov    %r14d,%edi
  call   <lowercase@plt>
  mov    %eax,%ebp
  mov    %r13d,%esi
  mov    %ebx,%edi
  call   <lowercase@plt>
  cmp    %eax,%ebp
  jl     L534
  mov    %r13d,%esi
  mov    %r14d,%edi
  call   <lowercase@plt>
  mov    %eax,%ebx
  mov    %r13d,%esi
  mov    0x4(%rsp),%edi
  call   <lowercase@plt>
  cmp    %eax,%ebx
  cmovle 0x14(%rsp),%r12d
  jmp    L534
L459:
  mov    %rdx,%r15
L58:
  test   %r12d,%r12d
  je     L651
L313:
  cmpb   $0x0,(%r15)
  je     L437
  addq   $0x1,0x8(%rsp)
  subl   $0x1,0x10(%rsp)
  lea    0x1(%r15),%rbp
  jmp    L538
L551:
  lea    0x2(%rbp),%r15
  movl   $0x0,0x18(%rsp)
  jmp    L340
L677:
  movzbl 0x2(%rbx),%eax
  lea    0x2(%rbx),%rdx
  cmp    $0x5c,%al
  je     L470
L61:
  test   %al,%al
  je     L799
  lea    0x1(%rdx),%rbx
  movsbl %al,%eax
  mov    %eax,0x4(%rsp)
  jmp    L69
L470:
  lea    0x3(%rbx),%rdx
  movzbl 0x3(%rbx),%eax
  jmp    L61
L62:
  movzbl (%rbx),%eax
  cmp    $0x7d,%al
  je     L585
  test   %al,%al
  je     L585
L360:
  cmp    $0x5c,%al
  sete   %al
  movzbl %al,%eax
  add    %rax,%rbx
  movzbl (%rbx),%ebp
  test   %bpl,%bpl
  je     L82
  movsbl %bpl,%ebp
  cmpb   $0x2d,0x1(%rbx)
  je     L677
  add    $0x1,%rbx
  mov    %ebp,0x4(%rsp)
L69:
  cmpb   $0x0,(%rbx)
  je     L793
  mov    %r13d,%esi
  mov    %r14d,%edi
  call   <lowercase@plt>
  mov    %eax,%r12d
  mov    %r13d,%esi
  mov    %ebp,%edi
  call   <lowercase@plt>
  cmp    %eax,%r12d
  jl     L62
  mov    %r13d,%esi
  mov    %r14d,%edi
  call   <lowercase@plt>
  mov    %eax,%ebp
  mov    %r13d,%esi
  mov    0x4(%rsp),%edi
  call   <lowercase@plt>
  cmp    %eax,%ebp
  jg     L62
  movzbl (%rbx),%eax
  cmp    $0x7d,%al
  je     L614
  test   %al,%al
  je     L614
L316:
  add    $0x1,%rbx
  movzbl (%rbx),%eax
  cmp    $0x7d,%al
  je     L9
  test   %al,%al
  jne    L316
L9:
  mov    0x1c(%rsp),%eax
  mov    %eax,0x14(%rsp)
  jmp    L585
L568:
  mov    %r15,%rbx
  jmp    L585
L799:
  mov    %rdx,%rbx
L585:
  cmpb   $0x0,(%rbx)
  je     L109
  cmpl   $0x0,0x14(%rsp)
  je     L491
  addq   $0x1,0x8(%rsp)
  mov    0x8(%rsp),%rax
  subl   $0x1,0x10(%rsp)
  mov    0x10(%rsp),%ecx
  movsbl (%rax),%r14d
  test   %ecx,%ecx
  jle    L491
L38:
  mov    0x18(%rsp),%eax
  xor    $0x1,%eax
  mov    %eax,0x14(%rsp)
  movzbl (%r15),%eax
  cmp    $0x7d,%al
  je     L568
  test   %al,%al
  je     L568
  mov    %r15,%rbx
  jmp    L360
L614:
  mov    0x1c(%rsp),%eax
  mov    %eax,0x14(%rsp)
  jmp    L585
L461:
  mov    %r13d,%esi
  mov    %r14d,%edi
  call   <lowercase@plt>
  mov    %eax,%ebp
  movsbl %bl,%edi
  mov    %r13d,%esi
  call   <lowercase@plt>
  cmp    %eax,%ebp
  jne    L88
  addq   $0x1,0x8(%rsp)
  subl   $0x1,0x10(%rsp)
  mov    %r15,%rbp
  jmp    L538
L8:
  mov    $0x0,%r12d
  jmp    L651
L709:
  mov    $0x0,%r12d
  jmp    L651
L409:
  mov    $0x0,%r12d
  jmp    L651
L437:
  mov    $0x0,%r12d
  jmp    L651
L82:
  mov    $0x0,%r12d
L651:
  mov    %r12d,%eax
  add    $0x28,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L793:
  mov    $0x0,%r12d
  jmp    L651
L109:
  mov    $0x0,%r12d
  jmp    L651
L88:
  mov    $0x0,%r12d
  jmp    L651
L96:
  mov    $0x0,%r12d
  jmp    L651
L491:
  lea    0x1(%rbx),%rbp
  jmp    L538
```

assistant: ```c
int fpattern_submatch(const char *pat, const char *fname, int flength, int keepcase) {
  int fch;
  int pch;
  int i;
  int yes, match;
  int lo, hi;
  while (*pat != '\0') {
    fch = *fname;
    pch = *pat;
    pat++;
    switch (pch) {
    case '?':
      if (flength == 0)
        return (0);
      fname++;
      flength--;
      break;
    case '*':
      i = flength;
      while (i >= 0) {
        if (fpattern_submatch(pat, fname + i, flength - i, keepcase))
          return (1);
        i--;
      }
      return (0);
    case '\\':
      pch = *pat;
      if (lowercase(fch, keepcase) != lowercase(pch, keepcase) || pch == '\0')
        return (0);
      fname++;
      flength--;
      pat++;
      break;
    case '[':
      yes = 1;
      if (*pat == '!') {
        pat++;
        yes = 0;
      }
      match = !yes;
      while (*pat != ']' && *pat != '\0') {
        if (*pat == '\\')
          pat++;
        if (*pat == '\0')
          break;
        lo = *pat++;
        hi = lo;
        if (*pat == '-') {
          pat++;
          if (*pat == '\\')
            pat++;
          if (*pat == '\0')
            break;
          hi = *pat++;
        }
        if (*pat == '\0')
          break;
        if (lowercase(fch, keepcase) >= lowercase(lo, keepcase) && lowercase(fch, keepcase) <= lowercase(hi, keepcase))
          match = yes;
      }
      if (!match)
        return (0);
      if (*pat == '\0')
        return (0);
      fname++;
      flength--;
      pat++;
      break;
    case '{':
      yes = 1;
      if (*pat == '!') {
        pat++;
        yes = 0;
      }
      do {
        const char *org_pat = pat;
        match = !yes;
        while (*pat != '}' && *pat != '\0') {
          if (*pat == '\\')
            pat++;
          if (*pat == '\0')
            break;
          lo = *pat++;
          hi = lo;
          if (*pat == '-') {
            pat++;
            if (*pat == '\\')
              pat++;
            if (*pat == '\0')
              break;
            hi = *pat++;
          }
          if (*pat == '\0')
            break;
          if (lowercase(fch, keepcase) >= lowercase(lo, keepcase) && lowercase(fch, keepcase) <= lowercase(hi, keepcase)) {
            match = yes;
            while (*pat != '}' && *pat != '\0')
              pat++;
            break;
          }
        }
        if (*pat == '\0')
          return (0);
        if (match) {
          fname++;
          flength--;
          fch = *fname;
          if (flength > 0)
            pat = org_pat;
        }
      } while (match && flength > 0);
      pat++;
      break;
    case '!':
      if (*pat == '\0')
        return (0);
      i = fpattern_submatch(pat, fname, flength, keepcase);
      return !i;
    default:
      if (lowercase(fch, keepcase) != lowercase(pch, keepcase))
        return (0);
      fname++;
      flength--;
      break;
    }
  }
  if (flength != 0)
    return (0);
  return (1);
}
```