	.text
	.p2align	2
	.globl	sum_numbers
sum_numbers:
        # don't forget the labels and the  .text and .global things at the top of the program
        
        # a0 is a pointer to the start of an array of integers
        # a1 is the length of the array
        addi	t0, x0, 0  # int i = 0
        addi	t1, x0, 0  # int sum = 0
.LOOP:
        beq	t0, a1, .AFTER
        lw	t2, 0(a0)  # t2 = *a0
        add	t1, t1, t2 # sum += t2	
        addi	a0, a0, 4  # a0 += 4
        addi	t0, t0, 1  # i += 1
        j	.LOOP
.AFTER:
	addi	a0, t1, 0
.END:

