user: 请将这段汇编代码片段转换成等效的C代码:

```asm
<invrecr_UU>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbx
  sub    $0x58,%rsp
  mov    %rdi,-0x60(%rbp)
  mov    %edx,-0x6c(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x38(%rbp)
  xor    %eax,%eax
  test   %ecx,%ecx
  js     L188
  movslq %ecx,%rax
  mov    %rsi,%r13
  mov    %rsp,%rsi
  mov    %r8d,%r14d
  lea    0xf(,%rax,4),%rdx
  mov    %rdx,%rax
  and    $0xfffffffffffff000,%rdx
  sub    %rdx,%rsi
  and    $0xfffffffffffffff0,%rax
  cmp    %rsi,%rsp
  je     L168
L201:
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  cmp    %rsi,%rsp
  jne    L201
L168:
  and    $0xfff,%eax
  sub    %rax,%rsp
  test   %rax,%rax
  jne    L96
L18:
  mov    %rsp,%r15
  test   %ecx,%ecx
  je     L2
  lea    -0x1(%rcx),%eax
  cmp    $0x2,%eax
  jbe    L128
  mov    %ecx,%edx
  movdqa D12(%rip),%xmm3
  mov    %r15,%rax
  movdqa D20(%rip),%xmm5
  shr    $0x2,%edx
  movdqa D7(%rip),%xmm4
  shl    $0x4,%rdx
  add    %r15,%rdx
L172:
  movdqa %xmm3,%xmm2
  add    $0x10,%rax
  paddd  %xmm5,%xmm3
  movdqa %xmm2,%xmm0
  paddd  %xmm4,%xmm0
  movdqa %xmm0,%xmm1
  psrlq  $0x20,%xmm0
  pmuludq %xmm2,%xmm1
  psrlq  $0x20,%xmm2
  pmuludq %xmm2,%xmm0
  pshufd $0x8,%xmm1,%xmm1
  pshufd $0x8,%xmm0,%xmm0
  punpckldq %xmm0,%xmm1
  psrad  $0x1,%xmm1
  movups %xmm1,-0x10(%rax)
  cmp    %rdx,%rax
  jne    L172
  mov    %ecx,%eax
  and    $0xfffffffc,%eax
  test   $0x3,%cl
  je     L175
L52:
  lea    0x1(%rax),%esi
  movslq %eax,%rdx
  mov    %esi,%edi
  lea    (%r15,%rdx,4),%rdx
  imul   %eax,%edi
  mov    %edi,%r8d
  sar    %r8d
  mov    %r8d,(%rdx)
  cmp    %ecx,%esi
  jge    L175
  lea    (%rdi,%rsi,2),%esi
  add    $0x2,%eax
  mov    %esi,%edi
  sar    %edi
  mov    %edi,0x4(%rdx)
  cmp    %eax,%ecx
  jle    L175
  lea    (%rsi,%rax,2),%eax
  sar    %eax
  mov    %eax,0x8(%rdx)
L175:
  mov    -0x6c(%rbp),%eax
  movl   $0x0,-0x50(%rbp)
  xor    %r12d,%r12d
  pxor   %xmm3,%xmm3
  movl   $0x0,-0x4c(%rbp)
  movsd  D51(%rip),%xmm4
  add    $0x1,%eax
  movq   D32(%rip),%xmm2
  mov    %eax,-0x70(%rbp)
  mov    %ecx,%eax
  mov    %rax,-0x78(%rbp)
  nopw   0x0(%rax,%rax,1)
L7:
  mov    (%r15,%r12,4),%ecx
  movslq -0x4c(%rbp),%rax
  mov    %r12d,-0x54(%rbp)
  mov    %r12d,%esi
  mov    %ecx,-0x58(%rbp)
  test   %r12,%r12
  je     L160
  mov    -0x60(%rbp),%rdi
  mov    %rax,-0x68(%rbp)
  movslq %ecx,%r10
  lea    -0x1(%r12),%r11d
  shl    $0x3,%r10
  movapd %xmm3,%xmm1
  lea    (%rdi,%rax,8),%rbx
  movslq -0x50(%rbp),%rax
  lea    (%rdi,%r10,1),%r9
  add    %r13,%r10
  lea    (%rdi,%rax,8),%r8
  lea    (%rcx,%r12,1),%eax
  cltq
  lea    (%rdi,%rax,8),%rax
  xor    %edi,%edi
  mov    %rax,-0x48(%rbp)
  mov    %edi,%ecx
  mov    %rdi,%rax
  cmp    $0x48,%r14b
  je     L136
  nopl   0x0(%rax)
L13:
  mov    (%r15,%rax,4),%edx
  add    %ecx,%edx
  movslq %edx,%rdx
  movsd  0x0(%r13,%rdx,8),%xmm0
  mulsd  (%r8,%rax,8),%xmm0
  add    $0x1,%rax
  addsd  %xmm0,%xmm1
  cmp    %eax,%esi
  jg     L13
  xorpd  %xmm2,%xmm1
  lea    0x1(%rdi),%rax
  divsd  (%rbx),%xmm1
  movsd  %xmm1,(%r10,%rdi,8)
  cmp    %rdi,%r11
  je     L223
L64:
  mov    %rax,%rdi
  movapd %xmm3,%xmm1
  mov    %edi,%ecx
  mov    %rdi,%rax
  cmp    $0x48,%r14b
  jne    L13
  nopw   0x0(%rax,%rax,1)
L136:
  mov    (%r15,%rax,4),%edx
  add    %ecx,%edx
  movslq %edx,%rdx
  movsd  0x0(%r13,%rdx,8),%xmm0
  mulsd  (%r9,%rax,8),%xmm0
  add    $0x1,%rax
  addsd  %xmm0,%xmm1
  cmp    %eax,%esi
  jg     L136
  mov    -0x48(%rbp),%rax
  xorpd  %xmm2,%xmm1
  divsd  (%rax),%xmm1
  lea    0x1(%rdi),%rax
  movsd  %xmm1,(%r10,%rdi,8)
  cmp    %rdi,%r11
  jne    L64
L23:
  mov    -0x54(%rbp),%eax
  mov    -0x60(%rbp),%rbx
  movapd %xmm4,%xmm0
  add    -0x58(%rbp),%eax
  cltq
  divsd  (%rbx,%rax,8),%xmm0
  movsd  %xmm0,0x0(%r13,%rax,8)
L41:
  mov    -0x70(%rbp),%ebx
  add    $0x1,%r12
  add    %ebx,-0x4c(%rbp)
  mov    -0x6c(%rbp),%ebx
  add    %ebx,-0x50(%rbp)
  cmp    %r12,-0x78(%rbp)
  jne    L7
L2:
  xor    %eax,%eax
L16:
  mov    -0x38(%rbp),%rdx
  sub    %fs:0x28,%rdx
  jne    L200
  lea    -0x28(%rbp),%rsp
  pop    %rbx
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  pop    %rbp
  ret
L160:
  mov    %rax,-0x68(%rbp)
  cmp    $0x48,%r14b
  je     L23
L223:
  mov    -0x54(%rbp),%eax
  mov    -0x60(%rbp),%rbx
  movapd %xmm4,%xmm0
  mov    -0x68(%rbp),%rdi
  add    -0x58(%rbp),%eax
  cltq
  divsd  (%rbx,%rdi,8),%xmm0
  movsd  %xmm0,0x0(%r13,%rax,8)
  jmp    L41
L96:
  orq    $0x0,-0x8(%rsp,%rax,1)
  jmp    L18
L128:
  xor    %eax,%eax
  jmp    L52
L188:
  lea    D52(%rip),%rdi
  call   <printf@plt>
  mov    $0xffffffff,%eax
  jmp    L16
L200:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: read_data
arguments: data_label: D12
type: f32[4]
name: read_data
arguments: data_label: D20
type: byte[16]
name: read_data
arguments: data_label: D7
type: byte[16]
name: read_data
arguments: data_label: D51
type: f64
name: read_data
arguments: data_label: D32
type: f32[2]
name: read_data
arguments: data_label: D52
type: string

tool: {"D12": [0.0,1.401298464324817e-45,2.802596928649634e-45,4.203895392974451e-45]}

tool: {"D20": [0x04,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x04,0x00,0x00,0x00]}

tool: {"D7": [0x01,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x01,0x00,0x00,0x00]}

tool: D51: 1

tool: {"D32": [0.0,-0.0]}

tool: D52: ndim can't be negative!


assistant: ```c
int invrecr_UU(double *U, double *inv, int lda, int n, char uctl) {
  int col, row, k;
  if (n < 0) {
    printf("ndim can't be negative!\n");
    return -1;
  }
  int iptx[n];
  double sum;
  for (col = 0; col < n; col++) {
    iptx[col] = (col + 1) * col / 2;
  }
  for (col = 0; col < n; col++) {
    for (row = 0; row < col; row++) {
      sum = 0.0;
      for (k = row; k < col; k++) {
        if (uctl == 'H')
          sum += inv[row + iptx[k]] * U[k + iptx[col]];
        else
          sum += inv[row + iptx[k]] * U[k + lda * col];
      }
      if (uctl == 'H')
        inv[row + iptx[col]] = -sum / U[col + iptx[col]];
      else
        inv[row + iptx[col]] = -sum / U[col + lda * col];
    }
    if (uctl == 'H')
      inv[col + iptx[col]] = 1.0 / U[col + iptx[col]];
    else
      inv[col + iptx[col]] = 1.0 / U[col + lda * col];
  }
  return 0;
}
```