user: Translate the below assembly code into C programming language:

```asm
<main>:
  endbr64
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x28,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x18(%rsp)
  xor    %eax,%eax
  cmp    $0x1,%edi
  jg     L57
  mov    $0x222e0,%edi
  call   <malloc@plt>
  mov    $0x222e0,%edi
  mov    %rax,%rbx
  call   <malloc@plt>
  mov    $0x88b8,%r8d
  mov    $0x88b7,%ecx
  mov    %rax,%rbp
L88:
  mov    %ecx,%edx
  movdqa D18(%rip),%xmm0
  movdqa D12(%rip),%xmm2
  lea    0x4(%rbx),%rax
  shr    $0x2,%edx
  sub    $0x1,%edx
  shl    $0x4,%rdx
  lea    0x14(%rbx,%rdx,1),%rdx
  nopl   0x0(%rax)
L30:
  movdqa %xmm0,%xmm1
  add    $0x10,%rax
  paddd  %xmm2,%xmm0
  movups %xmm1,-0x10(%rax)
  cmp    %rdx,%rax
  jne    L30
  mov    %ecx,%edx
  and    $0xfffffffc,%edx
  lea    0x1(%rdx),%eax
  cmp    %ecx,%edx
  je     L141
L91:
  movslq %eax,%rdx
  mov    %eax,(%rbx,%rdx,4)
  lea    0x0(,%rdx,4),%rcx
  lea    0x1(%rax),%edx
  cmp    %r8d,%edx
  jge    L141
  add    $0x2,%eax
  mov    %edx,0x4(%rbx,%rcx,1)
  cmp    %r8d,%eax
  jge    L141
  mov    %eax,0x8(%rbx,%rcx,1)
L141:
  movl   $0x2,0x14(%rsp)
  cmp    $0x2,%r8d
  jle    L138
  mov    $0x2,%edx
  jmp    L121
  nopl   0x0(%rax)
L150:
  mov    %rbp,%rsi
  mov    %rbx,%rdi
  call   <sieve@plt>
  mov    %eax,%r8d
  mov    0x14(%rsp),%eax
  lea    0x1(%rax),%edx
  mov    %edx,0x14(%rsp)
  cmp    %r8d,%edx
  jge    L138
L121:
  movslq %edx,%rax
  mov    (%rbx,%rax,4),%ecx
  lea    (%rcx,%rdx,1),%eax
  cmp    %r8d,%eax
  jl     L150
L138:
  lea    0x14(%rsp),%r12
  lea    D3(%rip),%rbp
  lea    D37(%rip),%r13
  jmp    L92
  nopl   0x0(%rax)
L63:
  mov    0x4(%rbx,%rax,4),%esi
  mov    %r13,%rdi
  call   <printf@plt>
L92:
  mov    %r12,%rsi
  mov    %rbp,%rdi
  call   <scanf@plt>
  movslq 0x14(%rsp),%rax
  test   %eax,%eax
  jne    L63
  mov    0x18(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L72
  add    $0x28,%rsp
  xor    %eax,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  ret
L57:
  mov    0x8(%rsi),%rdi
  call   <atoi@plt>
  lea    0x0(,%rax,4),%ebp
  mov    %eax,0xc(%rsp)
  mov    %ebp,%edi
  call   <malloc@plt>
  mov    %ebp,%edi
  mov    %rax,%rbx
  call   <malloc@plt>
  mov    0xc(%rsp),%r8d
  mov    %rax,%rbp
  cmp    $0x1,%r8d
  jle    L112
  lea    -0x1(%r8),%ecx
  cmp    $0x4,%r8d
  jg     L88
  mov    $0x1,%eax
  jmp    L91
L112:
  movl   $0x2,0x14(%rsp)
  jmp    L138
L72:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: disassemble_data
arguments: tag: D18
type_infered: byte[16]
name: disassemble_data
arguments: tag: D12
type_infered: byte[16]
name: disassemble_data
arguments: tag: D3
type_infered: string
name: disassemble_data
arguments: tag: D37
type_infered: string

tool: {"D18": [0x01,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x03,0x00,0x00,0x00,0x04,0x00,0x00,0x00]}

tool: {"D12": [0x04,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x04,0x00,0x00,0x00]}

tool: D3: %d

tool: D37: %d


assistant: ```c
int main(int ac, char **av) {
  int i;
  int N = 35000;
  int *x;
  int *y;
  int nx;
  if (ac > 1)
    N = atoi(av[1]);
  x = (int *)malloc(N * sizeof(int));
  y = (int *)malloc(N * sizeof(int));
  for (i = 1; i < N; i++) {
    x[i] = i;
  }
  nx = N;
  for (i = 2; i < nx && i + x[i] < nx; i++) {
    nx = sieve(x, y, i, x[i], nx);
  }
  while (1) {
    scanf("%d", &i);
    if (i == 0)
      break;
    printf("%d\n", x[i + 1]);
  }
  return 0;
}
```