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

```asm
<trafontspcmpc>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  mov    %rdi,%r13
  push   %r12
  mov    %rsi,%r12
  push   %rbp
  push   %rbx
  sub    $0x88,%rsp
  mov    0xc8(%rsp),%rax
  mov    0x118(%rsp),%rsi
  mov    %rcx,0x58(%rsp)
  mov    %r8,0x38(%rsp)
  mov    0xc0(%rsp),%r11
  mov    %rax,0x50(%rsp)
  mov    0x130(%rsp),%rax
  mov    %rsi,0x48(%rsp)
  mov    0xe8(%rsp),%rbp
  mov    %rax,0x28(%rsp)
  mov    0x138(%rsp),%rax
  mov    0xf0(%rsp),%r10
  mov    0x120(%rsp),%r15
  mov    %rax,0x30(%rsp)
  mov    (%r8),%eax
  mov    0x178(%rsp),%r14
  mov    0x180(%rsp),%r9
  lea    -0x2(%rax,%rax,1),%edx
  movslq %edx,%rdx
  movslq (%rsi,%rdx,4),%rbx
  lea    0x0(,%rdx,4),%rax
  add    $0x1,%rdx
  lea    0x0(,%rdx,4),%rcx
  mov    (%rsi,%rdx,4),%edx
  cmp    %edx,%ebx
  jge    L343
  mov    %rbp,0x60(%rsp)
  pxor   %xmm7,%xmm7
  mov    %r11,%rbp
  movsd  D100(%rip),%xmm3
  mov    %r10,0x68(%rsp)
  mov    %r14,%r11
  mov    %r15,%r10
  mov    %rsi,%r14
  mov    %r9,0x70(%rsp)
  lea    D105(%rip),%rdi
  mov    %r8,%r15
  jmp    L258
  nopl   0x0(%rax)
L270:
  movsd  %xmm3,-0x8(%r12,%rcx,8)
  movupd 0x0(%r13),%xmm5
  movsd  (%r12),%xmm4
  movsd  0x8(%r12),%xmm1
  movsd  0x0(%r13),%xmm0
  movapd %xmm5,%xmm6
  movsd  0x10(%r13),%xmm2
  unpckhpd %xmm6,%xmm6
  mulsd  %xmm6,%xmm1
  movapd %xmm4,%xmm6
  mulsd  %xmm0,%xmm6
  addsd  %xmm6,%xmm1
  movsd  0x10(%r12),%xmm6
  mulsd  %xmm2,%xmm6
  addsd  %xmm6,%xmm1
  mulsd  %xmm1,%xmm4
  subsd  %xmm4,%xmm0
  movsd  %xmm0,0x0(%r13)
  movsd  0x8(%r12),%xmm6
  mulsd  %xmm0,%xmm0
  mulsd  %xmm1,%xmm6
  unpcklpd %xmm6,%xmm4
  subpd  %xmm4,%xmm5
  movapd %xmm5,%xmm6
  unpckhpd %xmm6,%xmm6
  movsd  %xmm6,0x8(%r13)
  mulsd  0x10(%r12),%xmm1
  movapd %xmm6,%xmm4
  mulsd  %xmm6,%xmm4
  subsd  %xmm1,%xmm2
  addsd  %xmm4,%xmm0
  movapd %xmm2,%xmm1
  mulsd  %xmm2,%xmm1
  addsd  %xmm1,%xmm0
  ucomisd %xmm0,%xmm7
  ja     L278
  sqrtsd %xmm0,%xmm0
L164:
  divsd  %xmm0,%xmm2
  movapd %xmm0,%xmm4
  mov    (%r15),%eax
  add    $0x1,%rbx
  unpcklpd %xmm4,%xmm4
  lea    -0x2(%rax,%rax,1),%eax
  cltq
  lea    0x1(%rax),%rdx
  lea    0x0(,%rdx,4),%rcx
  mov    (%r14,%rdx,4),%edx
  divpd  %xmm4,%xmm5
  movsd  %xmm2,0x10(%r13)
  movups %xmm5,0x0(%r13)
  cmp    %ebx,%edx
  jle    L210
L258:
  movslq (%r10,%rbx,8),%rax
  pxor   %xmm0,%xmm0
  mov    %ebx,%esi
  movq   $0x0,0x10(%r12)
  movups %xmm0,(%r12)
  mov    %rax,%rdx
  shl    $0x2,%rax
  cmpl   $0x1,(%r11)
  movslq -0x4(%rbp,%rax,1),%rcx
  jne    L270
  mov    %r11,0x20(%rsp)
  mov    0x50(%rsp),%r11
  mov    %r10,0x10(%rsp)
  mov    -0x4(%r11,%rax,1),%r8d
  xor    %eax,%eax
  mov    %ecx,0x8(%rsp)
  movsd  %xmm7,0x40(%rsp)
  call   <printf@plt>
  movsd  0x40(%rsp),%xmm7
  mov    0x20(%rsp),%r11
  lea    D105(%rip),%rdi
  mov    D100(%rip),%rax
  mov    0x10(%rsp),%r10
  movslq 0x8(%rsp),%rcx
  movq   %rax,%xmm3
  jmp    L270
  nopl   0x0(%rax)
L210:
  mov    0x60(%rsp),%rbp
  mov    0x68(%rsp),%r10
  mov    %r11,%r14
  shl    $0x2,%rax
  mov    0x70(%rsp),%r9
L343:
  mov    0x28(%rsp),%rdi
  mov    (%rdi,%rax,1),%r11d
  mov    (%rdi,%rcx,1),%r8d
  cmp    %r8d,%r11d
  jge    L67
  movslq %r11d,%r15
  mov    %r9,%rax
  pxor   %xmm7,%xmm7
  mov    %r13,%r9
  movsd  %xmm7,0x20(%rsp)
  mov    %r15,%r13
  mov    %rax,%r15
  nopl   (%rax)
L318:
  mov    0x30(%rsp),%rax
  pxor   %xmm7,%xmm7
  cmpl   $0x1,(%r14)
  mov    %r13d,%esi
  movq   $0x0,0x10(%r12)
  movslq (%rax,%r13,8),%r8
  movups %xmm7,(%r12)
  lea    -0x3(%r8,%r8,2),%eax
  movsd  -0x8(%r10,%r8,8),%xmm0
  mov    %r8,%rdx
  cltq
  lea    0x1(%rax),%rcx
  mov    0x0(%rbp,%rax,4),%r8d
  mov    0x0(%rbp,%rcx,4),%r11d
  movslq 0x4(%rbp,%rcx,4),%rbx
  movslq %r11d,%rax
  movsd  %xmm0,-0x8(%r12,%rax,8)
  je     L144
L126:
  test   %ebx,%ebx
  je     L25
L219:
  lea    -0x3(%rbx,%rbx,2),%eax
  mov    (%r15),%edx
  cltq
  cmp    0x0(%rbp,%rax,4),%edx
  jne    L54
  movsd  -0x8(%r10,%rbx,8),%xmm0
  movslq 0x4(%rbp,%rax,4),%rcx
  movsd  %xmm0,-0x8(%r12,%rcx,8)
L54:
  cmpl   $0x1,(%r14)
  movslq 0x8(%rbp,%rax,4),%rbx
  je     L91
  test   %ebx,%ebx
  je     L25
  jmp    L46
L91:
  xor    %eax,%eax
  mov    %ebx,%esi
  lea    D64(%rip),%rdi
  mov    %r10,0x10(%rsp)
  mov    %r9,0x8(%rsp)
  call   <printf@plt>
  test   %ebx,%ebx
  mov    0x8(%rsp),%r9
  mov    0x10(%rsp),%r10
  jne    L219
L25:
  movupd (%r12),%xmm4
  movsd  (%r12),%xmm0
  movsd  0x10(%r12),%xmm3
  mulsd  %xmm0,%xmm0
  movapd %xmm4,%xmm7
  unpckhpd %xmm7,%xmm7
  movapd %xmm7,%xmm2
  mulsd  %xmm7,%xmm2
  movsd  0x20(%rsp),%xmm7
  addsd  %xmm2,%xmm0
  movapd %xmm3,%xmm2
  mulsd  %xmm3,%xmm2
  addsd  %xmm2,%xmm0
  ucomisd %xmm0,%xmm7
  ja     L371
  sqrtsd %xmm0,%xmm0
L184:
  cvttsd2si %xmm0,%eax
  pxor   %xmm0,%xmm0
  cvtsi2sd %eax,%xmm0
  divsd  %xmm0,%xmm3
  movapd %xmm0,%xmm2
  unpcklpd %xmm2,%xmm2
  divpd  %xmm2,%xmm4
  movsd  %xmm3,0x10(%r12)
  movups %xmm4,(%r12)
  movupd (%r9),%xmm7
  movsd  (%r9),%xmm0
  movapd %xmm4,%xmm5
  movsd  0x10(%r9),%xmm2
  movapd %xmm0,%xmm1
  movapd %xmm7,%xmm6
  mulsd  %xmm4,%xmm1
  unpckhpd %xmm6,%xmm6
  unpckhpd %xmm4,%xmm4
  mulsd  %xmm4,%xmm6
  mulsd  %xmm2,%xmm3
  addsd  %xmm6,%xmm1
  addsd  %xmm3,%xmm1
  mulsd  %xmm1,%xmm5
  subsd  %xmm5,%xmm0
  movapd %xmm5,%xmm3
  movsd  %xmm0,(%r9)
  movsd  0x8(%r12),%xmm4
  mulsd  %xmm0,%xmm0
  mulsd  %xmm1,%xmm4
  unpcklpd %xmm4,%xmm3
  subpd  %xmm3,%xmm7
  movapd %xmm7,%xmm5
  unpckhpd %xmm5,%xmm5
  movsd  %xmm5,0x8(%r9)
  mulsd  0x10(%r12),%xmm1
  movapd %xmm5,%xmm3
  mulsd  %xmm5,%xmm3
  movsd  0x20(%rsp),%xmm5
  subsd  %xmm1,%xmm2
  addsd  %xmm3,%xmm0
  movapd %xmm2,%xmm1
  mulsd  %xmm2,%xmm1
  addsd  %xmm1,%xmm0
  ucomisd %xmm0,%xmm5
  ja     L105
  sqrtsd %xmm0,%xmm0
L358:
  movapd %xmm0,%xmm3
  mov    0x38(%rsp),%rax
  mov    0x28(%rsp),%rdi
  add    $0x1,%r13
  divsd  %xmm0,%xmm2
  unpcklpd %xmm3,%xmm3
  mov    (%rax),%eax
  lea    -0x2(%rax,%rax,1),%eax
  cltq
  lea    0x1(%rax),%rdx
  mov    (%rdi,%rdx,4),%r8d
  lea    0x0(,%rdx,4),%rcx
  divpd  %xmm3,%xmm7
  movsd  %xmm2,0x10(%r9)
  movups %xmm7,(%r9)
  cmp    %r13d,%r8d
  jg     L318
  mov    0x48(%rsp),%rdi
  mov    %r9,%r13
  shl    $0x2,%rax
  mov    %r15,%r9
  mov    (%rdi,%rcx,1),%edx
L67:
  mov    0x28(%rsp),%rdi
  mov    (%rdi,%rax,1),%ecx
  mov    0x48(%rsp),%rdi
  cmp    (%rdi,%rax,1),%edx
  jle    L303
L259:
  movsd  0x8(%r13),%xmm2
  movsd  0x10(%r13),%xmm3
  lea    0x8(%r12),%rax
  movsd  0x10(%r12),%xmm1
  movsd  0x8(%r12),%xmm0
  mov    0x58(%rsp),%rdi
  mulsd  %xmm0,%xmm3
  mulsd  %xmm1,%xmm2
  subsd  %xmm3,%xmm2
  movsd  %xmm2,0x18(%r12)
  movsd  (%r12),%xmm2
  movsd  0x10(%r13),%xmm3
  mulsd  0x0(%r13),%xmm1
  mulsd  %xmm2,%xmm3
  subsd  %xmm1,%xmm3
  movsd  %xmm3,0x20(%r12)
  movsd  0x8(%r13),%xmm1
  mulsd  0x0(%r13),%xmm0
  mulsd  %xmm2,%xmm1
  subsd  %xmm1,%xmm0
  movsd  %xmm0,0x28(%r12)
  cmp    %rax,%rdi
  je     L253
  movupd (%r12),%xmm7
  movups %xmm7,(%rdi)
  movupd 0x10(%r12),%xmm7
  movups %xmm7,0x10(%rdi)
  movupd 0x20(%r12),%xmm7
  movups %xmm7,0x20(%rdi)
L172:
  movslq %ecx,%r15
  cmp    %ecx,%r8d
  jle    L247
  mov    %r14,0x8(%rsp)
  mov    0x30(%rsp),%r14
  nopw   0x0(%rax,%rax,1)
L295:
  movslq (%r14,%r15,8),%rdx
  lea    -0x3(%rdx,%rdx,2),%eax
  movsd  -0x8(%r10,%rdx,8),%xmm2
  cltq
  add    $0x1,%rax
  movslq 0x4(%rbp,%rax,4),%rdx
  movslq 0x0(%rbp,%rax,4),%rax
  lea    0x10(,%rax,8),%rax
  lea    (%r12,%rax,1),%r11
  lea    -0x18(%r13,%rax,1),%rbx
  test   %edx,%edx
  je     L396
  mov    (%r9),%ecx
  nop
L296:
  lea    -0x3(%rdx,%rdx,2),%eax
  cltq
  cmp    0x0(%rbp,%rax,4),%ecx
  je     L331
  movslq 0x8(%rbp,%rax,4),%rdx
  test   %edx,%edx
  jne    L296
L396:
  add    $0x1,%r15
  movq   $0x0,(%r11)
  movq   $0x0,(%rbx)
  cmp    %r15d,%r8d
  jg     L295
  mov    0x8(%rsp),%r14
L247:
  movsd  0x0(%r13),%xmm4
  movsd  0x8(%r13),%xmm1
  pxor   %xmm7,%xmm7
  movsd  0x10(%r13),%xmm2
  movsd  %xmm7,0x20(%rsp)
  movapd %xmm4,%xmm0
  movapd %xmm1,%xmm3
  mulsd  %xmm1,%xmm3
  mulsd  %xmm4,%xmm0
  addsd  %xmm3,%xmm0
  movapd %xmm2,%xmm3
  mulsd  %xmm2,%xmm3
  addsd  %xmm3,%xmm0
  ucomisd %xmm0,%xmm7
  ja     L350
L113:
  movsd  (%r12),%xmm0
  movsd  0x8(%r12),%xmm5
  movsd  0x10(%r12),%xmm3
  movsd  0x20(%rsp),%xmm7
  mulsd  %xmm0,%xmm0
  mulsd  %xmm5,%xmm5
  mulsd  %xmm3,%xmm3
  addsd  %xmm5,%xmm0
  addsd  %xmm3,%xmm0
  ucomisd %xmm0,%xmm7
  ja     L123
L308:
  movsd  0x18(%r12),%xmm0
  movsd  0x20(%r12),%xmm5
  movsd  0x28(%r12),%xmm3
  movsd  0x20(%rsp),%xmm7
  mulsd  %xmm0,%xmm0
  mulsd  %xmm5,%xmm5
  mulsd  %xmm3,%xmm3
  addsd  %xmm5,%xmm0
  addsd  %xmm3,%xmm0
  ucomisd %xmm0,%xmm7
  ja     L287
L118:
  cmpl   $0x1,(%r14)
  je     L239
L52:
  add    $0x88,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   0x0(%rax,%rax,1)
L331:
  lea    -0x8(%r10,%rdx,8),%rdx
  movslq 0x4(%rbp,%rax,4),%rsi
  movsd  (%rdx),%xmm0
  mulsd  (%r11),%xmm0
  lea    0x10(,%rsi,8),%rsi
  lea    (%r12,%rsi,1),%rdi
  lea    -0x18(%r13,%rsi,1),%rsi
  movsd  (%rdi),%xmm1
  divsd  %xmm2,%xmm0
  subsd  %xmm0,%xmm1
  movsd  %xmm1,(%rdi)
  movsd  (%rdx),%xmm0
  mulsd  (%rbx),%xmm0
  movsd  (%rsi),%xmm1
  movslq 0x8(%rbp,%rax,4),%rdx
  divsd  %xmm2,%xmm0
  subsd  %xmm0,%xmm1
  movsd  %xmm1,(%rsi)
  test   %edx,%edx
  jne    L296
  jmp    L396
  xchg   %ax,%ax
L144:
  mov    %r11d,%ecx
  mov    $0x1,%eax
  mov    %r10,0x10(%rsp)
  lea    D128(%rip),%rdi
  mov    %r9,0x8(%rsp)
  call   <printf@plt>
  mov    0x10(%rsp),%r10
  mov    0x8(%rsp),%r9
  jmp    L126
L303:
  cmp    %ecx,%r8d
  jg     L259
L120:
  cmpl   $0x1,(%r14)
  jne    L52
  movsd  0x10(%r13),%xmm2
  movsd  0x8(%r13),%xmm1
  lea    D94(%rip),%rdi
  mov    $0x3,%eax
  movsd  0x0(%r13),%xmm0
  call   <printf@plt>
  movsd  (%r12),%xmm0
  movsd  0x10(%r12),%xmm2
  lea    D113(%rip),%rdi
  movsd  0x8(%r12),%xmm1
  mov    $0x3,%eax
  call   <printf@plt>
  movsd  0x18(%r12),%xmm0
  movsd  0x28(%r12),%xmm2
  lea    D92(%rip),%rdi
  movsd  0x20(%r12),%xmm1
  add    $0x88,%rsp
  mov    $0x3,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  jmp    1060 <printf@plt>
L239:
  movapd %xmm4,%xmm0
  lea    D94(%rip),%rdi
  mov    $0x3,%eax
  call   <printf@plt>
  movsd  (%r12),%xmm0
  movsd  0x10(%r12),%xmm2
  lea    D113(%rip),%rdi
  movsd  0x8(%r12),%xmm1
  mov    $0x3,%eax
  call   <printf@plt>
  movsd  0x18(%r12),%xmm0
  movsd  0x28(%r12),%xmm2
  lea    D92(%rip),%rdi
  movsd  0x20(%r12),%xmm1
  mov    $0x3,%eax
  call   <printf@plt>
  jmp    L120
L253:
  movsd  %xmm2,0x8(%r12)
  movsd  %xmm2,0x10(%r12)
  movsd  %xmm2,0x18(%r12)
  movsd  %xmm2,0x20(%r12)
  movsd  %xmm2,0x28(%r12)
  movsd  %xmm2,0x30(%r12)
  jmp    L172
L105:
  mov    %r10,0x50(%rsp)
  mov    %r9,0x40(%rsp)
  movaps %xmm7,0x10(%rsp)
  movsd  %xmm2,0x8(%rsp)
  call   <sqrt@plt>
  mov    0x50(%rsp),%r10
  mov    0x40(%rsp),%r9
  movapd 0x10(%rsp),%xmm7
  movsd  0x8(%rsp),%xmm2
  jmp    L358
L278:
  mov    %r11,0x40(%rsp)
  mov    %r10,0x20(%rsp)
  movsd  %xmm7,0x78(%rsp)
  movaps %xmm5,0x10(%rsp)
  movsd  %xmm2,0x8(%rsp)
  call   <sqrt@plt>
  movsd  0x78(%rsp),%xmm7
  mov    0x40(%rsp),%r11
  lea    D105(%rip),%rdi
  mov    D100(%rip),%rax
  mov    0x20(%rsp),%r10
  movapd 0x10(%rsp),%xmm5
  movsd  0x8(%rsp),%xmm2
  movq   %rax,%xmm3
  jmp    L164
L371:
  mov    %r10,0x50(%rsp)
  mov    %r9,0x40(%rsp)
  movaps %xmm4,0x10(%rsp)
  movsd  %xmm3,0x8(%rsp)
  call   <sqrt@plt>
  mov    0x50(%rsp),%r10
  mov    0x40(%rsp),%r9
  movapd 0x10(%rsp),%xmm4
  movsd  0x8(%rsp),%xmm3
  jmp    L184
L350:
  movsd  %xmm2,0x28(%rsp)
  movsd  %xmm1,0x10(%rsp)
  movsd  %xmm4,0x8(%rsp)
  call   <sqrt@plt>
  movsd  0x28(%rsp),%xmm2
  movsd  0x10(%rsp),%xmm1
  movsd  0x8(%rsp),%xmm4
  jmp    L113
L287:
  movsd  %xmm2,0x20(%rsp)
  movsd  %xmm1,0x10(%rsp)
  movsd  %xmm4,0x8(%rsp)
  call   <sqrt@plt>
  movsd  0x20(%rsp),%xmm2
  movsd  0x10(%rsp),%xmm1
  movsd  0x8(%rsp),%xmm4
  jmp    L118
L123:
  movsd  %xmm2,0x28(%rsp)
  movsd  %xmm1,0x10(%rsp)
  movsd  %xmm4,0x8(%rsp)
  call   <sqrt@plt>
  movsd  0x28(%rsp),%xmm2
  movsd  0x10(%rsp),%xmm1
  movsd  0x8(%rsp),%xmm4
  jmp    L308
```

