    # MIPS assembly: native format
    # Automatically generated by ASM.MIPSGenerator

	.data
	.align 2
data_base:
	.space 16
	.asciiz "\n"
	.asciiz "should be 2: %d\n"
	.asciiz "should be 2: %d\n"
	.asciiz "should be 2: %d\n"
	.asciiz "%d:%d "
	.asciiz "test received %d, should be %d\n"
	.asciiz "Runtime exception: array index out of bounds.  Aborting.\n"
	.asciiz "Runtime exception: control fell off the end of a non-void procedure.  Aborting.\n"
	.text
	.globl main
main:
	la $23,data_base
	jal _main
	nop		# Function call: 0 args, 0 callersaves, 0 padding
	nop		# Placement of arguments
	jal exit
	nop		# Clean up from callout
	nop		# Function callout sequence completed
_test3:
	.ent _test3
	sw $30,-4($29)
	move $30,$29
	sw $31,-8($29)
	sw $16,-12($29)
	sw $17,-16($29)
	sw $18,-20($29)
	sw $19,-24($29)
	sw $20,-28($29)
	sw $21,-32($29)
	sw $22,-36($29)
	sub $29,$29,48
	nop		# test3 begins here
	li $2,2
	sge $18,$2,4
	move $2,$18
	bne $2,$0,array_bounds_runtime_exception
	li $2,2
	slt $18,$2,0
	move $2,$18
	bne $2,$0,array_bounds_runtime_exception
	li $2,2
	li $25,4
	mulo $2,$2,$25
	add $2,$23,$2
	lw $24,0($2)
	move $17,$24
	li $2,1
	sge $16,$2,4
	move $2,$16
	bne $2,$0,array_bounds_runtime_exception
	li $2,1
	slt $16,$2,0
	move $2,$16
	bne $2,$0,array_bounds_runtime_exception
	li $2,1
	move $24,$17
	li $25,4
	mulo $2,$2,$25
	add $2,$23,$2
	sw $24,0($2)
	li $2,1
label_0:
	nop		# test3's epilogue
	move $29,$30
	lw $30,-4($29)
	lw $31,-8($29)
	lw $16,-12($29)
	lw $17,-16($29)
	lw $18,-20($29)
	lw $19,-24($29)
	lw $20,-28($29)
	lw $21,-32($29)
	lw $22,-36($29)
	jr $31
	.end _test3
_test2:
	.ent _test2
	sw $30,-4($29)
	move $30,$29
	sw $31,-8($29)
	sw $16,-12($29)
	sw $17,-16($29)
	sw $18,-20($29)
	sw $19,-24($29)
	sw $20,-28($29)
	sw $21,-32($29)
	sw $22,-36($29)
	sub $29,$29,48
	nop		# test2 begins here
	li $2,0
	sge $17,$2,4
	move $2,$17
	bne $2,$0,array_bounds_runtime_exception
	li $2,0
	slt $17,$2,0
	move $2,$17
	bne $2,$0,array_bounds_runtime_exception
	li $2,0
	li $25,4
	mulo $2,$2,$25
	add $2,$23,$2
	lw $24,0($2)
	move $16,$24
	move $2,$16
label_1:
	nop		# test2's epilogue
	move $29,$30
	lw $30,-4($29)
	lw $31,-8($29)
	lw $16,-12($29)
	lw $17,-16($29)
	lw $18,-20($29)
	lw $19,-24($29)
	lw $20,-28($29)
	lw $21,-32($29)
	lw $22,-36($29)
	jr $31
	.end _test2
_main:
	.ent _main
	sw $30,-4($29)
	move $30,$29
	sw $31,-8($29)
	sw $16,-12($29)
	sw $17,-16($29)
	sw $18,-20($29)
	sw $19,-24($29)
	sw $20,-28($29)
	sw $21,-32($29)
	sw $22,-36($29)
	sub $29,$29,208
	nop		# main begins here
	li $2,0
	move $16,$2
	li $2,0
	move $17,$2
	li $2,0
	move $18,$2
	li $2,0
	move $18,$2
	li $2,0
	move $17,$2
	li $2,0
	move $16,$2
label_5:
	slt $25,$18,4
	sw $25,-92($30)
	lw $2,-92($30)
	bne $2,$0,label_6
label_7:
	li $2,0
	move $18,$2
label_2:
	slt $25,$18,4
	sw $25,-84($30)
	lw $2,-84($30)
	bne $2,$0,label_3
