user: 请显示与下面列出的汇编代码相匹配的C语言实现:

```asm
<swi_gen_filename>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x60,%rsp
  movsd  %xmm0,-0x48(%rbp)
  mov    %edi,-0x4c(%rbp)
  mov    %rsi,-0x58(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  movl   $0x6,-0x1c(%rbp)
  cmpl   $0x11,-0x4c(%rbp)
  jg     L208
  cmpl   $0xc,-0x4c(%rbp)
  jge    L85
  cmpl   $0xa,-0x4c(%rbp)
  jg     L208
  cmpl   $0x2,-0x4c(%rbp)
  jge    L165
  cmpl   $0x0,-0x4c(%rbp)
  je     L165
  cmpl   $0x1,-0x4c(%rbp)
  jne    L208
  mov    -0x58(%rbp),%rax
  lea    D102(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcpy@plt>
  jmp    L9
L165:
  mov    -0x58(%rbp),%rax
  lea    D93(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcpy@plt>
  jmp    L9
L85:
  mov    -0x58(%rbp),%rax
  lea    D19(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcpy@plt>
  jmp    L9
L208:
  lea    D4(%rip),%rax
  mov    %rax,-0x10(%rbp)
  cmpl   $0x1adaf,-0x4c(%rbp)
  jle    L95
  lea    D38(%rip),%rax
  mov    %rax,-0x10(%rbp)
L95:
  mov    -0x4c(%rbp),%eax
  lea    -0x2710(%rax),%ecx
  mov    -0x4c(%rbp),%eax
  sub    $0x2710,%eax
  movslq %eax,%rdx
  imul   $0x10624dd3,%rdx,%rdx
  shr    $0x20,%rdx
  sar    $0x6,%edx
  sar    $0x1f,%eax
  sub    %eax,%edx
  mov    -0x10(%rbp),%rsi
  mov    -0x58(%rbp),%rax
  lea    D1(%rip),%r9
  mov    %ecx,%r8d
  lea    D94(%rip),%rcx
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <sprintf@plt>
  jmp    L98
L9:
  movsd  -0x48(%rbp),%xmm0
  comisd D49(%rip),%xmm0
  jb     L101
  movw   $0x1,-0x32(%rbp)
  movswl -0x32(%rbp),%edi
  lea    -0x18(%rbp),%r8
  lea    -0x2c(%rbp),%rcx
  lea    -0x30(%rbp),%rdx
  lea    -0x28(%rbp),%rsi
  mov    -0x48(%rbp),%rax
  movq   %rax,%xmm0
  call   <swe_revjul@plt>
  jmp    L91
L101:
  movw   $0x0,-0x32(%rbp)
  movswl -0x32(%rbp),%edi
  lea    -0x18(%rbp),%r8
  lea    -0x2c(%rbp),%rcx
  lea    -0x30(%rbp),%rdx
  lea    -0x28(%rbp),%rsi
  mov    -0x48(%rbp),%rax
  movq   %rax,%xmm0
  call   <swe_revjul@plt>
L91:
  mov    -0x28(%rbp),%eax
  test   %eax,%eax
  jns    L66
  movl   $0xffffffff,-0x20(%rbp)
  jmp    L197
L66:
  movl   $0x1,-0x20(%rbp)
L197:
  mov    -0x28(%rbp),%eax
  movslq %eax,%rdx
  imul   $0x51eb851f,%rdx,%rdx
  shr    $0x20,%rdx
  sar    $0x5,%edx
  sar    $0x1f,%eax
  mov    %eax,%ecx
  mov    %edx,%eax
  sub    %ecx,%eax
  mov    %eax,-0x24(%rbp)
  cmpl   $0x0,-0x20(%rbp)
  jns    L155
  mov    -0x28(%rbp),%edx
  movslq %edx,%rax
  imul   $0x51eb851f,%rax,%rax
  shr    $0x20,%rax
  sar    $0x5,%eax
  mov    %edx,%ecx
  sar    $0x1f,%ecx
  sub    %ecx,%eax
  imul   $0x64,%eax,%ecx
  mov    %edx,%eax
  sub    %ecx,%eax
  test   %eax,%eax
  je     L155
  subl   $0x1,-0x24(%rbp)
  jmp    L155
L199:
  subl   $0x1,-0x24(%rbp)
L155:
  mov    -0x24(%rbp),%eax
  cltd
  idivl  -0x1c(%rbp)
  mov    %edx,%eax
  test   %eax,%eax
  jne    L199
  cmpl   $0x0,-0x24(%rbp)
  jns    L41
  mov    -0x58(%rbp),%rax
  lea    D45(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcat@plt>
  jmp    L4
L41:
  mov    -0x58(%rbp),%rax
  lea    D24(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcat@plt>
L4:
  mov    -0x24(%rbp),%eax
  mov    %eax,%edx
  neg    %edx
  cmovns %edx,%eax
  mov    %eax,-0x24(%rbp)
  mov    -0x58(%rbp),%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  movslq %eax,%rdx
  mov    -0x58(%rbp),%rax
  lea    (%rdx,%rax,1),%rdi
  mov    -0x24(%rbp),%eax
  lea    D1(%rip),%rdx
  mov    %rdx,%rcx
  mov    %eax,%edx
  lea    D110(%rip),%rax
  mov    %rax,%rsi
  mov    $0x0,%eax
  call   <sprintf@plt>
L98:
  mov    -0x8(%rbp),%rax
  sub    %fs:0x28,%rax
  je     L142
  call   <__stack_chk_fail@plt>
L142:
  leave
  ret
```

