user: What is the c source code of the assembly code below:

```asm
<balance>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x70,%rsp
  mov    %rdi,-0x48(%rbp)
  mov    %esi,-0x4c(%rbp)
  mov    %rdx,-0x58(%rbp)
  mov    %rcx,-0x60(%rbp)
  mov    %r8,-0x68(%rbp)
  mov    -0x4c(%rbp),%eax
  sub    $0x1,%eax
  mov    %eax,-0x34(%rbp)
  jmp    L375
L254:
  mov    -0x34(%rbp),%eax
  mov    %eax,-0x38(%rbp)
  jmp    L309
L249:
  movl   $0x0,-0x3c(%rbp)
  jmp    L470
L510:
  mov    -0x3c(%rbp),%eax
  cmp    -0x38(%rbp),%eax
  je     L383
  mov    -0x38(%rbp),%eax
  imul   -0x4c(%rbp),%eax
  mov    %eax,%edx
  mov    -0x3c(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x48(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rax
  movq   %rax,%xmm0
  call   <fabs@plt>
  test   %rax,%rax
  jne    L180
L383:
  addl   $0x1,-0x3c(%rbp)
L470:
  mov    -0x3c(%rbp),%eax
  cmp    -0x34(%rbp),%eax
  jle    L510
  jmp    L12
L180:
  nop
L12:
  mov    -0x3c(%rbp),%eax
  cmp    -0x34(%rbp),%eax
  jle    L17
  mov    -0x34(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x68(%rbp),%rax
  add    %rdx,%rax
  pxor   %xmm0,%xmm0
  cvtsi2sdl -0x38(%rbp),%xmm0
  movsd  %xmm0,(%rax)
  mov    -0x38(%rbp),%eax
  cmp    -0x34(%rbp),%eax
  je     L323
  movl   $0x0,-0x3c(%rbp)
  jmp    L113
L205:
  mov    -0x3c(%rbp),%eax
  imul   -0x4c(%rbp),%eax
  mov    %eax,%edx
  mov    -0x38(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x48(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  movsd  %xmm0,-0x28(%rbp)
  mov    -0x3c(%rbp),%eax
  imul   -0x4c(%rbp),%eax
  mov    %eax,%edx
  mov    -0x34(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x48(%rbp),%rax
  add    %rax,%rdx
  mov    -0x3c(%rbp),%eax
  imul   -0x4c(%rbp),%eax
  mov    %eax,%ecx
  mov    -0x38(%rbp),%eax
  add    %ecx,%eax
  cltq
  lea    0x0(,%rax,8),%rcx
  mov    -0x48(%rbp),%rax
  add    %rcx,%rax
  movsd  (%rdx),%xmm0
  movsd  %xmm0,(%rax)
  mov    -0x3c(%rbp),%eax
  imul   -0x4c(%rbp),%eax
  mov    %eax,%edx
  mov    -0x34(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x48(%rbp),%rax
  add    %rdx,%rax
  movsd  -0x28(%rbp),%xmm0
  movsd  %xmm0,(%rax)
  addl   $0x1,-0x3c(%rbp)
L113:
  mov    -0x3c(%rbp),%eax
  cmp    -0x34(%rbp),%eax
  jle    L205
  movl   $0x0,-0x3c(%rbp)
  jmp    L491
L170:
  mov    -0x38(%rbp),%eax
  imul   -0x4c(%rbp),%eax
  mov    %eax,%edx
  mov    -0x3c(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x48(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  movsd  %xmm0,-0x28(%rbp)
  mov    -0x34(%rbp),%eax
  imul   -0x4c(%rbp),%eax
  mov    %eax,%edx
  mov    -0x3c(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x48(%rbp),%rax
  add    %rax,%rdx
  mov    -0x38(%rbp),%eax
  imul   -0x4c(%rbp),%eax
  mov    %eax,%ecx
  mov    -0x3c(%rbp),%eax
  add    %ecx,%eax
  cltq
  lea    0x0(,%rax,8),%rcx
  mov    -0x48(%rbp),%rax
  add    %rcx,%rax
  movsd  (%rdx),%xmm0
  movsd  %xmm0,(%rax)
  mov    -0x34(%rbp),%eax
  imul   -0x4c(%rbp),%eax
  mov    %eax,%edx
  mov    -0x3c(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x48(%rbp),%rax
  add    %rdx,%rax
  movsd  -0x28(%rbp),%xmm0
  movsd  %xmm0,(%rax)
  addl   $0x1,-0x3c(%rbp)
L491:
  mov    -0x3c(%rbp),%eax
  cmp    -0x4c(%rbp),%eax
  jl     L170
  jmp    L323
L17:
  subl   $0x1,-0x38(%rbp)
L309:
  cmpl   $0x0,-0x38(%rbp)
  jns    L249
  jmp    L191
L323:
  nop
L191:
  cmpl   $0x0,-0x38(%rbp)
  js     L525
  subl   $0x1,-0x34(%rbp)
L375:
  cmpl   $0x0,-0x34(%rbp)
  jns    L254
  jmp    L20
L525:
  nop
L20:
  movl   $0x0,-0x30(%rbp)
  jmp    L220
L174:
  mov    -0x30(%rbp),%eax
  mov    %eax,-0x38(%rbp)
  jmp    L236
L454:
  mov    -0x30(%rbp),%eax
  mov    %eax,-0x3c(%rbp)
  jmp    L502
L428:
  mov    -0x3c(%rbp),%eax
  cmp    -0x38(%rbp),%eax
  je     L370
  mov    -0x3c(%rbp),%eax
  imul   -0x4c(%rbp),%eax
  mov    %eax,%edx
  mov    -0x38(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x48(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rax
  movq   %rax,%xmm0
  call   <fabs@plt>
  test   %rax,%rax
  jne    L194
L370:
  addl   $0x1,-0x3c(%rbp)
L502:
  mov    -0x3c(%rbp),%eax
  cmp    -0x34(%rbp),%eax
  jle    L428
  jmp    L125
L194:
  nop
L125:
  mov    -0x3c(%rbp),%eax
  cmp    -0x34(%rbp),%eax
  jle    L373
  mov    -0x30(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x68(%rbp),%rax
  add    %rdx,%rax
  pxor   %xmm0,%xmm0
  cvtsi2sdl -0x38(%rbp),%xmm0
  movsd  %xmm0,(%rax)
  mov    -0x38(%rbp),%eax
  cmp    -0x30(%rbp),%eax
  je     L266
  movl   $0x0,-0x3c(%rbp)
  jmp    L391
L271:
  mov    -0x3c(%rbp),%eax
  imul   -0x4c(%rbp),%eax
  mov    %eax,%edx
  mov    -0x38(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x48(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  movsd  %xmm0,-0x28(%rbp)
  mov    -0x3c(%rbp),%eax
  imul   -0x4c(%rbp),%eax
  mov    %eax,%edx
  mov    -0x30(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x48(%rbp),%rax
  add    %rax,%rdx
  mov    -0x3c(%rbp),%eax
  imul   -0x4c(%rbp),%eax
  mov    %eax,%ecx
  mov    -0x38(%rbp),%eax
  add    %ecx,%eax
  cltq
  lea    0x0(,%rax,8),%rcx
  mov    -0x48(%rbp),%rax
  add    %rcx,%rax
  movsd  (%rdx),%xmm0
  movsd  %xmm0,(%rax)
  mov    -0x3c(%rbp),%eax
  imul   -0x4c(%rbp),%eax
  mov    %eax,%edx
  mov    -0x30(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x48(%rbp),%rax
  add    %rdx,%rax
  movsd  -0x28(%rbp),%xmm0
  movsd  %xmm0,(%rax)
  addl   $0x1,-0x3c(%rbp)
L391:
  mov    -0x3c(%rbp),%eax
  cmp    -0x34(%rbp),%eax
  jle    L271
  mov    -0x30(%rbp),%eax
  mov    %eax,-0x3c(%rbp)
  jmp    L230
L29:
  mov    -0x38(%rbp),%eax
  imul   -0x4c(%rbp),%eax
  mov    %eax,%edx
  mov    -0x3c(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x48(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  movsd  %xmm0,-0x28(%rbp)
  mov    -0x30(%rbp),%eax
  imul   -0x4c(%rbp),%eax
  mov    %eax,%edx
  mov    -0x3c(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x48(%rbp),%rax
  add    %rax,%rdx
  mov    -0x38(%rbp),%eax
  imul   -0x4c(%rbp),%eax
  mov    %eax,%ecx
  mov    -0x3c(%rbp),%eax
  add    %ecx,%eax
  cltq
  lea    0x0(,%rax,8),%rcx
  mov    -0x48(%rbp),%rax
  add    %rcx,%rax
  movsd  (%rdx),%xmm0
  movsd  %xmm0,(%rax)
  mov    -0x30(%rbp),%eax
  imul   -0x4c(%rbp),%eax
  mov    %eax,%edx
  mov    -0x3c(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x48(%rbp),%rax
  add    %rdx,%rax
  movsd  -0x28(%rbp),%xmm0
  movsd  %xmm0,(%rax)
  addl   $0x1,-0x3c(%rbp)
L230:
  mov    -0x3c(%rbp),%eax
  cmp    -0x4c(%rbp),%eax
  jl     L29
  jmp    L266
L373:
  addl   $0x1,-0x38(%rbp)
L236:
  mov    -0x38(%rbp),%eax
  cmp    -0x34(%rbp),%eax
  jle    L454
  jmp    L589
L266:
  nop
L589:
  mov    -0x38(%rbp),%eax
  cmp    -0x34(%rbp),%eax
  jg     L341
  addl   $0x1,-0x30(%rbp)
L220:
  mov    -0x30(%rbp),%eax
  cmp    -0x34(%rbp),%eax
  jle    L174
  jmp    L60
L341:
  nop
L60:
  mov    -0x60(%rbp),%rax
  mov    -0x34(%rbp),%edx
  mov    %edx,(%rax)
  mov    -0x58(%rbp),%rax
  mov    -0x30(%rbp),%edx
  mov    %edx,(%rax)
  mov    -0x30(%rbp),%eax
  mov    %eax,-0x3c(%rbp)
  jmp    L265
L178:
  mov    -0x3c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x68(%rbp),%rax
  add    %rdx,%rax
  movsd  D55(%rip),%xmm0
  movsd  %xmm0,(%rax)
  addl   $0x1,-0x3c(%rbp)
L265:
  mov    -0x3c(%rbp),%eax
  cmp    -0x34(%rbp),%eax
  jle    L178
L213:
  movl   $0x1,-0x2c(%rbp)
  mov    -0x30(%rbp),%eax
  mov    %eax,-0x3c(%rbp)
  jmp    L320
L437:
  pxor   %xmm0,%xmm0
  movsd  %xmm0,-0x28(%rbp)
  pxor   %xmm0,%xmm0
  movsd  %xmm0,-0x18(%rbp)
  mov    -0x30(%rbp),%eax
  mov    %eax,-0x38(%rbp)
  jmp    L148
L86:
  mov    -0x38(%rbp),%eax
  cmp    -0x3c(%rbp),%eax
  je     L357
  mov    -0x38(%rbp),%eax
  imul   -0x4c(%rbp),%eax
  mov    %eax,%edx
  mov    -0x3c(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x48(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rax
  movq   %rax,%xmm0
  call   <fabs@plt>
  pxor   %xmm0,%xmm0
  cvtsi2sd %rax,%xmm0
  movsd  -0x28(%rbp),%xmm1
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x28(%rbp)
  mov    -0x3c(%rbp),%eax
  imul   -0x4c(%rbp),%eax
  mov    %eax,%edx
  mov    -0x38(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x48(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rax
  movq   %rax,%xmm0
  call   <fabs@plt>
  pxor   %xmm0,%xmm0
  cvtsi2sd %rax,%xmm0
  movsd  -0x18(%rbp),%xmm1
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x18(%rbp)
L357:
  addl   $0x1,-0x38(%rbp)
L148:
  mov    -0x38(%rbp),%eax
  cmp    -0x34(%rbp),%eax
  jle    L86
  pxor   %xmm0,%xmm0
  ucomisd -0x28(%rbp),%xmm0
  jp     L289
  pxor   %xmm0,%xmm0
  ucomisd -0x28(%rbp),%xmm0
  je     L147
L289:
  pxor   %xmm0,%xmm0
  ucomisd -0x18(%rbp),%xmm0
  jp     L469
  pxor   %xmm0,%xmm0
  ucomisd -0x18(%rbp),%xmm0
  je     L147
L469:
  movsd  -0x18(%rbp),%xmm0
  movsd  D21(%rip),%xmm1
  divsd  %xmm1,%xmm0
  movsd  %xmm0,-0x10(%rbp)
  movsd  D55(%rip),%xmm0
  movsd  %xmm0,-0x20(%rbp)
  movsd  -0x28(%rbp),%xmm0
  addsd  -0x18(%rbp),%xmm0
  movsd  %xmm0,-0x8(%rbp)
  jmp    L365
L228:
  movsd  -0x20(%rbp),%xmm0
  addsd  %xmm0,%xmm0
  movsd  %xmm0,-0x20(%rbp)
  movsd  -0x28(%rbp),%xmm1
  movsd  D24(%rip),%xmm0
  mulsd  %xmm1,%xmm0
  movsd  %xmm0,-0x28(%rbp)
L365:
  movsd  -0x10(%rbp),%xmm0
  comisd -0x28(%rbp),%xmm0
  ja     L228
  movsd  -0x18(%rbp),%xmm0
  addsd  %xmm0,%xmm0
  movsd  %xmm0,-0x10(%rbp)
  jmp    L310
L393:
  movsd  -0x20(%rbp),%xmm0
  movsd  D21(%rip),%xmm1
  divsd  %xmm1,%xmm0
  movsd  %xmm0,-0x20(%rbp)
  movsd  -0x28(%rbp),%xmm0
  movsd  D24(%rip),%xmm1
  divsd  %xmm1,%xmm0
  movsd  %xmm0,-0x28(%rbp)
L310:
  movsd  -0x28(%rbp),%xmm0
  comisd -0x10(%rbp),%xmm0
  jae    L393
  movsd  -0x28(%rbp),%xmm0
  addsd  -0x18(%rbp),%xmm0
  movapd %xmm0,%xmm1
  divsd  -0x20(%rbp),%xmm1
  movsd  -0x8(%rbp),%xmm2
  movsd  D62(%rip),%xmm0
  mulsd  %xmm2,%xmm0
  comisd %xmm1,%xmm0
  jbe    L147
  movl   $0x0,-0x2c(%rbp)
  movsd  D55(%rip),%xmm0
  divsd  -0x20(%rbp),%xmm0
  movsd  %xmm0,-0x10(%rbp)
  mov    -0x3c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x68(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  mov    -0x3c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x68(%rbp),%rax
  add    %rdx,%rax
  mulsd  -0x20(%rbp),%xmm0
  movsd  %xmm0,(%rax)
  mov    -0x30(%rbp),%eax
  mov    %eax,-0x38(%rbp)
  jmp    L166
L495:
  mov    -0x3c(%rbp),%eax
  imul   -0x4c(%rbp),%eax
  mov    %eax,%edx
  mov    -0x38(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x48(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  mov    -0x3c(%rbp),%eax
  imul   -0x4c(%rbp),%eax
  mov    %eax,%edx
  mov    -0x38(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x48(%rbp),%rax
  add    %rdx,%rax
  mulsd  -0x10(%rbp),%xmm0
  movsd  %xmm0,(%rax)
  addl   $0x1,-0x38(%rbp)
L166:
  mov    -0x38(%rbp),%eax
  cmp    -0x4c(%rbp),%eax
  jl     L495
  movl   $0x0,-0x38(%rbp)
  jmp    L216
L448:
  mov    -0x38(%rbp),%eax
  imul   -0x4c(%rbp),%eax
  mov    %eax,%edx
  mov    -0x3c(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x48(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  mov    -0x38(%rbp),%eax
  imul   -0x4c(%rbp),%eax
  mov    %eax,%edx
  mov    -0x3c(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x48(%rbp),%rax
  add    %rdx,%rax
  mulsd  -0x20(%rbp),%xmm0
  movsd  %xmm0,(%rax)
  addl   $0x1,-0x38(%rbp)
L216:
  mov    -0x38(%rbp),%eax
  cmp    -0x34(%rbp),%eax
  jle    L448
L147:
  addl   $0x1,-0x3c(%rbp)
L320:
  mov    -0x3c(%rbp),%eax
  cmp    -0x34(%rbp),%eax
  jle    L437
  cmpl   $0x0,-0x2c(%rbp)
  je     L213
  nop
  nop
  leave
  ret
```

