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

```asm
<changelog_checkname>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x20,%rsp
  mov    %rdi,-0x18(%rbp)
  mov    -0x18(%rbp),%rax
  mov    %rax,-0x8(%rbp)
  mov    -0x8(%rbp),%rax
  mov    $0xa,%edx
  lea    D39(%rip),%rcx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <strncmp@plt>
  test   %rax,%rax
  jne    L1
  addq   $0xa,-0x8(%rbp)
  mov    -0x8(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x2f,%al
  jle    L155
  mov    -0x8(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x39,%al
  jg     L155
  jmp    L146
L118:
  addq   $0x1,-0x8(%rbp)
L146:
  mov    -0x8(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x2f,%al
  jle    L160
  mov    -0x8(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x39,%al
  jle    L118
L160:
  mov    -0x8(%rbp),%rax
  lea    D45(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L155
  mov    $0x1,%eax
  jmp    L219
L1:
  mov    -0x8(%rbp),%rax
  mov    $0xd,%edx
  lea    D43(%rip),%rcx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <strncmp@plt>
  test   %rax,%rax
  jne    L22
  addq   $0xd,-0x8(%rbp)
  mov    -0x8(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x2f,%al
  jle    L155
  mov    -0x8(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x39,%al
  jg     L155
  jmp    L28
L137:
  addq   $0x1,-0x8(%rbp)
L28:
  mov    -0x8(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x2f,%al
  jle    L166
  mov    -0x8(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x39,%al
  jle    L137
L166:
  mov    -0x8(%rbp),%rax
  lea    D45(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L155
  mov    $0x1,%eax
  jmp    L219
L22:
  mov    -0x8(%rbp),%rax
  mov    $0x12,%edx
  lea    D24(%rip),%rcx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <strncmp@plt>
  test   %rax,%rax
  jne    L155
  addq   $0x12,-0x8(%rbp)
  mov    -0x8(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x2f,%al
  jle    L155
  mov    -0x8(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x39,%al
  jg     L155
  jmp    L136
L179:
  addq   $0x1,-0x8(%rbp)
L136:
  mov    -0x8(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x2f,%al
  jle    L79
  mov    -0x8(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x39,%al
  jle    L179
L79:
  mov    -0x8(%rbp),%rax
  lea    D45(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L155
  mov    $0x1,%eax
  jmp    L219
L155:
  mov    $0x0,%eax
L219:
  leave
  ret
```

tool_calls: name: read_data
arguments: tag: D39
data_type: string
name: read_data
arguments: tag: D45
data_type: string
name: read_data
arguments: tag: D43
data_type: string
name: read_data
arguments: tag: D24
data_type: string

tool: D39: changelog.

tool: D45: .mfs

tool: D43: changelog_ml.

tool: D24: changelog_ml_back.

assistant: ```c
int changelog_checkname(const char *fname) {
  const char *ptr = fname;
  if (strncmp(ptr, "changelog.", 10) == 0) {
    ptr += 10;
    if (*ptr >= '0' && *ptr <= '9') {
      while (*ptr >= '0' && *ptr <= '9') {
        ptr++;
      }
      if (strcmp(ptr, ".mfs") == 0) {
        return 1;
      }
    }
  } else if (strncmp(ptr, "changelog_ml.", 13) == 0) {
    ptr += 13;
    if (*ptr >= '0' && *ptr <= '9') {
      while (*ptr >= '0' && *ptr <= '9') {
        ptr++;
      }
      if (strcmp(ptr, ".mfs") == 0) {
        return 1;
      }
    }
  } else if (strncmp(ptr, "changelog_ml_back.", 18) == 0) {
    ptr += 18;
    if (*ptr >= '0' && *ptr <= '9') {
      while (*ptr >= '0' && *ptr <= '9') {
        ptr++;
      }
      if (strcmp(ptr, ".mfs") == 0) {
        return 1;
      }
    }
  }
  return 0;
}
```