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

```asm
<BalBak>:
  endbr64
  test   %r8d,%r8d
  je     L96
  push   %r15
  mov    %edx,%r10d
  mov    %rcx,%r11
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  cmp    %esi,%edx
  je     L187
  jl     L187
  test   %r8d,%r8d
  jle    L187
  mov    %r8d,%eax
  mov    %r8d,%ecx
  movslq %esi,%rdx
  shr    %eax
  and    $0xfffffffe,%ecx
  lea    -0x1(%rax),%ebx
  add    $0x1,%rbx
  shl    $0x4,%rbx
  nopl   (%rax)
L65:
  movsd  (%r11,%rdx,8),%xmm1
  mov    (%r9,%rdx,8),%rbp
  cmp    $0x1,%r8d
  je     L173
  movapd %xmm1,%xmm2
  mov    %rbp,%rax
  lea    (%rbx,%rbp,1),%r12
  unpcklpd %xmm2,%xmm2
  nopl   0x0(%rax,%rax,1)
L142:
  movupd (%rax),%xmm0
  add    $0x10,%rax
  mulpd  %xmm2,%xmm0
  movups %xmm0,-0x10(%rax)
  cmp    %r12,%rax
  jne    L142
  movslq %ecx,%rax
  cmp    %ecx,%r8d
  je     L240
L89:
  lea    0x0(%rbp,%rax,8),%rax
  mulsd  (%rax),%xmm1
  movsd  %xmm1,(%rax)
L240:
  add    $0x1,%rdx
  cmp    %edx,%r10d
  jge    L65
L187:
  test   %edi,%edi
  jle    L137
  mov    %r8d,%eax
  mov    %r8d,%r14d
  lea    -0x1(%r8),%r15d
  mov    %r8d,%r13d
  shr    %eax
  and    $0xfffffffe,%r14d
  lea    -0x1(%rax),%r12d
  movslq %r14d,%rbp
  xor    %eax,%eax
  add    $0x1,%r12
  shl    $0x3,%rbp
  shl    $0x4,%r12
  jmp    L195
  nopl   (%rax)
L239:
  add    $0x1,%eax
  cmp    %eax,%edi
  je     L137
  nopl   0x0(%rax,%rax,1)
L195:
  cmp    %eax,%esi
  jg     L43
  cmp    %eax,%r10d
  jge    L239
L43:
  mov    %esi,%edx
  sub    %eax,%edx
  cmp    %eax,%esi
  cmovle %eax,%edx
  movslq %edx,%rbx
  cvttsd2si (%r11,%rbx,8),%ecx
  test   %ecx,%ecx
  js     L137
  cmp    %ecx,%edi
  jle    L137
  cmp    %ecx,%edx
  je     L239
  test   %r8d,%r8d
  jle    L239
  mov    (%r9,%rbx,8),%rdx
  movslq %ecx,%rcx
  mov    (%r9,%rcx,8),%rcx
  lea    0xf(%rdx),%rbx
  sub    %rcx,%rbx
  cmp    $0x1e,%rbx
  mov    $0x0,%ebx
  jbe    L226
  cmp    $0x1,%r15d
  jbe    L226
  nopw   0x0(%rax,%rax,1)
L127:
  movupd (%rdx,%rbx,1),%xmm0
  movupd (%rcx,%rbx,1),%xmm3
  movups %xmm3,(%rdx,%rbx,1)
  movups %xmm0,(%rcx,%rbx,1)
  add    $0x10,%rbx
  cmp    %r12,%rbx
  jne    L127
  cmp    %r14d,%r8d
  je     L239
  add    %rbp,%rdx
  add    %rbp,%rcx
  add    $0x1,%eax
  movsd  (%rdx),%xmm0
  movsd  (%rcx),%xmm1
  movsd  %xmm1,(%rdx)
  movsd  %xmm0,(%rcx)
  cmp    %eax,%edi
  jne    L195
L137:
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L96:
  ret
  nopl   0x0(%rax)
L226:
  movsd  (%rdx,%rbx,8),%xmm0
  movsd  (%rcx,%rbx,8),%xmm1
  movsd  %xmm1,(%rdx,%rbx,8)
  movsd  %xmm0,(%rcx,%rbx,8)
  add    $0x1,%rbx
  cmp    %rbx,%r13
  jne    L226
  jmp    L239
L173:
  xor    %eax,%eax
  jmp    L89
```

assistant: ```c
void BalBak(n, low, high, scale, m, z) int n, low, high;
double *scale;
int m;
double **z;
{
  int i, j, k, ii;
  double s;
  if (m != 0) {
    if (high != low) {
      for (i = low; i <= high; i++) {
        s = scale[i];
        for (j = 0; j < m; j++)
          z[i][j] *= s;
      }
    }
    for (ii = 0; ii < n; ii++) {
      i = ii;
      if ((i < low) || (i > high)) {
        if (i < low)
          i = low - ii;
        k = (int)scale[i];
        if (k < 0 || k >= n) {
          return;
        }
        if (k != i) {
          for (j = 0; j < m; j++) {
            s = z[i][j];
            z[i][j] = z[k][j];
            z[k][j] = s;
          }
        }
      }
    }
  }
}
```