user: 请显示与下面列出的汇编代码相匹配的C语言实现：

```asm
<paw_triang_matrix_inverse>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x40,%rsp
  mov    %rdi,-0x28(%rbp)
  mov    %esi,-0x2c(%rbp)
  mov    %rdx,-0x38(%rbp)
  mov    %rcx,-0x40(%rbp)
  mov    -0x28(%rbp),%rax
  lea    D46(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L221
  movl   $0x0,-0x10(%rbp)
  jmp    L206
L38:
  movl   $0x0,-0x14(%rbp)
  jmp    L195
L5:
  mov    -0x10(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x38(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x14(%rbp),%eax
  cltq
  shl    $0x3,%rax
  add    %rax,%rdx
  mov    -0x14(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rcx
  mov    -0x40(%rbp),%rax
  add    %rcx,%rax
  mov    (%rax),%rcx
  mov    -0x10(%rbp),%eax
  cltq
  shl    $0x3,%rax
  add    %rcx,%rax
  movsd  (%rdx),%xmm0
  movsd  %xmm0,(%rax)
  addl   $0x1,-0x14(%rbp)
L195:
  mov    -0x2c(%rbp),%eax
  cmp    -0x14(%rbp),%eax
  jg     L5
  addl   $0x1,-0x10(%rbp)
L206:
  mov    -0x2c(%rbp),%eax
  cmp    -0x10(%rbp),%eax
  jg     L38
  jmp    L118
L221:
  mov    -0x28(%rbp),%rax
  lea    D6(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L92
  movl   $0x0,-0x10(%rbp)
  jmp    L55
L207:
  movl   $0x0,-0x14(%rbp)
  jmp    L162
L64:
  mov    -0x14(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x38(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x10(%rbp),%eax
  cltq
  shl    $0x3,%rax
  add    %rax,%rdx
  mov    -0x14(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rcx
  mov    -0x40(%rbp),%rax
  add    %rcx,%rax
  mov    (%rax),%rcx
  mov    -0x10(%rbp),%eax
  cltq
  shl    $0x3,%rax
  add    %rcx,%rax
  movsd  (%rdx),%xmm0
  movsd  %xmm0,(%rax)
  addl   $0x1,-0x14(%rbp)
L162:
  mov    -0x2c(%rbp),%eax
  cmp    -0x14(%rbp),%eax
  jg     L64
  addl   $0x1,-0x10(%rbp)
L55:
  mov    -0x2c(%rbp),%eax
  cmp    -0x10(%rbp),%eax
  jg     L207
  jmp    L118
L92:
  lea    D26(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
  mov    $0x1,%edi
  call   <exit@plt>
L118:
  movl   $0x0,-0x14(%rbp)
  jmp    L214
L178:
  mov    -0x14(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x40(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x14(%rbp),%eax
  cltq
  shl    $0x3,%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm1
  mov    -0x14(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x40(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x14(%rbp),%eax
  cltq
  shl    $0x3,%rax
  add    %rdx,%rax
  movsd  D43(%rip),%xmm0
  divsd  %xmm1,%xmm0
  movsd  %xmm0,(%rax)
  mov    -0x14(%rbp),%eax
  add    $0x1,%eax
  mov    %eax,-0x10(%rbp)
  jmp    L225
L229:
  pxor   %xmm0,%xmm0
  movsd  %xmm0,-0x8(%rbp)
  mov    -0x14(%rbp),%eax
  mov    %eax,-0xc(%rbp)
  jmp    L29
L191:
  mov    -0x10(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x40(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0xc(%rbp),%eax
  cltq
  shl    $0x3,%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm1
  mov    -0xc(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x40(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x14(%rbp),%eax
  cltq
  shl    $0x3,%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  mulsd  %xmm0,%xmm1
  movsd  -0x8(%rbp),%xmm0
  subsd  %xmm1,%xmm0
  movsd  %xmm0,-0x8(%rbp)
  addl   $0x1,-0xc(%rbp)
L29:
  mov    -0x10(%rbp),%eax
  cmp    -0xc(%rbp),%eax
  jg     L191
  mov    -0x10(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x40(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x10(%rbp),%eax
  cltq
  shl    $0x3,%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm1
  mov    -0x10(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x40(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x14(%rbp),%eax
  cltq
  shl    $0x3,%rax
  add    %rdx,%rax
  movsd  -0x8(%rbp),%xmm0
  divsd  %xmm1,%xmm0
  movsd  %xmm0,(%rax)
  addl   $0x1,-0x10(%rbp)
L225:
  mov    -0x2c(%rbp),%eax
  cmp    -0x10(%rbp),%eax
  jg     L229
  addl   $0x1,-0x14(%rbp)
L214:
  mov    -0x2c(%rbp),%eax
  cmp    -0x14(%rbp),%eax
  jg     L178
  mov    -0x28(%rbp),%rax
  lea    D46(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L63
  movl   $0x0,-0x14(%rbp)
  jmp    L137
L174:
  mov    -0x14(%rbp),%eax
  add    $0x1,%eax
  mov    %eax,-0x10(%rbp)
  jmp    L144
L218:
  mov    -0x10(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x40(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x14(%rbp),%eax
  cltq
  shl    $0x3,%rax
  add    %rax,%rdx
  mov    -0x14(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rcx
  mov    -0x40(%rbp),%rax
  add    %rcx,%rax
  mov    (%rax),%rcx
  mov    -0x10(%rbp),%eax
  cltq
  shl    $0x3,%rax
  add    %rcx,%rax
  movsd  (%rdx),%xmm0
  movsd  %xmm0,(%rax)
  mov    -0x10(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x40(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x14(%rbp),%eax
  cltq
  shl    $0x3,%rax
  add    %rdx,%rax
  pxor   %xmm0,%xmm0
  movsd  %xmm0,(%rax)
  addl   $0x1,-0x10(%rbp)
L144:
  mov    -0x2c(%rbp),%eax
  cmp    -0x10(%rbp),%eax
  jg     L218
  addl   $0x1,-0x14(%rbp)
L137:
  mov    -0x2c(%rbp),%eax
  cmp    -0x14(%rbp),%eax
  jg     L174
L63:
  nop
  leave
  ret
```

