user: 请将以下的汇编代码转换成C语言代码:

```asm
<normals>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x58,%rsp
  mov    0x98(%rsp),%eax
  mov    %rsi,0x18(%rsp)
  mov    %rdx,0x20(%rsp)
  mov    0x90(%rsp),%r12
  sub    $0x1,%eax
  mov    %rcx,0x28(%rsp)
  mov    %r8,0x30(%rsp)
  mov    %eax,0x44(%rsp)
  cmp    $0x1,%eax
  jle    L58
  mov    %rdi,%r15
  mov    0xa0(%rsp),%edi
  movl   $0x1,0x3c(%rsp)
  movss  D17(%rip),%xmm5
  mov    %r15,%rbp
  mov    %r9,%r15
  lea    -0x3(%rdi),%edx
  lea    0x2(%rdx),%rax
  mov    %rax,0x48(%rsp)
  nopl   0x0(%rax)
L54:
  addl   $0x1,0x3c(%rsp)
  cmpl   $0x2,0xa0(%rsp)
  jle    L14
  mov    0x48(%rsp),%rax
  movslq %edi,%rsi
  mov    %r12,0x90(%rsp)
  lea    0x4(,%rsi,4),%r14
  lea    (%rax,%rsi,1),%r8
  neg    %rsi
  lea    0x0(,%r8,4),%rax
  lea    0x0(,%rsi,4),%r8
  mov    %rax,0x10(%rsp)
  mov    0xa0(%rsp),%eax
  add    %edi,%eax
  sub    0xa0(%rsp),%edi
  movslq %eax,%rsi
  movslq %edi,%rdi
  mov    %eax,0x40(%rsp)
  lea    (%r8,%rsi,4),%rsi
  lea    (%r8,%rdi,4),%rbx
  lea    0x0(%rbp,%rsi,1),%r13
  add    %rbp,%rbx
  mov    %r13,%r12
  mov    %rbp,%r13
  mov    %r14,%rbp
  mov    0x90(%rsp),%r14
  nopw   0x0(%rax,%rax,1)
L0:
  mov    0x18(%rsp),%rax
  movss  0x4(%r13,%rbp,1),%xmm1
  movss  (%r12,%rbp,1),%xmm0
  subss  -0x4(%r13,%rbp,1),%xmm1
  subss  (%rbx,%rbp,1),%xmm0
  mulss  D3(%rip),%xmm1
  mulss  D3(%rip),%xmm0
  movss  (%rax,%rbp,1),%xmm4
  mov    0x20(%rsp),%rax
  movss  (%r14),%xmm3
  movss  0x14(%r14),%xmm6
  movss  (%rax,%rbp,1),%xmm2
  xorps  %xmm5,%xmm1
  mulss  %xmm1,%xmm4
  xorps  %xmm5,%xmm0
  mulss  %xmm0,%xmm2
  mulss  %xmm1,%xmm3
  mulss  %xmm0,%xmm6
  addss  %xmm2,%xmm4
  movss  0x4(%r14),%xmm2
  addss  0x0(%r13,%rbp,1),%xmm4
  mulss  %xmm0,%xmm2
  mulss  0x24(%r14),%xmm0
  xorps  %xmm5,%xmm4
  addss  %xmm2,%xmm3
  movss  0xc(%r14),%xmm2
  addss  0x8(%r14),%xmm3
  mulss  %xmm4,%xmm2
  addss  %xmm2,%xmm3
  movss  0x10(%r14),%xmm2
  mulss  %xmm1,%xmm2
  mulss  0x20(%r14),%xmm1
  movss  %xmm3,0x38(%rsp)
  addss  %xmm6,%xmm2
  movss  0x1c(%r14),%xmm6
  addss  0x18(%r14),%xmm2
  addss  %xmm0,%xmm1
  addss  0x28(%r14),%xmm1
  movaps %xmm3,%xmm0
  mulss  %xmm4,%xmm6
  mulss  0x2c(%r14),%xmm4
  mulss  %xmm3,%xmm0
  addss  %xmm6,%xmm2
  addss  %xmm4,%xmm1
  movaps %xmm2,%xmm4
  movss  %xmm2,0xc(%rsp)
  mulss  %xmm2,%xmm4
  movss  %xmm1,0x8(%rsp)
  addss  %xmm4,%xmm0
  movaps %xmm1,%xmm4
  mulss  %xmm1,%xmm4
  addss  %xmm4,%xmm0
  call   <sqrt@plt>
  movss  0x8(%rsp),%xmm1
  pxor   %xmm7,%xmm7
  movss  0xc(%rsp),%xmm2
  movss  0x38(%rsp),%xmm3
  movss  D17(%rip),%xmm5
  comiss %xmm1,%xmm7
  jbe    L22
  xorps  %xmm5,%xmm0
L22:
  divss  %xmm0,%xmm3
  mov    0x28(%rsp),%rax
  divss  %xmm0,%xmm2
  movss  %xmm3,(%rax,%rbp,1)
  mov    0x30(%rsp),%rax
  divss  %xmm0,%xmm1
  movss  %xmm2,(%rax,%rbp,1)
  movss  %xmm1,(%r15,%rbp,1)
  add    $0x4,%rbp
  cmp    0x10(%rsp),%rbp
  jne    L0
  mov    %r13,%rbp
  mov    %r14,%r12
L40:
  mov    0x40(%rsp),%edi
  mov    0x3c(%rsp),%ecx
  cmp    %ecx,0x44(%rsp)
  jne    L54
L58:
  add    $0x58,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  cs nopw 0x0(%rax,%rax,1)
L14:
  mov    0xa0(%rsp),%eax
  add    %edi,%eax
  mov    %eax,0x40(%rsp)
  jmp    L40
```

tool_calls: name: read_data
arguments: label: D17
type_guessed: byte[4]
name: read_data
arguments: label: D3
type_guessed: byte[4]

tool: {"D17": [0x00,0x00,0x00,0x80]}

tool: {"D3": [0x00,0x00,0x00,0x3f]}

assistant: ```c
void normals(float *depth, float *u, float *v, float *nx, float *ny, float *nz, float mat[4][4], int h, int w) {
  int i, j;
  for (i = 1; i < h - 1; i++) {
    for (j = 1; j < w - 1; j++) {
      float dx = (depth[i * w + j + 1] - depth[i * w + j - 1]) / 2;
      float dy = (depth[(i + 1) * w + j] - depth[(i - 1) * w + j]) / 2;
      float X = -dx, Y = -dy, Z = 1, W = -(-dx * u[i * w + j] + -dy * v[i * w + j] + depth[i * w + j]);
      float x = X * mat[0][0] + Y * mat[0][1] + Z * mat[0][2] + W * mat[0][3];
      float y = X * mat[1][0] + Y * mat[1][1] + Z * mat[1][2] + W * mat[1][3];
      float z = X * mat[2][0] + Y * mat[2][1] + Z * mat[2][2] + W * mat[2][3];
      float w_ = sqrt(x * x + y * y + z * z);
      if (z < 0)
        w_ *= -1;
      nx[i * w + j] = x / w_;
      ny[i * w + j] = y / w_;
      nz[i * w + j] = z / w_;
    }
  }
}
```