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

```asm
<coolHeatMapAt>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  mov    %rdi,-0x18(%rbp)
  mov    %edx,%eax
  mov    %rcx,-0x28(%rbp)
  mov    %esi,%edx
  mov    %dx,-0x1c(%rbp)
  mov    %ax,-0x20(%rbp)
  movswq -0x1c(%rbp),%rax
  imul   $0x3a,%rax,%rdx
  mov    -0x18(%rbp),%rax
  add    %rax,%rdx
  movswl -0x20(%rbp),%eax
  cltq
  movzwl (%rdx,%rax,2),%eax
  mov    %ax,-0x2(%rbp)
  mov    -0x28(%rbp),%rax
  mov    (%rax),%rdx
  movswq -0x1c(%rbp),%rax
  imul   $0x3a,%rax,%rcx
  mov    -0x18(%rbp),%rax
  add    %rax,%rcx
  movswl -0x20(%rbp),%eax
  cltq
  movzwl (%rcx,%rax,2),%eax
  movzwl %ax,%eax
  sub    %rax,%rdx
  mov    -0x28(%rbp),%rax
  mov    %rdx,(%rax)
  movswq -0x1c(%rbp),%rax
  imul   $0x3a,%rax,%rdx
  mov    -0x18(%rbp),%rax
  add    %rax,%rdx
  movswl -0x20(%rbp),%eax
  cltq
  movw   $0x0,(%rdx,%rax,2)
  movw   $0xfffb,-0x6(%rbp)
  jmp    L81
L72:
  movw   $0xfffb,-0x4(%rbp)
  jmp    L67
L22:
  movswl -0x1c(%rbp),%edx
  movswl -0x6(%rbp),%eax
  add    %edx,%eax
  test   %eax,%eax
  js     L15
  movswl -0x1c(%rbp),%edx
  movswl -0x6(%rbp),%eax
  add    %edx,%eax
  cmp    $0x4e,%eax
  jg     L15
  movswl -0x20(%rbp),%edx
  movswl -0x4(%rbp),%eax
  add    %edx,%eax
  test   %eax,%eax
  js     L15
  movswl -0x20(%rbp),%edx
  movswl -0x4(%rbp),%eax
  add    %edx,%eax
  cmp    $0x1c,%eax
  jg     L15
  movswl -0x1c(%rbp),%edx
  movswl -0x6(%rbp),%eax
  add    %edx,%eax
  cltq
  imul   $0x3a,%rax,%rdx
  mov    -0x18(%rbp),%rax
  add    %rax,%rdx
  movswl -0x20(%rbp),%ecx
  movswl -0x4(%rbp),%eax
  add    %ecx,%eax
  cltq
  movzwl (%rdx,%rax,2),%eax
  cmp    %ax,-0x2(%rbp)
  jne    L15
  movswl -0x1c(%rbp),%edx
  movswl -0x6(%rbp),%eax
  add    %edx,%eax
  cltq
  imul   $0x3a,%rax,%rdx
  mov    -0x18(%rbp),%rax
  add    %rax,%rdx
  movswl -0x20(%rbp),%ecx
  movswl -0x4(%rbp),%eax
  add    %ecx,%eax
  cltq
  movzwl (%rdx,%rax,2),%eax
  cmp    $0x9,%ax
  jbe    L83
  movswl -0x1c(%rbp),%edx
  movswl -0x6(%rbp),%eax
  add    %edx,%eax
  cltq
  imul   $0x3a,%rax,%rdx
  mov    -0x18(%rbp),%rax
  add    %rax,%rdx
  movswl -0x20(%rbp),%ecx
  movswl -0x4(%rbp),%eax
  add    %ecx,%eax
  cltq
  movzwl (%rdx,%rax,2),%eax
  movzwl %ax,%eax
  imul   $0xcccd,%eax,%eax
  shr    $0x10,%eax
  mov    %eax,%edx
  shr    $0x3,%dx
  jmp    L53
L83:
  mov    $0x1,%edx
L53:
  movswl -0x1c(%rbp),%ecx
  movswl -0x6(%rbp),%eax
  add    %ecx,%eax
  cltq
  imul   $0x3a,%rax,%rcx
  mov    -0x18(%rbp),%rax
  add    %rax,%rcx
  movswl -0x20(%rbp),%esi
  movswl -0x4(%rbp),%eax
  add    %esi,%eax
  cltq
  mov    %dx,(%rcx,%rax,2)
  mov    -0x28(%rbp),%rax
  mov    (%rax),%rdx
  movzwl -0x2(%rbp),%ecx
  movswl -0x1c(%rbp),%esi
  movswl -0x6(%rbp),%eax
  add    %esi,%eax
  cltq
  imul   $0x3a,%rax,%rsi
  mov    -0x18(%rbp),%rax
  add    %rax,%rsi
  movswl -0x20(%rbp),%edi
  movswl -0x4(%rbp),%eax
  add    %edi,%eax
  cltq
  movzwl (%rsi,%rax,2),%eax
  movzwl %ax,%esi
  mov    %ecx,%eax
  sub    %esi,%eax
  cltq
  sub    %rax,%rdx
  mov    -0x28(%rbp),%rax
  mov    %rdx,(%rax)
L15:
  movzwl -0x4(%rbp),%eax
  add    $0x1,%eax
  mov    %ax,-0x4(%rbp)
L67:
  cmpw   $0x5,-0x4(%rbp)
  jle    L22
  movzwl -0x6(%rbp),%eax
  add    $0x1,%eax
  mov    %ax,-0x6(%rbp)
L81:
  cmpw   $0x5,-0x6(%rbp)
  jle    L72
  nop
  nop
  pop    %rbp
  ret
```

assistant: ```c
void coolHeatMapAt(unsigned short heatMap[(100 - 20 - 1)][((31 + 3) - 3 - 2)], short x, short y, unsigned long *totalHeat) {
  short k, l;
  unsigned short currentHeat;
  currentHeat = heatMap[x][y];
  *totalHeat -= heatMap[x][y];
  heatMap[x][y] = 0;
  for (k = -5; k <= 5; k++) {
    for (l = -5; l <= 5; l++) {
      if (((x + k) >= 0 && (x + k) < (100 - 20 - 1) && (y + l) >= 0 && (y + l) < ((31 + 3) - 3 - 2)) && heatMap[x + k][y + l] == currentHeat) {
        heatMap[x + k][y + l] = (((1) > (heatMap[x + k][y + l] / 10)) ? (1) : (heatMap[x + k][y + l] / 10));
        *totalHeat -= (currentHeat - heatMap[x + k][y + l]);
      }
    }
  }
}
```