user: Demonstrate the C code that generates the assembly output below:

```asm
<scale_image_bilinear>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x88,%rsp
  mov    %esi,0x30(%rsp)
  imul   0xc0(%rsp),%esi
  mov    0xc8(%rsp),%r11d
  mov    %rdi,0x40(%rsp)
  mov    %edx,0x64(%rsp)
  mov    %rcx,0x38(%rsp)
  mov    %r8d,0x78(%rsp)
  mov    %esi,0x6c(%rsp)
  movss  %xmm0,(%rsp)
  test   %r11d,%r11d
  jne    L122
  test   %edx,%edx
  jle    L148
  lea    0x1(%r8),%eax
  sub    $0x1,%r9d
  movl   $0x0,0x54(%rsp)
  imul   0xc0(%rsp),%eax
  shl    $0x8,%r9d
  movl   $0x0,0x58(%rsp)
  mov    %r9d,0x68(%rsp)
  movl   $0x0,0x60(%rsp)
  movslq %eax,%rbx
  sub    0xc0(%rsp),%eax
  cltq
  mov    %rbx,0x8(%rsp)
  mov    %rax,0x10(%rsp)
  lea    -0x1(%r8),%eax
  shl    $0x8,%eax
  mov    %eax,0x50(%rsp)
  mov    0xc0(%rsp),%eax
  sub    $0x1,%eax
  add    $0x1,%rax
  mov    %rax,0x48(%rsp)
  nopl   0x0(%rax,%rax,1)
L121:
  mov    0x64(%rsp),%eax
  cmp    $0x1,%eax
  je     L142
  lea    -0x1(%rax),%ecx
  mov    0x58(%rsp),%eax
  mov    0x30(%rsp),%esi
  cltd
  idiv   %ecx
  xor    %edx,%edx
  cmp    0x54(%rsp),%ecx
  sete   %dl
  sub    %edx,%eax
  movzbl %al,%r13d
  sar    $0x8,%eax
  imul   0x78(%rsp),%eax
  mov    %eax,0x34(%rsp)
  test   %esi,%esi
  jle    L45
L171:
  mov    0x60(%rsp),%eax
  movl   $0x0,0x18(%rsp)
  movl   $0x0,0x2c(%rsp)
  mov    %eax,0x20(%rsp)
  cs nopw 0x0(%rax,%rax,1)
L172:
  mov    0x30(%rsp),%eax
  cmp    $0x1,%eax
  je     L202
  lea    -0x1(%rax),%esi
  mov    0x2c(%rsp),%eax
  cltd
  idiv   %esi
  mov    %eax,%ecx
  xor    %eax,%eax
  cmp    0x18(%rsp),%esi
  sete   %al
  sub    %eax,%ecx
  movzbl %cl,%ebx
  sar    $0x8,%ecx
  add    0x34(%rsp),%ecx
L81:
  imul   0xc0(%rsp),%ecx
  mov    0x38(%rsp),%rax
  movslq %ecx,%rcx
  lea    (%rax,%rcx,1),%rbp
  mov    0xc0(%rsp),%ecx
  test   %ecx,%ecx
  jle    L95
  mov    0x40(%rsp),%rax
  movslq 0x20(%rsp),%r9
  movslq 0xc0(%rsp),%r12
  lea    (%rax,%r9,1),%r14
  mov    0x48(%rsp),%rax
  add    %rbp,%rax
  mov    %rax,(%rsp)
  mov    %r14,%rax
  mov    %r12,%r14
  mov    %rbp,%r12
  mov    %rax,%rbp
  nop
L208:
  movzbl (%r12,%r14,1),%esi
  movzbl (%r12),%edi
  mov    %ebx,%edx
  call   <blerp@plt>
  mov    %ebx,%edx
  mov    %eax,%r15d
  mov    0x8(%rsp),%rax
  movzbl (%r12,%rax,1),%esi
  mov    0x10(%rsp),%rax
  movzbl (%r12,%rax,1),%edi
  call   <blerp@plt>
  mov    %r13d,%edx
  mov    %r15d,%edi
  mov    %eax,%esi
  call   <blerp@plt>
  mov    $0xff,%edx
  cmp    %edx,%eax
  cmovg  %edx,%eax
  xor    %edx,%edx
  test   %eax,%eax
  cmovs  %edx,%eax
  add    $0x1,%r12
  add    $0x1,%rbp
  mov    %al,-0x1(%rbp)
  cmp    (%rsp),%r12
  jne    L208
L95:
  mov    0xc0(%rsp),%ebx
  addl   $0x1,0x18(%rsp)
  add    %ebx,0x20(%rsp)
  mov    0x18(%rsp),%eax
  mov    0x50(%rsp),%ebx
  add    %ebx,0x2c(%rsp)
  cmp    %eax,0x30(%rsp)
  jg     L172
L45:
  mov    0x6c(%rsp),%ebx
  addl   $0x1,0x54(%rsp)
  add    %ebx,0x60(%rsp)
  mov    0x54(%rsp),%eax
  mov    0x68(%rsp),%ebx
  add    %ebx,0x58(%rsp)
  cmp    %eax,0x64(%rsp)
  jne    L121
L148:
  add    $0x88,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L122:
  mov    0x64(%rsp),%r10d
  movss  D3(%rip),%xmm0
  divss  (%rsp),%xmm0
  movss  %xmm0,0x2c(%rsp)
  test   %r10d,%r10d
  jle    L148
  lea    0x1(%r8),%eax
  sub    $0x1,%r9d
  movl   $0x0,0x74(%rsp)
  imul   0xc0(%rsp),%eax
  shl    $0x8,%r9d
  movl   $0x0,0x70(%rsp)
  mov    %r9d,0x7c(%rsp)
  movl   $0x0,0x68(%rsp)
  movslq %eax,%rdx
  sub    0xc0(%rsp),%eax
  cltq
  mov    %rdx,0x18(%rsp)
  mov    %rax,0x20(%rsp)
  lea    -0x1(%r8),%eax
  shl    $0x8,%eax
  mov    %eax,0x60(%rsp)
  mov    0xc0(%rsp),%eax
  sub    $0x1,%eax
  add    $0x1,%rax
  mov    %rax,0x58(%rsp)
  mov    0x64(%rsp),%eax
  cmp    $0x1,%eax
  je     L191
L3:
  lea    -0x1(%rax),%ecx
  mov    0x74(%rsp),%eax
  mov    0x30(%rsp),%r8d
  cltd
  idiv   %ecx
  xor    %edx,%edx
  cmp    0x68(%rsp),%ecx
  sete   %dl
  sub    %edx,%eax
  movzbl %al,%r14d
  sar    $0x8,%eax
  imul   0x78(%rsp),%eax
  mov    %eax,0x54(%rsp)
  test   %r8d,%r8d
  jle    L229
L239:
  mov    0x70(%rsp),%eax
  movl   $0x0,0x48(%rsp)
  movl   $0x0,0x34(%rsp)
  mov    %eax,0x50(%rsp)
  nopl   0x0(%rax,%rax,1)
L154:
  mov    0x30(%rsp),%eax
  cmp    $0x1,%eax
  je     L106
  lea    -0x1(%rax),%ecx
  mov    0x48(%rsp),%eax
  cltd
  idiv   %ecx
  mov    %eax,%ebx
  xor    %eax,%eax
  cmp    0x34(%rsp),%ecx
  sete   %al
  sub    %eax,%ebx
  movzbl %bl,%ebp
  sar    $0x8,%ebx
  add    0x54(%rsp),%ebx
L188:
  imul   0xc0(%rsp),%ebx
  mov    0xc0(%rsp),%edi
  movslq %ebx,%rbx
  add    0x38(%rsp),%rbx
  test   %edi,%edi
  jle    L102
  movslq 0xc0(%rsp),%rax
  movslq 0x50(%rsp),%rcx
  mov    %rax,0x10(%rsp)
  mov    0x40(%rsp),%rax
  lea    (%rax,%rcx,1),%r12
  mov    0x58(%rsp),%rax
  mov    %r12,%r13
  add    %rbx,%rax
  mov    %rax,0x8(%rsp)
L28:
  mov    0x10(%rsp),%rax
  movss  (%rsp),%xmm0
  add    $0x1,%rbx
  add    $0x1,%r13
  movzbl -0x1(%rbx,%rax,1),%edi
  call   <gamma_correct@plt>
  movss  (%rsp),%xmm0
  movzbl -0x1(%rbx),%edi
  mov    %eax,%r12d
  call   <gamma_correct@plt>
  mov    %r12d,%esi
  mov    %ebp,%edx
  mov    %eax,%edi
  call   <blerp@plt>
  movss  (%rsp),%xmm0
  mov    %eax,%r15d
  mov    0x18(%rsp),%rax
  movzbl -0x1(%rbx,%rax,1),%edi
  call   <gamma_correct@plt>
  movss  (%rsp),%xmm0
  mov    %eax,%r12d
  mov    0x20(%rsp),%rax
  movzbl -0x1(%rbx,%rax,1),%edi
  call   <gamma_correct@plt>
  mov    %ebp,%edx
  mov    %r12d,%esi
  mov    %eax,%edi
  call   <blerp@plt>
  mov    %r14d,%edx
  mov    %r15d,%edi
  mov    %eax,%esi
  call   <blerp@plt>
  movss  0x2c(%rsp),%xmm0
  mov    %eax,%edi
  call   <gamma_correct@plt>
  mov    %al,-0x1(%r13)
  cmp    0x8(%rsp),%rbx
  jne    L28
L102:
  mov    0xc0(%rsp),%ebx
  addl   $0x1,0x34(%rsp)
  add    %ebx,0x50(%rsp)
  mov    0x34(%rsp),%eax
  mov    0x60(%rsp),%ebx
  add    %ebx,0x48(%rsp)
  cmp    %eax,0x30(%rsp)
  jg     L154
L229:
  mov    0x6c(%rsp),%ebx
  addl   $0x1,0x68(%rsp)
  add    %ebx,0x70(%rsp)
  mov    0x68(%rsp),%eax
  mov    0x7c(%rsp),%ebx
  add    %ebx,0x74(%rsp)
  cmp    %eax,0x64(%rsp)
  je     L148
  mov    0x64(%rsp),%eax
  cmp    $0x1,%eax
  jne    L3
L191:
  mov    0x30(%rsp),%edx
  test   %edx,%edx
  jle    L148
  movl   $0x0,0x54(%rsp)
  xor    %r14d,%r14d
  jmp    L239
  xchg   %ax,%ax
L106:
  mov    0x54(%rsp),%ebx
  xor    %ebp,%ebp
  jmp    L188
  nopl   0x0(%rax,%rax,1)
L202:
  mov    0x34(%rsp),%ecx
  xor    %ebx,%ebx
  jmp    L81
L142:
  mov    0x30(%rsp),%eax
  test   %eax,%eax
  jle    L148
  movl   $0x0,0x34(%rsp)
  xor    %r13d,%r13d
  jmp    L171
```

