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

```asm
<scale_volume_image_cubic>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x158,%rsp
  mov    %rdi,0x100(%rsp)
  mov    %esi,%eax
  mov    %esi,0xec(%rsp)
  mov    %edx,%esi
  mov    %edx,0x78(%rsp)
  mov    %ecx,%edi
  mov    %ecx,0x7c(%rsp)
  mov    %r8,0xf8(%rsp)
  mov    %r9d,0x124(%rsp)
  mov    0x190(%rsp),%edx
  mov    0x198(%rsp),%ecx
  movss  %xmm0,(%rsp)
  mov    %eax,%ebx
  imul   0x1a0(%rsp),%ebx
  mov    %ebx,0x120(%rsp)
  imul   %edx,%r9d
  mov    %r9d,0x13c(%rsp)
  imul   0x1a0(%rsp),%r9d
  mov    %r9d,0xf4(%rsp)
  imul   %esi,%eax
  imul   0x1a0(%rsp),%eax
  mov    %eax,0x140(%rsp)
  cmpl   $0x0,0x1a8(%rsp)
  jne    L86
  test   %edi,%edi
  jle    L480
  mov    0x124(%rsp),%ebx
  lea    0x3(%rbx),%eax
  imul   0x1a0(%rsp),%eax
  cltq
  mov    %rax,0x8(%rsp)
  lea    0x2(%rbx),%eax
  imul   0x1a0(%rsp),%eax
  cltq
  mov    %rax,0x10(%rsp)
  lea    0x1(%rbx),%esi
  imul   0x1a0(%rsp),%esi
  movslq %esi,%rax
  mov    %rax,0x18(%rsp)
  mov    %ebx,%r8d
  imul   0x1a0(%rsp),%r8d
  movslq %r8d,%rax
  mov    %rax,0x20(%rsp)
  mov    0x1a0(%rsp),%eax
  add    %eax,%eax
  mov    %eax,%edi
  add    0x1a0(%rsp),%edi
  movslq %edi,%rdi
  mov    %rdi,0x80(%rsp)
  cltq
  mov    %rax,0x88(%rsp)
  lea    (%rbx,%rbx,1),%eax
  lea    0x3(%rax),%edi
  imul   0x1a0(%rsp),%edi
  movslq %edi,%rdi
  mov    %rdi,0x28(%rsp)
  lea    (%rsi,%rsi,1),%r9d
  movslq %r9d,%rdi
  mov    %rdi,0x30(%rsp)
  lea    0x1(%rax),%edi
  imul   0x1a0(%rsp),%edi
  movslq %edi,%rdi
  mov    %rdi,0x38(%rsp)
  lea    (%r8,%r8,1),%edi
  movslq %edi,%r11
  mov    %r11,0x40(%rsp)
  add    %esi,%r9d
  movslq %r9d,%rsi
  mov    %rsi,0xa8(%rsp)
  add    %ebx,%eax
  lea    0x2(%rax),%esi
  imul   0x1a0(%rsp),%esi
  movslq %esi,%rsi
  mov    %rsi,0xb0(%rsp)
  add    $0x1,%eax
  imul   0x1a0(%rsp),%eax
  cltq
  mov    %rax,0xb8(%rsp)
  add    %r8d,%edi
  movslq %edi,%rax
  mov    %rax,0xc0(%rsp)
  sub    $0x1,%ecx
  shl    $0x7,%ecx
  mov    %ecx,0x134(%rsp)
  sub    $0x1,%edx
  shl    $0x7,%edx
  mov    %edx,0x118(%rsp)
  lea    -0x1(%rbx),%eax
  shl    $0x7,%eax
  mov    %eax,0xf0(%rsp)
  mov    0x1a8(%rsp),%eax
  mov    %eax,0x128(%rsp)
  movl   $0x0,0x130(%rsp)
  movl   $0x0,0x12c(%rsp)
  movslq 0x1a0(%rsp),%rax
  mov    %rax,0x90(%rsp)
  jmp    L351
L86:
  movss  D1(%rip),%xmm0
  divss  (%rsp),%xmm0
  movss  %xmm0,0xc0(%rsp)
  cmpl   $0x0,0x7c(%rsp)
  jle    L480
  mov    0x124(%rsp),%ebx
  lea    0x3(%rbx),%eax
  imul   0x1a0(%rsp),%eax
  cltq
  mov    %rax,0x20(%rsp)
  lea    0x2(%rbx),%eax
  imul   0x1a0(%rsp),%eax
  cltq
  mov    %rax,0x28(%rsp)
  lea    0x1(%rbx),%esi
  imul   0x1a0(%rsp),%esi
  movslq %esi,%rax
  mov    %rax,0x30(%rsp)
  mov    %ebx,%r8d
  imul   0x1a0(%rsp),%r8d
  movslq %r8d,%rax
  mov    %rax,0x38(%rsp)
  mov    0x1a0(%rsp),%eax
  add    %eax,%eax
  mov    %eax,%edi
  add    0x1a0(%rsp),%edi
  movslq %edi,%rdi
  mov    %rdi,0x98(%rsp)
  cltq
  mov    %rax,0xa0(%rsp)
  lea    (%rbx,%rbx,1),%eax
  lea    0x3(%rax),%edi
  imul   0x1a0(%rsp),%edi
  movslq %edi,%rdi
  mov    %rdi,0x40(%rsp)
  lea    (%rsi,%rsi,1),%r9d
  movslq %r9d,%rdi
  mov    %rdi,0x48(%rsp)
  lea    0x1(%rax),%edi
  imul   0x1a0(%rsp),%edi
  movslq %edi,%rdi
  mov    %rdi,0x50(%rsp)
  lea    (%r8,%r8,1),%edi
  movslq %edi,%r10
  mov    %r10,0x58(%rsp)
  add    %esi,%r9d
  movslq %r9d,%rsi
  mov    %rsi,0xc8(%rsp)
  add    %ebx,%eax
  lea    0x2(%rax),%esi
  imul   0x1a0(%rsp),%esi
  movslq %esi,%rsi
  mov    %rsi,0xd0(%rsp)
  add    $0x1,%eax
  imul   0x1a0(%rsp),%eax
  cltq
  mov    %rax,0xd8(%rsp)
  add    %r8d,%edi
  movslq %edi,%rax
  mov    %rax,0xe0(%rsp)
  sub    $0x1,%ecx
  shl    $0x7,%ecx
  mov    %ecx,0x14c(%rsp)
  sub    $0x1,%edx
  shl    $0x7,%edx
  mov    %edx,0x130(%rsp)
  lea    -0x1(%rbx),%eax
  shl    $0x7,%eax
  mov    %eax,0x114(%rsp)
  movl   $0x0,0x148(%rsp)
  movl   $0x0,0x144(%rsp)
  movl   $0x0,0x138(%rsp)
  movslq 0x1a0(%rsp),%rax
  mov    %rax,0xa8(%rsp)
  jmp    L240
L284:
  movl   $0x0,0xb8(%rsp)
  movl   $0x0,0x80(%rsp)
  jmp    L58
L642:
  movl   $0x0,0x18(%rsp)
  movl   $0x0,0x10(%rsp)
  jmp    L5
L433:
  movl   $0x0,0x4(%rsp)
  mov    $0x0,%eax
  jmp    L15
L75:
  mov    0x98(%rsp),%rax
  movzbl (%r14,%rax,1),%edi
  movss  (%rsp),%xmm0
  call   <gamma_correct@plt>
  mov    %eax,0x60(%rsp)
  mov    0xa0(%rsp),%rdx
  movzbl (%r14,%rdx,1),%edi
  movss  (%rsp),%xmm0
  call   <gamma_correct@plt>
  mov    %eax,%r13d
  mov    0xa8(%rsp),%rdx
  movzbl (%r14,%rdx,1),%edi
  movss  (%rsp),%xmm0
  call   <gamma_correct@plt>
  mov    %eax,%r12d
  movzbl (%r14),%edi
  movss  (%rsp),%xmm0
  call   <gamma_correct@plt>
  mov    %eax,%edi
  mov    0x4(%rsp),%r8d
  mov    0x60(%rsp),%ecx
  mov    %r13d,%edx
  mov    %r12d,%esi
  call   <icerp@plt>
  mov    %eax,0x68(%rsp)
  jmp    L56
L410:
  mov    0xc8(%rsp),%rax
  movzbl (%r14,%rax,1),%edi
  movss  (%rsp),%xmm0
  call   <gamma_correct@plt>
  mov    %eax,0x6c(%rsp)
  mov    0xd0(%rsp),%rsi
  movzbl (%r14,%rsi,1),%edi
  movss  (%rsp),%xmm0
  call   <gamma_correct@plt>
  mov    %eax,0x88(%rsp)
  mov    0xd8(%rsp),%rsi
  movzbl (%r14,%rsi,1),%edi
  movss  (%rsp),%xmm0
  call   <gamma_correct@plt>
  mov    %eax,%r13d
  mov    0xe0(%rsp),%rsi
  movzbl (%r14,%rsi,1),%edi
  movss  (%rsp),%xmm0
  call   <gamma_correct@plt>
  mov    %eax,%edi
  mov    0x4(%rsp),%r8d
  mov    0x6c(%rsp),%ecx
  mov    0x88(%rsp),%edx
  mov    %r13d,%esi
  call   <icerp@plt>
  mov    %eax,%ecx
  jmp    L255
L728:
  mov    0x40(%rsp),%rax
  movzbl (%r15,%rax,1),%edi
  movss  (%rsp),%xmm0
  call   <gamma_correct@plt>
  mov    %eax,%r13d
  mov    0x48(%rsp),%rax
  movzbl (%r15,%rax,1),%edi
  movss  (%rsp),%xmm0
  call   <gamma_correct@plt>
  mov    %eax,0x6c(%rsp)
  mov    0x50(%rsp),%rcx
  movzbl (%r15,%rcx,1),%edi
  movss  (%rsp),%xmm0
  call   <gamma_correct@plt>
  mov    %eax,%ebp
  mov    0x58(%rsp),%rcx
  movzbl (%r15,%rcx,1),%edi
  movss  (%rsp),%xmm0
  call   <gamma_correct@plt>
  mov    %eax,%edi
  mov    0x4(%rsp),%r8d
  mov    %r13d,%ecx
  mov    0x6c(%rsp),%edx
  mov    %ebp,%esi
  call   <icerp@plt>
  mov    %eax,%ebp
  mov    %eax,%ecx
  mov    0x10(%rsp),%esi
  cmp    %esi,0x60(%rsp)
  jg     L85
L412:
  mov    0x18(%rsp),%r8d
  mov    %ebp,%edx
  mov    %r12d,%esi
  mov    0x68(%rsp),%edi
  call   <icerp@plt>
  mov    %eax,0x6c(%rsp)
L736:
  mov    0x20(%rsp),%rax
  movzbl (%rbx,%rax,1),%edi
  movss  (%rsp),%xmm0
  call   <gamma_correct@plt>
  mov    %eax,%r13d
  mov    0x28(%rsp),%rax
  movzbl (%rbx,%rax,1),%edi
  movss  (%rsp),%xmm0
  call   <gamma_correct@plt>
  mov    %eax,%r12d
  mov    0x30(%rsp),%rax
  movzbl (%rbx,%rax,1),%edi
  movss  (%rsp),%xmm0
  call   <gamma_correct@plt>
  mov    %eax,%ebp
  mov    0x38(%rsp),%rax
  movzbl (%rbx,%rax,1),%edi
  movss  (%rsp),%xmm0
  call   <gamma_correct@plt>
  mov    %eax,%edi
  mov    0x4(%rsp),%r8d
  mov    %r13d,%ecx
  mov    %r12d,%edx
  mov    %ebp,%esi
  call   <icerp@plt>
  mov    %eax,%ebp
  mov    %eax,0x68(%rsp)
  cmpl   $0x0,0x10(%rsp)
  jg     L269
L621:
  mov    0x40(%rsp),%rax
  movzbl (%rbx,%rax,1),%edi
  movss  (%rsp),%xmm0
  call   <gamma_correct@plt>
  mov    %eax,0x88(%rsp)
  mov    0x48(%rsp),%rsi
  movzbl (%rbx,%rsi,1),%edi
  movss  (%rsp),%xmm0
  call   <gamma_correct@plt>
  mov    %eax,%r13d
  mov    0x50(%rsp),%rdx
  movzbl (%rbx,%rdx,1),%edi
  movss  (%rsp),%xmm0
  call   <gamma_correct@plt>
  mov    %eax,%r12d
  mov    0x58(%rsp),%rsi
  movzbl (%rbx,%rsi,1),%edi
  movss  (%rsp),%xmm0
  call   <gamma_correct@plt>
  mov    %eax,%edi
  mov    0x4(%rsp),%r8d
  mov    0x88(%rsp),%ecx
  mov    %r13d,%edx
  mov    %r12d,%esi
  call   <icerp@plt>
  mov    %eax,%r12d
  mov    %eax,%ecx
  mov    0x10(%rsp),%edx
  cmp    %edx,0x60(%rsp)
  jg     L497
L318:
  mov    0x18(%rsp),%r8d
  mov    %r12d,%edx
  mov    %ebp,%esi
  mov    0x68(%rsp),%edi
  call   <icerp@plt>
  mov    %eax,%ebp
  mov    0x7c(%rsp),%eax
  sub    $0x1,%eax
  mov    %ebp,%ecx
  cmp    0x80(%rsp),%eax
  jg     L705
L408:
  mov    0xb8(%rsp),%r8d
  mov    %ebp,%edx
  mov    0x90(%rsp),%esi
  mov    0x6c(%rsp),%edi
  call   <icerp@plt>
  mov    $0xff,%edx
  cmp    %edx,%eax
  cmovle %eax,%edx
  mov    %edx,%edi
  test   %edx,%edx
  mov    $0x0,%eax
  cmovs  %eax,%edi
  movss  0xc0(%rsp),%xmm0
  call   <gamma_correct@plt>
  mov    0x70(%rsp),%rsi
  mov    %al,(%rsi)
  add    $0x1,%r15
  add    $0x1,%r14
  add    $0x1,%rbx
  addq   $0x1,0x8(%rsp)
  mov    0x8(%rsp),%rax
  add    $0x1,%rsi
  mov    %rsi,0x70(%rsp)
  cmp    %rax,0xb0(%rsp)
  je     L241
L542:
  mov    0x20(%rsp),%rax
  movzbl (%r14,%rax,1),%edi
  movss  (%rsp),%xmm0
  call   <gamma_correct@plt>
  mov    %eax,%r13d
  mov    0x28(%rsp),%rax
  movzbl (%r14,%rax,1),%edi
  movss  (%rsp),%xmm0
  call   <gamma_correct@plt>
  mov    %eax,%r12d
  mov    0x30(%rsp),%rax
  movzbl (%r14,%rax,1),%edi
  movss  (%rsp),%xmm0
  call   <gamma_correct@plt>
  mov    %eax,%ebp
  mov    0x38(%rsp),%rax
  movzbl (%r14,%rax,1),%edi
  movss  (%rsp),%xmm0
  call   <gamma_correct@plt>
  mov    %eax,%edi
  mov    0x4(%rsp),%r8d
  mov    %r13d,%ecx
  mov    %r12d,%edx
  mov    %ebp,%esi
  call   <icerp@plt>
  mov    %eax,%ebp
  mov    %eax,0x68(%rsp)
  cmpl   $0x0,0x10(%rsp)
  jg     L75
L56:
  mov    0x40(%rsp),%rax
  movzbl (%r14,%rax,1),%edi
  movss  (%rsp),%xmm0
  call   <gamma_correct@plt>
  mov    %eax,0x60(%rsp)
  mov    0x48(%rsp),%rsi
  movzbl (%r14,%rsi,1),%edi
  movss  (%rsp),%xmm0
  call   <gamma_correct@plt>
  mov    %eax,%r13d
  mov    0x50(%rsp),%rdx
  movzbl (%r14,%rdx,1),%edi
  movss  (%rsp),%xmm0
  call   <gamma_correct@plt>
  mov    %eax,%r12d
  mov    0x58(%rsp),%rsi
  movzbl (%r14,%rsi,1),%edi
  movss  (%rsp),%xmm0
  call   <gamma_correct@plt>
  mov    %eax,%edi
  mov    0x4(%rsp),%r8d
  mov    0x60(%rsp),%ecx
  mov    %r13d,%edx
  mov    %r12d,%esi
  call   <icerp@plt>
  mov    %eax,%r12d
  mov    0x78(%rsp),%eax
  sub    $0x1,%eax
  mov    %eax,0x60(%rsp)
  mov    %r12d,%ecx
  cmp    0x10(%rsp),%eax
  jg     L410
L255:
  mov    0x18(%rsp),%r8d
  mov    %r12d,%edx
  mov    %ebp,%esi
  mov    0x68(%rsp),%edi
  call   <icerp@plt>
  mov    %eax,0x90(%rsp)
  mov    %eax,0x6c(%rsp)
  cmpl   $0x0,0x80(%rsp)
  jle    L736
  mov    0x20(%rsp),%rax
  movzbl (%r15,%rax,1),%edi
  movss  (%rsp),%xmm0
  call   <gamma_correct@plt>
  mov    %eax,%r13d
  mov    0x28(%rsp),%rax
  movzbl (%r15,%rax,1),%edi
  movss  (%rsp),%xmm0
  call   <gamma_correct@plt>
  mov    %eax,%r12d
  mov    0x30(%rsp),%rax
  movzbl (%r15,%rax,1),%edi
  movss  (%rsp),%xmm0
  call   <gamma_correct@plt>
  mov    %eax,%ebp
  mov    0x38(%rsp),%rax
  movzbl (%r15,%rax,1),%edi
  movss  (%rsp),%xmm0
  call   <gamma_correct@plt>
  mov    %eax,%edi
  mov    0x4(%rsp),%r8d
  mov    %r13d,%ecx
  mov    %r12d,%edx
  mov    %ebp,%esi
  call   <icerp@plt>
  mov    %eax,%r12d
  mov    %eax,0x68(%rsp)
  cmpl   $0x0,0x10(%rsp)
  jle    L728
  mov    0x98(%rsp),%rax
  movzbl (%r15,%rax,1),%edi
  movss  (%rsp),%xmm0
  call   <gamma_correct@plt>
  mov    %eax,%r13d
  mov    0xa0(%rsp),%rax
  movzbl (%r15,%rax,1),%edi
  movss  (%rsp),%xmm0
  call   <gamma_correct@plt>
  mov    %eax,0x68(%rsp)
  mov    0xa8(%rsp),%rcx
  movzbl (%r15,%rcx,1),%edi
  movss  (%rsp),%xmm0
  call   <gamma_correct@plt>
  mov    %eax,%ebp
  movzbl (%r15),%edi
  movss  (%rsp),%xmm0
  call   <gamma_correct@plt>
  mov    %eax,%edi
  mov    0x4(%rsp),%r8d
  mov    %r13d,%ecx
  mov    0x68(%rsp),%edx
  mov    %ebp,%esi
  call   <icerp@plt>
  mov    %eax,0x68(%rsp)
  jmp    L728
L85:
  mov    0xc8(%rsp),%rax
  movzbl (%r15,%rax,1),%edi
  movss  (%rsp),%xmm0
  call   <gamma_correct@plt>
  mov    %eax,0x6c(%rsp)
  mov    0xd0(%rsp),%rsi
  movzbl (%r15,%rsi,1),%edi
  movss  (%rsp),%xmm0
  call   <gamma_correct@plt>
  mov    %eax,%r13d
  mov    0xd8(%rsp),%rdx
  movzbl (%r15,%rdx,1),%edi
  movss  (%rsp),%xmm0
  call   <gamma_correct@plt>
  mov    %eax,0x88(%rsp)
  mov    0xe0(%rsp),%rdx
  movzbl (%r15,%rdx,1),%edi
  movss  (%rsp),%xmm0
  call   <gamma_correct@plt>
  mov    %eax,%edi
  mov    0x4(%rsp),%r8d
  mov    0x6c(%rsp),%ecx
  mov    %r13d,%edx
  mov    0x88(%rsp),%esi
  call   <icerp@plt>
  mov    %eax,%ecx
  jmp    L412
L269:
  mov    0x98(%rsp),%rax
  movzbl (%rbx,%rax,1),%edi
  movss  (%rsp),%xmm0
  call   <gamma_correct@plt>
  mov    %eax,0x68(%rsp)
  mov    0xa0(%rsp),%rdx
  movzbl (%rbx,%rdx,1),%edi
  movss  (%rsp),%xmm0
  call   <gamma_correct@plt>
  mov    %eax,%r13d
  mov    0xa8(%rsp),%rsi
  movzbl (%rbx,%rsi,1),%edi
  movss  (%rsp),%xmm0
  call   <gamma_correct@plt>
  mov    %eax,%r12d
  movzbl (%rbx),%edi
  movss  (%rsp),%xmm0
  call   <gamma_correct@plt>
  mov    %eax,%edi
  mov    0x4(%rsp),%r8d
  mov    0x68(%rsp),%ecx
  mov    %r13d,%edx
  mov    %r12d,%esi
  call   <icerp@plt>
  mov    %eax,0x68(%rsp)
  jmp    L621
L497:
  mov    0xc8(%rsp),%rax
  movzbl (%rbx,%rax,1),%edi
  movss  (%rsp),%xmm0
  call   <gamma_correct@plt>
  mov    %eax,0x88(%rsp)
  mov    0xd0(%rsp),%rdx
  movzbl (%rbx,%rdx,1),%edi
  movss  (%rsp),%xmm0
  call   <gamma_correct@plt>
  mov    %eax,0xe8(%rsp)
  mov    0xd8(%rsp),%rsi
  movzbl (%rbx,%rsi,1),%edi
  movss  (%rsp),%xmm0
  call   <gamma_correct@plt>
  mov    %eax,%r13d
  mov    0xe0(%rsp),%rsi
  movzbl (%rbx,%rsi,1),%edi
  movss  (%rsp),%xmm0
  call   <gamma_correct@plt>
  mov    %eax,%edi
  mov    0x4(%rsp),%r8d
  mov    0x88(%rsp),%ecx
  mov    0xe8(%rsp),%edx
  mov    %r13d,%esi
  call   <icerp@plt>
  mov    %eax,%ecx
  jmp    L318
L705:
  mov    0x8(%rsp),%r12
  mov    0x20(%rsp),%rax
  movzbl (%r12,%rax,1),%edi
  movss  (%rsp),%xmm0
  call   <gamma_correct@plt>
  mov    %eax,0x68(%rsp)
  mov    0x28(%rsp),%rdx
  movzbl (%r12,%rdx,1),%edi
  movss  (%rsp),%xmm0
  call   <gamma_correct@plt>
  mov    %eax,%r13d
  mov    %r12,0x8(%rsp)
  mov    0x30(%rsp),%rdx
  movzbl (%r12,%rdx,1),%edi
  movss  (%rsp),%xmm0
  call   <gamma_correct@plt>
  mov    %eax,%r12d
  mov    0x8(%rsp),%rsi
  mov    0x38(%rsp),%rdx
  movzbl (%rsi,%rdx,1),%edi
  movss  (%rsp),%xmm0
  call   <gamma_correct@plt>
  mov    %eax,%edi
  mov    0x4(%rsp),%r8d
  mov    0x68(%rsp),%ecx
  mov    %r13d,%edx
  mov    %r12d,%esi
  call   <icerp@plt>
  mov    %eax,%r13d
  mov    %eax,0x68(%rsp)
  cmpl   $0x0,0x10(%rsp)
  jg     L444
L749:
  mov    0x8(%rsp),%r12
  mov    0x40(%rsp),%rax
  movzbl (%r12,%rax,1),%edi
  movss  (%rsp),%xmm0
  call   <gamma_correct@plt>
  mov    %eax,0x88(%rsp)
  mov    0x48(%rsp),%rdx
  movzbl (%r12,%rdx,1),%edi
  movss  (%rsp),%xmm0
  call   <gamma_correct@plt>
  mov    %eax,0xe8(%rsp)
  mov    %r12,0x8(%rsp)
  mov    0x50(%rsp),%rdi
  movzbl (%r12,%rdi,1),%edi
  movss  (%rsp),%xmm0
  call   <gamma_correct@plt>
  mov    %eax,%r12d
  mov    0x8(%rsp),%rsi
  mov    0x58(%rsp),%rdi
  movzbl (%rsi,%rdi,1),%edi
  movss  (%rsp),%xmm0
  call   <gamma_correct@plt>
  mov    %eax,%edi
  mov    0x4(%rsp),%r8d
  mov    0x88(%rsp),%ecx
  mov    0xe8(%rsp),%edx
  mov    %r12d,%esi
  call   <icerp@plt>
  mov    %eax,%r12d
  mov    %eax,%ecx
  mov    0x10(%rsp),%esi
  cmp    %esi,0x60(%rsp)
  jg     L145
L532:
  mov    0x18(%rsp),%r8d
  mov    %r12d,%edx
  mov    %r13d,%esi
  mov    0x68(%rsp),%edi
  call   <icerp@plt>
  mov    %eax,%ecx
  jmp    L408
L444:
  mov    0x8(%rsp),%r12
  mov    0x98(%rsp),%rax
  movzbl (%r12,%rax,1),%edi
  movss  (%rsp),%xmm0
  call   <gamma_correct@plt>
  mov    %eax,0x68(%rsp)
  mov    0xa0(%rsp),%rsi
  movzbl (%r12,%rsi,1),%edi
  movss  (%rsp),%xmm0
  call   <gamma_correct@plt>
  mov    %eax,0x88(%rsp)
  mov    %r12,0x8(%rsp)
  mov    0xa8(%rsp),%rdi
  movzbl (%r12,%rdi,1),%edi
  movss  (%rsp),%xmm0
  call   <gamma_correct@plt>
  mov    %eax,%r12d
  mov    0x8(%rsp),%rsi
  movzbl (%rsi),%edi
  movss  (%rsp),%xmm0
  call   <gamma_correct@plt>
  mov    %eax,%edi
  mov    0x4(%rsp),%r8d
  mov    0x68(%rsp),%ecx
  mov    0x88(%rsp),%edx
  mov    %r12d,%esi
  call   <icerp@plt>
  mov    %eax,0x68(%rsp)
  jmp    L749
L145:
  mov    0x8(%rsp),%rax
  mov    0xc8(%rsp),%rcx
  movzbl (%rax,%rcx,1),%edi
  movss  (%rsp),%xmm0
  call   <gamma_correct@plt>
  mov    %eax,0x60(%rsp)
  mov    0x8(%rsp),%rsi
  mov    0xd0(%rsp),%rdx
  movzbl (%rsi,%rdx,1),%edi
  movss  (%rsp),%xmm0
  call   <gamma_correct@plt>
  mov    %eax,0x88(%rsp)
  mov    0x8(%rsp),%rsi
  mov    0xd8(%rsp),%r10
  movzbl (%rsi,%r10,1),%edi
  movss  (%rsp),%xmm0
  call   <gamma_correct@plt>
  mov    %eax,0xe8(%rsp)
  mov    0x8(%rsp),%rdi
  mov    0xe0(%rsp),%r11
  movzbl (%rdi,%r11,1),%edi
  movss  (%rsp),%xmm0
  call   <gamma_correct@plt>
  mov    %eax,%edi
  mov    0x4(%rsp),%r8d
  mov    0x60(%rsp),%ecx
  mov    0x88(%rsp),%edx
  mov    0xe8(%rsp),%esi
  call   <icerp@plt>
  mov    %eax,%ecx
  jmp    L532
L241:
  addl   $0x1,0xf0(%rsp)
  mov    0xf0(%rsp),%eax
  mov    0x114(%rsp),%ecx
  add    %ecx,0x10c(%rsp)
  mov    0x1a0(%rsp),%ecx
  add    %ecx,0x108(%rsp)
  cmp    %eax,0xec(%rsp)
  je     L715
L401:
  cmpl   $0x1,0xec(%rsp)
  jle    L433
  mov    0x10c(%rsp),%eax
  mov    0x118(%rsp),%ebx
  cltd
  idiv   %ebx
  cmp    0xf0(%rsp),%ebx
  sete   %dl
  movzbl %dl,%edx
  sub    %edx,%eax
  mov    %eax,%ebx
  and    $0x7f,%ebx
  mov    %ebx,0x4(%rsp)
  sar    $0x7,%eax
L15:
  mov    0x110(%rsp),%ebx
  lea    -0x1(%rbx,%rax,1),%eax
  imul   0x1a0(%rsp),%eax
  cltq
  mov    0xf8(%rsp),%rbx
  lea    (%rbx,%rax,1),%r13
  movslq 0xf4(%rsp),%rax
  lea    0x0(%r13,%rax,1),%r14
  lea    (%r14,%rax,1),%rbx
  lea    (%rbx,%rax,1),%r15
  cmpl   $0x0,0x1a0(%rsp)
  jle    L241
  movslq 0x108(%rsp),%rax
  add    0x100(%rsp),%rax
  mov    %rax,0x70(%rsp)
  mov    0x1a0(%rsp),%eax
  add    %r15,%rax
  mov    %rax,0xb0(%rsp)
  mov    %r15,0x8(%rsp)
  mov    %r13,%r15
  jmp    L542
L715:
  addl   $0x1,0x11c(%rsp)
  mov    0x11c(%rsp),%eax
  mov    0x130(%rsp),%ecx
  add    %ecx,0x12c(%rsp)
  mov    0x120(%rsp),%ecx
  add    %ecx,0x128(%rsp)
  cmp    %eax,0x78(%rsp)
  je     L484
L629:
  mov    0x78(%rsp),%eax
  cmp    $0x1,%eax
  jle    L642
  lea    -0x1(%rax),%ecx
  mov    0x12c(%rsp),%eax
  cltd
  idiv   %ecx
  cmp    0x11c(%rsp),%ecx
  sete   %dl
  movzbl %dl,%edx
  sub    %edx,%eax
  mov    %eax,%ebx
  and    $0x7f,%ebx
  mov    %ebx,0x18(%rsp)
  sar    $0x7,%eax
  mov    %eax,0x10(%rsp)
L5:
  mov    0xec(%rsp),%ebx
  test   %ebx,%ebx
  jle    L715
  mov    0x10(%rsp),%eax
  sub    $0x1,%eax
  imul   0x124(%rsp),%eax
  add    0x134(%rsp),%eax
  mov    %eax,0x110(%rsp)
  mov    0x128(%rsp),%eax
  mov    %eax,0x108(%rsp)
  movl   $0x0,0x10c(%rsp)
  movl   $0x0,0xf0(%rsp)
  lea    -0x1(%rbx),%eax
  mov    %eax,0x118(%rsp)
  jmp    L401
L484:
  addl   $0x1,0x138(%rsp)
  mov    0x138(%rsp),%eax
  mov    0x14c(%rsp),%ecx
  add    %ecx,0x144(%rsp)
  mov    0x140(%rsp),%ecx
  add    %ecx,0x148(%rsp)
  cmp    %eax,0x7c(%rsp)
  je     L480
L240:
  mov    0x7c(%rsp),%eax
  cmp    $0x1,%eax
  jle    L284
  lea    -0x1(%rax),%ecx
  mov    0x144(%rsp),%eax
  cltd
  idiv   %ecx
  cmp    0x138(%rsp),%ecx
  sete   %dl
  movzbl %dl,%edx
  sub    %edx,%eax
  mov    %eax,%ebx
  and    $0x7f,%ebx
  mov    %ebx,0xb8(%rsp)
  sar    $0x7,%eax
  mov    %eax,0x80(%rsp)
L58:
  cmpl   $0x0,0x78(%rsp)
  jle    L484
  mov    0x80(%rsp),%eax
  sub    $0x1,%eax
  imul   0x13c(%rsp),%eax
  mov    %eax,0x134(%rsp)
  mov    0x148(%rsp),%eax
  mov    %eax,0x128(%rsp)
  movl   $0x0,0x12c(%rsp)
  movl   $0x0,0x11c(%rsp)
  jmp    L629
L182:
  mov    0x1a8(%rsp),%eax
  mov    %eax,0xa0(%rsp)
  mov    %eax,0x68(%rsp)
  jmp    L95
L65:
  mov    0x1a8(%rsp),%eax
  mov    %eax,0x4(%rsp)
  mov    %eax,%r15d
  jmp    L212
L441:
  mov    0x1a8(%rsp),%r15d
  mov    %r15d,%eax
  jmp    L427
L70:
  mov    0x80(%rsp),%rax
  movzbl (%rbx,%rax,1),%ecx
  mov    0x88(%rsp),%rax
  movzbl (%rbx,%rax,1),%edx
  mov    0x90(%rsp),%rax
  movzbl (%rbx,%rax,1),%esi
  movzbl (%rbx),%edi
  mov    %r14d,%r8d
  call   <icerp@plt>
  mov    %eax,0x50(%rsp)
  jmp    L574
L59:
  mov    0xa8(%rsp),%rax
  movzbl (%rbx,%rax,1),%ecx
  mov    0xb0(%rsp),%rax
  movzbl (%rbx,%rax,1),%edx
  mov    0xb8(%rsp),%rax
  movzbl (%rbx,%rax,1),%esi
  mov    0xc0(%rsp),%rax
  movzbl (%rbx,%rax,1),%edi
  mov    %r14d,%r8d
  call   <icerp@plt>
  mov    %eax,%ecx
  jmp    L51
L136:
  mov    0x28(%rsp),%rax
  movzbl (%r12,%rax,1),%ecx
  mov    0x30(%rsp),%rax
  movzbl (%r12,%rax,1),%edx
  mov    0x38(%rsp),%rax
  movzbl (%r12,%rax,1),%esi
  mov    0x40(%rsp),%rax
  movzbl (%r12,%rax,1),%edi
  mov    %r14d,%r8d
  call   <icerp@plt>
  mov    %eax,%ebp
  mov    %eax,%ecx
  mov    (%rsp),%edx
  cmp    %edx,0x48(%rsp)
  jg     L224
L442:
  mov    0x4(%rsp),%r8d
  mov    %ebp,%edx
  mov    0x58(%rsp),%esi
  mov    0x50(%rsp),%edi
  call   <icerp@plt>
  mov    %eax,0x58(%rsp)
L238:
  mov    0x8(%rsp),%rax
  movzbl 0x0(%r13,%rax,1),%ecx
  mov    0x10(%rsp),%rax
  movzbl 0x0(%r13,%rax,1),%edx
  mov    0x18(%rsp),%rax
  movzbl 0x0(%r13,%rax,1),%esi
  mov    0x20(%rsp),%rax
  movzbl 0x0(%r13,%rax,1),%edi
  mov    %r14d,%r8d
  call   <icerp@plt>
  mov    %eax,%ebp
  mov    %eax,0x50(%rsp)
  cmpl   $0x0,(%rsp)
  jg     L615
L338:
  mov    0x28(%rsp),%rax
  movzbl 0x0(%r13,%rax,1),%ecx
  mov    0x30(%rsp),%rax
  movzbl 0x0(%r13,%rax,1),%edx
  mov    0x38(%rsp),%rax
  movzbl 0x0(%r13,%rax,1),%esi
  mov    0x40(%rsp),%rax
  movzbl 0x0(%r13,%rax,1),%edi
  mov    %r14d,%r8d
  call   <icerp@plt>
  mov    %eax,0x70(%rsp)
  mov    %eax,%ecx
  mov    (%rsp),%edx
  cmp    %edx,0x48(%rsp)
  jg     L99
L600:
  mov    0x4(%rsp),%r8d
  mov    0x70(%rsp),%edx
  mov    %ebp,%esi
  mov    0x50(%rsp),%edi
  call   <icerp@plt>
  mov    %eax,%ebp
  mov    0x7c(%rsp),%eax
  sub    $0x1,%eax
  mov    %ebp,%ecx
  cmp    0x68(%rsp),%eax
  jg     L529
L483:
  mov    0xa0(%rsp),%r8d
  mov    %ebp,%edx
  mov    0x6c(%rsp),%esi
  mov    0x58(%rsp),%edi
  call   <icerp@plt>
  mov    $0xff,%edx
  cmp    %edx,%eax
  cmovg  %edx,%eax
  test   %eax,%eax
  mov    $0x0,%edx
  cmovs  %edx,%eax
  mov    0x60(%rsp),%rsi
  mov    %al,(%rsi)
  add    $0x1,%r12
  add    $0x1,%rbx
  add    $0x1,%r13
  add    $0x1,%r15
  add    $0x1,%rsi
  mov    %rsi,0x60(%rsp)
  cmp    0x98(%rsp),%r15
  je     L495
L699:
  mov    0x8(%rsp),%rax
  movzbl (%rbx,%rax,1),%ecx
  mov    0x10(%rsp),%rax
  movzbl (%rbx,%rax,1),%edx
  mov    0x18(%rsp),%rax
  movzbl (%rbx,%rax,1),%esi
  mov    0x20(%rsp),%rax
  movzbl (%rbx,%rax,1),%edi
  mov    %r14d,%r8d
  call   <icerp@plt>
  mov    %eax,%ebp
  mov    %eax,0x50(%rsp)
  cmpl   $0x0,(%rsp)
  jg     L70
L574:
  mov    0x28(%rsp),%rax
  movzbl (%rbx,%rax,1),%ecx
  mov    0x30(%rsp),%rax
  movzbl (%rbx,%rax,1),%edx
  mov    0x38(%rsp),%rax
  movzbl (%rbx,%rax,1),%esi
  mov    0x40(%rsp),%rax
  movzbl (%rbx,%rax,1),%edi
  mov    %r14d,%r8d
  call   <icerp@plt>
  mov    %eax,0x58(%rsp)
  mov    0x78(%rsp),%ecx
  lea    -0x1(%rcx),%edx
  mov    %edx,0x48(%rsp)
  mov    %eax,%ecx
  cmp    (%rsp),%edx
  jg     L59
L51:
  mov    0x4(%rsp),%r8d
  mov    0x58(%rsp),%edx
  mov    %ebp,%esi
  mov    0x50(%rsp),%edi
  call   <icerp@plt>
  mov    %eax,0x6c(%rsp)
  mov    %eax,0x58(%rsp)
  cmpl   $0x0,0x68(%rsp)
  jle    L238
  mov    0x8(%rsp),%rax
  movzbl (%r12,%rax,1),%ecx
  mov    0x10(%rsp),%rax
  movzbl (%r12,%rax,1),%edx
  mov    0x18(%rsp),%rax
  movzbl (%r12,%rax,1),%esi
  mov    0x20(%rsp),%rax
  movzbl (%r12,%rax,1),%edi
  mov    %r14d,%r8d
  call   <icerp@plt>
  mov    %eax,0x58(%rsp)
  mov    %eax,0x50(%rsp)
  cmpl   $0x0,(%rsp)
  jle    L136
  mov    0x80(%rsp),%rax
  movzbl (%r12,%rax,1),%ecx
  mov    0x88(%rsp),%rax
  movzbl (%r12,%rax,1),%edx
  mov    0x90(%rsp),%rax
  movzbl (%r12,%rax,1),%esi
  movzbl (%r12),%edi
  mov    %r14d,%r8d
  call   <icerp@plt>
  mov    %eax,0x50(%rsp)
  jmp    L136
L224:
  mov    0xa8(%rsp),%rax
  movzbl (%r12,%rax,1),%ecx
  mov    0xb0(%rsp),%rax
  movzbl (%r12,%rax,1),%edx
  mov    0xb8(%rsp),%rax
  movzbl (%r12,%rax,1),%esi
  mov    0xc0(%rsp),%rax
  movzbl (%r12,%rax,1),%edi
  mov    %r14d,%r8d
  call   <icerp@plt>
  mov    %eax,%ecx
  jmp    L442
L615:
  mov    0x80(%rsp),%rax
  movzbl 0x0(%r13,%rax,1),%ecx
  mov    0x88(%rsp),%rax
  movzbl 0x0(%r13,%rax,1),%edx
  mov    0x90(%rsp),%rax
  movzbl 0x0(%r13,%rax,1),%esi
  movzbl 0x0(%r13),%edi
  mov    %r14d,%r8d
  call   <icerp@plt>
  mov    %eax,0x50(%rsp)
  jmp    L338
L99:
  mov    0xa8(%rsp),%rax
  movzbl 0x0(%r13,%rax,1),%ecx
  mov    0xb0(%rsp),%rax
  movzbl 0x0(%r13,%rax,1),%edx
  mov    0xb8(%rsp),%rax
  movzbl 0x0(%r13,%rax,1),%esi
  mov    0xc0(%rsp),%rax
  movzbl 0x0(%r13,%rax,1),%edi
  mov    %r14d,%r8d
  call   <icerp@plt>
  mov    %eax,%ecx
  jmp    L600
L529:
  mov    0x8(%rsp),%rax
  movzbl (%r15,%rax,1),%ecx
  mov    0x10(%rsp),%rax
  movzbl (%r15,%rax,1),%edx
  mov    0x18(%rsp),%rax
  movzbl (%r15,%rax,1),%esi
  mov    0x20(%rsp),%rax
  movzbl (%r15,%rax,1),%edi
  mov    %r14d,%r8d
  call   <icerp@plt>
  mov    %eax,0x70(%rsp)
  mov    %eax,0x50(%rsp)
  cmpl   $0x0,(%rsp)
  jg     L716
L551:
  mov    0x28(%rsp),%rax
  movzbl (%r15,%rax,1),%ecx
  mov    0x30(%rsp),%rax
  movzbl (%r15,%rax,1),%edx
  mov    0x38(%rsp),%rax
  movzbl (%r15,%rax,1),%esi
  mov    0x40(%rsp),%rax
  movzbl (%r15,%rax,1),%edi
  mov    %r14d,%r8d
  call   <icerp@plt>
  mov    %eax,0xc8(%rsp)
  mov    %eax,%ecx
  mov    (%rsp),%edx
  cmp    %edx,0x48(%rsp)
  jg     L485
L125:
  mov    0x4(%rsp),%r8d
  mov    0xc8(%rsp),%edx
  mov    0x70(%rsp),%esi
  mov    0x50(%rsp),%edi
  call   <icerp@plt>
  mov    %eax,%ecx
  jmp    L483
L716:
  mov    0x80(%rsp),%rax
  movzbl (%r15,%rax,1),%ecx
  mov    0x88(%rsp),%rax
  movzbl (%r15,%rax,1),%edx
  mov    0x90(%rsp),%rax
  movzbl (%r15,%rax,1),%esi
  movzbl (%r15),%edi
  mov    %r14d,%r8d
  call   <icerp@plt>
  mov    %eax,0x50(%rsp)
  jmp    L551
L485:
  mov    0xa8(%rsp),%rax
  movzbl (%r15,%rax,1),%ecx
  mov    0xb0(%rsp),%rax
  movzbl (%r15,%rax,1),%edx
  mov    0xb8(%rsp),%rax
  movzbl (%r15,%rax,1),%esi
  mov    0xc0(%rsp),%rax
  movzbl (%r15,%rax,1),%edi
  mov    %r14d,%r8d
  call   <icerp@plt>
  mov    %eax,%ecx
  jmp    L125
L495:
  addl   $0x1,0xd0(%rsp)
  mov    0xd0(%rsp),%eax
  mov    0xf0(%rsp),%ecx
  add    %ecx,0xe0(%rsp)
  mov    0x1a0(%rsp),%ecx
  add    %ecx,0xd8(%rsp)
  cmp    %eax,0xec(%rsp)
  je     L417
L358:
  cmpl   $0x1,0xec(%rsp)
  jle    L441
  mov    0xe0(%rsp),%eax
  mov    0x108(%rsp),%ebx
  cltd
  idiv   %ebx
  cmp    0xd0(%rsp),%ebx
  sete   %dl
  movzbl %dl,%edx
  sub    %edx,%eax
  mov    %eax,%r15d
  and    $0x7f,%r15d
  sar    $0x7,%eax
L427:
  mov    0xe8(%rsp),%ebx
  lea    -0x1(%rbx,%rax,1),%eax
  imul   0x1a0(%rsp),%eax
  cltq
  mov    0xf8(%rsp),%rbx
  lea    (%rbx,%rax,1),%r12
  movslq 0xf4(%rsp),%rax
  lea    (%r12,%rax,1),%rbx
  lea    (%rbx,%rax,1),%r13
  lea    0x0(%r13,%rax,1),%r14
  cmpl   $0x0,0x1a0(%rsp)
  jle    L495
  movslq 0xd8(%rsp),%rax
  add    0x100(%rsp),%rax
  mov    %rax,0x60(%rsp)
  mov    0x1a0(%rsp),%eax
  add    %r14,%rax
  mov    %rax,0x98(%rsp)
  mov    %r14,%rax
  mov    %r15d,%r14d
  mov    %rax,%r15
  jmp    L699
L417:
  addl   $0x1,0x10c(%rsp)
  mov    0x10c(%rsp),%eax
  mov    0x118(%rsp),%ecx
  add    %ecx,0x114(%rsp)
  mov    0x120(%rsp),%ecx
  add    %ecx,0x110(%rsp)
  cmp    %eax,0x78(%rsp)
  je     L100
L640:
  mov    0x78(%rsp),%eax
  cmp    $0x1,%eax
  jle    L65
  lea    -0x1(%rax),%ecx
  mov    0x114(%rsp),%eax
  cltd
  idiv   %ecx
  cmp    0x10c(%rsp),%ecx
  sete   %dl
  movzbl %dl,%edx
  sub    %edx,%eax
  mov    %eax,%ebx
  and    $0x7f,%ebx
  mov    %ebx,0x4(%rsp)
  sar    $0x7,%eax
  mov    %eax,%r15d
L212:
  mov    0xec(%rsp),%ebx
  test   %ebx,%ebx
  jle    L417
  lea    -0x1(%r15),%eax
  imul   0x124(%rsp),%eax
  add    0x11c(%rsp),%eax
  mov    %eax,0xe8(%rsp)
  mov    0x110(%rsp),%eax
  mov    %eax,0xd8(%rsp)
  mov    0x1a8(%rsp),%eax
  mov    %eax,0xd0(%rsp)
  movl   $0x0,0xe0(%rsp)
  lea    -0x1(%rbx),%eax
  mov    %eax,0x108(%rsp)
  mov    %r15d,(%rsp)
  jmp    L358
L100:
  addl   $0x1,0x128(%rsp)
  mov    0x128(%rsp),%eax
  mov    0x134(%rsp),%ecx
  add    %ecx,0x12c(%rsp)
  mov    0x140(%rsp),%ecx
  add    %ecx,0x130(%rsp)
  cmp    %eax,0x7c(%rsp)
  je     L480
L351:
  mov    0x7c(%rsp),%eax
  cmp    $0x1,%eax
  jle    L182
  lea    -0x1(%rax),%ecx
  mov    0x12c(%rsp),%eax
  cltd
  idiv   %ecx
  cmp    0x128(%rsp),%ecx
  sete   %dl
  movzbl %dl,%edx
  sub    %edx,%eax
  mov    %eax,%ebx
  and    $0x7f,%ebx
  mov    %ebx,0xa0(%rsp)
  sar    $0x7,%eax
  mov    %eax,0x68(%rsp)
L95:
  cmpl   $0x0,0x78(%rsp)
  jle    L100
  mov    0x68(%rsp),%eax
  sub    $0x1,%eax
  imul   0x13c(%rsp),%eax
  mov    %eax,0x11c(%rsp)
  mov    0x130(%rsp),%eax
  mov    %eax,0x110(%rsp)
  mov    0x1a8(%rsp),%eax
  mov    %eax,0x10c(%rsp)
  movl   $0x0,0x114(%rsp)
  jmp    L640
L480:
  add    $0x158,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
```

