user: What would the C source look like for the assembly code provided here:

```asm
<unbalance>:
  endbr64
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  mov    %rdx,%r10
  mov    %ecx,%r11d
  cmp    %r8d,%ecx
  jg     L90
  mov    %edi,%ebx
  imul   %ecx,%ebx
  movslq %ecx,%rcx
  lea    (%r9,%rcx,8),%rdx
  mov    %r8d,%eax
  sub    %r11d,%eax
  add    %rcx,%rax
  lea    0x8(%r9,%rax,8),%rbp
  mov    %edi,%r12d
  jmp    L176
L36:
  movslq %ebx,%rcx
  lea    0x0(,%rcx,8),%rax
  add    %r12,%rcx
  shl    $0x3,%rcx
L57:
  movsd  (%rsi,%rax,1),%xmm0
  mulsd  (%rdx),%xmm0
  movsd  %xmm0,(%rsi,%rax,1)
  movsd  (%r10,%rax,1),%xmm0
  mulsd  (%rdx),%xmm0
  movsd  %xmm0,(%r10,%rax,1)
  add    $0x8,%rax
  cmp    %rcx,%rax
  jne    L57
L81:
  add    %edi,%ebx
  add    $0x8,%rdx
  cmp    %rbp,%rdx
  je     L90
L176:
  test   %edi,%edi
  jg     L36
  jmp    L81
L90:
  sub    $0x1,%r11d
  js     L16
  movslq %r11d,%rbx
  imul   %edi,%r11d
  lea    -0x1(%rdi),%r12d
  lea    0x8(%rsi),%rbp
  jmp    L193
L152:
  sub    $0x1,%rbx
  sub    %edi,%r11d
  test   %ebx,%ebx
  js     L16
L193:
  cvttsd2si (%r9,%rbx,8),%ecx
  cmp    %ebx,%ecx
  je     L152
  test   %edi,%edi
  jle    L152
  imul   %edi,%ecx
  movslq %r11d,%r14
  lea    0x0(,%r14,8),%rdx
  lea    (%rsi,%rdx,1),%rax
  add    %r10,%rdx
  lea    (%r12,%r14,1),%r13
  lea    0x0(%rbp,%r13,8),%r13
  movslq %ecx,%rcx
  sub    %r14,%rcx
L11:
  movsd  (%rax),%xmm0
  movsd  (%rax,%rcx,8),%xmm1
  movsd  %xmm1,(%rax)
  movsd  %xmm0,(%rax,%rcx,8)
  movsd  (%rdx),%xmm0
  movsd  (%rdx,%rcx,8),%xmm1
  movsd  %xmm1,(%rdx)
  movsd  %xmm0,(%rdx,%rcx,8)
  add    $0x8,%rax
  add    $0x8,%rdx
  cmp    %r13,%rax
  jne    L11
  jmp    L152
L16:
  add    $0x1,%r8d
  cmp    %edi,%r8d
  jge    L141
  movslq %r8d,%r11
  imul   %edi,%r8d
  lea    -0x1(%rdi),%ebp
  lea    0x8(%rsi),%rbx
  jmp    L4
L21:
  add    $0x1,%r11
  add    %edi,%r8d
  cmp    %r11d,%edi
  jle    L141
L4:
  cvttsd2si (%r9,%r11,8),%ecx
  cmp    %r11d,%ecx
  je     L21
  test   %edi,%edi
  jle    L21
  imul   %edi,%ecx
  movslq %r8d,%r13
  lea    0x0(,%r13,8),%rdx
  lea    (%rsi,%rdx,1),%rax
  add    %r10,%rdx
  lea    0x0(%rbp,%r13,1),%r12
  lea    (%rbx,%r12,8),%r12
  movslq %ecx,%rcx
  sub    %r13,%rcx
L73:
  movsd  (%rax),%xmm0
  movsd  (%rax,%rcx,8),%xmm1
  movsd  %xmm1,(%rax)
  movsd  %xmm0,(%rax,%rcx,8)
  movsd  (%rdx),%xmm0
  movsd  (%rdx,%rcx,8),%xmm1
  movsd  %xmm1,(%rdx)
  movsd  %xmm0,(%rdx,%rcx,8)
  add    $0x8,%rax
  add    $0x8,%rdx
  cmp    %r12,%rax
  jne    L73
  jmp    L21
L141:
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  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) * (n) + (j))] *= scale[i];
      vi[((i) * (n) + (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) * (n) + (j))];
        vr[((i) * (n) + (j))] = vr[((k) * (n) + (j))];
        vr[((k) * (n) + (j))] = tmp;
        tmp = vi[((i) * (n) + (j))];
        vi[((i) * (n) + (j))] = vi[((k) * (n) + (j))];
        vi[((k) * (n) + (j))] = tmp;
      }
    }
  }
  for (i = hi + 1; i < n; i++) {
    if ((k = (int)scale[i]) != i) {
      for (j = 0; j < n; j++) {
        tmp = vr[((i) * (n) + (j))];
        vr[((i) * (n) + (j))] = vr[((k) * (n) + (j))];
        vr[((k) * (n) + (j))] = tmp;
        tmp = vi[((i) * (n) + (j))];
        vi[((i) * (n) + (j))] = vi[((k) * (n) + (j))];
        vi[((k) * (n) + (j))] = tmp;
      }
    }
  }
}
```