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

```asm
<WildComp2>:
  endbr64
  push   %r15
  push   %r14
  mov    %rdi,%r14
  push   %r13
  mov    %rsi,%r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x18,%rsp
  call   <strlen@plt>
  mov    %r13,%rdi
  mov    %rax,%rbp
  mov    %eax,%r12d
  call   <strlen@plt>
  test   %ebp,%ebp
  je     L229
  test   %eax,%eax
  je     L104
  cmp    %eax,%ebp
  cmovl  %eax,%ebp
  test   %ebp,%ebp
  jle    L318
  xor    %r12d,%r12d
  xor    %ebx,%ebx
L219:
  movslq %ebx,%rax
  movsbl (%r14,%rax,1),%edi
  call   <toupper@plt>
  mov    %eax,%r15d
  movslq %r12d,%rax
  movsbl 0x0(%r13,%rax,1),%edi
  call   <toupper@plt>
  cmp    %eax,%r15d
  je     L36
  test   %r15d,%r15d
  je     L403
  test   %eax,%eax
  je     L66
  cmp    $0x2a,%r15d
  je     L361
  cmp    $0x2a,%eax
  je     L258
  cmp    $0x3f,%r15d
  je     L36
  cmp    $0x3f,%eax
  mov    %eax,(%rsp)
  je     L36
  mov    %r15d,%edi
  call   <toupper@plt>
  mov    (%rsp),%edi
  mov    %eax,%r15d
  call   <toupper@plt>
  cmp    %eax,%r15d
  jne    L340
L36:
  add    $0x1,%r12d
L52:
  add    $0x1,%ebx
  cmp    %ebx,%ebp
  jg     L219
  nopl   0x0(%rax)
L118:
  xor    %r12d,%r12d
  cmp    %ebx,%ebp
  sete   %r12b
L331:
  add    $0x18,%rsp
  mov    %r12d,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   0x0(%rax,%rax,1)
L104:
  test   %ebp,%ebp
  je     L229
  xor    %r12d,%r12d
  test   %eax,%eax
  jne    L331
  cmp    $0x1,%ebp
  je     L43
  cmp    $0x2,%ebp
  jne    L331
  cmpb   $0x2e,(%r14)
  jne    L331
  xor    %r12d,%r12d
  cmpb   $0x2a,0x1(%r14)
  sete   %r12b
  jmp    L331
  nopl   0x0(%rax)
L361:
  add    $0x1,%ebx
  mov    %eax,0xc(%rsp)
  movslq %ebx,%rax
  movsbl (%r14,%rax,1),%edi
  test   %dil,%dil
  je     L227
  call   <toupper@plt>
  add    $0x1,%r12d
  movslq %r12d,%r15
  mov    %eax,(%rsp)
  cmpb   $0x0,0x0(%r13,%r15,1)
  je     L118
  cmp    %r12d,%ebp
  mov    0xc(%rsp),%r8d
  jg     L251
  jmp    L135
  nopw   0x0(%rax,%rax,1)
L486:
  add    $0x1,%r15
  cmp    %r15d,%ebp
  jle    L118
L251:
  movsbl 0x0(%r13,%r15,1),%edi
  mov    %r15d,%r12d
  call   <toupper@plt>
  mov    %eax,%r8d
  cmp    %eax,(%rsp)
  je     L36
  test   %eax,%eax
  jne    L486
L135:
  cmp    (%rsp),%r8d
  je     L36
  xor    %r12d,%r12d
  cmp    %ebx,%ebp
  sete   %r12b
  jmp    L331
  nopl   0x0(%rax,%rax,1)
L229:
  cmp    $0x1,%eax
  je     L129
  cmp    $0x2,%eax
  jne    L331
  cmpb   $0x2e,0x0(%r13)
  jne    L331
  xor    %r12d,%r12d
  cmpb   $0x2a,0x1(%r13)
  sete   %r12b
  jmp    L331
  cs nopw 0x0(%rax,%rax,1)
L258:
  lea    0x1(%r12),%eax
  cltq
  movsbl 0x0(%r13,%rax,1),%edi
  test   %dil,%dil
  je     L227
  call   <toupper@plt>
  add    $0x1,%ebx
  movslq %ebx,%rdx
  mov    %eax,0xc(%rsp)
  add    %r14,%rdx
  cmpb   $0x0,(%rdx)
  je     L118
  cmp    %ebx,%ebp
  jg     L29
  nopl   (%rax)
L84:
  cmp    0xc(%rsp),%r15d
  jne    L118
  nopl   0x0(%rax,%rax,1)
L196:
  add    $0x2,%r12d
  jmp    L52
  nopl   0x0(%rax)
L291:
  test   %eax,%eax
  je     L84
  mov    (%rsp),%rdx
  add    $0x1,%ebx
  add    $0x1,%rdx
  cmp    %ebx,%ebp
  je     L118
L29:
  movsbl (%rdx),%edi
  mov    %rdx,(%rsp)
  call   <toupper@plt>
  mov    %eax,%r15d
  cmp    %eax,0xc(%rsp)
  jne    L291
  jmp    L196
  cs nopw 0x0(%rax,%rax,1)
L129:
  xor    %r12d,%r12d
  cmpb   $0x2a,0x0(%r13)
  sete   %r12b
  jmp    L331
L318:
  xor    %ebx,%ebx
  jmp    L118
  nopl   0x0(%rax,%rax,1)
L43:
  xor    %r12d,%r12d
  cmpb   $0x2a,(%r14)
  sete   %r12b
  jmp    L331
L403:
  cmp    $0x2a,%eax
  jne    L118
  lea    0x1(%r12),%eax
  mov    $0x1,%r12d
  cltq
  cmpb   $0x0,0x0(%r13,%rax,1)
  je     L331
  jmp    L118
  nopw   0x0(%rax,%rax,1)
L66:
  cmp    $0x2a,%r15d
  jne    L118
  add    $0x1,%ebx
  mov    $0x1,%r12d
  movslq %ebx,%rax
  cmpb   $0x0,(%r14,%rax,1)
  je     L331
  jmp    L118
L340:
  xor    %r12d,%r12d
  jmp    L331
L227:
  mov    $0x1,%r12d
  jmp    L331
```

