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

```asm
<bidiag_orth>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x60,%rsp
  mov    %rdi,-0x48(%rbp)
  mov    %esi,-0x4c(%rbp)
  mov    %edx,-0x50(%rbp)
  mov    %rcx,-0x58(%rbp)
  mov    %r8,-0x60(%rbp)
  mov    -0x4c(%rbp),%eax
  cmp    -0x50(%rbp),%eax
  jge    L336
  lea    D0(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
  mov    $0x1,%edi
  call   <exit@plt>
L336:
  mov    -0x4c(%rbp),%eax
  cltq
  shl    $0x3,%eax
  mov    %eax,%edi
  call   <malloc@plt>
  mov    %rax,-0x28(%rbp)
  mov    -0x4c(%rbp),%eax
  cltq
  shl    $0x3,%eax
  mov    %eax,%edi
  call   <malloc@plt>
  mov    %rax,-0x20(%rbp)
  mov    -0x4c(%rbp),%eax
  cltq
  mov    %eax,%edx
  mov    -0x4c(%rbp),%eax
  cltq
  imul   %edx,%eax
  shl    $0x3,%eax
  mov    %eax,%edi
  call   <malloc@plt>
  mov    %rax,-0x18(%rbp)
  mov    -0x4c(%rbp),%eax
  cltq
  mov    %eax,%edx
  mov    -0x4c(%rbp),%eax
  cltq
  imul   %edx,%eax
  shl    $0x3,%eax
  mov    %eax,%edi
  call   <malloc@plt>
  mov    %rax,-0x10(%rbp)
  mov    -0x4c(%rbp),%edx
  mov    -0x58(%rbp),%rax
  mov    %edx,%esi
  mov    %rax,%rdi
  call   <eye@plt>
  mov    -0x50(%rbp),%edx
  mov    -0x60(%rbp),%rax
  mov    %edx,%esi
  mov    %rax,%rdi
  call   <eye@plt>
  movl   $0x0,-0x3c(%rbp)
  jmp    L11
L107:
  mov    -0x3c(%rbp),%eax
  mov    %eax,-0x38(%rbp)
  jmp    L353
L45:
  mov    -0x38(%rbp),%eax
  imul   -0x50(%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
  sub    -0x3c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rcx
  mov    -0x28(%rbp),%rax
  add    %rcx,%rax
  movsd  (%rdx),%xmm0
  movsd  %xmm0,(%rax)
  addl   $0x1,-0x38(%rbp)
L353:
  mov    -0x38(%rbp),%eax
  cmp    -0x4c(%rbp),%eax
  jl     L45
  mov    -0x4c(%rbp),%eax
  sub    -0x3c(%rbp),%eax
  mov    %eax,%ecx
  mov    -0x20(%rbp),%rdx
  mov    -0x28(%rbp),%rax
  mov    %ecx,%esi
  mov    %rax,%rdi
  call   <house@plt>
  movq   %xmm0,%rax
  mov    %rax,-0x8(%rbp)
  mov    -0x3c(%rbp),%eax
  mov    %eax,-0x38(%rbp)
  jmp    L194
L298:
  mov    -0x38(%rbp),%eax
  imul   -0x50(%rbp),%eax
  mov    %eax,-0x2c(%rbp)
  movl   $0x0,-0x30(%rbp)
  mov    -0x3c(%rbp),%eax
  mov    %eax,-0x34(%rbp)
  jmp    L259
L201:
  mov    -0x34(%rbp),%edx
  mov    -0x2c(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x48(%rbp),%rax
  add    %rax,%rdx
  mov    -0x30(%rbp),%ecx
  mov    -0x38(%rbp),%eax
  add    %ecx,%eax
  sub    -0x3c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rcx
  mov    -0x18(%rbp),%rax
  add    %rcx,%rax
  movsd  (%rdx),%xmm0
  movsd  %xmm0,(%rax)
  mov    -0x4c(%rbp),%eax
  sub    -0x3c(%rbp),%eax
  add    %eax,-0x30(%rbp)
  addl   $0x1,-0x34(%rbp)
L259:
  mov    -0x34(%rbp),%eax
  cmp    -0x50(%rbp),%eax
  jl     L201
  addl   $0x1,-0x38(%rbp)
L194:
  mov    -0x38(%rbp),%eax
  cmp    -0x4c(%rbp),%eax
  jl     L298
  mov    -0x4c(%rbp),%eax
  sub    -0x3c(%rbp),%eax
  mov    %eax,%edi
  mov    -0x50(%rbp),%eax
  sub    -0x3c(%rbp),%eax
  mov    %eax,%ecx
  mov    -0x10(%rbp),%rdx
  mov    -0x20(%rbp),%rsi
  mov    -0x18(%rbp),%rax
  mov    $0x1,%r9d
  mov    %edi,%r8d
  mov    %rax,%rdi
  call   <mmult@plt>
  mov    -0x50(%rbp),%eax
  sub    -0x3c(%rbp),%eax
  mov    %eax,%ecx
  mov    -0x8(%rbp),%rdx
  mov    -0x10(%rbp),%rax
  movq   %rdx,%xmm0
  mov    $0x1,%edx
  mov    %ecx,%esi
  mov    %rax,%rdi
  call   <scale@plt>
  mov    -0x50(%rbp),%eax
  sub    -0x3c(%rbp),%eax
  mov    %eax,%edi
  mov    -0x4c(%rbp),%eax
  sub    -0x3c(%rbp),%eax
  mov    %eax,%ecx
  mov    -0x18(%rbp),%rdx
  mov    -0x10(%rbp),%rsi
  mov    -0x20(%rbp),%rax
  mov    %edi,%r9d
  mov    $0x1,%r8d
  mov    %rax,%rdi
  call   <mmult@plt>
  mov    -0x3c(%rbp),%eax
  mov    %eax,-0x38(%rbp)
  jmp    L324
L74:
  mov    -0x38(%rbp),%eax
  imul   -0x50(%rbp),%eax
  mov    %eax,-0x2c(%rbp)
  mov    -0x3c(%rbp),%eax
  mov    %eax,-0x34(%rbp)
  jmp    L73
L108:
  mov    -0x2c(%rbp),%edx
  mov    -0x34(%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
  sub    -0x3c(%rbp),%eax
  mov    %eax,%edx
  mov    -0x50(%rbp),%eax
  sub    -0x3c(%rbp),%eax
  imul   %eax,%edx
  mov    -0x34(%rbp),%eax
  add    %edx,%eax
  sub    -0x3c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm1
  mov    -0x2c(%rbp),%edx
  mov    -0x34(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x48(%rbp),%rax
  add    %rdx,%rax
  subsd  %xmm1,%xmm0
  movsd  %xmm0,(%rax)
  addl   $0x1,-0x34(%rbp)
L73:
  mov    -0x34(%rbp),%eax
  cmp    -0x50(%rbp),%eax
  jl     L108
  addl   $0x1,-0x38(%rbp)
L324:
  mov    -0x38(%rbp),%eax
  cmp    -0x4c(%rbp),%eax
  jl     L74
  mov    -0x3c(%rbp),%eax
  add    $0x1,%eax
  mov    %eax,-0x38(%rbp)
  jmp    L262
L352:
  mov    -0x38(%rbp),%eax
  sub    -0x3c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x20(%rbp),%rax
  add    %rax,%rdx
  mov    -0x38(%rbp),%eax
  imul   -0x50(%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)
  addl   $0x1,-0x38(%rbp)
L262:
  mov    -0x38(%rbp),%eax
  cmp    -0x4c(%rbp),%eax
  jl     L352
  mov    -0x3c(%rbp),%eax
  mov    %eax,-0x38(%rbp)
  jmp    L47
L176:
  mov    -0x38(%rbp),%eax
  imul   -0x4c(%rbp),%eax
  mov    %eax,-0x2c(%rbp)
  mov    -0x38(%rbp),%eax
  sub    -0x3c(%rbp),%eax
  mov    %eax,%edx
  mov    -0x4c(%rbp),%eax
  sub    -0x3c(%rbp),%eax
  imul   %edx,%eax
  mov    %eax,-0x30(%rbp)
  mov    -0x3c(%rbp),%eax
  mov    %eax,-0x34(%rbp)
  jmp    L174
L131:
  mov    -0x34(%rbp),%edx
  mov    -0x2c(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x58(%rbp),%rax
  add    %rax,%rdx
  mov    -0x30(%rbp),%ecx
  mov    -0x34(%rbp),%eax
  add    %ecx,%eax
  sub    -0x3c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rcx
  mov    -0x18(%rbp),%rax
  add    %rcx,%rax
  movsd  (%rdx),%xmm0
  movsd  %xmm0,(%rax)
  addl   $0x1,-0x34(%rbp)
L174:
  mov    -0x34(%rbp),%eax
  cmp    -0x4c(%rbp),%eax
  jl     L131
  addl   $0x1,-0x38(%rbp)
L47:
  mov    -0x38(%rbp),%eax
  cmp    -0x4c(%rbp),%eax
  jl     L176
  mov    -0x4c(%rbp),%eax
  sub    -0x3c(%rbp),%eax
  mov    %eax,%edi
  mov    -0x4c(%rbp),%eax
  sub    -0x3c(%rbp),%eax
  mov    %eax,%ecx
  mov    -0x10(%rbp),%rdx
  mov    -0x20(%rbp),%rsi
  mov    -0x18(%rbp),%rax
  mov    $0x1,%r9d
  mov    %edi,%r8d
  mov    %rax,%rdi
  call   <mmult@plt>
  mov    -0x4c(%rbp),%eax
  sub    -0x3c(%rbp),%eax
  mov    %eax,%ecx
  mov    -0x8(%rbp),%rdx
  mov    -0x10(%rbp),%rax
  movq   %rdx,%xmm0
  mov    $0x1,%edx
  mov    %ecx,%esi
  mov    %rax,%rdi
  call   <scale@plt>
  mov    -0x4c(%rbp),%eax
  sub    -0x3c(%rbp),%eax
  mov    %eax,%edi
  mov    -0x4c(%rbp),%eax
  sub    -0x3c(%rbp),%eax
  mov    %eax,%ecx
  mov    -0x18(%rbp),%rdx
  mov    -0x20(%rbp),%rsi
  mov    -0x10(%rbp),%rax
  mov    %edi,%r9d
  mov    $0x1,%r8d
  mov    %rax,%rdi
  call   <mmult@plt>
  mov    -0x3c(%rbp),%eax
  mov    %eax,-0x38(%rbp)
  jmp    L261
L26:
  mov    -0x38(%rbp),%eax
  imul   -0x4c(%rbp),%eax
  mov    %eax,-0x2c(%rbp)
  mov    -0x38(%rbp),%eax
  sub    -0x3c(%rbp),%eax
  mov    %eax,%edx
  mov    -0x4c(%rbp),%eax
  sub    -0x3c(%rbp),%eax
  imul   %edx,%eax
  mov    %eax,-0x30(%rbp)
  mov    -0x3c(%rbp),%eax
  mov    %eax,-0x34(%rbp)
  jmp    L21
L28:
  mov    -0x34(%rbp),%edx
  mov    -0x2c(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x58(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  mov    -0x30(%rbp),%edx
  mov    -0x34(%rbp),%eax
  add    %edx,%eax
  sub    -0x3c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm1
  mov    -0x34(%rbp),%edx
  mov    -0x2c(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x58(%rbp),%rax
  add    %rdx,%rax
  subsd  %xmm1,%xmm0
  movsd  %xmm0,(%rax)
  addl   $0x1,-0x34(%rbp)
L21:
  mov    -0x34(%rbp),%eax
  cmp    -0x4c(%rbp),%eax
  jl     L28
  addl   $0x1,-0x38(%rbp)
L261:
  mov    -0x38(%rbp),%eax
  cmp    -0x4c(%rbp),%eax
  jl     L26
  mov    -0x50(%rbp),%eax
  sub    $0x2,%eax
  cmp    %eax,-0x3c(%rbp)
  jge    L349
  mov    -0x3c(%rbp),%eax
  add    $0x1,%eax
  mov    %eax,-0x38(%rbp)
  jmp    L319
L359:
  mov    -0x3c(%rbp),%eax
  imul   -0x50(%rbp),%eax
  mov    %eax,%edx
  mov    -0x38(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x48(%rbp),%rax
  add    %rax,%rdx
  mov    -0x38(%rbp),%eax
  sub    -0x3c(%rbp),%eax
  cltq
  shl    $0x3,%rax
  lea    -0x8(%rax),%rcx
  mov    -0x28(%rbp),%rax
  add    %rcx,%rax
  movsd  (%rdx),%xmm0
  movsd  %xmm0,(%rax)
  addl   $0x1,-0x38(%rbp)
L319:
  mov    -0x38(%rbp),%eax
  cmp    -0x50(%rbp),%eax
  jl     L359
  mov    -0x50(%rbp),%eax
  sub    -0x3c(%rbp),%eax
  lea    -0x1(%rax),%ecx
  mov    -0x20(%rbp),%rdx
  mov    -0x28(%rbp),%rax
  mov    %ecx,%esi
  mov    %rax,%rdi
  call   <house@plt>
  movq   %xmm0,%rax
  mov    %rax,-0x8(%rbp)
  mov    -0x3c(%rbp),%eax
  mov    %eax,-0x38(%rbp)
  jmp    L272
L252:
  mov    -0x38(%rbp),%eax
  imul   -0x50(%rbp),%eax
  mov    %eax,-0x2c(%rbp)
  mov    -0x38(%rbp),%eax
  sub    -0x3c(%rbp),%eax
  mov    %eax,%edx
  mov    -0x50(%rbp),%eax
  sub    -0x3c(%rbp),%eax
  sub    $0x1,%eax
  imul   %edx,%eax
  mov    %eax,-0x30(%rbp)
  mov    -0x3c(%rbp),%eax
  add    $0x1,%eax
  mov    %eax,-0x34(%rbp)
  jmp    L149
L39:
  mov    -0x34(%rbp),%edx
  mov    -0x2c(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x48(%rbp),%rax
  add    %rax,%rdx
  mov    -0x30(%rbp),%ecx
  mov    -0x34(%rbp),%eax
  add    %ecx,%eax
  sub    -0x3c(%rbp),%eax
  cltq
  shl    $0x3,%rax
  lea    -0x8(%rax),%rcx
  mov    -0x18(%rbp),%rax
  add    %rcx,%rax
  movsd  (%rdx),%xmm0
  movsd  %xmm0,(%rax)
  addl   $0x1,-0x34(%rbp)
L149:
  mov    -0x34(%rbp),%eax
  cmp    -0x50(%rbp),%eax
  jl     L39
  addl   $0x1,-0x38(%rbp)
L272:
  mov    -0x38(%rbp),%eax
  cmp    -0x4c(%rbp),%eax
  jl     L252
  mov    -0x50(%rbp),%eax
  sub    -0x3c(%rbp),%eax
  lea    -0x1(%rax),%edi
  mov    -0x4c(%rbp),%eax
  sub    -0x3c(%rbp),%eax
  mov    %eax,%ecx
  mov    -0x10(%rbp),%rdx
  mov    -0x20(%rbp),%rsi
  mov    -0x18(%rbp),%rax
  mov    $0x1,%r9d
  mov    %edi,%r8d
  mov    %rax,%rdi
  call   <mmult@plt>
  mov    -0x4c(%rbp),%eax
  sub    -0x3c(%rbp),%eax
  mov    %eax,%ecx
  mov    -0x8(%rbp),%rdx
  mov    -0x10(%rbp),%rax
  movq   %rdx,%xmm0
  mov    $0x1,%edx
  mov    %ecx,%esi
  mov    %rax,%rdi
  call   <scale@plt>
  mov    -0x50(%rbp),%eax
  sub    -0x3c(%rbp),%eax
  lea    -0x1(%rax),%edi
  mov    -0x4c(%rbp),%eax
  sub    -0x3c(%rbp),%eax
  mov    %eax,%ecx
  mov    -0x18(%rbp),%rdx
  mov    -0x20(%rbp),%rsi
  mov    -0x10(%rbp),%rax
  mov    %edi,%r9d
  mov    $0x1,%r8d
  mov    %rax,%rdi
  call   <mmult@plt>
  mov    -0x3c(%rbp),%eax
  mov    %eax,-0x38(%rbp)
  jmp    L198
L257:
  mov    -0x38(%rbp),%eax
  imul   -0x50(%rbp),%eax
  mov    %eax,-0x2c(%rbp)
  mov    -0x38(%rbp),%eax
  sub    -0x3c(%rbp),%eax
  mov    %eax,%edx
  mov    -0x50(%rbp),%eax
  sub    -0x3c(%rbp),%eax
  sub    $0x1,%eax
  imul   %edx,%eax
  mov    %eax,-0x30(%rbp)
  mov    -0x3c(%rbp),%eax
  add    $0x1,%eax
  mov    %eax,-0x34(%rbp)
  jmp    L278
L273:
  mov    -0x34(%rbp),%edx
  mov    -0x2c(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x48(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  mov    -0x30(%rbp),%edx
  mov    -0x34(%rbp),%eax
  add    %edx,%eax
  sub    -0x3c(%rbp),%eax
  cltq
  shl    $0x3,%rax
  lea    -0x8(%rax),%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm1
  mov    -0x34(%rbp),%edx
  mov    -0x2c(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x48(%rbp),%rax
  add    %rdx,%rax
  subsd  %xmm1,%xmm0
  movsd  %xmm0,(%rax)
  addl   $0x1,-0x34(%rbp)
L278:
  mov    -0x34(%rbp),%eax
  cmp    -0x50(%rbp),%eax
  jl     L273
  addl   $0x1,-0x38(%rbp)
L198:
  mov    -0x38(%rbp),%eax
  cmp    -0x4c(%rbp),%eax
  jl     L257
  movl   $0x1,-0x30(%rbp)
  mov    -0x3c(%rbp),%eax
  imul   -0x50(%rbp),%eax
  mov    %eax,-0x2c(%rbp)
  mov    -0x3c(%rbp),%eax
  add    $0x2,%eax
  mov    %eax,-0x38(%rbp)
  jmp    L284
L120:
  mov    -0x30(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x20(%rbp),%rax
  add    %rax,%rdx
  mov    -0x2c(%rbp),%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)
  addl   $0x1,-0x30(%rbp)
  addl   $0x1,-0x38(%rbp)
L284:
  mov    -0x38(%rbp),%eax
  cmp    -0x50(%rbp),%eax
  jl     L120
L349:
  addl   $0x1,-0x3c(%rbp)
L11:
  mov    -0x3c(%rbp),%eax
  cmp    -0x50(%rbp),%eax
  jl     L107
  mov    -0x28(%rbp),%rax
  mov    %rax,%rdi
  call   <free@plt>
  mov    -0x20(%rbp),%rax
  mov    %rax,%rdi
  call   <free@plt>
  mov    -0x18(%rbp),%rax
  mov    %rax,%rdi
  call   <free@plt>
  nop
  leave
  ret
```

