Implement the following C++ code in assembly language, using the block-structured .IF and .WHILE directives. Assume that all variables are 32-bit signed integers:

```
int array[] = {10,60,20,33,72,89,45,65,72,18}; 
int sample = 50;

int ArraySize = sizeof array / sizeof sample; 
int index = 0; int sum = 0; 
while( index < ArraySize ) 
{ 
  if( array[index] <= sample ) 
  { 
    sum += array[index]; 
  } 
  index++;
} 

```

I have no idea how to do this.

This is what I know.

```
.WHILE index<ArraySize

.IF array(NO CLUE HOW TO DO INDEX ON ASEMBLY) <= sample
sum +=array(AGAIN NO IDEA)
.ENDIF
inc index
.ENDW

```

I really am trying I am just so confused. Also, this is an online course from Coursera so no, you're not doing my homework for me and I do pay attention. I am just struggling.