@Override
    public List<AssemblyLine> generate(Context context)
    {
        final List<AssemblyLine> lines = Lists.newLinkedList();
        
        lines.add(new Label(
                String.format(FUNCTION_MANGLE, returnType.getName())));
        
        Context funcContext = generateContext(context);
        
        if (size > 0)
        {
            lines.add(new Instruction(Opcode.SUB).first(
                    new RegisterAccess("SP")).second(new Value(size)));
        }
        
        Block block = (Block) children.get(0);
        lines.addAll(block.generate(funcContext));
        
        if ((block.getChildren().size() > 0 && !(block.getChildren().get(
                block.getChildren().size() - 1) instanceof Return))
                || block.getChildren().size() == 0)
        {
            generateExitLines(lines);
        }
        
        return lines;
    }