user: Please show me the C implementation that matches the assembly code listed below:

```asm
<main>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x1c8,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x1b8(%rsp)
  xor    %eax,%eax
  lea    0x10(%rsp),%rdi
  mov    $0x19,%ecx
  rep stos %rax,%es:(%rdi)
  movw   $0x0,(%rdi)
  movw   $0x2,0x10(%rsp)
  mov    $0x3,%r8d
  mov    $0x1,%r9d
  jmp    L171
L130:
  cmp    %cx,%r9w
  je     L8
L124:
  add    $0x2,%r8d
  cmp    $0x67,%r8d
  je     L34
L171:
  mov    %r8d,%r10d
  lea    0x10(%rsp),%rsi
  mov    $0x0,%ecx
  test   %r9w,%r9w
  jle    L130
L43:
  movswl (%rsi),%edi
  mov    %r8d,%eax
  cltd
  idiv   %edi
  test   %edx,%edx
  je     L130
  add    $0x1,%ecx
  add    $0x2,%rsi
  cmp    %r9w,%cx
  jne    L43
L8:
  movswq %r9w,%rax
  mov    %r10w,0x10(%rsp,%rax,2)
  add    $0x1,%r9d
  jmp    L124
L34:
  lea    D27(%rip),%r15
  lea    D9(%rip),%r14
  jmp    L167
L7:
  add    $0x1,%rbx
L79:
  movswl -0x2(%r13,%rbx,2),%esi
  mov    %r12,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    %ebx,%edx
  cmp    %bp,%bx
  jge    L81
  cmp    $0xe,%bx
  jle    L7
  movswl %dx,%eax
  imul   $0xffff8889,%eax,%eax
  shr    $0x10,%eax
  add    %edx,%eax
  sar    $0x3,%ax
  mov    %edx,%ecx
  sar    $0xf,%cx
  sub    %ecx,%eax
  mov    %eax,%ecx
  shl    $0x4,%ecx
  sub    %eax,%ecx
  cmp    %cx,%dx
  jne    L7
  mov    %r14,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  jmp    L7
L81:
  mov    $0xa,%edi
  call   <putchar@plt>
L167:
  lea    0xe(%rsp),%rsi
  mov    %r15,%rdi
  call   <scanf@plt>
  test   %rax,%rax
  je     L196
  movzwl 0xe(%rsp),%eax
  test   %ax,%ax
  je     L196
  movswl %ax,%esi
  lea    D31(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  movzwl 0x10(%rsp),%ecx
  movzwl 0xe(%rsp),%r8d
  cmp    %r8w,%cx
  jg     L81
  mov    $0x0,%ebp
  mov    $0x0,%edi
L25:
  movslq %edi,%rax
  movw   $0x0,0xe0(%rsp,%rax,2)
  test   %r8w,%r8w
  je     L4
  mov    %r8d,%edx
  mov    $0x0,%esi
  movswl %cx,%ecx
L88:
  movswl %dx,%eax
  cltd
  idiv   %ecx
  mov    %eax,%edx
  add    %eax,%esi
  test   %ax,%ax
  jne    L88
  movslq %edi,%rdi
  mov    %si,0xe0(%rsp,%rdi,2)
L4:
  add    $0x1,%ebp
  movswl %bp,%edi
  movswq %bp,%rax
  movzwl 0x10(%rsp,%rax,2),%ecx
  cmp    %r8w,%cx
  jle    L25
  test   %bp,%bp
  jle    L81
  mov    $0x1,%ebx
  lea    0xe0(%rsp),%r13
  lea    D28(%rip),%r12
  jmp    L79
L196:
  mov    0x1b8(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L63
  mov    $0x0,%eax
  add    $0x1c8,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L63:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: unpack_data
arguments: label: D27
data_type: string
name: unpack_data
arguments: label: D9
data_type: string
name: unpack_data
arguments: label: D31
data_type: string
name: unpack_data
arguments: label: D28
data_type: string

tool: D27: %hd

tool: D9: 
      

tool: D31: %3hd! =

tool: D28: %3hd

assistant: ```c
int main() {
  short n, pr[101] = {2}, fr[101], i = 1, j, en;
  for (j = 3; j <= 101; j += 2) {
    for (en = 0; en < i; en++)
      if (!(j % pr[en]))
        break;
    if (en == i)
      pr[i++] = j;
  }
  while (scanf("%hd", &n) && n) {
    printf("%3hd! =", n);
    for (i = 0; pr[i] <= n; i++) {
      en = n;
      fr[i] = 0;
      while (en) {
        en /= pr[i];
        fr[i] += en;
      }
    }
    for (j = 0; j < i; j++) {
      if (j > 14 && !(j % 15))
        printf("\n      ");
      printf("%3hd", fr[j]);
    }
    printf("\n");
  }
  return 0;
}
```