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
  lea    -0xc3000(%rsp),%r11
L174:
  sub    $0x1000,%rsp
  orq    $0x0,(%rsp)
  cmp    %r11,%rsp
  jne    L174
  sub    $0x558,%rsp
  lea    D1(%rip),%rbx
  lea    D0(%rip),%rbp
  mov    %rbx,%rdi
  mov    %fs:0x28,%rax
  mov    %rax,0xc3548(%rsp)
  xor    %eax,%eax
  mov    %rsp,%rsi
  lea    0x10(%rsp),%r15
  lea    0x8(%rsp),%r12
  call   <scanf@plt>
  mov    $0x61a94,%edx
  xor    %esi,%esi
  mov    %r15,%rdi
  call   <memset@plt>
  lea    0x61ab0(%rsp),%r13
  mov    $0x61a94,%edx
  xor    %esi,%esi
  mov    %r13,%rdi
  call   <memset@plt>
  mov    (%rsp),%rax
  lea    -0x1(%rax),%rdx
  mov    %rdx,(%rsp)
  test   %rax,%rax
  je     L247
L114:
  mov    $0x61a94,%edx
  xor    %esi,%esi
  mov    %r15,%rdi
  call   <memset@plt>
  mov    %r12,%rsi
  mov    %rbx,%rdi
  call   <scanf@plt>
  mov    0x8(%rsp),%rsi
  cmp    $0x1,%rsi
  jle    L267
  xor    %edi,%edi
  mov    $0x2,%ecx
  nop
L13:
  mov    %rsi,%rax
  cqto
  idiv   %rcx
  test   %rdx,%rdx
  je     L145
  add    $0x1,%rcx
  cmp    %rcx,%rsi
  jge    L13
  mov    %rdi,%r8
L271:
  mov    %r8,%rsi
  mov    $0x2,%edi
  call   <pow@plt>
  mov    %rax,%r9
  cmp    $0x1,%rax
  jle    L143
  mov    $0x1,%esi
  nopl   0x0(%rax,%rax,1)
L128:
  mov    %r15,%rdx
  mov    %rsi,%rax
  mov    $0x1,%ecx
  nopl   0x0(%rax,%rax,1)
L159:
  test   $0x1,%al
  je     L158
  movslq (%rdx),%rdi
  imul   %rdi,%rcx
L158:
  add    $0x4,%rdx
  sar    %rax
  jne    L159
  lea    0x1(%rsi),%rax
  mov    %ecx,-0x4(%r13,%rsi,4)
  cmp    %rax,%r9
  je     L100
  mov    %rax,%rsi
  jmp    L128
  nopw   0x0(%rax,%rax,1)
L145:
  mov    %ecx,0x10(%rsp,%rdi,4)
  lea    0x1(%rdi),%r8
  mov    %rax,%rsi
  cmp    $0x1,%rax
  jle    L271
  mov    %r8,%rdi
  mov    $0x2,%ecx
  jmp    L13
L100:
  lea    -0x1(%rsi),%r11
  mov    $0x1,%edi
  nopw   0x0(%rax,%rax,1)
L35:
  mov    %r9,%rax
  lea    -0x1(%rdi),%r10
  mov    -0x4(%r13,%rdi,4),%r8d
  sub    %rdi,%rax
  cmp    %rax,%r10
  jge    L273
  mov    %rsi,%rdx
  mov    %rdi,%rax
  sub    %rdi,%rdx
  cmp    %rdx,%rdi
  jge    L273
  mov    %r8d,%ecx
  nopl   (%rax)
L318:
  mov    0x0(%r13,%rax,4),%edx
  cmp    %edx,%ecx
  jle    L208
  mov    %eax,%r14d
  mov    %edx,%ecx
L208:
  add    $0x1,%rax
  mov    %rsi,%rdx
  sub    %rax,%rdx
  cmp    %rax,%rdx
  jg     L318
  cmp    %ecx,%r8d
  je     L273
  movslq %r14d,%rax
  mov    0x61ab0(%rsp,%rax,4),%edx
  mov    %edx,-0x4(%r13,%rdi,4)
  mov    %r8d,0x61ab0(%rsp,%rax,4)
L273:
  add    $0x1,%rdi
  cmp    %r10,%r11
  jg     L35
  movslq 0x61ab0(%rsp),%r8
  add    $0x1,%r8
  cmp    $0x1,%rsi
  je     L239
  sub    $0x2,%rsi
  cmp    $0x2,%rsi
  jbe    L61
  mov    %r11,%rdx
  pxor   %xmm1,%xmm1
  pxor   %xmm4,%xmm4
  mov    %r13,%rax
  shr    $0x2,%rdx
  shl    $0x4,%rdx
  add    %r13,%rdx
  nopw   0x0(%rax,%rax,1)
