OpenShadingLanguage 1.00
# Compiled by oslc 1.3.0
shader node_vector_curves
param	color[256]	ramp	0 0 0 		 %read{19,92} %write{2147483647,-1}
param	vector	VectorIn	0 0 0 		 %read{0,101} %write{2147483647,-1}
param	float	Fac	0 		 %read{100,102} %write{2147483647,-1}
oparam	vector	VectorOut	0 0 0 		 %read{102,102} %write{32,103}
local	float	___302_f	 %read{10,84} %write{9,75}
local	int	___302_i	 %read{11,91} %write{10,82}
local	float	___302_t	 %read{21,94} %write{18,84}
local	float	___302_result	 %read{24,96} %write{20,95}
temp	float	$tmp1	 %read{32,32} %write{31,31}
const	int	$const1	0		 %read{0,79} %write{2147483647,-1}
temp	float	$tmp2	 %read{2,2} %write{0,0}
const	string	$const2	"ramp_lookup"		 %read{1,67} %write{2147483647,-1}
temp	float	$tmp3	 %read{9,9} %write{6,6}
const	float	$const3	1		 %read{2,100} %write{2147483647,-1}
temp	float	$tmp4	 %read{3,3} %write{2,2}
const	float	$const4	0.5		 %read{3,69} %write{2147483647,-1}
temp	float	$tmp5	 %read{5,5} %write{3,3}
const	float	$const5	0		 %read{6,87} %write{2147483647,-1}
const	string	$const6	"clamp"		 %read{4,70} %write{2147483647,-1}
temp	float	$tmp6	 %read{6,6} %write{5,5}
const	int	$const7	256		 %read{7,82} %write{2147483647,-1}
const	int	$const8	1		 %read{7,91} %write{2147483647,-1}
temp	int	$tmp7	 %read{8,8} %write{7,7}
temp	float	$tmp8	 %read{9,9} %write{8,8}
temp	int	$tmp9	 %read{12,12} %write{11,11}
temp	int	$tmp10	 %read{15,15} %write{14,14}
temp	float	$tmp11	 %read{18,18} %write{17,17}
temp	color	$tmp12	 %read{20,20} %write{19,19}
temp	int	$tmp13	 %read{22,22} %write{21,21}
temp	float	$tmp14	 %read{24,24} %write{23,23}
temp	float	$tmp15	 %read{29,29} %write{24,24}
temp	int	$tmp16	 %read{26,26} %write{25,25}
temp	float	$tmp17	 %read{28,28} %write{27,27}
temp	color	$tmp18	 %read{27,27} %write{26,26}
temp	float	$tmp19	 %read{29,29} %write{28,28}
const	float	$const9	2		 %read{30,96} %write{2147483647,-1}
temp	float	$tmp20	 %read{31,31} %write{30,30}
temp	float	$tmp21	 %read{65,65} %write{64,64}
temp	float	$tmp22	 %read{35,35} %write{33,33}
temp	float	$tmp23	 %read{42,42} %write{39,39}
temp	float	$tmp24	 %read{36,36} %write{35,35}
temp	float	$tmp25	 %read{38,38} %write{36,36}
temp	float	$tmp26	 %read{39,39} %write{38,38}
temp	int	$tmp27	 %read{41,41} %write{40,40}
temp	float	$tmp28	 %read{42,42} %write{41,41}
temp	int	$tmp29	 %read{45,45} %write{44,44}
temp	int	$tmp30	 %read{48,48} %write{47,47}
temp	float	$tmp31	 %read{51,51} %write{50,50}
temp	color	$tmp32	 %read{53,53} %write{52,52}
temp	int	$tmp33	 %read{55,55} %write{54,54}
temp	float	$tmp34	 %read{57,57} %write{56,56}
temp	float	$tmp35	 %read{62,62} %write{57,57}
temp	int	$tmp36	 %read{59,59} %write{58,58}
temp	float	$tmp37	 %read{61,61} %write{60,60}
temp	color	$tmp38	 %read{60,60} %write{59,59}
temp	float	$tmp39	 %read{62,62} %write{61,61}
temp	float	$tmp40	 %read{64,64} %write{63,63}
temp	float	$tmp41	 %read{98,98} %write{97,97}
const	int	$const10	2		 %read{66,98} %write{2147483647,-1}
temp	float	$tmp42	 %read{68,68} %write{66,66}
temp	float	$tmp43	 %read{75,75} %write{72,72}
temp	float	$tmp44	 %read{69,69} %write{68,68}
temp	float	$tmp45	 %read{71,71} %write{69,69}
temp	float	$tmp46	 %read{72,72} %write{71,71}
temp	int	$tmp47	 %read{74,74} %write{73,73}
temp	float	$tmp48	 %read{75,75} %write{74,74}
temp	int	$tmp49	 %read{78,78} %write{77,77}
temp	int	$tmp50	 %read{81,81} %write{80,80}
temp	float	$tmp51	 %read{84,84} %write{83,83}
temp	color	$tmp52	 %read{86,86} %write{85,85}
temp	int	$tmp53	 %read{88,88} %write{87,87}
temp	float	$tmp54	 %read{90,90} %write{89,89}
temp	float	$tmp55	 %read{95,95} %write{90,90}
temp	int	$tmp56	 %read{92,92} %write{91,91}
temp	float	$tmp57	 %read{94,94} %write{93,93}
temp	color	$tmp58	 %read{93,93} %write{92,92}
temp	float	$tmp59	 %read{95,95} %write{94,94}
temp	float	$tmp60	 %read{97,97} %write{96,96}
const	string	$const11	"mix"		 %read{99,99} %write{2147483647,-1}
temp	float	$tmp61	 %read{101,101} %write{100,100}
temp	vector	$tmp62	 %read{103,103} %write{101,101}
temp	vector	$tmp63	 %read{103,103} %write{102,102}
code ___main___
# D:\\blender_dev\\code\\trunk\\intern\\cycles\\kernel\\shaders\\node_vector_curves.osl:48
# 	VectorOut[1] = ramp_lookup(ramp, VectorIn[1], 1);
	compref		$tmp2 VectorIn $const1 	%filename{"D:\\blender_dev\\code\\trunk\\intern\\cycles\\kernel\\shaders\\node_vector_curves.osl"} %line{48} %argrw{"wrr"}
	functioncall	$const2 32 	%argrw{"r"}
