user: What is the c source code of the assembly code below:

```asm
<spctrn>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x48,%rsp
  movsd  %xmm1,0x8(%rsp)
  movsd  %xmm2,(%rsp)
  movq   %xmm3,%r13
  mov    %rsi,%rbp
  mov    %rdx,%r14
  mov    %rcx,%r12
  mov    %fs:0x28,%rax
  mov    %rax,0x38(%rsp)
  xor    %eax,%eax
  lea    0x1c(%rsp),%rcx
  lea    0x1a(%rsp),%rdx
  lea    0x18(%rsp),%rsi
  lea    0x30(%rsp),%r9
  lea    0x20(%rsp),%r8
  movapd %xmm3,%xmm2
  movsd  (%rsp),%xmm1
  call   <spcspx@plt>
  mov    %eax,%ebx
  test   %eax,%eax
  je     L41
L80:
  mov    0x38(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L3
  mov    %ebx,%eax
  add    $0x48,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L41:
  lea    0x5(%rbp),%r15
  mov    $0x3,%edx
  lea    D30(%rip),%rsi
  mov    %r15,%rdi
  call   <strncmp@plt>
  test   %rax,%rax
  je     L72
  movzbl 0x1a(%rsp),%eax
  cmp    $0x77,%al
  je     L119
  cmp    $0x61,%al
  je     L116
  mov    %al,0x5(%rbp)
  movb   $0x32,0x6(%rbp)
L72:
  lea    0x1c(%rsp),%rcx
  lea    0x19(%rsp),%rdx
  lea    0x1b(%rsp),%rsi
  lea    0x28(%rsp),%r9
  mov    %r14,%r8
  movq   %r13,%xmm2
  movsd  (%rsp),%xmm1
  movsd  0x20(%rsp),%xmm0
  mov    %rbp,%rdi
  call   <spcxps@plt>
  mov    %eax,%ebx
  test   %eax,%eax
  jne    L80
  movzbl 0x1b(%rsp),%eax
  cmp    0x1a(%rsp),%al
  jne    L118
  movb   $0x3f,0x7(%rbp)
  movzbl 0x19(%rsp),%edx
  cmp    %dl,%al
  je     L2
  mov    %dl,0x7(%rbp)
L121:
  movsd  0x28(%rsp),%xmm0
  mulsd  0x30(%rsp),%xmm0
  mulsd  0x8(%rsp),%xmm0
  movsd  %xmm0,(%r12)
  jmp    L80
L119:
  lea    D6(%rip),%rsi
  mov    %r15,%rdi
  call   <strcpy@plt>
  jmp    L72
L116:
  lea    D13(%rip),%rsi
  mov    %r15,%rdi
  call   <strcpy@plt>
  jmp    L72
L2:
  lea    D28(%rip),%rsi
  mov    %r15,%rdi
  call   <strcpy@plt>
  jmp    L121
L118:
  mov    $0x2,%ebx
  jmp    L80
L3:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: unpack_data
arguments: data_tag: D30
datatype: string
name: unpack_data
arguments: data_tag: D6
datatype: string
name: unpack_data
arguments: data_tag: D13
datatype: string
name: unpack_data
arguments: data_tag: D28
datatype: string

tool: D30: ???

tool: D6: GRI

tool: D13: GRA

tool: D28:     

assistant: ```c
int spctrn(const char ctypeS1[9], double crvalS1, double cdeltS1, double restfrq, double restwav, char ctypeS2[9], double *crvalS2, double *cdeltS2) {
  char ptype1, ptype2, xtype1, xtype2;
  int restreq, status;
  double crvalX, dS2dX, dXdS1;
  if (status = spcspx(ctypeS1, crvalS1, restfrq, restwav, &ptype1, &xtype1, &restreq, &crvalX, &dXdS1)) {
    return status;
  }
  if (strncmp(ctypeS2 + 5, "???", 3)) {
    if (xtype1 == 'w') {
      strcpy(ctypeS2 + 5, "GRI");
    } else if (xtype1 == 'a') {
      strcpy(ctypeS2 + 5, "GRA");
    } else {
      ctypeS2[5] = xtype1;
      ctypeS2[6] = '2';
    }
  }
  if (status = spcxps(ctypeS2, crvalX, restfrq, restwav, &xtype2, &ptype2, &restreq, crvalS2, &dS2dX)) {
    return status;
  }
  if (xtype2 != xtype1) {
    return 2;
  }
  if (ctypeS2[7] = '?') {
    if (ptype2 == xtype2) {
      strcpy(ctypeS2 + 5, "    ");
    } else {
      ctypeS2[7] = ptype2;
    }
  }
  *cdeltS2 = dS2dX * dXdS1 * cdeltS1;
  return 0;
}
```