user: 下面的汇编指令对应的C源代码是什么：

```asm
<scale_internal>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x98,%rsp
  mov    %edi,%r15d
  mov    %esi,%r14d
  mov    %edx,0x1c(%rsp)
  mov    %rcx,%r13
  mov    %r8d,0x24(%rsp)
  mov    %r9d,0x48(%rsp)
  mov    0xd0(%rsp),%rax
  mov    %rax,0x50(%rsp)
  mov    %fs:0x28,%rax
  mov    %rax,0x88(%rsp)
  xor    %eax,%eax
  lea    (%r8,%r8,1),%eax
  cmp    %esi,%eax
  je     L67
L217:
  pxor   %xmm0,%xmm0
  cvtsi2ssl 0x1c(%rsp),%xmm0
  mov    0x48(%rsp),%edi
  pxor   %xmm1,%xmm1
  cvtsi2ss %edi,%xmm1
  divss  %xmm1,%xmm0
  pxor   %xmm1,%xmm1
  cvtsi2ss %r14d,%xmm1
  mov    0x24(%rsp),%eax
  pxor   %xmm2,%xmm2
  cvtsi2ss %eax,%xmm2
  divss  %xmm2,%xmm1
  movaps %xmm1,%xmm7
  movss  %xmm1,0x58(%rsp)
  movss  D56(%rip),%xmm1
  mulss  %xmm1,%xmm7
  movss  %xmm7,0x5c(%rsp)
  mulss  %xmm0,%xmm1
  movss  %xmm1,0x60(%rsp)
  test   %edi,%edi
  jle    L44
  imul   %r15d,%eax
  mov    %eax,0x64(%rsp)
  movslq %r15d,%rax
  shl    $0x2,%rax
  mov    %rax,0x38(%rsp)
  movl   $0x0,0x4c(%rsp)
  movl   $0x0,0x34(%rsp)
  pxor   %xmm7,%xmm7
  cvtss2sd %xmm0,%xmm7
  movsd  %xmm7,0x68(%rsp)
  lea    0x70(%rsp),%rbx
  mov    %r13,%rbp
  jmp    L246
L67:
  mov    %r9d,%eax
  add    %eax,%eax
  cmp    %edx,%eax
  jne    L217
  mov    0x50(%rsp),%r8
  call   <halveImage@plt>
L44:
  mov    0x88(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L153
  add    $0x98,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L169:
  movss  D56(%rip),%xmm1
  movaps %xmm0,%xmm7
  addss  %xmm1,%xmm7
  movss  %xmm7,0x10(%rsp)
  subss  %xmm1,%xmm0
  movss  %xmm0,0x30(%rsp)
  jmp    L234
L141:
  movss  D56(%rip),%xmm1
  movaps %xmm0,%xmm7
  addss  %xmm1,%xmm7
  movss  %xmm7,0x4(%rsp)
  subss  %xmm1,%xmm0
  movss  %xmm0,0x14(%rsp)
  jmp    L227
L143:
  movss  0xc(%rsp),%xmm7
  subss  %xmm0,%xmm7
  movss  %xmm7,0x8(%rsp)
  jmp    L105
L48:
  movaps %xmm2,%xmm1
  subss  %xmm0,%xmm1
L38:
  mulss  0x8(%rsp),%xmm1
  addss  %xmm1,%xmm3
  add    %r13d,%edx
  imul   %r15d,%edx
  test   %r15d,%r15d
  jle    L114
  movslq %edx,%rdx
  lea    0x0(%rbp,%rdx,4),%rdx
  mov    $0x0,%eax
L91:
  movaps %xmm1,%xmm0
  mulss  (%rdx,%rax,4),%xmm0
  addss  (%rbx,%rax,4),%xmm0
  movss  %xmm0,(%rbx,%rax,4)
  add    $0x1,%rax
  cmp    %eax,%r15d
  jg     L91
L114:
  movss  0x4(%rsp),%xmm6
  comiss %xmm2,%xmm6
  jbe    L85
L9:
  lea    (%rcx,%r14,1),%eax
  cltd
  idiv   %r14d
  add    $0x1,%ecx
  movaps %xmm2,%xmm0
  pxor   %xmm2,%xmm2
  cvtsi2ss %ecx,%xmm2
  movss  0x4(%rsp),%xmm4
  comiss %xmm4,%xmm2
  jbe    L48
  subss  %xmm0,%xmm4
  movaps %xmm4,%xmm1
  jmp    L38
L85:
  movss  %xmm3,0x18(%rsp)
L182:
  movss  0x10(%rsp),%xmm7
  comiss 0xc(%rsp),%xmm7
  jbe    L122
L100:
  mov    0x1c(%rsp),%esi
  lea    (%r12,%rsi,1),%eax
  cltd
  idiv   %esi
  mov    %edx,%r13d
  add    $0x1,%r12d
  movss  0xc(%rsp),%xmm0
  pxor   %xmm7,%xmm7
  cvtsi2ss %r12d,%xmm7
  movss  %xmm7,0xc(%rsp)
  movss  0x10(%rsp),%xmm5
  comiss %xmm5,%xmm7
  jbe    L143
  subss  %xmm0,%xmm5
  movss  %xmm5,0x8(%rsp)
L105:
  movss  0x14(%rsp),%xmm0
  call   <floor@plt>
  mov    %eax,%ecx
  movss  0x4(%rsp),%xmm7
  movss  0x14(%rsp),%xmm2
  comiss %xmm2,%xmm7
  jbe    L182
  imul   %r14d,%r13d
  movss  0x18(%rsp),%xmm3
  jmp    L9
L122:
  test   %r15d,%r15d
  jle    L83
  mov    $0x0,%eax
  movsd  D42(%rip),%xmm2
  pxor   %xmm0,%xmm0
  cvtss2sd 0x18(%rsp),%xmm0
  mov    0x28(%rsp),%rdx
L250:
  pxor   %xmm1,%xmm1
  cvtss2sd (%rbx,%rax,4),%xmm1
  addsd  %xmm2,%xmm1
  divsd  %xmm0,%xmm1
  cvtsd2ss %xmm1,%xmm1
  movss  %xmm1,(%rdx,%rax,4)
  add    $0x1,%rax
  cmp    %eax,%r15d
  jg     L250
L83:
  addl   $0x1,0x20(%rsp)
  mov    0x20(%rsp),%eax
  mov    0x38(%rsp),%rsi
  add    %rsi,0x28(%rsp)
  cmp    %eax,0x24(%rsp)
  je     L19
L52:
  pxor   %xmm0,%xmm0
  cvtsi2sdl 0x20(%rsp),%xmm0
  addsd  D42(%rip),%xmm0
  mulsd  0x40(%rsp),%xmm0
  cvtsd2ss %xmm0,%xmm0
  cmp    %r14d,0x24(%rsp)
  jge    L141
  movss  0x5c(%rsp),%xmm7
  movaps %xmm7,%xmm6
  addss  %xmm0,%xmm6
  movss  %xmm6,0x4(%rsp)
  subss  %xmm7,%xmm0
  movss  %xmm0,0x14(%rsp)
L227:
  movl   $0x0,0x7c(%rsp)
  movl   $0x0,0x78(%rsp)
  movl   $0x0,0x74(%rsp)
  movl   $0x0,0x70(%rsp)
  movss  0x30(%rsp),%xmm0
  call   <floor@plt>
  mov    %eax,%r12d
  movss  0x30(%rsp),%xmm7
  movss  %xmm7,0xc(%rsp)
  pxor   %xmm6,%xmm6
  movss  %xmm6,0x18(%rsp)
  movss  0x10(%rsp),%xmm6
  comiss %xmm7,%xmm6
  ja     L100
  pxor   %xmm7,%xmm7
  movss  %xmm7,0x18(%rsp)
  jmp    L122
L19:
  addl   $0x1,0x34(%rsp)
  mov    0x34(%rsp),%eax
  mov    0x64(%rsp),%esi
  add    %esi,0x4c(%rsp)
  cmp    %eax,0x48(%rsp)
  je     L44
L246:
  pxor   %xmm0,%xmm0
  cvtsi2sdl 0x34(%rsp),%xmm0
  addsd  D42(%rip),%xmm0
  mulsd  0x68(%rsp),%xmm0
  cvtsd2ss %xmm0,%xmm0
  mov    0x1c(%rsp),%edi
  cmp    %edi,0x48(%rsp)
  jge    L169
  movss  0x60(%rsp),%xmm7
  movaps %xmm7,%xmm6
  addss  %xmm0,%xmm6
  movss  %xmm6,0x10(%rsp)
  subss  %xmm7,%xmm0
  movss  %xmm0,0x30(%rsp)
L234:
  cmpl   $0x0,0x24(%rsp)
  jle    L19
  movslq 0x4c(%rsp),%rax
  mov    0x50(%rsp),%rdi
  lea    (%rdi,%rax,4),%rax
  mov    %rax,0x28(%rsp)
  movl   $0x0,0x20(%rsp)
  pxor   %xmm7,%xmm7
  cvtss2sd 0x58(%rsp),%xmm7
  movsd  %xmm7,0x40(%rsp)
  jmp    L52
L153:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: retrieve_data
arguments: label: D56
datatype: f32
name: retrieve_data
arguments: label: D42
datatype: f32[2]

tool: D56: 0.5

tool: {"D42": [0.0,1.75]}

assistant: ```c
void scale_internal(GLint components, GLint widthin, GLint heightin, const GLushort *datain, GLint widthout, GLint heightout, GLushort *dataout) {
  float x, lowx, highx, convx, halfconvx;
  float y, lowy, highy, convy, halfconvy;
  float xpercent, ypercent;
  float percent;
  float totals[4];
  float area;
  int i, j, k, yint, xint, xindex, yindex;
  int temp;
  if (widthin == widthout * 2 && heightin == heightout * 2) {
    halveImage(components, widthin, heightin, datain, dataout);
    return;
  }
  convy = (float)heightin / heightout;
  convx = (float)widthin / widthout;
  halfconvx = convx / 2;
  halfconvy = convy / 2;
  for (i = 0; i < heightout; i++) {
    y = convy * (i + 0.5);
    if (heightin > heightout) {
      highy = y + halfconvy;
      lowy = y - halfconvy;
    } else {
      highy = y + 0.5;
      lowy = y - 0.5;
    }
    for (j = 0; j < widthout; j++) {
      x = convx * (j + 0.5);
      if (widthin > widthout) {
        highx = x + halfconvx;
        lowx = x - halfconvx;
      } else {
        highx = x + 0.5;
        lowx = x - 0.5;
      }
      totals[0] = totals[1] = totals[2] = totals[3] = 0.0;
      area = 0.0;
      y = lowy;
      yint = floor(y);
      while (y < highy) {
        yindex = (yint + heightin) % heightin;
        if (highy < yint + 1) {
          ypercent = highy - y;
        } else {
          ypercent = yint + 1 - y;
        }
        x = lowx;
        xint = floor(x);
        while (x < highx) {
          xindex = (xint + widthin) % widthin;
          if (highx < xint + 1) {
            xpercent = highx - x;
          } else {
            xpercent = xint + 1 - x;
          }
          percent = xpercent * ypercent;
          area += percent;
          temp = (xindex + (yindex * widthin)) * components;
          for (k = 0; k < components; k++) {
            totals[k] += datain[temp + k] * percent;
          }
          xint++;
          x = xint;
        }
        yint++;
        y = yint;
      }
      temp = (j + (i * widthout)) * components;
      for (k = 0; k < components; k++) {
        dataout[temp + k] = (totals[k] + 0.5) / area;
      }
    }
  }
}
```