tool_calls: name: disassemble_data
arguments: label: D46
datatype: string
name: disassemble_data
arguments: label: D6
datatype: string
name: disassemble_data
arguments: label: D26
datatype: string
name: disassemble_data
arguments: label: D43
datatype: f64

tool: D46: u

tool: D6: l

tool: D26: unknown matrix type in triang_matrix_inverse


tool: D43: 1

assistant: ```c
void paw_triang_matrix_inverse(char *matrix_type, int N, double **a, double **a_inv) {
  int i;
  int j;
  int k;
  double sum;
  if (strcmp(matrix_type, "u") == 0) {
    for (j = 0; j <= N - 1; j++) {
      for (i = 0; i <= N - 1; i++) {
        a_inv[i][j] = a[j][i];
      }
    }
  } else if (strcmp(matrix_type, "l") == 0) {
    for (j = 0; j <= N - 1; j++) {
      for (i = 0; i <= N - 1; i++) {
        a_inv[i][j] = a[i][j];
      }
    }
  } else {
    printf("unknown matrix type in triang_matrix_inverse\n");
    exit(1);
  }
  for (i = 0; i <= N - 1; i++) {
    a_inv[i][i] = 1.0 / a_inv[i][i];
    for (j = i + 1; j <= N - 1; j++) {
      sum = 0.0;
      for (k = i; k <= j - 1; k++) {
        sum = sum - a_inv[j][k] * a_inv[k][i];
      }
      a_inv[j][i] = sum / a_inv[j][j];
    }
  }
  if (strcmp(matrix_type, "u") == 0) {
    for (i = 0; i <= N - 1; i++) {
      for (j = i + 1; j <= N - 1; j++) {
        a_inv[i][j] = a_inv[j][i];
        a_inv[j][i] = 0.0;
      }
    }
  }
}
```