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

```asm
<AdjustScaling>:
  endbr64
  push   %rbp
  mov    $0x3,%eax
  mov    %rdi,%rbp
  mov    $0x5,%edi
  push   %rbx
  mov    %rsi,%rbx
  lea    D38(%rip),%rsi
  sub    $0x38,%rsp
  movsd  %xmm2,0x10(%rsp)
  movapd %xmm4,%xmm2
  movsd  %xmm3,0x8(%rsp)
  movsd  %xmm4,0x18(%rsp)
  movsd  %xmm1,0x20(%rsp)
  movsd  %xmm0,0x28(%rsp)
  call   <diagnostics@plt>
  movsd  0x8(%rsp),%xmm1
  movsd  0x10(%rsp),%xmm0
  lea    D27(%rip),%rsi
  mov    $0x5,%edi
  mov    $0x2,%eax
  call   <diagnostics@plt>
  movsd  0x10(%rsp),%xmm6
  pxor   %xmm3,%xmm3
  mov    $0x1,%edx
  movsd  D28(%rip),%xmm4
  movsd  0x18(%rsp),%xmm2
  ucomisd %xmm3,%xmm6
  setp   %al
  cmovne %edx,%eax
  test   %al,%al
  je     L25
  movsd  0x28(%rsp),%xmm5
  ucomisd %xmm3,%xmm5
  setp   %al
  cmovne %edx,%eax
  test   %al,%al
  je     L25
  mulsd  %xmm4,%xmm6
  movsd  %xmm4,0x18(%rsp)
  movapd %xmm6,%xmm0
  divsd  %xmm5,%xmm0
  call   <my_rint@plt>
  movsd  0x8(%rsp),%xmm7
  pxor   %xmm3,%xmm3
  pxor   %xmm0,%xmm0
  cvtsi2sd %rax,%xmm0
  mov    $0x0,%edx
  ucomisd %xmm3,%xmm7
  setnp  %al
  movsd  %xmm0,(%rbx)
  cmovne %edx,%eax
  test   %al,%al
  jne    L81
  movsd  0x20(%rsp),%xmm1
  ucomisd %xmm3,%xmm1
  setnp  %dl
  cmove  %edx,%eax
  test   %al,%al
  je     L82
L81:
  movsd  %xmm0,0x0(%rbp)
L76:
  movsd  (%rbx),%xmm1
  jmp    L80
L25:
  mulsd  %xmm4,%xmm2
  movsd  %xmm4,0x18(%rsp)
  movapd %xmm2,%xmm0
  call   <my_rint@plt>
  movsd  0x8(%rsp),%xmm7
  pxor   %xmm3,%xmm3
  pxor   %xmm1,%xmm1
  cvtsi2sd %rax,%xmm1
  mov    $0x0,%edx
  ucomisd %xmm3,%xmm7
  setnp  %al
  movsd  %xmm1,(%rbx)
  cmovne %edx,%eax
  test   %al,%al
  jne    L108
  movsd  0x20(%rsp),%xmm7
  movsd  0x18(%rsp),%xmm4
  ucomisd %xmm3,%xmm7
  setnp  %dl
  cmove  %edx,%eax
  test   %al,%al
  je     L45
L108:
  movsd  0x10(%rsp),%xmm7
  mov    $0x0,%edx
  movsd  %xmm1,0x0(%rbp)
  ucomisd %xmm3,%xmm7
  setnp  %al
  cmovne %edx,%eax
  test   %al,%al
  je     L7
  movsd  0x8(%rsp),%xmm7
  mov    $0x1,%edx
  ucomisd %xmm3,%xmm7
  setp   %al
  cmovne %edx,%eax
  test   %al,%al
  je     L7
  movsd  %xmm1,(%rbx)
  movapd %xmm1,%xmm0
L80:
  add    $0x38,%rsp
  mov    $0x5,%edi
  mov    $0x2,%eax
  pop    %rbx
  lea    D22(%rip),%rsi
  pop    %rbp
  jmp    1060 <diagnostics@plt>
  nopw   0x0(%rax,%rax,1)
L82:
  movsd  0x18(%rsp),%xmm4
L45:
  mulsd  0x8(%rsp),%xmm4
  divsd  0x20(%rsp),%xmm4
  movapd %xmm4,%xmm0
  call   <my_rint@plt>
  pxor   %xmm1,%xmm1
  pxor   %xmm3,%xmm3
  cvtsi2sd %rax,%xmm1
  jmp    L108
  nopl   (%rax)
L7:
  movapd %xmm1,%xmm0
  jmp    L76
```

tool_calls: name: retrieve_data
arguments: tag: D38
type_infered: string
name: retrieve_data
arguments: tag: D27
type_infered: string
name: retrieve_data
arguments: tag: D28
type_infered: f64
name: retrieve_data
arguments: tag: D22
type_infered: string

tool: D38: AdjustScaling h       =%f w       =%f s=%f

tool: D27: AdjustScaling target_h=%f target_w=%f

tool: D28: 100

tool: D22: AdjustScaling xscale=%d yscale=%d

assistant: ```c
void AdjustScaling(double h, double w, double target_h, double target_w, double s, uint16_t *sx, uint16_t *sy) {
  diagnostics(5, "AdjustScaling h       =%f w       =%f s=%f", h, w, s);
  diagnostics(5, "AdjustScaling target_h=%f target_w=%f", target_h, target_w);
  if (target_h != 0 && h != 0)
    *sy = (uint16_t)my_rint(100.0 * target_h / h);
  else
    *sy = (uint16_t)my_rint(s * 100);
  if (target_w == 0 || w == 0)
    *sx = *sy;
  else
    *sx = (uint16_t)my_rint(100.0 * target_w / w);
  if (target_h == 0 && target_w != 0)
    *sy = *sx;
  diagnostics(5, "AdjustScaling xscale=%d yscale=%d", *sx, *sy);
}
```