user: What is the c source code of the assembly code below?

```asm
<sigindex>:
  endbr64
  push   %r15
  pxor   %xmm0,%xmm0
  push   %r14
  push   %r13
  mov    %edi,%r13d
  push   %r12
  push   %rbp
  mov    %rdx,%rbp
  mov    %ecx,%edx
  push   %rbx
  sub    $0xf8,%rsp
  mov    %ecx,0x1c(%rsp)
  lea    0x60(%rsp),%r12
  mov    $0x10,%ecx
  mov    %r9,0x8(%rsp)
  mov    %r12,%rdi
  mov    %fs:0x28,%rax
  mov    %rax,0xe8(%rsp)
  xor    %eax,%eax
  movaps %xmm0,0x20(%rsp)
  movaps %xmm0,0x30(%rsp)
  movaps %xmm0,0x40(%rsp)
  movaps %xmm0,0x50(%rsp)
  rep stos %rax,%es:(%rdi)
  test   %edx,%edx
  jle    L37
  lea    -0x1(%rdx),%ecx
  mov    %rsi,%r15
  mov    $0x1,%ebx
  lea    0x2(%rcx),%r14
  jmp    L52
  nopw   0x0(%rax,%rax,1)
L22:
  mov    %r8,%rdx
  mov    %r13d,%edi
  mov    %r8,0x10(%rsp)
  mov    %ebx,0x18(%rsp)
  call   <getcodepri@plt>
  mov    0x10(%rsp),%r8
  mov    %eax,%edx
  mov    -0x4(%rbp,%rbx,4),%eax
  sub    $0x1,%eax
  cltq
  cmp    %edx,0x20(%rsp,%rax,4)
  jge    L16
  mov    0x40(%rsp,%rax,4),%esi
  mov    0x18(%rsp),%r10d
  test   %esi,%esi
  je     L18
  sub    $0x1,%esi
  movslq %esi,%rsi
  movl   $0x1,0x60(%rsp,%rsi,4)
L18:
  mov    %edx,0x20(%rsp,%rax,4)
  mov    %r10d,0x40(%rsp,%rax,4)
L128:
  add    $0x1,%rbx
  cmp    %r14,%rbx
  je     L88
L52:
  movzbl -0x1(%r15,%rbx,1),%esi
  test   %sil,%sil
  je     L128
  cmpl   $0x3,-0x4(%rbp,%rbx,4)
  jle    L22
L16:
  movl   $0x1,-0x4(%r12,%rbx,4)
  add    $0x1,%rbx
  cmp    %r14,%rbx
  jne    L52
L88:
  mov    0x1c(%rsp),%r14d
  xor    %ebx,%ebx
  nopw   0x0(%rax,%rax,1)
L121:
  mov    (%r12,%rbx,4),%eax
  test   %eax,%eax
  jne    L42
  mov    0x0(%rbp,%rbx,4),%eax
  mov    0x8(%rsp),%rdi
  sub    $0x1,%eax
  mov    %eax,(%rdi,%rbx,4)
  add    $0x1,%rbx
  cmp    %rbx,%r14
  jne    L121
L37:
  mov    0xe8(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L9
  add    $0xf8,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   (%rax)
L42:
  movzbl (%r15,%rbx,1),%ecx
  mov    %r13d,%edx
  mov    $0x2,%edi
  lea    D7(%rip),%rsi
  call   <trace@plt>
  mov    0x8(%rsp),%rax
  movl   $0xffffffff,(%rax,%rbx,4)
  add    $0x1,%rbx
  cmp    %r14,%rbx
  jne    L121
  jmp    L37
L9:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: extract_symbolic_data
arguments: label: D7
type_guessed: string

tool: D7: rtcm msm: no space in obs data sys=%d code=%d


assistant: ```c
void sigindex(int sys, const unsigned char *code, const int *freq, int n, const char *opt, int *ind) {
  int i, nex, pri, pri_h[8] = {0}, index[8] = {0}, ex[32] = {0};
  for (i = 0; i < n; ++i) {
    if (!code[i]) {
      continue;
    }
    if (freq[i] > 3) {
      ex[i] = 1;
      continue;
    }
    pri = getcodepri(sys, code[i], opt);
    if (pri > pri_h[freq[i] - 1]) {
      if (index[freq[i] - 1]) {
        ex[index[freq[i] - 1] - 1] = 1;
      }
      pri_h[freq[i] - 1] = pri;
      index[freq[i] - 1] = i + 1;
    } else {
      ex[i] = 1;
    }
  }
  for (i = nex = 0; i < n; ++i) {
    if (ex[i] == 0) {
      ind[i] = freq[i] - 1;
    } else if (nex < 0) {
      ind[i] = 3 + nex++;
    } else {
      trace(2, "rtcm msm: no space in obs data sys=%d code=%d\n", sys, code[i]);
      ind[i] = -1;
    }
  }
}
```