Programming-Language-Design / output.txt
output.txt
Raw
#source "input/big-input.txt"

' *  Global variables
	' * struct {[int integer, char character] } pair (offset 0)
	' * [2,struct {[[2,struct {[int age] }] employees] }] acme (offset 3)
	' * [8,[3,int]] fibonacci (offset 11)

' Invocation to the main function
call main
halt

#line	14
 p:
	' * Parameters
	' * Local variables
	ret 0, 0, 0

#line	16
 f:
	' * Parameters
	' * double r (offset 6)
	' * int e (offset 4)
	' * Local variables
	' * double real (offset -4)
	' * char c (offset -5)
	' * int result (offset -7)
	enter 7

#line	20
	push bp
	pushi -4
	addi
	push bp
	pushi 6
	addi
	loadf
	pushf 10.0
	mulf
	storef

#line	21
	push bp
	pushi -5
	addi
	pushb 48
	storeb

#line	22
	' * If statement
	push bp
	pushi 4
	addi
	loadi
	pushi 256
	lti
	jz label0
	' * Body of the if branch

#line	23
	push bp
	pushi -5
	addi
	push bp
	pushi 4
	addi
	loadi
	i2b
	storeb

#line	24
	push bp
	pushi -7
	addi
	push bp
	pushi -5
	addi
	loadb
	b2i
	storei
	jmp label1
label0:
	' * Body of the else branch

#line	27
	push bp
	pushi -7
	addi
	push bp
	pushi -4
	addi
	loadf
	f2i
	storei
label1:

#line	28
	' * Return
	push bp
	pushi -7
	addi
	loadi
	ret 2, 7, 6

#line	31
 initialize:
	' * Parameters
	' * Local variables
	' * int i (offset -2)
	enter 2

#line	33
	pusha 11
	pushi 0
	pushi 6
	muli
	addi
	pushi 0
	pushi 2
	muli
	addi
	pushi 0
	storei

#line	34
	pusha 11
	pushi 0
	pushi 6
	muli
	addi
	pushi 1
	pushi 2
	muli
	addi
	pushi 1
	storei

#line	35
	pusha 11
	pushi 0
	pushi 6
	muli
	addi
	pushi 2
	pushi 2
	muli
	addi
	pushi 1
	storei

#line	36
	push bp
	pushi -2
	addi
	pushi 1
	storei

#line	37
	' * While
label2:
	push bp
	pushi -2
	addi
	loadi
	pushi 8
	lti
	jz label3
	' * Body of the while statement

#line	38
	pusha 11
	push bp
	pushi -2
	addi
	loadi
	pushi 6
	muli
	addi
	pushi 0
	pushi 2
	muli
	addi
	pusha 11
	push bp
	pushi -2
	addi
	loadi
	pushi 1
	subi
	pushi 6
	muli
	addi
	pushi 1
	pushi 2
	muli
	addi
	loadi
	storei

#line	39
	pusha 11
	push bp
	pushi -2
	addi
	loadi
	pushi 6
	muli
	addi
	pushi 1
	pushi 2
	muli
	addi
	pusha 11
	push bp
	pushi -2
	addi
	loadi
	pushi 1
	subi
	pushi 6
	muli
	addi
	pushi 2
	pushi 2
	muli
	addi
	loadi
	storei

#line	40
	pusha 11
	push bp
	pushi -2
	addi
	loadi
	pushi 6
	muli
	addi
	pushi 2
	pushi 2
	muli
	addi
	pusha 11
	push bp
	pushi -2
	addi
	loadi
	pushi 6
	muli
	addi
	pushi 0
	pushi 2
	muli
	addi
	loadi
	pusha 11
	push bp
	pushi -2
	addi
	loadi
	pushi 6
	muli
	addi
	pushi 1
	pushi 2
	muli
	addi
	loadi
	addi
	storei

#line	41
	push bp
	pushi -2
	addi
	push bp
	pushi -2
	addi
	loadi
	pushi 1
	addi
	storei
	jmp label2
label3:
	ret 0, 2, 0

#line	47
 main:
	' * Parameters
	' * Local variables
	' * int i (offset -2)
	' * int j (offset -4)
	enter 4

#line	49
	call p

#line	50
	push bp
	pushi -2
	addi
	pushi 0
	storei

#line	51
	pusha 0
	pushi 2
	addi
	pushb 48
	storeb

#line	52
	pusha 0
	pushi 0
	addi
	pushb 48
	b2i
	storei