tool_calls: name: retrieve_data
arguments: data_label: D102
type: string
name: retrieve_data
arguments: data_label: D93
type: string
name: retrieve_data
arguments: data_label: D19
type: string
name: retrieve_data
arguments: data_label: D4
type: string
name: retrieve_data
arguments: data_label: D38
type: string
name: retrieve_data
arguments: data_label: D1
type: string
name: retrieve_data
arguments: data_label: D94
type: string
name: retrieve_data
arguments: data_label: D49
type: f64
name: retrieve_data
arguments: data_label: D45
type: string
name: retrieve_data
arguments: data_label: D24
type: string
name: retrieve_data
arguments: data_label: D110
type: string

tool: D102: semo

tool: D93: sepl

tool: D19: seas

tool: D4: ast%d%sse%05d.%s

tool: D38: ast%d%ss%06d.%s

tool: D1: se1

tool: D94: /

tool: D49: 2305447.5

tool: D45: m

tool: D24: _

tool: D110: %02d.%s

assistant: ```c
void swi_gen_filename(double tjd, int ipli, char *fname) {
  int icty;
  int ncties = (int)6.0;
  short gregflag;
  int jmon, jday, jyear, sgn;
  double jut;
  char *sform;
  switch (ipli) {
  case 1:
    strcpy(fname, "semo");
    break;
  case 0:
  case 2:
  case 3:
  case 4:
  case 5:
  case 6:
  case 7:
  case 8:
  case 9:
  case 10:
    strcpy(fname, "sepl");
    break;
  case 14:
  case 15:
  case 16:
  case 17:
  case 12:
  case 13:
    strcpy(fname, "seas");
    break;
  default:
    sform = "ast%d%sse%05d.%s";
    if (ipli - 10000 > 99999)
      sform = "ast%d%ss%06d.%s";
    sprintf(fname, sform, (ipli - 10000) / 1000, "/", ipli - 10000, "se1");
    return;
  }
  if (tjd >= 2305447.5) {
    gregflag = 1;
    swe_revjul(tjd, gregflag, &jyear, &jmon, &jday, &jut);
  } else {
    gregflag = 0;
    swe_revjul(tjd, gregflag, &jyear, &jmon, &jday, &jut);
  }
  if (jyear < 0)
    sgn = -1;
  else
    sgn = 1;
  icty = jyear / 100;
  if (sgn < 0 && jyear % 100 != 0)
    icty -= 1;
  while (icty % ncties != 0)
    icty--;
  if (icty < 0)
    strcat(fname, "m");
  else
    strcat(fname, "_");
  icty = abs(icty);
  sprintf(fname + strlen(fname), "%02d.%s", icty, "se1");
}
```