tool_calls: name: retrieve_data
arguments: data_label: D1
type_infered: f32

tool: D1: 1

assistant: ```c
void scale_volume_image_cubic(unsigned char *dst, int dw, int dh, int dd, unsigned char *src, int sw, int sh, int sd, int bpp, int gc, float gamma) {
  int n, x, y, z;
  int ix, iy, iz;
  int wx, wy, wz;
  int a, b, c, d;
  int val, v0, v1, v2, v3;
  int dstride = dw * bpp;
  int sslice = sw * sh * bpp;
  int dslice = dw * dh * bpp;
  unsigned char *s0, *s1, *s2, *s3;
  float invgamma;
  if (gc) {
    invgamma = 1.0 / gamma;
    for (z = 0; z < dd; ++z) {
      if (dd > 1) {
        iz = (((sd - 1) * z) << 7) / (dd - 1);
        if (z == dd - 1)
          --iz;
        wz = iz & 0x7f;
        iz >>= 7;
      } else
        iz = wz = 0;
      for (y = 0; y < dh; ++y) {
        if (dh > 1) {
          iy = (((sh - 1) * y) << 7) / (dh - 1);
          if (y == dh - 1)
            --iy;
          wy = iy & 0x7f;
          iy >>= 7;
        } else
          iy = wy = 0;
        for (x = 0; x < dw; ++x) {
          if (dw > 1) {
            ix = (((sw - 1) * x) << 7) / (dw - 1);
            if (x == dw - 1)
              --ix;
            wx = ix & 0x7f;
            ix >>= 7;
          } else
            ix = wx = 0;
          s0 = src + (((iz - 1) * (sw * sh)) + ((iy - 1) * sw) + (ix - 1)) * bpp;
          s1 = s0 + sslice;
          s2 = s1 + sslice;
          s3 = s2 + sslice;
          for (n = 0; n < bpp; ++n) {
            b = icerp(gamma_correct(s1[(sw + 0) * bpp], gamma), gamma_correct(s1[(sw + 1) * bpp], gamma), gamma_correct(s1[(sw + 2) * bpp], gamma), gamma_correct(s1[(sw + 3) * bpp], gamma), wx);
            if (iy > 0) {
              a = icerp(gamma_correct(s1[0], gamma), gamma_correct(s1[bpp], gamma), gamma_correct(s1[2 * bpp], gamma), gamma_correct(s1[3 * bpp], gamma), wx);
            } else
              a = b;
            c = icerp(gamma_correct(s1[(2 * sw + 0) * bpp], gamma), gamma_correct(s1[(2 * sw + 1) * bpp], gamma), gamma_correct(s1[(2 * sw + 2) * bpp], gamma), gamma_correct(s1[(2 * sw + 3) * bpp], gamma), wx);
            if (iy < dh - 1) {
              d = icerp(gamma_correct(s1[(3 * sw + 0) * bpp], gamma), gamma_correct(s1[(3 * sw + 1) * bpp], gamma), gamma_correct(s1[(3 * sw + 2) * bpp], gamma), gamma_correct(s1[(3 * sw + 3) * bpp], gamma), wx);
            } else
              d = c;
            v1 = icerp(a, b, c, d, wy);
            if (iz > 0) {
              b = icerp(gamma_correct(s0[(sw + 0) * bpp], gamma), gamma_correct(s0[(sw + 1) * bpp], gamma), gamma_correct(s0[(sw + 2) * bpp], gamma), gamma_correct(s0[(sw + 3) * bpp], gamma), wx);
              if (iy > 0) {
                a = icerp(gamma_correct(s0[0], gamma), gamma_correct(s0[bpp], gamma), gamma_correct(s0[2 * bpp], gamma), gamma_correct(s0[3 * bpp], gamma), wx);
              } else
                a = b;
              c = icerp(gamma_correct(s0[(2 * sw + 0) * bpp], gamma), gamma_correct(s0[(2 * sw + 1) * bpp], gamma), gamma_correct(s0[(2 * sw + 2) * bpp], gamma), gamma_correct(s0[(2 * sw + 3) * bpp], gamma), wx);
              if (iy < dh - 1) {
                d = icerp(gamma_correct(s0[(3 * sw + 0) * bpp], gamma), gamma_correct(s0[(3 * sw + 1) * bpp], gamma), gamma_correct(s0[(3 * sw + 2) * bpp], gamma), gamma_correct(s0[(3 * sw + 3) * bpp], gamma), wx);
              } else
                d = c;
              v0 = icerp(a, b, c, d, wy);
            } else
              v0 = v1;
            b = icerp(gamma_correct(s2[(sw + 0) * bpp], gamma), gamma_correct(s2[(sw + 1) * bpp], gamma), gamma_correct(s2[(sw + 2) * bpp], gamma), gamma_correct(s2[(sw + 3) * bpp], gamma), wx);
            if (iy > 0) {
              a = icerp(gamma_correct(s2[0], gamma), gamma_correct(s2[bpp], gamma), gamma_correct(s2[2 * bpp], gamma), gamma_correct(s2[3 * bpp], gamma), wx);
            } else
              a = b;
            c = icerp(gamma_correct(s2[(2 * sw + 0) * bpp], gamma), gamma_correct(s2[(2 * sw + 1) * bpp], gamma), gamma_correct(s2[(2 * sw + 2) * bpp], gamma), gamma_correct(s2[(2 * sw + 3) * bpp], gamma), wx);
            if (iy < dh - 1) {
              d = icerp(gamma_correct(s2[(3 * sw + 0) * bpp], gamma), gamma_correct(s2[(3 * sw + 1) * bpp], gamma), gamma_correct(s2[(3 * sw + 2) * bpp], gamma), gamma_correct(s2[(3 * sw + 3) * bpp], gamma), wx);
            } else
              d = c;
            v2 = icerp(a, b, c, d, wy);
            if (iz < dd - 1) {
              b = icerp(gamma_correct(s3[(sw + 0) * bpp], gamma), gamma_correct(s3[(sw + 1) * bpp], gamma), gamma_correct(s3[(sw + 2) * bpp], gamma), gamma_correct(s3[(sw + 3) * bpp], gamma), wx);
              if (iy > 0) {
                a = icerp(gamma_correct(s3[0], gamma), gamma_correct(s3[bpp], gamma), gamma_correct(s3[2 * bpp], gamma), gamma_correct(s3[3 * bpp], gamma), wx);
              } else
                a = b;
              c = icerp(gamma_correct(s3[(2 * sw + 0) * bpp], gamma), gamma_correct(s3[(2 * sw + 1) * bpp], gamma), gamma_correct(s3[(2 * sw + 2) * bpp], gamma), gamma_correct(s3[(2 * sw + 3) * bpp], gamma), wx);
              if (iy < dh - 1) {
                d = icerp(gamma_correct(s3[(3 * sw + 0) * bpp], gamma), gamma_correct(s3[(3 * sw + 1) * bpp], gamma), gamma_correct(s3[(3 * sw + 2) * bpp], gamma), gamma_correct(s3[(3 * sw + 3) * bpp], gamma), wx);
              } else
                d = c;
              v3 = icerp(a, b, c, d, wy);
            } else
              v3 = v2;
            val = icerp(v0, v1, v2, v3, wz);
            if (val < 0)
              val = 0;
            if (val > 255)
              val = 255;
            dst[(z * dslice) + (y * dstride) + (x * bpp) + n] = gamma_correct(val, invgamma);
            ++s0;
            ++s1;
            ++s2;
            ++s3;
          }
        }
      }
    }
  } else {
    for (z = 0; z < dd; ++z) {
      if (dd > 1) {
        iz = (((sd - 1) * z) << 7) / (dd - 1);
        if (z == dd - 1)
          --iz;
        wz = iz & 0x7f;
        iz >>= 7;
      } else
        iz = wz = 0;
      for (y = 0; y < dh; ++y) {
        if (dh > 1) {
          iy = (((sh - 1) * y) << 7) / (dh - 1);
          if (y == dh - 1)
            --iy;
          wy = iy & 0x7f;
          iy >>= 7;
        } else
          iy = wy = 0;
        for (x = 0; x < dw; ++x) {
          if (dw > 1) {
            ix = (((sw - 1) * x) << 7) / (dw - 1);
            if (x == dw - 1)
              --ix;
            wx = ix & 0x7f;
            ix >>= 7;
          } else
            ix = wx = 0;
          s0 = src + (((iz - 1) * (sw * sh)) + ((iy - 1) * sw) + (ix - 1)) * bpp;
          s1 = s0 + sslice;
          s2 = s1 + sslice;
          s3 = s2 + sslice;
          for (n = 0; n < bpp; ++n) {
            b = icerp(s1[(sw + 0) * bpp], s1[(sw + 1) * bpp], s1[(sw + 2) * bpp], s1[(sw + 3) * bpp], wx);
            if (iy > 0) {
              a = icerp(s1[0], s1[bpp], s1[2 * bpp], s1[3 * bpp], wx);
            } else
              a = b;
            c = icerp(s1[(2 * sw + 0) * bpp], s1[(2 * sw + 1) * bpp], s1[(2 * sw + 2) * bpp], s1[(2 * sw + 3) * bpp], wx);
            if (iy < dh - 1) {
              d = icerp(s1[(3 * sw + 0) * bpp], s1[(3 * sw + 1) * bpp], s1[(3 * sw + 2) * bpp], s1[(3 * sw + 3) * bpp], wx);
            } else
              d = c;
            v1 = icerp(a, b, c, d, wy);
            if (iz > 0) {
              b = icerp(s0[(sw + 0) * bpp], s0[(sw + 1) * bpp], s0[(sw + 2) * bpp], s0[(sw + 3) * bpp], wx);
              if (iy > 0) {
                a = icerp(s0[0], s0[bpp], s0[2 * bpp], s0[3 * bpp], wx);
              } else
                a = b;
              c = icerp(s0[(2 * sw + 0) * bpp], s0[(2 * sw + 1) * bpp], s0[(2 * sw + 2) * bpp], s0[(2 * sw + 3) * bpp], wx);
              if (iy < dh - 1) {
                d = icerp(s0[(3 * sw + 0) * bpp], s0[(3 * sw + 1) * bpp], s0[(3 * sw + 2) * bpp], s0[(3 * sw + 3) * bpp], wx);
              } else
                d = c;
              v0 = icerp(a, b, c, d, wy);
            } else
              v0 = v1;
            b = icerp(s2[(sw + 0) * bpp], s2[(sw + 1) * bpp], s2[(sw + 2) * bpp], s2[(sw + 3) * bpp], wx);
            if (iy > 0) {
              a = icerp(s2[0], s2[bpp], s2[2 * bpp], s2[3 * bpp], wx);
            } else
              a = b;
            c = icerp(s2[(2 * sw + 0) * bpp], s2[(2 * sw + 1) * bpp], s2[(2 * sw + 2) * bpp], s2[(2 * sw + 3) * bpp], wx);
            if (iy < dh - 1) {
              d = icerp(s2[(3 * sw + 0) * bpp], s2[(3 * sw + 1) * bpp], s2[(3 * sw + 2) * bpp], s2[(3 * sw + 3) * bpp], wx);
            } else
              d = c;
            v2 = icerp(a, b, c, d, wy);
            if (iz < dd - 1) {
              b = icerp(s3[(sw + 0) * bpp], s3[(sw + 1) * bpp], s3[(sw + 2) * bpp], s3[(sw + 3) * bpp], wx);
              if (iy > 0) {
                a = icerp(s3[0], s3[bpp], s3[2 * bpp], s3[3 * bpp], wx);
              } else
                a = b;
              c = icerp(s3[(2 * sw + 0) * bpp], s3[(2 * sw + 1) * bpp], s3[(2 * sw + 2) * bpp], s3[(2 * sw + 3) * bpp], wx);
              if (iy < dh - 1) {
                d = icerp(s3[(3 * sw + 0) * bpp], s3[(3 * sw + 1) * bpp], s3[(3 * sw + 2) * bpp], s3[(3 * sw + 3) * bpp], wx);
              } else
                d = c;
              v3 = icerp(a, b, c, d, wy);
            } else
              v3 = v2;
            val = icerp(v0, v1, v2, v3, wz);
            if (val < 0)
              val = 0;
            if (val > 255)
              val = 255;
            dst[(z * dslice) + (y * dstride) + (x * bpp) + n] = val;
            ++s0;
            ++s1;
            ++s2;
            ++s3;
          }
        }
      }
    }
  }
}
```