tool_calls: name: unpack_data
arguments: data_tag: D55
type_infered: byte[8]
name: unpack_data
arguments: data_tag: D21
type_infered: byte[8]
name: unpack_data
arguments: data_tag: D24
type_infered: byte[8]
name: unpack_data
arguments: data_tag: D62
type_infered: f64

tool: {"D55": [0x00,0x00,0x00,0x00,0x00,0x00,0xf0,0x3f]}

tool: {"D21": [0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40]}

tool: {"D24": [0x00,0x00,0x00,0x00,0x00,0x00,0x10,0x40]}

tool: D62: 0.95

assistant: ```c
void balance(double *mat, int n, int *low, int *hi, double *scale) {
  double c, f, g, r, s;
  int i, j, k, l, done;
  for (k = n - 1; k >= 0; k--) {
    for (j = k; j >= 0; j--) {
      for (i = 0; i <= k; i++) {
        if (i != j && fabs(mat[((j) * (n) + (i))]) != 0)
          break;
      }
      if (i > k) {
        scale[k] = j;
        if (j != k) {
          for (i = 0; i <= k; i++) {
            c = mat[((i) * (n) + (j))];
            mat[((i) * (n) + (j))] = mat[((i) * (n) + (k))];
            mat[((i) * (n) + (k))] = c;
          }
          for (i = 0; i < n; i++) {
            c = mat[((j) * (n) + (i))];
            mat[((j) * (n) + (i))] = mat[((k) * (n) + (i))];
            mat[((k) * (n) + (i))] = c;
          }
        }
        break;
      }
    }
    if (j < 0)
      break;
  }
  for (l = 0; l <= k; l++) {
    for (j = l; j <= k; j++) {
      for (i = l; i <= k; i++) {
        if (i != j && fabs(mat[((i) * (n) + (j))]) != 0)
          break;
      }
      if (i > k) {
        scale[l] = j;
        if (j != l) {
          for (i = 0; i <= k; i++) {
            c = mat[((i) * (n) + (j))];
            mat[((i) * (n) + (j))] = mat[((i) * (n) + (l))];
            mat[((i) * (n) + (l))] = c;
          }
          for (i = l; i < n; i++) {
            c = mat[((j) * (n) + (i))];
            mat[((j) * (n) + (i))] = mat[((l) * (n) + (i))];
            mat[((l) * (n) + (i))] = c;
          }
        }
        break;
      }
    }
    if (j > k)
      break;
  }
  *hi = k;
  *low = l;
  for (i = l; i <= k; i++) {
    scale[i] = 1;
  }
  do {
    for (done = 1, i = l; i <= k; i++) {
      for (c = 0, r = 0, j = l; j <= k; j++) {
        if (j != i) {
          c += fabs(mat[((j) * (n) + (i))]);
          r += fabs(mat[((i) * (n) + (j))]);
        }
      }
      if (c != 0 && r != 0) {
        g = r / 2;
        f = 1;
        s = c + r;
        while (c < g) {
          f *= 2;
          c *= 2 * 2;
        }
        g = r * 2;
        while (c >= g) {
          f /= 2;
          c /= 2 * 2;
        }
        if ((c + r) / f < 0.95 * s) {
          done = 0;
          g = 1 / f;
          scale[i] *= f;
          for (j = l; j < n; j++) {
            mat[((i) * (n) + (j))] *= g;
          }
          for (j = 0; j <= k; j++) {
            mat[((j) * (n) + (i))] *= f;
          }
        }
      }
    }
  } while (!done);
}
```