user: Please show me the C implementation that matches the assembly code listed below:

```asm
<multiplication>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x40,%rsp
  mov    %rdi,-0x28(%rbp)
  mov    %esi,-0x2c(%rbp)
  mov    %rdx,-0x38(%rbp)
  mov    %ecx,-0x30(%rbp)
  mov    %r8,-0x40(%rbp)
  movl   $0x0,-0xc(%rbp)
  mov    -0x2c(%rbp),%edx
  mov    -0x30(%rbp),%eax
  add    %edx,%eax
  add    $0x1,%eax
  mov    $0x4,%esi
  mov    %eax,%edi
  call   <calloc@plt>
  mov    %rax,-0x8(%rbp)
  movl   $0x0,-0x18(%rbp)
  jmp    L15
L89:
  movl   $0x0,-0x14(%rbp)
  mov    -0x18(%rbp),%eax
  add    $0x1,%eax
  mov    %eax,-0x10(%rbp)
  jmp    L69
L77:
  mov    -0x10(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x8(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%ecx
  mov    -0x18(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  movzbl %al,%edx
  mov    -0x14(%rbp),%eax
  movslq %eax,%rsi
  mov    -0x38(%rbp),%rax
  add    %rsi,%rax
  movzbl (%rax),%eax
  movzbl %al,%eax
  imul   %edx,%eax
  mov    %eax,%esi
  mov    -0x10(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x8(%rbp),%rax
  add    %rdx,%rax
  lea    (%rcx,%rsi,1),%edx
  mov    %edx,(%rax)
  addl   $0x1,-0x14(%rbp)
  addl   $0x1,-0x10(%rbp)
L69:
  mov    -0x14(%rbp),%eax
  cmp    -0x30(%rbp),%eax
  jle    L77
  addl   $0x1,-0x18(%rbp)
L15:
  mov    -0x18(%rbp),%eax
  cmp    -0x2c(%rbp),%eax
  jle    L89
  mov    -0x2c(%rbp),%edx
  mov    -0x30(%rbp),%eax
  add    %edx,%eax
  add    $0x1,%eax
  mov    %eax,-0x10(%rbp)
  mov    -0x10(%rbp),%eax
  mov    %eax,-0x18(%rbp)
  jmp    L27
L53:
  mov    -0x18(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x8(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%ecx
  mov    -0xc(%rbp),%edx
  mov    -0x18(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rsi
  mov    -0x8(%rbp),%rax
  add    %rsi,%rax
  add    %ecx,%edx
  mov    %edx,(%rax)
  mov    -0x18(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x8(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  shr    $0x8,%eax
  mov    %eax,-0xc(%rbp)
  mov    -0x18(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x8(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  mov    -0x18(%rbp),%edx
  movslq %edx,%rdx
  lea    0x0(,%rdx,4),%rcx
  mov    -0x8(%rbp),%rdx
  add    %rcx,%rdx
  movzbl %al,%eax
  mov    %eax,(%rdx)
  subl   $0x1,-0x18(%rbp)
L27:
  cmpl   $0x0,-0x18(%rbp)
  jns    L53
  mov    -0x8(%rbp),%rax
  mov    (%rax),%eax
  test   %eax,%eax
  jne    L109
  movl   $0x0,-0x18(%rbp)
  jmp    L79
L106:
  mov    -0x18(%rbp),%eax
  cltq
  add    $0x1,%rax
  lea    0x0(,%rax,4),%rdx
  mov    -0x8(%rbp),%rax
  add    %rdx,%rax
  mov    -0x18(%rbp),%edx
  movslq %edx,%rdx
  lea    0x0(,%rdx,4),%rcx
  mov    -0x8(%rbp),%rdx
  add    %rcx,%rdx
  mov    (%rax),%eax
  mov    %eax,(%rdx)
  addl   $0x1,-0x18(%rbp)
L79:
  mov    -0x18(%rbp),%eax
  cmp    -0x10(%rbp),%eax
  jl     L106
  subl   $0x1,-0x10(%rbp)
L109:
  mov    -0x10(%rbp),%edx
  mov    -0x40(%rbp),%rax
  mov    %edx,%esi
  mov    %rax,%rdi
  call   <realloc@plt>
  mov    -0x10(%rbp),%eax
  mov    %eax,-0x18(%rbp)
  jmp    L33
L36:
  mov    -0x18(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x8(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%edx
  mov    -0x18(%rbp),%eax
  movslq %eax,%rcx
  mov    -0x40(%rbp),%rax
  add    %rcx,%rax
  mov    %dl,(%rax)
  subl   $0x1,-0x18(%rbp)
L33:
  cmpl   $0x0,-0x18(%rbp)
  jns    L36
  mov    -0x10(%rbp),%eax
  leave
  ret
```

assistant: ```c
int multiplication(unsigned char *a, int a_len, unsigned char *b, int b_len, unsigned char *multires) {
  int i, j, k, m = 0;
  unsigned int *cross = (unsigned int *)calloc(a_len + b_len + 1, sizeof(unsigned int));
  for (i = 0; i <= a_len; i++)
    for (j = 0, k = i + 1; j <= b_len; j++, k++)
      cross[k] += a[i] * b[j];
  k = a_len + b_len + 1;
  for (i = k; i >= 0; i--) {
    cross[i] += m;
    m = cross[i] >> 8;
    cross[i] &= 0xff;
  }
  if (cross[0] == 0) {
    for (i = 0; i < k; i++)
      cross[i] = cross[i + 1];
    k--;
  }
  realloc(multires, k);
  for (i = k; i >= 0; i--)
    multires[i] = cross[i];
  return k;
}
```