user: 请从给定的汇编指令推导出C源代码：

```asm
<osc_match>:
  endbr64
  push   %r15
  push   %r14
  mov    %rdx,%r14
  push   %r13
  mov    %rcx,%r13
  push   %r12
  mov    %rdi,%r12
  push   %rbp
  mov    %rsi,%rbp
  push   %rbx
  sub    $0x8,%rsp
  call   <strcmp@plt>
  test   %eax,%eax
  je     L266
  movl   $0x0,(%r14)
  mov    %rbp,%r15
  mov    %r12,%rbx
  movl   $0x0,0x0(%r13)
  movzbl 0x0(%rbp),%eax
  test   %al,%al
  je     L195
  nopl   0x0(%rax)
L93:
  movzbl (%rbx),%edx
  test   %dl,%dl
  je     L42
  cmp    $0x2a,%dl
  je     L21
  cmp    $0x2a,%al
  je     L283
  mov    %r15,%rsi
  mov    %rbx,%rdi
  call   <osc_match_single_char@plt>
  test   %eax,%eax
  je     L134
  movzbl (%rbx),%edx
  cmp    $0x5b,%dl
  je     L221
  cmp    $0x7b,%dl
  je     L46
  movzbl 0x1(%r15),%eax
  add    $0x1,%rbx
  add    $0x1,%r15
L169:
  test   %al,%al
  jne    L93
  nopl   0x0(%rax)
L42:
  mov    %ebx,%edx
  mov    %r15d,%eax
  sub    %r12d,%edx
  sub    %ebp,%eax
L183:
  mov    %edx,(%r14)
  mov    %eax,0x0(%r13)
  xor    %eax,%eax
  cmpb   $0x0,(%r15)
  sete   %al
  mov    %eax,%edx
  or     $0x2,%edx
  cmpb   $0x0,(%rbx)
  cmove  %edx,%eax
  add    $0x8,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   0x0(%rax)
L221:
  mov    %rbx,%rax
  add    $0x1,%rbx
  cmpb   $0x5d,(%rbx)
  jne    L221
  lea    0x2(%rax),%rbx
  add    $0x1,%r15
  movzbl (%r15),%eax
  jmp    L169
  nopw   0x0(%rax,%rax,1)
L46:
  mov    %rbx,%rdx
  add    $0x1,%rbx
  cmpb   $0x7d,(%rbx)
  jne    L46
  cltq
  lea    0x2(%rdx),%rbx
  add    %rax,%r15
  movzbl (%r15),%eax
  jmp    L169
  nopl   0x0(%rax,%rax,1)
L283:
  cmp    $0x2f,%dl
  je     L128
  nopl   (%rax)
L37:
  movzbl 0x1(%rbx),%eax
  add    $0x1,%rbx
  cmp    $0x2f,%al
  je     L128
  test   %al,%al
  jne    L37
  jmp    L128
  nopw   0x0(%rax,%rax,1)
L237:
  add    $0x1,%r15
L128:
  movzbl (%r15),%eax
  cmp    $0x2f,%al
  je     L169
  test   %al,%al
  jne    L237
  jmp    L42
  nopl   0x0(%rax)
L21:
  mov    %r15,%rsi
  mov    %rbx,%rdi
  call   <osc_match_star@plt>
  test   %eax,%eax
  je     L134
  movzbl (%rbx),%eax
  test   %al,%al
  je     L260
  cmp    $0x2f,%al
  jne    L241
  jmp    L260
  nopl   0x0(%rax)
L0:
  test   %al,%al
  je     L260
L241:
  movzbl 0x1(%rbx),%eax
  add    $0x1,%rbx
  cmp    $0x2f,%al
  jne    L0
  jmp    L260
  nopw   0x0(%rax,%rax,1)
L223:
  add    $0x1,%r15
L260:
  movzbl (%r15),%eax
  cmp    $0x2f,%al
  je     L169
  test   %al,%al
  jne    L223
  jmp    L42
L134:
  add    $0x8,%rsp
  xor    %eax,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L266:
  mov    %r12,%rdi
  call   <strlen@plt>
  mov    %rbp,%rdi
  mov    %eax,(%r14)
  call   <strlen@plt>
  mov    %eax,0x0(%r13)
  add    $0x8,%rsp
  mov    $0x3,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L195:
  xor    %eax,%eax
  xor    %edx,%edx
  jmp    L183
```

assistant: ```c
int osc_match(const char *pattern, const char *address, int *pattern_offset, int *address_offset) {
  if (!strcmp(pattern, address)) {
    *pattern_offset = strlen(pattern);
    *address_offset = strlen(address);
    return 1 | 2;
  }
  const char *pattern_start;
  const char *address_start;
  pattern_start = pattern;
  address_start = address;
  *pattern_offset = 0;
  *address_offset = 0;
  while (*address != '\0' && *pattern != '\0') {
    if (*pattern == '*') {
      if (!osc_match_star(pattern, address)) {
        return 0;
      }
      while (*pattern != '/' && *pattern != '\0') {
        pattern++;
      }
      while (*address != '/' && *address != '\0') {
        address++;
      }
    } else if (*address == '*') {
      while (*pattern != '/' && *pattern != '\0') {
        pattern++;
      }
      while (*address != '/' && *address != '\0') {
        address++;
      }
    } else {
      int n = 0;
      if (!(n = osc_match_single_char(pattern, address))) {
        return 0;
      }
      if (*pattern == '[') {
        while (*pattern != ']') {
          pattern++;
        }
        pattern++;
        address++;
      } else if (*pattern == '{') {
        while (*pattern != '}') {
          pattern++;
        }
        pattern++;
        address += n;
      } else {
        pattern++;
        address++;
      }
    }
  }
  *pattern_offset = pattern - pattern_start;
  *address_offset = address - address_start;
  int r = 0;
  if (*address == '\0') {
    r |= 1;
  }
  if (*pattern == '\0') {
    r |= 2;
  }
  return r;
}
```