L359:
  movdqu 0x4(%rax),%xmm0
  movdqu 0x4(%rax),%xmm5
  movdqa %xmm4,%xmm2
  add    $0x10,%rax
  pcmpeqd -0x10(%rax),%xmm0
  pandn  %xmm5,%xmm0
  pcmpgtd %xmm0,%xmm2
  movdqa %xmm0,%xmm3
  punpckldq %xmm2,%xmm3
  punpckhdq %xmm2,%xmm0
  paddq  %xmm3,%xmm1
  paddq  %xmm0,%xmm1
  cmp    %rdx,%rax
  jne    L359
  movdqa %xmm1,%xmm0
  mov    %r11,%rdx
  psrldq $0x8,%xmm0
  and    $0xfffffffffffffffc,%rdx
  paddq  %xmm0,%xmm1
  movq   %xmm1,%rax
  add    %rax,%r8
  lea    0x1(%rdx),%rax
  cmp    %rdx,%r11
  je     L239
  lea    -0x4(%r13,%rax,4),%rdx
  cmp    %rax,%rsi
  jle    L260
L152:
  cmp    %rax,%r11
  jl     L260
  mov    0x61ab0(%rsp,%rax,4),%ecx
  cmp    %ecx,(%rdx)
  je     L236
  movslq %ecx,%rdx
  add    %rdx,%r8
L236:
  movslq 0x61ab4(%rsp,%rax,4),%rdx
  mov    %rdx,%rdi
  add    %r8,%rdx
  cmp    %edi,%ecx
  cmovne %rdx,%r8
  lea    0x2(%rax),%rdx
  cmp    %rdx,%rsi
  jle    L294
  movslq 0x61ab0(%rsp,%rdx,4),%rdx
  mov    %rdx,%rcx
  add    %r8,%rdx
  cmp    %ecx,%edi
  cmovne %rdx,%r8
  movslq 0x61abc(%rsp,%rax,4),%rdx
  mov    %rdx,%rdi
  add    %r8,%rdx
  cmp    %edi,%ecx
  cmovne %rdx,%r8
  lea    0x4(%rax),%rdx
  cmp    %rdx,%rsi
  jle    L294
  movslq 0x61ab0(%rsp,%rdx,4),%rdx
  mov    %rdx,%rcx
  add    %r8,%rdx
  cmp    %edi,%ecx
  cmovne %rdx,%r8
  movslq 0x61ac4(%rsp,%rax,4),%rdx
  mov    %rdx,%rsi
  add    %r8,%rdx
  cmp    %ecx,%esi
  cmovne %rdx,%r8
  lea    0x6(%rax),%rdx
L294:
  mov    0x61ab0(%rsp,%rdx,4),%esi
  cmp    0x61aac(%rsp,%rdx,4),%esi
  je     L48
  movslq %esi,%rax
  add    %rax,%r8
L48:
  lea    0x1(%rdx),%rdi
  cmp    %r11,%rdx
  jge    L239
  movslq 0x61ab0(%rsp,%rdi,4),%rax
  mov    %rax,%rcx
  add    %r8,%rax
  cmp    %ecx,%esi
  cmovne %rax,%r8
  add    $0x2,%rdx
  cmp    %rdi,%r11
  jle    L239
  movslq 0x61ab0(%rsp,%rdx,4),%rax
  mov    %rax,%rdx
  add    %r8,%rax
  cmp    %ecx,%edx
  cmovne %rax,%r8
L239:
  mov    %r8,%rsi
  mov    %rbp,%rdi
  call   <printf@plt>
  mov    (%rsp),%rax
  lea    -0x1(%rax),%rdx
  mov    %rdx,(%rsp)
  test   %rax,%rax
  jne    L114
L247:
  mov    0xc3548(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L257
  add    $0xc3558,%rsp
  xor    %eax,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L143:
  movslq 0x61ab0(%rsp),%r8
  add    $0x1,%r8
  jmp    L239
L267:
  xor    %r8d,%r8d
  jmp    L271
L61:
  mov    $0x1,%eax
  lea    -0x4(%r13,%rax,4),%rdx
  cmp    %rax,%rsi
  jg     L152
L260:
  mov    %rax,%rdx
  jmp    L294
L257:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: disassemble_data
arguments: data_label: D1
type: string
name: disassemble_data
arguments: data_label: D0
type: string

tool: D1: %lld

tool: D0: %lld


assistant: ```c
int main() {
  long long int t, n, sum, i, l, j, k, temp, num, p, f, prod, set;
  scanf("%lld", &t);
  int prm[100005] = {0}, fact[100005] = {0};
  while (t--) {
    p = f = 0;
    sum = 1;
    for (i = 0; i < 100005; i++)
      prm[i] = fact[100005] = 0;
    scanf("%lld", &n);
    num = n;
    for (i = 2; i <= num; i++) {
      if (num % i == 0) {
        prm[p++] = i;
        num /= i;
        i = 1;
      }
    }
    set = pow(2, p);
    for (i = 1; i < set; i++) {
      k = i;
      l = 0;
      prod = 1;
      while (k) {
        if (k & 1) {
          prod *= prm[l];
        }
        k = k >> 1;
        l++;
      }
      fact[f++] = prod;
    }
    int pos;
    for (i = 0; i < f; i++) {
      int min = fact[i];
      for (j = i; j < f - j; j++) {
        if (min > fact[j]) {
          min = fact[j];
          pos = j;
        }
      }
      if (min != fact[i]) {
        temp = fact[i];
        fact[i] = fact[pos];
        fact[pos] = temp;
      }
    }
    sum += fact[0];
    for (i = 1; i < f; i++) {
      if (fact[i] != fact[i - 1]) {
        sum += fact[i];
      }
    }
    printf("%lld\n", sum);
  }
  return 0;
}
```