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

```asm
<spctrn>:
  endbr64
  push   %r14
  mov    %rsi,%r14
  push   %r13
  push   %r12
  push   %rbp
  mov    %rcx,%rbp
  push   %rbx
  mov    %rdx,%rbx
  sub    $0x50,%rsp
  lea    0x2c(%rsp),%r13
  movsd  %xmm1,0x18(%rsp)
  lea    0x2a(%rsp),%rdx
  movapd %xmm2,%xmm1
  lea    0x28(%rsp),%rsi
  movapd %xmm3,%xmm2
  lea    0x40(%rsp),%r9
  mov    %r13,%rcx
  mov    %fs:0x28,%rax
  mov    %rax,0x48(%rsp)
  xor    %eax,%eax
  lea    0x30(%rsp),%r8
  movsd  %xmm3,0x10(%rsp)
  movsd  %xmm1,0x8(%rsp)
  call   <spcspx@plt>
  mov    %eax,%r12d
  test   %eax,%eax
  jne    L51
  cmpb   $0x0,(%r14)
  movb   $0x0,0x8(%r14)
  mov    %r14,%rdi
  movsd  0x8(%rsp),%xmm1
  movsd  0x10(%rsp),%xmm2
  je     L113
  nopl   0x0(%rax)
L100:
  add    $0x1,%rdi
  cmpb   $0x0,(%rdi)
  jne    L100
L113:
  lea    0x8(%r14),%rdx
  cmp    %rdx,%rdi
  jae    L142
  sub    %rdi,%rdx
  mov    $0x20,%esi
  movsd  %xmm2,0x10(%rsp)
  movsd  %xmm1,0x8(%rsp)
  call   <memset@plt>
  movsd  0x10(%rsp),%xmm2
  movsd  0x8(%rsp),%xmm1
L142:
  lea    0x5(%r14),%r12
  mov    $0x3,%edx
  lea    D35(%rip),%rsi
  movsd  %xmm2,0x10(%rsp)
  mov    %r12,%rdi
  movsd  %xmm1,0x8(%rsp)
  call   <strncmp@plt>
  movsd  0x8(%rsp),%xmm1
  movsd  0x10(%rsp),%xmm2
  test   %rax,%rax
  jne    L102
  movzbl 0x2a(%rsp),%eax
  cmp    $0x77,%al
  je     L166
  cmp    $0x61,%al
  je     L106
  mov    %al,0x5(%r14)
  movb   $0x32,0x6(%r14)
L102:
  movsd  0x30(%rsp),%xmm0
  mov    %rbx,%r8
  mov    %r13,%rcx
  mov    %r14,%rdi
  lea    0x2b(%rsp),%rdx
  lea    0x29(%rsp),%rsi
  lea    0x38(%rsp),%r9
  call   <spcxps@plt>
  mov    %eax,%r12d
  test   %eax,%eax
  jne    L51
  movzbl 0x2b(%rsp),%eax
  cmp    0x2a(%rsp),%al
  jne    L12
  cmpb   $0x3f,0x7(%r14)
  je     L160
L68:
  movsd  0x38(%rsp),%xmm0
  mulsd  0x40(%rsp),%xmm0
  mulsd  0x18(%rsp),%xmm0
  movsd  %xmm0,0x0(%rbp)
L51:
  mov    0x48(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L8
  add    $0x50,%rsp
  mov    %r12d,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  ret
  nopl   0x0(%rax)
L160:
  movzbl 0x29(%rsp),%edx
  cmp    %dl,%al
  je     L83
  mov    %dl,0x7(%r14)
  jmp    L68
  nopw   0x0(%rax,%rax,1)
L12:
  mov    $0x2,%r12d
  jmp    L51
  nopl   0x0(%rax,%rax,1)
L166:
  lea    D7(%rip),%rsi
  mov    %r12,%rdi
  call   <strcpy@plt>
  movsd  0x8(%rsp),%xmm1
  movsd  0x10(%rsp),%xmm2
  jmp    L102
L106:
  lea    D0(%rip),%rsi
  mov    %r12,%rdi
  movsd  %xmm2,0x10(%rsp)
  movsd  %xmm1,0x8(%rsp)
  call   <strcpy@plt>
  movsd  0x8(%rsp),%xmm1
  movsd  0x10(%rsp),%xmm2
  jmp    L102
L83:
  lea    0x4(%r14),%rdi
  lea    D18(%rip),%rsi
  call   <strcpy@plt>
  jmp    L68
L8:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: retrieve_data
arguments: data_tag: D35
type_infered: string
name: retrieve_data
arguments: data_tag: D7
type_infered: string
name: retrieve_data
arguments: data_tag: D0
type_infered: string
name: retrieve_data
arguments: data_tag: D18
type_infered: string

tool: D35: ???

tool: D7: GRI

tool: D0: GRA

tool: D18:     

assistant: ```c
int spctrn(const char ctypeS1[9], double crvalS1, double cdeltS1, double restfrq, double restwav, char ctypeS2[9], double *crvalS2, double *cdeltS2) {
  char *cp, 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;
  }
  ctypeS2[8] = '\0';
  for (cp = ctypeS2; *cp; cp++)
    ;
  while (cp < ctypeS2 + 8)
    *(cp++) = ' ';
  if (strncmp(ctypeS2 + 5, "???", 3) == 0) {
    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, &ptype2, &xtype2, &restreq, crvalS2, &dS2dX))) {
    return status;
  }
  if (xtype2 != xtype1) {
    return 2;
  }
  if (ctypeS2[7] == '?') {
    if (ptype2 == xtype2) {
      strcpy(ctypeS2 + 4, "    ");
    } else {
      ctypeS2[7] = ptype2;
    }
  }
  *cdeltS2 = dS2dX * dXdS1 * cdeltS1;
  return 0;
}
```