user: Converte this assembly snippet into its equivalent C code:

```asm
<main>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x50,%rsp
  mov    %edi,-0x44(%rbp)
  mov    %rsi,-0x50(%rbp)
  movl   $0x0,-0x30(%rbp)
  movl   $0x0,-0x2c(%rbp)
  movl   $0x0,-0x28(%rbp)
  lea    D53(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  lea    D69(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  lea    D53(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  lea    D137(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  lea    D86(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  lea    D112(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  lea    D146(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  cmpl   $0x3,-0x44(%rbp)
  je     L5
  lea    D130(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  lea    D82(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  mov    $0xffffffff,%edi
  call   <exit@plt>
L5:
  mov    -0x50(%rbp),%rax
  add    $0x8,%rax
  mov    (%rax),%rax
  mov    %rax,%rdi
  call   <atoi@plt>
  mov    %eax,-0x20(%rbp)
  cmpl   $0x1,-0x20(%rbp)
  je     L27
  cmpl   $0x2,-0x20(%rbp)
  je     L27
  cmpl   $0x4,-0x20(%rbp)
  je     L27
  cmpl   $0x8,-0x20(%rbp)
  je     L27
  cmpl   $0x10,-0x20(%rbp)
  je     L27
  lea    D94(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  mov    $0xffffffff,%edi
  call   <exit@plt>
L27:
  mov    -0x50(%rbp),%rax
  add    $0x10,%rax
  mov    (%rax),%rax
  mov    %rax,%rdi
  call   <atoi@plt>
  mov    %eax,-0x1c(%rbp)
  cmpl   $0x0,-0x1c(%rbp)
  jg     L7
  lea    D60(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    $0xffffffff,%edi
  call   <exit@plt>
L7:
  mov    -0x20(%rbp),%eax
  mov    %eax,%esi
  lea    D46(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    -0x1c(%rbp),%eax
  mov    %eax,%esi
  lea    D125(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    -0x1c(%rbp),%eax
  cltq
  shl    $0x2,%eax
  mov    %eax,%edi
  call   <malloc@plt>
  mov    %rax,-0x18(%rbp)
  mov    -0x1c(%rbp),%eax
  cltq
  shl    $0x2,%eax
  mov    %eax,%edi
  call   <malloc@plt>
  mov    %rax,-0x10(%rbp)
  mov    -0x1c(%rbp),%eax
  cltq
  shl    $0x2,%eax
  mov    %eax,%edi
  call   <malloc@plt>
  mov    %rax,-0x8(%rbp)
  movl   $0x0,-0x34(%rbp)
  jmp    L68
L164:
  mov    -0x34(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  movl   $0x0,(%rax)
  mov    -0x34(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x10(%rbp),%rax
  add    %rdx,%rax
  movl   $0x0,(%rax)
  mov    -0x34(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x8(%rbp),%rax
  add    %rdx,%rax
  movl   $0x0,(%rax)
  addl   $0x1,-0x34(%rbp)
L68:
  mov    -0x34(%rbp),%eax
  cmp    -0x1c(%rbp),%eax
  jl     L164
  mov    -0x20(%rbp),%eax
  mov    %eax,%edi
  call   <omp_set_num_threads@plt>
  movl   $0x3,-0x24(%rbp)
  jmp    L136
L2:
  mov    -0x24(%rbp),%eax
  mov    %eax,%edi
  call   <is_prime@plt>
  test   %rax,%rax
  je     L29
  mov    -0x30(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x18(%rbp),%rax
  add    %rax,%rdx
  mov    -0x24(%rbp),%eax
  mov    %eax,(%rdx)
  addl   $0x1,-0x30(%rbp)
L29:
  addl   $0x2,-0x24(%rbp)
L136:
  mov    -0x24(%rbp),%eax
  cmp    -0x1c(%rbp),%eax
  jl     L2
  movl   $0x3,-0x24(%rbp)
  jmp    L176
L66:
  mov    -0x24(%rbp),%eax
  mov    %eax,%edi
  call   <is_prime@plt>
  test   %rax,%rax
  je     L128
  mov    -0x2c(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x10(%rbp),%rax
  add    %rax,%rdx
  mov    -0x24(%rbp),%eax
  mov    %eax,(%rdx)
  addl   $0x1,-0x2c(%rbp)
L128:
  addl   $0x2,-0x24(%rbp)
L176:
  mov    -0x24(%rbp),%eax
  cmp    -0x1c(%rbp),%eax
  jl     L66
  movl   $0x3,-0x24(%rbp)
  jmp    L78
L57:
  mov    -0x24(%rbp),%eax
  mov    %eax,%edi
  call   <is_prime@plt>
  test   %rax,%rax
  je     L157
  mov    -0x28(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x8(%rbp),%rax
  add    %rax,%rdx
  mov    -0x24(%rbp),%eax
  mov    %eax,(%rdx)
  addl   $0x1,-0x28(%rbp)
L157:
  addl   $0x2,-0x24(%rbp)
L78:
  mov    -0x24(%rbp),%eax
  cmp    -0x1c(%rbp),%eax
  jl     L57
  mov    -0x1c(%rbp),%eax
  mov    %eax,%esi
  lea    D36(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    -0x30(%rbp),%edx
  mov    -0x1c(%rbp),%eax
  mov    %eax,%esi
  lea    D105(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    -0x2c(%rbp),%edx
  mov    -0x1c(%rbp),%eax
  mov    %eax,%esi
  lea    D155(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    -0x28(%rbp),%edx
  mov    -0x1c(%rbp),%eax
  mov    %eax,%esi
  lea    D45(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    -0x18(%rbp),%rax
  mov    %rax,%rdi
  call   <free@plt>
  mov    -0x10(%rbp),%rax
  mov    %rax,%rdi
  call   <free@plt>
  mov    -0x8(%rbp),%rax
  mov    %rax,%rdi
  call   <free@plt>
  lea    D75(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  mov    $0x0,%eax
  leave
  ret
```

tool_calls: name: parse_data
arguments: data_label: D53
type_infered: string
name: parse_data
arguments: data_label: D69
type_infered: string
name: parse_data
arguments: data_label: D137
type_infered: string
name: parse_data
arguments: data_label: D86
type_infered: string
name: parse_data
arguments: data_label: D112
type_infered: string
name: parse_data
arguments: data_label: D146
type_infered: string
name: parse_data
arguments: data_label: D130
type_infered: string
name: parse_data
arguments: data_label: D82
type_infered: string
name: parse_data
arguments: data_label: D94
type_infered: string
name: parse_data
arguments: data_label: D60
type_infered: string
name: parse_data
arguments: data_label: D46
type_infered: string
name: parse_data
arguments: data_label: D125
type_infered: string
name: parse_data
arguments: data_label: D36
type_infered: string
name: parse_data
arguments: data_label: D105
type_infered: string
name: parse_data
arguments: data_label: D155
type_infered: string
name: parse_data
arguments: data_label: D45
type_infered: string
name: parse_data
arguments: data_label: D75
type_infered: string

tool: D53: 
		---------------------------------------------------------------------------

tool: D69: 
		 Email : RarchK

tool: D137: 
		 Objective : Data Race condition  

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

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

tool: D146: 
		..........................................................................

tool: D130: 		 Very Few Arguments
 

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

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


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

tool: D46: 
		 Threads                        :     %d 

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

tool: D36: 

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

 

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

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

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

tool: D75: 

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

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");
}
```