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

```asm
<scale_image_box>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x78,%rsp
  mov    %esi,0x2c(%rsp)
  imul   0xb0(%rsp),%esi
  mov    %rdi,0x40(%rsp)
  mov    %edx,0x54(%rsp)
  mov    %esi,0x60(%rsp)
  mov    0xb8(%rsp),%esi
  mov    %rcx,0x38(%rsp)
  mov    %r8d,0x28(%rsp)
  mov    %r9d,0x5c(%rsp)
  movss  %xmm0,0x8(%rsp)
  test   %esi,%esi
  jne    L117
  test   %edx,%edx
  jle    L102
  mov    0x28(%rsp),%ecx
  movl   $0x0,0x24(%rsp)
  movl   $0x0,0x34(%rsp)
  mov    0x2c(%rsp),%r10d
  mov    %ecx,%eax
  shr    $0x1f,%eax
  add    %ecx,%eax
  sar    %eax
  mov    %eax,0x50(%rsp)
  mov    0xb0(%rsp),%eax
  imul   %ecx,%eax
  mov    0x5c(%rsp),%ecx
  movslq %eax,%r15
  add    0xb0(%rsp),%eax
  movslq %eax,%r14
  mov    %ecx,%eax
  mov    %r15,0x10(%rsp)
  shr    $0x1f,%eax
  mov    %r14,0x18(%rsp)
  add    %ecx,%eax
  sar    %eax
  mov    %eax,0x30(%rsp)
  movslq 0xb0(%rsp),%rax
  mov    %rax,0x8(%rsp)
  mov    0xb0(%rsp),%eax
  lea    -0x1(%rax),%r8d
  mov    %eax,%ebx
  nopl   0x0(%rax)
L98:
  mov    0x30(%rsp),%eax
  cltd
  idivl  0x54(%rsp)
  lea    -0x1(%rax),%r12d
  xor    %eax,%eax
  test   %r12d,%r12d
  cmovs  %eax,%r12d
  test   %r10d,%r10d
  jle    L97
  imul   0x28(%rsp),%r12d
  mov    0x50(%rsp),%r9d
  xor    %r11d,%r11d
  mov    0x34(%rsp),%ebp
  nopl   0x0(%rax)
L4:
  mov    %r9d,%eax
  cltd
  idiv   %r10d
  mov    $0x0,%edx
  sub    $0x1,%eax
  cmovs  %edx,%eax
  lea    (%rax,%r12,1),%ecx
  imul   %ebx,%ecx
  movslq %ecx,%rcx
  add    0x38(%rsp),%rcx
  test   %ebx,%ebx
  jle    L21
  mov    0x8(%rsp),%rdx
  movslq %ebp,%rsi
  xor    %eax,%eax
  add    0x40(%rsp),%rsi
  lea    (%rcx,%rdx,1),%r14
  mov    0x10(%rsp),%rdx
  lea    (%rcx,%rdx,1),%r13
  mov    0x18(%rsp),%rdx
  lea    (%rcx,%rdx,1),%rdi
  nopw   0x0(%rax,%rax,1)
L37:
  movzbl (%rcx,%rax,1),%r15d
  movzbl (%r14,%rax,1),%edx
  add    %r15d,%edx
  movzbl 0x0(%r13,%rax,1),%r15d
  add    %r15d,%edx
  movzbl (%rdi,%rax,1),%r15d
  add    %r15d,%edx
  sar    $0x2,%edx
  mov    %dl,(%rsi,%rax,1)
  mov    %rax,%rdx
  add    $0x1,%rax
  cmp    %rdx,%r8
  jne    L37
L21:
  add    $0x1,%r11d
  add    0x28(%rsp),%r9d
  add    %ebx,%ebp
  cmp    %r11d,%r10d
  jne    L4
L97:
  mov    0x5c(%rsp),%ecx
  addl   $0x1,0x24(%rsp)
  add    %ecx,0x30(%rsp)
  mov    0x24(%rsp),%eax
  mov    0x60(%rsp),%ecx
  add    %ecx,0x34(%rsp)
  cmp    %eax,0x54(%rsp)
  jne    L98
L102:
  add    $0x78,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L117:
  mov    0x54(%rsp),%ecx
  movss  D8(%rip),%xmm0
  divss  0x8(%rsp),%xmm0
  movss  %xmm0,0x18(%rsp)
  test   %ecx,%ecx
  jle    L102
  mov    0x28(%rsp),%ecx
  movl   $0x0,0x68(%rsp)
  movl   $0x0,0x58(%rsp)
  mov    %ecx,%eax
  shr    $0x1f,%eax
  add    %ecx,%eax
  sar    %eax
  mov    %eax,0x6c(%rsp)
  mov    0xb0(%rsp),%eax
  imul   %ecx,%eax
  mov    0x5c(%rsp),%ecx
  movslq %eax,%r14
  add    0xb0(%rsp),%eax
  movslq %eax,%r15
  mov    %ecx,%eax
  shr    $0x1f,%eax
  add    %ecx,%eax
  sar    %eax
  mov    %eax,0x64(%rsp)
  mov    0xb0(%rsp),%eax
  sub    $0x1,%eax
  add    $0x1,%rax
  mov    %rax,0x48(%rsp)
  cs nopw 0x0(%rax,%rax,1)
L103:
  mov    0x64(%rsp),%eax
  cltd
  idivl  0x54(%rsp)
  mov    $0x0,%edx
  sub    $0x1,%eax
  cmovs  %edx,%eax
  mov    0x2c(%rsp),%edx
  test   %edx,%edx
  jle    L120
  imul   0x28(%rsp),%eax
  movl   $0x0,0x24(%rsp)
  movslq 0xb0(%rsp),%r13
  mov    %eax,0x50(%rsp)
  mov    0x6c(%rsp),%eax
  mov    %eax,0x34(%rsp)
  mov    0x68(%rsp),%eax
  mov    %eax,0x30(%rsp)
  nopl   0x0(%rax)
L128:
  mov    0x34(%rsp),%eax
  mov    0x50(%rsp),%esi
  cltd
  idivl  0x2c(%rsp)
  mov    $0x0,%edx
  sub    $0x1,%eax
  cmovs  %edx,%eax
  movslq 0x30(%rsp),%rdx
  lea    (%rax,%rsi,1),%ebx
  mov    0xb0(%rsp),%eax
  imul   %ebx,%eax
  movslq %eax,%rbx
  mov    0x40(%rsp),%rax
  add    0x38(%rsp),%rbx
  lea    (%rax,%rdx,1),%r12
  mov    0x48(%rsp),%rax
  add    %rbx,%rax
  mov    %rax,0x10(%rsp)
  mov    0xb0(%rsp),%eax
  test   %eax,%eax
  jle    L5
  nopl   0x0(%rax,%rax,1)
L30:
  movzbl (%rbx),%edi
  movss  0x8(%rsp),%xmm0
  add    $0x1,%rbx
  add    $0x1,%r12
  call   <gamma_correct@plt>
  movzbl -0x1(%rbx,%r13,1),%edi
  movss  0x8(%rsp),%xmm0
  mov    %eax,%ebp
  call   <gamma_correct@plt>
  movzbl -0x1(%rbx,%r14,1),%edi
  movss  0x8(%rsp),%xmm0
  add    %eax,%ebp
  call   <gamma_correct@plt>
  movzbl -0x1(%rbx,%r15,1),%edi
  movss  0x8(%rsp),%xmm0
  add    %eax,%ebp
  call   <gamma_correct@plt>
  movss  0x18(%rsp),%xmm0
  lea    0x0(%rbp,%rax,1),%edi
  sar    $0x2,%edi
  call   <gamma_correct@plt>
  mov    %al,-0x1(%r12)
  cmp    0x10(%rsp),%rbx
  jne    L30
L5:
  mov    0x28(%rsp),%ecx
  addl   $0x1,0x24(%rsp)
  add    %ecx,0x34(%rsp)
  mov    0x24(%rsp),%eax
  mov    0xb0(%rsp),%ecx
  add    %ecx,0x30(%rsp)
  cmp    %eax,0x2c(%rsp)
  jne    L128
L120:
  mov    0x5c(%rsp),%ecx
  addl   $0x1,0x58(%rsp)
  add    %ecx,0x64(%rsp)
  mov    0x58(%rsp),%eax
  mov    0x60(%rsp),%ecx
  add    %ecx,0x68(%rsp)
  cmp    %eax,0x54(%rsp)
  jne    L103
  add    $0x78,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
```