# D:\\blender_dev\\code\\trunk\\intern\\cycles\\kernel\\shaders\\node_vector_curves.osl:25
# 
	add		$tmp4 $tmp2 $const3 	%line{25} %argrw{"wrr"}
	mul		$tmp5 $tmp4 $const4 	%argrw{"wrr"}
	functioncall	$const6 7 	%argrw{"r"}
# D:/blender_dev\\code\\trunk\\intern\\cycles\\kernel\\shaders\\stdosl.h:142
# PERCOMP1 (fabs)
	min		$tmp6 $tmp5 $const3 	%filename{"D:/blender_dev\\code\\trunk\\intern\\cycles\\kernel\\shaders\\stdosl.h"} %line{142} %argrw{"wrr"}
	max		$tmp3 $tmp6 $const5 	%argrw{"wrr"}
# D:\\blender_dev\\code\\trunk\\intern\\cycles\\kernel\\shaders\\node_vector_curves.osl:25
# 
	sub		$tmp7 $const7 $const8 	%filename{"D:\\blender_dev\\code\\trunk\\intern\\cycles\\kernel\\shaders\\node_vector_curves.osl"} %line{25} %argrw{"wrr"}
	assign		$tmp8 $tmp7 	%argrw{"wr"}
	mul		___302_f $tmp3 $tmp8 	%argrw{"wrr"}
# D:\\blender_dev\\code\\trunk\\intern\\cycles\\kernel\\shaders\\node_vector_curves.osl:28
# 	if (i < 0) i = 0;
	assign		___302_i ___302_f 	%line{28} %argrw{"wr"}
# D:\\blender_dev\\code\\trunk\\intern\\cycles\\kernel\\shaders\\node_vector_curves.osl:29
# 	if (i >= RAMP_TABLE_SIZE) i = RAMP_TABLE_SIZE - 1;
	lt		$tmp9 ___302_i $const1 	%line{29} %argrw{"wrr"}
	if		$tmp9 14 14 	%argrw{"r"}
	assign		___302_i $const1 	%argrw{"wr"}
# D:\\blender_dev\\code\\trunk\\intern\\cycles\\kernel\\shaders\\node_vector_curves.osl:30
# 	float t = f - (float)i;
	ge		$tmp10 ___302_i $const7 	%line{30} %argrw{"wrr"}
	if		$tmp10 17 17 	%argrw{"r"}
	sub		___302_i $const7 $const8 	%argrw{"wrr"}
