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

```asm
<test_dist_z>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x40,%rsp
  mov    %rdi,-0x28(%rbp)
  mov    %esi,-0x2c(%rbp)
  mov    %edx,-0x30(%rbp)
  mov    %ecx,-0x34(%rbp)
  mov    %r8d,-0x38(%rbp)
  mov    %r9d,-0x3c(%rbp)
  movl   $0x0,-0x4(%rbp)
  movl   $0x0,-0x8(%rbp)
  jmp    L332
L190:
  movl   $0x0,-0xc(%rbp)
  jmp    L516
L417:
  movl   $0x0,-0x10(%rbp)
  jmp    L234
L30:
  movl   $0x0,-0x14(%rbp)
  jmp    L28
L331:
  mov    -0x8(%rbp),%eax
  movslq %eax,%rdx
  mov    %rdx,%rax
  shl    $0x4,%rax
  sub    %rdx,%rax
  shl    $0x9,%rax
  mov    %rax,%rdx
  mov    -0x28(%rbp),%rax
  lea    (%rdx,%rax,1),%rsi
  mov    -0x14(%rbp),%eax
  movslq %eax,%rdi
  mov    -0xc(%rbp),%eax
  cltq
  mov    -0x10(%rbp),%edx
  movslq %edx,%rcx
  mov    %rax,%rdx
  shl    $0x4,%rdx
  sub    %rax,%rdx
  lea    0x0(,%rdx,8),%rax
  mov    %rax,%rdx
  mov    %rcx,%rax
  add    %rax,%rax
  add    %rcx,%rax
  shl    $0x2,%rax
  add    %rdx,%rax
  add    %rdi,%rax
  movsd  D20(%rip),%xmm0
  movsd  %xmm0,(%rsi,%rax,8)
  addl   $0x1,-0x14(%rbp)
L28:
  cmpl   $0xb,-0x14(%rbp)
  jle    L331
  addl   $0x1,-0x10(%rbp)
L234:
  cmpl   $0x9,-0x10(%rbp)
  jle    L30
  addl   $0x1,-0xc(%rbp)
L516:
  cmpl   $0x7,-0xc(%rbp)
  jle    L417
  addl   $0x1,-0x8(%rbp)
L332:
  mov    0x30(%rbp),%eax
  add    $0x2,%eax
  cmp    %eax,-0x8(%rbp)
  jle    L190
  mov    $0x3,%eax
  sub    0x28(%rbp),%eax
  mov    %eax,-0x8(%rbp)
  jmp    L135
L447:
  movl   $0x0,-0xc(%rbp)
  jmp    L372
L129:
  movl   $0x0,-0x10(%rbp)
  jmp    L362
L356:
  movl   $0x0,-0x14(%rbp)
  jmp    L367
L154:
  mov    -0x8(%rbp),%eax
  movslq %eax,%rdx
  mov    %rdx,%rax
  shl    $0x4,%rax
  sub    %rdx,%rax
  shl    $0x9,%rax
  mov    %rax,%rdx
  mov    -0x28(%rbp),%rax
  lea    (%rdx,%rax,1),%rsi
  mov    -0x14(%rbp),%eax
  movslq %eax,%rdi
  mov    -0xc(%rbp),%eax
  cltq
  mov    -0x10(%rbp),%edx
  movslq %edx,%rcx
  mov    %rax,%rdx
  shl    $0x4,%rdx
  sub    %rax,%rdx
  lea    0x0(,%rdx,8),%rax
  mov    %rax,%rdx
  mov    %rcx,%rax
  add    %rax,%rax
  add    %rcx,%rax
  shl    $0x2,%rax
  add    %rdx,%rax
  add    %rdi,%rax
  movsd  D12(%rip),%xmm0
  movsd  %xmm0,(%rsi,%rax,8)
  addl   $0x1,-0x14(%rbp)
L367:
  cmpl   $0xb,-0x14(%rbp)
  jle    L154
  addl   $0x1,-0x10(%rbp)
L362:
  cmpl   $0x9,-0x10(%rbp)
  jle    L356
  addl   $0x1,-0xc(%rbp)
L372:
  cmpl   $0x7,-0xc(%rbp)
  jle    L129
  addl   $0x1,-0x8(%rbp)
L135:
  cmpl   $0x5,-0x8(%rbp)
  jle    L447
  movl   $0x0,-0x8(%rbp)
  jmp    L17
L85:
  movl   $0x0,-0xc(%rbp)
  jmp    L501
L203:
  movl   $0x0,-0x10(%rbp)
  jmp    L259
L5:
  movl   $0x0,-0x14(%rbp)
  jmp    L411
L169:
  cmpl   $0x0,-0x8(%rbp)
  js     L13
  cmpl   $0x2,-0x8(%rbp)
  jg     L13
  mov    -0x8(%rbp),%eax
  movslq %eax,%rdx
  mov    %rdx,%rax
  shl    $0x4,%rax
  sub    %rdx,%rax
  shl    $0x9,%rax
  mov    %rax,%rdx
  mov    -0x28(%rbp),%rax
  lea    (%rdx,%rax,1),%rsi
  mov    -0x14(%rbp),%eax
  movslq %eax,%rdi
  mov    -0xc(%rbp),%eax
  cltq
  mov    -0x10(%rbp),%edx
  movslq %edx,%rcx
  mov    %rax,%rdx
  shl    $0x4,%rdx
  sub    %rax,%rdx
  lea    0x0(,%rdx,8),%rax
  mov    %rax,%rdx
  mov    %rcx,%rax
  add    %rax,%rax
  add    %rcx,%rax
  shl    $0x2,%rax
  add    %rdx,%rax
  add    %rdi,%rax
  movsd  (%rsi,%rax,8),%xmm0
  movsd  D20(%rip),%xmm1
  ucomisd %xmm1,%xmm0
  jp     L37
  movsd  D20(%rip),%xmm1
  ucomisd %xmm1,%xmm0
  je     L244
L37:
  addl   $0x1,-0x4(%rbp)
  jmp    L244
L13:
  mov    -0x8(%rbp),%eax
  movslq %eax,%rdx
  mov    %rdx,%rax
  shl    $0x4,%rax
  sub    %rdx,%rax
  shl    $0x9,%rax
  mov    %rax,%rdx
  mov    -0x28(%rbp),%rax
  lea    (%rdx,%rax,1),%rsi
  mov    -0x14(%rbp),%eax
  movslq %eax,%rdi
  mov    -0xc(%rbp),%eax
  cltq
  mov    -0x10(%rbp),%edx
  movslq %edx,%rcx
  mov    %rax,%rdx
  shl    $0x4,%rdx
  sub    %rax,%rdx
  lea    0x0(,%rdx,8),%rax
  mov    %rax,%rdx
  mov    %rcx,%rax
  add    %rax,%rax
  add    %rcx,%rax
  shl    $0x2,%rax
  add    %rdx,%rax
  add    %rdi,%rax
  movsd  (%rsi,%rax,8),%xmm0
  ucomisd D12(%rip),%xmm0
  jp     L458
  ucomisd D12(%rip),%xmm0
  je     L244
L458:
  addl   $0x1,-0x4(%rbp)
L244:
  addl   $0x1,-0x14(%rbp)
L411:
  cmpl   $0xb,-0x14(%rbp)
  jle    L169
  addl   $0x1,-0x10(%rbp)
L259:
  cmpl   $0x9,-0x10(%rbp)
  jle    L5
  addl   $0x1,-0xc(%rbp)
L501:
  cmpl   $0x7,-0xc(%rbp)
  jle    L203
  addl   $0x1,-0x8(%rbp)
L17:
  mov    0x30(%rbp),%eax
  add    $0x2,%eax
  cmp    %eax,-0x8(%rbp)
  jle    L85
  mov    $0x3,%eax
  sub    0x28(%rbp),%eax
  mov    %eax,-0x8(%rbp)
  jmp    L130
L520:
  movl   $0x0,-0xc(%rbp)
  jmp    L533
L155:
  movl   $0x0,-0x10(%rbp)
  jmp    L478
L488:
  movl   $0x0,-0x14(%rbp)
  jmp    L567
L301:
  cmpl   $0x2,-0x8(%rbp)
  jle    L34
  cmpl   $0x5,-0x8(%rbp)
  jg     L34
  mov    -0x8(%rbp),%eax
  movslq %eax,%rdx
  mov    %rdx,%rax
  shl    $0x4,%rax
  sub    %rdx,%rax
  shl    $0x9,%rax
  mov    %rax,%rdx
  mov    -0x28(%rbp),%rax
  lea    (%rdx,%rax,1),%rsi
  mov    -0x14(%rbp),%eax
  movslq %eax,%rdi
  mov    -0xc(%rbp),%eax
  cltq
  mov    -0x10(%rbp),%edx
  movslq %edx,%rcx
  mov    %rax,%rdx
  shl    $0x4,%rdx
  sub    %rax,%rdx
  lea    0x0(,%rdx,8),%rax
  mov    %rax,%rdx
  mov    %rcx,%rax
  add    %rax,%rax
  add    %rcx,%rax
  shl    $0x2,%rax
  add    %rdx,%rax
  add    %rdi,%rax
  movsd  (%rsi,%rax,8),%xmm0
  ucomisd D12(%rip),%xmm0
  jp     L202
  ucomisd D12(%rip),%xmm0
  je     L103
L202:
  addl   $0x1,-0x4(%rbp)
  jmp    L103
L34:
  mov    -0x8(%rbp),%eax
  movslq %eax,%rdx
  mov    %rdx,%rax
  shl    $0x4,%rax
  sub    %rdx,%rax
  shl    $0x9,%rax
  mov    %rax,%rdx
  mov    -0x28(%rbp),%rax
  lea    (%rdx,%rax,1),%rsi
  mov    -0x14(%rbp),%eax
  movslq %eax,%rdi
  mov    -0xc(%rbp),%eax
  cltq
  mov    -0x10(%rbp),%edx
  movslq %edx,%rcx
  mov    %rax,%rdx
  shl    $0x4,%rdx
  sub    %rax,%rdx
  lea    0x0(,%rdx,8),%rax
  mov    %rax,%rdx
  mov    %rcx,%rax
  add    %rax,%rax
  add    %rcx,%rax
  shl    $0x2,%rax
  add    %rdx,%rax
  add    %rdi,%rax
  movsd  (%rsi,%rax,8),%xmm0
  movsd  D20(%rip),%xmm1
  ucomisd %xmm1,%xmm0
  jp     L565
  movsd  D20(%rip),%xmm1
  ucomisd %xmm1,%xmm0
  je     L103
L565:
  addl   $0x1,-0x4(%rbp)
L103:
  addl   $0x1,-0x14(%rbp)
L567:
  cmpl   $0xb,-0x14(%rbp)
  jle    L301
  addl   $0x1,-0x10(%rbp)
L478:
  cmpl   $0x9,-0x10(%rbp)
  jle    L488
  addl   $0x1,-0xc(%rbp)
L533:
  cmpl   $0x7,-0xc(%rbp)
  jle    L155
  addl   $0x1,-0x8(%rbp)
L130:
  cmpl   $0x5,-0x8(%rbp)
  jle    L520
  cmpl   $0x0,-0x4(%rbp)
  jne    L428
  mov    $0x0,%eax
  jmp    L336
L428:
  movl   $0x0,-0x8(%rbp)
  jmp    L394
L76:
  movl   $0x0,-0xc(%rbp)
  jmp    L523
L219:
  movl   $0x0,-0x10(%rbp)
  jmp    L638
L321:
  movl   $0x0,-0x14(%rbp)
  jmp    L77
L293:
  mov    -0x8(%rbp),%eax
  movslq %eax,%rdx
  mov    %rdx,%rax
  shl    $0x4,%rax
  sub    %rdx,%rax
  shl    $0x9,%rax
  mov    %rax,%rdx
  mov    -0x28(%rbp),%rax
  lea    (%rdx,%rax,1),%rsi
  mov    -0x14(%rbp),%eax
  movslq %eax,%rdi
  mov    -0xc(%rbp),%eax
  cltq
  mov    -0x10(%rbp),%edx
  movslq %edx,%rcx
  mov    %rax,%rdx
  shl    $0x4,%rdx
  sub    %rax,%rdx
  lea    0x0(,%rdx,8),%rax
  mov    %rax,%rdx
  mov    %rcx,%rax
  add    %rax,%rax
  add    %rcx,%rax
  shl    $0x2,%rax
  add    %rdx,%rax
  add    %rdi,%rax
  mov    (%rsi,%rax,8),%rcx
  mov    -0x14(%rbp),%edi
  mov    -0x10(%rbp),%esi
  mov    -0xc(%rbp),%edx
  mov    -0x8(%rbp),%eax
  movq   %rcx,%xmm0
  mov    %edi,%r9d
  mov    %esi,%r8d
  mov    %edx,%ecx
  mov    %eax,%edx
  mov    $0x1,%esi
  lea    D3(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
  addl   $0x1,-0x14(%rbp)
L77:
  cmpl   $0xb,-0x14(%rbp)
  jle    L293
  addl   $0x1,-0x10(%rbp)
L638:
  cmpl   $0x9,-0x10(%rbp)
  jle    L321
  addl   $0x1,-0xc(%rbp)
L523:
  cmpl   $0x7,-0xc(%rbp)
  jle    L219
  addl   $0x1,-0x8(%rbp)
L394:
  mov    0x30(%rbp),%eax
  add    $0x2,%eax
  cmp    %eax,-0x8(%rbp)
  jle    L76
  mov    $0x3,%eax
  sub    0x28(%rbp),%eax
  mov    %eax,-0x8(%rbp)
  jmp    L263
L634:
  movl   $0x0,-0xc(%rbp)
  jmp    L403
L305:
  movl   $0x0,-0x10(%rbp)
  jmp    L405
L55:
  movl   $0x0,-0x14(%rbp)
  jmp    L472
L604:
  mov    -0x8(%rbp),%eax
  movslq %eax,%rdx
  mov    %rdx,%rax
  shl    $0x4,%rax
  sub    %rdx,%rax
  shl    $0x9,%rax
  mov    %rax,%rdx
  mov    -0x28(%rbp),%rax
  lea    (%rdx,%rax,1),%rsi
  mov    -0x14(%rbp),%eax
  movslq %eax,%rdi
  mov    -0xc(%rbp),%eax
  cltq
  mov    -0x10(%rbp),%edx
  movslq %edx,%rcx
  mov    %rax,%rdx
  shl    $0x4,%rdx
  sub    %rax,%rdx
  lea    0x0(,%rdx,8),%rax
  mov    %rax,%rdx
  mov    %rcx,%rax
  add    %rax,%rax
  add    %rcx,%rax
  shl    $0x2,%rax
  add    %rdx,%rax
  add    %rdi,%rax
  mov    (%rsi,%rax,8),%rcx
  mov    -0x14(%rbp),%edi
  mov    -0x10(%rbp),%esi
  mov    -0xc(%rbp),%edx
  mov    -0x8(%rbp),%eax
  movq   %rcx,%xmm0
  mov    %edi,%r9d
  mov    %esi,%r8d
  mov    %edx,%ecx
  mov    %eax,%edx
  mov    $0x2,%esi
  lea    D3(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
  addl   $0x1,-0x14(%rbp)
L472:
  cmpl   $0xb,-0x14(%rbp)
  jle    L604
  addl   $0x1,-0x10(%rbp)
L405:
  cmpl   $0x9,-0x10(%rbp)
  jle    L55
  addl   $0x1,-0xc(%rbp)
L403:
  cmpl   $0x7,-0xc(%rbp)
  jle    L305
  addl   $0x1,-0x8(%rbp)
L263:
  cmpl   $0x5,-0x8(%rbp)
  jle    L634
  mov    $0x1,%eax
L336:
  leave
  ret
```

