user: 请将这段汇编代码片段转换成等效的C代码：

```asm
<calculateMinimumHP1>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x30,%rsp
  mov    %rdi,-0x28(%rbp)
  mov    %esi,-0x2c(%rbp)
  mov    %edx,-0x30(%rbp)
  mov    -0x2c(%rbp),%eax
  add    $0x1,%eax
  cltq
  shl    $0x3,%eax
  mov    %eax,%edi
  call   <malloc@plt>
  mov    %rax,-0x8(%rbp)
  movl   $0x0,-0x1c(%rbp)
  jmp    L85
L44:
  mov    -0x30(%rbp),%eax
  add    $0x1,%eax
  cltq
  shl    $0x2,%eax
  mov    %eax,%edi
  call   <malloc@plt>
  mov    -0x1c(%rbp),%edx
  movslq %edx,%rdx
  lea    0x0(,%rdx,8),%rcx
  mov    -0x8(%rbp),%rdx
  add    %rcx,%rdx
  mov    %rax,(%rdx)
  addl   $0x1,-0x1c(%rbp)
L85:
  mov    -0x1c(%rbp),%eax
  cmp    -0x2c(%rbp),%eax
  jle    L44
  movl   $0x0,-0x18(%rbp)
  jmp    L35
L80:
  mov    -0x18(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x8(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x30(%rbp),%eax
  cltq
  shl    $0x2,%rax
  add    %rax,%rdx
  mov    D10(%rip),%rax
  mov    (%rax),%eax
  mov    %eax,(%rdx)
  addl   $0x1,-0x18(%rbp)
L35:
  mov    -0x18(%rbp),%eax
  cmp    -0x2c(%rbp),%eax
  jle    L80
  movl   $0x0,-0x14(%rbp)
  jmp    L50
L59:
  mov    -0x2c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x8(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x14(%rbp),%eax
  cltq
  shl    $0x2,%rax
  add    %rax,%rdx
  mov    D10(%rip),%rax
  mov    (%rax),%eax
  mov    %eax,(%rdx)
  addl   $0x1,-0x14(%rbp)
L50:
  mov    -0x14(%rbp),%eax
  cmp    -0x30(%rbp),%eax
  jle    L59
  mov    -0x2c(%rbp),%eax
  cltq
  shl    $0x3,%rax
  lea    -0x8(%rax),%rdx
  mov    -0x8(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x30(%rbp),%eax
  cltq
  shl    $0x2,%rax
  add    %rdx,%rax
  movl   $0x1,(%rax)
  mov    -0x2c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x8(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x30(%rbp),%eax
  cltq
  shl    $0x2,%rax
  sub    $0x4,%rax
  add    %rdx,%rax
  movl   $0x1,(%rax)
  mov    -0x2c(%rbp),%eax
  sub    $0x1,%eax
  mov    %eax,-0x10(%rbp)
  jmp    L15
L81:
  mov    -0x30(%rbp),%eax
  sub    $0x1,%eax
  mov    %eax,-0xc(%rbp)
  jmp    L63
L24:
  mov    -0x10(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x8(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0xc(%rbp),%eax
  cltq
  add    $0x1,%rax
  shl    $0x2,%rax
  add    %rdx,%rax
  mov    (%rax),%edx
  mov    -0x10(%rbp),%eax
  cltq
  add    $0x1,%rax
  lea    0x0(,%rax,8),%rcx
  mov    -0x8(%rbp),%rax
  add    %rcx,%rax
  mov    (%rax),%rcx
  mov    -0xc(%rbp),%eax
  cltq
  shl    $0x2,%rax
  add    %rcx,%rax
  mov    (%rax),%eax
  cmp    %eax,%edx
  cmovle %edx,%eax
  mov    -0x10(%rbp),%edx
  movslq %edx,%rdx
  lea    0x0(,%rdx,8),%rcx
  mov    -0x28(%rbp),%rdx
  add    %rcx,%rdx
  mov    (%rdx),%rcx
  mov    -0xc(%rbp),%edx
  movslq %edx,%rdx
  shl    $0x2,%rdx
  add    %rcx,%rdx
  mov    (%rdx),%edx
  sub    %edx,%eax
  mov    -0x10(%rbp),%edx
  movslq %edx,%rdx
  lea    0x0(,%rdx,8),%rcx
  mov    -0x8(%rbp),%rdx
  add    %rcx,%rdx
  mov    (%rdx),%rcx
  mov    -0xc(%rbp),%edx
  movslq %edx,%rdx
  shl    $0x2,%rdx
  add    %rcx,%rdx
  mov    $0x1,%ecx
  test   %eax,%eax
  cmovle %ecx,%eax
  mov    %eax,(%rdx)
  subl   $0x1,-0xc(%rbp)
L63:
  cmpl   $0x0,-0xc(%rbp)
  jns    L24
  subl   $0x1,-0x10(%rbp)
L15:
  cmpl   $0x0,-0x10(%rbp)
  jns    L81
  mov    -0x8(%rbp),%rax
  mov    (%rax),%rax
  mov    (%rax),%eax
  leave
  ret
```

assistant: ```c
int calculateMinimumHP1(int **dungeon, int rSize, int cSize) {
  int **mins = (int **)malloc(sizeof(int *) * (rSize + 1));
  for (int i = 0; i <= rSize; i++)
    mins[i] = (int *)malloc(sizeof(int) * (cSize + 1));
  for (int i = 0; i <= rSize; i++)
    mins[i][cSize] = INT_MAX;
  for (int i = 0; i <= cSize; i++)
    mins[rSize][i] = INT_MAX;
  mins[rSize - 1][cSize] = 1;
  mins[rSize][cSize - 1] = 1;
  for (int i = rSize - 1; i >= 0; i--)
    for (int j = cSize - 1; j >= 0; j--)
      mins[i][j] = ((1) > (((mins[i + 1][j]) < (mins[i][j + 1]) ? (mins[i + 1][j]) : (mins[i][j + 1])) - dungeon[i][j]) ? (1) : (((mins[i + 1][j]) < (mins[i][j + 1]) ? (mins[i + 1][j]) : (mins[i][j + 1])) - dungeon[i][j]));
  return mins[0][0];
}
```