user: 请将以下的汇编代码转换成C语言代码:

```asm
<osc_match>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x40,%rsp
  mov    %rdi,-0x28(%rbp)
  mov    %rsi,-0x30(%rbp)
  mov    %rdx,-0x38(%rbp)
  mov    %rcx,-0x40(%rbp)
  mov    -0x30(%rbp),%rdx
  mov    -0x28(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcmp@plt>
  test   %eax,%eax
  jne    L136
  mov    -0x28(%rbp),%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  mov    -0x38(%rbp),%rdx
  mov    %eax,(%rdx)
  mov    -0x30(%rbp),%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  mov    -0x40(%rbp),%rdx
  mov    %eax,(%rdx)
  mov    $0x3,%eax
  jmp    L176
L136:
  mov    -0x28(%rbp),%rax
  mov    %rax,-0x10(%rbp)
  mov    -0x30(%rbp),%rax
  mov    %rax,-0x8(%rbp)
  mov    -0x38(%rbp),%rax
  movl   $0x0,(%rax)
  mov    -0x40(%rbp),%rax
  movl   $0x0,(%rax)
  jmp    L258
L298:
  mov    -0x28(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x2a,%al
  jne    L241
  mov    -0x30(%rbp),%rdx
  mov    -0x28(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <osc_match_star@plt>
  test   %eax,%eax
  jne    L195
  mov    $0x0,%eax
  jmp    L176
L248:
  addq   $0x1,-0x28(%rbp)
L195:
  mov    -0x28(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x2f,%al
  je     L25
  mov    -0x28(%rbp),%rax
  movzbl (%rax),%eax
  test   %al,%al
  jne    L248
  jmp    L25
L121:
  addq   $0x1,-0x30(%rbp)
L25:
  mov    -0x30(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x2f,%al
  je     L258
  mov    -0x30(%rbp),%rax
  movzbl (%rax),%eax
  test   %al,%al
  jne    L121
  jmp    L258
L241:
  mov    -0x30(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x2a,%al
  jne    L326
  jmp    L173
L321:
  addq   $0x1,-0x28(%rbp)
L173:
  mov    -0x28(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x2f,%al
  je     L192
  mov    -0x28(%rbp),%rax
  movzbl (%rax),%eax
  test   %al,%al
  jne    L321
  jmp    L192
L324:
  addq   $0x1,-0x30(%rbp)
L192:
  mov    -0x30(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x2f,%al
  je     L258
  mov    -0x30(%rbp),%rax
  movzbl (%rax),%eax
  test   %al,%al
  jne    L324
  jmp    L258
L326:
  movl   $0x0,-0x14(%rbp)
  mov    -0x30(%rbp),%rdx
  mov    -0x28(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <osc_match_single_char@plt>
  mov    %eax,-0x14(%rbp)
  cmpl   $0x0,-0x14(%rbp)
  jne    L157
  mov    $0x0,%eax
  jmp    L176
L157:
  mov    -0x28(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x5b,%al
  jne    L238
  jmp    L291
L134:
  addq   $0x1,-0x28(%rbp)
L291:
  mov    -0x28(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x5d,%al
  jne    L134
  addq   $0x1,-0x28(%rbp)
  addq   $0x1,-0x30(%rbp)
  jmp    L258
L238:
  mov    -0x28(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x7b,%al
  jne    L296
  jmp    L78
L168:
  addq   $0x1,-0x28(%rbp)
L78:
  mov    -0x28(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x7d,%al
  jne    L168
  addq   $0x1,-0x28(%rbp)
  mov    -0x14(%rbp),%eax
  cltq
  add    %rax,-0x30(%rbp)
  jmp    L258
L296:
  addq   $0x1,-0x28(%rbp)
  addq   $0x1,-0x30(%rbp)
L258:
  mov    -0x30(%rbp),%rax
  movzbl (%rax),%eax
  test   %al,%al
  je     L107
  mov    -0x28(%rbp),%rax
  movzbl (%rax),%eax
  test   %al,%al
  jne    L298
L107:
  mov    -0x28(%rbp),%rax
  sub    -0x10(%rbp),%rax
  mov    %eax,%edx
  mov    -0x38(%rbp),%rax
  mov    %edx,(%rax)
  mov    -0x30(%rbp),%rax
  sub    -0x8(%rbp),%rax
  mov    %eax,%edx
  mov    -0x40(%rbp),%rax
  mov    %edx,(%rax)
  movl   $0x0,-0x18(%rbp)
  mov    -0x30(%rbp),%rax
  movzbl (%rax),%eax
  test   %al,%al
  jne    L175
  orl    $0x1,-0x18(%rbp)
L175:
  mov    -0x28(%rbp),%rax
  movzbl (%rax),%eax
  test   %al,%al
  jne    L272
  orl    $0x2,-0x18(%rbp)
L272:
  mov    -0x18(%rbp),%eax
L176:
  leave
  ret
```

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;
}
```