public final void conditional(String funcName) throws RecognitionException {
		TreeRuleReturnScope r1 =null;

		 
					BasicBlock topBlock = currBlock;
		            BasicBlock endThen;
		            Jmp jmp; 
				  
		try {
			// C:\\eclipse-workspaces\\workspace1\\Compiler\\src\\edu\\calpoly\\mwerner\\compiler\\ControlFlow.g:651:6: ( ^( IF r1= expression[funcName] block[funcName] ( block[funcName] )? ) )
			// C:\\eclipse-workspaces\\workspace1\\Compiler\\src\\edu\\calpoly\\mwerner\\compiler\\ControlFlow.g:651:8: ^( IF r1= expression[funcName] block[funcName] ( block[funcName] )? )
			{
			match(input,IF,FOLLOW_IF_in_conditional682); 
			match(input, Token.DOWN, null); 
			pushFollow(FOLLOW_expression_in_conditional686);
			r1=expression(funcName);
			state._fsp--;

			  
						BasicBlock thenBlock = new BasicBlock("L" + labelCounter++);
						
						topBlock.addSuccessor(thenBlock);
						thenBlock.addPredecessor(topBlock);
						
						currBlock = thenBlock;
					
			pushFollow(FOLLOW_block_in_conditional694);
			block(funcName);
			state._fsp--;


						endThen = currBlock;
						
						BasicBlock elseBlock = new BasicBlock("L" + labelCounter++);
						
						topBlock.addSuccessor(elseBlock);
						elseBlock.addPredecessor(topBlock);
						
						currBlock = elseBlock;
						
						Compi compi = new Compi(new Register((r1!=null?((ControlFlow.expression_return)r1).reg:0)), new Immediate(1), new Register("ccr"));
						topBlock.addInstr(compi);
						Cmp cmp = new Cmp(new Immediate(1), new Register((r1!=null?((ControlFlow.expression_return)r1).reg:0)));
						topBlock.addAssembly(cmp);
						
						Cbreq cbreq = new Cbreq(new Register("ccr"), new Label(thenBlock.getLabel()), new Label(elseBlock.getLabel()));
						topBlock.addInstr(cbreq);
						Je je = new Je(new Label(thenBlock.getLabel()));
						jmp = new Jmp(new Label(elseBlock.getLabel()));
						topBlock.addAssembly(je);
						topBlock.addAssembly(jmp);
						
					
			// C:\\eclipse-workspaces\\workspace1\\Compiler\\src\\edu\\calpoly\\mwerner\\compiler\\ControlFlow.g:682:5: ( block[funcName] )?
			int alt15=2;
			int LA15_0 = input.LA(1);
			if ( (LA15_0==BLOCK) ) {
				alt15=1;
			}
			switch (alt15) {
				case 1 :
					// C:\\eclipse-workspaces\\workspace1\\Compiler\\src\\edu\\calpoly\\mwerner\\compiler\\ControlFlow.g:682:6: block[funcName]
					{
					pushFollow(FOLLOW_block_in_conditional702);
					block(funcName);
					state._fsp--;

					}
					break;

			}

			match(input, Token.UP, null); 


						BasicBlock afterBlock = new BasicBlock("L" + labelCounter++);
						
						endThen.addSuccessor(afterBlock);
						
						if (endThen.numInstructions() == 0)
						{
							Jumpi jumpi = new Jumpi(new Label(afterBlock.getLabel()));
							endThen.addInstr(jumpi);
							
							jmp = new Jmp(new Label(afterBlock.getLabel()));
							endThen.addAssembly(jmp);
						}
						else if (!(endThen.getInstr(endThen.numInstructions()-1) instanceof Ret))
						{
							Jumpi jumpi = new Jumpi(new Label(afterBlock.getLabel()));
							endThen.addInstr(jumpi);
							
							jmp = new Jmp(new Label(afterBlock.getLabel()));
							endThen.addAssembly(jmp);
						}
						
						currBlock.addSuccessor(afterBlock);
						
						if (currBlock.numInstructions() == 0)
						{
							Jumpi jumpimm = new Jumpi(new Label(afterBlock.getLabel()));
							currBlock.addInstr(jumpimm);
							
							jmp = new Jmp(new Label(afterBlock.getLabel()));
							currBlock.addAssembly(jmp);
						}
						else if (!(currBlock.getInstr(currBlock.numInstructions()-1) instanceof Ret))
						{
							Jumpi jumpimm = new Jumpi(new Label(afterBlock.getLabel()));
							currBlock.addInstr(jumpimm);
							
							jmp = new Jmp(new Label(afterBlock.getLabel()));
							currBlock.addAssembly(jmp);
						}
						
						afterBlock.addPredecessor(endThen);
						afterBlock.addPredecessor(currBlock);
						
						currBlock = afterBlock;
					
			}

		}
		catch (RecognitionException re) {
			reportError(re);
			recover(input,re);
		}
		finally {
			// do for sure before leaving
		}
	}