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

```asm
<main>:
  endbr64
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  mov    %rsi,%rbx
  sub    $0x18,%rsp
  cmp    $0x1,%edi
  jle    L299
L163:
  mov    0x8(%rbx),%rdi
  call   <atoi@plt>
  mov    %eax,%ebp
  cmp    $0x1,%eax
  jle    L173
  mov    %eax,%esi
  lea    D45(%rip),%rdi
  lea    -0x1(%rbp),%r13d
  xor    %eax,%eax
  call   <printf@plt>
  lea    0x4(,%rbp,4),%edi
  call   <malloc@plt>
  mov    %rax,%rbx
  lea    -0x2(%rbp),%eax
  cmp    $0x2,%eax
  jbe    L273
  mov    %r13d,%edx
  lea    0x8(%rbx),%r12
  movdqa D9(%rip),%xmm2
  shr    $0x2,%edx
  mov    %r12,%rax
  sub    $0x1,%edx
  shl    $0x4,%rdx
  lea    0x18(%rbx,%rdx,1),%rdx
  xchg   %ax,%ax
L241:
  movups %xmm2,(%rax)
  add    $0x10,%rax
  cmp    %rdx,%rax
  jne    L241
  mov    %r13d,%edx
  and    $0xfffffffc,%edx
  lea    0x2(%rdx),%eax
  cmp    %edx,%r13d
  je     L217
L62:
  movslq %eax,%rdx
  movl   $0x1,(%rbx,%rdx,4)
  lea    0x0(,%rdx,4),%rcx
  lea    0x1(%rax),%edx
  cmp    %edx,%ebp
  jl     L9
  add    $0x2,%eax
  movl   $0x1,0x4(%rbx,%rcx,1)
  cmp    %eax,%ebp
  jl     L9
  movl   $0x1,0x8(%rbx,%rcx,1)
L9:
  pxor   %xmm0,%xmm0
  cvtsi2sd %ebp,%xmm0
  call   <sqrt@plt>
  mov    %eax,%esi
  cmp    $0x1,%eax
  jle    L289
L322:
  mov    $0x4,%ecx
  mov    $0x2,%eax
  jmp    L320
  xchg   %ax,%ax
L314:
  add    $0x1,%rax
  add    $0x2,%ecx
  cmp    %eax,%esi
  jl     L185
L320:
  cmpl   $0x1,(%rbx,%rax,4)
  jne    L314
  cmp    %ecx,%ebp
  jl     L314
  movslq %ecx,%rdx
  nopl   0x0(%rax,%rax,1)
L195:
  movl   $0x0,(%rbx,%rdx,4)
  add    %rax,%rdx
  cmp    %edx,%ebp
  jge    L195
  add    $0x1,%rax
  add    $0x2,%ecx
  cmp    %eax,%esi
  jge    L320
  nopl   0x0(%rax)
L185:
  cmp    $0x1,%ebp
  jle    L147
  lea    -0x1(%rbp),%r13d
L289:
  cmp    $0x1,%ebp
  mov    $0x1,%ecx
  cmovg  %r13d,%ecx
  cmp    $0x4,%ebp
  jle    L101
  movdqa D9(%rip),%xmm2
  lea    0x8(%rbx),%r12
L11:
  mov    %ecx,%edx
  mov    %r12,%rax
  pxor   %xmm0,%xmm0
  shr    $0x2,%edx
  sub    $0x1,%edx
  shl    $0x4,%rdx
  lea    0x18(%rbx,%rdx,1),%rdx
  cs nopw 0x0(%rax,%rax,1)
L216:
  movdqu (%rax),%xmm1
  add    $0x10,%rax
  pcmpeqd %xmm2,%xmm1
  psubd  %xmm1,%xmm0
  cmp    %rax,%rdx
  jne    L216
  movdqa %xmm0,%xmm1
  mov    %ecx,%edx
  psrldq $0x8,%xmm1
  and    $0xfffffffc,%edx
  paddd  %xmm1,%xmm0
  lea    0x2(%rdx),%eax
  movdqa %xmm0,%xmm1
  psrldq $0x4,%xmm1
  paddd  %xmm1,%xmm0
  movd   %xmm0,%esi
  cmp    %edx,%ecx
  je     L132
L47:
  movslq %eax,%rdx
  cmpl   $0x1,(%rbx,%rdx,4)
  lea    0x0(,%rdx,4),%rcx
  je     L20
L134:
  lea    0x1(%rax),%edx
  cmp    %ebp,%edx
  jg     L132
  cmpl   $0x1,0x4(%rbx,%rcx,1)
  je     L104
L49:
  add    $0x2,%eax
  cmp    %ebp,%eax
  jg     L132
  cmpl   $0x1,0x8(%rbx,%rcx,1)
  je     L260
L132:
  lea    D23(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  add    $0x18,%rsp
  xor    %eax,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  ret
L20:
  add    $0x1,%esi
  jmp    L134
L104:
  add    $0x1,%esi
  jmp    L49
L173:
  lea    D55(%rip),%rdi
  call   <puts@plt>
  xor    %edi,%edi
  call   <exit@plt>
  mov    %ebp,%esi
  lea    D45(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  lea    0x4(,%rbp,4),%edi
  call   <malloc@plt>
  pxor   %xmm0,%xmm0
  cvtsi2sd %ebp,%xmm0
  mov    %rax,%rbx
  call   <sqrt@plt>
  mov    %eax,%esi
  sub    $0x1,%eax
  jg     L322
L147:
  xor    %esi,%esi
  jmp    L132
L299:
  lea    D60(%rip),%rdi
  call   <puts@plt>
  xor    %edi,%edi
  call   <exit@plt>
  jmp    L163
L217:
  pxor   %xmm0,%xmm0
  movaps %xmm2,(%rsp)
  cvtsi2sd %ebp,%xmm0
  call   <sqrt@plt>
  movdqa (%rsp),%xmm2
  mov    %eax,%esi
  sub    $0x1,%eax
  jg     L322
  cmp    $0x1,%ebp
  mov    $0x1,%ecx
  cmovg  %r13d,%ecx
  jmp    L11
L260:
  add    $0x1,%esi
  jmp    L132
L273:
  mov    $0x2,%eax
  jmp    L62
L101:
  mov    $0x2,%eax
  xor    %esi,%esi
  jmp    L47
```