tool_calls: name: extract_symbolic_data
arguments: data_label: D8
type_infered: byte[4]

tool: {"D8": [0x00,0x00,0x80,0x3f]}

assistant: ```c
void scale_image_box(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, v;
  int dstride = dw * bpp;
  unsigned char *s;
  float invgamma;
  if (gc) {
    invgamma = 1.0f / gamma;
    for (y = 0; y < dh; ++y) {
      iy = ((y * sh + sh / 2) / dh) - 1;
      if (iy < 0)
        iy = 0;
      for (x = 0; x < dw; ++x) {
        ix = ((x * sw + sw / 2) / dw) - 1;
        if (ix < 0)
          ix = 0;
        s = src + (iy * sw + ix) * bpp;
        for (n = 0; n < bpp; ++n) {
          v = (gamma_correct(s[0], gamma) + gamma_correct(s[bpp], gamma) + gamma_correct(s[sw * bpp], gamma) + gamma_correct(s[(sw + 1) * bpp], gamma)) >> 2;
          dst[(y * dstride) + (x * bpp) + n] = gamma_correct(v, invgamma);
          ++s;
        }
      }
    }
  } else {
    for (y = 0; y < dh; ++y) {
      iy = ((y * sh + sh / 2) / dh) - 1;
      if (iy < 0)
        iy = 0;
      for (x = 0; x < dw; ++x) {
        ix = ((x * sw + sw / 2) / dw) - 1;
        if (ix < 0)
          ix = 0;
        s = src + (iy * sw + ix) * bpp;
        for (n = 0; n < bpp; ++n) {
          v = (s[0] + s[bpp] + s[sw * bpp] + s[(sw + 1) * bpp]) >> 2;
          dst[(y * dstride) + (x * bpp) + n] = v;
          ++s;
        }
      }
    }
  }
}
```