user: Demonstrate the C code that generates the assembly output below:

```asm
<main>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x8,%rsp
  cmp    $0x4,%edi
  jle    L54
  mov    0x8(%rsi),%rdi
  mov    %rsi,%rbp
  xor    %esi,%esi
  mov    $0xa,%edx
  lea    D6(%rip),%r15
  call   <strtol@plt>
  mov    0x10(%rbp),%rdi
  mov    $0xa,%edx
  xor    %esi,%esi
  mov    %eax,%r13d
  call   <strtol@plt>
  mov    0x18(%rbp),%rdi
  mov    $0xa,%edx
  xor    %esi,%esi
  mov    %eax,%r12d
  call   <strtol@plt>
  mov    0x20(%rbp),%rsi
  mov    $0xa,%edx
  xor    %edi,%edi
  xor    %ebp,%ebp
  mov    %eax,%ebx
  call   <mpz_init_set_str@plt>
  xor    %esi,%esi
  mov    %ebp,%edi
  call   <mpz_init_set_ui@plt>
  xor    %edi,%edi
  call   <mpz_init@plt>
  mov    %ebp,%edi
  call   <mpz_init@plt>
  jmp    L12
  nopl   0x0(%rax,%rax,1)
L9:
  mov    %r14d,%edx
  mov    %ebp,%esi
  lea    D7(%rip),%rdi
  call   <gmp_printf@plt>
L16:
  xor    %ebp,%ebp
  mov    $0x1,%edx
  mov    %ebp,%esi
  mov    %ebp,%edi
  call   <mpz_add_ui@plt>
L12:
  xor    %ebp,%ebp
  xor    %esi,%esi
  mov    %ebp,%edi
  call   <mpz_cmp@plt>
  test   %rax,%rax
  jg     L14
  xor    %r14d,%r14d
  xor    %ebp,%ebp
  mov    %ebp,%edx
  mov    %ebp,%esi
  mov    %r14d,%edi
  call   <mpz_mul@plt>
  mov    %r13d,%edx
  mov    %r14d,%esi
  mov    %r14d,%edi
  call   <mpz_mul_ui@plt>
  mov    %r12d,%edx
  mov    %ebp,%esi
  mov    %ebp,%edi
  call   <mpz_mul_ui@plt>
  mov    %ebp,%edx
  mov    %r14d,%esi
  mov    %r14d,%edi
  call   <mpz_add@plt>
  mov    %r14d,%edi
  mov    %ebx,%edx
  mov    %r14d,%esi
  call   <mpz_add_ui@plt>
  mov    %r14d,%edi
  call   <isprime@plt>
  test   %rax,%rax
  jne    L9
  xor    %edx,%edx
  xor    %esi,%esi
  mov    %r15,%rdi
  call   <gmp_printf@plt>
  jmp    L16
L14:
  mov    %ebp,%edi
  call   <mpz_clear@plt>
  xor    %edi,%edi
  call   <mpz_clear@plt>
  xor    %edi,%edi
  call   <mpz_clear@plt>
  mov    %ebp,%edi
  call   <mpz_clear@plt>
  xor    %eax,%eax
L18:
  add    $0x8,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L54:
  lea    D27(%rip),%rdi
  call   <printf@plt>
  mov    $0x1,%eax
  jmp    L18
```

tool_calls: name: unpack_data
arguments: tag: D6
type_infered: string
name: unpack_data
arguments: tag: D7
type_infered: string
name: unpack_data
arguments: tag: D27
type_infered: string

tool: D6: %Zd %Zd NG


tool: D7: %Zd %Zd OK


tool: D27: usage : primegen a b c max_n


assistant: ```c
int main(int ac, char *av[]) {
  int a, b, c;
  mpz_t n, n2, max_n, tmp;
  if (ac < 5) {
    printf("usage : primegen a b c max_n\n");
    return (1);
  }
  a = strtol(av[1], NULL, 10);
  b = strtol(av[2], NULL, 10);
  c = strtol(av[3], NULL, 10);
  mpz_init_set_str(max_n, av[4], 10);
  mpz_init_set_ui(n, 0);
  mpz_init(n2);
  mpz_init(tmp);
  while (mpz_cmp(n, max_n) <= 0) {
    mpz_mul(n2, n, n);
    mpz_mul_ui(n2, n2, a);
    mpz_mul_ui(tmp, n, b);
    mpz_add(n2, n2, tmp);
    mpz_add_ui(n2, n2, c);
    if (isprime(n2))
      gmp_printf("%Zd %Zd OK\n", n, n2);
    else
      gmp_printf("%Zd %Zd NG\n", n, n2);
    mpz_add_ui(n, n, 1);
  }
  mpz_clear(n);
  mpz_clear(n2);
  mpz_clear(max_n);
  mpz_clear(tmp);
  return (0);
}
```