tool_calls: name: unpack_data
arguments: data_label: D3
type: f32

tool: D3: 1

assistant: ```c
void scale_image_bilinear(unsigned char *dst, int dw, int dh, unsigned char *src, int sw, int sh, int bpp, int gc, float gamma) {
  int x, y, n, ix, iy, wx, wy, v, v0, v1;
  int dstride = dw * bpp;
  unsigned char *s;
  float invgamma;
  if (gc) {
    invgamma = 1.0 / gamma;
    for (y = 0; y < dh; ++y) {
      if (dh > 1) {
        iy = (((sh - 1) * y) << 8) / (dh - 1);
        if (y == dh - 1)
          --iy;
        wy = iy & 0xff;
        iy >>= 8;
      } else
        iy = wy = 0;
      for (x = 0; x < dw; ++x) {
        if (dw > 1) {
          ix = (((sw - 1) * x) << 8) / (dw - 1);
          if (x == dw - 1)
            --ix;
          wx = ix & 0xff;
          ix >>= 8;
        } else
          ix = wx = 0;
        s = src + (iy * sw + ix) * bpp;
        for (n = 0; n < bpp; ++n) {
          v0 = blerp(gamma_correct(s[0], gamma), gamma_correct(s[bpp], gamma), wx);
          v1 = blerp(gamma_correct(s[sw * bpp], gamma), gamma_correct(s[(sw + 1) * bpp], gamma), wx);
          v = blerp(v0, v1, wy);
          dst[(y * dstride) + (x * bpp) + n] = gamma_correct(v, invgamma);
          ++s;
        }
      }
    }
  } else {
    for (y = 0; y < dh; ++y) {
      if (dh > 1) {
        iy = (((sh - 1) * y) << 8) / (dh - 1);
        if (y == dh - 1)
          --iy;
        wy = iy & 0xff;
        iy >>= 8;
      } else
        iy = wy = 0;
      for (x = 0; x < dw; ++x) {
        if (dw > 1) {
          ix = (((sw - 1) * x) << 8) / (dw - 1);
          if (x == dw - 1)
            --ix;
          wx = ix & 0xff;
          ix >>= 8;
        } else
          ix = wx = 0;
        s = src + (iy * sw + ix) * bpp;
        for (n = 0; n < bpp; ++n) {
          v0 = blerp(s[0], s[bpp], wx);
          v1 = blerp(s[sw * bpp], s[(sw + 1) * bpp], wx);
          v = blerp(v0, v1, wy);
          if (v < 0)
            v = 0;
          if (v > 255)
            v = 255;
          dst[(y * dstride) + (x * bpp) + n] = v;
          ++s;
        }
      }
    }
  }
}
```