user: Please show me the C implementation that matches the assembly code listed below:

```asm
<main>:
  endbr64
  push   %r15
  xor    %eax,%eax
  push   %r14
  push   %r13
  push   %r12
  lea    D161(%rip),%r12
  push   %rbp
  mov    %edi,%ebp
  mov    %r12,%rdi
  push   %rbx
  mov    %rsi,%rbx
  sub    $0x18,%rsp
  call   <printf@plt>
  lea    D132(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  mov    %r12,%rdi
  xor    %eax,%eax
  call   <printf@plt>
  lea    D166(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  lea    D22(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  lea    D128(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  lea    D72(%rip),%rdi
  call   <puts@plt>
  cmp    $0x3,%ebp
  je     L79
  lea    D147(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  lea    D158(%rip),%rdi
  call   <puts@plt>
  or     $0xffffffff,%edi
  call   <exit@plt>
L79:
  mov    0x8(%rbx),%rdi
  call   <atoi@plt>
  mov    %eax,%r13d
  cmp    $0x10,%eax
  jbe    L85
L166:
  lea    D167(%rip),%rdi
  call   <puts@plt>
  or     $0xffffffff,%edi
  call   <exit@plt>
L2:
  mov    0x10(%rbx),%rdi
  call   <atoi@plt>
  mov    %eax,%ebp
  test   %eax,%eax
  jle    L172
  mov    %r13d,%esi
  lea    D164(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  mov    %ebp,%esi
  lea    D86(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  lea    0x0(,%rbp,4),%r12d
  mov    %r12d,%edi
  call   <malloc@plt>
  mov    %r12d,%edi
  mov    %rax,%r15
  call   <malloc@plt>
  mov    %r12d,%edi
  mov    %ebp,%r12d
  shl    $0x2,%r12
  mov    %rax,%rbx
  mov    %rax,(%rsp)
  call   <malloc@plt>
  lea    (%r12,%r15,1),%rcx
  lea    (%r12,%rbx,1),%rdi
  lea    (%r12,%rax,1),%rsi
  mov    %rax,0x8(%rsp)
  mov    %rax,%r9
  cmp    %r15,%rsi
  setbe  %dl
  cmp    %rax,%rcx
  setbe  %al
  or     %eax,%edx
  cmp    %rbx,%rcx
  setbe  %al
  cmp    %r15,%rdi
  setbe  %r8b
  or     %r8d,%eax
  test   %al,%dl
  je     L86
  cmp    %r9,%rdi
  setbe  %al
  cmp    %rsi,%rbx
  setae  %dl
  or     %dl,%al
  je     L86
  mov    %r12,%rdx
  xor    %esi,%esi
  mov    %r15,%rdi
  call   <memset@plt>
  mov    (%rsp),%rdi
  mov    %r12,%rdx
  xor    %esi,%esi
  call   <memset@plt>
  mov    0x8(%rsp),%rdi
  mov    %r12,%rdx
  xor    %esi,%esi
  call   <memset@plt>
L42:
  mov    %r13d,%edi
  call   <omp_set_num_threads@plt>
  cmp    $0x3,%ebp
  jle    L114
  mov    $0x3,%r12d
  xor    %r14d,%r14d
  nopl   (%rax)
L174:
  mov    %r12d,%edi
  call   <is_prime@plt>
  test   %rax,%rax
  je     L95
  movslq %r14d,%rax
  add    $0x1,%r14d
  mov    %r12d,(%r15,%rax,4)
L95:
  add    $0x2,%r12d
  cmp    %r12d,%ebp
  jg     L174
  mov    $0x3,%r12d
  xor    %r13d,%r13d
  nopw   0x0(%rax,%rax,1)
L147:
  mov    %r12d,%edi
  call   <is_prime@plt>
  test   %rax,%rax
  je     L24
  mov    (%rsp),%rcx
  movslq %r13d,%rax
  add    $0x1,%r13d
  mov    %r12d,(%rcx,%rax,4)
L24:
  add    $0x2,%r12d
  cmp    %r12d,%ebp
  jg     L147
  mov    $0x3,%ebx
  xor    %r12d,%r12d
  nopl   (%rax)
L99:
  mov    %ebx,%edi
  call   <is_prime@plt>
  test   %rax,%rax
  je     L57
  mov    0x8(%rsp),%rdx
  movslq %r12d,%rax
  add    $0x1,%r12d
  mov    %ebx,(%rdx,%rax,4)
L57:
  add    $0x2,%ebx
  cmp    %ebx,%ebp
  jg     L99
L144:
  mov    %ebp,%esi
  lea    D47(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  mov    %r14d,%edx
  mov    %ebp,%esi
  xor    %eax,%eax
  lea    D57(%rip),%rdi
  call   <printf@plt>
  mov    %r13d,%edx
  mov    %ebp,%esi
  xor    %eax,%eax
  lea    D144(%rip),%rdi
  call   <printf@plt>
  mov    %r12d,%edx
  mov    %ebp,%esi
  xor    %eax,%eax
  lea    D174(%rip),%rdi
  call   <printf@plt>
  mov    %r15,%rdi
  call   <free@plt>
  mov    (%rsp),%rdi
  call   <free@plt>
  mov    0x8(%rsp),%rdi
  call   <free@plt>
  lea    D143(%rip),%rdi
  call   <puts@plt>
  add    $0x18,%rsp
  xor    %eax,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L85:
  mov    $0xfffffffffffefee9,%rax
  mov    %r13d,%ecx
  sar    %cl,%rax
  test   $0x1,%al
  je     L2
  jmp    L166
L172:
  lea    D134(%rip),%rdi
  xor    %eax,%eax
  lea    0x0(,%rbp,4),%r12d
  xor    %r14d,%r14d
  call   <printf@plt>
  or     $0xffffffff,%edi
  call   <exit@plt>
  mov    %r13d,%esi
  lea    D164(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  mov    %ebp,%esi
  lea    D86(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  mov    %r12d,%edi
  call   <malloc@plt>
  mov    %r12d,%edi
  mov    %rax,%r15
  call   <malloc@plt>
  mov    %r12d,%edi
  xor    %r12d,%r12d
  mov    %rax,(%rsp)
  call   <malloc@plt>
  mov    %r13d,%edi
  xor    %r13d,%r13d
  mov    %rax,0x8(%rsp)
  call   <omp_set_num_threads@plt>
  jmp    L144
L86:
  mov    (%rsp),%rsi
  mov    0x8(%rsp),%rdx
  mov    %r15,%rax
  sub    %r15,%rsi
  sub    %r15,%rdx
  nopl   0x0(%rax,%rax,1)
L37:
  movl   $0x0,(%rax)
  movl   $0x0,(%rsi,%rax,1)
  movl   $0x0,(%rdx,%rax,1)
  add    $0x4,%rax
  cmp    %rcx,%rax
  jne    L37
  jmp    L42
L114:
  xor    %r14d,%r14d
  xor    %r13d,%r13d
  xor    %r12d,%r12d
  jmp    L144
```