# D:\\blender_dev\\code\\trunk\\intern\\cycles\\kernel\\shaders\\node_vector_curves.osl:31
# 
	assign		$tmp11 ___302_i 	%line{31} %argrw{"wr"}
	sub		___302_t ___302_f $tmp11 	%argrw{"wrr"}
# D:\\blender_dev\\code\\trunk\\intern\\cycles\\kernel\\shaders\\node_vector_curves.osl:33
# 
	aref		$tmp12 ramp ___302_i 	%line{33} %argrw{"wrr"}
	compref		___302_result $tmp12 $const1 	%argrw{"wrr"}
# D:\\blender_dev\\code\\trunk\\intern\\cycles\\kernel\\shaders\\node_vector_curves.osl:35
# 		result = (1.0 - t) * result + t * ramp[i + 1][component];
	gt		$tmp13 ___302_t $const5 	%line{35} %argrw{"wrr"}
	if		$tmp13 30 30 	%argrw{"r"}
# D:\\blender_dev\\code\\trunk\\intern\\cycles\\kernel\\shaders\\node_vector_curves.osl:36
# 	
	sub		$tmp14 $const3 ___302_t 	%line{36} %argrw{"wrr"}
	mul		$tmp15 $tmp14 ___302_result 	%argrw{"wrr"}
	add		$tmp16 ___302_i $const8 	%argrw{"wrr"}
	aref		$tmp18 ramp $tmp16 	%argrw{"wrr"}
	compref		$tmp17 $tmp18 $const1 	%argrw{"wrr"}
	mul		$tmp19 ___302_t $tmp17 	%argrw{"wrr"}
	add		___302_result $tmp15 $tmp19 	%argrw{"wrr"}
# D:\\blender_dev\\code\\trunk\\intern\\cycles\\kernel\\shaders\\node_vector_curves.osl:38
# }
	mul		$tmp20 ___302_result $const9 	%line{38} %argrw{"wrr"}
	sub		$tmp1 $tmp20 $const3 	%argrw{"wrr"}
# D:\\blender_dev\\code\\trunk\\intern\\cycles\\kernel\\shaders\\node_vector_curves.osl:48
# 	VectorOut[1] = ramp_lookup(ramp, VectorIn[1], 1);
	compassign	VectorOut $const1 $tmp1 	%line{48} %argrw{"wrr"}
# D:\\blender_dev\\code\\trunk\\intern\\cycles\\kernel\\shaders\\node_vector_curves.osl:49
# 	VectorOut[2] = ramp_lookup(ramp, VectorIn[2], 2);
	compref		$tmp22 VectorIn $const8 	%line{49} %argrw{"wrr"}
	functioncall	$const2 65 	%argrw{"r"}
# D:\\blender_dev\\code\\trunk\\intern\\cycles\\kernel\\shaders\\node_vector_curves.osl:25
# 
	add		$tmp24 $tmp22 $const3 	%line{25} %argrw{"wrr"}
	mul		$tmp25 $tmp24 $const4 	%argrw{"wrr"}
	functioncall	$const6 40 	%argrw{"r"}
# D:/blender_dev\\code\\trunk\\intern\\cycles\\kernel\\shaders\\stdosl.h:142
# PERCOMP1 (fabs)
	min		$tmp26 $tmp25 $const3 	%filename{"D:/blender_dev\\code\\trunk\\intern\\cycles\\kernel\\shaders\\stdosl.h"} %line{142} %argrw{"wrr"}
	max		$tmp23 $tmp26 $const5 	%argrw{"wrr"}
# D:\\blender_dev\\code\\trunk\\intern\\cycles\\kernel\\shaders\\node_vector_curves.osl:25
# 
	sub		$tmp27 $const7 $const8 	%filename{"D:\\blender_dev\\code\\trunk\\intern\\cycles\\kernel\\shaders\\node_vector_curves.osl"} %line{25} %argrw{"wrr"}
	assign		$tmp28 $tmp27 	%argrw{"wr"}
	mul		___302_f $tmp23 $tmp28 	%argrw{"wrr"}
# D:\\blender_dev\\code\\trunk\\intern\\cycles\\kernel\\shaders\\node_vector_curves.osl:28
# 	if (i < 0) i = 0;
	assign		___302_i ___302_f 	%line{28} %argrw{"wr"}
