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

```asm
<minPathSum>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbx
  sub    $0x38,%rsp
  mov    %rdi,-0x50(%rbp)
  mov    %esi,%r13d
  mov    %edx,%r14d
  mov    %fs:0x28,%rax
  mov    %rax,-0x38(%rbp)
  xor    %eax,%eax
  lea    0x1(%rsi),%eax
  cltq
  shl    $0x3,%rax
  mov    %rax,-0x48(%rbp)
  add    $0xf,%rax
  mov    %rax,%rcx
  and    $0xfffffffffffffff0,%rcx
  and    $0xfffffffffffff000,%rax
  mov    %rsp,%rdx
  sub    %rax,%rdx
L133:
  cmp    %rdx,%rsp
  je     L51
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  jmp    L133
L51:
  mov    %rcx,%rax
  and    $0xfff,%eax
  sub    %rax,%rsp
  test   %rax,%rax
  je     L6
  orq    $0x0,-0x8(%rsp,%rax,1)
L6:
  lea    0x7(%rsp),%r12
  mov    %r12,%rax
  shr    $0x3,%rax
  mov    %rax,-0x58(%rbp)
  and    $0xfffffffffffffff8,%r12
  test   %r13d,%r13d
  js     L49
  lea    0x4(,%r14,4),%r15d
  mov    $0x0,%ebx
L22:
  mov    %r15d,%edi
  call   <malloc@plt>
  mov    %rax,(%r12,%rbx,8)
  add    $0x1,%rbx
  cmp    %ebx,%r13d
  jge    L22
  movslq %r14d,%rcx
  shl    $0x2,%rcx
  mov    %r12,%rax
  lea    0x1(%r13),%edx
  lea    (%r12,%rdx,8),%rsi
L60:
  mov    (%rax),%rdx
  movl   $0x7fffffff,(%rdx,%rcx,1)
  add    $0x8,%rax
  cmp    %rsi,%rax
  jne    L60
L49:
  test   %r14d,%r14d
  js     L9
  movslq %r13d,%rax
  mov    (%r12,%rax,8),%rdx
  mov    %rdx,%rax
  mov    %r14d,%ecx
  lea    0x4(%rdx,%rcx,4),%rdx
L25:
  movl   $0x7fffffff,(%rax)
  add    $0x4,%rax
  cmp    %rdx,%rax
  jne    L25
L9:
  lea    -0x1(%r13),%r10d
  movslq %r14d,%rax
  movslq %r10d,%rdx
  mov    (%r12,%rdx,8),%rdx
  movl   $0x0,(%rdx,%rax,4)
  movslq %r13d,%r13
  mov    (%r12,%r13,8),%rdx
  movl   $0x0,-0x4(%rdx,%rax,4)
  test   %r10d,%r10d
  js     L163
  movslq %r10d,%r10
  mov    -0x50(%rbp),%rbx
  mov    -0x48(%rbp),%rdi
  lea    -0x10(%rbx,%rdi,1),%rdi
  lea    -0x1(%r14),%edx
  movslq %edx,%r11
  shl    $0x2,%r11
  mov    %edx,%edx
  sub    %rdx,%rax
  lea    -0x8(,%rax,4),%r9
  jmp    L128
L12:
  mov    (%rdi),%rcx
  add    (%rcx,%rax,1),%edx
L132:
  mov    %edx,(%rsi,%rax,1)
  sub    $0x4,%rax
  cmp    %rax,%r9
  je     L88
L103:
  mov    0x4(%rsi,%rax,1),%ecx
  mov    (%r8,%rax,1),%edx
  cmp    %edx,%ecx
  jge    L12
  mov    (%rdi),%rdx
  add    (%rdx,%rax,1),%ecx
  mov    %ecx,%edx
  jmp    L132
L88:
  sub    $0x1,%r10
  sub    $0x8,%rdi
  test   %r10d,%r10d
  js     L163
L128:
  test   %r14d,%r14d
  jle    L88
  mov    (%r12,%r10,8),%rsi
  lea    0x1(%r10),%eax
  cltq
  mov    (%r12,%rax,8),%r8
  mov    %r11,%rax
  jmp    L103
L163:
  mov    -0x58(%rbp),%rax
  mov    0x0(,%rax,8),%rax
  mov    (%rax),%eax
  mov    -0x38(%rbp),%rdx
  sub    %fs:0x28,%rdx
  jne    L73
  lea    -0x28(%rbp),%rsp
  pop    %rbx
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  pop    %rbp
  ret
L73:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
int minPathSum(int **grid, int m, int n) {
  int *p[m + 1];
  for (int i = 0; i < m + 1; i++)
    p[i] = (int *)malloc((n + 1) * sizeof(int));
  for (int i = 0; i < m + 1; i++)
    p[i][n] = 2147483647;
  for (int i = i; i < n + 1; i++)
    p[m][i] = 2147483647;
  p[m][n - 1] = p[m - 1][n] = 0;
  for (int i = m - 1; i >= 0; i--)
    for (int j = n - 1; j >= 0; j--) {
      p[i][j] = p[i][j + 1] < p[i + 1][j] ? p[i][j + 1] + grid[i][j] : p[i + 1][j] + grid[i][j];
    }
  return p[0][0];
}
```