%#codegen

function varargout = colon_operandsx(T, varargin)
    coder.inline('always');
    eml_prefer_const(T);
    eml_prefer_const(varargin);
    
    firstFiIdx = coder.const(findFirstFiIdx(T, varargin{:}));
    if firstFiIdx == -1 
        % No fi value
        for ii=coder.unroll(1:nargout)
            varargout{ii} = varargin{ii};
        end
    else
        
        for ii=coder.unroll(1:firstFiIdx-1)
            varargout{ii} = varargin{ii};
        end        
        
        nt = overcoattypex(T, varargin{:});
        varargout{firstFiIdx} = fi(varargin{firstFiIdx}, nt);
        
        for ii=coder.unroll(firstFiIdx+1:nargout)
            varargout{ii} = varargin{ii};
        end
        
    end
end
