user: Please show me the C implementation that matches the assembly code listed below:

```asm
<llib_led_regex_brack>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x38,%rsp
  mov    %rdx,(%rsp)
  mov    %fs:0x28,%rax
  mov    %rax,0x28(%rsp)
  xor    %eax,%eax
  mov    (%rsi),%rax
  mov    %rax,0x20(%rsp)
  mov    (%rdx),%ebp
  mov    %ebp,0x1c(%rsp)
  test   %ebp,%ebp
  je     L60
  mov    %edi,%r13d
  mov    %rsi,%r15
  mov    %ecx,%r12d
  movzbl (%rax),%edx
  cmp    $0x5e,%dl
  je     L62
  movl   $0x0,0xc(%rsp)
  cmp    $0x2a,%dl
  je     L62
L219:
  mov    0x20(%rsp),%rax
  cmpb   $0x5d,(%rax)
  je     L199
  mov    0x1c(%rsp),%eax
  mov    $0x0,%ebp
  jmp    L198
L62:
  add    $0x1,%rax
  mov    %rax,0x20(%rsp)
  sub    $0x1,%ebp
  mov    %ebp,0x1c(%rsp)
  jne    L115
  mov    0x20(%rsp),%rax
  mov    %rax,(%r15)
  mov    0x1c(%rsp),%eax
  mov    (%rsp),%rcx
  mov    %eax,(%rcx)
L28:
  test   %ebp,%ebp
  sete   %bpl
  movzbl %bpl,%ebp
L60:
  mov    0x28(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L47
  mov    %ebp,%eax
  add    $0x38,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L115:
  movl   $0x1,0xc(%rsp)
  jmp    L219
L199:
  add    $0x1,%rax
  mov    %rax,0x20(%rsp)
  lea    -0x1(%rbp),%eax
  mov    %eax,0x1c(%rsp)
  cmp    $0x5d,%r12d
  sete   %bpl
  movzbl %bpl,%ebp
  test   %eax,%eax
  je     L131
L198:
  lea    0x1c(%rsp),%r14
  jmp    L210
L204:
  add    $0x1,%rdx
  mov    %rdx,0x20(%rsp)
  sub    $0x1,%eax
  mov    %eax,0x1c(%rsp)
L131:
  mov    0x20(%rsp),%rax
  mov    %rax,(%r15)
  mov    0x1c(%rsp),%eax
  mov    (%rsp),%rcx
  mov    %eax,(%rcx)
  cmpl   $0x0,0xc(%rsp)
  je     L60
  jmp    L28
L191:
  cmpb   $0x5d,0x1(%rdx)
  je     L148
  sub    $0x1,%eax
  mov    %eax,0x1c(%rsp)
  add    $0x1,%rdx
  mov    %rdx,0x20(%rsp)
  lea    0x20(%rsp),%rsi
  mov    %r14,%rdx
  mov    %r13d,%edi
  call   <llib_utf8_escape@plt>
  cmp    %ebx,%r12d
  jl     L175
  cmp    %eax,%r12d
  mov    $0x1,%eax
  cmovle %eax,%ebp
  jmp    L175
L157:
  cmp    %ebx,%r12d
  mov    $0x1,%eax
  cmove  %eax,%ebp
L175:
  mov    0x1c(%rsp),%eax
  test   %eax,%eax
  je     L131
L210:
  mov    0x20(%rsp),%rdx
  cmpb   $0x5d,(%rdx)
  je     L204
  lea    0x20(%rsp),%rsi
  mov    %r14,%rdx
  mov    %r13d,%edi
  call   <llib_utf8_escape@plt>
  mov    %eax,%ebx
  mov    0x1c(%rsp),%eax
  cmp    $0x1,%eax
  jle    L157
  mov    0x20(%rsp),%rdx
  cmpb   $0x2d,(%rdx)
  je     L191
L148:
  cmp    %ebx,%r12d
  je     L180
  mov    0x1c(%rsp),%eax
  jmp    L210
L180:
  mov    $0x1,%ebp
  jmp    L210
L47:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
int llib_led_regex_brack(int utf8, unsigned char **a, int *la, int c) {
  int inverse = 0;
  int flag = 0;
  unsigned char *s = *a;
  int l = *la;
  if (!l)
    return 0;
  if (*s == '^' || *s == '*') {
    inverse = 1;
    ++s;
    --l;
  }
  if (l && *s == ']') {
    ++s;
    --l;
    if (c == ']')
      flag = 1;
  }
  while (l) {
    if (*s == ']') {
      ++s;
      --l;
      break;
    } else {
      int cl, cr;
      cl = llib_utf8_escape(utf8, (char **)&s, &l);
      if (l >= 2 && s[0] == '-' && s[1] != ']') {
        --l;
        ++s;
        cr = llib_utf8_escape(utf8, (char **)&s, &l);
        if (c >= cl && c <= cr)
          flag = 1;
      } else if (c == cl)
        flag = 1;
    }
  }
  *a = s;
  *la = l;
  if (inverse)
    return !flag;
  else
    return flag;
}
```