user: 请将以下的汇编代码转换成C语言代码：

```asm
<bidiag_orth>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0xc8,%rsp
  mov    %rdi,0x40(%rsp)
  mov    %esi,%r14d
  mov    %edx,%r13d
  mov    %rcx,0x78(%rsp)
  mov    %r8,%rbp
  cmp    %edx,%esi
  jl     L389
L187:
  movslq %r14d,%r12
  lea    0x0(,%r14,8),%ebx
  mov    %ebx,%edi
  call   <malloc@plt>
  mov    %rax,0x60(%rsp)
  mov    %ebx,%edi
  call   <malloc@plt>
  mov    %rax,0x28(%rsp)
  mov    %r14d,%ebx
  imul   %r14d,%ebx
  shl    $0x3,%ebx
  mov    %ebx,%edi
  call   <malloc@plt>
  mov    %rax,%r15
  mov    %rax,0xb8(%rsp)
  mov    %ebx,%edi
  call   <malloc@plt>
  mov    %rax,0x30(%rsp)
  mov    %r14d,%esi
  mov    0x78(%rsp),%rdi
  call   <eye@plt>
  mov    %r13d,%esi
  mov    %rbp,%rdi
  call   <eye@plt>
  test   %r13d,%r13d
  jle    L276
  lea    -0x1(%r13),%ebx
  mov    %ebx,0x38(%rsp)
  lea    -0x1(%r14),%ebx
  mov    %ebx,0x70(%rsp)
  movslq %r13d,%rbx
  mov    %rbx,0xb0(%rsp)
  shl    $0x3,%rbx
  mov    %rbx,0x8(%rsp)
  lea    0x0(,%r12,8),%rbx
  mov    %rbx,0x18(%rsp)
  movl   $0x0,0x74(%rsp)
  movq   $0x0,0x50(%rsp)
  movl   $0x0,0x4c(%rsp)
  movq   $0x0,0x20(%rsp)
  mov    0x60(%rsp),%rax
  add    $0x8,%rax
  mov    %rax,0x98(%rsp)
  mov    0x40(%rsp),%rbx
  lea    0x8(%rbx),%rax
  mov    %rax,0xa8(%rsp)
  mov    %r15,%rax
  sub    %rbx,%rax
  mov    %rax,0xa0(%rsp)
  jmp    L267
L389:
  lea    D7(%rip),%rdi
  call   <printf@plt>
  mov    $0x1,%edi
  call   <exit@plt>
  jmp    L187
L229:
  mov    %rax,%rdi
L261:
  cmp    %r12d,%r13d
  jle    L75
  lea    (%r8,%rcx,1),%rax
  lea    (%r15,%rdi,8),%rdx
L391:
  movsd  (%rax),%xmm0
  movsd  %xmm0,(%rdx)
  add    $0x8,%rax
  add    %rsi,%rdx
  cmp    %rcx,%rax
  jne    L391
L75:
  lea    0x1(%rdi),%rax
  add    0x8(%rsp),%rcx
  cmp    %rbp,%rdi
  jne    L229
  mov    %r13d,%ebp
  sub    0x3c(%rsp),%ebp
  mov    $0x1,%r9d
  mov    0x14(%rsp),%r8d
  mov    %ebp,%ecx
  mov    0x30(%rsp),%rdx
  mov    0x28(%rsp),%rsi
  mov    %r15,%rdi
  call   <mmult@plt>
  movsd  0x58(%rsp),%xmm0
  mov    $0x1,%edx
  mov    %ebp,%esi
  mov    0x30(%rsp),%rdi
  call   <scale@plt>
  mov    %ebp,%r9d
  mov    $0x1,%r8d
  mov    0x14(%rsp),%ecx
  mov    %r15,%rdx
  mov    0x30(%rsp),%rsi
  mov    0x28(%rsp),%rdi
  call   <mmult@plt>
  mov    0x68(%rsp),%rcx
  shl    $0x3,%rcx
  mov    0x48(%rsp),%esi
  mov    $0x0,%edi
  mov    0x40(%rsp),%r9
  mov    0x50(%rsp),%rax
  add    %rax,%r9
  mov    0xa0(%rsp),%r8
  sub    %rax,%r8
  mov    0x8(%rsp),%r10
L298:
  cmp    %r12d,%r13d
  jle    L179
  lea    (%r9,%rcx,1),%rax
  mov    %r8,%rdx
  sub    %rcx,%rdx
  movslq %edi,%r11
  lea    (%rdx,%r11,8),%rdx
L18:
  movsd  (%rax),%xmm0
  subsd  (%rax,%rdx,1),%xmm0
  movsd  %xmm0,(%rax)
  add    $0x8,%rax
  cmp    %rbx,%rax
  jne    L18
L179:
  add    $0x1,%esi
  add    %ebp,%edi
  add    %r10,%rcx
  add    %r10,%rbx
  cmp    %esi,%r14d
  jne    L298
L125:
  mov    0x3c(%rsp),%eax
  add    $0x1,%eax
  mov    %eax,0x68(%rsp)
  cmp    %eax,%r14d
  jle    L68
  mov    0x28(%rsp),%rbx
  lea    0x8(%rbx),%rax
  mov    0x4c(%rsp),%edi
  lea    (%rdi,%r13,1),%edx
  movslq %edx,%rdx
  add    0x20(%rsp),%rdx
  mov    0x40(%rsp),%rdi
  lea    (%rdi,%rdx,8),%rdx
  mov    0x70(%rsp),%edi
  lea    -0x1(%rdi),%ecx
  lea    0x10(%rbx,%rcx,8),%rcx
L345:
  movsd  (%rax),%xmm0
  movsd  %xmm0,(%rdx)
  add    $0x8,%rax
  add    0x8(%rsp),%rdx
  cmp    %rcx,%rax
  jne    L345
L68:
  cmp    %r12d,%r14d
  jle    L285
  movslq 0x14(%rsp),%rax
  mov    %rax,0x80(%rsp)
  lea    0x0(,%rax,8),%rdi
  neg    %rax
  mov    0x18(%rsp),%rbx
  lea    (%rbx,%rax,8),%r8
  movslq 0x74(%rsp),%rax
  mov    %rax,0x88(%rsp)
  add    0x20(%rsp),%rax
  mov    0x78(%rsp),%rbx
  lea    (%rbx,%rax,8),%rdx
  sub    %r15,%rdx
  mov    0x70(%rsp),%eax
  mov    %rax,0x90(%rsp)
  lea    0x8(%r15,%rax,8),%rcx
  mov    %r15,%rsi
  mov    0x48(%rsp),%ebp
  jmp    L91
L325:
  mov    %ebx,%ebp
L91:
  mov    %rsi,%rax
L167:
  movsd  (%rdx,%rax,1),%xmm0
  movsd  %xmm0,(%rax)
  add    $0x8,%rax
  cmp    %rcx,%rax
  jne    L167
  lea    0x1(%rbp),%ebx
  add    %rdi,%rsi
  add    %r8,%rdx
  add    %rdi,%rcx
  cmp    %ebx,%r14d
  jne    L325
  mov    $0x1,%r9d
  mov    0x14(%rsp),%r8d
  mov    %r8d,%ecx
  mov    0x30(%rsp),%rdx
  mov    0x28(%rsp),%rsi
  mov    %r15,%rdi
  call   <mmult@plt>
  movsd  0x58(%rsp),%xmm0
  mov    $0x1,%edx
  mov    0x14(%rsp),%esi
  mov    0x30(%rsp),%rdi
  call   <scale@plt>
  mov    0x14(%rsp),%ecx
  mov    %ecx,%r9d
  mov    $0x1,%r8d
  mov    %r15,%rdx
  mov    0x28(%rsp),%rsi
  mov    0x30(%rsp),%rdi
  call   <mmult@plt>
  movslq %ebx,%rbx
  mov    0x80(%rsp),%rax
  sub    %rbx,%rax
  lea    0x0(,%rax,8),%r8
  mov    %r15,%rcx
  mov    0x78(%rsp),%rdi
  sub    %rdi,%rcx
  sub    0x50(%rsp),%rcx
  mov    0x88(%rsp),%rbx
  lea    0x0(,%rbx,8),%rax
  sub    %rax,%rcx
  mov    %rbx,%rax
  mov    0x90(%rsp),%rbx
  add    %rbx,%rax
  add    0x20(%rsp),%rax
  lea    0x8(%rdi,%rax,8),%rdx
  mov    0x48(%rsp),%esi
  not    %rbx
  mov    %rbx,%rdi
  shl    $0x3,%rdi
  jmp    L406
L49:
  mov    %eax,%esi
L406:
  lea    (%rdi,%rdx,1),%rax
L175:
  movsd  (%rax),%xmm0
  subsd  (%rax,%rcx,1),%xmm0
  movsd  %xmm0,(%rax)
  add    $0x8,%rax
  cmp    %rdx,%rax
  jne    L175
  lea    0x1(%rsi),%eax
  add    %r8,%rcx
  add    0x18(%rsp),%rdx
  cmp    %esi,%ebp
  jne    L49
L201:
  lea    -0x2(%r13),%eax
  cmp    %r12d,%eax
  jg     L21
L159:
  addq   $0x1,0x20(%rsp)
  subl   $0x1,0x38(%rsp)
  mov    0x38(%rsp),%eax
  add    %r13d,0x4c(%rsp)
  subl   $0x1,0x70(%rsp)
  addq   $0x8,0x50(%rsp)
  add    %r14d,0x74(%rsp)
  cmp    $0xffffffff,%eax
  je     L276
L267:
  mov    0x20(%rsp),%rax
  mov    %eax,0x3c(%rsp)
  mov    %eax,0x48(%rsp)
  mov    %eax,%r12d
  cmp    %eax,%r14d
  jle    L1
  movslq 0x4c(%rsp),%rax
  mov    %rax,0x68(%rsp)
  add    0x20(%rsp),%rax
  mov    0x40(%rsp),%rbx
  lea    (%rbx,%rax,8),%rdx
  mov    0x60(%rsp),%rax
  mov    0x70(%rsp),%ebp
  mov    0x98(%rsp),%rbx
  lea    (%rbx,%rbp,8),%rcx
L22:
  movsd  (%rdx),%xmm0
  movsd  %xmm0,(%rax)
  add    0x8(%rsp),%rdx
  add    $0x8,%rax
  cmp    %rcx,%rax
  jne    L22
  mov    %r14d,%eax
  sub    0x3c(%rsp),%eax
  mov    0x28(%rsp),%rdx
  mov    %eax,0x14(%rsp)
  mov    %eax,%esi
  mov    0x60(%rsp),%rdi
  call   <house@plt>
  movsd  %xmm0,0x58(%rsp)
  mov    0x38(%rsp),%r8d
  mov    0x68(%rsp),%rbx
  lea    (%r8,%rbx,1),%rax
  add    0x20(%rsp),%rax
  mov    0xa8(%rsp),%rbx
  lea    (%rbx,%rax,8),%rbx
  movslq 0x14(%rsp),%rsi
  shl    $0x3,%rsi
  mov    %rbx,%rcx
  mov    $0x0,%edi
  not    %r8
  shl    $0x3,%r8
  jmp    L261
L21:
  cmp    0x68(%rsp),%r13d
  jle    L301
  mov    0x60(%rsp),%rbx
  mov    %rbx,%rax
  lea    -0x2(%r13),%edx
  sub    0x3c(%rsp),%edx
  mov    0x98(%rsp),%rdi
  lea    (%rdi,%rdx,8),%rcx
  movslq 0x4c(%rsp),%rdx
  add    0x20(%rsp),%rdx
  mov    0x40(%rsp),%rdi
  lea    (%rdi,%rdx,8),%rdx
  sub    %rbx,%rdx
L95:
  movsd  0x8(%rdx,%rax,1),%xmm0
  movsd  %xmm0,(%rax)
  add    $0x8,%rax
  cmp    %rcx,%rax
  jne    L95
L301:
  mov    0x38(%rsp),%ebx
  mov    %ebx,0x58(%rsp)
  mov    0x28(%rsp),%rdx
  mov    %ebx,%esi
  mov    0x60(%rsp),%rdi
  call   <house@plt>
  movsd  %xmm0,0x80(%rsp)
  cmp    %r12d,%r14d
  jle    L57
  movslq %ebx,%rbp
  lea    0x0(,%rbp,8),%rdi
  mov    %rbp,%rax
  neg    %rax
  mov    0x8(%rsp),%rbx
  lea    (%rbx,%rax,8),%r8
  movslq 0x4c(%rsp),%r12
  mov    0x20(%rsp),%rax
  add    %r12,%rax
  mov    0x40(%rsp),%rbx
  lea    (%rbx,%rax,8),%rdx
  sub    %r15,%rdx
  lea    -0x2(%r13),%eax
  mov    %eax,%ebx
  sub    0x3c(%rsp),%ebx
  mov    %rbx,0x88(%rsp)
  lea    0x8(%r15,%rbx,8),%rcx
  mov    %r15,%rsi
  mov    0x48(%rsp),%ebx
  mov    0x68(%rsp),%r9d
  jmp    L13
L220:
  mov    %eax,%ebx
L13:
  cmp    %r9d,%r13d
  jle    L38
  mov    %rsi,%rax
L59:
  movsd  0x8(%rdx,%rax,1),%xmm0
  movsd  %xmm0,(%rax)
  add    $0x8,%rax
  cmp    %rcx,%rax
  jne    L59
L38:
  lea    0x1(%rbx),%eax
  add    %rdi,%rsi
  add    %r8,%rdx
  add    %rdi,%rcx
  cmp    %eax,%r14d
  jne    L220
  mov    $0x1,%r9d
  mov    0x58(%rsp),%r8d
  mov    0x14(%rsp),%ecx
  mov    0x30(%rsp),%rdx
  mov    0x28(%rsp),%rsi
  mov    %r15,%rdi
  call   <mmult@plt>
  movsd  0x80(%rsp),%xmm0
  mov    $0x1,%edx
  mov    0x14(%rsp),%esi
  mov    0x30(%rsp),%rdi
  call   <scale@plt>
  mov    0x58(%rsp),%r9d
  mov    $0x1,%r8d
  mov    0x14(%rsp),%ecx
  mov    %r15,%rdx
  mov    0x28(%rsp),%rsi
  mov    0x30(%rsp),%rdi
  call   <mmult@plt>
  sub    0xb0(%rsp),%rbp
  lea    0x0(,%rbp,8),%rsi
  mov    0xa0(%rsp),%rcx
  sub    0x50(%rsp),%rcx
  lea    0x0(,%r12,8),%rax
  sub    %rax,%rcx
  mov    0x20(%rsp),%rax
  add    %r12,%rax
  mov    0x88(%rsp),%rdi
  add    %rdi,%rax
  mov    0x40(%rsp),%rdx
  lea    0x10(%rdx,%rax,8),%rdx
  mov    %rdi,%rax
  not    %rax
  lea    0x0(,%rax,8),%rdi
  mov    0x48(%rsp),%r8d
  mov    0x68(%rsp),%r9d
  jmp    L223
L156:
  mov    %eax,%r8d
L223:
  cmp    %r9d,%r13d
  jle    L256
  lea    (%rdi,%rdx,1),%rax
L374:
  movsd  (%rax),%xmm0
  subsd  -0x8(%rax,%rcx,1),%xmm0
  movsd  %xmm0,(%rax)
  add    $0x8,%rax
  cmp    %rdx,%rax
  jne    L374
L256:
  lea    0x1(%r8),%eax
  add    %rsi,%rcx
  add    0x8(%rsp),%rdx
  cmp    %r8d,%ebx
  jne    L156
L311:
  mov    0x3c(%rsp),%eax
  add    $0x2,%eax
  cmp    %eax,%r13d
  jle    L159
  mov    0x28(%rsp),%rbx
  lea    0x8(%rbx),%rax
  mov    0x38(%rsp),%edi
  lea    -0x2(%rdi),%edx
  lea    0x10(%rbx,%rdx,8),%rcx
  movslq 0x4c(%rsp),%rdx
  add    0x20(%rsp),%rdx
  mov    0x40(%rsp),%rdi
  lea    (%rdi,%rdx,8),%rdx
  sub    %rbx,%rdx
L278:
  movsd  (%rax),%xmm0
  movsd  %xmm0,0x8(%rdx,%rax,1)
  add    $0x8,%rax
  cmp    %rcx,%rax
  jne    L278
  jmp    L159
L276:
  mov    0x60(%rsp),%rdi
  call   <free@plt>
  mov    0x28(%rsp),%rdi
  call   <free@plt>
  mov    0xb8(%rsp),%rdi
  call   <free@plt>
  add    $0xc8,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L57:
  mov    $0x1,%r9d
  mov    0x38(%rsp),%r8d
  mov    0x14(%rsp),%ebp
  mov    %ebp,%ecx
  mov    0x30(%rsp),%rbx
  mov    %rbx,%rdx
  mov    0x28(%rsp),%r12
  mov    %r12,%rsi
  mov    %r15,%rdi
  call   <mmult@plt>
  movsd  0x80(%rsp),%xmm0
  mov    $0x1,%edx
  mov    %ebp,%esi
  mov    %rbx,%rdi
  call   <scale@plt>
  mov    0x38(%rsp),%r9d
  mov    $0x1,%r8d
  mov    %ebp,%ecx
  mov    %r15,%rdx
  mov    %r12,%rsi
  mov    %rbx,%rdi
  call   <mmult@plt>
  jmp    L311
L285:
  mov    $0x1,%r9d
  mov    0x14(%rsp),%ebx
  mov    %ebx,%r8d
  mov    %ebx,%ecx
  mov    0x30(%rsp),%rbp
  mov    %rbp,%rdx
  mov    0x28(%rsp),%rsi
  mov    %r15,%rdi
  call   <mmult@plt>
  movsd  0x58(%rsp),%xmm0
  mov    $0x1,%edx
  mov    %ebx,%esi
  mov    %rbp,%rdi
  call   <scale@plt>
  mov    %ebx,%r9d
  mov    $0x1,%r8d
  mov    %ebx,%ecx
  mov    %r15,%rdx
  mov    0x28(%rsp),%rsi
  mov    %rbp,%rdi
  call   <mmult@plt>
  jmp    L201
L1:
  mov    %r14d,%ebp
  sub    0x20(%rsp),%ebp
  mov    %ebp,0x14(%rsp)
  mov    0x28(%rsp),%rdx
  mov    %ebp,%esi
  mov    0x60(%rsp),%rdi
  call   <house@plt>
  movsd  %xmm0,0x58(%rsp)
  mov    %r13d,%ebx
  sub    0x20(%rsp),%ebx
  mov    $0x1,%r9d
  mov    %ebp,%r8d
  mov    %ebx,%ecx
  mov    0x30(%rsp),%rdx
  mov    0x28(%rsp),%rsi
  mov    %r15,%rdi
  call   <mmult@plt>
  movsd  0x58(%rsp),%xmm0
  mov    $0x1,%edx
  mov    %ebx,%esi
  mov    0x30(%rsp),%rdi
  call   <scale@plt>
  mov    %ebx,%r9d
  mov    $0x1,%r8d
  mov    %ebp,%ecx
  mov    %r15,%rdx
  mov    0x30(%rsp),%rsi
  mov    0x28(%rsp),%rdi
  call   <mmult@plt>
  jmp    L125
```

tool_calls: name: retrieve_data
arguments: data_label: D7
type: string

tool: D7: 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);
}
```