user: 这段汇编代码用C语言表示是什么样的:

```asm
<pattern_match_length>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  lea    0x1(%rdi),%r13
  push   %r12
  mov    %rdx,%r12
  push   %rbp
  push   %rbx
  mov    %ecx,%ebx
  lea    -0x1(%rsi),%ecx
  sub    $0x18,%rsp
L108:
  lea    -0x1(%r13),%r14
  lea    0x1(%rcx),%r15d
  test   %ebx,%ebx
  je     L35
  movsbl (%r12),%edi
  cmp    $0x5b,%dil
  je     L417
  jg     L359
  cmp    $0x2a,%dil
  je     L167
  cmp    $0x3f,%dil
  jne    L2
  test   %r15d,%r15d
  je     L413
L315:
  mov    %ecx,%eax
  mov    %r12,%rbp
L109:
  lea    0x1(%rbp),%r12
  sub    $0x1,%ebx
  add    $0x1,%r13
  sub    $0x1,%ecx
  test   %eax,%eax
  jne    L108
  cmpb   $0x2a,0x1(%rbp)
  jne    L187
  mov    %r12,%rax
  lea    (%rbx,%r12,1),%edx
  nopl   0x0(%rax,%rax,1)
L242:
  add    $0x1,%rax
  mov    %edx,%r15d
  sub    %eax,%r15d
  cmpb   $0x2a,(%rax)
  je     L242
L35:
  test   %r15d,%r15d
  sete   %r15b
  movzbl %r15b,%r15d
L413:
  add    $0x18,%rsp
  mov    %r15d,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   0x0(%rax)
L359:
  cmp    $0x5c,%dil
  jne    L2
  cmp    $0x1,%ebx
  jle    L2
  movsbl 0x1(%r12),%edi
  sub    $0x1,%ebx
  add    $0x1,%r12
L2:
  test   %r8d,%r8d
  jne    L137
  cmp    %dil,-0x1(%r13)
  je     L315
L317:
  xor    %r15d,%r15d
  jmp    L413
L167:
  cmpb   $0x2a,0x1(%r12)
  mov    %r12,%rax
  jne    L17
  lea    (%rbx,%r12,1),%edx
  nop
L93:
  add    $0x1,%rax
  mov    %edx,%ebx
  sub    %eax,%ebx
  cmpb   $0x2a,0x1(%rax)
  je     L93
L17:
  cmp    $0x1,%ebx
  je     L146
  test   %r15d,%r15d
  je     L413
  sub    $0x1,%ebx
  lea    0x1(%rax),%rbp
L196:
  mov    %r15d,%ecx
  mov    %r14,%rdx
  mov    %ebx,%esi
  mov    %rbp,%rdi
  mov    %r8d,(%rsp)
  call   <pattern_match_length>
  test   %eax,%eax
  jne    L146
  add    $0x1,%r14
  sub    $0x1,%r15d
  mov    (%rsp),%r8d
  jne    L196
  jmp    L413
  nopw   0x0(%rax,%rax,1)
L417:
  movzbl 0x1(%r12),%eax
  mov    %al,0xb(%rsp)
  cmp    $0x5e,%al
  je     L64
  lea    0x1(%r12),%rbp
  sub    $0x1,%ebx
L218:
  xor    %r15d,%r15d
  jmp    L286
  nopw   0x0(%rax,%rax,1)
L71:
  cmp    $0x5d,%al
  je     L267
  test   %ebx,%ebx
  je     L43
  movzbl 0x1(%rbp),%r14d
  cmp    $0x2d,%r14b
  jne    L387
  cmp    $0x2,%ebx
  jg     L303
L387:
  test   %r8d,%r8d
  jne    L119
  cmp    %al,-0x1(%r13)
  mov    %r14d,%eax
  je     L21
  cs nopw 0x0(%rax,%rax,1)
L169:
  add    $0x1,%rbp
  sub    $0x1,%ebx
L286:
  cmp    $0x5c,%al
  jne    L71
  movzbl 0x2(%rbp),%eax
  movzbl 0x1(%rbp),%esi
  sub    $0x1,%ebx
  add    $0x1,%rbp
  mov    $0x1,%edx
  cmp    -0x1(%r13),%sil
  cmove  %edx,%r15d
  jmp    L169
  nopl   0x0(%rax)
L119:
  movsbl %al,%edi
  mov    %r8d,0x4(%rsp)
  mov    %ecx,(%rsp)
  call   <tolower@plt>
  movsbl -0x1(%r13),%edi
  mov    %eax,%r12d
  call   <tolower@plt>
  mov    $0x1,%esi
  mov    (%rsp),%ecx
  mov    0x4(%rsp),%r8d
  mov    %eax,%r9d
  mov    %r14d,%eax
  cmp    %r9d,%r12d
  cmove  %esi,%r15d
  jmp    L169
  nopl   0x0(%rax)
L303:
  movsbl 0x2(%rbp),%r9d
  movsbl %al,%r12d
  movsbl -0x1(%r13),%r14d
  cmp    %r9d,%r12d
  jle    L82
  mov    %r12d,%eax
  mov    %r9d,%r12d
  mov    %eax,%r9d
L82:
  test   %r8d,%r8d
  je     L5
  mov    %r12d,%edi
  mov    %r8d,0xc(%rsp)
  mov    %ecx,0x4(%rsp)
  mov    %r9d,(%rsp)
  call   <tolower@plt>
  mov    (%rsp),%edi
  mov    %eax,%r12d
  call   <tolower@plt>
  mov    %r14d,%edi
  mov    %eax,(%rsp)
  call   <tolower@plt>
  mov    0xc(%rsp),%r8d
  mov    0x4(%rsp),%ecx
  mov    (%rsp),%r9d
  mov    %eax,%r14d
L5:
  lea    0x2(%rbp),%rsi
  movzbl 0x3(%rbp),%eax
  sub    $0x2,%ebx
  mov    %rsi,%rbp
  cmp    %r14d,%r12d
  jg     L169
  cmp    %r14d,%r9d
  jl     L169
L21:
  mov    $0x1,%r15d
  jmp    L169
  nopw   0x0(%rax,%rax,1)
L43:
  sub    $0x1,%rbp
  mov    $0x1,%ebx
L267:
  mov    %r15d,%eax
  xor    $0x1,%eax
  cmpb   $0x5e,0xb(%rsp)
  cmove  %eax,%r15d
  test   %r15d,%r15d
  je     L413
  mov    %ecx,%eax
  jmp    L109
  nopl   0x0(%rax,%rax,1)
L137:
  mov    %r8d,0x4(%rsp)
  mov    %ecx,(%rsp)
  call   <tolower@plt>
  movsbl -0x1(%r13),%edi
  mov    %eax,%ebp
  call   <tolower@plt>
  mov    (%rsp),%ecx
  mov    0x4(%rsp),%r8d
  cmp    %eax,%ebp
  je     L315
  jmp    L317
  xchg   %ax,%ax
L64:
  movzbl 0x2(%r12),%eax
  lea    0x2(%r12),%rbp
  sub    $0x2,%ebx
  jmp    L218
  nopl   0x0(%rax,%rax,1)
L146:
  mov    $0x1,%r15d
  jmp    L413
L187:
  mov    %ebx,%r15d
  jmp    L35
```

