user: Translate the below assembly code into C programming language:

```asm
<calculateMinimumHP>:
  endbr64
  push   %r15
  movslq %esi,%rax
  push   %r14
  mov    %edx,%r14d
  push   %r13
  push   %r12
  mov    %rdi,%r12
  lea    0x0(,%rax,8),%edi
  push   %rbp
  push   %rbx
  mov    %rax,%rbx
  sub    $0x28,%rsp
  mov    %edx,0xc(%rsp)
  mov    %rax,0x10(%rsp)
  call   <malloc@plt>
  mov    %rax,%r15
  movslq %r14d,%rax
  mov    %rax,0x18(%rsp)
  test   %ebx,%ebx
  jle    L64
  mov    0xc(%rsp),%eax
  mov    %r15,%rbp
  lea    0x0(,%rax,4),%r14d
  mov    %ebx,%eax
  lea    (%r15,%rax,8),%r13
  nopw   0x0(%rax,%rax,1)
L79:
  mov    %r14d,%edi
  add    $0x8,%rbp
  call   <malloc@plt>
  mov    %rax,-0x8(%rbp)
  cmp    %rbp,%r13
  jne    L79
L64:
  mov    0x10(%rsp),%rax
  mov    0x18(%rsp),%rbp
  mov    $0x1,%edx
  lea    -0x2(%rbx),%ecx
  shl    $0x3,%rax
  shl    $0x2,%rbp
  mov    -0x8(%r12,%rax,1),%r8
  mov    -0x8(%r15,%rax,1),%rdi
  mov    $0x1,%eax
  lea    -0x4(%rbp),%r9
  sub    -0x4(%r8,%rbp,1),%eax
  test   %eax,%eax
  cmovle %edx,%eax
  movslq %ecx,%rdx
  mov    %eax,-0x4(%rdi,%rbp,1)
  test   %ecx,%ecx
  js     L88
  nopw   0x0(%rax,%rax,1)
L12:
  mov    (%r12,%rdx,8),%r11
  mov    0x8(%r15,%rdx,8),%rax
  mov    (%r15,%rdx,8),%r10
  mov    (%rax,%r9,1),%eax
  sub    (%r11,%r9,1),%eax
  mov    $0x1,%r11d
  test   %eax,%eax
  cmovle %r11d,%eax
  sub    $0x1,%rdx
  mov    %eax,(%r10,%r9,1)
  test   %edx,%edx
  jns    L12
L88:
  mov    0xc(%rsp),%ebx
  sub    $0x2,%ebx
  js     L36
  movslq %ebx,%r13
  mov    -0x4(%rdi,%rbp,1),%eax
  mov    %r13,%rdx
  nopl   0x0(%rax)
L73:
  sub    (%r8,%rdx,4),%eax
  mov    $0x1,%r9d
  test   %eax,%eax
  cmovle %r9d,%eax
  mov    %eax,(%rdi,%rdx,4)
  sub    $0x1,%rdx
  test   %edx,%edx
  jns    L73
  movslq %ecx,%rbx
  test   %ecx,%ecx
  js     L36
  nopw   0x0(%rax,%rax,1)
L40:
  mov    (%r15,%rbx,8),%r9
  mov    (%r12,%rbx,8),%r11
  mov    %r13,%rdi
  mov    0x8(%r15,%rbx,8),%r10
  mov    -0x4(%r9,%rbp,1),%eax
  nopl   (%rax)
L84:
  sub    (%r11,%rdi,4),%eax
  mov    (%r10,%rdi,4),%edx
  mov    $0x1,%r8d
  sub    (%r11,%rdi,4),%edx
  test   %eax,%eax
  cmovle %r8d,%eax
  test   %edx,%edx
  cmovle %r8d,%edx
  cmp    %edx,%eax
  cmovg  %edx,%eax
  mov    %eax,(%r9,%rdi,4)
  sub    $0x1,%rdi
  test   %edi,%edi
  jns    L84
  sub    $0x1,%rbx
  test   %ebx,%ebx
  jns    L40
L36:
  mov    (%r15),%rax
  mov    (%rax),%eax
  add    $0x28,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
```

assistant: ```c
int calculateMinimumHP(int **dungeon, int dungeonRowSize, int dungeonColSize) {
  int i, j;
  int **dp = malloc(dungeonRowSize * sizeof(int *));
  for (i = 0; i < dungeonRowSize; i++) {
    dp[i] = malloc(dungeonColSize * sizeof(int));
  }
  int hp = 1 - dungeon[dungeonRowSize - 1][dungeonColSize - 1];
  dp[dungeonRowSize - 1][dungeonColSize - 1] = hp >= 1 ? hp : 1;
  for (i = dungeonRowSize - 2; i >= 0; i--) {
    hp = dp[i + 1][dungeonColSize - 1] - dungeon[i][dungeonColSize - 1];
    dp[i][dungeonColSize - 1] = hp >= 1 ? hp : 1;
  }
  for (i = dungeonColSize - 2; i >= 0; i--) {
    hp = dp[dungeonRowSize - 1][i + 1] - dungeon[dungeonRowSize - 1][i];
    dp[dungeonRowSize - 1][i] = hp >= 1 ? hp : 1;
  }
  for (i = dungeonRowSize - 2; i >= 0; i--) {
    for (j = dungeonColSize - 2; j >= 0; j--) {
      int hp_r = dp[i][j + 1] - dungeon[i][j];
      int hp_d = dp[i + 1][j] - dungeon[i][j];
      hp_r = hp_r >= 1 ? hp_r : 1;
      hp_d = hp_d >= 1 ? hp_d : 1;
      dp[i][j] = hp_r < hp_d ? hp_r : hp_d;
    }
  }
  return dp[0][0];
}
```