	# this is autogenerated!
main:

	# fd_0 = open("my_file.txt", 0);
	# printf("%s", "open(\"my_file.txt\", 0) ==> ")
	li	$v0, 4
	la	$a0, string_1
	syscall
	li	$v0, 13
	la	$a0, string_0
	li	$a1, 0
	syscall
	move	$s0, $v0
	# print open() result
	move	$a0, $s0
	li	$v0, 1
	syscall
	# printf("%s", "\n")
	li	$v0, 4
	la	$a0, string_2
	syscall

	# fd_0 = open("my_file.txt", 1);
	# printf("%s", "open(\"my_file.txt\", 1) ==> ")
	li	$v0, 4
	la	$a0, string_3
	syscall
	li	$v0, 13
	la	$a0, string_0
	li	$a1, 1
	syscall
	move	$s0, $v0
	# print open() result
	move	$a0, $s0
	li	$v0, 1
	syscall
	# printf("%s", "\n")
	li	$v0, 4
	la	$a0, string_2
	syscall

	li	$v0, 97
	sb	$v0, buf_1 + 0
	li	$v0, 98
	sb	$v0, buf_1 + 1
	li	$v0, 99
	sb	$v0, buf_1 + 2
	li	$v0, 100
	sb	$v0, buf_1 + 3
	li	$v0, 101
	sb	$v0, buf_1 + 4
	li	$v0, 102
	sb	$v0, buf_1 + 5
	li	$v0, 103
	sb	$v0, buf_1 + 6
	li	$v0, 104
	sb	$v0, buf_1 + 7
	# printf("%s", "buf_1: ")
	li	$v0, 4
	la	$a0, string_4
	syscall
	li	$t0, 0
label_0:
	bge	$t0, 8, label_1
	lb	$a0, buf_1($t0)
	li	$v0, 11
syscall
	addi	$t0, $t0, 1
	b	label_0
label_1:
	# printf("%s", "\n")
	li	$v0, 4
	la	$a0, string_2
	syscall
	# read(fd_0, buf_1, 8);
	# printf("%s", "read(")
	li	$v0, 4
	la	$a0, string_5
	syscall
	move	$a0, $s0
	li	$v0, 1
	syscall
	# printf("%s", ", buf_1, 8) ==> ")
	li	$v0, 4
	la	$a0, string_6
	syscall
	li	$v0, 14
	move	$a0, $s0
	la	$a1, buf_1
	li	$a2, 8
	syscall
	# print read() result
	move	$a0, $v0
	li	$v0, 1
	syscall
	# printf("%s", "\n")
	li	$v0, 4
	la	$a0, string_2
	syscall
	# printf("%s", "buf_1: ")
	li	$v0, 4
	la	$a0, string_4
	syscall
	li	$t0, 0
label_2:
	bge	$t0, 8, label_3
	lb	$a0, buf_1($t0)
	li	$v0, 11
syscall
	addi	$t0, $t0, 1
	b	label_2
label_3:
	# printf("%s", "\n")
	li	$v0, 4
	la	$a0, string_2
	syscall
	# write(fd_0, buf_1, 6);
	# printf("%s", "write(")
	li	$v0, 4
	la	$a0, string_7
	syscall
	move	$a0, $s0
	li	$v0, 1
	syscall
	# printf("%s", ", buf_1, 6) ==> ")
	li	$v0, 4
	la	$a0, string_8
	syscall
	li	$v0, 15
	move	$a0, $s0
	la	$a1, buf_1
	li	$a2, 6
	syscall
	# print write() result
	move	$a0, $v0
	li	$v0, 1
	syscall
	# printf("%s", "\n")
	li	$v0, 4
	la	$a0, string_2
	syscall
	# write(fd_0, buf_1, 8);
	# printf("%s", "write(")
	li	$v0, 4
	la	$a0, string_7
	syscall
	move	$a0, $s0
	li	$v0, 1
	syscall
	# printf("%s", ", buf_1, 8) ==> ")
	li	$v0, 4
	la	$a0, string_6
	syscall
	li	$v0, 15
	move	$a0, $s0
	la	$a1, buf_1
	li	$a2, 8
	syscall
	# print write() result
	move	$a0, $v0
	li	$v0, 1
	syscall
	# printf("%s", "\n")
	li	$v0, 4
	la	$a0, string_2
	syscall
	# write(fd_0, buf_1 + 4, 4);
	# printf("%s", "write(")
	li	$v0, 4
	la	$a0, string_7
	syscall
	move	$a0, $s0
	li	$v0, 1
	syscall
	# printf("%s", ", buf_1 + 4, 4) ==> ")
	li	$v0, 4
	la	$a0, string_9
	syscall
	li	$v0, 15
	move	$a0, $s0
	la	$a1, buf_1 + 4
	li	$a2, 4
	syscall
	# print write() result
	move	$a0, $v0
	li	$v0, 1
	syscall
	# printf("%s", "\n")
	li	$v0, 4
	la	$a0, string_2
	syscall
	# printf("%s", "buf_1: ")
	li	$v0, 4
	la	$a0, string_4
	syscall
	li	$t0, 0
