user: Translate the below assembly code into C programming language:

```asm
<sort_points>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  mov    %edx,%ebx
  sub    $0xe78,%rsp
  mov    %edx,0x3c(%rsp)
  movsd  %xmm0,0x40(%rsp)
  mov    %fs:0x28,%rdx
  mov    %rdx,0xe68(%rsp)
  xor    %edx,%edx
  test   $0x1,%bl
  jne    L149
  test   %ebx,%ebx
  jle    L268
  mov    %rdi,%rax
  movapd %xmm0,%xmm7
  mov    %ebx,%edi
  mov    %rsi,%r13
  movupd 0x8(%rax),%xmm13
  unpcklpd %xmm7,%xmm7
  lea    -0x1(%rbx),%ebx
  mov    %rcx,%rsi
  movupd (%rax),%xmm14
  movsd  (%rax),%xmm1
  mov    %r8,%rbp
  movapd %xmm7,%xmm0
  movsd  0x10(%rax),%xmm2
  movhpd %xmm13,0x48(%rsp)
  cmp    $0x6,%ebx
  jbe    L538
  shr    $0x3,%edi
  movapd %xmm2,%xmm12
  pxor   %xmm15,%xmm15
  mov    %rcx,%rdx
  sub    $0x1,%edi
  unpcklpd %xmm1,%xmm12
  pxor   %xmm1,%xmm1
  mov    %r8,%rcx
  shl    $0x4,%rdi
  lea    0x500(%rsp),%rax
  movaps %xmm1,(%rsp)
  lea    0x10(%r8,%rdi,1),%rdi
  nopw   0x0(%rax,%rax,1)
L162:
  movdqu (%rcx),%xmm2
  movdqa %xmm15,%xmm5
  movupd 0x40(%rdx),%xmm7
  add    $0x10,%rcx
  movupd 0x50(%rdx),%xmm6
  movupd 0x10(%rdx),%xmm10
  add    $0xc0,%rax
  add    $0xc0,%rdx
  pcmpeqw %xmm15,%xmm2
  subpd  %xmm12,%xmm7
  movupd -0xa0(%rdx),%xmm9
  movupd -0x90(%rdx),%xmm8
  movupd -0xc0(%rdx),%xmm11
  subpd  %xmm13,%xmm6
  subpd  %xmm12,%xmm10
  subpd  %xmm13,%xmm9
  subpd  %xmm14,%xmm8
  divpd  %xmm0,%xmm7
  pcmpeqw %xmm15,%xmm2
  subpd  %xmm14,%xmm11
  movdqa %xmm2,%xmm3
  pandn  D7(%rip),%xmm3
  pand   D7(%rip),%xmm2
  pcmpgtw %xmm3,%xmm5
  movdqa %xmm3,%xmm4
  punpcklwd %xmm5,%xmm4
  paddd  (%rsp),%xmm4
  punpckhwd %xmm5,%xmm3
  movupd -0x60(%rdx),%xmm5
  paddd  %xmm3,%xmm4
  movdqa %xmm2,%xmm3
  subpd  %xmm14,%xmm5
  movaps %xmm4,(%rsp)
  movdqa %xmm15,%xmm4
  pcmpgtw %xmm2,%xmm4
  punpcklwd %xmm4,%xmm3
  punpckhwd %xmm4,%xmm2
  movupd -0x50(%rdx),%xmm4
  paddd  %xmm3,%xmm1
  movupd -0x30(%rdx),%xmm3
  paddd  %xmm2,%xmm1
  movupd -0x40(%rdx),%xmm2
  subpd  %xmm12,%xmm4
  subpd  %xmm14,%xmm3
  subpd  %xmm13,%xmm2
  divpd  %xmm0,%xmm6
  divpd  %xmm0,%xmm2
  divpd  %xmm0,%xmm3
  movaps %xmm2,0x10(%rsp)
  movupd -0x10(%rdx),%xmm2
  subpd  %xmm13,%xmm2
  divpd  %xmm0,%xmm10
  movaps %xmm3,0x20(%rsp)
  movupd -0x20(%rdx),%xmm3
  movaps %xmm7,-0x80(%rax)
  movapd 0x20(%rsp),%xmm7
  subpd  %xmm12,%xmm3
  movaps %xmm6,-0x70(%rax)
  movapd 0x10(%rsp),%xmm6
  movaps %xmm7,-0x30(%rax)
  movaps %xmm6,-0x40(%rax)
  divpd  %xmm0,%xmm9
  movaps %xmm10,-0xb0(%rax)
  divpd  %xmm0,%xmm8
  movaps %xmm9,-0xa0(%rax)
  divpd  %xmm0,%xmm5
  movaps %xmm8,-0x90(%rax)
  divpd  %xmm0,%xmm4
  movaps %xmm5,-0x60(%rax)
  divpd  %xmm0,%xmm3
  movaps %xmm4,-0x50(%rax)
  divpd  %xmm0,%xmm2
  movaps %xmm3,-0x20(%rax)
  divpd  %xmm0,%xmm11
  movaps %xmm11,-0xc0(%rax)
  movaps %xmm2,-0x10(%rax)
  cmp    %rdi,%rcx
  jne    L162
  movdqa %xmm1,%xmm2
  movdqa (%rsp),%xmm7
  mov    0x3c(%rsp),%eax
  psrldq $0x8,%xmm2
  paddd  %xmm2,%xmm1
  mov    %eax,%edx
  movdqa %xmm1,%xmm2
  and    $0xfffffff8,%edx
  psrldq $0x4,%xmm2
  paddd  %xmm2,%xmm1
  movd   %xmm1,%r12d
  movdqa %xmm7,%xmm1
  psrldq $0x8,%xmm1
  paddd  %xmm7,%xmm1
  movdqa %xmm1,%xmm2
  psrldq $0x4,%xmm2
  paddd  %xmm2,%xmm1
  movd   %xmm1,%r14d
  test   $0x7,%al
  je     L504
L526:
  movslq %edx,%rax
  cmpw   $0x0,0x0(%rbp,%rax,2)
  lea    (%rax,%rax,1),%rcx
  jne    L81
  add    $0x1,%r14d
L420:
  lea    (%rax,%rax,2),%rax
  shl    $0x3,%rax
  lea    (%rsi,%rax,1),%rdi
  movupd (%rdi),%xmm1
  subpd  %xmm14,%xmm1
  divpd  %xmm0,%xmm1
  movups %xmm1,0x500(%rsp,%rax,1)
  movsd  0x10(%rdi),%xmm1
  lea    0x1(%rdx),%edi
  subsd  0x48(%rsp),%xmm1
  divsd  0x40(%rsp),%xmm1
  movsd  %xmm1,0x510(%rsp,%rax,1)
  cmp    %edi,0x3c(%rsp)
  jle    L504
  cmpw   $0x0,0x2(%rbp,%rcx,1)
  je     L349
  add    $0x1,%r12d
L499:
  lea    0x18(%rsi,%rax,1),%r10
  movslq %edi,%rdi
  movupd (%r10),%xmm1
  lea    (%rdi,%rdi,2),%rdi
  shl    $0x3,%rdi
  subpd  %xmm14,%xmm1
  divpd  %xmm0,%xmm1
  movups %xmm1,0x500(%rsp,%rdi,1)
  movsd  0x10(%r10),%xmm1
  subsd  0x48(%rsp),%xmm1
  divsd  0x40(%rsp),%xmm1
  movsd  %xmm1,0x510(%rsp,%rdi,1)
  lea    0x2(%rdx),%edi
  cmp    %edi,0x3c(%rsp)
  jle    L504
  cmpw   $0x0,0x4(%rbp,%rcx,1)
  je     L260
  add    $0x1,%r12d
L342:
  lea    0x30(%rsi,%rax,1),%r10
  movslq %edi,%rdi
  movupd (%r10),%xmm1
  lea    (%rdi,%rdi,2),%rdi
  shl    $0x3,%rdi
  subpd  %xmm14,%xmm1
  divpd  %xmm0,%xmm1
  movups %xmm1,0x500(%rsp,%rdi,1)
  movsd  0x10(%r10),%xmm1
  subsd  0x48(%rsp),%xmm1
  divsd  0x40(%rsp),%xmm1
  movsd  %xmm1,0x510(%rsp,%rdi,1)
  lea    0x3(%rdx),%edi
  cmp    %edi,0x3c(%rsp)
  jle    L504
  cmpw   $0x0,0x6(%rbp,%rcx,1)
  je     L247
  add    $0x1,%r12d
L117:
  lea    0x48(%rsi,%rax,1),%r10
  movslq %edi,%rdi
  movupd (%r10),%xmm1
  lea    (%rdi,%rdi,2),%rdi
  shl    $0x3,%rdi
  subpd  %xmm14,%xmm1
  divpd  %xmm0,%xmm1
  movups %xmm1,0x500(%rsp,%rdi,1)
  movsd  0x10(%r10),%xmm1
  subsd  0x48(%rsp),%xmm1
  divsd  0x40(%rsp),%xmm1
  movsd  %xmm1,0x510(%rsp,%rdi,1)
  lea    0x4(%rdx),%edi
  cmp    %edi,0x3c(%rsp)
  jle    L504
  cmpw   $0x0,0x8(%rbp,%rcx,1)
  jne    L362
  add    $0x1,%r14d
L97:
  lea    0x60(%rsi,%rax,1),%r10
  movslq %edi,%rdi
  movupd (%r10),%xmm1
  lea    (%rdi,%rdi,2),%rdi
  shl    $0x3,%rdi
  subpd  %xmm14,%xmm1
  divpd  %xmm0,%xmm1
  movups %xmm1,0x500(%rsp,%rdi,1)
  movsd  0x10(%r10),%xmm1
  subsd  0x48(%rsp),%xmm1
  divsd  0x40(%rsp),%xmm1
  movsd  %xmm1,0x510(%rsp,%rdi,1)
  lea    0x5(%rdx),%edi
  cmp    %edi,0x3c(%rsp)
  jle    L504
  cmpw   $0x0,0xa(%rbp,%rcx,1)
  je     L299
  add    $0x1,%r12d
L313:
  lea    0x78(%rsi,%rax,1),%r10
  movslq %edi,%rdi
  add    $0x6,%edx
  movupd (%r10),%xmm1
  lea    (%rdi,%rdi,2),%rdi
  shl    $0x3,%rdi
  subpd  %xmm14,%xmm1
  divpd  %xmm0,%xmm1
  movups %xmm1,0x500(%rsp,%rdi,1)
  movsd  0x10(%r10),%xmm1
  subsd  0x48(%rsp),%xmm1
  divsd  0x40(%rsp),%xmm1
  movsd  %xmm1,0x510(%rsp,%rdi,1)
  cmp    %edx,0x3c(%rsp)
  jle    L504
  cmpw   $0x0,0xc(%rbp,%rcx,1)
  je     L127
  add    $0x1,%r12d
L473:
  lea    0x90(%rsi,%rax,1),%rcx
  movslq %edx,%rdx
  movupd (%rcx),%xmm1
  lea    (%rdx,%rdx,2),%rax
  shl    $0x3,%rax
  subpd  %xmm14,%xmm1
  divpd  %xmm0,%xmm1
  movups %xmm1,0x500(%rsp,%rax,1)
  movsd  0x10(%rcx),%xmm0
  subsd  0x48(%rsp),%xmm0
  divsd  0x40(%rsp),%xmm0
  movsd  %xmm0,0x510(%rsp,%rax,1)
L504:
  cmp    %r12d,%r14d
  jne    L38
  lea    0x1(%rbx),%rax
  mov    %rax,0x10(%rsp)
  xor    %eax,%eax
  cmpw   $0x0,0x0(%rbp,%rax,2)
  je     L259
  nopl   (%rax)
L124:
  lea    0x1(%rax),%rdx
  cmp    %rax,%rbx
  je     L268
  mov    %rdx,%rax
  cmpw   $0x0,0x0(%rbp,%rax,2)
  jne    L124
L259:
  lea    0x500(%rsp),%rsi
  mov    %eax,(%rsp)
  lea    (%rax,%rax,2),%rax
  mov    %r9,0x48(%rsp)
  mov    %rsi,%r15
  lea    (%rsi,%rax,8),%rax
  lea    0x1e0(%rsp),%r12
  lea    0x1e8(%rsp,%rbx,8),%rsi
  mov    %rbx,0x20(%rsp)
  mov    %r12,%rbx
  mov    %rbp,0x40(%rsp)
  mov    %rsi,%r14
  mov    %r15,%rbp
  mov    %r13,%r15
  mov    %rax,%r13
  nopl   0x0(%rax)
L339:
  mov    %rbp,%rsi
  mov    %r15,%rdx
  mov    %r13,%rdi
  add    $0x8,%rbx
  call   <positive_angle@plt>
  add    $0x18,%rbp
  movsd  %xmm0,-0x8(%rbx)
  cmp    %rbx,%r14
  jne    L339
  mov    0x10(%rsp),%rdx
  movslq (%rsp),%rax
  lea    0x50(%rsp),%rdi
  xor    %esi,%esi
  mov    0x48(%rsp),%r9
  mov    0x20(%rsp),%rbx
  shl    $0x2,%rdx
  mov    0x40(%rsp),%rbp
  movq   $0x0,0x1e0(%rsp,%rax,8)
  mov    %r9,0x20(%rsp)
  call   <memset@plt>
  mov    %rax,%rdi
  mov    0x3c(%rsp),%eax
  mov    %eax,%r8d
  sar    %r8d
  cmp    $0x1,%eax
  je     L83
  and    $0xfffffffe,%eax
  mov    (%rsp),%r10d
  mov    0x20(%rsp),%r9
  xor    %r14d,%r14d
  movsd  D62(%rip),%xmm3
  mov    %eax,%r13d
  xor    %r15d,%r15d
  nopl   0x0(%rax)
L544:
  xor    %ecx,%ecx
L492:
  mov    (%rdi,%rcx,4),%r11d
  movslq %ecx,%rsi
  test   %r11d,%r11d
  jne    L459
  cmpw   $0x1,0x0(%rbp,%rcx,2)
  je     L459
  test   %r14d,%r14d
  jne    L252
  cmp    %r10d,%esi
  jne    L231
L252:
  movl   $0x1,0x50(%rsp,%rsi,4)
  xor    %eax,%eax
  movapd %xmm3,%xmm1
  mov    $0xffffffff,%r11d
  jmp    L100
  nopw   0x0(%rax,%rax,1)
L142:
  mov    %rdx,%rax
L100:
  mov    (%rdi,%rax,4),%edx
  test   %edx,%edx
  jne    L435
  cmpw   $0x0,0x0(%rbp,%rax,2)
  je     L435
  movsd  0x1e0(%rsp,%rsi,8),%xmm2
  movsd  (%r12,%rax,8),%xmm0
  comisd %xmm0,%xmm2
  jae    L435
  comisd %xmm0,%xmm1
  minsd  %xmm1,%xmm0
  cmova  %eax,%r11d
  movapd %xmm0,%xmm1
L435:
  lea    0x1(%rax),%rdx
  cmp    %rbx,%rax
  jne    L142
  cmp    $0xffffffff,%r11d
  je     L364
  movslq %r11d,%rax
  movl   $0x1,0x50(%rsp,%rax,4)
  cmp    %r15d,%r13d
  je     L116
  mov    %cx,(%r9,%r14,4)
  add    $0x2,%r15d
  mov    %r11w,0x2(%r9,%r14,4)
  add    $0x1,%r14
  cmp    %r14d,%r8d
  jg     L544
  cmp    %r15d,0x3c(%rsp)
  je     L80
  movslq %r15d,%r15
L190:
  mov    $0x1,%edx
  mov    $0xe,%esi
  mov    $0x7,%edi
  call   <new_cept@plt>
  lea    D176(%rip),%rsi
  mov    %rax,%r12
  mov    %rax,%rdi
  call   <add_function@plt>
  mov    %r12,%rdi
  lea    D206(%rip),%rsi
  call   <add_source@plt>
  movslq 0x3c(%rsp),%rdx
  mov    %r12,%rdi
  lea    D79(%rip),%rsi
  call   <add_long@plt>
  mov    %r15,%rdx
  lea    D63(%rip),%rsi
  mov    %r12,%rdi
  call   <add_long@plt>
  jmp    L80
L81:
  add    $0x1,%r12d
  jmp    L420
  cs nopw 0x0(%rax,%rax,1)
L459:
  lea    0x1(%rcx),%rax
  cmp    %rcx,%rbx
  je     L559
  mov    %rax,%rcx
  jmp    L492
L268:
  mov    $0x1,%edx
  mov    $0x4,%esi
  mov    $0x1,%edi
  call   <new_cept@plt>
  lea    D176(%rip),%rsi
  mov    %rax,%rbp
  mov    %rax,%rdi
  call   <add_function@plt>
  lea    D88(%rip),%rsi
  mov    %rbp,%rdi
  call   <add_message@plt>
L80:
  mov    0xe68(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L257
  add    $0xe78,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L349:
  add    $0x1,%r14d
  jmp    L499
L38:
  mov    $0x1,%edx
  mov    $0x4,%esi
  mov    $0x1,%edi
  call   <new_cept@plt>
  lea    D176(%rip),%rsi
  mov    %rax,%rbp
  mov    %rax,%rdi
  call   <add_function@plt>
  movslq %r14d,%rdx
  mov    %rbp,%rdi
  lea    D168(%rip),%rsi
  call   <add_long@plt>
  movslq %r12d,%rdx
  lea    D175(%rip),%rsi
  mov    %rbp,%rdi
  call   <add_long@plt>
  jmp    L80
L260:
  add    $0x1,%r14d
  jmp    L342
L247:
  add    $0x1,%r14d
  jmp    L117
L149:
  mov    $0x7,%esi
  mov    $0x1,%edi
  mov    $0x1,%edx
  call   <new_cept@plt>
  lea    D176(%rip),%rsi
  mov    %rax,%rdi
  mov    %rax,%rbp
  call   <add_function@plt>
  mov    0xe68(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L257
  add    $0xe78,%rsp
  mov    %rbp,%rdi
  lea    D34(%rip),%rsi
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  jmp    1110 <add_message@plt>
L362:
  add    $0x1,%r12d
  jmp    L97
L299:
  add    $0x1,%r14d
  jmp    L313
L127:
  add    $0x1,%r14d
  jmp    L473
L559:
  mov    $0x1,%edx
  mov    $0x4,%esi
  mov    $0x1,%edi
  call   <new_cept@plt>
  lea    D176(%rip),%rsi
  mov    %rax,%rbp
  mov    %rax,%rdi
  call   <add_function@plt>
  lea    D107(%rip),%rsi
  mov    %rbp,%rdi
  call   <add_message@plt>
  jmp    L80
L231:
  mov    $0x1,%edx
  mov    $0x4,%esi
  mov    $0x1,%edi
  call   <new_cept@plt>
  lea    D176(%rip),%rsi
  mov    %rax,%rbp
  mov    %rax,%rdi
  call   <add_function@plt>
  lea    D192(%rip),%rsi
  mov    %rbp,%rdi
  call   <add_message@plt>
  jmp    L80
L116:
  mov    $0x1,%edx
  mov    $0xc,%esi
  mov    $0x7,%edi
  call   <new_cept@plt>
  lea    D176(%rip),%rsi
  mov    %rax,%rdi
  mov    %rax,%r12
  call   <add_function@plt>
  movslq 0x3c(%rsp),%rdx
  mov    %r12,%rdi
  lea    D79(%rip),%rsi
  call   <add_long@plt>
  movslq %r13d,%rdx
  lea    D63(%rip),%rsi
  mov    %r12,%rdi
  call   <add_long@plt>
  jmp    L80
L364:
  mov    $0x1,%edx
  mov    $0x4,%esi
  mov    $0x1,%edi
  call   <new_cept@plt>
  lea    D176(%rip),%rsi
  mov    %rax,%rbp
  mov    %rax,%rdi
  call   <add_function@plt>
  lea    D181(%rip),%rsi
  mov    %rbp,%rdi
  call   <add_message@plt>
  jmp    L80
L538:
  xor    %edx,%edx
  xor    %r12d,%r12d
  xor    %r14d,%r14d
  jmp    L526
L83:
  xor    %r15d,%r15d
  jmp    L190
L257:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: unpack_data
arguments: data_tag: D7
datatype: byte[16]
name: unpack_data
arguments: data_tag: D62
datatype: byte[8]
name: unpack_data
arguments: data_tag: D176
datatype: string
name: unpack_data
arguments: data_tag: D206
datatype: string
name: unpack_data
arguments: data_tag: D79
datatype: string
name: unpack_data
arguments: data_tag: D63
datatype: string
name: unpack_data
arguments: data_tag: D88
datatype: string
name: unpack_data
arguments: data_tag: D168
datatype: string
name: unpack_data
arguments: data_tag: D175
datatype: string
name: unpack_data
arguments: data_tag: D34
datatype: string
name: unpack_data
arguments: data_tag: D107
datatype: string
name: unpack_data
arguments: data_tag: D192
datatype: string
name: unpack_data
arguments: data_tag: D181
datatype: string

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

tool: {"D62": [0x18,0x2d,0x44,0x54,0xfb,0x21,0x19,0x40]}

tool: D176: sort_points

tool: D206: mscircle.c

tool: D79: number of points

tool: D63: number of sorted points

tool: D88: base point not found

tool: D168: number of start points

tool: D175: number of stop points

tool: D34: odd number of points on circle

tool: D107: starting vertex not found

tool: D192: first start point is not the base point

tool: D181: ending point not found

assistant: ```c
void sort_points(double center[3], double radius, double axis[3], int n_points, double circle_points[][3], short orn[], short indices[]) {
  int k, index0, index1, base, n_e, edg_idx;
  int n_start, n_stop, pnt;
  int n_sorted;
  double minimum_angle;
  int point_used[100];
  double point_angle[100];
  double point_vector[100][3];
  char message[255];
  struct cept *ex;
  if (n_points % 2 != 0) {
    ex = new_cept(1, 7, 1);
    add_function(ex, "sort_points");
    add_message(ex, "odd number of points on circle");
    return;
  }
  n_start = 0;
  n_stop = 0;
  for (pnt = 0; pnt < n_points; ++pnt) {
    if (orn[pnt])
      n_stop++;
    else
      n_start++;
    for (k = 0; k < 3; k++)
      point_vector[pnt][k] = (circle_points[pnt][k] - center[k]) / radius;
  }
  if (n_start != n_stop) {
    ex = new_cept(1, 4, 1);
    add_function(ex, "sort_points");
    add_long(ex, "number of start points", (long)n_start);
    add_long(ex, "number of stop points", (long)n_stop);
    return;
  }
  base = -1;
  for (pnt = 0; pnt < n_points; pnt++)
    if (orn[pnt] == 0) {
      base = pnt;
      break;
    }
  if (base < 0) {
    ex = new_cept(1, 4, 1);
    add_function(ex, "sort_points");
    add_message(ex, "base point not found");
    return;
  }
  for (pnt = 0; pnt < n_points; pnt++)
    point_angle[pnt] = positive_angle(point_vector[base], point_vector[pnt], axis);
  point_angle[base] = 0.0;
  for (pnt = 0; pnt < n_points; pnt++)
    point_used[pnt] = 0;
  n_e = n_points / 2;
  n_sorted = 0;
  for (edg_idx = 0; edg_idx < n_e; edg_idx++) {
    index0 = -1;
    for (pnt = 0; pnt < n_points; pnt++) {
      if (point_used[pnt])
        continue;
      if (orn[pnt] == 1)
        continue;
      index0 = pnt;
      break;
    }
    if (index0 < 0) {
      ex = new_cept(1, 4, 1);
      add_function(ex, "sort_points");
      add_message(ex, "starting vertex not found");
      return;
    }
    if (edg_idx == 0 && index0 != base) {
      ex = new_cept(1, 4, 1);
      add_function(ex, "sort_points");
      add_message(ex, "first start point is not the base point");
      return;
    }
    point_used[index0] = 1;
    minimum_angle = 2 * 3.14159265358979323846;
    index1 = -1;
    for (pnt = 0; pnt < n_points; pnt++) {
      if (point_used[pnt])
        continue;
      if (orn[pnt] == 0)
        continue;
      if (point_angle[pnt] <= point_angle[index0])
        continue;
      if (point_angle[pnt] < minimum_angle) {
        index1 = pnt;
        minimum_angle = point_angle[pnt];
      }
    }
    if (index1 < 0) {
      ex = new_cept(1, 4, 1);
      add_function(ex, "sort_points");
      add_message(ex, "ending point not found");
      return;
    }
    point_used[index1] = 1;
    if (n_sorted >= n_points - 1) {
      ex = new_cept(7, 12, 1);
      add_function(ex, "sort_points");
      add_long(ex, "number of points", (long)n_points);
      add_long(ex, "number of sorted points", (long)n_sorted);
      return;
    }
    indices[n_sorted] = (short)index0;
    n_sorted++;
    indices[n_sorted] = (short)index1;
    n_sorted++;
  }
  if (n_sorted != n_points) {
    ex = new_cept(7, 14, 1);
    add_function(ex, "sort_points");
    add_source(ex, "mscircle.c");
    add_long(ex, "number of points", (long)n_points);
    add_long(ex, "number of sorted points", (long)n_sorted);
    return;
  }
}
```