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

```asm
<imc_rotate_WCS>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x48,%rsp
  mov    %rdi,%rbx
  movss  %xmm0,0x8(%rsp)
  movss  %xmm1,0xc(%rsp)
  movq   %xmm2,%r12
  movq   %xmm3,%rbp
  mov    %fs:0x28,%rax
  mov    %rax,0x38(%rsp)
  xor    %eax,%eax
  lea    0x10(%rsp),%rdx
  lea    D37(%rip),%rsi
  call   <imget_fits_float_value@plt>
  mov    $0x0,%r13d
  cmp    $0x1,%eax
  je     L80
L38:
  mov    0x38(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L3
  mov    %r13d,%eax
  add    $0x48,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L80:
  lea    0x14(%rsp),%rdx
  lea    D125(%rip),%rsi
  mov    %rbx,%rdi
  call   <imget_fits_float_value@plt>
  mov    %eax,%r13d
  cmp    $0x1,%eax
  je     L57
  mov    $0x0,%r13d
  jmp    L38
L57:
  pxor   %xmm0,%xmm0
  cvtss2sd 0x10(%rsp),%xmm0
  movq   %r12,%xmm4
  mulsd  %xmm4,%xmm0
  pxor   %xmm1,%xmm1
  cvtss2sd 0x14(%rsp),%xmm1
  movq   %rbp,%xmm5
  mulsd  %xmm5,%xmm1
  subsd  %xmm1,%xmm0
  pxor   %xmm1,%xmm1
  cvtss2sd 0x8(%rsp),%xmm1
  addsd  %xmm1,%xmm0
  cvtsd2ss %xmm0,%xmm0
  lea    D219(%rip),%r15
  mov    %r15,%rcx
  lea    D138(%rip),%r14
  mov    %r14,%rdx
  lea    D37(%rip),%rsi
  mov    %rbx,%rdi
  call   <imupdate_fitsf@plt>
  pxor   %xmm0,%xmm0
  cvtss2sd 0x10(%rsp),%xmm0
  movq   %rbp,%xmm6
  mulsd  %xmm6,%xmm0
  pxor   %xmm1,%xmm1
  cvtss2sd 0x14(%rsp),%xmm1
  movq   %r12,%xmm7
  mulsd  %xmm7,%xmm1
  addsd  %xmm1,%xmm0
  pxor   %xmm1,%xmm1
  cvtss2sd 0xc(%rsp),%xmm1
  addsd  %xmm1,%xmm0
  cvtsd2ss %xmm0,%xmm0
  mov    %r15,%rcx
  mov    %r14,%rdx
  lea    D125(%rip),%rsi
  mov    %rbx,%rdi
  call   <imupdate_fitsf@plt>
  lea    0x18(%rsp),%rdx
  lea    D265(%rip),%rsi
  mov    %rbx,%rdi
  call   <imget_fits_float_value@plt>
  mov    %eax,%r14d
  lea    0x1c(%rsp),%rdx
  lea    D94(%rip),%rsi
  mov    %rbx,%rdi
  call   <imget_fits_float_value@plt>
  add    %eax,%r14d
  lea    0x20(%rsp),%rdx
  lea    D136(%rip),%rsi
  mov    %rbx,%rdi
  call   <imget_fits_float_value@plt>
  add    %eax,%r14d
  lea    0x24(%rsp),%rdx
  lea    D92(%rip),%rsi
  mov    %rbx,%rdi
  call   <imget_fits_float_value@plt>
  add    %r14d,%eax
  jne    L93
L53:
  lea    0x28(%rsp),%rdx
  lea    D129(%rip),%rsi
  mov    %rbx,%rdi
  call   <imget_fits_float_value@plt>
  cmp    $0x1,%eax
  je     L35
L86:
  movq   %r12,%xmm1
  movq   %rbp,%xmm0
  lea    D72(%rip),%rsi
  mov    %rbx,%rdi
  call   <imaddhistf@plt>
  jmp    L38
L93:
  pxor   %xmm0,%xmm0
  cvtss2sd 0x18(%rsp),%xmm0
  movq   %r12,%xmm4
  mulsd  %xmm4,%xmm0
  pxor   %xmm1,%xmm1
  cvtss2sd 0x20(%rsp),%xmm1
  movq   %rbp,%xmm5
  mulsd  %xmm5,%xmm1
  subsd  %xmm1,%xmm0
  cvtsd2ss %xmm0,%xmm0
  mov    %r15,%rcx
  lea    D170(%rip),%r14
  mov    %r14,%rdx
  lea    D265(%rip),%rsi
  mov    %rbx,%rdi
  call   <imupdate_fitsf@plt>
  pxor   %xmm0,%xmm0
  cvtss2sd 0x1c(%rsp),%xmm0
  movq   %r12,%xmm6
  mulsd  %xmm6,%xmm0
  pxor   %xmm1,%xmm1
  cvtss2sd 0x24(%rsp),%xmm1
  movq   %rbp,%xmm7
  mulsd  %xmm7,%xmm1
  subsd  %xmm1,%xmm0
  cvtsd2ss %xmm0,%xmm0
  mov    %r15,%rcx
  mov    %r14,%rdx
  lea    D94(%rip),%rsi
  mov    %rbx,%rdi
  call   <imupdate_fitsf@plt>
  pxor   %xmm0,%xmm0
  cvtss2sd 0x18(%rsp),%xmm0
  movq   %rbp,%xmm4
  mulsd  %xmm4,%xmm0
  pxor   %xmm1,%xmm1
  cvtss2sd 0x20(%rsp),%xmm1
  movq   %r12,%xmm5
  mulsd  %xmm5,%xmm1
  addsd  %xmm1,%xmm0
  cvtsd2ss %xmm0,%xmm0
  mov    %r15,%rcx
  mov    %r14,%rdx
  lea    D136(%rip),%rsi
  mov    %rbx,%rdi
  call   <imupdate_fitsf@plt>
  pxor   %xmm0,%xmm0
  cvtss2sd 0x1c(%rsp),%xmm0
  movq   %rbp,%xmm6
  mulsd  %xmm6,%xmm0
  pxor   %xmm1,%xmm1
  cvtss2sd 0x24(%rsp),%xmm1
  movq   %r12,%xmm7
  mulsd  %xmm7,%xmm1
  addsd  %xmm1,%xmm0
  cvtsd2ss %xmm0,%xmm0
  mov    %r15,%rcx
  mov    %r14,%rdx
  lea    D92(%rip),%rsi
  mov    %rbx,%rdi
  call   <imupdate_fitsf@plt>
  jmp    L53
L35:
  lea    0x2c(%rsp),%rdx
  lea    D264(%rip),%rsi
  mov    %rbx,%rdi
  call   <imget_fits_float_value@plt>
  cmp    $0x1,%eax
  jne    L86
  lea    0x30(%rsp),%rdx
  lea    D182(%rip),%rsi
  mov    %rbx,%rdi
  call   <imget_fits_float_value@plt>
  cmp    $0x1,%eax
  jne    L86
  lea    0x34(%rsp),%rdx
  lea    D17(%rip),%rsi
  mov    %rbx,%rdi
  call   <imget_fits_float_value@plt>
  cmp    $0x1,%eax
  jne    L86
  pxor   %xmm0,%xmm0
  cvtss2sd 0x28(%rsp),%xmm0
  movq   %r12,%xmm4
  mulsd  %xmm4,%xmm0
  pxor   %xmm1,%xmm1
  cvtss2sd 0x30(%rsp),%xmm1
  movq   %rbp,%xmm5
  mulsd  %xmm5,%xmm1
  addsd  %xmm1,%xmm0
  cvtsd2ss %xmm0,%xmm0
  lea    D219(%rip),%r15
  mov    %r15,%rcx
  lea    D170(%rip),%r14
  mov    %r14,%rdx
  lea    D129(%rip),%rsi
  mov    %rbx,%rdi
  call   <imupdate_fitsf@plt>
  pxor   %xmm0,%xmm0
  cvtss2sd 0x2c(%rsp),%xmm0
  movq   %r12,%xmm6
  mulsd  %xmm6,%xmm0
  pxor   %xmm1,%xmm1
  cvtss2sd 0x34(%rsp),%xmm1
  movq   %rbp,%xmm7
  mulsd  %xmm7,%xmm1
  addsd  %xmm1,%xmm0
  cvtsd2ss %xmm0,%xmm0
  mov    %r15,%rcx
  mov    %r14,%rdx
  lea    D264(%rip),%rsi
  mov    %rbx,%rdi
  call   <imupdate_fitsf@plt>
  movss  0x28(%rsp),%xmm0
  xorps  D40(%rip),%xmm0
  cvtss2sd %xmm0,%xmm0
  movq   %rbp,%xmm4
  mulsd  %xmm4,%xmm0
  pxor   %xmm1,%xmm1
  cvtss2sd 0x30(%rsp),%xmm1
  movq   %r12,%xmm5
  mulsd  %xmm5,%xmm1
  addsd  %xmm1,%xmm0
  cvtsd2ss %xmm0,%xmm0
  mov    %r15,%rcx
  mov    %r14,%rdx
  lea    D182(%rip),%rsi
  mov    %rbx,%rdi
  call   <imupdate_fitsf@plt>
  movss  0x2c(%rsp),%xmm0
  xorps  D40(%rip),%xmm0
  cvtss2sd %xmm0,%xmm0
  movq   %rbp,%xmm6
  mulsd  %xmm6,%xmm0
  pxor   %xmm1,%xmm1
  cvtss2sd 0x34(%rsp),%xmm1
  movq   %r12,%xmm7
  mulsd  %xmm7,%xmm1
  addsd  %xmm1,%xmm0
  cvtsd2ss %xmm0,%xmm0
  mov    %r15,%rcx
  mov    %r14,%rdx
  lea    D17(%rip),%rsi
  mov    %rbx,%rdi
  call   <imupdate_fitsf@plt>
  jmp    L86
L3:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: extract_symbolic_data
arguments: data_tag: D37
data_type: string
name: extract_symbolic_data
arguments: data_tag: D125
data_type: string
name: extract_symbolic_data
arguments: data_tag: D219
data_type: string
name: extract_symbolic_data
arguments: data_tag: D138
data_type: string
name: extract_symbolic_data
arguments: data_tag: D265
data_type: string
name: extract_symbolic_data
arguments: data_tag: D94
data_type: string
name: extract_symbolic_data
arguments: data_tag: D136
data_type: string
name: extract_symbolic_data
arguments: data_tag: D92
data_type: string
name: extract_symbolic_data
arguments: data_tag: D129
data_type: string
name: extract_symbolic_data
arguments: data_tag: D72
data_type: string
name: extract_symbolic_data
arguments: data_tag: D170
data_type: string
name: extract_symbolic_data
arguments: data_tag: D264
data_type: string
name: extract_symbolic_data
arguments: data_tag: D182
data_type: string
name: extract_symbolic_data
arguments: data_tag: D17
data_type: string
name: extract_symbolic_data
arguments: data_tag: D40
data_type: byte[16]

tool: D37: CRPIX1

tool: D125: CRPIX2

tool: 

tool: D138: %20.1f / %-47.47s

tool: D265: CD1_1

tool: D94: CD1_2

tool: D136: CD2_1

tool: D92: CD2_2

tool: D129: PC001001

tool: D72: WCS is rotated sin=%f cos=%f

tool: D170: %20.8f / %-47.47s

tool: D264: PC001002

tool: D182: PC002001

tool: D17: PC002002

tool: {"D40": [0x00,0x00,0x00,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00]}

assistant: ```c
int imc_rotate_WCS(struct icom *icom, float dx, float dy, double cos_rot, double sin_rot) {
  float crpix1, crpix2;
  float cd11, cd12, cd21, cd22;
  float pc11, pc12, pc21, pc22;
  if (imget_fits_float_value(icom, "CRPIX1", &crpix1) == 1 && imget_fits_float_value(icom, "CRPIX2", &crpix2) == 1) {
    imupdate_fitsf(icom, "CRPIX1", "%20.1f / %-47.47s", crpix1 * cos_rot - crpix2 * sin_rot + dx, "");
    imupdate_fitsf(icom, "CRPIX2", "%20.1f / %-47.47s", crpix1 * sin_rot + crpix2 * cos_rot + dy, "");
    if ((imget_fits_float_value(icom, "CD1_1", &cd11) + imget_fits_float_value(icom, "CD1_2", &cd12) + imget_fits_float_value(icom, "CD2_1", &cd21) + imget_fits_float_value(icom, "CD2_2", &cd22)) != 0) {
      imupdate_fitsf(icom, "CD1_1", "%20.8f / %-47.47s", (cd11 * cos_rot - cd21 * sin_rot), "");
      imupdate_fitsf(icom, "CD1_2", "%20.8f / %-47.47s", (cd12 * cos_rot - cd22 * sin_rot), "");
      imupdate_fitsf(icom, "CD2_1", "%20.8f / %-47.47s", (cd11 * sin_rot + cd21 * cos_rot), "");
      imupdate_fitsf(icom, "CD2_2", "%20.8f / %-47.47s", (cd12 * sin_rot + cd22 * cos_rot), "");
    }
    if (imget_fits_float_value(icom, "PC001001", &pc11) == 1 && imget_fits_float_value(icom, "PC001002", &pc12) == 1 && imget_fits_float_value(icom, "PC002001", &pc21) == 1 && imget_fits_float_value(icom, "PC002002", &pc22) == 1) {
      imupdate_fitsf(icom, "PC001001", "%20.8f / %-47.47s", (pc11 * cos_rot + pc21 * sin_rot), "");
      imupdate_fitsf(icom, "PC001002", "%20.8f / %-47.47s", (pc12 * cos_rot + pc22 * sin_rot), "");
      imupdate_fitsf(icom, "PC002001", "%20.8f / %-47.47s", (-pc11 * sin_rot + pc21 * cos_rot), "");
      imupdate_fitsf(icom, "PC002002", "%20.8f / %-47.47s", (-pc12 * sin_rot + pc22 * cos_rot), "");
    }
    imaddhistf(icom, "WCS is rotated sin=%f cos=%f", sin_rot, cos_rot);
    return 1;
  }
  return 0;
}
```