user: What would the C source look like for the assembly code provided here?

```asm
<cmml_tstr_fix>:
  endbr64
  push   %r12
  push   %rbp
  sub    $0x28,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x18(%rsp)
  xor    %eax,%eax
  test   %rdi,%rdi
  je     L117
  mov    %rsp,%r12
  lea    D37(%rip),%rsi
  mov    %rdi,%rbp
  mov    %r12,%rdx
  call   <sscanf@plt>
  cmp    $0x1,%eax
  je     L7
  mov    %r12,%rdx
  lea    D81(%rip),%rsi
  mov    %rbp,%rdi
  call   <sscanf@plt>
  cmp    $0x1,%eax
  je     L7
  mov    %r12,%rdx
  lea    D24(%rip),%rsi
  mov    %rbp,%rdi
  call   <sscanf@plt>
  cmp    $0x1,%eax
  je     L7
  mov    %r12,%rdx
  lea    D67(%rip),%rsi
  mov    %rbp,%rdi
  call   <sscanf@plt>
  cmp    $0x1,%eax
  je     L7
  mov    %r12,%rdx
  lea    D73(%rip),%rsi
  mov    %rbp,%rdi
  call   <sscanf@plt>
  cmp    $0x1,%eax
  je     L7
  mov    %r12,%rdx
  lea    D16(%rip),%rsi
  mov    %rbp,%rdi
  call   <sscanf@plt>
  cmp    $0x1,%eax
  je     L7
  mov    %r12,%rdx
  lea    D48(%rip),%rsi
  mov    %rbp,%rdi
  call   <sscanf@plt>
  cmp    $0x1,%eax
  je     L7
  mov    %r12,%rdx
  lea    D77(%rip),%rsi
  mov    %rbp,%rdi
  call   <sscanf@plt>
  cmp    $0x1,%eax
  je     L7
  mov    %r12,%rdx
  lea    D44(%rip),%rsi
  mov    %rbp,%rdi
  call   <sscanf@plt>
  cmp    $0x1,%eax
  je     L137
  mov    %rbp,%rdi
  call   <fix_npt_str@plt>
  mov    %rax,%rbp
  test   %rax,%rax
  je     L117
  mov    %rax,%rdi
  call   <strlen@plt>
  lea    0x1(%rax),%rdi
  call   <emalloc@plt>
  mov    %rax,%r12
L114:
  movb   $0x0,(%rax)
  mov    %rbp,%rsi
  mov    %r12,%rdi
  call   <strcat@plt>
  jmp    L119
  xchg   %ax,%ax
L7:
  mov    %rbp,%r12
L119:
  mov    0x18(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L148
  add    $0x28,%rsp
  mov    %r12,%rax
  pop    %rbp
  pop    %r12
  ret
  xchg   %ax,%ax
L117:
  xor    %r12d,%r12d
  jmp    L119
L137:
  lea    0x4(%rbp),%rdi
  call   <fix_npt_str@plt>
  mov    %rax,%rbp
  test   %rax,%rax
  je     L117
  mov    %rax,%rdi
  call   <strlen@plt>
  lea    0x5(%rax),%rdi
  call   <emalloc@plt>
  mov    $0x4,%edx
  lea    D57(%rip),%rsi
  mov    %rax,%r12
  mov    %rax,%rdi
  call   <strncpy@plt>
  lea    0x4(%r12),%rax
  jmp    L114
L148:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: read_data
arguments: tag: D37
type: string
name: read_data
arguments: tag: D81
type: string
name: read_data
arguments: tag: D24
type: string
name: read_data
arguments: tag: D67
type: string
name: read_data
arguments: tag: D73
type: string
name: read_data
arguments: tag: D16
type: string
name: read_data
arguments: tag: D48
type: string
name: read_data
arguments: tag: D77
type: string
name: read_data
arguments: tag: D44
type: string
name: read_data
arguments: tag: D57
type: string

tool: D37: smpte-24:%16s

tool: D81: smpte-24-drop:%16s

tool: D24: smpte-25:%16s

tool: D67: smpte-30:%16s

tool: D73: smpte-30-drop:%16s

tool: D16: smpte-50:%16s

tool: D48: smpte-60:%16s

tool: D77: smpte-60-drop:%16s

tool: D44: npt:%16s

tool: D57: npt:

assistant: ```c
char *cmml_tstr_fix(const char *str) {
  char timespec[16];
  char *fix_timespec = NULL;
  char *full_timespec = NULL;
  int speclen = 0;
  if (str == NULL) {
    return NULL;
  }
  if ((sscanf(str, "smpte-24:%16s", timespec) == 1) || (sscanf(str, "smpte-24-drop:%16s", timespec) == 1) || (sscanf(str, "smpte-25:%16s", timespec) == 1) || (sscanf(str, "smpte-30:%16s", timespec) == 1) || (sscanf(str, "smpte-30-drop:%16s", timespec) == 1) || (sscanf(str, "smpte-50:%16s", timespec) == 1) || (sscanf(str, "smpte-60:%16s", timespec) == 1) || (sscanf(str, "smpte-60-drop:%16s", timespec) == 1)) {
    return (char *)str;
  }
  if (sscanf(str, "npt:%16s", timespec) == 1) {
    speclen = 4;
    fix_timespec = fix_npt_str(str + speclen);
  } else {
    speclen = 0;
    fix_timespec = fix_npt_str(str);
  }
  if (fix_timespec == NULL)
    return NULL;
  full_timespec = (char *)emalloc(strlen(fix_timespec) + speclen + 1);
  if (speclen > 0) {
    strncpy(full_timespec, "npt:", 4);
  }
  full_timespec[speclen] = '\0';
  strcat(full_timespec, fix_timespec);
  return full_timespec;
}
```