#line	55
	' * Write
	push bp
	pushi -2
	addi
	loadi
	i2f
	pusha 0
	pushi 2
	addi
	loadb
	b2i
	call f
	outi
	' * Write
	pushb 10
	outb

#line	56
	pushf 1.3
	pushi 2
	call f
	popi

#line	58
	call initialize

#line	59
	push bp
	pushi -2
	addi
	pushi 0
	storei

#line	60
	' * While
label4:
	push bp
	pushi -2
	addi
	loadi
	pushi 8
	lti
	jz label5
	' * Body of the while statement

#line	64
	' * Write
	pushb 40
	outb
	' * Write
	push bp
	pushi -2
	addi
	loadi
	pushi 1
	addi
	outi
	' * Write
	pushb 41
	outb
	' * Write
	pusha 11
	push bp
	pushi -2
	addi
	loadi
	pushi 6
	muli
	addi
	pushi 0
	pushi 2
	muli
	addi
	loadi
	outi
	' * Write
	pushb 43
	outb
	' * Write
	pusha 11
	push bp
	pushi -2
	addi
	loadi
	pushi 6
	muli
	addi
	pushi 1
	pushi 2
	muli
	addi
	loadi
	outi
	' * Write
	pushb 61
	outb
	' * Write
	pusha 11
	push bp
	pushi -2
	addi
	loadi
	pushi 6
	muli
	addi
	pushi 2
	pushi 2
	muli
	addi
	loadi
	outi
	' * Write
	pushb 10
	outb

#line	65
	push bp
	pushi -2
	addi
	push bp
	pushi -2
	addi
	loadi
	pushi 1
	addi
	storei
	jmp label4
label5:

#line	68
	pusha 3
	pushi 1
	pushi 4
	muli
	addi
	pushi 0
	addi
	pushi 1
	pushi 2
	muli
	addi
	pushi 0
	addi
	pushi 56
	storei

#line	70
	' * Write
	pusha 3
	pushi 1
	pushi 4
	muli
	addi
	pushi 0
	addi
	pushi 1
	pushi 2
	muli
	addi
	pushi 0
	addi
	loadi
	outi
	' * Write
	pushb 10
	outb

#line	71
	push bp
	pushi -2
	addi
	pushi 0
	storei

#line	72
	' * While
label6:
	push bp
	pushi -2
	addi
	loadi
	pushi 2
	lti
	jz label7
	' * Body of the while statement

#line	73
	push bp
	pushi -4
	addi
	pushi 0
	storei

#line	74
	' * While
label8:
	push bp
	pushi -4
	addi
	loadi
	pushi 2
	lti
	jz label9
	' * Body of the while statement

#line	75
	pusha 3
	push bp
	pushi -2
	addi
	loadi
	pushi 4
	muli
	addi
	pushi 0
	addi
	push bp
	pushi -4
	addi
	loadi
	pushi 2
	muli
	addi
	pushi 0
	addi
	push bp
	pushi -2
	addi
	loadi
	push bp
	pushi -4
	addi
	loadi
	addi
	storei

#line	76
	push bp
	pushi -4
	addi
	push bp
	pushi -4
	addi
	loadi
	pushi 1
	addi
	storei
	jmp label8
label9:

#line	78
	push bp
	pushi -2
	addi
	push bp
	pushi -2
	addi
	loadi
	pushi 1
	addi
	storei
	jmp label6
label7:

#line	82
	push bp
	pushi -2
	addi
	pushi 0
	storei

#line	83
	' * While
label10:
	push bp
	pushi -2
	addi
	loadi
	pushi 2
	lti
	jz label11
	' * Body of the while statement

#line	84
	push bp
	pushi -4
	addi
	pushi 0
	storei

#line	85
	' * While
label12:
	push bp
	pushi -4
	addi
	loadi
	pushi 2
	lti
	jz label13
	' * Body of the while statement

#line	87
	' * Write
	pusha 3
	push bp
	pushi -2
	addi
	loadi
	pushi 4
	muli
	addi
	pushi 0
	addi
	push bp
	pushi -4
	addi
	loadi
	pushi 2
	muli
	addi
	pushi 0
	addi
	loadi
	outi
	' * Write
	pushb 32
	outb

#line	88
	push bp
	pushi -4
	addi
	push bp
	pushi -4
	addi
	loadi
	pushi 1
	addi
	storei
	jmp label12
label13:

#line	90
	push bp
	pushi -2
	addi
	push bp
	pushi -2
	addi
	loadi
	pushi 1
	addi
	storei
	jmp label10
label11:
	ret 0, 4, 0