user: Converte this assembly snippet into its equivalent C code:

```asm
<mcu_bitblt>:
  endbr64
  push   %r15
  push   %r14
  mov    %rdi,%r14
  mov    %r9d,%edi
  push   %r13
  sub    %ecx,%edi
  push   %r12
  push   %rbp
  push   %rbx
  mov    0x38(%rsp),%eax
  mov    %eax,%r15d
  mov    %rsi,-0x10(%rsp)
  sub    %r8d,%r15d
  mov    %edx,-0x20(%rsp)
  mov    %ecx,-0x1c(%rsp)
  mov    %r9d,-0x18(%rsp)
  cmp    %r8d,%eax
  jle    L91
  lea    0x0(,%r15,8),%eax
  movl   $0x0,-0x28(%rsp)
  imul   %edx,%r8d
  mov    %eax,-0x14(%rsp)
  lea    0x0(,%rdi,8),%eax
  mov    %eax,-0x30(%rsp)
  movslq %ecx,%rax
  mov    %rax,-0x8(%rsp)
  mov    %r8d,-0x24(%rsp)
  nopl   0x0(%rax,%rax,1)
L44:
  mov    -0x28(%rsp),%eax
  mov    -0x1c(%rsp),%ebx
  cltd
  idiv   %r15d
  mov    %edx,%r12d
  mov    %eax,%r13d
  cmp    %ebx,-0x18(%rsp)
  jle    L101
  lea    0x0(,%rax,8),%ebp
  mov    -0x10(%rsp),%rbx
  xor    %r8d,%r8d
  lea    0x8(%rbp),%eax
  mov    %eax,-0x2c(%rsp)
  mov    %r15d,%eax
  sub    %edx,%eax
  mov    %eax,-0x34(%rsp)
  movslq -0x24(%rsp),%rax
  add    -0x8(%rsp),%rax
  lea    (%rbx,%rax,4),%r11
  jmp    L50
  nopl   0x0(%rax,%rax,1)
L106:
  cmp    $0x6,%r13d
  jg     L92
  add    -0x2c(%rsp),%eax
  mov    %ecx,%edx
  cltq
  mov    (%r14,%rax,4),%ebx
  mov    %ebx,%r10d
L84:
  mov    %edi,%esi
  imul   %r9d,%edx
  add    $0x8,%r8d
  add    $0x4,%r11
  sub    %r9d,%esi
  imul   %r9d,%r10d
  imul   %esi,%ecx
  imul   %ebx,%esi
  lea    (%rcx,%rdx,1),%eax
  cltd
  idiv   %edi
  imul   -0x34(%rsp),%eax
  mov    %eax,%ecx
  lea    (%rsi,%r10,1),%eax
  cltd
  idiv   %edi
  imul   %r12d,%eax
  add    %ecx,%eax
  cltd
  idiv   %r15d
  mov    %eax,-0x4(%r11)
  cmp    -0x30(%rsp),%r8d
  je     L101
L50:
  mov    %r8d,%eax
  cltd
  idiv   %edi
  mov    %edx,%r9d
  lea    0x0(%rbp,%rax,1),%edx
  movslq %edx,%rdx
  mov    (%r14,%rdx,4),%ecx
  cmp    $0x6,%eax
  jg     L106
  lea    0x1(%rax),%esi
  lea    0x0(%rbp,%rsi,1),%edx
  movslq %edx,%rdx
  mov    (%r14,%rdx,4),%edx
  cmp    $0x6,%r13d
  jg     L95
  mov    -0x2c(%rsp),%r10d
  add    %r10d,%eax
  add    %r10d,%esi
  cltq
  movslq %esi,%rsi
  mov    (%r14,%rax,4),%ebx
  mov    (%r14,%rsi,4),%r10d
  jmp    L84
  nopw   0x0(%rax,%rax,1)
L92:
  mov    %ecx,%r10d
  mov    %ecx,%ebx
  mov    %ecx,%edx
  jmp    L84
  nopl   0x0(%rax)
L95:
  mov    %edx,%r10d
  mov    %ecx,%ebx
  jmp    L84
  nopw   0x0(%rax,%rax,1)
L101:
  addl   $0x8,-0x28(%rsp)
  mov    -0x20(%rsp),%ecx
  mov    -0x28(%rsp),%eax
  add    %ecx,-0x24(%rsp)
  cmp    %eax,-0x14(%rsp)
  jne    L44
L91:
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
```

assistant: ```c
void mcu_bitblt(int *src, int *dest, int width, int x0, int y0, int x1, int y1) {
  int w, h, t;
  int x, y, x2, y2;
  int dx, dy;
  int c1, c2, c3, c4;
  int vx1, vx2;
  w = x1 - x0;
  h = y1 - y0;
  for (y = y0; y < y1; y++) {
    t = (y - y0) * 8;
    y2 = t / h;
    dy = t % h;
    for (x = x0; x < x1; x++) {
      t = (x - x0) * 8;
      x2 = t / w;
      dx = t % w;
      if (x2 + 1 > 7) {
        c1 = src[(((y2)*8) + (x2))];
        c2 = c1;
        if (y2 + 1 > 7) {
          c3 = c1;
          c4 = c1;
        } else {
          c3 = src[(((y2 + 1) * 8) + (x2))];
          c4 = c3;
        }
      } else {
        c1 = src[(((y2)*8) + (x2))];
        c2 = src[(((y2)*8) + (x2 + 1))];
        if (y2 + 1 > 7) {
          c3 = c1;
          c4 = c2;
        } else {
          c3 = src[(((y2 + 1) * 8) + (x2))];
          c4 = src[(((y2 + 1) * 8) + (x2 + 1))];
        }
      }
      vx1 = (c1 * (w - dx) + c2 * dx) / w;
      vx2 = (c3 * (w - dx) + c4 * dx) / w;
      dest[(y * width) + x] = (vx1 * (h - dy) + vx2 * dy) / h;
    }
  }
}
```