tool_calls: name: retrieve_data
arguments: tag: D161
datatype: string
name: retrieve_data
arguments: tag: D132
datatype: string
name: retrieve_data
arguments: tag: D166
datatype: string
name: retrieve_data
arguments: tag: D22
datatype: string
name: retrieve_data
arguments: tag: D128
datatype: string
name: retrieve_data
arguments: tag: D72
datatype: string
name: retrieve_data
arguments: tag: D147
datatype: string
name: retrieve_data
arguments: tag: D158
datatype: string
name: retrieve_data
arguments: tag: D167
datatype: string
name: retrieve_data
arguments: tag: D164
datatype: string
name: retrieve_data
arguments: tag: D86
datatype: string
name: retrieve_data
arguments: tag: D47
datatype: string
name: retrieve_data
arguments: tag: D57
datatype: string
name: retrieve_data
arguments: tag: D144
datatype: string
name: retrieve_data
arguments: tag: D174
datatype: string
name: retrieve_data
arguments: tag: D143
datatype: string
name: retrieve_data
arguments: tag: D134
datatype: string

tool: D161: 
		---------------------------------------------------------------------------

tool: D132: 
		 Email : RarchK

tool: D166: 
		 Objective : Data Race condition  

tool: D22: 
		 OpenMP program to find the total prime numbers between a given range of numbers 

tool: D128: 
		 using OpenMP Parallel for directive and Critical Section 