assistant: ```c
int WildComp2(char *lp1, char *lp2) {
  int flg;
  int i1, i2, j1, j2, ilen;
  int c, d;
  flg = 0;
  i1 = (int)strlen(lp1);
  i2 = (int)strlen(lp2);
  if (i1 && i2) {
    ilen = i1;
    if (i2 > i1)
      ilen = i2;
    j2 = 0;
    for (j1 = 0; j1 < ilen; j1++) {
      c = toupper(lp1[j1]);
      d = toupper(lp2[j2]);
      if (c == d) {
        j2++;
        continue;
      }
      if (c == 0) {
        if (d == '*') {
          j2++;
          if (lp2[j2] == 0) {
            flg = 1;
          }
        }
        break;
      }
      if (d == 0) {
        if (c == '*') {
          j1++;
          if (lp1[j1] == 0) {
            flg = 1;
          }
        }
        break;
      }
      {
        if (c == '*') {
          j1++;
          if (lp1[j1] == 0) {
            flg = 1;
            break;
          }
          c = toupper(lp1[j1]);
          j2++;
          if (lp2[j2] == 0)
            break;
          for (; j2 < ilen; j2++) {
            d = toupper(lp2[j2]);
            if (c == d)
              break;
            if (d == 0)
              break;
          }
          if (c == d) {
            j2++;
            continue;
          }
          break;
        }
        if (d == '*') {
          j2++;
          if (lp2[j2] == 0) {
            flg = 1;
            break;
          }
          d = toupper(lp2[j2]);
          j1++;
          if (lp1[j1] == 0)
            break;
          for (; j1 < ilen; j1++) {
            c = toupper(lp1[j1]);
            if (c == d)
              break;
            if (c == 0)
              break;
          }
          if (c == d) {
            j2++;
            continue;
          }
          break;
        }
        if ((c == '?') || (d == '?')) {
        } else {
          if (toupper(c) != toupper(d))
            break;
        }
      }
      j2++;
    }
    if (!flg && (j1 == ilen))
      flg = 1;
  } else {
    if (i1 == 0) {
      if ((i2 == 1) && (*lp2 == '*')) {
        flg = 1;
      } else if ((i2 == 2) && (lp2[0] == '.') && (lp2[1] == '*')) {
        flg = 1;
      }
    } else if (i2 == 0) {
      if ((i1 == 1) && (*lp1 == '*')) {
        flg = 1;
      } else if ((i1 == 2) && (lp1[0] == '.') && (lp1[1] == '*')) {
        flg = 1;
      }
    }
  }
  return flg;
}
```