label_4:
	bge	$t0, 8, label_5
	lb	$a0, buf_1($t0)
	li	$v0, 11
syscall
	addi	$t0, $t0, 1
	b	label_4
label_5:
	# printf("%s", "\n")
	li	$v0, 4
	la	$a0, string_2
	syscall
	# close(fd_0);
	# printf("%s", "close(")
	li	$v0, 4
	la	$a0, string_10
	syscall
	move	$a0, $s0
	li	$v0, 1
	syscall
	# printf("%s", ") ==> ")
	li	$v0, 4
	la	$a0, string_11
	syscall
	li	$v0, 16
	move	$a0, $s0
	syscall
	# print close() result
	move	$a0, $v0
	li	$v0, 1
	syscall
	# printf("%s", "\n")
	li	$v0, 4
	la	$a0, string_2
	syscall
	# write(fd_0, buf_1, 6);
	# printf("%s", "write(")
	li	$v0, 4
	la	$a0, string_7
	syscall
	move	$a0, $s0
	li	$v0, 1
	syscall
	# printf("%s", ", buf_1, 6) ==> ")
	li	$v0, 4
	la	$a0, string_8
	syscall
	li	$v0, 15
	move	$a0, $s0
	la	$a1, buf_1
	li	$a2, 6
	syscall
	# print write() result
	move	$a0, $v0
	li	$v0, 1
	syscall
	# printf("%s", "\n")
	li	$v0, 4
	la	$a0, string_2
	syscall

	# fd_1 = open("my_file.txt1", 0);
	# printf("%s", "open(\"my_file.txt1\", 0) ==> ")
	li	$v0, 4
	la	$a0, string_13
	syscall
	li	$v0, 13
	la	$a0, string_12
	li	$a1, 0
	syscall
	move	$s1, $v0
	# print open() result
	move	$a0, $s1
	li	$v0, 1
	syscall
	# printf("%s", "\n")
	li	$v0, 4
	la	$a0, string_2
	syscall

	# fd_1 = open("my_file.txt1", 1);
	# printf("%s", "open(\"my_file.txt1\", 1) ==> ")
	li	$v0, 4
	la	$a0, string_14
	syscall
	li	$v0, 13
	la	$a0, string_12
	li	$a1, 1
	syscall
	move	$s1, $v0
	# print open() result
	move	$a0, $s1
	li	$v0, 1
	syscall
	# printf("%s", "\n")
	li	$v0, 4
	la	$a0, string_2
	syscall

	# fd_2 = open("my_file.txt", 0);
	# printf("%s", "open(\"my_file.txt\", 0) ==> ")
	li	$v0, 4
	la	$a0, string_1
	syscall
	li	$v0, 13
	la	$a0, string_0
	li	$a1, 0
	syscall
	move	$s2, $v0
	# print open() result
	move	$a0, $s2
	li	$v0, 1
	syscall
	# printf("%s", "\n")
	li	$v0, 4
	la	$a0, string_2
	syscall
	# read(fd_2, buf_1, 10);
	# printf("%s", "read(")
	li	$v0, 4
	la	$a0, string_5
	syscall
	move	$a0, $s2
	li	$v0, 1
	syscall
	# printf("%s", ", buf_1, 10) ==> ")
	li	$v0, 4
	la	$a0, string_15
	syscall
	li	$v0, 14
	move	$a0, $s2
	la	$a1, buf_1
	li	$a2, 10
	syscall
	# print read() result
	move	$a0, $v0
	li	$v0, 1
	syscall
	# printf("%s", "\n")
	li	$v0, 4
	la	$a0, string_2
	syscall
	# printf("%s", "buf_1: ")
	li	$v0, 4
	la	$a0, string_4
	syscall
	li	$t0, 0
label_6:
	bge	$t0, 32, label_7
	lb	$a0, buf_1($t0)
	li	$v0, 11
syscall
	addi	$t0, $t0, 1
	b	label_6
