function [ys,check] = model_rev38_steadystate(ys,exe)
global M_ lgy_

%% DO NOT CHANGE THIS PART.
%%
%% Here we load the values of the deep parameters in a loop.
%%
if isfield(M_,'param_nbr') == 1
    NumberOfParameters = M_.param_nbr;                            % Number of deep parameters.
for i = 1:NumberOfParameters                                  % Loop...
  paramname = deblank(M_.param_names(i,:));                   %    Get the name of parameter i. 
  eval([ paramname ' = M_.params(' int2str(i) ');']);         %    Get the value of parameter i.
end                                                           % End of the loop.  
check = 0;
end
%%
%% END OF THE FIRST MODEL INDEPENDENT BLOCK.


%% THIS BLOCK IS MODEL SPECIFIC.
%%
%% Here the user has to define the steady state.
%%

Ibar		   = Kbar*(1-(1-delta)/Gama);
Vcbar = (Ybar - Cwbar - Kbar*(1-(1-delta)/Gama)-Abar*(1-1/(Pipbar*Gama))) / ((bheta*Zbar)^phicz * Bbar^phicb * Mrbar^(1-phicz-phicb) * ((1+rmbar)/(Pipbar*Gama))^phicm);

nu_ss=nubar;
Nw_ss=Nwbar;
rd_ss=rdbar;
rm_ss=rmbar;
Piw_ss=Piwbar;
Mr_ss=Mrbar;
Mf_ss=Mfbar;
K_ss = Kbar;
B_ss=Bbar;
Pip_ss=Pipbar;
xi_ss=(1/(Pipbar*Gama))^(-phiximf - phixid)-1;
u_ss=ubar;
Y_ss=Ybar;
K_ss=Y_ss/pssi;
varphi_ss=varphibar;
wp_ss=varphi_ss*(1-alfa)*pssi^(-alfa/(1-alfa));
L_ss=Lbar;   
Cw_ss=Cwbar;
Z_ss=Zbar;
Zr_ss=bheta*Zbar;  
Zf_ss=(1-bheta)*Zbar;
Cr_ss=Crbar;
rd_ss = (1+teta) * rmbar;
A_ss=Abar;

I = Ibar;
wp=wp_ss;
Y=Y_ss;
Cr=Cr_ss;
Cw=Cw_ss;
Zr=Zr_ss;
Nw=Nw_ss;
L=L_ss;
u=u_ss;
varphi=varphi_ss;
Pip=Pip_ss;
Piw=Piw_ss;
nu=nu_ss;
Piwe=Pip_ss;
Ye=Y_ss;
D=Dbar;
A_ss=Abar;
Mr=Mr_ss;
Mf=Mf_ss;
B=B_ss;
Z=Z_ss;
Zf=Zf_ss;
Zr=Zr_ss;
rd=rd_ss;
rm=rm_ss;
A=A_ss;
K=K_ss;
xi=xi_ss;

Va=1;
Vn=1;
Vi=1;
Vr=1;
Vnu=1;
Vinv=1;
Vc=Vcbar;

%I=Ibar;

devlnY=0; 
devlnC=0; 
devlnI=0; 
devR=0;
devPip=0;
devlnA=0;
devu=0;

%mpcz = phic*Cr_ss/Zr_ss 
%mpcb = (1-phic)*Cr_ss/Br_ss
%bz=Br_ss/Zr_ss
%mpiy = phiiy*I_ss/Y_ss


%%
%% END OF THE MODEL SPECIFIC BLOCK.


%% DO NOT CHANGE THIS PART.
%%
%% Here we define the steady state values of the endogenous variables of
%% the model.
%%

for iter = 1:length(M_.params)
  eval([ 'M_.params(' num2str(iter) ') = ' M_.param_names(iter,:) ';' ])
end

if isfield(M_,'param_nbr') == 1

if isfield(M_,'orig_endo_nbr') == 1
NumberOfEndogenousVariables = M_.orig_endo_nbr;
else
NumberOfEndogenousVariables = M_.endo_nbr;                   % Number of endogenous variables.
end
ys = zeros(NumberOfEndogenousVariables,1);                   % InitIization of ys (steady state).
for i = 1:NumberOfEndogenousVariables                        % Loop...
  varname = deblank(M_.endo_names(i,:));                     % Get the name of endogenous variable i
  eval(['ys(' int2str(i) ') = ' varname ';']);               % Get the steady state value of this variable.
end                                                          % End of the loop.
else
ys=zeros(length(lgy_),1);
for i = 1:length(lgy_)
    ys(i) = eval(lgy_(i,:));
end
check = 0;
end
end

%%
%% END OF THE SECOND MODEL INDEPENDENT BLOCK.