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

```asm
<unbalance>:
  endbr64
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  mov    %rsi,%r10
  mov    %rdx,%r11
  mov    %ecx,%esi
  mov    %r9,%rbp
  cmp    %r8d,%ecx
  jg     L55
  movslq %ecx,%rdx
  lea    0x0(,%rdx,8),%rbx
  lea    (%r10,%rbx,1),%r9
  lea    0x0(%rbp,%rbx,1),%rcx
  add    %r11,%rbx
  mov    %r8d,%eax
  sub    %esi,%eax
  add    %rdx,%rax
  lea    0x8(%r10,%rax,8),%r13
  lea    -0x1(%rdi),%eax
  lea    0x8(,%rax,8),%r12
  jmp    L102
L181:
  mov    %rax,%rdx
  add    (%r9),%rdx
  movsd  (%rdx),%xmm0
  mulsd  (%rcx),%xmm0
  movsd  %xmm0,(%rdx)
  mov    %rax,%rdx
  add    (%rbx),%rdx
  movsd  (%rdx),%xmm0
  mulsd  (%rcx),%xmm0
  movsd  %xmm0,(%rdx)
  add    $0x8,%rax
  cmp    %r12,%rax
  jne    L181
L153:
  add    $0x8,%r9
  add    $0x8,%rcx
  add    $0x8,%rbx
  cmp    %r13,%r9
  je     L55
L102:
  mov    $0x0,%eax
  test   %edi,%edi
  jg     L181
  jmp    L153
L55:
  sub    $0x1,%esi
  js     L140
  movslq %esi,%rdx
  lea    -0x1(%rdi),%eax
  lea    0x8(,%rax,8),%r12
  jmp    L87
L185:
  sub    $0x1,%rdx
  test   %edx,%edx
  js     L140
L87:
  cvttsd2si 0x0(%rbp,%rdx,8),%eax
  cmp    %edx,%eax
  je     L185
  test   %edi,%edi
  jle    L185
  movslq %eax,%rcx
  shl    $0x3,%rcx
  lea    (%r10,%rcx,1),%r9
  add    %r11,%rcx
  mov    $0x0,%eax
L43:
  mov    %rax,%rsi
  add    (%r10,%rdx,8),%rsi
  movsd  (%rsi),%xmm0
  mov    (%r9),%rbx
  movsd  (%rbx,%rax,1),%xmm1
  movsd  %xmm1,(%rsi)
  mov    (%r9),%rsi
  movsd  %xmm0,(%rsi,%rax,1)
  mov    %rax,%rsi
  add    (%r11,%rdx,8),%rsi
  movsd  (%rsi),%xmm0
  mov    (%rcx),%rbx
  movsd  (%rbx,%rax,1),%xmm1
  movsd  %xmm1,(%rsi)
  mov    (%rcx),%rsi
  movsd  %xmm0,(%rsi,%rax,1)
  add    $0x8,%rax
  cmp    %r12,%rax
  jne    L43
  jmp    L185
L140:
  lea    0x1(%r8),%edx
  cmp    %edi,%edx
  jge    L152
  movslq %edx,%rdx
  lea    -0x1(%rdi),%eax
  lea    0x8(,%rax,8),%rbx
  jmp    L58
L122:
  add    $0x1,%rdx
  cmp    %edx,%edi
  jle    L152
L58:
  cvttsd2si 0x0(%rbp,%rdx,8),%eax
  cmp    %edx,%eax
  je     L122
  test   %edi,%edi
  jle    L122
  movslq %eax,%rcx
  shl    $0x3,%rcx
  lea    (%r10,%rcx,1),%r8
  add    %r11,%rcx
  mov    $0x0,%eax
L52:
  mov    %rax,%rsi
  add    (%r10,%rdx,8),%rsi
  movsd  (%rsi),%xmm0
  mov    (%r8),%r9
  movsd  (%r9,%rax,1),%xmm1
  movsd  %xmm1,(%rsi)
  mov    (%r8),%rsi
  movsd  %xmm0,(%rsi,%rax,1)
  mov    %rax,%rsi
  add    (%r11,%rdx,8),%rsi
  movsd  (%rsi),%xmm0
  mov    (%rcx),%r9
  movsd  (%r9,%rax,1),%xmm1
  movsd  %xmm1,(%rsi)
  mov    (%rcx),%rsi
  movsd  %xmm0,(%rsi,%rax,1)
  add    $0x8,%rax
  cmp    %rax,%rbx
  jne    L52
  jmp    L122
L152:
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  ret
```

assistant: ```c
void unbalance(int n, double **vr, double **vi, int low, int hi, double *scale) {
  int i, j, k;
  double tmp;
  for (i = low; i <= hi; i++) {
    for (j = 0; j < n; j++) {
      vr[i][j] *= scale[i];
      vi[i][j] *= scale[i];
    }
  }
  for (i = low - 1; i >= 0; i--) {
    if ((k = (int)scale[i]) != i) {
      for (j = 0; j < n; j++) {
        tmp = vr[i][j];
        vr[i][j] = vr[k][j];
        vr[k][j] = tmp;
        tmp = vi[i][j];
        vi[i][j] = vi[k][j];
        vi[k][j] = tmp;
      }
    }
  }
  for (i = hi + 1; i < n; i++) {
    if ((k = (int)scale[i]) != i) {
      for (j = 0; j < n; j++) {
        tmp = vr[i][j];
        vr[i][j] = vr[k][j];
        vr[k][j] = tmp;
        tmp = vi[i][j];
        vi[i][j] = vi[k][j];
        vi[k][j] = tmp;
      }
    }
  }
}
```