$\require{cancel}$
set index to 0
set offset to 0
set sum to 0
beq index maxsize
lw array[offset] // integer operation
add offset to sum // floating point operation
increment index
increment offset
b top
i = 0
while i < n
//A[i] = A[i] + B[i]
lw A[i]
Add i 1
lw B[i]
nop
nop
add A[i], B[i]
sw A[i]
add offset 4
while i < n
lw A[i] // with offset1
addi i, 2
lw B[i]
addi offset2, 8
lw A[i+1] // we computed the new offset in previous instruction
add A[i], B[i]
lw B[i+1] // with offset2
nop
sw A[i-2] // with offset1
add A[i+1], B[i+1]
sw A[i-1] // with offset2
add offset1, 8