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

```asm
<recorditem>:
  endbr64
  push   %r15
  mov    %rsi,%r15
  push   %r14
  mov    %rdx,%r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  mov    %r9d,%ebx
  sub    $0x68,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x58(%rsp)
  xor    %eax,%eax
  lea    0x10(%rsp),%r13
  lea    0x1c(%rsp),%rbp
  lea    0x28(%rsp),%r12
L4:
  mov    (%rdi,%rax,1),%edx
  imul   %r8d,%edx
  add    (%rcx,%rax,1),%edx
  mov    %edx,0x0(%r13,%rax,1)
  mov    (%r15,%rax,1),%edx
  imul   %r8d,%edx
  add    (%rcx,%rax,1),%edx
  mov    %edx,0x0(%rbp,%rax,1)
  mov    (%r14,%rax,1),%edx
  imul   %r8d,%edx
  add    (%rcx,%rax,1),%edx
  mov    %edx,(%r12,%rax,1)
  add    $0x4,%rax
  cmp    $0xc,%rax
  jne    L4
  mov    0xa0(%rsp),%eax
  test   %eax,%eax
  je     L7
  lea    0x34(%rsp),%r9
  mov    %rdi,%rdx
  mov    %r13,%rsi
  mov    %r13,%rdi
  mov    %r9,%rcx
  mov    %r9,0x8(%rsp)
  call   <m_xformpt@plt>
  lea    0x40(%rsp),%r8
  mov    %r15,%rdx
  mov    %rbp,%rsi
  mov    %r8,%rcx
  mov    %rbp,%rdi
  lea    0x4c(%rsp),%r15
  mov    %r8,(%rsp)
  call   <m_xformpt@plt>
  mov    %r15,%rcx
  mov    %r14,%rdx
  mov    %r12,%rsi
  mov    %r12,%rdi
  call   <m_xformpt@plt>
  mov    %ebx,%edi
  call   <glBegin@plt>
  mov    0x8(%rsp),%rdi
  call   <glNormal3dv@plt>
  mov    %r13,%rdi
  call   <glVertex3dv@plt>
  mov    (%rsp),%rdi
  call   <glNormal3dv@plt>
  mov    %rbp,%rdi
  call   <glVertex3dv@plt>
  mov    %r15,%rdi
  call   <glNormal3dv@plt>
  mov    %r12,%rdi
  call   <glVertex3dv@plt>
  xor    %eax,%eax
  call   <glEnd@plt>
L23:
  mov    0x58(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L30
  add    $0x68,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nop
L7:
  lea    0x40(%rsp),%r15
  lea    0x4c(%rsp),%r14
  mov    %rbp,%rsi
  mov    %r13,%rdi
  mov    %r15,%rdx
  call   <diff3@plt>
  mov    %r14,%rdx
  mov    %r12,%rsi
  mov    %rbp,%rdi
  call   <diff3@plt>
  mov    %r14,%rdx
  mov    %r14,%rsi
  mov    %r15,%rdi
  call   <crossprod@plt>
  lea    0x34(%rsp),%r15
  mov    %r14,%rdi
  call   <normalize@plt>
  mov    %r15,%rcx
  mov    %r14,%rdx
  mov    %r13,%rsi
  mov    %r13,%rdi
  call   <m_xformpt@plt>
  mov    %rbp,%rsi
  mov    %rbp,%rdi
  call   <m_xformptonly@plt>
  mov    %r12,%rsi
  mov    %r12,%rdi
  call   <m_xformptonly@plt>
  mov    %ebx,%edi
  call   <glBegin@plt>
  mov    %r15,%rdi
  call   <glNormal3dv@plt>
  mov    %r13,%rdi
  call   <glVertex3dv@plt>
  mov    %rbp,%rdi
  call   <glVertex3dv@plt>
  mov    %r12,%rdi
  call   <glVertex3dv@plt>
  xor    %eax,%eax
  call   <glEnd@plt>
  jmp    L23
L30:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
void recorditem(GLdouble *n1, GLdouble *n2, GLdouble *n3, GLdouble center[3], GLdouble radius, GLenum shadeType, int avnormal) {
  GLdouble p1[3], p2[3], p3[3], q0[3], q1[3], n11[3], n22[3], n33[3];
  int i;
  for (i = 0; i < 3; i++) {
    p1[i] = n1[i] * radius + center[i];
    p2[i] = n2[i] * radius + center[i];
    p3[i] = n3[i] * radius + center[i];
  }
  if (avnormal == 0) {
    diff3(p1, p2, q0);
    diff3(p2, p3, q1);
    crossprod(q0, q1, q1);
    normalize(q1);
    m_xformpt(p1, p1, q1, n11);
    m_xformptonly(p2, p2);
    m_xformptonly(p3, p3);
    glBegin(shadeType);
    glNormal3dv(n11);
    glVertex3dv(p1);
    glVertex3dv(p2);
    glVertex3dv(p3);
    glEnd();
    return;
  }
  m_xformpt(p1, p1, n1, n11);
  m_xformpt(p2, p2, n2, n22);
  m_xformpt(p3, p3, n3, n33);
  glBegin(shadeType);
  glNormal3dv(n11);
  glVertex3dv(p1);
  glNormal3dv(n22);
  glVertex3dv(p2);
  glNormal3dv(n33);
  glVertex3dv(p3);
  glEnd();
}
```