tool_calls: name: disassemble_data
arguments: label: D100
datatype: f64
name: disassemble_data
arguments: label: D105
datatype: string
name: disassemble_data
arguments: label: D64
datatype: string
name: disassemble_data
arguments: label: D128
datatype: string
name: disassemble_data
arguments: label: D94
datatype: string
name: disassemble_data
arguments: label: D113
datatype: string
name: disassemble_data
arguments: label: D92
datatype: string

tool: D100: 1

tool: D105: jj %d ist %d dir %d node %d


tool: D64: index %d 


tool: D128: jj %d ist %d dir %d node %d coef %e


tool: D94: n= %e %e %e 


tool: D113: t1= %e %e %e 


tool: D92: t2= %e %e %e 


assistant: ```c
void trafontspcmpc(double *n, double *t, double *n2, double *that, int *islavnodeentry, int *nboun, int *ndirboun, int *nodeboun, double *xboun, int *nmpc, int *ipompc, int *nodempc, double *coefmpc, int *ikboun, int *ilboun, int *ikmpc, int *ilmpc, int *nslavspc, int *islavspc, int *nsspc, int *nslavmpc, int *islavmpc, int *nsmpc, int *nmastspc, int *imastspc, int *nmspc, int *nmastmpc, int *imastmpc, int *nmmpc, int *debug, int *node) {
  int i, j, jj, j2, k, kk, l, m, dirblock, ist, dir, node1, index, dirind, dirdep, nt1, nt2;
  double dist, nn, coefdep;
  dirblock = 0;
  for (jj = nslavmpc[2 * (*islavnodeentry - 1)]; jj < nslavmpc[2 * (*islavnodeentry - 1) + 1]; jj++) {
    if (islavmpc[2 * jj + 1] == 1) {
      dirblock = 1;
    }
  }
  for (jj = nslavspc[2 * (*islavnodeentry - 1)]; jj < nslavspc[2 * (*islavnodeentry - 1) + 1]; jj++) {
    t[0] = 0;
    t[1] = 0;
    t[2] = 0;
    ist = islavspc[2 * jj];
    dir = ndirboun[ist - 1];
    node1 = nodeboun[ist - 1];
    if (*debug == 1) {
      printf("jj %"
             "d"
             " ist %"
             "d"
             " dir %"
             "d"
             " node %"
             "d"
             "\n",
             jj, ist, dir, node1);
    }
    t[dir - 1] = 1.0;
    dist = t[0] * n[0] + t[1] * n[1] + t[2] * n[2];
    n[0] = n[0] - dist * t[0];
    n[1] = n[1] - dist * t[1];
    n[2] = n[2] - dist * t[2];
    nn = sqrt(n[0] * n[0] + n[1] * n[1] + n[2] * n[2]);
    n[0] = n[0] / nn;
    n[1] = n[1] / nn;
    n[2] = n[2] / nn;
  }
  for (jj = nslavmpc[2 * (*islavnodeentry - 1)]; jj < nslavmpc[2 * (*islavnodeentry - 1) + 1]; jj++) {
    t[0] = 0;
    t[1] = 0;
    t[2] = 0;
    ist = islavmpc[2 * jj];
    dirdep = nodempc[3 * (ist - 1) + 1];
    coefdep = coefmpc[ist - 1];
    index = nodempc[3 * (ist - 1) + 2];
    node1 = nodempc[3 * (ist - 1)];
    t[dirdep - 1] = coefdep;
    if (*debug == 1) {
      printf("jj %"
             "d"
             " ist %"
             "d"
             " dir %"
             "d"
             " node %"
             "d"
             " coef %e\n",
             jj, ist, dirdep, node1, coefdep);
    }
    while (index != 0) {
      dirind = nodempc[3 * (index - 1) + 1];
      node1 = nodempc[3 * (index - 1)];
      if (node1 == *node)
        t[dirind - 1] = coefmpc[index - 1];
      index = nodempc[3 * (index - 1) + 2];
      if (*debug == 1) {
        printf("index %"
               "d"
               " \n",
               index);
      }
    }
    nt1 = sqrt(t[0] * t[0] + t[1] * t[1] + t[2] * t[2]);
    t[0] = t[0] / nt1;
    t[1] = t[1] / nt1;
    t[2] = t[2] / nt1;
    dist = t[0] * n[0] + t[1] * n[1] + t[2] * n[2];
    n[0] = n[0] - dist * t[0];
    n[1] = n[1] - dist * t[1];
    n[2] = n[2] - dist * t[2];
    nn = sqrt(n[0] * n[0] + n[1] * n[1] + n[2] * n[2]);
    n[0] = n[0] / nn;
    n[1] = n[1] / nn;
    n[2] = n[2] / nn;
  }
  if (nslavspc[2 * (*islavnodeentry - 1) + 1] - nslavspc[2 * (*islavnodeentry - 1)] > 0 || nslavmpc[2 * (*islavnodeentry - 1) + 1] - nslavmpc[2 * (*islavnodeentry - 1)] > 0) {
    t[3] = n[1] * t[2] - n[2] * t[1];
    t[4] = n[2] * t[0] - n[0] * t[2];
    t[5] = n[0] * t[1] - n[1] * t[0];
    for (kk = 0; kk < 6; kk++) {
      that[kk] = t[kk];
    }
    for (jj = nslavmpc[2 * (*islavnodeentry - 1)]; jj < nslavmpc[2 * (*islavnodeentry - 1) + 1]; jj++) {
      ist = islavmpc[2 * jj];
      dirdep = nodempc[3 * (ist - 1) + 1];
      coefdep = coefmpc[ist - 1];
      index = nodempc[3 * (ist - 1) + 2];
      node1 = nodempc[3 * (ist - 1)];
      while (index != 0) {
        dirind = nodempc[3 * (index - 1) + 1];
        node1 = nodempc[3 * (index - 1)];
        if (node1 == *node) {
          t[dirind - 1 + 3] = t[dirind - 1 + 3] - coefmpc[index - 1] * t[dirdep - 1 + 3] / coefdep;
          n[dirind - 1] = n[dirind - 1] - coefmpc[index - 1] * n[dirdep - 1] / coefdep;
        }
        index = nodempc[3 * (index - 1) + 2];
      }
      t[dirdep - 1 + 3] = 0.0;
      n[dirdep - 1] = 0.0;
    }
    nn = sqrt(n[0] * n[0] + n[1] * n[1] + n[2] * n[2]);
    nt1 = sqrt(t[0] * t[0] + t[1] * t[1] + t[2] * t[2]);
    nt2 = sqrt(t[3] * t[3] + t[4] * t[4] + t[5] * t[5]);
    if (*debug == 1) {
      printf("n= %e %e %e \n", n[0], n[1], n[2]);
      printf("t1= %e %e %e \n", t[0], t[1], t[2]);
      printf("t2= %e %e %e \n", t[3], t[4], t[5]);
    }
  }
  if (*debug == 1) {
    printf("n= %e %e %e \n", n[0], n[1], n[2]);
    printf("t1= %e %e %e \n", t[0], t[1], t[2]);
    printf("t2= %e %e %e \n", t[3], t[4], t[5]);
  }
  return;
}
```