# D:\\blender_dev\\code\\trunk\\intern\\cycles\\kernel\\shaders\\node_vector_curves.osl:29
# 	if (i >= RAMP_TABLE_SIZE) i = RAMP_TABLE_SIZE - 1;
	lt		$tmp29 ___302_i $const1 	%line{29} %argrw{"wrr"}
	if		$tmp29 47 47 	%argrw{"r"}
	assign		___302_i $const1 	%argrw{"wr"}
# D:\\blender_dev\\code\\trunk\\intern\\cycles\\kernel\\shaders\\node_vector_curves.osl:30
# 	float t = f - (float)i;
	ge		$tmp30 ___302_i $const7 	%line{30} %argrw{"wrr"}
	if		$tmp30 50 50 	%argrw{"r"}
	sub		___302_i $const7 $const8 	%argrw{"wrr"}
# D:\\blender_dev\\code\\trunk\\intern\\cycles\\kernel\\shaders\\node_vector_curves.osl:31
# 
	assign		$tmp31 ___302_i 	%line{31} %argrw{"wr"}
	sub		___302_t ___302_f $tmp31 	%argrw{"wrr"}
# D:\\blender_dev\\code\\trunk\\intern\\cycles\\kernel\\shaders\\node_vector_curves.osl:33
# 
	aref		$tmp32 ramp ___302_i 	%line{33} %argrw{"wrr"}
	compref		___302_result $tmp32 $const8 	%argrw{"wrr"}
# D:\\blender_dev\\code\\trunk\\intern\\cycles\\kernel\\shaders\\node_vector_curves.osl:35
# 		result = (1.0 - t) * result + t * ramp[i + 1][component];
	gt		$tmp33 ___302_t $const5 	%line{35} %argrw{"wrr"}
	if		$tmp33 63 63 	%argrw{"r"}
# D:\\blender_dev\\code\\trunk\\intern\\cycles\\kernel\\shaders\\node_vector_curves.osl:36
# 	
	sub		$tmp34 $const3 ___302_t 	%line{36} %argrw{"wrr"}
	mul		$tmp35 $tmp34 ___302_result 	%argrw{"wrr"}
	add		$tmp36 ___302_i $const8 	%argrw{"wrr"}
	aref		$tmp38 ramp $tmp36 	%argrw{"wrr"}
	compref		$tmp37 $tmp38 $const8 	%argrw{"wrr"}
	mul		$tmp39 ___302_t $tmp37 	%argrw{"wrr"}
	add		___302_result $tmp35 $tmp39 	%argrw{"wrr"}
# D:\\blender_dev\\code\\trunk\\intern\\cycles\\kernel\\shaders\\node_vector_curves.osl:38
# }
	mul		$tmp40 ___302_result $const9 	%line{38} %argrw{"wrr"}
	sub		$tmp21 $tmp40 $const3 	%argrw{"wrr"}
# D:\\blender_dev\\code\\trunk\\intern\\cycles\\kernel\\shaders\\node_vector_curves.osl:49
# 	VectorOut[2] = ramp_lookup(ramp, VectorIn[2], 2);
	compassign	VectorOut $const8 $tmp21 	%line{49} %argrw{"wrr"}
# D:\\blender_dev\\code\\trunk\\intern\\cycles\\kernel\\shaders\\node_vector_curves.osl:50
# 
	compref		$tmp42 VectorIn $const10 	%line{50} %argrw{"wrr"}
	functioncall	$const2 98 	%argrw{"r"}
# D:\\blender_dev\\code\\trunk\\intern\\cycles\\kernel\\shaders\\node_vector_curves.osl:25
# 
	add		$tmp44 $tmp42 $const3 	%line{25} %argrw{"wrr"}
	mul		$tmp45 $tmp44 $const4 	%argrw{"wrr"}
	functioncall	$const6 73 	%argrw{"r"}
# D:/blender_dev\\code\\trunk\\intern\\cycles\\kernel\\shaders\\stdosl.h:142
# PERCOMP1 (fabs)
	min		$tmp46 $tmp45 $const3 	%filename{"D:/blender_dev\\code\\trunk\\intern\\cycles\\kernel\\shaders\\stdosl.h"} %line{142} %argrw{"wrr"}
	max		$tmp43 $tmp46 $const5 	%argrw{"wrr"}
# D:\\blender_dev\\code\\trunk\\intern\\cycles\\kernel\\shaders\\node_vector_curves.osl:25
# 
	sub		$tmp47 $const7 $const8 	%filename{"D:\\blender_dev\\code\\trunk\\intern\\cycles\\kernel\\shaders\\node_vector_curves.osl"} %line{25} %argrw{"wrr"}
	assign		$tmp48 $tmp47 	%argrw{"wr"}
	mul		___302_f $tmp43 $tmp48 	%argrw{"wrr"}