label_4:
	nop		# Function call: 1 args, 0 callersaves, 0 padding
	nop		# Placement of arguments
	la $4,data_base + 16
	jal printf
	nop		# Clean up from callout
	nop		# Function callout sequence completed
	sw $2,-76($30)
	li $2,2
	sge $25,$2,4
	sw $25,-68($30)
	lw $2,-68($30)
	bne $2,$0,array_bounds_runtime_exception
	li $2,2
	slt $25,$2,0
	sw $25,-68($30)
	lw $2,-68($30)
	bne $2,$0,array_bounds_runtime_exception
	li $2,2
	li $25,4
	mulo $2,$2,$25
	add $2,$23,$2
	lw $24,0($2)
	move $21,$24
	nop		# Function call: 2 args, 0 callersaves, 0 padding
	nop		# Placement of arguments
	li $5,2
	move $4,$21
	jal _test
	nop		# Clean up from call
	nop		# Function call sequence completed
	sw $2,-160($30)
	sll $25,$18,2
	sw $25,-156($30)
	lw $2,-156($30)
	sub $25,$2,14
	sw $25,-152($30)
	lw $2,-152($30)
	sge $25,$2,4
	sw $25,-148($30)
	lw $2,-148($30)
	bne $2,$0,array_bounds_runtime_exception
	lw $2,-152($30)
	slt $25,$2,0
	sw $25,-148($30)
	lw $2,-148($30)
	bne $2,$0,array_bounds_runtime_exception
	lw $2,-152($30)
	li $25,4
	mulo $2,$2,$25
	add $2,$23,$2
	lw $24,0($2)
	sw $24,-144($30)
	nop		# Function call: 2 args, 0 callersaves, 0 padding
	nop		# Placement of arguments
	li $5,2
	lw $4,-144($30)
	jal _test
	nop		# Clean up from call
	nop		# Function call sequence completed
	sw $2,-140($30)
	li $2,2
	sge $25,$2,4
	sw $25,-136($30)
	lw $2,-136($30)
	bne $2,$0,array_bounds_runtime_exception
	li $2,2
	slt $25,$2,0
	sw $25,-136($30)
	lw $2,-136($30)
	bne $2,$0,array_bounds_runtime_exception
	li $2,2
	li $25,4
	mulo $2,$2,$25
	add $2,$23,$2
	lw $24,0($2)
	sw $24,-132($30)
	lw $2,-132($30)
	sge $25,$2,4
	sw $25,-128($30)
	lw $2,-128($30)
	bne $2,$0,array_bounds_runtime_exception
	lw $2,-132($30)
	slt $25,$2,0
	sw $25,-128($30)
	lw $2,-128($30)
	bne $2,$0,array_bounds_runtime_exception
	lw $2,-132($30)
	li $25,4
	mulo $2,$2,$25
	add $2,$23,$2
	lw $24,0($2)
	sw $24,-124($30)
	nop		# Function call: 2 args, 0 callersaves, 0 padding
	nop		# Placement of arguments
	lw $5,-124($30)
	la $4,data_base + 18
	jal printf
	nop		# Clean up from callout
	nop		# Function callout sequence completed
	sw $2,-108($30)
	li $2,1
	sge $25,$2,4
	sw $25,-104($30)
	lw $2,-104($30)
	bne $2,$0,array_bounds_runtime_exception
	li $2,1
	slt $25,$2,0
	sw $25,-104($30)
	lw $2,-104($30)
	bne $2,$0,array_bounds_runtime_exception
	li $2,1
	li $25,4
	mulo $2,$2,$25
	add $2,$23,$2
	lw $24,0($2)
	sw $24,-100($30)
	li $2,0
	sge $25,$2,4
	sw $25,-96($30)
	lw $2,-96($30)
	bne $2,$0,array_bounds_runtime_exception
	li $2,0
	slt $25,$2,0
	sw $25,-96($30)
	lw $2,-96($30)
	bne $2,$0,array_bounds_runtime_exception
	li $2,0
	lw $24,-100($30)
	li $25,4
	mulo $2,$2,$25
	add $2,$23,$2
	sw $24,0($2)
	nop		# Function call: 0 args, 0 callersaves, 0 padding
	nop		# Placement of arguments
	jal _test2
	nop		# Clean up from call
	nop		# Function call sequence completed
	sw $2,-88($30)
	lw $2,-88($30)
	sge $25,$2,4
	sw $25,-80($30)
	lw $2,-80($30)
	bne $2,$0,array_bounds_runtime_exception
	lw $2,-88($30)
	slt $25,$2,0
	sw $25,-80($30)
	lw $2,-80($30)
	bne $2,$0,array_bounds_runtime_exception
	lw $2,-88($30)
	li $25,4
	mulo $2,$2,$25
	add $2,$23,$2
	lw $24,0($2)
	sw $24,-72($30)
	lw $2,-72($30)
	sge $22,$2,4
	move $2,$22
	bne $2,$0,array_bounds_runtime_exception
	lw $2,-72($30)
	slt $22,$2,0
	move $2,$22
	bne $2,$0,array_bounds_runtime_exception
	lw $2,-72($30)
	li $25,4
	mulo $2,$2,$25
	add $2,$23,$2
	lw $24,0($2)
	move $20,$24
	add $19,$20,1
	nop		# Function call: 2 args, 0 callersaves, 0 padding
	nop		# Placement of arguments
	move $5,$19
	la $4,data_base + 35
	jal printf
	nop		# Clean up from callout
	nop		# Function callout sequence completed
	sw $2,-200($30)
	nop		# Function call: 0 args, 0 callersaves, 0 padding
	nop		# Placement of arguments
	jal _test3
	nop		# Clean up from call
	nop		# Function call sequence completed
	sw $2,-196($30)
	lw $2,-196($30)
	sge $25,$2,4
	sw $25,-192($30)
	lw $2,-192($30)
	bne $2,$0,array_bounds_runtime_exception
	lw $2,-196($30)
	slt $25,$2,0
	sw $25,-192($30)
	lw $2,-192($30)
	bne $2,$0,array_bounds_runtime_exception
	lw $2,-196($30)
	li $25,4
	mulo $2,$2,$25
	add $2,$23,$2
	lw $24,0($2)
	sw $24,-188($30)
	lw $2,-188($30)
	sge $25,$2,4
	sw $25,-184($30)
	lw $2,-184($30)
	bne $2,$0,array_bounds_runtime_exception
	lw $2,-188($30)
	slt $25,$2,0
	sw $25,-184($30)
	lw $2,-184($30)
	bne $2,$0,array_bounds_runtime_exception
	lw $2,-188($30)
	li $25,4
	mulo $2,$2,$25
	add $2,$23,$2
	lw $24,0($2)
	sw $24,-180($30)
	nop		# Function call: 2 args, 0 callersaves, 0 padding
	nop		# Placement of arguments
	lw $5,-180($30)
	la $4,data_base + 52
	jal printf
	nop		# Clean up from callout
	nop		# Function callout sequence completed
	sw $2,-176($30)
