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

```asm
<write_inner_products>:
  endbr64
  push   %rbp
  movslq %esi,%rax
  lea    0xf(,%rax,4),%rax
  mov    %rsp,%rbp
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  mov    %edx,%r12d
  push   %rbx
  sub    $0x58,%rsp
  mov    %edi,-0x48(%rbp)
  mov    %esi,-0x44(%rbp)
  mov    %rsp,%rcx
  mov    %fs:0x28,%rdx
  mov    %rdx,-0x38(%rbp)
  xor    %edx,%edx
  mov    %rax,%rdx
  and    $0xfffffffffffff000,%rax
  sub    %rax,%rcx
  and    $0xfffffffffffffff0,%rdx
  cmp    %rcx,%rsp
  je     L53
L96:
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  cmp    %rcx,%rsp
  jne    L96
L53:
  mov    %rdx,%rax
  and    $0xfff,%eax
  sub    %rax,%rsp
  test   %rax,%rax
  jne    L149
L12:
  movslq -0x48(%rbp),%rax
  mov    %rsp,%rcx
  mov    %rsp,%r13
  lea    0xf(,%rax,8),%rax
  mov    %rax,%rsi
  mov    %rax,%rdx
  and    $0xfffffffffffff000,%rsi
  and    $0xfffffffffffffff0,%rdx
  sub    %rsi,%rcx
  cmp    %rcx,%rsp
  je     L46
L109:
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  cmp    %rcx,%rsp
  jne    L109
L46:
  and    $0xfff,%edx
  sub    %rdx,%rsp
  test   %rdx,%rdx
  jne    L133
L126:
  mov    %rax,%rdx
  mov    %rsp,%rcx
  and    $0xfffffffffffff000,%rax
  mov    %rsp,-0x78(%rbp)
  sub    %rax,%rcx
  and    $0xfffffffffffffff0,%rdx
  cmp    %rcx,%rsp
  je     L30
L60:
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  cmp    %rcx,%rsp
  jne    L60
L30:
  mov    %rdx,%rax
  and    $0xfff,%eax
  sub    %rax,%rsp
  test   %rax,%rax
  je     L18
  orq    $0x0,-0x8(%rsp,%rax,1)
L18:
  mov    -0x78(%rbp),%rdx
  mov    -0x48(%rbp),%edi
  mov    %r12d,%esi
  mov    %rsp,%r15
  call   <celcon_get_inner_normal@plt>
  mov    %eax,-0x6c(%rbp)
  cmp    $0x1,%eax
  je     L127
  mov    %r12d,%esi
  lea    D38(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  mov    -0x48(%rbp),%esi
  test   %esi,%esi
  jle    L232
  mov    -0x78(%rbp),%rcx
  mov    -0x48(%rbp),%eax
  lea    D12(%rip),%rbx
  mov    %rcx,%r14
  lea    (%rcx,%rax,8),%r12
  nopl   (%rax)
L87:
  movsd  (%r14),%xmm0
  mov    %rbx,%rdi
  mov    $0x1,%eax
  add    $0x8,%r14
  call   <printf@plt>
  cmp    %r12,%r14
  jne    L87
L232:
  lea    D52(%rip),%rdi
  call   <puts@plt>
  lea    -0x44(%rbp),%rdi
  mov    %r13,%rsi
  call   <celcon_length_of_supports@plt>
  mov    -0x44(%rbp),%ecx
  mov    %eax,-0x6c(%rbp)
  test   %ecx,%ecx
  jle    L215
  mov    -0x48(%rbp),%eax
  mov    %r13,-0x68(%rbp)
  lea    D11(%rip),%rbx
  movl   $0x0,-0x58(%rbp)
  lea    -0x1(%rax),%ecx
  sub    $0x2,%eax
  mov    %ecx,-0x70(%rbp)
  lea    0x8(%r15,%rax,8),%r12
  nopl   0x0(%rax)
L254:
  mov    -0x58(%rbp),%r14d
  lea    D3(%rip),%rdi
  xor    %eax,%eax
  mov    %r14d,%esi
  call   <printf@plt>
  mov    %r14d,%eax
  mov    %r14d,-0x7c(%rbp)
  add    $0x1,%eax
  mov    %eax,-0x58(%rbp)
  mov    -0x68(%rbp),%rax
  mov    (%rax),%edx
  test   %edx,%edx
  jle    L236
  xor    %r13d,%r13d
  nopl   0x0(%rax,%rax,1)
L179:
  lea    0x1(%r13),%eax
  mov    -0x58(%rbp),%esi
  mov    -0x48(%rbp),%edi
  mov    %r15,%rcx
  mov    %eax,%edx
  mov    %eax,-0x54(%rbp)
  mov    %r15,%r14
  call   <celcon_get_lifted_point@plt>
  mov    %eax,-0x6c(%rbp)
  mov    -0x70(%rbp),%eax
  test   %eax,%eax
  jle    L83
  nopl   0x0(%rax)
L189:
  cvttsd2si (%r14),%esi
  mov    %rbx,%rdi
  xor    %eax,%eax
  add    $0x8,%r14
  call   <printf@plt>
  cmp    %r12,%r14
  jne    L189
L83:
  mov    -0x78(%rbp),%rsi
  mov    -0x48(%rbp),%edi
  mov    %r15,%rdx
  call   <inner_product@plt>
  lea    D32(%rip),%rdi
  mov    $0x1,%eax
  movsd  %xmm0,-0x50(%rbp)
  call   <printf@plt>
  test   %r13d,%r13d
  movsd  -0x50(%rbp),%xmm0
  jne    L48
  movsd  %xmm0,-0x60(%rbp)
  mov    $0x1,%r13d
L27:
  mov    -0x68(%rbp),%rax
  cmp    (%rax),%r13d
  jl     L179
L236:
  movsd  -0x60(%rbp),%xmm0
  mov    -0x7c(%rbp),%esi
  mov    $0x1,%eax
  lea    D70(%rip),%rdi
  call   <printf@plt>
  addq   $0x4,-0x68(%rbp)
  mov    -0x58(%rbp),%eax
  cmp    %eax,-0x44(%rbp)
  jg     L254
L215:
  mov    -0x38(%rbp),%rax
  sub    %fs:0x28,%rax
  jne    L163
  mov    -0x6c(%rbp),%eax
  lea    -0x28(%rbp),%rsp
  pop    %rbx
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  pop    %rbp
  ret
L149:
  orq    $0x0,-0x8(%rsp,%rax,1)
  jmp    L12
L133:
  orq    $0x0,-0x8(%rsp,%rdx,1)
  jmp    L126
  nopl   0x0(%rax)
L48:
  movsd  -0x60(%rbp),%xmm1
  comisd %xmm0,%xmm1
  jbe    L16
  mov    -0x54(%rbp),%r13d
  movsd  %xmm0,-0x60(%rbp)
  jmp    L27
  nopl   0x0(%rax)
L16:
  mov    -0x54(%rbp),%r13d
  jmp    L27
L127:
  lea    D72(%rip),%rdi
  call   <puts@plt>
  jmp    L215
L163:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: unpack_data
arguments: data_label: D38
datatype: string
name: unpack_data
arguments: data_label: D12
datatype: string
name: unpack_data
arguments: data_label: D52
datatype: string
name: unpack_data
arguments: data_label: D11
datatype: string
name: unpack_data
arguments: data_label: D3
datatype: string
name: unpack_data
arguments: data_label: D32
datatype: string
name: unpack_data
arguments: data_label: D70
datatype: string
name: unpack_data
arguments: data_label: D72
datatype: string

tool: D38: inner normal for cell %d :


tool: D12: %.15le


tool: D52: 
computing the inner products with all points ...

tool: D11:  %d

tool: D3: support %d :


tool: D32:  : %.15le


tool: D70: -> support %d has minimal product : %.15le


tool: D72: an error happened...

assistant: ```c
int write_inner_products(int n, int r, int k) {
  int fail, i, j, kk;
  int nl[r];
  double normal[n], point[n], prod, minprod;
  fail = celcon_get_inner_normal(n, k, normal);
  if (fail == 1)
    printf("an error happened...\n");
  else {
    printf("inner normal for cell %d :\n", k);
    for (i = 0; i < n; i++)
      printf("%.15le\n", normal[i]);
    printf("\ncomputing the inner products with all points ...\n");
    fail = celcon_length_of_supports(&r, nl);
    for (i = 0; i < r; i++) {
      printf("support %d :\n", i);
      for (j = 0; j < nl[i]; j++) {
        fail = celcon_get_lifted_point(n, i + 1, j + 1, point);
        for (kk = 0; kk < n - 1; kk++)
          printf(" %d", (int)point[kk]);
        prod = inner_product(n, normal, point);
        printf(" : %.15le\n", prod);
        if (j == 0)
          minprod = prod;
        else if (prod < minprod)
          minprod = prod;
      }
      printf("-> support %d has minimal product : %.15le\n", i, minprod);
    }
  }
  return fail;
}
```