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

```asm
<matrix_multiply>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x50,%rsp
  mov    %rdi,-0x28(%rbp)
  mov    %rsi,-0x30(%rbp)
  mov    %rdx,-0x38(%rbp)
  mov    %ecx,-0x3c(%rbp)
  mov    %r8d,-0x40(%rbp)
  mov    %r9d,-0x44(%rbp)
  movl   $0x0,-0x18(%rbp)
  movl   $0x0,-0x14(%rbp)
  movl   $0x0,-0x10(%rbp)
  movl   $0x0,-0xc(%rbp)
  movl   $0x0,-0x8(%rbp)
  movl   $0x0,-0x4(%rbp)
  movl   $0x0,-0x18(%rbp)
  jmp    L42
L4:
  movl   $0x0,-0x10(%rbp)
  jmp    L41
L16:
  movl   $0x0,-0xc(%rbp)
  jmp    L77
L49:
  mov    -0x18(%rbp),%eax
  imul   -0x40(%rbp),%eax
  movslq %eax,%rdx
  mov    -0xc(%rbp),%eax
  cltq
  add    %rdx,%rax
  lea    0x0(,%rax,4),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  mov    %eax,-0x8(%rbp)
  mov    -0xc(%rbp),%eax
  imul   -0x44(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x10(%rbp),%eax
  cltq
  add    %rdx,%rax
  lea    0x0(,%rax,4),%rdx
  mov    -0x30(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  mov    %eax,-0x4(%rbp)
  mov    -0x18(%rbp),%eax
  imul   -0x44(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x10(%rbp),%eax
  cltq
  add    %rdx,%rax
  lea    0x0(,%rax,4),%rdx
  mov    -0x38(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%ecx
  mov    -0x8(%rbp),%eax
  imul   -0x4(%rbp),%eax
  mov    %eax,%edx
  mov    -0x18(%rbp),%eax
  imul   -0x44(%rbp),%eax
  movslq %eax,%rsi
  mov    -0x10(%rbp),%eax
  cltq
  add    %rsi,%rax
  lea    0x0(,%rax,4),%rsi
  mov    -0x38(%rbp),%rax
  add    %rsi,%rax
  add    %ecx,%edx
  mov    %edx,(%rax)
  addl   $0x1,-0xc(%rbp)
L77:
  mov    -0xc(%rbp),%eax
  cmp    -0x40(%rbp),%eax
  jl     L49
  addl   $0x1,-0x10(%rbp)
L41:
  mov    -0x10(%rbp),%eax
  cmp    -0x44(%rbp),%eax
  jl     L16
  addl   $0x1,-0x18(%rbp)
L42:
  mov    -0x18(%rbp),%eax
  cmp    -0x3c(%rbp),%eax
  jl     L4
  movl   $0x0,-0x18(%rbp)
  jmp    L26
L68:
  movl   $0x0,-0x14(%rbp)
  jmp    L23
L78:
  mov    -0x18(%rbp),%eax
  imul   -0x44(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x14(%rbp),%eax
  cltq
  add    %rdx,%rax
  lea    0x0(,%rax,4),%rdx
  mov    -0x38(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  mov    %eax,%esi
  lea    D3(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  addl   $0x1,-0x14(%rbp)
L23:
  mov    -0x14(%rbp),%eax
  cmp    -0x44(%rbp),%eax
  jl     L78
  mov    $0xa,%edi
  call   <putchar@plt>
  addl   $0x1,-0x18(%rbp)
L26:
  mov    -0x18(%rbp),%eax
  cmp    -0x3c(%rbp),%eax
  jl     L68
  nop
  nop
  leave
  ret
```

tool_calls: name: extract_symbolic_data
arguments: tag: D3
type_infered: string

tool: D3: %d	

assistant: ```c
void matrix_multiply(int *m1, int *m2, int *r, int x, int y, int z) {
  int row = 0;
  int col = 0;
  int temp = 0;
  int position = 0;
  int b = 0;
  int c = 0;
  for (row = 0; row < x; row++) {
    for (temp = 0; temp < z; temp++) {
      for (position = 0; position < y; position++) {
        b = (*(m1 + row * y + position));
        c = (*(m2 + position * z + temp));
        (*(r + row * z + temp)) += (b * c);
      }
    }
  }
  for (row = 0; row < x; row++) {
    for (col = 0; col < z; col++) {
      printf("%d\t", *(r + row * z + col));
    }
    printf("\n");
  }
}
```