tool_calls: name: read_data
arguments: label: D20
type: f64
name: read_data
arguments: label: D12
type: f64
name: read_data
arguments: label: D3
type: string

tool: D20: 1

tool: D12: 2

tool: D3: node(%d) array[%2d][%2d][%2d][%2d] = %f


assistant: ```c
int test_dist_z(double array_z[6][8][10][12], int lst, int ust, int lsx, int usx, int lsy, int usy, int lsz, int usz, int lwz, int uwz) {
  int it, ix, iy, iz;
  int err = 0;
#pragma xmp align array_z[iz][iy][ix][it] with tz(it, ix, iy, iz)
#pragma xmp shadow array_z[lsz : usz][lsy : usy][lsx : usx][lst : ust]
#pragma xmp task on pz(1, 1, 1, 1)
  for (iz = 0; iz < 6 / 2 + uwz; iz++) {
    for (iy = 0; iy < 8; iy++) {
      for (ix = 0; ix < 10; ix++) {
        for (it = 0; it < 12; it++) {
          array_z[iz][iy][ix][it] = 1.0;
        }
      }
    }
  }
#pragma xmp task on pz(1, 1, 1, 2)
  for (iz = 6 / 2 - lwz; iz < 6; iz++) {
    for (iy = 0; iy < 8; iy++) {
      for (ix = 0; ix < 10; ix++) {
        for (it = 0; it < 12; it++) {
          array_z[iz][iy][ix][it] = 2.0;
        }
      }
    }
  }
#pragma acc data copy(array_z)
  {
#pragma xmp reflect(array_z) width(lwz : uwz, 0, 0, 0) acc
  }
#pragma xmp task on pz(1, 1, 1, 1)
  for (iz = 0; iz < 6 / 2 + uwz; iz++) {
    for (iy = 0; iy < 8; iy++) {
      for (ix = 0; ix < 10; ix++) {
        for (it = 0; it < 12; it++) {
          if (0 <= iz && iz < 6 / 2) {
            if (array_z[iz][iy][ix][it] != 1.0)
              err++;
          } else {
            if (array_z[iz][iy][ix][it] != 2.0)
              err++;
          }
        }
      }
    }
  }
#pragma xmp task on pz(1, 1, 1, 2)
  for (iz = 6 / 2 - lwz; iz < 6; iz++) {
    for (iy = 0; iy < 8; iy++) {
      for (ix = 0; ix < 10; ix++) {
        for (it = 0; it < 12; it++) {
          if (6 / 2 <= iz && iz < 6) {
            if (array_z[iz][iy][ix][it] != 2.0)
              err++;
          } else {
            if (array_z[iz][iy][ix][it] != 1.0)
              err++;
          }
        }
      }
    }
  }
#pragma xmp reduction(+ : err)
  if (err == 0)
    return 0;
#pragma xmp task on pz(1, 1, 1, 1)
  for (iz = 0; iz < 6 / 2 + uwz; iz++) {
    for (iy = 0; iy < 8; iy++) {
      for (ix = 0; ix < 10; ix++) {
        for (it = 0; it < 12; it++) {
          printf("node(%d) array[%2d][%2d][%2d][%2d] = %f\n", 1, iz, iy, ix, it, array_z[iz][iy][ix][it]);
        }
      }
    }
  }
#pragma xmp barrier
#pragma xmp task on pz(1, 1, 1, 2)
  for (iz = 6 / 2 - lwz; iz < 6; iz++) {
    for (iy = 0; iy < 8; iy++) {
      for (ix = 0; ix < 10; ix++) {
        for (it = 0; it < 12; it++) {
          printf("node(%d) array[%2d][%2d][%2d][%2d] = %f\n", 2, iz, iy, ix, it, array_z[iz][iy][ix][it]);
        }
      }
    }
  }
  return 1;
}
```