label_8:
	nop		# main's epilogue
	move $29,$30
	lw $30,-4($29)
	lw $31,-8($29)
	lw $16,-12($29)
	lw $17,-16($29)
	lw $18,-20($29)
	lw $19,-24($29)
	lw $20,-28($29)
	lw $21,-32($29)
	lw $22,-36($29)
	jr $31
	.end _main
label_3:
	sge $25,$18,4
	sw $25,-172($30)
	lw $2,-172($30)
	bne $2,$0,array_bounds_runtime_exception
	slt $25,$18,0
	sw $25,-172($30)
	lw $2,-172($30)
	bne $2,$0,array_bounds_runtime_exception
	move $2,$18
	li $25,4
	mulo $2,$2,$25
	add $2,$23,$2
	lw $24,0($2)
	sw $24,-168($30)
	nop		# Function call: 3 args, 0 callersaves, 0 padding
	nop		# Placement of arguments
	lw $6,-168($30)
	move $5,$18
	la $4,data_base + 69
	jal printf
	nop		# Clean up from callout
	nop		# Function callout sequence completed
	sw $2,-164($30)
	add $25,$18,1
	sw $25,-120($30)
	lw $2,-120($30)
	move $18,$2
	b label_2
label_6:
	sge $25,$18,4
	sw $25,-116($30)
	lw $2,-116($30)
	bne $2,$0,array_bounds_runtime_exception
	slt $25,$18,0
	sw $25,-116($30)
	lw $2,-116($30)
	bne $2,$0,array_bounds_runtime_exception
	move $2,$18
	move $24,$18
	li $25,4
	mulo $2,$2,$25
	add $2,$23,$2
	sw $24,0($2)
	add $25,$18,1
	sw $25,-112($30)
	lw $2,-112($30)
	move $18,$2
	b label_5
_test:
	.ent _test
	sw $30,-4($29)
	move $30,$29
	sw $31,-8($29)
	sw $16,-12($29)
	sw $17,-16($29)
	sw $18,-20($29)
	sw $19,-24($29)
	sw $20,-28($29)
	sw $21,-32($29)
	sw $22,-36($29)
	sub $29,$29,48
	nop		# test begins here
	move $2,$4
	move $17,$2
	move $2,$5
	move $16,$2
	nop		# Function call: 3 args, 0 callersaves, 0 padding
	nop		# Placement of arguments
	move $6,$16
	move $5,$17
	la $4,data_base + 76
	jal printf
	nop		# Clean up from callout
	nop		# Function callout sequence completed
	move $18,$2
label_9:
	nop		# test's epilogue
	move $29,$30
	lw $30,-4($29)
	lw $31,-8($29)
	lw $16,-12($29)
	lw $17,-16($29)
	lw $18,-20($29)
	lw $19,-24($29)
	lw $20,-28($29)
	lw $21,-32($29)
	lw $22,-36($29)
	jr $31
	.end _test
array_bounds_runtime_exception:
	nop		# Function call: 1 args, 0 callersaves, 0 padding
	nop		# Placement of arguments
	la $4,data_base + 108
	jal printf
	nop		# Clean up from callout
	nop		# Function callout sequence completed
	nop		# Function call: 0 args, 0 callersaves, 0 padding
	nop		# Placement of arguments
	jal exit
	nop		# Clean up from callout
	nop		# Function callout sequence completed
fell_off_end_runtime_exception:
	nop		# Function call: 1 args, 0 callersaves, 0 padding
	nop		# Placement of arguments
	la $4,data_base + 166
	jal printf
	nop		# Clean up from callout
	nop		# Function callout sequence completed
	nop		# Function call: 0 args, 0 callersaves, 0 padding
	nop		# Placement of arguments
	jal exit
	nop		# Clean up from callout
	nop		# Function callout sequence completed