# D:\\blender_dev\\code\\trunk\\intern\\cycles\\kernel\\shaders\\node_vector_curves.osl:28
# 	if (i < 0) i = 0;
	assign		___302_i ___302_f 	%line{28} %argrw{"wr"}
# D:\\blender_dev\\code\\trunk\\intern\\cycles\\kernel\\shaders\\node_vector_curves.osl:29
# 	if (i >= RAMP_TABLE_SIZE) i = RAMP_TABLE_SIZE - 1;
	lt		$tmp49 ___302_i $const1 	%line{29} %argrw{"wrr"}
	if		$tmp49 80 80 	%argrw{"r"}
	assign		___302_i $const1 	%argrw{"wr"}
# D:\\blender_dev\\code\\trunk\\intern\\cycles\\kernel\\shaders\\node_vector_curves.osl:30
# 	float t = f - (float)i;
	ge		$tmp50 ___302_i $const7 	%line{30} %argrw{"wrr"}
	if		$tmp50 83 83 	%argrw{"r"}
	sub		___302_i $const7 $const8 	%argrw{"wrr"}
# D:\\blender_dev\\code\\trunk\\intern\\cycles\\kernel\\shaders\\node_vector_curves.osl:31
# 
	assign		$tmp51 ___302_i 	%line{31} %argrw{"wr"}
	sub		___302_t ___302_f $tmp51 	%argrw{"wrr"}
# D:\\blender_dev\\code\\trunk\\intern\\cycles\\kernel\\shaders\\node_vector_curves.osl:33
# 
	aref		$tmp52 ramp ___302_i 	%line{33} %argrw{"wrr"}
	compref		___302_result $tmp52 $const10 	%argrw{"wrr"}
# D:\\blender_dev\\code\\trunk\\intern\\cycles\\kernel\\shaders\\node_vector_curves.osl:35
# 		result = (1.0 - t) * result + t * ramp[i + 1][component];
	gt		$tmp53 ___302_t $const5 	%line{35} %argrw{"wrr"}
	if		$tmp53 96 96 	%argrw{"r"}
# D:\\blender_dev\\code\\trunk\\intern\\cycles\\kernel\\shaders\\node_vector_curves.osl:36
# 	
	sub		$tmp54 $const3 ___302_t 	%line{36} %argrw{"wrr"}
	mul		$tmp55 $tmp54 ___302_result 	%argrw{"wrr"}
	add		$tmp56 ___302_i $const8 	%argrw{"wrr"}
	aref		$tmp58 ramp $tmp56 	%argrw{"wrr"}
	compref		$tmp57 $tmp58 $const10 	%argrw{"wrr"}
	mul		$tmp59 ___302_t $tmp57 	%argrw{"wrr"}
	add		___302_result $tmp55 $tmp59 	%argrw{"wrr"}
# D:\\blender_dev\\code\\trunk\\intern\\cycles\\kernel\\shaders\\node_vector_curves.osl:38
# }
	mul		$tmp60 ___302_result $const9 	%line{38} %argrw{"wrr"}
	sub		$tmp41 $tmp60 $const3 	%argrw{"wrr"}
# D:\\blender_dev\\code\\trunk\\intern\\cycles\\kernel\\shaders\\node_vector_curves.osl:50
# 
	compassign	VectorOut $const10 $tmp41 	%line{50} %argrw{"wrr"}
# D:\\blender_dev\\code\\trunk\\intern\\cycles\\kernel\\shaders\\node_vector_curves.osl:52
# }
	functioncall	$const11 104 	%line{52} %argrw{"r"}
# D:/blender_dev\\code\\trunk\\intern\\cycles\\kernel\\shaders\\stdosl.h:146
# PERCOMP1 (atan)
	sub		$tmp61 $const3 Fac 	%filename{"D:/blender_dev\\code\\trunk\\intern\\cycles\\kernel\\shaders\\stdosl.h"} %line{146} %argrw{"wrr"}
	mul		$tmp62 VectorIn $tmp61 	%argrw{"wrr"}
	mul		$tmp63 VectorOut Fac 	%argrw{"wrr"}
	add		VectorOut $tmp62 $tmp63 	%argrw{"wrr"}
	end
