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

```asm
<minCost>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbx
  sub    $0x48,%rsp
  mov    %rdi,%rcx
  mov    %esi,-0x58(%rbp)
  mov    %edx,-0x54(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x38(%rbp)
  xor    %eax,%eax
  movslq %edx,%rdx
  lea    0x0(,%rdx,4),%rax
  mov    %rax,-0x60(%rbp)
  movslq %esi,%rax
  imul   %rdx,%rax
  lea    0xf(,%rax,4),%rax
  mov    %rax,%rsi
  and    $0xfffffffffffffff0,%rsi
  and    $0xfffffffffffff000,%rax
  mov    %rsp,%rdx
  sub    %rax,%rdx
L140:
  cmp    %rdx,%rsp
  je     L76
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  jmp    L140
L76:
  mov    %rsi,%rax
  and    $0xfff,%eax
  sub    %rax,%rsp
  test   %rax,%rax
  je     L138
  orq    $0x0,-0x8(%rsp,%rax,1)
L138:
  lea    0x3(%rsp),%rax
  mov    %rax,%rdx
  shr    $0x2,%rdx
  and    $0xfffffffffffffffc,%rax
  mov    %rax,-0x48(%rbp)
  mov    -0x60(%rbp),%r14
  shr    $0x2,%r14
  mov    (%rcx),%eax
  mov    %eax,0x0(,%rdx,4)
  cmpl   $0x1,-0x58(%rbp)
  jle    L98
  lea    0x190(%rcx),%rdi
  mov    $0x1,%edx
L75:
  movslq %edx,%rsi
  imul   %r14,%rsi
  lea    -0x1(%rdx),%eax
  cltq
  imul   %r14,%rax
  mov    (%rdi),%r8d
  mov    -0x48(%rbp),%rbx
  add    (%rbx,%rax,4),%r8d
  mov    %r8d,(%rbx,%rsi,4)
  add    $0x1,%edx
  add    $0x190,%rdi
  cmp    %edx,-0x58(%rbp)
  jne    L75
  cmpl   $0x1,-0x54(%rbp)
  jle    L130
L134:
  mov    -0x54(%rbp),%esi
  mov    $0x1,%eax
L53:
  mov    (%rcx,%rax,4),%edx
  mov    -0x48(%rbp),%rdi
  add    -0x4(%rdi,%rax,4),%edx
  mov    %edx,(%rdi,%rax,4)
  add    $0x1,%rax
  cmp    %rsi,%rax
  jne    L53
L130:
  mov    -0x58(%rbp),%edx
  cmp    $0x1,%edx
  jle    L14
  mov    -0x48(%rbp),%rax
  mov    %rax,-0x50(%rbp)
  mov    -0x54(%rbp),%eax
  lea    -0x2(%rax),%eax
  lea    0x198(%rcx,%rax,4),%r15
  lea    -0x2(%rdx),%edx
  lea    (%rdx,%rdx,4),%rdx
  lea    (%rdx,%rdx,4),%rdx
  lea    (%rax,%rdx,4),%rdx
  lea    0x328(%rcx,%rdx,4),%rcx
  mov    %rcx,-0x68(%rbp)
  not    %rax
  shl    $0x2,%rax
  mov    %rax,-0x70(%rbp)
  jmp    L50
L11:
  mov    (%r12),%r13d
  mov    (%rbx,%r14,4),%esi
  mov    0x4(%rbx),%edi
  mov    (%rbx),%edx
  call   <min@plt>
  add    %eax,%r13d
  mov    %r13d,0x4(%rbx,%r14,4)
  add    $0x4,%r12
  add    $0x4,%rbx
  cmp    %r15,%r12
  jne    L11
L141:
  mov    -0x60(%rbp),%rcx
  add    %rcx,-0x50(%rbp)
  add    $0x190,%r15
  cmp    -0x68(%rbp),%r15
  je     L14
L50:
  mov    -0x70(%rbp),%rax
  lea    (%rax,%r15,1),%r12
  mov    -0x50(%rbp),%rbx
  cmpl   $0x1,-0x54(%rbp)
  jg     L11
  jmp    L141
L98:
  cmpl   $0x1,-0x54(%rbp)
  jg     L134
L14:
  mov    -0x54(%rbp),%eax
  sub    $0x1,%eax
  cltq
  mov    -0x58(%rbp),%edx
  sub    $0x1,%edx
  movslq %edx,%rdx
  imul   %r14,%rdx
  add    %rdx,%rax
  mov    -0x48(%rbp),%rcx
  mov    (%rcx,%rax,4),%eax
  mov    -0x38(%rbp),%rdx
  sub    %fs:0x28,%rdx
  jne    L51
  lea    -0x28(%rbp),%rsp
  pop    %rbx
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  pop    %rbp
  ret
L51:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
int minCost(int cost[100][100], int m, int n) {
  int path[m][n], i, j;
  path[0][0] = cost[0][0];
  for (i = 1; i < m; ++i) {
    path[i][0] = path[i - 1][0] + cost[i][0];
  }
  for (i = 1; i < n; ++i) {
    path[0][i] = path[0][i - 1] + cost[0][i];
  }
  for (i = 1; i < m; ++i) {
    for (j = 1; j < n; ++j) {
      path[i][j] = cost[i][j] + min(path[i - 1][j], path[i][j - 1], path[i - 1][j - 1]);
    }
  }
  return path[m - 1][n - 1];
}
```