tool: D72: 
		..........................................................................

tool: D147: 		 Very Few Arguments
 

tool: D158: 		 Syntax : exec <Threads> <upper bound to fine prime nos.>

tool: D167: 
 Number of threads should be 1,2,4,8 or 16 for the execution of program. 


tool: D164: 
		 Threads                        :     %d 

tool: D86: 
		 Range to find Prime No. is     : 1 - %d 

tool: D47: 

		 Prime number calculation between [ 1 - %d ] ...........Done 

 

tool: D57: 
		 The Prime No. found range [ 1 - %d ] by parallel calculation ( without critical section ) is : %d 

tool: D144: 
		 The Prime No. found range [ 1 - %d ] by parallel calculation (with critical section ) is     : %d 

tool: D174: 
		 The Prime No. found range [ 1 - %d ] by serial calculation is                                : %d 

tool: D143: 

		.............................................................................................

tool: D134: 
		 To find the Prime number the upper bound should be greater than 2 
 

assistant: ```c
main(int argc, char **argv) {
  int *Array, *Primearray, *Check, Noofthreads, i;
  int Countdatarace = 0, Countparallel = 0, Count = 0, number, Maxnumber;
  printf("\n\t\t---------------------------------------------------------------------------");
  printf("\n\t\t Email : RarchK");
  printf("\n\t\t---------------------------------------------------------------------------");
  printf("\n\t\t Objective : Data Race condition  ");
  printf("\n\t\t OpenMP program to find the total prime numbers between a given range of numbers ");
  printf("\n\t\t using OpenMP Parallel for directive and Critical Section ");
  printf("\n\t\t..........................................................................\n");
  if (argc != 3) {
    printf("\t\t Very Few Arguments\n ");
    printf("\t\t Syntax : exec <Threads> <upper bound to fine prime nos.>\n");
    exit(-1);
  }
  Noofthreads = atoi(argv[1]);
  if ((Noofthreads != 1) && (Noofthreads != 2) && (Noofthreads != 4) && (Noofthreads != 8) && (Noofthreads != 16)) {
    printf("\n Number of threads should be 1,2,4,8 or 16 for the execution of program. \n\n");
    exit(-1);
  }
  Maxnumber = atoi(argv[2]);
  if (Maxnumber <= 0) {
    printf("\n\t\t To find the Prime number the upper bound should be greater than 2 \n ");
    exit(-1);
  }
  printf("\n\t\t Threads                        :     %d ", Noofthreads);
  printf("\n\t\t Range to find Prime No. is     : 1 - %d ", Maxnumber);
  Array = (int *)malloc(sizeof(int) * Maxnumber);
  Primearray = (int *)malloc(sizeof(int) * Maxnumber);
  Check = (int *)malloc(sizeof(int) * Maxnumber);
  for (i = 0; i < Maxnumber; i++) {
    Array[i] = 0;
    Primearray[i] = 0;
    Check[i] = 0;
  }
  omp_set_num_threads(Noofthreads);
#pragma omp parallel for
  for (number = 3; number < Maxnumber; number += 2) {
    if (is_prime(number)) {
      Array[Countdatarace] = number;
      Countdatarace++;
    }
  }
#pragma omp parallel for
  for (number = 3; number < Maxnumber; number += 2) {
    if (is_prime(number)) {
#pragma omp critical
      {
        Primearray[Countparallel] = number;
        Countparallel++;
      }
    }
  }
  for (number = 3; number < Maxnumber; number += 2) {
    if (is_prime(number)) {
      Check[Count] = number;
      Count++;
    }
  }
  printf("\n\n\t\t Prime number calculation between [ 1 - %d ] ...........Done \n\n ", Maxnumber);
  printf("\n\t\t The Prime No. found range [ 1 - %d ] by parallel calculation ( without critical section ) is : %d ", Maxnumber, Countdatarace);
  printf("\n\t\t The Prime No. found range [ 1 - %d ] by parallel calculation (with critical section ) is     : %d ", Maxnumber, Countparallel);
  printf("\n\t\t The Prime No. found range [ 1 - %d ] by serial calculation is                                : %d ", Maxnumber, Count);
  free(Array);
  free(Primearray);
  free(Check);
  printf("\n\n\t\t.............................................................................................\n");
}
```