/* BEGIN GENERATED CODE */#include "cmm450.csci" /*Declarations Section*/ /*Function Declarations Section*/ F0001: /*function: gcd label: F0001 param cnt: 2 */ /* BEGIN LOCAL DECLARATIONS */ /* END LOCAL DECLARATIONS */ /* Begin Expression v */ /* name:v address:1 type:12 local:1 */ push(1) load(SP) push(0) eq /* End Expression */ brz( L0002 ) /* Begin Expression u */ /* name:u address:0 type:12 local:1 */ push(0) load(SP) /* End Expression */ ret jump( L0001 ) L0002: /* Begin Expression gcd */ /* Begin Expression v */ /* name:v address:1 type:12 local:1 */ push(1) load(SP) /* End Expression */ /* Begin Expression u */ /* name:u address:0 type:12 local:1 */ push(0) load(SP) /* name:u address:0 type:12 local:1 */ push(0) load(SP) /* name:v address:1 type:12 local:1 */ push(1) load(SP) div /* name:v address:1 type:12 local:1 */ push(1) load(SP) mult sub /* End Expression */ push(2 ) push(1 ) call /* End Expression */ ret L0001: /* automatic return */ ret F0002: /*function: main label: F0002 param cnt: 0 */ /* BEGIN LOCAL DECLARATIONS */ push(0) push(0) /* END LOCAL DECLARATIONS */ /* Begin Expression x */ /* name:x address:0 type:12 local:2 */ /* LHS Assign (Address) */ push(0) /* RHS Assign (Value) */ /* Begin Expression input */ push(0 ) push(-2 ) call /* End Expression */ store(SP) /* End Expression */ /* Begin Expression y */ /* name:y address:1 type:12 local:2 */ /* LHS Assign (Address) */ push(1) /* RHS Assign (Value) */ /* Begin Expression input */ push(0 ) push(-2 ) call /* End Expression */ store(SP) /* End Expression */ /* Begin Expression output */ /* Begin Expression gcd */ /* Begin Expression x */ /* name:x address:0 type:12 local:2 */ push(0) load(SP) /* End Expression */ /* Begin Expression y */ /* name:y address:1 type:12 local:2 */ push(1) load(SP) /* End Expression */ push(2 ) push(1 ) call /* End Expression */ push(1 ) push(-1 ) call /* End Expression */ /* automatic return */ end CALLSWITCH: jumptable entry( -2 , INPUT ) entry ( -1 , OUTPUT ) entry ( 0 , INIT ) entry ( 1 , F0001 )/* gcd */ MAIN: entry ( 2 , F0002 )/* main */ endtable /*Var Declarations Section*/ INIT: start /* END OF GENERATED CODE */