tool_calls: name: unpack_data
arguments: label: D45
type_infered: string
name: unpack_data
arguments: label: D9
type_infered: byte[16]
name: unpack_data
arguments: label: D23
type_infered: string
name: unpack_data
arguments: label: D55
type_infered: string
name: unpack_data
arguments: label: D60
type_infered: string

tool: D45: Finding primes in range 1..%d


tool: {"D9": [0x01,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x01,0x00,0x00,0x00]}

tool: D23: Total %d primes found


tool: D55: N must be greater than 1

tool: D60: Usage: ./prime <N>

assistant: ```c
int main(int argc, char **argv) {
  int N;
  if (argc < 2) {
    printf("Usage: ./prime <N>\n");
    exit(0);
  }
  if ((N = atoi(argv[1])) < 2) {
    printf("N must be greater than 1\n");
    exit(0);
  }
  printf("Finding primes in range 1..%d\n", N);
  int *array = (int *)malloc(sizeof(int) * (N + 1));
  for (int i = 2; i <= N; i++)
    array[i] = 1;
  int limit = (int)sqrt((double)N);
  for (int i = 2; i <= limit; i++) {
    if (array[i] == 1) {
      for (int j = i + i; j <= N; j += i)
        array[j] = 0;
    }
  }
  int cnt = 0;
  for (int i = 2; i <= N; i++) {
    if (array[i] == 1)
      cnt++;
  }
  printf("Total %d primes found\n", cnt);
}
```