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

```asm
<main>:
  endbr64
  push   %r15
  mov    $0xf4240,%edi
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x28,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x18(%rsp)
  xor    %eax,%eax
  lea    0x8(%rsp),%rdx
  mov    %rsp,%rsi
  call   <prime_sieve@plt>
  test   %eax,%eax
  jle    L41
  cltq
  xor    %r15d,%r15d
  xor    %r13d,%r13d
  mov    $0x2,%r12d
  lea    0x0(,%rax,4),%rbp
  lea    0x11(%rsp),%rbx
  lea    D3(%rip),%r14
  jmp    L242
L187:
  add    $0x4,%r15
  cmp    %rbp,%r15
  je     L134
L242:
  mov    0x8(%rsp),%rax
  mov    %r14,%rsi
  mov    %rbx,%rdi
  mov    (%rax,%r15,1),%edx
  xor    %eax,%eax
  call   <sprintf@plt>
  mov    %rbx,%rdi
  call   <strlen@plt>
  mov    %rax,%rsi
  mov    %eax,%ecx
  cmp    $0x1,%rax
  jbe    L164
  lea    -0x1(%rax),%edi
  mov    %r12d,%eax
  mov    (%rsp),%r9
  cltd
  idiv   %esi
  mov    %edi,%eax
  sub    %edx,%eax
  cltq
  movsbl 0x11(%rsp,%rax,1),%r10d
  lea    -0x2(%rsi),%eax
  cltq
  movsbl 0x11(%rsp,%rax,1),%eax
  sub    $0x30,%r10d
  lea    (%r10,%r10,4),%edx
  lea    -0x30(%rax,%rdx,2),%r11d
  cmp    $0x2,%esi
  je     L33
  mov    $0x3,%eax
  cltd
  idiv   %esi
  mov    %edi,%eax
  sub    %edx,%eax
  cltq
  movsbl 0x11(%rsp,%rax,1),%r8d
  sub    $0x30,%r8d
  imul   $0x64,%r8d,%r8d
  add    %r11d,%r8d
  cmp    $0x3,%esi
  je     L142
  mov    $0x4,%eax
  cltd
  idiv   %esi
  mov    %edi,%eax
  sub    %edx,%eax
  cltq
  movsbl 0x11(%rsp,%rax,1),%eax
  sub    $0x30,%eax
  imul   $0x3e8,%eax,%eax
  add    %eax,%r8d
  cmp    $0x4,%esi
  je     L142
  mov    $0x5,%eax
  cltd
  idiv   %esi
  mov    %edi,%eax
  sub    %edx,%eax
  cltq
  movsbl 0x11(%rsp,%rax,1),%eax
  sub    $0x30,%eax
  imul   $0x2710,%eax,%eax
  add    %eax,%r8d
  cmp    $0x6,%esi
  jne    L142
  movslq %edi,%rax
  movsbl 0x11(%rsp,%rax,1),%eax
  sub    $0x30,%eax
  imul   $0x186a0,%eax,%eax
  add    %eax,%r8d
L142:
  movslq %r8d,%r8
  cmpb   $0x0,(%r9,%r8,1)
  je     L187
  mov    $0x3,%eax
  cltd
  idiv   %ecx
  mov    %edi,%eax
  sub    %edx,%eax
  cltq
  movsbl 0x11(%rsp,%rax,1),%r11d
  sub    $0x30,%r11d
  lea    (%r11,%r11,4),%eax
  lea    (%r10,%rax,2),%r8d
  mov    $0x4,%eax
  cltd
  idiv   %ecx
  mov    %edi,%eax
  sub    %edx,%eax
  cltq
  movsbl 0x11(%rsp,%rax,1),%eax
  sub    $0x30,%eax
  imul   $0x64,%eax,%eax
  lea    (%rax,%r8,1),%r10d
  cmp    $0x3,%esi
  je     L93
  mov    $0x5,%eax
  cltd
  idiv   %ecx
  mov    %edi,%eax
  sub    %edx,%eax
  cltq
  movsbl 0x11(%rsp,%rax,1),%r8d
  sub    $0x30,%r8d
  imul   $0x3e8,%r8d,%r8d
  add    %r10d,%r8d
  cmp    $0x4,%esi
  je     L125
  mov    $0x6,%eax
  cltd
  idiv   %ecx
  mov    %edi,%eax
  sub    %edx,%eax
  cltq
  movsbl 0x11(%rsp,%rax,1),%eax
  sub    $0x30,%eax
  imul   $0x2710,%eax,%eax
  add    %eax,%r8d
  cmp    $0x6,%esi
  jne    L125
  movsbl 0x15(%rsp),%eax
  sub    $0x30,%eax
  imul   $0x186a0,%eax,%eax
  add    %eax,%r8d
L125:
  movslq %r8d,%r8
  cmpb   $0x0,(%r9,%r8,1)
  je     L187
  mov    $0x4,%eax
  cltd
  idiv   %ecx
  mov    %edi,%eax
  sub    %edx,%eax
  cltq
  movsbl 0x11(%rsp,%rax,1),%r10d
  sub    $0x30,%r10d
  lea    (%r10,%r10,4),%eax
  lea    (%r11,%rax,2),%r11d
  mov    $0x5,%eax
  cltd
  idiv   %ecx
  mov    %edi,%eax
  sub    %edx,%eax
  cltq
  movsbl 0x11(%rsp,%rax,1),%r8d
  mov    $0x6,%eax
  cltd
  idiv   %ecx
  mov    %edi,%eax
  sub    $0x30,%r8d
  imul   $0x64,%r8d,%r8d
  add    %r11d,%r8d
  sub    %edx,%eax
  cltq
  movsbl 0x11(%rsp,%rax,1),%eax
  sub    $0x30,%eax
  imul   $0x3e8,%eax,%eax
  add    %eax,%r8d
  cmp    $0x4,%esi
  je     L243
  mov    $0x7,%eax
  cltd
  idiv   %ecx
  mov    %edi,%eax
  sub    %edx,%eax
  cltq
  movsbl 0x11(%rsp,%rax,1),%eax
  sub    $0x30,%eax
  imul   $0x2710,%eax,%eax
  add    %r8d,%eax
  cmp    $0x6,%esi
  jne    L28
  movsbl 0x14(%rsp),%edx
  sub    $0x30,%edx
  imul   $0x186a0,%edx,%edx
  add    %edx,%eax
L28:
  cltq
  cmpb   $0x0,(%r9,%rax,1)
  je     L187
  mov    $0x5,%eax
  cltd
  idiv   %ecx
  mov    %edi,%eax
  sub    %edx,%eax
  cltq
  movsbl 0x11(%rsp,%rax,1),%r8d
  sub    $0x30,%r8d
  lea    (%r8,%r8,4),%eax
  lea    (%r10,%rax,2),%r10d
  mov    $0x6,%eax
  cltd
  idiv   %ecx
  mov    %edi,%eax
  sub    %edx,%eax
  cltq
  movsbl 0x11(%rsp,%rax,1),%r11d
  mov    $0x7,%eax
  cltd
  idiv   %ecx
  sub    $0x30,%r11d
  mov    %edi,%eax
  imul   $0x64,%r11d,%r11d
  add    %r10d,%r11d
  sub    %edx,%eax
  cltq
  movsbl 0x11(%rsp,%rax,1),%r10d
  mov    $0x8,%eax
  cltd
  idiv   %ecx
  mov    %edi,%eax
  sub    $0x30,%r10d
  imul   $0x3e8,%r10d,%r10d
  add    %r11d,%r10d
  sub    %edx,%eax
  cltq
  movsbl 0x11(%rsp,%rax,1),%eax
  sub    $0x30,%eax
  imul   $0x2710,%eax,%eax
  add    %r10d,%eax
  cmp    $0x6,%esi
  jne    L245
  movsbl 0x13(%rsp),%edx
  sub    $0x30,%edx
  imul   $0x186a0,%edx,%ecx
  add    %ecx,%eax
  cltq
  cmpb   $0x0,(%r9,%rax,1)
  je     L187
  movsbl 0x15(%rsp),%ecx
  movslq %edi,%rdi
  imul   $0x2710,%edx,%edx
  movsbl 0x11(%rsp,%rdi,1),%eax
  sub    $0x30,%ecx
  imul   $0x64,%ecx,%ecx
  lea    -0xf0(%rax,%rax,4),%eax
  lea    (%r8,%rax,2),%eax
  add    %eax,%ecx
  movsbl 0x14(%rsp),%eax
  sub    $0x30,%eax
  imul   $0x3e8,%eax,%eax
  add    %ecx,%eax
  add    %eax,%edx
  movsbl 0x12(%rsp),%eax
  sub    $0x30,%eax
  imul   $0x186a0,%eax,%eax
  add    %edx,%eax
L245:
  cltq
  movzbl (%r9,%rax,1),%eax
L77:
  test   %al,%al
  je     L187
L164:
  add    $0x4,%r15
  add    $0x1,%r13d
  cmp    %rbp,%r15
  jne    L242
L134:
  mov    %r13d,%esi
  lea    D18(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  mov    (%rsp),%rdi
  call   <free@plt>
  mov    0x8(%rsp),%rdi
  call   <free@plt>
  mov    0x18(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L220
  add    $0x28,%rsp
  xor    %eax,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L33:
  movslq %r11d,%r11
  movzbl (%r9,%r11,1),%eax
  jmp    L77
L93:
  movslq %r10d,%rax
  movzbl (%r9,%rax,1),%eax
  jmp    L77
L243:
  movslq %r8d,%r8
  movzbl (%r9,%r8,1),%eax
  jmp    L77
L41:
  xor    %r13d,%r13d
  jmp    L134
L220:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: disassemble_data
arguments: data_label: D3
type: string
name: disassemble_data
arguments: data_label: D18
type: string

tool: D3: %d

tool: D18: %d


assistant: ```c
int main(int argc, char **argv) {
  int np;
  char *sieve;
  int *primes;
  np = prime_sieve(1000000, &sieve, &primes);
  char str[7];
  int cp, ncp = 0;
  int i, j, k, d, s, len;
  for (i = 0; i < np; i++) {
    sprintf(str, "%d", primes[i]);
    len = strlen(str);
    cp = 1;
    for (j = 1; j < len && cp; j++) {
      s = 0;
      for (k = 0, d = 1; k < len; k++, d *= 10)
        s += (str[len - 1 - (j + k) % len] - '0') * d;
      if (!sieve[s])
        cp = 0;
    }
    if (cp)
      ncp++;
  }
  printf("%d\n", ncp);
  free(sieve);
  free(primes);
  return 0;
}
```