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

```asm
<luaO_chunkid>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x30,%rsp
  mov    %rdi,-0x18(%rbp)
  mov    %rsi,-0x20(%rbp)
  mov    %edx,-0x24(%rbp)
  mov    -0x20(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x3d,%al
  jne    L83
  mov    -0x20(%rbp),%rax
  lea    0x1(%rax),%rcx
  mov    -0x24(%rbp),%edx
  mov    -0x18(%rbp),%rax
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <strncpy@plt>
  mov    -0x24(%rbp),%eax
  cltq
  lea    -0x1(%rax),%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  movb   $0x0,(%rax)
  jmp    L20
L83:
  mov    -0x20(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x40,%al
  jne    L57
  addq   $0x1,-0x20(%rbp)
  mov    -0x24(%rbp),%eax
  sub    $0xd,%eax
  mov    %eax,-0x24(%rbp)
  mov    -0x20(%rbp),%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  mov    %eax,-0x4(%rbp)
  mov    -0x4(%rbp),%eax
  cmp    -0x24(%rbp),%eax
  jle    L30
  mov    -0x4(%rbp),%eax
  sub    -0x24(%rbp),%eax
  cltq
  add    %rax,-0x20(%rbp)
  mov    -0x20(%rbp),%rdx
  mov    -0x18(%rbp),%rax
  lea    D44(%rip),%rcx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <sprintf@plt>
  jmp    L20
L30:
  mov    -0x20(%rbp),%rdx
  mov    -0x18(%rbp),%rax
  lea    D36(%rip),%rcx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <sprintf@plt>
  jmp    L20
L57:
  mov    -0x20(%rbp),%rax
  lea    D49(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcspn@plt>
  mov    %eax,-0x8(%rbp)
  mov    -0x24(%rbp),%eax
  sub    $0x11,%eax
  mov    %eax,-0x24(%rbp)
  mov    -0x8(%rbp),%eax
  cmp    -0x24(%rbp),%eax
  jle    L54
  mov    -0x24(%rbp),%eax
  mov    %eax,-0x8(%rbp)
L54:
  mov    -0x8(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x20(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  test   %al,%al
  je     L64
  mov    -0x18(%rbp),%rax
  lea    D7(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcpy@plt>
  mov    -0x18(%rbp),%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  cltq
  add    %rax,-0x18(%rbp)
  mov    -0x8(%rbp),%edx
  mov    -0x20(%rbp),%rcx
  mov    -0x18(%rbp),%rax
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <strncpy@plt>
  mov    -0x8(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  lea    D45(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcpy@plt>
  jmp    L20
L64:
  mov    -0x20(%rbp),%rdx
  mov    -0x18(%rbp),%rax
  lea    D42(%rip),%rcx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <sprintf@plt>
L20:
  nop
  leave
  ret
```

tool_calls: name: parse_data
arguments: tag: D44
data_type: string
name: parse_data
arguments: tag: D36
data_type: string
name: parse_data
arguments: tag: D49
data_type: string
name: parse_data
arguments: tag: D7
data_type: string
name: parse_data
arguments: tag: D45
data_type: string
name: parse_data
arguments: tag: D42
data_type: string

tool: D44: file `...%.99s'

tool: D36: file `%.99s'

tool: D49: 


tool: D7: string "

tool: D45: ..."

tool: D42: string "%.99s"

assistant: ```c
void luaO_chunkid(char *out, const char *source, int bufflen) {
  if (*source == '=') {
    strncpy(out, source + 1, bufflen);
    out[bufflen - 1] = '\0';
  } else {
    if (*source == '@') {
      int l;
      source++;
      bufflen -= sizeof("file `...%s'");
      l = strlen(source);
      if (l > bufflen) {
        source += (l - bufflen);
        sprintf(out, "file `...%.99s'", source);
      } else
        sprintf(out, "file `%.99s'", source);
    } else {
      int len = strcspn(source, "\n");
      bufflen -= sizeof("string \"%.*s...\"");
      if (len > bufflen)
        len = bufflen;
      if (source[len] != '\0') {
        strcpy(out, "string \"");
        out += strlen(out);
        strncpy(out, source, len);
        strcpy(out + len, "...\"");
      } else
        sprintf(out, "string \"%.99s\"", source);
    }
  }
}
```