tool_calls: name: unpack_data
arguments: tag: D0
type: string

tool: D0: M should be greater than or equal to N

assistant: ```c
void bidiag_orth(double *A, int M, int N, double *U, double *V) {
  int j, i, k, u, t;
  double *x, *v, *AT, *w;
  double beta;
  if (M < N) {
    printf("M should be greater than or equal to N");
    exit(1);
  }
  x = (double *)malloc(sizeof(double) * M);
  v = (double *)malloc(sizeof(double) * M);
  AT = (double *)malloc(sizeof(double) * M * M);
  w = (double *)malloc(sizeof(double) * M * M);
  eye(U, M);
  eye(V, N);
  for (j = 0; j < N; ++j) {
    for (i = j; i < M; ++i) {
      x[i - j] = A[i * N + j];
    }
    beta = house(x, M - j, v);
    for (i = j; i < M; i++) {
      t = i * N;
      u = 0;
      for (k = j; k < N; k++) {
        AT[u + i - j] = A[k + t];
        u += (M - j);
      }
    }
    mmult(AT, v, w, N - j, M - j, 1);
    scale(w, N - j, 1, beta);
    mmult(v, w, AT, M - j, 1, N - j);
    for (i = j; i < M; i++) {
      t = i * N;
      for (k = j; k < N; k++) {
        A[t + k] -= AT[(i - j) * (N - j) + k - j];
      }
    }
    for (i = j + 1; i < M; ++i) {
      A[i * N + j] = v[i - j];
    }
    for (i = j; i < M; i++) {
      t = i * M;
      u = (i - j) * (M - j);
      for (k = j; k < M; k++) {
        AT[u + k - j] = U[k + t];
      }
    }
    mmult(AT, v, w, M - j, M - j, 1);
    scale(w, M - j, 1, beta);
    mmult(w, v, AT, M - j, 1, M - j);
    for (i = j; i < M; i++) {
      t = i * M;
      u = (i - j) * (M - j);
      for (k = j; k < M; k++) {
        U[k + t] -= AT[u + k - j];
      }
    }
    if (j < N - 2) {
      for (i = j + 1; i < N; ++i) {
        x[i - j - 1] = A[j * N + i];
      }
      beta = house(x, N - j - 1, v);
      for (i = j; i < M; i++) {
        t = i * N;
        u = (i - j) * (N - j - 1);
        for (k = j + 1; k < N; k++) {
          AT[u + k - j - 1] = A[k + t];
        }
      }
      mmult(AT, v, w, M - j, N - j - 1, 1);
      scale(w, M - j, 1, beta);
      mmult(w, v, AT, M - j, 1, N - j - 1);
      for (i = j; i < M; i++) {
        t = i * N;
        u = (i - j) * (N - j - 1);
        for (k = j + 1; k < N; k++) {
          A[k + t] -= AT[u + k - j - 1];
        }
      }
      u = 1;
      t = j * N;
      for (i = j + 2; i < N; ++i) {
        A[t + i] = v[u];
        u++;
      }
    }
  }
  free(x);
  free(v);
  free(AT);
}
```