label_7:
	# printf("%s", "\n")
	li	$v0, 4
	la	$a0, string_2
	syscall
	# read(fd_2, buf_1, 10);
	# printf("%s", "read(")
	li	$v0, 4
	la	$a0, string_5
	syscall
	move	$a0, $s2
	li	$v0, 1
	syscall
	# printf("%s", ", buf_1, 10) ==> ")
	li	$v0, 4
	la	$a0, string_15
	syscall
	li	$v0, 14
	move	$a0, $s2
	la	$a1, buf_1
	li	$a2, 10
	syscall
	# print read() result
	move	$a0, $v0
	li	$v0, 1
	syscall
	# printf("%s", "\n")
	li	$v0, 4
	la	$a0, string_2
	syscall
	# printf("%s", "buf_1: ")
	li	$v0, 4
	la	$a0, string_4
	syscall
	li	$t0, 0
label_8:
	bge	$t0, 32, label_9
	lb	$a0, buf_1($t0)
	li	$v0, 11
syscall
	addi	$t0, $t0, 1
	b	label_8
label_9:
	# printf("%s", "\n")
	li	$v0, 4
	la	$a0, string_2
	syscall
	# read(fd_2, buf_1, 10);
	# printf("%s", "read(")
	li	$v0, 4
	la	$a0, string_5
	syscall
	move	$a0, $s2
	li	$v0, 1
	syscall
	# printf("%s", ", buf_1, 10) ==> ")
	li	$v0, 4
	la	$a0, string_15
	syscall
	li	$v0, 14
	move	$a0, $s2
	la	$a1, buf_1
	li	$a2, 10
	syscall
	# print read() result
	move	$a0, $v0
	li	$v0, 1
	syscall
	# printf("%s", "\n")
	li	$v0, 4
	la	$a0, string_2
	syscall
	# printf("%s", "buf_1: ")
	li	$v0, 4
	la	$a0, string_4
	syscall
	li	$t0, 0
label_10:
	bge	$t0, 32, label_11
	lb	$a0, buf_1($t0)
	li	$v0, 11
syscall
	addi	$t0, $t0, 1
	b	label_10
label_11:
	# printf("%s", "\n")
	li	$v0, 4
	la	$a0, string_2
	syscall
	# close(fd_2);
	# printf("%s", "close(")
	li	$v0, 4
	la	$a0, string_10
	syscall
	move	$a0, $s2
	li	$v0, 1
	syscall
	# printf("%s", ") ==> ")
	li	$v0, 4
	la	$a0, string_11
	syscall
	li	$v0, 16
	move	$a0, $s2
	syscall
	# print close() result
	move	$a0, $v0
	li	$v0, 1
	syscall
	# printf("%s", "\n")
	li	$v0, 4
	la	$a0, string_2
	syscall
	# close(fd_2);
	# printf("%s", "close(")
	li	$v0, 4
	la	$a0, string_10
	syscall
	move	$a0, $s2
	li	$v0, 1
	syscall
	# printf("%s", ") ==> ")
	li	$v0, 4
	la	$a0, string_11
	syscall
	li	$v0, 16
	move	$a0, $s2
	syscall
	# print close() result
	move	$a0, $v0
	li	$v0, 1
	syscall
	# printf("%s", "\n")
	li	$v0, 4
	la	$a0, string_2
	syscall
	# close(fd_1);
	# printf("%s", "close(")
	li	$v0, 4
	la	$a0, string_10
	syscall
	move	$a0, $s1
	li	$v0, 1
	syscall
	# printf("%s", ") ==> ")
	li	$v0, 4
	la	$a0, string_11
	syscall
	li	$v0, 16
	move	$a0, $s1
	syscall
	# print close() result
	move	$a0, $v0
	li	$v0, 1
	syscall
	# printf("%s", "\n")
	li	$v0, 4
	la	$a0, string_2
	syscall
	li	$v0, 10
	syscall

.data
string_0:
	.asciiz	"my_file.txt"
string_1:
	.asciiz	"open(\"my_file.txt\", 0) ==> "
string_2:
	.asciiz	"\n"
string_3:
	.asciiz	"open(\"my_file.txt\", 1) ==> "
string_4:
	.asciiz	"buf_1: "
string_5:
	.asciiz	"read("
string_6:
	.asciiz	", buf_1, 8) ==> "
string_7:
	.asciiz	"write("
string_8:
	.asciiz	", buf_1, 6) ==> "
string_9:
	.asciiz	", buf_1 + 4, 4) ==> "
string_10:
	.asciiz	"close("
string_11:
	.asciiz	") ==> "
string_12:
	.asciiz	"my_file.txt1"
string_13:
	.asciiz	"open(\"my_file.txt1\", 0) ==> "
string_14:
	.asciiz	"open(\"my_file.txt1\", 1) ==> "
string_15:
	.asciiz	", buf_1, 10) ==> "
buf_1:
	.byte 42:32