assistant: ```c
int pattern_match_length(const char *string, int slength, const char *pattern, int plength, int nocase) {
  while (plength) {
    switch (pattern[0]) {
    case '*':
      while (pattern[1] == '*') {
        pattern++;
        plength--;
      }
      if (plength == 1)
        return 1;
      while (slength) {
        if (pattern_match_length(pattern + 1, plength - 1, string, slength, nocase))
          return 1;
        string++;
        slength--;
      }
      return 0;
      break;
    case '?':
      if (slength == 0)
        return 0;
      string++;
      slength--;
      break;
    case '[': {
      int not, match;
      pattern++;
      plength--;
      not = pattern[0] == '^';
      if (not ) {
        pattern++;
        plength--;
      }
      match = 0;
      while (1) {
        if (pattern[0] == '\\') {
          pattern++;
          plength--;
          if (pattern[0] == string[0])
            match = 1;
        } else if (pattern[0] == ']') {
          break;
        } else if (plength == 0) {
          pattern--;
          plength++;
          break;
        } else if (pattern[1] == '-' && plength >= 3) {
          int start = pattern[0];
          int end = pattern[2];
          int c = string[0];
          if (start > end) {
            int t = start;
            start = end;
            end = t;
          }
          if (nocase) {
            start = tolower(start);
            end = tolower(end);
            c = tolower(c);
          }
          pattern += 2;
          plength -= 2;
          if (c >= start && c <= end)
            match = 1;
        } else {
          if (!nocase) {
            if (pattern[0] == string[0])
              match = 1;
          } else {
            if (tolower((int)pattern[0]) == tolower((int)string[0]))
              match = 1;
          }
        }
        pattern++;
        plength--;
      }
      if (not )
        match = !match;
      if (!match)
        return 0;
      string++;
      slength--;
      break;
    }
    case '\\':
      if (plength >= 2) {
        pattern++;
        plength--;
      }
    default:
      if (!nocase) {
        if (pattern[0] != string[0])
          return 0;
      } else {
        if (tolower((int)pattern[0]) != tolower((int)string[0]))
          return 0;
      }
      string++;
      slength--;
      break;
    }
    pattern++;
    plength--;
    if (slength == 0) {
      while (*pattern == '*') {
        pattern++;
        plength--;
      }
      break;
    }
  }
  if (plength == 0 && slength == 0)
    return 1;
  return 0;
}
```